@editora/ui-core 0.1.20 → 0.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/dist/accordion.cjs.js +3 -3
  2. package/dist/accordion.esm.js +3 -3
  3. package/dist/alert-dialog.cjs.js +32 -32
  4. package/dist/alert-dialog.esm.js +95 -75
  5. package/dist/alert.cjs.js +6 -6
  6. package/dist/alert.esm.js +6 -6
  7. package/dist/animated-list.cjs.js +4 -4
  8. package/dist/animated-list.esm.js +4 -4
  9. package/dist/animated-text.cjs.js +4 -4
  10. package/dist/animated-text.esm.js +4 -4
  11. package/dist/app-header.cjs.js +3 -3
  12. package/dist/app-header.esm.js +3 -3
  13. package/dist/aspect-ratio.cjs.js +3 -3
  14. package/dist/aspect-ratio.esm.js +3 -3
  15. package/dist/avatar.cjs.js +14 -14
  16. package/dist/avatar.esm.js +31 -29
  17. package/dist/badge.cjs.js +4 -4
  18. package/dist/badge.esm.js +4 -4
  19. package/dist/block-controls.cjs.js +4 -4
  20. package/dist/block-controls.esm.js +4 -4
  21. package/dist/box.cjs.js +2 -2
  22. package/dist/box.esm.js +2 -2
  23. package/dist/breadcrumb.cjs.js +5 -5
  24. package/dist/breadcrumb.esm.js +5 -5
  25. package/dist/button.cjs.js +1 -1
  26. package/dist/button.esm.js +1 -1
  27. package/dist/{calendar-DLY4acgn.mjs → calendar-DbxYRdlv.mjs} +227 -183
  28. package/dist/{calendar-Dkof-FTK.js → calendar-Qa-cFOp3.js} +74 -35
  29. package/dist/calendar.cjs.js +1 -1
  30. package/dist/calendar.esm.js +1 -1
  31. package/dist/card.cjs.js +8 -8
  32. package/dist/card.esm.js +63 -20
  33. package/dist/chart.cjs.js +4 -4
  34. package/dist/chart.esm.js +6 -6
  35. package/dist/checkbox.cjs.js +2 -2
  36. package/dist/checkbox.esm.js +2 -2
  37. package/dist/collapsible.cjs.js +7 -7
  38. package/dist/collapsible.esm.js +7 -7
  39. package/dist/collection.cjs.js +1 -1
  40. package/dist/collection.esm.js +27 -23
  41. package/dist/color-picker.cjs.js +34 -14
  42. package/dist/color-picker.esm.js +89 -67
  43. package/dist/combobox.cjs.js +29 -27
  44. package/dist/combobox.esm.js +51 -45
  45. package/dist/command.cjs.js +2 -2
  46. package/dist/command.esm.js +2 -2
  47. package/dist/components/ui-alert-dialog.d.ts +1 -0
  48. package/dist/components/ui-alert-dialog.d.ts.map +1 -1
  49. package/dist/components/ui-avatar.d.ts +1 -0
  50. package/dist/components/ui-avatar.d.ts.map +1 -1
  51. package/dist/components/ui-button.d.ts +1 -0
  52. package/dist/components/ui-button.d.ts.map +1 -1
  53. package/dist/components/ui-calendar.d.ts.map +1 -1
  54. package/dist/components/ui-card.d.ts +3 -0
  55. package/dist/components/ui-card.d.ts.map +1 -1
  56. package/dist/components/ui-checkbox.d.ts.map +1 -1
  57. package/dist/components/ui-collection.d.ts.map +1 -1
  58. package/dist/components/ui-color-picker.d.ts.map +1 -1
  59. package/dist/components/ui-combobox.d.ts.map +1 -1
  60. package/dist/components/ui-data-table.d.ts.map +1 -1
  61. package/dist/components/ui-date-field.d.ts.map +1 -1
  62. package/dist/components/ui-date-picker.d.ts.map +1 -1
  63. package/dist/components/ui-date-range-picker.d.ts.map +1 -1
  64. package/dist/components/ui-date-range-time-picker.d.ts.map +1 -1
  65. package/dist/components/ui-date-time-picker.d.ts.map +1 -1
  66. package/dist/components/ui-dock.d.ts +1 -0
  67. package/dist/components/ui-dock.d.ts.map +1 -1
  68. package/dist/components/ui-drawer.d.ts.map +1 -1
  69. package/dist/components/ui-dropdown.d.ts.map +1 -1
  70. package/dist/components/ui-field.d.ts.map +1 -1
  71. package/dist/components/ui-file-upload.d.ts.map +1 -1
  72. package/dist/components/ui-gantt.d.ts.map +1 -1
  73. package/dist/components/ui-input.d.ts.map +1 -1
  74. package/dist/components/ui-menu.d.ts.map +1 -1
  75. package/dist/components/ui-multi-select.d.ts.map +1 -1
  76. package/dist/components/ui-number-field.d.ts.map +1 -1
  77. package/dist/components/ui-password-field.d.ts.map +1 -1
  78. package/dist/components/ui-pin-input.d.ts +1 -0
  79. package/dist/components/ui-pin-input.d.ts.map +1 -1
  80. package/dist/components/ui-placement-grid.d.ts.map +1 -1
  81. package/dist/components/ui-portal.d.ts.map +1 -1
  82. package/dist/components/ui-positioner.d.ts.map +1 -1
  83. package/dist/components/ui-progress.d.ts.map +1 -1
  84. package/dist/components/ui-radio.d.ts.map +1 -1
  85. package/dist/components/ui-rating.d.ts +1 -0
  86. package/dist/components/ui-rating.d.ts.map +1 -1
  87. package/dist/components/ui-select.d.ts.map +1 -1
  88. package/dist/components/ui-sortable.d.ts +8 -0
  89. package/dist/components/ui-sortable.d.ts.map +1 -1
  90. package/dist/components/ui-switch.d.ts.map +1 -1
  91. package/dist/components/ui-table.d.ts.map +1 -1
  92. package/dist/components/ui-tabs.d.ts +1 -0
  93. package/dist/components/ui-tabs.d.ts.map +1 -1
  94. package/dist/components/ui-tags-input.d.ts +1 -0
  95. package/dist/components/ui-tags-input.d.ts.map +1 -1
  96. package/dist/components/ui-textarea.d.ts.map +1 -1
  97. package/dist/components/ui-time-field.d.ts.map +1 -1
  98. package/dist/components/ui-toggle-group.d.ts.map +1 -1
  99. package/dist/components/ui-toggle.d.ts.map +1 -1
  100. package/dist/components/ui-tree.d.ts.map +1 -1
  101. package/dist/components/ui-wizard.d.ts.map +1 -1
  102. package/dist/context-menu.cjs.js +3 -3
  103. package/dist/context-menu.esm.js +4 -4
  104. package/dist/control-name-BmoI1m3a.js +1 -0
  105. package/dist/control-name-Bpj7F34X.mjs +48 -0
  106. package/dist/data-table.cjs.js +5 -2
  107. package/dist/data-table.esm.js +145 -142
  108. package/dist/date-field.cjs.js +5 -5
  109. package/dist/date-field.esm.js +34 -31
  110. package/dist/date-picker.cjs.js +16 -16
  111. package/dist/date-picker.esm.js +48 -44
  112. package/dist/date-range-picker.cjs.js +5 -5
  113. package/dist/date-range-picker.esm.js +120 -118
  114. package/dist/date-range-time-picker.cjs.js +22 -22
  115. package/dist/date-range-time-picker.esm.js +88 -84
  116. package/dist/date-time-picker.cjs.js +26 -26
  117. package/dist/date-time-picker.esm.js +105 -101
  118. package/dist/{date-time-utils-Dmost5Ee.js → date-time-utils-BzfTpeU-.js} +1 -1
  119. package/dist/{date-time-utils-y1N2gvG2.mjs → date-time-utils-Cps2aSu2.mjs} +1 -1
  120. package/dist/description.cjs.js +3 -3
  121. package/dist/description.esm.js +3 -3
  122. package/dist/dialog.cjs.js +2 -2
  123. package/dist/dialog.esm.js +2 -2
  124. package/dist/dock.cjs.js +12 -12
  125. package/dist/dock.esm.js +72 -74
  126. package/dist/drawer.cjs.js +19 -19
  127. package/dist/drawer.esm.js +58 -58
  128. package/dist/dropdown.cjs.js +13 -13
  129. package/dist/dropdown.esm.js +49 -48
  130. package/dist/empty-state.cjs.js +3 -3
  131. package/dist/empty-state.esm.js +3 -3
  132. package/dist/field-error.cjs.js +1 -1
  133. package/dist/field-error.esm.js +1 -1
  134. package/dist/field.cjs.js +12 -12
  135. package/dist/field.esm.js +84 -75
  136. package/dist/fieldset.cjs.js +4 -4
  137. package/dist/fieldset.esm.js +4 -4
  138. package/dist/file-upload.cjs.js +3 -3
  139. package/dist/file-upload.esm.js +5 -3
  140. package/dist/floating-toolbar.cjs.js +8 -8
  141. package/dist/floating-toolbar.esm.js +9 -9
  142. package/dist/form.cjs.js +11 -11
  143. package/dist/form.esm.js +11 -11
  144. package/dist/gantt.cjs.js +43 -32
  145. package/dist/gantt.esm.js +99 -88
  146. package/dist/icon-cloud.cjs.js +3 -3
  147. package/dist/icon-cloud.esm.js +3 -3
  148. package/dist/icon.cjs.js +1 -1
  149. package/dist/icon.esm.js +1 -1
  150. package/dist/index.cjs.js +1 -1
  151. package/dist/index.esm.js +121 -118
  152. package/dist/inline-edit.cjs.js +1 -1
  153. package/dist/inline-edit.esm.js +1 -1
  154. package/dist/input.cjs.js +14 -14
  155. package/dist/input.esm.js +39 -32
  156. package/dist/label.cjs.js +3 -3
  157. package/dist/label.esm.js +3 -3
  158. package/dist/{listbox-B6QgECax.js → listbox-CTpRpuF7.js} +1 -1
  159. package/dist/{listbox-DJamVeFj.mjs → listbox-hMVOhKHC.mjs} +1 -1
  160. package/dist/listbox.cjs.js +1 -1
  161. package/dist/listbox.esm.js +1 -1
  162. package/dist/marquee.cjs.js +3 -3
  163. package/dist/marquee.esm.js +3 -3
  164. package/dist/{menu-item-styles-CbNUEwP2.js → menu-item-styles-B4onAr4C.js} +3 -3
  165. package/dist/{menu-item-styles-CZiPwPwl.mjs → menu-item-styles-IGSFLAHu.mjs} +3 -3
  166. package/dist/menu.cjs.js +7 -7
  167. package/dist/menu.esm.js +29 -28
  168. package/dist/menubar.cjs.js +1 -1
  169. package/dist/menubar.esm.js +2 -2
  170. package/dist/meter.cjs.js +1 -1
  171. package/dist/meter.esm.js +1 -1
  172. package/dist/multi-select.cjs.js +18 -18
  173. package/dist/multi-select.esm.js +82 -66
  174. package/dist/navigation-menu.cjs.js +1 -1
  175. package/dist/navigation-menu.esm.js +1 -1
  176. package/dist/number-field.cjs.js +11 -13
  177. package/dist/number-field.esm.js +29 -27
  178. package/dist/number-ticker.cjs.js +4 -4
  179. package/dist/number-ticker.esm.js +4 -4
  180. package/dist/odometer.cjs.js +2 -2
  181. package/dist/odometer.esm.js +2 -2
  182. package/dist/orbiter.cjs.js +3 -3
  183. package/dist/orbiter.esm.js +3 -3
  184. package/dist/pagination.cjs.js +1 -1
  185. package/dist/pagination.esm.js +1 -1
  186. package/dist/password-field.cjs.js +23 -23
  187. package/dist/password-field.esm.js +48 -47
  188. package/dist/pin-input.cjs.js +8 -6
  189. package/dist/pin-input.esm.js +21 -15
  190. package/dist/placement-grid.cjs.js +4 -4
  191. package/dist/placement-grid.esm.js +58 -58
  192. package/dist/plugin-panel.cjs.js +1 -1
  193. package/dist/plugin-panel.esm.js +1 -1
  194. package/dist/popover.cjs.js +5 -5
  195. package/dist/popover.esm.js +4 -4
  196. package/dist/portal.cjs.js +3 -3
  197. package/dist/portal.esm.js +11 -10
  198. package/dist/positioner.cjs.js +2 -2
  199. package/dist/positioner.esm.js +15 -14
  200. package/dist/primitives/auto-scroll.d.ts +9 -0
  201. package/dist/primitives/auto-scroll.d.ts.map +1 -0
  202. package/dist/primitives/control-name.d.ts +30 -0
  203. package/dist/primitives/control-name.d.ts.map +1 -0
  204. package/dist/primitives/selector.d.ts +4 -0
  205. package/dist/primitives/selector.d.ts.map +1 -0
  206. package/dist/primitives/trigger.d.ts +2 -0
  207. package/dist/primitives/trigger.d.ts.map +1 -0
  208. package/dist/progress.cjs.js +4 -4
  209. package/dist/progress.esm.js +20 -18
  210. package/dist/quick-actions.cjs.js +3 -3
  211. package/dist/quick-actions.esm.js +3 -3
  212. package/dist/radio-group.cjs.js +1 -1
  213. package/dist/radio-group.esm.js +1 -1
  214. package/dist/radio.cjs.js +2 -2
  215. package/dist/radio.esm.js +2 -2
  216. package/dist/rating.cjs.js +17 -16
  217. package/dist/rating.esm.js +91 -92
  218. package/dist/{runtime-D1gFh1fS.mjs → runtime-CFnK53iC.mjs} +133 -94
  219. package/dist/runtime-DwE-tizc.js +1 -0
  220. package/dist/runtime.cjs.js +1 -1
  221. package/dist/runtime.d.ts +1 -1
  222. package/dist/runtime.d.ts.map +1 -1
  223. package/dist/runtime.esm.js +29 -26
  224. package/dist/select.cjs.js +20 -19
  225. package/dist/select.esm.js +36 -32
  226. package/dist/selection-popup.cjs.js +2 -2
  227. package/dist/selection-popup.esm.js +2 -2
  228. package/dist/selector-BvAh35ve.js +1 -0
  229. package/dist/selector-WI8pD7YO.mjs +18 -0
  230. package/dist/separator.cjs.js +7 -7
  231. package/dist/separator.esm.js +7 -7
  232. package/dist/sidebar.cjs.js +7 -7
  233. package/dist/sidebar.esm.js +7 -7
  234. package/dist/skeleton.cjs.js +7 -7
  235. package/dist/skeleton.esm.js +7 -7
  236. package/dist/slider.cjs.js +3 -3
  237. package/dist/slider.esm.js +3 -3
  238. package/dist/slot.cjs.js +3 -3
  239. package/dist/slot.esm.js +3 -3
  240. package/dist/sortable.cjs.js +61 -48
  241. package/dist/sortable.esm.js +636 -554
  242. package/dist/spinning-text.cjs.js +3 -3
  243. package/dist/spinning-text.esm.js +3 -3
  244. package/dist/split-button.cjs.js +1 -1
  245. package/dist/split-button.esm.js +1 -1
  246. package/dist/stepper.cjs.js +1 -1
  247. package/dist/stepper.esm.js +1 -1
  248. package/dist/switch.cjs.js +10 -12
  249. package/dist/switch.esm.js +10 -12
  250. package/dist/table.cjs.js +9 -6
  251. package/dist/table.esm.js +46 -43
  252. package/dist/tabs.cjs.js +22 -23
  253. package/dist/tabs.esm.js +116 -112
  254. package/dist/tags-input.cjs.js +9 -9
  255. package/dist/tags-input.esm.js +32 -25
  256. package/dist/textarea.cjs.js +13 -13
  257. package/dist/textarea.esm.js +46 -31
  258. package/dist/theme.d.ts +18 -0
  259. package/dist/theme.d.ts.map +1 -1
  260. package/dist/time-field.cjs.js +5 -5
  261. package/dist/time-field.esm.js +21 -18
  262. package/dist/time-picker.cjs.js +4 -4
  263. package/dist/time-picker.esm.js +5 -5
  264. package/dist/timeline.cjs.js +2 -2
  265. package/dist/timeline.esm.js +4 -4
  266. package/dist/toast.cjs.js +6 -6
  267. package/dist/toast.esm.js +13 -13
  268. package/dist/toggle-group.cjs.js +5 -6
  269. package/dist/toggle-group.esm.js +63 -60
  270. package/dist/toggle.cjs.js +18 -18
  271. package/dist/toggle.esm.js +32 -31
  272. package/dist/tooltip.cjs.js +4 -4
  273. package/dist/tooltip.esm.js +4 -4
  274. package/dist/transfer-list.cjs.js +32 -32
  275. package/dist/transfer-list.esm.js +57 -57
  276. package/dist/tree-7qbVnpGp.js +39 -0
  277. package/dist/{tree-B3kE8ESs.mjs → tree-Deoft-kO.mjs} +34 -33
  278. package/dist/tree.cjs.js +1 -1
  279. package/dist/tree.esm.js +1 -1
  280. package/dist/trigger-BjnxLCeQ.mjs +9 -0
  281. package/dist/trigger-DkPsKxsP.js +1 -0
  282. package/dist/{ui-button-rXQOS9QJ.js → ui-button-BInsgSbr.js} +27 -26
  283. package/dist/{ui-button-Q0GNNWKC.mjs → ui-button-rfiuUnUD.mjs} +65 -48
  284. package/dist/{ui-icon-YI6lyuqU.mjs → ui-icon-BSi_GtqO.mjs} +2 -2
  285. package/dist/{ui-icon-BzVNC_lr.js → ui-icon-Bvt9oIIR.js} +5 -5
  286. package/dist/wizard.cjs.js +12 -13
  287. package/dist/wizard.esm.js +17 -15
  288. package/package.json +1 -1
  289. package/dist/runtime-CTaOSmBj.js +0 -1
  290. package/dist/tree-Dx_kv_ih.js +0 -39
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const E=require("./ElementBase-EV6mVBUV.js"),A=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const S=require("./ElementBase-EV6mVBUV.js"),f=require("./control-name-BmoI1m3a.js"),k=`
2
2
  :host {
3
3
  --ui-tags-input-padding: 10px 12px;
4
4
  --ui-tags-input-border-color: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 78%, transparent);
@@ -6,7 +6,7 @@
6
6
  --ui-tags-input-radius: var(--ui-radius, 12px);
7
7
  --ui-tags-input-bg: var(--ui-color-surface, #ffffff);
8
8
  --ui-tags-input-text: var(--ui-color-text, #0f172a);
9
- --ui-tags-input-muted: var(--ui-color-muted, #64748b);
9
+ --ui-tags-input-muted: var(--ui-color-muted, #526175);
10
10
  --ui-tags-input-focus: var(--ui-color-focus-ring, #2563eb);
11
11
  --ui-tags-input-danger: var(--ui-color-danger, #dc2626);
12
12
  --ui-tags-input-chip-bg: color-mix(in srgb, var(--ui-color-primary, #2563eb) 10%, transparent);
@@ -181,22 +181,22 @@
181
181
  :host([readonly]) .chip-remove {
182
182
  pointer-events: none;
183
183
  }
184
- `;function m(r,t){return r.length===t.length&&r.every((i,e)=>i===t[e])}function d(r){if(!r)return[];const t=r.trim();if(!t)return[];if(t.startsWith("["))try{const i=JSON.parse(t);if(Array.isArray(i))return i.map(e=>String(e).trim()).filter(Boolean)}catch{}return t.split(",").map(i=>i.trim()).filter(Boolean)}function S(r){return r.length?r.some(t=>t.includes(",")||t.includes(`
185
- `))?JSON.stringify(r):r.join(", "):""}function c(r){return r.replace(/\s+/g," ").trim()}class f extends E.ElementBase{constructor(){super(),this._tags=[],this._draft="",this._suppressValueAttr=!1,this._formUnregister=null,this._rootEl=null,this._shellEl=null,this._chipsEl=null,this._inputEl=null,this._labelEl=null,this._descriptionEl=null,this._errorEl=null,this._assistEl=null,this._counterEl=null,this._focused=!1,this._onInput=this._onInput.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onFocusIn=this._onFocusIn.bind(this),this._onFocusOut=this._onFocusOut.bind(this),this._onPaste=this._onPaste.bind(this),this._onShellClick=this._onShellClick.bind(this),this._onChipClick=this._onChipClick.bind(this)}static get observedAttributes(){return["value","label","description","placeholder","data-error","required","disabled","readonly","name","max-tags","counter"]}get value(){return[...this._tags]}set value(t){const i=Array.isArray(t)?t.map(e=>c(String(e))).filter(Boolean):d(String(t??""));this._applyTags(i,"api")}addTag(t){return this._addTag(t,"api")}removeTag(t){if(typeof t=="number"){if(t<0||t>=this._tags.length)return;this._removeTagAt(t,"api");return}const i=this._tags.indexOf(t);i>=0&&this._removeTagAt(i,"api")}clearTags(){this._applyTags([],"api")}focusInput(){this._inputEl?.focus()}connectedCallback(){super.connectedCallback(),this._registerWithForm()}disconnectedCallback(){this._formUnregister&&(this._formUnregister(),this._formUnregister=null),super.disconnectedCallback()}attributeChangedCallback(t,i,e){if(i!==e){if(t==="name"&&this.isConnected&&this._registerWithForm(),t==="value"&&!this._suppressValueAttr){const s=d(e);m(s,this._tags)||(this._tags=s)}this._rootEl&&this._syncUi()}}shouldRenderOnAttributeChange(){return!1}render(){this.setContent(`
186
- <style>${A}</style>
184
+ `;function b(r,t){return r.length===t.length&&r.every((i,e)=>i===t[e])}function d(r){if(!r)return[];const t=r.trim();if(!t)return[];if(t.startsWith("["))try{const i=JSON.parse(t);if(Array.isArray(i))return i.map(e=>String(e).trim()).filter(Boolean)}catch{}return t.split(",").map(i=>i.trim()).filter(Boolean)}function C(r){return r.length?r.some(t=>t.includes(",")||t.includes(`
185
+ `))?JSON.stringify(r):r.join(", "):""}function c(r){return r.replace(/\s+/g," ").trim()}let T=0;class v extends S.ElementBase{constructor(){super(),this._tags=[],this._draft="",this._suppressValueAttr=!1,this._formUnregister=null,this._rootEl=null,this._shellEl=null,this._chipsEl=null,this._inputEl=null,this._uid=`ui-tags-input-${++T}`,this._labelEl=null,this._descriptionEl=null,this._errorEl=null,this._assistEl=null,this._counterEl=null,this._focused=!1,this._onInput=this._onInput.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onFocusIn=this._onFocusIn.bind(this),this._onFocusOut=this._onFocusOut.bind(this),this._onPaste=this._onPaste.bind(this),this._onShellClick=this._onShellClick.bind(this),this._onChipClick=this._onChipClick.bind(this)}static get observedAttributes(){return["value","label","aria-label","aria-description","aria-describedby","description","placeholder","data-error","required","disabled","readonly","name","max-tags","counter"]}get value(){return[...this._tags]}set value(t){const i=Array.isArray(t)?t.map(e=>c(String(e))).filter(Boolean):d(String(t??""));this._applyTags(i,"api")}addTag(t){return this._addTag(t,"api")}removeTag(t){if(typeof t=="number"){if(t<0||t>=this._tags.length)return;this._removeTagAt(t,"api");return}const i=this._tags.indexOf(t);i>=0&&this._removeTagAt(i,"api")}clearTags(){this._applyTags([],"api")}focusInput(){this._inputEl?.focus()}connectedCallback(){super.connectedCallback(),this._registerWithForm()}disconnectedCallback(){this._formUnregister&&(this._formUnregister(),this._formUnregister=null),super.disconnectedCallback()}attributeChangedCallback(t,i,e){if(i!==e){if(t==="name"&&this.isConnected&&this._registerWithForm(),t==="value"&&!this._suppressValueAttr){const s=d(e);b(s,this._tags)||(this._tags=s)}this._rootEl&&this._syncUi()}}shouldRenderOnAttributeChange(){return!1}render(){this.setContent(`
186
+ <style>${k}</style>
187
187
  <div class="root">
188
188
  <div class="meta" hidden>
189
- <div class="label" hidden><span class="label-text"></span><span class="required" hidden>*</span></div>
190
- <div class="description" hidden></div>
189
+ <div class="label" hidden><span class="label-text" id="${this._uid}-label"></span><span class="required" hidden>*</span></div>
190
+ <div class="description" id="${this._uid}-description" hidden></div>
191
191
  </div>
192
192
  <div class="shell" part="shell" data-focused="false" data-invalid="false">
193
193
  <div class="chips" part="chips"></div>
194
194
  <input class="input" part="input" type="text" />
195
195
  </div>
196
- <div class="error" part="error" hidden></div>
196
+ <div class="error" id="${this._uid}-error" part="error" hidden></div>
197
197
  <div class="assist" hidden>
198
198
  <div class="hint">Press Enter or comma to create a tag.</div>
199
199
  <div class="counter"></div>
200
200
  </div>
201
201
  </div>
202
- `),this._rootEl=this.root.querySelector(".root"),this._shellEl=this.root.querySelector(".shell"),this._chipsEl=this.root.querySelector(".chips"),this._inputEl=this.root.querySelector(".input"),this._labelEl=this.root.querySelector(".label"),this._descriptionEl=this.root.querySelector(".description"),this._errorEl=this.root.querySelector(".error"),this._assistEl=this.root.querySelector(".assist"),this._counterEl=this.root.querySelector(".counter"),this._inputEl?.addEventListener("input",this._onInput),this._inputEl?.addEventListener("keydown",this._onKeyDown),this._inputEl?.addEventListener("focus",this._onFocusIn),this._inputEl?.addEventListener("blur",this._onFocusOut),this._inputEl?.addEventListener("paste",this._onPaste),this._shellEl?.addEventListener("click",this._onShellClick),this.root.addEventListener("click",this._onChipClick),this._tags=d(this.getAttribute("value")),this._syncUi()}_readOnly(){return this.hasAttribute("readonly")}_disabled(){return this.hasAttribute("disabled")&&this.getAttribute("disabled")!=="false"}_allowDuplicates(){return this.hasAttribute("allow-duplicates")}_maxTags(){const t=this.getAttribute("max-tags");if(!t)return null;const i=Number(t);return Number.isFinite(i)&&i>0?Math.floor(i):null}_emit(t,i){this.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0,composed:!0}))}_setValueAttr(t){const i=S(t);this._suppressValueAttr=!0;try{i?this.getAttribute("value")!==i&&this.setAttribute("value",i):this.removeAttribute("value")}finally{this._suppressValueAttr=!1}}_applyTags(t,i){const e=t.map(l=>c(l)).filter(Boolean),s=this._allowDuplicates()?e:e.filter((l,o)=>e.indexOf(l)===o),n=this._maxTags()!=null?s.slice(0,this._maxTags()):s;if(m(n,this._tags))return this._syncUi(),!1;const a=[...this._tags];return this._tags=[...n],this._setValueAttr(this._tags),this._syncUi(),this._emit("change",{value:[...this._tags],previousValue:a,source:i}),!0}_addTag(t,i){if(this._disabled()||this._readOnly())return!1;const e=c(t);if(!e)return!1;if(!this._allowDuplicates()&&this._tags.includes(e))return this._syncUi("Duplicate tag"),!1;const s=this._maxTags();if(s!=null&&this._tags.length>=s)return this._syncUi(`Maximum ${s} tags`),!1;const n=this._applyTags([...this._tags,e],i);return n&&this._emit("tag-add",{tag:e,value:[...this._tags],source:i}),n}_removeTagAt(t,i){if(this._disabled()||this._readOnly())return;const e=this._tags[t];if(!e)return;const s=this._tags.filter((a,l)=>l!==t);this._applyTags(s,i)&&this._emit("tag-remove",{tag:e,index:t,value:[...this._tags],source:i})}_commitDraft(t){const i=this._draft;this._draft="",this._inputEl&&(this._inputEl.value=""),this._addTag(i,t),this._syncUi()}_syncUi(t){if(!this._shellEl||!this._chipsEl||!this._inputEl||!this._labelEl||!this._descriptionEl||!this._errorEl||!this._assistEl||!this._counterEl)return;const i=(this.getAttribute("label")||"").trim(),e=(this.getAttribute("description")||"").trim(),s=(this.getAttribute("data-error")||"").trim(),n=this.hasAttribute("required"),a=this._disabled(),l=this._readOnly(),o=this._maxTags(),b=this.hasAttribute("counter")||o!=null,v=!!s||!!t||n&&this._tags.length===0&&this.hasAttribute("invalid");this._labelEl.hidden=!i,this._labelEl.querySelector(".label-text").textContent=i,this._labelEl.querySelector(".required").hidden=!n,this._descriptionEl.hidden=!e,this._descriptionEl.textContent=e,this.root.querySelector(".meta").hidden=!i&&!e,this._shellEl.setAttribute("data-focused",this._focused?"true":"false"),this._shellEl.setAttribute("data-invalid",v?"true":"false"),this._inputEl.disabled=a,this._inputEl.readOnly=l,this._inputEl.placeholder=this._tags.length===0?this.getAttribute("placeholder")||"Add tags":"",this._inputEl.value=this._draft;const y=a||o!=null&&this._tags.length>=o;this._inputEl.setAttribute("aria-disabled",y?"true":"false"),this._chipsEl.replaceChildren(...this._tags.map((_,x)=>{const h=document.createElement("span");h.className="chip",h.setAttribute("part","chip");const p=document.createElement("span");p.className="chip-label",p.textContent=_;const u=document.createElement("button");return u.type="button",u.className="chip-remove",u.setAttribute("data-index",String(x)),u.setAttribute("aria-label",`Remove ${_}`),u.textContent="×",u.disabled=a||l,h.append(p,u),h}));const g=t||s;this._errorEl.hidden=!g,this._errorEl.textContent=g,this._assistEl.hidden=!b,this._counterEl.textContent=o!=null?`${this._tags.length}/${o}`:String(this._tags.length)}_registerWithForm(){this._formUnregister&&(this._formUnregister(),this._formUnregister=null);try{const s=this.getRootNode().host?.closest?.("ui-form")||null||this.closest("ui-form"),n=this.getAttribute("name");s&&typeof s.registerField=="function"&&n&&(this._formUnregister=s.registerField(n,{name:n,getValue:()=>[...this._tags],setValue:a=>{Array.isArray(a)?this._applyTags(a.map(l=>String(l)),"form"):this._applyTags(d(String(a??"")),"form")},validate:async()=>this.hasAttribute("required")&&this._tags.length===0?{valid:!1,message:"At least one tag is required"}:{valid:!0},setError:a=>{a?this.setAttribute("data-error",a):this.removeAttribute("data-error"),this._syncUi()}}))}catch{}}_onInput(t){const i=t.target;this._draft=i?.value||"",this._emit("input",{draft:this._draft,value:[...this._tags]}),this._syncUi()}_onKeyDown(t){if(t.key==="Enter"||t.key===","){t.preventDefault(),this._commitDraft("keyboard");return}t.key==="Backspace"&&!this._draft&&this._removeTagAt(this._tags.length-1,"keyboard")}_onPaste(t){const i=t.clipboardData?.getData("text")||"";if(!/[,\n]/.test(i))return;t.preventDefault();const e=i.split(/[,\n]+/).map(c).filter(Boolean);e.length&&(this._draft="",this._inputEl&&(this._inputEl.value=""),this._applyTags([...this._tags,...e],"paste"))}_onFocusIn(){this._focused=!0,this._syncUi()}_onFocusOut(){this._focused=!1,this.hasAttribute("add-on-blur")&&this._draft?this._commitDraft("blur"):this._syncUi()}_onShellClick(t){t.target?.closest(".chip-remove")||this._inputEl?.focus()}_onChipClick(t){const e=t.target?.closest(".chip-remove");if(!e)return;const s=Number(e.getAttribute("data-index"));Number.isFinite(s)&&this._removeTagAt(s,"remove-button")}}typeof customElements<"u"&&!customElements.get("ui-tags-input")&&customElements.define("ui-tags-input",f);exports.UITagsInput=f;
202
+ `),this._rootEl=this.root.querySelector(".root"),this._shellEl=this.root.querySelector(".shell"),this._chipsEl=this.root.querySelector(".chips"),this._inputEl=this.root.querySelector(".input"),this._labelEl=this.root.querySelector(".label"),this._descriptionEl=this.root.querySelector(".description"),this._errorEl=this.root.querySelector(".error"),this._assistEl=this.root.querySelector(".assist"),this._counterEl=this.root.querySelector(".counter"),this._inputEl?.addEventListener("input",this._onInput),this._inputEl?.addEventListener("keydown",this._onKeyDown),this._inputEl?.addEventListener("focus",this._onFocusIn),this._inputEl?.addEventListener("blur",this._onFocusOut),this._inputEl?.addEventListener("paste",this._onPaste),this._shellEl?.addEventListener("click",this._onShellClick),this.root.addEventListener("click",this._onChipClick),this._tags=d(this.getAttribute("value")),this._syncUi()}_readOnly(){return this.hasAttribute("readonly")}_disabled(){return this.hasAttribute("disabled")&&this.getAttribute("disabled")!=="false"}_allowDuplicates(){return this.hasAttribute("allow-duplicates")}_maxTags(){const t=this.getAttribute("max-tags");if(!t)return null;const i=Number(t);return Number.isFinite(i)&&i>0?Math.floor(i):null}_emit(t,i){this.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0,composed:!0}))}_setValueAttr(t){const i=C(t);this._suppressValueAttr=!0;try{i?this.getAttribute("value")!==i&&this.setAttribute("value",i):this.removeAttribute("value")}finally{this._suppressValueAttr=!1}}_applyTags(t,i){const e=t.map(l=>c(l)).filter(Boolean),s=this._allowDuplicates()?e:e.filter((l,o)=>e.indexOf(l)===o),n=this._maxTags()!=null?s.slice(0,this._maxTags()):s;if(b(n,this._tags))return this._syncUi(),!1;const a=[...this._tags];return this._tags=[...n],this._setValueAttr(this._tags),this._syncUi(),this._emit("change",{value:[...this._tags],previousValue:a,source:i}),!0}_addTag(t,i){if(this._disabled()||this._readOnly())return!1;const e=c(t);if(!e)return!1;if(!this._allowDuplicates()&&this._tags.includes(e))return this._syncUi("Duplicate tag"),!1;const s=this._maxTags();if(s!=null&&this._tags.length>=s)return this._syncUi(`Maximum ${s} tags`),!1;const n=this._applyTags([...this._tags,e],i);return n&&this._emit("tag-add",{tag:e,value:[...this._tags],source:i}),n}_removeTagAt(t,i){if(this._disabled()||this._readOnly())return;const e=this._tags[t];if(!e)return;const s=this._tags.filter((a,l)=>l!==t);this._applyTags(s,i)&&this._emit("tag-remove",{tag:e,index:t,value:[...this._tags],source:i})}_commitDraft(t){const i=this._draft;this._draft="",this._inputEl&&(this._inputEl.value=""),this._addTag(i,t),this._syncUi()}_syncUi(t){if(!this._shellEl||!this._chipsEl||!this._inputEl||!this._labelEl||!this._descriptionEl||!this._errorEl||!this._assistEl||!this._counterEl)return;const i=(this.getAttribute("label")||"").trim(),e=(this.getAttribute("description")||"").trim(),s=(this.getAttribute("data-error")||"").trim(),n=this.hasAttribute("required"),a=this._disabled(),l=this._readOnly(),o=this._maxTags(),y=this.hasAttribute("counter")||o!=null,x=!!s||!!t||n&&this._tags.length===0&&this.hasAttribute("invalid");this._labelEl.hidden=!i,this._labelEl.querySelector(".label-text").textContent=i,this._labelEl.querySelector(".required").hidden=!n,this._descriptionEl.hidden=!e,this._descriptionEl.textContent=e,this.root.querySelector(".meta").hidden=!i&&!e,f.syncControlName(this._inputEl,this,i?`${this._uid}-label`:null),this._shellEl.setAttribute("data-focused",this._focused?"true":"false"),this._shellEl.setAttribute("data-invalid",x?"true":"false"),this._inputEl.disabled=a,this._inputEl.readOnly=l,this._inputEl.placeholder=this._tags.length===0?this.getAttribute("placeholder")||"Add tags":"",this._inputEl.value=this._draft;const E=a||o!=null&&this._tags.length>=o;this._inputEl.setAttribute("aria-disabled",E?"true":"false"),this._chipsEl.replaceChildren(...this._tags.map((m,A)=>{const h=document.createElement("span");h.className="chip",h.setAttribute("part","chip");const _=document.createElement("span");_.className="chip-label",_.textContent=m;const u=document.createElement("button");return u.type="button",u.className="chip-remove",u.setAttribute("data-index",String(A)),u.setAttribute("aria-label",`Remove ${m}`),u.textContent="×",u.disabled=a||l,h.append(_,u),h}));const p=t||s;this._errorEl.hidden=!p,this._errorEl.textContent=p;const g=[];e&&g.push(`${this._uid}-description`),p&&g.push(`${this._uid}-error`),f.syncControlDescription(this._inputEl,this,this._uid,g),this._assistEl.hidden=!y,this._counterEl.textContent=o!=null?`${this._tags.length}/${o}`:String(this._tags.length)}_registerWithForm(){this._formUnregister&&(this._formUnregister(),this._formUnregister=null);try{const s=this.getRootNode().host?.closest?.("ui-form")||null||this.closest("ui-form"),n=this.getAttribute("name");s&&typeof s.registerField=="function"&&n&&(this._formUnregister=s.registerField(n,{name:n,getValue:()=>[...this._tags],setValue:a=>{Array.isArray(a)?this._applyTags(a.map(l=>String(l)),"form"):this._applyTags(d(String(a??"")),"form")},validate:async()=>this.hasAttribute("required")&&this._tags.length===0?{valid:!1,message:"At least one tag is required"}:{valid:!0},setError:a=>{a?this.setAttribute("data-error",a):this.removeAttribute("data-error"),this._syncUi()}}))}catch{}}_onInput(t){const i=t.target;this._draft=i?.value||"",this._emit("input",{draft:this._draft,value:[...this._tags]}),this._syncUi()}_onKeyDown(t){if(t.key==="Enter"||t.key===","){t.preventDefault(),this._commitDraft("keyboard");return}t.key==="Backspace"&&!this._draft&&this._removeTagAt(this._tags.length-1,"keyboard")}_onPaste(t){const i=t.clipboardData?.getData("text")||"";if(!/[,\n]/.test(i))return;t.preventDefault();const e=i.split(/[,\n]+/).map(c).filter(Boolean);e.length&&(this._draft="",this._inputEl&&(this._inputEl.value=""),this._applyTags([...this._tags,...e],"paste"))}_onFocusIn(){this._focused=!0,this._syncUi()}_onFocusOut(){this._focused=!1,this.hasAttribute("add-on-blur")&&this._draft?this._commitDraft("blur"):this._syncUi()}_onShellClick(t){t.target?.closest(".chip-remove")||this._inputEl?.focus()}_onChipClick(t){const e=t.target?.closest(".chip-remove");if(!e)return;const s=Number(e.getAttribute("data-index"));Number.isFinite(s)&&this._removeTagAt(s,"remove-button")}}typeof customElements<"u"&&!customElements.get("ui-tags-input")&&customElements.define("ui-tags-input",v);exports.UITagsInput=v;
@@ -1,5 +1,6 @@
1
- import { E as x } from "./ElementBase-YlTLMsGk.mjs";
2
- const E = `
1
+ import { E } from "./ElementBase-YlTLMsGk.mjs";
2
+ import { s as A, a as S } from "./control-name-Bpj7F34X.mjs";
3
+ const k = `
3
4
  :host {
4
5
  --ui-tags-input-padding: 10px 12px;
5
6
  --ui-tags-input-border-color: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 78%, transparent);
@@ -7,7 +8,7 @@ const E = `
7
8
  --ui-tags-input-radius: var(--ui-radius, 12px);
