zabi-components 7.0.2 → 8.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 +1924 -0
- package/README.md +287 -11
- package/THEME.md +149 -332
- package/THEMING.md +1329 -163
- package/dist/atoms/ActionPanel.svelte +24 -9
- package/dist/atoms/ActionPanel.svelte.d.ts +2 -0
- package/dist/atoms/Avatar.svelte +104 -0
- package/dist/atoms/Avatar.svelte.d.ts +34 -0
- package/dist/atoms/Badge.svelte +124 -58
- package/dist/atoms/Badge.svelte.d.ts +17 -5
- package/dist/atoms/Button.svelte +212 -62
- package/dist/atoms/Button.svelte.d.ts +33 -2
- package/dist/atoms/Card.svelte +31 -28
- package/dist/atoms/Card.svelte.d.ts +5 -2
- package/dist/atoms/CardContent.svelte +10 -2
- package/dist/atoms/CardContent.svelte.d.ts +2 -0
- package/dist/atoms/CardFooter.svelte +10 -2
- package/dist/atoms/CardFooter.svelte.d.ts +2 -0
- package/dist/atoms/CardHeader.svelte +26 -6
- package/dist/atoms/CardHeader.svelte.d.ts +2 -0
- package/dist/atoms/Checkbox.svelte +52 -21
- package/dist/atoms/Checkbox.svelte.d.ts +6 -2
- package/dist/atoms/CodeBlock.svelte +35 -9
- package/dist/atoms/CodeBlock.svelte.d.ts +13 -3
- package/dist/atoms/ColorPicker.svelte +272 -52
- package/dist/atoms/ColorPicker.svelte.d.ts +6 -1
- package/dist/atoms/Container.svelte +17 -10
- package/dist/atoms/DateField.svelte +107 -0
- package/dist/atoms/DateField.svelte.d.ts +53 -0
- package/dist/atoms/Divider.svelte +4 -4
- package/dist/atoms/FeatureCard.svelte +4 -3
- package/dist/atoms/FieldMessages.svelte +69 -0
- package/dist/atoms/FieldMessages.svelte.d.ts +23 -0
- package/dist/atoms/FloatingActionButton.svelte +174 -0
- package/dist/atoms/FloatingActionButton.svelte.d.ts +51 -0
- package/dist/atoms/Heading.svelte +93 -32
- package/dist/atoms/Heading.svelte.d.ts +24 -4
- package/dist/atoms/IconButton.svelte +242 -53
- package/dist/atoms/IconButton.svelte.d.ts +49 -4
- package/dist/atoms/Input.svelte +267 -74
- package/dist/atoms/Input.svelte.d.ts +32 -2
- package/dist/atoms/List.svelte +13 -2
- package/dist/atoms/List.svelte.d.ts +2 -0
- package/dist/atoms/ListItem.svelte +44 -11
- package/dist/atoms/ListItem.svelte.d.ts +5 -0
- package/dist/atoms/ListItemLeading.svelte +4 -2
- package/dist/atoms/ListItemLeading.svelte.d.ts +1 -1
- package/dist/atoms/OptimizedImage.svelte +11 -2
- package/dist/atoms/OptimizedImage.svelte.d.ts +2 -0
- package/dist/atoms/Progress.svelte +31 -9
- package/dist/atoms/Progress.svelte.d.ts +6 -0
- package/dist/atoms/Radio.svelte +23 -3
- package/dist/atoms/Radio.svelte.d.ts +6 -2
- package/dist/atoms/Rating.svelte +494 -0
- package/dist/atoms/Rating.svelte.d.ts +56 -0
- package/dist/atoms/Select.svelte +475 -135
- package/dist/atoms/Select.svelte.d.ts +52 -2
- package/dist/atoms/SelectionControl.svelte +99 -18
- package/dist/atoms/SelectionControl.svelte.d.ts +6 -3
- package/dist/atoms/Skeleton.svelte +5 -3
- package/dist/atoms/Slider.svelte +309 -0
- package/dist/atoms/Slider.svelte.d.ts +40 -0
- package/dist/atoms/Spinner.svelte +57 -0
- package/dist/atoms/Spinner.svelte.d.ts +19 -0
- package/dist/atoms/Table.svelte +152 -6
- package/dist/atoms/Table.svelte.d.ts +15 -3
- package/dist/atoms/TemporalField.svelte +140 -0
- package/dist/atoms/TemporalField.svelte.d.ts +32 -0
- package/dist/atoms/Text.svelte +56 -15
- package/dist/atoms/Text.svelte.d.ts +13 -4
- package/dist/atoms/Textarea.svelte +57 -45
- package/dist/atoms/Textarea.svelte.d.ts +14 -2
- package/dist/atoms/ThemeToggle.svelte +238 -56
- package/dist/atoms/ThemeToggle.svelte.d.ts +28 -3
- package/dist/atoms/TimeField.svelte +108 -0
- package/dist/atoms/TimeField.svelte.d.ts +54 -0
- package/dist/atoms/Toast.svelte +25 -10
- package/dist/atoms/Toast.svelte.d.ts +2 -0
- package/dist/atoms/Toggle.svelte +60 -19
- package/dist/atoms/Toggle.svelte.d.ts +18 -2
- package/dist/atoms/Tooltip.svelte +583 -40
- package/dist/atoms/Tooltip.svelte.d.ts +26 -0
- package/dist/atoms/ZabiStringsProvider.svelte +45 -0
- package/dist/atoms/ZabiStringsProvider.svelte.d.ts +27 -0
- package/dist/atoms/index.d.ts +17 -0
- package/dist/atoms/index.js +12 -0
- package/dist/atoms/selection-control.styles.d.ts +36 -5
- package/dist/atoms/selection-control.styles.js +40 -9
- package/dist/components/atoms/index.d.ts +17 -0
- package/dist/components/atoms/index.d.ts.map +1 -1
- package/dist/components/atoms/selection-control.styles.d.ts +36 -5
- package/dist/components/atoms/selection-control.styles.d.ts.map +1 -1
- package/dist/components/index.d.ts +83 -3
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/molecules/index.d.ts +46 -0
- package/dist/components/molecules/index.d.ts.map +1 -1
- package/dist/components/molecules/toast-store.d.ts +53 -7
- package/dist/components/molecules/toast-store.d.ts.map +1 -1
- package/dist/components/organisms/index.d.ts +6 -0
- package/dist/components/organisms/index.d.ts.map +1 -1
- package/dist/components/types/variants.d.ts +15 -1
- package/dist/components/types/variants.d.ts.map +1 -1
- package/dist/components/util/app-shell.d.ts +28 -0
- package/dist/components/util/app-shell.d.ts.map +1 -0
- package/dist/components/util/avatar.d.ts +36 -0
- package/dist/components/util/avatar.d.ts.map +1 -0
- package/dist/components/util/bottom-sheet.d.ts +30 -0
- package/dist/components/util/bottom-sheet.d.ts.map +1 -0
- package/dist/components/util/bottom-tab-bar.d.ts +35 -0
- package/dist/components/util/bottom-tab-bar.d.ts.map +1 -0
- package/dist/components/util/calendar.d.ts +56 -0
- package/dist/components/util/calendar.d.ts.map +1 -0
- package/dist/components/util/cn.d.ts +8 -0
- package/dist/components/util/cn.d.ts.map +1 -0
- package/dist/components/util/collapsible.d.ts +58 -0
- package/dist/components/util/collapsible.d.ts.map +1 -0
- package/dist/components/util/confirm-dialog.d.ts +12 -0
- package/dist/components/util/confirm-dialog.d.ts.map +1 -0
- package/dist/components/util/date.d.ts +96 -0
- package/dist/components/util/date.d.ts.map +1 -0
- package/dist/components/util/drawer.d.ts +13 -0
- package/dist/components/util/drawer.d.ts.map +1 -0
- package/dist/components/util/dropdown.d.ts +47 -0
- package/dist/components/util/dropdown.d.ts.map +1 -0
- package/dist/components/util/field.d.ts +39 -0
- package/dist/components/util/field.d.ts.map +1 -0
- package/dist/components/util/fit-in-viewport.d.ts +201 -0
- package/dist/components/util/fit-in-viewport.d.ts.map +1 -0
- package/dist/components/util/focus-utils.d.ts +75 -2
- package/dist/components/util/focus-utils.d.ts.map +1 -1
- package/dist/components/util/hydration.d.ts +45 -0
- package/dist/components/util/hydration.d.ts.map +1 -0
- package/dist/components/util/keyboard-inset.d.ts +18 -0
- package/dist/components/util/keyboard-inset.d.ts.map +1 -0
- package/dist/components/util/media-grid.d.ts +51 -0
- package/dist/components/util/media-grid.d.ts.map +1 -0
- package/dist/components/util/media.d.ts +6 -0
- package/dist/components/util/media.d.ts.map +1 -0
- package/dist/components/util/overlay-chrome.d.ts +53 -0
- package/dist/components/util/overlay-chrome.d.ts.map +1 -0
- package/dist/components/util/overlay.d.ts +72 -0
- package/dist/components/util/overlay.d.ts.map +1 -0
- package/dist/components/util/photo.d.ts +215 -0
- package/dist/components/util/photo.d.ts.map +1 -0
- package/dist/components/util/portal.d.ts +23 -0
- package/dist/components/util/portal.d.ts.map +1 -0
- package/dist/components/util/pull-to-refresh.d.ts +27 -0
- package/dist/components/util/pull-to-refresh.d.ts.map +1 -0
- package/dist/components/util/radio-keys.d.ts +25 -0
- package/dist/components/util/radio-keys.d.ts.map +1 -0
- package/dist/components/util/rating.d.ts +23 -0
- package/dist/components/util/rating.d.ts.map +1 -0
- package/dist/components/util/ready-made-strings.d.ts +77 -0
- package/dist/components/util/ready-made-strings.d.ts.map +1 -0
- package/dist/components/util/scroll-padding.d.ts +20 -0
- package/dist/components/util/scroll-padding.d.ts.map +1 -0
- package/dist/components/util/segmented-control.d.ts +16 -0
- package/dist/components/util/segmented-control.d.ts.map +1 -0
- package/dist/components/util/select.d.ts +41 -0
- package/dist/components/util/select.d.ts.map +1 -0
- package/dist/components/util/sheet-drag.d.ts +60 -0
- package/dist/components/util/sheet-drag.d.ts.map +1 -0
- package/dist/components/util/sidebar.d.ts +63 -0
- package/dist/components/util/sidebar.d.ts.map +1 -0
- package/dist/components/util/sortable-list.d.ts +65 -0
- package/dist/components/util/sortable-list.d.ts.map +1 -0
- package/dist/components/util/ssr-safe.d.ts +4 -4
- package/dist/components/util/ssr-safe.d.ts.map +1 -1
- package/dist/components/util/stepper.d.ts +40 -0
- package/dist/components/util/stepper.d.ts.map +1 -0
- package/dist/components/util/swipeable-list-item.d.ts +36 -0
- package/dist/components/util/swipeable-list-item.d.ts.map +1 -0
- package/dist/components/util/theme-mode.d.ts +80 -0
- package/dist/components/util/theme-mode.d.ts.map +1 -0
- package/dist/components/util/toaster.d.ts +93 -0
- package/dist/components/util/toaster.d.ts.map +1 -0
- package/dist/components/util/tooltip.d.ts +10 -0
- package/dist/components/util/tooltip.d.ts.map +1 -0
- package/dist/components/util/top-navbar.d.ts +11 -0
- package/dist/components/util/top-navbar.d.ts.map +1 -0
- package/dist/components/util/touch-target.d.ts +31 -0
- package/dist/components/util/touch-target.d.ts.map +1 -0
- package/dist/components/util/zabi-strings.d.ts +133 -0
- package/dist/components/util/zabi-strings.d.ts.map +1 -0
- package/dist/create-theme/cli.js +169 -0
- package/dist/create-theme/index.d.ts +176 -0
- package/dist/create-theme/index.js +817 -0
- package/dist/create-theme/lib/ramp-math.js +128 -0
- package/dist/create-theme/lib/resolve.js +141 -0
- package/dist/create-theme/theme-data.js +1116 -0
- package/dist/index.d.ts +83 -3
- package/dist/index.js +60 -8
- package/dist/molecules/Alert.svelte +73 -66
- package/dist/molecules/Alert.svelte.d.ts +9 -1
- package/dist/molecules/AppBar.svelte +415 -0
- package/dist/molecules/AppBar.svelte.d.ts +69 -0
- package/dist/molecules/AvatarGroup.svelte +116 -0
- package/dist/molecules/AvatarGroup.svelte.d.ts +40 -0
- package/dist/molecules/BottomSheet.svelte +540 -0
- package/dist/molecules/BottomSheet.svelte.d.ts +93 -0
- package/dist/molecules/BottomTabBar.svelte +297 -0
- package/dist/molecules/BottomTabBar.svelte.d.ts +64 -0
- package/dist/molecules/Calendar.svelte +597 -0
- package/dist/molecules/Calendar.svelte.d.ts +72 -0
- package/dist/molecules/Collapsible.svelte +243 -0
- package/dist/molecules/Collapsible.svelte.d.ts +44 -0
- package/dist/molecules/CollapsibleGroup.svelte +126 -0
- package/dist/molecules/CollapsibleGroup.svelte.d.ts +14 -0
- package/dist/molecules/ComponentDemo.svelte +25 -5
- package/dist/molecules/ComponentDemo.svelte.d.ts +5 -0
- package/dist/molecules/ConfirmDialog.svelte +253 -0
- package/dist/molecules/ConfirmDialog.svelte.d.ts +55 -0
- package/dist/molecules/ContactForm.svelte +46 -19
- package/dist/molecules/ContactForm.svelte.d.ts +10 -0
- package/dist/molecules/Drawer.svelte +394 -0
- package/dist/molecules/Drawer.svelte.d.ts +55 -0
- package/dist/molecules/Dropdown.svelte +540 -50
- package/dist/molecules/Dropdown.svelte.d.ts +49 -6
- package/dist/molecules/DropdownItem.svelte +122 -0
- package/dist/molecules/DropdownItem.svelte.d.ts +28 -0
- package/dist/molecules/EmptyState.svelte +56 -10
- package/dist/molecules/EmptyState.svelte.d.ts +8 -0
- package/dist/molecules/Form.svelte +25 -14
- package/dist/molecules/Form.svelte.d.ts +13 -5
- package/dist/molecules/FormField.svelte +11 -2
- package/dist/molecules/FormField.svelte.d.ts +2 -0
- package/dist/molecules/Header.svelte +13 -3
- package/dist/molecules/Header.svelte.d.ts +2 -0
- package/dist/molecules/ImageUpload.svelte +422 -70
- package/dist/molecules/ImageUpload.svelte.d.ts +61 -5
- package/dist/molecules/MediaGrid.svelte +527 -0
- package/dist/molecules/MediaGrid.svelte.d.ts +77 -0
- package/dist/molecules/Modal.svelte +340 -45
- package/dist/molecules/Modal.svelte.d.ts +59 -7
- package/dist/molecules/NavigationMenu.svelte +15 -3
- package/dist/molecules/NavigationMenu.svelte.d.ts +4 -0
- package/dist/molecules/NavigationMenuContent.svelte +91 -36
- package/dist/molecules/NavigationMenuContent.svelte.d.ts +2 -0
- package/dist/molecules/NavigationMenuItem.svelte +10 -3
- package/dist/molecules/NavigationMenuItem.svelte.d.ts +2 -0
- package/dist/molecules/NavigationMenuLink.svelte +10 -2
- package/dist/molecules/NavigationMenuLink.svelte.d.ts +2 -0
- package/dist/molecules/NavigationMenuList.svelte +19 -4
- package/dist/molecules/NavigationMenuList.svelte.d.ts +2 -0
- package/dist/molecules/NavigationMenuTrigger.svelte +16 -3
- package/dist/molecules/NavigationMenuTrigger.svelte.d.ts +2 -0
- package/dist/molecules/Page.svelte +38 -2
- package/dist/molecules/Page.svelte.d.ts +13 -0
- package/dist/molecules/PhotoGrid.svelte +433 -0
- package/dist/molecules/PhotoGrid.svelte.d.ts +62 -0
- package/dist/molecules/PhotoViewer.svelte +1116 -0
- package/dist/molecules/PhotoViewer.svelte.d.ts +56 -0
- package/dist/molecules/PropsTable.svelte +26 -11
- package/dist/molecules/PropsTable.svelte.d.ts +5 -0
- package/dist/molecules/PullToRefresh.svelte +263 -0
- package/dist/molecules/PullToRefresh.svelte.d.ts +52 -0
- package/dist/molecules/RadioGroup.svelte +57 -15
- package/dist/molecules/RadioGroup.svelte.d.ts +16 -3
- package/dist/molecules/Section.svelte +13 -5
- package/dist/molecules/Section.svelte.d.ts +3 -1
- package/dist/molecules/SegmentedControl.svelte +323 -0
- package/dist/molecules/SegmentedControl.svelte.d.ts +34 -0
- package/dist/molecules/SidebarBrandHeader.svelte +24 -5
- package/dist/molecules/SidebarBrandHeader.svelte.d.ts +5 -0
- package/dist/molecules/SidebarFooter.svelte +39 -8
- package/dist/molecules/SidebarFooter.svelte.d.ts +5 -0
- package/dist/molecules/SidebarNavSection.svelte +12 -4
- package/dist/molecules/SidebarNavSection.svelte.d.ts +2 -0
- package/dist/molecules/SlideUp.svelte +253 -30
- package/dist/molecules/SlideUp.svelte.d.ts +31 -4
- package/dist/molecules/SortableList.svelte +632 -0
- package/dist/molecules/SortableList.svelte.d.ts +69 -0
- package/dist/molecules/Stepper.svelte +548 -0
- package/dist/molecules/Stepper.svelte.d.ts +39 -0
- package/dist/molecules/StickyActionBar.svelte +191 -0
- package/dist/molecules/StickyActionBar.svelte.d.ts +65 -0
- package/dist/molecules/SwipeableListItem.svelte +334 -0
- package/dist/molecules/SwipeableListItem.svelte.d.ts +54 -0
- package/dist/molecules/Tabs.svelte +254 -24
- package/dist/molecules/Tabs.svelte.d.ts +15 -4
- package/dist/molecules/Toaster.svelte +352 -6
- package/dist/molecules/Toaster.svelte.d.ts +95 -2
- package/dist/molecules/ToasterToast.svelte +279 -62
- package/dist/molecules/ToasterToast.svelte.d.ts +11 -0
- package/dist/molecules/UnsavedChangesBar.svelte +212 -0
- package/dist/molecules/UnsavedChangesBar.svelte.d.ts +43 -0
- package/dist/molecules/index.d.ts +46 -0
- package/dist/molecules/index.js +27 -0
- package/dist/molecules/toast-store.d.ts +53 -7
- package/dist/molecules/toast-store.js +21 -0
- package/dist/organisms/AppShell.svelte +196 -0
- package/dist/organisms/AppShell.svelte.d.ts +61 -0
- package/dist/organisms/SidebarAccountPanel.svelte +111 -12
- package/dist/organisms/SidebarAccountPanel.svelte.d.ts +21 -0
- package/dist/organisms/SidebarNavigation.svelte +193 -69
- package/dist/organisms/SidebarNavigation.svelte.d.ts +31 -1
- package/dist/organisms/SidebarPanel.svelte +45 -16
- package/dist/organisms/SidebarPanel.svelte.d.ts +2 -0
- package/dist/organisms/SidebarShell.svelte +263 -0
- package/dist/organisms/SidebarShell.svelte.d.ts +106 -0
- package/dist/organisms/TopNavbar.svelte +329 -33
- package/dist/organisms/TopNavbar.svelte.d.ts +28 -0
- package/dist/organisms/index.d.ts +6 -0
- package/dist/organisms/index.js +4 -0
- package/dist/routes/lib/variant-utils.d.ts +26 -0
- package/dist/routes/lib/{variant-utils.ts → variant-utils.js} +15 -46
- package/dist/types/components.d.ts +4 -0
- package/dist/types/components.d.ts.map +1 -1
- package/dist/types/events.js +1 -0
- package/dist/types/index.d.ts +605 -25
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -0
- package/dist/types/variants.ts +17 -1
- package/dist/util/app-shell.d.ts +27 -0
- package/dist/util/app-shell.js +72 -0
- package/dist/util/avatar.d.ts +35 -0
- package/dist/util/avatar.js +52 -0
- package/dist/util/bottom-sheet.d.ts +29 -0
- package/dist/util/bottom-sheet.js +43 -0
- package/dist/util/bottom-tab-bar.d.ts +34 -0
- package/dist/util/bottom-tab-bar.js +54 -0
- package/dist/util/calendar.d.ts +55 -0
- package/dist/util/calendar.js +74 -0
- package/dist/util/cn.d.ts +7 -0
- package/dist/util/cn.js +48 -0
- package/dist/util/collapsible.d.ts +57 -0
- package/dist/util/collapsible.js +23 -0
- package/dist/util/confirm-dialog.d.ts +11 -0
- package/dist/util/confirm-dialog.js +2 -0
- package/dist/util/date.d.ts +95 -0
- package/dist/util/date.js +237 -0
- package/dist/util/drawer.d.ts +12 -0
- package/dist/util/drawer.js +7 -0
- package/dist/util/dropdown.d.ts +46 -0
- package/dist/util/dropdown.js +21 -0
- package/dist/util/field.d.ts +38 -0
- package/dist/util/field.js +38 -0
- package/dist/util/fit-in-viewport.d.ts +200 -0
- package/dist/util/fit-in-viewport.js +399 -0
- package/dist/util/focus-utils.d.ts +75 -2
- package/dist/util/focus-utils.js +182 -9
- package/dist/util/hydration.d.ts +44 -0
- package/dist/util/hydration.js +58 -0
- package/dist/util/keyboard-inset.d.ts +17 -0
- package/dist/util/keyboard-inset.js +53 -0
- package/dist/util/media-grid.d.ts +50 -0
- package/dist/util/media-grid.js +81 -0
- package/dist/util/media.d.ts +5 -0
- package/dist/util/media.js +10 -0
- package/dist/util/overlay-chrome.d.ts +52 -0
- package/dist/util/overlay-chrome.js +56 -0
- package/dist/util/overlay.d.ts +71 -0
- package/dist/util/overlay.js +240 -0
- package/dist/util/photo.d.ts +214 -0
- package/dist/util/photo.js +206 -0
- package/dist/util/portal.d.ts +22 -0
- package/dist/util/portal.js +50 -0
- package/dist/util/pull-to-refresh.d.ts +26 -0
- package/dist/util/pull-to-refresh.js +30 -0
- package/dist/util/radio-keys.d.ts +24 -0
- package/dist/util/radio-keys.js +49 -0
- package/dist/util/rating.d.ts +22 -0
- package/dist/util/rating.js +26 -0
- package/dist/util/ready-made-strings.d.ts +76 -0
- package/dist/util/ready-made-strings.js +67 -0
- package/dist/util/scroll-padding.d.ts +19 -0
- package/dist/util/scroll-padding.js +44 -0
- package/dist/util/segmented-control.d.ts +15 -0
- package/dist/util/segmented-control.js +1 -0
- package/dist/util/select.d.ts +40 -0
- package/dist/util/select.js +63 -0
- package/dist/util/sheet-drag.d.ts +59 -0
- package/dist/util/sheet-drag.js +241 -0
- package/dist/util/sidebar.d.ts +62 -0
- package/dist/util/sidebar.js +38 -0
- package/dist/util/sortable-list.d.ts +64 -0
- package/dist/util/sortable-list.js +53 -0
- package/dist/util/ssr-safe.d.ts +4 -4
- package/dist/util/stepper.d.ts +39 -0
- package/dist/util/stepper.js +38 -0
- package/dist/util/swipeable-list-item.d.ts +35 -0
- package/dist/util/swipeable-list-item.js +32 -0
- package/dist/util/theme-mode.d.ts +79 -0
- package/dist/util/theme-mode.js +121 -0
- package/dist/util/toaster.d.ts +92 -0
- package/dist/util/toaster.js +75 -0
- package/dist/util/tooltip.d.ts +9 -0
- package/dist/util/tooltip.js +18 -0
- package/dist/util/top-navbar.d.ts +10 -0
- package/dist/util/top-navbar.js +5 -0
- package/dist/util/touch-target.d.ts +30 -0
- package/dist/util/touch-target.js +30 -0
- package/dist/util/zabi-strings.d.ts +132 -0
- package/dist/util/zabi-strings.js +105 -0
- package/dist/zabi-components-colors.css +5 -2
- package/dist/zabi-components-theme-dark-only.css +574 -225
- package/dist/zabi-components-theme-dark.css +574 -225
- package/dist/zabi-components-theme-only.css +1680 -317
- package/dist/zabi-components-theme.css +1680 -317
- package/dist/zabi-components.css +4473 -1158
- package/docs/lucide-icons.md +41 -16
- package/docs/theme-imports.md +81 -11
- package/package.json +51 -29
- package/dist/lib/layout-width-tokens.d.ts +0 -17
- package/dist/lib/layout-width-tokens.d.ts.map +0 -1
- package/dist/lib/showcase/component-docs/Button.d.ts +0 -3
- package/dist/lib/showcase/component-docs/Button.d.ts.map +0 -1
- package/dist/lib/showcase/component-docs/Input.d.ts +0 -3
- package/dist/lib/showcase/component-docs/Input.d.ts.map +0 -1
- package/dist/lib/showcase/component-docs/List.d.ts +0 -3
- package/dist/lib/showcase/component-docs/List.d.ts.map +0 -1
- package/dist/lib/showcase/component-docs/Modal.d.ts +0 -3
- package/dist/lib/showcase/component-docs/Modal.d.ts.map +0 -1
- package/dist/lib/showcase/component-docs/Radio.d.ts +0 -3
- package/dist/lib/showcase/component-docs/Radio.d.ts.map +0 -1
- package/dist/lib/showcase/component-docs/SidebarNavigation.d.ts +0 -3
- package/dist/lib/showcase/component-docs/SidebarNavigation.d.ts.map +0 -1
- package/dist/lib/showcase/component-docs/Skeleton.d.ts +0 -3
- package/dist/lib/showcase/component-docs/Skeleton.d.ts.map +0 -1
- package/dist/lib/showcase/component-docs/_shared.d.ts +0 -12
- package/dist/lib/showcase/component-docs/_shared.d.ts.map +0 -1
- package/dist/lib/showcase/component-docs/index.d.ts +0 -4
- package/dist/lib/showcase/component-docs/index.d.ts.map +0 -1
- package/dist/lib/showcase/components-catalog.d.ts +0 -3
- package/dist/lib/showcase/components-catalog.d.ts.map +0 -1
- package/dist/lib/showcase/components-showcase-constants.d.ts +0 -89
- package/dist/lib/showcase/components-showcase-constants.d.ts.map +0 -1
- package/dist/lib/showcase/docs-sidebar-helpers.d.ts +0 -15
- package/dist/lib/showcase/docs-sidebar-helpers.d.ts.map +0 -1
- package/dist/routes/lib/focus-utils.d.ts +0 -12
- package/dist/routes/lib/focus-utils.ts +0 -110
- package/dist/routes/lib/ssr-safe.ts +0 -58
- package/scripts/fix-lucide-svelte-icon-dts.js +0 -35
package/docs/lucide-icons.md
CHANGED
|
@@ -1,24 +1,49 @@
|
|
|
1
1
|
# Lucide icons used by zabi-components
|
|
2
2
|
|
|
3
|
-
The package depends on `@lucide/svelte`.
|
|
3
|
+
The package depends on `@lucide/svelte`. Every component imports each icon it uses from that icon's own file:
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
```ts
|
|
6
|
+
import ChevronDown from "@lucide/svelte/icons/chevron-down";
|
|
7
|
+
```
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|--------|--------------|--------|
|
|
9
|
-
| `CodeBlock` | Per-icon path | `check`, `copy` |
|
|
10
|
-
| `ThemeToggle` | Barrel | `Sun`, `Moon` |
|
|
11
|
-
| `ListItem` | Barrel | `ArrowRight` |
|
|
12
|
-
| `Badge` | Barrel | `Check`, `AlertTriangle`, `X`, `Info` |
|
|
13
|
-
| `ImageUpload` | Barrel | `Image` |
|
|
14
|
-
| `Input` | Barrel | `CheckCircle`, `AlertTriangle`, `AlertCircle` |
|
|
15
|
-
| `Select` | Barrel | `ChevronDown`, `CheckCircle`, `AlertTriangle`, `AlertCircle` |
|
|
16
|
-
| `SidebarPanel` | Barrel | `Search`, `X` |
|
|
17
|
-
| `SidebarAccountPanel` | Barrel | `LogOut`, `Moon`, `Sun`, `User` |
|
|
18
|
-
| `SidebarNavigation` | Barrel | `Command`, `Search` |
|
|
9
|
+
No component imports from the package's barrel (`import { ChevronDown } from "@lucide/svelte"`). The barrel re-exports every icon, about 1,700 Svelte files, and a bundler has to read and compile all of them to find the one that is used: a SvelteKit app with a single `<Button>` from this library transformed 3,800 modules for its client build when the library used the barrel, and 366 now. `npm run check` fails on a barrel import anywhere under `src` (the components, the stories, the docs site and the catalog's code samples), in `docs`, `.storybook` and the README, because the examples are what gets copied; `npm run build:lib` fails on one in `dist` (`scripts/lucide-barrel.js`). The one exception is `src/types/IconPropsCheck.svelte`, the type test that proves an icon from the barrel is still accepted by every icon prop.
|
|
19
10
|
|
|
20
|
-
|
|
11
|
+
## In your app
|
|
12
|
+
|
|
13
|
+
Import icons the same way, one file each. It is the barrel import that is slow, not the number of icons you use.
|
|
14
|
+
|
|
15
|
+
```svelte
|
|
16
|
+
<script lang="ts">
|
|
17
|
+
import { List } from "zabi-components";
|
|
18
|
+
import House from "@lucide/svelte/icons/house";
|
|
19
|
+
import Settings from "@lucide/svelte/icons/settings";
|
|
20
|
+
|
|
21
|
+
const items = [
|
|
22
|
+
{ id: "1", label: "Home", icon: House },
|
|
23
|
+
{ id: "2", label: "Settings", icon: Settings },
|
|
24
|
+
];
|
|
25
|
+
</script>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
A barrel-imported icon still works wherever a prop takes an icon: the two are the same component with the same type (`src/types/IconPropsCheck.svelte` holds that in `npm run check`). It only costs you the build time described above.
|
|
29
|
+
|
|
30
|
+
## Icons re-exported from the package root
|
|
31
|
+
|
|
32
|
+
For convenience the root entry re-exports a few icons: `Sun`, `Moon`, `Monitor`, `Grip`, `GripVertical`, `ChevronUp`, `ChevronDown`, `ChevronRight`, `Zap`, `Briefcase`, `Clipboard` and `Settings`. Each comes from its own file, so `import { Button } from "zabi-components"` does not reach the barrel.
|
|
33
|
+
|
|
34
|
+
## If your app aliases `@lucide/svelte`
|
|
35
|
+
|
|
36
|
+
An alias for `@lucide/svelte` itself no longer covers what the library imports: the components ask for `@lucide/svelte/icons/<name>`. If you replace Lucide with a hand-authored set, alias those paths, for each of these files:
|
|
37
|
+
|
|
38
|
+
`arrow-left`, `arrow-right`, `briefcase`, `check`, `chevron-down`, `chevron-left`, `chevron-right`, `chevron-up`, `circle-alert`, `circle-check-big`, `clipboard`, `command`, `copy`, `external-link`, `grip`, `grip-vertical`, `image`, `image-off`, `info`, `log-out`, `menu`, `monitor`, `moon`, `octagon-alert`, `play`, `plus`, `search`, `settings`, `star`, `sun`, `trash-2`, `triangle-alert`, `user`, `x`, `zap`.
|
|
39
|
+
|
|
40
|
+
Showcase and demo routes under this repo import additional icons, some of them from the barrel; those are not part of the package.
|
|
21
41
|
|
|
22
42
|
## Typings for `@lucide/svelte/icons/*`
|
|
23
43
|
|
|
24
|
-
|
|
44
|
+
`@lucide/svelte` 0.544.x ships per-icon `.svelte.d.ts` files with a duplicate `type X = ReturnType<typeof X>` line that makes some TypeScript language services treat them as non-modules, so an editor may report that an icon has no default export. It affects editor tooling only, not runtime and not a build.
|
|
45
|
+
|
|
46
|
+
The package runs no install scripts in your project, and since 8.1.0 it lists none either: the dev-only `prepare` script is gone, so installing from a tarball no longer makes npm print an `install-scripts` notice.
|
|
47
|
+
|
|
48
|
+
- In your app: if your editor complains, enable `skipLibCheck` or upgrade `@lucide/svelte`.
|
|
49
|
+
- In this repo: `npm run check` (svelte-check) and `npm run build:lib` pass on a fresh install without any patch. If your editor still shows the error, run `npm run fix:lucide-types` once after installing; it strips the duplicate line from the files in `node_modules` and changes nothing else.
|
package/docs/theme-imports.md
CHANGED
|
@@ -12,8 +12,74 @@ For most Tailwind v4 apps, use:
|
|
|
12
12
|
@import "zabi-components/theme-dark-only";
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
Without Tailwind, import the compiled stylesheet on its own:
|
|
16
|
+
|
|
17
|
+
```css
|
|
18
|
+
@import "zabi-components/css";
|
|
19
|
+
```
|
|
20
|
+
|
|
15
21
|
Use short package exports by default. Legacy deep `dist` imports remain supported for compatibility.
|
|
16
22
|
|
|
23
|
+
## What the theme files contain
|
|
24
|
+
|
|
25
|
+
`theme` and `theme-only` hold three things:
|
|
26
|
+
|
|
27
|
+
1. An `@source` directive for the package's own components. Tailwind CSS v4 does not scan `node_modules`, and this is what makes it generate the classes the components use. You do not need an `@source` line of your own.
|
|
28
|
+
2. The `@theme` block with every token.
|
|
29
|
+
3. The hand-written component rules that Tailwind cannot generate from the tokens: `.focus-ring`, `.text-action-primary`, the action hover, active and disabled states, the semantic colour classes and the `z-*` scale.
|
|
30
|
+
|
|
31
|
+
`theme-dark` and `theme-dark-only` hold the dark overrides, under three selectors:
|
|
32
|
+
|
|
33
|
+
```css
|
|
34
|
+
.dark, [data-theme="dark"] { … }
|
|
35
|
+
@media (prefers-color-scheme: dark) { [data-theme="auto"] { … } }
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Put `class="dark"` or `data-theme="dark"` on `<html>` for dark, `data-theme="auto"` to follow the system, and `data-theme="light"` (or nothing) for light. Following the system is opt-in. See [THEMING.md](../THEMING.md#light-dark-and-auto).
|
|
39
|
+
|
|
40
|
+
The dark files only remap roles. The raw palettes (`--zabi-brand-*`, `--zabi-accent-*`, `--zabi-base-*` and the rest) are declared once, in the light theme, so that an app's override of them on `:root` applies in both modes. Before 8.1.0 the dark files restated those ramps; they no longer do, so a dark file must be imported together with a light one (`theme`, `theme-only`, or `colors`, which has both).
|
|
41
|
+
|
|
42
|
+
## Rebranding
|
|
43
|
+
|
|
44
|
+
Generate one file from your brand colour and import it after the theme files:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npx zabi-theme --brand "#C17B00" --neutral "#78716c" --out src/lib/brand.generated.css
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```css
|
|
51
|
+
/* src/lib/theme.css */
|
|
52
|
+
@import "zabi-components/theme-only";
|
|
53
|
+
@import "zabi-components/theme-dark-only";
|
|
54
|
+
@import "./brand.generated.css"; /* --zabi-brand-*, --zabi-accent-*, --zabi-base-* */
|
|
55
|
+
|
|
56
|
+
:root {
|
|
57
|
+
--font-family-heading: "Your Display Font", var(--font-family-sans);
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
One file covers light and dark. Which tokens an app may set, the generator's
|
|
62
|
+
options and what does not follow an override are in the theming guide,
|
|
63
|
+
[THEMING.md](../THEMING.md). The same function is exported as `createTheme()`
|
|
64
|
+
from `zabi-components/create-theme`.
|
|
65
|
+
|
|
66
|
+
The universal scrollbar rules are in the compiled `css` bundle only. Importing a theme does not restyle the scrollbars in your app; add `.scrollbar-semantic` where you want them.
|
|
67
|
+
|
|
68
|
+
## Tailwind together with the compiled stylesheet
|
|
69
|
+
|
|
70
|
+
`zabi-components/css` is a finished Tailwind build. It carries its own copy of every utility the components use, `w-full`, `px-6` and `mt-10` among them, in the same `utilities` layer your Tailwind build writes to. Two builds cannot be sorted into one order, so the import order decides which copy wins:
|
|
71
|
+
|
|
72
|
+
- **Tailwind first, `css` second.** The package's plain utilities land after your variants. `w-full md:w-1/2` stays full width, and `px-6 md:px-8` keeps the narrow padding, wherever the package ships the plain class too.
|
|
73
|
+
- **`css` first, Tailwind second.** Your plain utilities land after the package's variants. `Modal` declares `items-end md:items-center` and `p-0 md:p-4`; if your app uses `items-end` or `p-0` anywhere, the dialog stays at the bottom edge, without padding, on wide screens. A component's own `p-6 pt-0` loses its `pt-0` the same way.
|
|
74
|
+
|
|
75
|
+
Neither order is right. With Tailwind in the app, import `theme-only` and `theme-dark-only` instead, as above: Tailwind then generates each utility once, in its own order, and both cases resolve. If you started on 8.0.0, where `css` was the only import that worked, switch when you upgrade.
|
|
76
|
+
|
|
77
|
+
The hand-written colour classes (`bg-card`, `text-headline`, `border-border` and the rest) are outside every layer, in `css` and in the theme files alike, so they win over any utility on the same element: `bg-card md:bg-red-500` keeps the card colour. Change the colour by replacing the class, not by adding a variant next to it.
|
|
78
|
+
|
|
79
|
+
## Version 8.0.0 and earlier
|
|
80
|
+
|
|
81
|
+
In 8.0.0 and 7.0.2 the theme files were published without semicolons, without the `@source` directive and without the component rules, so they left components unstyled. Upgrade, or import `zabi-components/css`, which worked in those versions too.
|
|
82
|
+
|
|
17
83
|
## Package export paths
|
|
18
84
|
|
|
19
85
|
Use these subpaths with your bundler or `npm`/`pnpm` resolution:
|
|
@@ -22,10 +88,11 @@ Use these subpaths with your bundler or `npm`/`pnpm` resolution:
|
|
|
22
88
|
|--------|-------------|----------|
|
|
23
89
|
| `zabi-components/theme` | `zabi-components-theme.css` | Tailwind **not** already in the project; ships `@import "tailwindcss"` + `@theme`. |
|
|
24
90
|
| `zabi-components/theme-only` | `zabi-components-theme-only.css` | Tailwind **already** configured; merge only the `@theme` block. |
|
|
25
|
-
| `zabi-components/theme-dark` | `zabi-components-theme-dark.css` |
|
|
26
|
-
| `zabi-components/theme-dark-only` | `zabi-components-theme-dark-only.css` | Tailwind present; **only**
|
|
27
|
-
| `zabi-components/colors` | `zabi-components-colors.css` | **No Tailwind**: `:root` + `.dark` CSS variables only. |
|
|
91
|
+
| `zabi-components/theme-dark` | `zabi-components-theme-dark.css` | Tailwind import + the dark overrides (`.dark`, `[data-theme]`); import after `theme`. |
|
|
92
|
+
| `zabi-components/theme-dark-only` | `zabi-components-theme-dark-only.css` | Tailwind present; **only** the dark overrides (import after light theme). |
|
|
93
|
+
| `zabi-components/colors` | `zabi-components-colors.css` | **No Tailwind**: `:root` + dark (`.dark`, `[data-theme]`) CSS variables only. |
|
|
28
94
|
| `zabi-components/css` | `zabi-components.css` | Full compiled CSS (utilities, components styles, dark). |
|
|
95
|
+
| `zabi-components/create-theme` | `create-theme/index.js` | Not CSS: the `createTheme()` function behind the `zabi-theme` command. |
|
|
29
96
|
|
|
30
97
|
### Legacy export paths (supported, deprecated in docs)
|
|
31
98
|
|
|
@@ -43,7 +110,7 @@ These are still exported for backward compatibility but are not the recommended
|
|
|
43
110
|
## Decision matrix
|
|
44
111
|
|
|
45
112
|
1. **Vanilla CSS or no Tailwind** → `colors` (or full `css` if you need utility classes from the bundle).
|
|
46
|
-
2. **Tailwind v4 app, extend design tokens** → `theme-only` (+ `theme-dark-only` if you use `class="dark"` / dark mode).
|
|
113
|
+
2. **Tailwind v4 app, extend design tokens** → `theme-only` (+ `theme-dark-only` if you use `class="dark"` / `data-theme` / dark mode).
|
|
47
114
|
3. **Minimal setup, one import for light** → `theme`.
|
|
48
115
|
4. **Dark as a second file** → `theme` + `theme-dark`, or `theme-only` + `theme-dark-only`.
|
|
49
116
|
|
|
@@ -85,16 +152,17 @@ These are still exported for backward compatibility but are not the recommended
|
|
|
85
152
|
@import "zabi-components/colors";
|
|
86
153
|
```
|
|
87
154
|
|
|
88
|
-
Toggle `.dark` at the root element to activate dark tokens
|
|
155
|
+
Toggle `.dark` at the root element to activate dark tokens, or use `data-theme`:
|
|
89
156
|
|
|
90
157
|
```html
|
|
91
158
|
<html class="dark">
|
|
159
|
+
<html data-theme="auto">
|
|
92
160
|
```
|
|
93
161
|
|
|
94
162
|
## Maintainer checklist (token changes)
|
|
95
163
|
|
|
96
|
-
1. Edit **`src/app.css`** only (`@theme` for light tokens, `.dark` for overrides).
|
|
97
|
-
2.
|
|
164
|
+
1. Edit **`src/app.css`** only (`@theme` for light tokens, the single `.dark` rule for overrides).
|
|
165
|
+
2. Physical ramps (`--zabi-*`) are declared in `@theme` only. `.dark` must not restate them or hold a hex literal; `validate-theme.js` fails the build if it does.
|
|
98
166
|
3. Run **`npm run build:css`** (or **`npm run build:lib`** before publish).
|
|
99
167
|
4. Confirm **`node scripts/verify-build.js`** passes in CI or locally after builds.
|
|
100
168
|
|
|
@@ -102,11 +170,13 @@ Toggle `.dark` at the root element to activate dark tokens:
|
|
|
102
170
|
|
|
103
171
|
| File | Contents |
|
|
104
172
|
|------|----------|
|
|
105
|
-
| `zabi-components.css` | PostCSS/Tailwind output: utilities + theme +
|
|
173
|
+
| `zabi-components.css` | PostCSS/Tailwind output: utilities + theme + dark. |
|
|
106
174
|
| `zabi-components-theme.css` | `@import tailwind` + `@theme`. |
|
|
107
175
|
| `zabi-components-theme-only.css` | `@theme` only. |
|
|
108
|
-
| `zabi-components-theme-dark.css` | `@import tailwind` +
|
|
109
|
-
| `zabi-components-theme-dark-only.css` |
|
|
110
|
-
| `zabi-components-colors.css` | `:root` +
|
|
176
|
+
| `zabi-components-theme-dark.css` | `@import tailwind` + dark. |
|
|
177
|
+
| `zabi-components-theme-dark-only.css` | dark only. |
|
|
178
|
+
| `zabi-components-colors.css` | `:root` + dark as plain custom properties. |
|
|
179
|
+
|
|
180
|
+
"dark" is the `.dark` rule of `src/app.css`, published as `.dark, [data-theme="dark"]` and again as `[data-theme="auto"]` inside `@media (prefers-color-scheme: dark)`, plus `color-scheme` for the three `data-theme` values.
|
|
111
181
|
|
|
112
182
|
Build logic lives in **`scripts/build-css.js`** (see file header for behavior).
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zabi-components",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Svelte 5 UI components with TypeScript
|
|
3
|
+
"version": "8.1.0",
|
|
4
|
+
"description": "Svelte 5 UI component library: accessible components with TypeScript types, Tailwind CSS v4 design tokens, light and dark themes, and SSR support for SvelteKit.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
"types": "./dist/types/index.d.ts",
|
|
32
32
|
"import": "./dist/types/index.js"
|
|
33
33
|
},
|
|
34
|
-
"./react": {
|
|
35
|
-
"types": "./dist/react/index.d.ts",
|
|
36
|
-
"import": "./dist/react/index.js"
|
|
37
|
-
},
|
|
38
34
|
"./lib/ssr-safe": {
|
|
39
|
-
"types": "./dist/
|
|
40
|
-
"import": "./dist/
|
|
35
|
+
"types": "./dist/util/ssr-safe.d.ts",
|
|
36
|
+
"import": "./dist/util/ssr-safe.js"
|
|
41
37
|
},
|
|
42
38
|
"./lib/variant-utils": {
|
|
43
|
-
"types": "./dist/routes/lib/variant-utils.ts",
|
|
44
|
-
"import": "./dist/routes/lib/variant-utils.
|
|
39
|
+
"types": "./dist/routes/lib/variant-utils.d.ts",
|
|
40
|
+
"import": "./dist/routes/lib/variant-utils.js"
|
|
41
|
+
},
|
|
42
|
+
"./create-theme": {
|
|
43
|
+
"types": "./dist/create-theme/index.d.ts",
|
|
44
|
+
"import": "./dist/create-theme/index.js"
|
|
45
45
|
},
|
|
46
46
|
"./dist/zabi-components.css": "./dist/zabi-components.css",
|
|
47
47
|
"./dist/zabi-components-colors.css": "./dist/zabi-components-colors.css",
|
|
@@ -57,25 +57,42 @@
|
|
|
57
57
|
"./css": "./dist/zabi-components.css",
|
|
58
58
|
"./package.json": "./package.json"
|
|
59
59
|
},
|
|
60
|
+
"bin": {
|
|
61
|
+
"zabi-theme": "./dist/create-theme/cli.js"
|
|
62
|
+
},
|
|
63
|
+
"sideEffects": [
|
|
64
|
+
"**/*.css"
|
|
65
|
+
],
|
|
60
66
|
"files": [
|
|
61
67
|
"dist",
|
|
62
68
|
"README.md",
|
|
69
|
+
"CHANGELOG.md",
|
|
63
70
|
"THEME.md",
|
|
64
71
|
"THEMING.md",
|
|
65
72
|
"docs/theme-imports.md",
|
|
66
|
-
"docs/lucide-icons.md"
|
|
67
|
-
"scripts/fix-lucide-svelte-icon-dts.js"
|
|
73
|
+
"docs/lucide-icons.md"
|
|
68
74
|
],
|
|
69
75
|
"keywords": [
|
|
70
76
|
"svelte",
|
|
71
77
|
"svelte5",
|
|
78
|
+
"svelte-5",
|
|
72
79
|
"sveltekit",
|
|
80
|
+
"svelte-components",
|
|
73
81
|
"components",
|
|
82
|
+
"component-library",
|
|
74
83
|
"ui",
|
|
84
|
+
"ui-components",
|
|
85
|
+
"design-system",
|
|
86
|
+
"design-tokens",
|
|
75
87
|
"typescript",
|
|
76
88
|
"tailwind",
|
|
89
|
+
"tailwindcss",
|
|
77
90
|
"runes",
|
|
78
|
-
"ssr"
|
|
91
|
+
"ssr",
|
|
92
|
+
"accessibility",
|
|
93
|
+
"a11y",
|
|
94
|
+
"dark-mode",
|
|
95
|
+
"theming"
|
|
79
96
|
],
|
|
80
97
|
"author": "Zabi Components Team",
|
|
81
98
|
"license": "MIT",
|
|
@@ -87,29 +104,38 @@
|
|
|
87
104
|
"dev": "vite dev",
|
|
88
105
|
"build": "vite build && npm run build:types",
|
|
89
106
|
"build:components": "svelte-package -o dist --input src/components",
|
|
90
|
-
"build:lib-files": "mkdir -p dist/routes/lib dist/types && cp src/components/
|
|
107
|
+
"build:lib-files": "mkdir -p dist/routes/lib dist/types && cp src/components/types/variants.ts dist/types/ && cp src/components/types/page.types.ts dist/types/ && tsc src/routes/lib/variant-utils.ts --declaration --module esnext --target es2020 --moduleResolution bundler --skipLibCheck --rootDir src --outDir .lib-tmp && cp .lib-tmp/routes/lib/variant-utils.js .lib-tmp/routes/lib/variant-utils.d.ts dist/routes/lib/ && rm -rf .lib-tmp",
|
|
91
108
|
"build:fix-imports": "node scripts/fix-package-imports.js",
|
|
92
|
-
"build:lib": "npm run build:css && npm run build:components && npm run build:lib-files && npm run build:fix-imports && npm run build:types && npm run build:css && node scripts/verify-build.js",
|
|
93
|
-
"
|
|
94
|
-
"
|
|
109
|
+
"build:lib": "npm run build:css && npm run build:components && npm run build:lib-files && npm run build:fix-imports && npm run build:types && npm run build:css && npm run build:create-theme && node scripts/verify-build.js",
|
|
110
|
+
"build:create-theme": "node scripts/build-create-theme.js",
|
|
111
|
+
"sync:tokens": "node scripts/sync-theme-tokens.js && node scripts/generate-ramps.js && node scripts/generate-surfaces.js",
|
|
112
|
+
"build:css": "npm run sync:tokens && node scripts/build-css.js && node scripts/validate-theme.js && npm run check:design",
|
|
95
113
|
"check:tokens": "node scripts/check-token-violations.js",
|
|
96
|
-
"build:types": "tsc --project tsconfig.lib.json &&
|
|
114
|
+
"build:types": "tsc --project tsconfig.lib.json && node scripts/emit-components-types-runtime.js",
|
|
97
115
|
"preview": "vite preview",
|
|
98
|
-
"check": "svelte-check --tsconfig ./tsconfig.json && node scripts/check-component-imports.js && node scripts/check-layout-width.js",
|
|
116
|
+
"check": "svelte-check --tsconfig ./tsconfig.json && node scripts/check-component-imports.js && node scripts/check-layout-width.js && npm run check:design",
|
|
99
117
|
"storybook": "storybook dev -p 6006",
|
|
100
118
|
"build-storybook": "storybook build",
|
|
119
|
+
"build:storybook-site": "rm -rf static/storybook && storybook build -o storybook-static --quiet && cp -R storybook-static static/storybook",
|
|
120
|
+
"build:site": "npm run build:storybook-site && vite build",
|
|
121
|
+
"vercel-build": "npm run build:site",
|
|
101
122
|
"test": "vitest run",
|
|
102
123
|
"test:watch": "vitest",
|
|
103
124
|
"test:e2e": "playwright test",
|
|
104
125
|
"test:e2e:smoke": "playwright test --grep @smoke",
|
|
105
126
|
"test:playwright": "npm run test:e2e",
|
|
106
|
-
"test:themes": "node --test tests/theme-output.test.js",
|
|
127
|
+
"test:themes": "node --test --test-concurrency=1 tests/theme-output.test.js tests/create-theme.test.js",
|
|
128
|
+
"fix:lucide-types": "node scripts/fix-lucide-svelte-icon-dts.js",
|
|
107
129
|
"prepublishOnly": "npm run build:lib",
|
|
108
130
|
"publish:npm": "npm publish --access public --registry https://registry.npmjs.org/",
|
|
109
|
-
"
|
|
131
|
+
"check:ramps": "node scripts/check-ramp-lightness.js",
|
|
132
|
+
"check:contrast": "node scripts/check-contrast.js",
|
|
133
|
+
"check:geometry": "node scripts/check-control-geometry.js",
|
|
134
|
+
"check:states": "node scripts/check-state-variants.js",
|
|
135
|
+
"check:design": "npm run check:ramps && npm run check:contrast && npm run check:geometry && npm run check:tokens && npm run check:states"
|
|
110
136
|
},
|
|
111
137
|
"devDependencies": {
|
|
112
|
-
"@playwright/test": "^1.
|
|
138
|
+
"@playwright/test": "^1.63.0",
|
|
113
139
|
"@storybook/addon-docs": "^10.2.19",
|
|
114
140
|
"@storybook/sveltekit": "^10.2.19",
|
|
115
141
|
"@sveltejs/adapter-auto": "^7.0.0",
|
|
@@ -122,9 +148,7 @@
|
|
|
122
148
|
"@testing-library/user-event": "^14.6.1",
|
|
123
149
|
"@tsconfig/svelte": "^5.0.5",
|
|
124
150
|
"@types/node": "^24.5.2",
|
|
125
|
-
"@types/react": "^19.2.2",
|
|
126
151
|
"autoprefixer": "^10.4.17",
|
|
127
|
-
"culori": "^4.0.2",
|
|
128
152
|
"jsdom": "^29.0.2",
|
|
129
153
|
"postcss": "^8.4.35",
|
|
130
154
|
"storybook": "^10.2.19",
|
|
@@ -136,11 +160,12 @@
|
|
|
136
160
|
"vitest": "^3.2.4"
|
|
137
161
|
},
|
|
138
162
|
"dependencies": {
|
|
139
|
-
"@lucide/svelte": "^0.544.0"
|
|
163
|
+
"@lucide/svelte": "^0.544.0",
|
|
164
|
+
"culori": "^4.0.2",
|
|
165
|
+
"tailwind-merge": "^3.7.0"
|
|
140
166
|
},
|
|
141
167
|
"peerDependencies": {
|
|
142
168
|
"@sveltejs/kit": "^2.0.0",
|
|
143
|
-
"react": "^18.0.0",
|
|
144
169
|
"svelte": "^5.43.8"
|
|
145
170
|
},
|
|
146
171
|
"peerDependenciesMeta": {
|
|
@@ -149,9 +174,6 @@
|
|
|
149
174
|
},
|
|
150
175
|
"@sveltejs/kit": {
|
|
151
176
|
"optional": true
|
|
152
|
-
},
|
|
153
|
-
"react": {
|
|
154
|
-
"optional": true
|
|
155
177
|
}
|
|
156
178
|
},
|
|
157
179
|
"overrides": {
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Named aliases for layout widths that are otherwise enforced as literals in
|
|
3
|
-
* `scripts/layout-width-policy.js` (see `ARBITRARY_MAX_WIDTH`).
|
|
4
|
-
*
|
|
5
|
-
* **Sync rule:** values MUST match `ARBITRARY_MAX_WIDTH` keys exactly. After
|
|
6
|
-
* changing policy, update this file (or vice versa) and run `npm run check`.
|
|
7
|
-
*
|
|
8
|
-
* Prefer `<Container>` / `<Section>` `maxWidth` for screen tokens; use these
|
|
9
|
-
* only where a fixed arbitrary literal is still required (shell, demos).
|
|
10
|
-
*/
|
|
11
|
-
export declare const layoutArbitraryWidth: {
|
|
12
|
-
/** DOCS_CATALOG_SIDEBAR_CAP — mobile drawer cap for /components sidebar */
|
|
13
|
-
readonly docsCatalogSidebar: "max-w-[266px]";
|
|
14
|
-
/** SIDEBAR_APP_SHELL_RAIL — showcase app-shell sidebar column demo */
|
|
15
|
-
readonly showcaseSidebarRail: "max-w-[280px]";
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=layout-width-tokens.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layout-width-tokens.d.ts","sourceRoot":"","sources":["../../src/lib/layout-width-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB;IAC7B,2EAA2E;;IAE3E,sEAAsE;;CAEhE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/Button.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM9D,eAAO,MAAM,GAAG,EAAE,YAiDhB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/Input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM9D,eAAO,MAAM,GAAG,EAAE,YAmChB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/List.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM9D,eAAO,MAAM,GAAG,EAAE,YAoNhB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/Modal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM9D,eAAO,MAAM,GAAG,EAAE,YA+BhB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/Radio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM9D,eAAO,MAAM,GAAG,EAAE,YAyEhB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarNavigation.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/SidebarNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAQ9D,eAAO,MAAM,GAAG,EAAE,YA2ChB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/Skeleton.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM9D,eAAO,MAAM,GAAG,EAAE,YA4EhB,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ComponentCategory, ComponentDoc, ComponentDocExample } from "../../../types/page.types";
|
|
2
|
-
export declare function demoId(componentName: string, suffix: string): string;
|
|
3
|
-
export declare function defaultExample(componentName: string, example: Omit<ComponentDocExample, "demoId"> & {
|
|
4
|
-
demoId?: string;
|
|
5
|
-
}): ComponentDocExample;
|
|
6
|
-
export declare function makeDoc(doc: Omit<ComponentDoc, "defaultExample"> & {
|
|
7
|
-
defaultExample: Omit<ComponentDoc["defaultExample"], "demoId"> & {
|
|
8
|
-
demoId?: string;
|
|
9
|
-
};
|
|
10
|
-
}): ComponentDoc;
|
|
11
|
-
export declare function categoryDocId(category: ComponentCategory): string;
|
|
12
|
-
//# sourceMappingURL=_shared.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/_shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEtG,wBAAgB,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED,wBAAgB,cAAc,CAC1B,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GACnE,mBAAmB,CAQrB;AAED,wBAAgB,OAAO,CACnB,GAAG,EAAE,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC,GAAG;IACxC,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,GAAG;QAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACL,GACF,YAAY,CAYd;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM,CAEjE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAoB9D,wBAAgB,gBAAgB,IAAI,YAAY,EAAE,CAEjD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAG5E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components-catalog.d.ts","sourceRoot":"","sources":["../../../src/lib/showcase/components-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAmjFjE,CAAC"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
export declare const categories: {
|
|
2
|
-
id: string;
|
|
3
|
-
label: string;
|
|
4
|
-
description: string;
|
|
5
|
-
}[];
|
|
6
|
-
export declare const sampleCode = "function greet(name) {\n return `Hello, ${name}!`;\n}\n\nconsole.log(greet('World'));";
|
|
7
|
-
export declare const selectOptions: {
|
|
8
|
-
value: string;
|
|
9
|
-
label: string;
|
|
10
|
-
}[];
|
|
11
|
-
export declare const docsListItems: ({
|
|
12
|
-
id: string;
|
|
13
|
-
label: string;
|
|
14
|
-
description: string;
|
|
15
|
-
href: string;
|
|
16
|
-
disabled?: undefined;
|
|
17
|
-
} | {
|
|
18
|
-
id: string;
|
|
19
|
-
label: string;
|
|
20
|
-
description: string;
|
|
21
|
-
href?: undefined;
|
|
22
|
-
disabled?: undefined;
|
|
23
|
-
} | {
|
|
24
|
-
id: string;
|
|
25
|
-
label: string;
|
|
26
|
-
description: string;
|
|
27
|
-
href: string;
|
|
28
|
-
disabled: boolean;
|
|
29
|
-
})[];
|
|
30
|
-
export declare const sidebarNavItems: ({
|
|
31
|
-
id: string;
|
|
32
|
-
label: string;
|
|
33
|
-
href: string;
|
|
34
|
-
icon: import("svelte").Component<import("@lucide/svelte").IconProps, {}, "">;
|
|
35
|
-
badgeCount?: undefined;
|
|
36
|
-
group?: undefined;
|
|
37
|
-
} | {
|
|
38
|
-
id: string;
|
|
39
|
-
label: string;
|
|
40
|
-
href: string;
|
|
41
|
-
icon: import("svelte").Component<import("@lucide/svelte").IconProps, {}, "">;
|
|
42
|
-
badgeCount: number;
|
|
43
|
-
group?: undefined;
|
|
44
|
-
} | {
|
|
45
|
-
id: string;
|
|
46
|
-
label: string;
|
|
47
|
-
href: string;
|
|
48
|
-
icon: import("svelte").Component<import("@lucide/svelte").IconProps, {}, "">;
|
|
49
|
-
group: "secondary";
|
|
50
|
-
badgeCount?: undefined;
|
|
51
|
-
})[];
|
|
52
|
-
/** Richer nav for the “app shell” demo on the SidebarNavigation showcase page. */
|
|
53
|
-
export declare const sidebarAppShellDemoItems: ({
|
|
54
|
-
id: string;
|
|
55
|
-
label: string;
|
|
56
|
-
href: string;
|
|
57
|
-
icon: import("svelte").Component<import("@lucide/svelte").IconProps, {}, "">;
|
|
58
|
-
section: string;
|
|
59
|
-
badgeCount?: undefined;
|
|
60
|
-
group?: undefined;
|
|
61
|
-
} | {
|
|
62
|
-
id: string;
|
|
63
|
-
label: string;
|
|
64
|
-
href: string;
|
|
65
|
-
icon: import("svelte").Component<import("@lucide/svelte").IconProps, {}, "">;
|
|
66
|
-
section: string;
|
|
67
|
-
badgeCount: number;
|
|
68
|
-
group?: undefined;
|
|
69
|
-
} | {
|
|
70
|
-
id: string;
|
|
71
|
-
label: string;
|
|
72
|
-
href: string;
|
|
73
|
-
icon: import("svelte").Component<import("@lucide/svelte").IconProps, {}, "">;
|
|
74
|
-
group: "secondary";
|
|
75
|
-
section?: undefined;
|
|
76
|
-
badgeCount?: undefined;
|
|
77
|
-
})[];
|
|
78
|
-
export declare const sidebarProjectItems: ({
|
|
79
|
-
id: string;
|
|
80
|
-
label: string;
|
|
81
|
-
description: string;
|
|
82
|
-
badgeText: string;
|
|
83
|
-
} | {
|
|
84
|
-
id: string;
|
|
85
|
-
label: string;
|
|
86
|
-
description: string;
|
|
87
|
-
badgeText?: undefined;
|
|
88
|
-
})[];
|
|
89
|
-
//# sourceMappingURL=components-showcase-constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components-showcase-constants.d.ts","sourceRoot":"","sources":["../../../src/lib/showcase/components-showcase-constants.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,UAAU;;;;GAiBtB,CAAC;AAEF,eAAO,MAAM,UAAU,2FAIM,CAAC;AAE9B,eAAO,MAAM,aAAa;;;GAGvB,CAAC;AAEJ,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;IAyBzB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;IAmB3B,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;IAmDpC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;IAuB/B,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Component } from "svelte";
|
|
2
|
-
type SidebarNavIcon = Component<{
|
|
3
|
-
size?: number;
|
|
4
|
-
class?: string;
|
|
5
|
-
}>;
|
|
6
|
-
/**
|
|
7
|
-
* Icon for a documentation sidebar category row.
|
|
8
|
-
*/
|
|
9
|
-
export declare function getDocsCategoryIcon(categoryId: string): SidebarNavIcon;
|
|
10
|
-
/**
|
|
11
|
-
* Icon for a documentation sidebar component row.
|
|
12
|
-
*/
|
|
13
|
-
export declare function getDocsComponentIcon(componentName: string, componentCategory: string): SidebarNavIcon;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=docs-sidebar-helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"docs-sidebar-helpers.d.ts","sourceRoot":"","sources":["../../../src/lib/showcase/docs-sidebar-helpers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,KAAK,cAAc,GAAG,SAAS,CAAC;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEnE;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,CAKtE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAChC,aAAa,EAAE,MAAM,EACrB,iBAAiB,EAAE,MAAM,GAC1B,cAAc,CAgBhB"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** Focus helpers for overlays (modals, sheets). Requires `app.css` focus ring classes. */
|
|
2
|
-
/** From `app.css` `@layer components` — import the library/app stylesheet. */
|
|
3
|
-
export declare const FOCUS_BRAND_CLASS = "focus-brand";
|
|
4
|
-
export declare const FOCUS_NAV_CLASS = "focus-nav";
|
|
5
|
-
export declare function getFocusableElements(container: HTMLElement): HTMLElement[];
|
|
6
|
-
/** Tab wraps first↔last inside `container`. Caller should pair with `saveFocus` / `returnFocus`. */
|
|
7
|
-
export declare function trapFocus(container: HTMLElement): () => void;
|
|
8
|
-
export declare function saveFocus(): void;
|
|
9
|
-
/** Restores focus from the last `saveFocus`. Skips disconnected or unfocusable nodes. */
|
|
10
|
-
export declare function returnFocus(): void;
|
|
11
|
-
export declare function focusFirstElement(container: HTMLElement): void;
|
|
12
|
-
//# sourceMappingURL=focus-utils.d.ts.map
|