@ecopages/radiant-ui 0.1.0-rc.0 → 0.1.0-rc.10

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 +4 -4
  2. package/dist/aria.d.ts +11 -0
  3. package/dist/aria.js +2 -0
  4. package/dist/aria.js.map +7 -0
  5. package/dist/components/ui/alert/alert.css +1 -1
  6. package/dist/components/ui/alert/alert.d.ts +9 -13
  7. package/dist/components/ui/alert/alert.script.d.ts +26 -23
  8. package/dist/components/ui/alert/index.js +1 -1
  9. package/dist/components/ui/alert/index.js.map +3 -3
  10. package/dist/components/ui/autocomplete/autocomplete.d.ts +18 -19
  11. package/dist/components/ui/autocomplete/autocomplete.script.d.ts +33 -12
  12. package/dist/components/ui/autocomplete/index.js +1 -1
  13. package/dist/components/ui/autocomplete/index.js.map +3 -3
  14. package/dist/components/ui/avatar/avatar.d.ts +4 -4
  15. package/dist/components/ui/avatar/index.js +1 -1
  16. package/dist/components/ui/avatar/index.js.map +4 -4
  17. package/dist/components/ui/badge/badge.css +55 -0
  18. package/dist/components/ui/badge/badge.d.ts +19 -0
  19. package/dist/components/ui/badge/index.d.ts +1 -0
  20. package/dist/components/ui/badge/index.js +2 -0
  21. package/dist/components/ui/badge/index.js.map +7 -0
  22. package/dist/components/ui/breadcrumb/breadcrumb.d.ts +24 -28
  23. package/dist/components/ui/breadcrumb/breadcrumb.script.d.ts +11 -20
  24. package/dist/components/ui/breadcrumb/index.js +1 -1
  25. package/dist/components/ui/breadcrumb/index.js.map +3 -3
  26. package/dist/components/ui/button/button.css +4 -5
  27. package/dist/components/ui/button/button.d.ts +13 -15
  28. package/dist/components/ui/button/index.js +1 -1
  29. package/dist/components/ui/button/index.js.map +3 -3
  30. package/dist/components/ui/button-group/button-group.d.ts +4 -6
  31. package/dist/components/ui/button-group/index.js +1 -1
  32. package/dist/components/ui/button-group/index.js.map +3 -3
  33. package/dist/components/ui/calendar/calendar.d.ts +3 -5
  34. package/dist/components/ui/calendar/calendar.script.d.ts +24 -22
  35. package/dist/components/ui/calendar/index.js +1 -1
  36. package/dist/components/ui/calendar/index.js.map +2 -2
  37. package/dist/components/ui/carousel/carousel.d.ts +22 -35
  38. package/dist/components/ui/carousel/carousel.script.d.ts +43 -54
  39. package/dist/components/ui/carousel/index.js +1 -1
  40. package/dist/components/ui/carousel/index.js.map +4 -4
  41. package/dist/components/ui/checkbox/checkbox.d.ts +14 -5
  42. package/dist/components/ui/checkbox/checkbox.script.d.ts +48 -19
  43. package/dist/components/ui/checkbox/index.js +1 -1
  44. package/dist/components/ui/checkbox/index.js.map +3 -3
  45. package/dist/components/ui/checkbox-group/checkbox-group.css +15 -0
  46. package/dist/components/ui/checkbox-group/checkbox-group.d.ts +24 -0
  47. package/dist/components/ui/checkbox-group/checkbox-group.script.d.ts +80 -0
  48. package/dist/components/ui/checkbox-group/index.d.ts +2 -0
  49. package/dist/components/ui/checkbox-group/index.js +2 -0
  50. package/dist/components/ui/checkbox-group/index.js.map +7 -0
  51. package/dist/components/ui/chip/chip.d.ts +3 -3
  52. package/dist/components/ui/chip-list/chip-list.d.ts +4 -7
  53. package/dist/components/ui/chip-list/index.js +1 -1
  54. package/dist/components/ui/chip-list/index.js.map +3 -3
  55. package/dist/components/ui/combobox/combobox.css +10 -68
  56. package/dist/components/ui/combobox/combobox.d.ts +27 -26
  57. package/dist/components/ui/combobox/combobox.script.d.ts +63 -25
  58. package/dist/components/ui/combobox/index.d.ts +2 -2
  59. package/dist/components/ui/combobox/index.js +1 -1
  60. package/dist/components/ui/combobox/index.js.map +4 -4
  61. package/dist/components/ui/cycle-toggle/cycle-toggle.d.ts +13 -13
  62. package/dist/components/ui/cycle-toggle/cycle-toggle.script.d.ts +36 -4
  63. package/dist/components/ui/cycle-toggle/index.js +1 -1
  64. package/dist/components/ui/cycle-toggle/index.js.map +3 -3
  65. package/dist/components/ui/date-field/date-field.css +0 -67
  66. package/dist/components/ui/date-field/date-field.d.ts +14 -18
  67. package/dist/components/ui/date-field/date-field.script.d.ts +29 -25
  68. package/dist/components/ui/date-field/index.js +1 -1
  69. package/dist/components/ui/date-field/index.js.map +4 -4
  70. package/dist/components/ui/date-range-picker/date-range-picker.css +0 -67
  71. package/dist/components/ui/date-range-picker/date-range-picker.d.ts +19 -22
  72. package/dist/components/ui/date-range-picker/date-range-picker.script.d.ts +31 -22
  73. package/dist/components/ui/date-range-picker/index.js +1 -1
  74. package/dist/components/ui/date-range-picker/index.js.map +4 -4
  75. package/dist/components/ui/dialog/dialog.d.ts +24 -27
  76. package/dist/components/ui/dialog/dialog.script.d.ts +36 -21
  77. package/dist/components/ui/dialog/index.js +1 -1
  78. package/dist/components/ui/dialog/index.js.map +4 -4
  79. package/dist/components/ui/disclosure/disclosure-group.script.d.ts +20 -6
  80. package/dist/components/ui/disclosure/disclosure.d.ts +19 -17
  81. package/dist/components/ui/disclosure/disclosure.script.d.ts +30 -9
  82. package/dist/components/ui/disclosure/index.js +1 -1
  83. package/dist/components/ui/disclosure/index.js.map +3 -3
  84. package/dist/components/ui/feed/feed.d.ts +13 -23
  85. package/dist/components/ui/feed/index.js +1 -1
  86. package/dist/components/ui/feed/index.js.map +4 -4
  87. package/dist/components/ui/field/field-description.d.ts +3 -2
  88. package/dist/components/ui/field/field-error.d.ts +4 -4
  89. package/dist/components/ui/field/field.d.ts +7 -7
  90. package/dist/components/ui/field/field.script.d.ts +48 -26
  91. package/dist/components/ui/field/index.js +1 -1
  92. package/dist/components/ui/field/index.js.map +4 -4
  93. package/dist/components/ui/form/control-protocol.d.ts +14 -0
  94. package/dist/components/ui/form/form-context.d.ts +3 -1
  95. package/dist/components/ui/form/form.d.ts +9 -3
  96. package/dist/components/ui/form/form.script.d.ts +37 -15
  97. package/dist/components/ui/form/index.js +1 -1
  98. package/dist/components/ui/form/index.js.map +3 -3
  99. package/dist/components/ui/grid/grid.d.ts +8 -8
  100. package/dist/components/ui/grid/grid.script.d.ts +20 -21
  101. package/dist/components/ui/grid/index.js +1 -1
  102. package/dist/components/ui/grid/index.js.map +3 -3
  103. package/dist/components/ui/heading/heading.css +0 -1
  104. package/dist/components/ui/heading/heading.d.ts +10 -14
  105. package/dist/components/ui/heading/index.js +1 -1
  106. package/dist/components/ui/heading/index.js.map +3 -3
  107. package/dist/components/ui/headline/headline.css +1 -1
  108. package/dist/components/ui/headline/headline.d.ts +7 -7
  109. package/dist/components/ui/headline/index.js +1 -1
  110. package/dist/components/ui/headline/index.js.map +3 -3
  111. package/dist/components/ui/hover-card/hover-card.css +121 -0
  112. package/dist/components/ui/hover-card/hover-card.d.ts +15 -0
  113. package/dist/components/ui/hover-card/hover-card.script.d.ts +110 -0
  114. package/dist/components/ui/hover-card/index.d.ts +3 -0
  115. package/dist/components/ui/hover-card/index.js +2 -0
  116. package/dist/components/ui/hover-card/index.js.map +7 -0
  117. package/dist/components/ui/input/index.js +1 -1
  118. package/dist/components/ui/input/index.js.map +3 -3
  119. package/dist/components/ui/input/input.d.ts +3 -8
  120. package/dist/components/ui/input-group/index.d.ts +1 -0
  121. package/dist/components/ui/input-group/index.js +2 -0
  122. package/dist/components/ui/input-group/index.js.map +7 -0
  123. package/dist/components/ui/input-group/input-group.css +161 -0
  124. package/dist/components/ui/input-group/input-group.d.ts +31 -0
  125. package/dist/components/ui/knob/index.d.ts +2 -0
  126. package/dist/components/ui/knob/index.js +2 -0
  127. package/dist/components/ui/knob/index.js.map +7 -0
  128. package/dist/components/ui/knob/knob-geometry.d.ts +21 -0
  129. package/dist/components/ui/knob/knob.css +139 -0
  130. package/dist/components/ui/knob/knob.d.ts +16 -0
  131. package/dist/components/ui/knob/knob.script.d.ts +138 -0
  132. package/dist/components/ui/label/index.js +1 -1
  133. package/dist/components/ui/label/index.js.map +3 -3
  134. package/dist/components/ui/label/label.d.ts +5 -4
  135. package/dist/components/ui/listbox/index.d.ts +2 -2
  136. package/dist/components/ui/listbox/index.js +1 -1
  137. package/dist/components/ui/listbox/index.js.map +4 -4
  138. package/dist/components/ui/listbox/listbox.css +14 -0
  139. package/dist/components/ui/listbox/listbox.d.ts +21 -7
  140. package/dist/components/ui/listbox/listbox.script.d.ts +51 -20
  141. package/dist/components/ui/menu-button/index.d.ts +1 -1
  142. package/dist/components/ui/menu-button/index.js +1 -1
  143. package/dist/components/ui/menu-button/index.js.map +4 -4
  144. package/dist/components/ui/menu-button/menu-button.css +30 -118
  145. package/dist/components/ui/menu-button/menu-button.d.ts +24 -19
  146. package/dist/components/ui/menu-button/menu-button.script.d.ts +39 -20
  147. package/dist/components/ui/menubar/index.d.ts +1 -1
  148. package/dist/components/ui/menubar/index.js +1 -1
  149. package/dist/components/ui/menubar/index.js.map +4 -4
  150. package/dist/components/ui/menubar/menubar.css +36 -59
  151. package/dist/components/ui/menubar/menubar.d.ts +31 -10
  152. package/dist/components/ui/menubar/menubar.script.d.ts +53 -22
  153. package/dist/components/ui/meter/meter.d.ts +3 -5
  154. package/dist/components/ui/meter/meter.script.d.ts +8 -13
  155. package/dist/components/ui/navigation-menu/index.d.ts +1 -1
  156. package/dist/components/ui/navigation-menu/index.js +1 -1
  157. package/dist/components/ui/navigation-menu/index.js.map +3 -3
  158. package/dist/components/ui/navigation-menu/navigation-menu.d.ts +21 -20
  159. package/dist/components/ui/navigation-menu/navigation-menu.script.d.ts +32 -19
  160. package/dist/components/ui/number-field/index.js +1 -1
  161. package/dist/components/ui/number-field/index.js.map +4 -4
  162. package/dist/components/ui/number-field/number-field.d.ts +22 -42
  163. package/dist/components/ui/number-field/number-field.script.d.ts +27 -26
  164. package/dist/components/ui/pagination/index.d.ts +2 -0
  165. package/dist/components/ui/pagination/index.js +2 -0
  166. package/dist/components/ui/pagination/index.js.map +7 -0
  167. package/dist/components/ui/pagination/pagination.css +76 -0
  168. package/dist/components/ui/pagination/pagination.d.ts +31 -0
  169. package/dist/components/ui/pagination/pagination.script.d.ts +69 -0
  170. package/dist/components/ui/popover/index.js +1 -1
  171. package/dist/components/ui/popover/index.js.map +3 -3
  172. package/dist/components/ui/popover/popover.css +0 -122
  173. package/dist/components/ui/popover/popover.d.ts +23 -11
  174. package/dist/components/ui/popover/popover.script.d.ts +54 -16
  175. package/dist/components/ui/radio-group/index.js +1 -1
  176. package/dist/components/ui/radio-group/index.js.map +3 -3
  177. package/dist/components/ui/radio-group/radio-group.d.ts +8 -9
  178. package/dist/components/ui/radio-group/radio-group.script.d.ts +34 -16
  179. package/dist/components/ui/select/index.d.ts +1 -1
  180. package/dist/components/ui/select/index.js +1 -1
  181. package/dist/components/ui/select/index.js.map +4 -4
  182. package/dist/components/ui/select/select.css +5 -73
  183. package/dist/components/ui/select/select.d.ts +34 -39
  184. package/dist/components/ui/select/select.script.d.ts +52 -27
  185. package/dist/components/ui/separator/index.d.ts +1 -0
  186. package/dist/components/ui/separator/index.js +2 -0
  187. package/dist/components/ui/separator/index.js.map +7 -0
  188. package/dist/components/ui/separator/separator.css +32 -0
  189. package/dist/components/ui/separator/separator.d.ts +12 -0
  190. package/dist/components/ui/shared/control-toggle.css +8 -13
  191. package/dist/components/ui/shared/field-label.d.ts +5 -0
  192. package/dist/components/ui/shared/listbox-host-controller.d.ts +40 -0
  193. package/dist/components/ui/shared/listbox-option.d.ts +4 -0
  194. package/dist/components/ui/shared/listbox-popover-behavior.d.ts +7 -0
  195. package/dist/components/ui/shared/menu-entry.d.ts +32 -0
  196. package/dist/components/ui/shared/menu-tree.d.ts +57 -0
  197. package/dist/components/ui/shared/multi-value.d.ts +14 -2
  198. package/dist/components/ui/shared/numeric-range.d.ts +35 -0
  199. package/dist/components/ui/shared/popover.css +0 -4
  200. package/dist/components/ui/shared/preview-timing.d.ts +11 -0
  201. package/dist/components/ui/sidebar/index.d.ts +1 -1
  202. package/dist/components/ui/sidebar/index.js +1 -1
  203. package/dist/components/ui/sidebar/index.js.map +4 -4
  204. package/dist/components/ui/sidebar/sidebar-trigger.script.d.ts +28 -13
  205. package/dist/components/ui/sidebar/sidebar.css +38 -0
  206. package/dist/components/ui/sidebar/sidebar.d.ts +56 -92
  207. package/dist/components/ui/sidebar/sidebar.script.d.ts +40 -42
  208. package/dist/components/ui/slider/index.d.ts +2 -2
  209. package/dist/components/ui/slider/index.js +1 -1
  210. package/dist/components/ui/slider/index.js.map +4 -4
  211. package/dist/components/ui/slider/slider.css +118 -120
  212. package/dist/components/ui/slider/slider.d.ts +28 -5
  213. package/dist/components/ui/slider/slider.script.d.ts +134 -61
  214. package/dist/components/ui/spinner/index.d.ts +1 -0
  215. package/dist/components/ui/spinner/index.js +2 -0
  216. package/dist/components/ui/spinner/index.js.map +7 -0
  217. package/dist/components/ui/spinner/spinner.css +46 -0
  218. package/dist/components/ui/spinner/spinner.d.ts +19 -0
  219. package/dist/components/ui/switch/index.js +1 -1
  220. package/dist/components/ui/switch/index.js.map +3 -3
  221. package/dist/components/ui/switch/switch.d.ts +13 -10
  222. package/dist/components/ui/switch/switch.script.d.ts +28 -15
  223. package/dist/components/ui/table/index.d.ts +2 -0
  224. package/dist/components/ui/table/index.js +2 -0
  225. package/dist/components/ui/table/index.js.map +7 -0
  226. package/dist/components/ui/table/table.css +250 -0
  227. package/dist/components/ui/table/table.d.ts +52 -0
  228. package/dist/components/ui/table/table.script.d.ts +111 -0
  229. package/dist/components/ui/tabs/index.js +1 -1
  230. package/dist/components/ui/tabs/index.js.map +3 -3
  231. package/dist/components/ui/tabs/tabs.d.ts +18 -23
  232. package/dist/components/ui/tabs/tabs.script.d.ts +33 -9
  233. package/dist/components/ui/tag-group/index.js +1 -1
  234. package/dist/components/ui/tag-group/index.js.map +4 -4
  235. package/dist/components/ui/tag-group/tag-group.d.ts +23 -16
  236. package/dist/components/ui/tag-group/tag-group.script.d.ts +57 -7
  237. package/dist/components/ui/textarea/index.js +1 -1
  238. package/dist/components/ui/textarea/index.js.map +3 -3
  239. package/dist/components/ui/textarea/textarea.d.ts +3 -8
  240. package/dist/components/ui/toast/index.js +1 -1
  241. package/dist/components/ui/toast/index.js.map +4 -4
  242. package/dist/components/ui/toast/toast.d.ts +7 -11
  243. package/dist/components/ui/toast/toast.script.d.ts +26 -32
  244. package/dist/components/ui/toast/toaster.script.d.ts +20 -19
  245. package/dist/components/ui/toc/index.js +1 -1
  246. package/dist/components/ui/toc/index.js.map +3 -3
  247. package/dist/components/ui/toc/toc.d.ts +4 -4
  248. package/dist/components/ui/toc/toc.script.d.ts +20 -12
  249. package/dist/components/ui/toolbar/index.js +1 -1
  250. package/dist/components/ui/toolbar/index.js.map +3 -3
  251. package/dist/components/ui/toolbar/toolbar.d.ts +8 -5
  252. package/dist/components/ui/toolbar/toolbar.script.d.ts +26 -13
  253. package/dist/components/ui/tooltip/index.js +1 -1
  254. package/dist/components/ui/tooltip/index.js.map +3 -3
  255. package/dist/components/ui/tooltip/tooltip.css +0 -6
  256. package/dist/components/ui/tooltip/tooltip.d.ts +10 -5
  257. package/dist/components/ui/tooltip/tooltip.script.d.ts +27 -5
  258. package/dist/components/ui/tree/index.js +1 -1
  259. package/dist/components/ui/tree/index.js.map +3 -3
  260. package/dist/components/ui/tree/tree.d.ts +8 -8
  261. package/dist/components/ui/tree/tree.script.d.ts +38 -25
  262. package/dist/components/ui/treegrid/index.js +1 -1
  263. package/dist/components/ui/treegrid/index.js.map +3 -3
  264. package/dist/components/ui/treegrid/treegrid.d.ts +10 -9
  265. package/dist/components/ui/treegrid/treegrid.script.d.ts +48 -24
  266. package/dist/components/ui/window-splitter/index.js +1 -1
  267. package/dist/components/ui/window-splitter/index.js.map +4 -4
  268. package/dist/components/ui/window-splitter/window-splitter.d.ts +13 -5
  269. package/dist/components/ui/window-splitter/window-splitter.script.d.ts +24 -25
  270. package/dist/index.d.ts +11 -0
  271. package/dist/index.js +1 -1
  272. package/dist/index.js.map +4 -4
  273. package/dist/lib/coalesce-defined.d.ts +6 -0
  274. package/dist/lib/icons/check.d.ts +3 -0
  275. package/dist/lib/icons/chevron-left.d.ts +3 -0
  276. package/dist/lib/icons/chevron-right.d.ts +3 -0
  277. package/dist/lib/icons/index.d.ts +4 -0
  278. package/dist/lib/icons/types.d.ts +3 -3
  279. package/dist/lib/icons/x.d.ts +5 -0
  280. package/dist/lib/intrinsic.d.ts +3 -3
  281. package/dist/lib/mask/date-mask.d.ts +0 -2
  282. package/dist/lib/mask/index.d.ts +2 -2
  283. package/dist/lib/mask/input-mask.d.ts +0 -4
  284. package/dist/lib/omit-props.d.ts +4 -0
  285. package/dist/styles/primitives.css +160 -0
  286. package/dist/styles/radiant-ui-core.css +85 -9
  287. package/dist/styles/radiant-ui.css +90 -20
  288. package/dist/styles/style-dependencies.json +425 -0
  289. package/dist/styles/styles.css +792 -521
  290. package/dist/styles/tailwind.css +90 -25
  291. package/dist/styles/tokens/system.css +6 -3
  292. package/dist/styles/tokens/typography/default.css +2 -0
  293. package/package.json +105 -14
