@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
@@ -20,7 +20,8 @@
20
20
  error-dismiss
21
21
  copy-path — detail: { path }
22
22
 
23
- Light DOM. components/validation/index.css must be loaded in the host page.
23
+ Light DOM. This module appends its stylesheets (validation + primitives) to
24
+ document.head on import.
24
25
 
25
26
  VALIDATION_PRESETS and VALIDATION_TITLE are also exported for reuse.
26
27
  */
@@ -32,6 +33,18 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
32
33
  };
33
34
  import { LitElement, html, svg, nothing } from "lit";
34
35
  import { customElement, property, state } from "lit/decorators.js";
36
+ import validationSheets from "./index.styles.js";
37
+ import primitivesSheets from "../primitives/index.styles.js";
38
+ // Light DOM: adopt the build-generated sheets into the document — no runtime
39
+ // URL fetch (ADR 0012). Deduped by sheet identity (the generated modules are
40
+ // singletons); the CSS is wrapped in @layer components (spine AD-2).
41
+ if (typeof document !== "undefined") {
42
+ for (const sheet of [...validationSheets, ...primitivesSheets]) {
43
+ if (!document.adoptedStyleSheets.includes(sheet)) {
44
+ document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
45
+ }
46
+ }
47
+ }
35
48
  export const VALIDATION_TITLE = {
36
49
  size: "File too large",
37
50
  ext: "Wrong file type",
@@ -110,6 +123,12 @@ const I_UPLOAD = (s = 14) => SHELL(s, 1.8, svg `
110
123
  const I_CHECK = (s = 10) => SHELL(s, 2.4, svg `
111
124
  <path d="M5 12l4 4 10-10" />
112
125
  `);
126
+ /**
127
+ * @fires file-pick - Fired when the user requests to pick a file.
128
+ * @fires file-drop - Fired when a file is dropped (`detail.file`).
129
+ * @fires copy-path - Fired when the file path is copied (`detail.path`).
130
+ * @fires error-dismiss - Fired when the validation error is dismissed.
131
+ */
113
132
  let XmFileValidationBlock = class XmFileValidationBlock extends LitElement {
114
133
  constructor() {
115
134
  super(...arguments);
@@ -316,3 +335,4 @@ __decorate([
316
335
  XmFileValidationBlock = __decorate([
317
336
  customElement("xm-file-validation-block")
318
337
  ], XmFileValidationBlock);
338
+ export { XmFileValidationBlock };
@@ -0,0 +1,400 @@
1
+ // GENERATED by scripts/gen-styles.mjs — do not edit. Source: lit/components/validation/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
+ /* validation.css — unified file-validation block.
11
+ Mirrors the in-app component at:
12
+ packages/shared/components/chat/latest/settings/SettingsDefinitionsField.vue
13
+ Token contract: --md-sys-* / --xm-* only.
14
+ Theme flips happen via primitives behind those tokens. */
15
+
16
+ /* ----- Block container (single border, single radius) ----- */
17
+
18
+ .ds-fvb {
19
+ border: 1px solid var(--md-sys-color-outline-variant);
20
+ border-radius: var(--md-sys-shape-corner-button);
21
+ background: var(--md-sys-color-inverse-surface);
22
+ font-family: var(--md-sys-typescale-body-large-font);
23
+ color: var(--md-sys-color-inverse-on-surface);
24
+ width: 100%;
25
+ height: 84px;
26
+ display: flex;
27
+ flex-direction: column;
28
+ justify-content: center;
29
+ overflow: hidden;
30
+ box-sizing: border-box;
31
+ transition:
32
+ border-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
33
+ background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
34
+ }
35
+
36
+ /* Two-region states (file + error, drop + error) grow to fit their
37
+ content. Single-region states (idle, dragging, valid, standalone
38
+ error) keep the fixed 84px. */
39
+ .ds-fvb--invalid,
40
+ .ds-fvb--error-no-file {
41
+ height: auto;
42
+ min-height: 84px;
43
+ justify-content: flex-start;
44
+ }
45
+
46
+ .ds-fvb--invalid .ds-fvb__file,
47
+ .ds-fvb--error-no-file .ds-fvb__drop {
48
+ flex: 0 0 auto;
49
+ }
50
+
51
+ .ds-fvb--invalid .ds-fvb__error,
52
+ .ds-fvb--error-no-file .ds-fvb__error {
53
+ flex: 1 1 auto;
54
+ align-content: start;
55
+ }
56
+
57
+ .ds-fvb--idle {
58
+ border-style: dashed;
59
+ border-color: var(--md-sys-color-outline);
60
+ background: var(--md-sys-color-surface-container-high);
61
+ }
62
+
63
+ .ds-fvb--dragging {
64
+ border-style: solid;
65
+ border-color: var(--xm-color-primary-pressed);
66
+ background: color-mix(
67
+ in oklch,
68
+ var(--md-sys-color-primary-container) 50%,
69
+ var(--md-sys-color-surface-container-high)
70
+ );
71
+ }
72
+
73
+ .ds-fvb--valid {
74
+ border-color: var(--md-sys-color-outline-variant);
75
+ background: var(--md-sys-color-inverse-surface);
76
+ }
77
+
78
+ .ds-fvb--invalid,
79
+ .ds-fvb--error-no-file {
80
+ border-color: var(--md-sys-color-outline);
81
+ background: var(--md-sys-color-surface-container-high);
82
+ color: var(--xm-color-inverse-on-surface-muted);
83
+ }
84
+
85
+ /* ----- Drop region ----- */
86
+
87
+ .ds-fvb__drop {
88
+ display: flex;
89
+ flex-direction: column;
90
+ align-items: center;
91
+ gap: var(--s-0-5);
92
+ padding: var(--s-2-5) var(--s-3);
93
+ cursor: pointer;
94
+ }
95
+
96
+ .ds-fvb__drop:focus-visible {
97
+ outline: 1px solid var(--xm-color-primary-pressed);
98
+ outline-offset: 2px;
99
+ }
100
+
101
+ .ds-fvb__drop[data-dragging="1"] {
102
+ background: color-mix(
103
+ in oklch,
104
+ var(--md-sys-color-primary-container) 35%,
105
+ transparent
106
+ );
107
+ }
108
+
109
+ .ds-fvb__drop-primary {
110
+ font-size: 12px;
111
+ font-weight: 500;
112
+ color: inherit;
113
+ }
114
+
115
+ .ds-fvb__drop-secondary {
116
+ font-size: 10.5px;
117
+ color: var(--xm-color-inverse-on-surface-muted);
118
+ }
119
+
120
+ .ds-fvb--error-no-file .ds-fvb__drop-secondary {
121
+ color: var(--xm-color-inverse-on-surface-muted);
122
+ }
123
+
124
+ /* ----- File region ----- */
125
+
126
+ .ds-fvb__file {
127
+ display: flex;
128
+ flex-direction: column;
129
+ gap: var(--s-0-5);
130
+ padding: var(--s-1-5) var(--s-2-5);
131
+ min-width: 0;
132
+ }
133
+
134
+ .ds-fvb--invalid .ds-fvb__file {
135
+ padding: var(--s-2) var(--s-3);
136
+ }
137
+
138
+ .ds-fvb__file-row {
139
+ display: flex;
140
+ align-items: center;
141
+ gap: var(--s-2);
142
+ min-width: 0;
143
+ }
144
+
145
+ .ds-fvb__file-actions {
146
+ display: inline-flex;
147
+ align-items: center;
148
+ gap: var(--s-1);
149
+ margin-left: auto;
150
+ flex-shrink: 0;
151
+ }
152
+
153
+ .ds-fvb__file-name {
154
+ display: inline-flex;
155
+ align-items: center;
156
+ gap: var(--s-1-5);
157
+ font-size: 12px;
158
+ font-weight: 500;
159
+ color: var(--md-sys-color-inverse-on-surface);
160
+ min-width: 0;
161
+ flex: 1 1 auto;
162
+ }
163
+
164
+ .ds-fvb--invalid .ds-fvb__file-name {
165
+ color: var(--md-sys-color-inverse-on-surface);
166
+ }
167
+
168
+ .ds-fvb__file-name-label {
169
+ white-space: nowrap;
170
+ overflow: hidden;
171
+ text-overflow: ellipsis;
172
+ }
173
+
174
+ .ds-fvb__file-sub {
175
+ font-size: 10.5px;
176
+ color: var(--xm-color-inverse-on-surface-muted);
177
+ font-feature-settings: "tnum";
178
+ white-space: nowrap;
179
+ overflow: hidden;
180
+ text-overflow: ellipsis;
181
+ min-width: 0;
182
+ }
183
+
184
+ .ds-fvb--invalid .ds-fvb__file-sub {
185
+ color: var(--xm-color-inverse-on-surface-muted);
186
+ }
187
+
188
+ /* ----- Hairline divider between file/drop and error rows ----- */
189
+
190
+ .ds-fvb__divider {
191
+ height: 1px;
192
+ background: color-mix(in oklch, var(--xm-color-inverse-on-surface-muted) 22%, transparent);
193
+ margin: 0;
194
+ }
195
+
196
+ /* ----- Error region ----- */
197
+
198
+ .ds-fvb__error {
199
+ display: grid;
200
+ grid-template-columns: 12px 1fr 14px;
201
+ column-gap: var(--s-2);
202
+ row-gap: var(--s-0-5);
203
+ padding: var(--s-1-5) var(--s-2-5);
204
+ }
205
+
206
+ .ds-fvb--invalid .ds-fvb__error {
207
+ padding: var(--s-2) var(--s-3);
208
+ }
209
+
210
+ .ds-fvb__error-icon {
211
+ grid-column: 1;
212
+ grid-row: 1;
213
+ display: inline-flex;
214
+ align-items: center;
215
+ justify-content: center;
216
+ width: 12px;
217
+ height: 12px;
218
+ margin-top: var(--s-0-5);
219
+ color: var(--md-sys-color-inverse-on-surface);
220
+ }
221
+
222
+ .ds-fvb__error-title {
223
+ grid-column: 2;
224
+ grid-row: 1;
225
+ font-size: 12px;
226
+ font-weight: 600;
227
+ letter-spacing: -0.005em;
228
+ color: var(--md-sys-color-inverse-on-surface);
229
+ min-width: 0;
230
+ line-height: 1.35;
231
+ }
232
+
233
+ .ds-fvb__error-dismiss {
234
+ grid-column: 3;
235
+ grid-row: 1;
236
+ appearance: none;
237
+ border: none;
238
+ background: transparent;
239
+ color: var(--xm-color-inverse-on-surface-muted);
240
+ width: 14px;
241
+ height: 14px;
242
+ border-radius: 4px;
243
+ cursor: pointer;
244
+ display: inline-flex;
245
+ align-items: center;
246
+ justify-content: center;
247
+ margin-top: 1px;
248
+ transition:
249
+ background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
250
+ color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
251
+ }
252
+
253
+ .ds-fvb__error-dismiss:hover {
254
+ background: var(--md-sys-color-outline-variant);
255
+ color: var(--md-sys-color-inverse-on-surface);
256
+ }
257
+
258
+ .ds-fvb__error-message {
259
+ grid-column: 2 / 4;
260
+ grid-row: 2;
261
+ margin: 0;
262
+ font-size: 11px;
263
+ line-height: 1.4;
264
+ color: var(--xm-color-inverse-on-surface-muted);
265
+ white-space: nowrap;
266
+ overflow: hidden;
267
+ text-overflow: ellipsis;
268
+ min-width: 0;
269
+ }
270
+
271
+ .ds-fvb__meta {
272
+ grid-column: 2 / 4;
273
+ grid-row: 3;
274
+ display: flex;
275
+ flex-wrap: nowrap;
276
+ align-items: center;
277
+ gap: var(--s-1) var(--s-1-5);
278
+ margin-top: 1px;
279
+ min-width: 0;
280
+ }
281
+
282
+ .ds-fvb__filename {
283
+ font-size: 10.5px;
284
+ color: var(--md-sys-color-inverse-on-surface);
285
+ font-weight: 500;
286
+ max-width: 100%;
287
+ white-space: nowrap;
288
+ overflow: hidden;
289
+ text-overflow: ellipsis;
290
+ min-width: 0;
291
+ }
292
+
293
+ .ds-fvb__path {
294
+ font-size: 10.5px;
295
+ background: var(--md-sys-color-outline-variant);
296
+ color: var(--md-sys-color-inverse-on-surface);
297
+ padding: 1px 5px;
298
+ border-radius: 3px;
299
+ line-height: 1.4;
300
+ }
301
+
302
+ .ds-fvb__rule {
303
+ font-size: 10px;
304
+ background: var(--md-sys-color-outline-variant);
305
+ color: var(--md-sys-color-inverse-on-surface);
306
+ padding: 1px var(--s-1-5);
307
+ border-radius: 999px;
308
+ font-weight: 500;
309
+ letter-spacing: 0.02em;
310
+ text-transform: lowercase;
311
+ line-height: 1.4;
312
+ }
313
+
314
+ .ds-fvb__copy {
315
+ appearance: none;
316
+ margin-left: auto;
317
+ border: none;
318
+ background: transparent;
319
+ color: var(--xm-color-inverse-on-surface-muted);
320
+ font-size: 10px;
321
+ font-weight: 500;
322
+ padding: 1px 5px;
323
+ border-radius: 3px;
324
+ cursor: pointer;
325
+ display: inline-flex;
326
+ align-items: center;
327
+ gap: 3px;
328
+ font-family: var(--md-sys-typescale-body-large-font);
329
+ line-height: 1.4;
330
+ transition:
331
+ background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
332
+ color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
333
+ }
334
+
335
+ .ds-fvb__copy:hover {
336
+ background: var(--md-sys-color-outline-variant);
337
+ color: var(--md-sys-color-inverse-on-surface);
338
+ }
339
+
340
+ .ds-fvb__copy:focus-visible {
341
+ outline: 1px solid var(--md-sys-color-inverse-on-surface);
342
+ outline-offset: 1px;
343
+ }
344
+
345
+ /* ----- Shared helpers (still used by the file row) ----- */
346
+
347
+ .ds-mono {
348
+ font-family: var(--xm-typescale-mono-font);
349
+ }
350
+
351
+ .ds-valid-tick {
352
+ display: inline-flex;
353
+ align-items: center;
354
+ justify-content: center;
355
+ width: 12px;
356
+ height: 12px;
357
+ border-radius: 50%;
358
+ background: var(--md-sys-color-inverse-on-surface);
359
+ color: var(--md-sys-color-inverse-surface);
360
+ flex-shrink: 0;
361
+ }
362
+
363
+ .ds-invalid-mark {
364
+ display: inline-flex;
365
+ align-items: center;
366
+ justify-content: center;
367
+ width: 12px;
368
+ height: 12px;
369
+ border-radius: 50%;
370
+ color: var(--md-sys-color-inverse-on-surface);
371
+ flex-shrink: 0;
372
+ }
373
+
374
+ /* ----- Extension badges ----- */
375
+
376
+ .ds-ext-badge {
377
+ font-family: var(--xm-typescale-mono-font);
378
+ font-size: 9px;
379
+ font-weight: 700;
380
+ padding: var(--s-0-5) 5px;
381
+ border-radius: 3px;
382
+ letter-spacing: 0.05em;
383
+ flex-shrink: 0;
384
+ }
385
+
386
+ .ds-ext-yml,
387
+ .ds-ext-yaml {
388
+ background: var(--xm-ext-yml-bg);
389
+ color: var(--xm-ext-yml-ink);
390
+ }
391
+
392
+ .ds-ext-json {
393
+ background: var(--xm-ext-json-bg);
394
+ color: var(--xm-ext-json-ink);
395
+ }
396
+
397
+ }`);
398
+ sheets = [sheet];
399
+ }
400
+ export default sheets;
@@ -31,6 +31,7 @@ export * from "./components/kbd/index.js";
31
31
  export * from "./components/list/index.js";