8
9
  --ui-tags-input-bg: var(--ui-color-surface, #ffffff);
9
10
  --ui-tags-input-text: var(--ui-color-text, #0f172a);
10
- --ui-tags-input-muted: var(--ui-color-muted, #64748b);
11
+ --ui-tags-input-muted: var(--ui-color-muted, #526175);
11
12
  --ui-tags-input-focus: var(--ui-color-focus-ring, #2563eb);
12
13
  --ui-tags-input-danger: var(--ui-color-danger, #dc2626);
13
14
  --ui-tags-input-chip-bg: color-mix(in srgb, var(--ui-color-primary, #2563eb) 10%, transparent);
@@ -183,7 +184,7 @@ const E = `
183
184
  pointer-events: none;
184
185
  }
185
186
  `;
186
- function m(r, t) {
187
+ function f(r, t) {
187
188
  return r.length === t.length && r.every((i, e) => i === t[e]);
188
189
  }
189
190
  function d(r) {
@@ -199,21 +200,25 @@ function d(r) {
199
200
  }
200
201
  return t.split(",").map((i) => i.trim()).filter(Boolean);
201
202
  }
202
- function A(r) {
203
+ function C(r) {
203
204
  return r.length ? r.some((t) => t.includes(",") || t.includes(`
204
205
  `)) ? JSON.stringify(r) : r.join(", ") : "";
205
206
  }
206
207
  function c(r) {
207
208
  return r.replace(/\s+/g, " ").trim();
208
209
  }
209
- class S extends x {
210
+ let T = 0;
211
+ class U extends E {
210
212
  constructor() {
211
- super(), this._tags = [], this._draft = "", this._suppressValueAttr = !1, this._formUnregister = null, this._rootEl = null, this._shellEl = null, this._chipsEl = null, this._inputEl = null, this._labelEl = null, this._descriptionEl = null, this._errorEl = null, this._assistEl = null, this._counterEl = null, this._focused = !1, this._onInput = this._onInput.bind(this), this._onKeyDown = this._onKeyDown.bind(this), this._onFocusIn = this._onFocusIn.bind(this), this._onFocusOut = this._onFocusOut.bind(this), this._onPaste = this._onPaste.bind(this), this._onShellClick = this._onShellClick.bind(this), this._onChipClick = this._onChipClick.bind(this);
213
+ super(), this._tags = [], this._draft = "", this._suppressValueAttr = !1, this._formUnregister = null, this._rootEl = null, this._shellEl = null, this._chipsEl = null, this._inputEl = null, this._uid = `ui-tags-input-${++T}`, this._labelEl = null, this._descriptionEl = null, this._errorEl = null, this._assistEl = null, this._counterEl = null, this._focused = !1, this._onInput = this._onInput.bind(this), this._onKeyDown = this._onKeyDown.bind(this), this._onFocusIn = this._onFocusIn.bind(this), this._onFocusOut = this._onFocusOut.bind(this), this._onPaste = this._onPaste.bind(this), this._onShellClick = this._onShellClick.bind(this), this._onChipClick = this._onChipClick.bind(this);
212
214
  }
213
215
  static get observedAttributes() {
214
216
  return [
215
217
  "value",
216
218
  "label",
219
+ "aria-label",
220
+ "aria-description",
221
+ "aria-describedby",
217
222
  "description",
218
223
  "placeholder",
219
224
  "data-error",
@@ -260,7 +265,7 @@ class S extends x {
260
265
  if (i !== e) {
261
266
  if (t === "name" && this.isConnected && this._registerWithForm(), t === "value" && !this._suppressValueAttr) {
262
267
  const s = d(e);
263
- m(s, this._tags) || (this._tags = s);
268
+ f(s, this._tags) || (this._tags = s);
264
269
  }
265
270
  this._rootEl && this._syncUi();
266
271
  }
@@ -270,17 +275,17 @@ class S extends x {
270
275
  }
271
276
  render() {
272
277
  this.setContent(`
273
- <style>${E}</style>
278
+ <style>${k}</style>
274
279
  <div class="root">
275
280
  <div class="meta" hidden>
276
- <div class="label" hidden><span class="label-text"></span><span class="required" hidden>*</span></div>
277
- <div class="description" hidden></div>
281
+ <div class="label" hidden><span class="label-text" id="${this._uid}-label"></span><span class="required" hidden>*</span></div>
282
+ <div class="description" id="${this._uid}-description" hidden></div>
278
283
  </div>
279
284
  <div class="shell" part="shell" data-focused="false" data-invalid="false">
280
285
  <div class="chips" part="chips"></div>
281
286
  <input class="input" part="input" type="text" />
282
287
  </div>
283
- <div class="error" part="error" hidden></div>
288
+ <div class="error" id="${this._uid}-error" part="error" hidden></div>
284
289
  <div class="assist" hidden>
285
290
  <div class="hint">Press Enter or comma to create a tag.</div>
286
291
  <div class="counter"></div>
@@ -307,7 +312,7 @@ class S extends x {
307
312
  this.dispatchEvent(new CustomEvent(t, { detail: i, bubbles: !0, composed: !0 }));
308
313
  }
309
314
  _setValueAttr(t) {
310
- const i = A(t);
315
+ const i = C(t);
311
316
  this._suppressValueAttr = !0;
312
317
  try {
313
318
  i ? this.getAttribute("value") !== i && this.setAttribute("value", i) : this.removeAttribute("value");
@@ -317,7 +322,7 @@ class S extends x {
317
322
  }
318
323
  _applyTags(t, i) {
319
324
  const e = t.map((l) => c(l)).filter(Boolean), s = this._allowDuplicates() ? e : e.filter((l, o) => e.indexOf(l) === o), n = this._maxTags() != null ? s.slice(0, this._maxTags()) : s;
320
- if (m(n, this._tags))
325
+ if (f(n, this._tags))
321
326
  return this._syncUi(), !1;
322
327
  const a = [...this._tags];
323
328
  return this._tags = [...n], this._setValueAttr(this._tags), this._syncUi(), this._emit("change", { value: [...this._tags], previousValue: a, source: i }), !0;
@@ -347,19 +352,21 @@ class S extends x {
347
352
  }
348
353
  _syncUi(t) {
349
354
  if (!this._shellEl || !this._chipsEl || !this._inputEl || !this._labelEl || !this._descriptionEl || !this._errorEl || !this._assistEl || !this._counterEl) return;
350
- const i = (this.getAttribute("label") || "").trim(), e = (this.getAttribute("description") || "").trim(), s = (this.getAttribute("data-error") || "").trim(), n = this.hasAttribute("required"), a = this._disabled(), l = this._readOnly(), o = this._maxTags(), f = this.hasAttribute("counter") || o != null, b = !!s || !!t || n && this._tags.length === 0 && this.hasAttribute("invalid");
351
- this._labelEl.hidden = !i, this._labelEl.querySelector(".label-text").textContent = i, this._labelEl.querySelector(".required").hidden = !n, this._descriptionEl.hidden = !e, this._descriptionEl.textContent = e, this.root.querySelector(".meta").hidden = !i && !e, this._shellEl.setAttribute("data-focused", this._focused ? "true" : "false"), this._shellEl.setAttribute("data-invalid", b ? "true" : "false"), this._inputEl.disabled = a, this._inputEl.readOnly = l, this._inputEl.placeholder = this._tags.length === 0 ? this.getAttribute("placeholder") || "Add tags" : "", this._inputEl.value = this._draft;
352
- const v = a || o != null && this._tags.length >= o;
353
- this._inputEl.setAttribute("aria-disabled", v ? "true" : "false"), this._chipsEl.replaceChildren(...this._tags.map((_, y) => {
355
+ const i = (this.getAttribute("label") || "").trim(), e = (this.getAttribute("description") || "").trim(), s = (this.getAttribute("data-error") || "").trim(), n = this.hasAttribute("required"), a = this._disabled(), l = this._readOnly(), o = this._maxTags(), b = this.hasAttribute("counter") || o != null, v = !!s || !!t || n && this._tags.length === 0 && this.hasAttribute("invalid");
356
+ this._labelEl.hidden = !i, this._labelEl.querySelector(".label-text").textContent = i, this._labelEl.querySelector(".required").hidden = !n, this._descriptionEl.hidden = !e, this._descriptionEl.textContent = e, this.root.querySelector(".meta").hidden = !i && !e, A(this._inputEl, this, i ? `${this._uid}-label` : null), this._shellEl.setAttribute("data-focused", this._focused ? "true" : "false"), this._shellEl.setAttribute("data-invalid", v ? "true" : "false"), this._inputEl.disabled = a, this._inputEl.readOnly = l, this._inputEl.placeholder = this._tags.length === 0 ? this.getAttribute("placeholder") || "Add tags" : "", this._inputEl.value = this._draft;
357
+ const y = a || o != null && this._tags.length >= o;
358
+ this._inputEl.setAttribute("aria-disabled", y ? "true" : "false"), this._chipsEl.replaceChildren(...this._tags.map((m, x) => {
354
359
  const h = document.createElement("span");
355
360
  h.className = "chip", h.setAttribute("part", "chip");
356
- const p = document.createElement("span");
357
- p.className = "chip-label", p.textContent = _;
361
+ const _ = document.createElement("span");
362
+ _.className = "chip-label", _.textContent = m;
358
363
  const u = document.createElement("button");
359
- return u.type = "button", u.className = "chip-remove", u.setAttribute("data-index", String(y)), u.setAttribute("aria-label", `Remove ${_}`), u.textContent = "×", u.disabled = a || l, h.append(p, u), h;
364
+ return u.type = "button", u.className = "chip-remove", u.setAttribute("data-index", String(x)), u.setAttribute("aria-label", `Remove ${m}`), u.textContent = "×", u.disabled = a || l, h.append(_, u), h;
360
365
  }));
361
- const g = t || s;
362
- this._errorEl.hidden = !g, this._errorEl.textContent = g, this._assistEl.hidden = !f, this._counterEl.textContent = o != null ? `${this._tags.length}/${o}` : String(this._tags.length);
366
+ const p = t || s;
367
+ this._errorEl.hidden = !p, this._errorEl.textContent = p;
368
+ const g = [];
369
+ e && g.push(`${this._uid}-description`), p && g.push(`${this._uid}-error`), S(this._inputEl, this, this._uid, g), this._assistEl.hidden = !b, this._counterEl.textContent = o != null ? `${this._tags.length}/${o}` : String(this._tags.length);
363
370
  }
364
371
  _registerWithForm() {
365
372
  this._formUnregister && (this._formUnregister(), this._formUnregister = null);
@@ -413,7 +420,7 @@ class S extends x {
413
420
  Number.isFinite(s) && this._removeTagAt(s, "remove-button");
414
421
  }
415
422
  }
416
- typeof customElements < "u" && !customElements.get("ui-tags-input") && customElements.define("ui-tags-input", S);
423
+ typeof customElements < "u" && !customElements.get("ui-tags-input") && customElements.define("ui-tags-input", U);
417
424
  export {
418
- S as UITagsInput
425
+ U as UITagsInput
419
426
  };
@@ -1,17 +1,17 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("./ElementBase-EV6mVBUV.js"),_=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const A=require("./ElementBase-EV6mVBUV.js"),g=require("./control-name-BmoI1m3a.js"),z=`
2
2
  <svg viewBox="0 0 20 20" aria-hidden="true" focusable="false">
3
3
  <path d="m6 6 8 8M14 6l-8 8" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
4
4
  </svg>
5
- `,y=`
5
+ `,w=`
6
6
  :host {
7
7
  --ui-textarea-bg: var(--ui-color-surface, #ffffff);
8
8
  --ui-textarea-text: var(--ui-color-text, #0f172a);
9
- --ui-textarea-muted: var(--ui-color-muted, #64748b);
9
+ --ui-textarea-muted: var(--ui-color-muted, #526175);
10
10
  --ui-textarea-border: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 74%, transparent);
11
11
  --ui-textarea-focus: var(--ui-color-focus-ring, #2563eb);
12
12
  --ui-textarea-accent: var(--ui-color-primary, #2563eb);
13
13
  --ui-textarea-danger: var(--ui-color-danger, #dc2626);
14
- --ui-textarea-success: var(--ui-color-success, #16a34a);
14
+ --ui-textarea-success: var(--ui-color-success, #15803d);
15
15
  --ui-textarea-radius: 12px;
16
16
  --ui-textarea-padding-x: 12px;
17
17
  --ui-textarea-padding-y: 10px;
@@ -229,11 +229,11 @@
229
229
  }
230
230
 
231
231
  :host([tone="success"]) {
232
- --ui-textarea-accent: var(--ui-color-success, #16a34a);
232
+ --ui-textarea-accent: var(--ui-color-success, #15803d);
233
233
  }
234
234
 
235
235
  :host([tone="warning"]) {
236
- --ui-textarea-accent: var(--ui-color-warning, #d97706);
236
+ --ui-textarea-accent: var(--ui-color-warning, #b45309);
237
237
  }
238
238
 
239
239
  :host([tone="danger"]) {
@@ -308,22 +308,22 @@
308
308
  color: CanvasText;
309
309
  }
310
310
  }
311
- `;function d(l){return l.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function x(l,t){const e=Number(l);return Number.isFinite(e)?e:t}class p extends v.ElementBase{constructor(){super(),this._uid=`ui-textarea-${Math.random().toString(36).slice(2,9)}`,this._textarea=null,this._clearBtn=null,this._countEl=null,this._debounceTimer=null,this._formUnregister=null,this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onClear=this._onClear.bind(this)}static get observedAttributes(){return["value","placeholder","disabled","clearable","size","validation","debounce","maxlength","minlength","rows","readonly","autofocus","resize","name","required","variant","color","radius","label","description","autosize","max-rows","show-count","density","tone","headless","data-error"]}connectedCallback(){super.connectedCallback(),this._tryRegisterWithForm()}disconnectedCallback(){this._detachListeners(),this._debounceTimer&&(clearTimeout(this._debounceTimer),this._debounceTimer=null),this._formUnregister&&(this._formUnregister(),this._formUnregister=null),super.disconnectedCallback()}attributeChangedCallback(t,e,i){if(e===i)return;if(t==="name"&&this._tryRegisterWithForm(),t==="value"&&this._textarea){const a=i||"";this._textarea.value!==a&&(this._textarea.value=a),this._syncDynamicUi(),this._applyAutosize();return}if(new Set(["placeholder","disabled","maxlength","minlength","rows","readonly","required","resize","name","validation","show-count","clearable","autosize","max-rows","variant","size","density","tone","headless","color","radius","autofocus"]).has(t)){this._syncControlAttrs(),this._syncDynamicUi(),this._applyAutosize(),t==="autofocus"&&this.hasAttribute("autofocus")&&queueMicrotask(()=>{this._textarea?.focus()});return}this.isConnected&&this.requestRender()}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t||"")}_tryRegisterWithForm(){try{const t=this.closest?.("ui-form"),e=this.getAttribute("name");if(!t||typeof t.registerField!="function"||!e)return;this._formUnregister=t.registerField(e,{name:e,getValue:()=>this.value,setValue:i=>{this.value=i},validate:async()=>this._textarea?{valid:this._textarea.checkValidity(),message:this._textarea.validationMessage||void 0}:{valid:!0},setError:i=>{i?(this.setAttribute("validation","error"),this.setAttribute("data-error",i)):(this.removeAttribute("validation"),this.removeAttribute("data-error"))}})}catch{}}_detachListeners(){this._textarea&&(this._textarea.removeEventListener("input",this._onInput),this._textarea.removeEventListener("change",this._onChange)),this._clearBtn&&this._clearBtn.removeEventListener("click",this._onClear),this._clearBtn=null}_syncControlAttrs(){if(!this._textarea)return;const t=this.getAttribute("placeholder")||"",e=this.getAttribute("maxlength"),i=this.getAttribute("minlength"),r=x(this.getAttribute("rows"),4),a=this.hasAttribute("disabled"),u=this.hasAttribute("readonly"),s=this.hasAttribute("required"),c=this.getAttribute("name")||"",h=this.getAttribute("resize")||"vertical",g=this.getAttribute("validation"),b=this.getAttribute("color"),o=this.getAttribute("radius");this._textarea.placeholder=t,this._textarea.disabled=a,this._textarea.readOnly=u,this._textarea.required=s,this._textarea.rows=Math.max(1,r),this._textarea.name=c,this._textarea.style.resize=h,e&&Number.isFinite(Number(e))?this._textarea.maxLength=Number(e):this._textarea.removeAttribute("maxlength"),i&&Number.isFinite(Number(i))?this._textarea.minLength=Number(i):this._textarea.removeAttribute("minlength"),g==="error"?this._textarea.setAttribute("aria-invalid","true"):this._textarea.removeAttribute("aria-invalid"),b?this.style.setProperty("--ui-textarea-accent",b):this.style.removeProperty("--ui-textarea-accent"),o&&o!=="none"&&o!=="large"&&o!=="full"?this.style.setProperty("--ui-textarea-radius",o):this.style.removeProperty("--ui-textarea-radius");const n=[],m=!!(this.getAttribute("description")||this.querySelector('[slot="description"]')),f=!!(this.getAttribute("data-error")||this.querySelector('[slot="error"]'));m&&n.push(`${this._uid}-description`),f&&n.push(`${this._uid}-error`),(this.hasAttribute("show-count")||this.hasAttribute("maxlength"))&&n.push(`${this._uid}-count`),!!(this.getAttribute("label")||this.querySelector('[slot="label"]'))?this._textarea.setAttribute("aria-labelledby",`${this._uid}-label`):this._textarea.removeAttribute("aria-labelledby"),n.length?this._textarea.setAttribute("aria-describedby",n.join(" ")):this._textarea.removeAttribute("aria-describedby")}_syncDynamicUi(){const t=this._textarea?.value||this.getAttribute("value")||"",e=this.getAttribute("maxlength"),i=this.hasAttribute("clearable");this._clearBtn&&(i&&t&&!this.hasAttribute("disabled")&&!this.hasAttribute("readonly")?this._clearBtn.removeAttribute("hidden"):this._clearBtn.setAttribute("hidden","")),this._countEl&&(this.hasAttribute("show-count")||!!e?(this._countEl.removeAttribute("hidden"),e&&Number.isFinite(Number(e))?this._countEl.textContent=`${t.length} / ${Number(e)}`:this._countEl.textContent=`${t.length}`):this._countEl.setAttribute("hidden",""))}_applyAutosize(){if(!this._textarea)return;if(!this.hasAttribute("autosize")){this._textarea.style.height="",this._textarea.style.overflowY="";return}this._textarea.style.height="auto";const t=this._textarea.scrollHeight,e=x(this.getAttribute("max-rows"),0);if(e>0){const i=getComputedStyle(this._textarea),r=parseFloat(i.lineHeight||"20")||20,a=parseFloat(i.borderTopWidth||"0")||0,u=parseFloat(i.borderBottomWidth||"0")||0,s=parseFloat(i.paddingTop||"0")||0,c=parseFloat(i.paddingBottom||"0")||0,h=r*e+a+u+s+c;this._textarea.style.height=`${Math.min(t,h)}px`,this._textarea.style.overflowY=t>h?"auto":"hidden";return}this._textarea.style.height=`${t}px`,this._textarea.style.overflowY="hidden"}_emit(t,e){this.dispatchEvent(new CustomEvent(t,{detail:{value:e,length:e.length,name:this.getAttribute("name")||""},bubbles:!0,composed:!0}))}_onInput(t){const e=t.target.value;this.getAttribute("value")!==e&&this.setAttribute("value",e),this._syncDynamicUi(),this._applyAutosize(),this._emit("input",e);const i=x(this.getAttribute("debounce"),0);i>0?(this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>{this._emit("debounced-input",e),this._debounceTimer=null},i)):this._emit("debounced-input",e)}_onChange(t){const e=t.target.value;this._emit("change",e)}_onClear(t){t.preventDefault(),!(this.hasAttribute("disabled")||this.hasAttribute("readonly"))&&(this.value="",this._textarea&&(this._textarea.value="",this._textarea.focus()),this._syncDynamicUi(),this._applyAutosize(),this._emit("input",""),this._emit("change",""),this.dispatchEvent(new CustomEvent("clear",{bubbles:!0,composed:!0})))}render(){const t=this.getAttribute("value")||"",e=this.getAttribute("label")||"",i=this.getAttribute("description")||"",r=this.getAttribute("data-error")||"",a=!!(e||i||this.querySelector('[slot="label"]')||this.querySelector('[slot="description"]')),s=this.hasAttribute("clearable")&&!!t&&!this.hasAttribute("disabled")&&!this.hasAttribute("readonly");this.setContent(`
312
- <style>${y}</style>
311
+ `;function x(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function b(r,t){const e=Number(r);return Number.isFinite(e)?e:t}const C=2147483647;function h(r){if(!r)return null;const t=Number(r);return!Number.isFinite(t)||t<0||t>C?null:Math.trunc(t)}class m extends A.ElementBase{constructor(){super(),this._uid=`ui-textarea-${Math.random().toString(36).slice(2,9)}`,this._textarea=null,this._clearBtn=null,this._countEl=null,this._debounceTimer=null,this._formUnregister=null,this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onClear=this._onClear.bind(this)}static get observedAttributes(){return["value","placeholder","disabled","clearable","size","validation","debounce","maxlength","minlength","rows","readonly","autofocus","resize","name","required","variant","color","radius","label","aria-label","aria-description","aria-describedby","description","autosize","max-rows","show-count","density","tone","headless","data-error"]}connectedCallback(){super.connectedCallback(),this._tryRegisterWithForm()}disconnectedCallback(){this._detachListeners(),this._debounceTimer&&(clearTimeout(this._debounceTimer),this._debounceTimer=null),this._formUnregister&&(this._formUnregister(),this._formUnregister=null),super.disconnectedCallback()}attributeChangedCallback(t,e,i){if(e===i)return;if(t==="name"&&this._tryRegisterWithForm(),t==="value"&&this._textarea){const a=i||"";this._textarea.value!==a&&(this._textarea.value=a),this._syncDynamicUi(),this._applyAutosize();return}if(new Set(["placeholder","disabled","maxlength","minlength","rows","readonly","required","resize","name","validation","show-count","clearable","autosize","max-rows","variant","size","density","tone","headless","color","radius","autofocus","aria-label","aria-description","aria-describedby"]).has(t)){this._syncControlAttrs(),this._syncDynamicUi(),this._applyAutosize(),t==="autofocus"&&this.hasAttribute("autofocus")&&queueMicrotask(()=>{this._textarea?.focus()});return}this.isConnected&&this.requestRender()}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t||"")}_tryRegisterWithForm(){try{const t=this.closest?.("ui-form"),e=this.getAttribute("name");if(!t||typeof t.registerField!="function"||!e)return;this._formUnregister=t.registerField(e,{name:e,getValue:()=>this.value,setValue:i=>{this.value=i},validate:async()=>this._textarea?{valid:this._textarea.checkValidity(),message:this._textarea.validationMessage||void 0}:{valid:!0},setError:i=>{i?(this.setAttribute("validation","error"),this.setAttribute("data-error",i)):(this.removeAttribute("validation"),this.removeAttribute("data-error"))}})}catch{}}_detachListeners(){this._textarea&&(this._textarea.removeEventListener("input",this._onInput),this._textarea.removeEventListener("change",this._onChange)),this._clearBtn&&this._clearBtn.removeEventListener("click",this._onClear),this._clearBtn=null}_syncControlAttrs(){if(!this._textarea)return;const t=this.getAttribute("placeholder")||"",e=h(this.getAttribute("maxlength")),i=h(this.getAttribute("minlength")),s=b(this.getAttribute("rows"),4),a=this.hasAttribute("disabled"),l=this.hasAttribute("readonly"),o=this.hasAttribute("required"),d=this.getAttribute("name")||"",u=this.getAttribute("resize")||"vertical",f=this.getAttribute("validation"),p=this.getAttribute("color"),n=this.getAttribute("radius");this._textarea.placeholder=t,this._textarea.disabled=a,this._textarea.readOnly=l,this._textarea.required=o,this._textarea.rows=Math.max(1,s),this._textarea.name=d,this._textarea.style.resize=u,e!==null?this._textarea.maxLength=e:this._textarea.removeAttribute("maxlength"),i!==null?this._textarea.minLength=i:this._textarea.removeAttribute("minlength"),f==="error"?this._textarea.setAttribute("aria-invalid","true"):this._textarea.removeAttribute("aria-invalid"),p?this.style.setProperty("--ui-textarea-accent",p):this.style.removeProperty("--ui-textarea-accent"),n&&n!=="none"&&n!=="large"&&n!=="full"?this.style.setProperty("--ui-textarea-radius",n):this.style.removeProperty("--ui-textarea-radius");const c=[],v=!!(this.getAttribute("description")||this.querySelector('[slot="description"]')),_=!!(this.getAttribute("data-error")||this.querySelector('[slot="error"]'));v&&c.push(`${this._uid}-description`),_&&c.push(`${this._uid}-error`),(this.hasAttribute("show-count")||h(this.getAttribute("maxlength"))!==null)&&c.push(`${this._uid}-count`);const y=!!(this.getAttribute("label")||this.querySelector('[slot="label"]'));g.syncControlName(this._textarea,this,y?`${this._uid}-label`:null),g.syncControlDescription(this._textarea,this,this._uid,c)}_syncDynamicUi(){const t=this._textarea?.value||this.getAttribute("value")||"",e=h(this.getAttribute("maxlength")),i=this.hasAttribute("clearable");this._clearBtn&&(i&&t&&!this.hasAttribute("disabled")&&!this.hasAttribute("readonly")?this._clearBtn.removeAttribute("hidden"):this._clearBtn.setAttribute("hidden","")),this._countEl&&(this.hasAttribute("show-count")||e!==null?(this._countEl.removeAttribute("hidden"),e!==null?this._countEl.textContent=`${t.length} / ${e}`:this._countEl.textContent=`${t.length}`):this._countEl.setAttribute("hidden",""))}_applyAutosize(){if(!this._textarea)return;if(!this.hasAttribute("autosize")){this._textarea.style.height="",this._textarea.style.overflowY="";return}this._textarea.style.height="auto";const t=this._textarea.scrollHeight,e=b(this.getAttribute("max-rows"),0);if(e>0){const i=getComputedStyle(this._textarea),s=parseFloat(i.lineHeight||"20")||20,a=parseFloat(i.borderTopWidth||"0")||0,l=parseFloat(i.borderBottomWidth||"0")||0,o=parseFloat(i.paddingTop||"0")||0,d=parseFloat(i.paddingBottom||"0")||0,u=s*e+a+l+o+d;this._textarea.style.height=`${Math.min(t,u)}px`,this._textarea.style.overflowY=t>u?"auto":"hidden";return}this._textarea.style.height=`${t}px`,this._textarea.style.overflowY="hidden"}_emit(t,e){this.dispatchEvent(new CustomEvent(t,{detail:{value:e,length:e.length,name:this.getAttribute("name")||""},bubbles:!0,composed:!0}))}_onInput(t){const e=t.target.value;this.getAttribute("value")!==e&&this.setAttribute("value",e),this._syncDynamicUi(),this._applyAutosize(),this._emit("input",e);const i=b(this.getAttribute("debounce"),0);i>0?(this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>{this._emit("debounced-input",e),this._debounceTimer=null},i)):this._emit("debounced-input",e)}_onChange(t){const e=t.target.value;this._emit("change",e)}_onClear(t){t.preventDefault(),!(this.hasAttribute("disabled")||this.hasAttribute("readonly"))&&(this.value="",this._textarea&&(this._textarea.value="",this._textarea.focus()),this._syncDynamicUi(),this._applyAutosize(),this._emit("input",""),this._emit("change",""),this.dispatchEvent(new CustomEvent("clear",{bubbles:!0,composed:!0})))}render(){const t=this.getAttribute("value")||"",e=this.getAttribute("label")||"",i=this.getAttribute("description")||"",s=this.getAttribute("data-error")||"",a=!!(e||i||this.querySelector('[slot="label"]')||this.querySelector('[slot="description"]')),o=this.hasAttribute("clearable")&&!!t&&!this.hasAttribute("disabled")&&!this.hasAttribute("readonly");this.setContent(`
312
+ <style>${w}</style>
313
313
  <div class="shell" part="shell">
314
314
  <div class="meta" part="meta" ${a?"":"hidden"}>
315
- <label id="${this._uid}-label" class="label" part="label"><slot name="label">${d(e)}</slot></label>
316
- <div id="${this._uid}-description" class="description" part="description"><slot name="description">${d(i)}</slot></div>
315
+ <label id="${this._uid}-label" class="label" part="label"><slot name="label">${x(e)}</slot></label>
316
+ <div id="${this._uid}-description" class="description" part="description"><slot name="description">${x(i)}</slot></div>
317
317
  </div>
318
318
 
319
319
  <div class="field" part="field">
320
320
  <textarea part="textarea"></textarea>
321
- <button type="button" part="clear" class="clear-btn" aria-label="Clear text" ${s?"":"hidden"}>${_}</button>
321
+ <button type="button" part="clear" class="clear-btn" aria-label="Clear text" ${o?"":"hidden"}>${z}</button>
322
322
  </div>
323
323
 
324
324
  <div class="footer" part="footer">
325
- <div id="${this._uid}-error" class="error" part="error"><slot name="error">${d(r)}</slot></div>
325
+ <div id="${this._uid}-error" class="error" part="error"><slot name="error">${x(s)}</slot></div>
326
326
  <div id="${this._uid}-count" class="count" part="count" hidden></div>
327
327
  </div>
328
328
  </div>
329
- `),this._detachListeners(),this._textarea=this.root.querySelector("textarea"),this._clearBtn=this.root.querySelector(".clear-btn"),this._countEl=this.root.querySelector(".count"),this._textarea&&(this._textarea.value=t,this._syncControlAttrs(),this._syncDynamicUi(),this._applyAutosize(),this._textarea.addEventListener("input",this._onInput),this._textarea.addEventListener("change",this._onChange),this._clearBtn?.addEventListener("click",this._onClear),this.hasAttribute("autofocus")&&queueMicrotask(()=>{this._textarea?.focus()}))}shouldRenderOnAttributeChange(t,e,i){return t==="label"||t==="description"||t==="data-error"}}typeof customElements<"u"&&!customElements.get("ui-textarea")&&customElements.define("ui-textarea",p);exports.UITextarea=p;
329
+ `),this._detachListeners(),this._textarea=this.root.querySelector("textarea"),this._clearBtn=this.root.querySelector(".clear-btn"),this._countEl=this.root.querySelector(".count"),this._textarea&&(this._textarea.value=t,this._syncControlAttrs(),this._syncDynamicUi(),this._applyAutosize(),this._textarea.addEventListener("input",this._onInput),this._textarea.addEventListener("change",this._onChange),this._clearBtn?.addEventListener("click",this._onClear),this.hasAttribute("autofocus")&&queueMicrotask(()=>{this._textarea?.focus()}))}shouldRenderOnAttributeChange(t,e,i){return t==="label"||t==="description"||t==="data-error"}}typeof customElements<"u"&&!customElements.get("ui-textarea")&&customElements.define("ui-textarea",m);exports.UITextarea=m;
@@ -1,18 +1,19 @@
1
- import { E as f } from "./ElementBase-YlTLMsGk.mjs";
2
- const v = `
1
+ import { E as _ } from "./ElementBase-YlTLMsGk.mjs";
2
+ import { s as y, a as A } from "./control-name-Bpj7F34X.mjs";
3
+ const z = `
3
4
  <svg viewBox="0 0 20 20" aria-hidden="true" focusable="false">
4
5
  <path d="m6 6 8 8M14 6l-8 8" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
5
6
  </svg>
6
- `, _ = `
7
+ `, w = `
7
8
  :host {
8
9
  --ui-textarea-bg: var(--ui-color-surface, #ffffff);
9
10
  --ui-textarea-text: var(--ui-color-text, #0f172a);
10
- --ui-textarea-muted: var(--ui-color-muted, #64748b);
11
+ --ui-textarea-muted: var(--ui-color-muted, #526175);
11
12
  --ui-textarea-border: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 74%, transparent);
12
13
  --ui-textarea-focus: var(--ui-color-focus-ring, #2563eb);
13
14
  --ui-textarea-accent: var(--ui-color-primary, #2563eb);
14
15
  --ui-textarea-danger: var(--ui-color-danger, #dc2626);
15
- --ui-textarea-success: var(--ui-color-success, #16a34a);
16
+ --ui-textarea-success: var(--ui-color-success, #15803d);
16
17
  --ui-textarea-radius: 12px;
17
18
  --ui-textarea-padding-x: 12px;
18
19
  --ui-textarea-padding-y: 10px;
@@ -230,11 +231,11 @@ const v = `
230
231
  }
231
232
 
232
233
  :host([tone="success"]) {
233
- --ui-textarea-accent: var(--ui-color-success, #16a34a);
234
+ --ui-textarea-accent: var(--ui-color-success, #15803d);
234
235
  }
235
236
 
236
237
  :host([tone="warning"]) {
237
- --ui-textarea-accent: var(--ui-color-warning, #d97706);
238
+ --ui-textarea-accent: var(--ui-color-warning, #b45309);
238
239
  }
239
240
 
240
241
  :host([tone="danger"]) {
@@ -310,14 +311,20 @@ const v = `
310
311
  }
311
312
  }
312
313
  `;
313
- function d(l) {
314
- return l.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
314
+ function x(r) {
315
+ return r.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
315
316
  }
316
- function x(l, t) {
317
- const e = Number(l);
317
+ function b(r, t) {
318
+ const e = Number(r);
318
319
  return Number.isFinite(e) ? e : t;
319
320
  }
320
- class y extends f {
321
+ const C = 2147483647;
322
+ function c(r) {
323
+ if (!r) return null;
324
+ const t = Number(r);
325
+ return !Number.isFinite(t) || t < 0 || t > C ? null : Math.trunc(t);
326
+ }
327
+ class k extends _ {
321
328
  constructor() {
322
329
  super(), this._uid = `ui-textarea-${Math.random().toString(36).slice(2, 9)}`, this._textarea = null, this._clearBtn = null, this._countEl = null, this._debounceTimer = null, this._formUnregister = null, this._onInput = this._onInput.bind(this), this._onChange = this._onChange.bind(this), this._onClear = this._onClear.bind(this);
323
330
  }
@@ -342,6 +349,9 @@ class y extends f {
342
349
  "color",
343
350
  "radius",
344
351
  "label",
352
+ "aria-label",
353
+ "aria-description",
354
+ "aria-describedby",
345
355
  "description",
346
356
  "autosize",
347
357
  "max-rows",
@@ -387,7 +397,10 @@ class y extends f {
387
397
  "headless",
388
398
  "color",
389
399
  "radius",
390
- "autofocus"
400
+ "autofocus",
401
+ "aria-label",
402
+ "aria-description",
403
+ "aria-describedby"
391
404
  ])).has(t)) {
392
405
  this._syncControlAttrs(), this._syncDynamicUi(), this._applyAutosize(), t === "autofocus" && this.hasAttribute("autofocus") && queueMicrotask(() => {
393
406
  this._textarea?.focus();
@@ -425,14 +438,16 @@ class y extends f {
425
438
  }
426
439
  _syncControlAttrs() {
427
440
  if (!this._textarea) return;
428
- const t = this.getAttribute("placeholder") || "", e = this.getAttribute("maxlength"), i = this.getAttribute("minlength"), r = x(this.getAttribute("rows"), 4), a = this.hasAttribute("disabled"), u = this.hasAttribute("readonly"), s = this.hasAttribute("required"), c = this.getAttribute("name") || "", h = this.getAttribute("resize") || "vertical", p = this.getAttribute("validation"), b = this.getAttribute("color"), o = this.getAttribute("radius");
429
- this._textarea.placeholder = t, this._textarea.disabled = a, this._textarea.readOnly = u, this._textarea.required = s, this._textarea.rows = Math.max(1, r), this._textarea.name = c, this._textarea.style.resize = h, e && Number.isFinite(Number(e)) ? this._textarea.maxLength = Number(e) : this._textarea.removeAttribute("maxlength"), i && Number.isFinite(Number(i)) ? this._textarea.minLength = Number(i) : this._textarea.removeAttribute("minlength"), p === "error" ? this._textarea.setAttribute("aria-invalid", "true") : this._textarea.removeAttribute("aria-invalid"), b ? this.style.setProperty("--ui-textarea-accent", b) : this.style.removeProperty("--ui-textarea-accent"), o && o !== "none" && o !== "large" && o !== "full" ? this.style.setProperty("--ui-textarea-radius", o) : this.style.removeProperty("--ui-textarea-radius");
430
- const n = [], g = !!(this.getAttribute("description") || this.querySelector('[slot="description"]')), m = !!(this.getAttribute("data-error") || this.querySelector('[slot="error"]'));
431
- g && n.push(`${this._uid}-description`), m && n.push(`${this._uid}-error`), (this.hasAttribute("show-count") || this.hasAttribute("maxlength")) && n.push(`${this._uid}-count`), !!(this.getAttribute("label") || this.querySelector('[slot="label"]')) ? this._textarea.setAttribute("aria-labelledby", `${this._uid}-label`) : this._textarea.removeAttribute("aria-labelledby"), n.length ? this._textarea.setAttribute("aria-describedby", n.join(" ")) : this._textarea.removeAttribute("aria-describedby");
441
+ const t = this.getAttribute("placeholder") || "", e = c(this.getAttribute("maxlength")), i = c(this.getAttribute("minlength")), s = b(this.getAttribute("rows"), 4), a = this.hasAttribute("disabled"), l = this.hasAttribute("readonly"), o = this.hasAttribute("required"), d = this.getAttribute("name") || "", u = this.getAttribute("resize") || "vertical", g = this.getAttribute("validation"), p = this.getAttribute("color"), n = this.getAttribute("radius");
442
+ this._textarea.placeholder = t, this._textarea.disabled = a, this._textarea.readOnly = l, this._textarea.required = o, this._textarea.rows = Math.max(1, s), this._textarea.name = d, this._textarea.style.resize = u, e !== null ? this._textarea.maxLength = e : this._textarea.removeAttribute("maxlength"), i !== null ? this._textarea.minLength = i : this._textarea.removeAttribute("minlength"), g === "error" ? this._textarea.setAttribute("aria-invalid", "true") : this._textarea.removeAttribute("aria-invalid"), p ? this.style.setProperty("--ui-textarea-accent", p) : this.style.removeProperty("--ui-textarea-accent"), n && n !== "none" && n !== "large" && n !== "full" ? this.style.setProperty("--ui-textarea-radius", n) : this.style.removeProperty("--ui-textarea-radius");
443
+ const h = [], m = !!(this.getAttribute("description") || this.querySelector('[slot="description"]')), f = !!(this.getAttribute("data-error") || this.querySelector('[slot="error"]'));
444
+ m && h.push(`${this._uid}-description`), f && h.push(`${this._uid}-error`), (this.hasAttribute("show-count") || c(this.getAttribute("maxlength")) !== null) && h.push(`${this._uid}-count`);
445
+ const v = !!(this.getAttribute("label") || this.querySelector('[slot="label"]'));
446
+ y(this._textarea, this, v ? `${this._uid}-label` : null), A(this._textarea, this, this._uid, h);
432
447
  }
433
448
  _syncDynamicUi() {
434
- const t = this._textarea?.value || this.getAttribute("value") || "", e = this.getAttribute("maxlength"), i = this.hasAttribute("clearable");
435
- this._clearBtn && (i && t && !this.hasAttribute("disabled") && !this.hasAttribute("readonly") ? this._clearBtn.removeAttribute("hidden") : this._clearBtn.setAttribute("hidden", "")), this._countEl && (this.hasAttribute("show-count") || !!e ? (this._countEl.removeAttribute("hidden"), e && Number.isFinite(Number(e)) ? this._countEl.textContent = `${t.length} / ${Number(e)}` : this._countEl.textContent = `${t.length}`) : this._countEl.setAttribute("hidden", ""));
449
+ const t = this._textarea?.value || this.getAttribute("value") || "", e = c(this.getAttribute("maxlength")), i = this.hasAttribute("clearable");
450
+ this._clearBtn && (i && t && !this.hasAttribute("disabled") && !this.hasAttribute("readonly") ? this._clearBtn.removeAttribute("hidden") : this._clearBtn.setAttribute("hidden", "")), this._countEl && (this.hasAttribute("show-count") || e !== null ? (this._countEl.removeAttribute("hidden"), e !== null ? this._countEl.textContent = `${t.length} / ${e}` : this._countEl.textContent = `${t.length}`) : this._countEl.setAttribute("hidden", ""));
436
451
  }
437
452
  _applyAutosize() {
438
453
  if (!this._textarea) return;
@@ -441,10 +456,10 @@ class y extends f {
441
456
  return;
442
457
  }
443
458
  this._textarea.style.height = "auto";
444
- const t = this._textarea.scrollHeight, e = x(this.getAttribute("max-rows"), 0);
459
+ const t = this._textarea.scrollHeight, e = b(this.getAttribute("max-rows"), 0);
445
460
  if (e > 0) {
446
- const i = getComputedStyle(this._textarea), r = parseFloat(i.lineHeight || "20") || 20, a = parseFloat(i.borderTopWidth || "0") || 0, u = parseFloat(i.borderBottomWidth || "0") || 0, s = parseFloat(i.paddingTop || "0") || 0, c = parseFloat(i.paddingBottom || "0") || 0, h = r * e + a + u + s + c;
447
- this._textarea.style.height = `${Math.min(t, h)}px`, this._textarea.style.overflowY = t > h ? "auto" : "hidden";
461
+ const i = getComputedStyle(this._textarea), s = parseFloat(i.lineHeight || "20") || 20, a = parseFloat(i.borderTopWidth || "0") || 0, l = parseFloat(i.borderBottomWidth || "0") || 0, o = parseFloat(i.paddingTop || "0") || 0, d = parseFloat(i.paddingBottom || "0") || 0, u = s * e + a + l + o + d;
462
+ this._textarea.style.height = `${Math.min(t, u)}px`, this._textarea.style.overflowY = t > u ? "auto" : "hidden";
448
463
  return;
449
464
  }
450
465
  this._textarea.style.height = `${t}px`, this._textarea.style.overflowY = "hidden";
@@ -465,7 +480,7 @@ class y extends f {
465
480
  _onInput(t) {
466
481
  const e = t.target.value;
467
482
  this.getAttribute("value") !== e && this.setAttribute("value", e), this._syncDynamicUi(), this._applyAutosize(), this._emit("input", e);
468
- const i = x(this.getAttribute("debounce"), 0);
483
+ const i = b(this.getAttribute("debounce"), 0);
469
484
  i > 0 ? (this._debounceTimer && clearTimeout(this._debounceTimer), this._debounceTimer = setTimeout(() => {
470
485
  this._emit("debounced-input", e), this._debounceTimer = null;
471
486
  }, i)) : this._emit("debounced-input", e);
@@ -478,22 +493,22 @@ class y extends f {
478
493
  t.preventDefault(), !(this.hasAttribute("disabled") || this.hasAttribute("readonly")) && (this.value = "", this._textarea && (this._textarea.value = "", this._textarea.focus()), this._syncDynamicUi(), this._applyAutosize(), this._emit("input", ""), this._emit("change", ""), this.dispatchEvent(new CustomEvent("clear", { bubbles: !0, composed: !0 })));
479
494
  }
480
495
  render() {
481
- const t = this.getAttribute("value") || "", e = this.getAttribute("label") || "", i = this.getAttribute("description") || "", r = this.getAttribute("data-error") || "", a = !!(e || i || this.querySelector('[slot="label"]') || this.querySelector('[slot="description"]')), s = this.hasAttribute("clearable") && !!t && !this.hasAttribute("disabled") && !this.hasAttribute("readonly");
496
+ const t = this.getAttribute("value") || "", e = this.getAttribute("label") || "", i = this.getAttribute("description") || "", s = this.getAttribute("data-error") || "", a = !!(e || i || this.querySelector('[slot="label"]') || this.querySelector('[slot="description"]')), o = this.hasAttribute("clearable") && !!t && !this.hasAttribute("disabled") && !this.hasAttribute("readonly");
482
497
  this.setContent(`
483
- <style>${_}</style>
498
+ <style>${w}</style>
484
499
  <div class="shell" part="shell">
485
500
  <div class="meta" part="meta" ${a ? "" : "hidden"}>
486
- <label id="${this._uid}-label" class="label" part="label"><slot name="label">${d(e)}</slot></label>
487
- <div id="${this._uid}-description" class="description" part="description"><slot name="description">${d(i)}</slot></div>
501
+ <label id="${this._uid}-label" class="label" part="label"><slot name="label">${x(e)}</slot></label>
502
+ <div id="${this._uid}-description" class="description" part="description"><slot name="description">${x(i)}</slot></div>
488
503
  </div>
489
504
 
490
505
  <div class="field" part="field">
491
506
  <textarea part="textarea"></textarea>
492
- <button type="button" part="clear" class="clear-btn" aria-label="Clear text" ${s ? "" : "hidden"}>${v}</button>
507
+ <button type="button" part="clear" class="clear-btn" aria-label="Clear text" ${o ? "" : "hidden"}>${z}</button>
493
508
  </div>
494
509
 
495
510
  <div class="footer" part="footer">
496
- <div id="${this._uid}-error" class="error" part="error"><slot name="error">${d(r)}</slot></div>
511
+ <div id="${this._uid}-error" class="error" part="error"><slot name="error">${x(s)}</slot></div>
497
512
  <div id="${this._uid}-count" class="count" part="count" hidden></div>
498
513
  </div>
499
514
  </div>
@@ -505,7 +520,7 @@ class y extends f {
505
520
  return t === "label" || t === "description" || t === "data-error";
506
521
  }
507
522
  }
508
- typeof customElements < "u" && !customElements.get("ui-textarea") && customElements.define("ui-textarea", y);
523
+ typeof customElements < "u" && !customElements.get("ui-textarea") && customElements.define("ui-textarea", k);
509
524
  export {
510
- y as UITextarea
525
+ k as UITextarea
511
526
  };
package/dist/theme.d.ts CHANGED
@@ -125,9 +125,27 @@ export interface ThemeTokens {
125
125
  };
126
126
  }
127
127
  export declare const baselineAccentPalettes: Record<AccentPaletteName, Record<ThemeMode, AccentPaletteTokens>>;
128
+ /**
129
+ * The text colour for a solid fill: the preferred one when it reads at 4.5:1 (WCAG AA), otherwise
130
+ * whichever of white and near-black reads better. Radix's own "contrast" colour for the bright steps
131
+ * (blue #0090ff, gray #8d8d8d) is white, which is only about 3.3:1 on them.
132
+ */
133
+ /**
134
+ * The text colour on a solid fill follows the fill. A theme that sets `colors.primary` but not
135
+ * `colors.foregroundOnPrimary` would otherwise keep the baseline's dark amber text colour, which is
136
+ * unreadable on most other fills. With `base` (merging a patch into the current tokens) a primary that
137
+ * changes while the foreground is left as it was (or is just spread along from the old tokens) gets a
138
+ * foreground that reads on the new primary, keeping the old one when it still does. A foreground the
139
+ * patch changes on purpose is left alone.
140
+ */
141
+ export declare function deriveForegroundOnPrimary(patch?: Partial<ThemeTokens>, base?: Partial<ThemeTokens>): {
142
+ foregroundOnPrimary?: string;
143
+ };
144
+ export declare function readableForeground(background: string, preferred: string): string;
128
145
  export declare const baselineLightTokens: ThemeTokens;
129
146
  export declare const baselineDarkTokens: ThemeTokens;
130
147
  export declare const defaultTokens: ThemeTokens;
148
+ export declare function deriveThemeSurfaces(overrides?: Partial<ThemeTokens>): NonNullable<ThemeTokens['surfaces']>;
131
149
  export declare function createThemeTokens(overrides?: Partial<ThemeTokens>, options?: {
132
150
  accentPalette?: AccentPaletteName;
133
151
  mode?: ThemeMode;
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACzC,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzC,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AAE5E,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,UAAU,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM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