@xmesh/system-design 0.0.4 → 0.0.6

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 (290) hide show
  1. package/README.md +2 -1
  2. package/custom-elements.json +18382 -0
  3. package/dist/lit/components/alert/index.d.ts +5 -0
  4. package/dist/lit/components/alert/index.js +8 -2
  5. package/dist/lit/components/alert/index.styles.js +215 -0
  6. package/dist/lit/components/app-bar/index.d.ts +1 -0
  7. package/dist/lit/components/app-bar/index.js +4 -2
  8. package/dist/lit/components/app-bar/index.styles.js +94 -0
  9. package/dist/lit/components/artifact/index.d.ts +5 -0
  10. package/dist/lit/components/artifact/index.js +14 -10
  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 +1 -0
  16. package/dist/lit/components/avatar/index.js +4 -2
  17. package/dist/lit/components/avatar/index.styles.js +76 -0
  18. package/dist/lit/components/avatar-group/index.d.ts +1 -0
  19. package/dist/lit/components/avatar-group/index.js +4 -2
  20. package/dist/lit/components/avatar-group/index.styles.js +74 -0
  21. package/dist/lit/components/badge/index.d.ts +1 -0
  22. package/dist/lit/components/badge/index.js +4 -2
  23. package/dist/lit/components/badge/index.styles.js +86 -0
  24. package/dist/lit/components/brand-mark/index.js +8 -9
  25. package/dist/lit/components/brand-mark/index.styles.js +123 -0
  26. package/dist/lit/components/breadcrumbs/index.d.ts +1 -0
  27. package/dist/lit/components/breadcrumbs/index.js +5 -4
  28. package/dist/lit/components/breadcrumbs/index.styles.js +105 -0
  29. package/dist/lit/components/bubble/index.d.ts +4 -0
  30. package/dist/lit/components/bubble/index.js +14 -11
  31. package/dist/lit/components/bubble/index.styles.js +196 -0
  32. package/dist/lit/components/button/index.d.ts +1 -0
  33. package/dist/lit/components/button/index.js +6 -13
  34. package/dist/lit/components/button/index.styles.js +356 -0
  35. package/dist/lit/components/card/index.d.ts +1 -0
  36. package/dist/lit/components/card/index.js +4 -2
  37. package/dist/lit/components/card/index.styles.js +113 -0
  38. package/dist/lit/components/chat/index.d.ts +6 -0
  39. package/dist/lit/components/chat/index.js +15 -10
  40. package/dist/lit/components/chat/index.styles.js +306 -0
  41. package/dist/lit/components/checkbox/index.d.ts +1 -0
  42. package/dist/lit/components/checkbox/index.js +7 -4
  43. package/dist/lit/components/checkbox/index.styles.js +140 -0
  44. package/dist/lit/components/chip/index.d.ts +5 -0
  45. package/dist/lit/components/chip/index.js +8 -2
  46. package/dist/lit/components/chip/index.styles.js +159 -0
  47. package/dist/lit/components/chip-group/index.d.ts +4 -0
  48. package/dist/lit/components/chip-group/index.js +7 -2
  49. package/dist/lit/components/chip-group/index.styles.js +33 -0
  50. package/dist/lit/components/code/index.d.ts +1 -0
  51. package/dist/lit/components/code/index.js +4 -3
  52. package/dist/lit/components/code/index.styles.js +56 -0
  53. package/dist/lit/components/composer/index.d.ts +6 -0
  54. package/dist/lit/components/composer/index.js +15 -10
  55. package/dist/lit/components/composer/index.styles.js +562 -0
  56. package/dist/lit/components/data-table/index.css +18 -0
  57. package/dist/lit/components/data-table/index.d.ts +30 -0
  58. package/dist/lit/components/data-table/index.js +120 -34
  59. package/dist/lit/components/data-table/index.styles.js +198 -0
  60. package/dist/lit/components/date-range/index.d.ts +4 -0
  61. package/dist/lit/components/date-range/index.js +7 -2
  62. package/dist/lit/components/date-range/index.styles.js +338 -0
  63. package/dist/lit/components/dialog/index.d.ts +4 -0
  64. package/dist/lit/components/dialog/index.js +7 -2
  65. package/dist/lit/components/dialog/index.styles.js +138 -0
  66. package/dist/lit/components/divider/index.d.ts +1 -0
  67. package/dist/lit/components/divider/index.js +4 -2
  68. package/dist/lit/components/divider/index.styles.js +41 -0
  69. package/dist/lit/components/empty-state/index.d.ts +1 -0
  70. package/dist/lit/components/empty-state/index.js +4 -2
  71. package/dist/lit/components/empty-state/index.styles.js +83 -0
  72. package/dist/lit/components/expansion-panel/index.d.ts +5 -0
  73. package/dist/lit/components/expansion-panel/index.js +8 -2
  74. package/dist/lit/components/expansion-panel/index.styles.js +134 -0
  75. package/dist/lit/components/field/index.d.ts +4 -0
  76. package/dist/lit/components/field/index.js +9 -4
  77. package/dist/lit/components/field/index.styles.js +237 -0
  78. package/dist/lit/components/file-input/index.d.ts +4 -0
  79. package/dist/lit/components/file-input/index.js +10 -4
  80. package/dist/lit/components/file-input/index.styles.js +271 -0
  81. package/dist/lit/components/form/index.d.ts +4 -0
  82. package/dist/lit/components/form/index.js +7 -2
  83. package/dist/lit/components/form/index.styles.js +43 -0
  84. package/dist/lit/components/grid/index.d.ts +1 -0
  85. package/dist/lit/components/grid/index.js +4 -2
  86. package/dist/lit/components/grid/index.styles.js +67 -0
  87. package/dist/lit/components/kbd/index.d.ts +1 -0
  88. package/dist/lit/components/kbd/index.js +4 -2
  89. package/dist/lit/components/kbd/index.styles.js +49 -0
  90. package/dist/lit/components/list/index.d.ts +4 -0
  91. package/dist/lit/components/list/index.js +7 -2
  92. package/dist/lit/components/list/index.styles.js +29 -0
  93. package/dist/lit/components/list-item/index.d.ts +1 -0
  94. package/dist/lit/components/list-item/index.js +4 -2
  95. package/dist/lit/components/list-item/index.styles.js +133 -0
  96. package/dist/lit/components/menu/index.d.ts +8 -0
  97. package/dist/lit/components/menu/index.js +11 -3
  98. package/dist/lit/components/menu/index.styles.js +108 -0
  99. package/dist/lit/components/multi-select/index.css +156 -0
  100. package/dist/lit/components/multi-select/index.d.ts +70 -0
  101. package/dist/lit/components/multi-select/index.js +497 -0
  102. package/dist/lit/components/multi-select/index.styles.js +170 -0
  103. package/dist/lit/components/navigation-drawer/index.d.ts +4 -0
  104. package/dist/lit/components/navigation-drawer/index.js +7 -2
  105. package/dist/lit/components/navigation-drawer/index.styles.js +128 -0
  106. package/dist/lit/components/overlay/index.d.ts +5 -0
  107. package/dist/lit/components/overlay/index.js +8 -2
  108. package/dist/lit/components/overlay/index.styles.js +185 -0
  109. package/dist/lit/components/pagination/index.d.ts +17 -0
  110. package/dist/lit/components/pagination/index.js +53 -8
  111. package/dist/lit/components/pagination/index.styles.js +116 -0
  112. package/dist/lit/components/popover/index.d.ts +5 -0
  113. package/dist/lit/components/popover/index.js +8 -2
  114. package/dist/lit/components/popover/index.styles.js +48 -0
  115. package/dist/lit/components/primitives/index.js +8 -9
  116. package/dist/lit/components/primitives/index.styles.js +518 -0
  117. package/dist/lit/components/progress/index.d.ts +1 -0
  118. package/dist/lit/components/progress/index.js +4 -2
  119. package/dist/lit/components/progress/index.styles.js +157 -0
  120. package/dist/lit/components/radio-group/index.d.ts +5 -0
  121. package/dist/lit/components/radio-group/index.js +10 -6
  122. package/dist/lit/components/radio-group/index.styles.js +192 -0
  123. package/dist/lit/components/select/index.d.ts +4 -0
  124. package/dist/lit/components/select/index.js +10 -2
  125. package/dist/lit/components/select/index.styles.js +165 -0
  126. package/dist/lit/components/sidebar-item/index.js +8 -9
  127. package/dist/lit/components/sidebar-item/index.styles.js +147 -0
  128. package/dist/lit/components/skeleton/index.d.ts +1 -0
  129. package/dist/lit/components/skeleton/index.js +4 -2
  130. package/dist/lit/components/skeleton/index.styles.js +95 -0
  131. package/dist/lit/components/slider/index.d.ts +5 -0
  132. package/dist/lit/components/slider/index.js +11 -4
  133. package/dist/lit/components/slider/index.styles.js +185 -0
  134. package/dist/lit/components/snackbar/index.d.ts +4 -0
  135. package/dist/lit/components/snackbar/index.js +14 -10
  136. package/dist/lit/components/snackbar/index.styles.js +293 -0
  137. package/dist/lit/components/stack/index.d.ts +1 -0
  138. package/dist/lit/components/stack/index.js +4 -2
  139. package/dist/lit/components/stack/index.styles.js +55 -0
  140. package/dist/lit/components/switch/index.d.ts +1 -0
  141. package/dist/lit/components/switch/index.js +7 -4
  142. package/dist/lit/components/switch/index.styles.js +140 -0
  143. package/dist/lit/components/table/index.d.ts +1 -0
  144. package/dist/lit/components/table/index.js +4 -2
  145. package/dist/lit/components/table/index.styles.js +99 -0
  146. package/dist/lit/components/tabs/index.d.ts +4 -0
  147. package/dist/lit/components/tabs/index.js +8 -4
  148. package/dist/lit/components/tabs/index.styles.js +130 -0
  149. package/dist/lit/components/text-field/index.d.ts +1 -0
  150. package/dist/lit/components/text-field/index.js +7 -2
  151. package/dist/lit/components/text-field/index.styles.js +104 -0
  152. package/dist/lit/components/textarea/index.d.ts +1 -0
  153. package/dist/lit/components/textarea/index.js +7 -2
  154. package/dist/lit/components/textarea/index.styles.js +69 -0
  155. package/dist/lit/components/tooltip/index.d.ts +1 -0
  156. package/dist/lit/components/tooltip/index.js +4 -2
  157. package/dist/lit/components/tooltip/index.styles.js +51 -0
  158. package/dist/lit/components/validation/index.d.ts +6 -0
  159. package/dist/lit/components/validation/index.js +15 -10
  160. package/dist/lit/components/validation/index.styles.js +400 -0
  161. package/dist/lit/index.d.ts +1 -0
  162. package/dist/lit/index.js +1 -0
  163. package/dist/react/XmAlert.d.ts +99 -0
  164. package/dist/react/XmAlert.js +47 -0
  165. package/dist/react/XmAppBar.d.ts +59 -0
  166. package/dist/react/XmAppBar.js +34 -0
  167. package/dist/react/XmArtifact.d.ts +113 -0
  168. package/dist/react/XmArtifact.js +48 -0
  169. package/dist/react/XmArtifactChip.d.ts +56 -0
  170. package/dist/react/XmArtifactChip.js +32 -0
  171. package/dist/react/XmAutocomplete.d.ts +153 -0
  172. package/dist/react/XmAutocomplete.js +70 -0
  173. package/dist/react/XmAvatar.d.ts +71 -0
  174. package/dist/react/XmAvatar.js +40 -0
  175. package/dist/react/XmAvatarGroup.d.ts +59 -0
  176. package/dist/react/XmAvatarGroup.js +34 -0
  177. package/dist/react/XmBadge.d.ts +67 -0
  178. package/dist/react/XmBadge.js +38 -0
  179. package/dist/react/XmBrandGlyph.d.ts +46 -0
  180. package/dist/react/XmBrandGlyph.js +24 -0
  181. package/dist/react/XmBrandMark.d.ts +71 -0
  182. package/dist/react/XmBrandMark.js +40 -0
  183. package/dist/react/XmBreadcrumbs.d.ts +56 -0
  184. package/dist/react/XmBreadcrumbs.js +32 -0
  185. package/dist/react/XmBubble.d.ts +69 -0
  186. package/dist/react/XmBubble.js +38 -0
  187. package/dist/react/XmBubbleActions.d.ts +59 -0
  188. package/dist/react/XmBubbleActions.js +34 -0
  189. package/dist/react/XmBubbleGroup.d.ts +82 -0
  190. package/dist/react/XmBubbleGroup.js +38 -0
  191. package/dist/react/XmButton.d.ts +89 -0
  192. package/dist/react/XmButton.js +48 -0
  193. package/dist/react/XmCard.d.ts +59 -0
  194. package/dist/react/XmCard.js +34 -0
  195. package/dist/react/XmChatShell.d.ts +110 -0
  196. package/dist/react/XmChatShell.js +48 -0
  197. package/dist/react/XmCheckbox.d.ts +145 -0
  198. package/dist/react/XmCheckbox.js +60 -0
  199. package/dist/react/XmChip.d.ts +99 -0
  200. package/dist/react/XmChip.js +48 -0
  201. package/dist/react/XmChipGroup.d.ts +79 -0
  202. package/dist/react/XmChipGroup.js +36 -0
  203. package/dist/react/XmCode.d.ts +55 -0
  204. package/dist/react/XmCode.js +32 -0
  205. package/dist/react/XmComposer.d.ts +123 -0
  206. package/dist/react/XmComposer.js +56 -0
  207. package/dist/react/XmDataTable.d.ts +125 -0
  208. package/dist/react/XmDataTable.js +66 -0
  209. package/dist/react/XmDateRange.d.ts +93 -0
  210. package/dist/react/XmDateRange.js +42 -0
  211. package/dist/react/XmDialog.d.ts +87 -0
  212. package/dist/react/XmDialog.js +41 -0
  213. package/dist/react/XmDivider.d.ts +55 -0
  214. package/dist/react/XmDivider.js +32 -0
  215. package/dist/react/XmEmptyState.d.ts +61 -0
  216. package/dist/react/XmEmptyState.js +34 -0
  217. package/dist/react/XmExpansionPanel.d.ts +101 -0
  218. package/dist/react/XmExpansionPanel.js +49 -0
  219. package/dist/react/XmFileInput.d.ts +151 -0
  220. package/dist/react/XmFileInput.js +70 -0
  221. package/dist/react/XmFileValidationBlock.d.ts +111 -0
  222. package/dist/react/XmFileValidationBlock.js +50 -0
  223. package/dist/react/XmForm.d.ts +91 -0
  224. package/dist/react/XmForm.js +38 -0
  225. package/dist/react/XmGrid.d.ts +59 -0
  226. package/dist/react/XmGrid.js +34 -0
  227. package/dist/react/XmKbd.d.ts +46 -0
  228. package/dist/react/XmKbd.js +24 -0
  229. package/dist/react/XmList.d.ts +83 -0
  230. package/dist/react/XmList.js +38 -0
  231. package/dist/react/XmListItem.d.ts +67 -0
  232. package/dist/react/XmListItem.js +38 -0
  233. package/dist/react/XmMenu.d.ts +98 -0
  234. package/dist/react/XmMenu.js +46 -0
  235. package/dist/react/XmMenuItem.d.ts +63 -0
  236. package/dist/react/XmMenuItem.js +36 -0
  237. package/dist/react/XmMultiSelect.d.ts +161 -0
  238. package/dist/react/XmMultiSelect.js +74 -0
  239. package/dist/react/XmNavigationDrawer.d.ts +93 -0
  240. package/dist/react/XmNavigationDrawer.js +42 -0
  241. package/dist/react/XmOverlay.d.ts +120 -0
  242. package/dist/react/XmOverlay.js +56 -0
  243. package/dist/react/XmPagination.d.ts +117 -0
  244. package/dist/react/XmPagination.js +58 -0
  245. package/dist/react/XmPopover.d.ts +90 -0
  246. package/dist/react/XmPopover.js +42 -0
  247. package/dist/react/XmProgress.d.ts +75 -0
  248. package/dist/react/XmProgress.js +42 -0
  249. package/dist/react/XmRadio.d.ts +88 -0
  250. package/dist/react/XmRadio.js +42 -0
  251. package/dist/react/XmRadioGroup.d.ts +139 -0
  252. package/dist/react/XmRadioGroup.js +58 -0
  253. package/dist/react/XmSelect.d.ts +152 -0
  254. package/dist/react/XmSelect.js +70 -0
  255. package/dist/react/XmSidebarItem.d.ts +75 -0
  256. package/dist/react/XmSidebarItem.js +42 -0
  257. package/dist/react/XmSkeleton.d.ts +71 -0
  258. package/dist/react/XmSkeleton.js +40 -0
  259. package/dist/react/XmSlider.d.ts +160 -0
  260. package/dist/react/XmSlider.js +76 -0
  261. package/dist/react/XmSnackbar.d.ts +110 -0
  262. package/dist/react/XmSnackbar.js +51 -0
  263. package/dist/react/XmStack.d.ts +71 -0
  264. package/dist/react/XmStack.js +40 -0
  265. package/dist/react/XmSwitch.d.ts +136 -0
  266. package/dist/react/XmSwitch.js +58 -0
  267. package/dist/react/XmTab.d.ts +79 -0
  268. package/dist/react/XmTab.js +38 -0
  269. package/dist/react/XmTabPanel.d.ts +55 -0
  270. package/dist/react/XmTabPanel.js +32 -0
  271. package/dist/react/XmTable.d.ts +57 -0
  272. package/dist/react/XmTable.js +32 -0
  273. package/dist/react/XmTabs.d.ts +82 -0
  274. package/dist/react/XmTabs.js +38 -0
  275. package/dist/react/XmTextField.d.ts +147 -0
  276. package/dist/react/XmTextField.js +62 -0
  277. package/dist/react/XmTextarea.d.ts +155 -0
  278. package/dist/react/XmTextarea.js +66 -0
  279. package/dist/react/XmTooltip.d.ts +67 -0
  280. package/dist/react/XmTooltip.js +38 -0
  281. package/dist/react/index.d.ts +59 -0
  282. package/dist/react/index.js +59 -0
  283. package/dist/react/react-utils.js +67 -0
  284. package/package.json +37 -9
  285. package/styles/_base-typography.css +86 -0
  286. package/styles/_primitives.css +54 -0
  287. package/styles/_reset.css +58 -0
  288. package/styles/base.css +23 -0
  289. package/vscode.css-custom-data.json +6 -0
  290. package/vscode.html-custom-data.json +979 -0
