@splendidlabz/svelte 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -2
- package/components/Disclosure/PopoverNew/PopoverTrigger.svelte +1 -1
- package/components/Disclosure/PopoverNew/floating.js +2 -2
- package/components/FancyList/FancyList.svelte +54 -29
- package/components/Form/ButtonGroup.svelte +65 -0
- package/components/Form/Checkbox.svelte +7 -7
- package/{dist/components/Form/Select.svelte → components/Form/CustomSelect.svelte} +65 -35
- package/components/Form/Form.svelte +35 -18
- package/components/Form/Honeypot.svelte +34 -0
- package/components/Form/Radios.svelte +2 -2
- package/components/Form/Select.svelte +50 -35
- package/components/Form/Textarea.svelte +0 -5
- package/components/Form/index.js +3 -0
- package/components/Link/Link.svelte +15 -0
- package/components/Link/index.js +1 -0
- package/index.js +1 -0
- package/package.json +6 -5
- package/utils/accessibility.js +6 -0
- package/utils/index.js +2 -0
- package/utils/map-store.svelte.js +71 -0
- package/components/Form/SelectOld2.svelte +0 -127
- package/dist/actions/breakpoint-observer.d.ts +0 -3
- package/dist/actions/breakpoint-observer.js +0 -71
- package/dist/actions/index.d.ts +0 -5
- package/dist/actions/index.js +0 -5
- package/dist/actions/portal.d.ts +0 -3
- package/dist/actions/portal.js +0 -20
- package/dist/actions/resize-observer.d.ts +0 -7
- package/dist/actions/resize-observer.js +0 -43
- package/dist/actions/scroll-observer.d.ts +0 -8
- package/dist/actions/scroll-observer.js +0 -47
- package/dist/actions/sync.svelte.d.ts +0 -5
- package/dist/actions/sync.svelte.js +0 -21
- package/dist/actions/use-actions.d.ts +0 -4
- package/dist/actions/use-actions.js +0 -27
- package/dist/actions/use-transition.d.ts +0 -4
- package/dist/actions/use-transition.js +0 -32
- package/dist/common.d.ts +0 -17
- package/dist/common.js +0 -21
- package/dist/components/Accordion/Accordion.svelte +0 -111
- package/dist/components/Accordion/Accordion.svelte.d.ts +0 -23
- package/dist/components/Accordion/index.d.ts +0 -2
- package/dist/components/Accordion/index.js +0 -3
- package/dist/components/Breadcrumbs/Breadcrumbs.svelte +0 -92
- package/dist/components/Breadcrumbs/Breadcrumbs.svelte.d.ts +0 -23
- package/dist/components/Breadcrumbs/Crumb.svelte +0 -51
- package/dist/components/Breadcrumbs/Crumb.svelte.d.ts +0 -23
- package/dist/components/Breadcrumbs/CrumbCustom.svelte +0 -18
- package/dist/components/Breadcrumbs/CrumbCustom.svelte.d.ts +0 -23
- package/dist/components/Breadcrumbs/index.d.ts +0 -4
- package/dist/components/Breadcrumbs/index.js +0 -5
- package/dist/components/BrowserFrame/BrowserFrame.svelte +0 -101
- package/dist/components/BrowserFrame/BrowserFrame.svelte.d.ts +0 -23
- package/dist/components/BrowserFrame/BrowserWithTabs.svelte +0 -37
- package/dist/components/BrowserFrame/BrowserWithTabs.svelte.d.ts +0 -41
- package/dist/components/BrowserFrame/index.d.ts +0 -3
- package/dist/components/BrowserFrame/index.js +0 -3
- package/dist/components/CQChecker/CQChecker.astro +0 -20
- package/dist/components/CQChecker/CQChecker.svelte +0 -89
- package/dist/components/CQChecker/CQChecker.svelte.d.ts +0 -35
- package/dist/components/Callout/Callout.svelte +0 -17
- package/dist/components/Callout/Callout.svelte.d.ts +0 -29
- package/dist/components/Callout/index.d.ts +0 -2
- package/dist/components/Callout/index.js +0 -3
- package/dist/components/Codepen/Codepen.astro +0 -29
- package/dist/components/Codepen/Codepen.svelte +0 -24
- package/dist/components/Codepen/Codepen.svelte.d.ts +0 -35
- package/dist/components/Codepen/index.d.ts +0 -2
- package/dist/components/Codepen/index.js +0 -3
- package/dist/components/ContentList/ContentList-old.svelte +0 -117
- package/dist/components/ContentList/ContentList-old.svelte.d.ts +0 -31
- package/dist/components/ContentList/ContentList.svelte +0 -68
- package/dist/components/ContentList/ContentList.svelte.d.ts +0 -45
- package/dist/components/ContentList/index.d.ts +0 -2
- package/dist/components/ContentList/index.js +0 -3
- package/dist/components/Copyright.svelte +0 -19
- package/dist/components/Copyright.svelte.d.ts +0 -23
- package/dist/components/Disclosure/Disclosure/DisclosureCloseButton.svelte +0 -37
- package/dist/components/Disclosure/Disclosure/DisclosureCloseButton.svelte.d.ts +0 -23
- package/dist/components/Disclosure/Disclosure/DisclosureContent.svelte +0 -97
- package/dist/components/Disclosure/Disclosure/DisclosureContent.svelte.d.ts +0 -23
- package/dist/components/Disclosure/Disclosure/DisclosureTrigger.svelte +0 -51
- package/dist/components/Disclosure/Disclosure/DisclosureTrigger.svelte.d.ts +0 -23
- package/dist/components/Disclosure/Disclosure/disclosure-popover.svelte.d.ts +0 -2
- package/dist/components/Disclosure/Disclosure/disclosure-popover.svelte.js +0 -7
- package/dist/components/Disclosure/Disclosure/disclosure.svelte.d.ts +0 -81
- package/dist/components/Disclosure/Disclosure/disclosure.svelte.js +0 -461
- package/dist/components/Disclosure/Disclosure/index.d.ts +0 -3
- package/dist/components/Disclosure/Disclosure/index.js +0 -4
- package/dist/components/Disclosure/DisclosureNew/DisclosureCloseButton.svelte +0 -38
- package/dist/components/Disclosure/DisclosureNew/DisclosureCloseButton.svelte.d.ts +0 -23
- package/dist/components/Disclosure/DisclosureNew/DisclosureContent.svelte +0 -53
- package/dist/components/Disclosure/DisclosureNew/DisclosureContent.svelte.d.ts +0 -23
- package/dist/components/Disclosure/DisclosureNew/DisclosureTrigger.svelte +0 -79
- package/dist/components/Disclosure/DisclosureNew/DisclosureTrigger.svelte.d.ts +0 -23
- package/dist/components/Disclosure/DisclosureNew/disclosures.svelte.d.ts +0 -3
- package/dist/components/Disclosure/DisclosureNew/disclosures.svelte.js +0 -55
- package/dist/components/Disclosure/DisclosureNew/index.d.ts +0 -4
- package/dist/components/Disclosure/DisclosureNew/index.js +0 -5
- package/dist/components/Disclosure/Drawer/Drawer.svelte +0 -31
- package/dist/components/Disclosure/Drawer/Drawer.svelte.d.ts +0 -23
- package/dist/components/Disclosure/Drawer/DrawerCloseButton.svelte +0 -37
- package/dist/components/Disclosure/Drawer/DrawerCloseButton.svelte.d.ts +0 -23
- package/dist/components/Disclosure/Drawer/DrawerContent.svelte +0 -92
- package/dist/components/Disclosure/Drawer/DrawerContent.svelte.d.ts +0 -23
- package/dist/components/Disclosure/Drawer/DrawerNew.svelte +0 -0
- package/dist/components/Disclosure/Drawer/DrawerNew.svelte.d.ts +0 -23
- package/dist/components/Disclosure/Drawer/DrawerTrigger.svelte +0 -11
- package/dist/components/Disclosure/Drawer/DrawerTrigger.svelte.d.ts +0 -23
- package/dist/components/Disclosure/Drawer/drawer.d.ts +0 -35
- package/dist/components/Disclosure/Drawer/drawer.js +0 -44
- package/dist/components/Disclosure/Drawer/index.d.ts +0 -5
- package/dist/components/Disclosure/Drawer/index.js +0 -6
- package/dist/components/Disclosure/DrawerNew/Drawer.svelte +0 -43
- package/dist/components/Disclosure/DrawerNew/Drawer.svelte.d.ts +0 -23
- package/dist/components/Disclosure/DrawerNew/DrawerClose.svelte +0 -17
- package/dist/components/Disclosure/DrawerNew/DrawerClose.svelte.d.ts +0 -23
- package/dist/components/Disclosure/DrawerNew/DrawerTrigger.svelte +0 -15
- package/dist/components/Disclosure/DrawerNew/DrawerTrigger.svelte.d.ts +0 -23
- package/dist/components/Disclosure/DrawerNew/drawer.d.ts +0 -35
- package/dist/components/Disclosure/DrawerNew/drawer.js +0 -44
- package/dist/components/Disclosure/DrawerNew/index.d.ts +0 -4
- package/dist/components/Disclosure/DrawerNew/index.js +0 -5
- package/dist/components/Disclosure/Dropdown/DropdownContent.svelte +0 -15
- package/dist/components/Disclosure/Dropdown/DropdownContent.svelte.d.ts +0 -29
- package/dist/components/Disclosure/Dropdown/DropdownTrigger.svelte +0 -14
- package/dist/components/Disclosure/Dropdown/DropdownTrigger.svelte.d.ts +0 -31
- package/dist/components/Disclosure/Dropdown/dropdown.d.ts +0 -4
- package/dist/components/Disclosure/Dropdown/dropdown.js +0 -4
- package/dist/components/Disclosure/Dropdown/index.d.ts +0 -3
- package/dist/components/Disclosure/Dropdown/index.js +0 -4
- package/dist/components/Disclosure/Modal/Modal.svelte +0 -30
- package/dist/components/Disclosure/Modal/Modal.svelte.d.ts +0 -23
- package/dist/components/Disclosure/Modal/ModalCloseButton.svelte +0 -7
- package/dist/components/Disclosure/Modal/ModalCloseButton.svelte.d.ts +0 -23
- package/dist/components/Disclosure/Modal/ModalContent.svelte +0 -42
- package/dist/components/Disclosure/Modal/ModalContent.svelte.d.ts +0 -23
- package/dist/components/Disclosure/Modal/ModalTrigger.svelte +0 -11
- package/dist/components/Disclosure/Modal/ModalTrigger.svelte.d.ts +0 -23
- package/dist/components/Disclosure/Modal/exit-intent.d.ts +0 -3
- package/dist/components/Disclosure/Modal/exit-intent.js +0 -17
- package/dist/components/Disclosure/Modal/index.d.ts +0 -4
- package/dist/components/Disclosure/Modal/index.js +0 -5
- package/dist/components/Disclosure/Modal/modal.d.ts +0 -4
- package/dist/components/Disclosure/Modal/modal.js +0 -4
- package/dist/components/Disclosure/ModalNew/Modal.svelte +0 -116
- package/dist/components/Disclosure/ModalNew/Modal.svelte.d.ts +0 -23
- package/dist/components/Disclosure/ModalNew/ModalClose.svelte +0 -42
- package/dist/components/Disclosure/ModalNew/ModalClose.svelte.d.ts +0 -23
- package/dist/components/Disclosure/ModalNew/ModalTrigger.svelte +0 -68
- package/dist/components/Disclosure/ModalNew/ModalTrigger.svelte.d.ts +0 -23
- package/dist/components/Disclosure/ModalNew/index.d.ts +0 -4
- package/dist/components/Disclosure/ModalNew/index.js +0 -5
- package/dist/components/Disclosure/Popover/PopoverCloseButton.svelte +0 -29
- package/dist/components/Disclosure/Popover/PopoverCloseButton.svelte.d.ts +0 -35
- package/dist/components/Disclosure/Popover/PopoverContent.svelte +0 -107
- package/dist/components/Disclosure/Popover/PopoverContent.svelte.d.ts +0 -47
- package/dist/components/Disclosure/Popover/PopoverTrigger.svelte +0 -33
- package/dist/components/Disclosure/Popover/PopoverTrigger.svelte.d.ts +0 -41
- package/dist/components/Disclosure/Popover/floating.d.ts +0 -11
- package/dist/components/Disclosure/Popover/floating.js +0 -171
- package/dist/components/Disclosure/Popover/index.d.ts +0 -4
- package/dist/components/Disclosure/Popover/index.js +0 -5
- package/dist/components/Disclosure/Popover/popover.d.ts +0 -16
- package/dist/components/Disclosure/Popover/popover.js +0 -18
- package/dist/components/Disclosure/Popover/references/FollowTheMouse.svelte +0 -45
- package/dist/components/Disclosure/Popover/references/FollowTheMouse.svelte.d.ts +0 -14
- package/dist/components/Disclosure/PopoverNew/Popover.svelte +0 -119
- package/dist/components/Disclosure/PopoverNew/Popover.svelte.d.ts +0 -23
- package/dist/components/Disclosure/PopoverNew/PopoverClose.svelte +0 -38
- package/dist/components/Disclosure/PopoverNew/PopoverClose.svelte.d.ts +0 -23
- package/dist/components/Disclosure/PopoverNew/PopoverTrigger.svelte +0 -67
- package/dist/components/Disclosure/PopoverNew/PopoverTrigger.svelte.d.ts +0 -23
- package/dist/components/Disclosure/PopoverNew/floating.d.ts +0 -15
- package/dist/components/Disclosure/PopoverNew/floating.js +0 -329
- package/dist/components/Disclosure/PopoverNew/index.d.ts +0 -4
- package/dist/components/Disclosure/PopoverNew/index.js +0 -5
- package/dist/components/Disclosure/Tooltip/Tooltip.svelte +0 -14
- package/dist/components/Disclosure/Tooltip/Tooltip.svelte.d.ts +0 -23
- package/dist/components/Disclosure/Tooltip/TooltipContent.svelte +0 -7
- package/dist/components/Disclosure/Tooltip/TooltipContent.svelte.d.ts +0 -23
- package/dist/components/Disclosure/Tooltip/TooltipTrigger.svelte +0 -33
- package/dist/components/Disclosure/Tooltip/TooltipTrigger.svelte.d.ts +0 -35
- package/dist/components/Disclosure/Tooltip/index.d.ts +0 -4
- package/dist/components/Disclosure/Tooltip/index.js +0 -5
- package/dist/components/Disclosure/Tooltip/tooltip.d.ts +0 -19
- package/dist/components/Disclosure/Tooltip/tooltip.js +0 -22
- package/dist/components/Disclosure/disclosure-store.d.ts +0 -21
- package/dist/components/Disclosure/disclosure-store.js +0 -48
- package/dist/components/Disclosure/disclosure.d.ts +0 -81
- package/dist/components/Disclosure/disclosure.js +0 -439
- package/dist/components/Disclosure/disclosure.svelte.d.ts +0 -83
- package/dist/components/Disclosure/disclosure.svelte.js +0 -432
- package/dist/components/Disclosure/index.d.ts +0 -3
- package/dist/components/Disclosure/index.js +0 -7
- package/dist/components/Disclosure/shared.d.ts +0 -2
- package/dist/components/Disclosure/shared.js +0 -9
- package/dist/components/Disclosure/state.svelte.d.ts +0 -0
- package/dist/components/Disclosure/state.svelte.js +0 -138
- package/dist/components/FancyList/FancyList.svelte +0 -49
- package/dist/components/FancyList/FancyList.svelte.d.ts +0 -42
- package/dist/components/FancyList/index.d.ts +0 -2
- package/dist/components/FancyList/index.js +0 -3
- package/dist/components/Form/Button.svelte +0 -24
- package/dist/components/Form/Button.svelte.d.ts +0 -35
- package/dist/components/Form/Checkbox.svelte +0 -95
- package/dist/components/Form/Checkbox.svelte.d.ts +0 -23
- package/dist/components/Form/Checkboxes.svelte +0 -66
- package/dist/components/Form/Checkboxes.svelte.d.ts +0 -23
- package/dist/components/Form/Combobox/AutocompleteInput.svelte +0 -63
- package/dist/components/Form/Combobox/AutocompleteInput.svelte.d.ts +0 -31
- package/dist/components/Form/Combobox/AutocompleteOptions.svelte +0 -74
- package/dist/components/Form/Combobox/AutocompleteOptions.svelte.d.ts +0 -35
- package/dist/components/Form/Combobox/TimepickerInput.svelte +0 -81
- package/dist/components/Form/Combobox/TimepickerInput.svelte.d.ts +0 -31
- package/dist/components/Form/Combobox/TimepickerOptions.svelte +0 -100
- package/dist/components/Form/Combobox/TimepickerOptions.svelte.d.ts +0 -27
- package/dist/components/Form/Combobox/autocomplete-matching.d.ts +0 -13
- package/dist/components/Form/Combobox/autocomplete-matching.js +0 -114
- package/dist/components/Form/Combobox/autocomplete.d.ts +0 -38
- package/dist/components/Form/Combobox/autocomplete.js +0 -393
- package/dist/components/Form/Combobox/combobox-store.d.ts +0 -24
- package/dist/components/Form/Combobox/combobox-store.js +0 -65
- package/dist/components/Form/Combobox/combobox.d.ts +0 -46
- package/dist/components/Form/Combobox/combobox.js +0 -360
- package/dist/components/Form/Combobox/index.d.ts +0 -5
- package/dist/components/Form/Combobox/index.js +0 -14
- package/dist/components/Form/Combobox/timepicker.d.ts +0 -22
- package/dist/components/Form/Combobox/timepicker.js +0 -119
- package/dist/components/Form/Form.svelte +0 -54
- package/dist/components/Form/Form.svelte.d.ts +0 -23
- package/dist/components/Form/Hidden.svelte +0 -6
- package/dist/components/Form/Hidden.svelte.d.ts +0 -23
- package/dist/components/Form/HiddenInput.svelte +0 -16
- package/dist/components/Form/HiddenInput.svelte.d.ts +0 -31
- package/dist/components/Form/Radio.svelte +0 -86
- package/dist/components/Form/Radio.svelte.d.ts +0 -23
- package/dist/components/Form/Radios.svelte +0 -68
- package/dist/components/Form/Radios.svelte.d.ts +0 -23
- package/dist/components/Form/Select.svelte.d.ts +0 -23
- package/dist/components/Form/SelectOld2.svelte +0 -127
- package/dist/components/Form/SelectOld2.svelte.d.ts +0 -55
- package/dist/components/Form/Switch.svelte +0 -50
- package/dist/components/Form/Switch.svelte.d.ts +0 -39
- package/dist/components/Form/TextInput.svelte +0 -110
- package/dist/components/Form/TextInput.svelte.d.ts +0 -23
- package/dist/components/Form/Textarea.svelte +0 -126
- package/dist/components/Form/Textarea.svelte.d.ts +0 -23
- package/dist/components/Form/check.svg +0 -3
- package/dist/components/Form/index.d.ts +0 -13
- package/dist/components/Form/index.js +0 -13
- package/dist/components/Highlight/Highlight.svelte +0 -27
- package/dist/components/Highlight/Highlight.svelte.d.ts +0 -31
- package/dist/components/Highlight/_Highlight.scss +0 -19
- package/dist/components/Highlight/index.d.ts +0 -2
- package/dist/components/Highlight/index.js +0 -2
- package/dist/components/Highlight.svelte +0 -46
- package/dist/components/Highlight.svelte.d.ts +0 -27
- package/dist/components/Icon/Icon.svelte +0 -44
- package/dist/components/Icon/Icon.svelte.d.ts +0 -27
- package/dist/components/Icon/IconSnippet.svelte +0 -14
- package/dist/components/Icon/IconSnippet.svelte.d.ts +0 -30
- package/dist/components/Icon/index.d.ts +0 -3
- package/dist/components/Icon/index.js +0 -3
- package/dist/components/Image.svelte +0 -24
- package/dist/components/Image.svelte.d.ts +0 -33
- package/dist/components/InteractiveRegion/InteractiveRegion.svelte +0 -47
- package/dist/components/InteractiveRegion/InteractiveRegion.svelte.d.ts +0 -27
- package/dist/components/InteractiveRegion/index.d.ts +0 -2
- package/dist/components/InteractiveRegion/index.js +0 -3
- package/dist/components/List/Lia.svelte +0 -12
- package/dist/components/List/Lia.svelte.d.ts +0 -37
- package/dist/components/List/NestedListItem.svelte +0 -50
- package/dist/components/List/NestedListItem.svelte.d.ts +0 -27
- package/dist/components/List/index.d.ts +0 -3
- package/dist/components/List/index.js +0 -3
- package/dist/components/Markdown/Markdown.svelte +0 -25
- package/dist/components/Markdown/Markdown.svelte.d.ts +0 -28
- package/dist/components/Markdown/MarkdownSnippet.svelte +0 -27
- package/dist/components/Markdown/MarkdownSnippet.svelte.d.ts +0 -29
- package/dist/components/Masonry/Masonry.svelte +0 -79
- package/dist/components/Masonry/Masonry.svelte.d.ts +0 -29
- package/dist/components/Masonry/index.d.ts +0 -2
- package/dist/components/Masonry/index.js +0 -3
- package/dist/components/PerspectiveHover/PerspectiveHover.svelte +0 -10
- package/dist/components/PerspectiveHover/PerspectiveHover.svelte.d.ts +0 -27
- package/dist/components/PerspectiveHover/perspective-hover.d.ts +0 -3
- package/dist/components/PerspectiveHover/perspective-hover.js +0 -46
- package/dist/components/Populate/ConditionalPopulate.svelte +0 -33
- package/dist/components/Populate/ConditionalPopulate.svelte.d.ts +0 -27
- package/dist/components/Populate/Populate.svelte +0 -45
- package/dist/components/Populate/Populate.svelte.d.ts +0 -24
- package/dist/components/Populate/actions.d.ts +0 -2
- package/dist/components/Populate/actions.js +0 -29
- package/dist/components/Populate/get-value.d.ts +0 -5
- package/dist/components/Populate/get-value.js +0 -17
- package/dist/components/Populate/index.d.ts +0 -3
- package/dist/components/Populate/index.js +0 -4
- package/dist/components/Portal.svelte +0 -30
- package/dist/components/Portal.svelte.d.ts +0 -23
- package/dist/components/PushToLocalStorage.svelte +0 -30
- package/dist/components/PushToLocalStorage.svelte.d.ts +0 -23
- package/dist/components/Resizer/Resizer.svelte +0 -38
- package/dist/components/Resizer/Resizer.svelte.d.ts +0 -23
- package/dist/components/Resizer/index.d.ts +0 -2
- package/dist/components/Resizer/index.js +0 -3
- package/dist/components/Resizer/resizer.d.ts +0 -3
- package/dist/components/Resizer/resizer.js +0 -134
- package/dist/components/Scrambler/Scrambler.svelte +0 -20
- package/dist/components/Scrambler/Scrambler.svelte.d.ts +0 -23
- package/dist/components/Scrambler/index.d.ts +0 -2
- package/dist/components/Scrambler/index.js +0 -3
- package/dist/components/Spotlight/PointerPosition.d.ts +0 -3
- package/dist/components/Spotlight/PointerPosition.js +0 -32
- package/dist/components/Spotlight/Spotlight.svelte +0 -9
- package/dist/components/Spotlight/Spotlight.svelte.d.ts +0 -27
- package/dist/components/Status.svelte +0 -27
- package/dist/components/Status.svelte.d.ts +0 -23
- package/dist/components/Switcheroo/Switcheroo.svelte +0 -70
- package/dist/components/Switcheroo/Switcheroo.svelte.d.ts +0 -34
- package/dist/components/Switcheroo/index.d.ts +0 -2
- package/dist/components/Switcheroo/index.js +0 -3
- package/dist/components/Table/RowGroup.svelte +0 -8
- package/dist/components/Table/RowGroup.svelte.d.ts +0 -27
- package/dist/components/Table/Table.svelte +0 -23
- package/dist/components/Table/Table.svelte.d.ts +0 -33
- package/dist/components/Table/Td.svelte +0 -20
- package/dist/components/Table/Td.svelte.d.ts +0 -35
- package/dist/components/Table/Th.svelte +0 -27
- package/dist/components/Table/Th.svelte.d.ts +0 -35
- package/dist/components/Table/Thead.svelte +0 -8
- package/dist/components/Table/Thead.svelte.d.ts +0 -27
- package/dist/components/Table/Tr.svelte +0 -8
- package/dist/components/Table/Tr.svelte.d.ts +0 -29
- package/dist/components/Table/index.d.ts +0 -6
- package/dist/components/Table/index.js +0 -17
- package/dist/components/Table/table.d.ts +0 -2
- package/dist/components/Table/table.js +0 -35
- package/dist/components/Tabs/Tab.svelte +0 -9
- package/dist/components/Tabs/Tab.svelte.d.ts +0 -23
- package/dist/components/Tabs/Tablist.svelte +0 -79
- package/dist/components/Tabs/Tablist.svelte.d.ts +0 -39
- package/dist/components/Tabs/Tabpanel.svelte +0 -9
- package/dist/components/Tabs/Tabpanel.svelte.d.ts +0 -23
- package/dist/components/Tabs/Tabpanels.svelte +0 -11
- package/dist/components/Tabs/Tabpanels.svelte.d.ts +0 -23
- package/dist/components/Tabs/Tabs.svelte +0 -46
- package/dist/components/Tabs/Tabs.svelte.d.ts +0 -23
- package/dist/components/Tabs/index.d.ts +0 -6
- package/dist/components/Tabs/index.js +0 -7
- package/dist/components/Tabs/tab-store.d.ts +0 -21
- package/dist/components/Tabs/tab-store.js +0 -59
- package/dist/components/Tabs/tabs.d.ts +0 -32
- package/dist/components/Tabs/tabs.js +0 -364
- package/dist/components/Textwall/Repeat.svelte +0 -10
- package/dist/components/Textwall/Repeat.svelte.d.ts +0 -29
- package/dist/components/Textwall/Textwall.svelte +0 -29
- package/dist/components/Textwall/Textwall.svelte.d.ts +0 -37
- package/dist/components/Textwall/index.d.ts +0 -3
- package/dist/components/Textwall/index.js +0 -4
- package/dist/components/Typewriter/Typewriter.svelte +0 -70
- package/dist/components/Typewriter/Typewriter.svelte.d.ts +0 -27
- package/dist/components/Typewriter/index.d.ts +0 -2
- package/dist/components/Typewriter/index.js +0 -3
- package/dist/components/Video.svelte +0 -46
- package/dist/components/Video.svelte.d.ts +0 -33
- package/dist/components/Vimeo.svelte +0 -18
- package/dist/components/Vimeo.svelte.d.ts +0 -29
- package/dist/components/Wrapper.svelte +0 -22
- package/dist/components/Wrapper.svelte.d.ts +0 -33
- package/dist/components/Youtube.svelte +0 -15
- package/dist/components/Youtube.svelte.d.ts +0 -25
- package/dist/components/_Shared/Snippet.svelte +0 -10
- package/dist/components/_Shared/Snippet.svelte.d.ts +0 -27
- package/dist/components/effects/index.d.ts +0 -0
- package/dist/components/effects/index.js +0 -0
- package/dist/index.d.ts +0 -34
- package/dist/index.js +0 -41
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/* eslint-env browser */
|
|
2
|
-
|
|
3
|
-
// TODO: Move to Utils/Dom
|
|
4
|
-
/**
|
|
5
|
-
* Scroll Observer
|
|
6
|
-
* @param {Number} threshold Float between 0 to 1. When to fire a threshold event.
|
|
7
|
-
* @param {Number} tolerance Float between 0 to 1. Tolerance for event firing.
|
|
8
|
-
*/
|
|
9
|
-
export function scrollObserver(
|
|
10
|
-
node,
|
|
11
|
-
{
|
|
12
|
-
threshold = 0, // Float between 0 to 1.
|
|
13
|
-
tolerance = 0.1, // Float between 0 to 1. Tolerance for event firing
|
|
14
|
-
} = {},
|
|
15
|
-
) {
|
|
16
|
-
let prevScrollTop = 0
|
|
17
|
-
|
|
18
|
-
function observe(event) {
|
|
19
|
-
const { documentElement } = document
|
|
20
|
-
const scrollTop = documentElement.scrollTop
|
|
21
|
-
const scrollDirection = scrollTop > prevScrollTop ? 'down' : 'up'
|
|
22
|
-
const scrollPercent =
|
|
23
|
-
scrollTop / (documentElement.scrollHeight - documentElement.clientHeight)
|
|
24
|
-
|
|
25
|
-
if (scrollDirection === 'down') {
|
|
26
|
-
node.dispatchEvent(new CustomEvent('scrolldown'))
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (scrollDirection === 'up') {
|
|
30
|
-
node.dispatchEvent(new CustomEvent('scrollUp'))
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (scrollPercent > threshold && scrollPercent < threshold + tolerance) {
|
|
34
|
-
node.dispatchEvent(new CustomEvent(`${scrollDirection}:threshold`))
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
prevScrollTop = scrollTop
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
node.addEventListener('scroll', observe)
|
|
41
|
-
|
|
42
|
-
return {
|
|
43
|
-
destroy() {
|
|
44
|
-
node.removeEventListener('scroll', observe)
|
|
45
|
-
},
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export function getEntry(id: any): any;
|
|
2
|
-
export function setEntry(id: any, value: any): SvelteMap<any, any>;
|
|
3
|
-
export function mergeEntry(id: any, value: any): SvelteMap<any, any>;
|
|
4
|
-
export function removeEntry(id: any): boolean;
|
|
5
|
-
import { SvelteMap } from 'svelte/reactivity';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SvelteMap } from 'svelte/reactivity'
|
|
2
|
-
|
|
3
|
-
const syncStore = new SvelteMap()
|
|
4
|
-
|
|
5
|
-
export function getEntry(id) {
|
|
6
|
-
return syncStore.get(id)
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function setEntry(id, value) {
|
|
10
|
-
return syncStore.set(id, value)
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function mergeEntry(id, value) {
|
|
14
|
-
const entry = getEntry(id)
|
|
15
|
-
if (!entry) return setEntry(id, value)
|
|
16
|
-
return syncStore.set(id, { ...entry, ...value })
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function removeEntry(id) {
|
|
20
|
-
return syncStore.delete(id)
|
|
21
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// Grabbed from https://github.com/radiofrance/svelte-component-actions/tree/main
|
|
2
|
-
export function useActions(node, actions) {
|
|
3
|
-
if (!actions) return
|
|
4
|
-
|
|
5
|
-
const actionReturns = actions.map(actionEntry => {
|
|
6
|
-
const { fn, props } = actionEntry
|
|
7
|
-
return fn(node, props)
|
|
8
|
-
})
|
|
9
|
-
|
|
10
|
-
return {
|
|
11
|
-
update(newActions) {
|
|
12
|
-
if (!newActions || newActions.length !== actionReturns.length) {
|
|
13
|
-
throw new Error('You must not change the length of an actions array.')
|
|
14
|
-
}
|
|
15
|
-
newActions.forEach((actionEntry, i) => {
|
|
16
|
-
const returnEntry = actionReturns[i]
|
|
17
|
-
const { props } = actionEntry
|
|
18
|
-
returnEntry?.update?.(props)
|
|
19
|
-
})
|
|
20
|
-
},
|
|
21
|
-
destroy() {
|
|
22
|
-
actionReturns.forEach(returnEntry => {
|
|
23
|
-
returnEntry?.destroy?.()
|
|
24
|
-
})
|
|
25
|
-
},
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// Grabbed from https://github.com/radiofrance/svelte-component-actions/tree/main
|
|
2
|
-
// TODO: Add transition action
|
|
3
|
-
export function useActions(node, actions) {
|
|
4
|
-
if (!actions) return
|
|
5
|
-
|
|
6
|
-
const actionReturns = actions.map(actionEntry => {
|
|
7
|
-
const [action, params] = Array.isArray(actionEntry)
|
|
8
|
-
? actionEntry
|
|
9
|
-
: [actionEntry]
|
|
10
|
-
return action(node, params)
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
return {
|
|
14
|
-
update(newActions) {
|
|
15
|
-
if (!newActions || newActions.length !== actionReturns.length) {
|
|
16
|
-
throw new Error('You must not change the length of an actions array.')
|
|
17
|
-
}
|
|
18
|
-
newActions.forEach((actionEntry, i) => {
|
|
19
|
-
const returnEntry = actionReturns[i]
|
|
20
|
-
const [, params] = Array.isArray(actionEntry)
|
|
21
|
-
? actionEntry
|
|
22
|
-
: [actionEntry]
|
|
23
|
-
returnEntry?.update?.(params)
|
|
24
|
-
})
|
|
25
|
-
},
|
|
26
|
-
destroy() {
|
|
27
|
-
actionReturns.forEach(returnEntry => {
|
|
28
|
-
returnEntry?.destroy?.()
|
|
29
|
-
})
|
|
30
|
-
},
|
|
31
|
-
}
|
|
32
|
-
}
|
package/dist/common.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export namespace components {
|
|
2
|
-
export { Callout };
|
|
3
|
-
export { Codepen };
|
|
4
|
-
export { FancyList };
|
|
5
|
-
export { Image };
|
|
6
|
-
export { SVG };
|
|
7
|
-
export { Video };
|
|
8
|
-
export { Vimeo };
|
|
9
|
-
export { Youtube };
|
|
10
|
-
}
|
|
11
|
-
import { Callout } from './components/Callout';
|
|
12
|
-
import { Codepen } from './components/Codepen';
|
|
13
|
-
import FancyList from './components/FancyList/FancyList.svelte';
|
|
14
|
-
import Image from './components/Image.svelte';
|
|
15
|
-
import Video from './components/Video.svelte';
|
|
16
|
-
import Vimeo from './components/Vimeo.svelte';
|
|
17
|
-
import Youtube from './components/Youtube.svelte';
|
package/dist/common.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// Common components we use in Svelte
|
|
2
|
-
// We include each component individually to reduce bundle size
|
|
3
|
-
import { Callout } from './components/Callout'
|
|
4
|
-
import { Codepen } from './components/Codepen'
|
|
5
|
-
import FancyList from './components/FancyList/FancyList.svelte'
|
|
6
|
-
import Image from './components/Image.svelte'
|
|
7
|
-
import SVG from './components/Icon/Icon.sveltee'
|
|
8
|
-
import Video from './components/Video.svelte'
|
|
9
|
-
import Vimeo from './components/Vimeo.svelte'
|
|
10
|
-
import Youtube from './components/Youtube.svelte'
|
|
11
|
-
|
|
12
|
-
export const components = {
|
|
13
|
-
Callout,
|
|
14
|
-
Codepen,
|
|
15
|
-
FancyList,
|
|
16
|
-
Image,
|
|
17
|
-
SVG,
|
|
18
|
-
Video,
|
|
19
|
-
Vimeo,
|
|
20
|
-
Youtube,
|
|
21
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { randomString } from '@splendidlabz/utils/dom'
|
|
3
|
-
import { applyTransition, mergeOpts } from '../../utils/index.js'
|
|
4
|
-
import { reloadScripts } from '../../utils/loadscripts.js'
|
|
5
|
-
import { IconSnippet } from '../Icon/IconSnippet.svelte'
|
|
6
|
-
import { MarkdownSnippet } from '../Markdown/MarkdownSnippet.svelte'
|
|
7
|
-
const p = $props()
|
|
8
|
-
const DEFAULT_OPTIONS = {
|
|
9
|
-
titleTag: 'h3',
|
|
10
|
-
icon: 'tabler:chevron-right',
|
|
11
|
-
iconPosition: 'end',
|
|
12
|
-
transition: 'slide',
|
|
13
|
-
}
|
|
14
|
-
const opts = mergeOpts(DEFAULT_OPTIONS, p)
|
|
15
|
-
|
|
16
|
-
// Classes
|
|
17
|
-
const {
|
|
18
|
-
id = randomString(9),
|
|
19
|
-
class: klass,
|
|
20
|
-
titleClass,
|
|
21
|
-
contentClass,
|
|
22
|
-
buttonClass,
|
|
23
|
-
icon,
|
|
24
|
-
iconClass,
|
|
25
|
-
useMarkdown = true,
|
|
26
|
-
} = opts
|
|
27
|
-
|
|
28
|
-
let show = $state(false)
|
|
29
|
-
const { title, content, children } = opts
|
|
30
|
-
|
|
31
|
-
if (!title) console.warn('Accordion: No title provided')
|
|
32
|
-
if (!content && !children) console.warn('Accordion: No content provided')
|
|
33
|
-
|
|
34
|
-
// ========================================
|
|
35
|
-
// Event Handlers
|
|
36
|
-
// ========================================
|
|
37
|
-
function handleClick(event) {
|
|
38
|
-
// Toggle accordion show
|
|
39
|
-
show = !show
|
|
40
|
-
if (show) closeOtherAccordions(event)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function handleKeydown(event) {
|
|
44
|
-
const { key } = event
|
|
45
|
-
if (key === 'Escape') closeAccordion()
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function closeAccordion() {
|
|
49
|
-
show = false
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// ========================================
|
|
53
|
-
// Helper functions
|
|
54
|
-
// ========================================
|
|
55
|
-
function closeOtherAccordions(event) {
|
|
56
|
-
const container = event.target.closest('.accordions')
|
|
57
|
-
if (!container) return
|
|
58
|
-
const closeButtons = container.querySelectorAll('.accordion-close-button')
|
|
59
|
-
closeButtons.forEach(button => button.click())
|
|
60
|
-
show = true
|
|
61
|
-
}
|
|
62
|
-
</script>
|
|
63
|
-
|
|
64
|
-
<!-- Accordion HTML -->
|
|
65
|
-
<div class="accordion {klass}" class:open={show}>
|
|
66
|
-
<svelte:element this={opts.titleTag} class="accordion-title {titleClass}">
|
|
67
|
-
<button
|
|
68
|
-
class="accordion-button {buttonClass}"
|
|
69
|
-
aria-controls={id}
|
|
70
|
-
aria-expanded={show}
|
|
71
|
-
onclick={handleClick}
|
|
72
|
-
onkeydown={handleKeydown}
|
|
73
|
-
>
|
|
74
|
-
<!-- Icon (if start) -->
|
|
75
|
-
{#if opts.iconPosition === 'start'}
|
|
76
|
-
{@render IconSnippet.block({ icon, iconClass })}
|
|
77
|
-
{/if}
|
|
78
|
-
|
|
79
|
-
<!-- Title -->
|
|
80
|
-
{@render MarkdownSnippet.inline(title, useMarkdown)}
|
|
81
|
-
|
|
82
|
-
<!-- Icon (if end) -->
|
|
83
|
-
{#if opts.iconPosition === 'end'}
|
|
84
|
-
{@render IconSnippet.block({ icon, iconClass })}
|
|
85
|
-
{/if}
|
|
86
|
-
</button>
|
|
87
|
-
</svelte:element>
|
|
88
|
-
|
|
89
|
-
{#if show}
|
|
90
|
-
<div
|
|
91
|
-
{id}
|
|
92
|
-
class="accordion-content {contentClass}"
|
|
93
|
-
use:reloadScripts
|
|
94
|
-
transition:applyTransition={{
|
|
95
|
-
transition: opts.transition,
|
|
96
|
-
}}
|
|
97
|
-
>
|
|
98
|
-
{@render MarkdownSnippet.block(content || children, useMarkdown)}
|
|
99
|
-
</div>
|
|
100
|
-
{/if}
|
|
101
|
-
|
|
102
|
-
<!-- Hidden button for closing multiple accordions. Accessible via JS only -->
|
|
103
|
-
<button
|
|
104
|
-
style="display:none"
|
|
105
|
-
class="accordion-close-button"
|
|
106
|
-
aria-hidden="true"
|
|
107
|
-
hidden
|
|
108
|
-
onclick={closeAccordion}
|
|
109
|
-
tabindex="-1"
|
|
110
|
-
></button>
|
|
111
|
-
</div>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} AccordionProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} AccordionEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} AccordionSlots */
|
|
4
|
-
export default class Accordion extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type AccordionProps = typeof __propDef.props;
|
|
11
|
-
export type AccordionEvents = typeof __propDef.events;
|
|
12
|
-
export type AccordionSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { onMount } from 'svelte'
|
|
3
|
-
import { mergeOpts } from '../../utils'
|
|
4
|
-
import { Snippet } from '../_Shared/Snippet.svelte'
|
|
5
|
-
import Crumb from './Crumb.svelte'
|
|
6
|
-
|
|
7
|
-
const { ...p } = $props()
|
|
8
|
-
|
|
9
|
-
const {
|
|
10
|
-
class: klass = '',
|
|
11
|
-
pathname = '',
|
|
12
|
-
|
|
13
|
-
// Slots
|
|
14
|
-
before,
|
|
15
|
-
after,
|
|
16
|
-
children,
|
|
17
|
-
...rest
|
|
18
|
-
} = p
|
|
19
|
-
|
|
20
|
-
const defaultOptions = {
|
|
21
|
-
crumbs: [],
|
|
22
|
-
labelCase: 'title',
|
|
23
|
-
divider: 'tabler:chevron-right',
|
|
24
|
-
ariaCurrentType: 'page',
|
|
25
|
-
startingDepth: 0,
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const opts = mergeOpts(defaultOptions, rest)
|
|
29
|
-
|
|
30
|
-
const { startingDepth, ariaCurrentType, labelCase } = opts
|
|
31
|
-
const trailingSlash = hasTrailingSlash(pathname)
|
|
32
|
-
let crumbs = $state(constructCrumbs(getURLArray(pathname), { trailingSlash }))
|
|
33
|
-
|
|
34
|
-
onMount(_ => {
|
|
35
|
-
if (typeof window === 'undefined') return
|
|
36
|
-
if (!pathname) {
|
|
37
|
-
const { pathname } = window.location
|
|
38
|
-
const trailingSlash = hasTrailingSlash(pathname)
|
|
39
|
-
crumbs = constructCrumbs(getURLArray(pathname), { trailingSlash })
|
|
40
|
-
}
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
// Supporting functions
|
|
44
|
-
function hasTrailingSlash(pathname) {
|
|
45
|
-
return pathname.endsWith('/')
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function getURLArray(pathname) {
|
|
49
|
-
return pathname
|
|
50
|
-
.split('/')
|
|
51
|
-
.filter(str => str)
|
|
52
|
-
.slice(startingDepth)
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// TODO: Breadcrumbs URL currently return a wrong address.
|
|
56
|
-
// This needs to be fixed before breadcrumbs are usable.
|
|
57
|
-
function constructCrumbs(urlArray, { trailingSlash = true } = {}) {
|
|
58
|
-
return urlArray.map((crumb, index) => {
|
|
59
|
-
return {
|
|
60
|
-
label: crumb,
|
|
61
|
-
labelCase,
|
|
62
|
-
href:
|
|
63
|
-
'/' +
|
|
64
|
-
urlArray.slice(0, index + 1).join('/') +
|
|
65
|
-
(trailingSlash ? '/' : ''),
|
|
66
|
-
isLast: index === urlArray.length - 1,
|
|
67
|
-
ariaCurrentType,
|
|
68
|
-
}
|
|
69
|
-
})
|
|
70
|
-
}
|
|
71
|
-
</script>
|
|
72
|
-
|
|
73
|
-
<nav class={`breadcrumbs ${klass}`} aria-label="Breadcrumbs">
|
|
74
|
-
<ul>
|
|
75
|
-
{#if before}
|
|
76
|
-
{@render before()}
|
|
77
|
-
{/if}
|
|
78
|
-
|
|
79
|
-
{#if children}
|
|
80
|
-
{@render children()}
|
|
81
|
-
{:else}
|
|
82
|
-
{#each crumbs as crumb, index (crumb.href)}
|
|
83
|
-
<Crumb
|
|
84
|
-
{...crumb}
|
|
85
|
-
divider={opts.divider}
|
|
86
|
-
isLast={index === crumbs.length - 1}
|
|
87
|
-
/>
|
|
88
|
-
{/each}
|
|
89
|
-
{/if}
|
|
90
|
-
{@render Snippet.block(after)}
|
|
91
|
-
</ul>
|
|
92
|
-
</nav>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} BreadcrumbsProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} BreadcrumbsEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} BreadcrumbsSlots */
|
|
4
|
-
export default class Breadcrumbs extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type BreadcrumbsProps = typeof __propDef.props;
|
|
11
|
-
export type BreadcrumbsEvents = typeof __propDef.events;
|
|
12
|
-
export type BreadcrumbsSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { toLower, toSentence, toTitle, toUpper } from '@splendidlabz/utils'
|
|
3
|
-
import Icon from '../Icon/Icon.svelte'
|
|
4
|
-
import { Snippet } from '../_Shared/Snippet.svelte'
|
|
5
|
-
|
|
6
|
-
const {
|
|
7
|
-
class: klass = '',
|
|
8
|
-
aClass = null,
|
|
9
|
-
currentClass = null,
|
|
10
|
-
ariaCurrentType = 'page',
|
|
11
|
-
isLast = null,
|
|
12
|
-
divider = 'tabler:chevron-right',
|
|
13
|
-
href = '',
|
|
14
|
-
labelCase = 'title',
|
|
15
|
-
|
|
16
|
-
// Slots
|
|
17
|
-
before,
|
|
18
|
-
|
|
19
|
-
...p
|
|
20
|
-
} = $props()
|
|
21
|
-
|
|
22
|
-
// svelte-ignore non_reactive_update
|
|
23
|
-
let { label, ...rest } = p
|
|
24
|
-
|
|
25
|
-
// Case conversion
|
|
26
|
-
if (labelCase === 'title') label = toTitle(label)
|
|
27
|
-
if (labelCase === 'sentence') label = toSentence(label)
|
|
28
|
-
if (labelCase === 'upper') label = toUpper(label)
|
|
29
|
-
if (labelCase === 'lower') label = toLower(label)
|
|
30
|
-
|
|
31
|
-
// Check aria current type
|
|
32
|
-
if (!['page', 'time', 'step', 'location', 'date'].includes(ariaCurrentType)) {
|
|
33
|
-
console.warn(`Invalid aria-current type: ${ariaCurrentType}`)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const current = isLast && ariaCurrentType
|
|
37
|
-
</script>
|
|
38
|
-
|
|
39
|
-
<!-- Before slots are for custom icons -->
|
|
40
|
-
<li {...rest} class="crumb {klass}">
|
|
41
|
-
{#if isLast}
|
|
42
|
-
{@render Snippet.block(before)}
|
|
43
|
-
<span class={currentClass} aria-current={current}>{label}</span>
|
|
44
|
-
{:else}
|
|
45
|
-
{@render Snippet.block(before)}
|
|
46
|
-
<a class={aClass} {href}>{label}</a>
|
|
47
|
-
<div class="crumb-divider">
|
|
48
|
-
<Icon icon={divider} />
|
|
49
|
-
</div>
|
|
50
|
-
{/if}
|
|
51
|
-
</li>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} CrumbProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} CrumbEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} CrumbSlots */
|
|
4
|
-
export default class Crumb extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type CrumbProps = typeof __propDef.props;
|
|
11
|
-
export type CrumbEvents = typeof __propDef.events;
|
|
12
|
-
export type CrumbSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import Icon from '../Icon/Icon.svelte'
|
|
3
|
-
|
|
4
|
-
const {
|
|
5
|
-
class: klass = '',
|
|
6
|
-
divider = 'tabler:chevron-right',
|
|
7
|
-
children,
|
|
8
|
-
} = $props()
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<li class="crumb {klass}">
|
|
12
|
-
{#if children}
|
|
13
|
-
{@render children()}
|
|
14
|
-
{/if}
|
|
15
|
-
<div class="crumb-divider">
|
|
16
|
-
<Icon icon={divider} />
|
|
17
|
-
</div>
|
|
18
|
-
</li>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} CrumbCustomProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} CrumbCustomEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} CrumbCustomSlots */
|
|
4
|
-
export default class CrumbCustom extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type CrumbCustomProps = typeof __propDef.props;
|
|
11
|
-
export type CrumbCustomEvents = typeof __propDef.events;
|
|
12
|
-
export type CrumbCustomSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { randomString } from '@splendidlabz/utils/dom'
|
|
3
|
-
import { mergeOpts } from '../../utils/merge-opts.js'
|
|
4
|
-
import { Resizer } from '../Resizer/index.js'
|
|
5
|
-
import { Tab, Tablist, Tabpanels } from '../Tabs/index.js'
|
|
6
|
-
|
|
7
|
-
let { elem = $bindable(null), ...p } = $props()
|
|
8
|
-
p = mergeOpts(p)
|
|
9
|
-
|
|
10
|
-
const {
|
|
11
|
-
class: klass = '',
|
|
12
|
-
|
|
13
|
-
frameContentClass = '',
|
|
14
|
-
contentClass = '',
|
|
15
|
-
resize = null,
|
|
16
|
-
|
|
17
|
-
// Tablist options
|
|
18
|
-
tablistClass = null,
|
|
19
|
-
tablistTarget = randomString(8),
|
|
20
|
-
selectedTabIndex = 0,
|
|
21
|
-
|
|
22
|
-
// Tabpanels options
|
|
23
|
-
tabpanelsClass = null,
|
|
24
|
-
|
|
25
|
-
// Slots
|
|
26
|
-
children,
|
|
27
|
-
background,
|
|
28
|
-
} = p
|
|
29
|
-
|
|
30
|
-
// svelte-ignore non_reactive_update
|
|
31
|
-
let { tablistItems = [] } = p
|
|
32
|
-
const tabs = tablistItems.length > 0
|
|
33
|
-
if (tablistItems.length > 0) {
|
|
34
|
-
tablistItems = tablistItems.map(tab => {
|
|
35
|
-
if (typeof tab === 'string') return { text: tab }
|
|
36
|
-
return tab
|
|
37
|
-
})
|
|
38
|
-
}
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
<!-- Tabpanels -->
|
|
42
|
-
{#snippet tablist()}
|
|
43
|
-
<div class="frame-tabs">
|
|
44
|
-
<Tablist
|
|
45
|
-
class="tablist-tab tablist-top {tablistClass}"
|
|
46
|
-
target={tablistTarget}
|
|
47
|
-
>
|
|
48
|
-
{#each tablistItems as tab, index (tab)}
|
|
49
|
-
{@const { text, ...tabRest } = tab}
|
|
50
|
-
<Tab {...tabRest} active={index === selectedTabIndex}>
|
|
51
|
-
{text}
|
|
52
|
-
</Tab>
|
|
53
|
-
{/each}
|
|
54
|
-
</Tablist>
|
|
55
|
-
</div>
|
|
56
|
-
{/snippet}
|
|
57
|
-
|
|
58
|
-
<!-- Tabpanels -->
|
|
59
|
-
{#snippet tabpanels()}
|
|
60
|
-
<Tabpanels id={tablistTarget} class="border-0 p-0 {tabpanelsClass}">
|
|
61
|
-
{#if children}{@render children()}{/if}
|
|
62
|
-
</Tabpanels>
|
|
63
|
-
{/snippet}
|
|
64
|
-
|
|
65
|
-
{#snippet dot()}
|
|
66
|
-
<svg class="frame-dot" viewBox="0 0 24 24">
|
|
67
|
-
<circle cx="12" cy="12" r="12" />
|
|
68
|
-
</svg>
|
|
69
|
-
{/snippet}
|
|
70
|
-
|
|
71
|
-
<div bind:this={elem} class="browserframe {klass}">
|
|
72
|
-
<div class="vertical gap-0">
|
|
73
|
-
<div class="frame-header">
|
|
74
|
-
<div class="frame-dots">
|
|
75
|
-
{@render dot()}
|
|
76
|
-
{@render dot()}
|
|
77
|
-
{@render dot()}
|
|
78
|
-
</div>
|
|
79
|
-
{#if tabs}
|
|
80
|
-
{@render tablist()}
|
|
81
|
-
{/if}
|
|
82
|
-
</div>
|
|
83
|
-
<div class="frame-content stack {frameContentClass}">
|
|
84
|
-
{#if background}
|
|
85
|
-
<div class="background">
|
|
86
|
-
{@render background()}
|
|
87
|
-
</div>
|
|
88
|
-
{/if}
|
|
89
|
-
|
|
90
|
-
<div class="content vertical {contentClass}">
|
|
91
|
-
{#if tabs}
|
|
92
|
-
{@render tabpanels()}
|
|
93
|
-
{:else if children}{@render children()}{/if}
|
|
94
|
-
</div>
|
|
95
|
-
|
|
96
|
-
{#if resize}
|
|
97
|
-
<Resizer options={{ target: '.browserframe', ...resize }} />
|
|
98
|
-
{/if}
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|