zabi-components 8.0.0 → 9.0.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 +2935 -0
- package/README.md +243 -10
- package/THEME.md +162 -332
- package/THEMING.md +1419 -259
- package/dist/atoms/ActionPanel.svelte +15 -5
- package/dist/atoms/Avatar.svelte +120 -0
- package/dist/atoms/Avatar.svelte.d.ts +46 -0
- package/dist/atoms/Badge.svelte +71 -13
- package/dist/atoms/Badge.svelte.d.ts +8 -2
- package/dist/atoms/Block.svelte +74 -0
- package/dist/atoms/Block.svelte.d.ts +29 -0
- package/dist/atoms/Button.svelte +217 -30
- package/dist/atoms/Button.svelte.d.ts +33 -4
- package/dist/atoms/Card.svelte +182 -26
- package/dist/atoms/Card.svelte.d.ts +55 -3
- package/dist/atoms/CardHeader.svelte +16 -4
- package/dist/atoms/Checkbox.svelte +81 -21
- package/dist/atoms/Checkbox.svelte.d.ts +31 -2
- package/dist/atoms/Chip.svelte +351 -0
- package/dist/atoms/Chip.svelte.d.ts +57 -0
- package/dist/atoms/CodeBlock.svelte +20 -2
- package/dist/atoms/CodeBlock.svelte.d.ts +4 -0
- package/dist/atoms/CodeField.svelte +385 -0
- package/dist/atoms/CodeField.svelte.d.ts +61 -0
- package/dist/atoms/ColorPicker.svelte +260 -49
- package/dist/atoms/ColorPicker.svelte.d.ts +3 -0
- package/dist/atoms/Container.svelte +16 -8
- package/dist/atoms/DateField.svelte +145 -0
- package/dist/atoms/DateField.svelte.d.ts +81 -0
- package/dist/atoms/FieldMessages.svelte +69 -0
- package/dist/atoms/FieldMessages.svelte.d.ts +23 -0
- package/dist/atoms/FloatingActionButton.svelte +176 -0
- package/dist/atoms/FloatingActionButton.svelte.d.ts +51 -0
- package/dist/atoms/Heading.svelte +63 -5
- package/dist/atoms/Heading.svelte.d.ts +14 -0
- package/dist/atoms/IconButton.svelte +294 -26
- package/dist/atoms/IconButton.svelte.d.ts +62 -4
- package/dist/atoms/Input.svelte +259 -53
- package/dist/atoms/Input.svelte.d.ts +33 -2
- package/dist/atoms/List.svelte +5 -1
- package/dist/atoms/ListItem.svelte +70 -13
- package/dist/atoms/ListItem.svelte.d.ts +11 -0
- package/dist/atoms/PickerField.svelte +239 -0
- package/dist/atoms/PickerField.svelte.d.ts +67 -0
- package/dist/atoms/Progress.svelte +99 -19
- package/dist/atoms/Progress.svelte.d.ts +15 -1
- package/dist/atoms/Radio.svelte +51 -3
- package/dist/atoms/Radio.svelte.d.ts +30 -2
- package/dist/atoms/Rating.svelte +620 -0
- package/dist/atoms/Rating.svelte.d.ts +77 -0
- package/dist/atoms/Select.svelte +438 -98
- package/dist/atoms/Select.svelte.d.ts +61 -3
- package/dist/atoms/SelectionControl.svelte +193 -23
- package/dist/atoms/SelectionControl.svelte.d.ts +29 -3
- package/dist/atoms/Skeleton.svelte +114 -18
- package/dist/atoms/Skeleton.svelte.d.ts +30 -3
- package/dist/atoms/SkeletonGroup.svelte +43 -0
- package/dist/atoms/SkeletonGroup.svelte.d.ts +20 -0
- package/dist/atoms/Slider.svelte +344 -0
- package/dist/atoms/Slider.svelte.d.ts +40 -0
- package/dist/atoms/Sparkline.svelte +109 -0
- package/dist/atoms/Sparkline.svelte.d.ts +27 -0
- package/dist/atoms/SpeechBubble.svelte +187 -0
- package/dist/atoms/SpeechBubble.svelte.d.ts +33 -0
- package/dist/atoms/Spinner.svelte +57 -0
- package/dist/atoms/Spinner.svelte.d.ts +19 -0
- package/dist/atoms/Stat.svelte +72 -0
- package/dist/atoms/Stat.svelte.d.ts +19 -0
- package/dist/atoms/Table.svelte +151 -6
- package/dist/atoms/Table.svelte.d.ts +15 -3
- package/dist/atoms/TemporalField.svelte +472 -0
- package/dist/atoms/TemporalField.svelte.d.ts +48 -0
- package/dist/atoms/Text.svelte +23 -11
- package/dist/atoms/Text.svelte.d.ts +6 -3
- package/dist/atoms/Textarea.svelte +150 -44
- package/dist/atoms/Textarea.svelte.d.ts +35 -2
- package/dist/atoms/ThemeToggle.svelte +223 -44
- package/dist/atoms/ThemeToggle.svelte.d.ts +26 -3
- package/dist/atoms/TimeColumn.svelte +150 -0
- package/dist/atoms/TimeColumn.svelte.d.ts +25 -0
- package/dist/atoms/TimeField.svelte +151 -0
- package/dist/atoms/TimeField.svelte.d.ts +85 -0
- package/dist/atoms/Toast.svelte +22 -8
- package/dist/atoms/Toast.svelte.d.ts +2 -0
- package/dist/atoms/Toggle.svelte +98 -14
- package/dist/atoms/Toggle.svelte.d.ts +26 -2
- package/dist/atoms/Tooltip.svelte +528 -24
- package/dist/atoms/Tooltip.svelte.d.ts +18 -0
- package/dist/atoms/ZabiStringsProvider.svelte +45 -0
- package/dist/atoms/ZabiStringsProvider.svelte.d.ts +27 -0
- package/dist/atoms/index.d.ts +38 -0
- package/dist/atoms/index.js +29 -0
- package/dist/atoms/selection-control.styles.d.ts +47 -5
- package/dist/atoms/selection-control.styles.js +52 -10
- package/dist/components/atoms/index.d.ts +38 -0
- package/dist/components/atoms/index.d.ts.map +1 -1
- package/dist/components/atoms/selection-control.styles.d.ts +47 -5
- package/dist/components/atoms/selection-control.styles.d.ts.map +1 -1
- package/dist/components/index.d.ts +104 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/map.d.ts +11 -0
- package/dist/components/map.d.ts.map +1 -0
- package/dist/components/molecules/index.d.ts +51 -0
- package/dist/components/molecules/index.d.ts.map +1 -1
- package/dist/components/molecules/toast-store.d.ts +83 -7
- package/dist/components/molecules/toast-store.d.ts.map +1 -1
- package/dist/components/organisms/index.d.ts +10 -0
- package/dist/components/organisms/index.d.ts.map +1 -1
- package/dist/components/types/variants.d.ts +24 -1
- package/dist/components/types/variants.d.ts.map +1 -1
- package/dist/components/util/app-shell.d.ts +79 -0
- package/dist/components/util/app-shell.d.ts.map +1 -0
- package/dist/components/util/avatar.d.ts +39 -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 +41 -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/chart.d.ts +140 -0
- package/dist/components/util/chart.d.ts.map +1 -0
- package/dist/components/util/chip.d.ts +66 -0
- package/dist/components/util/chip.d.ts.map +1 -0
- package/dist/components/util/cn.d.ts.map +1 -1
- package/dist/components/util/code-field.d.ts +63 -0
- package/dist/components/util/code-field.d.ts.map +1 -0
- package/dist/components/util/collapsible.d.ts +64 -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/display-voice.d.ts +10 -0
- package/dist/components/util/display-voice.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-control.d.ts +30 -0
- package/dist/components/util/field-control.d.ts.map +1 -0
- package/dist/components/util/field.d.ts +45 -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 +77 -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/map-view.d.ts +144 -0
- package/dist/components/util/map-view.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 +234 -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/progress.d.ts +19 -0
- package/dist/components/util/progress.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-edge.d.ts +33 -0
- package/dist/components/util/scroll-edge.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 +84 -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/skeleton.d.ts +15 -0
- package/dist/components/util/skeleton.d.ts.map +1 -0
- package/dist/components/util/sliding-indicator.d.ts +25 -0
- package/dist/components/util/sliding-indicator.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/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/temporal-field.d.ts +89 -0
- package/dist/components/util/temporal-field.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 +133 -0
- package/dist/components/util/toaster.d.ts.map +1 -0
- package/dist/components/util/tone-surface.d.ts +34 -0
- package/dist/components/util/tone-surface.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 +35 -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 +142 -0
- package/dist/components/util/zabi-strings.d.ts.map +1 -0
- package/dist/create-theme/cli.js +173 -0
- package/dist/create-theme/index.d.ts +190 -0
- package/dist/create-theme/index.js +1034 -0
- package/dist/create-theme/lib/ramp-math.js +128 -0
- package/dist/create-theme/lib/resolve.js +238 -0
- package/dist/create-theme/theme-data.js +2644 -0
- package/dist/index.d.ts +104 -2
- package/dist/index.js +75 -2
- package/dist/map.d.ts +10 -0
- package/dist/map.js +9 -0
- package/dist/molecules/Alert.svelte +63 -16
- package/dist/molecules/Alert.svelte.d.ts +14 -1
- package/dist/molecules/AppBar.svelte +674 -0
- package/dist/molecules/AppBar.svelte.d.ts +131 -0
- package/dist/molecules/AvatarGroup.svelte +116 -0
- package/dist/molecules/AvatarGroup.svelte.d.ts +40 -0
- package/dist/molecules/BarChart.svelte +381 -0
- package/dist/molecules/BarChart.svelte.d.ts +45 -0
- package/dist/molecules/BottomSheet.svelte +608 -0
- package/dist/molecules/BottomSheet.svelte.d.ts +109 -0
- package/dist/molecules/BottomTabBar.svelte +403 -0
- package/dist/molecules/BottomTabBar.svelte.d.ts +98 -0
- package/dist/molecules/Calendar.svelte +597 -0
- package/dist/molecules/Calendar.svelte.d.ts +72 -0
- package/dist/molecules/ChipGroup.svelte +325 -0
- package/dist/molecules/ChipGroup.svelte.d.ts +41 -0
- package/dist/molecules/Collapsible.svelte +347 -0
- package/dist/molecules/Collapsible.svelte.d.ts +61 -0
- package/dist/molecules/CollapsibleGroup.svelte +136 -0
- package/dist/molecules/CollapsibleGroup.svelte.d.ts +14 -0
- package/dist/molecules/ComponentDemo.svelte +16 -4
- package/dist/molecules/ComponentDemo.svelte.d.ts +3 -0
- package/dist/molecules/ConfirmDialog.svelte +257 -0
- package/dist/molecules/ConfirmDialog.svelte.d.ts +58 -0
- package/dist/molecules/ContactForm.svelte +34 -17
- package/dist/molecules/ContactForm.svelte.d.ts +8 -0
- package/dist/molecules/Drawer.svelte +415 -0
- package/dist/molecules/Drawer.svelte.d.ts +55 -0
- package/dist/molecules/Dropdown.svelte +517 -48
- package/dist/molecules/Dropdown.svelte.d.ts +47 -6
- package/dist/molecules/DropdownItem.svelte +122 -0
- package/dist/molecules/DropdownItem.svelte.d.ts +28 -0
- package/dist/molecules/EmptyState.svelte +55 -10
- package/dist/molecules/EmptyState.svelte.d.ts +8 -0
- package/dist/molecules/FormField.svelte +9 -1
- package/dist/molecules/FormField.svelte.d.ts +2 -0
- package/dist/molecules/Header.svelte +1 -1
- package/dist/molecules/ImageUpload.svelte +492 -69
- package/dist/molecules/ImageUpload.svelte.d.ts +82 -2
- package/dist/molecules/LineChart.svelte +459 -0
- package/dist/molecules/LineChart.svelte.d.ts +53 -0
- package/dist/molecules/MapView.svelte +565 -0
- package/dist/molecules/MapView.svelte.d.ts +88 -0
- package/dist/molecules/MediaGrid.svelte +527 -0
- package/dist/molecules/MediaGrid.svelte.d.ts +77 -0
- package/dist/molecules/Modal.svelte +293 -72
- package/dist/molecules/Modal.svelte.d.ts +51 -2
- package/dist/molecules/NavigationMenuContent.svelte +58 -1
- package/dist/molecules/NavigationMenuItem.svelte +0 -1
- package/dist/molecules/NavigationMenuLink.svelte +1 -1
- package/dist/molecules/NavigationMenuList.svelte +10 -3
- package/dist/molecules/NavigationMenuTrigger.svelte +2 -2
- package/dist/molecules/Page.svelte +32 -2
- package/dist/molecules/Page.svelte.d.ts +11 -0
- package/dist/molecules/PhotoGrid.svelte +523 -0
- package/dist/molecules/PhotoGrid.svelte.d.ts +73 -0
- package/dist/molecules/PhotoViewer.svelte +1213 -0
- package/dist/molecules/PhotoViewer.svelte.d.ts +74 -0
- package/dist/molecules/PieChart.svelte +421 -0
- package/dist/molecules/PieChart.svelte.d.ts +51 -0
- package/dist/molecules/PropsTable.svelte +22 -10
- package/dist/molecules/PropsTable.svelte.d.ts +3 -0
- package/dist/molecules/PullToRefresh.svelte +263 -0
- package/dist/molecules/PullToRefresh.svelte.d.ts +52 -0
- package/dist/molecules/RadioGroup.svelte +72 -18
- package/dist/molecules/RadioGroup.svelte.d.ts +19 -3
- package/dist/molecules/Section.svelte +1 -1
- package/dist/molecules/SegmentedControl.svelte +456 -0
- package/dist/molecules/SegmentedControl.svelte.d.ts +40 -0
- package/dist/molecules/SidebarBrandHeader.svelte +11 -1
- package/dist/molecules/SidebarBrandHeader.svelte.d.ts +3 -0
- package/dist/molecules/SidebarFooter.svelte +30 -7
- package/dist/molecules/SidebarFooter.svelte.d.ts +3 -0
- package/dist/molecules/SidebarNavSection.svelte +1 -1
- package/dist/molecules/SlideUp.svelte +220 -61
- package/dist/molecules/SlideUp.svelte.d.ts +26 -0
- package/dist/molecules/SortableList.svelte +633 -0
- package/dist/molecules/SortableList.svelte.d.ts +69 -0
- package/dist/molecules/Stepper.svelte +562 -0
- package/dist/molecules/Stepper.svelte.d.ts +39 -0
- package/dist/molecules/StickyActionBar.svelte +250 -0
- package/dist/molecules/StickyActionBar.svelte.d.ts +78 -0
- package/dist/molecules/SwipeableListItem.svelte +334 -0
- package/dist/molecules/SwipeableListItem.svelte.d.ts +54 -0
- package/dist/molecules/Tabs.svelte +310 -9
- package/dist/molecules/Tabs.svelte.d.ts +7 -0
- package/dist/molecules/Toaster.svelte +514 -5
- package/dist/molecules/Toaster.svelte.d.ts +153 -2
- package/dist/molecules/ToasterToast.svelte +495 -77
- package/dist/molecules/ToasterToast.svelte.d.ts +15 -0
- package/dist/molecules/UnsavedChangesBar.svelte +223 -0
- package/dist/molecules/UnsavedChangesBar.svelte.d.ts +43 -0
- package/dist/molecules/index.d.ts +51 -0
- package/dist/molecules/index.js +31 -0
- package/dist/molecules/toast-store.d.ts +83 -7
- package/dist/molecules/toast-store.js +25 -1
- package/dist/organisms/AppNavigation.svelte +440 -0
- package/dist/organisms/AppNavigation.svelte.d.ts +72 -0
- package/dist/organisms/AppShell.svelte +696 -0
- package/dist/organisms/AppShell.svelte.d.ts +157 -0
- package/dist/organisms/AppShellHeaderPart.svelte +163 -0
- package/dist/organisms/AppShellHeaderPart.svelte.d.ts +57 -0
- package/dist/organisms/SidebarAccountPanel.svelte +107 -12
- package/dist/organisms/SidebarAccountPanel.svelte.d.ts +19 -0
- package/dist/organisms/SidebarNavigation.svelte +111 -43
- package/dist/organisms/SidebarNavigation.svelte.d.ts +29 -1
- package/dist/organisms/SidebarPanel.svelte +34 -17
- package/dist/organisms/SidebarPanel.svelte.d.ts +1 -0
- package/dist/organisms/SidebarShell.svelte +164 -14
- package/dist/organisms/SidebarShell.svelte.d.ts +56 -2
- package/dist/organisms/TopNavbar.svelte +353 -39
- package/dist/organisms/TopNavbar.svelte.d.ts +47 -0
- package/dist/organisms/TopNavbarSheetContent.svelte +145 -0
- package/dist/organisms/TopNavbarSheetContent.svelte.d.ts +24 -0
- package/dist/organisms/index.d.ts +10 -0
- package/dist/organisms/index.js +7 -0
- package/dist/types/components.d.ts +21 -1
- package/dist/types/components.d.ts.map +1 -1
- package/dist/types/index.d.ts +1093 -26
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/variants.ts +28 -1
- package/dist/util/app-shell.d.ts +78 -0
- package/dist/util/app-shell.js +97 -0
- package/dist/util/avatar.d.ts +38 -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 +40 -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/chart.d.ts +139 -0
- package/dist/util/chart.js +305 -0
- package/dist/util/chip.d.ts +65 -0
- package/dist/util/chip.js +58 -0
- package/dist/util/cn.js +28 -2
- package/dist/util/code-field.d.ts +62 -0
- package/dist/util/code-field.js +112 -0
- package/dist/util/collapsible.d.ts +63 -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/display-voice.d.ts +9 -0
- package/dist/util/display-voice.js +9 -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-control.d.ts +29 -0
- package/dist/util/field-control.js +32 -0
- package/dist/util/field.d.ts +44 -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 +77 -2
- package/dist/util/focus-utils.js +186 -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/map-view.d.ts +143 -0
- package/dist/util/map-view.js +121 -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 +233 -0
- package/dist/util/photo.js +209 -0
- package/dist/util/portal.d.ts +22 -0
- package/dist/util/portal.js +50 -0
- package/dist/util/progress.d.ts +18 -0
- package/dist/util/progress.js +17 -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-edge.d.ts +32 -0
- package/dist/util/scroll-edge.js +87 -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 +83 -0
- package/dist/util/sheet-drag.js +311 -0
- package/dist/util/sidebar.d.ts +62 -0
- package/dist/util/sidebar.js +38 -0
- package/dist/util/skeleton.d.ts +14 -0
- package/dist/util/skeleton.js +22 -0
- package/dist/util/sliding-indicator.d.ts +24 -0
- package/dist/util/sliding-indicator.js +44 -0
- package/dist/util/sortable-list.d.ts +64 -0
- package/dist/util/sortable-list.js +53 -0
- 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/temporal-field.d.ts +88 -0
- package/dist/util/temporal-field.js +136 -0
- package/dist/util/theme-mode.d.ts +79 -0
- package/dist/util/theme-mode.js +121 -0
- package/dist/util/toaster.d.ts +132 -0
- package/dist/util/toaster.js +130 -0
- package/dist/util/tone-surface.d.ts +33 -0
- package/dist/util/tone-surface.js +35 -0
- package/dist/util/tooltip.d.ts +9 -0
- package/dist/util/tooltip.js +18 -0
- package/dist/util/top-navbar.d.ts +34 -0
- package/dist/util/top-navbar.js +28 -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 +141 -0
- package/dist/util/zabi-strings.js +105 -0
- package/dist/zabi-components-colors.css +11 -2
- package/dist/zabi-components-theme-dark-only.css +870 -258
- package/dist/zabi-components-theme-dark.css +870 -258
- package/dist/zabi-components-theme-only.css +2419 -368
- package/dist/zabi-components-theme.css +2419 -368
- package/dist/zabi-components.css +6032 -711
- package/docs/lucide-icons.md +40 -17
- package/docs/theme-imports.md +81 -11
- package/package.json +45 -8
package/dist/types/index.d.ts
CHANGED
|
@@ -1,22 +1,69 @@
|
|
|
1
1
|
export * from './events.js';
|
|
2
2
|
export * from './variants.js';
|
|
3
3
|
export * from './page.types.js';
|
|
4
|
-
import type { Component } from 'svelte';
|
|
4
|
+
import type { Component, Snippet } from 'svelte';
|
|
5
|
+
import type { HTMLAnchorAttributes, HTMLAttributes, HTMLButtonAttributes, HTMLInputAttributes, HTMLTextareaAttributes, SVGAttributes } from 'svelte/elements';
|
|
6
|
+
import type { BottomTabBarItem } from '../components/util/bottom-tab-bar.js';
|
|
7
|
+
import type { AppShellNavigationContext, AppShellNavigationMode } from '../components/util/app-shell.js';
|
|
8
|
+
import type { CalendarEvent, CalendarStrings } from '../components/util/calendar.js';
|
|
9
|
+
import type { Photo, PhotoGridSelectDetail, PhotoGridStrings, PhotoKey, PhotoViewerAction, PhotoViewerCloseReason, PhotoViewerStrings } from '../components/util/photo.js';
|
|
10
|
+
import type { BottomSheetCloseReason, BottomSheetSnap } from '../components/util/bottom-sheet.js';
|
|
11
|
+
import type { BadgeVariant, ButtonSize, ButtonVariant, CardVariant, OnFillTone, SurfaceTone, ExtendedSemanticVariant, SemanticVariant, SizeVariant } from './variants.js';
|
|
12
|
+
import type { AvatarGroupStrings, AvatarPerson, AvatarSize } from '../components/util/avatar.js';
|
|
13
|
+
import type { ChartColor, ChartDatum, ChartFormat, ChartSeries } from '../components/util/chart.js';
|
|
14
|
+
import type { ProgressStrings } from '../components/util/progress.js';
|
|
15
|
+
import type { SkeletonStrings } from '../components/util/skeleton.js';
|
|
16
|
+
import type { CodeFieldMode, CodeFieldStrings } from '../components/util/code-field.js';
|
|
17
|
+
import type { RatingStrings } from '../components/util/rating.js';
|
|
18
|
+
import type { StepperItem, StepperLayout, StepperStrings } from '../components/util/stepper.js';
|
|
19
|
+
import type { SegmentedControlOption } from '../components/util/segmented-control.js';
|
|
5
20
|
export type ZabiComponent<T extends Record<string, any> = Record<string, any>, E extends Record<string, any> = Record<string, any>> = Component<T, E>;
|
|
6
|
-
export interface ButtonProps {
|
|
7
|
-
|
|
8
|
-
|
|
21
|
+
export interface ButtonProps extends Omit<HTMLButtonAttributes, 'class'> {
|
|
22
|
+
/**
|
|
23
|
+
* `success`, `warning`, `info` and `neutral` are deprecated: Button never
|
|
24
|
+
* styled them, and they render as `primary`.
|
|
25
|
+
*/
|
|
26
|
+
variant?: ButtonVariant | 'success' | 'warning' | 'info' | 'neutral';
|
|
27
|
+
size?: ButtonSize;
|
|
9
28
|
disabled?: boolean;
|
|
10
29
|
loading?: boolean;
|
|
11
30
|
type?: 'button' | 'submit' | 'reset';
|
|
12
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Where the link goes. Makes this an `<a>` that looks the same. While
|
|
33
|
+
* `disabled` or `loading` it has no `href` and is `aria-disabled`.
|
|
34
|
+
*/
|
|
35
|
+
href?: string;
|
|
36
|
+
/** With `href`: where the link opens. */
|
|
37
|
+
target?: HTMLAnchorAttributes['target'];
|
|
38
|
+
/** With `href`: the link's relationship, such as `noopener`. */
|
|
39
|
+
rel?: HTMLAnchorAttributes['rel'];
|
|
40
|
+
/** With `href`: download the address instead of opening it. */
|
|
41
|
+
download?: HTMLAnchorAttributes['download'];
|
|
42
|
+
hreflang?: HTMLAnchorAttributes['hreflang'];
|
|
43
|
+
referrerpolicy?: HTMLAnchorAttributes['referrerpolicy'];
|
|
44
|
+
ping?: HTMLAnchorAttributes['ping'];
|
|
13
45
|
text?: string;
|
|
46
|
+
/** Stretch to the width of the container. */
|
|
47
|
+
fullWidth?: boolean;
|
|
48
|
+
/** @deprecated use `fullWidth`. */
|
|
49
|
+
isFullWidth?: boolean;
|
|
50
|
+
class?: string;
|
|
51
|
+
children?: Snippet;
|
|
52
|
+
/** @deprecated never accepted by the component; use `class`. */
|
|
53
|
+
className?: string;
|
|
54
|
+
/** @deprecated never accepted by the component; render the icon in `children`. */
|
|
14
55
|
iconLeft?: string | any;
|
|
56
|
+
/** @deprecated never accepted by the component; render the icon in `children`. */
|
|
15
57
|
iconRight?: string | any;
|
|
58
|
+
/** @deprecated never accepted by the component; use `aria-label`. */
|
|
16
59
|
ariaLabel?: string;
|
|
60
|
+
/** @deprecated never accepted by the component; use `aria-describedby`. */
|
|
17
61
|
ariaDescribedBy?: string;
|
|
62
|
+
/** @deprecated never accepted by the component; use `aria-expanded`. */
|
|
18
63
|
ariaExpanded?: boolean;
|
|
64
|
+
/** @deprecated never accepted by the component; use `aria-controls`. */
|
|
19
65
|
ariaControls?: string;
|
|
66
|
+
/** @deprecated never accepted by the component; use `aria-pressed`. */
|
|
20
67
|
ariaPressed?: boolean;
|
|
21
68
|
}
|
|
22
69
|
export interface ButtonEvents {
|
|
@@ -25,24 +72,106 @@ export interface ButtonEvents {
|
|
|
25
72
|
event: MouseEvent;
|
|
26
73
|
};
|
|
27
74
|
}
|
|
28
|
-
export interface HeadingProps {
|
|
75
|
+
export interface HeadingProps extends Omit<HTMLAttributes<HTMLHeadingElement>, 'class'> {
|
|
29
76
|
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
77
|
+
/** Visual size, when it should differ from the semantic level. */
|
|
78
|
+
size?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
79
|
+
/** Heading text. Ignored when `children` is provided. */
|
|
80
|
+
text?: string;
|
|
81
|
+
/** Text colour: `headline` by default; `inherit`, `on-brand` or `on-accent` on a filled block. */
|
|
82
|
+
tone?: 'headline' | OnFillTone;
|
|
83
|
+
/** `heading` (default) or `display`: the second face and larger steps. */
|
|
84
|
+
variant?: 'heading' | 'display';
|
|
85
|
+
class?: string;
|
|
86
|
+
children?: Snippet;
|
|
87
|
+
/** @deprecated never accepted by the component; use `class`. */
|
|
30
88
|
className?: string;
|
|
31
89
|
}
|
|
32
|
-
export interface
|
|
33
|
-
|
|
34
|
-
|
|
90
|
+
export interface BlockProps extends Omit<HTMLAttributes<HTMLElement>, 'class'> {
|
|
91
|
+
/** `neutral` (the card surface), `tint`, `brand` or `accent`. */
|
|
92
|
+
tone?: SurfaceTone;
|
|
93
|
+
/** A fill the app chooses, any CSS colour. Wins over `tone`; the app checks the contrast of the pair. */
|
|
94
|
+
fill?: string;
|
|
95
|
+
/** The label colour on `fill`. */
|
|
96
|
+
onFill?: string;
|
|
97
|
+
/** Inner space: `none`, `sm`, `md` (default) or `lg`. */
|
|
98
|
+
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
99
|
+
/** The element, `div` by default. */
|
|
100
|
+
as?: 'div' | 'section' | 'header' | 'footer' | 'article' | 'aside';
|
|
101
|
+
/** A Block does not break out of a padded parent: put it outside, or pass a negative inline margin (`-mx-4`). */
|
|
102
|
+
class?: string;
|
|
103
|
+
children?: Snippet;
|
|
104
|
+
}
|
|
105
|
+
export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class'> {
|
|
106
|
+
variant?: CardVariant;
|
|
107
|
+
/** `neutral` (default), `tint`, `brand` or `accent`; brand and accent re-point text, links and controls inside. */
|
|
108
|
+
tone?: SurfaceTone;
|
|
109
|
+
/** A fill the app chooses, any CSS colour. Wins over `tone`; the app checks the contrast of the pair. */
|
|
110
|
+
fill?: string;
|
|
111
|
+
/** The label colour on `fill`. */
|
|
112
|
+
onFill?: string;
|
|
113
|
+
/** The card is an `<a>`. A link card must not contain other interactive elements. */
|
|
114
|
+
href?: string;
|
|
115
|
+
target?: HTMLAnchorAttributes['target'];
|
|
116
|
+
rel?: string;
|
|
117
|
+
/** The card is a `<button>` (ignored with `href`): `submit` posts the form around it. Like a link card it must not contain other interactive elements. */
|
|
118
|
+
type?: 'submit' | 'button' | 'reset';
|
|
119
|
+
/** With `type`: the name the button submits under. */
|
|
120
|
+
name?: string;
|
|
121
|
+
/** With `type`: what the button submits. */
|
|
122
|
+
value?: string;
|
|
123
|
+
/** With `type`: the id of the form it belongs to. */
|
|
124
|
+
form?: string;
|
|
125
|
+
/** With `type`: the card cannot be pressed. */
|
|
126
|
+
disabled?: boolean;
|
|
127
|
+
/** With `type`: the action is on its way (`aria-busy`, `aria-disabled`); the press is swallowed and the card stays a Tab stop. */
|
|
128
|
+
loading?: boolean;
|
|
129
|
+
size?: SizeVariant;
|
|
35
130
|
fullWidth?: boolean;
|
|
131
|
+
class?: string;
|
|
132
|
+
/** @deprecated use `class`. */
|
|
36
133
|
className?: string;
|
|
37
134
|
onclick?: (event: MouseEvent) => void | Promise<void>;
|
|
38
135
|
/** Required when card is interactive (has onclick) for accessibility */
|
|
39
136
|
ariaLabel?: string;
|
|
137
|
+
children?: Snippet;
|
|
40
138
|
}
|
|
41
|
-
export interface InputProps {
|
|
139
|
+
export interface InputProps extends Omit<HTMLInputAttributes, 'class' | 'size' | 'value' | 'type' | 'id' | 'name' | 'placeholder' | 'required' | 'disabled' | 'oninput' | 'onblur' | 'aria-label' | 'aria-describedby'> {
|
|
140
|
+
/** Omit to auto-generate. */
|
|
141
|
+
id?: string;
|
|
42
142
|
type?: string;
|
|
43
143
|
value?: string;
|
|
144
|
+
name?: string;
|
|
145
|
+
label?: string;
|
|
146
|
+
/** True when a FormField supplies the visible label. */
|
|
147
|
+
hideLabel?: boolean;
|
|
44
148
|
placeholder?: string;
|
|
149
|
+
required?: boolean;
|
|
45
150
|
disabled?: boolean;
|
|
151
|
+
loading?: boolean;
|
|
152
|
+
size?: SizeVariant;
|
|
153
|
+
variant?: SemanticVariant;
|
|
154
|
+
/** Status text under the field. Shown with a `success`, `warning` or `error` variant; for neutral help, use `hint`. */
|
|
155
|
+
message?: string;
|
|
156
|
+
/** Help text under the field, read out with it. */
|
|
157
|
+
hint?: string;
|
|
158
|
+
/** An error under the field. It marks the field invalid and is announced; it wins over `variant` and `message`. */
|
|
159
|
+
error?: string;
|
|
160
|
+
/** Ids of other elements that describe the field. The hint and the message are added after them. */
|
|
161
|
+
'aria-describedby'?: string | null;
|
|
162
|
+
/** Drawn inside the field, before the text. */
|
|
163
|
+
leading?: Snippet;
|
|
164
|
+
/** Drawn inside the field, after the text. */
|
|
165
|
+
trailing?: Snippet;
|
|
166
|
+
/** With `type="password"`: a button that shows the password as text, and hides it again. On by default; `false` leaves it out. */
|
|
167
|
+
revealable?: boolean;
|
|
168
|
+
/** Accessible name of that button, the same in both states. */
|
|
169
|
+
revealLabel?: string;
|
|
170
|
+
oninput?: (event: Event) => void;
|
|
171
|
+
onblur?: (event: Event) => void;
|
|
172
|
+
'aria-label'?: string;
|
|
173
|
+
class?: string;
|
|
174
|
+
/** @deprecated never accepted by the component; use `class`. */
|
|
46
175
|
className?: string;
|
|
47
176
|
}
|
|
48
177
|
export interface InputEvents {
|
|
@@ -61,9 +190,36 @@ export interface InputEvents {
|
|
|
61
190
|
event: FocusEvent;
|
|
62
191
|
};
|
|
63
192
|
}
|
|
64
|
-
export interface CheckboxProps {
|
|
193
|
+
export interface CheckboxProps extends Omit<HTMLInputAttributes, 'class' | 'id' | 'name' | 'value' | 'disabled' | 'checked' | 'type' | 'onchange'> {
|
|
194
|
+
id?: string;
|
|
195
|
+
name?: string;
|
|
196
|
+
value?: string;
|
|
65
197
|
checked?: boolean;
|
|
198
|
+
defaultChecked?: boolean;
|
|
66
199
|
disabled?: boolean;
|
|
200
|
+
loading?: boolean;
|
|
201
|
+
label?: string;
|
|
202
|
+
/**
|
|
203
|
+
* Drawn inside the one label, between the box and the label text. A
|
|
204
|
+
* leading image should have an empty alt: the label names the row.
|
|
205
|
+
*/
|
|
206
|
+
leading?: Snippet;
|
|
207
|
+
/** A line under the label, inside it, tied to the box with `aria-describedby`; not part of the name. */
|
|
208
|
+
description?: string;
|
|
209
|
+
/** Where the box sits in the row: `end` puts it last, at the far edge. */
|
|
210
|
+
controlPosition?: 'start' | 'end';
|
|
211
|
+
variant?: SemanticVariant;
|
|
212
|
+
/** Status text under the control. Shown with a `success`, `warning` or `error` variant; for neutral help, use `hint`. */
|
|
213
|
+
message?: string;
|
|
214
|
+
/** Help text under the control, read out with it. */
|
|
215
|
+
hint?: string;
|
|
216
|
+
/** An error under the control: an alert, tied to the input; a checkbox also gets `aria-invalid`. It wins over `variant` and `message`. */
|
|
217
|
+
error?: string;
|
|
218
|
+
onchange?: (event: Event) => void;
|
|
219
|
+
/** Same as `onchange`; both are called. */
|
|
220
|
+
onChange?: (event: Event) => void;
|
|
221
|
+
class?: string;
|
|
222
|
+
/** @deprecated never accepted by the component; use `class`. */
|
|
67
223
|
className?: string;
|
|
68
224
|
}
|
|
69
225
|
export interface CheckboxEvents {
|
|
@@ -72,31 +228,147 @@ export interface CheckboxEvents {
|
|
|
72
228
|
event: Event;
|
|
73
229
|
};
|
|
74
230
|
}
|
|
75
|
-
export interface SelectProps {
|
|
76
|
-
|
|
77
|
-
|
|
231
|
+
export interface SelectProps extends Omit<HTMLButtonAttributes, 'class' | 'value' | 'name' | 'disabled' | 'type' | 'onchange' | 'onclick' | 'aria-describedby' | 'children'> {
|
|
232
|
+
/** Id of the trigger. Omit to auto-generate. */
|
|
233
|
+
id?: string;
|
|
234
|
+
options?: Array<{
|
|
235
|
+
value: string | number;
|
|
78
236
|
label: string;
|
|
237
|
+
disabled?: boolean;
|
|
238
|
+
lang?: string;
|
|
79
239
|
}>;
|
|
80
|
-
value?: string;
|
|
240
|
+
value?: string | number | undefined;
|
|
81
241
|
searchable?: boolean;
|
|
82
242
|
searchPlaceholder?: string;
|
|
83
243
|
maxMenuHeight?: string;
|
|
84
244
|
menuWidth?: string;
|
|
245
|
+
/** `auto` (the default): a BottomSheet on a phone, under the field elsewhere. */
|
|
246
|
+
presentation?: "auto" | "popover" | "sheet" | "native";
|
|
247
|
+
/** In a sheet, a short list (up to six options) without a search field gets a sheet as tall as the list. Default `true`; `false` keeps the half-height sheet. */
|
|
248
|
+
sheetFit?: boolean;
|
|
249
|
+
/** The component's own texts; see `SelectStrings`. The single-text props win over it. */
|
|
250
|
+
strings?: Partial<import("../components/util/select.js").SelectStrings>;
|
|
85
251
|
noResultsText?: string;
|
|
252
|
+
isLoading?: boolean;
|
|
253
|
+
loadingText?: string;
|
|
254
|
+
emptyStateTitle?: string;
|
|
255
|
+
emptyStateDescription?: string;
|
|
256
|
+
emptyStateActionLabel?: string;
|
|
257
|
+
onEmptyStateAction?: () => void;
|
|
258
|
+
placeholder?: string;
|
|
259
|
+
label?: string;
|
|
260
|
+
/** When set, a hidden input submits the selected value with native forms. */
|
|
261
|
+
name?: string;
|
|
262
|
+
required?: boolean;
|
|
86
263
|
disabled?: boolean;
|
|
264
|
+
size?: SizeVariant;
|
|
265
|
+
variant?: 'default' | 'success' | 'warning' | 'error';
|
|
266
|
+
/** Status text under the field. Shown with a `success`, `warning` or `error` variant; for neutral help, use `hint`. */
|
|
267
|
+
message?: string;
|
|
268
|
+
/** Help text under the field, read out with it. */
|
|
269
|
+
hint?: string;
|
|
270
|
+
/** An error under the field. It marks the field invalid and is announced; it wins over `variant` and `message`. */
|
|
271
|
+
error?: string;
|
|
272
|
+
/** Ids of other elements that describe the field. The hint and the message are added after them. */
|
|
273
|
+
'aria-describedby'?: string | null;
|
|
274
|
+
onchange?: (event: Event) => void;
|
|
275
|
+
class?: string;
|
|
276
|
+
/** @deprecated never accepted by the component; use `class`. */
|
|
87
277
|
className?: string;
|
|
88
278
|
}
|
|
279
|
+
export interface PickerFieldProps extends Omit<HTMLButtonAttributes, 'class' | 'value' | 'name' | 'disabled' | 'type' | 'onclick' | 'aria-describedby' | 'aria-haspopup' | 'aria-expanded' | 'aria-controls' | 'children'> {
|
|
280
|
+
/** Id of the control. Omit to auto-generate. */
|
|
281
|
+
id?: string;
|
|
282
|
+
/** The label above the field. It is part of the control's name. */
|
|
283
|
+
label?: string;
|
|
284
|
+
/** The text of what is chosen. It is display text; `formValue` is what a form sends. */
|
|
285
|
+
value?: string;
|
|
286
|
+
/** Shown in the placeholder colour while there is no `value`. */
|
|
287
|
+
placeholder?: string;
|
|
288
|
+
/** An icon or an avatar before the text. */
|
|
289
|
+
leading?: Snippet;
|
|
290
|
+
/** Replaces the chevron at the end: a calendar or a clock, say. It is decoration, so it should be `aria-hidden`. */
|
|
291
|
+
trailing?: Snippet;
|
|
292
|
+
/** Replaces the value text, for rich content. The control is still named by `value`, so give that too. */
|
|
293
|
+
children?: Snippet;
|
|
294
|
+
size?: 'sm' | 'md' | 'lg';
|
|
295
|
+
disabled?: boolean;
|
|
296
|
+
/** Status text under the field. Shown with a `success`, `warning` or `error` variant; for neutral help, use `hint`. */
|
|
297
|
+
message?: string;
|
|
298
|
+
variant?: 'default' | 'success' | 'warning' | 'error';
|
|
299
|
+
/** Help text under the field, read out with it. */
|
|
300
|
+
hint?: string;
|
|
301
|
+
/** An error under the field, announced. A button cannot take `aria-invalid`, so the error is the error edge colour and the described-by message; it wins over `variant` and `message`. */
|
|
302
|
+
error?: string;
|
|
303
|
+
/** What the control opens: `aria-haspopup`. Default `"dialog"`. Not put on a link. */
|
|
304
|
+
haspopup?: 'dialog' | 'listbox' | 'menu' | 'true';
|
|
305
|
+
/** Whether what it opens is open now: `aria-expanded`, and the chevron turns. Leave it out and neither is set. Not put on a link. */
|
|
306
|
+
expanded?: boolean;
|
|
307
|
+
/** Id of what it opens: `aria-controls`. */
|
|
308
|
+
controls?: string;
|
|
309
|
+
/** Makes the control a link to this address, which works without scripts: a page that does the picking. With scripts, `onclick` may call `preventDefault()` and open a sheet instead. */
|
|
310
|
+
href?: string;
|
|
311
|
+
/** With `href`: where the link opens. */
|
|
312
|
+
target?: HTMLAnchorAttributes['target'];
|
|
313
|
+
/** With `href`: the link's relationship, such as `noopener`. */
|
|
314
|
+
rel?: HTMLAnchorAttributes['rel'];
|
|
315
|
+
/** The name a hidden input submits `formValue` under. Without it there is no hidden input. */
|
|
316
|
+
name?: string;
|
|
317
|
+
/** What the form submits for the choice, such as an id. */
|
|
318
|
+
formValue?: string;
|
|
319
|
+
/** The inner `<button>` (or `<a>`). Bindable: the app focuses it when its sheet closes, so a keyboard user is back where they were. */
|
|
320
|
+
element?: HTMLButtonElement | HTMLAnchorElement | null;
|
|
321
|
+
/** Ids of other elements that describe the field. The hint and the message are added after them. */
|
|
322
|
+
'aria-describedby'?: string | null;
|
|
323
|
+
onclick?: (event: MouseEvent) => void;
|
|
324
|
+
class?: string;
|
|
325
|
+
}
|
|
89
326
|
export interface SelectEvents {
|
|
90
327
|
change: {
|
|
91
328
|
value: string;
|
|
92
329
|
event: Event;
|
|
93
330
|
};
|
|
94
331
|
}
|
|
95
|
-
export interface TextareaProps {
|
|
332
|
+
export interface TextareaProps extends Omit<HTMLTextareaAttributes, 'class' | 'value' | 'id' | 'name' | 'placeholder' | 'required' | 'disabled' | 'rows' | 'oninput' | 'aria-describedby'> {
|
|
333
|
+
id?: string;
|
|
96
334
|
value?: string;
|
|
335
|
+
name?: string;
|
|
336
|
+
label?: string;
|
|
337
|
+
hideLabel?: boolean;
|
|
97
338
|
placeholder?: string;
|
|
339
|
+
required?: boolean;
|
|
98
340
|
rows?: number;
|
|
341
|
+
/** The resize grip: `auto` (default) is vertical with a mouse and none on a touch screen. */
|
|
342
|
+
resize?: 'auto' | 'none' | 'vertical';
|
|
343
|
+
/** The field grows with its content, from `rows` up to `maxRows`. */
|
|
344
|
+
autogrow?: boolean;
|
|
345
|
+
/** The tallest an `autogrow` field gets, in rows. */
|
|
346
|
+
maxRows?: number;
|
|
99
347
|
disabled?: boolean;
|
|
348
|
+
loading?: boolean;
|
|
349
|
+
size?: SizeVariant;
|
|
350
|
+
variant?: SemanticVariant;
|
|
351
|
+
/** Status text under the field. Shown with a `success`, `warning` or `error` variant; for neutral help, use `hint`. */
|
|
352
|
+
message?: string;
|
|
353
|
+
/** Help text under the field, read out with it. */
|
|
354
|
+
hint?: string;
|
|
355
|
+
/** An error under the field. It marks the field invalid and is announced; it wins over `variant` and `message`. */
|
|
356
|
+
error?: string;
|
|
357
|
+
/** A character count under the field. It needs `maxlength`, and is part of the field's description. */
|
|
358
|
+
count?: boolean;
|
|
359
|
+
/** The count is shown from this many characters on. `0` (default): always. */
|
|
360
|
+
countFrom?: number;
|
|
361
|
+
/** The words of the count. Default: "12 / 2000". */
|
|
362
|
+
countText?: (count: {
|
|
363
|
+
length: number;
|
|
364
|
+
max: number;
|
|
365
|
+
remaining: number;
|
|
366
|
+
}) => string;
|
|
367
|
+
/** Ids of other elements that describe the field. The hint and the message are added after them. */
|
|
368
|
+
'aria-describedby'?: string | null;
|
|
369
|
+
oninput?: (event: Event) => void;
|
|
370
|
+
class?: string;
|
|
371
|
+
/** @deprecated never accepted by the component; use `class`. */
|
|
100
372
|
className?: string;
|
|
101
373
|
}
|
|
102
374
|
export interface TextareaEvents {
|
|
@@ -109,38 +381,221 @@ export interface TextareaEvents {
|
|
|
109
381
|
event: Event;
|
|
110
382
|
};
|
|
111
383
|
}
|
|
112
|
-
export interface ModalProps {
|
|
113
|
-
|
|
384
|
+
export interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'title' | 'role' | 'onclick' | 'onkeydown' | 'onclose' | 'children'> {
|
|
385
|
+
/** Open state. Bindable. */
|
|
386
|
+
isOpen?: boolean;
|
|
114
387
|
title?: string;
|
|
388
|
+
description?: string;
|
|
389
|
+
size?: 'sm' | 'md' | 'lg';
|
|
390
|
+
role?: 'dialog' | 'alertdialog';
|
|
391
|
+
showClose?: boolean;
|
|
392
|
+
closeLabel?: string;
|
|
393
|
+
/** CSS selector, inside the panel, of the control that takes focus on open. */
|
|
394
|
+
initialFocus?: string;
|
|
395
|
+
/** Render the overlay in `document.body`. */
|
|
396
|
+
portal?: boolean;
|
|
397
|
+
/** When false, Escape, a backdrop click and the close button do not close the modal. */
|
|
398
|
+
dismissible?: boolean;
|
|
399
|
+
/** Fills the screen: `true` at every width, `'mobile'` below 768px only. */
|
|
400
|
+
fullScreen?: boolean | 'mobile';
|
|
401
|
+
onclose?: (detail: {
|
|
402
|
+
reason: 'escape' | 'backdrop' | 'close-button';
|
|
403
|
+
}) => void;
|
|
404
|
+
/** @deprecated for close reporting: use `onclose`. Still called on close. */
|
|
405
|
+
onclick?: (event: Event) => void;
|
|
406
|
+
onkeydown?: (event: Event) => void;
|
|
407
|
+
'data-testid'?: string;
|
|
408
|
+
class?: string;
|
|
409
|
+
children?: Snippet;
|
|
410
|
+
footer?: Snippet;
|
|
411
|
+
/** @deprecated never accepted by the component; use `isOpen`. */
|
|
412
|
+
open?: boolean;
|
|
413
|
+
/** @deprecated never accepted by the component; use `class`. */
|
|
115
414
|
className?: string;
|
|
116
415
|
}
|
|
117
416
|
export interface ModalEvents {
|
|
118
417
|
}
|
|
119
418
|
export interface AlertProps {
|
|
120
|
-
|
|
121
|
-
|
|
419
|
+
variant?: ExtendedSemanticVariant | 'brand';
|
|
420
|
+
title?: string;
|
|
421
|
+
message?: string;
|
|
422
|
+
closable?: boolean;
|
|
423
|
+
/** Accessible name of the dismiss button a `closable` alert has. */
|
|
424
|
+
closeLabel?: string;
|
|
425
|
+
/** Visible state. Bindable. */
|
|
426
|
+
open?: boolean;
|
|
427
|
+
/** Shrink to content instead of filling the container. */
|
|
428
|
+
inline?: boolean;
|
|
429
|
+
/** Draws the tinted edge (default `true`). `false` keeps the 1px and makes it transparent; `--zabi-alert-border-width: 0px` on any ancestor removes it for every alert under it. */
|
|
430
|
+
bordered?: boolean;
|
|
431
|
+
onclick?: (event: Event) => void;
|
|
432
|
+
class?: string;
|
|
433
|
+
/** @deprecated use `class`. */
|
|
122
434
|
className?: string;
|
|
435
|
+
children?: Snippet;
|
|
436
|
+
/** @deprecated never accepted by the component; use `variant`. */
|
|
437
|
+
type?: 'success' | 'error' | 'warning' | 'info';
|
|
123
438
|
}
|
|
124
|
-
export interface
|
|
125
|
-
|
|
439
|
+
export interface StatProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class'> {
|
|
440
|
+
/** The figure, shown as given. */
|
|
441
|
+
value: string | number;
|
|
442
|
+
label?: string;
|
|
443
|
+
/** Drawn after the value, smaller, on the same baseline. */
|
|
444
|
+
unit?: string;
|
|
445
|
+
size?: 'sm' | 'md' | 'lg';
|
|
446
|
+
align?: 'start' | 'center' | 'end';
|
|
447
|
+
labelPosition?: 'below' | 'above';
|
|
448
|
+
class?: string;
|
|
449
|
+
/** Replaces `value` for a figure that needs markup. */
|
|
450
|
+
children?: Snippet;
|
|
451
|
+
}
|
|
452
|
+
export interface SpeechBubbleProps extends Omit<HTMLAttributes<HTMLElement>, 'class'> {
|
|
453
|
+
/** The caption that names the quotation; a `figcaption`. A snippet for the app's own text style. */
|
|
454
|
+
label?: string | Snippet;
|
|
455
|
+
/** Keeps the caption for assistive technology and takes it off the screen. */
|
|
456
|
+
labelHidden?: boolean;
|
|
457
|
+
/** The side the tail is on; follows the text direction. */
|
|
458
|
+
side?: 'end' | 'start';
|
|
459
|
+
/** `ink` (default) or `paper`; `--zabi-bubble-fill` and `--zabi-bubble-text` win over both. */
|
|
460
|
+
tone?: 'ink' | 'paper';
|
|
461
|
+
/** A drawing on the top corner of the tail's side, hidden from assistive technology. */
|
|
462
|
+
decoration?: Snippet;
|
|
463
|
+
class?: string;
|
|
464
|
+
/** The quoted text. */
|
|
465
|
+
children?: Snippet;
|
|
466
|
+
}
|
|
467
|
+
export interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'class'> {
|
|
468
|
+
variant?: BadgeVariant;
|
|
469
|
+
size?: SizeVariant;
|
|
470
|
+
emphasis?: 'subtle' | 'solid';
|
|
471
|
+
/** Draws the family's edge on a subtle badge. Default `false`. */
|
|
472
|
+
bordered?: boolean;
|
|
473
|
+
/** Label text. Ignored when `children` is provided. */
|
|
126
474
|
text?: string;
|
|
475
|
+
showIcon?: boolean;
|
|
476
|
+
class?: string;
|
|
477
|
+
children?: Snippet;
|
|
478
|
+
/** @deprecated never accepted by the component; use `class`. */
|
|
127
479
|
className?: string;
|
|
128
480
|
}
|
|
481
|
+
export interface ChipProps extends Omit<HTMLButtonAttributes, 'class' | 'type' | 'value' | 'onchange' | 'children'> {
|
|
482
|
+
/** Makes the chip a link to this address, which works without scripts. */
|
|
483
|
+
href?: string;
|
|
484
|
+
target?: HTMLAnchorAttributes['target'];
|
|
485
|
+
rel?: HTMLAnchorAttributes['rel'];
|
|
486
|
+
download?: HTMLAnchorAttributes['download'];
|
|
487
|
+
hreflang?: HTMLAnchorAttributes['hreflang'];
|
|
488
|
+
/** With `href`: what `aria-current` says while `selected`. Default `"true"`. */
|
|
489
|
+
current?: 'page' | 'true' | 'step' | 'location' | 'date' | 'time';
|
|
490
|
+
/** `checkbox` or `radio`: a real input under the chip. `submit` or `button`: a button that does not toggle (`selected` is drawn and said with `aria-pressed`, the app decides it). Without it (and without `href`) the chip is a toggle button. */
|
|
491
|
+
type?: 'checkbox' | 'radio' | 'submit' | 'button';
|
|
492
|
+
name?: string;
|
|
493
|
+
value?: string;
|
|
494
|
+
/** The chip is chosen. Bindable. */
|
|
495
|
+
selected?: boolean;
|
|
496
|
+
required?: boolean;
|
|
497
|
+
form?: string;
|
|
498
|
+
/** 28, 32 or 40px tall. Default `md`. */
|
|
499
|
+
size?: 'sm' | 'md' | 'lg';
|
|
500
|
+
/** An icon or an avatar before the label. */
|
|
501
|
+
leading?: Snippet;
|
|
502
|
+
/** A check icon before the label while selected. On for a checkbox and a toggle button, off for a link and a radio. */
|
|
503
|
+
checkmark?: boolean;
|
|
504
|
+
/** A button chip (`submit`, `button` or the toggle) while its action is on its way: `aria-busy` and `aria-disabled`, a spinner, the press swallowed, width and focus kept. Ignored by a link and by `checkbox` / `radio`. */
|
|
505
|
+
loading?: boolean;
|
|
506
|
+
/** Called with the new `selected` when a person changes it. */
|
|
507
|
+
onchange?: (selected: boolean) => void;
|
|
508
|
+
class?: string;
|
|
509
|
+
children?: Snippet;
|
|
510
|
+
}
|
|
511
|
+
export interface ChipGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'onchange' | 'children'> {
|
|
512
|
+
class?: string;
|
|
513
|
+
/** `wrap` (default) or `row`: one line that scrolls sideways. */
|
|
514
|
+
layout?: 'wrap' | 'row';
|
|
515
|
+
/** The group's accessible name. Not shown unless `showLabel`. */
|
|
516
|
+
label?: string;
|
|
517
|
+
showLabel?: boolean;
|
|
518
|
+
/** `radio` or `checkbox`: the chips are inputs sharing this group's `name` and `value`. */
|
|
519
|
+
type?: 'radio' | 'checkbox';
|
|
520
|
+
name?: string;
|
|
521
|
+
/** Bindable: a string (or `undefined`) for `radio`, an array of strings for `checkbox`. */
|
|
522
|
+
value?: string | string[] | undefined;
|
|
523
|
+
disabled?: boolean;
|
|
524
|
+
/** With `layout="row"`: `fade` (default) or `none`. */
|
|
525
|
+
edge?: 'fade' | 'none';
|
|
526
|
+
/** With `layout="row"`: bring the chosen chip into view on load. Default `true`. */
|
|
527
|
+
scrollSelectedIntoView?: boolean;
|
|
528
|
+
onchange?: (value: string | string[] | undefined) => void;
|
|
529
|
+
children?: Snippet;
|
|
530
|
+
}
|
|
129
531
|
export interface ProgressProps {
|
|
130
532
|
value?: number;
|
|
131
533
|
max?: number;
|
|
534
|
+
/** Bar height: 4, 8, 12 and 16px. */
|
|
535
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
536
|
+
/** Draws `max` separate segments (a whole number from 2 to 24), `value` of them filled; any other `max` draws the continuous bar. */
|
|
537
|
+
segmented?: boolean;
|
|
538
|
+
/** Overrides for the built-in strings. */
|
|
539
|
+
strings?: Partial<ProgressStrings>;
|
|
540
|
+
label?: string;
|
|
541
|
+
/** Names the progressbar when there is no visible `label`. */
|
|
542
|
+
'aria-label'?: string;
|
|
543
|
+
/** Points the progressbar at another element's id for its name. */
|
|
544
|
+
'aria-labelledby'?: string;
|
|
545
|
+
class?: string;
|
|
546
|
+
/** @deprecated never accepted by the component; use `class`. */
|
|
132
547
|
className?: string;
|
|
133
548
|
}
|
|
134
|
-
export interface SkeletonProps {
|
|
549
|
+
export interface SkeletonProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'role' | 'aria-busy' | 'aria-hidden'> {
|
|
135
550
|
variant?: 'text' | 'circle' | 'block';
|
|
136
551
|
width?: string | number;
|
|
137
552
|
height?: string | number;
|
|
138
553
|
class?: string;
|
|
139
554
|
'aria-label'?: string;
|
|
555
|
+
/** Overrides for the built-in strings. */
|
|
556
|
+
strings?: Partial<SkeletonStrings>;
|
|
557
|
+
/** No role, no label, hidden from assistive tech. */
|
|
558
|
+
decorative?: boolean;
|
|
559
|
+
/** "on-color" is for a brand, accent or fill block. */
|
|
560
|
+
tone?: 'neutral' | 'on-color';
|
|
561
|
+
/** Text variant only: this many lines (1 to 20), the last one shorter. */
|
|
562
|
+
lines?: number;
|
|
563
|
+
}
|
|
564
|
+
export interface SkeletonGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'role' | 'aria-busy'> {
|
|
565
|
+
'aria-label'?: string;
|
|
566
|
+
strings?: Partial<SkeletonStrings>;
|
|
567
|
+
class?: string;
|
|
568
|
+
children?: Snippet;
|
|
140
569
|
}
|
|
141
|
-
export interface ToggleProps {
|
|
570
|
+
export interface ToggleProps extends Omit<HTMLButtonAttributes, 'class' | 'id' | 'name' | 'value' | 'disabled' | 'type' | 'role' | 'onclick' | 'onchange' | 'children'> {
|
|
571
|
+
/** Omit to auto-generate. */
|
|
572
|
+
id?: string;
|
|
573
|
+
/** When set, a hidden input submits `value` with native forms while checked. */
|
|
574
|
+
name?: string;
|
|
575
|
+
value?: string;
|
|
142
576
|
checked?: boolean;
|
|
143
577
|
disabled?: boolean;
|
|
578
|
+
loading?: boolean;
|
|
579
|
+
label?: string;
|
|
580
|
+
/**
|
|
581
|
+
* Drawn inside the one label, between the switch and the label text. A
|
|
582
|
+
* leading image should have an empty alt: the label names the row.
|
|
583
|
+
*/
|
|
584
|
+
leading?: Snippet;
|
|
585
|
+
/** A line under the label, inside it, tied to the switch with `aria-describedby`; not part of the name. */
|
|
586
|
+
description?: string;
|
|
587
|
+
/** Ids of other elements that describe the switch. The description is added after them. */
|
|
588
|
+
'aria-describedby'?: string | null;
|
|
589
|
+
/** The switch's accessible name when there is no visible `label`. */
|
|
590
|
+
'aria-label'?: string;
|
|
591
|
+
/** The id of an element of the page that names the switch. */
|
|
592
|
+
'aria-labelledby'?: string;
|
|
593
|
+
onclick?: (event: MouseEvent) => void;
|
|
594
|
+
onchange?: (event: {
|
|
595
|
+
checked: boolean;
|
|
596
|
+
}) => void;
|
|
597
|
+
class?: string;
|
|
598
|
+
/** @deprecated never accepted by the component; use `class`. */
|
|
144
599
|
className?: string;
|
|
145
600
|
}
|
|
146
601
|
export interface ToggleEvents {
|
|
@@ -149,23 +604,635 @@ export interface ToggleEvents {
|
|
|
149
604
|
event: Event;
|
|
150
605
|
};
|
|
151
606
|
}
|
|
152
|
-
export interface TooltipProps {
|
|
153
|
-
content
|
|
607
|
+
export interface TooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class'> {
|
|
608
|
+
content?: string;
|
|
609
|
+
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
610
|
+
delay?: number;
|
|
611
|
+
disabled?: boolean;
|
|
612
|
+
/** Lay the trigger out as a full-width block. */
|
|
613
|
+
block?: boolean;
|
|
614
|
+
/** Position the bubble against the viewport, so a scrolling ancestor cannot clip it. */
|
|
615
|
+
fixed?: boolean;
|
|
616
|
+
/** Milliseconds a tooltip opened by a tap stays; `0` keeps it until it is dismissed. */
|
|
617
|
+
touchDuration?: number;
|
|
618
|
+
/** `material` (default): thick glass with body text and no arrow. `inverted`: the 8.1 dark bubble with an arrow. */
|
|
619
|
+
tone?: 'material' | 'inverted';
|
|
620
|
+
class?: string;
|
|
621
|
+
children?: Snippet;
|
|
622
|
+
/** @deprecated never accepted by the component; use `placement`. */
|
|
154
623
|
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
624
|
+
/** @deprecated never accepted by the component; use `class`. */
|
|
155
625
|
className?: string;
|
|
156
626
|
}
|
|
627
|
+
export interface BottomTabBarProps extends Omit<HTMLAttributes<HTMLElement>, 'class'> {
|
|
628
|
+
/** Three to five destinations. */
|
|
629
|
+
items: BottomTabBarItem[];
|
|
630
|
+
/** The href of the active tab, or the path of the current page. Defaults to the current page. */
|
|
631
|
+
active?: string;
|
|
632
|
+
/** The tab just pressed, while its page is on its way: it takes the mark, `aria-current` stays on `active`. */
|
|
633
|
+
pending?: string;
|
|
634
|
+
/** Accessible name of the navigation landmark. */
|
|
635
|
+
label?: string;
|
|
636
|
+
/** What a badge adds to the tab's accessible name, after the label and a comma. */
|
|
637
|
+
badgeLabel?: (count: number, item: BottomTabBarItem) => string;
|
|
638
|
+
/** Counts above this show as `99+`. */
|
|
639
|
+
badgeMax?: number;
|
|
640
|
+
/** Defaults to `fixed`, or to `static` inside an `AppShell`. */
|
|
641
|
+
position?: 'fixed' | 'static';
|
|
642
|
+
/** When the bar shows the glass and the hairline: `auto` follows the scroll position, `always`, `never`. Default `auto`. */
|
|
643
|
+
scrollEdge?: 'auto' | 'always' | 'never';
|
|
644
|
+
/** Draws the bar as a rounded glass capsule inset from the screen edges. Default false. */
|
|
645
|
+
floating?: boolean;
|
|
646
|
+
class?: string;
|
|
647
|
+
}
|
|
648
|
+
export interface AppBarProps extends Omit<HTMLAttributes<HTMLElement>, 'class' | 'title'> {
|
|
649
|
+
/** The name of the screen, as a heading. */
|
|
650
|
+
title?: string;
|
|
651
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
652
|
+
/** Shows the back control as a link to this address. */
|
|
653
|
+
backHref?: string;
|
|
654
|
+
/** Called when the back control is activated; on its own it makes the control a button. */
|
|
655
|
+
onback?: (event: MouseEvent) => void;
|
|
656
|
+
/** Accessible name of the back control. */
|
|
657
|
+
backLabel?: string;
|
|
658
|
+
/**
|
|
659
|
+
* Hides the bar while the page scrolls down and brings it back when it scrolls up.
|
|
660
|
+
* Keyboard focus inside the bar holds it and brings it back; focus left by a tap does not.
|
|
661
|
+
*/
|
|
662
|
+
collapseOnScroll?: boolean;
|
|
663
|
+
/** How many lines the title may take before it is cut. Default 1. */
|
|
664
|
+
titleLines?: 1 | 2;
|
|
665
|
+
/** Before the title, after the back control. The bar's row is on a fixed pixel scale (`--spacing: 4px`), so the bar's own controls do not grow with the text size. Size what you place here on the same scale (Tailwind numeric classes such as `size-9`, or `calc(var(--spacing) * 9)`), not in rem, or it grows at 200% text while the bar's controls do not. */
|
|
666
|
+
leading?: Snippet;
|
|
667
|
+
/** After the title. At most two icon buttons. The bar's row is on a fixed pixel scale (`--spacing: 4px`), so the bar's own controls do not grow with the text size. Size what you place here on the same scale (Tailwind numeric classes such as `size-9`, or `calc(var(--spacing) * 9)`), not in rem, or it grows at 200% text while the bar's controls do not. */
|
|
668
|
+
actions?: Snippet;
|
|
669
|
+
/** When the bar shows the glass and the hairline: `auto` follows the scroll position, `always`, `never`. Default `auto`. */
|
|
670
|
+
scrollEdge?: 'auto' | 'always' | 'never';
|
|
671
|
+
/** Draws the title large on a second row that scrolls away; the bar then shows it small. */
|
|
672
|
+
largeTitle?: boolean;
|
|
673
|
+
/** The bar's fill: the page colour, none at rest, the brand colour with on-brand content, or none with the colours of the block it sits in (`inherit`). Default `default`. */
|
|
674
|
+
tone?: 'default' | 'transparent' | 'brand' | 'inherit';
|
|
675
|
+
/** `sticky` (default), or `static` for a bar in the flow of the page. */
|
|
676
|
+
position?: 'sticky' | 'static';
|
|
677
|
+
class?: string;
|
|
678
|
+
}
|
|
679
|
+
export interface AppShellProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'style'> {
|
|
680
|
+
/** The top bar, an `AppBar`. */
|
|
681
|
+
header?: Snippet;
|
|
682
|
+
/** The scrolling content, rendered in the element `contentElement` names. */
|
|
683
|
+
children?: Snippet;
|
|
684
|
+
/** The element around the content. Use `div` for a shell inside another `<main>`. */
|
|
685
|
+
contentElement?: 'main' | 'div';
|
|
686
|
+
/** The bottom bar, a `BottomTabBar`. */
|
|
687
|
+
footer?: Snippet;
|
|
688
|
+
/** Paints the shell with the page colour and the brand wash, and lets it show through the header. */
|
|
689
|
+
canvas?: boolean;
|
|
690
|
+
/** One navigation, drawn as tabs, a rail or a sidebar; `AppNavigation` is the ready-made content. */
|
|
691
|
+
navigation?: Snippet<[AppShellNavigationContext]>;
|
|
692
|
+
/** Where the `navigation` goes. `auto` (default): tabs below 48rem, a rail from 48rem, a sidebar from 64rem. */
|
|
693
|
+
navigationPlacement?: AppShellNavigationMode;
|
|
694
|
+
/** Without a `header`, no top safe-area padding on the content: it starts at the top of the screen and handles the safe area itself. */
|
|
695
|
+
flushTop?: boolean;
|
|
696
|
+
class?: string;
|
|
697
|
+
/** Added after the two custom properties the shell sets. */
|
|
698
|
+
style?: string;
|
|
699
|
+
}
|
|
700
|
+
export interface AppShellHeaderPartProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class'> {
|
|
701
|
+
/** The part's content: an `AppBar`, a search field, filter chips, tabs. */
|
|
702
|
+
children?: Snippet;
|
|
703
|
+
/** Stays at the top under the parts that stick above it (default), or scrolls away with the content. */
|
|
704
|
+
sticky?: boolean;
|
|
705
|
+
class?: string;
|
|
706
|
+
}
|
|
707
|
+
export interface AppNavigationProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class'> {
|
|
708
|
+
/** The destinations, as for `BottomTabBar`. */
|
|
709
|
+
items: BottomTabBarItem[];
|
|
710
|
+
/** The href of the active destination, or the path of the current page. Defaults to the current page. */
|
|
711
|
+
active?: string;
|
|
712
|
+
/** Accessible name of the navigation landmark. */
|
|
713
|
+
label?: string;
|
|
714
|
+
/** What a count adds to the link's accessible name, after the label and a comma. */
|
|
715
|
+
badgeLabel?: (count: number, item: BottomTabBarItem) => string;
|
|
716
|
+
/** Counts above this show as `99+`. */
|
|
717
|
+
badgeMax?: number;
|
|
718
|
+
/** Draws the tab bar form as a floating capsule of glass. */
|
|
719
|
+
floating?: boolean;
|
|
720
|
+
/** Above the list in the rail and the sidebar. */
|
|
721
|
+
header?: Snippet<[{
|
|
722
|
+
placement: 'rail' | 'sidebar';
|
|
723
|
+
}]>;
|
|
724
|
+
/** Below the list in the rail and the sidebar. */
|
|
725
|
+
footer?: Snippet<[{
|
|
726
|
+
placement: 'rail' | 'sidebar';
|
|
727
|
+
}]>;
|
|
728
|
+
class?: string;
|
|
729
|
+
}
|
|
730
|
+
export interface CodeFieldProps extends Omit<HTMLInputAttributes, 'class' | 'size' | 'value' | 'type' | 'id' | 'name' | 'required' | 'disabled' | 'readonly' | 'maxlength' | 'oninput' | 'onblur' | 'aria-label' | 'aria-describedby'> {
|
|
731
|
+
id?: string;
|
|
732
|
+
/** The code typed so far. Bindable. */
|
|
733
|
+
value?: string;
|
|
734
|
+
/** The name the code is posted under, with or without scripts. */
|
|
735
|
+
name?: string;
|
|
736
|
+
class?: string;
|
|
737
|
+
/** Places in the code, a whole number from 1 to 12. Default 6. */
|
|
738
|
+
length?: number;
|
|
739
|
+
/** `numeric` (default): digits only. `alphanumeric` also takes letters. */
|
|
740
|
+
mode?: CodeFieldMode;
|
|
741
|
+
/** Box size: `sm` (44px tall), `md` (default) or `lg`. */
|
|
742
|
+
size?: SizeVariant;
|
|
743
|
+
/** Draws the boxes in groups with a wider gap: a number is each group's size (`4` makes 4 and 4 of 8), a list gives each group's size. Only the drawing changes; the row wraps between groups when it cannot fit. */
|
|
744
|
+
groups?: number | number[];
|
|
745
|
+
/** Names the field. Defaults to the provider's `codeField.label`, then "Verification code". */
|
|
746
|
+
label?: string;
|
|
747
|
+
/** Keeps the label for assistive technology and takes it off the screen. */
|
|
748
|
+
labelHidden?: boolean;
|
|
749
|
+
required?: boolean;
|
|
750
|
+
disabled?: boolean;
|
|
751
|
+
readonly?: boolean;
|
|
752
|
+
variant?: SemanticVariant;
|
|
753
|
+
/** Status text under the field; shown with a `success`, `warning` or `error` variant. */
|
|
754
|
+
message?: string;
|
|
755
|
+
/** Help text under the field, read out with it. */
|
|
756
|
+
hint?: string;
|
|
757
|
+
/** An error under the field: marks it invalid and is announced; wins over `variant` and `message`. */
|
|
758
|
+
error?: string;
|
|
759
|
+
/** Called with the code when the last place is filled. It does not submit anything. */
|
|
760
|
+
oncomplete?: (value: string) => void;
|
|
761
|
+
/** Overrides for the built-in strings: label, description. */
|
|
762
|
+
strings?: Partial<CodeFieldStrings>;
|
|
763
|
+
oninput?: (event: Event) => void;
|
|
764
|
+
onblur?: (event: Event) => void;
|
|
765
|
+
'aria-label'?: string;
|
|
766
|
+
'aria-describedby'?: string | null;
|
|
767
|
+
}
|
|
768
|
+
export interface RatingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'onchange' | 'aria-label' | 'aria-labelledby'> {
|
|
769
|
+
class?: string;
|
|
770
|
+
/** Stars given, or `null` for no rating. Bindable. */
|
|
771
|
+
value?: number | null;
|
|
772
|
+
max?: number;
|
|
773
|
+
/** Names the rating. Shown above the stars unless `hideLabel`. */
|
|
774
|
+
label?: string;
|
|
775
|
+
hideLabel?: boolean;
|
|
776
|
+
'aria-label'?: string;
|
|
777
|
+
'aria-labelledby'?: string;
|
|
778
|
+
/** `xl` is 40px stars; `display` is a display-size compact score (`xl` as a row of stars). */
|
|
779
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'display';
|
|
780
|
+
/** Colour of a filled star: the primary action colour, or the app's accent. */
|
|
781
|
+
tone?: 'primary' | 'accent';
|
|
782
|
+
/** Shows a score: one image with one name, and stars can be partly filled. */
|
|
783
|
+
readonly?: boolean;
|
|
784
|
+
/** Adds a clear button; pressing the selected star again never clears. */
|
|
785
|
+
clearable?: boolean;
|
|
786
|
+
disabled?: boolean;
|
|
787
|
+
name?: string;
|
|
788
|
+
/** A read-only score: one star and the number; implies `readonly`. */
|
|
789
|
+
compact?: boolean;
|
|
790
|
+
/** An empty star: a hollow `outline` (default) or a `soft` fill. */
|
|
791
|
+
empty?: 'outline' | 'soft';
|
|
792
|
+
/** On by default when `readonly`. */
|
|
793
|
+
showValue?: boolean;
|
|
794
|
+
formatValue?: (value: number) => string;
|
|
795
|
+
strings?: Partial<RatingStrings>;
|
|
796
|
+
onchange?: (value: number | null) => void;
|
|
797
|
+
}
|
|
798
|
+
export interface SegmentedControlProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'onchange' | 'aria-label' | 'aria-labelledby'> {
|
|
799
|
+
class?: string;
|
|
800
|
+
/** Two to four choices. */
|
|
801
|
+
options: SegmentedControlOption[];
|
|
802
|
+
/** Selected value. Bindable. */
|
|
803
|
+
value?: string | undefined;
|
|
804
|
+
/** Accessible name of the group. Not shown. */
|
|
805
|
+
label?: string;
|
|
806
|
+
'aria-label'?: string;
|
|
807
|
+
'aria-labelledby'?: string;
|
|
808
|
+
size?: SizeVariant;
|
|
809
|
+
/** Equal-width segments that fill the row. */
|
|
810
|
+
fullWidth?: boolean;
|
|
811
|
+
name?: string;
|
|
812
|
+
/** Look of the selected segment: a card-coloured thumb (`neutral`, default) or the solid primary fill. */
|
|
813
|
+
tone?: 'neutral' | 'primary';
|
|
814
|
+
disabled?: boolean;
|
|
815
|
+
onchange?: (value: string) => void;
|
|
816
|
+
}
|
|
817
|
+
export interface FloatingActionButtonProps extends Omit<HTMLAttributes<HTMLElement>, 'class'> {
|
|
818
|
+
/** What the button does. Its accessible name, and its text when `extended`. */
|
|
819
|
+
label: string;
|
|
820
|
+
/** An icon component, as `@lucide/svelte` icons are. A plus sign by default. */
|
|
821
|
+
icon?: Component<{
|
|
822
|
+
size?: number;
|
|
823
|
+
class?: string;
|
|
824
|
+
}>;
|
|
825
|
+
/** Shows the label as text beside the icon. */
|
|
826
|
+
extended?: boolean;
|
|
827
|
+
/** Makes it a link to this address. Without it, it is a button. */
|
|
828
|
+
href?: string;
|
|
829
|
+
/** The bottom corner it sits in. `bottom-end` follows the writing direction. */
|
|
830
|
+
position?: 'bottom-end' | 'bottom-start' | 'bottom-center';
|
|
831
|
+
class?: string;
|
|
832
|
+
}
|
|
833
|
+
export interface StickyActionBarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'style'> {
|
|
834
|
+
/** Accessible name. With it the bar is a group. */
|
|
835
|
+
label?: string;
|
|
836
|
+
/** When the bar shows the glass and the hairline: `auto` follows the scroll position, `always`, `never`. Default `auto`. */
|
|
837
|
+
scrollEdge?: 'auto' | 'always' | 'never';
|
|
838
|
+
class?: string;
|
|
839
|
+
/** Added after the offset and margin the bar sets while the keyboard is up. */
|
|
840
|
+
style?: string;
|
|
841
|
+
/** The main action, and at most one or two beside it. */
|
|
842
|
+
children?: Snippet;
|
|
843
|
+
}
|
|
844
|
+
export interface BottomSheetProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'title' | 'onclose' | 'onkeydown'> {
|
|
845
|
+
isOpen?: boolean;
|
|
846
|
+
/** Heading of the sheet, and its accessible name. */
|
|
847
|
+
title: string;
|
|
848
|
+
description?: string;
|
|
849
|
+
/** The heights the sheet can rest at. */
|
|
850
|
+
snapPoints?: BottomSheetSnap[];
|
|
851
|
+
/** The snap point the sheet is at. Bindable. */
|
|
852
|
+
snap?: BottomSheetSnap;
|
|
853
|
+
/** As tall as the content, up to half the screen; one resting height, the grip only drags. */
|
|
854
|
+
fit?: boolean;
|
|
855
|
+
/** With `fit`: the tallest the sheet grows before its content scrolls. */
|
|
856
|
+
fitMax?: 'half' | 'full';
|
|
857
|
+
/** Render the overlay in `document.body`; `false` renders in place. */
|
|
858
|
+
portal?: boolean;
|
|
859
|
+
/** When false, Escape, the backdrop, the close button and a swipe down do not close it. */
|
|
860
|
+
dismissible?: boolean;
|
|
861
|
+
/** Fired when the sheet closes itself, with what the user did. */
|
|
862
|
+
onclose?: (detail: {
|
|
863
|
+
reason: BottomSheetCloseReason;
|
|
864
|
+
}) => void;
|
|
865
|
+
/** Hears every keydown in the sheet, after the sheet has handled Escape. */
|
|
866
|
+
onkeydown?: (event: KeyboardEvent) => void;
|
|
867
|
+
/** Accessible name of the close button. */
|
|
868
|
+
closeLabel?: string;
|
|
869
|
+
/** Accessible name of the grip while its button takes the sheet up a step. */
|
|
870
|
+
expandLabel?: string;
|
|
871
|
+
/** Accessible name of the grip while its button takes the sheet down a step. */
|
|
872
|
+
collapseLabel?: string;
|
|
873
|
+
/** CSS selector of the control that takes focus when the sheet opens. */
|
|
874
|
+
initialFocus?: string;
|
|
875
|
+
class?: string;
|
|
876
|
+
children?: Snippet;
|
|
877
|
+
/** Pinned to the bottom of the panel, below the scrolling content. */
|
|
878
|
+
footer?: Snippet;
|
|
879
|
+
}
|
|
880
|
+
export interface DateFieldProps extends Omit<HTMLInputAttributes, 'class' | 'type' | 'value' | 'size' | 'min' | 'max' | 'step' | 'required' | 'disabled' | 'readonly' | 'id' | 'name'> {
|
|
881
|
+
/** Omit to auto-generate; pair with FormField's `id` when used inside FormField. */
|
|
882
|
+
id?: string;
|
|
883
|
+
/** The date as `YYYY-MM-DD`, or `""` while empty. Supports `bind:value`. */
|
|
884
|
+
value?: string;
|
|
885
|
+
/** Name the value is submitted under in a form. */
|
|
886
|
+
name?: string;
|
|
887
|
+
label?: string;
|
|
888
|
+
/** True when FormField supplies the visible `<label>`. */
|
|
889
|
+
hideLabel?: boolean;
|
|
890
|
+
/** Help text under the field, read out with it. */
|
|
891
|
+
hint?: string;
|
|
892
|
+
/** An error under the field. It marks the field invalid and is announced. */
|
|
893
|
+
error?: string;
|
|
894
|
+
/** Earliest value that can be picked, in the format of `value`. */
|
|
895
|
+
min?: string;
|
|
896
|
+
/** Latest value that can be picked, in the format of `value`. */
|
|
897
|
+
max?: string;
|
|
898
|
+
/** Steps between dates that can be picked, in days. */
|
|
899
|
+
step?: number | 'any';
|
|
900
|
+
required?: boolean;
|
|
901
|
+
disabled?: boolean;
|
|
902
|
+
/** Shows the value without letting it be changed; it is still submitted. */
|
|
903
|
+
readonly?: boolean;
|
|
904
|
+
/** Height, on the scale Input and Button use. At least 44px on a touch screen. */
|
|
905
|
+
size?: SizeVariant;
|
|
906
|
+
/** Extra classes for the `<input>`. */
|
|
907
|
+
class?: string;
|
|
908
|
+
/** Language of the field, as a BCP 47 tag or a list of them. With it the field shows the value in that language and opens the library's own picker; without it, the native input. */
|
|
909
|
+
locale?: string | string[];
|
|
910
|
+
/** With `locale`: how the value is shown, as options of `Intl.DateTimeFormat`. */
|
|
911
|
+
format?: Intl.DateTimeFormatOptions;
|
|
912
|
+
/** With `locale`: shown in the placeholder colour while the field is empty. */
|
|
913
|
+
placeholder?: string;
|
|
914
|
+
/** With `locale`: `library` (default) opens the library's picker in a sheet; `native` opens the platform's. */
|
|
915
|
+
picker?: 'library' | 'native';
|
|
916
|
+
/** With `locale`: the words the field says; replace any of them to translate. */
|
|
917
|
+
strings?: Partial<{
|
|
918
|
+
clear: string;
|
|
919
|
+
chooseDate: string;
|
|
920
|
+
}>;
|
|
921
|
+
}
|
|
922
|
+
export interface TimeFieldProps extends Omit<HTMLInputAttributes, 'class' | 'type' | 'value' | 'size' | 'min' | 'max' | 'step' | 'required' | 'disabled' | 'readonly' | 'id' | 'name'> {
|
|
923
|
+
/** Omit to auto-generate; pair with FormField's `id` when used inside FormField. */
|
|
924
|
+
id?: string;
|
|
925
|
+
/** The time as 24-hour `HH:mm`, or `""` while empty. Supports `bind:value`. */
|
|
926
|
+
value?: string;
|
|
927
|
+
/** Name the value is submitted under in a form. */
|
|
928
|
+
name?: string;
|
|
929
|
+
label?: string;
|
|
930
|
+
/** True when FormField supplies the visible `<label>`. */
|
|
931
|
+
hideLabel?: boolean;
|
|
932
|
+
/** Help text under the field, read out with it. */
|
|
933
|
+
hint?: string;
|
|
934
|
+
/** An error under the field. It marks the field invalid and is announced. */
|
|
935
|
+
error?: string;
|
|
936
|
+
/** Earliest value that can be picked, in the format of `value`. */
|
|
937
|
+
min?: string;
|
|
938
|
+
/** Latest value that can be picked, in the format of `value`. */
|
|
939
|
+
max?: string;
|
|
940
|
+
/** Steps between times that can be picked, in seconds. */
|
|
941
|
+
step?: number | 'any';
|
|
942
|
+
required?: boolean;
|
|
943
|
+
disabled?: boolean;
|
|
944
|
+
/** Shows the value without letting it be changed; it is still submitted. */
|
|
945
|
+
readonly?: boolean;
|
|
946
|
+
/** Height, on the scale Input and Button use. At least 44px on a touch screen. */
|
|
947
|
+
size?: SizeVariant;
|
|
948
|
+
/** Extra classes for the `<input>`. */
|
|
949
|
+
class?: string;
|
|
950
|
+
/** Language of the field, as a BCP 47 tag or a list of them. With it the field shows the value in that language and opens the library's own picker; without it, the native input. */
|
|
951
|
+
locale?: string | string[];
|
|
952
|
+
/** With `locale`: how the value is shown, as options of `Intl.DateTimeFormat`. */
|
|
953
|
+
format?: Intl.DateTimeFormatOptions;
|
|
954
|
+
/** With `locale`: shown in the placeholder colour while the field is empty. */
|
|
955
|
+
placeholder?: string;
|
|
956
|
+
/** With `locale`: `library` (default) opens the library's picker in a sheet; `native` opens the platform's. */
|
|
957
|
+
picker?: 'library' | 'native';
|
|
958
|
+
/** With `locale`: the words the field says; replace any of them to translate. */
|
|
959
|
+
strings?: Partial<{
|
|
960
|
+
clear: string;
|
|
961
|
+
done: string;
|
|
962
|
+
hours: string;
|
|
963
|
+
minutes: string;
|
|
964
|
+
chosenTime: string;
|
|
965
|
+
chooseTime: string;
|
|
966
|
+
}>;
|
|
967
|
+
/** With `locale`, while the field is empty: the time the columns stand at when the sheet opens, as `HH:mm`. Not chosen; `value` stays empty. Left out: now, on the step. */
|
|
968
|
+
openAt?: string;
|
|
969
|
+
}
|
|
970
|
+
export interface CalendarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'onselect'> {
|
|
971
|
+
/** The month shown, as `YYYY-MM`. Supports `bind:month`. */
|
|
972
|
+
month?: string;
|
|
973
|
+
/** The selected day, as `YYYY-MM-DD`, or null. Supports `bind:selected`. */
|
|
974
|
+
selected?: string | null;
|
|
975
|
+
/** What happens on which day. A day shows a dot per event, three at most. */
|
|
976
|
+
events?: CalendarEvent[];
|
|
977
|
+
/** First day of the week: 0 for Sunday to 6 for Saturday. */
|
|
978
|
+
weekStartsOn?: number;
|
|
979
|
+
/**
|
|
980
|
+
* Language of the month and day names, as a BCP 47 tag. It does not translate the
|
|
981
|
+
* words the component adds ("today", "selected", ...): pass those in `strings` too.
|
|
982
|
+
*/
|
|
983
|
+
locale?: string;
|
|
984
|
+
/** Earliest day that can be selected, as `YYYY-MM-DD`. */
|
|
985
|
+
min?: string;
|
|
986
|
+
/** Latest day that can be selected, as `YYYY-MM-DD`. */
|
|
987
|
+
max?: string;
|
|
988
|
+
/** Return true for a day that cannot be selected. */
|
|
989
|
+
isDateDisabled?: (date: string) => boolean;
|
|
990
|
+
/** The words the calendar says; replace any of them to translate. */
|
|
991
|
+
strings?: Partial<CalendarStrings>;
|
|
992
|
+
/** Called with the day when the user selects another one. */
|
|
993
|
+
onselect?: (date: string) => void;
|
|
994
|
+
/** Called with the month when the user moves to another one. */
|
|
995
|
+
onmonthchange?: (month: string) => void;
|
|
996
|
+
/** Extra classes for the host element. */
|
|
997
|
+
class?: string;
|
|
998
|
+
}
|
|
999
|
+
export interface PhotoGridProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'aria-label' | 'aria-labelledby' | 'onselect'> {
|
|
1000
|
+
photos: Photo[];
|
|
1001
|
+
/** How many columns. Left out, it follows the width of the grid: 3, 4 from 480px, 5 from 768px. */
|
|
1002
|
+
columns?: number;
|
|
1003
|
+
/** Shows no more than this many photos; the last tile then says how many more there are. */
|
|
1004
|
+
max?: number;
|
|
1005
|
+
/** Called with the photo's place in `photos` when one is opened. */
|
|
1006
|
+
onopen?: (index: number) => void;
|
|
1007
|
+
/** Makes a press select: `single` for one photo, `multiple` for any number. */
|
|
1008
|
+
selectable?: 'single' | 'multiple';
|
|
1009
|
+
/** Key of the selected photo, or `null`. Supports `bind:selected`. */
|
|
1010
|
+
selected?: PhotoKey | null;
|
|
1011
|
+
/** Keys of the selected photos. Supports `bind:selectedKeys`. */
|
|
1012
|
+
selectedKeys?: PhotoKey[];
|
|
1013
|
+
/** Called when a photo is selected or, in `multiple`, its selection is cleared. */
|
|
1014
|
+
onselect?: (detail: PhotoGridSelectDetail) => void;
|
|
1015
|
+
/** Puts an "Add photo" tile first and is called when it is pressed. */
|
|
1016
|
+
onadd?: () => void;
|
|
1017
|
+
/** Called once when a thumbnail cannot be loaded, so the page can answer with a new address. */
|
|
1018
|
+
onloaderror?: (photo: Photo, index: number) => void;
|
|
1019
|
+
/** Puts a "Try again" button on each photo whose `status` is `error` and is called when it is pressed. */
|
|
1020
|
+
onretry?: (photo: Photo, index: number) => void;
|
|
1021
|
+
/** Overrides for the built-in strings. */
|
|
1022
|
+
strings?: Partial<PhotoGridStrings>;
|
|
1023
|
+
/** Extra classes for the host element. */
|
|
1024
|
+
class?: string;
|
|
1025
|
+
'aria-label'?: string;
|
|
1026
|
+
'aria-labelledby'?: string;
|
|
1027
|
+
}
|
|
1028
|
+
export interface PhotoViewerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'onclose' | 'aria-label'> {
|
|
1029
|
+
photos: Photo[];
|
|
1030
|
+
/** Place in `photos` of the photo that is showing. Supports `bind:index`. */
|
|
1031
|
+
index?: number;
|
|
1032
|
+
isOpen?: boolean;
|
|
1033
|
+
/** Things to do with the photo that is showing. */
|
|
1034
|
+
actions?: PhotoViewerAction[];
|
|
1035
|
+
/** Render the overlay in `document.body`; `false` renders in place. */
|
|
1036
|
+
portal?: boolean;
|
|
1037
|
+
/** Fired when the viewer closes itself, with what the user did. */
|
|
1038
|
+
onclose?: (detail: {
|
|
1039
|
+
reason: PhotoViewerCloseReason;
|
|
1040
|
+
}) => void;
|
|
1041
|
+
/** Called once when a full image cannot be loaded, so the page can answer with a new address. */
|
|
1042
|
+
onloaderror?: (photo: Photo, index: number) => void;
|
|
1043
|
+
/** Called when "Try again" is pressed, before the image is asked for again; a returned promise is waited for. */
|
|
1044
|
+
onretry?: (photo: Photo, index: number) => void | Promise<void>;
|
|
1045
|
+
/** Accessible name of the dialog. */
|
|
1046
|
+
label?: string;
|
|
1047
|
+
/** Overrides for the built-in strings. */
|
|
1048
|
+
strings?: Partial<PhotoViewerStrings>;
|
|
1049
|
+
/** Extra classes for the dialog panel. */
|
|
1050
|
+
class?: string;
|
|
1051
|
+
}
|
|
1052
|
+
export interface StepperProps extends Omit<HTMLAttributes<HTMLElement>, 'class'> {
|
|
1053
|
+
class?: string;
|
|
1054
|
+
/** The steps, in order: labels, or objects with a label and a description. */
|
|
1055
|
+
steps: StepperItem[];
|
|
1056
|
+
/**
|
|
1057
|
+
* Index of the current step, counted from 0. Bindable. A value outside
|
|
1058
|
+
* the steps is shown as the nearest step; the bound value is left as given.
|
|
1059
|
+
*/
|
|
1060
|
+
current?: number;
|
|
1061
|
+
/** Size of the markers and the text. */
|
|
1062
|
+
size?: SizeVariant;
|
|
1063
|
+
/** `auto` is compact while the Stepper itself is narrower than 30rem. */
|
|
1064
|
+
layout?: StepperLayout;
|
|
1065
|
+
/** Makes the completed steps buttons that go back to that step. */
|
|
1066
|
+
interactive?: boolean;
|
|
1067
|
+
/** Accessible name of the navigation landmark. */
|
|
1068
|
+
label?: string;
|
|
1069
|
+
/** Overrides for the built-in strings. */
|
|
1070
|
+
strings?: Partial<StepperStrings>;
|
|
1071
|
+
/** Called with the index of the step a press went back to. Only with `interactive`. */
|
|
1072
|
+
onstepchange?: (index: number) => void;
|
|
1073
|
+
}
|
|
1074
|
+
export interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'class' | 'role' | 'aria-label'> {
|
|
1075
|
+
/** The person's name: the accessible name, and where the initials come from. */
|
|
1076
|
+
name: string;
|
|
1077
|
+
/** Address of the picture. Without it, or when it fails to load, the initials show. */
|
|
1078
|
+
src?: string;
|
|
1079
|
+
/** Diameter: 24, 32 and 48px. */
|
|
1080
|
+
size?: AvatarSize;
|
|
1081
|
+
/** Accessible name, when it should differ from `name`. `alt=""` makes the avatar decorative. */
|
|
1082
|
+
alt?: string;
|
|
1083
|
+
/** Language the initials are upper-cased in. The page's own by default. */
|
|
1084
|
+
locale?: string;
|
|
1085
|
+
/** The picture drawn inside the circle (an inline SVG), in place of `src` and the initials. */
|
|
1086
|
+
children?: Snippet;
|
|
1087
|
+
class?: string;
|
|
1088
|
+
}
|
|
1089
|
+
export interface AvatarGroupProps extends Omit<HTMLAttributes<HTMLUListElement>, 'class' | 'aria-label'> {
|
|
1090
|
+
/** The people, in the order they are shown. */
|
|
1091
|
+
people: AvatarPerson[];
|
|
1092
|
+
/** How many are shown before the rest become "+N". */
|
|
1093
|
+
max?: number;
|
|
1094
|
+
/** Diameter of each avatar: 24, 32 and 48px. */
|
|
1095
|
+
size?: AvatarSize;
|
|
1096
|
+
/** Accessible name of the list. */
|
|
1097
|
+
label?: string;
|
|
1098
|
+
/** Overrides for the built-in strings. */
|
|
1099
|
+
strings?: Partial<AvatarGroupStrings>;
|
|
1100
|
+
/** The language the initials are worked out in; passed to each Avatar. */
|
|
1101
|
+
locale?: string;
|
|
1102
|
+
class?: string;
|
|
1103
|
+
}
|
|
1104
|
+
export interface LineChartProps extends Omit<HTMLAttributes<HTMLElement>, 'class'> {
|
|
1105
|
+
/** The lines: a `name` and one value per x label (`null` leaves a gap). */
|
|
1106
|
+
series: ChartSeries[];
|
|
1107
|
+
/** The labels along the x axis, one per point. */
|
|
1108
|
+
xLabels?: string[];
|
|
1109
|
+
/** The bottom of the y axis. Without it, the lowest value rounded down to a tick. */
|
|
1110
|
+
yMin?: number;
|
|
1111
|
+
/** The top of the y axis. Without it, the highest value rounded up to a tick. */
|
|
1112
|
+
yMax?: number;
|
|
1113
|
+
/** `number` (default), `percent` (72 is "72 %"), or a function. */
|
|
1114
|
+
yFormat?: ChartFormat;
|
|
1115
|
+
/** Height of the drawing in px. */
|
|
1116
|
+
height?: number;
|
|
1117
|
+
/** The caption, and what the chart is called. */
|
|
1118
|
+
label: string;
|
|
1119
|
+
labelHidden?: boolean;
|
|
1120
|
+
/** The key under the plot. Without it, shown when there is more than one series. */
|
|
1121
|
+
legend?: boolean;
|
|
1122
|
+
/** A marker on every point, a different shape per series. */
|
|
1123
|
+
markers?: boolean;
|
|
1124
|
+
/** Shows the data table under the chart. */
|
|
1125
|
+
showTable?: boolean;
|
|
1126
|
+
/** The heading of the table's first column. */
|
|
1127
|
+
xTitle?: string;
|
|
1128
|
+
locale?: string;
|
|
1129
|
+
class?: string;
|
|
1130
|
+
/** Stands the chart on a panel of the thick material (frosted glass). Off by default. */
|
|
1131
|
+
glass?: boolean;
|
|
1132
|
+
}
|
|
1133
|
+
export interface BarChartProps extends Omit<HTMLAttributes<HTMLElement>, 'class'> {
|
|
1134
|
+
/** The bars, in order. */
|
|
1135
|
+
data: ChartDatum[];
|
|
1136
|
+
/** The colour of the bars. Without it, the first series colour. */
|
|
1137
|
+
color?: ChartColor;
|
|
1138
|
+
/** The top of the value axis. */
|
|
1139
|
+
yMax?: number;
|
|
1140
|
+
/** `number` (default), `percent` (72 is "72 %"), or a function. */
|
|
1141
|
+
yFormat?: ChartFormat;
|
|
1142
|
+
/** Height of the drawing in px. */
|
|
1143
|
+
height?: number;
|
|
1144
|
+
/** The caption, and what the chart is called. */
|
|
1145
|
+
label: string;
|
|
1146
|
+
labelHidden?: boolean;
|
|
1147
|
+
/** Writes each value over its bar. */
|
|
1148
|
+
showValues?: boolean;
|
|
1149
|
+
/** Shows the data table under the chart. */
|
|
1150
|
+
showTable?: boolean;
|
|
1151
|
+
categoryTitle?: string;
|
|
1152
|
+
valueTitle?: string;
|
|
1153
|
+
locale?: string;
|
|
1154
|
+
class?: string;
|
|
1155
|
+
/** Stands the chart on a panel of the thick material (frosted glass). Off by default. */
|
|
1156
|
+
glass?: boolean;
|
|
1157
|
+
}
|
|
1158
|
+
export interface PieChartProps extends Omit<HTMLAttributes<HTMLElement>, 'class'> {
|
|
1159
|
+
/** The slices, in order, clockwise from twelve o'clock. */
|
|
1160
|
+
data: ChartDatum[];
|
|
1161
|
+
/** A ring, not a full disc. */
|
|
1162
|
+
donut?: boolean;
|
|
1163
|
+
/** `number` (default), `percent` (72 is "72 %"), or a function. */
|
|
1164
|
+
format?: ChartFormat;
|
|
1165
|
+
/** The widest the drawing gets, in px. */
|
|
1166
|
+
size?: number;
|
|
1167
|
+
/** The caption, and what the chart is called. */
|
|
1168
|
+
label: string;
|
|
1169
|
+
labelHidden?: boolean;
|
|
1170
|
+
/** The key beside the drawing: each slice's label, value and share. */
|
|
1171
|
+
legend?: boolean;
|
|
1172
|
+
/** Shows the data table under the chart. */
|
|
1173
|
+
showTable?: boolean;
|
|
1174
|
+
categoryTitle?: string;
|
|
1175
|
+
valueTitle?: string;
|
|
1176
|
+
shareTitle?: string;
|
|
1177
|
+
locale?: string;
|
|
1178
|
+
class?: string;
|
|
1179
|
+
/** What stands in the middle of the ring (`donut`): the total, or the one share that matters. */
|
|
1180
|
+
center?: Snippet;
|
|
1181
|
+
/** Stands the chart on a panel of the thick material (frosted glass). Off by default. */
|
|
1182
|
+
glass?: boolean;
|
|
1183
|
+
}
|
|
1184
|
+
export interface SparklineProps extends Omit<SVGAttributes<SVGSVGElement>, 'class' | 'points' | 'min' | 'max' | 'color'> {
|
|
1185
|
+
/** The values, in order. `null` leaves a gap. */
|
|
1186
|
+
points: Array<number | null>;
|
|
1187
|
+
/** What the image is called. Without it the line is decoration. */
|
|
1188
|
+
label?: string;
|
|
1189
|
+
/** A theme colour by name or any CSS colour. */
|
|
1190
|
+
color?: ChartColor;
|
|
1191
|
+
min?: number;
|
|
1192
|
+
max?: number;
|
|
1193
|
+
class?: string;
|
|
1194
|
+
}
|
|
157
1195
|
export type Button = ZabiComponent<ButtonProps, ButtonEvents>;
|
|
158
1196
|
export type Heading = ZabiComponent<HeadingProps>;
|
|
1197
|
+
export type Block = ZabiComponent<BlockProps>;
|
|
159
1198
|
export type Card = ZabiComponent<CardProps>;
|
|
160
1199
|
export type Input = ZabiComponent<InputProps, InputEvents>;
|
|
161
1200
|
export type Checkbox = ZabiComponent<CheckboxProps, CheckboxEvents>;
|
|
162
1201
|
export type Select = ZabiComponent<SelectProps, SelectEvents>;
|
|
1202
|
+
export type PickerField = ZabiComponent<PickerFieldProps>;
|
|
163
1203
|
export type Textarea = ZabiComponent<TextareaProps, TextareaEvents>;
|
|
164
1204
|
export type Modal = ZabiComponent<ModalProps, ModalEvents>;
|
|
165
1205
|
export type Alert = ZabiComponent<AlertProps>;
|
|
166
1206
|
export type Badge = ZabiComponent<BadgeProps>;
|
|
1207
|
+
export type Stat = ZabiComponent<StatProps>;
|
|
1208
|
+
export type SpeechBubble = ZabiComponent<SpeechBubbleProps>;
|
|
1209
|
+
export type Chip = ZabiComponent<ChipProps>;
|
|
1210
|
+
export type ChipGroup = ZabiComponent<ChipGroupProps>;
|
|
167
1211
|
export type Progress = ZabiComponent<ProgressProps>;
|
|
168
1212
|
export type Skeleton = ZabiComponent<SkeletonProps>;
|
|
1213
|
+
export type SkeletonGroup = ZabiComponent<SkeletonGroupProps>;
|
|
169
1214
|
export type Toggle = ZabiComponent<ToggleProps, ToggleEvents>;
|
|
170
1215
|
export type Tooltip = ZabiComponent<TooltipProps>;
|
|
1216
|
+
export type BottomTabBar = ZabiComponent<BottomTabBarProps>;
|
|
1217
|
+
export type AppBar = ZabiComponent<AppBarProps>;
|
|
1218
|
+
export type AppShell = ZabiComponent<AppShellProps>;
|
|
1219
|
+
export type AppNavigation = ZabiComponent<AppNavigationProps>;
|
|
1220
|
+
export type Rating = ZabiComponent<RatingProps>;
|
|
1221
|
+
export type CodeField = ZabiComponent<CodeFieldProps>;
|
|
1222
|
+
export type SegmentedControl = ZabiComponent<SegmentedControlProps>;
|
|
1223
|
+
export type FloatingActionButton = ZabiComponent<FloatingActionButtonProps>;
|
|
1224
|
+
export type StickyActionBar = ZabiComponent<StickyActionBarProps>;
|
|
1225
|
+
export type BottomSheet = ZabiComponent<BottomSheetProps>;
|
|
1226
|
+
export type DateField = ZabiComponent<DateFieldProps>;
|
|
1227
|
+
export type TimeField = ZabiComponent<TimeFieldProps>;
|
|
1228
|
+
export type Calendar = ZabiComponent<CalendarProps>;
|
|
1229
|
+
export type PhotoGrid = ZabiComponent<PhotoGridProps>;
|
|
1230
|
+
export type PhotoViewer = ZabiComponent<PhotoViewerProps>;
|
|
1231
|
+
export type Avatar = ZabiComponent<AvatarProps>;
|
|
1232
|
+
export type AvatarGroup = ZabiComponent<AvatarGroupProps>;
|
|
1233
|
+
export type LineChart = ZabiComponent<LineChartProps>;
|
|
1234
|
+
export type BarChart = ZabiComponent<BarChartProps>;
|
|
1235
|
+
export type PieChart = ZabiComponent<PieChartProps>;
|
|
1236
|
+
export type Sparkline = ZabiComponent<SparklineProps>;
|
|
1237
|
+
export type Stepper = ZabiComponent<StepperProps>;
|
|
171
1238
|
//# sourceMappingURL=index.d.ts.map
|