@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.
Files changed (316) hide show
  1. package/bin/material-claude-skill.js +31 -0
  2. package/claude-skill/material-design/SKILL.md +68 -0
  3. package/claude-skill/material-design/references/accessibility-checklist.md +29 -0
  4. package/claude-skill/material-design/references/component-patterns.md +55 -0
  5. package/claude-skill/material-design/references/motion-guide.md +163 -0
  6. package/claude-skill/material-design/references/tokens-and-styles.md +68 -0
  7. package/dist/animation/Shapes.stories.svelte +60 -0
  8. package/dist/animation/Shapes.stories.svelte.d.ts +3 -0
  9. package/dist/animation/TransitionPatterns.stories.svelte +32 -20
  10. package/dist/animation/containerTransform.d.ts +11 -0
  11. package/dist/animation/containerTransform.js +11 -0
  12. package/dist/animation/enterExit.d.ts +9 -0
  13. package/dist/animation/enterExit.js +6 -3
  14. package/dist/animation/index.d.ts +1 -0
  15. package/dist/animation/index.js +1 -0
  16. package/dist/animation/shapeMorph.svelte.d.ts +52 -0
  17. package/dist/animation/shapeMorph.svelte.js +112 -0
  18. package/dist/animation/shapesAnimatableSmall.d.ts +28 -22
  19. package/dist/animation/shapesAnimatableSmall.js +32 -23
  20. package/dist/animation/sharedAxisTransition.d.ts +22 -0
  21. package/dist/animation/sharedAxisTransition.js +25 -1
  22. package/dist/animation/skeleton.d.ts +6 -1
  23. package/dist/animation/skeleton.js +6 -1
  24. package/dist/components/badge/Badge.mdx +70 -0
  25. package/dist/components/badge/Badge.stories.svelte +38 -20
  26. package/dist/components/badge/Badge.svelte +12 -5
  27. package/dist/components/badge/theme.d.ts +30 -7
  28. package/dist/components/badge/theme.js +24 -4
  29. package/dist/components/badge/types.d.ts +18 -4
  30. package/dist/components/buttons/Button.mdx +85 -0
  31. package/dist/components/buttons/Button.stories.svelte +62 -27
  32. package/dist/components/buttons/Button.svelte +29 -25
  33. package/dist/components/buttons/Button.svelte.d.ts +11 -9
  34. package/dist/components/buttons/ButtonIcon.mdx +52 -0
  35. package/dist/components/buttons/ButtonIcon.stories.svelte +72 -48
  36. package/dist/components/buttons/ButtonIcon.svelte +58 -36
  37. package/dist/components/buttons/ButtonIcon.svelte.d.ts +9 -7
  38. package/dist/components/buttons/FAB.mdx +84 -0
  39. package/dist/components/buttons/FAB.stories.svelte +103 -24
  40. package/dist/components/buttons/FAB.stories.svelte.d.ts +2 -17
  41. package/dist/components/buttons/FAB.svelte +353 -29
  42. package/dist/components/buttons/FAB.svelte.d.ts +11 -6
  43. package/dist/components/buttons/FABMenu.svelte +27 -8
  44. package/dist/components/buttons/FABMenu.svelte.d.ts +7 -3
  45. package/dist/components/buttons/FABMenuItem.svelte +20 -16
  46. package/dist/components/buttons/FABMenuItem.svelte.d.ts +3 -3
  47. package/dist/components/buttons/Toggle.stories.svelte +31 -23
  48. package/dist/components/buttons/Toggle.stories.svelte.d.ts +2 -17
  49. package/dist/components/buttons/Toggle.svelte +28 -25
  50. package/dist/components/buttons/Toggle.svelte.d.ts +5 -5
  51. package/dist/components/buttons/button-group/ButtonGroup.mdx +39 -0
  52. package/dist/components/buttons/button-group/ButtonGroup.stories.svelte +62 -43
  53. package/dist/components/buttons/button-group/ButtonGroup.stories.svelte.d.ts +2 -17
  54. package/dist/components/buttons/button-group/ButtonGroup.svelte +102 -8
  55. package/dist/components/buttons/button-group/ButtonGroup.svelte.d.ts +6 -7
  56. package/dist/components/buttons/button-group/theme.d.ts +45 -15
  57. package/dist/components/buttons/button-group/theme.js +13 -8
  58. package/dist/components/buttons/button-group/types.d.ts +13 -7
  59. package/dist/components/buttons/connected/ConnectedButtonGroup.mdx +43 -0
  60. package/dist/components/buttons/connected/ConnectedButtonGroup.stories.svelte +56 -74
  61. package/dist/components/buttons/connected/ConnectedButtonGroup.stories.svelte.d.ts +2 -17
  62. package/dist/components/buttons/connected/ConnectedButtonGroup.svelte +16 -4
  63. package/dist/components/buttons/connected/ConnectedButtonGroup.svelte.d.ts +4 -4
  64. package/dist/components/buttons/connected/ConnectedButtonGroupItem.svelte +35 -8
  65. package/dist/components/buttons/connected/ConnectedButtonGroupItem.svelte.d.ts +2 -3
  66. package/dist/components/buttons/connected/theme.d.ts +33 -18
  67. package/dist/components/buttons/connected/theme.js +32 -9
  68. package/dist/components/buttons/connected/types.d.ts +36 -9
  69. package/dist/components/buttons/shapeMorph.d.ts +26 -0
  70. package/dist/components/buttons/shapeMorph.js +142 -0
  71. package/dist/components/buttons/split-button/SplitButton.mdx +48 -0
  72. package/dist/components/buttons/split-button/SplitButton.stories.svelte +9 -14
  73. package/dist/components/buttons/split-button/SplitButton.svelte +65 -48
  74. package/dist/components/buttons/split-button/SplitButton.svelte.d.ts +6 -11
  75. package/dist/components/buttons/split-button/theme.d.ts +110 -17
  76. package/dist/components/buttons/split-button/theme.js +74 -16
  77. package/dist/components/buttons/split-button/types.d.ts +24 -18
  78. package/dist/components/buttons/theme.d.ts +422 -230
  79. package/dist/components/buttons/theme.js +286 -380
  80. package/dist/components/buttons/types.d.ts +130 -125
  81. package/dist/components/cards/Card.mdx +44 -0
  82. package/dist/components/cards/Card.stories.svelte +11 -11
  83. package/dist/components/cards/theme.js +5 -5
  84. package/dist/components/chips/Chip.mdx +68 -0
  85. package/dist/components/chips/Chip.stories.svelte +4 -4
  86. package/dist/components/chips/theme.js +3 -3
  87. package/dist/components/containers/action-rail/ActionRail.stories.svelte +1 -0
  88. package/dist/components/containers/action-rail/theme.js +1 -1
  89. package/dist/components/containers/bottom-sheet/BottomSheet.mdx +64 -0
  90. package/dist/components/containers/bottom-sheet/BottomSheet.stories.svelte +108 -12
  91. package/dist/components/containers/bottom-sheet/BottomSheet.svelte +179 -109
  92. package/dist/components/containers/bottom-sheet/BottomSheet.svelte.d.ts +10 -5
  93. package/dist/components/containers/bottom-sheet/index.d.ts +1 -0
  94. package/dist/components/containers/bottom-sheet/index.js +1 -0
  95. package/dist/components/containers/bottom-sheet/theme.d.ts +45 -0
  96. package/dist/components/containers/bottom-sheet/theme.js +42 -0
  97. package/dist/components/containers/bottom-sheet/types.d.ts +37 -5
  98. package/dist/components/containers/carousel/Carousel.mdx +80 -0
  99. package/dist/components/containers/carousel/Carousel.stories.svelte +131 -0
  100. package/dist/components/containers/carousel/Carousel.stories.svelte.d.ts +4 -0
  101. package/dist/components/containers/carousel/Carousel.svelte +194 -0
  102. package/dist/components/containers/carousel/Carousel.svelte.d.ts +25 -0
  103. package/dist/components/containers/carousel/index.d.ts +3 -0
  104. package/dist/components/containers/{stack → carousel}/index.js +1 -2
  105. package/dist/components/containers/carousel/keylines.d.ts +32 -0
  106. package/dist/components/containers/carousel/keylines.js +88 -0
  107. package/dist/components/containers/carousel/theme.d.ts +162 -0
  108. package/dist/components/containers/carousel/theme.js +67 -0
  109. package/dist/components/containers/carousel/types.d.ts +52 -0
  110. package/dist/components/containers/context-menu/ContextMenu.stories.svelte +1 -0
  111. package/dist/components/containers/context-menu/ContextMenu.svelte +2 -2
  112. package/dist/components/containers/context-menu/ContextMenu.svelte.d.ts +1 -1
  113. package/dist/components/containers/context-menu/theme.js +10 -10
  114. package/dist/components/containers/dialogue/Dialogue.mdx +65 -0
  115. package/dist/components/containers/dialogue/Dialogue.stories.svelte +4 -4
  116. package/dist/components/containers/dialogue/Dialogue.svelte +1 -1
  117. package/dist/components/containers/dialogue/theme.js +3 -3
  118. package/dist/components/containers/divider/Divider.stories.svelte +2 -1
  119. package/dist/components/containers/divider/Divider.svelte +2 -2
  120. package/dist/components/containers/divider/theme.d.ts +6 -6
  121. package/dist/components/containers/divider/theme.js +2 -2
  122. package/dist/components/containers/index.d.ts +1 -1
  123. package/dist/components/containers/index.js +1 -1
  124. package/dist/components/containers/link-preview/theme.js +2 -2
  125. package/dist/components/containers/list/List.svelte +18 -0
  126. package/dist/components/containers/list/List.svelte.d.ts +4 -0
  127. package/dist/components/containers/list/ListItem.mdx +100 -0
  128. package/dist/components/containers/list/ListItem.stories.svelte +177 -42
  129. package/dist/components/containers/list/ListItem.stories.svelte.d.ts +2 -17
  130. package/dist/components/containers/list/ListItem.svelte +92 -37
  131. package/dist/components/containers/list/ListItem.svelte.d.ts +1 -1
  132. package/dist/components/containers/list/context.d.ts +6 -0
  133. package/dist/components/containers/list/context.js +4 -0
  134. package/dist/components/containers/list/index.d.ts +1 -0
  135. package/dist/components/containers/list/index.js +1 -0
  136. package/dist/components/containers/list/theme.d.ts +487 -12
  137. package/dist/components/containers/list/theme.js +140 -13
  138. package/dist/components/containers/list/types.d.ts +39 -5
  139. package/dist/components/containers/menu/Menu.mdx +52 -0
  140. package/dist/components/containers/menu/Menu.stories.svelte +14 -14
  141. package/dist/components/containers/menu/Menu.svelte +1 -1
  142. package/dist/components/containers/menu/MenuGroup.svelte +1 -1
  143. package/dist/components/containers/menu/MenuGroup.svelte.d.ts +1 -1
  144. package/dist/components/containers/menu/menu-item/MenuItem.svelte +1 -1
  145. package/dist/components/containers/menu/theme.js +8 -8
  146. package/dist/components/containers/pane/DraggablePane.stories.svelte +4 -3
  147. package/dist/components/containers/pane/DraggablePane.svelte +2 -2
  148. package/dist/components/containers/pane/Pane.stories.svelte +11 -10
  149. package/dist/components/containers/pane/Pane.svelte +24 -2
  150. package/dist/components/containers/pane/PaneGrid.stories.svelte +19 -18
  151. package/dist/components/containers/pane/PaneGrid.svelte +3 -2
  152. package/dist/components/containers/pane/PaneGrid.svelte.d.ts +2 -1
  153. package/dist/components/containers/pane/PaneHandle.svelte +48 -2
  154. package/dist/components/containers/pane/PaneHandle.svelte.d.ts +4 -0
  155. package/dist/components/containers/pane/resizeStore.svelte.d.ts +10 -1
  156. package/dist/components/containers/pane/resizeStore.svelte.js +13 -2
  157. package/dist/components/containers/pane/theme.js +129 -45
  158. package/dist/components/containers/pane/types.d.ts +3 -2
  159. package/dist/components/containers/popover/Popover.mdx +45 -0
  160. package/dist/components/containers/popover/Popover.stories.svelte +1 -1
  161. package/dist/components/containers/popover/Popover.svelte +1 -1
  162. package/dist/components/containers/popover/theme.js +3 -3
  163. package/dist/components/containers/scroll-area/theme.js +2 -2
  164. package/dist/components/containers/side-sheet/SideSheet.mdx +71 -0
  165. package/dist/components/containers/side-sheet/SideSheet.stories.svelte +113 -17
  166. package/dist/components/containers/side-sheet/SideSheet.svelte +113 -66
  167. package/dist/components/containers/side-sheet/SideSheet.svelte.d.ts +8 -7
  168. package/dist/components/containers/side-sheet/index.d.ts +1 -0
  169. package/dist/components/containers/side-sheet/index.js +1 -0
  170. package/dist/components/containers/side-sheet/theme.d.ts +108 -0
  171. package/dist/components/containers/side-sheet/theme.js +72 -0
  172. package/dist/components/containers/side-sheet/types.d.ts +35 -7
  173. package/dist/components/date/DateField.stories.svelte +4 -3
  174. package/dist/components/date/DateField.svelte +49 -26
  175. package/dist/components/date/DateField.svelte.d.ts +2 -0
  176. package/dist/components/date/DateRangeField.stories.svelte +4 -3
  177. package/dist/components/date/DateRangeField.svelte +54 -31
  178. package/dist/components/date/DateRangeField.svelte.d.ts +2 -0
  179. package/dist/components/date/calendarMotion.d.ts +9 -0
  180. package/dist/components/date/calendarMotion.js +23 -0
  181. package/dist/components/date/theme.d.ts +7 -7
  182. package/dist/components/date/theme.js +34 -30
  183. package/dist/components/forms/checkbox/Checkbox.mdx +35 -0
  184. package/dist/components/forms/checkbox/Checkbox.stories.svelte +2 -2
  185. package/dist/components/forms/checkbox/Checkbox.svelte +1 -1
  186. package/dist/components/forms/checkbox/theme.js +3 -3
  187. package/dist/components/forms/command/Command.stories.svelte +1 -0
  188. package/dist/components/forms/command/theme.js +9 -9
  189. package/dist/components/forms/pin/theme.js +4 -4
  190. package/dist/components/forms/radio-group/RadioGroup.svelte +1 -1
  191. package/dist/components/forms/radio-group/theme.js +5 -5
  192. package/dist/components/forms/search/Search.mdx +38 -0
  193. package/dist/components/forms/search/Search.stories.svelte +19 -9
  194. package/dist/components/forms/search/Search.svelte +40 -17
  195. package/dist/components/forms/search/Search.svelte.d.ts +2 -2
  196. package/dist/components/forms/search/theme.d.ts +45 -12
  197. package/dist/components/forms/search/theme.js +13 -8
  198. package/dist/components/forms/search/types.d.ts +18 -12
  199. package/dist/components/forms/select/Select.mdx +53 -0
  200. package/dist/components/forms/select/Select.stories.svelte +4 -4
  201. package/dist/components/forms/select/Select.svelte +10 -2
  202. package/dist/components/forms/select/SelectItem.svelte +1 -1
  203. package/dist/components/forms/select/theme.js +12 -12
  204. package/dist/components/forms/slider/Slider.mdx +85 -0
  205. package/dist/components/forms/slider/Slider.stories.svelte +7 -7
  206. package/dist/components/forms/slider/Slider.svelte +46 -28
  207. package/dist/components/forms/slider/theme.d.ts +14 -0
  208. package/dist/components/forms/slider/theme.js +28 -17
  209. package/dist/components/forms/slider/types.d.ts +3 -2
  210. package/dist/components/forms/switch/Switch.mdx +38 -0
  211. package/dist/components/forms/switch/Switch.stories.svelte +3 -3
  212. package/dist/components/forms/switch/theme.js +6 -6
  213. package/dist/components/forms/textfield/Textfield.mdx +53 -0
  214. package/dist/components/forms/textfield/Textfield.stories.svelte +6 -6
  215. package/dist/components/forms/textfield/Textfield.svelte +1 -0
  216. package/dist/components/forms/textfield/theme.d.ts +3 -0
  217. package/dist/components/forms/textfield/theme.js +22 -19
  218. package/dist/components/forms/toggle-group/theme.js +2 -2
  219. package/dist/components/forms/tooltip/Tooltip.stories.svelte +1 -0
  220. package/dist/components/forms/tooltip/theme.js +3 -3
  221. package/dist/components/misc/Avatar.stories.svelte +5 -4
  222. package/dist/components/misc/ThemeSettings.svelte +9 -9
  223. package/dist/components/misc/ThemeSwitcher.svelte +3 -3
  224. package/dist/components/misc/theme.js +4 -4
  225. package/dist/components/nav/appbar/AppBar.mdx +71 -0
  226. package/dist/components/nav/appbar/AppBar.stories.svelte +93 -3
  227. package/dist/components/nav/appbar/AppBar.stories.svelte.d.ts +2 -17
  228. package/dist/components/nav/appbar/AppBar.svelte +90 -37
  229. package/dist/components/nav/appbar/AppBar.svelte.d.ts +9 -2
  230. package/dist/components/nav/appbar/theme.d.ts +85 -18
  231. package/dist/components/nav/appbar/theme.js +159 -23
  232. package/dist/components/nav/appbar/types.d.ts +46 -9
  233. package/dist/components/nav/breadcrumb/Breadcrumb.stories.svelte +1 -0
  234. package/dist/components/nav/breadcrumb/theme.js +5 -5
  235. package/dist/components/nav/navbar/Navbar.mdx +38 -0
  236. package/dist/components/nav/navbar/Navbar.svelte +1 -1
  237. package/dist/components/nav/navbar/NavbarItem.svelte +12 -9
  238. package/dist/components/nav/navbar/theme.js +6 -6
  239. package/dist/components/nav/rail/Rail.mdx +73 -0
  240. package/dist/components/nav/rail/Rail.stories.svelte +3 -7
  241. package/dist/components/nav/rail/Rail.svelte +1 -0
  242. package/dist/components/nav/rail/RailItem.svelte +12 -9
  243. package/dist/components/nav/rail/theme.js +13 -13
  244. package/dist/components/nav/rail/types.d.ts +4 -1
  245. package/dist/components/nav/tabs/TabHolder.svelte +29 -3
  246. package/dist/components/nav/tabs/TabHolder.svelte.d.ts +3 -1
  247. package/dist/components/nav/tabs/Tabs.mdx +62 -0
  248. package/dist/components/nav/tabs/Tabs.stories.svelte +1 -1
  249. package/dist/components/nav/tabs/theme.js +4 -4
  250. package/dist/components/pill/Pill.mdx +32 -0
  251. package/dist/components/pill/Pill.stories.svelte +1 -1
  252. package/dist/components/pill/theme.d.ts +1 -1
  253. package/dist/components/pill/theme.js +1 -1
  254. package/dist/components/progress/LinearProgress.svelte +1 -1
  255. package/dist/components/progress/Progress.mdx +50 -0
  256. package/dist/components/progress/Progress.stories.svelte +6 -6
  257. package/dist/components/snackbar/Snackbar.mdx +52 -0
  258. package/dist/components/snackbar/Snackbar.stories.svelte +5 -5
  259. package/dist/components/snackbar/Snackbar.svelte +1 -1
  260. package/dist/components/snackbar/theme.d.ts +3 -3
  261. package/dist/components/snackbar/theme.js +4 -4
  262. package/dist/components/table/Table.stories.svelte +1 -0
  263. package/dist/components/table/TableHeader.svelte +1 -1
  264. package/dist/components/table/theme.js +3 -3
  265. package/dist/components/time/TimeField.stories.svelte +3 -2
  266. package/dist/components/time/TimeField.svelte +14 -8
  267. package/dist/components/time/TimeField.svelte.d.ts +6 -0
  268. package/dist/components/time/TimepickerInput.svelte +9 -5
  269. package/dist/components/time/theme.js +5 -5
  270. package/dist/components/time/types.d.ts +11 -1
  271. package/dist/components/toolbar/Toolbar.stories.svelte +1 -0
  272. package/dist/components/toolbar/Toolbar.svelte +1 -1
  273. package/dist/components/toolbar/Toolbar.svelte.d.ts +1 -1
  274. package/dist/components/toolbar/theme.js +14 -14
  275. package/dist/components/typography/Typography.mdx +67 -0
  276. package/dist/components/typography/body/Body.stories.svelte +2 -1
  277. package/dist/components/typography/body/theme.d.ts +15 -12
  278. package/dist/components/typography/body/theme.js +19 -4
  279. package/dist/components/typography/body/types.d.ts +2 -1
  280. package/dist/components/typography/display/Display.stories.svelte +2 -1
  281. package/dist/components/typography/display/theme.d.ts +15 -12
  282. package/dist/components/typography/display/theme.js +19 -4
  283. package/dist/components/typography/display/types.d.ts +2 -1
  284. package/dist/components/typography/headline/Headline.stories.svelte +2 -1
  285. package/dist/components/typography/headline/theme.d.ts +15 -12
  286. package/dist/components/typography/headline/theme.js +19 -4
  287. package/dist/components/typography/headline/types.d.ts +2 -1
  288. package/dist/components/typography/kbd/Kbd.stories.svelte +2 -1
  289. package/dist/components/typography/kbd/theme.d.ts +4 -4
  290. package/dist/components/typography/kbd/theme.js +2 -2
  291. package/dist/components/typography/label/Label.stories.svelte +2 -1
  292. package/dist/components/typography/label/theme.d.ts +15 -12
  293. package/dist/components/typography/label/theme.js +19 -4
  294. package/dist/components/typography/label/types.d.ts +2 -1
  295. package/dist/components/typography/title/Title.stories.svelte +2 -1
  296. package/dist/components/typography/title/theme.d.ts +15 -12
  297. package/dist/components/typography/title/theme.js +19 -4
  298. package/dist/components/typography/title/types.d.ts +2 -1
  299. package/dist/index.css +1 -0
  300. package/dist/styles/component.css +78 -175
  301. package/dist/styles/elevation.css +9 -0
  302. package/dist/styles/spacing.css +29 -0
  303. package/dist/styles/typescale.css +635 -20
  304. package/dist/utils/Layer.svelte +1 -1
  305. package/dist/utils/icon/Icon.svelte +8 -6
  306. package/dist/utils/icon/loadingShapes.js +11 -10
  307. package/package.json +19 -15
  308. package/dist/components/containers/stack/HStack.svelte +0 -23
  309. package/dist/components/containers/stack/HStack.svelte.d.ts +0 -5
  310. package/dist/components/containers/stack/VStack.svelte +0 -23
  311. package/dist/components/containers/stack/VStack.svelte.d.ts +0 -5
  312. package/dist/components/containers/stack/index.d.ts +0 -4
  313. package/dist/components/containers/stack/theme.d.ts +0 -66
  314. package/dist/components/containers/stack/theme.js +0 -26
  315. package/dist/components/containers/stack/types.d.ts +0 -12
  316. /package/dist/components/containers/{stack → carousel}/types.js +0 -0
