@noxlovette/material 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/README.md +1 -0
  2. package/dist/actions/index.d.ts +1 -0
  3. package/dist/actions/index.js +1 -0
  4. package/dist/actions/rovingFocusGroup.d.ts +20 -0
  5. package/dist/actions/rovingFocusGroup.js +82 -0
  6. package/dist/components/badge/theme.d.ts +8 -8
  7. package/dist/components/buttons/button-group/ButtonGroup.stories.svelte +83 -0
  8. package/dist/components/buttons/button-group/ButtonGroup.stories.svelte.d.ts +19 -0
  9. package/dist/components/buttons/button-group/ButtonGroup.svelte +10 -29
  10. package/dist/components/buttons/button-group/ButtonGroup.svelte.d.ts +7 -3
  11. package/dist/components/buttons/button-group/index.d.ts +0 -1
  12. package/dist/components/buttons/button-group/index.js +3 -1
  13. package/dist/components/buttons/button-group/theme.d.ts +17 -103
  14. package/dist/components/buttons/button-group/theme.js +7 -35
  15. package/dist/components/buttons/button-group/types.d.ts +9 -20
  16. package/dist/components/buttons/connected/ConnectedButtonGroup.stories.svelte +118 -0
  17. package/dist/components/buttons/connected/ConnectedButtonGroup.stories.svelte.d.ts +19 -0
  18. package/dist/components/buttons/connected/ConnectedButtonGroup.svelte +52 -0
  19. package/dist/components/buttons/connected/ConnectedButtonGroup.svelte.d.ts +12 -0
  20. package/dist/components/buttons/connected/ConnectedButtonGroupItem.svelte +37 -0
  21. package/dist/components/buttons/connected/ConnectedButtonGroupItem.svelte.d.ts +9 -0
  22. package/dist/components/buttons/connected/index.d.ts +3 -1
  23. package/dist/components/buttons/connected/index.js +3 -1
  24. package/dist/components/buttons/connected/theme.d.ts +125 -0
  25. package/dist/components/buttons/connected/theme.js +38 -0
  26. package/dist/components/buttons/connected/types.d.ts +32 -13
  27. package/dist/components/buttons/index.d.ts +1 -0
  28. package/dist/components/buttons/index.js +1 -0
  29. package/dist/components/buttons/split-button/SplitButton.stories.svelte +103 -0
  30. package/dist/components/buttons/split-button/SplitButton.stories.svelte.d.ts +19 -0
  31. package/dist/components/buttons/split-button/SplitButton.svelte +104 -0
  32. package/dist/components/buttons/split-button/SplitButton.svelte.d.ts +19 -0
  33. package/dist/components/buttons/split-button/index.d.ts +3 -0
  34. package/dist/components/{containers/panes → buttons/split-button}/index.js +1 -3
  35. package/dist/components/buttons/split-button/theme.d.ts +35 -0
  36. package/dist/components/buttons/split-button/theme.js +26 -0
  37. package/dist/components/buttons/split-button/types.d.ts +33 -0
  38. package/dist/components/buttons/theme.d.ts +142 -142
  39. package/dist/components/buttons/theme.js +2 -2
  40. package/dist/components/cards/Card.stories.svelte +58 -0
  41. package/dist/components/cards/Card.stories.svelte.d.ts +2 -17
  42. package/dist/components/cards/Card.svelte +76 -8
  43. package/dist/components/cards/theme.d.ts +26 -14
  44. package/dist/components/cards/theme.js +5 -1
  45. package/dist/components/cards/types.d.ts +39 -1
  46. package/dist/components/chips/Chip.stories.svelte +64 -0
  47. package/dist/components/chips/Chip.stories.svelte.d.ts +19 -0
  48. package/dist/components/chips/Chip.svelte +115 -0
  49. package/dist/components/chips/Chip.svelte.d.ts +14 -0
  50. package/dist/components/chips/index.d.ts +3 -0
  51. package/dist/components/chips/index.js +6 -0
  52. package/dist/components/chips/theme.d.ts +78 -0
  53. package/dist/components/chips/theme.js +72 -0
  54. package/dist/components/chips/types.d.ts +43 -0
  55. package/dist/components/containers/action-rail/ActionRail.stories.svelte +36 -0
  56. package/dist/components/containers/{panes/SinglePane.stories.svelte.d.ts → action-rail/ActionRail.stories.svelte.d.ts} +4 -4
  57. package/dist/components/containers/action-rail/ActionRail.svelte +35 -0
  58. package/dist/components/containers/action-rail/ActionRail.svelte.d.ts +17 -0
  59. package/dist/components/containers/action-rail/index.d.ts +3 -0
  60. package/dist/components/containers/action-rail/index.js +6 -0
  61. package/dist/components/containers/action-rail/theme.d.ts +45 -0
  62. package/dist/components/containers/action-rail/theme.js +26 -0
  63. package/dist/components/containers/action-rail/types.d.ts +20 -0
  64. package/dist/components/containers/action-rail/types.js +1 -0
  65. package/dist/components/containers/app/App.svelte +6 -6
  66. package/dist/components/containers/app/App.svelte.d.ts +4 -2
  67. package/dist/components/containers/app/theme.d.ts +1 -1
  68. package/dist/components/containers/app/types.d.ts +9 -4
  69. package/dist/components/containers/bottom-sheet/BottomSheet.stories.svelte +1 -1
  70. package/dist/components/containers/bottom-sheet/BottomSheet.svelte +1 -1
  71. package/dist/components/containers/context-menu/ContextMenu.stories.svelte +44 -0
  72. package/dist/components/containers/context-menu/ContextMenu.svelte +21 -5
  73. package/dist/components/containers/context-menu/ContextMenu.svelte.d.ts +11 -0
  74. package/dist/components/containers/context-menu/theme.d.ts +20 -2
  75. package/dist/components/containers/context-menu/theme.js +31 -8
  76. package/dist/components/containers/context-menu/types.d.ts +14 -2
  77. package/dist/components/containers/dialogue/theme.d.ts +20 -20
  78. package/dist/components/containers/divider/theme.d.ts +17 -17
  79. package/dist/components/containers/index.d.ts +2 -3
  80. package/dist/components/containers/index.js +2 -3
  81. package/dist/components/containers/link-preview/theme.d.ts +11 -11
  82. package/dist/components/containers/list/ListItem.stories.svelte +100 -0
  83. package/dist/components/containers/list/ListItem.stories.svelte.d.ts +19 -0
  84. package/dist/components/containers/list/theme.d.ts +14 -14
  85. package/dist/components/containers/list/theme.js +3 -3
  86. package/dist/components/containers/menu/Menu.stories.svelte +105 -3
  87. package/dist/components/containers/menu/Menu.stories.svelte.d.ts +2 -17
  88. package/dist/components/containers/menu/Menu.svelte +9 -7
  89. package/dist/components/containers/menu/MenuCheckboxItem.svelte +55 -0
  90. package/dist/components/containers/menu/MenuCheckboxItem.svelte.d.ts +25 -0
  91. package/dist/components/containers/menu/MenuGroup.svelte +43 -0
  92. package/dist/components/containers/menu/MenuGroup.svelte.d.ts +28 -0
  93. package/dist/components/containers/menu/MenuRadioGroup.svelte +39 -0
  94. package/dist/components/containers/menu/MenuRadioGroup.svelte.d.ts +27 -0
  95. package/dist/components/containers/menu/MenuRadioItem.svelte +49 -0
  96. package/dist/components/containers/menu/MenuRadioItem.svelte.d.ts +17 -0
  97. package/dist/components/containers/menu/MenuSub.svelte +91 -0
  98. package/dist/components/containers/menu/MenuSub.svelte.d.ts +29 -0
  99. package/dist/components/containers/menu/index.d.ts +7 -0
  100. package/dist/components/containers/menu/index.js +8 -0
  101. package/dist/components/containers/menu/menu-item/MenuItem.svelte +71 -0
  102. package/dist/components/containers/{menu-item → menu/menu-item}/MenuItem.svelte.d.ts +2 -1
  103. package/dist/components/containers/{menu-item → menu/menu-item}/types.d.ts +5 -1
  104. package/dist/components/containers/menu/menu-item/types.js +1 -0
  105. package/dist/components/containers/menu/theme.d.ts +68 -0
  106. package/dist/components/containers/menu/theme.js +36 -0
  107. package/dist/components/containers/menu/types.d.ts +113 -2
  108. package/dist/components/containers/pane/DraggablePane.stories.svelte +199 -0
  109. package/dist/components/containers/pane/DraggablePane.stories.svelte.d.ts +4 -0
  110. package/dist/components/containers/pane/DraggablePane.svelte +533 -0
  111. package/dist/components/containers/pane/DraggablePane.svelte.d.ts +29 -0
  112. package/dist/components/containers/pane/Pane.stories.svelte +104 -0
  113. package/dist/components/containers/pane/Pane.stories.svelte.d.ts +19 -0
  114. package/dist/components/containers/pane/Pane.svelte +78 -0
  115. package/dist/components/containers/pane/Pane.svelte.d.ts +18 -0
  116. package/dist/components/containers/pane/PaneGrid.stories.svelte +134 -0
  117. package/dist/components/containers/pane/PaneGrid.stories.svelte.d.ts +19 -0
  118. package/dist/components/containers/pane/PaneGrid.svelte +43 -0
  119. package/dist/components/containers/pane/PaneGrid.svelte.d.ts +13 -0
  120. package/dist/components/containers/pane/PaneHandle.svelte +90 -0
  121. package/dist/components/containers/pane/PaneHandle.svelte.d.ts +12 -0
  122. package/dist/components/containers/pane/dragStore.svelte.d.ts +16 -0
  123. package/dist/components/containers/pane/dragStore.svelte.js +38 -0
  124. package/dist/components/containers/pane/index.d.ts +8 -0
  125. package/dist/components/containers/pane/index.js +11 -0
  126. package/dist/components/containers/pane/resizeStore.svelte.d.ts +10 -0
  127. package/dist/components/containers/pane/resizeStore.svelte.js +30 -0
  128. package/dist/components/containers/pane/theme.d.ts +571 -0
  129. package/dist/components/containers/pane/theme.js +211 -0
  130. package/dist/components/containers/pane/types.d.ts +249 -0
  131. package/dist/components/containers/pane/types.js +1 -0
  132. package/dist/components/containers/popover/Popover.stories.svelte +4 -4
  133. package/dist/components/containers/popover/Popover.svelte +3 -1
  134. package/dist/components/containers/popover/theme.d.ts +20 -20
  135. package/dist/components/containers/popover/types.d.ts +6 -2
  136. package/dist/components/containers/scroll-area/theme.d.ts +2 -2
  137. package/dist/components/containers/side-sheet/SideSheet.stories.svelte +16 -24
  138. package/dist/components/containers/side-sheet/SideSheet.svelte +73 -7
  139. package/dist/components/containers/side-sheet/SideSheet.svelte.d.ts +5 -0
  140. package/dist/components/containers/stack/theme.d.ts +44 -44
  141. package/dist/components/date/DateField.stories.svelte +57 -0
  142. package/dist/components/{containers/panes/SplitPane.stories.svelte.d.ts → date/DateField.stories.svelte.d.ts} +4 -4
  143. package/dist/components/date/DateField.svelte +11 -2
  144. package/dist/components/date/DateRangeField.stories.svelte +53 -0
  145. package/dist/components/{containers/panes/SupportingPane.stories.svelte.d.ts → date/DateRangeField.stories.svelte.d.ts} +4 -4
  146. package/dist/components/date/DateRangeField.svelte +2 -1
  147. package/dist/components/date/theme.d.ts +73 -4
  148. package/dist/components/date/theme.js +95 -26
  149. package/dist/components/date/types.d.ts +5 -0
  150. package/dist/components/forms/checkbox/Checkbox.svelte +7 -9
  151. package/dist/components/forms/checkbox/theme.d.ts +8 -8
  152. package/dist/components/forms/checkbox/theme.js +31 -9
  153. package/dist/components/forms/command/Command.stories.svelte +86 -0
  154. package/dist/components/forms/command/Command.stories.svelte.d.ts +19 -0
  155. package/dist/components/forms/command/theme.d.ts +35 -35
  156. package/dist/components/forms/command/theme.js +4 -4
  157. package/dist/components/forms/pin/theme.d.ts +2 -2
  158. package/dist/components/forms/radio-group/theme.d.ts +2 -2
  159. package/dist/components/forms/search/theme.d.ts +8 -8
  160. package/dist/components/forms/select/Select.svelte +3 -2
  161. package/dist/components/forms/select/theme.d.ts +26 -2
  162. package/dist/components/forms/select/theme.js +56 -22
  163. package/dist/components/forms/slider/theme.d.ts +20 -20
  164. package/dist/components/forms/switch/theme.d.ts +2 -2
  165. package/dist/components/forms/textfield/Textfield.stories.svelte +22 -0
  166. package/dist/components/forms/textfield/Textfield.svelte +10 -1
  167. package/dist/components/forms/textfield/theme.d.ts +44 -2
  168. package/dist/components/forms/textfield/theme.js +56 -16
  169. package/dist/components/forms/toggle-group/ToggleGroup.svelte +2 -2
  170. package/dist/components/forms/toggle-group/ToggleGroup.svelte.d.ts +2 -2
  171. package/dist/components/forms/toggle-group/ToggleGroupItem.svelte +1 -1
  172. package/dist/components/forms/toggle-group/ToggleGroupItem.svelte.d.ts +1 -1
  173. package/dist/components/forms/toggle-group/theme.d.ts +16 -16
  174. package/dist/components/forms/toggle-group/types.d.ts +2 -2
  175. package/dist/components/forms/tooltip/Tooltip.stories.svelte +90 -0
  176. package/dist/components/forms/tooltip/Tooltip.stories.svelte.d.ts +19 -0
  177. package/dist/components/forms/tooltip/Tooltip.svelte +5 -4
  178. package/dist/components/forms/tooltip/theme.d.ts +5 -2
  179. package/dist/components/forms/tooltip/theme.js +6 -5
  180. package/dist/components/index.d.ts +1 -0
  181. package/dist/components/index.js +1 -0
  182. package/dist/components/misc/Avatar.stories.svelte +63 -0
  183. package/dist/components/misc/Avatar.stories.svelte.d.ts +19 -0
  184. package/dist/components/misc/Avatar.svelte +35 -10
  185. package/dist/components/misc/DicebearAvatarBuilder.d.ts +59 -0
  186. package/dist/components/misc/DicebearAvatarBuilder.js +115 -0
  187. package/dist/components/misc/ThemeSettings.svelte +1 -1
  188. package/dist/components/misc/ThemeSwitcher.svelte +2 -2
  189. package/dist/components/misc/dicebearStyles.d.ts +21 -0
  190. package/dist/components/misc/dicebearStyles.js +169 -0
  191. package/dist/components/misc/index.d.ts +3 -0
  192. package/dist/components/misc/index.js +3 -0
  193. package/dist/components/misc/materialAvatarPalette.d.ts +6 -0
  194. package/dist/components/misc/materialAvatarPalette.js +44 -0
  195. package/dist/components/misc/theme.d.ts +20 -2
  196. package/dist/components/misc/theme.js +9 -3
  197. package/dist/components/misc/types.d.ts +20 -2
  198. package/dist/components/nav/appbar/AppBar.stories.svelte +1 -1
  199. package/dist/components/nav/appbar/AppBar.svelte +46 -15
  200. package/dist/components/nav/appbar/AppBar.svelte.d.ts +5 -0
  201. package/dist/components/nav/appbar/theme.d.ts +20 -14
  202. package/dist/components/nav/appbar/theme.js +11 -7
  203. package/dist/components/nav/appbar/types.d.ts +3 -1
  204. package/dist/components/nav/breadcrumb/Breadcrumb.stories.svelte +50 -0
  205. package/dist/components/nav/breadcrumb/Breadcrumb.stories.svelte.d.ts +19 -0
  206. package/dist/components/nav/breadcrumb/Breadcrumb.svelte +46 -0
  207. package/dist/components/nav/breadcrumb/Breadcrumb.svelte.d.ts +13 -0
  208. package/dist/components/nav/breadcrumb/index.d.ts +3 -0
  209. package/dist/components/nav/breadcrumb/index.js +6 -0
  210. package/dist/components/nav/breadcrumb/theme.d.ts +84 -0
  211. package/dist/components/nav/breadcrumb/theme.js +35 -0
  212. package/dist/components/nav/breadcrumb/types.d.ts +14 -0
  213. package/dist/components/nav/breadcrumb/types.js +1 -0
  214. package/dist/components/nav/index.d.ts +1 -0
  215. package/dist/components/nav/index.js +1 -0
  216. package/dist/components/nav/navbar/theme.d.ts +19 -19
  217. package/dist/components/nav/rail/Rail.stories.svelte +1 -5
  218. package/dist/components/nav/rail/Rail.svelte +3 -25
  219. package/dist/components/nav/rail/theme.d.ts +4 -4
  220. package/dist/components/nav/rail/types.d.ts +0 -5
  221. package/dist/components/nav/tabs/TabHolder.svelte +2 -1
  222. package/dist/components/nav/tabs/theme.d.ts +21 -21
  223. package/dist/components/nav/tabs/theme.js +6 -0
  224. package/dist/components/nav/tabs/types.d.ts +2 -2
  225. package/dist/components/pill/theme.d.ts +35 -35
  226. package/dist/components/snackbar/theme.d.ts +8 -8
  227. package/dist/components/table/Table.stories.svelte +267 -0
  228. package/dist/components/table/Table.stories.svelte.d.ts +19 -0
  229. package/dist/components/table/Table.svelte +1 -1
  230. package/dist/components/table/TableBody.svelte +16 -3
  231. package/dist/components/table/TableBody.svelte.d.ts +5 -1
  232. package/dist/components/table/TableRow.svelte +1 -1
  233. package/dist/components/table/theme.d.ts +2 -2
  234. package/dist/components/table/theme.js +2 -2
  235. package/dist/components/table/types.d.ts +7 -0
  236. package/dist/components/time/theme.d.ts +29 -29
  237. package/dist/components/time/theme.js +2 -2
  238. package/dist/components/toolbar/Toolbar.stories.svelte +71 -0
  239. package/dist/components/toolbar/Toolbar.stories.svelte.d.ts +19 -0
  240. package/dist/components/toolbar/Toolbar.svelte +19 -3
  241. package/dist/components/toolbar/Toolbar.svelte.d.ts +8 -2
  242. package/dist/components/toolbar/ToolbarButton.svelte +28 -4
  243. package/dist/components/toolbar/ToolbarDivider.svelte +4 -3
  244. package/dist/components/toolbar/ToolbarGroup.svelte +7 -2
  245. package/dist/components/toolbar/ToolbarGroupItem.svelte +29 -4
  246. package/dist/components/toolbar/ToolbarSection.svelte +35 -0
  247. package/dist/components/toolbar/ToolbarSection.svelte.d.ts +9 -0
  248. package/dist/components/toolbar/ToolbarSpacer.svelte +18 -0
  249. package/dist/components/toolbar/ToolbarSpacer.svelte.d.ts +9 -0
  250. package/dist/components/toolbar/index.d.ts +2 -0
  251. package/dist/components/toolbar/index.js +2 -0
  252. package/dist/components/toolbar/theme.d.ts +36 -21
  253. package/dist/components/toolbar/theme.js +27 -11
  254. package/dist/components/toolbar/types.d.ts +37 -4
  255. package/dist/components/typography/body/theme.d.ts +14 -14
  256. package/dist/components/typography/display/theme.d.ts +14 -14
  257. package/dist/components/typography/headline/theme.d.ts +14 -14
  258. package/dist/components/typography/kbd/Kbd.stories.svelte +41 -0
  259. package/dist/components/typography/kbd/Kbd.stories.svelte.d.ts +19 -0
  260. package/dist/components/typography/kbd/theme.d.ts +9 -9
  261. package/dist/components/typography/kbd/theme.js +2 -2
  262. package/dist/components/typography/label/theme.d.ts +14 -14
  263. package/dist/components/typography/title/theme.d.ts +14 -14
  264. package/dist/styles/component.css +126 -4
  265. package/dist/styles/motion.css +6 -3
  266. package/dist/utils/Layer.svelte +7 -3
  267. package/dist/utils/Theme.svelte +20 -20
  268. package/dist/utils/ThemeScript.svelte +1 -1
  269. package/dist/utils/icon/theme.d.ts +14 -14
  270. package/package.json +38 -37
  271. package/bin/install-skill.js +0 -29
  272. package/dist/components/buttons/button-group/ButtonGroupItem.svelte +0 -41
  273. package/dist/components/buttons/button-group/ButtonGroupItem.svelte.d.ts +0 -8
  274. package/dist/components/buttons/connected/ConnectedButtons.svelte +0 -14
  275. package/dist/components/buttons/connected/ConnectedButtons.svelte.d.ts +0 -8
  276. package/dist/components/containers/menu-item/MenuItem.svelte +0 -74
  277. package/dist/components/containers/merger/InputMerger.svelte +0 -29
  278. package/dist/components/containers/merger/InputMerger.svelte.d.ts +0 -14
  279. package/dist/components/containers/merger/index.d.ts +0 -1
  280. package/dist/components/containers/merger/index.js +0 -3
  281. package/dist/components/containers/panes/SinglePane.stories.svelte +0 -67
  282. package/dist/components/containers/panes/SinglePane.svelte +0 -32
  283. package/dist/components/containers/panes/SinglePane.svelte.d.ts +0 -5
  284. package/dist/components/containers/panes/SplitPane.stories.svelte +0 -124
  285. package/dist/components/containers/panes/SplitPane.svelte +0 -144
  286. package/dist/components/containers/panes/SplitPane.svelte.d.ts +0 -8
  287. package/dist/components/containers/panes/SupportingPane.stories.svelte +0 -113
  288. package/dist/components/containers/panes/SupportingPane.svelte +0 -175
  289. package/dist/components/containers/panes/SupportingPane.svelte.d.ts +0 -9
  290. package/dist/components/containers/panes/index.d.ts +0 -5
  291. package/dist/components/containers/panes/theme.d.ts +0 -490
  292. package/dist/components/containers/panes/theme.js +0 -185
  293. package/dist/components/containers/panes/types.d.ts +0 -108
  294. package/dist/components/nav/rail/RailNavContext.svelte +0 -14
  295. package/dist/components/nav/rail/RailNavContext.svelte.d.ts +0 -8
  296. /package/dist/components/{containers/menu-item → buttons/split-button}/types.js +0 -0
  297. /package/dist/components/{containers/panes → chips}/types.js +0 -0
  298. /package/dist/components/containers/{menu-item → menu/menu-item}/index.d.ts +0 -0
  299. /package/dist/components/containers/{menu-item → menu/menu-item}/index.js +0 -0