32
32
  export * from "./components/list-item/index.js";
33
33
  export * from "./components/menu/index.js";
34
+ export * from "./components/multi-select/index.js";
34
35
  export * from "./components/navigation-drawer/index.js";
35
36
  export * from "./components/overlay/index.js";
36
37
  export * from "./components/pagination/index.js";
package/dist/lit/index.js CHANGED
@@ -40,6 +40,7 @@ export * from "./components/kbd/index.js";
40
40
  export * from "./components/list/index.js";
41
41
  export * from "./components/list-item/index.js";
42
42
  export * from "./components/menu/index.js";
43
+ export * from "./components/multi-select/index.js";
43
44
  export * from "./components/navigation-drawer/index.js";
44
45
  export * from "./components/overlay/index.js";
45
46
  export * from "./components/pagination/index.js";
@@ -0,0 +1,99 @@
1
+ import React from "react";
2
+ import { XmAlert as XmAlertElement } from "../lit/components/alert/index.js";
3
+
4
+ /**
5
+ * A generic type for strongly typing custom events with their targets
6
+ * @template T - The type of the event target (extends EventTarget)
7
+ * @template D - The type of the detail payload for the custom event
8
+ */
9
+ type TypedEvent<T extends EventTarget, E = Event> = E & {
10
+ target: T;
11
+ };
12
+ /** `XmAlert` component event */
13
+ export type XmAlertElementEvent<E = Event> = TypedEvent<XmAlertElement, E>;
14
+
15
+ export type { XmAlertElement };
16
+
17
+ export interface XmAlertProps extends Pick<
18
+ React.AllHTMLAttributes<HTMLElement>,
19
+ | "children"
20
+ | "dir"
21
+ | "hidden"
22
+ | "id"
23
+ | "lang"
24
+ | "slot"
25
+ | "style"
26
+ | "title"
27
+ | "translate"
28
+ | "onClick"
29
+ | "onFocus"
30
+ | "onBlur"
31
+ > {
32
+ /** undefined */
33
+ dismissible?: boolean;
34
+
35
+ /** undefined */
36
+ static?: boolean;
37
+
38
+ /** undefined */
39
+ prominent?: boolean;
40
+
41
+ /** undefined */
42
+ severity?: XmAlertElement["severity"];
43
+
44
+ /** undefined */
45
+ heading?: XmAlertElement["heading"];
46
+
47
+ /** undefined */
48
+ variant?: XmAlertElement["variant"];
49
+
50
+ /** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
51
+ className?: string;
52
+
53
+ /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
54
+ exportparts?: string;
55
+
56
+ /** Used for labels to link them with their inputs (using input id). */
57
+ htmlFor?: string;
58
+
59
+ /** Used to help React identify which items have changed, are added, or are removed within a list. */
60
+ key?: number | string;
61
+
62
+ /** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
63
+ part?: string;
64
+
65
+ /** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */
66
+ ref?: React.Ref<XmAlertElement>;
67
+
68
+ /** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */
69
+ tabIndex?: number;
70
+
71
+ /** Fired when the alert's action is activated. */
72
+ onAlertAction?: (event: XmAlertElementEvent) => void;
73
+
74
+ /** Fired when the alert is dismissed. */
75
+ onAlertDismiss?: (event: XmAlertElementEvent) => void;
76
+ }
77
+
78
+ /**
79
+ *
80
+ *
81
+ * ## Attributes & Properties
82
+ *
83
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
84
+ *
85
+ * - `severity`: undefined
86
+ * - `heading`: undefined
87
+ * - `dismissible`: undefined
88
+ * - `static`: undefined
89
+ * - `prominent`: undefined
90
+ * - `variant`: undefined
91
+ *
92
+ * ## Events
93
+ *
94
+ * Events that will be emitted by the component.
95
+ *
96
+ * - `alert-action`: Fired when the alert's action is activated.
97
+ * - `alert-dismiss`: Fired when the alert is dismissed.
98
+ */
99
+ export const XmAlert: React.ForwardRefExoticComponent<XmAlertProps>;
@@ -0,0 +1,45 @@
1
+ import React, { forwardRef, useRef } from "react";
2
+ import "../lit/components/alert/index.js";
3
+ import { useEventListener, createForwardedRefHandler } from "./react-utils.js";
4
+
5
+ export const XmAlert = forwardRef((props, forwardedRef) => {
6
+ const ref = useRef(null);
7
+ const {
8
+ dismissible,
9
+ prominent,
10
+ severity,
11
+ heading,
12
+ variant,
13
+ className,
14
+ exportparts,
15
+ htmlFor,
16
+ part,
17
+ tabIndex,
18
+ ...restProps
19
+ } = props;
20
+
21
+ /** Event listeners - run once */
22
+ useEventListener(ref, "alert-action", props.onAlertAction);
23
+ useEventListener(ref, "alert-dismiss", props.onAlertDismiss);
24
+
25
+ return React.createElement(
26
+ "xm-alert",
27
+ {
28
+ ref: createForwardedRefHandler(ref, forwardedRef),
29
+ ...restProps,
30
+ severity: severity,
31
+ heading: heading,
32
+ variant: variant,
33
+ class: className,
34
+ exportparts: exportparts,
35
+ for: htmlFor ?? props["for"],
36
+ part: part,
37
+ tabindex: tabIndex ?? props["tabindex"],
38
+ dismissible: dismissible ? true : undefined,
39
+ static: props.static ? true : undefined,
40
+ prominent: prominent ? true : undefined,
41
+ style: { ...props.style },
42
+ },
43
+ props.children,
44
+ );
45
+ });
@@ -0,0 +1,59 @@
1
+ import React from "react";
2
+ import { XmAppBar as XmAppBarElement } from "../lit/components/app-bar/index.js";
3
+
4
+ export type { XmAppBarElement };
5
+
6
+ export interface XmAppBarProps extends Pick<
7
+ React.AllHTMLAttributes<HTMLElement>,
8
+ | "children"
9
+ | "dir"
10
+ | "hidden"
11
+ | "id"
12
+ | "lang"
13
+ | "slot"
14
+ | "style"
15
+ | "title"
16
+ | "translate"
17
+ | "onClick"
18
+ | "onFocus"
19
+ | "onBlur"
20
+ > {
21
+ /** undefined */
22
+ sticky?: boolean;
23
+
24
+ /** undefined */
25
+ size?: XmAppBarElement["size"];
26
+
27
+ /** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
28
+ className?: string;
29
+
30
+ /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
31
+ exportparts?: string;
32
+
33
+ /** Used for labels to link them with their inputs (using input id). */
34
+ htmlFor?: string;
35
+
36
+ /** Used to help React identify which items have changed, are added, or are removed within a list. */
37
+ key?: number | string;
38
+
39
+ /** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
40
+ part?: string;
41
+
42
+ /** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */
43
+ ref?: React.Ref<XmAppBarElement>;
44
+
45
+ /** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */
46
+ tabIndex?: number;
47
+ }
48
+
49
+ /**
50
+ *
51
+ *
52
+ * ## Attributes & Properties
53
+ *
54
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
55
+ *
56
+ * - `size`: undefined
57
+ * - `sticky`: undefined
58
+ */
59
+ export const XmAppBar: React.ForwardRefExoticComponent<XmAppBarProps>;
@@ -0,0 +1,34 @@
1
+ import React, { forwardRef, useRef } from "react";
2
+ import "../lit/components/app-bar/index.js";
3
+ import { createForwardedRefHandler } from "./react-utils.js";
4
+
5
+ export const XmAppBar = forwardRef((props, forwardedRef) => {
6
+ const ref = useRef(null);
7
+ const {
8
+ sticky,
9
+ size,
10
+ className,
11
+ exportparts,
12
+ htmlFor,
13
+ part,
14
+ tabIndex,
15
+ ...restProps
16
+ } = props;
17
+
18
+ return React.createElement(
19
+ "xm-app-bar",
20
+ {
21
+ ref: createForwardedRefHandler(ref, forwardedRef),
22
+ ...restProps,
23
+ size: size,
24
+ class: className,
25
+ exportparts: exportparts,
26
+ for: htmlFor ?? props["for"],
27
+ part: part,
28
+ tabindex: tabIndex ?? props["tabindex"],
29
+ sticky: sticky ? true : undefined,
30
+ style: { ...props.style },
31
+ },
32
+ props.children,
33
+ );
34
+ });