@xmesh/system-design 0.0.3 → 0.0.5

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 (293) hide show
  1. package/README.md +2 -1
  2. package/custom-elements.json +18382 -0
  3. package/dist/lit/components/alert/index.d.ts +6 -1
  4. package/dist/lit/components/alert/index.js +9 -2
  5. package/dist/lit/components/alert/index.styles.js +215 -0
  6. package/dist/lit/components/app-bar/index.d.ts +2 -1
  7. package/dist/lit/components/app-bar/index.js +5 -2
  8. package/dist/lit/components/app-bar/index.styles.js +94 -0
  9. package/dist/lit/components/artifact/index.d.ts +6 -1
  10. package/dist/lit/components/artifact/index.js +20 -2
  11. package/dist/lit/components/artifact/index.styles.js +180 -0
  12. package/dist/lit/components/autocomplete/index.d.ts +5 -0
  13. package/dist/lit/components/autocomplete/index.js +11 -2
  14. package/dist/lit/components/autocomplete/index.styles.js +185 -0
  15. package/dist/lit/components/avatar/index.d.ts +2 -1
  16. package/dist/lit/components/avatar/index.js +5 -2
  17. package/dist/lit/components/avatar/index.styles.js +76 -0
  18. package/dist/lit/components/avatar-group/index.d.ts +2 -1
  19. package/dist/lit/components/avatar-group/index.js +5 -2
  20. package/dist/lit/components/avatar-group/index.styles.js +74 -0
  21. package/dist/lit/components/badge/index.d.ts +2 -2
  22. package/dist/lit/components/badge/index.js +5 -2
  23. package/dist/lit/components/badge/index.styles.js +86 -0
  24. package/dist/lit/components/brand-mark/index.d.ts +2 -2
  25. package/dist/lit/components/brand-mark/index.js +13 -0
  26. package/dist/lit/components/brand-mark/index.styles.js +123 -0
  27. package/dist/lit/components/breadcrumbs/index.d.ts +2 -1
  28. package/dist/lit/components/breadcrumbs/index.js +6 -4
  29. package/dist/lit/components/breadcrumbs/index.styles.js +105 -0
  30. package/dist/lit/components/bubble/index.d.ts +8 -4
  31. package/dist/lit/components/bubble/index.js +21 -0
  32. package/dist/lit/components/bubble/index.styles.js +196 -0
  33. package/dist/lit/components/button/index.d.ts +2 -1
  34. package/dist/lit/components/button/index.js +7 -13
  35. package/dist/lit/components/button/index.styles.js +356 -0
  36. package/dist/lit/components/card/index.d.ts +2 -1
  37. package/dist/lit/components/card/index.js +5 -2
  38. package/dist/lit/components/card/index.styles.js +113 -0
  39. package/dist/lit/components/chat/index.d.ts +7 -2
  40. package/dist/lit/components/chat/index.js +21 -2
  41. package/dist/lit/components/chat/index.styles.js +306 -0
  42. package/dist/lit/components/checkbox/index.d.ts +2 -2
  43. package/dist/lit/components/checkbox/index.js +8 -4
  44. package/dist/lit/components/checkbox/index.styles.js +140 -0
  45. package/dist/lit/components/chip/index.d.ts +6 -1
  46. package/dist/lit/components/chip/index.js +9 -2
  47. package/dist/lit/components/chip/index.styles.js +159 -0
  48. package/dist/lit/components/chip-group/index.d.ts +5 -1
  49. package/dist/lit/components/chip-group/index.js +8 -2
  50. package/dist/lit/components/chip-group/index.styles.js +33 -0
  51. package/dist/lit/components/code/index.d.ts +2 -2
  52. package/dist/lit/components/code/index.js +5 -3
  53. package/dist/lit/components/code/index.styles.js +56 -0
  54. package/dist/lit/components/composer/index.d.ts +7 -2
  55. package/dist/lit/components/composer/index.js +19 -0
  56. package/dist/lit/components/composer/index.styles.js +562 -0
  57. package/dist/lit/components/data-table/index.css +18 -0
  58. package/dist/lit/components/data-table/index.d.ts +30 -0
  59. package/dist/lit/components/data-table/index.js +120 -34
  60. package/dist/lit/components/data-table/index.styles.js +198 -0
  61. package/dist/lit/components/date-range/index.d.ts +4 -0
  62. package/dist/lit/components/date-range/index.js +7 -2
  63. package/dist/lit/components/date-range/index.styles.js +338 -0
  64. package/dist/lit/components/dialog/index.d.ts +4 -0
  65. package/dist/lit/components/dialog/index.js +7 -2
  66. package/dist/lit/components/dialog/index.styles.js +138 -0
  67. package/dist/lit/components/divider/index.d.ts +2 -1
  68. package/dist/lit/components/divider/index.js +5 -2
  69. package/dist/lit/components/divider/index.styles.js +41 -0
  70. package/dist/lit/components/empty-state/index.d.ts +1 -0
  71. package/dist/lit/components/empty-state/index.js +4 -2
  72. package/dist/lit/components/empty-state/index.styles.js +83 -0
  73. package/dist/lit/components/expansion-panel/index.d.ts +6 -2
  74. package/dist/lit/components/expansion-panel/index.js +9 -2
  75. package/dist/lit/components/expansion-panel/index.styles.js +134 -0
  76. package/dist/lit/components/field/index.d.ts +4 -0
  77. package/dist/lit/components/field/index.js +9 -4
  78. package/dist/lit/components/field/index.styles.js +237 -0
  79. package/dist/lit/components/file-input/index.d.ts +4 -0
  80. package/dist/lit/components/file-input/index.js +10 -4
  81. package/dist/lit/components/file-input/index.styles.js +271 -0
  82. package/dist/lit/components/form/index.d.ts +4 -0
  83. package/dist/lit/components/form/index.js +7 -2
  84. package/dist/lit/components/form/index.styles.js +43 -0
  85. package/dist/lit/components/grid/index.d.ts +2 -1
  86. package/dist/lit/components/grid/index.js +5 -2
  87. package/dist/lit/components/grid/index.styles.js +67 -0
  88. package/dist/lit/components/kbd/index.d.ts +2 -2
  89. package/dist/lit/components/kbd/index.js +5 -2
  90. package/dist/lit/components/kbd/index.styles.js +49 -0
  91. package/dist/lit/components/list/index.d.ts +5 -1
  92. package/dist/lit/components/list/index.js +8 -2
  93. package/dist/lit/components/list/index.styles.js +29 -0
  94. package/dist/lit/components/list-item/index.d.ts +2 -2
  95. package/dist/lit/components/list-item/index.js +5 -2
  96. package/dist/lit/components/list-item/index.styles.js +133 -0
  97. package/dist/lit/components/menu/index.d.ts +8 -0
  98. package/dist/lit/components/menu/index.js +11 -3
  99. package/dist/lit/components/menu/index.styles.js +108 -0
  100. package/dist/lit/components/multi-select/index.css +156 -0
  101. package/dist/lit/components/multi-select/index.d.ts +70 -0
  102. package/dist/lit/components/multi-select/index.js +497 -0
  103. package/dist/lit/components/multi-select/index.styles.js +170 -0
  104. package/dist/lit/components/navigation-drawer/index.d.ts +5 -2
  105. package/dist/lit/components/navigation-drawer/index.js +8 -2
  106. package/dist/lit/components/navigation-drawer/index.styles.js +128 -0
  107. package/dist/lit/components/overlay/index.d.ts +5 -0
  108. package/dist/lit/components/overlay/index.js +8 -2
  109. package/dist/lit/components/overlay/index.styles.js +185 -0
  110. package/dist/lit/components/pagination/index.d.ts +18 -1
  111. package/dist/lit/components/pagination/index.js +54 -8
  112. package/dist/lit/components/pagination/index.styles.js +116 -0
  113. package/dist/lit/components/popover/index.d.ts +5 -0
  114. package/dist/lit/components/popover/index.js +8 -2
  115. package/dist/lit/components/popover/index.styles.js +48 -0
  116. package/dist/lit/components/primitives/index.d.ts +2 -2
  117. package/dist/lit/components/primitives/index.js +13 -0
  118. package/dist/lit/components/primitives/index.styles.js +518 -0
  119. package/dist/lit/components/progress/index.d.ts +1 -0
  120. package/dist/lit/components/progress/index.js +4 -2
  121. package/dist/lit/components/progress/index.styles.js +157 -0
  122. package/dist/lit/components/radio-group/index.d.ts +5 -0
  123. package/dist/lit/components/radio-group/index.js +10 -6
  124. package/dist/lit/components/radio-group/index.styles.js +192 -0
  125. package/dist/lit/components/select/index.d.ts +4 -0
  126. package/dist/lit/components/select/index.js +10 -2
  127. package/dist/lit/components/select/index.styles.js +165 -0
  128. package/dist/lit/components/sidebar-item/index.d.ts +1 -1
  129. package/dist/lit/components/sidebar-item/index.js +12 -0
  130. package/dist/lit/components/sidebar-item/index.styles.js +147 -0
  131. package/dist/lit/components/skeleton/index.d.ts +1 -0
  132. package/dist/lit/components/skeleton/index.js +4 -2
  133. package/dist/lit/components/skeleton/index.styles.js +95 -0
  134. package/dist/lit/components/slider/index.d.ts +5 -0
  135. package/dist/lit/components/slider/index.js +11 -4
  136. package/dist/lit/components/slider/index.styles.js +185 -0
  137. package/dist/lit/components/snackbar/index.d.ts +5 -2
  138. package/dist/lit/components/snackbar/index.js +20 -2
  139. package/dist/lit/components/snackbar/index.styles.js +293 -0
  140. package/dist/lit/components/stack/index.d.ts +2 -1
  141. package/dist/lit/components/stack/index.js +5 -2
  142. package/dist/lit/components/stack/index.styles.js +55 -0
  143. package/dist/lit/components/switch/index.d.ts +1 -0
  144. package/dist/lit/components/switch/index.js +7 -4
  145. package/dist/lit/components/switch/index.styles.js +140 -0
  146. package/dist/lit/components/table/index.d.ts +2 -2
  147. package/dist/lit/components/table/index.js +5 -2
  148. package/dist/lit/components/table/index.styles.js +99 -0
  149. package/dist/lit/components/tabs/index.d.ts +7 -3
  150. package/dist/lit/components/tabs/index.js +11 -4
  151. package/dist/lit/components/tabs/index.styles.js +130 -0
  152. package/dist/lit/components/text-field/index.d.ts +1 -0
  153. package/dist/lit/components/text-field/index.js +7 -2
  154. package/dist/lit/components/text-field/index.styles.js +104 -0
  155. package/dist/lit/components/textarea/index.d.ts +1 -0
  156. package/dist/lit/components/textarea/index.js +7 -2
  157. package/dist/lit/components/textarea/index.styles.js +69 -0
  158. package/dist/lit/components/tooltip/index.d.ts +1 -0
  159. package/dist/lit/components/tooltip/index.js +4 -2
  160. package/dist/lit/components/tooltip/index.styles.js +51 -0
  161. package/dist/lit/components/validation/index.d.ts +7 -2
  162. package/dist/lit/components/validation/index.js +21 -1
  163. package/dist/lit/components/validation/index.styles.js +400 -0
  164. package/dist/lit/index.d.ts +1 -0
  165. package/dist/lit/index.js +1 -0
  166. package/dist/react/XmAlert.d.ts +99 -0
  167. package/dist/react/XmAlert.js +45 -0
  168. package/dist/react/XmAppBar.d.ts +59 -0
  169. package/dist/react/XmAppBar.js +34 -0
  170. package/dist/react/XmArtifact.d.ts +113 -0
  171. package/dist/react/XmArtifact.js +45 -0
  172. package/dist/react/XmArtifactChip.d.ts +56 -0
  173. package/dist/react/XmArtifactChip.js +32 -0
  174. package/dist/react/XmAutocomplete.d.ts +153 -0
  175. package/dist/react/XmAutocomplete.js +68 -0
  176. package/dist/react/XmAvatar.d.ts +71 -0
  177. package/dist/react/XmAvatar.js +40 -0
  178. package/dist/react/XmAvatarGroup.d.ts +59 -0
  179. package/dist/react/XmAvatarGroup.js +34 -0
  180. package/dist/react/XmBadge.d.ts +67 -0
  181. package/dist/react/XmBadge.js +38 -0
  182. package/dist/react/XmBrandGlyph.d.ts +46 -0
  183. package/dist/react/XmBrandGlyph.js +24 -0
  184. package/dist/react/XmBrandMark.d.ts +71 -0
  185. package/dist/react/XmBrandMark.js +40 -0
  186. package/dist/react/XmBreadcrumbs.d.ts +56 -0
  187. package/dist/react/XmBreadcrumbs.js +32 -0
  188. package/dist/react/XmBubble.d.ts +69 -0
  189. package/dist/react/XmBubble.js +38 -0
  190. package/dist/react/XmBubbleActions.d.ts +59 -0
  191. package/dist/react/XmBubbleActions.js +34 -0
  192. package/dist/react/XmBubbleGroup.d.ts +82 -0
  193. package/dist/react/XmBubbleGroup.js +36 -0
  194. package/dist/react/XmButton.d.ts +89 -0
  195. package/dist/react/XmButton.js +48 -0
  196. package/dist/react/XmCard.d.ts +59 -0
  197. package/dist/react/XmCard.js +34 -0
  198. package/dist/react/XmChatShell.d.ts +110 -0
  199. package/dist/react/XmChatShell.js +44 -0
  200. package/dist/react/XmCheckbox.d.ts +145 -0
  201. package/dist/react/XmCheckbox.js +58 -0
  202. package/dist/react/XmChip.d.ts +99 -0
  203. package/dist/react/XmChip.js +46 -0
  204. package/dist/react/XmChipGroup.d.ts +79 -0
  205. package/dist/react/XmChipGroup.js +35 -0
  206. package/dist/react/XmCode.d.ts +55 -0
  207. package/dist/react/XmCode.js +32 -0
  208. package/dist/react/XmComposer.d.ts +123 -0
  209. package/dist/react/XmComposer.js +52 -0
  210. package/dist/react/XmDataTable.d.ts +125 -0
  211. package/dist/react/XmDataTable.js +65 -0
  212. package/dist/react/XmDateRange.d.ts +93 -0
  213. package/dist/react/XmDateRange.js +41 -0
  214. package/dist/react/XmDialog.d.ts +87 -0
  215. package/dist/react/XmDialog.js +40 -0
  216. package/dist/react/XmDivider.d.ts +55 -0
  217. package/dist/react/XmDivider.js +32 -0
  218. package/dist/react/XmEmptyState.d.ts +61 -0
  219. package/dist/react/XmEmptyState.js +34 -0
  220. package/dist/react/XmExpansionPanel.d.ts +101 -0
  221. package/dist/react/XmExpansionPanel.js +48 -0
  222. package/dist/react/XmFileInput.d.ts +151 -0
  223. package/dist/react/XmFileInput.js +68 -0
  224. package/dist/react/XmFileValidationBlock.d.ts +111 -0
  225. package/dist/react/XmFileValidationBlock.js +45 -0
  226. package/dist/react/XmForm.d.ts +91 -0
  227. package/dist/react/XmForm.js +37 -0
  228. package/dist/react/XmGrid.d.ts +59 -0
  229. package/dist/react/XmGrid.js +34 -0
  230. package/dist/react/XmKbd.d.ts +46 -0
  231. package/dist/react/XmKbd.js +24 -0
  232. package/dist/react/XmList.d.ts +83 -0
  233. package/dist/react/XmList.js +37 -0
  234. package/dist/react/XmListItem.d.ts +67 -0
  235. package/dist/react/XmListItem.js +38 -0
  236. package/dist/react/XmMenu.d.ts +98 -0
  237. package/dist/react/XmMenu.js +42 -0
  238. package/dist/react/XmMenuItem.d.ts +63 -0
  239. package/dist/react/XmMenuItem.js +36 -0
  240. package/dist/react/XmMultiSelect.d.ts +161 -0
  241. package/dist/react/XmMultiSelect.js +72 -0
  242. package/dist/react/XmNavigationDrawer.d.ts +93 -0
  243. package/dist/react/XmNavigationDrawer.js +41 -0
  244. package/dist/react/XmOverlay.d.ts +120 -0
  245. package/dist/react/XmOverlay.js +54 -0
  246. package/dist/react/XmPagination.d.ts +117 -0
  247. package/dist/react/XmPagination.js +57 -0
  248. package/dist/react/XmPopover.d.ts +90 -0
  249. package/dist/react/XmPopover.js +40 -0
  250. package/dist/react/XmProgress.d.ts +75 -0
  251. package/dist/react/XmProgress.js +42 -0
  252. package/dist/react/XmRadio.d.ts +88 -0
  253. package/dist/react/XmRadio.js +41 -0
  254. package/dist/react/XmRadioGroup.d.ts +139 -0
  255. package/dist/react/XmRadioGroup.js +56 -0
  256. package/dist/react/XmSelect.d.ts +152 -0
  257. package/dist/react/XmSelect.js +68 -0
  258. package/dist/react/XmSidebarItem.d.ts +75 -0
  259. package/dist/react/XmSidebarItem.js +42 -0
  260. package/dist/react/XmSkeleton.d.ts +71 -0
  261. package/dist/react/XmSkeleton.js +40 -0
  262. package/dist/react/XmSlider.d.ts +160 -0
  263. package/dist/react/XmSlider.js +74 -0
  264. package/dist/react/XmSnackbar.d.ts +110 -0
  265. package/dist/react/XmSnackbar.js +49 -0
  266. package/dist/react/XmStack.d.ts +71 -0
  267. package/dist/react/XmStack.js +40 -0
  268. package/dist/react/XmSwitch.d.ts +136 -0
  269. package/dist/react/XmSwitch.js +56 -0
  270. package/dist/react/XmTab.d.ts +79 -0
  271. package/dist/react/XmTab.js +37 -0
  272. package/dist/react/XmTabPanel.d.ts +55 -0
  273. package/dist/react/XmTabPanel.js +32 -0
  274. package/dist/react/XmTable.d.ts +57 -0
  275. package/dist/react/XmTable.js +32 -0
  276. package/dist/react/XmTabs.d.ts +82 -0
  277. package/dist/react/XmTabs.js +37 -0
  278. package/dist/react/XmTextField.d.ts +147 -0
  279. package/dist/react/XmTextField.js +60 -0
  280. package/dist/react/XmTextarea.d.ts +155 -0
  281. package/dist/react/XmTextarea.js +64 -0
  282. package/dist/react/XmTooltip.d.ts +67 -0
  283. package/dist/react/XmTooltip.js +38 -0
  284. package/dist/react/index.d.ts +59 -0
  285. package/dist/react/index.js +59 -0
  286. package/dist/react/react-utils.js +67 -0
  287. package/package.json +37 -9
  288. package/styles/_base-typography.css +86 -0
  289. package/styles/_primitives.css +54 -0
  290. package/styles/_reset.css +58 -0
  291. package/styles/base.css +23 -0
  292. package/vscode.css-custom-data.json +6 -0
  293. package/vscode.html-custom-data.json +979 -0