@@ -0,0 +1,169 @@
1
+ import { OptionsDescriptor, Style } from '@dicebear/core';
2
+ /**
3
+ * Every style shipped by `@dicebear/styles` (v10). Kept as the single source of
4
+ * truth for the `DicebearStyle` type in `types.ts` — extend this list first when
5
+ * DiceBear adds a new style, everything else derives from it.
6
+ */
7
+ export const DICEBEAR_STYLES = [
8
+ 'adventurer',
9
+ 'adventurer-neutral',
10
+ 'avataaars',
11
+ 'avataaars-neutral',
12
+ 'big-ears',
13
+ 'big-ears-neutral',
14
+ 'big-smile',
15
+ 'blobs',
16
+ 'bottts',
17
+ 'bottts-neutral',
18
+ 'cameo',
19
+ 'clay',
20
+ 'constellation',
21
+ 'critters',
22
+ 'croodles',
23
+ 'croodles-neutral',
24
+ 'cutouts',
25
+ 'disco',
26
+ 'dylan',
27
+ 'fun-emoji',
28
+ 'gaze',
29
+ 'glass',
30
+ 'glyphs',
31
+ 'icons',
32
+ 'identicon',
33
+ 'initial-face',
34
+ 'initials',
35
+ 'landscape',
36
+ 'line-face',
37
+ 'loops',
38
+ 'lorelei',
39
+ 'lorelei-neutral',
40
+ 'marbles',
41
+ 'micah',
42
+ 'miniavs',
43
+ 'moods',
44
+ 'notionists',
45
+ 'notionists-neutral',
46
+ 'open-peeps',
47
+ 'patchwork',
48
+ 'personas',
49
+ 'pixel-art',
50
+ 'pixel-art-neutral',
51
+ 'pixelbot',
52
+ 'planets',
53
+ 'rings',
54
+ 'shadows',
55
+ 'shape-grid',
56
+ 'shapes',
57
+ 'slice',
58
+ 'sprouts',
59
+ 'squircles',
60
+ 'stack',
61
+ 'stripes',
62
+ 'thumbs',
63
+ 'toon-head',
64
+ 'triangles',
65
+ 'voxel-art',
66
+ 'voxel-bot',
67
+ 'waves',
68
+ 'weave'
69
+ ];
70
+ /**
71
+ * One dynamic `import()` per style, written out literally (not a template
72
+ * expression) so every bundler — Vite, Rollup, webpack, esbuild — can
73
+ * statically analyze and code-split each style into its own lazily-loaded
74
+ * chunk. A generated/templated import here would defeat that analysis.
75
+ */
76
+ // Not annotated with an explicit `StyleDefinition` return type: TS widens the enum-like string
77
+ // literals inside each imported JSON module (e.g. element `type`) to `string`, which doesn't
78
+ // structurally satisfy `StyleDefinition`'s literal unions. `Style` is happy to accept the
79
+ // as-imported shape directly (it validates the real JSON against DiceBear's schema at runtime).
80
+ const styleLoaders = {
81
+ adventurer: () => import('@dicebear/styles/adventurer.json'),
82
+ 'adventurer-neutral': () => import('@dicebear/styles/adventurer-neutral.json'),
83
+ avataaars: () => import('@dicebear/styles/avataaars.json'),
84
+ 'avataaars-neutral': () => import('@dicebear/styles/avataaars-neutral.json'),
85
+ 'big-ears': () => import('@dicebear/styles/big-ears.json'),
86
+ 'big-ears-neutral': () => import('@dicebear/styles/big-ears-neutral.json'),
87
+ 'big-smile': () => import('@dicebear/styles/big-smile.json'),
88
+ blobs: () => import('@dicebear/styles/blobs.json'),
89
+ bottts: () => import('@dicebear/styles/bottts.json'),
90
+ 'bottts-neutral': () => import('@dicebear/styles/bottts-neutral.json'),
91
+ cameo: () => import('@dicebear/styles/cameo.json'),
92
+ clay: () => import('@dicebear/styles/clay.json'),
93
+ constellation: () => import('@dicebear/styles/constellation.json'),
94
+ critters: () => import('@dicebear/styles/critters.json'),
95
+ croodles: () => import('@dicebear/styles/croodles.json'),
96
+ 'croodles-neutral': () => import('@dicebear/styles/croodles-neutral.json'),
97
+ cutouts: () => import('@dicebear/styles/cutouts.json'),
98
+ disco: () => import('@dicebear/styles/disco.json'),
99
+ dylan: () => import('@dicebear/styles/dylan.json'),
100
+ 'fun-emoji': () => import('@dicebear/styles/fun-emoji.json'),
101
+ gaze: () => import('@dicebear/styles/gaze.json'),
102
+ glass: () => import('@dicebear/styles/glass.json'),
103
+ glyphs: () => import('@dicebear/styles/glyphs.json'),
104
+ icons: () => import('@dicebear/styles/icons.json'),
105
+ identicon: () => import('@dicebear/styles/identicon.json'),
106
+ 'initial-face': () => import('@dicebear/styles/initial-face.json'),
107
+ initials: () => import('@dicebear/styles/initials.json'),
108
+ landscape: () => import('@dicebear/styles/landscape.json'),
109
+ 'line-face': () => import('@dicebear/styles/line-face.json'),
110
+ loops: () => import('@dicebear/styles/loops.json'),
111
+ lorelei: () => import('@dicebear/styles/lorelei.json'),
112
+ 'lorelei-neutral': () => import('@dicebear/styles/lorelei-neutral.json'),
113
+ marbles: () => import('@dicebear/styles/marbles.json'),
114
+ micah: () => import('@dicebear/styles/micah.json'),
115
+ miniavs: () => import('@dicebear/styles/miniavs.json'),
116
+ moods: () => import('@dicebear/styles/moods.json'),
117
+ notionists: () => import('@dicebear/styles/notionists.json'),
118
+ 'notionists-neutral': () => import('@dicebear/styles/notionists-neutral.json'),
119
+ 'open-peeps': () => import('@dicebear/styles/open-peeps.json'),
120
+ patchwork: () => import('@dicebear/styles/patchwork.json'),
121
+ personas: () => import('@dicebear/styles/personas.json'),
122
+ 'pixel-art': () => import('@dicebear/styles/pixel-art.json'),
123
+ 'pixel-art-neutral': () => import('@dicebear/styles/pixel-art-neutral.json'),
124
+ pixelbot: () => import('@dicebear/styles/pixelbot.json'),
125
+ planets: () => import('@dicebear/styles/planets.json'),
126
+ rings: () => import('@dicebear/styles/rings.json'),
127
+ shadows: () => import('@dicebear/styles/shadows.json'),
128
+ 'shape-grid': () => import('@dicebear/styles/shape-grid.json'),
129
+ shapes: () => import('@dicebear/styles/shapes.json'),
130
+ slice: () => import('@dicebear/styles/slice.json'),
131
+ sprouts: () => import('@dicebear/styles/sprouts.json'),
132
+ squircles: () => import('@dicebear/styles/squircles.json'),
133
+ stack: () => import('@dicebear/styles/stack.json'),
134
+ stripes: () => import('@dicebear/styles/stripes.json'),
135
+ thumbs: () => import('@dicebear/styles/thumbs.json'),
136
+ 'toon-head': () => import('@dicebear/styles/toon-head.json'),
137
+ triangles: () => import('@dicebear/styles/triangles.json'),
138
+ 'voxel-art': () => import('@dicebear/styles/voxel-art.json'),
139
+ 'voxel-bot': () => import('@dicebear/styles/voxel-bot.json'),
140
+ waves: () => import('@dicebear/styles/waves.json'),
141
+ weave: () => import('@dicebear/styles/weave.json')
142
+ };
143
+ const styleCache = new Map();
144
+ /** Lazily imports and validates a style definition, caching the resulting `Style` instance. */
145
+ export function loadDicebearStyle(name) {
146
+ let cached = styleCache.get(name);
147
+ if (!cached) {
148
+ cached = styleLoaders[name]().then((mod) => new Style(mod.default));
149
+ styleCache.set(name, cached);
150
+ }
151
+ return cached;
152
+ }
153
+ const descriptorCache = new Map();
154
+ /** Lazily builds the `OptionsDescriptor` JSON for a style, describing every option it accepts. */
155
+ export function loadDicebearOptionsDescriptor(name) {
156
+ let cached = descriptorCache.get(name);
157
+ if (!cached) {
158
+ cached = loadDicebearStyle(name).then((style) => new OptionsDescriptor(style).toJSON());
159
+ descriptorCache.set(name, cached);
160
+ }
161
+ return cached;
162
+ }
163
+ /** Turns a style name like `big-ears-neutral` into `Big Ears Neutral`. */
164
+ export function formatDicebearStyleLabel(name) {
165
+ return name
166
+ .split('-')
167
+ .map((part) => part.charAt(0).toUpperCase() + part.slice(1))
168
+ .join(' ');
169
+ }
@@ -1,3 +1,6 @@
1
+ export * from './DicebearAvatarBuilder.js';
2
+ export * from './dicebearStyles.js';
3
+ export * from './materialAvatarPalette.js';
1
4
  export * from './theme.js';
