@thomasfosterau/components 0.0.0 → 0.2.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/LICENSE +21 -0
- package/README.md +241 -56
- package/dist/canvas/VectorCanvas.svelte +320 -0
- package/dist/canvas/VectorCanvas.svelte.d.ts +105 -0
- package/dist/canvas/history.d.ts +105 -0
- package/dist/canvas/history.js +147 -0
- package/dist/canvas/index.d.ts +15 -0
- package/dist/canvas/index.js +14 -0
- package/dist/canvas/types.d.ts +91 -0
- package/dist/canvas/types.js +13 -0
- package/dist/canvas/utils.d.ts +66 -0
- package/dist/canvas/utils.js +114 -0
- package/dist/charts/Chart.svelte +300 -0
- package/dist/charts/Chart.svelte.d.ts +50 -0
- package/dist/charts/index.d.ts +11 -0
- package/dist/charts/index.js +10 -0
- package/dist/charts/types.d.ts +28 -0
- package/dist/charts/types.js +6 -0
- package/dist/citations/BookCitation.svelte +53 -0
- package/dist/citations/BookCitation.svelte.d.ts +41 -0
- package/dist/citations/ChapterCitation.svelte +38 -0
- package/dist/citations/ChapterCitation.svelte.d.ts +50 -0
- package/dist/citations/Citation.svelte +47 -0
- package/dist/citations/Citation.svelte.d.ts +24 -0
- package/dist/citations/CreditList.svelte +69 -0
- package/dist/citations/CreditList.svelte.d.ts +47 -0
- package/dist/citations/DOILink.svelte +28 -0
- package/dist/citations/DOILink.svelte.d.ts +19 -0
- package/dist/citations/Footnote.svelte +39 -0
- package/dist/citations/Footnote.svelte.d.ts +17 -0
- package/dist/citations/FootnoteList.svelte +36 -0
- package/dist/citations/FootnoteList.svelte.d.ts +21 -0
- package/dist/citations/ISBNLink.svelte +29 -0
- package/dist/citations/ISBNLink.svelte.d.ts +19 -0
- package/dist/citations/ISSNLink.svelte +29 -0
- package/dist/citations/ISSNLink.svelte.d.ts +19 -0
- package/dist/citations/Publisher.svelte +34 -0
- package/dist/citations/Publisher.svelte.d.ts +14 -0
- package/dist/citations/ReferenceList.svelte +53 -0
- package/dist/citations/ReferenceList.svelte.d.ts +21 -0
- package/dist/citations/ReportCitation.svelte +41 -0
- package/dist/citations/ReportCitation.svelte.d.ts +36 -0
- package/dist/citations/ScholarlyArticleCitation.svelte +64 -0
- package/dist/citations/ScholarlyArticleCitation.svelte.d.ts +41 -0
- package/dist/citations/ThesisCitation.svelte +35 -0
- package/dist/citations/ThesisCitation.svelte.d.ts +29 -0
- package/dist/citations/bibliography.svelte.d.ts +55 -0
- package/dist/citations/bibliography.svelte.js +78 -0
- package/dist/citations/citation.d.ts +71 -0
- package/dist/citations/citation.js +121 -0
- package/dist/citations/csl.d.ts +102 -0
- package/dist/citations/csl.js +20 -0
- package/dist/citations/index.d.ts +31 -0
- package/dist/citations/index.js +36 -0
- package/dist/citations/list-format.d.ts +34 -0
- package/dist/citations/list-format.js +40 -0
- package/dist/context.svelte.d.ts +46 -0
- package/dist/context.svelte.js +51 -0
- package/dist/data/ChatBubble.svelte +48 -0
- package/dist/data/ChatBubble.svelte.d.ts +33 -0
- package/dist/data/DataGrid.svelte +150 -0
- package/dist/data/DataGrid.svelte.d.ts +118 -0
- package/dist/data/DescriptionList.svelte +53 -0
- package/dist/data/DescriptionList.svelte.d.ts +26 -0
- package/dist/data/DescriptionRow.svelte +56 -0
- package/dist/data/DescriptionRow.svelte.d.ts +21 -0
- package/dist/data/DiffText.svelte +29 -0
- package/dist/data/DiffText.svelte.d.ts +19 -0
- package/dist/data/ItemList.svelte +80 -0
- package/dist/data/ItemList.svelte.d.ts +52 -0
- package/dist/data/LinkListItem.svelte +46 -0
- package/dist/data/LinkListItem.svelte.d.ts +21 -0
- package/dist/data/MessageThread.svelte +29 -0
- package/dist/data/MessageThread.svelte.d.ts +17 -0
- package/dist/data/Pagination.svelte +136 -0
- package/dist/data/Pagination.svelte.d.ts +79 -0
- package/dist/data/PaginationFooter.svelte +42 -0
- package/dist/data/PaginationFooter.svelte.d.ts +61 -0
- package/dist/data/ResultCount.svelte +27 -0
- package/dist/data/ResultCount.svelte.d.ts +18 -0
- package/dist/data/Table.svelte +151 -0
- package/dist/data/Table.svelte.d.ts +75 -0
- package/dist/data/TreeList.svelte +41 -0
- package/dist/data/TreeList.svelte.d.ts +17 -0
- package/dist/data/TreeListItem.svelte +29 -0
- package/dist/data/TreeListItem.svelte.d.ts +10 -0
- package/dist/data/description-context.d.ts +39 -0
- package/dist/data/description-context.js +36 -0
- package/dist/data/diff.d.ts +14 -0
- package/dist/data/diff.js +10 -0
- package/dist/data/index.d.ts +37 -0
- package/dist/data/index.js +37 -0
- package/dist/data/list-item.d.ts +30 -0
- package/dist/data/list-item.js +19 -0
- package/dist/data/pagination.d.ts +81 -0
- package/dist/data/pagination.js +79 -0
- package/dist/data/table-types.d.ts +71 -0
- package/dist/data/table-types.js +35 -0
- package/dist/feedback/ConfirmDialog.svelte +79 -0
- package/dist/feedback/ConfirmDialog.svelte.d.ts +82 -0
- package/dist/feedback/Dialog.svelte +47 -0
- package/dist/feedback/Dialog.svelte.d.ts +36 -0
- package/dist/feedback/DialogFrame.svelte +64 -0
- package/dist/feedback/DialogFrame.svelte.d.ts +23 -0
- package/dist/feedback/Drawer.svelte +43 -0
- package/dist/feedback/Drawer.svelte.d.ts +43 -0
- package/dist/feedback/LoadingBoundary.svelte +61 -0
- package/dist/feedback/LoadingBoundary.svelte.d.ts +34 -0
- package/dist/feedback/ProgressBar.svelte +46 -0
- package/dist/feedback/ProgressBar.svelte.d.ts +28 -0
- package/dist/feedback/SegmentBar.svelte +83 -0
- package/dist/feedback/SegmentBar.svelte.d.ts +37 -0
- package/dist/feedback/StatTile.svelte +77 -0
- package/dist/feedback/StatTile.svelte.d.ts +50 -0
- package/dist/feedback/Stats.svelte +18 -0
- package/dist/feedback/Stats.svelte.d.ts +16 -0
- package/dist/feedback/Steps.svelte +72 -0
- package/dist/feedback/Steps.svelte.d.ts +61 -0
- package/dist/feedback/Timeline.svelte +86 -0
- package/dist/feedback/Timeline.svelte.d.ts +55 -0
- package/dist/feedback/Toaster.svelte +78 -0
- package/dist/feedback/Toaster.svelte.d.ts +32 -0
- package/dist/feedback/index.d.ts +34 -0
- package/dist/feedback/index.js +29 -0
- package/dist/feedback/sizes.d.ts +41 -0
- package/dist/feedback/sizes.js +69 -0
- package/dist/feedback/toaster.d.ts +48 -0
- package/dist/feedback/toaster.js +29 -0
- package/dist/fields/Calendar.svelte +60 -0
- package/dist/fields/Calendar.svelte.d.ts +11 -0
- package/dist/fields/CalendarMonths.svelte +86 -0
- package/dist/fields/CalendarMonths.svelte.d.ts +30 -0
- package/dist/fields/Checkbox.svelte +33 -0
- package/dist/fields/Checkbox.svelte.d.ts +30 -0
- package/dist/fields/CheckboxGroup.svelte +41 -0
- package/dist/fields/CheckboxGroup.svelte.d.ts +40 -0
- package/dist/fields/Combobox.svelte +229 -0
- package/dist/fields/Combobox.svelte.d.ts +133 -0
- package/dist/fields/DateField.svelte +37 -0
- package/dist/fields/DateField.svelte.d.ts +20 -0
- package/dist/fields/DateInput.svelte +31 -0
- package/dist/fields/DateInput.svelte.d.ts +35 -0
- package/dist/fields/DatePicker.svelte +47 -0
- package/dist/fields/DatePicker.svelte.d.ts +25 -0
- package/dist/fields/DateRangePicker.svelte +70 -0
- package/dist/fields/DateRangePicker.svelte.d.ts +43 -0
- package/dist/fields/Dropzone.svelte +232 -0
- package/dist/fields/Dropzone.svelte.d.ts +103 -0
- package/dist/fields/FieldErrors.svelte +30 -0
- package/dist/fields/FieldErrors.svelte.d.ts +11 -0
- package/dist/fields/Fieldset.svelte +53 -0
- package/dist/fields/Fieldset.svelte.d.ts +27 -0
- package/dist/fields/FileInput.svelte +68 -0
- package/dist/fields/FileInput.svelte.d.ts +39 -0
- package/dist/fields/FormField.svelte +78 -0
- package/dist/fields/FormField.svelte.d.ts +29 -0
- package/dist/fields/ImageInput.svelte +87 -0
- package/dist/fields/ImageInput.svelte.d.ts +45 -0
- package/dist/fields/MultiSelect.svelte +112 -0
- package/dist/fields/MultiSelect.svelte.d.ts +75 -0
- package/dist/fields/NumberField.svelte +190 -0
- package/dist/fields/NumberField.svelte.d.ts +76 -0
- package/dist/fields/PasswordInput.svelte +95 -0
- package/dist/fields/PasswordInput.svelte.d.ts +58 -0
- package/dist/fields/PickerPopover.svelte +47 -0
- package/dist/fields/PickerPopover.svelte.d.ts +16 -0
- package/dist/fields/PinInput.svelte +83 -0
- package/dist/fields/PinInput.svelte.d.ts +66 -0
- package/dist/fields/PushToggle.svelte +93 -0
- package/dist/fields/PushToggle.svelte.d.ts +55 -0
- package/dist/fields/RadioGroup.svelte +88 -0
- package/dist/fields/RadioGroup.svelte.d.ts +41 -0
- package/dist/fields/RangeCalendar.svelte +51 -0
- package/dist/fields/RangeCalendar.svelte.d.ts +23 -0
- package/dist/fields/Rating.svelte +127 -0
- package/dist/fields/Rating.svelte.d.ts +86 -0
- package/dist/fields/SearchInput.svelte +58 -0
- package/dist/fields/SearchInput.svelte.d.ts +33 -0
- package/dist/fields/SegmentGroup.svelte +91 -0
- package/dist/fields/SegmentGroup.svelte.d.ts +20 -0
- package/dist/fields/Select.svelte +36 -0
- package/dist/fields/Select.svelte.d.ts +35 -0
- package/dist/fields/Slider.svelte +194 -0
- package/dist/fields/Slider.svelte.d.ts +100 -0
- package/dist/fields/TagsInput.svelte +256 -0
- package/dist/fields/TagsInput.svelte.d.ts +102 -0
- package/dist/fields/TextInput.svelte +26 -0
- package/dist/fields/TextInput.svelte.d.ts +36 -0
- package/dist/fields/Textarea.svelte +22 -0
- package/dist/fields/Textarea.svelte.d.ts +31 -0
- package/dist/fields/TimeField.svelte +30 -0
- package/dist/fields/TimeField.svelte.d.ts +19 -0
- package/dist/fields/Toggle.svelte +72 -0
- package/dist/fields/Toggle.svelte.d.ts +38 -0
- package/dist/fields/VideoInput.svelte +35 -0
- package/dist/fields/VideoInput.svelte.d.ts +46 -0
- package/dist/fields/calendar-props.d.ts +119 -0
- package/dist/fields/calendar-props.js +51 -0
- package/dist/fields/dates.d.ts +28 -0
- package/dist/fields/dates.js +26 -0
- package/dist/fields/field-types.d.ts +80 -0
- package/dist/fields/field-types.js +92 -0
- package/dist/fields/file-validation.d.ts +30 -0
- package/dist/fields/file-validation.js +51 -0
- package/dist/fields/index.d.ts +43 -0
- package/dist/fields/index.js +42 -0
- package/dist/fields/latest-search.svelte.d.ts +38 -0
- package/dist/fields/latest-search.svelte.js +85 -0
- package/dist/fields/number-format.d.ts +52 -0
- package/dist/fields/number-format.js +89 -0
- package/dist/fields/segmented-field.d.ts +128 -0
- package/dist/fields/segmented-field.js +52 -0
- package/dist/fields/slider-keys.d.ts +21 -0
- package/dist/fields/slider-keys.js +37 -0
- package/dist/formatting/Countdown.svelte +110 -0
- package/dist/formatting/Countdown.svelte.d.ts +35 -0
- package/dist/formatting/DateTime.svelte +35 -0
- package/dist/formatting/DateTime.svelte.d.ts +26 -0
- package/dist/formatting/Duration.svelte +18 -0
- package/dist/formatting/Duration.svelte.d.ts +20 -0
- package/dist/formatting/FormatList.svelte +31 -0
- package/dist/formatting/FormatList.svelte.d.ts +46 -0
- package/dist/formatting/Highlight.svelte +51 -0
- package/dist/formatting/Highlight.svelte.d.ts +19 -0
- package/dist/formatting/Number.svelte +35 -0
- package/dist/formatting/Number.svelte.d.ts +43 -0
- package/dist/formatting/RelativeTime.svelte +69 -0
- package/dist/formatting/RelativeTime.svelte.d.ts +26 -0
- package/dist/formatting/Year.svelte +39 -0
- package/dist/formatting/Year.svelte.d.ts +21 -0
- package/dist/formatting/duration.d.ts +44 -0
- package/dist/formatting/duration.js +125 -0
- package/dist/formatting/index.d.ts +15 -0
- package/dist/formatting/index.js +17 -0
- package/dist/forms/EntityForm.svelte +185 -0
- package/dist/forms/EntityForm.svelte.d.ts +66 -0
- package/dist/forms/FormActions.svelte +29 -0
- package/dist/forms/FormActions.svelte.d.ts +37 -0
- package/dist/forms/FormErrors.svelte +21 -0
- package/dist/forms/FormErrors.svelte.d.ts +16 -0
- package/dist/forms/HiddenField.svelte +22 -0
- package/dist/forms/HiddenField.svelte.d.ts +11 -0
- package/dist/forms/SearchForm.svelte +43 -0
- package/dist/forms/SearchForm.svelte.d.ts +36 -0
- package/dist/forms/entity-form.d.ts +12 -0
- package/dist/forms/entity-form.js +12 -0
- package/dist/forms/index.d.ts +14 -0
- package/dist/forms/index.js +14 -0
- package/dist/hotkeys/HotkeyBadge.svelte +39 -0
- package/dist/hotkeys/HotkeyBadge.svelte.d.ts +25 -0
- package/dist/hotkeys/HotkeyHelpDialog.svelte +68 -0
- package/dist/hotkeys/HotkeyHelpDialog.svelte.d.ts +35 -0
- package/dist/hotkeys/HotkeyProvider.svelte +92 -0
- package/dist/hotkeys/HotkeyProvider.svelte.d.ts +4 -0
- package/dist/hotkeys/context.svelte.d.ts +47 -0
- package/dist/hotkeys/context.svelte.js +72 -0
- package/dist/hotkeys/index.d.ts +28 -0
- package/dist/hotkeys/index.js +27 -0
- package/dist/hotkeys/match.d.ts +65 -0
- package/dist/hotkeys/match.js +135 -0
- package/dist/hotkeys/registry.svelte.d.ts +55 -0
- package/dist/hotkeys/registry.svelte.js +110 -0
- package/dist/hotkeys/types.d.ts +74 -0
- package/dist/hotkeys/types.js +18 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +37 -0
- package/dist/infobox/Infobox.svelte +79 -0
- package/dist/infobox/Infobox.svelte.d.ts +33 -0
- package/dist/infobox/InfoboxHeader.svelte +35 -0
- package/dist/infobox/InfoboxHeader.svelte.d.ts +18 -0
- package/dist/infobox/InfoboxImage.svelte +38 -0
- package/dist/infobox/InfoboxImage.svelte.d.ts +21 -0
- package/dist/infobox/InfoboxRow.svelte +50 -0
- package/dist/infobox/InfoboxRow.svelte.d.ts +25 -0
- package/dist/infobox/InfoboxSection.svelte +24 -0
- package/dist/infobox/InfoboxSection.svelte.d.ts +12 -0
- package/dist/infobox/index.d.ts +21 -0
- package/dist/infobox/index.js +20 -0
- package/dist/infobox/types.d.ts +86 -0
- package/dist/infobox/types.js +27 -0
- package/dist/layout/AppShell.svelte +50 -0
- package/dist/layout/AppShell.svelte.d.ts +28 -0
- package/dist/layout/Breadcrumbs.svelte +52 -0
- package/dist/layout/Breadcrumbs.svelte.d.ts +18 -0
- package/dist/layout/Cluster.svelte +28 -0
- package/dist/layout/Cluster.svelte.d.ts +27 -0
- package/dist/layout/DetailLayout.svelte +50 -0
- package/dist/layout/DetailLayout.svelte.d.ts +19 -0
- package/dist/layout/FilterBar.svelte +40 -0
- package/dist/layout/FilterBar.svelte.d.ts +12 -0
- package/dist/layout/Fits.svelte +27 -0
- package/dist/layout/Fits.svelte.d.ts +13 -0
- package/dist/layout/Flow.svelte +46 -0
- package/dist/layout/Flow.svelte.d.ts +16 -0
- package/dist/layout/Footer.svelte +32 -0
- package/dist/layout/Footer.svelte.d.ts +12 -0
- package/dist/layout/Grid.svelte +23 -0
- package/dist/layout/Grid.svelte.d.ts +26 -0
- package/dist/layout/HStack.svelte +12 -0
- package/dist/layout/HStack.svelte.d.ts +34 -0
- package/dist/layout/Hero.svelte +76 -0
- package/dist/layout/Hero.svelte.d.ts +36 -0
- package/dist/layout/Main.svelte +30 -0
- package/dist/layout/Main.svelte.d.ts +15 -0
- package/dist/layout/Navbar.svelte +68 -0
- package/dist/layout/Navbar.svelte.d.ts +31 -0
- package/dist/layout/PageHeader.svelte +77 -0
- package/dist/layout/PageHeader.svelte.d.ts +33 -0
- package/dist/layout/Section.svelte +72 -0
- package/dist/layout/Section.svelte.d.ts +40 -0
- package/dist/layout/Sidebar.svelte +54 -0
- package/dist/layout/Sidebar.svelte.d.ts +27 -0
- package/dist/layout/Spacer.svelte +12 -0
- package/dist/layout/Spacer.svelte.d.ts +6 -0
- package/dist/layout/Tabs.svelte +85 -0
- package/dist/layout/Tabs.svelte.d.ts +42 -0
- package/dist/layout/VStack.svelte +12 -0
- package/dist/layout/VStack.svelte.d.ts +29 -0
- package/dist/layout/index.d.ts +38 -0
- package/dist/layout/index.js +38 -0
- package/dist/layout/space.d.ts +44 -0
- package/dist/layout/space.js +76 -0
- package/dist/layout/types.d.ts +52 -0
- package/dist/layout/types.js +27 -0
- package/dist/links/ContextLinks.svelte +28 -0
- package/dist/links/ContextLinks.svelte.d.ts +20 -0
- package/dist/links/EmailLink.svelte +26 -0
- package/dist/links/EmailLink.svelte.d.ts +20 -0
- package/dist/links/index.d.ts +7 -0
- package/dist/links/index.js +7 -0
- package/dist/media/Figure.svelte +26 -0
- package/dist/media/Figure.svelte.d.ts +12 -0
- package/dist/media/Image.svelte +76 -0
- package/dist/media/Image.svelte.d.ts +41 -0
- package/dist/media/Video.svelte +65 -0
- package/dist/media/Video.svelte.d.ts +29 -0
- package/dist/media/image-dimensions.d.ts +28 -0
- package/dist/media/image-dimensions.js +34 -0
- package/dist/media/index.d.ts +10 -0
- package/dist/media/index.js +10 -0
- package/dist/search/CommandPalette.svelte +257 -0
- package/dist/search/CommandPalette.svelte.d.ts +59 -0
- package/dist/search/index.d.ts +13 -0
- package/dist/search/index.js +13 -0
- package/dist/search/types.d.ts +40 -0
- package/dist/search/types.js +20 -0
- package/dist/seo/Head.svelte +190 -0
- package/dist/seo/Head.svelte.d.ts +86 -0
- package/dist/seo/JsonLd.svelte +30 -0
- package/dist/seo/JsonLd.svelte.d.ts +20 -0
- package/dist/seo/index.d.ts +18 -0
- package/dist/seo/index.js +17 -0
- package/dist/seo/json-ld.d.ts +33 -0
- package/dist/seo/json-ld.js +29 -0
- package/dist/seo/og-image.d.ts +72 -0
- package/dist/seo/og-image.js +82 -0
- package/dist/seo/types.d.ts +43 -0
- package/dist/seo/types.js +6 -0
- package/dist/theme.css +161 -0
- package/dist/tips/PopoverTip.svelte +80 -0
- package/dist/tips/PopoverTip.svelte.d.ts +33 -0
- package/dist/tips/Tip.svelte +91 -0
- package/dist/tips/Tip.svelte.d.ts +25 -0
- package/dist/tips/index.d.ts +15 -0
- package/dist/tips/index.js +14 -0
- package/dist/tips/tip-stack.d.ts +26 -0
- package/dist/tips/tip-stack.js +37 -0
- package/dist/tips/tip-store.svelte.d.ts +75 -0
- package/dist/tips/tip-store.svelte.js +158 -0
- package/dist/tips/types.d.ts +46 -0
- package/dist/tips/types.js +6 -0
- package/dist/ui/Accordion.svelte +75 -0
- package/dist/ui/Accordion.svelte.d.ts +50 -0
- package/dist/ui/AccordionItem.svelte +73 -0
- package/dist/ui/AccordionItem.svelte.d.ts +18 -0
- package/dist/ui/Alert.svelte +61 -0
- package/dist/ui/Alert.svelte.d.ts +37 -0
- package/dist/ui/Badge.svelte +39 -0
- package/dist/ui/Badge.svelte.d.ts +32 -0
- package/dist/ui/Button.svelte +44 -0
- package/dist/ui/Button.svelte.d.ts +29 -0
- package/dist/ui/ButtonGroup.svelte +24 -0
- package/dist/ui/ButtonGroup.svelte.d.ts +17 -0
- package/dist/ui/Card.svelte +49 -0
- package/dist/ui/Card.svelte.d.ts +44 -0
- package/dist/ui/Chip.svelte +58 -0
- package/dist/ui/Chip.svelte.d.ts +21 -0
- package/dist/ui/ConfirmButton.svelte +75 -0
- package/dist/ui/ConfirmButton.svelte.d.ts +48 -0
- package/dist/ui/ContextMenu.svelte +75 -0
- package/dist/ui/ContextMenu.svelte.d.ts +25 -0
- package/dist/ui/Disclosure.svelte +46 -0
- package/dist/ui/Disclosure.svelte.d.ts +22 -0
- package/dist/ui/Divider.svelte +47 -0
- package/dist/ui/Divider.svelte.d.ts +28 -0
- package/dist/ui/DropdownMenu.svelte +44 -0
- package/dist/ui/DropdownMenu.svelte.d.ts +30 -0
- package/dist/ui/EmptyState.svelte +37 -0
- package/dist/ui/EmptyState.svelte.d.ts +22 -0
- package/dist/ui/ExternalLink.svelte +38 -0
- package/dist/ui/ExternalLink.svelte.d.ts +34 -0
- package/dist/ui/Heading.svelte +58 -0
- package/dist/ui/Heading.svelte.d.ts +22 -0
- package/dist/ui/Link.svelte +34 -0
- package/dist/ui/Link.svelte.d.ts +20 -0
- package/dist/ui/LinkButton.svelte +51 -0
- package/dist/ui/LinkButton.svelte.d.ts +33 -0
- package/dist/ui/Menu.svelte +24 -0
- package/dist/ui/Menu.svelte.d.ts +13 -0
- package/dist/ui/MenuCheckboxItem.svelte +33 -0
- package/dist/ui/MenuCheckboxItem.svelte.d.ts +20 -0
- package/dist/ui/MenuItem.svelte +73 -0
- package/dist/ui/MenuItem.svelte.d.ts +21 -0
- package/dist/ui/MenuRadioGroup.svelte +25 -0
- package/dist/ui/MenuRadioGroup.svelte.d.ts +20 -0
- package/dist/ui/MenuRadioItem.svelte +20 -0
- package/dist/ui/MenuRadioItem.svelte.d.ts +15 -0
- package/dist/ui/MenuSeparator.svelte +27 -0
- package/dist/ui/MenuSeparator.svelte.d.ts +8 -0
- package/dist/ui/MenuSub.svelte +24 -0
- package/dist/ui/MenuSub.svelte.d.ts +15 -0
- package/dist/ui/Popover.svelte +63 -0
- package/dist/ui/Popover.svelte.d.ts +40 -0
- package/dist/ui/ShareButton.svelte +64 -0
- package/dist/ui/ShareButton.svelte.d.ts +39 -0
- package/dist/ui/Skeleton.svelte +43 -0
- package/dist/ui/Skeleton.svelte.d.ts +22 -0
- package/dist/ui/Spinner.svelte +41 -0
- package/dist/ui/Spinner.svelte.d.ts +35 -0
- package/dist/ui/Stack.svelte +36 -0
- package/dist/ui/Stack.svelte.d.ts +48 -0
- package/dist/ui/ThemeToggle.svelte +65 -0
- package/dist/ui/ThemeToggle.svelte.d.ts +24 -0
- package/dist/ui/ToggleButton.svelte +58 -0
- package/dist/ui/ToggleButton.svelte.d.ts +45 -0
- package/dist/ui/ToggleGroup.svelte +142 -0
- package/dist/ui/ToggleGroup.svelte.d.ts +86 -0
- package/dist/ui/Toolbar.svelte +40 -0
- package/dist/ui/Toolbar.svelte.d.ts +20 -0
- package/dist/ui/ToolbarButton.svelte +29 -0
- package/dist/ui/ToolbarButton.svelte.d.ts +21 -0
- package/dist/ui/ToolbarLink.svelte +21 -0
- package/dist/ui/ToolbarLink.svelte.d.ts +12 -0
- package/dist/ui/ToolbarSeparator.svelte +22 -0
- package/dist/ui/ToolbarSeparator.svelte.d.ts +12 -0
- package/dist/ui/ToolbarToggleGroup.svelte +66 -0
- package/dist/ui/ToolbarToggleGroup.svelte.d.ts +52 -0
- package/dist/ui/Tooltip.svelte +54 -0
- package/dist/ui/Tooltip.svelte.d.ts +35 -0
- package/dist/ui/VisuallyHidden.svelte +23 -0
- package/dist/ui/VisuallyHidden.svelte.d.ts +10 -0
- package/dist/ui/accordion-context.d.ts +26 -0
- package/dist/ui/accordion-context.js +23 -0
- package/dist/ui/colour-token.d.ts +41 -0
- package/dist/ui/colour-token.js +49 -0
- package/dist/ui/context-menu.d.ts +13 -0
- package/dist/ui/context-menu.js +13 -0
- package/dist/ui/index.d.ts +63 -0
- package/dist/ui/index.js +62 -0
- package/dist/ui/menu-context.d.ts +20 -0
- package/dist/ui/menu-context.js +22 -0
- package/dist/ui/menu-parts/CheckboxItemPart.svelte +26 -0
- package/dist/ui/menu-parts/CheckboxItemPart.svelte.d.ts +5 -0
- package/dist/ui/menu-parts/ItemPart.svelte +29 -0
- package/dist/ui/menu-parts/ItemPart.svelte.d.ts +5 -0
- package/dist/ui/menu-parts/RadioGroupPart.svelte +24 -0
- package/dist/ui/menu-parts/RadioGroupPart.svelte.d.ts +5 -0
- package/dist/ui/menu-parts/RadioItemPart.svelte +22 -0
- package/dist/ui/menu-parts/RadioItemPart.svelte.d.ts +5 -0
- package/dist/ui/menu-parts/SeparatorPart.svelte +16 -0
- package/dist/ui/menu-parts/SeparatorPart.svelte.d.ts +5 -0
- package/dist/ui/menu-parts/SubPart.svelte +28 -0
- package/dist/ui/menu-parts/SubPart.svelte.d.ts +5 -0
- package/dist/ui/menu-parts/menu-parts.d.ts +104 -0
- package/dist/ui/menu-parts/menu-parts.js +31 -0
- package/dist/ui/menu-parts/parts.d.ts +12 -0
- package/dist/ui/menu-parts/parts.js +27 -0
- package/dist/ui/slug.d.ts +19 -0
- package/dist/ui/slug.js +25 -0
- package/dist/ui/toggle-classes.d.ts +39 -0
- package/dist/ui/toggle-classes.js +36 -0
- package/dist/ui/tones.d.ts +103 -0
- package/dist/ui/tones.js +240 -0
- package/package.json +41 -25
package/dist/ui/slug.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text → anchor id.
|
|
3
|
+
*
|
|
4
|
+
* Shared by {@link Heading} and anything else that has to address a section it
|
|
5
|
+
* only knows the words of. Deliberately tiny and deterministic: the same text
|
|
6
|
+
* must slug identically on the server and in the browser, or an in-page link
|
|
7
|
+
* rendered during SSR points at an id hydration then changes.
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Lower-case, strip anything that is not a word character, collapse runs of
|
|
13
|
+
* whitespace to single hyphens.
|
|
14
|
+
*
|
|
15
|
+
* ```ts
|
|
16
|
+
* slugify('Growing conditions & care') // 'growing-conditions-care'
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export function slugify(text) {
|
|
20
|
+
return text
|
|
21
|
+
.toLowerCase()
|
|
22
|
+
.replace(/[^\w\s-]/g, '')
|
|
23
|
+
.trim()
|
|
24
|
+
.replace(/\s+/g, '-');
|
|
25
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pressed / unpressed look `ToggleButton` and `ToggleGroup` share, and the `ToggleGroup` item type.
|
|
3
|
+
*
|
|
4
|
+
* Pressed is never colour alone: the unpressed `variant` (ghost, outline…)
|
|
5
|
+
* is dropped for a filled tone plus daisyUI's `btn-active`, so the two
|
|
6
|
+
* states differ in fill and depth as well as hue.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import type { Snippet } from 'svelte';
|
|
11
|
+
import { type ButtonVariant, type Tone } from './tones.ts';
|
|
12
|
+
/** The classes of a toggle in `pressed` state, besides `btn` and the size. */
|
|
13
|
+
export declare function toggleClasses(pressed: boolean, tone: Tone, variant: ButtonVariant): string;
|
|
14
|
+
/** One item of a `ToggleGroup`. */
|
|
15
|
+
export interface ToggleGroupItem<Value extends string = string> {
|
|
16
|
+
readonly value: Value;
|
|
17
|
+
/** The item's accessible name, shown unless `iconOnly`. */
|
|
18
|
+
readonly label: string;
|
|
19
|
+
/** Leading icon. */
|
|
20
|
+
readonly icon?: Snippet<[]> | undefined;
|
|
21
|
+
/** Hide the label visually; it stays the accessible name. */
|
|
22
|
+
readonly iconOnly?: boolean | undefined;
|
|
23
|
+
readonly disabled?: boolean | undefined;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The two writers bits-ui's toggle-group `bind:value` needs, for single and
|
|
27
|
+
* multiple mode. In single mode `''` (the selected item pressed off) is
|
|
28
|
+
* refused when `required()`. Otherwise the value goes to `assign` and then
|
|
29
|
+
* to `notify()`. `ToggleGroup` and `ToolbarToggleGroup` share it, so
|
|
30
|
+
* `required` means the same in both.
|
|
31
|
+
*/
|
|
32
|
+
export declare function toggleSetters<V extends string>(options: {
|
|
33
|
+
readonly required: () => boolean;
|
|
34
|
+
readonly assign: (value: V | '' | V[]) => void;
|
|
35
|
+
readonly notify: () => ((value: never) => void) | undefined;
|
|
36
|
+
}): {
|
|
37
|
+
readonly single: (next: string) => void;
|
|
38
|
+
readonly multiple: (next: string[]) => void;
|
|
39
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pressed / unpressed look `ToggleButton` and `ToggleGroup` share, and the `ToggleGroup` item type.
|
|
3
|
+
*
|
|
4
|
+
* Pressed is never colour alone: the unpressed `variant` (ghost, outline…)
|
|
5
|
+
* is dropped for a filled tone plus daisyUI's `btn-active`, so the two
|
|
6
|
+
* states differ in fill and depth as well as hue.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import { buttonTone, buttonVariant } from "./tones.js";
|
|
11
|
+
/** The classes of a toggle in `pressed` state, besides `btn` and the size. */
|
|
12
|
+
export function toggleClasses(pressed, tone, variant) {
|
|
13
|
+
return pressed ? `${buttonTone[tone]} btn-active` : buttonVariant[variant];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The two writers bits-ui's toggle-group `bind:value` needs, for single and
|
|
17
|
+
* multiple mode. In single mode `''` (the selected item pressed off) is
|
|
18
|
+
* refused when `required()`. Otherwise the value goes to `assign` and then
|
|
19
|
+
* to `notify()`. `ToggleGroup` and `ToolbarToggleGroup` share it, so
|
|
20
|
+
* `required` means the same in both.
|
|
21
|
+
*/
|
|
22
|
+
export function toggleSetters(options) {
|
|
23
|
+
// SAFETY: bits-ui only ever reports values of the group's own items, or ''.
|
|
24
|
+
const write = (next) => {
|
|
25
|
+
options.assign(next);
|
|
26
|
+
options.notify()?.(next);
|
|
27
|
+
};
|
|
28
|
+
return {
|
|
29
|
+
single: (next) => {
|
|
30
|
+
if (options.required() && next === '')
|
|
31
|
+
return;
|
|
32
|
+
write(next);
|
|
33
|
+
},
|
|
34
|
+
multiple: (next) => write(next),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The daisyUI semantic vocabulary and the literal class tables that map it
|
|
3
|
+
* onto each component.
|
|
4
|
+
*
|
|
5
|
+
* The tables exist because Tailwind only generates classes it can see
|
|
6
|
+
* verbatim in source: a template-string `btn-${tone}` produces nothing at
|
|
7
|
+
* build time. So every tone / variant / size class is spelled out once here
|
|
8
|
+
* as a `Record<K, string>` and looked up, never interpolated. Add a table
|
|
9
|
+
* here rather than a second copy in a component.
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
13
|
+
/** daisyUI semantic colours. */
|
|
14
|
+
export type Tone = 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';
|
|
15
|
+
/** The status subset daisyUI's `alert` supports. */
|
|
16
|
+
export type StatusTone = 'info' | 'success' | 'warning' | 'error';
|
|
17
|
+
/** daisyUI size steps. */
|
|
18
|
+
export type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
19
|
+
/** The daisyUI `btn` styles. */
|
|
20
|
+
export type ButtonVariant = 'solid' | 'outline' | 'soft' | 'dash' | 'ghost' | 'link';
|
|
21
|
+
/** The daisyUI `badge` styles. */
|
|
22
|
+
export type BadgeVariant = 'solid' | 'outline' | 'soft' | 'dash' | 'ghost';
|
|
23
|
+
/** The daisyUI `alert` styles. */
|
|
24
|
+
export type AlertVariant = 'solid' | 'soft' | 'outline' | 'dash';
|
|
25
|
+
/** Literal daisyUI class per `Tone` for `Button`; a lookup table so Tailwind's scanner sees every class. */
|
|
26
|
+
export declare const buttonTone: Record<Tone, string>;
|
|
27
|
+
/** Literal daisyUI class per `ButtonVariant` for `Button`; a lookup table so Tailwind's scanner sees every class. */
|
|
28
|
+
export declare const buttonVariant: Record<ButtonVariant, string>;
|
|
29
|
+
/** Literal daisyUI class per `Size` for `Button`; a lookup table so Tailwind's scanner sees every class. */
|
|
30
|
+
export declare const buttonSize: Record<Size, string>;
|
|
31
|
+
/** Literal daisyUI class per `Tone` for `Badge`; a lookup table so Tailwind's scanner sees every class. */
|
|
32
|
+
export declare const badgeTone: Record<Tone, string>;
|
|
33
|
+
/** Literal daisyUI class per `BadgeVariant` for `Badge`; a lookup table so Tailwind's scanner sees every class. */
|
|
34
|
+
export declare const badgeVariant: Record<BadgeVariant, string>;
|
|
35
|
+
/** Literal daisyUI class per `Size` for `Badge`; a lookup table so Tailwind's scanner sees every class. */
|
|
36
|
+
export declare const badgeSize: Record<Size, string>;
|
|
37
|
+
/** Literal daisyUI class per `StatusTone` for `Alert`; a lookup table so Tailwind's scanner sees every class. */
|
|
38
|
+
export declare const alertTone: Record<StatusTone, string>;
|
|
39
|
+
/** Literal daisyUI class per `AlertVariant` for `Alert`; a lookup table so Tailwind's scanner sees every class. */
|
|
40
|
+
export declare const alertVariant: Record<AlertVariant, string>;
|
|
41
|
+
/** Literal daisyUI class per `Tone` for `ProgressBar`; a lookup table so Tailwind's scanner sees every class. */
|
|
42
|
+
export declare const progressTone: Record<Tone, string>;
|
|
43
|
+
/**
|
|
44
|
+
* Literal daisyUI class per `Tone` for `Steps`; a lookup table so Tailwind's scanner sees every class.
|
|
45
|
+
* Two adjacent toned steps colour the connector between them too.
|
|
46
|
+
*/
|
|
47
|
+
export declare const stepTone: Record<Tone, string>;
|
|
48
|
+
/**
|
|
49
|
+
* Literal daisyUI class per `Tone` for `Slider`; a lookup table so Tailwind's scanner sees every class.
|
|
50
|
+
* Each sets `color` (the fill, read as `currentColor`) and `--range-thumb` (the thumb face).
|
|
51
|
+
*/
|
|
52
|
+
export declare const rangeTone: Record<Tone, string>;
|
|
53
|
+
/** Where a `Divider`'s label sits along the rule. */
|
|
54
|
+
export type DividerAlign = 'start' | 'center' | 'end';
|
|
55
|
+
/** Literal daisyUI class per `Tone` for `Divider`; a lookup table so Tailwind's scanner sees every class. */
|
|
56
|
+
export declare const dividerTone: Record<Tone, string>;
|
|
57
|
+
/** Literal daisyUI class per `DividerAlign` for `Divider`; a lookup table so Tailwind's scanner sees every class. */
|
|
58
|
+
export declare const dividerAlign: Record<DividerAlign, string>;
|
|
59
|
+
/**
|
|
60
|
+
* Literal daisyUI class per rule direction for `Divider`. daisyUI names the
|
|
61
|
+
* LAYOUT, not the rule: `divider-horizontal` sits between side-by-side items
|
|
62
|
+
* and so draws a vertical rule. This table hides the inversion behind the
|
|
63
|
+
* direction the rule actually runs.
|
|
64
|
+
*/
|
|
65
|
+
export declare const dividerOrientation: Record<'horizontal' | 'vertical', string>;
|
|
66
|
+
/** The daisyUI `loading` shapes `Spinner` draws. */
|
|
67
|
+
export type SpinnerVariant = 'spinner' | 'dots' | 'ring' | 'ball' | 'bars' | 'infinity';
|
|
68
|
+
/** Literal daisyUI class per `SpinnerVariant` for `Spinner`; a lookup table so Tailwind's scanner sees every class. */
|
|
69
|
+
export declare const loadingVariant: Record<SpinnerVariant, string>;
|
|
70
|
+
/** Literal daisyUI class per `Size` for `Spinner`; a lookup table so Tailwind's scanner sees every class. */
|
|
71
|
+
export declare const loadingSize: Record<Size, string>;
|
|
72
|
+
/** Plain background classes, for a segment or swatch without a component prefix. */
|
|
73
|
+
export declare const backgroundTone: Record<Tone, string>;
|
|
74
|
+
/** Text colour classes, the foreground half of {@link backgroundTone}. */
|
|
75
|
+
export declare const textTone: Record<Tone, string>;
|
|
76
|
+
/** Heading levels, for any component that renders a caller-chosen heading. */
|
|
77
|
+
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
78
|
+
/** The three link weights: `primary` (coloured), `muted` and `plain` (dimmed text). */
|
|
79
|
+
export type LinkVariant = 'primary' | 'muted' | 'plain';
|
|
80
|
+
/** Literal daisyUI class per `LinkVariant` for `Link`; a lookup table so Tailwind's scanner sees every class. */
|
|
81
|
+
export declare const linkVariant: Record<LinkVariant, string>;
|
|
82
|
+
/** The daisyUI `card` border styles. */
|
|
83
|
+
export type CardVariant = 'border' | 'dash' | 'plain';
|
|
84
|
+
/** Literal daisyUI class per `CardVariant` for `Card`; a lookup table so Tailwind's scanner sees every class. */
|
|
85
|
+
export declare const cardVariant: Record<CardVariant, string>;
|
|
86
|
+
/** Literal daisyUI class per `Size` for `Card`; a lookup table so Tailwind's scanner sees every class. */
|
|
87
|
+
export declare const cardSize: Record<Size, string>;
|
|
88
|
+
/** The `Disclosure` expand marker: an arrow, a plus, or none. */
|
|
89
|
+
export type DisclosureVariant = 'arrow' | 'plus' | 'plain';
|
|
90
|
+
/** daisyUI `collapse` markers — the affordance on a native `<details>`. */
|
|
91
|
+
export declare const collapseVariant: Record<DisclosureVariant, string>;
|
|
92
|
+
/** The two chip steps. A chip is a dense inline unit, so it stops at `md`. */
|
|
93
|
+
export type ChipSize = 'sm' | 'md';
|
|
94
|
+
/** Literal gap and text-size classes per `ChipSize`; a lookup table so Tailwind's scanner sees every class. */
|
|
95
|
+
export declare const chipSize: Record<ChipSize, string>;
|
|
96
|
+
/** The swatch square beside a chip's label, sized to match {@link chipSize}. */
|
|
97
|
+
export declare const chipSwatchSize: Record<ChipSize, string>;
|
|
98
|
+
/** Which side the items behind a `Stack`'s top item peek out from. */
|
|
99
|
+
export type StackDirection = 'top' | 'bottom' | 'start' | 'end';
|
|
100
|
+
/** Literal daisyUI class per `StackDirection` for `Stack`; a lookup table so Tailwind's scanner sees every class. */
|
|
101
|
+
export declare const stackDirection: Record<StackDirection, string>;
|
|
102
|
+
/** Literal daisyUI class per `Tone` for `ChatBubble`; a lookup table so Tailwind's scanner sees every class. */
|
|
103
|
+
export declare const chatBubbleTone: Record<Tone, string>;
|
package/dist/ui/tones.js
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The daisyUI semantic vocabulary and the literal class tables that map it
|
|
3
|
+
* onto each component.
|
|
4
|
+
*
|
|
5
|
+
* The tables exist because Tailwind only generates classes it can see
|
|
6
|
+
* verbatim in source: a template-string `btn-${tone}` produces nothing at
|
|
7
|
+
* build time. So every tone / variant / size class is spelled out once here
|
|
8
|
+
* as a `Record<K, string>` and looked up, never interpolated. Add a table
|
|
9
|
+
* here rather than a second copy in a component.
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
13
|
+
/** Literal daisyUI class per `Tone` for `Button`; a lookup table so Tailwind's scanner sees every class. */
|
|
14
|
+
export const buttonTone = {
|
|
15
|
+
neutral: 'btn-neutral',
|
|
16
|
+
primary: 'btn-primary',
|
|
17
|
+
secondary: 'btn-secondary',
|
|
18
|
+
accent: 'btn-accent',
|
|
19
|
+
info: 'btn-info',
|
|
20
|
+
success: 'btn-success',
|
|
21
|
+
warning: 'btn-warning',
|
|
22
|
+
error: 'btn-error',
|
|
23
|
+
};
|
|
24
|
+
/** Literal daisyUI class per `ButtonVariant` for `Button`; a lookup table so Tailwind's scanner sees every class. */
|
|
25
|
+
export const buttonVariant = {
|
|
26
|
+
solid: '',
|
|
27
|
+
outline: 'btn-outline',
|
|
28
|
+
soft: 'btn-soft',
|
|
29
|
+
dash: 'btn-dash',
|
|
30
|
+
ghost: 'btn-ghost',
|
|
31
|
+
link: 'btn-link',
|
|
32
|
+
};
|
|
33
|
+
/** Literal daisyUI class per `Size` for `Button`; a lookup table so Tailwind's scanner sees every class. */
|
|
34
|
+
export const buttonSize = {
|
|
35
|
+
xs: 'btn-xs',
|
|
36
|
+
sm: 'btn-sm',
|
|
37
|
+
md: 'btn-md',
|
|
38
|
+
lg: 'btn-lg',
|
|
39
|
+
xl: 'btn-xl',
|
|
40
|
+
};
|
|
41
|
+
/** Literal daisyUI class per `Tone` for `Badge`; a lookup table so Tailwind's scanner sees every class. */
|
|
42
|
+
export const badgeTone = {
|
|
43
|
+
neutral: 'badge-neutral',
|
|
44
|
+
primary: 'badge-primary',
|
|
45
|
+
secondary: 'badge-secondary',
|
|
46
|
+
accent: 'badge-accent',
|
|
47
|
+
info: 'badge-info',
|
|
48
|
+
success: 'badge-success',
|
|
49
|
+
warning: 'badge-warning',
|
|
50
|
+
error: 'badge-error',
|
|
51
|
+
};
|
|
52
|
+
/** Literal daisyUI class per `BadgeVariant` for `Badge`; a lookup table so Tailwind's scanner sees every class. */
|
|
53
|
+
export const badgeVariant = {
|
|
54
|
+
solid: '',
|
|
55
|
+
outline: 'badge-outline',
|
|
56
|
+
soft: 'badge-soft',
|
|
57
|
+
dash: 'badge-dash',
|
|
58
|
+
ghost: 'badge-ghost',
|
|
59
|
+
};
|
|
60
|
+
/** Literal daisyUI class per `Size` for `Badge`; a lookup table so Tailwind's scanner sees every class. */
|
|
61
|
+
export const badgeSize = {
|
|
62
|
+
xs: 'badge-xs',
|
|
63
|
+
sm: 'badge-sm',
|
|
64
|
+
md: 'badge-md',
|
|
65
|
+
lg: 'badge-lg',
|
|
66
|
+
xl: 'badge-xl',
|
|
67
|
+
};
|
|
68
|
+
/** Literal daisyUI class per `StatusTone` for `Alert`; a lookup table so Tailwind's scanner sees every class. */
|
|
69
|
+
export const alertTone = {
|
|
70
|
+
info: 'alert-info',
|
|
71
|
+
success: 'alert-success',
|
|
72
|
+
warning: 'alert-warning',
|
|
73
|
+
error: 'alert-error',
|
|
74
|
+
};
|
|
75
|
+
/** Literal daisyUI class per `AlertVariant` for `Alert`; a lookup table so Tailwind's scanner sees every class. */
|
|
76
|
+
export const alertVariant = {
|
|
77
|
+
solid: '',
|
|
78
|
+
soft: 'alert-soft',
|
|
79
|
+
outline: 'alert-outline',
|
|
80
|
+
dash: 'alert-dash',
|
|
81
|
+
};
|
|
82
|
+
/** Literal daisyUI class per `Tone` for `ProgressBar`; a lookup table so Tailwind's scanner sees every class. */
|
|
83
|
+
export const progressTone = {
|
|
84
|
+
neutral: 'progress-neutral',
|
|
85
|
+
primary: 'progress-primary',
|
|
86
|
+
secondary: 'progress-secondary',
|
|
87
|
+
accent: 'progress-accent',
|
|
88
|
+
info: 'progress-info',
|
|
89
|
+
success: 'progress-success',
|
|
90
|
+
warning: 'progress-warning',
|
|
91
|
+
error: 'progress-error',
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Literal daisyUI class per `Tone` for `Steps`; a lookup table so Tailwind's scanner sees every class.
|
|
95
|
+
* Two adjacent toned steps colour the connector between them too.
|
|
96
|
+
*/
|
|
97
|
+
export const stepTone = {
|
|
98
|
+
neutral: 'step-neutral',
|
|
99
|
+
primary: 'step-primary',
|
|
100
|
+
secondary: 'step-secondary',
|
|
101
|
+
accent: 'step-accent',
|
|
102
|
+
info: 'step-info',
|
|
103
|
+
success: 'step-success',
|
|
104
|
+
warning: 'step-warning',
|
|
105
|
+
error: 'step-error',
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Literal daisyUI class per `Tone` for `Slider`; a lookup table so Tailwind's scanner sees every class.
|
|
109
|
+
* Each sets `color` (the fill, read as `currentColor`) and `--range-thumb` (the thumb face).
|
|
110
|
+
*/
|
|
111
|
+
export const rangeTone = {
|
|
112
|
+
neutral: 'range-neutral',
|
|
113
|
+
primary: 'range-primary',
|
|
114
|
+
secondary: 'range-secondary',
|
|
115
|
+
accent: 'range-accent',
|
|
116
|
+
info: 'range-info',
|
|
117
|
+
success: 'range-success',
|
|
118
|
+
warning: 'range-warning',
|
|
119
|
+
error: 'range-error',
|
|
120
|
+
};
|
|
121
|
+
/** Literal daisyUI class per `Tone` for `Divider`; a lookup table so Tailwind's scanner sees every class. */
|
|
122
|
+
export const dividerTone = {
|
|
123
|
+
neutral: 'divider-neutral',
|
|
124
|
+
primary: 'divider-primary',
|
|
125
|
+
secondary: 'divider-secondary',
|
|
126
|
+
accent: 'divider-accent',
|
|
127
|
+
info: 'divider-info',
|
|
128
|
+
success: 'divider-success',
|
|
129
|
+
warning: 'divider-warning',
|
|
130
|
+
error: 'divider-error',
|
|
131
|
+
};
|
|
132
|
+
/** Literal daisyUI class per `DividerAlign` for `Divider`; a lookup table so Tailwind's scanner sees every class. */
|
|
133
|
+
export const dividerAlign = {
|
|
134
|
+
start: 'divider-start',
|
|
135
|
+
center: '',
|
|
136
|
+
end: 'divider-end',
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Literal daisyUI class per rule direction for `Divider`. daisyUI names the
|
|
140
|
+
* LAYOUT, not the rule: `divider-horizontal` sits between side-by-side items
|
|
141
|
+
* and so draws a vertical rule. This table hides the inversion behind the
|
|
142
|
+
* direction the rule actually runs.
|
|
143
|
+
*/
|
|
144
|
+
export const dividerOrientation = {
|
|
145
|
+
horizontal: 'divider-vertical',
|
|
146
|
+
vertical: 'divider-horizontal',
|
|
147
|
+
};
|
|
148
|
+
/** Literal daisyUI class per `SpinnerVariant` for `Spinner`; a lookup table so Tailwind's scanner sees every class. */
|
|
149
|
+
export const loadingVariant = {
|
|
150
|
+
spinner: 'loading-spinner',
|
|
151
|
+
dots: 'loading-dots',
|
|
152
|
+
ring: 'loading-ring',
|
|
153
|
+
ball: 'loading-ball',
|
|
154
|
+
bars: 'loading-bars',
|
|
155
|
+
infinity: 'loading-infinity',
|
|
156
|
+
};
|
|
157
|
+
/** Literal daisyUI class per `Size` for `Spinner`; a lookup table so Tailwind's scanner sees every class. */
|
|
158
|
+
export const loadingSize = {
|
|
159
|
+
xs: 'loading-xs',
|
|
160
|
+
sm: 'loading-sm',
|
|
161
|
+
md: 'loading-md',
|
|
162
|
+
lg: 'loading-lg',
|
|
163
|
+
xl: 'loading-xl',
|
|
164
|
+
};
|
|
165
|
+
/** Plain background classes, for a segment or swatch without a component prefix. */
|
|
166
|
+
export const backgroundTone = {
|
|
167
|
+
neutral: 'bg-neutral',
|
|
168
|
+
primary: 'bg-primary',
|
|
169
|
+
secondary: 'bg-secondary',
|
|
170
|
+
accent: 'bg-accent',
|
|
171
|
+
info: 'bg-info',
|
|
172
|
+
success: 'bg-success',
|
|
173
|
+
warning: 'bg-warning',
|
|
174
|
+
error: 'bg-error',
|
|
175
|
+
};
|
|
176
|
+
/** Text colour classes, the foreground half of {@link backgroundTone}. */
|
|
177
|
+
export const textTone = {
|
|
178
|
+
neutral: 'text-neutral',
|
|
179
|
+
primary: 'text-primary',
|
|
180
|
+
secondary: 'text-secondary',
|
|
181
|
+
accent: 'text-accent',
|
|
182
|
+
info: 'text-info',
|
|
183
|
+
success: 'text-success',
|
|
184
|
+
warning: 'text-warning',
|
|
185
|
+
error: 'text-error',
|
|
186
|
+
};
|
|
187
|
+
/** Literal daisyUI class per `LinkVariant` for `Link`; a lookup table so Tailwind's scanner sees every class. */
|
|
188
|
+
export const linkVariant = {
|
|
189
|
+
primary: 'link link-primary link-hover',
|
|
190
|
+
muted: 'link link-hover',
|
|
191
|
+
plain: 'link link-hover text-base-content/70',
|
|
192
|
+
};
|
|
193
|
+
/** Literal daisyUI class per `CardVariant` for `Card`; a lookup table so Tailwind's scanner sees every class. */
|
|
194
|
+
export const cardVariant = {
|
|
195
|
+
border: 'card-border',
|
|
196
|
+
dash: 'card-dash',
|
|
197
|
+
plain: '',
|
|
198
|
+
};
|
|
199
|
+
/** Literal daisyUI class per `Size` for `Card`; a lookup table so Tailwind's scanner sees every class. */
|
|
200
|
+
export const cardSize = {
|
|
201
|
+
xs: 'card-xs',
|
|
202
|
+
sm: 'card-sm',
|
|
203
|
+
md: 'card-md',
|
|
204
|
+
lg: 'card-lg',
|
|
205
|
+
xl: 'card-xl',
|
|
206
|
+
};
|
|
207
|
+
/** daisyUI `collapse` markers — the affordance on a native `<details>`. */
|
|
208
|
+
export const collapseVariant = {
|
|
209
|
+
arrow: 'collapse-arrow',
|
|
210
|
+
plus: 'collapse-plus',
|
|
211
|
+
plain: '',
|
|
212
|
+
};
|
|
213
|
+
/** Literal gap and text-size classes per `ChipSize`; a lookup table so Tailwind's scanner sees every class. */
|
|
214
|
+
export const chipSize = {
|
|
215
|
+
sm: 'gap-1 text-xs',
|
|
216
|
+
md: 'gap-1.5 text-sm',
|
|
217
|
+
};
|
|
218
|
+
/** The swatch square beside a chip's label, sized to match {@link chipSize}. */
|
|
219
|
+
export const chipSwatchSize = {
|
|
220
|
+
sm: 'size-2',
|
|
221
|
+
md: 'size-2.5',
|
|
222
|
+
};
|
|
223
|
+
/** Literal daisyUI class per `StackDirection` for `Stack`; a lookup table so Tailwind's scanner sees every class. */
|
|
224
|
+
export const stackDirection = {
|
|
225
|
+
top: 'stack-top',
|
|
226
|
+
bottom: 'stack-bottom',
|
|
227
|
+
start: 'stack-start',
|
|
228
|
+
end: 'stack-end',
|
|
229
|
+
};
|
|
230
|
+
/** Literal daisyUI class per `Tone` for `ChatBubble`; a lookup table so Tailwind's scanner sees every class. */
|
|
231
|
+
export const chatBubbleTone = {
|
|
232
|
+
neutral: 'chat-bubble-neutral',
|
|
233
|
+
primary: 'chat-bubble-primary',
|
|
234
|
+
secondary: 'chat-bubble-secondary',
|
|
235
|
+
accent: 'chat-bubble-accent',
|
|
236
|
+
info: 'chat-bubble-info',
|
|
237
|
+
success: 'chat-bubble-success',
|
|
238
|
+
warning: 'chat-bubble-warning',
|
|
239
|
+
error: 'chat-bubble-error',
|
|
240
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://www.schemastore.org/package",
|
|
3
3
|
"name": "@thomasfosterau/components",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Accessible Svelte 5 UI primitives — Tailwind CSS 4 and daisyUI 5 for styling, bits-ui for interaction, every string a prop",
|
|
7
7
|
"keywords": [
|
|
@@ -54,6 +54,16 @@
|
|
|
54
54
|
"svelte": "./dist/tips/index.js",
|
|
55
55
|
"default": "./dist/tips/index.js"
|
|
56
56
|
},
|
|
57
|
+
"./dates": {
|
|
58
|
+
"types": "./dist/fields/dates.d.ts",
|
|
59
|
+
"svelte": "./dist/fields/dates.js",
|
|
60
|
+
"default": "./dist/fields/dates.js"
|
|
61
|
+
},
|
|
62
|
+
"./hotkeys": {
|
|
63
|
+
"types": "./dist/hotkeys/index.d.ts",
|
|
64
|
+
"svelte": "./dist/hotkeys/index.js",
|
|
65
|
+
"default": "./dist/hotkeys/index.js"
|
|
66
|
+
},
|
|
57
67
|
"./seo": {
|
|
58
68
|
"types": "./dist/seo/index.d.ts",
|
|
59
69
|
"svelte": "./dist/seo/index.js",
|
|
@@ -64,37 +74,43 @@
|
|
|
64
74
|
"svelte": "./dist/forms/entity-form.js",
|
|
65
75
|
"default": "./dist/forms/entity-form.js"
|
|
66
76
|
},
|
|
77
|
+
"./context-menu": {
|
|
78
|
+
"types": "./dist/ui/context-menu.d.ts",
|
|
79
|
+
"svelte": "./dist/ui/context-menu.js",
|
|
80
|
+
"default": "./dist/ui/context-menu.js"
|
|
81
|
+
},
|
|
67
82
|
"./theme.css": "./dist/theme.css"
|
|
68
83
|
},
|
|
69
84
|
"dependencies": {
|
|
70
|
-
"@internationalized/date": "
|
|
71
|
-
"@lucide/svelte": "
|
|
72
|
-
"bits-ui": "
|
|
85
|
+
"@internationalized/date": "^3.8.1",
|
|
86
|
+
"@lucide/svelte": "^1.69.0",
|
|
87
|
+
"bits-ui": "^2.20.2"
|
|
73
88
|
},
|
|
74
89
|
"devDependencies": {
|
|
75
|
-
"@storybook/addon-a11y": "
|
|
76
|
-
"@storybook/addon-svelte-csf": "
|
|
77
|
-
"@storybook/sveltekit": "
|
|
78
|
-
"@sveltejs/kit": "
|
|
79
|
-
"@sveltejs/package": "
|
|
80
|
-
"@sveltejs/vite-plugin-svelte": "
|
|
81
|
-
"@tailwindcss/vite": "
|
|
82
|
-
"@testing-library/jest-dom": "
|
|
83
|
-
"@thomasfosterau/effect-forms-svelte": "
|
|
84
|
-
"@types/node": "
|
|
85
|
-
"@vitest/browser-playwright": "
|
|
86
|
-
"daisyui": "
|
|
87
|
-
"effect": "
|
|
88
|
-
"playwright": "
|
|
89
|
-
"storybook": "
|
|
90
|
-
"svelte": "
|
|
91
|
-
"svelte-check": "
|
|
92
|
-
"tailwindcss": "
|
|
93
|
-
"vitest
|
|
90
|
+
"@storybook/addon-a11y": "^10.6.5",
|
|
91
|
+
"@storybook/addon-svelte-csf": "^5.1.6",
|
|
92
|
+
"@storybook/sveltekit": "^10.6.5",
|
|
93
|
+
"@sveltejs/kit": "3.1.1",
|
|
94
|
+
"@sveltejs/package": "3.0.2",
|
|
95
|
+
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
96
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
97
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
98
|
+
"@thomasfosterau/effect-forms-svelte": "^0.3.1",
|
|
99
|
+
"@types/node": "^26.6.6",
|
|
100
|
+
"@vitest/browser-playwright": "5.0.5",
|
|
101
|
+
"daisyui": "^5.7.50",
|
|
102
|
+
"effect": "4.1.2",
|
|
103
|
+
"playwright": "1.64.1",
|
|
104
|
+
"storybook": "^10.6.5",
|
|
105
|
+
"svelte": "^5.57.3",
|
|
106
|
+
"svelte-check": "^4.7.7",
|
|
107
|
+
"tailwindcss": "^4.3.3",
|
|
108
|
+
"vitest": "5.0.5",
|
|
109
|
+
"vitest-browser-svelte": "^3.1.0"
|
|
94
110
|
},
|
|
95
111
|
"peerDependencies": {
|
|
96
|
-
"@thomasfosterau/effect-forms-svelte": "
|
|
97
|
-
"svelte": "
|
|
112
|
+
"@thomasfosterau/effect-forms-svelte": "^0.3.1",
|
|
113
|
+
"svelte": "^5.40.0"
|
|
98
114
|
},
|
|
99
115
|
"peerDependenciesMeta": {
|
|
100
116
|
"@thomasfosterau/effect-forms-svelte": {
|