@@ -0,0 +1,147 @@
1
+ // GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/sidebar-item/index.css
2
+ // SSR-safe: constructable stylesheets need the DOM, so in a non-DOM context
3
+ // (Node/SSR import) this exports [] instead of throwing. The CSS self-declares
4
+ // the @layer order so the override contract holds even without ./base (AD-2).
5
+ let sheets = [];
6
+ if (typeof CSSStyleSheet !== "undefined") {
7
+ const sheet = new CSSStyleSheet();
8
+ sheet.replaceSync(`@layer reset, base, tokens, components, utilities;
9
+ @layer components {
10
+ /* ============================================================
11
+ <SidebarItem /> — chat-list row in the sidebar.
12
+
13
+ Two layouts share the same hover/active backgrounds:
14
+ row — single-line: [dot] [title] (sidebar-item.html)
15
+ stacked — single-line title in chat.html
16
+
17
+ Plus a collapsed variant that renders as a 4px stripe rail when the
18
+ sidebar is in icon-only mode.
19
+
20
+ Pairs with components/sidebar-item/index.jsx. The CSS lives on the
21
+ chat-shell \`surface\` (the warm dark "desk" / cream in light) and uses
22
+ \`on-surface*\` tokens accordingly.
23
+ ============================================================ */
24
+
25
+ .sidebar-item {
26
+ cursor: pointer;
27
+ border-radius: 8px;
28
+ transition: background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
29
+ }
30
+
31
+ /* ---------- Layout: row ---------- */
32
+ .sidebar-item--row {
33
+ display: flex;
34
+ align-items: center;
35
+ gap: var(--s-2-5);
36
+ padding: 9px var(--s-2-5);
37
+ }
38
+ .sidebar-item--row .sidebar-item__title {
39
+ font: 500 13px/1.2 var(--md-sys-typescale-body-large-font);
40
+ color: var(--md-sys-color-on-surface);
41
+ flex: 1;
42
+ min-width: 0;
43
+ overflow: hidden;
44
+ text-overflow: ellipsis;
45
+ white-space: nowrap;
46
+ }
47
+ /* The dot in the row layout is a leading 8px circle; consumers
48
+ pass showDot to render it filled. The slot is always present so
49
+ titles align across rows. */
50
+ .sidebar-item--row .sidebar-item__dot {
51
+ width: 8px; height: 8px;
52
+ border-radius: 999px;
53
+ background: transparent;
54
+ flex-shrink: 0;
55
+ }
56
+ .sidebar-item--row.has-dot .sidebar-item__dot {
57
+ background: var(--md-sys-color-primary);
58
+ }
59
+
60
+ /* ---------- Layout: stacked ---------- */
61
+ .sidebar-item--stacked {
62
+ display: flex;
63
+ flex-direction: column;
64
+ gap: var(--s-0-5);
65
+ padding: var(--s-2) var(--s-2-5);
66
+ }
67
+ .sidebar-item--stacked .sidebar-item__title {
68
+ font: 500 13px/1.25 var(--md-sys-typescale-body-large-font);
69
+ color: var(--md-sys-color-on-surface);
70
+ overflow: hidden;
71
+ text-overflow: ellipsis;
72
+ white-space: nowrap;
73
+ }
74
+
75
+ /* ---------- Hover & active (shared across layouts) ----------
76
+ Hover and active were the same near-black surface-container-lowest, so
77
+ the two states read identically and reused the vanishing-bubble color.
78
+ The sidebar rides \`surface\` (the desk), so both states must be a step ABOVE
79
+ it to read — surface-container-low equals \`surface\` in dark and would vanish.
80
+ Ramp upward: desk → hover (surface-container) → active (surface-container-high,
81
+ the same raised family the user bubble / composer ride). */
82
+ .sidebar-item:hover,
83
+ .sidebar-item.is-hover {
84
+ background: var(--md-sys-color-surface-container);
85
+ }
86
+ .sidebar-item.is-active {
87
+ background: var(--md-sys-color-surface-container-high);
88
+ }
89
+ .sidebar-item:hover .sidebar-item__title,
90
+ .sidebar-item.is-hover .sidebar-item__title,
91
+ .sidebar-item.is-active .sidebar-item__title {
92
+ color: var(--md-sys-color-on-surface);
93
+ }
94
+
95
+ /* Dark theme — push the resting title color further into gray so the
96
+ active item's strong-ink title pops as the brighter, more-white state.
97
+ Light theme keeps the standard on-surface ramp (already reads as a clear
98
+ default → strong contrast there). */
99
+ [data-theme="dark"] .sidebar-item:not(.is-active):not(.is-hover):not(:hover) .sidebar-item__title {
100
+ color: var(--md-sys-color-on-surface-variant);
101
+ }
102
+
103
+ /* ---------- Collapsed: 4px stripe rail ---------- */
104
+ .sidebar-item--collapsed {
105
+ width: 24px;
106
+ height: 4px;
107
+ padding: 0;
108
+ border-radius: 2px;
109
+ background: var(--xm-color-on-surface-soft);
110
+ opacity: 0.35;
111
+ transition:
112
+ opacity var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
113
+ background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
114
+ }
115
+ .sidebar-item--collapsed:hover {
116
+ background: var(--md-sys-color-on-surface);
117
+ opacity: 0.6;
118
+ }
119
+ .sidebar-item--collapsed.is-active {
120
+ background: var(--md-sys-color-on-surface);
121
+ opacity: 0.85;
122
+ box-shadow: none;
123
+ }
124
+ .sidebar-item--collapsed > * { display: none; }
125
+
126
+ /* ---------- Eyebrow: section header above a group of items ----------
127
+ Renders as an uppercase mono caption on the surface. No hover, no
128
+ active — it's a label, not a target. */
129
+ .sidebar-item--eyebrow {
130
+ cursor: default;
131
+ padding: var(--s-3-5) var(--s-2-5) var(--s-1-5);
132
+ font:
133
+ var(--md-sys-typescale-label-small-weight)
134
+ var(--md-sys-typescale-label-small-size) /
135
+ var(--md-sys-typescale-label-small-line-height)
136
+ var(--md-sys-typescale-label-small-font);
137
+ color: var(--xm-color-on-surface-soft);
138
+ text-transform: uppercase;
139
+ letter-spacing: 0.04em;
140
+ font-family: var(--xm-typescale-mono-font);
141
+ }
142
+ .sidebar-item--eyebrow:hover { background: transparent; }
143
+
144
+ }`);
145
+ sheets = [sheet];
146
+ }
147
+ export default sheets;
@@ -2,6 +2,7 @@ import { LitElement } from "lit";
2
2
  import type { TemplateResult } from "lit";