@@ -1,188 +1,193 @@
1
1
  import type { AnchorButtonAttributes, IconProps } from '../../utils/index.js';
2
2
  import type { Snippet } from 'svelte';
3
3
  import type { HTMLAnchorAttributes, HTMLAttributes, HTMLButtonAttributes } from 'svelte/elements';
4
- import type { ButtonIconVariants, ButtonMDVariants, FABMenuItemVariants, FABVariants } from './theme.js';
4
+ import type { Responsive } from '../containers/pane/theme.js';
5
+ import type { ButtonSize, FABColor } from './theme.js';
5
6
  export type HTMLButtonOrAnchorAttributes = HTMLButtonAttributes & HTMLAnchorAttributes;
6
- export type ButtonMDProps = ButtonMDVariants & AnchorButtonAttributes & {
7
+ export type ButtonProps = AnchorButtonAttributes & {
7
8
  /**
8
- * The visual style of the button.
9
- * - 'filled': High emphasis.
10
- * - 'tonal': Medium-high emphasis.
11
- * - 'outlined': Medium emphasis.
12
- * - 'text': Low emphasis.
13
- * - 'elevated': High emphasis with elevation.
9
+ * Colour style, from most to least emphasis:
10
+ * - `filled`: final or unblocking actions, such as Save or Confirm.
11
+ * - `tonal`: important actions that sit a step below filled.
12
+ * - `elevated`: only when the button must stand apart from a patterned background.
13
+ * - `outlined`: actions that need attention but aren't primary, and ways out of a flow.
14
+ * - `text`: optional actions, such as Learn more.
15
+ * @default 'filled'
14
16
  */
15
- variant?: ButtonMDVariants['variant'];
17
+ variant?: 'elevated' | 'filled' | 'tonal' | 'outlined' | 'text';
16
18
  /**
17
- * The color scheme of the button.
19
+ * Height 32, 40, 56, 96 or 136dp. XS and S keep a 48dp target area.
20
+ * @default 'sm'
18
21
  */
19
- color?: ButtonMDVariants['color'];
22
+ size?: ButtonSize;
20
23
  /**
21
- * The size of the button.
22
- */
23
- size?: ButtonMDVariants['size'];
24
- /**
25
- * The shape of the button corners.
26
- * - 'round': Fully rounded corners.
27
- * - 'square': Slightly rounded corners.
28
- */
29
- shape?: ButtonMDVariants['shape'];
30
- /**
31
- * The label or content to display inside the button.
24
+ * Resting corner shape. Both morph to the same smaller radius while pressed.
25
+ * @default 'round'
32
26
  */
27
+ shape?: 'round' | 'square';
28
+ /** The label. */
33
29
  children?: Snippet;
34
- /** Whether the button is disabled. */
35
- disabled?: boolean;
36
- /** Whether the button is currently in a selected state (e.g. for toggle buttons). */
37
- selected?: boolean;
38
- /** Whether the button behaves as a selection control (scopes selected styling). */
39
- usage?: ButtonMDVariants['usage'];
40
- /**
41
- * Configuration for the leading icon.
42
- */
30
+ /** A leading icon, sized for the button. */
43
31
  iconProps?: IconProps;
44
- /**
45
- * The URL to link to. If provided, the button will render as an `<a>` tag.
46
- */
32
+ /** Renders an `<a>` instead of a `<button>`. */
47
33
  href?: string;
48
- /** The `formaction` attribute for the button when used in a form. */
34
+ /** The `formaction` attribute, for a submit button. */
49
35
  formaction?: string;
50
- /** Whether the button is in a loading state. Displays a loading indicator and may disable interaction. */
36
+ /** Disables the button. On a link, removes it from the tab order and sets `aria-disabled`. */
37
+ disabled?: boolean;
38
+ /** Replaces the icon (or the label, with no icon) with a loading indicator. */
51
39
  loading?: boolean;
52
40
  };
53
- export type ButtonIconProps = ButtonIconVariants & AnchorButtonAttributes & {
41
+ /** @deprecated Use `ButtonProps`. */
42
+ export type ButtonMDProps = ButtonProps;
43
+ export type ToggleProps = HTMLButtonAttributes & {
54
44
  /**
55
- * The visual style of the icon button.
45
+ * Colour style. Unselected and selected colours differ per style; there is no text toggle.
46
+ * @default 'filled'
56
47
  */
57
- variant?: ButtonIconVariants['variant'];
48
+ variant?: 'elevated' | 'filled' | 'tonal' | 'outlined';
49
+ /** @default 'sm' */
50
+ size?: ButtonSize;
58
51
  /**
59
- * The color scheme of the icon button.
52
+ * Resting shape while unselected. Selecting swaps it: round becomes square, square becomes
53
+ * round.
54
+ * @default 'round'
60
55
  */
61
- color?: ButtonIconVariants['color'];
56
+ shape?: 'round' | 'square';
57
+ /** Whether the toggle is selected. Bindable. */
58
+ pressed?: boolean;
59
+ /** Called when the selected state changes. */
60
+ onPressedChange?: (pressed: boolean) => void;
61
+ /** The label. */
62
+ children?: Snippet;
63
+ /** A leading icon, sized for the button. */
64
+ iconProps?: IconProps;
65
+ /** Disables the toggle. */
66
+ disabled?: boolean;
67
+ /** Replaces the icon (or the label, with no icon) with a loading indicator. */
68
+ loading?: boolean;
69
+ };
70
+ /** @deprecated Use `ToggleProps`. */
71
+ export type ToggleMDProps = ToggleProps;
72
+ export type ButtonIconProps = AnchorButtonAttributes & {
62
73
  /**
63
- * The size of the icon button.
74
+ * Colour style. `standard` has no container until hovered, focused or pressed; use it for
75
+ * icon buttons in app bars, fields and other dense places.
76
+ * @default 'filled'
64
77
  */
65
- size?: ButtonIconVariants['size'];
78
+ variant?: 'filled' | 'tonal' | 'outlined' | 'standard';
66
79
  /**
67
- * The width style of the icon button.
68
- * - 'default': Aspect square.
69
- * - 'narrow': Narrower width.
70
- * - 'wide': Wider width.
80
+ * Height 32, 40, 56, 96 or 136dp. XS and S keep a 48dp target area.
81
+ * @default 'sm'
71
82
  */
72
- width?: ButtonIconVariants['width'];
83
+ size?: ButtonSize;
73
84
  /**
74
- * The shape of the icon button corners.
85
+ * Container width around the icon. Use `narrow` and `wide` to fit a layout, for example in a
86
+ * button group.
87
+ * @default 'default'
75
88
  */
76
- shape?: ButtonIconVariants['shape'];
89
+ width?: 'narrow' | 'default' | 'wide';
77
90
  /**
78
- * The variation of the icon button.
79
- * - 'default': Standard icon button.
80
- * - 'toggle': Toggleable icon button.
91
+ * Resting corner shape. A selected toggle swaps it.
92
+ * @default 'round'
81
93
  */
82
- variation?: ButtonIconVariants['variation'];
94
+ shape?: 'round' | 'square';
83
95
  /**
84
- * Optional content to render inside the button (usually not used for icon buttons, but available).
96
+ * `toggle` makes a two-state icon button with `aria-pressed`. Its icon fills while selected.
97
+ * @default 'default'
85
98
  */
86
- children?: Snippet;
87
- /** Whether the icon button is disabled. */
88
- disabled?: boolean;
99
+ variation?: 'default' | 'toggle';
100
+ /** Toggle only: whether it is selected. Bindable. */
101
+ pressed?: boolean;
102
+ /** Toggle only: called when the selected state changes. */
103
+ onPressedChange?: (pressed: boolean) => void;
104
+ /** The icon. */
105
+ iconProps: IconProps;
89
106
  /**
90
- * Content to display in a tooltip when hovering over the button.
91
- * If omitted, no tooltip is shown.
107
+ * Tooltip text, shown on hover and focus. Also the accessible name when no `aria-label` is
108
+ * given, so an icon button should have one or the other.
92
109
  */
93
110
  tooltipContent?: string;
94
- /** CSS class added to the tooltip trigger wrapper. */
111
+ /** Classes for the tooltip trigger. */
95
112
  triggerClass?: string;
96
- /** Configuration for the icon to display. */
97
- iconProps: IconProps;
98
- /** The URL to link to. If provided, the button will render as an `<a>` tag. */
113
+ /** Tooltip side. @default 'top' */
114
+ triggerSide?: 'top' | 'right' | 'bottom' | 'left';
115
+ /** Tooltip alignment. @default 'center' */
116
+ triggerAlign?: 'start' | 'center' | 'end';
117
+ /** Renders an `<a>` instead of a `<button>` (not for toggles). */
99
118
  href?: string;
100
- /** The `formaction` attribute for the button when used in a form. */
119
+ /** The `formaction` attribute, for a submit button. */
101
120
  formaction?: string;
102
- /** Whether the toggle button is pressed (only meaningful when `variation === 'toggle'`). */
103
- pressed?: boolean;
104
- /** Callback when the pressed state changes (only meaningful when `variation === 'toggle'`). */
105
- onPressedChange?: (pressed: boolean) => void;
106
- /** Whether the button is in a loading state. Displays a loading indicator instead of the icon. */
121
+ /** Disables the button. */
122
+ disabled?: boolean;
123
+ /** Replaces the icon with a loading indicator. */
107
124
  loading?: boolean;
108
- /** The side of the tooltip relative to the button. */
109
- triggerSide?: 'top' | 'right' | 'bottom' | 'left';
110
- /** The alignment of the tooltip relative to the button. */
111
- triggerAlign?: 'start' | 'center' | 'end';
112
125
  };
113
- export type FABProps = FABVariants & AnchorButtonAttributes & {
126
+ export type FABProps = AnchorButtonAttributes & {
114
127
  /**
115
- * The color configuration of the FAB.
128
+ * Container and icon colours. `primary-container` is the default; `primary`, `secondary` and
129
+ * `tertiary` are the stronger Expressive styles. With `withMenu`, the colour family also picks
130
+ * the menu's colour set.
131
+ * @default 'primary-container'
116
132
  */
117
- config?: FABVariants['config'];
133
+ color?: FABColor;
118
134
  /**
119
- * The size of the FAB.
135
+ * 56dp `regular`, 80dp `medium` or 96dp `large`. `small` (40dp) is the baseline small FAB,
136
+ * which M3 no longer recommends; it has no extended form.
137
+ * @default 'regular'
120
138
  */
121
- size?: FABVariants['size'];
122
- /** Whether the FAB is disabled. */
123
- disabled?: boolean;
139
+ size?: 'small' | 'regular' | 'medium' | 'large';
124
140
  /**
125
- * Whether the FAB is in its extended state, showing the label.
141
+ * Shows `label` beside the icon: the extended FAB. The two transform into each other with the
142
+ * space available, so this is responsive; the label slides open and closed. Inside a `Rail` it
143
+ * follows the rail: a FAB while collapsed, an extended FAB while expanded. Pass `false` to keep
144
+ * a FAB, or toggle it yourself, for example to collapse while the page scrolls.
145
+ * @default { small: false, medium: true } (outside a rail)
126
146
  */
127
- expanded?: boolean;
128
- /** The text label to display when the FAB is extended. */
147
+ expanded?: Responsive<boolean>;
148
+ /** The extended FAB's label. Also names the collapsed FAB for assistive technology. */
129
149
  label?: string;
130
- /**
131
- * Whether the FAB should toggle a menu when clicked.
132
- * If true, use `children` to provide `FABMenuItem` components.
133
- */
150
+ /** Opens a FAB menu of `FABMenuItem` children. The FAB turns into its close button. */
134
151
  withMenu?: boolean;
135
- /** Configuration for the FAB's icon. */
152
+ /** The icon. */
136
153
  iconProps: IconProps;
137
- /** Whether the FAB is in a loading state. Displays a loading indicator instead of the icon. */
154
+ /** Replaces the icon with a loading indicator. */
138
155
  loading?: boolean;
139
- /** The URL to link to. If provided, the FAB will render as an `<a>` tag. */
156
+ /** Renders an `<a>` instead of a `<button>` (not with `withMenu`). */
140
157
  href?: string;
141
- /** The `formaction` attribute for the FAB when used in a form. */
158
+ /** The `formaction` attribute, for a submit button. */
142
159
  formaction?: string;
160
+ /** Disables the FAB. */
161
+ disabled?: boolean;
162
+ /** With `withMenu`: up to six `FABMenuItem`s. */
163
+ children?: Snippet;
143
164
  /**
144
- * The menu items to display when `withMenu` is true.
145
- * Expected to be one or more `FABMenuItem` components.
165
+ * A surface the FAB opens into with a container transform: the FAB's container grows into it
166
+ * from the FAB's corner, and shrinks back on Escape, an outside click, or `close()`. Keep the
167
+ * FAB's icon in it (for example on its main row) so the icon persists through the transform.
168
+ * Not with `withMenu` or `href`.
146
169
  */
147
- children?: Snippet;
170
+ surface?: Snippet<[{
171
+ close: () => void;
172
+ }]>;
173
+ /** Whether the `surface` is open. Bindable. */
174
+ surfaceOpen?: boolean;
148
175
  };
149
176
  export type FABMenuProps = HTMLAttributes<HTMLDivElement> & {
150
- /**
151
- * The menu items. Use `FABMenuItem` components.
152
- */
177
+ /** The menu items. Use `FABMenuItem` components. */
153
178
  children: Snippet;
154
179
  };
155
- export type FABMenuItemProps = FABMenuItemVariants & AnchorButtonAttributes & {
156
- /**
157
- * The visual variant of the menu item.
158
- */
159
- variant?: FABMenuItemVariants['variant'];
160
- /** Whether the menu item is disabled (skipped by keyboard navigation). */
180
+ export type FABMenuItemProps = AnchorButtonAttributes & {
181
+ /** Disables the item; keyboard navigation skips it. */
161
182
  disabled?: boolean;
162
- /** Whether the menu item is in a loading state. */
183
+ /** Replaces the icon with a loading indicator. */
163
184
  loading?: boolean;
164
- /**
165
- * The content of the menu item (usually a text label).
166
- */
185
+ /** The label. */
167
186
  children: Snippet;
168
- /** Configuration for the menu item's icon. */
187
+ /** The leading icon. */
169
188
  iconProps: IconProps;
170
- /** The URL to link to. If provided, the menu item will render as an `<a>` tag. */
189
+ /** Renders an `<a>` instead of a `<button>`. */
171
190
  href?: string;
172
- /** The `formaction` attribute for the menu item when used in a form. */
191
+ /** The `formaction` attribute, for a submit button. */
173
192
  formaction?: string;
174
193
  };
175
- export type ToggleMDProps = Pick<ButtonMDVariants, 'size' | 'shape'> & HTMLButtonAttributes & {
176
- /** Whether the toggle is currently pressed/selected. Bindable. */
177
- pressed?: boolean;
178
- /** Callback when pressed state changes. */
179
- onPressedChange?: (pressed: boolean) => void;
180
- /** Label or content inside the toggle. */
181
- children?: Snippet;
182
- /** Optional leading icon. */
183
- iconProps?: IconProps;
184
- /** Whether the toggle is disabled. */
185
- disabled?: boolean;
186
- /** Whether the toggle is in a loading state. */
187
- loading?: boolean;
188
- };
@@ -0,0 +1,44 @@
1
+ import { Meta, Title, Subtitle, Canvas, Controls } from '@storybook/addon-docs/blocks';
2
+ import * as CardStories from './Card.stories.svelte';
3
+
4
+ <Meta of={CardStories} />
5
+
6
+ <Title />
7
+
8
+ <Subtitle>Cards group related content and actions about a single subject.</Subtitle>
9
+
10
+ [M3 spec](https://m3.material.io/components/cards/specs) ·
11
+ `import { Card } from '@noxlovette/material';`
12
+
13
+ <Canvas of={CardStories.Playground} />
14
+
15
+ <Controls of={CardStories.Playground} />
16
+
17
+ ## Types
18
+
19
+ `type` picks one of the three M3 treatments: `elevated`, `filled` or `outlined`. A card is a
20
+ container, not a template: title, media and actions are whatever you put in `children`.
21
+
22
+ <Canvas of={CardStories.Types} />
23
+
24
+ ## Clickable cards
25
+
26
+ With `href`, the card renders a real `<a>`. `hoverable` then defaults to on, and so does it
27
+ when `onselect` or `ondelete` is set, so the card gets the state layer. Don't nest another link
28
+ inside a link card. For a card that holds its own buttons, use the selectable pattern below.
29
+
30
+ ```svelte
31
+ <Card href="/details" type="outlined">
32
+ <h3>Go to details</h3>
33
+ </Card>
34
+ ```
35
+
36
+ <Canvas of={CardStories.HoverableLink} />
37
+
38
+ <Canvas of={CardStories.SelectableWithNestedButton} />
39
+
40
+ ## Accessibility
41
+
42
+ - **Native link.** Link cards are a real `<a>`, so they work with the keyboard and assistive
43
+ tech without extra handlers.
44
+ - **Focus.** Interactive cards draw the M3 focus indicator on keyboard focus.
@@ -47,7 +47,7 @@
47
47
  href={args.href}
48
48
  class="max-w-sm"
49
49
  >
50
- <p class="md-sys-typescale-title-medium mb-1">Card title</p>
50
+ <p class="md-sys-typescale-title-medium mb-spacing-50">Card title</p>
51
51
  <p class="text-md-sys-color-on-surface-variant text-sm">
52
52
  Supporting text describing the card's content.
53
53
  </p>
@@ -56,19 +56,19 @@
56
56
  </Story>
57
57
 
58
58
  <Story name="Types" asChild>
59
- <div class="flex flex-wrap gap-4 p-6">
59
+ <div class="gap-spacing-200 p-spacing-300 flex flex-wrap">
60
60
  <Card type="elevated" class="w-56">
61
- <p class="md-sys-typescale-title-medium mb-1">Elevated</p>
61
+ <p class="md-sys-typescale-title-medium mb-spacing-50">Elevated</p>
62
62
  <p class="text-md-sys-color-on-surface-variant text-sm">Shadow separates from background.</p>
63
63
  </Card>
64
64
  <Card type="filled" class="w-56">
65
- <p class="md-sys-typescale-title-medium mb-1">Filled</p>
65
+ <p class="md-sys-typescale-title-medium mb-spacing-50">Filled</p>
66
66
  <p class="text-md-sys-color-on-surface-variant text-sm">
67
67
  Solid background, subtle separation.
68
68
  </p>
69
69
  </Card>
70
70
  <Card type="outlined" class="w-56">
71
- <p class="md-sys-typescale-title-medium mb-1">Outlined</p>
71
+ <p class="md-sys-typescale-title-medium mb-spacing-50">Outlined</p>
72
72
  <p class="text-md-sys-color-on-surface-variant text-sm">Boundary line, least separation.</p>
73
73
  </Card>
74
74
  </div>
@@ -76,7 +76,7 @@
76
76
 
77
77
  <Story name="Hoverable Link" asChild>
78
78
  <Card href="#" class="max-w-sm">
79
- <p class="md-sys-typescale-title-medium mb-1">Clickable card</p>
79
+ <p class="md-sys-typescale-title-medium mb-spacing-50">Clickable card</p>
80
80
  <p class="text-md-sys-color-on-surface-variant text-sm">
81
81
  Rendered as an anchor when <code>href</code> is provided; hoverable defaults to true.
82
82
  </p>
@@ -84,7 +84,7 @@
84
84
  </Story>
85
85
 
86
86
  <Story name="Selectable" asChild>
87
- <div class="flex flex-wrap gap-4 p-6">
87
+ <div class="gap-spacing-200 p-spacing-300 flex flex-wrap">
88
88
  {#each items as item (item.id)}
89
89
  <Card
90
90
  type="outlined"
@@ -96,7 +96,7 @@
96
96
  if (selectedId === item.id) selectedId = null;
97
97
  }}
98
98
  >
99
- <p class="md-sys-typescale-title-medium mb-1">{item.title}</p>
99
+ <p class="md-sys-typescale-title-medium mb-spacing-50">{item.title}</p>
100
100
  <p class="text-md-sys-color-on-surface-variant text-sm">{item.body}</p>
101
101
  </Card>
102
102
  {/each}
@@ -104,15 +104,15 @@
104
104
  </Story>
105
105
 
106
106
  <Story name="Selectable With Nested Button" asChild>
107
- <div class="flex flex-wrap gap-4 p-6">
107
+ <div class="gap-spacing-200 p-spacing-300 flex flex-wrap">
108
108
  <Card
109
109
  type="outlined"
110
110
  class="w-64"
111
111
  onselect={() => console.log('card selected')}
112
112
  ondelete={() => console.log('card deleted')}
113
113
  >
114
- <p class="md-sys-typescale-title-medium mb-1">Card with an action</p>
115
- <p class="text-md-sys-color-on-surface-variant mb-3 text-sm">
114
+ <p class="md-sys-typescale-title-medium mb-spacing-50">Card with an action</p>
115
+ <p class="text-md-sys-color-on-surface-variant mb-spacing-150 text-sm">
116
116
  Clicking the card selects it. The button below calls
117
117
  <code>event.stopPropagation()</code> so it doesn't also trigger selection.
118
118
  </p>
@@ -2,7 +2,7 @@ import { tv } from 'tailwind-variants';
2
2
  export const card = tv({
3
3
  slots: {
4
4
  base: 'relative flex flex-col rounded-lg disabled:opacity-[0.38] disabled:bg-md-sys-color-surface-variant state-layer before:rounded-lg transition-shadow md-sys-motion-effects',
5
- icon: 'size-6 text-[24px] text-md-sys-color-primary'
5
+ icon: 'size-spacing-300 text-[24px] text-md-sys-color-primary'
6
6
  },
7
7
  variants: {
8
8
  type: {
@@ -11,10 +11,10 @@ export const card = tv({
11
11
  outlined: 'bg-md-sys-color-surface outline-1 outline-md-sys-color-outline-variant'
12
12
  },
13
13
  padding: {
14
- none: { base: 'p-0' },
15
- sm: { base: 'p-3' },
16
- md: { base: 'p-4' },
17
- lg: { base: 'p-6' }
14
+ none: { base: 'p-spacing-0' },
15
+ sm: { base: 'p-spacing-150' },
16
+ md: { base: 'p-spacing-200' },
17
+ lg: { base: 'p-spacing-300' }
18
18
  },
19
19
  hoverable: {
20
20
  true: ''
@@ -0,0 +1,68 @@
1
+ import { Meta, Title, Subtitle, Canvas, Controls } from '@storybook/addon-docs/blocks';
2
+ import * as ChipStories from './Chip.stories.svelte';
3
+
4
+ <Meta of={ChipStories} />
5
+
6
+ <Title />
7
+
8
+ <Subtitle>
9
+ Chips help people enter information, make selections, filter content, or trigger actions.
10
+ </Subtitle>
11
+
12
+ [M3 spec](https://m3.material.io/components/chips/specs) ·
13
+ `import { Chip } from '@noxlovette/material';`
14
+
15
+ <Canvas of={ChipStories.Playground} />
16
+
17
+ <Controls of={ChipStories.Playground} />
18
+
19
+ ## Choosing a variant
20
+
21
+ `variant` sets both the look and the element the chip renders:
22
+
23
+ | Variant | Use for | Renders |
24
+ | ------------ | --------------------------------------------------------------- | ------------------------------------------------------ |
25
+ | `assist` | A smart or automated action, like adding an event to a calendar | `<button>` (or `<a>` with `href`); icon tinted primary |
26
+ | `filter` | Filtering content by tags or descriptive words | A toggle; a checkmark replaces the icon when selected |
27
+ | `input` | A piece of information the user entered (a contact, a value) | A plain container; `onRemove` adds a remove button |
28
+ | `suggestion` | A generated suggestion that narrows intent | Like `assist`, without the tinted icon |
29
+
30
+ `elevated` swaps the flat, outlined container for a shadowed one on every variant except `input`,
31
+ which the spec keeps flat. For a static label with no interaction (a status or a count), use
32
+ `Pill` instead.
33
+
34
+ <Canvas of={ChipStories.Assist} />
35
+
36
+ <Canvas of={ChipStories.Filter} />
37
+
38
+ ```svelte
39
+ <Chip variant="filter" bind:selected={wifiOnly}>Wifi</Chip>
40
+ ```
41
+
42
+ <Canvas of={ChipStories.Input} />
43
+
44
+ Render one input chip per entry, and remove the entry from your own array in `onRemove`:
45
+
46
+ ```svelte
47
+ {#each recipients as name}
48
+ <Chip
49
+ variant="input"
50
+ iconProps={{ name: 'person' }}
51
+ onRemove={() => (recipients = recipients.filter((r) => r !== name))}
52
+ >
53
+ {name}
54
+ </Chip>
55
+ {/each}
56
+ ```
57
+
58
+ <Canvas of={ChipStories.Suggestion} />
59
+
60
+ ## Accessibility
61
+
62
+ - **Roles.** Assist and suggestion chips are real buttons or links. Filter chips are toggles
63
+ whose `aria-pressed` reflects `selected`. An input chip's remove button is its own focusable
64
+ `<button>`, never nested inside another interactive element.
65
+ - **Disabled.** Assist, filter and suggestion chips use the native `disabled` attribute. An input
66
+ chip's container is a `<div>`, so it gets `aria-disabled`, and its remove button a real
67
+ `disabled`.
68
+ - **Contrast.** Every state pairs a container with its `on-*` role, so text keeps AA contrast.
@@ -28,7 +28,7 @@
28
28
  <Story name="Playground">Chip</Story>
29
29
 
30
30
  <Story name="Assist" asChild>
31
- <div class="flex flex-wrap items-center gap-4 p-6">
31
+ <div class="gap-spacing-200 p-spacing-300 flex flex-wrap items-center">
32
32
  <Chip variant="assist" iconProps={{ name: 'calendar_today' }}>Set reminder</Chip>
33
33
  <Chip variant="assist" elevated iconProps={{ name: 'calendar_today' }}>Set reminder</Chip>
34
34
  <Chip variant="assist" disabled iconProps={{ name: 'calendar_today' }}>Set reminder</Chip>
@@ -36,7 +36,7 @@
36
36
  </Story>
37
37
 
38
38
  <Story name="Filter" asChild>
39
- <div class="flex flex-wrap items-center gap-4 p-6">
39
+ <div class="gap-spacing-200 p-spacing-300 flex flex-wrap items-center">
40
40
  <Chip variant="filter" bind:selected={filterSelected}>Filter chip</Chip>
41
41
  <Chip variant="filter" iconProps={{ name: 'star' }}>Starred</Chip>
42
42
  <Chip variant="filter" elevated selected>Elevated selected</Chip>
@@ -45,7 +45,7 @@
45
45
  </Story>
46
46
 
47
47
  <Story name="Input" asChild>
48
- <div class="flex flex-wrap items-center gap-4 p-6">
48
+ <div class="gap-spacing-200 p-spacing-300 flex flex-wrap items-center">
49
49
  <Chip variant="input" iconProps={{ name: 'person' }} onRemove={() => {}}>Ada Lovelace</Chip>
50
50
  <Chip variant="input" onRemove={() => {}}>No avatar</Chip>
51
51
  <Chip variant="input" selected iconProps={{ name: 'person' }} onRemove={() => {}}>Selected</Chip
@@ -56,7 +56,7 @@
56
56
  </Story>
57
57
 
58
58
  <Story name="Suggestion" asChild>
59
- <div class="flex flex-wrap items-center gap-4 p-6">
59
+ <div class="gap-spacing-200 p-spacing-300 flex flex-wrap items-center">
60
60
  <Chip variant="suggestion">Try this</Chip>
61
61
  <Chip variant="suggestion" elevated>Elevated</Chip>
62
62
  <Chip variant="suggestion" disabled>Disabled</Chip>
@@ -1,11 +1,11 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
  export const chip = tv({
3
3
  slots: {
4
- base: 'md-component-button-base group inline-flex h-8 max-w-max items-center justify-center gap-2 rounded-sm before:rounded-sm px-4 md-sys-typescale-label-large font-medium',
4
+ base: 'md-component-button-base group inline-flex h-spacing-400 max-w-max items-center justify-center gap-spacing-100 rounded-sm before:rounded-sm px-spacing-200 md-sys-typescale-label-large',
5
5
  icon: 'shrink-0',
6
6
  label: '',
7
- trailing: 'relative -mr-2 ml-1 inline-flex size-[18px] shrink-0 items-center justify-center rounded-full',
8
- checkIcon: 'size-4 shrink-0'
7
+ trailing: 'relative -mr-spacing-100 ml-spacing-50 inline-flex size-[18px] shrink-0 items-center justify-center rounded-full',
8
+ checkIcon: 'size-spacing-200 shrink-0'
9
9
  },
10
10
  variants: {
11
11
  variant: {
@@ -7,6 +7,7 @@
7
7
 
8
8
  const { Story } = defineMeta({
9
9
  title: 'Containers/Action Rail',
10
+ tags: ['autodocs'],
10
11
  component: ActionRail,
11
12
  argTypes: {
12
13
  anchor: {
@@ -1,7 +1,7 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
  export const actionRail = tv({
3
3
  slots: {
4
- base: 'z-30 flex flex-col items-center justify-center right-0'
4
+ base: 'z-30 flex flex-col items-center justify-center right-spacing-0'
5
5
  },
6
6
  variants: {
7
7
  anchor: {