2
5
  export * from './types.js';
3
6
  export { default as Avatar } from './Avatar.svelte';
@@ -1,5 +1,8 @@
1
1
  // THIS FILE IS AUTO-GENERATED BY scripts/generate-components-index.ts - DO NOT EDIT MANUALLY
2
2
  // re-export TS/JS modules from this folder
3
+ export * from './DicebearAvatarBuilder.js';
4
+ export * from './dicebearStyles.js';
5
+ export * from './materialAvatarPalette.js';
3
6
  export * from './theme.js';
4
7
  export * from './types.js';
5
8
  // default exports for components in this folder
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Reads the current app's resolved container-tier color tokens as hex strings, for use as
3
+ * DiceBear's `backgroundColor` option. Falls back to a neutral default outside the browser
4
+ * (SSR) or before the theme stylesheet has painted.
5
+ */
6
+ export declare function getMaterialAvatarPalette(): string[];
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Container-tier M3 color roles (see `styles/theme/*.css`) used as a generated avatar's
3
+ * background. Deliberately NOT a fixed hex list: every consuming app picks its own source
4
+ * color (`ThemeConfig.sourceColor` in `theme.svelte.ts`), which the M3 dynamic color
5
+ * algorithm expands into these tokens as real `--color-md-sys-color-*` custom properties on
6
+ * `:root` — reading them live is what makes the avatar match that app's actual palette
7
+ * instead of this library's own hardcoded pastel.
8
+ */
9
+ const CONTAINER_TOKENS = [
10
+ '--color-md-sys-color-primary-container',
11
+ '--color-md-sys-color-secondary-container',
12
+ '--color-md-sys-color-tertiary-container',
13
+ '--color-md-sys-color-error-container',
14
+ '--color-md-sys-color-surface-container-highest'
15
+ ];
16
+ /** Used server-side, or if a token hasn't been painted yet (styles not loaded). */
17
+ const FALLBACK_PALETTE = ['e9ddff', 'e8def8', 'ffd9e3', 'ffdad6', 'e6e0e9'];
18
+ /** Converts the `rgb(r g b)` (or `rgb(r, g, b)`) format these tokens are always defined in to hex. */
19
+ function rgbStringToHex(value) {
20
+ const channels = value.match(/\d+(?:\.\d+)?/g);
21
+ if (!channels || channels.length < 3)
22
+ return undefined;
23
+ return channels
24
+ .slice(0, 3)
25
+ .map((n) => Math.round(Math.max(0, Math.min(255, parseFloat(n))))
26
+ .toString(16)
27
+ .padStart(2, '0'))
28
+ .join('');
29
+ }
30
+ /**
31
+ * Reads the current app's resolved container-tier color tokens as hex strings, for use as
32
+ * DiceBear's `backgroundColor` option. Falls back to a neutral default outside the browser
33
+ * (SSR) or before the theme stylesheet has painted.
34
+ */
35
+ export function getMaterialAvatarPalette() {
36
+ if (typeof window === 'undefined')
37
+ return FALLBACK_PALETTE;
38
+ const styles = getComputedStyle(document.documentElement);
39
+ const palette = CONTAINER_TOKENS.map((token) => {
40
+ const raw = styles.getPropertyValue(token).trim();
41
+ return raw ? rgbStringToHex(raw) : undefined;
42
+ }).filter((hex) => Boolean(hex));
43
+ return palette.length > 0 ? palette : FALLBACK_PALETTE;
44
+ }
@@ -1,5 +1,11 @@
1
1
  export declare const avatar: import("tailwind-variants").TVReturnType<{
2
2
  size: {
3
+ xxs: {
4
+ root: string;
5
+ };
6
+ xs: {
7
+ root: string;
8
+ };
3
9
  sm: {
4
10
  root: string;
5
11
  };
@@ -17,6 +23,12 @@ export declare const avatar: import("tailwind-variants").TVReturnType<{
17
23
  button: string;
18
24
  }, undefined, {
19
25
  size: {
26
+ xxs: {
27
+ root: string;
28
+ };
29
+ xs: {
30
+ root: string;
31
+ };
20
32
  sm: {
21
33
  root: string;
22
34
  };
@@ -32,8 +44,14 @@ export declare const avatar: import("tailwind-variants").TVReturnType<{
32
44
  image: string;
33
45
  fallback: string;
34
46
  button: string;
35
- }, import("tailwind-variants").TVReturnType<{
47
+ }, import("tailwind-variants").TVReturnTypeLike<{
36
48
  size: {
49
+ xxs: {
50
+ root: string;
51
+ };
52
+ xs: {
53
+ root: string;
54
+ };
37
55
  sm: {
38
56
  root: string;
39
57
  };
@@ -49,4 +67,4 @@ export declare const avatar: import("tailwind-variants").TVReturnType<{
49
67
  image: string;
50
68
  fallback: string;
51
69
  button: string;
52
- }, undefined, unknown, unknown, undefined>>;
70
+ }>>;
@@ -3,11 +3,17 @@ export const avatar = tv({
3
3
  slots: {
4
4
  root: 'relative flex aspect-square shrink-0 items-center justify-center overflow-hidden rounded-full',
5
5
  image: 'h-full w-full object-cover',
6
- fallback: 'flex h-full w-full items-center justify-center rounded-full bg-surface-container-highest',
7
- button: 'relative rounded-full focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary'
6
+ fallback: 'flex h-full w-full items-center justify-center rounded-full bg-md-sys-color-surface-container-highest',
7
+ button: 'relative rounded-full focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-md-sys-color-primary'
8
8
  },
9
9
  variants: {
10
10
  size: {
11
+ xxs: {
12
+ root: 'size-5'
13
+ },
14
+ xs: {
15
+ root: 'size-8'
16
+ },
11
17
  sm: {
12
18
  root: 'size-12'
13
19
  },
@@ -20,6 +26,6 @@ export const avatar = tv({
20
26
  }
21
27
  },
22
28
  defaultVariants: {
23
- size: 'lg'
29
+ size: 'md'
24
30
  }
25
31
  });
@@ -1,9 +1,13 @@
1
1
  import type { Avatar as AvatarPrimitive } from 'bits-ui';
2
2
  import type { VariantProps } from 'tailwind-variants';
3
+ import type { DicebearStyleName } from './dicebearStyles.js';
3
4
  import type { avatar } from './theme.js';
4
5
  export type AvatarVariants = VariantProps<typeof avatar>;
5
- /** Dicebear (https://www.dicebear.com) avatar styles available for the generated fallback avatar. */
6
- export type DicebearStyle = 'shapes' | 'adventurer' | 'adventurer-neutral' | 'avataaars' | 'avataaars-neutral' | 'big-ears' | 'big-ears-neutral' | 'big-smile' | 'bottts' | 'bottts-neutral' | 'croodles' | 'croodles-neutral' | 'dylan' | 'fun-emoji' | 'glass' | 'icons' | 'identicon' | 'initials' | 'lorelei' | 'lorelei-neutral' | 'micah' | 'miniavs' | 'notionists' | 'notionists-neutral' | 'open-peeps' | 'personas' | 'pixel-art' | 'pixel-art-neutral' | 'rings' | 'thumbs';
6
+ /**
7
+ * Dicebear (https://www.dicebear.com) avatar styles available for the generated fallback
8
+ * avatar. Derived from `DICEBEAR_STYLES` in `dicebearStyles.ts` — extend the list there.
9
+ */
10
+ export type DicebearStyle = DicebearStyleName;
7
11
  export type AvatarProps = AvatarPrimitive.RootProps & {
8
12
  /** The URL of the avatar image. If null or undefined, a generated avatar will be used. */
9
13
  src?: string | null;
@@ -13,6 +17,20 @@ export type AvatarProps = AvatarPrimitive.RootProps & {
13
17
  seed?: string;
14
18
  /** The Dicebear style used for the generated fallback avatar. @default 'shapes' */
15
19
  dicebearStyle?: DicebearStyle;
20
+ /**
21
+ * Hex background colors (no `#`) for the generated fallback avatar. Defaults to the
22
+ * current app's own M3 container-tier tokens (`getMaterialAvatarPalette()`), read live
23
+ * from CSS custom properties — every app's tokens differ since they derive from that
24
+ * app's own chosen source color, so the fallback isn't a fixed palette.
25
+ */
26
+ backgroundColor?: string[];
27
+ /**
28
+ * DiceBear variant tags for the generated fallback avatar, e.g. `['animation']` to opt a
29
+ * supporting style (`gaze`, `shapes`, `blobs`, …) into its animated variants, or
30
+ * `['!animation']` to force the static one. A no-op for styles without that tag.
31
+ * @see https://www.dicebear.com/guides/filter-variants-with-tags
32
+ */
33
+ tags?: string[];
16
34
  /** The loading status of the avatar image. */
17
35
  loadingStatus?: 'loading' | 'loaded' | 'error';
18
36
  /** Callback for when the avatar is clicked. If provided, the avatar is wrapped in a button. */
@@ -7,7 +7,7 @@
7
7
  title: 'Navigation/App Bar',
8
8
  component: AppBar,
9
9
  parameters: {
10
- // AppBar is the mobile top bar (md:hidden) — preview it at a mobile viewport.
10
+ // AppBar is fixed across all screen sizes — preview it at a mobile viewport.
11
11
  viewport: { defaultViewport: 'mobile1' }
12
12
  },
13
13
  argTypes: {
@@ -5,6 +5,11 @@ Material 3 App Bar.
5
5
  Top app bars provide content and actions related to the current screen.
6
6
  They’re used for branding, screen titles, navigation, and actions.
7
7
 
8
+ Publishes its measured height as `--appbar-height` on the document root, so any
9
+ `Pane`/`PaneGrid` on the page (`full`, the default) shrinks its `min-height` by
10
+ that amount with no props or wiring on either side — see Pane.svelte's doc
11
+ comment.
12
+
8
13
  @see https://m3.material.io/components/top-app-bar/overview
9
14
  -->
10
15
  <script lang="ts">
@@ -19,6 +24,7 @@ They’re used for branding, screen titles, navigation, and actions.
19
24
  trailing,
20
25
  leading,
21
26
  class: className,
27
+ rowClass,
22
28
  showBack,
23
29
  ghost = false,
24
30
  ...rest
@@ -26,12 +32,15 @@ They’re used for branding, screen titles, navigation, and actions.
26
32
 
27
33
  let scrollY = $state(0);
28
34
  let scrolled = $derived(scrollY > 10);
35
+ let barHeight = $state(64);
29
36
 
30
37
  const noTrailing = $derived(!trailing);
31
38
  const noLeading = $derived(!leading || !showBack);
32
39
 
33
40
  const {
34
41
  base,
42
+ row,
43
+ childrenRow,
35
44
  ghost: ghostCls,
36
45
  title: titleCLs,
37
46
  textContainer,
@@ -40,26 +49,48 @@ They’re used for branding, screen titles, navigation, and actions.
40
49
  trailing: trailingCls
41
50
  } = $derived(appbar({ scrolled, noLeading, noTrailing }));
42
51
  const navClass = $derived(base({ class: clsx(className) }));
52
+ const rowFull = $derived(row({ class: clsx(rowClass) }));
53
+
54
+ function trackHeight(node: HTMLElement) {
55
+ const observer = new ResizeObserver((entries) => {
56
+ const entry = entries[0];
57
+ barHeight = entry?.contentRect.height ?? barHeight;
58
+ });
59
+ observer.observe(node);
60
+ return () => observer.disconnect();
61
+ }
62
+
63
+ $effect(() => {
64
+ document.documentElement.style.setProperty('--appbar-height', `${barHeight}px`);
65
+ return () => document.documentElement.style.removeProperty('--appbar-height');
66
+ });
43
67
  </script>
44
68
 
45
69
  <svelte:window bind:scrollY />
46
70
 
47
- <nav {...rest} class={navClass}>
48
- <div class={leadingCls()}>
49
- {@render leading?.()}
50
- </div>
51
- <div class={textContainer()}>
52
- <h1 class={titleCLs()}>
53
- {title}
54
- </h1>
55
- {#if subtitle}
56
- <p class={subtitleCls()}>{subtitle}</p>
57
- {/if}
58
- </div>
59
- <div class={trailingCls()}>
60
- {@render trailing?.()}
71
+ <nav {...rest} class={navClass} {@attach trackHeight}>
72
+ <div class={rowFull}>
73
+ <div class={leadingCls()}>
74
+ {@render leading?.()}
75
+ </div>
76
+ <div class={textContainer()}>
77
+ <h1 class={titleCLs()}>
78
+ {title}
79
+ </h1>
80
+ {#if subtitle}
81
+ <p class={subtitleCls()}>{subtitle}</p>
82
+ {/if}
83
+ </div>
84
+ <div class={trailingCls()}>
85
+ {@render trailing?.()}
86
+ </div>
61
87
  </div>
88
+ {#if children}
89
+ <div class={childrenRow()}>
90
+ {@render children()}
91
+ </div>
92
+ {/if}
62
93
  </nav>
63
94
  {#if ghost}
64
- <div class={ghostCls()} aria-hidden="true"></div>
95
+ <div class={ghostCls()} style="height: {barHeight}px" aria-hidden="true"></div>
65
96
  {/if}
@@ -5,6 +5,11 @@ import type { AppBarProps } from './types.js';
5
5
  * Top app bars provide content and actions related to the current screen.
6
6
  * They’re used for branding, screen titles, navigation, and actions.
7
7
  *
8
+ * Publishes its measured height as `--appbar-height` on the document root, so any
9
+ * `Pane`/`PaneGrid` on the page (`full`, the default) shrinks its `min-height` by
10
+ * that amount with no props or wiring on either side — see Pane.svelte's doc
11
+ * comment.
12
+ *
8
13
  * @see https://m3.material.io/components/top-app-bar/overview
9
14
  */
10
15
  declare const AppBar: import("svelte").Component<AppBarProps, {}, "">;
@@ -10,23 +10,25 @@ export declare const appbar: import("tailwind-variants").TVReturnType<{
10
10
  };
11
11
  };
12
12
  searchContainer: {
13
- true: string;
14
- false: string;
13
+ true: "";
14
+ false: "";
15
15
  };
16
16
  noTrailing: {
17
17
  true: {
18
18
  textContainer: string;
19
19
  };
20
- false: string;
20
+ false: "";
21
21
  };
22
22
  noLeading: {
23
23
  true: {
24
24
  textContainer: string;
25
25
  };
26
- false: string;
26
+ false: "";
27
27
  };
28
28
  }, {
29
29
  base: string;
30
+ row: string;
31
+ childrenRow: string;
30
32
  ghost: string;
31
33
  textContainer: string;
32
34
  title: string;
@@ -43,30 +45,32 @@ export declare const appbar: import("tailwind-variants").TVReturnType<{
43
45
  };
44
46
  };
45
47
  searchContainer: {
46
- true: string;
47
- false: string;
48
+ true: "";
49
+ false: "";
48
50
  };
49
51
  noTrailing: {
50
52
  true: {
51
53
  textContainer: string;
52
54
  };
53
- false: string;
55
+ false: "";
54
56
  };
55
57
  noLeading: {
56
58
  true: {
57
59
  textContainer: string;
58
60
  };
59
- false: string;
61
+ false: "";
60
62
  };
61
63
  }, {
62
64
  base: string;
65
+ row: string;
66
+ childrenRow: string;
63
67
  ghost: string;
64
68
  textContainer: string;
65
69
  title: string;
66
70
  subtitle: string;
67
71
  leading: string;
68
72
  trailing: string;
69
- }, import("tailwind-variants").TVReturnType<{
73
+ }, import("tailwind-variants").TVReturnTypeLike<{
70
74
  scrolled: {
71
75
  true: {
72
76
  base: string;
@@ -76,27 +80,29 @@ export declare const appbar: import("tailwind-variants").TVReturnType<{
76
80
  };
77
81
  };
78
82
  searchContainer: {
79
- true: string;
80
- false: string;
83
+ true: "";
84
+ false: "";
81
85
  };
82
86
  noTrailing: {
83
87
  true: {
84
88
  textContainer: string;
85
89
  };
86
- false: string;
90
+ false: "";
87
91
  };
88
92
  noLeading: {
89
93
  true: {
90
94
  textContainer: string;
91
95
  };
92
- false: string;
96
+ false: "";
93
97
  };
94
98
  }, {
95
99
  base: string;
100
+ row: string;
101
+ childrenRow: string;
96
102
  ghost: string;
97
103
  textContainer: string;
98
104
  title: string;
99
105
  subtitle: string;
100
106
  leading: string;
101
107
  trailing: string;
102
- }, undefined, unknown, unknown, undefined>>;
108
+ }>>;
@@ -1,18 +1,22 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
  export const appbar = tv({
3
3
  slots: {
4
- base: 'h-16 py-1 fixed top-0 left-0 w-full md:hidden flex z-40 items-center justify-between',
5
- ghost: 'h-16 w-full shrink-0 md:hidden pointer-events-none',
4
+ base: 'fixed top-0 left-0 w-full flex flex-col z-30',
5
+ row: 'h-16 py-1 flex w-full items-center justify-between',
6
+ childrenRow: 'w-full px-2 pb-2',
7
+ ghost: 'w-full shrink-0 pointer-events-none',
6
8
  textContainer: 'flex flex-col items-start gap-0.5 grow',
7
9
  title: 'text-md-sys-color-on-surface md-sys-typescale-title-large line-clamp-1 capitalize ',
8
10
  subtitle: 'text-md-sys-color-on-surface-variant md-sys-typescale-label-medium',
9
11
  leading: 'text-md-sys-color-on-surface ml-0.5',
10
- trailing: 'text-md-sys-color-on-surface-variant mr-4'
12
+ trailing: 'text-md-sys-color-on-surface-variant mr-4 md:mr-6 lg:mr-8'
11
13
  },
12
14
  variants: {
13
15
  scrolled: {
14
- true: { base: 'shadow-elevation-2 bg-md-sys-color-surface-container' },
15
- false: { base: 'shadow-elevation-0 bg-md-sys-color-surface' }
16
+ true: { base: 'shadow-elevation-1 bg-md-sys-color-surface-container' },
17
+ false: {
18
+ base: 'shadow-elevation-0 bg-md-sys-color-surface md:bg-md-sys-color-surface-container'
19
+ }
16
20
  },
17
21
  searchContainer: {
18
22
  true: '',
@@ -20,13 +24,13 @@ export const appbar = tv({
20
24
  },
21
25
  noTrailing: {
22
26
  true: {
23
- textContainer: 'pr-2'
27
+ textContainer: 'pr-4 md:pr-6 lg:pr-8'
24
28
  },
25
29
  false: ''
26
30
  },
27
31
  noLeading: {
28
32
  true: {
29
- textContainer: 'pl-6'
33
+ textContainer: 'pl-4 md:pl-6 lg:pl-8'
30
34
  },
31
35
  false: ''
32
36
  }
@@ -5,7 +5,7 @@ import type { AppbarVariants } from './theme.js';
5
5
  * Props for the AppBar component.
6
6
  */
7
7
  export type AppBarProps = AppbarVariants & HTMLAttributes<HTMLElementTagNameMap['nav']> & {
8
- /** The content to be rendered inside the app bar. */
8
+ /** Extra content rendered in a full-width row below the title, e.g. a Breadcrumb trail. */
9
9
  children?: Snippet;
10
10
  /** The main title of the app bar. */
11
11
  title: string;
@@ -19,4 +19,6 @@ export type AppBarProps = AppbarVariants & HTMLAttributes<HTMLElementTagNameMap[
19
19
  showBack?: boolean;
20
20
  /** Renders an invisible same-height spacer after the fixed bar so page content isn't obscured. */
21
21
  ghost?: boolean;
22
+ /** Additional classes passed onto the row element */
23
+ rowClass?: string;
22
24
  };