@noxlovette/material 0.5.1 → 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 +10 -6
- package/dist/animation/TransitionPatterns.stories.svelte +30 -20
- package/dist/animation/containerTransform.d.ts +4 -2
- package/dist/animation/containerTransform.js +4 -2
- package/dist/animation/enterExit.js +5 -2
- package/dist/animation/skeleton.d.ts +1 -1
- package/dist/animation/skeleton.js +1 -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 +11 -2
- package/dist/components/date/DateRangeField.stories.svelte +4 -3
- package/dist/components/date/DateRangeField.svelte +12 -3
- package/dist/components/date/theme.d.ts +7 -7
- package/dist/components/date/theme.js +31 -31
- 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.js +19 -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/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 +1 -1
- package/dist/components/time/TimepickerInput.svelte +1 -1
- package/dist/components/time/theme.js +5 -5
- 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/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
|
@@ -16,138 +16,100 @@
|
|
|
16
16
|
var(--md-sys-motion-timing-function-effects-spring);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
/*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
border-
|
|
33
|
-
--
|
|
34
|
-
|
|
35
|
-
|
|
19
|
+
/*
|
|
20
|
+
* Every M3 button (Button, Toggle, ButtonIcon, SplitButton, ConnectedButtonGroup items, FAB).
|
|
21
|
+
* Colour, border and shadow settle on the effects spring. The ::after box is the 48dp minimum
|
|
22
|
+
* target that XS and S buttons need
|
|
23
|
+
* (https://m3.material.io/components/buttons/specs#target-areas); on larger buttons it is just
|
|
24
|
+
* the button.
|
|
25
|
+
*/
|
|
26
|
+
.md-btn {
|
|
27
|
+
transition:
|
|
28
|
+
background-color var(--md-sys-motion-duration-effects-spring)
|
|
29
|
+
var(--md-sys-motion-timing-function-effects-spring),
|
|
30
|
+
color var(--md-sys-motion-duration-effects-spring)
|
|
31
|
+
var(--md-sys-motion-timing-function-effects-spring),
|
|
32
|
+
border-color var(--md-sys-motion-duration-effects-spring)
|
|
33
|
+
var(--md-sys-motion-timing-function-effects-spring),
|
|
34
|
+
box-shadow var(--md-sys-motion-duration-effects-spring)
|
|
35
|
+
var(--md-sys-motion-timing-function-effects-spring);
|
|
36
|
+
|
|
37
|
+
&::after {
|
|
38
|
+
content: '';
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: 50%;
|
|
41
|
+
left: 50%;
|
|
42
|
+
width: max(100%, 48px);
|
|
43
|
+
height: max(100%, 48px);
|
|
44
|
+
translate: -50% -50%;
|
|
36
45
|
}
|
|
37
46
|
}
|
|
38
47
|
|
|
39
48
|
/*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* immediate neighbors', which is the M3-specified adjacent-button interaction.
|
|
45
|
-
* `:has()` scopes the shrink to only the pressed button's direct neighbors.
|
|
49
|
+
* Resting shape of Button, Toggle and ButtonIcon, for the first paint. Size classes set
|
|
50
|
+
* --btn-round (half the height), --btn-square and --btn-pressed; the shape variant points
|
|
51
|
+
* --btn-shape at round or square. Once mounted, buttons/shapeMorph.ts springs the corners
|
|
52
|
+
* between these on Motion (inline styles, which win over this rule).
|
|
46
53
|
*/
|
|
47
|
-
.md-btn-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
flex-wrap: nowrap;
|
|
51
|
-
width: max-content;
|
|
52
|
-
|
|
53
|
-
&[data-orientation='vertical'] {
|
|
54
|
-
flex-direction: column;
|
|
55
|
-
align-items: stretch;
|
|
56
|
-
width: auto;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&[data-size='xs'] {
|
|
60
|
-
--btn-group-gap: 1.125rem;
|
|
61
|
-
--btn-group-base-px: 1rem;
|
|
62
|
-
--btn-group-squeeze: 0.375rem;
|
|
63
|
-
}
|
|
64
|
-
&[data-size='sm'] {
|
|
65
|
-
--btn-group-gap: 0.75rem;
|
|
66
|
-
--btn-group-base-px: 1rem;
|
|
67
|
-
--btn-group-squeeze: 0.375rem;
|
|
68
|
-
}
|
|
69
|
-
&[data-size='md'] {
|
|
70
|
-
--btn-group-gap: 0.5rem;
|
|
71
|
-
--btn-group-base-px: 1.5rem;
|
|
72
|
-
--btn-group-squeeze: 0.5rem;
|
|
73
|
-
}
|
|
74
|
-
&[data-size='lg'] {
|
|
75
|
-
--btn-group-gap: 0.5rem;
|
|
76
|
-
--btn-group-base-px: 3rem;
|
|
77
|
-
--btn-group-squeeze: 0.75rem;
|
|
78
|
-
}
|
|
79
|
-
&[data-size='xl'] {
|
|
80
|
-
--btn-group-gap: 0.5rem;
|
|
81
|
-
--btn-group-base-px: 4rem;
|
|
82
|
-
--btn-group-squeeze: 1rem;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
gap: var(--btn-group-gap, 0.5rem);
|
|
86
|
-
|
|
87
|
-
> * {
|
|
88
|
-
padding-inline: var(--btn-group-base-px, 1rem);
|
|
89
|
-
transition:
|
|
90
|
-
padding-inline var(--md-sys-motion-duration-fast-spatial)
|
|
91
|
-
var(--md-sys-motion-timing-function-fast-spatial),
|
|
92
|
-
border-radius var(--md-sys-motion-duration-fast-spatial)
|
|
93
|
-
var(--md-sys-motion-timing-function-fast-spatial);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
> *:active:not(:disabled) {
|
|
97
|
-
padding-inline: calc(var(--btn-group-base-px, 1rem) + var(--btn-group-squeeze, 0.5rem));
|
|
98
|
-
}
|
|
54
|
+
.md-btn-shape {
|
|
55
|
+
border-radius: var(--btn-shape, var(--btn-round, 9999px));
|
|
56
|
+
}
|
|
99
57
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
58
|
+
/*
|
|
59
|
+
* Split button (https://m3.material.io/components/split-button/specs). Outer corners round;
|
|
60
|
+
* inner corners --split-inner at rest, --split-active while hovered, focused or pressed, and
|
|
61
|
+
* fully round on the trailing button while its menu is open. These rules give the first paint;
|
|
62
|
+
* once mounted, buttons/shapeMorph.ts springs the corners on Motion.
|
|
63
|
+
*/
|
|
64
|
+
.md-btn-split-leading,
|
|
65
|
+
.md-btn-split-trailing {
|
|
66
|
+
--split-now: var(--split-inner);
|
|
67
|
+
}
|
|
68
|
+
.md-btn-split-trailing[data-state='open'] {
|
|
69
|
+
--split-now: var(--btn-round);
|
|
70
|
+
}
|
|
71
|
+
.md-btn-split-leading {
|
|
72
|
+
border-start-start-radius: var(--btn-round);
|
|
73
|
+
border-end-start-radius: var(--btn-round);
|
|
74
|
+
border-start-end-radius: var(--split-now);
|
|
75
|
+
border-end-end-radius: var(--split-now);
|
|
76
|
+
}
|
|
77
|
+
.md-btn-split-trailing {
|
|
78
|
+
border-start-start-radius: var(--split-now);
|
|
79
|
+
border-end-start-radius: var(--split-now);
|
|
80
|
+
border-start-end-radius: var(--btn-round);
|
|
81
|
+
border-end-end-radius: var(--btn-round);
|
|
107
82
|
}
|
|
108
83
|
|
|
109
84
|
/*
|
|
110
|
-
* Connected button group item
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* Selecting/pressing an item collapses all four of its own corners to
|
|
115
|
-
* --cbg-inner ("round to square") without touching its neighbors' shape.
|
|
85
|
+
* Connected button group item (https://m3.material.io/components/button-groups/specs).
|
|
86
|
+
* Inner corners (facing a neighbour) are --cbg-inner, --cbg-pressed while pressed, and fully
|
|
87
|
+
* round while selected; outer corners are --cbg-outer. These rules give the first paint; once
|
|
88
|
+
* mounted, buttons/shapeMorph.ts springs the corners on Motion. Neighbours never change.
|
|
116
89
|
*/
|
|
117
90
|
.md-btn-connected {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
border-radius var(--md-sys-motion-duration-fast-spatial)
|
|
121
|
-
var(--md-sys-motion-timing-function-fast-spatial),
|
|
122
|
-
background-color var(--md-sys-motion-duration-fast-effects-spring)
|
|
123
|
-
var(--md-sys-motion-timing-function-fast-effects-spring),
|
|
124
|
-
color var(--md-sys-motion-duration-fast-effects-spring)
|
|
125
|
-
var(--md-sys-motion-timing-function-fast-effects-spring);
|
|
91
|
+
--cbg-now: var(--cbg-inner);
|
|
92
|
+
border-radius: var(--cbg-now);
|
|
126
93
|
|
|
127
|
-
|
|
128
|
-
|
|
94
|
+
&[data-state='on'] {
|
|
95
|
+
--cbg-now: var(--btn-round);
|
|
129
96
|
}
|
|
130
97
|
|
|
131
|
-
&[data-orientation='horizontal']:first-child
|
|
132
|
-
border-
|
|
133
|
-
border-
|
|
98
|
+
&[data-orientation='horizontal']:first-child {
|
|
99
|
+
border-start-start-radius: var(--cbg-outer);
|
|
100
|
+
border-end-start-radius: var(--cbg-outer);
|
|
134
101
|
}
|
|
135
|
-
&[data-orientation='horizontal']:last-child
|
|
136
|
-
border-
|
|
137
|
-
border-
|
|
102
|
+
&[data-orientation='horizontal']:last-child {
|
|
103
|
+
border-start-end-radius: var(--cbg-outer);
|
|
104
|
+
border-end-end-radius: var(--cbg-outer);
|
|
138
105
|
}
|
|
139
|
-
&[data-orientation='vertical']:first-child
|
|
140
|
-
border-
|
|
141
|
-
border-
|
|
106
|
+
&[data-orientation='vertical']:first-child {
|
|
107
|
+
border-start-start-radius: var(--cbg-outer);
|
|
108
|
+
border-start-end-radius: var(--cbg-outer);
|
|
142
109
|
}
|
|
143
|
-
&[data-orientation='vertical']:last-child
|
|
144
|
-
border-
|
|
145
|
-
border-
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
&:active:not(:disabled),
|
|
149
|
-
&[data-state='on'] {
|
|
150
|
-
border-radius: var(--cbg-inner, 4px) !important;
|
|
110
|
+
&[data-orientation='vertical']:last-child {
|
|
111
|
+
border-end-start-radius: var(--cbg-outer);
|
|
112
|
+
border-end-end-radius: var(--cbg-outer);
|
|
151
113
|
}
|
|
152
114
|
}
|
|
153
115
|
|
|
@@ -165,65 +127,6 @@
|
|
|
165
127
|
@apply bg-md-sys-color-error text-md-sys-color-on-error;
|
|
166
128
|
}
|
|
167
129
|
|
|
168
|
-
.md-component-button-tonal-primary {
|
|
169
|
-
@apply bg-md-sys-color-primary-container text-md-sys-color-on-primary-container;
|
|
170
|
-
}
|
|
171
|
-
.md-component-button-tonal-secondary {
|
|
172
|
-
@apply bg-md-sys-color-secondary-container text-md-sys-color-on-secondary-container;
|
|
173
|
-
}
|
|
174
|
-
.md-component-button-tonal-tertiary {
|
|
175
|
-
@apply bg-md-sys-color-tertiary-container text-md-sys-color-on-tertiary-container;
|
|
176
|
-
}
|
|
177
|
-
.md-component-button-tonal-error {
|
|
178
|
-
@apply bg-md-sys-color-error-container text-md-sys-color-on-error-container;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.md-component-button-outline-default {
|
|
182
|
-
@apply text-md-sys-color-on-surface-variant outline-md-sys-color-outline-variant outline-2;
|
|
183
|
-
}
|
|
184
|
-
.md-component-button-outline-primary {
|
|
185
|
-
@apply text-md-sys-color-primary outline-md-sys-color-primary outline;
|
|
186
|
-
}
|
|
187
|
-
.md-component-button-outline-secondary {
|
|
188
|
-
@apply text-md-sys-color-secondary outline-md-sys-color-secondary outline;
|
|
189
|
-
}
|
|
190
|
-
.md-component-button-outline-tertiary {
|
|
191
|
-
@apply text-md-sys-color-tertiary outline-md-sys-color-tertiary outline;
|
|
192
|
-
}
|
|
193
|
-
.md-component-button-outline-error {
|
|
194
|
-
@apply text-md-sys-color-error outline-md-sys-color-error outline;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.md-component-button-text-primary {
|
|
198
|
-
@apply text-md-sys-color-primary;
|
|
199
|
-
}
|
|
200
|
-
.md-component-button-text-secondary {
|
|
201
|
-
@apply text-md-sys-color-secondary;
|
|
202
|
-
}
|
|
203
|
-
.md-component-button-text-tertiary {
|
|
204
|
-
@apply text-md-sys-color-tertiary;
|
|
205
|
-
}
|
|
206
|
-
.md-component-button-text-error {
|
|
207
|
-
@apply text-md-sys-color-error;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.md-component-button-elevated-default {
|
|
211
|
-
@apply bg-md-sys-color-surface-container-low text-md-sys-color-primary shadow-elevation-1;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.md-component-button-elevated-primary {
|
|
215
|
-
@apply bg-md-sys-color-surface-container-low text-md-sys-color-primary shadow-elevation-1;
|
|
216
|
-
}
|
|
217
|
-
.md-component-button-elevated-secondary {
|
|
218
|
-
@apply bg-md-sys-color-surface-container-low text-md-sys-color-secondary shadow-elevation-1;
|
|
219
|
-
}
|
|
220
|
-
.md-component-button-elevated-tertiary {
|
|
221
|
-
@apply bg-md-sys-color-surface-container-low text-md-sys-color-tertiary shadow-elevation-1;
|
|
222
|
-
}
|
|
223
|
-
.md-component-button-elevated-error {
|
|
224
|
-
@apply bg-md-sys-color-surface-container-low text-md-sys-color-error shadow-elevation-1;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
130
|
[class^='material-symbols-'],
|
|
228
131
|
[class*=' material-symbols-'] {
|
|
229
132
|
font-weight: normal;
|
|
@@ -267,7 +170,7 @@
|
|
|
267
170
|
}
|
|
268
171
|
|
|
269
172
|
@utility state-layer {
|
|
270
|
-
@apply before:pointer-events-none before:absolute before:
|
|
173
|
+
@apply before:inset-spacing-0 before:pointer-events-none before:absolute before:content-[''];
|
|
271
174
|
&::before {
|
|
272
175
|
transition: background-color var(--md-sys-motion-duration-fast-effects-spring)
|
|
273
176
|
var(--md-sys-motion-timing-function-fast-effects-spring);
|
|
@@ -43,3 +43,12 @@
|
|
|
43
43
|
@utility shadow-elevation-5 {
|
|
44
44
|
box-shadow: var(--md-sys-elevation-5);
|
|
45
45
|
}
|
|
46
|
+
|
|
47
|
+
/* Elevation 3 as a filter, for surfaces whose shape is a clip-path (a box-shadow would be
|
|
48
|
+
clipped with it). drop-shadow has no spread, so the ambient layer is a little tighter. */
|
|
49
|
+
@utility drop-shadow-elevation-3 {
|
|
50
|
+
filter: drop-shadow(
|
|
51
|
+
0px 1px 3px color-mix(in srgb, var(--color-md-sys-color-shadow) 30%, transparent)
|
|
52
|
+
)
|
|
53
|
+
drop-shadow(0px 4px 8px color-mix(in srgb, var(--color-md-sys-color-shadow) 15%, transparent));
|
|
54
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* M3 system spacing: https://m3.material.io/styles/spacing/tokens
|
|
3
|
+
* md.sys.measurement.space<N> = N/100 x the 8dp base (space100). Registered in Tailwind's
|
|
4
|
+
* spacing namespace, so every spacing utility takes them: mr-spacing-200 (16dp),
|
|
5
|
+
* gap-spacing-50 (4dp), p-spacing-300, size-spacing-600, -mt-spacing-100, and so on.
|
|
6
|
+
* The number is M3's token number, not Tailwind's 4px multiplier: spacing-200 is 16dp, the same
|
|
7
|
+
* as Tailwind's p-4. Tailwind's numeric scale stays available to consuming apps; the library's
|
|
8
|
+
* own spacing uses these tokens.
|
|
9
|
+
*/
|
|
10
|
+
@theme {
|
|
11
|
+
--spacing-spacing-0: 0; /* md.sys.measurement.space0, 0dp */
|
|
12
|
+
--spacing-spacing-25: 0.125rem; /* md.sys.measurement.space25, 2dp */
|
|
13
|
+
--spacing-spacing-50: 0.25rem; /* md.sys.measurement.space50, 4dp */
|
|
14
|
+
--spacing-spacing-75: 0.375rem; /* md.sys.measurement.space75, 6dp */
|
|
15
|
+
--spacing-spacing-100: 0.5rem; /* md.sys.measurement.space100, 8dp */
|
|
16
|
+
--spacing-spacing-125: 0.625rem; /* md.sys.measurement.space125, 10dp */
|
|
17
|
+
--spacing-spacing-150: 0.75rem; /* md.sys.measurement.space150, 12dp */
|
|
18
|
+
--spacing-spacing-175: 0.875rem; /* md.sys.measurement.space175, 14dp */
|
|
19
|
+
--spacing-spacing-200: 1rem; /* md.sys.measurement.space200, 16dp */
|
|
20
|
+
--spacing-spacing-250: 1.25rem; /* md.sys.measurement.space250, 20dp */
|
|
21
|
+
--spacing-spacing-300: 1.5rem; /* md.sys.measurement.space300, 24dp */
|
|
22
|
+
--spacing-spacing-400: 2rem; /* md.sys.measurement.space400, 32dp */
|
|
23
|
+
--spacing-spacing-450: 2.25rem; /* md.sys.measurement.space450, 36dp */
|
|
24
|
+
--spacing-spacing-500: 2.5rem; /* md.sys.measurement.space500, 40dp */
|
|
25
|
+
--spacing-spacing-600: 3rem; /* md.sys.measurement.space600, 48dp */
|
|
26
|
+
--spacing-spacing-700: 3.5rem; /* md.sys.measurement.space700, 56dp */
|
|
27
|
+
--spacing-spacing-800: 4rem; /* md.sys.measurement.space800, 64dp */
|
|
28
|
+
--spacing-spacing-900: 4.5rem; /* md.sys.measurement.space900, 72dp */
|
|
29
|
+
}
|