package/README.md CHANGED
@@ -17,7 +17,7 @@ This project is **not a React app**. JSX compiles through `@ecopages/jsx`.
17
17
  Framework documentation (API, SSR contract, Vitest, limitations):
18
18
  **[../storybook-radiant-vite/README.md](../storybook-radiant-vite/README.md)**
19
19
 
20
- Library overview and conventions: Storybook **Introduction** (`src/Introduction.mdx`).
20
+ Library overview and conventions: Storybook **Introduction** (`src/Introduction.mdx`). Component authoring: [`src/components/ui/README.md`](./src/components/ui/README.md).
21
21
 
22
22
  ## Develop
23
23
 
@@ -33,8 +33,8 @@ Useful scripts:
33
33
  ```bash
34
34
  pnpm run test # Vitest (storybook + unit browser projects)
35
35
  pnpm run test:storybook # Story interaction/render tests (CI)
36
- pnpm run test:ssr:smoke # Local SSR smoke (6 stories × client/ssr-static/ssr-hydrate)
37
- pnpm run test:ssr # Full Components/* SSR matrix (nightly)
36
+ pnpm run test:ssr:smoke # SSR smoke (6 stories × client/ssr-static/ssr-hydrate; runs on PRs)
37
+ pnpm run test:ssr # Full Components/* SSR matrix (run on demand)
38
38
  pnpm run typecheck
39
39
  pnpm run lint
40
40
  pnpm run build:lib # generate exports + build JS/types + compile CSS
@@ -68,7 +68,7 @@ Convenience bundle (default theme + core primitives):
68
68
  import '@ecopages/radiant-ui/radiant-ui.css';
69
69
  ```
70
70
 
71
- Design tokens and themes: see [`DESIGN.md`](./DESIGN.md). Component authoring: [`AGENTS.md`](./AGENTS.md).
71
+ Design tokens and themes: see [`DESIGN.md`](./DESIGN.md). Agent working rules: [`AGENTS.md`](./AGENTS.md).
72
72
 
73
73
  ## Story map
74
74
 
