@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
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { type VariantProps } from 'tailwind-variants';
|
|
2
2
|
export type SelectVariants = VariantProps<typeof select>;
|
|
3
3
|
export declare const select: import("tailwind-variants").TVReturnType<{
|
|
4
|
+
variant: {
|
|
5
|
+
filled: {
|
|
6
|
+
base: string;
|
|
7
|
+
};
|
|
8
|
+
outlined: {
|
|
9
|
+
base: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
4
12
|
error: {
|
|
5
13
|
true: {
|
|
6
14
|
base: string;
|
|
@@ -28,6 +36,14 @@ export declare const select: import("tailwind-variants").TVReturnType<{
|
|
|
28
36
|
separator: string;
|
|
29
37
|
supportingText: string;
|
|
30
38
|
}, undefined, {
|
|
39
|
+
variant: {
|
|
40
|
+
filled: {
|
|
41
|
+
base: string;
|
|
42
|
+
};
|
|
43
|
+
outlined: {
|
|
44
|
+
base: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
31
47
|
error: {
|
|
32
48
|
true: {
|
|
33
49
|
base: string;
|
|
@@ -54,7 +70,15 @@ export declare const select: import("tailwind-variants").TVReturnType<{
|
|
|
54
70
|
groupLabel: string;
|
|
55
71
|
separator: string;
|
|
56
72
|
supportingText: string;
|
|
57
|
-
}, import("tailwind-variants").
|
|
73
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
74
|
+
variant: {
|
|
75
|
+
filled: {
|
|
76
|
+
base: string;
|
|
77
|
+
};
|
|
78
|
+
outlined: {
|
|
79
|
+
base: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
58
82
|
error: {
|
|
59
83
|
true: {
|
|
60
84
|
base: string;
|
|
@@ -81,4 +105,4 @@ export declare const select: import("tailwind-variants").TVReturnType<{
|
|
|
81
105
|
groupLabel: string;
|
|
82
106
|
separator: string;
|
|
83
107
|
supportingText: string;
|
|
84
|
-
}
|
|
108
|
+
}>>;
|
|
@@ -3,18 +3,10 @@ export const select = tv({
|
|
|
3
3
|
slots: {
|
|
4
4
|
root: 'relative w-full',
|
|
5
5
|
base: `
|
|
6
|
-
group w-full h-14 px-0
|
|
7
|
-
rounded-t-xs state-layer before:rounded-xs hover:before:bg-md-sys-color-on-surface/8 relative flex items-center
|
|
8
|
-
after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-md-sys-color-on-surface-variant
|
|
9
|
-
after:transition-[height,background-color] after:duration-200
|
|
10
|
-
hover:after:bg-md-sys-color-on-surface
|
|
11
|
-
data-[state=open]:after:bg-md-sys-color-primary
|
|
12
|
-
data-[state=open]:after:h-[2px]
|
|
13
|
-
disabled:bg-md-sys-color-on-surface/4
|
|
14
|
-
disabled:after:bg-md-sys-color-on-surface/12
|
|
6
|
+
group w-full h-14 px-0 relative flex items-center
|
|
15
7
|
`,
|
|
16
8
|
trigger: `
|
|
17
|
-
peer w-full h-full flex items-center justify-between bg-transparent outline-none
|
|
9
|
+
group peer w-full h-full flex items-center justify-between bg-transparent outline-none
|
|
18
10
|
cursor-pointer
|
|
19
11
|
`,
|
|
20
12
|
inputWrapper: `
|
|
@@ -29,7 +21,7 @@ export const select = tv({
|
|
|
29
21
|
`,
|
|
30
22
|
leadingIcon: `
|
|
31
23
|
text-md-sys-color-on-surface-variant size-6
|
|
32
|
-
group-data-
|
|
24
|
+
group-has-[[data-state=open]]:text-md-sys-color-primary
|
|
33
25
|
group-data-[invalid]:text-md-sys-color-error ml-3 text-[24px]
|
|
34
26
|
`,
|
|
35
27
|
dropdownIcon: `
|
|
@@ -40,27 +32,27 @@ export const select = tv({
|
|
|
40
32
|
group-data-[state=open]:rotate-180
|
|
41
33
|
`,
|
|
42
34
|
content: `
|
|
43
|
-
z-[100] min-w-[var(--bits-select-
|
|
44
|
-
rounded-
|
|
45
|
-
shadow-elevation-3
|
|
35
|
+
z-[100] min-w-[var(--bits-select-anchor-width)] max-h-96 overflow-y-auto
|
|
36
|
+
rounded-lg gap-1 bg-md-sys-color-surface-container-high
|
|
37
|
+
shadow-elevation-3 ring-md-sys-color-outline/10 px-2 py-1 outline-none
|
|
46
38
|
`,
|
|
47
39
|
item: `
|
|
48
|
-
relative flex w-full cursor-pointer select-none
|
|
49
|
-
px-
|
|
40
|
+
rounded-sm relative flex w-full cursor-pointer select-none items-center
|
|
41
|
+
px-3 py-2 outline-none
|
|
50
42
|
md-sys-typescale-body-large text-md-sys-color-on-surface
|
|
51
43
|
hover:bg-md-sys-color-on-surface/8
|
|
52
|
-
|
|
44
|
+
data-[highlighted]:bg-md-sys-color-on-surface/8
|
|
53
45
|
data-[selected]:bg-md-sys-color-secondary-container
|
|
54
46
|
data-[selected]:text-md-sys-color-on-secondary-container
|
|
55
|
-
data-[disabled]:cursor-not-allowed data-[disabled]:opacity-
|
|
56
|
-
transition-colors duration-150
|
|
47
|
+
data-[disabled]:cursor-not-allowed data-[disabled]:opacity-38
|
|
48
|
+
transition-colors duration-150
|
|
57
49
|
`,
|
|
58
50
|
groupLabel: `
|
|
59
|
-
px-
|
|
51
|
+
px-3 pt-2 pb-1 md-sys-typescale-label-medium
|
|
60
52
|
text-md-sys-color-primary
|
|
61
53
|
`,
|
|
62
54
|
separator: `
|
|
63
|
-
|
|
55
|
+
my-1 h-px bg-md-sys-color-outline-variant
|
|
64
56
|
`,
|
|
65
57
|
supportingText: `
|
|
66
58
|
px-4 pt-1 flex justify-between
|
|
@@ -70,9 +62,32 @@ export const select = tv({
|
|
|
70
62
|
`
|
|
71
63
|
},
|
|
72
64
|
variants: {
|
|
65
|
+
variant: {
|
|
66
|
+
filled: {
|
|
67
|
+
base: `
|
|
68
|
+
bg-md-sys-color-surface-container-highest
|
|
69
|
+
rounded-t-xs state-layer before:rounded-xs hover:before:bg-md-sys-color-on-surface/8
|
|
70
|
+
after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-md-sys-color-on-surface-variant
|
|
71
|
+
after:transition-[height,background-color] after:duration-200
|
|
72
|
+
hover:after:bg-md-sys-color-on-surface
|
|
73
|
+
has-[[data-state=open]]:after:bg-md-sys-color-primary
|
|
74
|
+
has-[[data-state=open]]:after:h-[2px]
|
|
75
|
+
disabled:bg-md-sys-color-on-surface/4
|
|
76
|
+
disabled:after:bg-md-sys-color-on-surface/12
|
|
77
|
+
`
|
|
78
|
+
},
|
|
79
|
+
outlined: {
|
|
80
|
+
base: `
|
|
81
|
+
rounded-xs border border-md-sys-color-outline
|
|
82
|
+
transition-colors duration-150
|
|
83
|
+
hover:border-md-sys-color-on-surface
|
|
84
|
+
has-[[data-state=open]]:border-2 has-[[data-state=open]]:border-md-sys-color-primary
|
|
85
|
+
`
|
|
86
|
+
}
|
|
87
|
+
},
|
|
73
88
|
error: {
|
|
74
89
|
true: {
|
|
75
|
-
base: 'after:bg-md-sys-color-error data-
|
|
90
|
+
base: 'after:bg-md-sys-color-error has-[[data-state=open]]:after:bg-md-sys-color-error',
|
|
76
91
|
supportingText: 'text-md-sys-color-error',
|
|
77
92
|
leadingIcon: 'text-md-sys-color-error',
|
|
78
93
|
trailingIcon: 'text-md-sys-color-error'
|
|
@@ -83,5 +98,24 @@ export const select = tv({
|
|
|
83
98
|
root: 'cursor-not-allowed opacity-60'
|
|
84
99
|
}
|
|
85
100
|
}
|
|
101
|
+
},
|
|
102
|
+
compoundVariants: [
|
|
103
|
+
{
|
|
104
|
+
variant: 'outlined',
|
|
105
|
+
error: true,
|
|
106
|
+
class: {
|
|
107
|
+
base: 'border-md-sys-color-error hover:border-md-sys-color-error has-[[data-state=open]]:border-md-sys-color-error'
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
variant: 'outlined',
|
|
112
|
+
disabled: true,
|
|
113
|
+
class: {
|
|
114
|
+
base: 'border-md-sys-color-on-surface/12 hover:border-md-sys-color-on-surface/12'
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
defaultVariants: {
|
|
119
|
+
variant: 'outlined'
|
|
86
120
|
}
|
|
87
121
|
});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { type VariantProps } from 'tailwind-variants';
|
|
2
2
|
export declare const slider: import("tailwind-variants").TVReturnType<{
|
|
3
3
|
size: {
|
|
4
|
-
xs:
|
|
5
|
-
s:
|
|
6
|
-
m:
|
|
7
|
-
l:
|
|
8
|
-
xl:
|
|
4
|
+
xs: "[--track-height:1rem] [--handle-height:2.75rem] [--track-radius:var(--m3-shape-small)] [--icon-size:0]";
|
|
5
|
+
s: "[--track-height:1.5rem] [--handle-height:2.75rem] [--track-radius:var(--m3-shape-small)] [--icon-size:0]";
|
|
6
|
+
m: "[--track-height:2.5rem] [--handle-height:3.25rem] [--track-radius:var(--m3-shape-medium)] [--icon-size:1.5rem]";
|
|
7
|
+
l: "[--track-height:3.5rem] [--handle-height:4.25rem] [--track-radius:var(--m3-shape-large)] [--icon-size:1.5rem]";
|
|
8
|
+
xl: "[--track-height:6rem] [--handle-height:6.75rem] [--track-radius:var(--m3-shape-extra-large)] [--icon-size:2rem]";
|
|
9
9
|
};
|
|
10
10
|
vertical: {
|
|
11
|
-
true:
|
|
11
|
+
true: "[writing-mode:sideways-lr]";
|
|
12
12
|
};
|
|
13
13
|
}, {
|
|
14
14
|
root: string;
|
|
@@ -26,14 +26,14 @@ export declare const slider: import("tailwind-variants").TVReturnType<{
|
|
|
26
26
|
value: string;
|
|
27
27
|
}, undefined, {
|
|
28
28
|
size: {
|
|
29
|
-
xs:
|
|
30
|
-
s:
|
|
31
|
-
m:
|
|
32
|
-
l:
|
|
33
|
-
xl:
|
|
29
|
+
xs: "[--track-height:1rem] [--handle-height:2.75rem] [--track-radius:var(--m3-shape-small)] [--icon-size:0]";
|
|
30
|
+
s: "[--track-height:1.5rem] [--handle-height:2.75rem] [--track-radius:var(--m3-shape-small)] [--icon-size:0]";
|
|
31
|
+
m: "[--track-height:2.5rem] [--handle-height:3.25rem] [--track-radius:var(--m3-shape-medium)] [--icon-size:1.5rem]";
|
|
32
|
+
l: "[--track-height:3.5rem] [--handle-height:4.25rem] [--track-radius:var(--m3-shape-large)] [--icon-size:1.5rem]";
|
|
33
|
+
xl: "[--track-height:6rem] [--handle-height:6.75rem] [--track-radius:var(--m3-shape-extra-large)] [--icon-size:2rem]";
|
|
34
34
|
};
|
|
35
35
|
vertical: {
|
|
36
|
-
true:
|
|
36
|
+
true: "[writing-mode:sideways-lr]";
|
|
37
37
|
};
|
|
38
38
|
}, {
|
|
39
39
|
root: string;
|
|
@@ -49,16 +49,16 @@ export declare const slider: import("tailwind-variants").TVReturnType<{
|
|
|
49
49
|
stopRest: string;
|
|
50
50
|
handle: string;
|
|
51
51
|
value: string;
|
|
52
|
-
}, import("tailwind-variants").
|
|
52
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
53
53
|
size: {
|
|
54
|
-
xs:
|
|
55
|
-
s:
|
|
56
|
-
m:
|
|
57
|
-
l:
|
|
58
|
-
xl:
|
|
54
|
+
xs: "[--track-height:1rem] [--handle-height:2.75rem] [--track-radius:var(--m3-shape-small)] [--icon-size:0]";
|
|
55
|
+
s: "[--track-height:1.5rem] [--handle-height:2.75rem] [--track-radius:var(--m3-shape-small)] [--icon-size:0]";
|
|
56
|
+
m: "[--track-height:2.5rem] [--handle-height:3.25rem] [--track-radius:var(--m3-shape-medium)] [--icon-size:1.5rem]";
|
|
57
|
+
l: "[--track-height:3.5rem] [--handle-height:4.25rem] [--track-radius:var(--m3-shape-large)] [--icon-size:1.5rem]";
|
|
58
|
+
xl: "[--track-height:6rem] [--handle-height:6.75rem] [--track-radius:var(--m3-shape-extra-large)] [--icon-size:2rem]";
|
|
59
59
|
};
|
|
60
60
|
vertical: {
|
|
61
|
-
true:
|
|
61
|
+
true: "[writing-mode:sideways-lr]";
|
|
62
62
|
};
|
|
63
63
|
}, {
|
|
64
64
|
root: string;
|
|
@@ -74,5 +74,5 @@ export declare const slider: import("tailwind-variants").TVReturnType<{
|
|
|
74
74
|
stopRest: string;
|
|
75
75
|
handle: string;
|
|
76
76
|
value: string;
|
|
77
|
-
}
|
|
77
|
+
}>>;
|
|
78
78
|
export type SliderVariants = VariantProps<typeof slider>;
|
|
@@ -31,7 +31,7 @@ export declare const toggle: import("tailwind-variants").TVReturnType<{
|
|
|
31
31
|
icon: string;
|
|
32
32
|
iconChecked: string;
|
|
33
33
|
iconUnchecked: string;
|
|
34
|
-
}, import("tailwind-variants").
|
|
34
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
35
35
|
icons: {
|
|
36
36
|
checked: {};
|
|
37
37
|
both: {
|
|
@@ -47,5 +47,5 @@ export declare const toggle: import("tailwind-variants").TVReturnType<{
|
|
|
47
47
|
icon: string;
|
|
48
48
|
iconChecked: string;
|
|
49
49
|
iconUnchecked: string;
|
|
50
|
-
}
|
|
50
|
+
}>>;
|
|
51
51
|
export type SwitchVariants = VariantProps<typeof toggle>;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
argTypes: {
|
|
9
9
|
label: { control: 'text' },
|
|
10
10
|
placeholder: { control: 'text' },
|
|
11
|
+
variant: { control: 'select', options: ['filled', 'outlined'] },
|
|
11
12
|
disabled: { control: 'boolean' },
|
|
12
13
|
error: { control: 'boolean' },
|
|
13
14
|
required: { control: 'boolean' },
|
|
@@ -15,6 +16,7 @@
|
|
|
15
16
|
},
|
|
16
17
|
args: {
|
|
17
18
|
label: 'Label',
|
|
19
|
+
variant: 'outlined',
|
|
18
20
|
disabled: false,
|
|
19
21
|
error: false,
|
|
20
22
|
required: false
|
|
@@ -72,3 +74,23 @@
|
|
|
72
74
|
<Textfield label="Disabled" disabled value="Can't edit" />
|
|
73
75
|
</div>
|
|
74
76
|
</Story>
|
|
77
|
+
|
|
78
|
+
<Story name="Outlined" asChild>
|
|
79
|
+
<div class="flex max-w-sm flex-col gap-6 p-6">
|
|
80
|
+
<Textfield variant="outlined" label="Default" />
|
|
81
|
+
<Textfield variant="outlined" label="With value" value="Hello" />
|
|
82
|
+
<Textfield variant="outlined" label="Required" required />
|
|
83
|
+
<Textfield variant="outlined" label="Error" error value="Invalid value">
|
|
84
|
+
{#snippet supportingText()}
|
|
85
|
+
This field is required.
|
|
86
|
+
{/snippet}
|
|
87
|
+
</Textfield>
|
|
88
|
+
<Textfield variant="outlined" label="Disabled" disabled value="Can't edit" />
|
|
89
|
+
<Textfield
|
|
90
|
+
variant="outlined"
|
|
91
|
+
label="Search"
|
|
92
|
+
leadingIconProps={{ name: 'search' }}
|
|
93
|
+
trailingIconProps={{ name: 'close' }}
|
|
94
|
+
/>
|
|
95
|
+
</div>
|
|
96
|
+
</Story>
|
|
@@ -27,13 +27,14 @@ Text fields allow users to enter and edit text.
|
|
|
27
27
|
disabled = false,
|
|
28
28
|
error = false,
|
|
29
29
|
required = false,
|
|
30
|
+
variant = 'outlined',
|
|
30
31
|
trailingOnClick,
|
|
31
32
|
inputChild,
|
|
32
33
|
trailingIcon,
|
|
33
34
|
...restProps
|
|
34
35
|
}: TextfieldProps = $props();
|
|
35
36
|
|
|
36
|
-
const cls = $derived(textfield({ disabled, error }));
|
|
37
|
+
const cls = $derived(textfield({ disabled, error, variant }));
|
|
37
38
|
|
|
38
39
|
const inputProps = $derived({
|
|
39
40
|
id,
|
|
@@ -75,6 +76,14 @@ Text fields allow users to enter and edit text.
|
|
|
75
76
|
iconProps={trailingIconProps}
|
|
76
77
|
></ButtonIcon>
|
|
77
78
|
{/if}
|
|
79
|
+
|
|
80
|
+
{#if variant === 'outlined'}
|
|
81
|
+
<fieldset class={cls.fieldset()} aria-hidden="true">
|
|
82
|
+
<legend class={cls.legend()}>
|
|
83
|
+
<span class={cls.legendLabel()}>{label}{required ? '*' : ''}</span>
|
|
84
|
+
</legend>
|
|
85
|
+
</fieldset>
|
|
86
|
+
{/if}
|
|
78
87
|
</div>
|
|
79
88
|
|
|
80
89
|
{#if supportingText}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { type VariantProps } from 'tailwind-variants';
|
|
2
2
|
export type TextFieldVariants = VariantProps<typeof textfield>;
|
|
3
3
|
export declare const textfield: import("tailwind-variants").TVReturnType<{
|
|
4
|
+
variant: {
|
|
5
|
+
filled: {
|
|
6
|
+
base: string;
|
|
7
|
+
label: string;
|
|
8
|
+
};
|
|
9
|
+
outlined: {
|
|
10
|
+
label: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
4
13
|
error: {
|
|
5
14
|
true: {
|
|
6
15
|
base: string;
|
|
@@ -8,11 +17,13 @@ export declare const textfield: import("tailwind-variants").TVReturnType<{
|
|
|
8
17
|
supportingText: string;
|
|
9
18
|
leadingIcon: string;
|
|
10
19
|
trailingIcon: string;
|
|
20
|
+
fieldset: string;
|
|
11
21
|
};
|
|
12
22
|
};
|
|
13
23
|
disabled: {
|
|
14
24
|
true: {
|
|
15
25
|
base: string;
|
|
26
|
+
fieldset: string;
|
|
16
27
|
};
|
|
17
28
|
};
|
|
18
29
|
}, {
|
|
@@ -24,7 +35,19 @@ export declare const textfield: import("tailwind-variants").TVReturnType<{
|
|
|
24
35
|
leadingIcon: string;
|
|
25
36
|
trailingIcon: string;
|
|
26
37
|
supportingText: string;
|
|
38
|
+
fieldset: string;
|
|
39
|
+
legend: string;
|
|
40
|
+
legendLabel: string;
|
|
27
41
|
}, undefined, {
|
|
42
|
+
variant: {
|
|
43
|
+
filled: {
|
|
44
|
+
base: string;
|
|
45
|
+
label: string;
|
|
46
|
+
};
|
|
47
|
+
outlined: {
|
|
48
|
+
label: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
28
51
|
error: {
|
|
29
52
|
true: {
|
|
30
53
|
base: string;
|
|
@@ -32,11 +55,13 @@ export declare const textfield: import("tailwind-variants").TVReturnType<{
|
|
|
32
55
|
supportingText: string;
|
|
33
56
|
leadingIcon: string;
|
|
34
57
|
trailingIcon: string;
|
|
58
|
+
fieldset: string;
|
|
35
59
|
};
|
|
36
60
|
};
|
|
37
61
|
disabled: {
|
|
38
62
|
true: {
|
|
39
63
|
base: string;
|
|
64
|
+
fieldset: string;
|
|
40
65
|
};
|
|
41
66
|
};
|
|
42
67
|
}, {
|
|
@@ -48,7 +73,19 @@ export declare const textfield: import("tailwind-variants").TVReturnType<{
|
|
|
48
73
|
leadingIcon: string;
|
|
49
74
|
trailingIcon: string;
|
|
50
75
|
supportingText: string;
|
|
51
|
-
|
|
76
|
+
fieldset: string;
|
|
77
|
+
legend: string;
|
|
78
|
+
legendLabel: string;
|
|
79
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
80
|
+
variant: {
|
|
81
|
+
filled: {
|
|
82
|
+
base: string;
|
|
83
|
+
label: string;
|
|
84
|
+
};
|
|
85
|
+
outlined: {
|
|
86
|
+
label: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
52
89
|
error: {
|
|
53
90
|
true: {
|
|
54
91
|
base: string;
|
|
@@ -56,11 +93,13 @@ export declare const textfield: import("tailwind-variants").TVReturnType<{
|
|
|
56
93
|
supportingText: string;
|
|
57
94
|
leadingIcon: string;
|
|
58
95
|
trailingIcon: string;
|
|
96
|
+
fieldset: string;
|
|
59
97
|
};
|
|
60
98
|
};
|
|
61
99
|
disabled: {
|
|
62
100
|
true: {
|
|
63
101
|
base: string;
|
|
102
|
+
fieldset: string;
|
|
64
103
|
};
|
|
65
104
|
};
|
|
66
105
|
}, {
|
|
@@ -72,4 +111,7 @@ export declare const textfield: import("tailwind-variants").TVReturnType<{
|
|
|
72
111
|
leadingIcon: string;
|
|
73
112
|
trailingIcon: string;
|
|
74
113
|
supportingText: string;
|
|
75
|
-
|
|
114
|
+
fieldset: string;
|
|
115
|
+
legend: string;
|
|
116
|
+
legendLabel: string;
|
|
117
|
+
}>>;
|
|
@@ -2,16 +2,7 @@ import { tv } from 'tailwind-variants';
|
|
|
2
2
|
export const textfield = tv({
|
|
3
3
|
slots: {
|
|
4
4
|
base: `
|
|
5
|
-
group w-full h-14
|
|
6
|
-
rounded-t-xs state-layer before:rounded-xs hover:before:bg-md-sys-color-on-surface/8 relative flex items-center
|
|
7
|
-
after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-md-sys-color-on-surface-variant
|
|
8
|
-
after:transition-[height,background-color] after:duration-200
|
|
9
|
-
hover:after:bg-md-sys-color-on-surface
|
|
10
|
-
focus-within:after:bg-md-sys-color-primary
|
|
11
|
-
focus-within:after:h-[2px]
|
|
12
|
-
disabled:bg-md-sys-color-on-surface/4
|
|
13
|
-
disabled:after:bg-md-sys-color-on-surface/12
|
|
14
|
-
|
|
5
|
+
group relative w-full h-14 flex items-center
|
|
15
6
|
`,
|
|
16
7
|
inputWrapper: `
|
|
17
8
|
relative flex-1 px-4
|
|
@@ -29,10 +20,6 @@ export const textfield = tv({
|
|
|
29
20
|
transition-[top,font-size,line-height,color,transform] duration-200 ease-in-out
|
|
30
21
|
|
|
31
22
|
peer-focus:text-md-sys-color-primary
|
|
32
|
-
|
|
33
|
-
peer-focus:top-1.5 peer-focus:md-sys-typescale-body-small peer-focus:-translate-y-1
|
|
34
|
-
|
|
35
|
-
peer-not-placeholder-shown:top-1.5 peer-not-placeholder-shown:md-sys-typescale-body-small peer-not-placeholder-shown:-translate-y-1
|
|
36
23
|
`,
|
|
37
24
|
requiredAsterisk: `
|
|
38
25
|
ml-0.5
|
|
@@ -54,22 +41,75 @@ export const textfield = tv({
|
|
|
54
41
|
px-4 pt-1 flex justify-between
|
|
55
42
|
md-sys-typescale-body-small
|
|
56
43
|
text-md-sys-color-on-surface-variant
|
|
44
|
+
`,
|
|
45
|
+
fieldset: `
|
|
46
|
+
absolute -top-[5px] left-0 right-0 bottom-0 m-0 px-2
|
|
47
|
+
pointer-events-none rounded-xs border border-md-sys-color-outline
|
|
48
|
+
transition-colors duration-150
|
|
49
|
+
|
|
50
|
+
group-hover:border-md-sys-color-on-surface
|
|
51
|
+
group-focus-within:border-2 group-focus-within:border-md-sys-color-primary
|
|
52
|
+
`,
|
|
53
|
+
legend: `
|
|
54
|
+
invisible float-none block h-auto max-w-[0.01px] overflow-hidden
|
|
55
|
+
whitespace-nowrap md-sys-typescale-body-small
|
|
56
|
+
transition-[max-width] duration-150 ease-in-out
|
|
57
|
+
|
|
58
|
+
group-focus-within:max-w-full
|
|
59
|
+
group-has-[input:not(:placeholder-shown)]:max-w-full
|
|
60
|
+
`,
|
|
61
|
+
legendLabel: `
|
|
62
|
+
px-1
|
|
57
63
|
`
|
|
58
64
|
},
|
|
59
65
|
variants: {
|
|
66
|
+
variant: {
|
|
67
|
+
filled: {
|
|
68
|
+
base: `
|
|
69
|
+
px-0 bg-md-sys-color-surface-container-highest
|
|
70
|
+
rounded-t-xs state-layer before:rounded-xs hover:before:bg-md-sys-color-on-surface/8
|
|
71
|
+
after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-md-sys-color-on-surface-variant
|
|
72
|
+
after:transition-[height,background-color] after:duration-200
|
|
73
|
+
hover:after:bg-md-sys-color-on-surface
|
|
74
|
+
focus-within:after:bg-md-sys-color-primary
|
|
75
|
+
focus-within:after:h-[2px]
|
|
76
|
+
disabled:bg-md-sys-color-on-surface/4
|
|
77
|
+
disabled:after:bg-md-sys-color-on-surface/12
|
|
78
|
+
`,
|
|
79
|
+
label: `
|
|
80
|
+
peer-focus:top-1.5 peer-focus:md-sys-typescale-body-small peer-focus:-translate-y-1
|
|
81
|
+
peer-not-placeholder-shown:top-1.5 peer-not-placeholder-shown:md-sys-typescale-body-small peer-not-placeholder-shown:-translate-y-1
|
|
82
|
+
`
|
|
83
|
+
},
|
|
84
|
+
outlined: {
|
|
85
|
+
label: `
|
|
86
|
+
peer-focus:top-0 peer-focus:md-sys-typescale-body-small peer-focus:-translate-y-1/2
|
|
87
|
+
peer-not-placeholder-shown:top-0 peer-not-placeholder-shown:md-sys-typescale-body-small peer-not-placeholder-shown:-translate-y-1/2
|
|
88
|
+
`
|
|
89
|
+
}
|
|
90
|
+
},
|
|
60
91
|
error: {
|
|
61
92
|
true: {
|
|
62
93
|
base: 'after:bg-md-sys-color-error focus-within:after:bg-md-sys-color-error',
|
|
63
94
|
label: 'text-md-sys-color-error',
|
|
64
95
|
supportingText: 'text-md-sys-color-error',
|
|
65
96
|
leadingIcon: 'text-md-sys-color-error',
|
|
66
|
-
trailingIcon: 'text-md-sys-color-error'
|
|
97
|
+
trailingIcon: 'text-md-sys-color-error',
|
|
98
|
+
fieldset: `
|
|
99
|
+
border-md-sys-color-error
|
|
100
|
+
group-hover:border-md-sys-color-error
|
|
101
|
+
group-focus-within:border-md-sys-color-error
|
|
102
|
+
`
|
|
67
103
|
}
|
|
68
104
|
},
|
|
69
105
|
disabled: {
|
|
70
106
|
true: {
|
|
71
|
-
base: 'cursor-not-allowed opacity-60'
|
|
107
|
+
base: 'cursor-not-allowed opacity-60',
|
|
108
|
+
fieldset: 'border-md-sys-color-on-surface/12 group-hover:border-md-sys-color-on-surface/12'
|
|
72
109
|
}
|
|
73
110
|
}
|
|
111
|
+
},
|
|
112
|
+
defaultVariants: {
|
|
113
|
+
variant: 'outlined'
|
|
74
114
|
}
|
|
75
115
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
-
@deprecated Use `
|
|
4
|
-
from the Material Design 3 spec in favour of
|
|
3
|
+
@deprecated Use `ConnectedButtonGroup` instead. Google has removed segmented
|
|
4
|
+
buttons from the Material Design 3 spec in favour of connected button groups.
|
|
5
5
|
|
|
6
6
|
Toggle group renders as M3 segmented buttons — a continuous pill of
|
|
7
7
|
connected toggle items for filtering or mode selection.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ToggleGroup } from 'bits-ui';
|
|
2
2
|
import type { ToggleGroupProps } from './types.js';
|
|
3
3
|
/**
|
|
4
|
-
* @deprecated Use `
|
|
5
|
-
* from the Material Design 3 spec in favour of
|
|
4
|
+
* @deprecated Use `ConnectedButtonGroup` instead. Google has removed segmented
|
|
5
|
+
* buttons from the Material Design 3 spec in favour of connected button groups.
|
|
6
6
|
*
|
|
7
7
|
* Toggle group renders as M3 segmented buttons — a continuous pill of
|
|
8
8
|
* connected toggle items for filtering or mode selection.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ToggleGroupItemProps } from './types.js';
|
|
2
|
-
/** @deprecated Use `
|
|
2
|
+
/** @deprecated Use `ConnectedButtonGroupItem` instead. Pair with the deprecated `ToggleGroup`. */
|
|
3
3
|
declare const ToggleGroupItem: import("svelte").Component<ToggleGroupItemProps, {}, "">;
|
|
4
4
|
type ToggleGroupItem = ReturnType<typeof ToggleGroupItem>;
|
|
5
5
|
export default ToggleGroupItem;
|
|
@@ -23,7 +23,7 @@ export declare const toggleGroup: import("tailwind-variants").TVReturnType<{
|
|
|
23
23
|
};
|
|
24
24
|
}, {
|
|
25
25
|
root: string;
|
|
26
|
-
}, import("tailwind-variants").
|
|
26
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
27
27
|
orientation: {
|
|
28
28
|
horizontal: {
|
|
29
29
|
root: string;
|
|
@@ -34,21 +34,21 @@ export declare const toggleGroup: import("tailwind-variants").TVReturnType<{
|
|
|
34
34
|
};
|
|
35
35
|
}, {
|
|
36
36
|
root: string;
|
|
37
|
-
}
|
|
37
|
+
}>>;
|
|
38
38
|
export declare const toggleGroupItem: import("tailwind-variants").TVReturnType<{
|
|
39
39
|
[key: string]: {
|
|
40
|
-
[key: string]: import("tailwind-
|
|
41
|
-
base?: import("tailwind-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
41
|
+
base?: import("tailwind-variants").ClassValue;
|
|
42
|
+
icon?: import("tailwind-variants").ClassValue;
|
|
43
|
+
checkIcon?: import("tailwind-variants").ClassValue;
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
46
|
} | {
|
|
47
47
|
[x: string]: {
|
|
48
|
-
[x: string]: import("tailwind-
|
|
49
|
-
base?: import("tailwind-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
[x: string]: import("tailwind-variants").ClassValue | {
|
|
49
|
+
base?: import("tailwind-variants").ClassValue;
|
|
50
|
+
icon?: import("tailwind-variants").ClassValue;
|
|
51
|
+
checkIcon?: import("tailwind-variants").ClassValue;
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
54
|
} | {}, {
|
|
@@ -57,18 +57,18 @@ export declare const toggleGroupItem: import("tailwind-variants").TVReturnType<{
|
|
|
57
57
|
icon: string;
|
|
58
58
|
}, undefined, {
|
|
59
59
|
[key: string]: {
|
|
60
|
-
[key: string]: import("tailwind-
|
|
61
|
-
base?: import("tailwind-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
61
|
+
base?: import("tailwind-variants").ClassValue;
|
|
62
|
+
icon?: import("tailwind-variants").ClassValue;
|
|
63
|
+
checkIcon?: import("tailwind-variants").ClassValue;
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
66
|
} | {}, {
|
|
67
67
|
base: string;
|
|
68
68
|
checkIcon: string;
|
|
69
69
|
icon: string;
|
|
70
|
-
}, import("tailwind-variants").
|
|
70
|
+
}, import("tailwind-variants").TVReturnTypeLike<unknown, {
|
|
71
71
|
base: string;
|
|
72
72
|
checkIcon: string;
|
|
73
73
|
icon: string;
|
|
74
|
-
}
|
|
74
|
+
}>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IconProps } from '../../../utils/index.js';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
import type { ToggleGroupItemVariants, ToggleGroupVariants } from './theme.js';
|
|
4
|
-
/** @deprecated Use `
|
|
4
|
+
/** @deprecated Use `ConnectedButtonGroupProps` from `ConnectedButtonGroup` instead. */
|
|
5
5
|
export type ToggleGroupProps = ToggleGroupVariants & {
|
|
6
6
|
/** Whether only one item can be active at a time, or multiple. */
|
|
7
7
|
type: 'single' | 'multiple';
|
|
@@ -14,7 +14,7 @@ export type ToggleGroupProps = ToggleGroupVariants & {
|
|
|
14
14
|
children?: Snippet;
|
|
15
15
|
class?: string;
|
|
16
16
|
};
|
|
17
|
-
/** @deprecated Use `
|
|
17
|
+
/** @deprecated Use `ConnectedButtonGroupItemProps` from `ConnectedButtonGroupItem` instead. */
|
|
18
18
|
export type ToggleGroupItemProps = ToggleGroupItemVariants & {
|
|
19
19
|
/** The value this item represents. */
|
|
20
20
|
value: string;
|