3
3
  export type SkeletonVariant = "line" | "block" | "circle";
4
4
  export declare class XmSkeleton extends LitElement {
5
+ static styles: CSSStyleSheet[];
5
6
  variant: SkeletonVariant;
6
7
  width: string;
7
8
  height: string;
@@ -39,7 +39,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
39
39
  };
40
40
  import { LitElement, html } from "lit";
41
41
  import { customElement, property } from "lit/decorators.js";
42
- const SKELETON_CSS = new URL("../skeleton/index.css", import.meta.url).href;
42
+ import skeletonSheets from "./index.styles.js";
43
43
  let XmSkeleton = class XmSkeleton extends LitElement {
44
44
  constructor() {
45
45
  super(...arguments);
@@ -49,13 +49,15 @@ let XmSkeleton = class XmSkeleton extends LitElement {
49
49
  this.lines = 1;
50
50
  this.radius = "";
51
51
  }
52
+ // Adopted from the build-generated sheets (scripts/gen-styles.mjs) — no
53
+ // runtime URL fetch (ADR 0012). Cascade order preserved from the old <link>s.
54
+ static { this.styles = [...skeletonSheets]; }
52
55
  render() {
53
56
  const v = this.variant === "block" || this.variant === "circle"
54
57
  ? this.variant
55
58
  : "line";
56
59
  const cls = `skeleton skeleton--${v}`;
57
60
  return html `
58
- <link rel="stylesheet" href="${SKELETON_CSS}" />
59
61
  <style>
60
62
  :host { display: block; }
61
63
  :host([hidden]) { display: none; }
@@ -0,0 +1,95 @@
1
+ // GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/skeleton/index.css
2
+ // SSR-safe: constructable stylesheets need the DOM, so in a non-DOM context
3
+ // (Node/SSR import) this exports [] instead of throwing. The CSS self-declares
4
+ // the @layer order so the override contract holds even without ./base (AD-2).
5
+ let sheets = [];
6
+ if (typeof CSSStyleSheet !== "undefined") {
7
+ const sheet = new CSSStyleSheet();
8
+ sheet.replaceSync(`@layer reset, base, tokens, components, utilities;
9
+ @layer components {
10
+ /* ============================================
11
+ Skeleton — gradient-free loading placeholder.
12
+
13
+ The pulse is a calm OPACITY animation on a neutral surface fill — a
14
+ color-mix between two surface-container tiers. There is NO shimmer /
15
+ sweep gradient anywhere (FR-147 / A10): the snackbar scrim is the
16
+ system's only sanctioned gradient. The animation honors
17
+ prefers-reduced-motion.
18
+
19
+ The fill is neutral chrome — no accent, no severity hue (AD-11). It
20
+ sits on the host surface family it's placed in; the surface-container
21
+ tiers read on both the desk and the inverse card stack, in both themes
22
+ (AD-13).
23
+
24
+ BEM block: \`skeleton\`. Registered in scripts/check-bem.sh STRICT_BLOCKS.
25
+ Elements: __shape (one placeholder), __line (a text line). Modifiers:
26
+ --line / --block / --circle.
27
+ ============================================ */
28
+
29
+ .skeleton {
30
+ display: block;
31
+ width: 100%;
32
+ }
33
+
34
+ /* Line variant stacks its text lines with a consistent gap. */
35
+ .skeleton--line {
36
+ display: flex;
37
+ flex-direction: column;
38
+ gap: var(--s-2);
39
+ }
40
+
41
+ .skeleton__shape {
42
+ display: block;
43
+ /* Neutral fill — a color-mix between two surface-container tiers. This is
44
+ a flat fill, NOT a gradient: there is no shimmer sweep, no linear- /
45
+ radial-gradient. The pulse comes from the opacity animation below. */
46
+ background: color-mix(
47
+ in oklch,
48
+ var(--md-sys-color-surface-container-high) 60%,
49
+ var(--md-sys-color-surface-container-highest)
50
+ );
51
+ border-radius: var(--md-sys-shape-corner-small);
52
+ /* Calm pulse: alternate opacity, slow tempo, standard easing. */
53
+ animation: skeleton-pulse var(--md-sys-motion-duration-extra-long2)
54
+ var(--md-sys-motion-easing-standard) infinite alternate;
55
+ }
56
+
57
+ /* A single text line — height from the body typescale, full width by default
58
+ (the element narrows the last line of a paragraph via inline width). */
59
+ .skeleton__line {
60
+ height: 0.85em;
61
+ width: 100%;
62
+ }
63
+
64
+ /* Block — arbitrary rectangle (card / image placeholder). */
65
+ .skeleton--block .skeleton__shape {
66
+ height: 120px;
67
+ border-radius: var(--md-sys-shape-corner-medium);
68
+ }
69
+
70
+ /* Circle — avatar / icon placeholder. */
71
+ .skeleton--circle .skeleton__shape {
72
+ width: 40px;
73
+ height: 40px;
74
+ border-radius: var(--md-sys-shape-corner-full);
75
+ }
76
+
77
+ @keyframes skeleton-pulse {
78
+ from {
79
+ opacity: 1;
80
+ }
81
+ to {
82
+ opacity: 0.45;
83
+ }
84
+ }
85
+
86
+ @media (prefers-reduced-motion: reduce) {
87
+ .skeleton__shape {
88
+ animation: none;
89
+ }
90
+ }
91
+
92
+ }`);
93
+ sheets = [sheet];
94
+ }
95
+ export default sheets;
@@ -1,6 +1,11 @@
1
1
  import type { PropertyValues, TemplateResult } from "lit";
2
2
  import { XmField } from "../field/index.js";
3
+ /**
4
+ * @fires change - Fired on commit with the new value in `detail`.
5
+ * @fires input - Fired on each edit with the current value in `detail`.
6
+ */
3
7
  export declare class XmSlider extends XmField {
8
+ static styles: CSSStyleSheet[];
4
9
  min: number;
5
10
  max: number;
6
11
  step: number;
@@ -33,8 +33,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
33
33
  import { html, nothing } from "lit";
34
34
  import { customElement, property, query } from "lit/decorators.js";
35
35
  import { XmField } from "../field/index.js";
36
- const SLIDER_CSS = new URL("../slider/index.css", import.meta.url).href;
37
- const PRIMITIVES_CSS = new URL("../primitives/index.css", import.meta.url).href;
36
+ import primitivesSheets from "../primitives/index.styles.js";
37
+ import fieldSheets from "../field/index.styles.js";
38
+ import sliderSheets from "./index.styles.js";
39
+ /**
40
+ * @fires change - Fired on commit with the new value in `detail`.
41
+ * @fires input - Fired on each edit with the current value in `detail`.
42
+ */
38
43
  let XmSlider = class XmSlider extends XmField {
39
44
  constructor() {
40
45
  super(...arguments);
@@ -105,6 +110,10 @@ let XmSlider = class XmSlider extends XmField {
105
110
  this._commit();
106
111
  };
107
112
  }
113
+ // Adopted from build-generated sheets (gen-styles.mjs) — no runtime URL
114
+ // fetch (ADR 0012). Lit static styles don't merge on override, so subclasses
115
+ // re-include the chrome (primitives + field) sheets.
116
+ static { this.styles = [...primitivesSheets, ...fieldSheets, ...sliderSheets]; }
108
117
  connectedCallback() {
109
118
  super.connectedCallback();
110
119
  // Seed the numeric value from the uncontrolled `value` attribute, snapping
@@ -199,8 +208,6 @@ let XmSlider = class XmSlider extends XmField {
199
208
  const ctrl = this.controlAria;
200
209
  const pct = `${(this._fraction * 100).toFixed(2)}%`;
201
210
  return html `
202
- <link rel="stylesheet" href="${PRIMITIVES_CSS}" />
203
- <link rel="stylesheet" href="${SLIDER_CSS}" />
204
211
  <style>
205
212
  :host {
206
213
  display: block;
@@ -0,0 +1,185 @@
1
+ // GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/slider/index.css
2
+ // SSR-safe: constructable stylesheets need the DOM, so in a non-DOM context
3
+ // (Node/SSR import) this exports [] instead of throwing. The CSS self-declares
4
+ // the @layer order so the override contract holds even without ./base (AD-2).
5
+ let sheets = [];
6
+ if (typeof CSSStyleSheet !== "undefined") {
7
+ const sheet = new CSSStyleSheet();
8
+ sheet.replaceSync(`@layer reset, base, tokens, components, utilities;
9
+ @layer components {
10
+ /* ============================================
11
+ xm-slider — draggable range slider on XmField (Story 2.8).
12
+
13
+ Extends XmField for chrome but renders its own layout (the bordered text-field
14
+ box is wrong for a slider): a label row (label + optional value), a track row
15
+ (rail + active fill + thumb), and the helper/error row. State machinery
16
+ (disabled / form-association / focus / ARIA) is inherited; this file styles the
17
+ track, fill, thumb, label, and value.
18
+
19
+ Surface & ink (AD-13): the slider rides the inverse-surface card tier — label +
20
+ value are inverse-on-surface ink. The active (filled) portion + the thumb are
21
+ the single coral accent (--md-sys-color-primary). The inactive rail, track
22
+ height, and thumb size are --xm-slider-* extensions (AD-10). Coral = the filled
23
+ value, never severity (AD-11). The error string carries severity via the warn
24
+ icon + copy.
25
+
26
+ Motion (NFR-19): fill/thumb position is layout-driven; the focus ring + hover
27
+ transition short3 standard, no bounce.
28
+
29
+ BEM block: \`slider\`. Registered in scripts/check-bem.sh STRICT_BLOCKS.
30
+ ============================================ */
31
+
32
+ .slider {
33
+ display: flex;
34
+ flex-direction: column;
35
+ gap: var(--s-2);
36
+ width: 100%;
37
+ }
38
+
39
+ /* ---------- Label row — field label + optional value ---------- */
40
+ .slider__label-row {
41
+ display: flex;
42
+ align-items: baseline;
43
+ justify-content: space-between;
44
+ gap: var(--s-2);
45
+ }
46
+ .slider__label {
47
+ display: inline-flex;
48
+ align-items: center;
49
+ gap: var(--s-1);
50
+ color: var(--md-sys-color-inverse-on-surface);
51
+ font:
52
+ var(--md-sys-typescale-label-large-weight)
53
+ var(--md-sys-typescale-label-large-size) /
54
+ var(--md-sys-typescale-label-large-line-height)
55
+ var(--md-sys-typescale-label-large-font);
56
+ }
57
+ .slider__label-text {
58
+ letter-spacing: 0;
59
+ }
60
+ .slider__required {
61
+ color: var(--md-sys-color-primary);
62
+ font-weight: 700;
63
+ line-height: 1;
64
+ }
65
+ .slider__value {
66
+ color: var(--md-sys-color-inverse-on-surface);
67
+ font:
68
+ var(--md-sys-typescale-label-medium-weight)
69
+ var(--md-sys-typescale-label-medium-size) /
70
+ var(--md-sys-typescale-label-medium-line-height)
71
+ var(--md-sys-typescale-label-medium-font);
72
+ font-variant-numeric: tabular-nums;
73
+ }
74
+
75
+ /* ---------- Track — rail + active fill + thumb ---------- */
76
+ .slider__track {
77
+ position: relative;
78
+ display: flex;
79
+ align-items: center;
80
+ height: var(--xm-slider-thumb-size);
81
+ /* Inset the interactive box by half a thumb so the thumb (positioned by its
82
+ center at left:fraction) never overflows the field width. The rail/fill and
83
+ the pointer math all share this same inset coordinate space. */
84
+ margin: 0 calc(var(--xm-slider-thumb-size) / 2);
85
+ cursor: pointer;
86
+ touch-action: none;
87
+ }
88
+
89
+ .slider__rail {
90
+ position: absolute;
91
+ left: 0;
92
+ right: 0;
93
+ height: var(--xm-slider-track-height);
94
+ border-radius: var(--md-sys-shape-corner-full);
95
+ background: var(--xm-slider-track-inactive);
96
+ }
97
+
98
+ .slider__fill {
99
+ position: absolute;
100
+ left: 0;
101
+ height: var(--xm-slider-track-height);
102
+ border-radius: var(--md-sys-shape-corner-full);
103
+ background: var(--md-sys-color-primary);
104
+ }
105
+
106
+ .slider__thumb {
107
+ position: absolute;
108
+ top: 50%;
109
+ width: var(--xm-slider-thumb-size);
110
+ height: var(--xm-slider-thumb-size);
111
+ margin-left: calc(var(--xm-slider-thumb-size) / -2);
112
+ transform: translateY(-50%);
113
+ border-radius: var(--md-sys-shape-corner-full);
114
+ background: var(--md-sys-color-primary);
115
+ box-shadow: var(--xm-slider-thumb-shadow);
116
+ outline: none;
117
+ cursor: grab;
118
+ transition: box-shadow var(--md-sys-motion-duration-short3)
119
+ var(--md-sys-motion-easing-standard);
120
+ }
121
+ .slider__thumb:active {
122
+ cursor: grabbing;
123
+ }
124
+
125
+ /* Focus ring — the canonical 3px coral halo on the thumb. */
126
+ .slider__thumb:focus-visible {
127
+ box-shadow:
128
+ var(--xm-slider-thumb-shadow),
129
+ var(--xm-state-focus-ring);
130
+ }
131
+
132
+ /* ---------- Disabled — shared reduced emphasis ---------- */
133
+ .slider--disabled .slider__track {
134
+ cursor: not-allowed;
135
+ }
136
+ .slider--disabled .slider__thumb {
137
+ cursor: not-allowed;
138
+ box-shadow: none;
139
+ }
140
+ .slider--disabled .slider__rail,
141
+ .slider--disabled .slider__fill,
142
+ .slider--disabled .slider__thumb {
143
+ opacity: 0.45;
144
+ }
145
+ .slider--disabled .slider__label,
146
+ .slider--disabled .slider__value {
147
+ color: var(--xm-color-inverse-on-surface-disabled);
148
+ }
149
+
150
+ /* ---------- Helper / error message row ----------
151
+ Severity is the warn icon + copy, not a color (rule 3a). */
152
+ .slider__message {
153
+ display: flex;
154
+ align-items: flex-start;
155
+ gap: var(--s-1);
156
+ min-height: 1em;
157
+ font:
158
+ var(--md-sys-typescale-body-small-weight)
159
+ var(--md-sys-typescale-body-small-size) /
160
+ var(--md-sys-typescale-body-small-line-height)
161
+ var(--md-sys-typescale-body-small-font);
162
+ }
163
+ .slider__message--helper {
164
+ color: var(--xm-color-inverse-on-surface-muted);
165
+ }
166
+ .slider__message--error {
167
+ color: var(--md-sys-color-inverse-on-surface);
168
+ }
169
+ .slider__error-icon {
170
+ display: inline-flex;
171
+ align-items: center;
172
+ flex-shrink: 0;
173
+ margin-top: 1px;
174
+ color: var(--md-sys-color-inverse-on-surface);
175
+ }
176
+ .slider__message-text {
177
+ flex: 1;
178
+ min-width: 0;
179
+ text-wrap: pretty;
180
+ }
181
+
182
+ }`);
183
+ sheets = [sheet];
184
+ }
185
+ export default sheets;
@@ -10,7 +10,11 @@ export interface SnackPreset {
10
10
  secondaryLabel: string;
11
11
  }
12
12
  export declare const SNACK_PRESETS: Record<SnackKind, SnackPreset>;
13
- declare class XmSnackbar extends LitElement {
13
+ /**
14
+ * @fires snackbar-dismiss - Fired when the snackbar is dismissed.
15
+ * @fires snackbar-primary - Fired when the snackbar's primary action is activated.
16
+ */
17
+ export declare class XmSnackbar extends LitElement {
14
18
  kind: SnackKind;
15
19
  code: string;
16
20
  title: string;
@@ -30,4 +34,3 @@ declare global {
30
34
  "xm-snackbar": XmSnackbar;
31
35
  }
32
36
  }
33
- export {};
@@ -20,8 +20,8 @@
20
20
  snackbar-primary — primary action clicked (Retry / Open settings)
21
21
  snackbar-dismiss — secondary/dismiss action clicked
22
22
 
23
- Light DOM. components/snackbar/index.css and components/primitives/index.css
24
- must be loaded in the host page.
23
+ Light DOM. This module appends its stylesheets (snackbar + primitives) to
24
+ document.head on import.
25
25
 
26
26
  SNACK_PRESETS is also exported so previews can spread a preset onto
27
27
  the element via JS.
@@ -34,6 +34,19 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
34
34
  };
35
35
  import { LitElement, html, svg, nothing } from "lit";
36
36
  import { customElement, property } from "lit/decorators.js";
37
+ import snackSheets from "./index.styles.js";
38
+ import primSheets from "../primitives/index.styles.js";
39
+ // Light DOM: adopt the build-generated sheets into the document — no runtime URL
40
+ // fetch (ADR 0012). Deduped by sheet identity; the generated modules are
41
+ // singletons, so primitives is adopted exactly once across light-DOM components.
42
+ // The CSS is wrapped in @layer components, so consumer overrides win (spine AD-2).
43
+ if (typeof document !== "undefined") {
44
+ for (const sheet of [...primSheets, ...snackSheets]) {
45
+ if (!document.adoptedStyleSheets.includes(sheet)) {
46
+ document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
47
+ }
48
+ }
49
+ }
37
50
  export const SNACK_PRESETS = {
38
51
  auth: {
39
52
  kind: "auth",
@@ -89,6 +102,10 @@ const RETRY_ICON = () => SHELL(13, 2, svg `
89
102
  <path d="M21 12a9 9 0 0 1-15.5 6.3L3 16" />
90
103
  <path d="M3 21v-5h5" />
91
104
  `);
105
+ /**
106
+ * @fires snackbar-dismiss - Fired when the snackbar is dismissed.
107
+ * @fires snackbar-primary - Fired when the snackbar's primary action is activated.
108
+ */
92
109
  let XmSnackbar = class XmSnackbar extends LitElement {
93
110
  constructor() {
94
111
  super(...arguments);
@@ -193,3 +210,4 @@ __decorate([
193
210
  XmSnackbar = __decorate([
194
211
  customElement("xm-snackbar")
195
212
  ], XmSnackbar);
213
+ export { XmSnackbar };