@@ -0,0 +1,157 @@
1
+ // GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/progress/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
+ Progress — linear + circular, determinate + indeterminate.
12
+
13
+ The indicator (linear fill / circular arc / sweep) is the ONE coral
14
+ accent: var(--md-sys-color-primary). The unfilled track is a neutral
15
+ surface tier that reads on both surface families and both themes
16
+ (AD-1, UX-DR3, AD-13). Progress is display-only chrome — never a
17
+ severity hue.
18
+
19
+ The circular indeterminate spin ALIGNS with primitives' <xm-spinner>
20
+ motion: one rotation source at 0.7s linear infinite (matching
21
+ @keyframes ds-spin). We do NOT introduce a second rotation speed.
22
+
23
+ BEM block: \`progress\`. Registered in scripts/check-bem.sh STRICT_BLOCKS.
24
+ Elements: __track, __fill, __ring, __ring-svg, __ring-track,
25
+ __ring-indicator, __label. Modifiers: --linear / --circular /
26
+ --indeterminate / --xs / --sm / --md / --lg.
27
+ ============================================ */
28
+
29
+ .progress {
30
+ --progress-color: var(--md-sys-color-primary);
31
+ --progress-track: var(--md-sys-color-surface-container-highest);
32
+ /* Linear track thickness per size (set by the size modifiers). */
33
+ --progress-thickness: 6px;
34
+ /* Circular ring diameter per size. */
35
+ --progress-ring-size: 32px;
36
+ display: inline-flex;
37
+ align-items: center;
38
+ }
39
+
40
+ /* ---------- Size axis ---------- */
41
+ .progress--xs { --progress-thickness: 3px; --progress-ring-size: 18px; }
42
+ .progress--sm { --progress-thickness: 4px; --progress-ring-size: 24px; }
43
+ .progress--md { --progress-thickness: 6px; --progress-ring-size: 32px; }
44
+ .progress--lg { --progress-thickness: 8px; --progress-ring-size: 44px; }
45
+
46
+ /* ---------- Linear ---------- */
47
+ .progress--linear {
48
+ display: block;
49
+ width: 100%;
50
+ }
51
+
52
+ .progress__track {
53
+ display: block;
54
+ position: relative;
55
+ width: 100%;
56
+ height: var(--progress-thickness);
57
+ background: var(--progress-track);
58
+ border-radius: var(--md-sys-shape-corner-full);
59
+ overflow: hidden;
60
+ }
61
+
62
+ .progress__fill {
63
+ display: block;
64
+ height: 100%;
65
+ width: 0;
66
+ background: var(--progress-color);
67
+ border-radius: var(--md-sys-shape-corner-full);
68
+ /* Determinate value changes ease at short4 standard. */
69
+ transition: width var(--md-sys-motion-duration-short4)
70
+ var(--md-sys-motion-easing-standard);
71
+ }
72
+
73
+ /* Linear indeterminate — a fixed-width sweep travelling the track. Opacity /
74
+ translate only; no gradient. */
75
+ .progress--linear.progress--indeterminate .progress__fill {
76
+ width: 40%;
77
+ transition: none;
78
+ animation: progress-sweep var(--md-sys-motion-duration-extra-long2)
79
+ var(--md-sys-motion-easing-standard) infinite;
80
+ }
81
+
82
+ @keyframes progress-sweep {
83
+ from {
84
+ transform: translateX(-110%);
85
+ }
86
+ to {
87
+ transform: translateX(260%);
88
+ }
89
+ }
90
+
91
+ /* ---------- Circular ---------- */
92
+ .progress--circular {
93
+ display: inline-flex;
94
+ }
95
+
96
+ .progress__ring {
97
+ display: inline-flex;
98
+ width: var(--progress-ring-size);
99
+ height: var(--progress-ring-size);
100
+ }
101
+
102
+ .progress__ring-svg {
103
+ width: 100%;
104
+ height: 100%;
105
+ /* Start the determinate arc at 12 o'clock. */
106
+ transform: rotate(-90deg);
107
+ }
108
+
109
+ .progress__ring-track {
110
+ stroke: var(--progress-track);
111
+ }
112
+
113
+ .progress__ring-indicator {
114
+ stroke: var(--progress-color);
115
+ /* Determinate arc grows smoothly at short4 standard. */
116
+ transition: stroke-dashoffset var(--md-sys-motion-duration-short4)
117
+ var(--md-sys-motion-easing-standard);
118
+ }
119
+
120
+ /* Circular indeterminate — rotate the whole svg at the spinner's tempo:
121
+ 0.7s linear infinite (aligned with @keyframes ds-spin). One spin source. */
122
+ .progress--circular.progress--indeterminate .progress__ring-svg {
123
+ transform: none;
124
+ transform-origin: center;
125
+ animation: progress-spin 0.7s linear infinite;
126
+ }
127
+ .progress--circular.progress--indeterminate .progress__ring-indicator {
128
+ transition: none;
129
+ }
130
+
131
+ @keyframes progress-spin {
132
+ to {
133
+ transform: rotate(360deg);
134
+ }
135
+ }
136
+
137
+ /* ---------- Value caption ---------- */
138
+ .progress__label {
139
+ margin-left: var(--s-2);
140
+ font-family: var(--md-sys-typescale-label-medium-font);
141
+ font-size: var(--md-sys-typescale-label-medium-size);
142
+ line-height: var(--md-sys-typescale-label-medium-line-height);
143
+ color: currentColor;
144
+ font-variant-numeric: tabular-nums;
145
+ }
146
+
147
+ @media (prefers-reduced-motion: reduce) {
148
+ .progress--indeterminate .progress__fill,
149
+ .progress--circular.progress--indeterminate .progress__ring-svg {
150
+ animation-duration: var(--md-sys-motion-duration-extra-long4);
151
+ }
152
+ }
153
+
154
+ }`);
155
+ sheets = [sheet];
156
+ }
157
+ export default sheets;
@@ -1,7 +1,11 @@
1
1
  import { LitElement } from "lit";