package/dist/aria.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ import type { AriaAttributesNormalized } from '@ecopages/jsx';
2
+ /**
3
+ * Adds a fallback `aria-label` to the structured ARIA channel.
4
+ *
5
+ * @remarks
6
+ * Direct `aria-label` remains separate and wins during JSX normalization.
7
+ * Existing structured ARIA fields are preserved, including `aria.labelledby`.
8
+ *
9
+ * @see https://www.w3.org/TR/wai-aria/#aria-labelledby
10
+ */
11
+ export declare function withDefaultAriaLabel(aria: Partial<AriaAttributesNormalized> | undefined, fallback?: AriaAttributesNormalized['label']): Partial<AriaAttributesNormalized> | undefined;
package/dist/aria.js ADDED
@@ -0,0 +1,2 @@
1
+ function i(e,t){return t===void 0||e?.label!==void 0?e:{...e,label:t}}export{i as withDefaultAriaLabel};
2
+ //# sourceMappingURL=aria.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/aria.ts"],
4
+ "sourcesContent": ["export function withDefaultAriaLabel(aria, fallback) {\n if (fallback === void 0 || aria?.label !== void 0) {\n return aria;\n }\n return {\n ...aria,\n label: fallback\n };\n}"],
5
+ "mappings": "AAAO,SAASA,EAAqBC,EAAMC,EAAU,CACnD,OAAIA,IAAa,QAAUD,GAAM,QAAU,OAClCA,EAEF,CACL,GAAGA,EACH,MAAOC,CACT,CACF",
6
+ "names": ["withDefaultAriaLabel", "aria", "fallback"]
7
+ }
@@ -6,6 +6,7 @@ rui-alert {
6
6
  @layer components {
7
7
  .rui-alert {
8
8
  position: relative;
9
+ display: block;
9
10
  border-radius: var(--radius-container, var(--radius-container));
10
11
  font-size: var(--text-sm, var(--text-sm));
11
12
  line-height: var(--tw-leading, var(--text-sm--line-height, calc(1.25 / 0.875)));
@@ -29,7 +30,6 @@ rui-alert {
29
30
  justify-content: center;
30
31
  }
31
32
  .rui-alert--banner {
32
- margin-top: var(--spacing-stack, var(--space-stack));
33
33
  display: flex;
34
34
  flex-direction: column;
35
35
  padding-block: var(--spacing-control-y, var(--space-control-y));
@@ -1,10 +1,10 @@
1
- import type { JsxHtmlPropsWithChildren } from '@ecopages/jsx';
1
+ import type { JsxElementProps } from '@ecopages/jsx';
2
2
  import type { RuiAlertProps, RuiAlertVariant } from './alert.script';
3
3
  /** Registers `<rui-alert>` when the JSX helpers are imported. */
4
4
  import './alert.script';
5
- export type RuiAlertIconProps = JsxHtmlPropsWithChildren<{
5
+ export type RuiAlertIconProps = JsxElementProps<HTMLSpanElement> & {
6
6
  variant?: RuiAlertVariant;
7
- }>;
7
+ };
8
8
  /**
9
9
  * Default variant icon for `layout="inline"`. Pass `children` to override.
10
10
  *
@@ -14,30 +14,26 @@ export type RuiAlertIconProps = JsxHtmlPropsWithChildren<{
14
14
  * text, not by icon alone.
15
15
  */
16
16
  export declare function RuiAlertIcon({ variant, class: className, children, ...props }: RuiAlertIconProps): import("@ecopages/jsx").JsxRenderable;
17
- export type RuiAlertTitleProps = JsxHtmlPropsWithChildren;
17
+ export type RuiAlertTitleProps = JsxElementProps<HTMLParagraphElement>;
18
18
  /**
19
19
  * Heading for `layout="banner"` alerts.
20
20
  *
21
21
  * @cssclass rui-alert__title - Banner headline.
22
22
  */
23
23
  export declare function RuiAlertTitle({ children, class: className, ...props }: RuiAlertTitleProps): import("@ecopages/jsx").JsxRenderable;
24
- export type RuiAlertDescriptionProps = JsxHtmlPropsWithChildren;
24
+ export type RuiAlertDescriptionProps = JsxElementProps<HTMLDivElement>;
25
25
  /**
26
26
  * Body copy for `layout="banner"` alerts.
27
27
  *
28
28
  * @cssclass rui-alert__description - Banner body.
29
29
  */
30
30
  export declare function RuiAlertDescription({ children, class: className, ...props }: RuiAlertDescriptionProps): import("@ecopages/jsx").JsxRenderable;
31
- export type RuiAlertComponentProps = JsxHtmlPropsWithChildren<RuiAlertProps & {
32
- slot?: string;
33
- }>;
31
+ export type RuiAlertComponentProps = JsxElementProps<HTMLDivElement> & RuiAlertProps;
34
32
  /**
35
- * Status alert with optional dismiss control.
33
+ * Status alert with optional dismiss control. Stamps `<rui-alert>` and the inner
34
+ * `role="alert"` surface; appends `[data-alert-close]` when `dismissible`.
36
35
  *
37
36
  * @remarks
38
- * Importable JSX helper around `<rui-alert>`. Owns the `role="alert"` surface and
39
- * BEM classes; the host owns dismiss (`rui-close` / `dismiss()`).
40
- *
41
37
  * Variant tones map to semantic theme roles (`info`, `success`, `warning`, `error`)
42
38
  * via `.rui-alert--*` — not palette steps. See `alert.css` and DESIGN.md status roles.
43
39
  *
@@ -51,4 +47,4 @@ export type RuiAlertComponentProps = JsxHtmlPropsWithChildren<RuiAlertProps & {
51
47
  * @cssclass rui-alert--dismissible - Layout adjustments for the dismiss control.
52
48
  * @cssclass rui-alert__close - Dismiss button when `dismissible` is set.
53
49
  */
54
- export declare function RuiAlert({ children, variant, layout, dismissible, closeLabel, class: className, ...props }: RuiAlertComponentProps): import("@ecopages/jsx").JsxRenderable;
50
+ export declare function RuiAlert({ children, variant, layout, dismissible, closeLabel, class: className, slot, ...props }: RuiAlertComponentProps): import("@ecopages/jsx").JsxRenderable;
@@ -22,23 +22,26 @@ export type RuiAlertProps = {
22
22
  export type RuiAlertCloseDetail = {
23
23
  reason: 'dismiss';
24
24
  };
25
- type RuiAlertBindings = {
26
- variant: RuiAlertVariant;
27
- layout: RuiAlertLayout;
28
- dismissible: boolean;
29
- closeLabel: string;
30
- };
31
25
  /**
32
- * `<rui-alert>` — a brief, important message that attracts attention
33
- * without interrupting the user's task.
26
+ * `<rui-alert>` — status message host with optional dismiss.
34
27
  *
35
- * Compose with the `RuiAlert` view (surface + optional dismiss control) and
36
- * `RuiAlertIcon` / `RuiAlertTitle` / `RuiAlertDescription` as needed.
28
+ * The custom element is a behavior host: it does not render the composed tree.
29
+ * Import the script and place light-DOM children that match the contract below,
30
+ * or use the `RuiAlert` view helpers which stamp the same targets.
37
31
  *
38
32
  * Prefer injecting or revealing alerts at the moment they become relevant;
39
33
  * static copy that is always present should not use `role="alert"`.
40
34
  *
41
- * @summary Status message host; optional dismiss removes the element.
35
+ * ## Light-DOM contract
36
+ *
37
+ * Optional:
38
+ * - `[data-alert-close]` — dismiss control. Click calls `dismiss()` when `dismissible` is set.
39
+ *
40
+ * The host does not query alert content or the `role="alert"` surface. Authors own
41
+ * that markup (or use `RuiAlert`, which stamps it). Do not rely on BEM class names
42
+ * for behavior.
43
+ *
44
+ * Nested hosts: none.
42
45
  *
43
46
  * @see https://www.w3.org/WAI/ARIA/apg/patterns/alert/
44
47
  *
@@ -46,24 +49,25 @@ type RuiAlertBindings = {
46
49
  *
47
50
  * @attr {('info'|'success'|'warning'|'error')} variant - Visual tone. Default: `info`.
48
51
  * @attr {('inline'|'banner')} layout - Layout mode. Default: `inline`.
49
- * @attr {boolean} dismissible - Show dismiss control (via the view). Default: `false`.
52
+ * @attr {boolean} dismissible - Show dismiss control. Default: `false`.
50
53
  * @attr {string} close-label - Accessible name for dismiss. Default: `Dismiss`.
51
54
  *
52
- * @slot - Alert content. Prefer the `RuiAlert` view so the `role="alert"` surface
53
- * and BEM classes stay in sync with `variant` / `layout` / `dismissible`.
54
- *
55
55
  * @fires rui-close - Emitted when the alert is dismissed; then the host is removed.
56
56
  *
57
57
  * @remarks
58
- * Styling classes live on the JSX view helpers (`@cssclass`). This element owns
59
- * dismiss behavior — default `render()` is a passthrough slot so prop updates do
60
- * not rebuild the composed light-DOM surface.
58
+ * Minimum headless tree with dismiss:
59
+ *
60
+ * ```html
61
+ * <rui-alert dismissible close-label="Dismiss">
62
+ * <div role="alert">Your session will expire soon.</div>
63
+ * <button type="button" data-alert-close aria-label="Dismiss"></button>
64
+ * </rui-alert>
65
+ * ```
61
66
  *
62
- * **Why a custom element?** Dismiss emits `rui-close` and removes the host from
63
- * the DOM without re-projecting slot content. A presentational-only wrapper would
64
- * need equivalent lifecycle wiring; the CE keeps that behavior self-contained.
67
+ * BEM classes are presentation-only; see view `@cssclass`. Dismiss emits `rui-close`
68
+ * and removes the host without re-building the composed surface.
65
69
  */
66
- export declare class RuiAlert extends RadiantElement<RuiAlertBindings> {
70
+ export declare class RuiAlert extends RadiantElement {
67
71
  variant: RuiAlertVariant;
68
72
  layout: RuiAlertLayout;
69
73
  dismissible: boolean;
@@ -73,4 +77,3 @@ export declare class RuiAlert extends RadiantElement<RuiAlertBindings> {
73
77
  dismiss(): void;
74
78
  onCloseClick(event: Event): void;
75
79
  }
76
- export {};
@@ -1,2 +1,2 @@
1
- import{RadiantElement as _t,bound as Rt,customElement as kt,event as St,onEvent as Dt,prop as B}from"@ecopages/radiant";var ot,st,lt,at,ut,ct,ft,dt,pt,ht,mt,vt;function xt(t,e,n,c,y,E){var p,s,L,O,D,V,R,U=Symbol.metadata||Symbol.for("Symbol.metadata"),W=Object.defineProperty,$=Object.create,X=[$(null),$(null)],Y=e.length;function C(r,h,f){return function(i,o){h&&(o=i,i=t);for(var m=0;m<r.length;m++)o=r[m].apply(i,f?[o]:[]);return f?o:i}}function g(r,h,f,i){if(typeof r!="function"&&(i||r!==void 0))throw new TypeError(h+" must "+(f||"be")+" a function"+(i?"":" or undefined"));return r}function Z(r,h,f,i,o,m,x,d,b,_,P){function K(a){if(!P(a))throw new TypeError("Attempted to access private element on non-instance")}var q=[].concat(h[0]),F=h[3],G=!x,k=o===1,N=o===3,tt=o===4,T=o===2;function M(a,A,it){return function(z,nt){return A&&(nt=z,z=r),it&&it(z),l[a].call(z,nt)}}if(!G){var l={},J=[],w=N?"get":tt||k?"set":"value";if(b?(_||k?l={get:bt(function(){return F(this)},i,"get"),set:function(a){h[4](this,a)}}:l[w]=F,_||bt(l[w],i,T?"":w)):_||(l=Object.getOwnPropertyDescriptor(r,i)),!_&&!b){if((s=X[+d][i])&&(s^o)!==7)throw Error("Decorating two elements with the same name ("+l[w].name+") is not supported yet");X[+d][i]=o<3?1:o}}for(var u=r,I=q.length-1;I>=0;I-=f?2:1){var et=g(q[I],"A decorator","be",!0),rt=f?q[I-1]:void 0,Q={},S={kind:["field","accessor","method","getter","setter","class"][o],name:i,metadata:p,addInitializer:function(a,A){if(a.v)throw new TypeError("attempted to call addInitializer after decoration was finished");g(A,"An initializer","be",!0),m.push(A)}.bind(null,Q)};if(G)s=et.call(rt,u,S),Q.v=1,g(s,"class decorators","return")&&(u=s);else if(S.static=d,S.private=b,s=S.access={has:b?P.bind():function(a){return i in a}},tt||(s.get=b?T?function(a){return K(a),l.value}:M("get",0,K):function(a){return a[i]}),T||N||(s.set=b?M("set",0,K):function(a,A){a[i]=A}),u=et.call(rt,k?{get:l.get,set:l.set}:l[w],S),Q.v=1,k){if(typeof u=="object"&&u)(s=g(u.get,"accessor.get"))&&(l.get=s),(s=g(u.set,"accessor.set"))&&(l.set=s),(s=g(u.init,"accessor.init"))&&J.unshift(s);else if(u!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else g(u,(_?"field":"method")+" decorators","return")&&(_?J.unshift(u):l[w]=u)}return o<2&&x.push(C(J,d,1),C(m,d,0)),_||G||(b?k?x.splice(-1,0,M("get",d),M("set",d)):x.push(T?l[w]:g.call.bind(l[w])):W(r,i,l)),u}function H(r){return W(r,U,{configurable:!0,enumerable:!0,value:p})}return E!==void 0&&(p=E[U]),p=$(p??null),D=[],V=function(r){r&&D.push(C(r))},R=function(r,h){for(var f=0;f<n.length;f++){var i=n[f],o=i[1],m=7&o;if((8&o)==r&&!m==h){var x=i[2],d=!!i[3],b=16&o;Z(r?t:t.prototype,i,b,d?"#"+x:Et(x),m,m<2?[]:r?O=O||[]:L=L||[],D,!!r,d,h,r&&d?function(_){return jt(_)===t}:y)}}},R(8,0),R(0,0),R(8,1),R(0,1),V(L),V(O),s=D,Y||H(t),{e:s,get c(){var r=[];return Y&&[H(t=Z(t,[e],c,t.name,5,r)),C(r,1)]}}}function Et(t){var e=At(t,"string");return typeof e=="symbol"?e:e+""}function At(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var c=n.call(t,e||"default");if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function bt(t,e,n){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch{}return t}function jt(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}var gt,yt=class extends _t{static{({e:[lt,at,ut,ct,ft,dt,pt,ht,mt,vt,ot],c:[gt,st]}=xt(this,[kt("rui-alert")],[[B({type:String,reflect:!0,defaultValue:"info"}),0,"variant"],[B({type:String,reflect:!0,defaultValue:"inline"}),0,"layout"],[B({type:Boolean,reflect:!0,defaultValue:!1}),0,"dismissible"],[B({type:String,attribute:"close-label",defaultValue:"Dismiss"}),0,"closeLabel"],[St({name:"rui-close",bubbles:!0,composed:!0}),0,"closeEvent"],[Rt,2,"dismiss"],[Dt({selector:"[data-alert-close]",type:"click"}),2,"onCloseClick"]],0,void 0,_t))}constructor(...e){super(...e),vt(this)}variant=(ot(this),lt(this));layout=(at(this),ut(this));dismissible=(ct(this),ft(this));closeLabel=(dt(this),pt(this));closeEvent=(ht(this),mt(this));dismiss(){this.isConnected&&(this.closeEvent.emit({reason:"dismiss"}),this.remove())}onCloseClick(e){e.stopPropagation(),this.dismissible&&this.dismiss()}static{st()}};import{jsx as v,jsxs as wt}from"@ecopages/jsx/jsx-runtime";function j(...t){return t.filter(Boolean).join(" ")}var Ct={info:["M12 16v-4","M12 8h.01","M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z"],success:["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z","m9 12 2 2 4-4"],warning:["m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3","M12 9v4","M12 17h.01"],error:["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z","m15 9-6 6","m9 9 6 6"]};function Tt({variant:t="info",class:e,children:n,...c}){if(n!=null)return v("span",{...c,class:j("rui-alert__icon",e),children:n});let y=Ct[t],E=Array.isArray(y)?y:[y];return v("span",{...c,class:j("rui-alert__icon",e),"aria-hidden":"true",children:v("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:E.map(p=>v("path",{d:p}))})})}function Mt({children:t,class:e,...n}){return v("p",{...n,class:j("rui-alert__title",e),children:t})}function It({children:t,class:e,...n}){return v("div",{...n,class:j("rui-alert__description",e),children:t})}function zt({children:t,variant:e="info",layout:n="inline",dismissible:c=!1,closeLabel:y="Dismiss",class:E,...p}){return v("rui-alert",{...p,variant:e,layout:n,dismissible:c,"close-label":y,children:wt("div",{class:j("rui-alert",`rui-alert--${e}`,`rui-alert--${n}`,c&&"rui-alert--dismissible",E),role:"alert",children:[t,c?v("button",{type:"button",class:"rui-alert__close","data-alert-close":!0,"aria-label":y||"Dismiss",children:wt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[v("path",{d:"M18 6 6 18"}),v("path",{d:"m6 6 12 12"})]})}):null]})})}export{zt as RuiAlert,It as RuiAlertDescription,gt as RuiAlertElement,Tt as RuiAlertIcon,Mt as RuiAlertTitle};
1
+ import{RadiantElement as _t,bound as Rt,customElement as kt,event as St,onEvent as Dt,prop as B}from"@ecopages/radiant";var ot,st,lt,at,ut,ct,ft,dt,pt,ht,mt,vt;function xt(t,e,n,c,y,E){var p,o,L,O,D,V,R,U=Symbol.metadata||Symbol.for("Symbol.metadata"),W=Object.defineProperty,$=Object.create,X=[$(null),$(null)],Y=e.length;function C(r,h,f){return function(i,s){h&&(s=i,i=t);for(var m=0;m<r.length;m++)s=r[m].apply(i,f?[s]:[]);return f?s:i}}function g(r,h,f,i){if(typeof r!="function"&&(i||r!==void 0))throw new TypeError(h+" must "+(f||"be")+" a function"+(i?"":" or undefined"));return r}function Z(r,h,f,i,s,m,x,d,b,_,P){function K(a){if(!P(a))throw new TypeError("Attempted to access private element on non-instance")}var q=[].concat(h[0]),F=h[3],G=!x,k=s===1,N=s===3,tt=s===4,T=s===2;function M(a,A,it){return function(z,nt){return A&&(nt=z,z=r),it&&it(z),l[a].call(z,nt)}}if(!G){var l={},J=[],w=N?"get":tt||k?"set":"value";if(b?(_||k?l={get:bt(function(){return F(this)},i,"get"),set:function(a){h[4](this,a)}}:l[w]=F,_||bt(l[w],i,T?"":w)):_||(l=Object.getOwnPropertyDescriptor(r,i)),!_&&!b){if((o=X[+d][i])&&(o^s)!==7)throw Error("Decorating two elements with the same name ("+l[w].name+") is not supported yet");X[+d][i]=s<3?1:s}}for(var u=r,I=q.length-1;I>=0;I-=f?2:1){var et=g(q[I],"A decorator","be",!0),rt=f?q[I-1]:void 0,Q={},S={kind:["field","accessor","method","getter","setter","class"][s],name:i,metadata:p,addInitializer:function(a,A){if(a.v)throw new TypeError("attempted to call addInitializer after decoration was finished");g(A,"An initializer","be",!0),m.push(A)}.bind(null,Q)};if(G)o=et.call(rt,u,S),Q.v=1,g(o,"class decorators","return")&&(u=o);else if(S.static=d,S.private=b,o=S.access={has:b?P.bind():function(a){return i in a}},tt||(o.get=b?T?function(a){return K(a),l.value}:M("get",0,K):function(a){return a[i]}),T||N||(o.set=b?M("set",0,K):function(a,A){a[i]=A}),u=et.call(rt,k?{get:l.get,set:l.set}:l[w],S),Q.v=1,k){if(typeof u=="object"&&u)(o=g(u.get,"accessor.get"))&&(l.get=o),(o=g(u.set,"accessor.set"))&&(l.set=o),(o=g(u.init,"accessor.init"))&&J.unshift(o);else if(u!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else g(u,(_?"field":"method")+" decorators","return")&&(_?J.unshift(u):l[w]=u)}return s<2&&x.push(C(J,d,1),C(m,d,0)),_||G||(b?k?x.splice(-1,0,M("get",d),M("set",d)):x.push(T?l[w]:g.call.bind(l[w])):W(r,i,l)),u}function H(r){return W(r,U,{configurable:!0,enumerable:!0,value:p})}return E!==void 0&&(p=E[U]),p=$(p??null),D=[],V=function(r){r&&D.push(C(r))},R=function(r,h){for(var f=0;f<n.length;f++){var i=n[f],s=i[1],m=7&s;if((8&s)==r&&!m==h){var x=i[2],d=!!i[3],b=16&s;Z(r?t:t.prototype,i,b,d?"#"+x:Et(x),m,m<2?[]:r?O=O||[]:L=L||[],D,!!r,d,h,r&&d?function(_){return jt(_)===t}:y)}}},R(8,0),R(0,0),R(8,1),R(0,1),V(L),V(O),o=D,Y||H(t),{e:o,get c(){var r=[];return Y&&[H(t=Z(t,[e],c,t.name,5,r)),C(r,1)]}}}function Et(t){var e=At(t,"string");return typeof e=="symbol"?e:e+""}function At(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var c=n.call(t,e||"default");if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function bt(t,e,n){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch{}return t}function jt(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}var gt,yt=class extends _t{static{({e:[lt,at,ut,ct,ft,dt,pt,ht,mt,vt,ot],c:[gt,st]}=xt(this,[kt("rui-alert")],[[B({type:String,reflect:!0,defaultValue:"info"}),0,"variant"],[B({type:String,reflect:!0,defaultValue:"inline"}),0,"layout"],[B({type:Boolean,reflect:!0,defaultValue:!1}),0,"dismissible"],[B({type:String,attribute:"close-label",defaultValue:"Dismiss"}),0,"closeLabel"],[St({name:"rui-close",bubbles:!0,composed:!0}),0,"closeEvent"],[Rt,2,"dismiss"],[Dt({selector:"[data-alert-close]",type:"click"}),2,"onCloseClick"]],0,void 0,_t))}constructor(...e){super(...e),vt(this)}variant=(ot(this),lt(this));layout=(at(this),ut(this));dismissible=(ct(this),ft(this));closeLabel=(dt(this),pt(this));closeEvent=(ht(this),mt(this));dismiss(){this.isConnected&&(this.closeEvent.emit({reason:"dismiss"}),this.remove())}onCloseClick(e){e.stopPropagation(),this.dismissible&&this.dismiss()}static{st()}};import{jsx as v,jsxs as wt}from"@ecopages/jsx/jsx-runtime";function j(...t){return t.filter(Boolean).join(" ")}var Ct={info:["M12 16v-4","M12 8h.01","M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z"],success:["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z","m9 12 2 2 4-4"],warning:["m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3","M12 9v4","M12 17h.01"],error:["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z","m15 9-6 6","m9 9 6 6"]};function Tt({variant:t="info",class:e,children:n,...c}){if(n!=null)return v("span",{...c,class:j("rui-alert__icon",e),children:n});let y=Ct[t],E=Array.isArray(y)?y:[y];return v("span",{...c,class:j("rui-alert__icon",e),"aria-hidden":"true",children:v("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:E.map(p=>v("path",{d:p}))})})}function Mt({children:t,class:e,...n}){return v("p",{...n,class:j("rui-alert__title",e),children:t})}function It({children:t,class:e,...n}){return v("div",{...n,class:j("rui-alert__description",e),children:t})}function zt({children:t,variant:e="info",layout:n="inline",dismissible:c=!1,closeLabel:y="Dismiss",class:E,slot:p,...o}){return v("rui-alert",{slot:p,variant:e,layout:n,dismissible:c,"close-label":y,children:wt("div",{...o,class:j("rui-alert",`rui-alert--${e}`,`rui-alert--${n}`,c&&"rui-alert--dismissible",E),role:"alert",children:[t,c?v("button",{type:"button",class:"rui-alert__close","data-alert-close":!0,"aria-label":y||"Dismiss",children:wt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[v("path",{d:"M18 6 6 18"}),v("path",{d:"m6 6 12 12"})]})}):null]})})}export{zt as RuiAlert,It as RuiAlertDescription,gt as RuiAlertElement,Tt as RuiAlertIcon,Mt as RuiAlertTitle};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/ui/alert/alert.script.tsx", "../../../../src/components/ui/alert/alert.tsx", "../../../../src/lib/cx.ts"],
4
- "sourcesContent": ["let _initProto, _initClass, _init_variant, _init_extra_variant, _init_layout, _init_extra_layout, _init_dismissible, _init_extra_dismissible, _init_closeLabel, _init_extra_closeLabel, _init_closeEvent, _init_extra_closeEvent;\nfunction _applyDecs(e, t, n, r, o, i) { var a, c, u, s, f, l, p, d = Symbol.metadata || Symbol.for(\"Symbol.metadata\"), m = Object.defineProperty, h = Object.create, y = [h(null), h(null)], v = t.length; function g(t, n, r) { return function (o, i) { n && (i = o, o = e); for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []); return r ? i : o; }; } function b(e, t, n, r) { if (\"function\" != typeof e && (r || void 0 !== e)) throw new TypeError(t + \" must \" + (n || \"be\") + \" a function\" + (r ? \"\" : \" or undefined\")); return e; } function applyDec(e, t, n, r, o, i, u, s, f, l, p) { function d(e) { if (!p(e)) throw new TypeError(\"Attempted to access private element on non-instance\"); } var h = [].concat(t[0]), v = t[3], w = !u, D = 1 === o, S = 3 === o, j = 4 === o, E = 2 === o; function I(t, n, r) { return function (o, i) { return n && (i = o, o = e), r && r(o), P[t].call(o, i); }; } if (!w) { var P = {}, k = [], F = S ? \"get\" : j || D ? \"set\" : \"value\"; if (f ? (l || D ? P = { get: _setFunctionName(function () { return v(this); }, r, \"get\"), set: function (e) { t[4](this, e); } } : P[F] = v, l || _setFunctionName(P[F], r, E ? \"\" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) { if ((c = y[+s][r]) && 7 !== (c ^ o)) throw Error(\"Decorating two elements with the same name (\" + P[F].name + \") is not supported yet\"); y[+s][r] = o < 3 ? 1 : o; } } for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) { var T = b(h[O], \"A decorator\", \"be\", !0), z = n ? h[O - 1] : void 0, A = {}, H = { kind: [\"field\", \"accessor\", \"method\", \"getter\", \"setter\", \"class\"][o], name: r, metadata: a, addInitializer: function (e, t) { if (e.v) throw new TypeError(\"attempted to call addInitializer after decoration was finished\"); b(t, \"An initializer\", \"be\", !0), i.push(t); }.bind(null, A) }; if (w) c = T.call(z, N, H), A.v = 1, b(c, \"class decorators\", \"return\") && (N = c);else if (H.static = s, H.private = f, c = H.access = { has: f ? p.bind() : function (e) { return r in e; } }, j || (c.get = f ? E ? function (e) { return d(e), P.value; } : I(\"get\", 0, d) : function (e) { return e[r]; }), E || S || (c.set = f ? I(\"set\", 0, d) : function (e, t) { e[r] = t; }), N = T.call(z, D ? { get: P.get, set: P.set } : P[F], H), A.v = 1, D) { if (\"object\" == typeof N && N) (c = b(N.get, \"accessor.get\")) && (P.get = c), (c = b(N.set, \"accessor.set\")) && (P.set = c), (c = b(N.init, \"accessor.init\")) && k.unshift(c);else if (void 0 !== N) throw new TypeError(\"accessor decorators must return an object with get, set, or init properties or undefined\"); } else b(N, (l ? \"field\" : \"method\") + \" decorators\", \"return\") && (l ? k.unshift(N) : P[F] = N); } return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I(\"get\", s), I(\"set\", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N; } function w(e) { return m(e, d, { configurable: !0, enumerable: !0, value: a }); } return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function (e) { e && f.push(g(e)); }, p = function (t, r) { for (var i = 0; i < n.length; i++) { var a = n[i], c = a[1], l = 7 & c; if ((8 & c) == t && !l == r) { var p = a[2], d = !!a[3], m = 16 & c; applyDec(t ? e : e.prototype, a, m, d ? \"#\" + p : _toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) { return _checkInRHS(t) === e; } : o); } } }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), { e: c, get c() { var n = []; return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)]; } }; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _setFunctionName(e, t, n) { \"symbol\" == typeof t && (t = (t = t.description) ? \"[\" + t + \"]\" : \"\"); try { Object.defineProperty(e, \"name\", { configurable: !0, value: n ? n + \" \" + t : t }); } catch (e) {} return e; }\nfunction _checkInRHS(e) { if (Object(e) !== e) throw TypeError(\"right-hand side of 'in' should be an object, got \" + (null !== e ? typeof e : \"null\")); return e; }\nimport { RadiantElement, bound, customElement, event, onEvent, prop } from \"@ecopages/radiant\";\nlet _RuiAlert;\nclass RuiAlert extends RadiantElement {\n static {\n ({\n e: [_init_variant, _init_extra_variant, _init_layout, _init_extra_layout, _init_dismissible, _init_extra_dismissible, _init_closeLabel, _init_extra_closeLabel, _init_closeEvent, _init_extra_closeEvent, _initProto],\n c: [_RuiAlert, _initClass]\n } = _applyDecs(this, [customElement(\"rui-alert\")], [[prop({\n type: String,\n reflect: true,\n defaultValue: \"info\"\n }), 0, \"variant\"], [prop({\n type: String,\n reflect: true,\n defaultValue: \"inline\"\n }), 0, \"layout\"], [prop({\n type: Boolean,\n reflect: true,\n defaultValue: false\n }), 0, \"dismissible\"], [prop({\n type: String,\n attribute: \"close-label\",\n defaultValue: \"Dismiss\"\n }), 0, \"closeLabel\"], [event({\n name: \"rui-close\",\n bubbles: true,\n composed: true\n }), 0, \"closeEvent\"], [bound, 2, \"dismiss\"], [onEvent({\n selector: \"[data-alert-close]\",\n type: \"click\"\n }), 2, \"onCloseClick\"]], 0, void 0, RadiantElement));\n }\n constructor(...args) {\n super(...args);\n _init_extra_closeEvent(this);\n }\n variant = (_initProto(this), _init_variant(this));\n layout = (_init_extra_variant(this), _init_layout(this));\n dismissible = (_init_extra_layout(this), _init_dismissible(this));\n closeLabel = (_init_extra_dismissible(this), _init_closeLabel(this));\n closeEvent = (_init_extra_closeLabel(this), _init_closeEvent(this));\n dismiss() {\n if (!this.isConnected) {\n return;\n }\n this.closeEvent.emit({\n reason: \"dismiss\"\n });\n this.remove();\n }\n onCloseClick(event2) {\n event2.stopPropagation();\n if (!this.dismissible) {\n return;\n }\n this.dismiss();\n }\n static {\n _initClass();\n }\n}\nexport { _RuiAlert as RuiAlert };", "import { jsx, jsxs } from \"@ecopages/jsx/jsx-runtime\";\nimport { cx } from \"@/lib/cx\";\nimport \"./alert.script\";\nconst ALERT_ICON_PATHS = {\n info: [\"M12 16v-4\", \"M12 8h.01\", \"M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z\"],\n success: [\"M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z\", \"m9 12 2 2 4-4\"],\n warning: [\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\", \"M12 9v4\", \"M12 17h.01\"],\n error: [\"M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z\", \"m15 9-6 6\", \"m9 9 6 6\"]\n};\nexport function RuiAlertIcon({\n variant = \"info\",\n class: className,\n children,\n ...props\n}) {\n if (children != null) {\n return /* @__PURE__ */jsx(\"span\", {\n ...props,\n class: cx(\"rui-alert__icon\", className),\n children\n });\n }\n const paths = ALERT_ICON_PATHS[variant];\n const d = Array.isArray(paths) ? paths : [paths];\n return /* @__PURE__ */jsx(\"span\", {\n ...props,\n class: cx(\"rui-alert__icon\", className),\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */jsx(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-width\": \"2\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n children: d.map(path => /* @__PURE__ */jsx(\"path\", {\n d: path\n }))\n })\n });\n}\nexport function RuiAlertTitle({\n children,\n class: className,\n ...props\n}) {\n return /* @__PURE__ */jsx(\"p\", {\n ...props,\n class: cx(\"rui-alert__title\", className),\n children\n });\n}\nexport function RuiAlertDescription({\n children,\n class: className,\n ...props\n}) {\n return /* @__PURE__ */jsx(\"div\", {\n ...props,\n class: cx(\"rui-alert__description\", className),\n children\n });\n}\nexport function RuiAlert({\n children,\n variant = \"info\",\n layout = \"inline\",\n dismissible = false,\n closeLabel = \"Dismiss\",\n class: className,\n ...props\n}) {\n return /* @__PURE__ */jsx(\"rui-alert\", {\n ...props,\n variant,\n layout,\n dismissible,\n \"close-label\": closeLabel,\n children: /* @__PURE__ */jsxs(\"div\", {\n class: cx(\"rui-alert\", `rui-alert--${variant}`, `rui-alert--${layout}`, dismissible && \"rui-alert--dismissible\", className),\n role: \"alert\",\n children: [children, dismissible ? /* @__PURE__ */jsx(\"button\", {\n type: \"button\",\n class: \"rui-alert__close\",\n \"data-alert-close\": true,\n \"aria-label\": closeLabel || \"Dismiss\",\n children: /* @__PURE__ */jsxs(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"16\",\n height: \"16\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-width\": \"2\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"aria-hidden\": \"true\",\n children: [/* @__PURE__ */jsx(\"path\", {\n d: \"M18 6 6 18\"\n }), /* @__PURE__ */jsx(\"path\", {\n d: \"m6 6 12 12\"\n })]\n })\n }) : null]\n })\n });\n}", "export function cx(...parts) {\n return parts.filter(Boolean).join(\" \");\n}"],
5
- "mappings": "AAMA,OAAS,kBAAAA,GAAgB,SAAAC,GAAO,iBAAAC,GAAe,SAAAC,GAAO,WAAAC,GAAS,QAAAC,MAAY,oBAN3E,IAAIC,GAAYC,GAAYC,GAAeC,GAAqBC,GAAcC,GAAoBC,GAAmBC,GAAyBC,GAAkBC,GAAwBC,GAAkBC,GAC1M,SAASC,GAAWC,EAAGC,EAAG,EAAGC,EAAGC,EAAGC,EAAG,CAAE,IAAIC,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,EAAI,OAAO,UAAY,OAAO,IAAI,iBAAiB,EAAGC,EAAI,OAAO,eAAgBC,EAAI,OAAO,OAAQC,EAAI,CAACD,EAAE,IAAI,EAAGA,EAAE,IAAI,CAAC,EAAGE,EAAIf,EAAE,OAAQ,SAASgB,EAAEhB,EAAGiB,EAAGhB,EAAG,CAAE,OAAO,SAAUC,EAAGC,EAAG,CAAEc,IAAMd,EAAID,EAAGA,EAAIH,GAAI,QAASK,EAAI,EAAGA,EAAIJ,EAAE,OAAQI,IAAKD,EAAIH,EAAEI,CAAC,EAAE,MAAMF,EAAGD,EAAI,CAACE,CAAC,EAAI,CAAC,CAAC,EAAG,OAAOF,EAAIE,EAAID,CAAG,CAAG,CAAE,SAASgB,EAAEnB,EAAGC,EAAGiB,EAAGhB,EAAG,CAAE,GAAkB,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AAM,QACN,SAAU,CAACC,EAAUW,EAA6BT,EAAI,SAAU,CAC9D,KAAM,SACN,MAAO,mBACP,mBAAoB,GACpB,aAAcU,GAAc,UAC5B,SAAyBC,GAAK,MAAO,CACnC,MAAO,6BACP,MAAO,KACP,OAAQ,KACR,QAAS,YACT,KAAM,OACN,OAAQ,eACR,eAAgB,IAChB,iBAAkB,QAClB,kBAAmB,QACnB,cAAe,OACf,SAAU,CAAgBX,EAAI,OAAQ,CACpC,EAAG,YACL,CAAC,EAAkBA,EAAI,OAAQ,CAC7B,EAAG,YACL,CAAC,CAAC,CACJ,CAAC,CACH,CAAC,EAAI,IAAI,CACX,CAAC,CACH,CAAC,CACH",
6
- "names": ["RadiantElement", "bound", "customElement", "event", "onEvent", "prop", "_initProto", "_initClass", "_init_variant", "_init_extra_variant", "_init_layout", "_init_extra_layout", "_init_dismissible", "_init_extra_dismissible", "_init_closeLabel", "_init_extra_closeLabel", "_init_closeEvent", "_init_extra_closeEvent", "_applyDecs", "e", "t", "r", "o", "i", "a", "c", "u", "s", "f", "l", "p", "d", "m", "h", "y", "v", "g", "n", "b", "applyDec", "w", "D", "S", "j", "E", "I", "P", "k", "F", "_setFunctionName", "N", "O", "T", "z", "A", "H", "_toPropertyKey", "_checkInRHS", "_toPrimitive", "_RuiAlert", "RuiAlert", "args", "event2", "jsx", "jsxs", "cx", "parts", "ALERT_ICON_PATHS", "RuiAlertIcon", "variant", "className", "children", "props", "jsx", "cx", "paths", "d", "path", "RuiAlertTitle", "RuiAlertDescription", "RuiAlert", "layout", "dismissible", "closeLabel", "jsxs"]
4
+ "sourcesContent": ["let _initProto, _initClass, _init_variant, _init_extra_variant, _init_layout, _init_extra_layout, _init_dismissible, _init_extra_dismissible, _init_closeLabel, _init_extra_closeLabel, _init_closeEvent, _init_extra_closeEvent;\nfunction _applyDecs(e, t, n, r, o, i) { var a, c, u, s, f, l, p, d = Symbol.metadata || Symbol.for(\"Symbol.metadata\"), m = Object.defineProperty, h = Object.create, y = [h(null), h(null)], v = t.length; function g(t, n, r) { return function (o, i) { n && (i = o, o = e); for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []); return r ? i : o; }; } function b(e, t, n, r) { if (\"function\" != typeof e && (r || void 0 !== e)) throw new TypeError(t + \" must \" + (n || \"be\") + \" a function\" + (r ? \"\" : \" or undefined\")); return e; } function applyDec(e, t, n, r, o, i, u, s, f, l, p) { function d(e) { if (!p(e)) throw new TypeError(\"Attempted to access private element on non-instance\"); } var h = [].concat(t[0]), v = t[3], w = !u, D = 1 === o, S = 3 === o, j = 4 === o, E = 2 === o; function I(t, n, r) { return function (o, i) { return n && (i = o, o = e), r && r(o), P[t].call(o, i); }; } if (!w) { var P = {}, k = [], F = S ? \"get\" : j || D ? \"set\" : \"value\"; if (f ? (l || D ? P = { get: _setFunctionName(function () { return v(this); }, r, \"get\"), set: function (e) { t[4](this, e); } } : P[F] = v, l || _setFunctionName(P[F], r, E ? \"\" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) { if ((c = y[+s][r]) && 7 !== (c ^ o)) throw Error(\"Decorating two elements with the same name (\" + P[F].name + \") is not supported yet\"); y[+s][r] = o < 3 ? 1 : o; } } for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) { var T = b(h[O], \"A decorator\", \"be\", !0), z = n ? h[O - 1] : void 0, A = {}, H = { kind: [\"field\", \"accessor\", \"method\", \"getter\", \"setter\", \"class\"][o], name: r, metadata: a, addInitializer: function (e, t) { if (e.v) throw new TypeError(\"attempted to call addInitializer after decoration was finished\"); b(t, \"An initializer\", \"be\", !0), i.push(t); }.bind(null, A) }; if (w) c = T.call(z, N, H), A.v = 1, b(c, \"class decorators\", \"return\") && (N = c);else if (H.static = s, H.private = f, c = H.access = { has: f ? p.bind() : function (e) { return r in e; } }, j || (c.get = f ? E ? function (e) { return d(e), P.value; } : I(\"get\", 0, d) : function (e) { return e[r]; }), E || S || (c.set = f ? I(\"set\", 0, d) : function (e, t) { e[r] = t; }), N = T.call(z, D ? { get: P.get, set: P.set } : P[F], H), A.v = 1, D) { if (\"object\" == typeof N && N) (c = b(N.get, \"accessor.get\")) && (P.get = c), (c = b(N.set, \"accessor.set\")) && (P.set = c), (c = b(N.init, \"accessor.init\")) && k.unshift(c);else if (void 0 !== N) throw new TypeError(\"accessor decorators must return an object with get, set, or init properties or undefined\"); } else b(N, (l ? \"field\" : \"method\") + \" decorators\", \"return\") && (l ? k.unshift(N) : P[F] = N); } return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I(\"get\", s), I(\"set\", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N; } function w(e) { return m(e, d, { configurable: !0, enumerable: !0, value: a }); } return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function (e) { e && f.push(g(e)); }, p = function (t, r) { for (var i = 0; i < n.length; i++) { var a = n[i], c = a[1], l = 7 & c; if ((8 & c) == t && !l == r) { var p = a[2], d = !!a[3], m = 16 & c; applyDec(t ? e : e.prototype, a, m, d ? \"#\" + p : _toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) { return _checkInRHS(t) === e; } : o); } } }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), { e: c, get c() { var n = []; return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)]; } }; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _setFunctionName(e, t, n) { \"symbol\" == typeof t && (t = (t = t.description) ? \"[\" + t + \"]\" : \"\"); try { Object.defineProperty(e, \"name\", { configurable: !0, value: n ? n + \" \" + t : t }); } catch (e) {} return e; }\nfunction _checkInRHS(e) { if (Object(e) !== e) throw TypeError(\"right-hand side of 'in' should be an object, got \" + (null !== e ? typeof e : \"null\")); return e; }\nimport { RadiantElement, bound, customElement, event, onEvent, prop } from \"@ecopages/radiant\";\nlet _RuiAlert;\nclass RuiAlert extends RadiantElement {\n static {\n ({\n e: [_init_variant, _init_extra_variant, _init_layout, _init_extra_layout, _init_dismissible, _init_extra_dismissible, _init_closeLabel, _init_extra_closeLabel, _init_closeEvent, _init_extra_closeEvent, _initProto],\n c: [_RuiAlert, _initClass]\n } = _applyDecs(this, [customElement(\"rui-alert\")], [[prop({\n type: String,\n reflect: true,\n defaultValue: \"info\"\n }), 0, \"variant\"], [prop({\n type: String,\n reflect: true,\n defaultValue: \"inline\"\n }), 0, \"layout\"], [prop({\n type: Boolean,\n reflect: true,\n defaultValue: false\n }), 0, \"dismissible\"], [prop({\n type: String,\n attribute: \"close-label\",\n defaultValue: \"Dismiss\"\n }), 0, \"closeLabel\"], [event({\n name: \"rui-close\",\n bubbles: true,\n composed: true\n }), 0, \"closeEvent\"], [bound, 2, \"dismiss\"], [onEvent({\n selector: \"[data-alert-close]\",\n type: \"click\"\n }), 2, \"onCloseClick\"]], 0, void 0, RadiantElement));\n }\n constructor(...args) {\n super(...args);\n _init_extra_closeEvent(this);\n }\n variant = (_initProto(this), _init_variant(this));\n layout = (_init_extra_variant(this), _init_layout(this));\n dismissible = (_init_extra_layout(this), _init_dismissible(this));\n closeLabel = (_init_extra_dismissible(this), _init_closeLabel(this));\n closeEvent = (_init_extra_closeLabel(this), _init_closeEvent(this));\n dismiss() {\n if (!this.isConnected) {\n return;\n }\n this.closeEvent.emit({\n reason: \"dismiss\"\n });\n this.remove();\n }\n onCloseClick(event2) {\n event2.stopPropagation();\n if (!this.dismissible) {\n return;\n }\n this.dismiss();\n }\n static {\n _initClass();\n }\n}\nexport { _RuiAlert as RuiAlert };", "import { jsx, jsxs } from \"@ecopages/jsx/jsx-runtime\";\nimport { cx } from \"@/lib/cx\";\nimport \"./alert.script\";\nconst ALERT_ICON_PATHS = {\n info: [\"M12 16v-4\", \"M12 8h.01\", \"M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z\"],\n success: [\"M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z\", \"m9 12 2 2 4-4\"],\n warning: [\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\", \"M12 9v4\", \"M12 17h.01\"],\n error: [\"M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z\", \"m15 9-6 6\", \"m9 9 6 6\"]\n};\nexport function RuiAlertIcon({\n variant = \"info\",\n class: className,\n children,\n ...props\n}) {\n if (children != null) {\n return /* @__PURE__ */jsx(\"span\", {\n ...props,\n class: cx(\"rui-alert__icon\", className),\n children\n });\n }\n const paths = ALERT_ICON_PATHS[variant];\n const d = Array.isArray(paths) ? paths : [paths];\n return /* @__PURE__ */jsx(\"span\", {\n ...props,\n class: cx(\"rui-alert__icon\", className),\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */jsx(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-width\": \"2\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n children: d.map(path => /* @__PURE__ */jsx(\"path\", {\n d: path\n }))\n })\n });\n}\nexport function RuiAlertTitle({\n children,\n class: className,\n ...props\n}) {\n return /* @__PURE__ */jsx(\"p\", {\n ...props,\n class: cx(\"rui-alert__title\", className),\n children\n });\n}\nexport function RuiAlertDescription({\n children,\n class: className,\n ...props\n}) {\n return /* @__PURE__ */jsx(\"div\", {\n ...props,\n class: cx(\"rui-alert__description\", className),\n children\n });\n}\nexport function RuiAlert({\n children,\n variant = \"info\",\n layout = \"inline\",\n dismissible = false,\n closeLabel = \"Dismiss\",\n class: className,\n slot,\n ...props\n}) {\n return /* @__PURE__ */jsx(\"rui-alert\", {\n slot,\n variant,\n layout,\n dismissible,\n \"close-label\": closeLabel,\n children: /* @__PURE__ */jsxs(\"div\", {\n ...props,\n class: cx(\"rui-alert\", `rui-alert--${variant}`, `rui-alert--${layout}`, dismissible && \"rui-alert--dismissible\", className),\n role: \"alert\",\n children: [children, dismissible ? /* @__PURE__ */jsx(\"button\", {\n type: \"button\",\n class: \"rui-alert__close\",\n \"data-alert-close\": true,\n \"aria-label\": closeLabel || \"Dismiss\",\n children: /* @__PURE__ */jsxs(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"16\",\n height: \"16\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-width\": \"2\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"aria-hidden\": \"true\",\n children: [/* @__PURE__ */jsx(\"path\", {\n d: \"M18 6 6 18\"\n }), /* @__PURE__ */jsx(\"path\", {\n d: \"m6 6 12 12\"\n })]\n })\n }) : null]\n })\n });\n}", "export function cx(...parts) {\n return parts.filter(Boolean).join(\" \");\n}"],
5
+ "mappings": "AAMA,OAAS,kBAAAA,GAAgB,SAAAC,GAAO,iBAAAC,GAAe,SAAAC,GAAO,WAAAC,GAAS,QAAAC,MAAY,oBAN3E,IAAIC,GAAYC,GAAYC,GAAeC,GAAqBC,GAAcC,GAAoBC,GAAmBC,GAAyBC,GAAkBC,GAAwBC,GAAkBC,GAC1M,SAASC,GAAWC,EAAGC,EAAG,EAAGC,EAAGC,EAAGC,EAAG,CAAE,IAAIC,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,EAAI,OAAO,UAAY,OAAO,IAAI,iBAAiB,EAAGC,EAAI,OAAO,eAAgBC,EAAI,OAAO,OAAQC,EAAI,CAACD,EAAE,IAAI,EAAGA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ACH,MAAOE,EAAG,yBAA0BJ,CAAS,EAC7C,SAAAC,CACF,CAAC,CACH,CACO,SAASS,GAAS,CACvB,SAAAT,EACA,QAAAF,EAAU,OACV,OAAAY,EAAS,SACT,YAAAC,EAAc,GACd,WAAAC,EAAa,UACb,MAAOb,EACP,KAAAc,EACA,GAAGZ,CACL,EAAG,CACD,OAAsBC,EAAI,YAAa,CACrC,KAAAW,EACA,QAAAf,EACA,OAAAY,EACA,YAAAC,EACA,cAAeC,EACf,SAAyBE,GAAK,MAAO,CACnC,GAAGb,EACH,MAAOE,EAAG,YAAa,cAAcL,CAAO,GAAI,cAAcY,CAAM,GAAIC,GAAe,yBAA0BZ,CAAS,EAC1H,KAAM,QACN,SAAU,CAACC,EAAUW,EAA6BT,EAAI,SAAU,CAC9D,KAAM,SACN,MAAO,mBACP,mBAAoB,GACpB,aAAcU,GAAc,UAC5B,SAAyBE,GAAK,MAAO,CACnC,MAAO,6BACP,MAAO,KACP,OAAQ,KACR,QAAS,YACT,KAAM,OACN,OAAQ,eACR,eAAgB,IAChB,iBAAkB,QAClB,kBAAmB,QACnB,cAAe,OACf,SAAU,CAAgBZ,EAAI,OAAQ,CACpC,EAAG,YACL,CAAC,EAAkBA,EAAI,OAAQ,CAC7B,EAAG,YACL,CAAC,CAAC,CACJ,CAAC,CACH,CAAC,EAAI,IAAI,CACX,CAAC,CACH,CAAC,CACH",
6
+ "names": ["RadiantElement", "bound", "customElement", "event", "onEvent", "prop", "_initProto", "_initClass", "_init_variant", "_init_extra_variant", "_init_layout", "_init_extra_layout", "_init_dismissible", "_init_extra_dismissible", "_init_closeLabel", "_init_extra_closeLabel", "_init_closeEvent", "_init_extra_closeEvent", "_applyDecs", "e", "t", "r", "o", "i", "a", "c", "u", "s", "f", "l", "p", "d", "m", "h", "y", "v", "g", "n", "b", "applyDec", "w", "D", "S", "j", "E", "I", "P", "k", "F", "_setFunctionName", "N", "O", "T", "z", "A", "H", "_toPropertyKey", "_checkInRHS", "_toPrimitive", "_RuiAlert", "RuiAlert", "args", "event2", "jsx", "jsxs", "cx", "parts", "ALERT_ICON_PATHS", "RuiAlertIcon", "variant", "className", "children", "props", "jsx", "cx", "paths", "d", "path", "RuiAlertTitle", "RuiAlertDescription", "RuiAlert", "layout", "dismissible", "closeLabel", "slot", "jsxs"]
7
7
  }
@@ -1,31 +1,30 @@
1
- import type { JsxHtmlProps, JsxHtmlPropsWithChildren } from '@ecopages/jsx';
2
- import type { RuiAutocompleteProps } from './autocomplete.script';
1
+ import type { JsxCustomElementAttributes, JsxElementProps, JsxRenderable } from '@ecopages/jsx';
2
+ import type { RuiAutocomplete as RuiAutocompleteElement, RuiAutocompleteProps } from './autocomplete.script';
3
3
  import './autocomplete.script';
4
- export type RuiAutocompleteInputProps = JsxHtmlProps<{
5
- slot?: string;
4
+ export type RuiAutocompleteInputProps = JsxElementProps<HTMLInputElement> & {
6
5
  placeholder?: string;
7
- 'aria-label'?: string;
8
6
  disabled?: boolean;
9
- }>;
10
- /** Search field slotted into `RuiAutocomplete`. Also pairs with combobox inputs via `data-autocomplete-input`.
7
+ };
8
+ /** Search field paired with `RuiAutocomplete`. Stamps `[data-autocomplete-input]`.
11
9
  *
12
10
  * @cssclass rui-autocomplete__input - Bordered search input.
13
11
  */
14
- export declare function RuiAutocompleteInput({ placeholder, slot, class: className, disabled, ...props }: RuiAutocompleteInputProps): import("@ecopages/jsx").JsxRenderable;
15
- export type RuiAutocompleteCollectionProps = JsxHtmlPropsWithChildren<{
16
- slot?: string;
17
- }>;
18
- /** Wrapper around the filterable collection inside `RuiAutocomplete`.
12
+ export declare function RuiAutocompleteInput({ placeholder, class: className, disabled, ...props }: RuiAutocompleteInputProps): JsxRenderable;
13
+ export type RuiAutocompleteCollectionProps = JsxElementProps<HTMLDivElement>;
14
+ /** Wrapper around the filterable collection. Stamps `[data-autocomplete-collection]`.
19
15
  *
20
16
  * @cssclass rui-autocomplete__collection - Scrollable filterable region.
21
17
  */
22
- export declare function RuiAutocompleteCollection({ children, class: className, ...props }: RuiAutocompleteCollectionProps): import("@ecopages/jsx").JsxRenderable;
23
- export type RuiAutocompleteEmptyProps = JsxHtmlPropsWithChildren;
24
- /** Shown when filtering yields no visible items.
18
+ export declare function RuiAutocompleteCollection({ children, class: className, ...props }: RuiAutocompleteCollectionProps): JsxRenderable;
19
+ export type RuiAutocompleteEmptyProps = JsxElementProps<HTMLDivElement>;
20
+ /** No-results state. Stamps `[data-autocomplete-empty]`; host toggles `hidden`.
25
21
  *
26
22
  * @cssclass rui-autocomplete__empty - No-results state.
27
23
  */
28
- export declare function RuiAutocompleteEmpty({ children, class: className, ...props }: RuiAutocompleteEmptyProps): import("@ecopages/jsx").JsxRenderable;
29
- export declare function RuiAutocomplete({ children, ...props }: JsxHtmlPropsWithChildren<RuiAutocompleteProps & {
30
- slot?: string;
31
- }>): import("@ecopages/jsx").JsxRenderable;
24
+ export declare function RuiAutocompleteEmpty({ children, class: className, ...props }: RuiAutocompleteEmptyProps): JsxRenderable;
25
+ /**
26
+ * Filter host view. Wraps children in `[data-ref="root"]` (presentation only).
27
+ *
28
+ * @cssclass rui-autocomplete - Filter host root.
29
+ */
30
+ export declare function RuiAutocomplete({ children, ...props }: JsxCustomElementAttributes<RuiAutocompleteElement, RuiAutocompleteProps>): JsxRenderable;
@@ -3,15 +3,38 @@ import { type TextFilterSensitivity } from '@/lib/text-filter';
3
3
  export type RuiAutocompleteProps = {
4
4
  /** Filter sensitivity. Default: `base` (case-insensitive contains). */
5
5
  sensitivity?: TextFilterSensitivity;
6
- /** Controlled filter query. When unset, reads from the slotted input. */
6
+ /** Controlled filter query. When unset, reads from the composed input. */
7
7
  inputValue?: string;
8
8
  };
9
9
  /**
10
- * `<rui-autocomplete>` — filters a slotted collection from a text input.
10
+ * `<rui-autocomplete>` — filters a composed collection from a text input.
11
11
  *
12
- * Wrap a search field (`data-autocomplete-input`) and a collection
13
- * (`data-autocomplete-collection` or default slot) containing `[role="option"]`,
14
- * `[role="menuitem"]`, or `[data-tag]` items.
12
+ * The custom element is a behavior host: it does not render filter markup.
13
+ * Import the script and place light-DOM children that match the contract below,
14
+ * or use `RuiAutocomplete` and its helpers, which stamp the same targets.
15
+ *
16
+ * ## Light-DOM contract
17
+ *
18
+ * Required (one of):
19
+ * - `[data-autocomplete-input]` — search field inside this host. Host listens for `input`.
20
+ * - External `[data-autocomplete-input]` on an ancestor `rui-combobox` or `rui-select`
21
+ * when this host does not contain the input.
22
+ *
23
+ * Collection (one of):
24
+ * - `[data-autocomplete-collection]` — wrapper around filterable items.
25
+ * - The host element itself — when no collection wrapper is provided.
26
+ *
27
+ * Per item inside the collection:
28
+ * - `[role="option"]`, `[role="menuitem"]`, or `[data-tag]` — filterable rows. Host
29
+ * toggles `hidden` based on the query. Text match uses `data-label` or trimmed
30
+ * `textContent`.
31
+ *
32
+ * Optional:
33
+ * - `[data-autocomplete-empty]` — no-results state. Host toggles `hidden` when matches exist.
34
+ * - `[data-label]` on items — filter text; falls back to trimmed `textContent`.
35
+ *
36
+ * Nested hosts: filterable items are often `rui-listbox` options or `rui-tag` chips;
37
+ * this host only queries the role / data-tag selectors above, not listbox internals.
15
38
  *
16
39
  * @remarks When nested in `rui-combobox`, the combobox input acts as the filter
17
40
  * field. `rui-select` uses a dedicated search input inside the popup instead.
@@ -21,12 +44,11 @@ export type RuiAutocompleteProps = {
21
44
  * @element rui-autocomplete
22
45
  *
23
46
  * @attr {string} sensitivity - Filter sensitivity: `base` (case-insensitive contains), `case`, or `accent`. Default: `base`.
24
- * @attr {string} input-value - Controlled filter query; when unset, reads from the slotted input. Default: `''`.
25
- *
26
- * @slot input - Search field (`RuiAutocompleteInput`).
27
- * @slot - Filterable collection of `[role="option"]`, `[role="menuitem"]`, or `[data-tag]` items.
47
+ * @attr {string} input-value - Controlled filter query; when unset, reads from the composed input. Default: `''`.
28
48
  *
29
- * @cssclass rui-autocomplete - Filter host.
49
+ * @remarks
50
+ * `[data-ref="root"]` on the view is presentation only; the host does not query it.
51
+ * BEM classes live on the view; the host never queries them.
30
52
  */
31
53
  export declare class RuiAutocomplete extends RadiantElement {
32
54
  sensitivity: TextFilterSensitivity;
@@ -43,9 +65,8 @@ export declare class RuiAutocomplete extends RadiantElement {
43
65
  private getQuery;
44
66
  private applyFilter;
45
67
  private initialize;
46
- connectedCallback(): void;
68
+ protected onConnected(): void;
47
69
  disconnectedCallback(): void;
48
70
  onPropsUpdated(): void;
49
71
  onInput(): void;
50
- render(): import("@ecopages/jsx").JsxRenderable;
51
72
  }
@@ -1,2 +1,2 @@
1
- import{jsx as ft,jsxs as It}from"@ecopages/jsx/jsx-runtime";import{RadiantElement as mt,customElement as Et,onEvent as _t,onUpdated as wt,prop as dt}from"@ecopages/radiant";function ot(e,t,o="base"){if(!t)return!0;if(o==="case")return e.includes(t);let l=new Intl.Collator(void 0,{sensitivity:o==="accent"?"accent":"base",usage:"search"});for(let p=0;p<=e.length-t.length;p+=1){let I=e.slice(p,p+t.length);if(l.compare(I,t)===0)return!0}return!1}var rt,ut,at,lt,st,ct;function vt(e,t,o,l,p,I){var y,u,q,F,S,O,w,G=Symbol.metadata||Symbol.for("Symbol.metadata"),J=Object.defineProperty,U=Object.create,W=[U(null),U(null)],X=t.length;function C(n,d,f){return function(i,r){d&&(r=i,i=e);for(var h=0;h<n.length;h++)r=n[h].apply(i,f?[r]:[]);return f?r:i}}function g(n,d,f,i){if(typeof n!="function"&&(i||n!==void 0))throw new TypeError(d+" must "+(f||"be")+" a function"+(i?"":" or undefined"));return n}function Y(n,d,f,i,r,h,E,m,v,b,$){function L(s){if(!$(s))throw new TypeError("Attempted to access private element on non-instance")}var Q=[].concat(d[0]),H=d[3],B=!E,j=r===1,P=r===3,N=r===4,R=r===2;function V(s,_,nt){return function(k,it){return _&&(it=k,k=n),nt&&nt(k),a[s].call(k,it)}}if(!B){var a={},K=[],x=P?"get":N||j?"set":"value";if(v?(b||j?a={get:pt(function(){return H(this)},i,"get"),set:function(s){d[4](this,s)}}:a[x]=H,b||pt(a[x],i,R?"":x)):b||(a=Object.getOwnPropertyDescriptor(n,i)),!b&&!v){if((u=W[+m][i])&&(u^r)!==7)throw Error("Decorating two elements with the same name ("+a[x].name+") is not supported yet");W[+m][i]=r<3?1:r}}for(var c=n,T=Q.length-1;T>=0;T-=f?2:1){var tt=g(Q[T],"A decorator","be",!0),et=f?Q[T-1]:void 0,M={},A={kind:["field","accessor","method","getter","setter","class"][r],name:i,metadata:y,addInitializer:function(s,_){if(s.v)throw new TypeError("attempted to call addInitializer after decoration was finished");g(_,"An initializer","be",!0),h.push(_)}.bind(null,M)};if(B)u=tt.call(et,c,A),M.v=1,g(u,"class decorators","return")&&(c=u);else if(A.static=m,A.private=v,u=A.access={has:v?$.bind():function(s){return i in s}},N||(u.get=v?R?function(s){return L(s),a.value}:V("get",0,L):function(s){return s[i]}),R||P||(u.set=v?V("set",0,L):function(s,_){s[i]=_}),c=tt.call(et,j?{get:a.get,set:a.set}:a[x],A),M.v=1,j){if(typeof c=="object"&&c)(u=g(c.get,"accessor.get"))&&(a.get=u),(u=g(c.set,"accessor.set"))&&(a.set=u),(u=g(c.init,"accessor.init"))&&K.unshift(u);else if(c!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else g(c,(b?"field":"method")+" decorators","return")&&(b?K.unshift(c):a[x]=c)}return r<2&&E.push(C(K,m,1),C(h,m,0)),b||B||(v?j?E.splice(-1,0,V("get",m),V("set",m)):E.push(R?a[x]:g.call.bind(a[x])):J(n,i,a)),c}function Z(n){return J(n,G,{configurable:!0,enumerable:!0,value:y})}return I!==void 0&&(y=I[G]),y=U(y??null),S=[],O=function(n){n&&S.push(C(n))},w=function(n,d){for(var f=0;f<o.length;f++){var i=o[f],r=i[1],h=7&r;if((8&r)==n&&!h==d){var E=i[2],m=!!i[3],v=16&r;Y(n?e:e.prototype,i,v,m?"#"+E:bt(E),h,h<2?[]:n?F=F||[]:q=q||[],S,!!n,m,d,n&&m?function(b){return xt(b)===e}:p)}}},w(8,0),w(0,0),w(8,1),w(0,1),O(q),O(F),u=S,X||Z(e),{e:u,get c(){var n=[];return X&&[Z(e=Y(e,[t],l,e.name,5,n)),C(n,1)]}}}function bt(e){var t=gt(e,"string");return typeof t=="symbol"?t:t+""}function gt(e,t){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var l=o.call(e,t||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pt(e,t,o){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:o?o+" "+t:t})}catch{}return e}function xt(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}var yt,ht=class extends mt{static{({e:[at,lt,st,ct,rt],c:[yt,ut]}=vt(this,[Et("rui-autocomplete")],[[dt({type:String,defaultValue:"base"}),0,"sensitivity"],[dt({type:String,attribute:"input-value",defaultValue:""}),0,"inputValue"],[wt(["sensitivity","inputValue"]),2,"onPropsUpdated"],[_t({selector:"[data-autocomplete-input]",type:"input"}),2,"onInput"]],0,void 0,mt))}sensitivity=(rt(this),at(this));inputValue=(lt(this),st(this));externalInput=(ct(this),null);onExternalInput=()=>{this.applyFilter()};getInput(){let t=this.querySelector("[data-autocomplete-input]");return t||(this.closest("rui-combobox, rui-select")?.querySelector("[data-autocomplete-input]")??null)}bindExternalInput(){this.unbindExternalInput();let t=this.getInput();!t||this.contains(t)||(this.externalInput=t,t.addEventListener("input",this.onExternalInput))}unbindExternalInput(){this.externalInput?.removeEventListener("input",this.onExternalInput),this.externalInput=null}syncFilter(){this.applyFilter()}getCollection(){return this.querySelector("[data-autocomplete-collection]")??this}getFilterableItems(){let t=this.getCollection();return t?Array.from(t.querySelectorAll('[role="option"], [data-tag], [role="menuitem"]')).filter(l=>this.contains(l)||t.contains(l)):[]}getItemText(t){return t.getAttribute("data-label")||t.textContent?.trim()||""}getQuery(){return this.inputValue?this.inputValue:this.getInput()?.value??""}applyFilter(){let t=this.getQuery(),o=this.getFilterableItems(),l=0;for(let I of o){let y=ot(this.getItemText(I),t,this.sensitivity);I.hidden=!y,y&&(l+=1)}let p=this.querySelector("[data-autocomplete-empty]");p&&(p.hidden=l>0)}initialize(){this.applyFilter()}connectedCallback(){super.connectedCallback(),queueMicrotask(()=>{this.bindExternalInput(),this.initialize()})}disconnectedCallback(){this.unbindExternalInput(),super.disconnectedCallback()}onPropsUpdated(){this.applyFilter()}onInput(){this.applyFilter()}render(){return It("div",{class:"rui-autocomplete","data-ref":"root",children:[ft("slot",{name:"input"}),ft("slot",{})]})}static{ut()}};import{jsx as z}from"@ecopages/jsx/jsx-runtime";function D(...e){return e.filter(Boolean).join(" ")}function jt({placeholder:e,slot:t="input",class:o,disabled:l,...p}){return z("input",{...p,type:"search",slot:t,"data-autocomplete-input":!0,class:D("rui-autocomplete__input",o),placeholder:e,disabled:l,autocomplete:"off"})}function At({children:e,class:t,...o}){return z("div",{...o,"data-autocomplete-collection":!0,class:D("rui-autocomplete__collection",t),children:e})}function St({children:e,class:t,...o}){return z("div",{...o,"data-autocomplete-empty":!0,class:D("rui-autocomplete__empty",t),hidden:!0,children:e})}function Ct({children:e,...t}){return z("rui-autocomplete",{...t,children:e})}export{Ct as RuiAutocomplete,At as RuiAutocompleteCollection,yt as RuiAutocompleteElement,St as RuiAutocompleteEmpty,jt as RuiAutocompleteInput};
1
+ import{RadiantElement as ft,customElement as xt,onEvent as It,onUpdated as Et,prop as mt}from"@ecopages/radiant";function ot(e,t,o="base"){if(!t)return!0;if(o==="case")return e.includes(t);let a=new Intl.Collator(void 0,{sensitivity:o==="accent"?"accent":"base",usage:"search"});for(let h=0;h<=e.length-t.length;h+=1){let I=e.slice(h,h+t.length);if(a.compare(I,t)===0)return!0}return!1}var rt,ut,lt,at,ct,st;function yt(e,t,o,a,h,I){var y,u,O,U,C,k,A,J=Symbol.metadata||Symbol.for("Symbol.metadata"),M=Object.defineProperty,q=Object.create,W=[q(null),q(null)],X=t.length;function R(n,m,p){return function(i,r){m&&(r=i,i=e);for(var d=0;d<n.length;d++)r=n[d].apply(i,p?[r]:[]);return p?r:i}}function b(n,m,p,i){if(typeof n!="function"&&(i||n!==void 0))throw new TypeError(m+" must "+(p||"be")+" a function"+(i?"":" or undefined"));return n}function Y(n,m,p,i,r,d,E,f,v,g,$){function L(c){if(!$(c))throw new TypeError("Attempted to access private element on non-instance")}var Q=[].concat(m[0]),H=m[3],B=!E,S=r===1,P=r===3,N=r===4,V=r===2;function T(c,_,nt){return function(z,it){return _&&(it=z,z=n),nt&&nt(z),l[c].call(z,it)}}if(!B){var l={},K=[],x=P?"get":N||S?"set":"value";if(v?(g||S?l={get:pt(function(){return H(this)},i,"get"),set:function(c){m[4](this,c)}}:l[x]=H,g||pt(l[x],i,V?"":x)):g||(l=Object.getOwnPropertyDescriptor(n,i)),!g&&!v){if((u=W[+f][i])&&(u^r)!==7)throw Error("Decorating two elements with the same name ("+l[x].name+") is not supported yet");W[+f][i]=r<3?1:r}}for(var s=n,D=Q.length-1;D>=0;D-=p?2:1){var tt=b(Q[D],"A decorator","be",!0),et=p?Q[D-1]:void 0,G={},j={kind:["field","accessor","method","getter","setter","class"][r],name:i,metadata:y,addInitializer:function(c,_){if(c.v)throw new TypeError("attempted to call addInitializer after decoration was finished");b(_,"An initializer","be",!0),d.push(_)}.bind(null,G)};if(B)u=tt.call(et,s,j),G.v=1,b(u,"class decorators","return")&&(s=u);else if(j.static=f,j.private=v,u=j.access={has:v?$.bind():function(c){return i in c}},N||(u.get=v?V?function(c){return L(c),l.value}:T("get",0,L):function(c){return c[i]}),V||P||(u.set=v?T("set",0,L):function(c,_){c[i]=_}),s=tt.call(et,S?{get:l.get,set:l.set}:l[x],j),G.v=1,S){if(typeof s=="object"&&s)(u=b(s.get,"accessor.get"))&&(l.get=u),(u=b(s.set,"accessor.set"))&&(l.set=u),(u=b(s.init,"accessor.init"))&&K.unshift(u);else if(s!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(s,(g?"field":"method")+" decorators","return")&&(g?K.unshift(s):l[x]=s)}return r<2&&E.push(R(K,f,1),R(d,f,0)),g||B||(v?S?E.splice(-1,0,T("get",f),T("set",f)):E.push(V?l[x]:b.call.bind(l[x])):M(n,i,l)),s}function Z(n){return M(n,J,{configurable:!0,enumerable:!0,value:y})}return I!==void 0&&(y=I[J]),y=q(y??null),C=[],k=function(n){n&&C.push(R(n))},A=function(n,m){for(var p=0;p<o.length;p++){var i=o[p],r=i[1],d=7&r;if((8&r)==n&&!d==m){var E=i[2],f=!!i[3],v=16&r;Y(n?e:e.prototype,i,v,f?"#"+E:vt(E),d,d<2?[]:n?U=U||[]:O=O||[],C,!!n,f,m,n&&f?function(g){return bt(g)===e}:h)}}},A(8,0),A(0,0),A(8,1),A(0,1),k(O),k(U),u=C,X||Z(e),{e:u,get c(){var n=[];return X&&[Z(e=Y(e,[t],a,e.name,5,n)),R(n,1)]}}}function vt(e){var t=gt(e,"string");return typeof t=="symbol"?t:t+""}function gt(e,t){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var a=o.call(e,t||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pt(e,t,o){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:o?o+" "+t:t})}catch{}return e}function bt(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}var ht,dt=class extends ft{static{({e:[lt,at,ct,st,rt],c:[ht,ut]}=yt(this,[xt("rui-autocomplete")],[[mt({type:String,defaultValue:"base"}),0,"sensitivity"],[mt({type:String,attribute:"input-value",defaultValue:""}),0,"inputValue"],[Et(["sensitivity","inputValue"]),2,"onPropsUpdated"],[It({selector:"[data-autocomplete-input]",type:"input"}),2,"onInput"]],0,void 0,ft))}sensitivity=(rt(this),lt(this));inputValue=(at(this),ct(this));externalInput=(st(this),null);onExternalInput=()=>{this.applyFilter()};getInput(){let t=this.querySelector("[data-autocomplete-input]");return t||(this.closest("rui-combobox, rui-select")?.querySelector("[data-autocomplete-input]")??null)}bindExternalInput(){this.unbindExternalInput();let t=this.getInput();!t||this.contains(t)||(this.externalInput=t,t.addEventListener("input",this.onExternalInput))}unbindExternalInput(){this.externalInput?.removeEventListener("input",this.onExternalInput),this.externalInput=null}syncFilter(){this.applyFilter()}getCollection(){return this.querySelector("[data-autocomplete-collection]")??this}getFilterableItems(){let t=this.getCollection();return t?Array.from(t.querySelectorAll('[role="option"], [data-tag], [role="menuitem"]')).filter(a=>this.contains(a)||t.contains(a)):[]}getItemText(t){return t.getAttribute("data-label")||t.textContent?.trim()||""}getQuery(){return this.inputValue?this.inputValue:this.getInput()?.value??""}applyFilter(){let t=this.getQuery(),o=this.getFilterableItems(),a=0;for(let I of o){let y=ot(this.getItemText(I),t,this.sensitivity);I.hidden=!y,y&&(a+=1)}let h=this.querySelector("[data-autocomplete-empty]");h&&h.toggleAttribute("hidden",a>0)}initialize(){this.applyFilter()}onConnected(){this.bindExternalInput(),this.initialize()}disconnectedCallback(){this.unbindExternalInput(),super.disconnectedCallback()}onPropsUpdated(){this.applyFilter()}onInput(){this.applyFilter()}static{ut()}};import{jsx as w}from"@ecopages/jsx/jsx-runtime";function F(...e){return e.filter(Boolean).join(" ")}function _t({placeholder:e,class:t,disabled:o,...a}){return w("input",{...a,type:"search","data-autocomplete-input":!0,class:F("rui-autocomplete__input",t),placeholder:e,disabled:o,autocomplete:"off"})}function wt({children:e,class:t,...o}){return w("div",{...o,"data-autocomplete-collection":!0,class:F("rui-autocomplete__collection",t),children:e})}function At({children:e,class:t,...o}){return w("div",{...o,"data-autocomplete-empty":!0,class:F("rui-autocomplete__empty",t),children:e})}function St({children:e}){return w("div",{class:"rui-autocomplete","data-ref":"root",children:e})}function jt({children:e,...t}){return w("rui-autocomplete",{...t,children:w(St,{children:e})})}export{jt as RuiAutocomplete,wt as RuiAutocompleteCollection,ht as RuiAutocompleteElement,At as RuiAutocompleteEmpty,_t as RuiAutocompleteInput};
2
2
  //# sourceMappingURL=index.js.map