@noxlovette/material 0.3.2 → 0.4.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/README.md +1 -0
- package/dist/actions/index.d.ts +1 -0
- package/dist/actions/index.js +1 -0
- package/dist/actions/rovingFocusGroup.d.ts +20 -0
- package/dist/actions/rovingFocusGroup.js +82 -0
- package/dist/components/badge/theme.d.ts +8 -8
- package/dist/components/buttons/button-group/ButtonGroup.stories.svelte +83 -0
- package/dist/components/buttons/button-group/ButtonGroup.stories.svelte.d.ts +19 -0
- package/dist/components/buttons/button-group/ButtonGroup.svelte +10 -29
- package/dist/components/buttons/button-group/ButtonGroup.svelte.d.ts +7 -3
- package/dist/components/buttons/button-group/index.d.ts +0 -1
- package/dist/components/buttons/button-group/index.js +3 -1
- package/dist/components/buttons/button-group/theme.d.ts +17 -103
- package/dist/components/buttons/button-group/theme.js +7 -35
- package/dist/components/buttons/button-group/types.d.ts +9 -20
- package/dist/components/buttons/connected/ConnectedButtonGroup.stories.svelte +118 -0
- package/dist/components/buttons/connected/ConnectedButtonGroup.stories.svelte.d.ts +19 -0
- package/dist/components/buttons/connected/ConnectedButtonGroup.svelte +52 -0
- package/dist/components/buttons/connected/ConnectedButtonGroup.svelte.d.ts +12 -0
- package/dist/components/buttons/connected/ConnectedButtonGroupItem.svelte +37 -0
- package/dist/components/buttons/connected/ConnectedButtonGroupItem.svelte.d.ts +9 -0
- package/dist/components/buttons/connected/index.d.ts +3 -1
- package/dist/components/buttons/connected/index.js +3 -1
- package/dist/components/buttons/connected/theme.d.ts +125 -0
- package/dist/components/buttons/connected/theme.js +38 -0
- package/dist/components/buttons/connected/types.d.ts +32 -13
- package/dist/components/buttons/index.d.ts +1 -0
- package/dist/components/buttons/index.js +1 -0
- package/dist/components/buttons/split-button/SplitButton.stories.svelte +103 -0
- package/dist/components/buttons/split-button/SplitButton.stories.svelte.d.ts +19 -0
- package/dist/components/buttons/split-button/SplitButton.svelte +104 -0
- package/dist/components/buttons/split-button/SplitButton.svelte.d.ts +19 -0
- package/dist/components/buttons/split-button/index.d.ts +3 -0
- package/dist/components/{containers/panes → buttons/split-button}/index.js +1 -3
- package/dist/components/buttons/split-button/theme.d.ts +35 -0
- package/dist/components/buttons/split-button/theme.js +26 -0
- package/dist/components/buttons/split-button/types.d.ts +33 -0
- package/dist/components/buttons/theme.d.ts +142 -142
- package/dist/components/buttons/theme.js +2 -2
- package/dist/components/cards/Card.stories.svelte +58 -0
- package/dist/components/cards/Card.stories.svelte.d.ts +2 -17
- package/dist/components/cards/Card.svelte +76 -8
- package/dist/components/cards/theme.d.ts +26 -14
- package/dist/components/cards/theme.js +5 -1
- package/dist/components/cards/types.d.ts +39 -1
- package/dist/components/chips/Chip.stories.svelte +64 -0
- package/dist/components/chips/Chip.stories.svelte.d.ts +19 -0
- package/dist/components/chips/Chip.svelte +115 -0
- package/dist/components/chips/Chip.svelte.d.ts +14 -0
- package/dist/components/chips/index.d.ts +3 -0
- package/dist/components/chips/index.js +6 -0
- package/dist/components/chips/theme.d.ts +78 -0
- package/dist/components/chips/theme.js +72 -0
- package/dist/components/chips/types.d.ts +43 -0
- package/dist/components/containers/action-rail/ActionRail.stories.svelte +36 -0
- package/dist/components/containers/{panes/SinglePane.stories.svelte.d.ts → action-rail/ActionRail.stories.svelte.d.ts} +4 -4
- package/dist/components/containers/action-rail/ActionRail.svelte +35 -0
- package/dist/components/containers/action-rail/ActionRail.svelte.d.ts +17 -0
- package/dist/components/containers/action-rail/index.d.ts +3 -0
- package/dist/components/containers/action-rail/index.js +6 -0
- package/dist/components/containers/action-rail/theme.d.ts +45 -0
- package/dist/components/containers/action-rail/theme.js +26 -0
- package/dist/components/containers/action-rail/types.d.ts +20 -0
- package/dist/components/containers/action-rail/types.js +1 -0
- package/dist/components/containers/app/App.svelte +6 -6
- package/dist/components/containers/app/App.svelte.d.ts +4 -2
- package/dist/components/containers/app/theme.d.ts +1 -1
- package/dist/components/containers/app/types.d.ts +9 -4
- package/dist/components/containers/bottom-sheet/BottomSheet.stories.svelte +1 -1
- package/dist/components/containers/bottom-sheet/BottomSheet.svelte +1 -1
- package/dist/components/containers/context-menu/ContextMenu.stories.svelte +44 -0
- package/dist/components/containers/context-menu/ContextMenu.svelte +21 -5
- package/dist/components/containers/context-menu/ContextMenu.svelte.d.ts +11 -0
- package/dist/components/containers/context-menu/theme.d.ts +20 -2
- package/dist/components/containers/context-menu/theme.js +31 -8
- package/dist/components/containers/context-menu/types.d.ts +14 -2
- package/dist/components/containers/dialogue/theme.d.ts +20 -20
- package/dist/components/containers/divider/theme.d.ts +17 -17
- package/dist/components/containers/index.d.ts +2 -3
- package/dist/components/containers/index.js +2 -3
- package/dist/components/containers/link-preview/theme.d.ts +11 -11
- package/dist/components/containers/list/ListItem.stories.svelte +100 -0
- package/dist/components/containers/list/ListItem.stories.svelte.d.ts +19 -0
- package/dist/components/containers/list/theme.d.ts +14 -14
- package/dist/components/containers/list/theme.js +3 -3
- package/dist/components/containers/menu/Menu.stories.svelte +105 -3
- package/dist/components/containers/menu/Menu.stories.svelte.d.ts +2 -17
- package/dist/components/containers/menu/Menu.svelte +9 -7
- package/dist/components/containers/menu/MenuCheckboxItem.svelte +55 -0
- package/dist/components/containers/menu/MenuCheckboxItem.svelte.d.ts +25 -0
- package/dist/components/containers/menu/MenuGroup.svelte +43 -0
- package/dist/components/containers/menu/MenuGroup.svelte.d.ts +28 -0
- package/dist/components/containers/menu/MenuRadioGroup.svelte +39 -0
- package/dist/components/containers/menu/MenuRadioGroup.svelte.d.ts +27 -0
- package/dist/components/containers/menu/MenuRadioItem.svelte +49 -0
- package/dist/components/containers/menu/MenuRadioItem.svelte.d.ts +17 -0
- package/dist/components/containers/menu/MenuSub.svelte +91 -0
- package/dist/components/containers/menu/MenuSub.svelte.d.ts +29 -0
- package/dist/components/containers/menu/index.d.ts +7 -0
- package/dist/components/containers/menu/index.js +8 -0
- package/dist/components/containers/menu/menu-item/MenuItem.svelte +71 -0
- package/dist/components/containers/{menu-item → menu/menu-item}/MenuItem.svelte.d.ts +2 -1
- package/dist/components/containers/{menu-item → menu/menu-item}/types.d.ts +5 -1
- package/dist/components/containers/menu/menu-item/types.js +1 -0
- package/dist/components/containers/menu/theme.d.ts +68 -0
- package/dist/components/containers/menu/theme.js +36 -0
- package/dist/components/containers/menu/types.d.ts +113 -2
- package/dist/components/containers/pane/DraggablePane.stories.svelte +199 -0
- package/dist/components/containers/pane/DraggablePane.stories.svelte.d.ts +4 -0
- package/dist/components/containers/pane/DraggablePane.svelte +533 -0
- package/dist/components/containers/pane/DraggablePane.svelte.d.ts +29 -0
- package/dist/components/containers/pane/Pane.stories.svelte +104 -0
- package/dist/components/containers/pane/Pane.stories.svelte.d.ts +19 -0
- package/dist/components/containers/pane/Pane.svelte +78 -0
- package/dist/components/containers/pane/Pane.svelte.d.ts +18 -0
- package/dist/components/containers/pane/PaneGrid.stories.svelte +134 -0
- package/dist/components/containers/pane/PaneGrid.stories.svelte.d.ts +19 -0
- package/dist/components/containers/pane/PaneGrid.svelte +43 -0
- package/dist/components/containers/pane/PaneGrid.svelte.d.ts +13 -0
- package/dist/components/containers/pane/PaneHandle.svelte +90 -0
- package/dist/components/containers/pane/PaneHandle.svelte.d.ts +12 -0
- package/dist/components/containers/pane/dragStore.svelte.d.ts +16 -0
- package/dist/components/containers/pane/dragStore.svelte.js +38 -0
- package/dist/components/containers/pane/index.d.ts +8 -0
- package/dist/components/containers/pane/index.js +11 -0
- package/dist/components/containers/pane/resizeStore.svelte.d.ts +10 -0
- package/dist/components/containers/pane/resizeStore.svelte.js +30 -0
- package/dist/components/containers/pane/theme.d.ts +571 -0
- package/dist/components/containers/pane/theme.js +211 -0
- package/dist/components/containers/pane/types.d.ts +249 -0
- package/dist/components/containers/pane/types.js +1 -0
- package/dist/components/containers/popover/Popover.stories.svelte +4 -4
- package/dist/components/containers/popover/Popover.svelte +3 -1
- package/dist/components/containers/popover/theme.d.ts +20 -20
- package/dist/components/containers/popover/types.d.ts +6 -2
- package/dist/components/containers/scroll-area/theme.d.ts +2 -2
- package/dist/components/containers/side-sheet/SideSheet.stories.svelte +16 -24
- package/dist/components/containers/side-sheet/SideSheet.svelte +73 -7
- package/dist/components/containers/side-sheet/SideSheet.svelte.d.ts +5 -0
- package/dist/components/containers/stack/theme.d.ts +44 -44
- package/dist/components/date/DateField.stories.svelte +57 -0
- package/dist/components/{containers/panes/SplitPane.stories.svelte.d.ts → date/DateField.stories.svelte.d.ts} +4 -4
- package/dist/components/date/DateField.svelte +11 -2
- package/dist/components/date/DateRangeField.stories.svelte +53 -0
- package/dist/components/{containers/panes/SupportingPane.stories.svelte.d.ts → date/DateRangeField.stories.svelte.d.ts} +4 -4
- package/dist/components/date/DateRangeField.svelte +2 -1
- package/dist/components/date/theme.d.ts +73 -4
- package/dist/components/date/theme.js +95 -26
- package/dist/components/date/types.d.ts +5 -0
- package/dist/components/forms/checkbox/Checkbox.svelte +7 -9
- package/dist/components/forms/checkbox/theme.d.ts +8 -8
- package/dist/components/forms/checkbox/theme.js +31 -9
- package/dist/components/forms/command/Command.stories.svelte +86 -0
- package/dist/components/forms/command/Command.stories.svelte.d.ts +19 -0
- package/dist/components/forms/command/theme.d.ts +35 -35
- package/dist/components/forms/command/theme.js +4 -4
- package/dist/components/forms/pin/theme.d.ts +2 -2
- package/dist/components/forms/radio-group/theme.d.ts +2 -2
- package/dist/components/forms/search/theme.d.ts +8 -8
- package/dist/components/forms/select/Select.svelte +3 -2
- package/dist/components/forms/select/theme.d.ts +26 -2
- package/dist/components/forms/select/theme.js +56 -22
- package/dist/components/forms/slider/theme.d.ts +20 -20
- package/dist/components/forms/switch/theme.d.ts +2 -2
- package/dist/components/forms/textfield/Textfield.stories.svelte +22 -0
- package/dist/components/forms/textfield/Textfield.svelte +10 -1
- package/dist/components/forms/textfield/theme.d.ts +44 -2
- package/dist/components/forms/textfield/theme.js +56 -16
- package/dist/components/forms/toggle-group/ToggleGroup.svelte +2 -2
- package/dist/components/forms/toggle-group/ToggleGroup.svelte.d.ts +2 -2
- package/dist/components/forms/toggle-group/ToggleGroupItem.svelte +1 -1
- package/dist/components/forms/toggle-group/ToggleGroupItem.svelte.d.ts +1 -1
- package/dist/components/forms/toggle-group/theme.d.ts +16 -16
- package/dist/components/forms/toggle-group/types.d.ts +2 -2
- package/dist/components/forms/tooltip/Tooltip.stories.svelte +90 -0
- package/dist/components/forms/tooltip/Tooltip.stories.svelte.d.ts +19 -0
- package/dist/components/forms/tooltip/Tooltip.svelte +5 -4
- package/dist/components/forms/tooltip/theme.d.ts +5 -2
- package/dist/components/forms/tooltip/theme.js +6 -5
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/misc/Avatar.stories.svelte +63 -0
- package/dist/components/misc/Avatar.stories.svelte.d.ts +19 -0
- package/dist/components/misc/Avatar.svelte +35 -10
- package/dist/components/misc/DicebearAvatarBuilder.d.ts +59 -0
- package/dist/components/misc/DicebearAvatarBuilder.js +115 -0
- package/dist/components/misc/ThemeSettings.svelte +1 -1
- package/dist/components/misc/ThemeSwitcher.svelte +2 -2
- package/dist/components/misc/dicebearStyles.d.ts +21 -0
- package/dist/components/misc/dicebearStyles.js +169 -0
- package/dist/components/misc/index.d.ts +3 -0
- package/dist/components/misc/index.js +3 -0
- package/dist/components/misc/materialAvatarPalette.d.ts +6 -0
- package/dist/components/misc/materialAvatarPalette.js +44 -0
- package/dist/components/misc/theme.d.ts +20 -2
- package/dist/components/misc/theme.js +9 -3
- package/dist/components/misc/types.d.ts +20 -2
- package/dist/components/nav/appbar/AppBar.stories.svelte +1 -1
- package/dist/components/nav/appbar/AppBar.svelte +46 -15
- package/dist/components/nav/appbar/AppBar.svelte.d.ts +5 -0
- package/dist/components/nav/appbar/theme.d.ts +20 -14
- package/dist/components/nav/appbar/theme.js +11 -7
- package/dist/components/nav/appbar/types.d.ts +3 -1
- package/dist/components/nav/breadcrumb/Breadcrumb.stories.svelte +50 -0
- package/dist/components/nav/breadcrumb/Breadcrumb.stories.svelte.d.ts +19 -0
- package/dist/components/nav/breadcrumb/Breadcrumb.svelte +46 -0
- package/dist/components/nav/breadcrumb/Breadcrumb.svelte.d.ts +13 -0
- package/dist/components/nav/breadcrumb/index.d.ts +3 -0
- package/dist/components/nav/breadcrumb/index.js +6 -0
- package/dist/components/nav/breadcrumb/theme.d.ts +84 -0
- package/dist/components/nav/breadcrumb/theme.js +35 -0
- package/dist/components/nav/breadcrumb/types.d.ts +14 -0
- package/dist/components/nav/breadcrumb/types.js +1 -0
- package/dist/components/nav/index.d.ts +1 -0
- package/dist/components/nav/index.js +1 -0
- package/dist/components/nav/navbar/theme.d.ts +19 -19
- package/dist/components/nav/rail/Rail.stories.svelte +1 -5
- package/dist/components/nav/rail/Rail.svelte +3 -25
- package/dist/components/nav/rail/theme.d.ts +4 -4
- package/dist/components/nav/rail/types.d.ts +0 -5
- package/dist/components/nav/tabs/TabHolder.svelte +2 -1
- package/dist/components/nav/tabs/theme.d.ts +21 -21
- package/dist/components/nav/tabs/theme.js +6 -0
- package/dist/components/nav/tabs/types.d.ts +2 -2
- package/dist/components/pill/theme.d.ts +35 -35
- package/dist/components/snackbar/theme.d.ts +8 -8
- package/dist/components/table/Table.stories.svelte +267 -0
- package/dist/components/table/Table.stories.svelte.d.ts +19 -0
- package/dist/components/table/Table.svelte +1 -1
- package/dist/components/table/TableBody.svelte +16 -3
- package/dist/components/table/TableBody.svelte.d.ts +5 -1
- package/dist/components/table/TableRow.svelte +1 -1
- package/dist/components/table/theme.d.ts +2 -2
- package/dist/components/table/theme.js +2 -2
- package/dist/components/table/types.d.ts +7 -0
- package/dist/components/time/theme.d.ts +29 -29
- package/dist/components/time/theme.js +2 -2
- package/dist/components/toolbar/Toolbar.stories.svelte +71 -0
- package/dist/components/toolbar/Toolbar.stories.svelte.d.ts +19 -0
- package/dist/components/toolbar/Toolbar.svelte +19 -3
- package/dist/components/toolbar/Toolbar.svelte.d.ts +8 -2
- package/dist/components/toolbar/ToolbarButton.svelte +28 -4
- package/dist/components/toolbar/ToolbarDivider.svelte +4 -3
- package/dist/components/toolbar/ToolbarGroup.svelte +7 -2
- package/dist/components/toolbar/ToolbarGroupItem.svelte +29 -4
- package/dist/components/toolbar/ToolbarSection.svelte +35 -0
- package/dist/components/toolbar/ToolbarSection.svelte.d.ts +9 -0
- package/dist/components/toolbar/ToolbarSpacer.svelte +18 -0
- package/dist/components/toolbar/ToolbarSpacer.svelte.d.ts +9 -0
- package/dist/components/toolbar/index.d.ts +2 -0
- package/dist/components/toolbar/index.js +2 -0
- package/dist/components/toolbar/theme.d.ts +36 -21
- package/dist/components/toolbar/theme.js +27 -11
- package/dist/components/toolbar/types.d.ts +37 -4
- package/dist/components/typography/body/theme.d.ts +14 -14
- package/dist/components/typography/display/theme.d.ts +14 -14
- package/dist/components/typography/headline/theme.d.ts +14 -14
- package/dist/components/typography/kbd/Kbd.stories.svelte +41 -0
- package/dist/components/typography/kbd/Kbd.stories.svelte.d.ts +19 -0
- package/dist/components/typography/kbd/theme.d.ts +9 -9
- package/dist/components/typography/kbd/theme.js +2 -2
- package/dist/components/typography/label/theme.d.ts +14 -14
- package/dist/components/typography/title/theme.d.ts +14 -14
- package/dist/styles/component.css +126 -4
- package/dist/styles/motion.css +6 -3
- package/dist/utils/Layer.svelte +7 -3
- package/dist/utils/Theme.svelte +20 -20
- package/dist/utils/ThemeScript.svelte +1 -1
- package/dist/utils/icon/theme.d.ts +14 -14
- package/package.json +38 -37
- package/bin/install-skill.js +0 -29
- package/dist/components/buttons/button-group/ButtonGroupItem.svelte +0 -41
- package/dist/components/buttons/button-group/ButtonGroupItem.svelte.d.ts +0 -8
- package/dist/components/buttons/connected/ConnectedButtons.svelte +0 -14
- package/dist/components/buttons/connected/ConnectedButtons.svelte.d.ts +0 -8
- package/dist/components/containers/menu-item/MenuItem.svelte +0 -74
- package/dist/components/containers/merger/InputMerger.svelte +0 -29
- package/dist/components/containers/merger/InputMerger.svelte.d.ts +0 -14
- package/dist/components/containers/merger/index.d.ts +0 -1
- package/dist/components/containers/merger/index.js +0 -3
- package/dist/components/containers/panes/SinglePane.stories.svelte +0 -67
- package/dist/components/containers/panes/SinglePane.svelte +0 -32
- package/dist/components/containers/panes/SinglePane.svelte.d.ts +0 -5
- package/dist/components/containers/panes/SplitPane.stories.svelte +0 -124
- package/dist/components/containers/panes/SplitPane.svelte +0 -144
- package/dist/components/containers/panes/SplitPane.svelte.d.ts +0 -8
- package/dist/components/containers/panes/SupportingPane.stories.svelte +0 -113
- package/dist/components/containers/panes/SupportingPane.svelte +0 -175
- package/dist/components/containers/panes/SupportingPane.svelte.d.ts +0 -9
- package/dist/components/containers/panes/index.d.ts +0 -5
- package/dist/components/containers/panes/theme.d.ts +0 -490
- package/dist/components/containers/panes/theme.js +0 -185
- package/dist/components/containers/panes/types.d.ts +0 -108
- package/dist/components/nav/rail/RailNavContext.svelte +0 -14
- package/dist/components/nav/rail/RailNavContext.svelte.d.ts +0 -8
- /package/dist/components/{containers/menu-item → buttons/split-button}/types.js +0 -0
- /package/dist/components/{containers/panes → chips}/types.js +0 -0
- /package/dist/components/containers/{menu-item → menu/menu-item}/index.d.ts +0 -0
- /package/dist/components/containers/{menu-item → menu/menu-item}/index.js +0 -0
|
@@ -2,17 +2,7 @@ import { tv } from 'tailwind-variants';
|
|
|
2
2
|
export const dateRangeField = tv({
|
|
3
3
|
slots: {
|
|
4
4
|
base: `
|
|
5
|
-
group w-full h-14
|
|
6
|
-
after:absolute after:bottom-0 after:left-0 after:right-0
|
|
7
|
-
relative
|
|
8
|
-
state-layer before:rounded-xs hover:before:bg-md-sys-color-on-surface/8
|
|
9
|
-
flex items-center
|
|
10
|
-
after:h-px after:bg-md-sys-color-on-surface-variant
|
|
11
|
-
after:transition-[height,background-color] after:duration-200
|
|
12
|
-
hover:after:bg-md-sys-color-on-surface
|
|
13
|
-
focus-within:after:bg-md-sys-color-primary focus-within:after:h-[2px]
|
|
14
|
-
disabled:bg-md-sys-color-on-surface/4
|
|
15
|
-
disabled:after:bg-md-sys-color-on-surface/12
|
|
5
|
+
group w-full h-14 relative flex items-center
|
|
16
6
|
`,
|
|
17
7
|
inputWrapper: `
|
|
18
8
|
relative flex-1 px-4 h-full flex items-center
|
|
@@ -57,6 +47,29 @@ export const dateRangeField = tv({
|
|
|
57
47
|
`
|
|
58
48
|
},
|
|
59
49
|
variants: {
|
|
50
|
+
variant: {
|
|
51
|
+
filled: {
|
|
52
|
+
base: `
|
|
53
|
+
bg-md-sys-color-surface-container-highest rounded-t-xs
|
|
54
|
+
after:absolute after:bottom-0 after:left-0 after:right-0
|
|
55
|
+
state-layer before:rounded-xs hover:before:bg-md-sys-color-on-surface/8
|
|
56
|
+
after:h-px after:bg-md-sys-color-on-surface-variant
|
|
57
|
+
after:transition-[height,background-color] after:duration-200
|
|
58
|
+
hover:after:bg-md-sys-color-on-surface
|
|
59
|
+
focus-within:after:bg-md-sys-color-primary focus-within:after:h-[2px]
|
|
60
|
+
disabled:bg-md-sys-color-on-surface/4
|
|
61
|
+
disabled:after:bg-md-sys-color-on-surface/12
|
|
62
|
+
`
|
|
63
|
+
},
|
|
64
|
+
outlined: {
|
|
65
|
+
base: `
|
|
66
|
+
rounded-xs border border-md-sys-color-outline
|
|
67
|
+
transition-colors duration-150
|
|
68
|
+
hover:border-md-sys-color-on-surface
|
|
69
|
+
focus-within:border-2 focus-within:border-md-sys-color-primary
|
|
70
|
+
`
|
|
71
|
+
}
|
|
72
|
+
},
|
|
60
73
|
error: {
|
|
61
74
|
true: {
|
|
62
75
|
base: 'after:bg-md-sys-color-error focus-within:after:bg-md-sys-color-error',
|
|
@@ -72,23 +85,31 @@ export const dateRangeField = tv({
|
|
|
72
85
|
base: 'pointer-events-none opacity-60'
|
|
73
86
|
}
|
|
74
87
|
}
|
|
88
|
+
},
|
|
89
|
+
compoundVariants: [
|
|
90
|
+
{
|
|
91
|
+
variant: 'outlined',
|
|
92
|
+
error: true,
|
|
93
|
+
class: {
|
|
94
|
+
base: 'border-md-sys-color-error hover:border-md-sys-color-error focus-within:border-md-sys-color-error'
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
variant: 'outlined',
|
|
99
|
+
disabled: true,
|
|
100
|
+
class: {
|
|
101
|
+
base: 'border-md-sys-color-on-surface/12 hover:border-md-sys-color-on-surface/12'
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
defaultVariants: {
|
|
106
|
+
variant: 'outlined'
|
|
75
107
|
}
|
|
76
108
|
});
|
|
77
109
|
export const dateField = tv({
|
|
78
110
|
slots: {
|
|
79
111
|
base: `
|
|
80
|
-
group w-full h-14
|
|
81
|
-
after:absolute after:bottom-0 after:left-0 after:right-0
|
|
82
|
-
relative
|
|
83
|
-
state-layer before:rounded-xs hover:before:bg-md-sys-color-on-surface/8
|
|
84
|
-
flex items-center
|
|
85
|
-
after:h-px after:bg-md-sys-color-on-surface-variant
|
|
86
|
-
after:transition-[height,background-color] after:duration-200
|
|
87
|
-
hover:after:bg-md-sys-color-on-surface
|
|
88
|
-
focus-within:after:bg-md-sys-color-primary focus-within:after:h-[2px]
|
|
89
|
-
disabled:bg-md-sys-color-on-surface/4
|
|
90
|
-
disabled:after:bg-md-sys-color-on-surface/12
|
|
91
|
-
justify-between
|
|
112
|
+
group w-full h-14 relative flex items-center justify-between
|
|
92
113
|
`,
|
|
93
114
|
inputWrapper: `
|
|
94
115
|
relative flex-1 px-4 h-full flex items-center
|
|
@@ -98,6 +119,9 @@ export const dateField = tv({
|
|
|
98
119
|
md-sys-typescale-body-large text-md-sys-color-on-surface
|
|
99
120
|
disabled:text-md-sys-color-on-surface/38 flex items-center
|
|
100
121
|
`,
|
|
122
|
+
segments: `
|
|
123
|
+
flex w-full flex-col tabular-nums
|
|
124
|
+
`,
|
|
101
125
|
leadingIcon: `
|
|
102
126
|
text-md-sys-color-on-surface-variant size-6
|
|
103
127
|
group-focus-within:text-md-sys-color-primary
|
|
@@ -127,9 +151,45 @@ export const dateField = tv({
|
|
|
127
151
|
px-4 pt-1 flex justify-between
|
|
128
152
|
md-sys-typescale-body-small
|
|
129
153
|
text-md-sys-color-on-surface-variant
|
|
130
|
-
|
|
154
|
+
`,
|
|
155
|
+
fieldset: `
|
|
156
|
+
absolute -top-[5px] left-0 right-0 bottom-0 m-0 px-2
|
|
157
|
+
pointer-events-none rounded-xs border border-md-sys-color-outline
|
|
158
|
+
transition-colors duration-150
|
|
159
|
+
|
|
160
|
+
group-hover:border-md-sys-color-on-surface
|
|
161
|
+
group-focus-within:border-2 group-focus-within:border-md-sys-color-primary
|
|
162
|
+
`,
|
|
163
|
+
legend: `
|
|
164
|
+
invisible float-none block h-auto max-w-full overflow-hidden
|
|
165
|
+
whitespace-nowrap md-sys-typescale-body-small
|
|
166
|
+
`,
|
|
167
|
+
legendLabel: `
|
|
168
|
+
px-1
|
|
169
|
+
`
|
|
131
170
|
},
|
|
132
171
|
variants: {
|
|
172
|
+
variant: {
|
|
173
|
+
filled: {
|
|
174
|
+
base: `
|
|
175
|
+
bg-md-sys-color-surface-container-highest rounded-t-xs
|
|
176
|
+
after:absolute after:bottom-0 after:left-0 after:right-0
|
|
177
|
+
state-layer before:rounded-xs hover:before:bg-md-sys-color-on-surface/8
|
|
178
|
+
after:h-px after:bg-md-sys-color-on-surface-variant
|
|
179
|
+
after:transition-[height,background-color] after:duration-200
|
|
180
|
+
hover:after:bg-md-sys-color-on-surface
|
|
181
|
+
focus-within:after:bg-md-sys-color-primary focus-within:after:h-[2px]
|
|
182
|
+
disabled:bg-md-sys-color-on-surface/4
|
|
183
|
+
disabled:after:bg-md-sys-color-on-surface/12
|
|
184
|
+
`,
|
|
185
|
+
segments: 'pt-4'
|
|
186
|
+
},
|
|
187
|
+
outlined: {
|
|
188
|
+
label: `
|
|
189
|
+
top-0 -translate-y-1/2
|
|
190
|
+
`
|
|
191
|
+
}
|
|
192
|
+
},
|
|
133
193
|
error: {
|
|
134
194
|
true: {
|
|
135
195
|
base: 'after:bg-md-sys-color-error focus-within:after:bg-md-sys-color-error',
|
|
@@ -137,13 +197,22 @@ export const dateField = tv({
|
|
|
137
197
|
requiredAsterisk: 'text-md-sys-color-error',
|
|
138
198
|
supportingText: 'text-md-sys-color-error',
|
|
139
199
|
leadingIcon: 'text-md-sys-color-error',
|
|
140
|
-
trailingIcon: 'text-md-sys-color-error'
|
|
200
|
+
trailingIcon: 'text-md-sys-color-error',
|
|
201
|
+
fieldset: `
|
|
202
|
+
border-md-sys-color-error
|
|
203
|
+
group-hover:border-md-sys-color-error
|
|
204
|
+
group-focus-within:border-md-sys-color-error
|
|
205
|
+
`
|
|
141
206
|
}
|
|
142
207
|
},
|
|
143
208
|
disabled: {
|
|
144
209
|
true: {
|
|
145
|
-
base: 'pointer-events-none opacity-60'
|
|
210
|
+
base: 'pointer-events-none opacity-60',
|
|
211
|
+
fieldset: 'border-md-sys-color-on-surface/12 group-hover:border-md-sys-color-on-surface/12'
|
|
146
212
|
}
|
|
147
213
|
}
|
|
214
|
+
},
|
|
215
|
+
defaultVariants: {
|
|
216
|
+
variant: 'outlined'
|
|
148
217
|
}
|
|
149
218
|
});
|
|
@@ -32,6 +32,11 @@ export interface BaseDateProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
32
32
|
* Supporting text shown below the field.
|
|
33
33
|
*/
|
|
34
34
|
supportingText?: Snippet;
|
|
35
|
+
/**
|
|
36
|
+
* The visual style of the field.
|
|
37
|
+
* @default 'outlined'
|
|
38
|
+
*/
|
|
39
|
+
variant?: 'filled' | 'outlined';
|
|
35
40
|
}
|
|
36
41
|
export interface DateFieldProps extends BaseDateProps {
|
|
37
42
|
/**
|
|
@@ -47,15 +47,13 @@ Checkboxes let users select one or more items from a list, or turn an item on or
|
|
|
47
47
|
{#if indeterminate}
|
|
48
48
|
<span class={cls.indeterminateIcon()}></span>
|
|
49
49
|
{:else if checked}
|
|
50
|
-
<svg
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
stroke-linejoin="round"
|
|
58
|
-
/>
|
|
50
|
+
<svg
|
|
51
|
+
viewBox="0 0 24 24"
|
|
52
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
53
|
+
class={cls.checkIcon()}
|
|
54
|
+
fill="currentColor"
|
|
55
|
+
>
|
|
56
|
+
<path d="M9.55 18 3.85 12.3 5.275 10.875 9.55 15.15 18.725 5.975 20.15 7.4Z" />
|
|
59
57
|
</svg>
|
|
60
58
|
{/if}
|
|
61
59
|
</div>
|
|
@@ -22,8 +22,8 @@ export declare const checkbox: import("tailwind-variants").TVReturnType<{
|
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
align: {
|
|
25
|
-
start:
|
|
26
|
-
center:
|
|
25
|
+
start: "items-start";
|
|
26
|
+
center: "items-center";
|
|
27
27
|
};
|
|
28
28
|
disabled: {
|
|
29
29
|
true: {
|
|
@@ -67,8 +67,8 @@ export declare const checkbox: import("tailwind-variants").TVReturnType<{
|
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
69
|
align: {
|
|
70
|
-
start:
|
|
71
|
-
center:
|
|
70
|
+
start: "items-start";
|
|
71
|
+
center: "items-center";
|
|
72
72
|
};
|
|
73
73
|
disabled: {
|
|
74
74
|
true: {
|
|
@@ -89,7 +89,7 @@ export declare const checkbox: import("tailwind-variants").TVReturnType<{
|
|
|
89
89
|
checkIcon: string;
|
|
90
90
|
indeterminateIcon: string;
|
|
91
91
|
label: string;
|
|
92
|
-
}, import("tailwind-variants").
|
|
92
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
93
93
|
state: {
|
|
94
94
|
unchecked: {};
|
|
95
95
|
checked: {
|
|
@@ -112,8 +112,8 @@ export declare const checkbox: import("tailwind-variants").TVReturnType<{
|
|
|
112
112
|
};
|
|
113
113
|
};
|
|
114
114
|
align: {
|
|
115
|
-
start:
|
|
116
|
-
center:
|
|
115
|
+
start: "items-start";
|
|
116
|
+
center: "items-center";
|
|
117
117
|
};
|
|
118
118
|
disabled: {
|
|
119
119
|
true: {
|
|
@@ -134,5 +134,5 @@ export declare const checkbox: import("tailwind-variants").TVReturnType<{
|
|
|
134
134
|
checkIcon: string;
|
|
135
135
|
indeterminateIcon: string;
|
|
136
136
|
label: string;
|
|
137
|
-
}
|
|
137
|
+
}>>;
|
|
138
138
|
export type CheckboxM3Variants = VariantProps<typeof checkbox>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { tv } from 'tailwind-variants';
|
|
2
2
|
export const checkbox = tv({
|
|
3
3
|
slots: {
|
|
4
|
-
root: 'inline-flex min-h-10 select-none items-start gap-3 text-md-sys-color-on-surface min-h-4.5 cursor-pointer',
|
|
4
|
+
root: 'group inline-flex min-h-10 select-none items-start gap-3 text-md-sys-color-on-surface min-h-4.5 cursor-pointer',
|
|
5
5
|
container: 'relative inline-flex size-[18px] shrink-0',
|
|
6
|
-
control: 'layer-container absolute -inset-[11px] rounded-full text-md-sys-color-on-surface-variant state-layer before:rounded-full
|
|
7
|
-
box: 'absolute inset-[11px] rounded-[4px] border-2 border-current bg-md-sys-color-surface',
|
|
8
|
-
checkIcon: 'pointer-events-none absolute inset-0 m-auto size-5 text-md-sys-color-on-primary opacity-0 scale-75',
|
|
6
|
+
control: 'layer-container absolute -inset-[11px] rounded-full text-md-sys-color-on-surface-variant state-layer before:rounded-full group-focus-visible:outline group-focus-visible:outline-3 group-focus-visible:outline-offset-2 group-focus-visible:outline-md-sys-color-secondary transition-colors duration-[var(--md-sys-motion-duration-fast)] ease-[var(--md-sys-motion-timing-function)]',
|
|
7
|
+
box: 'absolute inset-[11px] rounded-[4px] border-2 border-current bg-md-sys-color-surface transition-colors duration-[var(--md-sys-motion-duration-fast)] ease-[var(--md-sys-motion-timing-function)]',
|
|
8
|
+
checkIcon: 'pointer-events-none absolute inset-0 m-auto size-3.5 text-md-sys-color-on-primary opacity-0 scale-75',
|
|
9
9
|
indeterminateIcon: 'pointer-events-none absolute inset-0 m-auto block h-0.5 w-3 rounded-full bg-md-sys-color-on-primary opacity-0 scale-75',
|
|
10
10
|
label: 'md-sys-typescale-body-large leading-5 text-md-sys-color-on-surface cursor-pointer'
|
|
11
11
|
},
|
|
@@ -25,7 +25,7 @@ export const checkbox = tv({
|
|
|
25
25
|
},
|
|
26
26
|
error: {
|
|
27
27
|
true: {
|
|
28
|
-
control: 'text-md-sys-color-error
|
|
28
|
+
control: 'text-md-sys-color-error group-focus-visible:outline-md-sys-color-error',
|
|
29
29
|
box: 'border-md-sys-color-error',
|
|
30
30
|
label: 'text-md-sys-color-error',
|
|
31
31
|
supporting: 'text-md-sys-color-error'
|
|
@@ -48,17 +48,39 @@ export const checkbox = tv({
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
compoundVariants: [
|
|
51
|
+
{
|
|
52
|
+
state: 'checked',
|
|
53
|
+
error: true,
|
|
54
|
+
class: {
|
|
55
|
+
box: 'bg-md-sys-color-error',
|
|
56
|
+
checkIcon: 'text-md-sys-color-on-error'
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
state: 'indeterminate',
|
|
61
|
+
error: true,
|
|
62
|
+
class: {
|
|
63
|
+
box: 'bg-md-sys-color-error',
|
|
64
|
+
indeterminateIcon: 'bg-md-sys-color-on-error'
|
|
65
|
+
}
|
|
66
|
+
},
|
|
51
67
|
{
|
|
52
68
|
state: 'checked',
|
|
53
69
|
disabled: true,
|
|
54
|
-
|
|
55
|
-
|
|
70
|
+
class: {
|
|
71
|
+
control: 'text-md-sys-color-on-surface/38',
|
|
72
|
+
box: 'bg-md-sys-color-on-surface/38 border-transparent',
|
|
73
|
+
checkIcon: 'text-md-sys-color-surface'
|
|
74
|
+
}
|
|
56
75
|
},
|
|
57
76
|
{
|
|
58
77
|
state: 'indeterminate',
|
|
59
78
|
disabled: true,
|
|
60
|
-
|
|
61
|
-
|
|
79
|
+
class: {
|
|
80
|
+
control: 'text-md-sys-color-on-surface/38',
|
|
81
|
+
box: 'bg-md-sys-color-on-surface/38 border-transparent',
|
|
82
|
+
indeterminateIcon: 'bg-md-sys-color-surface'
|
|
83
|
+
}
|
|
62
84
|
}
|
|
63
85
|
],
|
|
64
86
|
defaultVariants: {
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import Command from './Command.svelte';
|
|
4
|
+
import CommandInput from './CommandInput.svelte';
|
|
5
|
+
import CommandList from './CommandList.svelte';
|
|
6
|
+
import CommandEmpty from './CommandEmpty.svelte';
|
|
7
|
+
import CommandGroup from './CommandGroup.svelte';
|
|
8
|
+
import CommandItem from './CommandItem.svelte';
|
|
9
|
+
import CommandSeparator from './CommandSeparator.svelte';
|
|
10
|
+
import Icon from '../../../utils/icon/Icon.svelte';
|
|
11
|
+
import { command } from './theme.js';
|
|
12
|
+
|
|
13
|
+
const { itemIcon } = command();
|
|
14
|
+
|
|
15
|
+
const { Story } = defineMeta({
|
|
16
|
+
title: 'Forms/Command',
|
|
17
|
+
component: Command
|
|
18
|
+
});
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<Story name="Playground" asChild>
|
|
22
|
+
<div class="w-96">
|
|
23
|
+
<Command>
|
|
24
|
+
<CommandInput placeholder="Type a command or search..." />
|
|
25
|
+
<CommandList>
|
|
26
|
+
<CommandEmpty>No results found.</CommandEmpty>
|
|
27
|
+
<CommandGroup heading="Suggestions">
|
|
28
|
+
<CommandItem value="calendar">
|
|
29
|
+
<Icon name="calendar_today" class={itemIcon()} />
|
|
30
|
+
Calendar
|
|
31
|
+
</CommandItem>
|
|
32
|
+
<CommandItem value="search-emoji">
|
|
33
|
+
<Icon name="mood" class={itemIcon()} />
|
|
34
|
+
Search Emoji
|
|
35
|
+
</CommandItem>
|
|
36
|
+
<CommandItem value="calculator">
|
|
37
|
+
<Icon name="calculate" class={itemIcon()} />
|
|
38
|
+
Calculator
|
|
39
|
+
</CommandItem>
|
|
40
|
+
</CommandGroup>
|
|
41
|
+
<CommandSeparator />
|
|
42
|
+
<CommandGroup heading="Settings">
|
|
43
|
+
<CommandItem value="profile">
|
|
44
|
+
<Icon name="person" class={itemIcon()} />
|
|
45
|
+
Profile
|
|
46
|
+
</CommandItem>
|
|
47
|
+
<CommandItem value="billing">
|
|
48
|
+
<Icon name="credit_card" class={itemIcon()} />
|
|
49
|
+
Billing
|
|
50
|
+
</CommandItem>
|
|
51
|
+
<CommandItem value="settings">
|
|
52
|
+
<Icon name="settings" class={itemIcon()} />
|
|
53
|
+
Settings
|
|
54
|
+
</CommandItem>
|
|
55
|
+
</CommandGroup>
|
|
56
|
+
</CommandList>
|
|
57
|
+
</Command>
|
|
58
|
+
</div>
|
|
59
|
+
</Story>
|
|
60
|
+
|
|
61
|
+
<Story name="Empty State" asChild>
|
|
62
|
+
<div class="w-96">
|
|
63
|
+
<Command>
|
|
64
|
+
<CommandInput placeholder="Search for nothing..." />
|
|
65
|
+
<CommandList>
|
|
66
|
+
<CommandEmpty>No results found.</CommandEmpty>
|
|
67
|
+
</CommandList>
|
|
68
|
+
</Command>
|
|
69
|
+
</div>
|
|
70
|
+
</Story>
|
|
71
|
+
|
|
72
|
+
<Story name="No Icons" asChild>
|
|
73
|
+
<div class="w-96">
|
|
74
|
+
<Command>
|
|
75
|
+
<CommandInput placeholder="Search..." />
|
|
76
|
+
<CommandList>
|
|
77
|
+
<CommandEmpty>No results found.</CommandEmpty>
|
|
78
|
+
<CommandGroup heading="Recent">
|
|
79
|
+
<CommandItem value="apple">Apple</CommandItem>
|
|
80
|
+
<CommandItem value="banana">Banana</CommandItem>
|
|
81
|
+
<CommandItem value="cherry">Cherry</CommandItem>
|
|
82
|
+
</CommandGroup>
|
|
83
|
+
</CommandList>
|
|
84
|
+
</Command>
|
|
85
|
+
</div>
|
|
86
|
+
</Story>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Command from './Command.svelte';
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
12
|
+
};
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
14
|
+
}
|
|
15
|
+
declare const Command: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
16
|
+
[evt: string]: CustomEvent<any>;
|
|
17
|
+
}, {}, {}, string>;
|
|
18
|
+
type Command = InstanceType<typeof Command>;
|
|
19
|
+
export default Command;
|
|
@@ -2,32 +2,32 @@ import { type VariantProps } from 'tailwind-variants';
|
|
|
2
2
|
export type CommandVariants = VariantProps<typeof command>;
|
|
3
3
|
export declare const command: import("tailwind-variants").TVReturnType<{
|
|
4
4
|
[key: string]: {
|
|
5
|
-
[key: string]: import("tailwind-
|
|
6
|
-
input?: import("tailwind-
|
|
7
|
-
base?: import("tailwind-
|
|
8
|
-
group?: import("tailwind-
|
|
9
|
-
list?: import("tailwind-
|
|
10
|
-
separator?: import("tailwind-
|
|
11
|
-
item?: import("tailwind-
|
|
12
|
-
inputWrapper?: import("tailwind-
|
|
13
|
-
inputIcon?: import("tailwind-
|
|
14
|
-
empty?: import("tailwind-
|
|
15
|
-
itemIcon?: import("tailwind-
|
|
5
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
6
|
+
input?: import("tailwind-variants").ClassValue;
|
|
7
|
+
base?: import("tailwind-variants").ClassValue;
|
|
8
|
+
group?: import("tailwind-variants").ClassValue;
|
|
9
|
+
list?: import("tailwind-variants").ClassValue;
|
|
10
|
+
separator?: import("tailwind-variants").ClassValue;
|
|
11
|
+
item?: import("tailwind-variants").ClassValue;
|
|
12
|
+
inputWrapper?: import("tailwind-variants").ClassValue;
|
|
13
|
+
inputIcon?: import("tailwind-variants").ClassValue;
|
|
14
|
+
empty?: import("tailwind-variants").ClassValue;
|
|
15
|
+
itemIcon?: import("tailwind-variants").ClassValue;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
} | {
|
|
19
19
|
[x: string]: {
|
|
20
|
-
[x: string]: import("tailwind-
|
|
21
|
-
input?: import("tailwind-
|
|
22
|
-
base?: import("tailwind-
|
|
23
|
-
group?: import("tailwind-
|
|
24
|
-
list?: import("tailwind-
|
|
25
|
-
separator?: import("tailwind-
|
|
26
|
-
item?: import("tailwind-
|
|
27
|
-
inputWrapper?: import("tailwind-
|
|
28
|
-
inputIcon?: import("tailwind-
|
|
29
|
-
empty?: import("tailwind-
|
|
30
|
-
itemIcon?: import("tailwind-
|
|
20
|
+
[x: string]: import("tailwind-variants").ClassValue | {
|
|
21
|
+
input?: import("tailwind-variants").ClassValue;
|
|
22
|
+
base?: import("tailwind-variants").ClassValue;
|
|
23
|
+
group?: import("tailwind-variants").ClassValue;
|
|
24
|
+
list?: import("tailwind-variants").ClassValue;
|
|
25
|
+
separator?: import("tailwind-variants").ClassValue;
|
|
26
|
+
item?: import("tailwind-variants").ClassValue;
|
|
27
|
+
inputWrapper?: import("tailwind-variants").ClassValue;
|
|
28
|
+
inputIcon?: import("tailwind-variants").ClassValue;
|
|
29
|
+
empty?: import("tailwind-variants").ClassValue;
|
|
30
|
+
itemIcon?: import("tailwind-variants").ClassValue;
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
} | {}, {
|
|
@@ -43,17 +43,17 @@ export declare const command: import("tailwind-variants").TVReturnType<{
|
|
|
43
43
|
itemIcon: string;
|
|
44
44
|
}, undefined, {
|
|
45
45
|
[key: string]: {
|
|
46
|
-
[key: string]: import("tailwind-
|
|
47
|
-
input?: import("tailwind-
|
|
48
|
-
base?: import("tailwind-
|
|
49
|
-
group?: import("tailwind-
|
|
50
|
-
list?: import("tailwind-
|
|
51
|
-
separator?: import("tailwind-
|
|
52
|
-
item?: import("tailwind-
|
|
53
|
-
inputWrapper?: import("tailwind-
|
|
54
|
-
inputIcon?: import("tailwind-
|
|
55
|
-
empty?: import("tailwind-
|
|
56
|
-
itemIcon?: import("tailwind-
|
|
46
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
47
|
+
input?: import("tailwind-variants").ClassValue;
|
|
48
|
+
base?: import("tailwind-variants").ClassValue;
|
|
49
|
+
group?: import("tailwind-variants").ClassValue;
|
|
50
|
+
list?: import("tailwind-variants").ClassValue;
|
|
51
|
+
separator?: import("tailwind-variants").ClassValue;
|
|
52
|
+
item?: import("tailwind-variants").ClassValue;
|
|
53
|
+
inputWrapper?: import("tailwind-variants").ClassValue;
|
|
54
|
+
inputIcon?: import("tailwind-variants").ClassValue;
|
|
55
|
+
empty?: import("tailwind-variants").ClassValue;
|
|
56
|
+
itemIcon?: import("tailwind-variants").ClassValue;
|
|
57
57
|
};
|
|
58
58
|
};
|
|
59
59
|
} | {}, {
|
|
@@ -67,7 +67,7 @@ export declare const command: import("tailwind-variants").TVReturnType<{
|
|
|
67
67
|
separator: string;
|
|
68
68
|
item: string;
|
|
69
69
|
itemIcon: string;
|
|
70
|
-
}, import("tailwind-variants").
|
|
70
|
+
}, import("tailwind-variants").TVReturnTypeLike<unknown, {
|
|
71
71
|
base: string;
|
|
72
72
|
inputWrapper: string;
|
|
73
73
|
inputIcon: string;
|
|
@@ -78,4 +78,4 @@ export declare const command: import("tailwind-variants").TVReturnType<{
|
|
|
78
78
|
separator: string;
|
|
79
79
|
item: string;
|
|
80
80
|
itemIcon: string;
|
|
81
|
-
}
|
|
81
|
+
}>>;
|
|
@@ -4,12 +4,12 @@ export const command = tv({
|
|
|
4
4
|
base: 'flex h-full w-full flex-col overflow-hidden rounded-2xl bg-md-sys-color-surface-container-high text-md-sys-color-on-surface shadow-elevation-3 ring-1 ring-md-sys-color-outline/20',
|
|
5
5
|
inputWrapper: 'flex items-center border-b border-md-sys-color-outline-variant px-4',
|
|
6
6
|
inputIcon: 'mr-3 h-5 w-5 shrink-0 text-md-sys-color-on-surface-variant',
|
|
7
|
-
input: 'flex h-12 w-full rounded-md bg-transparent py-3
|
|
7
|
+
input: 'flex h-12 w-full rounded-md bg-transparent py-3 md-sys-typescale-body-large outline-none placeholder:text-md-sys-color-on-surface-variant disabled:cursor-not-allowed disabled:opacity-50',
|
|
8
8
|
list: 'max-h-[300px] overflow-y-auto overflow-x-hidden p-2 scrollbar-thin scrollbar-thumb-md-sys-color-outline-variant scrollbar-track-transparent',
|
|
9
|
-
empty: 'py-6 text-center
|
|
10
|
-
group: 'overflow-hidden p-1 text-md-sys-color-on-surface-variant [&_[data-command-group-heading]]:px-3 [&_[data-command-group-heading]]:py-2 [&_[data-command-group-heading]]:
|
|
9
|
+
empty: 'py-6 text-center md-sys-typescale-body-medium text-md-sys-color-on-surface-variant',
|
|
10
|
+
group: 'overflow-hidden p-1 text-md-sys-color-on-surface-variant [&_[data-command-group-heading]]:px-3 [&_[data-command-group-heading]]:py-2 [&_[data-command-group-heading]]:md-sys-typescale-label-medium [&_[data-command-group-heading]]:text-md-sys-color-on-surface-variant',
|
|
11
11
|
separator: '-mx-1 h-px bg-md-sys-color-outline-variant',
|
|
12
|
-
item: 'relative flex cursor-default select-none items-center rounded-lg px-3 py-3
|
|
12
|
+
item: 'relative flex cursor-default select-none items-center rounded-lg px-3 py-3 md-sys-typescale-body-medium outline-none data-[selected=true]:bg-md-sys-color-secondary-container data-[selected=true]:text-md-sys-color-on-secondary-container data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50 transition-colors',
|
|
13
13
|
itemIcon: 'mr-3 h-5 w-5 shrink-0'
|
|
14
14
|
}
|
|
15
15
|
});
|
|
@@ -38,7 +38,7 @@ export declare const pinInput: import("tailwind-variants").TVReturnType<{
|
|
|
38
38
|
container: string;
|
|
39
39
|
cell: string;
|
|
40
40
|
supportingText: string;
|
|
41
|
-
}, import("tailwind-variants").
|
|
41
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
42
42
|
error: {
|
|
43
43
|
true: {
|
|
44
44
|
cell: string;
|
|
@@ -57,4 +57,4 @@ export declare const pinInput: import("tailwind-variants").TVReturnType<{
|
|
|
57
57
|
container: string;
|
|
58
58
|
cell: string;
|
|
59
59
|
supportingText: string;
|
|
60
|
-
}
|
|
60
|
+
}>>;
|
|
@@ -85,7 +85,7 @@ export declare const radioGroup: import("tailwind-variants").TVReturnType<{
|
|
|
85
85
|
innerDot: string;
|
|
86
86
|
label: string;
|
|
87
87
|
supporting: string;
|
|
88
|
-
}, import("tailwind-variants").
|
|
88
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
89
89
|
orientation: {
|
|
90
90
|
vertical: {
|
|
91
91
|
root: string;
|
|
@@ -128,5 +128,5 @@ export declare const radioGroup: import("tailwind-variants").TVReturnType<{
|
|
|
128
128
|
innerDot: string;
|
|
129
129
|
label: string;
|
|
130
130
|
supporting: string;
|
|
131
|
-
}
|
|
131
|
+
}>>;
|
|
132
132
|
export type RadioGroupVariants = VariantProps<typeof radioGroup>;
|
|
@@ -2,8 +2,8 @@ import { type VariantProps } from 'tailwind-variants';
|
|
|
2
2
|
export type SearchVariants = VariantProps<typeof search>;
|
|
3
3
|
export declare const search: import("tailwind-variants").TVReturnType<{
|
|
4
4
|
shadow: {
|
|
5
|
-
true:
|
|
6
|
-
false:
|
|
5
|
+
true: "shadow-elevation-3";
|
|
6
|
+
false: "";
|
|
7
7
|
};
|
|
8
8
|
}, {
|
|
9
9
|
base: string;
|
|
@@ -12,22 +12,22 @@ export declare const search: import("tailwind-variants").TVReturnType<{
|
|
|
12
12
|
input: string;
|
|
13
13
|
}, undefined, {
|
|
14
14
|
shadow: {
|
|
15
|
-
true:
|
|
16
|
-
false:
|
|
15
|
+
true: "shadow-elevation-3";
|
|
16
|
+
false: "";
|
|
17
17
|
};
|
|
18
18
|
}, {
|
|
19
19
|
base: string;
|
|
20
20
|
leadingIcon: string;
|
|
21
21
|
trailingIcon: string;
|
|
22
22
|
input: string;
|
|
23
|
-
}, import("tailwind-variants").
|
|
23
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
24
24
|
shadow: {
|
|
25
|
-
true:
|
|
26
|
-
false:
|
|
25
|
+
true: "shadow-elevation-3";
|
|
26
|
+
false: "";
|
|
27
27
|
};
|
|
28
28
|
}, {
|
|
29
29
|
base: string;
|
|
30
30
|
leadingIcon: string;
|
|
31
31
|
trailingIcon: string;
|
|
32
32
|
input: string;
|
|
33
|
-
}
|
|
33
|
+
}>>;
|
|
@@ -23,6 +23,7 @@ Powered by bits-ui for accessibility and behavior.
|
|
|
23
23
|
options = [],
|
|
24
24
|
placeholder,
|
|
25
25
|
error = false,
|
|
26
|
+
variant = 'outlined',
|
|
26
27
|
supportingText,
|
|
27
28
|
leadingIconProps,
|
|
28
29
|
triggerProps,
|
|
@@ -32,7 +33,7 @@ Powered by bits-ui for accessibility and behavior.
|
|
|
32
33
|
...rootProps
|
|
33
34
|
}: SelectProps = $props();
|
|
34
35
|
|
|
35
|
-
const cls = $derived(selectCls({ disabled, error }));
|
|
36
|
+
const cls = $derived(selectCls({ disabled, error, variant }));
|
|
36
37
|
|
|
37
38
|
const selectedLabel = $derived.by(() => {
|
|
38
39
|
for (const option of options as any[]) {
|
|
@@ -82,7 +83,7 @@ Powered by bits-ui for accessibility and behavior.
|
|
|
82
83
|
easing: easeEmphasized,
|
|
83
84
|
mode: 'scale'
|
|
84
85
|
}}
|
|
85
|
-
style:width="var(--bits-select-
|
|
86
|
+
style:width="var(--bits-select-anchor-width)"
|
|
86
87
|
style:max-width="min(calc(100vw - 32px), 560px)"
|
|
87
88
|
>
|
|
88
89
|
<Select.Viewport class="w-full">
|