2
2
  import type { PropertyValues, TemplateResult } from "lit";
3
3
  import { XmField } from "../field/index.js";
4
+ /**
5
+ * @fires change - Fired on commit with the new value in `detail`.
6
+ */
4
7
  export declare class XmRadio extends LitElement {
8
+ static styles: CSSStyleSheet[];
5
9
  /** The primitive value this radio contributes to the group when selected. */
6
10
  value: string;
7
11
  /** Own disabled — OR'd with the group's disabled by the group. */
@@ -14,6 +18,7 @@ export declare class XmRadio extends LitElement {
14
18
  render(): TemplateResult;
15
19
  }
16
20
  export declare class XmRadioGroup extends XmField {
21
+ static styles: CSSStyleSheet[];
17
22
  private get _radios();
18
23
  private get _enabledRadios();
19
24
  connectedCallback(): void;
@@ -36,9 +36,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
36
36
  import { LitElement, html, nothing } from "lit";
37
37
  import { customElement, property } from "lit/decorators.js";
38
38
  import { XmField } from "../field/index.js";
39
- const RADIO_CSS = new URL("../radio-group/index.css", import.meta.url).href;
40
- const PRIMITIVES_CSS = new URL("../primitives/index.css", import.meta.url).href;
39
+ import primitivesSheets from "../primitives/index.styles.js";
40
+ import fieldSheets from "../field/index.styles.js";
41
+ import radioGroupSheets from "./index.styles.js";
41
42
  /* ── <xm-radio> — selectable, presentational child ──────────────────── */
43
+ /**
44
+ * @fires change - Fired on commit with the new value in `detail`.
45
+ */
42
46
  let XmRadio = class XmRadio extends LitElement {
43
47
  constructor() {
44
48
  super(...arguments);
@@ -51,6 +55,8 @@ let XmRadio = class XmRadio extends LitElement {
51
55
  /** Effective disabled the group computes (group OR own). */
52
56
  this.groupDisabled = false;
53
57
  }
58
+ // Adopted from build-generated sheets (gen-styles.mjs) — no runtime URL fetch.
59
+ static { this.styles = [...primitivesSheets, ...radioGroupSheets]; }
54
60
  get effectiveDisabled() {
55
61
  return this.disabled || this.groupDisabled;
56
62
  }
@@ -63,8 +69,6 @@ let XmRadio = class XmRadio extends LitElement {
63
69
  .filter(Boolean)
64
70
  .join(" ");
65
71
  return html `
66
- <link rel="stylesheet" href="${PRIMITIVES_CSS}" />
67
- <link rel="stylesheet" href="${RADIO_CSS}" />
68
72
  <style>
69
73
  :host {
70
74
  display: inline-flex;
@@ -158,6 +162,8 @@ let XmRadioGroup = class XmRadioGroup extends XmField {
158
162
  }
159
163
  };
160
164
  }
165
+ // XmField static styles don't merge on override — re-include chrome + own.
166
+ static { this.styles = [...primitivesSheets, ...fieldSheets, ...radioGroupSheets]; }
161
167
  get _radios() {
162
168
  return Array.from(this.querySelectorAll("xm-radio"));
163
169
  }
@@ -232,8 +238,6 @@ let XmRadioGroup = class XmRadioGroup extends XmField {
232
238
  const helperText = this.isError ? this.error : this.helper;
233
239
  const ctrl = this.controlAria;
234
240
  return html `
235
- <link rel="stylesheet" href="${PRIMITIVES_CSS}" />
236
- <link rel="stylesheet" href="${RADIO_CSS}" />
237
241
  <style>
238
242
  :host {
239
243
  display: block;
@@ -0,0 +1,192 @@
1
+ // GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/radio-group/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-radio-group + xm-radio — single-choice group (Story 2.6).
12
+
13
+ Two BEM blocks in one file (multi-element component, AD-4):
14
+ • \`radio-group\` — the form-associated value owner (extends XmField). Lays
15
+ out the group label, the radiogroup options column, and the helper/error
16
+ row. Chrome semantics (disabled / error) mirror the field family.
17
+ • \`radio\` — a selectable, presentational child: the hairline circle + coral
18
+ dot + label. Value/selection/disabled are driven by the group.
19
+
20
+ Surface & ink (AD-13): both ride the inverse-surface card tier — label + radio
21
+ text are inverse-on-surface ink; the circle hairline is outline-variant. The
22
+ SELECTED radio fills its dot + ring with the single coral accent
23
+ (--md-sys-color-primary). Coral = selection only, never severity (AD-11). The
24
+ error string in the message row carries severity via the warn icon + copy.
25
+
26
+ BEM blocks: \`radio-group\` and \`radio\`. Both registered in
27
+ scripts/check-bem.sh STRICT_BLOCKS.
28
+ ============================================ */
29
+
30
+ /* ──────────────── radio-group block ──────────────── */
31
+ .radio-group {
32
+ display: flex;
33
+ flex-direction: column;
34
+ gap: var(--s-2);
35
+ width: 100%;
36
+ }
37
+
38
+ .radio-group__label {
39
+ display: inline-flex;
40
+ align-items: center;
41
+ gap: var(--s-1);
42
+ color: var(--md-sys-color-inverse-on-surface);
43
+ font:
44
+ var(--md-sys-typescale-label-large-weight)
45
+ var(--md-sys-typescale-label-large-size) /
46
+ var(--md-sys-typescale-label-large-line-height)
47
+ var(--md-sys-typescale-label-large-font);
48
+ }
49
+ .radio-group__label-text {
50
+ letter-spacing: 0;
51
+ }
52
+ .radio-group__required {
53
+ color: var(--md-sys-color-primary);
54
+ font-weight: 700;
55
+ line-height: 1;
56
+ }
57
+
58
+ .radio-group__options {
59
+ display: flex;
60
+ flex-direction: column;
61
+ gap: var(--s-2);
62
+ }
63
+
64
+ .radio-group__message {
65
+ display: flex;
66
+ align-items: flex-start;
67
+ gap: var(--s-1);
68
+ min-height: 1em;
69
+ font:
70
+ var(--md-sys-typescale-body-small-weight)
71
+ var(--md-sys-typescale-body-small-size) /
72
+ var(--md-sys-typescale-body-small-line-height)
73
+ var(--md-sys-typescale-body-small-font);
74
+ }
75
+ .radio-group__message--helper {
76
+ color: var(--xm-color-inverse-on-surface-muted);
77
+ }
78
+ .radio-group__message--error {
79
+ color: var(--md-sys-color-inverse-on-surface);
80
+ }
81
+ .radio-group__error-icon {
82
+ display: inline-flex;
83
+ align-items: center;
84
+ flex-shrink: 0;
85
+ margin-top: 1px;
86
+ color: var(--md-sys-color-inverse-on-surface);
87
+ }
88
+ .radio-group__message-text {
89
+ flex: 1;
90
+ min-width: 0;
91
+ text-wrap: pretty;
92
+ }
93
+
94
+ /* ──────────────── radio block ──────────────── */
95
+ /* Focus ring lives on the host (the focusable element) — the inner circle gets
96
+ the coral halo when the host is focus-visible. */
97
+ :host(:focus-visible) {
98
+ outline: none;
99
+ }
100
+ :host(:focus-visible) .radio__circle {
101
+ border-color: var(--md-sys-color-primary);
102
+ box-shadow: var(--xm-state-focus-ring);
103
+ }
104
+
105
+ .radio {
106
+ display: inline-flex;
107
+ align-items: center;
108
+ gap: var(--s-2);
109
+ cursor: pointer;
110
+ user-select: none;
111
+ }
112
+
113
+ .radio__circle {
114
+ position: relative;
115
+ display: inline-flex;
116
+ align-items: center;
117
+ justify-content: center;
118
+ width: 18px;
119
+ height: 18px;
120
+ flex-shrink: 0;
121
+ box-sizing: border-box;
122
+ border: 1px solid var(--md-sys-color-outline-variant);
123
+ border-radius: var(--md-sys-shape-corner-full);
124
+ background: transparent;
125
+ transition:
126
+ border-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
127
+ box-shadow var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
128
+ }
129
+ .radio:hover .radio__circle {
130
+ border-color: var(--md-sys-color-outline);
131
+ }
132
+
133
+ /* The inner dot — hidden until selected, then coral. Fades in (opacity), not a
134
+ scale-in reveal (POLICIES.md rule 8: no scale-in). */
135
+ .radio__dot {
136
+ width: 10px;
137
+ height: 10px;
138
+ border-radius: var(--md-sys-shape-corner-full);
139
+ background: var(--md-sys-color-primary);
140
+ opacity: 0;
141
+ transition: opacity var(--md-sys-motion-duration-short3)
142
+ var(--md-sys-motion-easing-standard);
143
+ }
144
+
145
+ .radio__label {
146
+ color: var(--md-sys-color-inverse-on-surface);
147
+ font:
148
+ var(--md-sys-typescale-body-medium-weight)
149
+ var(--md-sys-typescale-body-medium-size) /
150
+ var(--md-sys-typescale-body-medium-line-height)
151
+ var(--md-sys-typescale-body-medium-font);
152
+ letter-spacing: 0;
153
+ }
154
+
155
+ /* Selected — coral ring + visible dot. */
156
+ .radio--checked .radio__circle {
157
+ border-color: var(--md-sys-color-primary);
158
+ }
159
+ .radio--checked .radio__dot {
160
+ opacity: 1;
161
+ }
162
+ .radio--checked:hover .radio__circle {
163
+ border-color: var(--md-sys-color-primary);
164
+ }
165
+
166
+ /* Disabled — reduced emphasis, hover reverted, no pointer. */
167
+ .radio--disabled {
168
+ cursor: not-allowed;
169
+ }
170
+ .radio--disabled .radio__circle {
171
+ opacity: 0.45;
172
+ box-shadow: none;
173
+ }
174
+ .radio--disabled .radio__label {
175
+ color: var(--xm-color-inverse-on-surface-disabled);
176
+ }
177
+ .radio--disabled:hover .radio__circle {
178
+ border-color: var(--md-sys-color-outline-variant);
179
+ }
180
+ .radio--disabled.radio--checked:hover .radio__circle {
181
+ border-color: var(--md-sys-color-primary);
182
+ }
183
+
184
+ /* Group disabled cascades to the option text + label. */
185
+ .radio-group--disabled .radio-group__label {
186
+ color: var(--xm-color-inverse-on-surface-disabled);
187
+ }
188
+
189
+ }`);
190
+ sheets = [sheet];
191
+ }
192
+ export default sheets;
@@ -6,7 +6,11 @@ export interface SelectOption {
6
6
  value: string | number;
7
7
  disabled?: boolean;
8
8
  }
9
+ /**
10
+ * @fires change - Fired on commit with the new value in `detail`.
11
+ */
9
12
  export declare class XmSelect extends XmField {
13
+ static styles: CSSStyleSheet[];
10
14
  /** The option model — `{ label, value, disabled? }` shared across
11
15
  select / autocomplete / radio-group so one host handler is safe. */
12
16
  options: SelectOption[];
@@ -35,7 +35,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
35
35
  import { html, nothing } from "lit";
36
36
  import { customElement, property, state, query } from "lit/decorators.js";
37
37
  import { XmField } from "../field/index.js";
38
- const SELECT_CSS = new URL("../select/index.css", import.meta.url).href;
38
+ import primitivesSheets from "../primitives/index.styles.js";
39
+ import fieldSheets from "../field/index.styles.js";
40
+ import selectSheets from "./index.styles.js";
41
+ /**
42
+ * @fires change - Fired on commit with the new value in `detail`.
43
+ */
39
44
  let XmSelect = class XmSelect extends XmField {
40
45
  constructor() {
41
46
  super(...arguments);
@@ -90,6 +95,10 @@ let XmSelect = class XmSelect extends XmField {
90
95
  this._onListKeydown(e);
91
96
  };
92
97
  }
98
+ // Adopted from build-generated sheets (gen-styles.mjs) — no runtime URL
99
+ // fetch (ADR 0012). Lit static styles don't merge on override, so subclasses
100
+ // re-include the chrome (primitives + field) sheets.
101
+ static { this.styles = [...primitivesSheets, ...fieldSheets, ...selectSheets]; }
93
102
  connectedCallback() {
94
103
  super.connectedCallback();
95
104
  // Seed the selection from the uncontrolled `value` attribute (AD-6).
@@ -281,7 +290,6 @@ let XmSelect = class XmSelect extends XmField {
281
290
  ? `${a.id}-opt-${this._activeIndex}`
282
291
  : nothing;
283
292
  return html `
284
- <link rel="stylesheet" href="${SELECT_CSS}" />
285
293
  <button
286
294
  type="button"
287
295
  class="select__control"
@@ -0,0 +1,165 @@
1
+ // GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/select/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-select — single-select dropdown for XmField (Story 2.3).
12
+
13
+ Composes XmField (chrome) + xm-overlay (anchored listbox). This file styles
14
+ ONLY the bespoke parts: the closed control (a full-bleed <button> inside the
15
+ base's .field__control wrapper), the chevron, and the listbox panel content
16
+ projected into the overlay. Positioning / elevation of the panel surface is
17
+ owned by xm-overlay; here we style the option rows inside it.
18
+
19
+ Surface & ink (AD-13):
20
+ • Closed control rides the inverse-surface card tier → inverse-on-surface
21
+ ink, inverse-on-surface-muted for the placeholder.
22
+ • The listbox rows sit on the overlay's inverse-surface panel → ink stays
23
+ inverse-on-surface; hover uses the MD3 state layer.
24
+ • The SELECTED option tints with the coral primary-container and pairs
25
+ on-primary-container ink (matching that surface). Coral = selection only,
26
+ never severity (AD-11).
27
+
28
+ BEM block: \`select\`. Registered in scripts/check-bem.sh STRICT_BLOCKS.
29
+ ============================================ */
30
+
31
+ /* ---------- Closed control — full-bleed button in the field wrapper ---------- */
32
+ .select__control {
33
+ display: flex;
34
+ align-items: center;
35
+ gap: var(--s-2);
36
+ flex: 1;
37
+ min-width: 0;
38
+ width: 100%;
39
+ height: 100%;
40
+ box-sizing: border-box;
41
+ appearance: none;
42
+ border: none;
43
+ outline: none;
44
+ background: transparent;
45
+ color: var(--md-sys-color-inverse-on-surface);
46
+ font:
47
+ var(--md-sys-typescale-body-large-weight)
48
+ var(--md-sys-typescale-body-large-size) /
49
+ var(--md-sys-typescale-body-large-line-height)
50
+ var(--md-sys-typescale-body-large-font);
51
+ padding: 0 var(--s-3);
52
+ text-align: left;
53
+ cursor: pointer;
54
+ }
55
+ .select__control:disabled {
56
+ cursor: not-allowed;
57
+ }
58
+
59
+ /* ---------- Value / placeholder ---------- */
60
+ .select__value {
61
+ flex: 1;
62
+ min-width: 0;
63
+ overflow: hidden;
64
+ white-space: nowrap;
65
+ text-overflow: ellipsis;
66
+ }
67
+ .select__value--placeholder {
68
+ color: var(--xm-color-inverse-on-surface-muted);
69
+ }
70
+
71
+ /* ---------- Chevron — rotates on open (short3, standard) ---------- */
72
+ .select__chevron {
73
+ display: inline-flex;
74
+ align-items: center;
75
+ flex-shrink: 0;
76
+ color: var(--md-sys-color-inverse-on-surface);
77
+ transition: transform var(--md-sys-motion-duration-short3)
78
+ var(--md-sys-motion-easing-standard);
79
+ }
80
+ .select__chevron--open {
81
+ transform: rotate(180deg);
82
+ }
83
+
84
+ /* ---------- Listbox panel content (inside the overlay) ---------- */
85
+ .select__listbox {
86
+ list-style: none;
87
+ margin: 0;
88
+ padding: 0;
89
+ display: flex;
90
+ flex-direction: column;
91
+ gap: var(--s-0-5);
92
+ min-width: 180px;
93
+ max-height: 320px;
94
+ overflow-y: auto;
95
+ }
96
+
97
+ /* ---------- Option rows ---------- */
98
+ .select__option {
99
+ display: flex;
100
+ align-items: center;
101
+ gap: var(--s-2);
102
+ padding: var(--s-2) var(--s-3);
103
+ border-radius: var(--md-sys-shape-corner-small);
104
+ color: var(--md-sys-color-inverse-on-surface);
105
+ font:
106
+ var(--md-sys-typescale-body-medium-weight)
107
+ var(--md-sys-typescale-body-medium-size) /
108
+ var(--md-sys-typescale-body-medium-line-height)
109
+ var(--md-sys-typescale-body-medium-font);
110
+ cursor: pointer;
111
+ user-select: none;
112
+ }
113
+ .select__option-label {
114
+ flex: 1;
115
+ min-width: 0;
116
+ overflow: hidden;
117
+ white-space: nowrap;
118
+ text-overflow: ellipsis;
119
+ }
120
+ .select__option-check {
121
+ display: inline-flex;
122
+ align-items: center;
123
+ flex-shrink: 0;
124
+ color: var(--md-sys-color-primary);
125
+ }
126
+
127
+ /* Active (keyboard / pointer hover) — the MD3 state layer over the panel ink. */
128
+ .select__option--active {
129
+ background: color-mix(
130
+ in oklab,
131
+ var(--md-sys-color-inverse-on-surface)
132
+ var(--md-sys-state-hover-state-layer-opacity),
133
+ transparent
134
+ );
135
+ }
136
+
137
+ /* Selected — coral primary-container tint + on-primary-container ink (AD-13). */
138
+ .select__option--selected {
139
+ background: var(--md-sys-color-primary-container);
140
+ color: var(--md-sys-color-on-primary-container);
141
+ }
142
+ .select__option--selected .select__option-check {
143
+ color: var(--md-sys-color-on-primary-container);
144
+ }
145
+ /* Selected AND active — keep the coral identity, lift slightly via the state
146
+ layer so the keyboard focus is still legible on the tint. */
147
+ .select__option--selected.select__option--active {
148
+ background: color-mix(
149
+ in oklab,
150
+ var(--md-sys-color-on-primary-container)
151
+ var(--md-sys-state-hover-state-layer-opacity),
152
+ var(--md-sys-color-primary-container)
153
+ );
154
+ }
155
+
156
+ /* Disabled option — reduced emphasis, no pointer. */
157
+ .select__option--disabled {
158
+ opacity: 0.4;
159
+ cursor: not-allowed;
160
+ }
161
+
162
+ }`);
163
+ sheets = [sheet];
164
+ }
165
+ export default sheets;
@@ -26,16 +26,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
26
26
  };
27
27
  import { LitElement, html } from "lit";
28
28
  import { customElement, property } from "lit/decorators.js";
29
+ import sidebarItemSheets from "./index.styles.js";
30
+ // Light DOM: adopt the build-generated sheets into the document — no runtime
31
+ // URL fetch (ADR 0012). Deduped by sheet identity (the generated modules are
32
+ // singletons); the CSS is wrapped in @layer components (spine AD-2).
29
33
  if (typeof document !== "undefined") {
30
- for (const href of [
31
- new URL("../sidebar-item/index.css", import.meta.url).href,
32
- ]) {
33
- if (document.querySelector(`link[rel="stylesheet"][href="${href}"]`))
34
- continue;
35
- const link = document.createElement("link");
36
- link.rel = "stylesheet";
37
- link.href = href;
38
- document.head.appendChild(link);
34
+ for (const sheet of [...sidebarItemSheets]) {
35
+ if (!document.adoptedStyleSheets.includes(sheet)) {
36
+ document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
37
+ }
39
38
  }
40
39
  }
41
40
  let XmSidebarItem = class XmSidebarItem extends LitElement {