├── .bun-version ├── .github ├── FUNDING.yml └── workflows │ ├── ci.yml │ └── publish-to-npm.yml ├── .gitignore ├── .prettierignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── bun.lock ├── cli.js ├── package.json ├── playground ├── bun.lock ├── index.html ├── package.json ├── src │ ├── App.svelte │ ├── CodeEditor.svelte │ ├── CodeHighlighter.svelte │ ├── Header.svelte │ ├── LogoGithub20.svelte │ ├── TabContentOverlay.svelte │ ├── TabJson.svelte │ ├── TabMarkdown.svelte │ ├── TabTypeScript.svelte │ ├── data.ts │ ├── favicon.svg │ └── index.ts ├── tsconfig.json └── vite.config.ts ├── src ├── ComponentParser.ts ├── cli.ts ├── create-exports.ts ├── element-tag-map.ts ├── get-svelte-entry.ts ├── index.ts ├── parse-exports.ts ├── path.ts ├── rollup-plugin.ts ├── sveld.ts └── writer │ ├── Writer.ts │ ├── WriterMarkdown.ts │ ├── writer-json.ts │ ├── writer-markdown.ts │ └── writer-ts-definitions.ts ├── tests ├── ComponentParser.test.ts ├── Writer.test.ts ├── WriterMarkdown.test.ts ├── __snapshots__ │ ├── fixtures.test.ts.snap │ └── writer-ts-definitions.test.ts.snap ├── create-exports.test.ts ├── e2e │ ├── carbon │ │ ├── .gitignore │ │ ├── COMPONENT_API.json │ │ ├── COMPONENT_INDEX.md │ │ ├── bun.lock │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src │ │ │ ├── Accordion │ │ │ │ ├── Accordion.svelte │ │ │ │ ├── AccordionItem.svelte │ │ │ │ ├── AccordionSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── AspectRatio │ │ │ │ ├── AspectRatio.svelte │ │ │ │ └── index.js │ │ │ ├── Breadcrumb │ │ │ │ ├── Breadcrumb.svelte │ │ │ │ ├── BreadcrumbItem.svelte │ │ │ │ ├── BreadcrumbSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── Button │ │ │ │ ├── Button.svelte │ │ │ │ ├── ButtonSet.svelte │ │ │ │ ├── ButtonSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── Checkbox │ │ │ │ ├── Checkbox.svelte │ │ │ │ ├── CheckboxSkeleton.svelte │ │ │ │ ├── InlineCheckbox.svelte │ │ │ │ └── index.js │ │ │ ├── CodeSnippet │ │ │ │ ├── CodeSnippet.svelte │ │ │ │ ├── CodeSnippetSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── ComboBox │ │ │ │ ├── ComboBox.svelte │ │ │ │ └── index.js │ │ │ ├── ComposedModal │ │ │ │ ├── ComposedModal.svelte │ │ │ │ ├── ModalBody.svelte │ │ │ │ ├── ModalFooter.svelte │ │ │ │ ├── ModalHeader.svelte │ │ │ │ └── index.js │ │ │ ├── ContentSwitcher │ │ │ │ ├── ContentSwitcher.svelte │ │ │ │ ├── Switch.svelte │ │ │ │ └── index.js │ │ │ ├── Copy │ │ │ │ ├── Copy.svelte │ │ │ │ └── index.js │ │ │ ├── CopyButton │ │ │ │ ├── CopyButton.svelte │ │ │ │ └── index.js │ │ │ ├── DataTable │ │ │ │ ├── DataTable.svelte │ │ │ │ ├── DataTableSkeleton.svelte │ │ │ │ ├── Table.svelte │ │ │ │ ├── TableBody.svelte │ │ │ │ ├── TableCell.svelte │ │ │ │ ├── TableContainer.svelte │ │ │ │ ├── TableHead.svelte │ │ │ │ ├── TableHeader.svelte │ │ │ │ ├── TableRow.svelte │ │ │ │ ├── Toolbar.svelte │ │ │ │ ├── ToolbarBatchActions.svelte │ │ │ │ ├── ToolbarContent.svelte │ │ │ │ ├── ToolbarMenu.svelte │ │ │ │ ├── ToolbarMenuItem.svelte │ │ │ │ ├── ToolbarSearch.svelte │ │ │ │ └── index.js │ │ │ ├── DatePicker │ │ │ │ ├── DatePicker.svelte │ │ │ │ ├── DatePickerInput.svelte │ │ │ │ ├── DatePickerSkeleton.svelte │ │ │ │ ├── createCalendar.js │ │ │ │ └── index.js │ │ │ ├── Dropdown │ │ │ │ ├── Dropdown.svelte │ │ │ │ ├── DropdownSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── FileUploader │ │ │ │ ├── FileUploader.svelte │ │ │ │ ├── FileUploaderButton.svelte │ │ │ │ ├── FileUploaderDropContainer.svelte │ │ │ │ ├── FileUploaderItem.svelte │ │ │ │ ├── FileUploaderSkeleton.svelte │ │ │ │ ├── Filename.svelte │ │ │ │ └── index.js │ │ │ ├── FluidForm │ │ │ │ ├── FluidForm.svelte │ │ │ │ └── index.js │ │ │ ├── Form │ │ │ │ ├── Form.svelte │ │ │ │ └── index.js │ │ │ ├── FormGroup │ │ │ │ ├── FormGroup.svelte │ │ │ │ └── index.js │ │ │ ├── FormItem │ │ │ │ ├── FormItem.svelte │ │ │ │ └── index.js │ │ │ ├── FormLabel │ │ │ │ ├── FormLabel.svelte │ │ │ │ └── index.js │ │ │ ├── Grid │ │ │ │ ├── Column.svelte │ │ │ │ ├── Grid.svelte │ │ │ │ ├── Row.svelte │ │ │ │ └── index.js │ │ │ ├── Icon │ │ │ │ ├── Icon.svelte │ │ │ │ ├── IconSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── InlineLoading │ │ │ │ ├── InlineLoading.svelte │ │ │ │ └── index.js │ │ │ ├── Link │ │ │ │ ├── Link.svelte │ │ │ │ ├── OutboundLink.svelte │ │ │ │ └── index.js │ │ │ ├── ListBox │ │ │ │ ├── ListBox.svelte │ │ │ │ ├── ListBoxField.svelte │ │ │ │ ├── ListBoxMenu.svelte │ │ │ │ ├── ListBoxMenuIcon.svelte │ │ │ │ ├── ListBoxMenuItem.svelte │ │ │ │ ├── ListBoxSelection.svelte │ │ │ │ └── index.js │ │ │ ├── ListItem │ │ │ │ ├── ListItem.svelte │ │ │ │ └── index.js │ │ │ ├── Loading │ │ │ │ ├── Loading.svelte │ │ │ │ └── index.js │ │ │ ├── Modal │ │ │ │ ├── Modal.svelte │ │ │ │ └── index.js │ │ │ ├── MultiSelect │ │ │ │ ├── MultiSelect.svelte │ │ │ │ └── index.js │ │ │ ├── Notification │ │ │ │ ├── InlineNotification.svelte │ │ │ │ ├── NotificationActionButton.svelte │ │ │ │ ├── NotificationButton.svelte │ │ │ │ ├── NotificationIcon.svelte │ │ │ │ ├── NotificationTextDetails.svelte │ │ │ │ ├── ToastNotification.svelte │ │ │ │ └── index.js │ │ │ ├── NumberInput │ │ │ │ ├── NumberInput.svelte │ │ │ │ ├── NumberInputSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── OrderedList │ │ │ │ ├── OrderedList.svelte │ │ │ │ └── index.js │ │ │ ├── OverflowMenu │ │ │ │ ├── OverflowMenu.svelte │ │ │ │ ├── OverflowMenuItem.svelte │ │ │ │ ├── formatStyle.js │ │ │ │ └── index.js │ │ │ ├── Pagination │ │ │ │ ├── Pagination.svelte │ │ │ │ ├── PaginationSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── PaginationNav │ │ │ │ ├── PaginationItem.svelte │ │ │ │ ├── PaginationNav.svelte │ │ │ │ ├── PaginationOverflow.svelte │ │ │ │ └── index.js │ │ │ ├── ProgressIndicator │ │ │ │ ├── ProgressIndicator.svelte │ │ │ │ ├── ProgressIndicatorSkeleton.svelte │ │ │ │ ├── ProgressStep.svelte │ │ │ │ └── index.js │ │ │ ├── RadioButton │ │ │ │ ├── RadioButton.svelte │ │ │ │ ├── RadioButtonSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── RadioButtonGroup │ │ │ │ ├── RadioButtonGroup.svelte │ │ │ │ └── index.js │ │ │ ├── Search │ │ │ │ ├── Search.svelte │ │ │ │ ├── SearchSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── Select │ │ │ │ ├── Select.svelte │ │ │ │ ├── SelectItem.svelte │ │ │ │ ├── SelectItemGroup.svelte │ │ │ │ ├── SelectSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── SkeletonPlaceholder │ │ │ │ ├── SkeletonPlaceholder.svelte │ │ │ │ └── index.js │ │ │ ├── SkeletonText │ │ │ │ ├── SkeletonText.svelte │ │ │ │ └── index.js │ │ │ ├── Slider │ │ │ │ ├── Slider.svelte │ │ │ │ ├── SliderSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── StructuredList │ │ │ │ ├── StructuredList.svelte │ │ │ │ ├── StructuredListBody.svelte │ │ │ │ ├── StructuredListCell.svelte │ │ │ │ ├── StructuredListHead.svelte │ │ │ │ ├── StructuredListInput.svelte │ │ │ │ ├── StructuredListRow.svelte │ │ │ │ ├── StructuredListSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── Tabs │ │ │ │ ├── Tab.svelte │ │ │ │ ├── TabContent.svelte │ │ │ │ ├── Tabs.svelte │ │ │ │ ├── TabsSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── Tag │ │ │ │ ├── Tag.svelte │ │ │ │ ├── TagSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── TextArea │ │ │ │ ├── TextArea.svelte │ │ │ │ ├── TextAreaSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── TextInput │ │ │ │ ├── PasswordInput.svelte │ │ │ │ ├── TextInput.svelte │ │ │ │ ├── TextInputSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── Tile │ │ │ │ ├── ClickableTile.svelte │ │ │ │ ├── ExpandableTile.svelte │ │ │ │ ├── RadioTile.svelte │ │ │ │ ├── SelectableTile.svelte │ │ │ │ ├── Tile.svelte │ │ │ │ ├── TileGroup.svelte │ │ │ │ └── index.js │ │ │ ├── TimePicker │ │ │ │ ├── TimePicker.svelte │ │ │ │ ├── TimePickerSelect.svelte │ │ │ │ └── index.js │ │ │ ├── Toggle │ │ │ │ ├── Toggle.svelte │ │ │ │ ├── ToggleSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── ToggleSmall │ │ │ │ ├── ToggleSmall.svelte │ │ │ │ ├── ToggleSmallSkeleton.svelte │ │ │ │ └── index.js │ │ │ ├── Tooltip │ │ │ │ ├── Tooltip.svelte │ │ │ │ └── index.js │ │ │ ├── TooltipDefinition │ │ │ │ ├── TooltipDefinition.svelte │ │ │ │ └── index.js │ │ │ ├── TooltipIcon │ │ │ │ ├── TooltipIcon.svelte │ │ │ │ └── index.js │ │ │ ├── UIShell │ │ │ │ ├── Content.svelte │ │ │ │ ├── GlobalHeader │ │ │ │ │ ├── Header.svelte │ │ │ │ │ ├── HeaderAction.svelte │ │ │ │ │ ├── HeaderActionLink.svelte │ │ │ │ │ ├── HeaderActionSearch.svelte │ │ │ │ │ ├── HeaderNav.svelte │ │ │ │ │ ├── HeaderNavItem.svelte │ │ │ │ │ ├── HeaderNavMenu.svelte │ │ │ │ │ ├── HeaderPanelDivider.svelte │ │ │ │ │ ├── HeaderPanelLink.svelte │ │ │ │ │ ├── HeaderPanelLinks.svelte │ │ │ │ │ └── HeaderUtilities.svelte │ │ │ │ ├── HeaderGlobalAction.svelte │ │ │ │ ├── HeaderSearch.svelte │ │ │ │ ├── SideNav │ │ │ │ │ ├── HamburgerMenu.svelte │ │ │ │ │ ├── SideNav.svelte │ │ │ │ │ ├── SideNavItems.svelte │ │ │ │ │ ├── SideNavLink.svelte │ │ │ │ │ ├── SideNavMenu.svelte │ │ │ │ │ └── SideNavMenuItem.svelte │ │ │ │ ├── SkipToContent.svelte │ │ │ │ ├── index.js │ │ │ │ ├── navStore.js │ │ │ │ └── searchStore.js │ │ │ ├── UnorderedList │ │ │ │ ├── UnorderedList.svelte │ │ │ │ └── index.js │ │ │ └── index.js │ │ ├── test │ │ │ └── Accordion.svelte │ │ ├── tsconfig.json │ │ └── types │ │ │ ├── Accordion │ │ │ ├── Accordion.svelte.d.ts │ │ │ ├── AccordionItem.svelte.d.ts │ │ │ └── AccordionSkeleton.svelte.d.ts │ │ │ ├── AspectRatio │ │ │ └── AspectRatio.svelte.d.ts │ │ │ ├── Breadcrumb │ │ │ ├── Breadcrumb.svelte.d.ts │ │ │ ├── BreadcrumbItem.svelte.d.ts │ │ │ └── BreadcrumbSkeleton.svelte.d.ts │ │ │ ├── Button │ │ │ ├── Button.svelte.d.ts │ │ │ ├── ButtonSet.svelte.d.ts │ │ │ └── ButtonSkeleton.svelte.d.ts │ │ │ ├── Checkbox │ │ │ ├── Checkbox.svelte.d.ts │ │ │ └── CheckboxSkeleton.svelte.d.ts │ │ │ ├── CodeSnippet │ │ │ ├── CodeSnippet.svelte.d.ts │ │ │ └── CodeSnippetSkeleton.svelte.d.ts │ │ │ ├── ComboBox │ │ │ └── ComboBox.svelte.d.ts │ │ │ ├── ComposedModal │ │ │ ├── ComposedModal.svelte.d.ts │ │ │ ├── ModalBody.svelte.d.ts │ │ │ ├── ModalFooter.svelte.d.ts │ │ │ └── ModalHeader.svelte.d.ts │ │ │ ├── ContentSwitcher │ │ │ ├── ContentSwitcher.svelte.d.ts │ │ │ └── Switch.svelte.d.ts │ │ │ ├── Copy │ │ │ └── Copy.svelte.d.ts │ │ │ ├── CopyButton │ │ │ └── CopyButton.svelte.d.ts │ │ │ ├── DataTable │ │ │ ├── DataTable.svelte.d.ts │ │ │ ├── DataTableSkeleton.svelte.d.ts │ │ │ ├── Table.svelte.d.ts │ │ │ ├── TableBody.svelte.d.ts │ │ │ ├── TableCell.svelte.d.ts │ │ │ ├── TableContainer.svelte.d.ts │ │ │ ├── TableHead.svelte.d.ts │ │ │ ├── TableHeader.svelte.d.ts │ │ │ ├── TableRow.svelte.d.ts │ │ │ ├── Toolbar.svelte.d.ts │ │ │ ├── ToolbarBatchActions.svelte.d.ts │ │ │ ├── ToolbarContent.svelte.d.ts │ │ │ ├── ToolbarMenu.svelte.d.ts │ │ │ ├── ToolbarMenuItem.svelte.d.ts │ │ │ └── ToolbarSearch.svelte.d.ts │ │ │ ├── DatePicker │ │ │ ├── DatePicker.svelte.d.ts │ │ │ ├── DatePickerInput.svelte.d.ts │ │ │ └── DatePickerSkeleton.svelte.d.ts │ │ │ ├── Dropdown │ │ │ ├── Dropdown.svelte.d.ts │ │ │ └── DropdownSkeleton.svelte.d.ts │ │ │ ├── FileUploader │ │ │ ├── FileUploader.svelte.d.ts │ │ │ ├── FileUploaderButton.svelte.d.ts │ │ │ ├── FileUploaderDropContainer.svelte.d.ts │ │ │ ├── FileUploaderItem.svelte.d.ts │ │ │ ├── FileUploaderSkeleton.svelte.d.ts │ │ │ └── Filename.svelte.d.ts │ │ │ ├── FluidForm │ │ │ └── FluidForm.svelte.d.ts │ │ │ ├── Form │ │ │ └── Form.svelte.d.ts │ │ │ ├── FormGroup │ │ │ └── FormGroup.svelte.d.ts │ │ │ ├── FormItem │ │ │ └── FormItem.svelte.d.ts │ │ │ ├── FormLabel │ │ │ └── FormLabel.svelte.d.ts │ │ │ ├── Grid │ │ │ ├── Column.svelte.d.ts │ │ │ ├── Grid.svelte.d.ts │ │ │ └── Row.svelte.d.ts │ │ │ ├── Icon │ │ │ ├── Icon.svelte.d.ts │ │ │ └── IconSkeleton.svelte.d.ts │ │ │ ├── InlineLoading │ │ │ └── InlineLoading.svelte.d.ts │ │ │ ├── Link │ │ │ ├── Link.svelte.d.ts │ │ │ └── OutboundLink.svelte.d.ts │ │ │ ├── ListBox │ │ │ ├── ListBox.svelte.d.ts │ │ │ ├── ListBoxField.svelte.d.ts │ │ │ ├── ListBoxMenu.svelte.d.ts │ │ │ ├── ListBoxMenuIcon.svelte.d.ts │ │ │ ├── ListBoxMenuItem.svelte.d.ts │ │ │ └── ListBoxSelection.svelte.d.ts │ │ │ ├── ListItem │ │ │ └── ListItem.svelte.d.ts │ │ │ ├── Loading │ │ │ └── Loading.svelte.d.ts │ │ │ ├── Modal │ │ │ └── Modal.svelte.d.ts │ │ │ ├── MultiSelect │ │ │ └── MultiSelect.svelte.d.ts │ │ │ ├── Notification │ │ │ ├── InlineNotification.svelte.d.ts │ │ │ ├── NotificationActionButton.svelte.d.ts │ │ │ ├── NotificationButton.svelte.d.ts │ │ │ ├── NotificationIcon.svelte.d.ts │ │ │ ├── NotificationTextDetails.svelte.d.ts │ │ │ └── ToastNotification.svelte.d.ts │ │ │ ├── NumberInput │ │ │ ├── NumberInput.svelte.d.ts │ │ │ └── NumberInputSkeleton.svelte.d.ts │ │ │ ├── OrderedList │ │ │ └── OrderedList.svelte.d.ts │ │ │ ├── OverflowMenu │ │ │ ├── OverflowMenu.svelte.d.ts │ │ │ └── OverflowMenuItem.svelte.d.ts │ │ │ ├── Pagination │ │ │ ├── Pagination.svelte.d.ts │ │ │ └── PaginationSkeleton.svelte.d.ts │ │ │ ├── PaginationNav │ │ │ └── PaginationNav.svelte.d.ts │ │ │ ├── ProgressIndicator │ │ │ ├── ProgressIndicator.svelte.d.ts │ │ │ ├── ProgressIndicatorSkeleton.svelte.d.ts │ │ │ └── ProgressStep.svelte.d.ts │ │ │ ├── RadioButton │ │ │ ├── RadioButton.svelte.d.ts │ │ │ └── RadioButtonSkeleton.svelte.d.ts │ │ │ ├── RadioButtonGroup │ │ │ └── RadioButtonGroup.svelte.d.ts │ │ │ ├── Search │ │ │ ├── Search.svelte.d.ts │ │ │ └── SearchSkeleton.svelte.d.ts │ │ │ ├── Select │ │ │ ├── Select.svelte.d.ts │ │ │ ├── SelectItem.svelte.d.ts │ │ │ ├── SelectItemGroup.svelte.d.ts │ │ │ └── SelectSkeleton.svelte.d.ts │ │ │ ├── SkeletonPlaceholder │ │ │ └── SkeletonPlaceholder.svelte.d.ts │ │ │ ├── SkeletonText │ │ │ └── SkeletonText.svelte.d.ts │ │ │ ├── Slider │ │ │ ├── Slider.svelte.d.ts │ │ │ └── SliderSkeleton.svelte.d.ts │ │ │ ├── StructuredList │ │ │ ├── StructuredList.svelte.d.ts │ │ │ ├── StructuredListBody.svelte.d.ts │ │ │ ├── StructuredListCell.svelte.d.ts │ │ │ ├── StructuredListHead.svelte.d.ts │ │ │ ├── StructuredListInput.svelte.d.ts │ │ │ ├── StructuredListRow.svelte.d.ts │ │ │ └── StructuredListSkeleton.svelte.d.ts │ │ │ ├── Tabs │ │ │ ├── Tab.svelte.d.ts │ │ │ ├── TabContent.svelte.d.ts │ │ │ ├── Tabs.svelte.d.ts │ │ │ └── TabsSkeleton.svelte.d.ts │ │ │ ├── Tag │ │ │ ├── Tag.svelte.d.ts │ │ │ └── TagSkeleton.svelte.d.ts │ │ │ ├── TextArea │ │ │ ├── TextArea.svelte.d.ts │ │ │ └── TextAreaSkeleton.svelte.d.ts │ │ │ ├── TextInput │ │ │ ├── PasswordInput.svelte.d.ts │ │ │ ├── TextInput.svelte.d.ts │ │ │ └── TextInputSkeleton.svelte.d.ts │ │ │ ├── Tile │ │ │ ├── ClickableTile.svelte.d.ts │ │ │ ├── ExpandableTile.svelte.d.ts │ │ │ ├── RadioTile.svelte.d.ts │ │ │ ├── SelectableTile.svelte.d.ts │ │ │ ├── Tile.svelte.d.ts │ │ │ └── TileGroup.svelte.d.ts │ │ │ ├── TimePicker │ │ │ ├── TimePicker.svelte.d.ts │ │ │ └── TimePickerSelect.svelte.d.ts │ │ │ ├── Toggle │ │ │ ├── Toggle.svelte.d.ts │ │ │ └── ToggleSkeleton.svelte.d.ts │ │ │ ├── ToggleSmall │ │ │ ├── ToggleSmall.svelte.d.ts │ │ │ └── ToggleSmallSkeleton.svelte.d.ts │ │ │ ├── Tooltip │ │ │ └── Tooltip.svelte.d.ts │ │ │ ├── TooltipDefinition │ │ │ └── TooltipDefinition.svelte.d.ts │ │ │ ├── TooltipIcon │ │ │ └── TooltipIcon.svelte.d.ts │ │ │ ├── UIShell │ │ │ ├── Content.svelte.d.ts │ │ │ ├── GlobalHeader │ │ │ │ ├── Header.svelte.d.ts │ │ │ │ ├── HeaderAction.svelte.d.ts │ │ │ │ ├── HeaderActionLink.svelte.d.ts │ │ │ │ ├── HeaderActionSearch.svelte.d.ts │ │ │ │ ├── HeaderNav.svelte.d.ts │ │ │ │ ├── HeaderNavItem.svelte.d.ts │ │ │ │ ├── HeaderNavMenu.svelte.d.ts │ │ │ │ ├── HeaderPanelDivider.svelte.d.ts │ │ │ │ ├── HeaderPanelLink.svelte.d.ts │ │ │ │ ├── HeaderPanelLinks.svelte.d.ts │ │ │ │ └── HeaderUtilities.svelte.d.ts │ │ │ ├── HeaderGlobalAction.svelte.d.ts │ │ │ ├── HeaderSearch.svelte.d.ts │ │ │ ├── SideNav │ │ │ │ ├── SideNav.svelte.d.ts │ │ │ │ ├── SideNavItems.svelte.d.ts │ │ │ │ ├── SideNavLink.svelte.d.ts │ │ │ │ ├── SideNavMenu.svelte.d.ts │ │ │ │ └── SideNavMenuItem.svelte.d.ts │ │ │ └── SkipToContent.svelte.d.ts │ │ │ ├── UnorderedList │ │ │ └── UnorderedList.svelte.d.ts │ │ │ └── index.d.ts │ ├── glob │ │ ├── .gitignore │ │ ├── COMPONENT_API.json │ │ ├── COMPONENT_INDEX.md │ │ ├── bun.lock │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src │ │ │ ├── action │ │ │ │ ├── Action.js │ │ │ │ └── index.js │ │ │ ├── button │ │ │ │ ├── Button.svelte │ │ │ │ └── index.js │ │ │ └── index.js │ │ ├── test │ │ │ └── test.svelte │ │ ├── tsconfig.json │ │ └── types │ │ │ ├── button │ │ │ └── Button.svelte.d.ts │ │ │ └── index.d.ts │ ├── multi-export-typed-ts-only │ │ ├── .gitignore │ │ ├── bun.lock │ │ ├── button │ │ │ └── button.svelte │ │ ├── index.js │ │ ├── link │ │ │ └── link.svelte │ │ ├── package.json │ │ ├── quote │ │ │ └── quote.svelte │ │ ├── rollup.config.js │ │ ├── secondary-button │ │ │ └── secondary-button.svelte │ │ ├── test.svelte │ │ ├── test │ │ │ └── test.svelte │ │ ├── tsconfig.json │ │ └── types │ │ │ ├── button │ │ │ └── button.svelte.d.ts │ │ │ ├── index.d.ts │ │ │ ├── link │ │ │ └── link.svelte.d.ts │ │ │ ├── quote │ │ │ └── quote.svelte.d.ts │ │ │ └── secondary-button │ │ │ └── secondary-button.svelte.d.ts │ ├── multi-export-typed │ │ ├── .gitignore │ │ ├── COMPONENT_API.json │ │ ├── COMPONENT_INDEX.md │ │ ├── bun.lock │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src │ │ │ ├── Button.svelte │ │ │ ├── Link.svelte │ │ │ ├── Quote.svelte │ │ │ ├── SecondaryButton.svelte │ │ │ └── index.js │ │ ├── test.svelte │ │ ├── test │ │ │ └── test.svelte │ │ ├── tsconfig.json │ │ └── types │ │ │ ├── Button.svelte.d.ts │ │ │ ├── Link.svelte.d.ts │ │ │ ├── Quote.svelte.d.ts │ │ │ ├── SecondaryButton.svelte.d.ts │ │ │ └── index.d.ts │ ├── multi-export │ │ ├── .gitignore │ │ ├── COMPONENT_API.json │ │ ├── COMPONENT_INDEX.md │ │ ├── bun.lock │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src │ │ │ ├── Button.svelte │ │ │ ├── Link.svelte │ │ │ ├── Quote.svelte │ │ │ ├── index.js │ │ │ └── nested │ │ │ │ └── Header.svelte │ │ ├── test │ │ │ └── test.svelte │ │ ├── tsconfig.json │ │ └── types │ │ │ ├── Button.svelte.d.ts │ │ │ ├── Link.svelte.d.ts │ │ │ ├── Quote.svelte.d.ts │ │ │ ├── index.d.ts │ │ │ └── nested │ │ │ └── Header.svelte.d.ts │ ├── multi-folders │ │ ├── .gitignore │ │ ├── COMPONENT_API.json │ │ ├── COMPONENT_INDEX.md │ │ ├── bun.lock │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src │ │ │ ├── Link.svelte │ │ │ ├── Quote.svelte │ │ │ ├── components │ │ │ │ ├── Button.svelte │ │ │ │ ├── Card.svelte │ │ │ │ └── index.js │ │ │ ├── index.js │ │ │ └── nested │ │ │ │ └── Header.svelte │ │ ├── test │ │ │ └── test.svelte │ │ ├── tsconfig.json │ │ └── types │ │ │ ├── Link.svelte.d.ts │ │ │ ├── Quote.svelte.d.ts │ │ │ ├── components │ │ │ ├── Button.svelte.d.ts │ │ │ └── Card.svelte.d.ts │ │ │ ├── index.d.ts │ │ │ └── nested │ │ │ └── Header.svelte.d.ts │ ├── single-export-default-only │ │ ├── .gitignore │ │ ├── COMPONENT_API.json │ │ ├── COMPONENT_INDEX.md │ │ ├── bun.lock │ │ ├── component │ │ │ ├── Button.svelte │ │ │ └── index.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── test │ │ │ └── test.svelte │ │ ├── tsconfig.json │ │ └── types │ │ │ ├── Button.svelte.d.ts │ │ │ └── index.d.ts │ └── single-export │ │ ├── .gitignore │ │ ├── COMPONENT_API.json │ │ ├── COMPONENT_INDEX.md │ │ ├── bun.lock │ │ ├── component │ │ ├── Button.svelte │ │ └── index.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── test │ │ └── test.svelte │ │ ├── tsconfig.json │ │ └── types │ │ ├── Button.svelte.d.ts │ │ └── index.d.ts ├── element-tag-map.test.ts ├── fixtures.test.ts ├── fixtures │ ├── anchor-props │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── bind-this-multiple │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── bind-this │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── component-comment-multi │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── component-comment-single │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── context-module │ │ ├── input.svelte │ │ ├── output.d.ts │ │ ├── output.json │ │ └── types.ts │ ├── dispatched-events-dynamic │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── dispatched-events-typed │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── dispatched-events │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── empty-export │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── forwarded-events │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── function-declaration │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── generics-multiple │ │ ├── Test.svelte │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── generics-with-rest-props │ │ ├── Test.svelte │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── generics │ │ ├── Test.svelte │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── infer-basic │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── infer-with-types │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── input-events │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── mixed-events │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── no-props │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── prop-comments │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── renamed-props │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── required │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── rest-props-multiple │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── rest-props-simple │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── slots-named │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── slots-spread-typed │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── slots-spread │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── svg-props │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── typed-props │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── typed-slots │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ ├── typedef │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json │ └── typedefs │ │ ├── input.svelte │ │ ├── output.d.ts │ │ └── output.json ├── get-svelte-entry.test.ts ├── parse-exports.test.ts ├── test-e2e.ts └── writer-ts-definitions.test.ts ├── tsconfig.fixtures.json └── tsconfig.json /.bun-version: -------------------------------------------------------------------------------- 1 | 1.2.14 -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: metonym 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea 3 | lib 4 | build 5 | dist 6 | node_modules 7 | pnpm* 8 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | tests/e2e 2 | lib 3 | dist 4 | tests/**/*.json -------------------------------------------------------------------------------- /cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | (() => { 4 | try { 5 | require("./lib").cli(process); 6 | } catch (error) { 7 | console.error(error); 8 | } 9 | })(); 10 | -------------------------------------------------------------------------------- /playground/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /playground/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "private": true, 4 | "scripts": { 5 | "dev": "bun --bun vite", 6 | "build": "bun --bun vite build", 7 | "preview": "bun --bun vite preview" 8 | }, 9 | "devDependencies": { 10 | "@sveltejs/vite-plugin-svelte": "^3.1.2", 11 | "@types/codemirror": "^5.60.16", 12 | "carbon-components-svelte": "^0.89.2", 13 | "carbon-preprocess-svelte": "^0.11.11", 14 | "codemirror": "^5.65.19", 15 | "prettier": "^3.5.3", 16 | "svelte": "^4.2.20", 17 | "svelte-highlight": "^7.8.3", 18 | "typescript": "^5.8.3", 19 | "vite": "^5.4.19" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /playground/src/LogoGithub20.svelte: -------------------------------------------------------------------------------- 1 | 2 | 10 | 14 | 15 | -------------------------------------------------------------------------------- /playground/src/TabJson.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /playground/src/index.ts: -------------------------------------------------------------------------------- 1 | import "carbon-components-svelte/css/all.css"; 2 | import App from "./App.svelte"; 3 | 4 | new App({ target: document.body }); 5 | -------------------------------------------------------------------------------- /playground/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "erasableSyntaxOnly": true, 4 | "esModuleInterop": true, 5 | "forceConsistentCasingInFileNames": true, 6 | "ignoreDeprecations": "5.0", 7 | "importsNotUsedAsValues": "error", 8 | "isolatedModules": true, 9 | "module": "ESNext", 10 | "moduleResolution": "bundler", 11 | "resolveJsonModule": true, 12 | "skipLibCheck": true, 13 | "strict": true, 14 | "target": "ESNext", 15 | "verbatimModuleSyntax": true 16 | }, 17 | "include": ["src"] 18 | } 19 | -------------------------------------------------------------------------------- /playground/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { svelte, vitePreprocess } from "@sveltejs/vite-plugin-svelte"; 2 | import { optimizeCss, optimizeImports } from "carbon-preprocess-svelte"; 3 | import { defineConfig } from "vite"; 4 | 5 | export default defineConfig({ 6 | plugins: [ 7 | svelte({ 8 | preprocess: [vitePreprocess(), optimizeImports()], 9 | }), 10 | optimizeCss(), 11 | ], 12 | optimizeDeps: { 13 | exclude: ["carbon-components-svelte"], 14 | }, 15 | }); 16 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from "./rollup-plugin"; 2 | export { default as ComponentParser } from "./ComponentParser"; 3 | export { cli } from "./cli"; 4 | export { sveld } from "./sveld"; 5 | -------------------------------------------------------------------------------- /src/path.ts: -------------------------------------------------------------------------------- 1 | import { sep } from "path"; 2 | 3 | /** 4 | * Normalize directory separators to always use `/`. 5 | * @param filePath A file path. 6 | * @returns Path with normalized separators. 7 | */ 8 | export function normalizeSeparators(filePath: string) { 9 | return sep === "/" ? filePath : filePath.split(sep).join("/"); 10 | } 11 | -------------------------------------------------------------------------------- /src/sveld.ts: -------------------------------------------------------------------------------- 1 | import { getSvelteEntry } from "./get-svelte-entry"; 2 | import { PluginSveldOptions, generateBundle, writeOutput } from "./rollup-plugin"; 3 | 4 | interface SveldOptions extends PluginSveldOptions { 5 | /** 6 | * Specify the input to the uncompiled Svelte source. 7 | * If no value is provided, `sveld` will attempt to infer 8 | * the entry point from the `package.json#svelte` field. 9 | */ 10 | input?: string; 11 | } 12 | 13 | export async function sveld(opts?: SveldOptions) { 14 | const input = getSvelteEntry(opts?.input); 15 | if (input === null) return; 16 | const result = await generateBundle(input, opts?.glob === true); 17 | writeOutput(result, opts || {}, input); 18 | } 19 | -------------------------------------------------------------------------------- /src/writer/Writer.ts: -------------------------------------------------------------------------------- 1 | import * as path from "path"; 2 | import * as fsp from "fs/promises"; 3 | import * as prettier from "prettier"; 4 | 5 | interface WriterOptions extends Pick {} 6 | 7 | export default class Writer { 8 | options: WriterOptions; 9 | 10 | constructor(options: WriterOptions) { 11 | this.options = options; 12 | } 13 | 14 | public async format(raw: any) { 15 | try { 16 | const result = await prettier.format(raw, this.options); 17 | return result; 18 | } catch (error) { 19 | console.error(error); 20 | return raw; 21 | } 22 | } 23 | 24 | public async write(filePath: string, raw: any) { 25 | await fsp.mkdir(path.parse(filePath).dir, { recursive: true }); 26 | await fsp.writeFile(filePath, await this.format(raw)); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tests/e2e/carbon/.gitignore: -------------------------------------------------------------------------------- 1 | /lib 2 | /node_modules -------------------------------------------------------------------------------- /tests/e2e/carbon/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "carbon", 3 | "version": "0.0.1", 4 | "private": true, 5 | "svelte": "./src/index.js", 6 | "module": "./lib/index.mjs", 7 | "types": "./types/index.d.ts", 8 | "scripts": { 9 | "svelte-check": "svelte-check --workspace test", 10 | "build": "rollup -c" 11 | }, 12 | "dependencies": { 13 | "carbon-icons-svelte": "^10.21.0", 14 | "flatpickr": "4.6.9" 15 | }, 16 | "devDependencies": { 17 | "@rollup/plugin-commonjs": "^17.1.0", 18 | "@rollup/plugin-node-resolve": "^10.0.0", 19 | "@tsconfig/svelte": "^1.0.10", 20 | "rollup": "^2.32.1", 21 | "rollup-plugin-svelte": "^6.1.1", 22 | "svelte": "^3.31.0", 23 | "svelte-check": "^1.1.17", 24 | "typescript": "^4.0.5" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Accordion/index.js: -------------------------------------------------------------------------------- 1 | export { default as Accordion } from "./Accordion.svelte"; 2 | export { default as AccordionItem } from "./AccordionItem.svelte"; 3 | export { default as AccordionSkeleton } from "./AccordionSkeleton.svelte"; 4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/AspectRatio/AspectRatio.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 |
20 |
21 | 22 |
23 |
24 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/AspectRatio/index.js: -------------------------------------------------------------------------------- 1 | export { default as AspectRatio } from "./AspectRatio.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Breadcrumb/Breadcrumb.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 | {#if skeleton} 14 | 15 | {:else} 16 | 21 | {/if} 22 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Breadcrumb/BreadcrumbSkeleton.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 |
19 | {#each Array.from({ length: count }, (_, i) => i) as item (item)} 20 |
21 |   22 |
23 | {/each} 24 |
25 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Breadcrumb/index.js: -------------------------------------------------------------------------------- 1 | export { default as Breadcrumb } from "./Breadcrumb.svelte"; 2 | export { default as BreadcrumbItem } from "./BreadcrumbItem.svelte"; 3 | export { default as BreadcrumbSkeleton } from "./BreadcrumbSkeleton.svelte"; 4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Button/ButtonSet.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
7 | 8 |
9 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Button/index.js: -------------------------------------------------------------------------------- 1 | export { default as Button } from "./Button.svelte"; 2 | export { default as ButtonSkeleton } from "./ButtonSkeleton.svelte"; 3 | export { default as ButtonSet } from "./ButtonSet.svelte"; 4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Checkbox/CheckboxSkeleton.svelte: -------------------------------------------------------------------------------- 1 |
11 | 12 |
13 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Checkbox/index.js: -------------------------------------------------------------------------------- 1 | export { default as Checkbox } from "./Checkbox.svelte"; 2 | export { default as CheckboxSkeleton } from "./CheckboxSkeleton.svelte"; 3 | export { default as InlineCheckbox } from "./InlineCheckbox.svelte"; 4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/CodeSnippet/CodeSnippetSkeleton.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 |
20 |
21 | {#if type === "single"} 22 | 23 | {:else if type === "multi"} {/if} 24 |
25 |
26 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/CodeSnippet/index.js: -------------------------------------------------------------------------------- 1 | export { default as CodeSnippet } from "./CodeSnippet.svelte"; 2 | export { default as CodeSnippetSkeleton } from "./CodeSnippetSkeleton.svelte"; 3 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/ComboBox/index.js: -------------------------------------------------------------------------------- 1 | export { default as ComboBox } from "./ComboBox.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/ComposedModal/ModalBody.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 |
16 | 17 |
18 | {#if hasScrollingContent} 19 |
20 | {/if} 21 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/ComposedModal/index.js: -------------------------------------------------------------------------------- 1 | export { default as ComposedModal } from "./ComposedModal.svelte"; 2 | export { default as ModalHeader } from "./ModalHeader.svelte"; 3 | export { default as ModalBody } from "./ModalBody.svelte"; 4 | export { default as ModalFooter } from "./ModalFooter.svelte"; 5 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/ContentSwitcher/index.js: -------------------------------------------------------------------------------- 1 | export { default as ContentSwitcher } from "./ContentSwitcher.svelte"; 2 | export { default as Switch } from "./Switch.svelte"; 3 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Copy/index.js: -------------------------------------------------------------------------------- 1 | export { default as Copy } from "./Copy.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/CopyButton/CopyButton.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/CopyButton/index.js: -------------------------------------------------------------------------------- 1 | export { default as CopyButton } from "./CopyButton.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/DataTable/TableBody.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/DataTable/TableCell.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/DataTable/TableContainer.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | {#if title} 14 |
15 |

{title}

16 |

{description}

17 |
18 | {/if} 19 | 20 |
21 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/DataTable/TableHead.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/DataTable/TableRow.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/DataTable/Toolbar.svelte: -------------------------------------------------------------------------------- 1 | 23 | 24 |
32 | 33 |
34 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/DataTable/ToolbarContent.svelte: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/DataTable/ToolbarMenu.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/DataTable/ToolbarMenuItem.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/DatePicker/DatePickerSkeleton.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 |
17 | {#each Array.from({ length: range ? 2 : 1 }, (_, i) => i) as input, i (input)} 18 |
19 |
24 |
25 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/DatePicker/index.js: -------------------------------------------------------------------------------- 1 | export { default as DatePicker } from "./DatePicker.svelte"; 2 | export { default as DatePickerInput } from "./DatePickerInput.svelte"; 3 | export { default as DatePickerSkeleton } from "./DatePickerSkeleton.svelte"; 4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Dropdown/DropdownSkeleton.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
18 |
19 | 20 |
21 |
22 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Dropdown/index.js: -------------------------------------------------------------------------------- 1 | export { default as Dropdown } from "./Dropdown.svelte"; 2 | export { default as DropdownSkeleton } from "./DropdownSkeleton.svelte"; 3 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/FileUploader/FileUploaderSkeleton.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
7 | 8 | 9 | 10 |
11 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/FileUploader/index.js: -------------------------------------------------------------------------------- 1 | export { default as FileUploader } from "./FileUploader.svelte"; 2 | export { default as FileUploaderButton } from "./FileUploaderButton.svelte"; 3 | export { default as FileUploaderItem } from "./FileUploaderItem.svelte"; 4 | export { default as FileUploaderDropContainer } from "./FileUploaderDropContainer.svelte"; 5 | export { default as Filename } from "./Filename.svelte"; 6 | export { default as FileUploaderSkeleton } from "./FileUploaderSkeleton.svelte"; 7 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/FluidForm/FluidForm.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/FluidForm/index.js: -------------------------------------------------------------------------------- 1 | export { default as FluidForm } from "./FluidForm.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Form/Form.svelte: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Form/index.js: -------------------------------------------------------------------------------- 1 | export { default as Form } from "./Form.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/FormGroup/FormGroup.svelte: -------------------------------------------------------------------------------- 1 | 14 | 15 |
24 | {legendText} 25 | 26 | {#if message} 27 |
{messageText}
28 | {/if} 29 |
30 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/FormGroup/index.js: -------------------------------------------------------------------------------- 1 | export { default as FormGroup } from "./FormGroup.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/FormItem/FormItem.svelte: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/FormItem/index.js: -------------------------------------------------------------------------------- 1 | export { default as FormItem } from "./FormItem.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/FormLabel/FormLabel.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 9 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/FormLabel/index.js: -------------------------------------------------------------------------------- 1 | export { default as FormLabel } from "./FormLabel.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Grid/index.js: -------------------------------------------------------------------------------- 1 | export { default as Grid } from "./Grid.svelte"; 2 | export { default as Row } from "./Row.svelte"; 3 | export { default as Column } from "./Column.svelte"; 4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Icon/Icon.svelte: -------------------------------------------------------------------------------- 1 | 18 | 19 | {#if skeleton} 20 | 21 | {:else} 22 | 23 | {/if} 24 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Icon/IconSkeleton.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
15 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Icon/index.js: -------------------------------------------------------------------------------- 1 | export { default as Icon } from "./Icon.svelte"; 2 | export { default as IconSkeleton } from "./IconSkeleton.svelte"; 3 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/InlineLoading/index.js: -------------------------------------------------------------------------------- 1 | export { default as InlineLoading } from "./InlineLoading.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Link/OutboundLink.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Link/index.js: -------------------------------------------------------------------------------- 1 | export { default as Link } from "./Link.svelte"; 2 | export { default as OutboundLink } from "./OutboundLink.svelte"; 3 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/ListBox/ListBoxMenu.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/ListBox/ListBoxMenuItem.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 |
18 |
19 | 20 |
21 |
22 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/ListBox/index.js: -------------------------------------------------------------------------------- 1 | export { default as ListBox } from "./ListBox.svelte"; 2 | export { default as ListBoxField } from "./ListBoxField.svelte"; 3 | export { default as ListBoxMenu } from "./ListBoxMenu.svelte"; 4 | export { default as ListBoxMenuIcon } from "./ListBoxMenuIcon.svelte"; 5 | export { default as ListBoxMenuItem } from "./ListBoxMenuItem.svelte"; 6 | export { default as ListBoxSelection } from "./ListBoxSelection.svelte"; 7 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/ListItem/ListItem.svelte: -------------------------------------------------------------------------------- 1 |
  • 2 | 3 |
  • 4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/ListItem/index.js: -------------------------------------------------------------------------------- 1 | export { default as ListItem } from "./ListItem.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Loading/index.js: -------------------------------------------------------------------------------- 1 | export { default as Loading } from "./Loading.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Modal/index.js: -------------------------------------------------------------------------------- 1 | export { default as Modal } from "./Modal.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/MultiSelect/index.js: -------------------------------------------------------------------------------- 1 | export { default as MultiSelect } from "./MultiSelect.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Notification/NotificationActionButton.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 17 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Notification/index.js: -------------------------------------------------------------------------------- 1 | export { default as ToastNotification } from "./ToastNotification.svelte"; 2 | export { default as InlineNotification } from "./InlineNotification.svelte"; 3 | export { default as NotificationActionButton } from "./NotificationActionButton.svelte"; 4 | export { default as NotificationButton } from "./NotificationButton.svelte"; 5 | export { default as NotificationIcon } from "./NotificationIcon.svelte"; 6 | export { default as NotificationTextDetails } from "./NotificationTextDetails.svelte"; 7 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/NumberInput/NumberInputSkeleton.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
    7 | {#if !hideLabel} 8 | 9 | {/if} 10 |
    11 |
    12 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/NumberInput/index.js: -------------------------------------------------------------------------------- 1 | export { default as NumberInput } from "./NumberInput.svelte"; 2 | export { default as NumberInputSkeleton } from "./NumberInputSkeleton.svelte"; 3 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/OrderedList/OrderedList.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 |
      19 | 20 |
    21 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/OrderedList/index.js: -------------------------------------------------------------------------------- 1 | export { default as OrderedList } from "./OrderedList.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/OverflowMenu/formatStyle.js: -------------------------------------------------------------------------------- 1 | export const formatStyle = (style) => [""].join(""); 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/OverflowMenu/index.js: -------------------------------------------------------------------------------- 1 | export { default as OverflowMenu } from "./OverflowMenu.svelte"; 2 | export { default as OverflowMenuItem } from "./OverflowMenuItem.svelte"; 3 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Pagination/PaginationSkeleton.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
    14 |
    15 | 16 | 17 | 18 |
    19 |
    20 | 21 |
    22 |
    23 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Pagination/index.js: -------------------------------------------------------------------------------- 1 | export { default as Pagination } from "./Pagination.svelte"; 2 | export { default as PaginationSkeleton } from "./PaginationSkeleton.svelte"; 3 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/PaginationNav/PaginationItem.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 |
  • 10 | 22 |
  • 23 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/PaginationNav/index.js: -------------------------------------------------------------------------------- 1 | export { default as PaginationNav } from "./PaginationNav.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/ProgressIndicator/index.js: -------------------------------------------------------------------------------- 1 | export { default as ProgressIndicator } from "./ProgressIndicator.svelte"; 2 | export { default as ProgressIndicatorSkeleton } from "./ProgressIndicatorSkeleton.svelte"; 3 | export { default as ProgressStep } from "./ProgressStep.svelte"; 4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/RadioButton/RadioButtonSkeleton.svelte: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 4 |
    5 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/RadioButton/index.js: -------------------------------------------------------------------------------- 1 | export { default as RadioButton } from "./RadioButton.svelte"; 2 | export { default as RadioButtonSkeleton } from "./RadioButtonSkeleton.svelte"; 3 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/RadioButtonGroup/index.js: -------------------------------------------------------------------------------- 1 | export { default as RadioButtonGroup } from "./RadioButtonGroup.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Search/SearchSkeleton.svelte: -------------------------------------------------------------------------------- 1 | 14 | 15 |
    26 | 27 |
    28 |
    29 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Search/index.js: -------------------------------------------------------------------------------- 1 | export { default as Search } from "./Search.svelte"; 2 | export { default as SearchSkeleton } from "./SearchSkeleton.svelte"; 3 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Select/SelectItem.svelte: -------------------------------------------------------------------------------- 1 | 28 | 29 | 40 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Select/SelectItemGroup.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Select/SelectSkeleton.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
    7 | {#if !hideLabel} 8 | 9 | {/if} 10 |
    11 |
    12 |
    13 |
    14 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Select/index.js: -------------------------------------------------------------------------------- 1 | export { default as Select } from "./Select.svelte"; 2 | export { default as SelectSkeleton } from "./SelectSkeleton.svelte"; 3 | export { default as SelectItem } from "./SelectItem.svelte"; 4 | export { default as SelectItemGroup } from "./SelectItemGroup.svelte"; 5 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/SkeletonPlaceholder/SkeletonPlaceholder.svelte: -------------------------------------------------------------------------------- 1 |
    2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/SkeletonPlaceholder/index.js: -------------------------------------------------------------------------------- 1 | export { default as SkeletonPlaceholder } from "./SkeletonPlaceholder.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/SkeletonText/index.js: -------------------------------------------------------------------------------- 1 | export { default as SkeletonText } from "./SkeletonText.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Slider/SliderSkeleton.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
    7 | {#if !hideLabel} 8 | 9 | {/if} 10 |
    11 | 12 |
    13 |
    14 |
    15 |
    16 |
    17 | 18 |
    19 |
    20 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Slider/index.js: -------------------------------------------------------------------------------- 1 | export { default as Slider } from "./Slider.svelte"; 2 | export { default as SliderSkeleton } from "./SliderSkeleton.svelte"; 3 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/StructuredList/StructuredListBody.svelte: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/StructuredList/StructuredListCell.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 |
    19 | 20 |
    21 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/StructuredList/StructuredListHead.svelte: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/StructuredList/index.js: -------------------------------------------------------------------------------- 1 | export { default as StructuredList } from "./StructuredList.svelte"; 2 | export { default as StructuredListSkeleton } from "./StructuredListSkeleton.svelte"; 3 | export { default as StructuredListBody } from "./StructuredListBody.svelte"; 4 | export { default as StructuredListHead } from "./StructuredListHead.svelte"; 5 | export { default as StructuredListCell } from "./StructuredListCell.svelte"; 6 | export { default as StructuredListRow } from "./StructuredListRow.svelte"; 7 | export { default as StructuredListInput } from "./StructuredListInput.svelte"; 8 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Tabs/TabContent.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 | 27 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Tabs/TabsSkeleton.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
    7 |
    8 |
     
    9 | 10 | 11 | 12 |
    13 |
      14 | {#each Array.from({ length: count }, (_, i) => i) as item, i (item)} 15 |
    • 16 |
       
      17 |
    • 18 | {/each} 19 |
    20 |
    21 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Tabs/index.js: -------------------------------------------------------------------------------- 1 | export { default as Tabs } from "./Tabs.svelte"; 2 | export { default as Tab } from "./Tab.svelte"; 3 | export { default as TabContent } from "./TabContent.svelte"; 4 | export { default as TabsSkeleton } from "./TabsSkeleton.svelte"; 5 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Tag/TagSkeleton.svelte: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Tag/index.js: -------------------------------------------------------------------------------- 1 | export { default as Tag } from "./Tag.svelte"; 2 | export { default as TagSkeleton } from "./TagSkeleton.svelte"; 3 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/TextArea/TextAreaSkeleton.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
    7 | {#if !hideLabel} 8 | 9 | {/if} 10 |
    11 |
    12 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/TextArea/index.js: -------------------------------------------------------------------------------- 1 | export { default as TextArea } from "./TextArea.svelte"; 2 | export { default as TextAreaSkeleton } from "./TextAreaSkeleton.svelte"; 3 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/TextInput/TextInputSkeleton.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
    7 | {#if !hideLabel} 8 | 9 | {/if} 10 |
    11 |
    12 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/TextInput/index.js: -------------------------------------------------------------------------------- 1 | export { default as TextInput } from "./TextInput.svelte"; 2 | export { default as TextInputSkeleton } from "./TextInputSkeleton.svelte"; 3 | export { default as PasswordInput } from "./PasswordInput.svelte"; 4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Tile/ClickableTile.svelte: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | { 26 | clicked = !clicked; 27 | }} 28 | on:keydown 29 | on:keydown={({ key }) => { 30 | if (key === " " || key === "Enter") { 31 | clicked = !clicked; 32 | } 33 | }} 34 | on:mouseover 35 | on:mouseenter 36 | on:mouseleave 37 | > 38 | 39 | 40 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Tile/Tile.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
    15 | 16 |
    17 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Tile/index.js: -------------------------------------------------------------------------------- 1 | export { default as Tile } from "./Tile.svelte"; 2 | export { default as ClickableTile } from "./ClickableTile.svelte"; 3 | export { default as ExpandableTile } from "./ExpandableTile.svelte"; 4 | export { default as SelectableTile } from "./SelectableTile.svelte"; 5 | export { default as RadioTile } from "./RadioTile.svelte"; 6 | export { default as TileGroup } from "./TileGroup.svelte"; 7 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/TimePicker/index.js: -------------------------------------------------------------------------------- 1 | export { default as TimePicker } from "./TimePicker.svelte"; 2 | export { default as TimePickerSelect } from "./TimePickerSelect.svelte"; 3 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Toggle/index.js: -------------------------------------------------------------------------------- 1 | export { default as Toggle } from "./Toggle.svelte"; 2 | export { default as ToggleSkeleton } from "./ToggleSkeleton.svelte"; 3 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/ToggleSmall/index.js: -------------------------------------------------------------------------------- 1 | export { default as ToggleSmall } from "./ToggleSmall.svelte"; 2 | export { default as ToggleSmallSkeleton } from "./ToggleSmallSkeleton.svelte"; 3 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/Tooltip/index.js: -------------------------------------------------------------------------------- 1 | export { default as Tooltip } from "./Tooltip.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/TooltipDefinition/index.js: -------------------------------------------------------------------------------- 1 | export { default as TooltipDefinition } from "./TooltipDefinition.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/TooltipIcon/index.js: -------------------------------------------------------------------------------- 1 | export { default as TooltipIcon } from "./TooltipIcon.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/UIShell/Content.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
    7 | 8 |
    9 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/UIShell/GlobalHeader/HeaderNav.svelte: -------------------------------------------------------------------------------- 1 | 14 | 15 | 20 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/UIShell/GlobalHeader/HeaderNavItem.svelte: -------------------------------------------------------------------------------- 1 | 17 | 18 |
  • 19 | 36 | {text} 37 | 38 |
  • 39 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/UIShell/GlobalHeader/HeaderPanelDivider.svelte: -------------------------------------------------------------------------------- 1 |
  • 2 | 3 | 4 | 5 |
  • 6 | 7 | 23 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/UIShell/GlobalHeader/HeaderPanelLink.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 |
  • 13 | 21 | 22 | 23 |
  • 24 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/UIShell/GlobalHeader/HeaderPanelLinks.svelte: -------------------------------------------------------------------------------- 1 |
      2 | 3 |
    4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/UIShell/GlobalHeader/HeaderUtilities.svelte: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/UIShell/HeaderGlobalAction.svelte: -------------------------------------------------------------------------------- 1 | 14 | 15 | 27 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/UIShell/SideNav/HamburgerMenu.svelte: -------------------------------------------------------------------------------- 1 | 18 | 19 | 33 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/UIShell/SideNav/SideNavItems.svelte: -------------------------------------------------------------------------------- 1 |
      2 | 3 |
    4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/UIShell/SideNav/SideNavMenuItem.svelte: -------------------------------------------------------------------------------- 1 | 23 | 24 |
  • 25 | 33 | {text} 34 | 35 |
  • 36 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/UIShell/SkipToContent.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | Skip to main content 11 | 12 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/UIShell/navStore.js: -------------------------------------------------------------------------------- 1 | import { writable } from "svelte/store"; 2 | 3 | export const shouldRenderHamburgerMenu = writable(false); 4 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/UnorderedList/UnorderedList.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
      15 | 16 |
    17 | -------------------------------------------------------------------------------- /tests/e2e/carbon/src/UnorderedList/index.js: -------------------------------------------------------------------------------- 1 | export { default as UnorderedList } from "./UnorderedList.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/carbon/test/Accordion.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | Content 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {row.id} 17 | 18 | -------------------------------------------------------------------------------- /tests/e2e/carbon/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/svelte", 3 | } -------------------------------------------------------------------------------- /tests/e2e/carbon/types/AspectRatio/AspectRatio.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Specify the aspect ratio 9 | * @default "2x1" 10 | */ 11 | ratio?: "2x1" | "16x9" | "4x3" | "1x1" | "3x4" | "9x16" | "1x2"; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type AspectRatioProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class AspectRatio extends SvelteComponentTyped< 19 | AspectRatioProps, 20 | Record, 21 | { default: {} } 22 | > {} 23 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Breadcrumb/Breadcrumb.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { BreadcrumbSkeletonProps } from "./BreadcrumbSkeleton.svelte"; 3 | 4 | export type BreadcrumbProps = BreadcrumbSkeletonProps & { 5 | /** 6 | * Set to `true` to hide the breadcrumb trailing slash 7 | * @default false 8 | */ 9 | noTrailingSlash?: boolean; 10 | 11 | /** 12 | * Set to `true` to display skeleton state 13 | * @default false 14 | */ 15 | skeleton?: boolean; 16 | }; 17 | 18 | export default class Breadcrumb extends SvelteComponentTyped< 19 | BreadcrumbProps, 20 | { 21 | click: WindowEventMap["click"]; 22 | mouseover: WindowEventMap["mouseover"]; 23 | mouseenter: WindowEventMap["mouseenter"]; 24 | mouseleave: WindowEventMap["mouseleave"]; 25 | }, 26 | { default: {} } 27 | > {} 28 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Breadcrumb/BreadcrumbSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to hide the breadcrumb trailing slash 9 | * @default false 10 | */ 11 | noTrailingSlash?: boolean; 12 | 13 | /** 14 | * Specify the number of breadcrumb items to render 15 | * @default 3 16 | */ 17 | count?: number; 18 | 19 | [key: `data-${string}`]: any; 20 | }; 21 | 22 | export type BreadcrumbSkeletonProps = Omit<$RestProps, keyof $Props> & $Props; 23 | 24 | export default class BreadcrumbSkeleton extends SvelteComponentTyped< 25 | BreadcrumbSkeletonProps, 26 | { 27 | click: WindowEventMap["click"]; 28 | mouseover: WindowEventMap["mouseover"]; 29 | mouseenter: WindowEventMap["mouseenter"]; 30 | mouseleave: WindowEventMap["mouseleave"]; 31 | }, 32 | {} 33 | > {} 34 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Button/ButtonSet.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to stack the buttons vertically 9 | * @default false 10 | */ 11 | stacked?: boolean; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type ButtonSetProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class ButtonSet extends SvelteComponentTyped< 19 | ButtonSetProps, 20 | Record, 21 | { default: {} } 22 | > {} 23 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Checkbox/CheckboxSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type CheckboxSkeletonProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class CheckboxSkeleton extends SvelteComponentTyped< 13 | CheckboxSkeletonProps, 14 | { 15 | click: WindowEventMap["click"]; 16 | mouseover: WindowEventMap["mouseover"]; 17 | mouseenter: WindowEventMap["mouseenter"]; 18 | mouseleave: WindowEventMap["mouseleave"]; 19 | }, 20 | {} 21 | > {} 22 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/CodeSnippet/CodeSnippetSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set the type of code snippet 9 | * @default "single" 10 | */ 11 | type?: "single" | "multi"; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type CodeSnippetSkeletonProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class CodeSnippetSkeleton extends SvelteComponentTyped< 19 | CodeSnippetSkeletonProps, 20 | { 21 | click: WindowEventMap["click"]; 22 | mouseover: WindowEventMap["mouseover"]; 23 | mouseenter: WindowEventMap["mouseenter"]; 24 | mouseleave: WindowEventMap["mouseleave"]; 25 | }, 26 | {} 27 | > {} 28 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/ComposedModal/ModalBody.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` if the modal contains form elements 9 | * @default false 10 | */ 11 | hasForm?: boolean; 12 | 13 | /** 14 | * Set to `true` if the modal contains scrolling content 15 | * @default false 16 | */ 17 | hasScrollingContent?: boolean; 18 | 19 | [key: `data-${string}`]: any; 20 | }; 21 | 22 | export type ModalBodyProps = Omit<$RestProps, keyof $Props> & $Props; 23 | 24 | export default class ModalBody extends SvelteComponentTyped< 25 | ModalBodyProps, 26 | Record, 27 | { default: {} } 28 | > {} 29 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/CopyButton/CopyButton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { CopyProps } from "../Copy/Copy.svelte"; 3 | 4 | export type CopyButtonProps = CopyProps & { 5 | /** 6 | * Set the title and ARIA label for the copy button 7 | * @default "Copy to clipboard" 8 | */ 9 | iconDescription?: string; 10 | }; 11 | 12 | export default class CopyButton extends SvelteComponentTyped< 13 | CopyButtonProps, 14 | { 15 | click: WindowEventMap["click"]; 16 | animationend: WindowEventMap["animationend"]; 17 | }, 18 | {} 19 | > {} 20 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/DataTable/TableBody.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["tbody"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type TableBodyProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class TableBody extends SvelteComponentTyped< 13 | TableBodyProps, 14 | Record, 15 | { default: {} } 16 | > {} 17 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/DataTable/TableCell.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["td"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type TableCellProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class TableCell extends SvelteComponentTyped< 13 | TableCellProps, 14 | { 15 | click: WindowEventMap["click"]; 16 | mouseover: WindowEventMap["mouseover"]; 17 | mouseenter: WindowEventMap["mouseenter"]; 18 | mouseleave: WindowEventMap["mouseleave"]; 19 | }, 20 | { default: {} } 21 | > {} 22 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/DataTable/TableContainer.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Specify the title of the data table 9 | * @default "" 10 | */ 11 | title?: string; 12 | 13 | /** 14 | * Specify the description of the data table 15 | * @default "" 16 | */ 17 | description?: string; 18 | 19 | /** 20 | * Set to `true` to enable a sticky header 21 | * @default false 22 | */ 23 | stickyHeader?: boolean; 24 | 25 | [key: `data-${string}`]: any; 26 | }; 27 | 28 | export type TableContainerProps = Omit<$RestProps, keyof $Props> & $Props; 29 | 30 | export default class TableContainer extends SvelteComponentTyped< 31 | TableContainerProps, 32 | Record, 33 | { default: {} } 34 | > {} 35 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/DataTable/TableHead.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["thead"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type TableHeadProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class TableHead extends SvelteComponentTyped< 13 | TableHeadProps, 14 | { 15 | click: WindowEventMap["click"]; 16 | mouseover: WindowEventMap["mouseover"]; 17 | mouseenter: WindowEventMap["mouseenter"]; 18 | mouseleave: WindowEventMap["mouseleave"]; 19 | }, 20 | { default: {} } 21 | > {} 22 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/DataTable/TableRow.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["tr"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type TableRowProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class TableRow extends SvelteComponentTyped< 13 | TableRowProps, 14 | { 15 | click: WindowEventMap["click"]; 16 | mouseover: WindowEventMap["mouseover"]; 17 | mouseenter: WindowEventMap["mouseenter"]; 18 | mouseleave: WindowEventMap["mouseleave"]; 19 | }, 20 | { default: {} } 21 | > {} 22 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/DataTable/Toolbar.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["section"]; 5 | 6 | type $Props = { 7 | /** 8 | * Specify the toolbar size 9 | * @default "default" 10 | */ 11 | size?: "sm" | "default"; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type ToolbarProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class Toolbar extends SvelteComponentTyped< 19 | ToolbarProps, 20 | Record, 21 | { default: {} } 22 | > {} 23 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/DataTable/ToolbarBatchActions.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Override the total items selected text 9 | * @default (totalSelected) => `${totalSelected} item${totalSelected === 1 ? "" : "s"} selected` 10 | */ 11 | formatTotalSelected?: (totalSelected: number) => string; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type ToolbarBatchActionsProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class ToolbarBatchActions extends SvelteComponentTyped< 19 | ToolbarBatchActionsProps, 20 | Record, 21 | { default: {} } 22 | > {} 23 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/DataTable/ToolbarContent.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type ToolbarContentProps = {}; 4 | 5 | export default class ToolbarContent extends SvelteComponentTyped< 6 | ToolbarContentProps, 7 | Record, 8 | { default: {} } 9 | > {} 10 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/DataTable/ToolbarMenu.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { OverflowMenuProps } from "../OverflowMenu/OverflowMenu.svelte"; 3 | 4 | export type ToolbarMenuProps = OverflowMenuProps & {}; 5 | 6 | export default class ToolbarMenu extends SvelteComponentTyped< 7 | ToolbarMenuProps, 8 | Record, 9 | { default: {} } 10 | > {} 11 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/DataTable/ToolbarMenuItem.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { OverflowMenuItemProps } from "../OverflowMenu/OverflowMenuItem.svelte"; 3 | 4 | export type ToolbarMenuItemProps = OverflowMenuItemProps & {}; 5 | 6 | export default class ToolbarMenuItem extends SvelteComponentTyped< 7 | ToolbarMenuItemProps, 8 | { click: WindowEventMap["click"]; keydown: WindowEventMap["keydown"] }, 9 | { default: {} } 10 | > {} 11 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/DatePicker/DatePickerSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to use the range variant 9 | * @default false 10 | */ 11 | range?: boolean; 12 | 13 | /** 14 | * Set an id to be used by the label element 15 | * @default "ccs-" + Math.random().toString(36) 16 | */ 17 | id?: string; 18 | 19 | [key: `data-${string}`]: any; 20 | }; 21 | 22 | export type DatePickerSkeletonProps = Omit<$RestProps, keyof $Props> & $Props; 23 | 24 | export default class DatePickerSkeleton extends SvelteComponentTyped< 25 | DatePickerSkeletonProps, 26 | { 27 | click: WindowEventMap["click"]; 28 | mouseover: WindowEventMap["mouseover"]; 29 | mouseenter: WindowEventMap["mouseenter"]; 30 | mouseleave: WindowEventMap["mouseleave"]; 31 | }, 32 | {} 33 | > {} 34 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Dropdown/DropdownSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to use the inline variant 9 | * @default false 10 | */ 11 | inline?: boolean; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type DropdownSkeletonProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class DropdownSkeleton extends SvelteComponentTyped< 19 | DropdownSkeletonProps, 20 | { 21 | click: WindowEventMap["click"]; 22 | mouseover: WindowEventMap["mouseover"]; 23 | mouseenter: WindowEventMap["mouseenter"]; 24 | mouseleave: WindowEventMap["mouseleave"]; 25 | }, 26 | {} 27 | > {} 28 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/FileUploader/FileUploaderSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type FileUploaderSkeletonProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class FileUploaderSkeleton extends SvelteComponentTyped< 13 | FileUploaderSkeletonProps, 14 | { 15 | click: WindowEventMap["click"]; 16 | mouseover: WindowEventMap["mouseover"]; 17 | mouseenter: WindowEventMap["mouseenter"]; 18 | mouseleave: WindowEventMap["mouseleave"]; 19 | }, 20 | {} 21 | > {} 22 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/FileUploader/Filename.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type FilenameProps = { 4 | /** 5 | * Specify the file name status 6 | * @default "uploading" 7 | */ 8 | status?: "uploading" | "edit" | "complete"; 9 | 10 | /** 11 | * Specify the ARIA label used for the status icons 12 | * @default "" 13 | */ 14 | iconDescription?: string; 15 | 16 | /** 17 | * Set to `true` to indicate an invalid state 18 | * @default false 19 | */ 20 | invalid?: boolean; 21 | }; 22 | 23 | export default class Filename extends SvelteComponentTyped< 24 | FilenameProps, 25 | { click: WindowEventMap["click"]; keydown: WindowEventMap["keydown"] }, 26 | {} 27 | > {} 28 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/FluidForm/FluidForm.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type FluidFormProps = {}; 4 | 5 | export default class FluidForm extends SvelteComponentTyped< 6 | FluidFormProps, 7 | { submit: WindowEventMap["submit"] }, 8 | { default: {} } 9 | > {} 10 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Form/Form.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["form"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type FormProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class Form extends SvelteComponentTyped< 13 | FormProps, 14 | { 15 | click: WindowEventMap["click"]; 16 | mouseover: WindowEventMap["mouseover"]; 17 | mouseenter: WindowEventMap["mouseenter"]; 18 | mouseleave: WindowEventMap["mouseleave"]; 19 | submit: WindowEventMap["submit"]; 20 | }, 21 | { default: {} } 22 | > {} 23 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/FormItem/FormItem.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type FormItemProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class FormItem extends SvelteComponentTyped< 13 | FormItemProps, 14 | { 15 | click: WindowEventMap["click"]; 16 | mouseover: WindowEventMap["mouseover"]; 17 | mouseenter: WindowEventMap["mouseenter"]; 18 | mouseleave: WindowEventMap["mouseleave"]; 19 | }, 20 | { default: {} } 21 | > {} 22 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/FormLabel/FormLabel.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["label"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set an id to be used by the label element 9 | * @default "ccs-" + Math.random().toString(36) 10 | */ 11 | id?: string; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type FormLabelProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class FormLabel extends SvelteComponentTyped< 19 | FormLabelProps, 20 | { 21 | click: WindowEventMap["click"]; 22 | mouseover: WindowEventMap["mouseover"]; 23 | mouseenter: WindowEventMap["mouseenter"]; 24 | mouseleave: WindowEventMap["mouseleave"]; 25 | }, 26 | { default: {} } 27 | > {} 28 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Icon/IconSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set the size of the icon 9 | * @default 16 10 | */ 11 | size?: number; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type IconSkeletonProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class IconSkeleton extends SvelteComponentTyped< 19 | IconSkeletonProps, 20 | { 21 | click: WindowEventMap["click"]; 22 | mouseover: WindowEventMap["mouseover"]; 23 | mouseenter: WindowEventMap["mouseenter"]; 24 | mouseleave: WindowEventMap["mouseleave"]; 25 | }, 26 | {} 27 | > {} 28 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Link/OutboundLink.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { LinkProps } from "./Link.svelte"; 3 | 4 | export type OutboundLinkProps = LinkProps & {}; 5 | 6 | export default class OutboundLink extends SvelteComponentTyped< 7 | OutboundLinkProps, 8 | { 9 | click: WindowEventMap["click"]; 10 | mouseover: WindowEventMap["mouseover"]; 11 | mouseenter: WindowEventMap["mouseenter"]; 12 | mouseleave: WindowEventMap["mouseleave"]; 13 | }, 14 | { default: {} } 15 | > {} 16 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/ListBox/ListBoxMenu.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set an id for the top-level element 9 | * @default "ccs-" + Math.random().toString(36) 10 | */ 11 | id?: string; 12 | 13 | /** 14 | * Obtain a reference to the HTML element 15 | * @default null 16 | */ 17 | ref?: null | HTMLDivElement; 18 | 19 | [key: `data-${string}`]: any; 20 | }; 21 | 22 | export type ListBoxMenuProps = Omit<$RestProps, keyof $Props> & $Props; 23 | 24 | export default class ListBoxMenu extends SvelteComponentTyped< 25 | ListBoxMenuProps, 26 | { scroll: WindowEventMap["scroll"] }, 27 | { default: {} } 28 | > {} 29 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/ListBox/ListBoxMenuItem.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to enable the active state 9 | * @default false 10 | */ 11 | active?: boolean; 12 | 13 | /** 14 | * Set to `true` to enable the highlighted state 15 | * @default false 16 | */ 17 | highlighted?: boolean; 18 | 19 | [key: `data-${string}`]: any; 20 | }; 21 | 22 | export type ListBoxMenuItemProps = Omit<$RestProps, keyof $Props> & $Props; 23 | 24 | export default class ListBoxMenuItem extends SvelteComponentTyped< 25 | ListBoxMenuItemProps, 26 | { 27 | click: WindowEventMap["click"]; 28 | mouseenter: WindowEventMap["mouseenter"]; 29 | mouseleave: WindowEventMap["mouseleave"]; 30 | }, 31 | { default: {} } 32 | > {} 33 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/ListItem/ListItem.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["li"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type ListItemProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class ListItem extends SvelteComponentTyped< 13 | ListItemProps, 14 | { 15 | click: WindowEventMap["click"]; 16 | mouseover: WindowEventMap["mouseover"]; 17 | mouseenter: WindowEventMap["mouseenter"]; 18 | mouseleave: WindowEventMap["mouseleave"]; 19 | }, 20 | { default: {} } 21 | > {} 22 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Notification/NotificationActionButton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type NotificationActionButtonProps = {}; 4 | 5 | export default class NotificationActionButton extends SvelteComponentTyped< 6 | NotificationActionButtonProps, 7 | { 8 | click: WindowEventMap["click"]; 9 | mouseover: WindowEventMap["mouseover"]; 10 | mouseenter: WindowEventMap["mouseenter"]; 11 | mouseleave: WindowEventMap["mouseleave"]; 12 | }, 13 | { default: {} } 14 | > {} 15 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Notification/NotificationIcon.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type NotificationIconProps = { 4 | /** 5 | * Specify the kind of notification icon 6 | * @default "error" 7 | */ 8 | kind?: 9 | | "error" 10 | | "info" 11 | | "info-square" 12 | | "success" 13 | | "warning" 14 | | "warning-alt"; 15 | 16 | /** 17 | * Set the type of notification 18 | * @default "toast" 19 | */ 20 | notificationType?: "toast" | "inline"; 21 | 22 | /** 23 | * Specify the ARIA label for the icon 24 | * @default "Closes notification" 25 | */ 26 | iconDescription?: string; 27 | }; 28 | 29 | export default class NotificationIcon extends SvelteComponentTyped< 30 | NotificationIconProps, 31 | Record, 32 | {} 33 | > {} 34 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Notification/NotificationTextDetails.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type NotificationTextDetailsProps = { 4 | /** 5 | * Set the type of notification 6 | * @default "toast" 7 | */ 8 | notificationType?: "toast" | "inline"; 9 | 10 | /** 11 | * Specify the title text 12 | * @default "Title" 13 | */ 14 | title?: string; 15 | 16 | /** 17 | * Specify the subtitle text 18 | * @default "" 19 | */ 20 | subtitle?: string; 21 | 22 | /** 23 | * Specify the caption text 24 | * @default "Caption" 25 | */ 26 | caption?: string; 27 | }; 28 | 29 | export default class NotificationTextDetails extends SvelteComponentTyped< 30 | NotificationTextDetailsProps, 31 | Record, 32 | { default: {} } 33 | > {} 34 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/NumberInput/NumberInputSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to hide the label text 9 | * @default false 10 | */ 11 | hideLabel?: boolean; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type NumberInputSkeletonProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class NumberInputSkeleton extends SvelteComponentTyped< 19 | NumberInputSkeletonProps, 20 | { 21 | click: WindowEventMap["click"]; 22 | mouseover: WindowEventMap["mouseover"]; 23 | mouseenter: WindowEventMap["mouseenter"]; 24 | mouseleave: WindowEventMap["mouseleave"]; 25 | }, 26 | {} 27 | > {} 28 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/OrderedList/OrderedList.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["ol"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to use the nested variant 9 | * @default false 10 | */ 11 | nested?: boolean; 12 | 13 | /** 14 | * Set to `true` to use native list styles 15 | * @default false 16 | */ 17 | native?: boolean; 18 | 19 | [key: `data-${string}`]: any; 20 | }; 21 | 22 | export type OrderedListProps = Omit<$RestProps, keyof $Props> & $Props; 23 | 24 | export default class OrderedList extends SvelteComponentTyped< 25 | OrderedListProps, 26 | { 27 | click: WindowEventMap["click"]; 28 | mouseover: WindowEventMap["mouseover"]; 29 | mouseenter: WindowEventMap["mouseenter"]; 30 | mouseleave: WindowEventMap["mouseleave"]; 31 | }, 32 | { default: {} } 33 | > {} 34 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Pagination/PaginationSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type PaginationSkeletonProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class PaginationSkeleton extends SvelteComponentTyped< 13 | PaginationSkeletonProps, 14 | { 15 | click: WindowEventMap["click"]; 16 | mouseover: WindowEventMap["mouseover"]; 17 | mouseenter: WindowEventMap["mouseenter"]; 18 | mouseleave: WindowEventMap["mouseleave"]; 19 | }, 20 | {} 21 | > {} 22 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/ProgressIndicator/ProgressIndicatorSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["ul"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to use the vertical variant 9 | * @default false 10 | */ 11 | vertical?: boolean; 12 | 13 | /** 14 | * Specify the number of steps to render 15 | * @default 4 16 | */ 17 | count?: number; 18 | 19 | [key: `data-${string}`]: any; 20 | }; 21 | 22 | export type ProgressIndicatorSkeletonProps = Omit<$RestProps, keyof $Props> & 23 | $Props; 24 | 25 | export default class ProgressIndicatorSkeleton extends SvelteComponentTyped< 26 | ProgressIndicatorSkeletonProps, 27 | { 28 | click: WindowEventMap["click"]; 29 | mouseover: WindowEventMap["mouseover"]; 30 | mouseenter: WindowEventMap["mouseenter"]; 31 | mouseleave: WindowEventMap["mouseleave"]; 32 | }, 33 | {} 34 | > {} 35 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/RadioButton/RadioButtonSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type RadioButtonSkeletonProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class RadioButtonSkeleton extends SvelteComponentTyped< 13 | RadioButtonSkeletonProps, 14 | { 15 | click: WindowEventMap["click"]; 16 | mouseover: WindowEventMap["mouseover"]; 17 | mouseenter: WindowEventMap["mouseenter"]; 18 | mouseleave: WindowEventMap["mouseleave"]; 19 | }, 20 | {} 21 | > {} 22 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Select/SelectItem.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type SelectItemProps = { 4 | /** 5 | * Specify the option value 6 | * @default "" 7 | */ 8 | value?: string; 9 | 10 | /** 11 | * Specify the option text 12 | * @default "" 13 | */ 14 | text?: string; 15 | 16 | /** 17 | * Set to `true` to hide the option 18 | * @default false 19 | */ 20 | hidden?: boolean; 21 | 22 | /** 23 | * Set to `true` to disable the option 24 | * @default false 25 | */ 26 | disabled?: boolean; 27 | }; 28 | 29 | export default class SelectItem extends SvelteComponentTyped< 30 | SelectItemProps, 31 | Record, 32 | {} 33 | > {} 34 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Select/SelectItemGroup.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["optgroup"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to disable the optgroup element 9 | * @default false 10 | */ 11 | disabled?: boolean; 12 | 13 | /** 14 | * Specify the label attribute of the optgroup element 15 | * @default "Provide label" 16 | */ 17 | label?: string; 18 | 19 | [key: `data-${string}`]: any; 20 | }; 21 | 22 | export type SelectItemGroupProps = Omit<$RestProps, keyof $Props> & $Props; 23 | 24 | export default class SelectItemGroup extends SvelteComponentTyped< 25 | SelectItemGroupProps, 26 | Record, 27 | { default: {} } 28 | > {} 29 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Select/SelectSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to hide the label text 9 | * @default false 10 | */ 11 | hideLabel?: boolean; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type SelectSkeletonProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class SelectSkeleton extends SvelteComponentTyped< 19 | SelectSkeletonProps, 20 | { 21 | click: WindowEventMap["click"]; 22 | mouseover: WindowEventMap["mouseover"]; 23 | mouseenter: WindowEventMap["mouseenter"]; 24 | mouseleave: WindowEventMap["mouseleave"]; 25 | }, 26 | {} 27 | > {} 28 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/SkeletonPlaceholder/SkeletonPlaceholder.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type SkeletonPlaceholderProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class SkeletonPlaceholder extends SvelteComponentTyped< 13 | SkeletonPlaceholderProps, 14 | { 15 | click: WindowEventMap["click"]; 16 | mouseover: WindowEventMap["mouseover"]; 17 | mouseenter: WindowEventMap["mouseenter"]; 18 | mouseleave: WindowEventMap["mouseleave"]; 19 | }, 20 | {} 21 | > {} 22 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Slider/SliderSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to hide the label text 9 | * @default false 10 | */ 11 | hideLabel?: boolean; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type SliderSkeletonProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class SliderSkeleton extends SvelteComponentTyped< 19 | SliderSkeletonProps, 20 | { 21 | click: WindowEventMap["click"]; 22 | mouseover: WindowEventMap["mouseover"]; 23 | mouseenter: WindowEventMap["mouseenter"]; 24 | mouseleave: WindowEventMap["mouseleave"]; 25 | }, 26 | {} 27 | > {} 28 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/StructuredList/StructuredListBody.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type StructuredListBodyProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class StructuredListBody extends SvelteComponentTyped< 13 | StructuredListBodyProps, 14 | { 15 | click: WindowEventMap["click"]; 16 | mouseover: WindowEventMap["mouseover"]; 17 | mouseenter: WindowEventMap["mouseenter"]; 18 | mouseleave: WindowEventMap["mouseleave"]; 19 | }, 20 | { default: {} } 21 | > {} 22 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/StructuredList/StructuredListCell.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to use as a header 9 | * @default false 10 | */ 11 | head?: boolean; 12 | 13 | /** 14 | * Set to `true` to prevent wrapping 15 | * @default false 16 | */ 17 | noWrap?: boolean; 18 | 19 | [key: `data-${string}`]: any; 20 | }; 21 | 22 | export type StructuredListCellProps = Omit<$RestProps, keyof $Props> & $Props; 23 | 24 | export default class StructuredListCell extends SvelteComponentTyped< 25 | StructuredListCellProps, 26 | { 27 | click: WindowEventMap["click"]; 28 | mouseover: WindowEventMap["mouseover"]; 29 | mouseenter: WindowEventMap["mouseenter"]; 30 | mouseleave: WindowEventMap["mouseleave"]; 31 | }, 32 | { default: {} } 33 | > {} 34 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/StructuredList/StructuredListHead.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type StructuredListHeadProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class StructuredListHead extends SvelteComponentTyped< 13 | StructuredListHeadProps, 14 | { 15 | click: WindowEventMap["click"]; 16 | mouseover: WindowEventMap["mouseover"]; 17 | mouseenter: WindowEventMap["mouseenter"]; 18 | mouseleave: WindowEventMap["mouseleave"]; 19 | }, 20 | { default: {} } 21 | > {} 22 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/StructuredList/StructuredListSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Specify the number of rows 9 | * @default 5 10 | */ 11 | rows?: number; 12 | 13 | /** 14 | * Set to `true` to use the bordered variant 15 | * @default false 16 | */ 17 | border?: boolean; 18 | 19 | [key: `data-${string}`]: any; 20 | }; 21 | 22 | export type StructuredListSkeletonProps = Omit<$RestProps, keyof $Props> & 23 | $Props; 24 | 25 | export default class StructuredListSkeleton extends SvelteComponentTyped< 26 | StructuredListSkeletonProps, 27 | { 28 | click: WindowEventMap["click"]; 29 | mouseover: WindowEventMap["mouseover"]; 30 | mouseenter: WindowEventMap["mouseenter"]; 31 | mouseleave: WindowEventMap["mouseleave"]; 32 | }, 33 | {} 34 | > {} 35 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Tabs/TabContent.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set an id for the top-level element 9 | * @default "ccs-" + Math.random().toString(36) 10 | */ 11 | id?: string; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type TabContentProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class TabContent extends SvelteComponentTyped< 19 | TabContentProps, 20 | Record, 21 | { default: {} } 22 | > {} 23 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Tabs/TabsSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Specify the number of tabs to render 9 | * @default 4 10 | */ 11 | count?: number; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type TabsSkeletonProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class TabsSkeleton extends SvelteComponentTyped< 19 | TabsSkeletonProps, 20 | { 21 | click: WindowEventMap["click"]; 22 | mouseover: WindowEventMap["mouseover"]; 23 | mouseenter: WindowEventMap["mouseenter"]; 24 | mouseleave: WindowEventMap["mouseleave"]; 25 | }, 26 | {} 27 | > {} 28 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Tag/TagSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["span"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type TagSkeletonProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class TagSkeleton extends SvelteComponentTyped< 13 | TagSkeletonProps, 14 | { 15 | click: WindowEventMap["click"]; 16 | mouseover: WindowEventMap["mouseover"]; 17 | mouseenter: WindowEventMap["mouseenter"]; 18 | mouseleave: WindowEventMap["mouseleave"]; 19 | }, 20 | {} 21 | > {} 22 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/TextArea/TextAreaSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to visually hide the label text 9 | * @default false 10 | */ 11 | hideLabel?: boolean; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type TextAreaSkeletonProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class TextAreaSkeleton extends SvelteComponentTyped< 19 | TextAreaSkeletonProps, 20 | { 21 | click: WindowEventMap["click"]; 22 | mouseover: WindowEventMap["mouseover"]; 23 | mouseenter: WindowEventMap["mouseenter"]; 24 | mouseleave: WindowEventMap["mouseleave"]; 25 | }, 26 | {} 27 | > {} 28 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/TextInput/TextInputSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to hide the label text 9 | * @default false 10 | */ 11 | hideLabel?: boolean; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type TextInputSkeletonProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class TextInputSkeleton extends SvelteComponentTyped< 19 | TextInputSkeletonProps, 20 | { 21 | click: WindowEventMap["click"]; 22 | mouseover: WindowEventMap["mouseover"]; 23 | mouseenter: WindowEventMap["mouseenter"]; 24 | mouseleave: WindowEventMap["mouseleave"]; 25 | }, 26 | {} 27 | > {} 28 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Tile/Tile.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to enable the light variant 9 | * @default false 10 | */ 11 | light?: boolean; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type TileProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class Tile extends SvelteComponentTyped< 19 | TileProps, 20 | { 21 | click: WindowEventMap["click"]; 22 | mouseover: WindowEventMap["mouseover"]; 23 | mouseenter: WindowEventMap["mouseenter"]; 24 | mouseleave: WindowEventMap["mouseleave"]; 25 | }, 26 | { default: {} } 27 | > {} 28 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/Tile/TileGroup.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["fieldset"]; 5 | 6 | type $Props = { 7 | /** 8 | * Specify the selected tile value 9 | * @default undefined 10 | */ 11 | selected?: string; 12 | 13 | /** 14 | * Set to `true` to disable the tile group 15 | * @default false 16 | */ 17 | disabled?: boolean; 18 | 19 | /** 20 | * Specify the legend text 21 | * @default "" 22 | */ 23 | legend?: string; 24 | 25 | [key: `data-${string}`]: any; 26 | }; 27 | 28 | export type TileGroupProps = Omit<$RestProps, keyof $Props> & $Props; 29 | 30 | export default class TileGroup extends SvelteComponentTyped< 31 | TileGroupProps, 32 | { select: CustomEvent }, 33 | { default: {} } 34 | > {} 35 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/ToggleSmall/ToggleSmallSkeleton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["div"]; 5 | 6 | type $Props = { 7 | /** 8 | * Specify the label text 9 | * @default "" 10 | */ 11 | labelText?: string; 12 | 13 | /** 14 | * Set an id for the input element 15 | * @default "ccs-" + Math.random().toString(36) 16 | */ 17 | id?: string; 18 | 19 | [key: `data-${string}`]: any; 20 | }; 21 | 22 | export type ToggleSmallSkeletonProps = Omit<$RestProps, keyof $Props> & $Props; 23 | 24 | export default class ToggleSmallSkeleton extends SvelteComponentTyped< 25 | ToggleSmallSkeletonProps, 26 | { 27 | click: WindowEventMap["click"]; 28 | mouseover: WindowEventMap["mouseover"]; 29 | mouseenter: WindowEventMap["mouseenter"]; 30 | mouseleave: WindowEventMap["mouseleave"]; 31 | }, 32 | {} 33 | > {} 34 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/UIShell/Content.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["main"]; 5 | 6 | type $Props = { 7 | /** 8 | * Specify the id for the main element 9 | * @default "main-content" 10 | */ 11 | id?: string; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type ContentProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class Content extends SvelteComponentTyped< 19 | ContentProps, 20 | Record, 21 | { default: {} } 22 | > {} 23 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderActionSearch.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type HeaderActionSearchProps = { 4 | /** 5 | * Set to `true` to focus the search 6 | * @default false 7 | */ 8 | searchIsActive?: boolean; 9 | }; 10 | 11 | export default class HeaderActionSearch extends SvelteComponentTyped< 12 | HeaderActionSearchProps, 13 | { 14 | inputSearch: CustomEvent<{ action: "search"; textInput: string }>; 15 | focusInputSearch: CustomEvent; 16 | focusOutInputSearch: CustomEvent; 17 | }, 18 | {} 19 | > {} 20 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderNav.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["nav"]; 5 | 6 | type $Props = { 7 | /** 8 | * Specify the ARIA label for the nav 9 | * @deprecated use "aria-label" instead 10 | * @default undefined 11 | */ 12 | ariaLabel?: string; 13 | 14 | [key: `data-${string}`]: any; 15 | }; 16 | 17 | export type HeaderNavProps = Omit<$RestProps, keyof $Props> & $Props; 18 | 19 | export default class HeaderNav extends SvelteComponentTyped< 20 | HeaderNavProps, 21 | Record, 22 | { default: {} } 23 | > {} 24 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderPanelDivider.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type HeaderPanelDividerProps = {}; 4 | 5 | export default class HeaderPanelDivider extends SvelteComponentTyped< 6 | HeaderPanelDividerProps, 7 | Record, 8 | { default: {} } 9 | > {} 10 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderPanelLink.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["a"]; 5 | 6 | type $Props = { 7 | /** 8 | * Specify the `href` attribute 9 | * @default undefined 10 | */ 11 | href?: string; 12 | 13 | /** 14 | * Obtain a reference to the HTML anchor element 15 | * @default null 16 | */ 17 | ref?: null | HTMLAnchorElement; 18 | 19 | [key: `data-${string}`]: any; 20 | }; 21 | 22 | export type HeaderPanelLinkProps = Omit<$RestProps, keyof $Props> & $Props; 23 | 24 | export default class HeaderPanelLink extends SvelteComponentTyped< 25 | HeaderPanelLinkProps, 26 | { click: WindowEventMap["click"] }, 27 | { default: {} } 28 | > {} 29 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderPanelLinks.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type HeaderPanelLinksProps = {}; 4 | 5 | export default class HeaderPanelLinks extends SvelteComponentTyped< 6 | HeaderPanelLinksProps, 7 | Record, 8 | { default: {} } 9 | > {} 10 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/UIShell/GlobalHeader/HeaderUtilities.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type HeaderUtilitiesProps = {}; 4 | 5 | export default class HeaderUtilities extends SvelteComponentTyped< 6 | HeaderUtilitiesProps, 7 | Record, 8 | { default: {} } 9 | > {} 10 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/UIShell/HeaderGlobalAction.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["button"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to use the active variant 9 | * @default false 10 | */ 11 | isActive?: boolean; 12 | 13 | /** 14 | * Specify the icon to render 15 | * @default undefined 16 | */ 17 | icon?: typeof import("carbon-icons-svelte").CarbonIcon; 18 | 19 | /** 20 | * Obtain a reference to the HTML button element 21 | * @default null 22 | */ 23 | ref?: null | HTMLButtonElement; 24 | 25 | [key: `data-${string}`]: any; 26 | }; 27 | 28 | export type HeaderGlobalActionProps = Omit<$RestProps, keyof $Props> & $Props; 29 | 30 | export default class HeaderGlobalAction extends SvelteComponentTyped< 31 | HeaderGlobalActionProps, 32 | { click: WindowEventMap["click"] }, 33 | { default: {} } 34 | > {} 35 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/UIShell/SideNav/SideNav.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["nav"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to use the fixed variant 9 | * @default false 10 | */ 11 | fixed?: boolean; 12 | 13 | /** 14 | * Specify the ARIA label for the nav 15 | * @default undefined 16 | */ 17 | ariaLabel?: string; 18 | 19 | /** 20 | * Set to `true` to toggle the expanded state 21 | * @default false 22 | */ 23 | isOpen?: boolean; 24 | 25 | [key: `data-${string}`]: any; 26 | }; 27 | 28 | export type SideNavProps = Omit<$RestProps, keyof $Props> & $Props; 29 | 30 | export default class SideNav extends SvelteComponentTyped< 31 | SideNavProps, 32 | Record, 33 | { default: {} } 34 | > {} 35 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/UIShell/SideNav/SideNavItems.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type SideNavItemsProps = {}; 4 | 5 | export default class SideNavItems extends SvelteComponentTyped< 6 | SideNavItemsProps, 7 | Record, 8 | { default: {} } 9 | > {} 10 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/UIShell/SkipToContent.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["a"]; 5 | 6 | type $Props = { 7 | /** 8 | * Specify the `href` attribute 9 | * @default "#main-content" 10 | */ 11 | href?: string; 12 | 13 | /** 14 | * Specify the tabindex 15 | * @default "0" 16 | */ 17 | tabindex?: string; 18 | 19 | [key: `data-${string}`]: any; 20 | }; 21 | 22 | export type SkipToContentProps = Omit<$RestProps, keyof $Props> & $Props; 23 | 24 | export default class SkipToContent extends SvelteComponentTyped< 25 | SkipToContentProps, 26 | { click: WindowEventMap["click"] }, 27 | { default: {} } 28 | > {} 29 | -------------------------------------------------------------------------------- /tests/e2e/carbon/types/UnorderedList/UnorderedList.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["ul"]; 5 | 6 | type $Props = { 7 | /** 8 | * Set to `true` to use the nested variant 9 | * @default false 10 | */ 11 | nested?: boolean; 12 | 13 | [key: `data-${string}`]: any; 14 | }; 15 | 16 | export type UnorderedListProps = Omit<$RestProps, keyof $Props> & $Props; 17 | 18 | export default class UnorderedList extends SvelteComponentTyped< 19 | UnorderedListProps, 20 | { 21 | click: WindowEventMap["click"]; 22 | mouseover: WindowEventMap["mouseover"]; 23 | mouseenter: WindowEventMap["mouseenter"]; 24 | mouseleave: WindowEventMap["mouseleave"]; 25 | }, 26 | { default: {} } 27 | > {} 28 | -------------------------------------------------------------------------------- /tests/e2e/glob/.gitignore: -------------------------------------------------------------------------------- 1 | /lib 2 | /node_modules -------------------------------------------------------------------------------- /tests/e2e/glob/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "glob", 3 | "version": "0.0.1", 4 | "private": true, 5 | "svelte": "./src/index.js", 6 | "module": "./lib/index.mjs", 7 | "types": "./types/index.d.ts", 8 | "scripts": { 9 | "svelte-check": "svelte-check --workspace test", 10 | "build": "rollup -c" 11 | }, 12 | "devDependencies": { 13 | "@rollup/plugin-node-resolve": "^10.0.0", 14 | "rollup": "^2.32.1", 15 | "rollup-plugin-svelte": "^6.1.1", 16 | "svelte": "^3.31.0", 17 | "svelte-check": "^1.1.17", 18 | "svelte-preprocess": "^6.0.2", 19 | "typescript": "^5.6.2" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/e2e/glob/rollup.config.js: -------------------------------------------------------------------------------- 1 | import pkg from "./package.json"; 2 | import svelte from "rollup-plugin-svelte"; 3 | import resolve from "@rollup/plugin-node-resolve"; 4 | import { typescript } from "svelte-preprocess"; 5 | import sveld from "sveld"; 6 | 7 | const production = !process.env.ROLLUP_WATCH; 8 | 9 | export default { 10 | input: "src/index.js", 11 | output: { format: "es", file: pkg.module }, 12 | plugins: [ 13 | svelte({ preprocess: typescript() }), 14 | resolve(), 15 | production && 16 | sveld({ 17 | glob:true, 18 | markdown: true, 19 | markdownOptions: { 20 | onAppend: (type, document, components) => { 21 | if (type === "h1") 22 | document.append("quote", `${components.size} components exported from ${pkg.name}@${pkg.version}.`); 23 | }, 24 | }, 25 | json: true, 26 | }), 27 | ], 28 | }; 29 | -------------------------------------------------------------------------------- /tests/e2e/glob/src/action/Action.js: -------------------------------------------------------------------------------- 1 | export default function () { 2 | console.log('hello'); 3 | } -------------------------------------------------------------------------------- /tests/e2e/glob/src/action/index.js: -------------------------------------------------------------------------------- 1 | export { default as Action } from "./Action.js"; -------------------------------------------------------------------------------- /tests/e2e/glob/src/button/index.js: -------------------------------------------------------------------------------- 1 | export { default as Button } from "./Button.svelte"; -------------------------------------------------------------------------------- /tests/e2e/glob/src/index.js: -------------------------------------------------------------------------------- 1 | export { Action } from "./action/"; 2 | export { Button } from "./button/"; -------------------------------------------------------------------------------- /tests/e2e/glob/test/test.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | Test 8 | -------------------------------------------------------------------------------- /tests/e2e/glob/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "forceConsistentCasingInFileNames": true, 4 | "verbatimModuleSyntax": true, 5 | "isolatedModules": true, 6 | "target": "ESNext", 7 | "module": "ESNext", 8 | "moduleResolution": "node", 9 | "strict": true, 10 | }, 11 | "include": ["src", "test"] 12 | } -------------------------------------------------------------------------------- /tests/e2e/glob/types/button/Button.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | export type tree = boolean; 5 | 6 | export declare function computeTreeLeafDepth(): any; 7 | 8 | /** 9 | * Finds the nearest parent tree node 10 | */ 11 | export declare function findParentTreeNode( 12 | node: HTMLElement, 13 | ): null | HTMLElement; 14 | 15 | type $RestProps = SvelteHTMLElements["button"]; 16 | 17 | type $Props = { 18 | /** 19 | * @default "button" 20 | */ 21 | type?: string; 22 | 23 | /** 24 | * @default false 25 | */ 26 | primary?: boolean; 27 | 28 | [key: `data-${string}`]: any; 29 | }; 30 | 31 | export type ButtonProps = Omit<$RestProps, keyof $Props> & $Props; 32 | 33 | export default class Button extends SvelteComponentTyped< 34 | ButtonProps, 35 | { click: WindowEventMap["click"] }, 36 | { default: {} } 37 | > {} 38 | -------------------------------------------------------------------------------- /tests/e2e/glob/types/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as Action } from "./action/"; 2 | export { 3 | default as Button, 4 | tree, 5 | computeTreeLeafDepth, 6 | findParentTreeNode, 7 | } from "./button/Button.svelte"; 8 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed-ts-only/.gitignore: -------------------------------------------------------------------------------- 1 | /lib 2 | /node_modules -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed-ts-only/button/button.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed-ts-only/index.js: -------------------------------------------------------------------------------- 1 | export { default as Button } from "./button/button.svelte"; 2 | export { default as SecondaryButton } from "./secondary-button/secondary-button.svelte"; 3 | export { default as Link } from "./link/link.svelte"; 4 | export { default as Quote } from "./quote/quote.svelte"; 5 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed-ts-only/link/link.svelte: -------------------------------------------------------------------------------- 1 | 2 | Link text 3 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed-ts-only/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multi-export-typed-ts-only", 3 | "version": "0.0.1", 4 | "private": true, 5 | "svelte": "./index.js", 6 | "module": "./lib/index.mjs", 7 | "types": "./types/index.d.ts", 8 | "scripts": { 9 | "svelte-check": "svelte-check --workspace test", 10 | "build": "rollup -c" 11 | }, 12 | "devDependencies": { 13 | "@rollup/plugin-node-resolve": "^10.0.0", 14 | "@tsconfig/svelte": "^1.0.10", 15 | "rollup": "^2.32.1", 16 | "rollup-plugin-svelte": "^6.1.1", 17 | "svelte": "^3.31.0", 18 | "svelte-check": "^1.1.17", 19 | "typescript": "^4.0.5" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed-ts-only/quote/quote.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
    7 | {quote} 8 |
    – {author}
    9 |
    10 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed-ts-only/rollup.config.js: -------------------------------------------------------------------------------- 1 | import pkg from "./package.json"; 2 | import svelte from "rollup-plugin-svelte"; 3 | import resolve from "@rollup/plugin-node-resolve"; 4 | import sveld from "sveld"; 5 | 6 | const production = !process.env.ROLLUP_WATCH; 7 | 8 | export default { 9 | input: "index.js", 10 | output: { format: "es", file: pkg.module }, 11 | plugins: [ 12 | svelte(), 13 | resolve(), 14 | production && sveld(), 15 | ], 16 | }; 17 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed-ts-only/secondary-button/secondary-button.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed-ts-only/test.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 15 | 16 | { 20 | console.log(e); 21 | }} 22 | > 23 | Text 24 | 25 | 26 | 27 | 28 | Text 29 | 30 | 31 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed-ts-only/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/svelte", 3 | } -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed-ts-only/types/button/button.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["button"]; 5 | 6 | type $Props = { 7 | /** 8 | * @default "button" 9 | */ 10 | type?: "button" | "submit" | "reset"; 11 | 12 | /** 13 | * Set to `true` to use the primary variant 14 | * @default false 15 | */ 16 | primary?: boolean; 17 | 18 | [key: `data-${string}`]: any; 19 | }; 20 | 21 | export type ButtonProps = Omit<$RestProps, keyof $Props> & $Props; 22 | 23 | export default class Button extends SvelteComponentTyped< 24 | ButtonProps, 25 | { click: WindowEventMap["click"] }, 26 | { default: {} } 27 | > {} 28 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed-ts-only/types/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as Button } from "./button/button.svelte"; 2 | export { default as SecondaryButton } from "./secondary-button/secondary-button.svelte"; 3 | export { default as Link } from "./link/link.svelte"; 4 | export { default as Quote } from "./quote/quote.svelte"; 5 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed-ts-only/types/link/link.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["a"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type LinkProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class Link extends SvelteComponentTyped< 13 | LinkProps, 14 | { click: WindowEventMap["click"] }, 15 | { default: {} } 16 | > {} 17 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed-ts-only/types/quote/quote.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["blockquote"]; 5 | 6 | type $Props = { 7 | /** 8 | * @default "" 9 | */ 10 | quote?: string; 11 | 12 | /** 13 | * @default "" 14 | */ 15 | author?: string; 16 | 17 | [key: `data-${string}`]: any; 18 | }; 19 | 20 | export type QuoteProps = Omit<$RestProps, keyof $Props> & $Props; 21 | 22 | export default class Quote extends SvelteComponentTyped< 23 | QuoteProps, 24 | Record, 25 | { default: {} } 26 | > {} 27 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed-ts-only/types/secondary-button/secondary-button.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { ButtonProps } from "../button/button.svelte"; 3 | 4 | export type SecondaryButtonProps = ButtonProps & {}; 5 | 6 | export default class SecondaryButton extends SvelteComponentTyped< 7 | SecondaryButtonProps, 8 | { click: WindowEventMap["click"] }, 9 | { default: {} } 10 | > { 11 | secondary: boolean; 12 | } 13 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed/.gitignore: -------------------------------------------------------------------------------- 1 | /lib 2 | /node_modules -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multi-export-typed", 3 | "version": "0.0.1", 4 | "private": true, 5 | "svelte": "./src/index.js", 6 | "module": "./lib/index.mjs", 7 | "types": "./types/index.d.ts", 8 | "scripts": { 9 | "svelte-check": "svelte-check --workspace test", 10 | "build": "rollup -c" 11 | }, 12 | "devDependencies": { 13 | "@rollup/plugin-node-resolve": "^10.0.0", 14 | "@tsconfig/svelte": "^1.0.10", 15 | "rollup": "^2.32.1", 16 | "rollup-plugin-svelte": "^6.1.1", 17 | "svelte": "^3.31.0", 18 | "svelte-check": "^1.1.17", 19 | "typescript": "^4.0.5" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed/rollup.config.js: -------------------------------------------------------------------------------- 1 | import pkg from "./package.json"; 2 | import svelte from "rollup-plugin-svelte"; 3 | import resolve from "@rollup/plugin-node-resolve"; 4 | import sveld from "sveld"; 5 | 6 | const production = !process.env.ROLLUP_WATCH; 7 | 8 | export default { 9 | input: "src", 10 | output: { format: "es", file: pkg.module }, 11 | plugins: [ 12 | svelte(), 13 | resolve(), 14 | production && 15 | sveld({ 16 | typesOptions: { 17 | preamble: `// TypeScript definitions for ${pkg.name}@${pkg.version}\n\n`, 18 | }, 19 | markdown: true, 20 | markdownOptions: { 21 | onAppend: (type, document, components) => { 22 | if (type === "h1") 23 | document.append( 24 | "quote", 25 | `${components.size} components exported from ${pkg.name}@${pkg.version}.` 26 | ); 27 | }, 28 | }, 29 | json: true, 30 | }), 31 | ], 32 | }; 33 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed/src/Button.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed/src/Link.svelte: -------------------------------------------------------------------------------- 1 | 2 | Link text 3 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed/src/Quote.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
    7 | {quote} 8 |
    – {author}
    9 |
    10 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed/src/SecondaryButton.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed/src/index.js: -------------------------------------------------------------------------------- 1 | export { default as Button } from "./Button.svelte"; 2 | export { default as SecondaryButton } from "./SecondaryButton.svelte"; 3 | export { default as Link } from "./Link.svelte"; 4 | export { default as Quote } from "./Quote.svelte"; 5 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed/test.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 14 | 15 | Text 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/svelte", 3 | } -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed/types/Button.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["button"]; 5 | 6 | type $Props = { 7 | /** 8 | * @default "button" 9 | */ 10 | type?: "button" | "submit" | "reset"; 11 | 12 | /** 13 | * Set to `true` to use the primary variant 14 | * @default false 15 | */ 16 | primary?: boolean; 17 | 18 | [key: `data-${string}`]: any; 19 | }; 20 | 21 | export type ButtonProps = Omit<$RestProps, keyof $Props> & $Props; 22 | 23 | export default class Button extends SvelteComponentTyped< 24 | ButtonProps, 25 | { click: WindowEventMap["click"] }, 26 | { default: {} } 27 | > {} 28 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed/types/Link.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["a"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type LinkProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class Link extends SvelteComponentTyped< 13 | LinkProps, 14 | { click: WindowEventMap["click"] }, 15 | { default: {} } 16 | > {} 17 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed/types/Quote.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["blockquote"]; 5 | 6 | type $Props = { 7 | /** 8 | * @default "" 9 | */ 10 | quote?: string; 11 | 12 | /** 13 | * @default "" 14 | */ 15 | author?: string; 16 | 17 | [key: `data-${string}`]: any; 18 | }; 19 | 20 | export type QuoteProps = Omit<$RestProps, keyof $Props> & $Props; 21 | 22 | export default class Quote extends SvelteComponentTyped< 23 | QuoteProps, 24 | Record, 25 | { default: {} } 26 | > {} 27 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed/types/SecondaryButton.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { ButtonProps } from "./Button.svelte"; 3 | 4 | export type SecondaryButtonProps = ButtonProps & {}; 5 | 6 | export default class SecondaryButton extends SvelteComponentTyped< 7 | SecondaryButtonProps, 8 | { click: WindowEventMap["click"] }, 9 | { default: {} } 10 | > { 11 | secondary: boolean; 12 | } 13 | -------------------------------------------------------------------------------- /tests/e2e/multi-export-typed/types/index.d.ts: -------------------------------------------------------------------------------- 1 | // TypeScript definitions for multi-export-typed@0.0.1 2 | 3 | export { default as Button } from "./Button.svelte"; 4 | export { default as SecondaryButton } from "./SecondaryButton.svelte"; 5 | export { default as Link } from "./Link.svelte"; 6 | export { default as Quote } from "./Quote.svelte"; 7 | -------------------------------------------------------------------------------- /tests/e2e/multi-export/.gitignore: -------------------------------------------------------------------------------- 1 | /lib 2 | /node_modules -------------------------------------------------------------------------------- /tests/e2e/multi-export/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multi-export", 3 | "version": "0.0.1", 4 | "private": true, 5 | "svelte": "./src/index.js", 6 | "module": "./lib/index.mjs", 7 | "types": "./types/index.d.ts", 8 | "scripts": { 9 | "svelte-check": "svelte-check --workspace test", 10 | "build": "rollup -c" 11 | }, 12 | "devDependencies": { 13 | "@rollup/plugin-node-resolve": "^10.0.0", 14 | "@tsconfig/svelte": "^1.0.10", 15 | "rollup": "^2.32.1", 16 | "rollup-plugin-svelte": "^6.1.1", 17 | "svelte": "^3.31.0", 18 | "svelte-check": "^1.1.17", 19 | "typescript": "^4.0.5" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/e2e/multi-export/rollup.config.js: -------------------------------------------------------------------------------- 1 | import pkg from "./package.json"; 2 | import svelte from "rollup-plugin-svelte"; 3 | import resolve from "@rollup/plugin-node-resolve"; 4 | import sveld from "sveld"; 5 | 6 | const production = !process.env.ROLLUP_WATCH; 7 | 8 | export default { 9 | input: "src/index.js", 10 | output: { format: "es", file: pkg.module }, 11 | plugins: [ 12 | svelte(), 13 | resolve(), 14 | production && 15 | sveld({ 16 | markdown: true, 17 | markdownOptions: { 18 | onAppend: (type, document, components) => { 19 | if (type === "h1") 20 | document.append("quote", `${components.size} components exported from ${pkg.name}@${pkg.version}.`); 21 | }, 22 | }, 23 | json: true, 24 | }), 25 | ], 26 | }; 27 | -------------------------------------------------------------------------------- /tests/e2e/multi-export/src/Button.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /tests/e2e/multi-export/src/Link.svelte: -------------------------------------------------------------------------------- 1 | 2 | Link text 3 | -------------------------------------------------------------------------------- /tests/e2e/multi-export/src/Quote.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 |
    14 | {quote} 15 |
    – {author}
    16 |
    17 | -------------------------------------------------------------------------------- /tests/e2e/multi-export/src/index.js: -------------------------------------------------------------------------------- 1 | export { default as Button } from "./Button.svelte"; 2 | export { default as Link } from "./Link.svelte"; 3 | export { default as Quote } from "./Quote.svelte"; 4 | export { default as Header } from "./nested/Header.svelte"; 5 | -------------------------------------------------------------------------------- /tests/e2e/multi-export/src/nested/Header.svelte: -------------------------------------------------------------------------------- 1 |
    2 | -------------------------------------------------------------------------------- /tests/e2e/multi-export/test/test.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 15 | 16 | Text 17 | 18 | 19 | 20 |
    Test
    21 | -------------------------------------------------------------------------------- /tests/e2e/multi-export/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/svelte", 3 | } -------------------------------------------------------------------------------- /tests/e2e/multi-export/types/Button.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["button"]; 5 | 6 | type $Props = { 7 | /** 8 | * @default "button" 9 | */ 10 | type?: string; 11 | 12 | /** 13 | * @default false 14 | */ 15 | primary?: boolean; 16 | 17 | [key: `data-${string}`]: any; 18 | }; 19 | 20 | export type ButtonProps = Omit<$RestProps, keyof $Props> & $Props; 21 | 22 | export default class Button extends SvelteComponentTyped< 23 | ButtonProps, 24 | { click: WindowEventMap["click"] }, 25 | { default: {} } 26 | > { 27 | print: () => any; 28 | } 29 | -------------------------------------------------------------------------------- /tests/e2e/multi-export/types/Link.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["a"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type LinkProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class Link extends SvelteComponentTyped< 13 | LinkProps, 14 | { click: WindowEventMap["click"] }, 15 | { default: {} } 16 | > {} 17 | -------------------------------------------------------------------------------- /tests/e2e/multi-export/types/Quote.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | export type Author = string; 5 | 6 | type $RestProps = SvelteHTMLElements["blockquote"]; 7 | 8 | type $Props = { 9 | /** 10 | * @default "" 11 | */ 12 | quote?: any; 13 | 14 | /** 15 | * @default "" 16 | */ 17 | author?: Author; 18 | 19 | [key: `data-${string}`]: any; 20 | }; 21 | 22 | export type QuoteProps = Omit<$RestProps, keyof $Props> & $Props; 23 | 24 | export default class Quote extends SvelteComponentTyped< 25 | QuoteProps, 26 | Record, 27 | { default: {} } 28 | > {} 29 | -------------------------------------------------------------------------------- /tests/e2e/multi-export/types/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as Button } from "./Button.svelte"; 2 | export { default as Link } from "./Link.svelte"; 3 | export { default as Quote } from "./Quote.svelte"; 4 | export { default as Header } from "./nested/Header.svelte"; 5 | -------------------------------------------------------------------------------- /tests/e2e/multi-export/types/nested/Header.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type HeaderProps = {}; 4 | 5 | export default class Header extends SvelteComponentTyped< 6 | HeaderProps, 7 | Record, 8 | { default: {} } 9 | > {} 10 | -------------------------------------------------------------------------------- /tests/e2e/multi-folders/.gitignore: -------------------------------------------------------------------------------- 1 | /lib 2 | /node_modules -------------------------------------------------------------------------------- /tests/e2e/multi-folders/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multi-folders", 3 | "version": "0.0.1", 4 | "private": true, 5 | "svelte": "./src/index.js", 6 | "module": "./lib/index.mjs", 7 | "types": "./types/index.d.ts", 8 | "scripts": { 9 | "svelte-check": "svelte-check --workspace test", 10 | "build": "rollup -c" 11 | }, 12 | "devDependencies": { 13 | "@rollup/plugin-node-resolve": "^10.0.0", 14 | "@tsconfig/svelte": "^1.0.10", 15 | "rollup": "^2.32.1", 16 | "rollup-plugin-svelte": "^6.1.1", 17 | "svelte": "^3.31.0", 18 | "svelte-check": "^1.1.17", 19 | "typescript": "^4.0.5" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/e2e/multi-folders/rollup.config.js: -------------------------------------------------------------------------------- 1 | import pkg from "./package.json"; 2 | import svelte from "rollup-plugin-svelte"; 3 | import resolve from "@rollup/plugin-node-resolve"; 4 | import sveld from "sveld"; 5 | 6 | const production = !process.env.ROLLUP_WATCH; 7 | 8 | export default { 9 | input: "src/index.js", 10 | output: { format: "es", file: pkg.module }, 11 | plugins: [ 12 | svelte(), 13 | resolve(), 14 | production && 15 | sveld({ 16 | markdown: true, 17 | markdownOptions: { 18 | onAppend: (type, document, components) => { 19 | if (type === "h1") 20 | document.append("quote", `${components.size} components exported from ${pkg.name}@${pkg.version}.`); 21 | }, 22 | }, 23 | json: true, 24 | }), 25 | ], 26 | }; 27 | -------------------------------------------------------------------------------- /tests/e2e/multi-folders/src/Link.svelte: -------------------------------------------------------------------------------- 1 | 2 | Link text 3 | -------------------------------------------------------------------------------- /tests/e2e/multi-folders/src/Quote.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 |
    14 | {quote} 15 |
    – {author}
    16 |
    17 | -------------------------------------------------------------------------------- /tests/e2e/multi-folders/src/components/Button.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /tests/e2e/multi-folders/src/components/Card.svelte: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/e2e/multi-folders/src/components/index.js: -------------------------------------------------------------------------------- 1 | export { default as Button } from "./Button.svelte"; 2 | export { default as Card } from "./Card.svelte"; -------------------------------------------------------------------------------- /tests/e2e/multi-folders/src/index.js: -------------------------------------------------------------------------------- 1 | export { default as Link } from "./Link.svelte"; 2 | export { default as Quote } from "./Quote.svelte"; 3 | export { default as Header } from "./nested/Header.svelte"; 4 | export * from "./components"; -------------------------------------------------------------------------------- /tests/e2e/multi-folders/src/nested/Header.svelte: -------------------------------------------------------------------------------- 1 |
    2 | -------------------------------------------------------------------------------- /tests/e2e/multi-folders/test/test.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 15 | 16 | Text 17 | 18 | 19 | 20 |
    Test
    21 | -------------------------------------------------------------------------------- /tests/e2e/multi-folders/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/svelte", 3 | } -------------------------------------------------------------------------------- /tests/e2e/multi-folders/types/Link.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["a"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type LinkProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class Link extends SvelteComponentTyped< 13 | LinkProps, 14 | { click: WindowEventMap["click"] }, 15 | { default: {} } 16 | > {} 17 | -------------------------------------------------------------------------------- /tests/e2e/multi-folders/types/Quote.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | export type Author = string; 5 | 6 | type $RestProps = SvelteHTMLElements["blockquote"]; 7 | 8 | type $Props = { 9 | /** 10 | * @default "" 11 | */ 12 | quote?: any; 13 | 14 | /** 15 | * @default "" 16 | */ 17 | author?: Author; 18 | 19 | [key: `data-${string}`]: any; 20 | }; 21 | 22 | export type QuoteProps = Omit<$RestProps, keyof $Props> & $Props; 23 | 24 | export default class Quote extends SvelteComponentTyped< 25 | QuoteProps, 26 | Record, 27 | { default: {} } 28 | > {} 29 | -------------------------------------------------------------------------------- /tests/e2e/multi-folders/types/components/Button.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["button"]; 5 | 6 | type $Props = { 7 | /** 8 | * @default "button" 9 | */ 10 | type?: "button" | "submit" | "reset"; 11 | 12 | /** 13 | * Set to `true` to use the primary variant 14 | * @default false 15 | */ 16 | primary?: boolean; 17 | 18 | [key: `data-${string}`]: any; 19 | }; 20 | 21 | export type ButtonProps = Omit<$RestProps, keyof $Props> & $Props; 22 | 23 | export default class Button extends SvelteComponentTyped< 24 | ButtonProps, 25 | { click: WindowEventMap["click"] }, 26 | { default: {} } 27 | > {} 28 | -------------------------------------------------------------------------------- /tests/e2e/multi-folders/types/components/Card.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type CardProps = {}; 4 | 5 | export default class Card extends SvelteComponentTyped< 6 | CardProps, 7 | Record, 8 | { default: {} } 9 | > {} 10 | -------------------------------------------------------------------------------- /tests/e2e/multi-folders/types/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as Link } from "./Link.svelte"; 2 | export { default as Quote } from "./Quote.svelte"; 3 | export { default as Header } from "./nested/Header.svelte"; 4 | export { default as Button } from "./components/Button.svelte"; 5 | export { default as Card } from "./components/Card.svelte"; 6 | -------------------------------------------------------------------------------- /tests/e2e/multi-folders/types/nested/Header.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type HeaderProps = {}; 4 | 5 | export default class Header extends SvelteComponentTyped< 6 | HeaderProps, 7 | Record, 8 | { default: {} } 9 | > {} 10 | -------------------------------------------------------------------------------- /tests/e2e/single-export-default-only/.gitignore: -------------------------------------------------------------------------------- 1 | /lib 2 | /node_modules -------------------------------------------------------------------------------- /tests/e2e/single-export-default-only/component/Button.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 9 | -------------------------------------------------------------------------------- /tests/e2e/single-export-default-only/component/index.js: -------------------------------------------------------------------------------- 1 | export { default } from "./Button.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/single-export-default-only/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "single-component", 3 | "version": "0.0.1", 4 | "private": true, 5 | "svelte": "./component/index.js", 6 | "module": "./lib/index.mjs", 7 | "types": "./types/index.d.ts", 8 | "scripts": { 9 | "sveld": "node ../../cli", 10 | "svelte-check": "svelte-check --workspace test", 11 | "build": "rollup -c" 12 | }, 13 | "devDependencies": { 14 | "@rollup/plugin-node-resolve": "^10.0.0", 15 | "@tsconfig/svelte": "^1.0.10", 16 | "rollup": "^2.32.1", 17 | "rollup-plugin-svelte": "^6.1.1", 18 | "svelte": "^3.31.0", 19 | "svelte-check": "^1.1.17", 20 | "typescript": "^4.0.5" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/e2e/single-export-default-only/rollup.config.js: -------------------------------------------------------------------------------- 1 | import pkg from "./package.json"; 2 | import svelte from "rollup-plugin-svelte"; 3 | import resolve from "@rollup/plugin-node-resolve"; 4 | import sveld from "sveld"; 5 | 6 | const production = !process.env.ROLLUP_WATCH; 7 | 8 | export default { 9 | input: pkg.svelte, 10 | output: { format: "es", file: pkg.module }, 11 | plugins: [ 12 | svelte(), 13 | resolve(), 14 | production && 15 | sveld({ 16 | markdown: true, 17 | markdownOptions: { 18 | onAppend: (type, document, components) => { 19 | if (type === "h1") 20 | document.append("quote", `${components.size} component exported from ${pkg.name}@${pkg.version}.`); 21 | }, 22 | }, 23 | json: true, 24 | }), 25 | ], 26 | }; 27 | -------------------------------------------------------------------------------- /tests/e2e/single-export-default-only/test/test.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 14 | 15 | { 19 | console.log(e); 20 | }} 21 | > 22 | Text 23 | 24 | -------------------------------------------------------------------------------- /tests/e2e/single-export-default-only/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/svelte", 3 | } -------------------------------------------------------------------------------- /tests/e2e/single-export-default-only/types/Button.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["button"]; 5 | 6 | type $Props = { 7 | /** 8 | * @default "button" 9 | */ 10 | type?: string; 11 | 12 | /** 13 | * @default false 14 | */ 15 | primary?: boolean; 16 | 17 | [key: `data-${string}`]: any; 18 | }; 19 | 20 | export type ButtonProps = Omit<$RestProps, keyof $Props> & $Props; 21 | 22 | export default class Button extends SvelteComponentTyped< 23 | ButtonProps, 24 | { click: WindowEventMap["click"] }, 25 | { default: {} } 26 | > {} 27 | -------------------------------------------------------------------------------- /tests/e2e/single-export-default-only/types/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default } from "./Button.svelte"; 2 | -------------------------------------------------------------------------------- /tests/e2e/single-export/.gitignore: -------------------------------------------------------------------------------- 1 | /lib 2 | /node_modules -------------------------------------------------------------------------------- /tests/e2e/single-export/component/Button.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 9 | -------------------------------------------------------------------------------- /tests/e2e/single-export/component/index.js: -------------------------------------------------------------------------------- 1 | import Button from "./Button.svelte"; 2 | 3 | export { Button }; 4 | export default Button; 5 | -------------------------------------------------------------------------------- /tests/e2e/single-export/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "single-component", 3 | "version": "0.0.1", 4 | "private": true, 5 | "svelte": "./component/index.js", 6 | "module": "./lib/index.mjs", 7 | "types": "./types/index.d.ts", 8 | "scripts": { 9 | "sveld": "node ../../cli", 10 | "svelte-check": "svelte-check --workspace test", 11 | "build": "rollup -c" 12 | }, 13 | "devDependencies": { 14 | "@rollup/plugin-node-resolve": "^10.0.0", 15 | "@tsconfig/svelte": "^1.0.10", 16 | "rollup": "^2.32.1", 17 | "rollup-plugin-svelte": "^6.1.1", 18 | "svelte": "^3.31.0", 19 | "svelte-check": "^1.1.17", 20 | "typescript": "^4.0.5" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/e2e/single-export/rollup.config.js: -------------------------------------------------------------------------------- 1 | import pkg from "./package.json"; 2 | import svelte from "rollup-plugin-svelte"; 3 | import resolve from "@rollup/plugin-node-resolve"; 4 | import sveld from "sveld"; 5 | 6 | const production = !process.env.ROLLUP_WATCH; 7 | 8 | export default { 9 | input: pkg.svelte, 10 | output: { format: "es", file: pkg.module }, 11 | plugins: [ 12 | svelte(), 13 | resolve(), 14 | production && 15 | sveld({ 16 | markdown: true, 17 | markdownOptions: { 18 | onAppend: (type, document, components) => { 19 | if (type === "h1") 20 | document.append("quote", `${components.size} component exported from ${pkg.name}@${pkg.version}.`); 21 | }, 22 | }, 23 | json: true, 24 | }), 25 | ], 26 | }; 27 | -------------------------------------------------------------------------------- /tests/e2e/single-export/test/test.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 14 | 15 | { 19 | console.log(e); 20 | }} 21 | > 22 | Text 23 | 24 | -------------------------------------------------------------------------------- /tests/e2e/single-export/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/svelte", 3 | } -------------------------------------------------------------------------------- /tests/e2e/single-export/types/Button.svelte.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["button"]; 5 | 6 | type $Props = { 7 | /** 8 | * @default "button" 9 | */ 10 | type?: string; 11 | 12 | /** 13 | * @default false 14 | */ 15 | primary?: boolean; 16 | 17 | [key: `data-${string}`]: any; 18 | }; 19 | 20 | export type ButtonProps = Omit<$RestProps, keyof $Props> & $Props; 21 | 22 | export default class Button extends SvelteComponentTyped< 23 | ButtonProps, 24 | { click: WindowEventMap["click"] }, 25 | { default: {} } 26 | > {} 27 | -------------------------------------------------------------------------------- /tests/e2e/single-export/types/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as Button } from "./Button.svelte"; 2 | export { default } from "./Button.svelte"; 3 | -------------------------------------------------------------------------------- /tests/element-tag-map.test.ts: -------------------------------------------------------------------------------- 1 | import { getElementByTag } from "../src/element-tag-map"; 2 | 3 | test("getElementByTag", () => { 4 | expect(getElementByTag("")).toEqual("HTMLElement"); 5 | expect(getElementByTag("div")).toEqual("HTMLDivElement"); 6 | expect(getElementByTag("body")).toEqual("HTMLBodyElement"); 7 | }); 8 | -------------------------------------------------------------------------------- /tests/fixtures/anchor-props/input.svelte: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/fixtures/anchor-props/output.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | import type { SvelteHTMLElements } from "svelte/elements"; 3 | 4 | type $RestProps = SvelteHTMLElements["a"]; 5 | 6 | type $Props = { 7 | [key: `data-${string}`]: any; 8 | }; 9 | 10 | export type AnchorPropsProps = Omit<$RestProps, keyof $Props> & $Props; 11 | 12 | export default class AnchorProps extends SvelteComponentTyped, { default: {} }> {} 13 | -------------------------------------------------------------------------------- /tests/fixtures/anchor-props/output.json: -------------------------------------------------------------------------------- 1 | { 2 | "props": [], 3 | "moduleExports": [], 4 | "slots": [ 5 | { 6 | "name": "__default__", 7 | "default": true, 8 | "slot_props": "{}" 9 | } 10 | ], 11 | "events": [], 12 | "typedefs": [], 13 | "generics": null, 14 | "rest_props": { 15 | "type": "Element", 16 | "name": "a" 17 | } 18 | } -------------------------------------------------------------------------------- /tests/fixtures/bind-this-multiple/input.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | {#if propBool} 8 | 9 | {:else} 10 |

    11 | 12 |

    13 | {/if} 14 | 15 |
    16 | -------------------------------------------------------------------------------- /tests/fixtures/bind-this-multiple/output.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type BindThisMultipleProps = { 4 | /** 5 | * @default undefined 6 | */ 7 | ref: null | HTMLButtonElement | HTMLHeadingElement; 8 | 9 | /** 10 | * @default undefined 11 | */ 12 | ref2: null | HTMLDivElement; 13 | 14 | /** 15 | * @default false 16 | */ 17 | propBool?: boolean; 18 | }; 19 | 20 | export default class BindThisMultiple extends SvelteComponentTyped< 21 | BindThisMultipleProps, 22 | Record, 23 | { default: {} } 24 | > {} 25 | -------------------------------------------------------------------------------- /tests/fixtures/bind-this/input.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/fixtures/bind-this/output.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type BindThisProps = { 4 | /** 5 | * @default undefined 6 | */ 7 | ref: null | HTMLButtonElement; 8 | }; 9 | 10 | export default class BindThis extends SvelteComponentTyped, { default: {} }> {} 11 | -------------------------------------------------------------------------------- /tests/fixtures/bind-this/output.json: -------------------------------------------------------------------------------- 1 | { 2 | "props": [ 3 | { 4 | "name": "ref", 5 | "kind": "let", 6 | "type": "null | HTMLButtonElement", 7 | "isFunction": false, 8 | "isFunctionDeclaration": false, 9 | "isRequired": true, 10 | "constant": false, 11 | "reactive": true 12 | } 13 | ], 14 | "moduleExports": [], 15 | "slots": [ 16 | { 17 | "name": "__default__", 18 | "default": true, 19 | "slot_props": "{}" 20 | } 21 | ], 22 | "events": [], 23 | "typedefs": [], 24 | "generics": null 25 | } -------------------------------------------------------------------------------- /tests/fixtures/component-comment-multi/input.svelte: -------------------------------------------------------------------------------- 1 | 7 |
    8 | -------------------------------------------------------------------------------- /tests/fixtures/component-comment-multi/output.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type ComponentCommentMultiProps = {}; 4 | 5 | /** 6 | * @example 7 | *
    8 | * Component comment 9 | *
    10 | */ 11 | export default class ComponentCommentMulti extends SvelteComponentTyped< 12 | ComponentCommentMultiProps, 13 | Record, 14 | { default: {} } 15 | > {} 16 | -------------------------------------------------------------------------------- /tests/fixtures/component-comment-multi/output.json: -------------------------------------------------------------------------------- 1 | { 2 | "props": [], 3 | "moduleExports": [], 4 | "slots": [ 5 | { 6 | "name": "__default__", 7 | "default": true, 8 | "slot_props": "{}" 9 | } 10 | ], 11 | "events": [], 12 | "typedefs": [], 13 | "generics": null, 14 | "componentComment": "\n@example\n
    \n Component comment\n
    " 15 | } -------------------------------------------------------------------------------- /tests/fixtures/component-comment-single/input.svelte: -------------------------------------------------------------------------------- 1 | 2 |
    3 | -------------------------------------------------------------------------------- /tests/fixtures/component-comment-single/output.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type ComponentCommentSingleProps = {}; 4 | 5 | /** Component comment */ 6 | export default class ComponentCommentSingle extends SvelteComponentTyped< 7 | ComponentCommentSingleProps, 8 | Record, 9 | { default: {} } 10 | > {} 11 | -------------------------------------------------------------------------------- /tests/fixtures/component-comment-single/output.json: -------------------------------------------------------------------------------- 1 | { 2 | "props": [], 3 | "moduleExports": [], 4 | "slots": [ 5 | { 6 | "name": "__default__", 7 | "default": true, 8 | "slot_props": "{}" 9 | } 10 | ], 11 | "events": [], 12 | "typedefs": [], 13 | "generics": null, 14 | "componentComment": " Component comment" 15 | } -------------------------------------------------------------------------------- /tests/fixtures/context-module/input.svelte: -------------------------------------------------------------------------------- 1 | 31 | 32 | 35 | -------------------------------------------------------------------------------- /tests/fixtures/context-module/output.d.ts: -------------------------------------------------------------------------------- 1 | import type { SvelteComponentTyped } from "svelte"; 2 | 3 | export type bool = string; 4 | 5 | export type a = { b: 4 }; 6 | 7 | /** 8 | * Description for e 9 | */ 10 | export type e = { [key: string]: any }; 11 | 12 | /** 13 | * Log something 14 | */ 15 | export declare function log(message: string): void; 16 | 17 | export declare function b(): {}; 18 | 19 | export declare function b2(): () => {}; 20 | 21 | export declare function b3(): () => false; 22 | 23 | export type ContextModuleProps = {}; 24 | 25 | export default class ContextModule extends SvelteComponentTyped, {}> { 26 | a: string; 27 | } 28 | -------------------------------------------------------------------------------- /tests/fixtures/context-module/types.ts: -------------------------------------------------------------------------------- 1 | import { a, e, log, b2, b3 } from "./output"; 2 | 3 | log(""); 4 | 5 | b2()(); 6 | 7 | const function_b3: typeof b3 = () => () => false; 8 | 9 | const result = b3()(); 10 | 11 | const a: typeof log = () => {}; 12 | 13 | // @ts-expect-error 14 | a(4); 15 | 16 | a(4 + ""); 17 | 18 | const e_value: e = {}; 19 | -------------------------------------------------------------------------------- /tests/fixtures/dispatched-events-dynamic/input.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 |