@noxlovette/material 0.5.0 → 0.6.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/bin/material-claude-skill.js +31 -0
- package/claude-skill/material-design/SKILL.md +68 -0
- package/claude-skill/material-design/references/accessibility-checklist.md +29 -0
- package/claude-skill/material-design/references/component-patterns.md +55 -0
- package/claude-skill/material-design/references/motion-guide.md +163 -0
- package/claude-skill/material-design/references/tokens-and-styles.md +68 -0
- package/dist/animation/Shapes.stories.svelte +60 -0
- package/dist/animation/Shapes.stories.svelte.d.ts +3 -0
- package/dist/animation/TransitionPatterns.stories.svelte +32 -20
- package/dist/animation/containerTransform.d.ts +11 -0
- package/dist/animation/containerTransform.js +11 -0
- package/dist/animation/enterExit.d.ts +9 -0
- package/dist/animation/enterExit.js +6 -3
- package/dist/animation/index.d.ts +1 -0
- package/dist/animation/index.js +1 -0
- package/dist/animation/shapeMorph.svelte.d.ts +52 -0
- package/dist/animation/shapeMorph.svelte.js +112 -0
- package/dist/animation/shapesAnimatableSmall.d.ts +28 -22
- package/dist/animation/shapesAnimatableSmall.js +32 -23
- package/dist/animation/sharedAxisTransition.d.ts +22 -0
- package/dist/animation/sharedAxisTransition.js +25 -1
- package/dist/animation/skeleton.d.ts +6 -1
- package/dist/animation/skeleton.js +6 -1
- package/dist/components/badge/Badge.mdx +70 -0
- package/dist/components/badge/Badge.stories.svelte +38 -20
- package/dist/components/badge/Badge.svelte +12 -5
- package/dist/components/badge/theme.d.ts +30 -7
- package/dist/components/badge/theme.js +24 -4
- package/dist/components/badge/types.d.ts +18 -4
- package/dist/components/buttons/Button.mdx +85 -0
- package/dist/components/buttons/Button.stories.svelte +62 -27
- package/dist/components/buttons/Button.svelte +29 -25
- package/dist/components/buttons/Button.svelte.d.ts +11 -9
- package/dist/components/buttons/ButtonIcon.mdx +52 -0
- package/dist/components/buttons/ButtonIcon.stories.svelte +72 -48
- package/dist/components/buttons/ButtonIcon.svelte +58 -36
- package/dist/components/buttons/ButtonIcon.svelte.d.ts +9 -7
- package/dist/components/buttons/FAB.mdx +84 -0
- package/dist/components/buttons/FAB.stories.svelte +103 -24
- package/dist/components/buttons/FAB.stories.svelte.d.ts +2 -17
- package/dist/components/buttons/FAB.svelte +353 -29
- package/dist/components/buttons/FAB.svelte.d.ts +11 -6
- package/dist/components/buttons/FABMenu.svelte +27 -8
- package/dist/components/buttons/FABMenu.svelte.d.ts +7 -3
- package/dist/components/buttons/FABMenuItem.svelte +20 -16
- package/dist/components/buttons/FABMenuItem.svelte.d.ts +3 -3
- package/dist/components/buttons/Toggle.stories.svelte +31 -23
- package/dist/components/buttons/Toggle.stories.svelte.d.ts +2 -17
- package/dist/components/buttons/Toggle.svelte +28 -25
- package/dist/components/buttons/Toggle.svelte.d.ts +5 -5
- package/dist/components/buttons/button-group/ButtonGroup.mdx +39 -0
- package/dist/components/buttons/button-group/ButtonGroup.stories.svelte +62 -43
- package/dist/components/buttons/button-group/ButtonGroup.stories.svelte.d.ts +2 -17
- package/dist/components/buttons/button-group/ButtonGroup.svelte +102 -8
- package/dist/components/buttons/button-group/ButtonGroup.svelte.d.ts +6 -7
- package/dist/components/buttons/button-group/theme.d.ts +45 -15
- package/dist/components/buttons/button-group/theme.js +13 -8
- package/dist/components/buttons/button-group/types.d.ts +13 -7
- package/dist/components/buttons/connected/ConnectedButtonGroup.mdx +43 -0
- package/dist/components/buttons/connected/ConnectedButtonGroup.stories.svelte +56 -74
- package/dist/components/buttons/connected/ConnectedButtonGroup.stories.svelte.d.ts +2 -17
- package/dist/components/buttons/connected/ConnectedButtonGroup.svelte +16 -4
- package/dist/components/buttons/connected/ConnectedButtonGroup.svelte.d.ts +4 -4
- package/dist/components/buttons/connected/ConnectedButtonGroupItem.svelte +35 -8
- package/dist/components/buttons/connected/ConnectedButtonGroupItem.svelte.d.ts +2 -3
- package/dist/components/buttons/connected/theme.d.ts +33 -18
- package/dist/components/buttons/connected/theme.js +32 -9
- package/dist/components/buttons/connected/types.d.ts +36 -9
- package/dist/components/buttons/shapeMorph.d.ts +26 -0
- package/dist/components/buttons/shapeMorph.js +142 -0
- package/dist/components/buttons/split-button/SplitButton.mdx +48 -0
- package/dist/components/buttons/split-button/SplitButton.stories.svelte +9 -14
- package/dist/components/buttons/split-button/SplitButton.svelte +65 -48
- package/dist/components/buttons/split-button/SplitButton.svelte.d.ts +6 -11
- package/dist/components/buttons/split-button/theme.d.ts +110 -17
- package/dist/components/buttons/split-button/theme.js +74 -16
- package/dist/components/buttons/split-button/types.d.ts +24 -18
- package/dist/components/buttons/theme.d.ts +422 -230
- package/dist/components/buttons/theme.js +286 -380
- package/dist/components/buttons/types.d.ts +130 -125
- package/dist/components/cards/Card.mdx +44 -0
- package/dist/components/cards/Card.stories.svelte +11 -11
- package/dist/components/cards/theme.js +5 -5
- package/dist/components/chips/Chip.mdx +68 -0
- package/dist/components/chips/Chip.stories.svelte +4 -4
- package/dist/components/chips/theme.js +3 -3
- package/dist/components/containers/action-rail/ActionRail.stories.svelte +1 -0
- package/dist/components/containers/action-rail/theme.js +1 -1
- package/dist/components/containers/bottom-sheet/BottomSheet.mdx +64 -0
- package/dist/components/containers/bottom-sheet/BottomSheet.stories.svelte +108 -12
- package/dist/components/containers/bottom-sheet/BottomSheet.svelte +179 -109
- package/dist/components/containers/bottom-sheet/BottomSheet.svelte.d.ts +10 -5
- package/dist/components/containers/bottom-sheet/index.d.ts +1 -0
- package/dist/components/containers/bottom-sheet/index.js +1 -0
- package/dist/components/containers/bottom-sheet/theme.d.ts +45 -0
- package/dist/components/containers/bottom-sheet/theme.js +42 -0
- package/dist/components/containers/bottom-sheet/types.d.ts +37 -5
- package/dist/components/containers/carousel/Carousel.mdx +80 -0
- package/dist/components/containers/carousel/Carousel.stories.svelte +131 -0
- package/dist/components/containers/carousel/Carousel.stories.svelte.d.ts +4 -0
- package/dist/components/containers/carousel/Carousel.svelte +194 -0
- package/dist/components/containers/carousel/Carousel.svelte.d.ts +25 -0
- package/dist/components/containers/carousel/index.d.ts +3 -0
- package/dist/components/containers/{stack → carousel}/index.js +1 -2
- package/dist/components/containers/carousel/keylines.d.ts +32 -0
- package/dist/components/containers/carousel/keylines.js +88 -0
- package/dist/components/containers/carousel/theme.d.ts +162 -0
- package/dist/components/containers/carousel/theme.js +67 -0
- package/dist/components/containers/carousel/types.d.ts +52 -0
- package/dist/components/containers/context-menu/ContextMenu.stories.svelte +1 -0
- package/dist/components/containers/context-menu/ContextMenu.svelte +2 -2
- package/dist/components/containers/context-menu/ContextMenu.svelte.d.ts +1 -1
- package/dist/components/containers/context-menu/theme.js +10 -10
- package/dist/components/containers/dialogue/Dialogue.mdx +65 -0
- package/dist/components/containers/dialogue/Dialogue.stories.svelte +4 -4
- package/dist/components/containers/dialogue/Dialogue.svelte +1 -1
- package/dist/components/containers/dialogue/theme.js +3 -3
- package/dist/components/containers/divider/Divider.stories.svelte +2 -1
- package/dist/components/containers/divider/Divider.svelte +2 -2
- package/dist/components/containers/divider/theme.d.ts +6 -6
- package/dist/components/containers/divider/theme.js +2 -2
- package/dist/components/containers/index.d.ts +1 -1
- package/dist/components/containers/index.js +1 -1
- package/dist/components/containers/link-preview/theme.js +2 -2
- package/dist/components/containers/list/List.svelte +18 -0
- package/dist/components/containers/list/List.svelte.d.ts +4 -0
- package/dist/components/containers/list/ListItem.mdx +100 -0
- package/dist/components/containers/list/ListItem.stories.svelte +177 -42
- package/dist/components/containers/list/ListItem.stories.svelte.d.ts +2 -17
- package/dist/components/containers/list/ListItem.svelte +92 -37
- package/dist/components/containers/list/ListItem.svelte.d.ts +1 -1
- package/dist/components/containers/list/context.d.ts +6 -0
- package/dist/components/containers/list/context.js +4 -0
- package/dist/components/containers/list/index.d.ts +1 -0
- package/dist/components/containers/list/index.js +1 -0
- package/dist/components/containers/list/theme.d.ts +487 -12
- package/dist/components/containers/list/theme.js +140 -13
- package/dist/components/containers/list/types.d.ts +39 -5
- package/dist/components/containers/menu/Menu.mdx +52 -0
- package/dist/components/containers/menu/Menu.stories.svelte +14 -14
- package/dist/components/containers/menu/Menu.svelte +1 -1
- package/dist/components/containers/menu/MenuGroup.svelte +1 -1
- package/dist/components/containers/menu/MenuGroup.svelte.d.ts +1 -1
- package/dist/components/containers/menu/menu-item/MenuItem.svelte +1 -1
- package/dist/components/containers/menu/theme.js +8 -8
- package/dist/components/containers/pane/DraggablePane.stories.svelte +4 -3
- package/dist/components/containers/pane/DraggablePane.svelte +2 -2
- package/dist/components/containers/pane/Pane.stories.svelte +11 -10
- package/dist/components/containers/pane/Pane.svelte +24 -2
- package/dist/components/containers/pane/PaneGrid.stories.svelte +19 -18
- package/dist/components/containers/pane/PaneGrid.svelte +3 -2
- package/dist/components/containers/pane/PaneGrid.svelte.d.ts +2 -1
- package/dist/components/containers/pane/PaneHandle.svelte +48 -2
- package/dist/components/containers/pane/PaneHandle.svelte.d.ts +4 -0
- package/dist/components/containers/pane/resizeStore.svelte.d.ts +10 -1
- package/dist/components/containers/pane/resizeStore.svelte.js +13 -2
- package/dist/components/containers/pane/theme.js +129 -45
- package/dist/components/containers/pane/types.d.ts +3 -2
- package/dist/components/containers/popover/Popover.mdx +45 -0
- package/dist/components/containers/popover/Popover.stories.svelte +1 -1
- package/dist/components/containers/popover/Popover.svelte +1 -1
- package/dist/components/containers/popover/theme.js +3 -3
- package/dist/components/containers/scroll-area/theme.js +2 -2
- package/dist/components/containers/side-sheet/SideSheet.mdx +71 -0
- package/dist/components/containers/side-sheet/SideSheet.stories.svelte +113 -17
- package/dist/components/containers/side-sheet/SideSheet.svelte +113 -66
- package/dist/components/containers/side-sheet/SideSheet.svelte.d.ts +8 -7
- package/dist/components/containers/side-sheet/index.d.ts +1 -0
- package/dist/components/containers/side-sheet/index.js +1 -0
- package/dist/components/containers/side-sheet/theme.d.ts +108 -0
- package/dist/components/containers/side-sheet/theme.js +72 -0
- package/dist/components/containers/side-sheet/types.d.ts +35 -7
- package/dist/components/date/DateField.stories.svelte +4 -3
- package/dist/components/date/DateField.svelte +49 -26
- package/dist/components/date/DateField.svelte.d.ts +2 -0
- package/dist/components/date/DateRangeField.stories.svelte +4 -3
- package/dist/components/date/DateRangeField.svelte +54 -31
- package/dist/components/date/DateRangeField.svelte.d.ts +2 -0
- package/dist/components/date/calendarMotion.d.ts +9 -0
- package/dist/components/date/calendarMotion.js +23 -0
- package/dist/components/date/theme.d.ts +7 -7
- package/dist/components/date/theme.js +34 -30
- package/dist/components/forms/checkbox/Checkbox.mdx +35 -0
- package/dist/components/forms/checkbox/Checkbox.stories.svelte +2 -2
- package/dist/components/forms/checkbox/Checkbox.svelte +1 -1
- package/dist/components/forms/checkbox/theme.js +3 -3
- package/dist/components/forms/command/Command.stories.svelte +1 -0
- package/dist/components/forms/command/theme.js +9 -9
- package/dist/components/forms/pin/theme.js +4 -4
- package/dist/components/forms/radio-group/RadioGroup.svelte +1 -1
- package/dist/components/forms/radio-group/theme.js +5 -5
- package/dist/components/forms/search/Search.mdx +38 -0
- package/dist/components/forms/search/Search.stories.svelte +19 -9
- package/dist/components/forms/search/Search.svelte +40 -17
- package/dist/components/forms/search/Search.svelte.d.ts +2 -2
- package/dist/components/forms/search/theme.d.ts +45 -12
- package/dist/components/forms/search/theme.js +13 -8
- package/dist/components/forms/search/types.d.ts +18 -12
- package/dist/components/forms/select/Select.mdx +53 -0
- package/dist/components/forms/select/Select.stories.svelte +4 -4
- package/dist/components/forms/select/Select.svelte +10 -2
- package/dist/components/forms/select/SelectItem.svelte +1 -1
- package/dist/components/forms/select/theme.js +12 -12
- package/dist/components/forms/slider/Slider.mdx +85 -0
- package/dist/components/forms/slider/Slider.stories.svelte +7 -7
- package/dist/components/forms/slider/Slider.svelte +46 -28
- package/dist/components/forms/slider/theme.d.ts +14 -0
- package/dist/components/forms/slider/theme.js +28 -17
- package/dist/components/forms/slider/types.d.ts +3 -2
- package/dist/components/forms/switch/Switch.mdx +38 -0
- package/dist/components/forms/switch/Switch.stories.svelte +3 -3
- package/dist/components/forms/switch/theme.js +6 -6
- package/dist/components/forms/textfield/Textfield.mdx +53 -0
- package/dist/components/forms/textfield/Textfield.stories.svelte +6 -6
- package/dist/components/forms/textfield/Textfield.svelte +1 -0
- package/dist/components/forms/textfield/theme.d.ts +3 -0
- package/dist/components/forms/textfield/theme.js +22 -19
- package/dist/components/forms/toggle-group/theme.js +2 -2
- package/dist/components/forms/tooltip/Tooltip.stories.svelte +1 -0
- package/dist/components/forms/tooltip/theme.js +3 -3
- package/dist/components/misc/Avatar.stories.svelte +5 -4
- package/dist/components/misc/ThemeSettings.svelte +9 -9
- package/dist/components/misc/ThemeSwitcher.svelte +3 -3
- package/dist/components/misc/theme.js +4 -4
- package/dist/components/nav/appbar/AppBar.mdx +71 -0
- package/dist/components/nav/appbar/AppBar.stories.svelte +93 -3
- package/dist/components/nav/appbar/AppBar.stories.svelte.d.ts +2 -17
- package/dist/components/nav/appbar/AppBar.svelte +90 -37
- package/dist/components/nav/appbar/AppBar.svelte.d.ts +9 -2
- package/dist/components/nav/appbar/theme.d.ts +85 -18
- package/dist/components/nav/appbar/theme.js +159 -23
- package/dist/components/nav/appbar/types.d.ts +46 -9
- package/dist/components/nav/breadcrumb/Breadcrumb.stories.svelte +1 -0
- package/dist/components/nav/breadcrumb/theme.js +5 -5
- package/dist/components/nav/navbar/Navbar.mdx +38 -0
- package/dist/components/nav/navbar/Navbar.svelte +1 -1
- package/dist/components/nav/navbar/NavbarItem.svelte +12 -9
- package/dist/components/nav/navbar/theme.js +6 -6
- package/dist/components/nav/rail/Rail.mdx +73 -0
- package/dist/components/nav/rail/Rail.stories.svelte +3 -7
- package/dist/components/nav/rail/Rail.svelte +1 -0
- package/dist/components/nav/rail/RailItem.svelte +12 -9
- package/dist/components/nav/rail/theme.js +13 -13
- package/dist/components/nav/rail/types.d.ts +4 -1
- package/dist/components/nav/tabs/TabHolder.svelte +29 -3
- package/dist/components/nav/tabs/TabHolder.svelte.d.ts +3 -1
- package/dist/components/nav/tabs/Tabs.mdx +62 -0
- package/dist/components/nav/tabs/Tabs.stories.svelte +1 -1
- package/dist/components/nav/tabs/theme.js +4 -4
- package/dist/components/pill/Pill.mdx +32 -0
- package/dist/components/pill/Pill.stories.svelte +1 -1
- package/dist/components/pill/theme.d.ts +1 -1
- package/dist/components/pill/theme.js +1 -1
- package/dist/components/progress/LinearProgress.svelte +1 -1
- package/dist/components/progress/Progress.mdx +50 -0
- package/dist/components/progress/Progress.stories.svelte +6 -6
- package/dist/components/snackbar/Snackbar.mdx +52 -0
- package/dist/components/snackbar/Snackbar.stories.svelte +5 -5
- package/dist/components/snackbar/Snackbar.svelte +1 -1
- package/dist/components/snackbar/theme.d.ts +3 -3
- package/dist/components/snackbar/theme.js +4 -4
- package/dist/components/table/Table.stories.svelte +1 -0
- package/dist/components/table/TableHeader.svelte +1 -1
- package/dist/components/table/theme.js +3 -3
- package/dist/components/time/TimeField.stories.svelte +3 -2
- package/dist/components/time/TimeField.svelte +14 -8
- package/dist/components/time/TimeField.svelte.d.ts +6 -0
- package/dist/components/time/TimepickerInput.svelte +9 -5
- package/dist/components/time/theme.js +5 -5
- package/dist/components/time/types.d.ts +11 -1
- package/dist/components/toolbar/Toolbar.stories.svelte +1 -0
- package/dist/components/toolbar/Toolbar.svelte +1 -1
- package/dist/components/toolbar/Toolbar.svelte.d.ts +1 -1
- package/dist/components/toolbar/theme.js +14 -14
- package/dist/components/typography/Typography.mdx +67 -0
- package/dist/components/typography/body/Body.stories.svelte +2 -1
- package/dist/components/typography/body/theme.d.ts +15 -12
- package/dist/components/typography/body/theme.js +19 -4
- package/dist/components/typography/body/types.d.ts +2 -1
- package/dist/components/typography/display/Display.stories.svelte +2 -1
- package/dist/components/typography/display/theme.d.ts +15 -12
- package/dist/components/typography/display/theme.js +19 -4
- package/dist/components/typography/display/types.d.ts +2 -1
- package/dist/components/typography/headline/Headline.stories.svelte +2 -1
- package/dist/components/typography/headline/theme.d.ts +15 -12
- package/dist/components/typography/headline/theme.js +19 -4
- package/dist/components/typography/headline/types.d.ts +2 -1
- package/dist/components/typography/kbd/Kbd.stories.svelte +2 -1
- package/dist/components/typography/kbd/theme.d.ts +4 -4
- package/dist/components/typography/kbd/theme.js +2 -2
- package/dist/components/typography/label/Label.stories.svelte +2 -1
- package/dist/components/typography/label/theme.d.ts +15 -12
- package/dist/components/typography/label/theme.js +19 -4
- package/dist/components/typography/label/types.d.ts +2 -1
- package/dist/components/typography/title/Title.stories.svelte +2 -1
- package/dist/components/typography/title/theme.d.ts +15 -12
- package/dist/components/typography/title/theme.js +19 -4
- package/dist/components/typography/title/types.d.ts +2 -1
- package/dist/index.css +1 -0
- package/dist/styles/component.css +78 -175
- package/dist/styles/elevation.css +9 -0
- package/dist/styles/spacing.css +29 -0
- package/dist/styles/typescale.css +635 -20
- package/dist/utils/Layer.svelte +1 -1
- package/dist/utils/icon/Icon.svelte +8 -6
- package/dist/utils/icon/loadingShapes.js +11 -10
- package/package.json +19 -15
- package/dist/components/containers/stack/HStack.svelte +0 -23
- package/dist/components/containers/stack/HStack.svelte.d.ts +0 -5
- package/dist/components/containers/stack/VStack.svelte +0 -23
- package/dist/components/containers/stack/VStack.svelte.d.ts +0 -5
- package/dist/components/containers/stack/index.d.ts +0 -4
- package/dist/components/containers/stack/theme.d.ts +0 -66
- package/dist/components/containers/stack/theme.js +0 -26
- package/dist/components/containers/stack/types.d.ts +0 -12
- /package/dist/components/containers/{stack → carousel}/types.js +0 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
+
export type CarouselVariants = VariantProps<typeof carousel>;
|
|
3
|
+
export declare const carousel: import("tailwind-variants").TVReturnType<{
|
|
4
|
+
layout: {
|
|
5
|
+
multiBrowse: {};
|
|
6
|
+
hero: {};
|
|
7
|
+
centeredHero: {};
|
|
8
|
+
uncontained: {
|
|
9
|
+
scroller: string;
|
|
10
|
+
};
|
|
11
|
+
fullScreen: {
|
|
12
|
+
scroller: string;
|
|
13
|
+
item: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
keyline: {
|
|
17
|
+
true: {
|
|
18
|
+
scroller: string;
|
|
19
|
+
item: string;
|
|
20
|
+
content: string;
|
|
21
|
+
};
|
|
22
|
+
false: {};
|
|
23
|
+
};
|
|
24
|
+
snap: {
|
|
25
|
+
true: {
|
|
26
|
+
scroller: string;
|
|
27
|
+
};
|
|
28
|
+
false: {};
|
|
29
|
+
};
|
|
30
|
+
outlined: {
|
|
31
|
+
true: {
|
|
32
|
+
item: string;
|
|
33
|
+
};
|
|
34
|
+
false: {};
|
|
35
|
+
};
|
|
36
|
+
interactive: {
|
|
37
|
+
true: {
|
|
38
|
+
item: string;
|
|
39
|
+
};
|
|
40
|
+
false: {};
|
|
41
|
+
};
|
|
42
|
+
disabled: {
|
|
43
|
+
true: {
|
|
44
|
+
item: string;
|
|
45
|
+
};
|
|
46
|
+
false: {};
|
|
47
|
+
};
|
|
48
|
+
}, {
|
|
49
|
+
base: string;
|
|
50
|
+
scroller: string;
|
|
51
|
+
track: string;
|
|
52
|
+
snapPoint: string;
|
|
53
|
+
viewport: string;
|
|
54
|
+
item: string[];
|
|
55
|
+
content: string;
|
|
56
|
+
}, undefined, {
|
|
57
|
+
layout: {
|
|
58
|
+
multiBrowse: {};
|
|
59
|
+
hero: {};
|
|
60
|
+
centeredHero: {};
|
|
61
|
+
uncontained: {
|
|
62
|
+
scroller: string;
|
|
63
|
+
};
|
|
64
|
+
fullScreen: {
|
|
65
|
+
scroller: string;
|
|
66
|
+
item: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
keyline: {
|
|
70
|
+
true: {
|
|
71
|
+
scroller: string;
|
|
72
|
+
item: string;
|
|
73
|
+
content: string;
|
|
74
|
+
};
|
|
75
|
+
false: {};
|
|
76
|
+
};
|
|
77
|
+
snap: {
|
|
78
|
+
true: {
|
|
79
|
+
scroller: string;
|
|
80
|
+
};
|
|
81
|
+
false: {};
|
|
82
|
+
};
|
|
83
|
+
outlined: {
|
|
84
|
+
true: {
|
|
85
|
+
item: string;
|
|
86
|
+
};
|
|
87
|
+
false: {};
|
|
88
|
+
};
|
|
89
|
+
interactive: {
|
|
90
|
+
true: {
|
|
91
|
+
item: string;
|
|
92
|
+
};
|
|
93
|
+
false: {};
|
|
94
|
+
};
|
|
95
|
+
disabled: {
|
|
96
|
+
true: {
|
|
97
|
+
item: string;
|
|
98
|
+
};
|
|
99
|
+
false: {};
|
|
100
|
+
};
|
|
101
|
+
}, {
|
|
102
|
+
base: string;
|
|
103
|
+
scroller: string;
|
|
104
|
+
track: string;
|
|
105
|
+
snapPoint: string;
|
|
106
|
+
viewport: string;
|
|
107
|
+
item: string[];
|
|
108
|
+
content: string;
|
|
109
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
110
|
+
layout: {
|
|
111
|
+
multiBrowse: {};
|
|
112
|
+
hero: {};
|
|
113
|
+
centeredHero: {};
|
|
114
|
+
uncontained: {
|
|
115
|
+
scroller: string;
|
|
116
|
+
};
|
|
117
|
+
fullScreen: {
|
|
118
|
+
scroller: string;
|
|
119
|
+
item: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
keyline: {
|
|
123
|
+
true: {
|
|
124
|
+
scroller: string;
|
|
125
|
+
item: string;
|
|
126
|
+
content: string;
|
|
127
|
+
};
|
|
128
|
+
false: {};
|
|
129
|
+
};
|
|
130
|
+
snap: {
|
|
131
|
+
true: {
|
|
132
|
+
scroller: string;
|
|
133
|
+
};
|
|
134
|
+
false: {};
|
|
135
|
+
};
|
|
136
|
+
outlined: {
|
|
137
|
+
true: {
|
|
138
|
+
item: string;
|
|
139
|
+
};
|
|
140
|
+
false: {};
|
|
141
|
+
};
|
|
142
|
+
interactive: {
|
|
143
|
+
true: {
|
|
144
|
+
item: string;
|
|
145
|
+
};
|
|
146
|
+
false: {};
|
|
147
|
+
};
|
|
148
|
+
disabled: {
|
|
149
|
+
true: {
|
|
150
|
+
item: string;
|
|
151
|
+
};
|
|
152
|
+
false: {};
|
|
153
|
+
};
|
|
154
|
+
}, {
|
|
155
|
+
base: string;
|
|
156
|
+
scroller: string;
|
|
157
|
+
track: string;
|
|
158
|
+
snapPoint: string;
|
|
159
|
+
viewport: string;
|
|
160
|
+
item: string[];
|
|
161
|
+
content: string;
|
|
162
|
+
}>>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { tv } from 'tailwind-variants';
|
|
2
|
+
/*
|
|
3
|
+
M3 carousel (https://m3.material.io/components/carousel/specs): 28dp items on `surface`, 8dp
|
|
4
|
+
apart. Multi-browse and hero layouts pad 16dp on both sides and 8dp top/bottom; uncontained
|
|
5
|
+
pads only the leading edge and lets items bleed off the trailing one; full-screen is edge to
|
|
6
|
+
edge, 16dp between items, scrolling vertically.
|
|
7
|
+
*/
|
|
8
|
+
export const carousel = tv({
|
|
9
|
+
slots: {
|
|
10
|
+
base: 'relative h-56 w-full',
|
|
11
|
+
scroller: 'h-full w-full overscroll-x-contain [scrollbar-width:none] [&::-webkit-scrollbar]:hidden focus-visible:outline-3 focus-visible:-outline-offset-3 focus-visible:outline-md-sys-color-secondary',
|
|
12
|
+
track: 'relative h-full',
|
|
13
|
+
snapPoint: 'pointer-events-none absolute top-spacing-0 h-px w-px snap-start',
|
|
14
|
+
viewport: 'sticky left-spacing-0 h-full overflow-clip',
|
|
15
|
+
item: [
|
|
16
|
+
'text-md-sys-color-on-surface bg-md-sys-color-surface relative block shrink-0 overflow-hidden rounded-[28px] text-start',
|
|
17
|
+
'md-sys-state-focus-indicator transition-shadow md-sys-motion-effects'
|
|
18
|
+
],
|
|
19
|
+
content: 'h-full'
|
|
20
|
+
},
|
|
21
|
+
variants: {
|
|
22
|
+
layout: {
|
|
23
|
+
multiBrowse: {},
|
|
24
|
+
hero: {},
|
|
25
|
+
centeredHero: {},
|
|
26
|
+
uncontained: {
|
|
27
|
+
scroller: 'flex gap-spacing-100 overflow-x-auto overflow-y-clip ps-spacing-200 pe-spacing-200 pt-spacing-100 pb-spacing-100 [scroll-padding-inline:1rem]'
|
|
28
|
+
},
|
|
29
|
+
fullScreen: {
|
|
30
|
+
scroller: 'flex snap-y snap-mandatory flex-col gap-spacing-200 overflow-y-auto',
|
|
31
|
+
item: 'h-full w-full snap-start [scroll-snap-stop:always]'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
// Multi-browse and hero layouts: items are positioned by `place()`, content keeps the large
|
|
35
|
+
// width and stays centred inside its masked item, which gives the parallax as items resize.
|
|
36
|
+
keyline: {
|
|
37
|
+
true: {
|
|
38
|
+
scroller: 'overflow-x-auto overflow-y-clip',
|
|
39
|
+
item: 'absolute top-spacing-100 bottom-spacing-100 left-spacing-200 will-change-transform',
|
|
40
|
+
content: 'absolute inset-y-spacing-0 left-1/2 -translate-x-1/2'
|
|
41
|
+
},
|
|
42
|
+
false: {}
|
|
43
|
+
},
|
|
44
|
+
snap: { true: { scroller: 'snap-x snap-mandatory' }, false: {} },
|
|
45
|
+
outlined: { true: { item: 'border border-md-sys-color-outline' }, false: {} },
|
|
46
|
+
interactive: {
|
|
47
|
+
true: { item: 'cursor-pointer hover:shadow-elevation-1 active:shadow-elevation-0' },
|
|
48
|
+
false: {}
|
|
49
|
+
},
|
|
50
|
+
disabled: {
|
|
51
|
+
true: { item: 'pointer-events-none opacity-38' },
|
|
52
|
+
false: {}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
compoundVariants: [
|
|
56
|
+
{ layout: 'uncontained', class: { item: 'h-full snap-start' } },
|
|
57
|
+
{ outlined: true, disabled: true, class: { item: 'border-md-sys-color-outline/12' } }
|
|
58
|
+
],
|
|
59
|
+
defaultVariants: {
|
|
60
|
+
layout: 'multiBrowse',
|
|
61
|
+
keyline: true,
|
|
62
|
+
snap: true,
|
|
63
|
+
outlined: false,
|
|
64
|
+
interactive: false,
|
|
65
|
+
disabled: false
|
|
66
|
+
}
|
|
67
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
/**
|
|
4
|
+
* - `multiBrowse`: at least one large, one medium and one small item; items resize as they scroll.
|
|
5
|
+
* - `hero`: one large item and one small item.
|
|
6
|
+
* - `centeredHero`: one large item centred between two small ones.
|
|
7
|
+
* - `uncontained`: fixed-width items that scroll off the trailing edge. With per-item widths
|
|
8
|
+
* (`itemWidth` as a function) this is the uncontained multi-aspect-ratio layout.
|
|
9
|
+
* - `fullScreen`: one edge-to-edge item at a time, scrolling vertically.
|
|
10
|
+
*/
|
|
11
|
+
export type CarouselLayout = 'multiBrowse' | 'hero' | 'centeredHero' | 'uncontained' | 'fullScreen';
|
|
12
|
+
/** What the `item` snippet receives besides the item itself. */
|
|
13
|
+
export type CarouselItemState = {
|
|
14
|
+
index: number;
|
|
15
|
+
/**
|
|
16
|
+
* How large the item currently is, from 0 (small) to 1 (large). Fade labels and other
|
|
17
|
+
* secondary content with it: they belong on large items only.
|
|
18
|
+
*/
|
|
19
|
+
progress: number;
|
|
20
|
+
};
|
|
21
|
+
export type CarouselProps<T> = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
22
|
+
/** The items to show. */
|
|
23
|
+
items: T[];
|
|
24
|
+
/** Renders one item's content. It fills the item; use `object-cover` media. */
|
|
25
|
+
item: Snippet<[T, CarouselItemState]>;
|
|
26
|
+
/** Accessible name of the carousel, e.g. "Featured albums". */
|
|
27
|
+
label: string;
|
|
28
|
+
/** @default 'multiBrowse' */
|
|
29
|
+
layout?: CarouselLayout;
|
|
30
|
+
/**
|
|
31
|
+
* Item width in px. Multi-browse: the preferred large width, which the carousel adjusts to fit
|
|
32
|
+
* whole items. Uncontained: every item's width, or one per item for mixed aspect ratios.
|
|
33
|
+
* Ignored by the hero and full-screen layouts.
|
|
34
|
+
* @default 186 (multi-browse), 240 (uncontained)
|
|
35
|
+
*/
|
|
36
|
+
itemWidth?: number | ((item: T, index: number) => number);
|
|
37
|
+
/**
|
|
38
|
+
* Whether scrolling comes to rest on an item. Defaults to on for every layout except
|
|
39
|
+
* uncontained, which scrolls freely.
|
|
40
|
+
*/
|
|
41
|
+
snap?: boolean;
|
|
42
|
+
/** Draws the 1dp outline around items. */
|
|
43
|
+
outlined?: boolean;
|
|
44
|
+
/** Makes each item a button. A tapped item typically opens its detail (container transform). */
|
|
45
|
+
onitemclick?: (item: T, index: number) => void;
|
|
46
|
+
/** Makes each item a link. */
|
|
47
|
+
itemHref?: (item: T, index: number) => string;
|
|
48
|
+
/** Accessible name of each item; defaults to "n of total". */
|
|
49
|
+
itemLabel?: (item: T, index: number) => string;
|
|
50
|
+
/** Disables an item: 38% opacity, not interactive. */
|
|
51
|
+
itemDisabled?: (item: T, index: number) => boolean;
|
|
52
|
+
};
|
|
@@ -12,7 +12,7 @@ Context menus appear on right-click and provide actions related to the clicked e
|
|
|
12
12
|
]}
|
|
13
13
|
onselect={(value) => console.log(value)}
|
|
14
14
|
>
|
|
15
|
-
<div class="p-
|
|
15
|
+
<div class="p-spacing-500 bg-surface">Right click me</div>
|
|
16
16
|
</ContextMenu>
|
|
17
17
|
```
|
|
18
18
|
|
|
@@ -54,7 +54,7 @@ you need it (e.g. a table row):
|
|
|
54
54
|
|
|
55
55
|
{#snippet MenuItem(item: ContextMenuDataItem)}
|
|
56
56
|
{#if item.separator}
|
|
57
|
-
<Divider class="my-
|
|
57
|
+
<Divider class="my-spacing-50" />
|
|
58
58
|
{:else if item.items && item.items.length > 0}
|
|
59
59
|
<BitsContextMenu.Sub>
|
|
60
60
|
<BitsContextMenu.SubTrigger
|
|
@@ -12,7 +12,7 @@ import type { ContextMenuProps } from './types.js';
|
|
|
12
12
|
* ]}
|
|
13
13
|
* onselect={(value) => console.log(value)}
|
|
14
14
|
* >
|
|
15
|
-
* <div class="p-
|
|
15
|
+
* <div class="p-spacing-500 bg-surface">Right click me</div>
|
|
16
16
|
* </ContextMenu>
|
|
17
17
|
* ```
|
|
18
18
|
*
|
|
@@ -2,31 +2,31 @@ import { tv } from 'tailwind-variants';
|
|
|
2
2
|
export const contextMenu = tv({
|
|
3
3
|
slots: {
|
|
4
4
|
content: `
|
|
5
|
-
z-[100] min-w-48 max-w-sm gap-
|
|
6
|
-
bg-md-sys-color-surface-container-high px-
|
|
5
|
+
z-[100] min-w-48 max-w-sm gap-spacing-50 overflow-y-auto rounded-lg
|
|
6
|
+
bg-md-sys-color-surface-container-high px-spacing-100 py-spacing-50
|
|
7
7
|
shadow-elevation-3 ring-md-sys-color-outline/10
|
|
8
8
|
`,
|
|
9
9
|
item: `
|
|
10
|
-
rounded-sm relative flex w-full cursor-pointer select-none items-center gap-
|
|
11
|
-
px-
|
|
10
|
+
rounded-sm relative flex w-full cursor-pointer select-none items-center gap-spacing-100
|
|
11
|
+
px-spacing-150 py-spacing-100 text-left md-sys-typescale-body-large text-md-sys-color-on-surface
|
|
12
12
|
outline-none transition-colors md-sys-motion-fast-effects
|
|
13
13
|
hover:bg-md-sys-color-on-surface/8 data-[highlighted]:bg-md-sys-color-on-surface/8
|
|
14
14
|
data-[disabled]:cursor-not-allowed data-[disabled]:opacity-38
|
|
15
15
|
`,
|
|
16
16
|
subTrigger: `
|
|
17
|
-
rounded-sm relative flex w-full cursor-pointer select-none items-center gap-
|
|
18
|
-
px-
|
|
17
|
+
rounded-sm relative flex w-full cursor-pointer select-none items-center gap-spacing-100
|
|
18
|
+
px-spacing-150 py-spacing-100 text-left md-sys-typescale-body-large text-md-sys-color-on-surface
|
|
19
19
|
outline-none transition-colors md-sys-motion-fast-effects
|
|
20
20
|
hover:bg-md-sys-color-on-surface/8 data-[state=open]:bg-md-sys-color-on-surface/8
|
|
21
21
|
data-[highlighted]:bg-md-sys-color-on-surface/8
|
|
22
22
|
data-[disabled]:cursor-not-allowed data-[disabled]:opacity-38
|
|
23
23
|
`,
|
|
24
|
-
itemContent: 'flex flex-1 flex-col gap-
|
|
24
|
+
itemContent: 'flex flex-1 flex-col gap-spacing-25 min-w-spacing-0',
|
|
25
25
|
label: 'md-sys-typescale-body-large text-md-sys-color-on-surface',
|
|
26
26
|
helper: 'md-sys-typescale-body-medium text-md-sys-color-on-surface-variant',
|
|
27
|
-
icon: 'size-
|
|
28
|
-
separator: 'my-
|
|
29
|
-
rightSlot: 'ml-auto size-
|
|
27
|
+
icon: 'size-spacing-250 text-[20px] text-md-sys-color-on-surface-variant shrink-0',
|
|
28
|
+
separator: 'my-spacing-50 h-px bg-md-sys-color-outline-variant',
|
|
29
|
+
rightSlot: 'ml-auto size-spacing-250 text-[20px] shrink-0 text-md-sys-color-on-surface-variant'
|
|
30
30
|
},
|
|
31
31
|
variants: {
|
|
32
32
|
selected: {
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Meta, Title, Subtitle, Canvas, Controls } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as DialogueStories from './Dialogue.stories.svelte';
|
|
3
|
+
|
|
4
|
+
<Meta of={DialogueStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
|
|
8
|
+
<Subtitle>
|
|
9
|
+
Dialogs give important information or ask for a decision, and block the app until the user
|
|
10
|
+
responds.
|
|
11
|
+
</Subtitle>
|
|
12
|
+
|
|
13
|
+
[M3 spec](https://m3.material.io/components/dialogs/specs) ·
|
|
14
|
+
`import { Dialogue } from '@noxlovette/material';`
|
|
15
|
+
|
|
16
|
+
<Canvas of={DialogueStories.Playground} />
|
|
17
|
+
|
|
18
|
+
<Controls of={DialogueStories.Playground} />
|
|
19
|
+
|
|
20
|
+
## It's `Dialogue`, not `Dialog`
|
|
21
|
+
|
|
22
|
+
The export uses the British spelling. `import { Dialog } from '@noxlovette/material'` fails;
|
|
23
|
+
`Dialog` is bits-ui's headless primitive, which `Dialogue` wraps.
|
|
24
|
+
|
|
25
|
+
## The confirm button submits a form
|
|
26
|
+
|
|
27
|
+
`enhance` and `confirmText` are required. The confirm button is a real submit button in a form
|
|
28
|
+
that posts to `confirmAction`, so the action runs through SvelteKit (or Superforms) rather than a
|
|
29
|
+
click handler. Any other bits-ui `Dialog.Root` props are passed through to the root.
|
|
30
|
+
|
|
31
|
+
```svelte
|
|
32
|
+
<script lang="ts">
|
|
33
|
+
import { Dialogue } from '@noxlovette/material';
|
|
34
|
+
import { enhance } from '$app/forms';
|
|
35
|
+
|
|
36
|
+
let open = $state(false);
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<Dialogue
|
|
40
|
+
bind:open
|
|
41
|
+
{enhance}
|
|
42
|
+
headline="Delete this file?"
|
|
43
|
+
supportingText="This action cannot be undone."
|
|
44
|
+
confirmText="Delete"
|
|
45
|
+
cancelText="Cancel"
|
|
46
|
+
confirmAction="?/deleteFile"
|
|
47
|
+
/>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
By default the confirm button also closes the dialog. To keep it open until the server
|
|
51
|
+
responds, for example on a validation error, set `delegateClose` and close it yourself. `loading`
|
|
52
|
+
shows progress on the confirm button meanwhile.
|
|
53
|
+
|
|
54
|
+
<Canvas of={DialogueStories.LoadingConfirm} />
|
|
55
|
+
|
|
56
|
+
`children` renders between the supporting text and the buttons:
|
|
57
|
+
|
|
58
|
+
<Canvas of={DialogueStories.WithExtraContent} />
|
|
59
|
+
|
|
60
|
+
## Accessibility
|
|
61
|
+
|
|
62
|
+
- **Focus.** Focus is trapped inside while open and goes back to the trigger on close.
|
|
63
|
+
- **Labelling.** `headline` and `supportingText` become the dialog's accessible name and
|
|
64
|
+
description.
|
|
65
|
+
- **Escape** closes the dialog.
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
</script>
|
|
39
39
|
|
|
40
40
|
<Story name="Playground" asChild>
|
|
41
|
-
<div class="p-
|
|
41
|
+
<div class="p-spacing-300">
|
|
42
42
|
<Button onclick={() => (playgroundOpen = true)}>Open dialog</Button>
|
|
43
43
|
<Dialogue
|
|
44
44
|
bind:open={playgroundOpen}
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
</Story>
|
|
53
53
|
|
|
54
54
|
<Story name="With Extra Content" asChild>
|
|
55
|
-
<div class="p-
|
|
55
|
+
<div class="p-spacing-300">
|
|
56
56
|
<Button onclick={() => (extraContentOpen = true)}>Open dialog with content</Button>
|
|
57
57
|
<Dialogue
|
|
58
58
|
bind:open={extraContentOpen}
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
<input
|
|
65
65
|
type="text"
|
|
66
66
|
value="Untitled project"
|
|
67
|
-
class="border-md-sys-color-outline-variant bg-md-sys-color-surface w-full rounded-lg border
|
|
67
|
+
class="border-md-sys-color-outline-variant bg-md-sys-color-surface px-spacing-150 py-spacing-100 w-full rounded-lg border"
|
|
68
68
|
/>
|
|
69
69
|
</Dialogue>
|
|
70
70
|
</div>
|
|
71
71
|
</Story>
|
|
72
72
|
|
|
73
73
|
<Story name="Loading Confirm" asChild>
|
|
74
|
-
<div class="p-
|
|
74
|
+
<div class="p-spacing-300">
|
|
75
75
|
<Button onclick={() => (loadingOpen = true)}>Open dialog</Button>
|
|
76
76
|
<Dialogue
|
|
77
77
|
bind:open={loadingOpen}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { tv } from 'tailwind-variants';
|
|
2
2
|
export const dialogue = tv({
|
|
3
3
|
slots: {
|
|
4
|
-
base: 'fixed inset-0 z-40 bg-md-sys-color-scrim/32',
|
|
5
|
-
inner: 'fixed inset-0 z-50 m-auto h-max w-full outline-none bg-md-sys-color-surface-container-high shadow-elevation-3 flex flex-col rounded-[28px] p-
|
|
4
|
+
base: 'fixed inset-spacing-0 z-40 bg-md-sys-color-scrim/32',
|
|
5
|
+
inner: 'fixed inset-spacing-0 z-50 m-auto h-max w-full outline-none bg-md-sys-color-surface-container-high shadow-elevation-3 flex flex-col rounded-[28px] p-spacing-300 gap-spacing-200',
|
|
6
6
|
headlineContainer: 'md-sys-typescale-headline-small text-md-sys-color-on-surface',
|
|
7
7
|
supportingTextContainer: 'md-sys-typescale-body-medium text-md-sys-color-on-surface-variant',
|
|
8
|
-
buttonContainer: 'mt-
|
|
8
|
+
buttonContainer: 'mt-spacing-100 flex items-center justify-end gap-spacing-100'
|
|
9
9
|
}
|
|
10
10
|
});
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
const { Story } = defineMeta({
|
|
7
7
|
title: 'Containers/Divider',
|
|
8
|
+
tags: ['autodocs'],
|
|
8
9
|
component: Divider,
|
|
9
10
|
argTypes: {
|
|
10
11
|
variant: { control: 'select', options: ['full', 'inset', 'wavy'] },
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
</Story>
|
|
55
56
|
|
|
56
57
|
<Story name="Vertical" asChild>
|
|
57
|
-
<div class="flex h-24 items-center
|
|
58
|
+
<div class="gap-spacing-200 flex h-24 items-center">
|
|
58
59
|
<Body>Left</Body>
|
|
59
60
|
<Divider orientation="vertical" />
|
|
60
61
|
<Body>Right</Body>
|
|
@@ -31,7 +31,7 @@ Powered by bits-ui for accessibility.
|
|
|
31
31
|
orientation === 'horizontal' ? 'h-[1px] w-full' : 'w-[1px] h-full'
|
|
32
32
|
)
|
|
33
33
|
);
|
|
34
|
-
let insetClass = $derived(variant === 'inset' ? 'mr-
|
|
34
|
+
let insetClass = $derived(variant === 'inset' ? 'mr-spacing-100 ml-spacing-200' : '');
|
|
35
35
|
|
|
36
36
|
let width = $state(0);
|
|
37
37
|
let waveHeight = 12;
|
|
@@ -79,7 +79,7 @@ Powered by bits-ui for accessibility.
|
|
|
79
79
|
{:else if children && orientation === 'horizontal'}
|
|
80
80
|
<div
|
|
81
81
|
{...restProps}
|
|
82
|
-
class={clsx('flex h-full w-full items-center
|
|
82
|
+
class={clsx('gap-spacing-150 flex h-full w-full items-center', insetClass, className)}
|
|
83
83
|
role={decorative ? 'none' : 'separator'}
|
|
84
84
|
aria-orientation="horizontal"
|
|
85
85
|
>
|
|
@@ -2,31 +2,31 @@ import { type VariantProps } from 'tailwind-variants';
|
|
|
2
2
|
export type HrVariants = VariantProps<typeof hr>;
|
|
3
3
|
export declare const hr: import("tailwind-variants").TVReturnType<{
|
|
4
4
|
orientation: {
|
|
5
|
-
horizontal: "h-[1px] mt-
|
|
5
|
+
horizontal: "h-[1px] mt-spacing-50 mb-spacing-100 w-full";
|
|
6
6
|
vertical: "w-[1px] self-stretch min-h-[1em]";
|
|
7
7
|
};
|
|
8
8
|
variant: {
|
|
9
|
-
inset: "mr-
|
|
9
|
+
inset: "mr-spacing-100 ml-spacing-200";
|
|
10
10
|
full: "";
|
|
11
11
|
wavy: "";
|
|
12
12
|
};
|
|
13
13
|
}, undefined, "bg-md-sys-color-outline-variant", {
|
|
14
14
|
orientation: {
|
|
15
|
-
horizontal: "h-[1px] mt-
|
|
15
|
+
horizontal: "h-[1px] mt-spacing-50 mb-spacing-100 w-full";
|
|
16
16
|
vertical: "w-[1px] self-stretch min-h-[1em]";
|
|
17
17
|
};
|
|
18
18
|
variant: {
|
|
19
|
-
inset: "mr-
|
|
19
|
+
inset: "mr-spacing-100 ml-spacing-200";
|
|
20
20
|
full: "";
|
|
21
21
|
wavy: "";
|
|
22
22
|
};
|
|
23
23
|
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
24
24
|
orientation: {
|
|
25
|
-
horizontal: "h-[1px] mt-
|
|
25
|
+
horizontal: "h-[1px] mt-spacing-50 mb-spacing-100 w-full";
|
|
26
26
|
vertical: "w-[1px] self-stretch min-h-[1em]";
|
|
27
27
|
};
|
|
28
28
|
variant: {
|
|
29
|
-
inset: "mr-
|
|
29
|
+
inset: "mr-spacing-100 ml-spacing-200";
|
|
30
30
|
full: "";
|
|
31
31
|
wavy: "";
|
|
32
32
|
};
|
|
@@ -3,11 +3,11 @@ export const hr = tv({
|
|
|
3
3
|
base: 'bg-md-sys-color-outline-variant',
|
|
4
4
|
variants: {
|
|
5
5
|
orientation: {
|
|
6
|
-
horizontal: 'h-[1px] mt-
|
|
6
|
+
horizontal: 'h-[1px] mt-spacing-50 mb-spacing-100 w-full',
|
|
7
7
|
vertical: 'w-[1px] self-stretch min-h-[1em]'
|
|
8
8
|
},
|
|
9
9
|
variant: {
|
|
10
|
-
inset: 'mr-
|
|
10
|
+
inset: 'mr-spacing-100 ml-spacing-200',
|
|
11
11
|
full: '',
|
|
12
12
|
wavy: ''
|
|
13
13
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './action-rail/index.js';
|
|
2
2
|
export * from './app/index.js';
|
|
3
3
|
export * from './bottom-sheet/index.js';
|
|
4
|
+
export * from './carousel/index.js';
|
|
4
5
|
export * from './context-menu/index.js';
|
|
5
6
|
export * from './dialogue/index.js';
|
|
6
7
|
export * from './divider/index.js';
|
|
@@ -11,4 +12,3 @@ export * from './pane/index.js';
|
|
|
11
12
|
export * from './popover/index.js';
|
|
12
13
|
export * from './scroll-area/index.js';
|
|
13
14
|
export * from './side-sheet/index.js';
|
|
14
|
-
export * from './stack/index.js';
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export * from './action-rail/index.js';
|
|
4
4
|
export * from './app/index.js';
|
|
5
5
|
export * from './bottom-sheet/index.js';
|
|
6
|
+
export * from './carousel/index.js';
|
|
6
7
|
export * from './context-menu/index.js';
|
|
7
8
|
export * from './dialogue/index.js';
|
|
8
9
|
export * from './divider/index.js';
|
|
@@ -13,4 +14,3 @@ export * from './pane/index.js';
|
|
|
13
14
|
export * from './popover/index.js';
|
|
14
15
|
export * from './scroll-area/index.js';
|
|
15
16
|
export * from './side-sheet/index.js';
|
|
16
|
-
export * from './stack/index.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tv } from 'tailwind-variants';
|
|
2
2
|
export const linkPreview = tv({
|
|
3
3
|
slots: {
|
|
4
|
-
base: 'relative z-[100] min-w-48 max-w-sm rounded-2xl bg-md-sys-color-surface-container-high p-
|
|
5
|
-
content: 'flex flex-col gap-
|
|
4
|
+
base: 'relative z-[100] min-w-48 max-w-sm rounded-2xl bg-md-sys-color-surface-container-high p-spacing-200 shadow-elevation-3 ring-1 ring-md-sys-color-outline/20 overflow-hidden',
|
|
5
|
+
content: 'flex flex-col gap-spacing-100'
|
|
6
6
|
}
|
|
7
7
|
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { list } from './theme.js';
|
|
4
|
+
import { setListContext } from './context.js';
|
|
5
|
+
import type { ListProps } from './types.js';
|
|
6
|
+
|
|
7
|
+
let { variant = 'standard', class: className, children, ...restProps }: ListProps = $props();
|
|
8
|
+
|
|
9
|
+
setListContext({
|
|
10
|
+
get variant() {
|
|
11
|
+
return variant;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<ul class={list({ variant, class: clsx(className) })} {...restProps}>
|
|
17
|
+
{@render children?.()}
|
|
18
|
+
</ul>
|