@threadlabs/looma 0.2.5 → 0.2.7

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 (427) hide show
  1. package/dist/chunk-3HMMDK27.js +2914 -0
  2. package/dist/chunk-3K45IWIJ.js +4733 -0
  3. package/dist/chunk-MLKGABMK.js +9 -0
  4. package/dist/declarative-generated.cjs +135 -0
  5. package/dist/declarative-generated.d.cts +10 -0
  6. package/dist/declarative-generated.d.ts +10 -0
  7. package/dist/declarative-generated.js +111 -0
  8. package/dist/declarative.cjs +2942 -0
  9. package/dist/declarative.d.cts +27 -0
  10. package/dist/declarative.d.ts +27 -0
  11. package/dist/declarative.js +13 -0
  12. package/dist/index.cjs +7478 -6457
  13. package/dist/index.d.cts +4 -58
  14. package/dist/index.d.ts +4 -58
  15. package/dist/index.js +15 -27
  16. package/dist/loader.cjs +7652 -0
  17. package/dist/loader.d.cts +4 -0
  18. package/dist/loader.d.ts +4 -0
  19. package/dist/loader.js +16 -0
  20. package/dist/valibot.cjs +31 -0
  21. package/dist/valibot.d.cts +10 -0
  22. package/dist/valibot.d.ts +1 -43
  23. package/dist/valibot.js +2 -0
  24. package/dist/{types/field/validation.d.ts → validation-bxcou-l-.d.cts} +13 -11
  25. package/dist/validation-bxcou-l-.d.ts +58 -0
  26. package/editor/{chunk-B5WVJOPV.js → chunk-BXICJBWS.js} +118 -8
  27. package/editor/{chunk-ZOUKEZ77.js → chunk-JK53ENSG.js} +8 -21
  28. package/editor/chunk-WI7ZA44X.js +2558 -0
  29. package/editor/extensions/index.d.ts +11 -2
  30. package/editor/extensions/index.js +9 -7
  31. package/editor/index.d.ts +1 -1
  32. package/editor/index.js +10 -8
  33. package/editor/ui.js +2 -2
  34. package/editor.css +32 -0
  35. package/layout/index.cjs +466 -400
  36. package/layout/index.d.cts +1 -2
  37. package/layout/index.d.ts +1 -2
  38. package/layout/index.js +471 -395
  39. package/package.json +14 -5
  40. package/vue/chunk-4DPYH3IT.js +3538 -0
  41. package/vue/editor/index.d.ts +17 -7
  42. package/vue/editor/index.js +53 -35
  43. package/vue/index.d.ts +48 -31
  44. package/vue/index.js +1 -1
  45. package/dist/chunk-24OTMNIU.js +0 -1617
  46. package/dist/chunk-D5WRORG6.js +0 -366
  47. package/dist/chunk-HNFCGIBP.js +0 -8
  48. package/dist/chunk-NB6DBRXQ.js +0 -323
  49. package/dist/chunk-OF57X5AR.js +0 -10
  50. package/dist/chunk-TL4FIE7X.js +0 -93
  51. package/dist/chunk-UL7UIUJZ.js +0 -20
  52. package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
  53. package/dist/cjs/controlled-state-BFya8rAX.js +0 -9
  54. package/dist/cjs/events-TcQIzpNv.js +0 -19
  55. package/dist/cjs/icons-BAdjrnhS.js +0 -680
  56. package/dist/cjs/id-CYbKpaYr.js +0 -9
  57. package/dist/cjs/index-BHG9Rpil.js +0 -1602
  58. package/dist/cjs/index.cjs.js +0 -2
  59. package/dist/cjs/loader.cjs.js +0 -13
  60. package/dist/cjs/looma.cjs.js +0 -25
  61. package/dist/cjs/manager-Ce25WRtl.js +0 -95
  62. package/dist/cjs/positioning-CCR6ifPj.js +0 -426
  63. package/dist/cjs/ui-affordance-scope.cjs.entry.js +0 -43
  64. package/dist/cjs/ui-avatar-group.cjs.entry.js +0 -43
  65. package/dist/cjs/ui-avatar.cjs.entry.js +0 -50
  66. package/dist/cjs/ui-badge.cjs.entry.js +0 -19
  67. package/dist/cjs/ui-button.cjs.entry.js +0 -75
  68. package/dist/cjs/ui-callout.cjs.entry.js +0 -27
  69. package/dist/cjs/ui-checkbox.cjs.entry.js +0 -97
  70. package/dist/cjs/ui-chip_2.cjs.entry.js +0 -258
  71. package/dist/cjs/ui-combobox.cjs.entry.js +0 -708
  72. package/dist/cjs/ui-context-menu.cjs.entry.js +0 -239
  73. package/dist/cjs/ui-dialog.cjs.entry.js +0 -131
  74. package/dist/cjs/ui-disclosure.cjs.entry.js +0 -112
  75. package/dist/cjs/ui-editable.cjs.entry.js +0 -100
  76. package/dist/cjs/ui-floating-action-button.cjs.entry.js +0 -20
  77. package/dist/cjs/ui-form-field.cjs.entry.js +0 -114
  78. package/dist/cjs/ui-icon-button.cjs.entry.js +0 -23
  79. package/dist/cjs/ui-input.cjs.entry.js +0 -106
  80. package/dist/cjs/ui-menu-item.cjs.entry.js +0 -19
  81. package/dist/cjs/ui-menu.cjs.entry.js +0 -182
  82. package/dist/cjs/ui-popover.cjs.entry.js +0 -135
  83. package/dist/cjs/ui-radio-group.cjs.entry.js +0 -134
  84. package/dist/cjs/ui-radio.cjs.entry.js +0 -94
  85. package/dist/cjs/ui-search-result-row.cjs.entry.js +0 -47
  86. package/dist/cjs/ui-search-shell.cjs.entry.js +0 -39
  87. package/dist/cjs/ui-select.cjs.entry.js +0 -108
  88. package/dist/cjs/ui-switch.cjs.entry.js +0 -74
  89. package/dist/cjs/ui-tabs.cjs.entry.js +0 -118
  90. package/dist/cjs/ui-textarea.cjs.entry.js +0 -110
  91. package/dist/cjs/ui-toast-region.cjs.entry.js +0 -93
  92. package/dist/cjs/ui-top-bar.cjs.entry.js +0 -43
  93. package/dist/cjs/ui-tree-item.cjs.entry.js +0 -135
  94. package/dist/cjs/ui-tree.cjs.entry.js +0 -500
  95. package/dist/collection/collection-manifest.json +0 -45
  96. package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.css +0 -8
  97. package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.js +0 -70
  98. package/dist/collection/components/ui-avatar/ui-avatar.css +0 -35
  99. package/dist/collection/components/ui-avatar/ui-avatar.js +0 -130
  100. package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +0 -32
  101. package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +0 -95
  102. package/dist/collection/components/ui-badge/ui-badge.css +0 -90
  103. package/dist/collection/components/ui-badge/ui-badge.js +0 -62
  104. package/dist/collection/components/ui-button/ui-button.css +0 -121
  105. package/dist/collection/components/ui-button/ui-button.js +0 -141
  106. package/dist/collection/components/ui-callout/ui-callout.css +0 -74
  107. package/dist/collection/components/ui-callout/ui-callout.js +0 -59
  108. package/dist/collection/components/ui-checkbox/ui-checkbox.css +0 -24
  109. package/dist/collection/components/ui-checkbox/ui-checkbox.js +0 -228
  110. package/dist/collection/components/ui-chip/ui-chip.css +0 -57
  111. package/dist/collection/components/ui-chip/ui-chip.js +0 -67
  112. package/dist/collection/components/ui-combobox/ui-combobox.css +0 -47
  113. package/dist/collection/components/ui-combobox/ui-combobox.js +0 -1295
  114. package/dist/collection/components/ui-context-menu/ui-context-menu.css +0 -34
  115. package/dist/collection/components/ui-context-menu/ui-context-menu.js +0 -311
  116. package/dist/collection/components/ui-dialog/ui-dialog.css +0 -72
  117. package/dist/collection/components/ui-dialog/ui-dialog.js +0 -242
  118. package/dist/collection/components/ui-disclosure/ui-disclosure.css +0 -7
  119. package/dist/collection/components/ui-disclosure/ui-disclosure.js +0 -184
  120. package/dist/collection/components/ui-editable/ui-editable.css +0 -2
  121. package/dist/collection/components/ui-editable/ui-editable.js +0 -196
  122. package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.css +0 -73
  123. package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +0 -85
  124. package/dist/collection/components/ui-form-field/ui-form-field.css +0 -25
  125. package/dist/collection/components/ui-form-field/ui-form-field.js +0 -180
  126. package/dist/collection/components/ui-icon-button/ui-icon-button.css +0 -145
  127. package/dist/collection/components/ui-icon-button/ui-icon-button.js +0 -128
  128. package/dist/collection/components/ui-input/ui-input.css +0 -48
  129. package/dist/collection/components/ui-input/ui-input.js +0 -217
  130. package/dist/collection/components/ui-menu/ui-menu.css +0 -73
  131. package/dist/collection/components/ui-menu/ui-menu.js +0 -280
  132. package/dist/collection/components/ui-menu-item/ui-menu-item.css +0 -32
  133. package/dist/collection/components/ui-menu-item/ui-menu-item.js +0 -64
  134. package/dist/collection/components/ui-popover/ui-popover.css +0 -58
  135. package/dist/collection/components/ui-popover/ui-popover.js +0 -232
  136. package/dist/collection/components/ui-radio/ui-radio.css +0 -22
  137. package/dist/collection/components/ui-radio/ui-radio.js +0 -226
  138. package/dist/collection/components/ui-radio-group/ui-radio-group.css +0 -10
  139. package/dist/collection/components/ui-radio-group/ui-radio-group.js +0 -247
  140. package/dist/collection/components/ui-search-result-row/ui-search-result-row.css +0 -80
  141. package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +0 -100
  142. package/dist/collection/components/ui-search-shell/ui-search-shell.css +0 -63
  143. package/dist/collection/components/ui-search-shell/ui-search-shell.js +0 -46
  144. package/dist/collection/components/ui-select/ui-select.css +0 -64
  145. package/dist/collection/components/ui-select/ui-select.js +0 -218
  146. package/dist/collection/components/ui-switch/ui-switch.css +0 -63
  147. package/dist/collection/components/ui-switch/ui-switch.js +0 -185
  148. package/dist/collection/components/ui-tabs/ui-tabs.css +0 -68
  149. package/dist/collection/components/ui-tabs/ui-tabs.js +0 -190
  150. package/dist/collection/components/ui-textarea/ui-textarea.css +0 -49
  151. package/dist/collection/components/ui-textarea/ui-textarea.js +0 -241
  152. package/dist/collection/components/ui-toast-region/ui-toast-region.css +0 -59
  153. package/dist/collection/components/ui-toast-region/ui-toast-region.js +0 -126
  154. package/dist/collection/components/ui-tooltip/ui-tooltip.css +0 -43
  155. package/dist/collection/components/ui-tooltip/ui-tooltip.js +0 -430
  156. package/dist/collection/components/ui-top-bar/ui-top-bar.css +0 -51
  157. package/dist/collection/components/ui-top-bar/ui-top-bar.js +0 -52
  158. package/dist/collection/components/ui-tree/ui-tree.css +0 -12
  159. package/dist/collection/components/ui-tree/ui-tree.js +0 -515
  160. package/dist/collection/components/ui-tree-item/ui-tree-item.css +0 -217
  161. package/dist/collection/components/ui-tree-item/ui-tree-item.js +0 -406
  162. package/dist/collection/field/combobox.js +0 -4
  163. package/dist/collection/field/editable.js +0 -1
  164. package/dist/collection/field/multi-combobox.js +0 -1
  165. package/dist/collection/field/valibot.js +0 -5
  166. package/dist/collection/field/validation.js +0 -62
  167. package/dist/collection/icons.js +0 -71
  168. package/dist/collection/input-modality.js +0 -24
  169. package/dist/collection/overlay/manager.js +0 -92
  170. package/dist/collection/overlay/positioning.js +0 -424
  171. package/dist/collection/utils/controlled-state.js +0 -4
  172. package/dist/collection/utils/drag-drop.js +0 -51
  173. package/dist/collection/utils/events.js +0 -13
  174. package/dist/collection/utils/id.js +0 -5
  175. package/dist/collection/utils/initials.js +0 -11
  176. package/dist/components/index.d.ts +0 -102
  177. package/dist/components/index.js +0 -1
  178. package/dist/components/p-6SWSrfmW.js +0 -1
  179. package/dist/components/p-B_DaIVEY.js +0 -1
  180. package/dist/components/p-Bh_1GxOD.js +0 -1
  181. package/dist/components/p-BnGhGgTH.js +0 -1
  182. package/dist/components/p-BzaB_bXo.js +0 -1
  183. package/dist/components/p-C-0syqXZ.js +0 -1
  184. package/dist/components/p-CoFximGM.js +0 -13
  185. package/dist/components/p-JwSoedEO.js +0 -1
  186. package/dist/components/p-Vc4ExHFc.js +0 -1
  187. package/dist/components/p-hgBUJRDa.js +0 -1
  188. package/dist/components/ui-affordance-scope.d.ts +0 -11
  189. package/dist/components/ui-affordance-scope.js +0 -1
  190. package/dist/components/ui-avatar-group.d.ts +0 -11
  191. package/dist/components/ui-avatar-group.js +0 -1
  192. package/dist/components/ui-avatar.d.ts +0 -11
  193. package/dist/components/ui-avatar.js +0 -1
  194. package/dist/components/ui-badge.d.ts +0 -11
  195. package/dist/components/ui-badge.js +0 -1
  196. package/dist/components/ui-button.d.ts +0 -11
  197. package/dist/components/ui-button.js +0 -1
  198. package/dist/components/ui-callout.d.ts +0 -11
  199. package/dist/components/ui-callout.js +0 -1
  200. package/dist/components/ui-checkbox.d.ts +0 -11
  201. package/dist/components/ui-checkbox.js +0 -1
  202. package/dist/components/ui-chip.d.ts +0 -11
  203. package/dist/components/ui-chip.js +0 -1
  204. package/dist/components/ui-combobox.d.ts +0 -11
  205. package/dist/components/ui-combobox.js +0 -1
  206. package/dist/components/ui-context-menu.d.ts +0 -11
  207. package/dist/components/ui-context-menu.js +0 -1
  208. package/dist/components/ui-dialog.d.ts +0 -11
  209. package/dist/components/ui-dialog.js +0 -1
  210. package/dist/components/ui-disclosure.d.ts +0 -11
  211. package/dist/components/ui-disclosure.js +0 -1
  212. package/dist/components/ui-editable.d.ts +0 -11
  213. package/dist/components/ui-editable.js +0 -1
  214. package/dist/components/ui-floating-action-button.d.ts +0 -11
  215. package/dist/components/ui-floating-action-button.js +0 -1
  216. package/dist/components/ui-form-field.d.ts +0 -11
  217. package/dist/components/ui-form-field.js +0 -1
  218. package/dist/components/ui-icon-button.d.ts +0 -11
  219. package/dist/components/ui-icon-button.js +0 -1
  220. package/dist/components/ui-input.d.ts +0 -11
  221. package/dist/components/ui-input.js +0 -1
  222. package/dist/components/ui-menu-item.d.ts +0 -11
  223. package/dist/components/ui-menu-item.js +0 -1
  224. package/dist/components/ui-menu.d.ts +0 -11
  225. package/dist/components/ui-menu.js +0 -1
  226. package/dist/components/ui-popover.d.ts +0 -11
  227. package/dist/components/ui-popover.js +0 -1
  228. package/dist/components/ui-radio-group.d.ts +0 -11
  229. package/dist/components/ui-radio-group.js +0 -1
  230. package/dist/components/ui-radio.d.ts +0 -11
  231. package/dist/components/ui-radio.js +0 -1
  232. package/dist/components/ui-search-result-row.d.ts +0 -11
  233. package/dist/components/ui-search-result-row.js +0 -1
  234. package/dist/components/ui-search-shell.d.ts +0 -11
  235. package/dist/components/ui-search-shell.js +0 -1
  236. package/dist/components/ui-select.d.ts +0 -11
  237. package/dist/components/ui-select.js +0 -1
  238. package/dist/components/ui-switch.d.ts +0 -11
  239. package/dist/components/ui-switch.js +0 -1
  240. package/dist/components/ui-tabs.d.ts +0 -11
  241. package/dist/components/ui-tabs.js +0 -1
  242. package/dist/components/ui-textarea.d.ts +0 -11
  243. package/dist/components/ui-textarea.js +0 -1
  244. package/dist/components/ui-toast-region.d.ts +0 -11
  245. package/dist/components/ui-toast-region.js +0 -1
  246. package/dist/components/ui-tooltip.d.ts +0 -11
  247. package/dist/components/ui-tooltip.js +0 -1
  248. package/dist/components/ui-top-bar.d.ts +0 -11
  249. package/dist/components/ui-top-bar.js +0 -1
  250. package/dist/components/ui-tree-item.d.ts +0 -11
  251. package/dist/components/ui-tree-item.js +0 -1
  252. package/dist/components/ui-tree.d.ts +0 -11
  253. package/dist/components/ui-tree.js +0 -1
  254. package/dist/esm/app-globals-DQuL1Twl.js +0 -3
  255. package/dist/esm/controlled-state-BnGhGgTH.js +0 -6
  256. package/dist/esm/events-JwSoedEO.js +0 -15
  257. package/dist/esm/icons-CoFximGM.js +0 -678
  258. package/dist/esm/id-hgBUJRDa.js +0 -7
  259. package/dist/esm/index-8BGiMGQ0.js +0 -1593
  260. package/dist/esm/index.js +0 -1
  261. package/dist/esm/loader.js +0 -11
  262. package/dist/esm/looma.js +0 -21
  263. package/dist/esm/manager-C-0syqXZ.js +0 -91
  264. package/dist/esm/positioning-ZOr-2PSe.js +0 -421
  265. package/dist/esm/ui-affordance-scope.entry.js +0 -41
  266. package/dist/esm/ui-avatar-group.entry.js +0 -41
  267. package/dist/esm/ui-avatar.entry.js +0 -48
  268. package/dist/esm/ui-badge.entry.js +0 -17
  269. package/dist/esm/ui-button.entry.js +0 -73
  270. package/dist/esm/ui-callout.entry.js +0 -25
  271. package/dist/esm/ui-checkbox.entry.js +0 -95
  272. package/dist/esm/ui-chip_2.entry.js +0 -255
  273. package/dist/esm/ui-combobox.entry.js +0 -706
  274. package/dist/esm/ui-context-menu.entry.js +0 -237
  275. package/dist/esm/ui-dialog.entry.js +0 -129
  276. package/dist/esm/ui-disclosure.entry.js +0 -110
  277. package/dist/esm/ui-editable.entry.js +0 -98
  278. package/dist/esm/ui-floating-action-button.entry.js +0 -18
  279. package/dist/esm/ui-form-field.entry.js +0 -112
  280. package/dist/esm/ui-icon-button.entry.js +0 -21
  281. package/dist/esm/ui-input.entry.js +0 -104
  282. package/dist/esm/ui-menu-item.entry.js +0 -17
  283. package/dist/esm/ui-menu.entry.js +0 -180
  284. package/dist/esm/ui-popover.entry.js +0 -133
  285. package/dist/esm/ui-radio-group.entry.js +0 -132
  286. package/dist/esm/ui-radio.entry.js +0 -92
  287. package/dist/esm/ui-search-result-row.entry.js +0 -45
  288. package/dist/esm/ui-search-shell.entry.js +0 -37
  289. package/dist/esm/ui-select.entry.js +0 -106
  290. package/dist/esm/ui-switch.entry.js +0 -72
  291. package/dist/esm/ui-tabs.entry.js +0 -116
  292. package/dist/esm/ui-textarea.entry.js +0 -108
  293. package/dist/esm/ui-toast-region.entry.js +0 -91
  294. package/dist/esm/ui-top-bar.entry.js +0 -41
  295. package/dist/esm/ui-tree-item.entry.js +0 -133
  296. package/dist/esm/ui-tree.entry.js +0 -498
  297. package/dist/index.cjs.js +0 -1
  298. package/dist/looma/index.esm.js +0 -0
  299. package/dist/looma/looma.esm.js +0 -1
  300. package/dist/looma/p-08f80207.entry.js +0 -1
  301. package/dist/looma/p-0b5b8d9e.entry.js +0 -1
  302. package/dist/looma/p-1249a806.entry.js +0 -1
  303. package/dist/looma/p-16e0669d.entry.js +0 -1
  304. package/dist/looma/p-1c00670f.entry.js +0 -1
  305. package/dist/looma/p-1c5a7522.entry.js +0 -1
  306. package/dist/looma/p-22842f8c.entry.js +0 -1
  307. package/dist/looma/p-2915d5c0.entry.js +0 -1
  308. package/dist/looma/p-3b2961a6.entry.js +0 -1
  309. package/dist/looma/p-3f60f4c8.entry.js +0 -1
  310. package/dist/looma/p-424d6719.entry.js +0 -1
  311. package/dist/looma/p-4caccfce.entry.js +0 -1
  312. package/dist/looma/p-5fdcee1d.entry.js +0 -1
  313. package/dist/looma/p-6d8b99ee.entry.js +0 -1
  314. package/dist/looma/p-6f20d470.entry.js +0 -1
  315. package/dist/looma/p-7c0b5364.entry.js +0 -1
  316. package/dist/looma/p-8BGiMGQ0.js +0 -2
  317. package/dist/looma/p-8bdd9495.entry.js +0 -1
  318. package/dist/looma/p-99116a72.entry.js +0 -1
  319. package/dist/looma/p-9cfbf722.entry.js +0 -1
  320. package/dist/looma/p-9d2662ca.entry.js +0 -1
  321. package/dist/looma/p-9ff2fa19.entry.js +0 -1
  322. package/dist/looma/p-BnGhGgTH.js +0 -1
  323. package/dist/looma/p-C-0syqXZ.js +0 -1
  324. package/dist/looma/p-CoFximGM.js +0 -13
  325. package/dist/looma/p-DQuL1Twl.js +0 -1
  326. package/dist/looma/p-JwSoedEO.js +0 -1
  327. package/dist/looma/p-ZOr-2PSe.js +0 -1
  328. package/dist/looma/p-a2dd4c6c.entry.js +0 -1
  329. package/dist/looma/p-add67e4c.entry.js +0 -1
  330. package/dist/looma/p-b6ede6bb.entry.js +0 -1
  331. package/dist/looma/p-b76e2111.entry.js +0 -1
  332. package/dist/looma/p-ca2a54fd.entry.js +0 -1
  333. package/dist/looma/p-d372b0db.entry.js +0 -1
  334. package/dist/looma/p-d4825822.entry.js +0 -1
  335. package/dist/looma/p-d56571a2.entry.js +0 -1
  336. package/dist/looma/p-d5c3954f.entry.js +0 -1
  337. package/dist/looma/p-e604e906.entry.js +0 -1
  338. package/dist/looma/p-f1f7c5cb.entry.js +0 -1
  339. package/dist/looma/p-hgBUJRDa.js +0 -1
  340. package/dist/types/components/ui-affordance-scope/ui-affordance-scope.d.ts +0 -11
  341. package/dist/types/components/ui-avatar/ui-avatar.d.ts +0 -11
  342. package/dist/types/components/ui-avatar-group/ui-avatar-group.d.ts +0 -11
  343. package/dist/types/components/ui-badge/ui-badge.d.ts +0 -5
  344. package/dist/types/components/ui-button/ui-button.d.ts +0 -13
  345. package/dist/types/components/ui-callout/ui-callout.d.ts +0 -6
  346. package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +0 -20
  347. package/dist/types/components/ui-chip/ui-chip.d.ts +0 -8
  348. package/dist/types/components/ui-combobox/ui-combobox.d.ts +0 -128
  349. package/dist/types/components/ui-context-menu/ui-context-menu.d.ts +0 -43
  350. package/dist/types/components/ui-dialog/ui-dialog.d.ts +0 -27
  351. package/dist/types/components/ui-disclosure/ui-disclosure.d.ts +0 -21
  352. package/dist/types/components/ui-editable/ui-editable.d.ts +0 -24
  353. package/dist/types/components/ui-floating-action-button/ui-floating-action-button.d.ts +0 -6
  354. package/dist/types/components/ui-form-field/ui-form-field.d.ts +0 -18
  355. package/dist/types/components/ui-icon-button/ui-icon-button.d.ts +0 -9
  356. package/dist/types/components/ui-input/ui-input.d.ts +0 -19
  357. package/dist/types/components/ui-menu/ui-menu.d.ts +0 -28
  358. package/dist/types/components/ui-menu-item/ui-menu-item.d.ts +0 -5
  359. package/dist/types/components/ui-popover/ui-popover.d.ts +0 -26
  360. package/dist/types/components/ui-radio/ui-radio.d.ts +0 -20
  361. package/dist/types/components/ui-radio-group/ui-radio-group.d.ts +0 -21
  362. package/dist/types/components/ui-search-result-row/ui-search-result-row.d.ts +0 -15
  363. package/dist/types/components/ui-search-shell/ui-search-shell.d.ts +0 -9
  364. package/dist/types/components/ui-select/ui-select.d.ts +0 -20
  365. package/dist/types/components/ui-switch/ui-switch.d.ts +0 -16
  366. package/dist/types/components/ui-tabs/ui-tabs.d.ts +0 -18
  367. package/dist/types/components/ui-textarea/ui-textarea.d.ts +0 -20
  368. package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +0 -16
  369. package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +0 -57
  370. package/dist/types/components/ui-top-bar/ui-top-bar.d.ts +0 -12
  371. package/dist/types/components/ui-tree/ui-tree.d.ts +0 -53
  372. package/dist/types/components/ui-tree-item/ui-tree-item.d.ts +0 -44
  373. package/dist/types/components.d.ts +0 -1889
  374. package/dist/types/field/combobox.d.ts +0 -46
  375. package/dist/types/field/editable.d.ts +0 -5
  376. package/dist/types/field/multi-combobox.d.ts +0 -11
  377. package/dist/types/field/valibot.d.ts +0 -7
  378. package/dist/types/icons.d.ts +0 -53
  379. package/dist/types/input-modality.d.ts +0 -6
  380. package/dist/types/overlay/manager.d.ts +0 -17
  381. package/dist/types/overlay/positioning.d.ts +0 -74
  382. package/dist/types/stencil-public-runtime.d.ts +0 -1860
  383. package/dist/types/utils/controlled-state.d.ts +0 -4
  384. package/dist/types/utils/drag-drop.d.ts +0 -15
  385. package/dist/types/utils/events.d.ts +0 -4
  386. package/dist/types/utils/id.d.ts +0 -1
  387. package/dist/types/utils/initials.d.ts +0 -1
  388. package/dist/ui-affordance-scope.entry-L6TIXYOP.js +0 -54
  389. package/dist/ui-avatar-group.entry-TCAA6P72.js +0 -51
  390. package/dist/ui-avatar.entry-52DQ7VXA.js +0 -51
  391. package/dist/ui-badge.entry-2XCAA6LL.js +0 -22
  392. package/dist/ui-button.entry-MNFBMNSX.js +0 -83
  393. package/dist/ui-callout.entry-SSHT5TH2.js +0 -32
  394. package/dist/ui-checkbox.entry-LOWIWIWI.js +0 -111
  395. package/dist/ui-chip_2.entry-BIMTSF6C.js +0 -272
  396. package/dist/ui-combobox.entry-25Z4MN7N.js +0 -717
  397. package/dist/ui-context-menu.entry-YZDL5Y4M.js +0 -248
  398. package/dist/ui-dialog.entry-HIXZX5AB.js +0 -146
  399. package/dist/ui-disclosure.entry-2JZHZNDQ.js +0 -126
  400. package/dist/ui-editable.entry-U3VR3XPT.js +0 -110
  401. package/dist/ui-floating-action-button.entry-6S3QN3KJ.js +0 -23
  402. package/dist/ui-form-field.entry-GQOSMLHT.js +0 -120
  403. package/dist/ui-icon-button.entry-QJXKVDM6.js +0 -26
  404. package/dist/ui-input.entry-UWMQ6JMP.js +0 -114
  405. package/dist/ui-menu-item.entry-NHNZKKJS.js +0 -22
  406. package/dist/ui-menu.entry-D53RUJND.js +0 -192
  407. package/dist/ui-popover.entry-7ZSIWCFQ.js +0 -152
  408. package/dist/ui-radio-group.entry-37MSYIH4.js +0 -142
  409. package/dist/ui-radio.entry-7YGCDHXT.js +0 -108
  410. package/dist/ui-search-result-row.entry-6FCCLGAS.js +0 -50
  411. package/dist/ui-search-shell.entry-HSBEXPER.js +0 -41
  412. package/dist/ui-select.entry-GIDIAYRD.js +0 -117
  413. package/dist/ui-switch.entry-MYAL6XPC.js +0 -87
  414. package/dist/ui-tabs.entry-R4TEXQSD.js +0 -128
  415. package/dist/ui-textarea.entry-FW32JNDV.js +0 -119
  416. package/dist/ui-toast-region.entry-BTMFPKZF.js +0 -104
  417. package/dist/ui-top-bar.entry-5DQGJF3B.js +0 -49
  418. package/dist/ui-tree-item.entry-ADT7DSOS.js +0 -145
  419. package/dist/ui-tree.entry-7PYQ5RIN.js +0 -470
  420. package/editor/chunk-64GLF274.js +0 -1271
  421. package/layout/index.css +0 -387
  422. package/loader/cdn.js +0 -1
  423. package/loader/index.cjs.js +0 -1
  424. package/loader/index.d.ts +0 -24
  425. package/loader/index.es2017.js +0 -1
  426. package/loader/index.js +0 -2
  427. package/vue/chunk-ROMBQS2L.js +0 -352
@@ -1,130 +0,0 @@
1
- import { Host, h } from "@stencil/core";
2
- import { toInitials } from "../../utils/initials";
3
- export class UIAvatar {
4
- src = '';
5
- alt = '';
6
- name = '';
7
- fallback = '';
8
- hasImage = false;
9
- watchSrc() {
10
- this.hasImage = false;
11
- }
12
- onImageLoad = () => {
13
- this.hasImage = true;
14
- };
15
- onImageError = () => {
16
- this.hasImage = false;
17
- };
18
- render() {
19
- const fallbackText = this.fallback || toInitials(this.name || this.alt);
20
- const label = this.alt || this.name || 'Avatar';
21
- return (h(Host, { key: 'bbe6c3a775702022a19d819a6cc9d81d798cb3e1', role: "img", "aria-label": label, "data-has-image": this.hasImage ? '' : undefined }, h("div", { key: '63402327ba5bde122bf5deaea09baf965ee9b047', class: "avatar" }, h("img", { key: 'e52b86773684b80d76efa459cb03ae40881f959b', src: this.src, alt: label, onLoad: this.onImageLoad, onError: this.onImageError, hidden: !this.hasImage, "aria-hidden": this.hasImage ? 'false' : 'true' }), h("span", { key: '82a6d8f0d0c69ca52f81d092a2292fc80238265b', class: "fallback", hidden: this.hasImage, "aria-hidden": this.hasImage ? 'true' : 'false' }, fallbackText))));
22
- }
23
- static get is() { return "ui-avatar"; }
24
- static get encapsulation() { return "shadow"; }
25
- static get originalStyleUrls() {
26
- return {
27
- "$": ["ui-avatar.css"]
28
- };
29
- }
30
- static get styleUrls() {
31
- return {
32
- "$": ["ui-avatar.css"]
33
- };
34
- }
35
- static get properties() {
36
- return {
37
- "src": {
38
- "type": "string",
39
- "mutable": false,
40
- "complexType": {
41
- "original": "string",
42
- "resolved": "string",
43
- "references": {}
44
- },
45
- "required": false,
46
- "optional": false,
47
- "docs": {
48
- "tags": [],
49
- "text": ""
50
- },
51
- "getter": false,
52
- "setter": false,
53
- "reflect": false,
54
- "attribute": "src",
55
- "defaultValue": "''"
56
- },
57
- "alt": {
58
- "type": "string",
59
- "mutable": false,
60
- "complexType": {
61
- "original": "string",
62
- "resolved": "string",
63
- "references": {}
64
- },
65
- "required": false,
66
- "optional": false,
67
- "docs": {
68
- "tags": [],
69
- "text": ""
70
- },
71
- "getter": false,
72
- "setter": false,
73
- "reflect": false,
74
- "attribute": "alt",
75
- "defaultValue": "''"
76
- },
77
- "name": {
78
- "type": "string",
79
- "mutable": false,
80
- "complexType": {
81
- "original": "string",
82
- "resolved": "string",
83
- "references": {}
84
- },
85
- "required": false,
86
- "optional": false,
87
- "docs": {
88
- "tags": [],
89
- "text": ""
90
- },
91
- "getter": false,
92
- "setter": false,
93
- "reflect": false,
94
- "attribute": "name",
95
- "defaultValue": "''"
96
- },
97
- "fallback": {
98
- "type": "string",
99
- "mutable": false,
100
- "complexType": {
101
- "original": "string",
102
- "resolved": "string",
103
- "references": {}
104
- },
105
- "required": false,
106
- "optional": false,
107
- "docs": {
108
- "tags": [],
109
- "text": ""
110
- },
111
- "getter": false,
112
- "setter": false,
113
- "reflect": false,
114
- "attribute": "fallback",
115
- "defaultValue": "''"
116
- }
117
- };
118
- }
119
- static get states() {
120
- return {
121
- "hasImage": {}
122
- };
123
- }
124
- static get watchers() {
125
- return [{
126
- "propName": "src",
127
- "methodName": "watchSrc"
128
- }];
129
- }
130
- }
@@ -1,32 +0,0 @@
1
- :host {
2
- display: flex;
3
- align-items: center;
4
- flex-direction: row-reverse;
5
- gap: 0;
6
- }
7
-
8
- ::slotted(*) {
9
- margin-inline-end: -0.5rem;
10
- flex-shrink: 0;
11
- }
12
-
13
- ::slotted(*:last-of-type) {
14
- margin-inline-end: 0;
15
- }
16
-
17
- .overflow {
18
- margin-inline-end: -0.5rem;
19
- display: inline-flex;
20
- align-items: center;
21
- justify-content: center;
22
- inline-size: 2.5rem;
23
- block-size: 2.5rem;
24
- border-radius: 999px;
25
- border: 1px solid var(--ui-border-default);
26
- background: var(--ui-surface-muted);
27
- color: var(--ui-text-secondary);
28
- font: inherit;
29
- font-size: 0.75rem;
30
- font-weight: 600;
31
- flex-shrink: 0;
32
- }
@@ -1,95 +0,0 @@
1
- import { Host, h } from "@stencil/core";
2
- export class UIAvatarGroup {
3
- host;
4
- max = 5;
5
- label = 'People';
6
- overflowCount = 0;
7
- syncOverflow() {
8
- this.updateOverflow();
9
- }
10
- componentDidLoad() {
11
- this.updateOverflow();
12
- }
13
- visibleLimit() {
14
- return Number.isFinite(this.max) ? Math.max(0, Math.floor(this.max)) : 0;
15
- }
16
- updateOverflow() {
17
- const children = Array.from(this.host.children);
18
- const total = children.length;
19
- const visibleLimit = this.visibleLimit();
20
- const overflowCount = total > visibleLimit ? total - visibleLimit : 0;
21
- if (this.overflowCount !== overflowCount)
22
- this.overflowCount = overflowCount;
23
- }
24
- render() {
25
- return (h(Host, { key: '9ba6693cabc379bbbe6f5698160481f27fe02f31', role: "group", "aria-label": this.label || undefined }, h("style", { key: 'ed231fe96c16a3cdd5a66d4828664c75c6959a9e' }, `::slotted(:nth-child(n + ${this.visibleLimit() + 1})) { display: none !important; }`), h("slot", { key: '463005a7f3c498c80c768151ab32c873ff1abf86', onSlotchange: () => this.updateOverflow() }), this.overflowCount > 0 && (h("span", { key: 'dc1ba88fd97ca461e6518d223f00a93416e6d0f0', class: "overflow", role: "img", "aria-label": `${this.overflowCount} more ${this.overflowCount === 1 ? 'person' : 'people'}`, "data-ui-avatar-group-overflow": true }, "+", this.overflowCount))));
26
- }
27
- static get is() { return "ui-avatar-group"; }
28
- static get encapsulation() { return "shadow"; }
29
- static get originalStyleUrls() {
30
- return {
31
- "$": ["ui-avatar-group.css"]
32
- };
33
- }
34
- static get styleUrls() {
35
- return {
36
- "$": ["ui-avatar-group.css"]
37
- };
38
- }
39
- static get properties() {
40
- return {
41
- "max": {
42
- "type": "number",
43
- "mutable": false,
44
- "complexType": {
45
- "original": "number",
46
- "resolved": "number",
47
- "references": {}
48
- },
49
- "required": false,
50
- "optional": false,
51
- "docs": {
52
- "tags": [],
53
- "text": ""
54
- },
55
- "getter": false,
56
- "setter": false,
57
- "reflect": false,
58
- "attribute": "max",
59
- "defaultValue": "5"
60
- },
61
- "label": {
62
- "type": "string",
63
- "mutable": false,
64
- "complexType": {
65
- "original": "string",
66
- "resolved": "string",
67
- "references": {}
68
- },
69
- "required": false,
70
- "optional": false,
71
- "docs": {
72
- "tags": [],
73
- "text": ""
74
- },
75
- "getter": false,
76
- "setter": false,
77
- "reflect": false,
78
- "attribute": "label",
79
- "defaultValue": "'People'"
80
- }
81
- };
82
- }
83
- static get states() {
84
- return {
85
- "overflowCount": {}
86
- };
87
- }
88
- static get elementRef() { return "host"; }
89
- static get watchers() {
90
- return [{
91
- "propName": "max",
92
- "methodName": "syncOverflow"
93
- }];
94
- }
95
- }
@@ -1,90 +0,0 @@
1
- :host {
2
- --ui-badge-surface: var(--ui-surface-muted);
3
- --ui-badge-text: var(--ui-text-secondary);
4
- --ui-badge-border: var(--ui-border-default);
5
- --ui-badge-font-size: var(--ui-font-size-xs);
6
- --ui-badge-font-weight: var(--ui-font-normal);
7
- --ui-badge-line-height: var(--ui-line-height-tight);
8
- --ui-badge-padding-block: var(--ui-space-0-5);
9
- --ui-badge-padding-inline: var(--ui-space-2);
10
-
11
- display: inline-flex;
12
- max-width: 100%;
13
- }
14
-
15
- .badge__surface {
16
- display: inline-flex;
17
- align-items: center;
18
- justify-content: center;
19
- max-width: 100%;
20
- padding: var(--ui-badge-padding-block) var(--ui-badge-padding-inline);
21
- border: 1px solid var(--ui-badge-border);
22
- border-radius: var(--ui-radius-round);
23
- background: var(--ui-badge-surface);
24
- color: var(--ui-badge-text);
25
- font-family: var(--ui-font-family-sans);
26
- font-size: var(--ui-badge-font-size);
27
- font-weight: var(--ui-badge-font-weight);
28
- line-height: var(--ui-badge-line-height);
29
- white-space: nowrap;
30
- }
31
-
32
- :host([data-tone='accent']) .badge__surface {
33
- --ui-badge-surface: var(--ui-accent-solid);
34
- --ui-badge-border: var(--ui-accent-solid);
35
- --ui-badge-text: var(--ui-text-on-accent);
36
- }
37
-
38
- :host([data-tone='danger']) .badge__surface {
39
- --ui-badge-surface: var(--ui-danger-solid);
40
- --ui-badge-border: var(--ui-danger-solid);
41
- --ui-badge-text: var(--ui-text-on-accent);
42
- }
43
-
44
- :host([data-tone='success']) .badge__surface {
45
- --ui-badge-surface: var(--ui-success-solid);
46
- --ui-badge-border: var(--ui-success-solid);
47
- --ui-badge-text: var(--ui-text-on-accent);
48
- }
49
-
50
- :host([data-tone='warning']) .badge__surface {
51
- --ui-badge-surface: var(--ui-warning-solid);
52
- --ui-badge-border: var(--ui-warning-solid);
53
- --ui-badge-text: var(--ui-text-primary);
54
- }
55
-
56
- :host([data-tone='info']) .badge__surface {
57
- --ui-badge-surface: var(--ui-info-solid);
58
- --ui-badge-border: var(--ui-info-solid);
59
- --ui-badge-text: var(--ui-text-on-accent);
60
- }
61
-
62
- :host([data-variant='subtle'][data-tone='accent']) .badge__surface {
63
- --ui-badge-surface: var(--ui-accent-soft);
64
- --ui-badge-border: var(--ui-accent-soft);
65
- --ui-badge-text: var(--ui-accent-solid);
66
- }
67
-
68
- :host([data-variant='subtle'][data-tone='danger']) .badge__surface {
69
- --ui-badge-surface: var(--ui-danger-soft);
70
- --ui-badge-border: var(--ui-danger-soft);
71
- --ui-badge-text: var(--ui-danger-solid);
72
- }
73
-
74
- :host([data-variant='subtle'][data-tone='success']) .badge__surface {
75
- --ui-badge-surface: var(--ui-success-soft);
76
- --ui-badge-border: var(--ui-success-soft);
77
- --ui-badge-text: var(--ui-success-solid);
78
- }
79
-
80
- :host([data-variant='subtle'][data-tone='warning']) .badge__surface {
81
- --ui-badge-surface: var(--ui-warning-soft);
82
- --ui-badge-border: var(--ui-warning-soft);
83
- --ui-badge-text: var(--ui-warning-solid);
84
- }
85
-
86
- :host([data-variant='subtle'][data-tone='info']) .badge__surface {
87
- --ui-badge-surface: var(--ui-info-soft);
88
- --ui-badge-border: var(--ui-info-soft);
89
- --ui-badge-text: var(--ui-info-solid);
90
- }
@@ -1,62 +0,0 @@
1
- import { Host, h } from "@stencil/core";
2
- export class UIBadge {
3
- variant;
4
- tone;
5
- render() {
6
- return (h(Host, { key: 'ba96ade6d037a7ed9958e7eed540e62782f846f0', "data-variant": this.variant || undefined, "data-tone": this.tone || undefined }, h("span", { key: 'a1e9587f59de479c19b9ea7aec8c8e932b998369', class: "badge__surface" }, h("slot", { key: '5835ddcea5cda472e700557528fd3cbc9d572616' }))));
7
- }
8
- static get is() { return "ui-badge"; }
9
- static get encapsulation() { return "shadow"; }
10
- static get originalStyleUrls() {
11
- return {
12
- "$": ["ui-badge.css"]
13
- };
14
- }
15
- static get styleUrls() {
16
- return {
17
- "$": ["ui-badge.css"]
18
- };
19
- }
20
- static get properties() {
21
- return {
22
- "variant": {
23
- "type": "string",
24
- "mutable": false,
25
- "complexType": {
26
- "original": "string",
27
- "resolved": "string",
28
- "references": {}
29
- },
30
- "required": false,
31
- "optional": true,
32
- "docs": {
33
- "tags": [],
34
- "text": ""
35
- },
36
- "getter": false,
37
- "setter": false,
38
- "reflect": false,
39
- "attribute": "variant"
40
- },
41
- "tone": {
42
- "type": "string",
43
- "mutable": false,
44
- "complexType": {
45
- "original": "string",
46
- "resolved": "string",
47
- "references": {}
48
- },
49
- "required": false,
50
- "optional": true,
51
- "docs": {
52
- "tags": [],
53
- "text": ""
54
- },
55
- "getter": false,
56
- "setter": false,
57
- "reflect": false,
58
- "attribute": "tone"
59
- }
60
- };
61
- }
62
- }
@@ -1,121 +0,0 @@
1
- :host {
2
- display: inline-flex;
3
- vertical-align: middle;
4
- color: var(--ui-action-secondary-text, var(--ui-text-primary));
5
- }
6
-
7
- :host([data-variant='solid']) {
8
- color: var(--ui-action-primary-text, var(--ui-text-on-accent));
9
- }
10
-
11
- :host([data-variant='outline']) ::slotted(button),
12
- ::slotted(button) {
13
- appearance: none;
14
- min-block-size: var(--ui-button-min-block-size, 2.5rem);
15
- border: 1px solid var(--ui-control-border, var(--ui-border-default));
16
- border-radius: var(--ui-button-radius, var(--ui-radius-2));
17
- background: var(--ui-action-secondary-surface, var(--ui-surface-default));
18
- color: inherit;
19
- font: inherit;
20
- font-weight: var(--ui-font-medium, 500);
21
- line-height: var(--ui-line-height-tight);
22
- padding: var(--ui-space-2) var(--ui-space-3);
23
- cursor: pointer;
24
- transition:
25
- background-color var(--ui-motion-fast) var(--ui-motion-ease),
26
- border-color var(--ui-motion-fast) var(--ui-motion-ease),
27
- color var(--ui-motion-fast) var(--ui-motion-ease),
28
- box-shadow var(--ui-motion-fast) var(--ui-motion-ease),
29
- transform var(--ui-motion-fast) var(--ui-motion-ease);
30
- margin: 0;
31
- }
32
-
33
- :host([data-size='sm']) ::slotted(button) {
34
- padding: var(--ui-space-1) var(--ui-space-2);
35
- font-size: 0.875rem;
36
- }
37
-
38
- :host([data-size='lg']) ::slotted(button) {
39
- min-block-size: var(--ui-control-min-block-size, 2.75rem);
40
- padding: var(--ui-space-3) var(--ui-space-4);
41
- font-size: 1rem;
42
- }
43
-
44
- ::slotted(button:hover:enabled) {
45
- background: var(--ui-action-secondary-surface-hover, var(--ui-surface-muted));
46
- border-color: var(--ui-control-border-hover, var(--ui-border-strong));
47
- }
48
-
49
- ::slotted(button:active:enabled) {
50
- background: var(--ui-surface-subtle);
51
- }
52
-
53
- :host([data-variant='solid']) ::slotted(button) {
54
- border-color: var(--ui-action-primary-surface, var(--ui-accent-solid));
55
- background: var(--ui-action-primary-surface, var(--ui-accent-solid));
56
- color: var(--ui-action-primary-text, var(--ui-text-on-accent));
57
- box-shadow: var(--ui-button-solid-shadow, inset 0 1px rgb(255 255 255 / 0.16), var(--ui-shadow-xs));
58
- }
59
-
60
- :host([data-variant='solid']) ::slotted(button:hover:enabled) {
61
- background: var(--ui-action-primary-surface-hover, var(--ui-accent-hover));
62
- border-color: var(--ui-action-primary-surface-hover, var(--ui-accent-hover));
63
- box-shadow: var(--ui-shadow-sm);
64
- transform: translateY(-1px);
65
- }
66
-
67
- :host([data-variant='solid']) ::slotted(button:active:enabled) {
68
- background: var(--ui-action-primary-surface-active, var(--ui-accent-active));
69
- border-color: var(--ui-action-primary-surface-active, var(--ui-accent-active));
70
- box-shadow: none;
71
- transform: translateY(0);
72
- }
73
-
74
- :host([data-variant='destructive']) ::slotted(button) {
75
- border-color: var(--ui-danger-solid);
76
- background: var(--ui-danger-solid);
77
- color: var(--ui-text-on-accent);
78
- box-shadow: var(--ui-button-destructive-shadow, inset 0 1px rgb(255 255 255 / 0.14), var(--ui-shadow-xs));
79
- }
80
-
81
- :host([data-variant='destructive']) ::slotted(button:hover:enabled) {
82
- background: var(--ui-danger-hover);
83
- border-color: var(--ui-danger-hover);
84
- box-shadow: var(--ui-shadow-sm);
85
- transform: translateY(-1px);
86
- }
87
-
88
- :host([data-variant='destructive']) ::slotted(button:active:enabled) {
89
- box-shadow: none;
90
- transform: translateY(0);
91
- }
92
-
93
- :host([data-variant='ghost']) ::slotted(button) {
94
- border-color: transparent;
95
- background: transparent;
96
- }
97
-
98
- :host([data-variant='ghost']) ::slotted(button:hover:enabled) {
99
- background: var(--ui-surface-muted);
100
- border-color: transparent;
101
- }
102
-
103
- :host([data-variant='ghost']) ::slotted(button:active:enabled) {
104
- background: var(--ui-surface-subtle);
105
- border-color: transparent;
106
- }
107
-
108
- ::slotted(button:focus-visible) {
109
- outline: 2px solid var(--ui-focus-ring);
110
- outline-offset: 2px;
111
- }
112
-
113
- :host([data-disabled='true']),
114
- :host([disabled]) {
115
- opacity: 0.6;
116
- cursor: not-allowed;
117
- }
118
-
119
- ::slotted(button:disabled) {
120
- cursor: not-allowed;
121
- }
@@ -1,141 +0,0 @@
1
- import { Host, h } from "@stencil/core";
2
- import { isActivationKey } from "../../utils/events";
3
- export class UIButton {
4
- host;
5
- variant = 'outline';
6
- size;
7
- // Reflect so the attribute always tracks the property (as ui-icon-button does).
8
- // Without reflection a `disabled` attribute rendered at SSR outlives the enabled
9
- // state after hydration flips the prop, leaving working buttons styled disabled.
10
- disabled = false;
11
- slotRef;
12
- syncToButton() {
13
- const btn = this.getButton();
14
- if (!btn)
15
- return;
16
- if (this.size) {
17
- this.host.dataset.size = this.size;
18
- }
19
- else {
20
- delete this.host.dataset.size;
21
- }
22
- if (this.disabled) {
23
- this.host.dataset.disabled = 'true';
24
- }
25
- else {
26
- delete this.host.dataset.disabled;
27
- }
28
- this.host.dataset.variant = this.variant;
29
- btn.disabled = this.disabled;
30
- }
31
- componentDidLoad() {
32
- this.slotRef?.addEventListener('slotchange', () => this.syncToButton());
33
- this.syncToButton();
34
- }
35
- componentDidUpdate() {
36
- this.syncToButton();
37
- }
38
- getButton() {
39
- const slot = this.host.shadowRoot?.querySelector('slot');
40
- const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
41
- return nodes.find((el) => el.tagName === 'BUTTON') ?? null;
42
- }
43
- onKeydown = (e) => {
44
- const btn = this.getButton();
45
- if (btn || this.disabled || !isActivationKey(e))
46
- return;
47
- e.preventDefault();
48
- this.host.click();
49
- };
50
- render() {
51
- return (h(Host, { key: '27af76cb5db1d0385b6450d2bb12c3bbea5822d2', "data-size": this.size || undefined, "data-variant": this.variant, "data-disabled": this.disabled ? 'true' : undefined, onKeyDown: this.onKeydown }, h("slot", { key: 'daeaa9a8c4e4e87e264bb1e09f1ab6bd1d53830c', ref: (el) => (this.slotRef = el) })));
52
- }
53
- static get is() { return "ui-button"; }
54
- static get encapsulation() { return "shadow"; }
55
- static get originalStyleUrls() {
56
- return {
57
- "$": ["ui-button.css"]
58
- };
59
- }
60
- static get styleUrls() {
61
- return {
62
- "$": ["ui-button.css"]
63
- };
64
- }
65
- static get properties() {
66
- return {
67
- "variant": {
68
- "type": "string",
69
- "mutable": false,
70
- "complexType": {
71
- "original": "'outline' | 'solid' | 'destructive' | 'ghost'",
72
- "resolved": "\"destructive\" | \"ghost\" | \"outline\" | \"solid\"",
73
- "references": {}
74
- },
75
- "required": false,
76
- "optional": false,
77
- "docs": {
78
- "tags": [],
79
- "text": ""
80
- },
81
- "getter": false,
82
- "setter": false,
83
- "reflect": false,
84
- "attribute": "variant",
85
- "defaultValue": "'outline'"
86
- },
87
- "size": {
88
- "type": "string",
89
- "mutable": false,
90
- "complexType": {
91
- "original": "string",
92
- "resolved": "string",
93
- "references": {}
94
- },
95
- "required": false,
96
- "optional": true,
97
- "docs": {
98
- "tags": [],
99
- "text": ""
100
- },
101
- "getter": false,
102
- "setter": false,
103
- "reflect": false,
104
- "attribute": "size"
105
- },
106
- "disabled": {
107
- "type": "boolean",
108
- "mutable": false,
109
- "complexType": {
110
- "original": "boolean",
111
- "resolved": "boolean",
112
- "references": {}
113
- },
114
- "required": false,
115
- "optional": false,
116
- "docs": {
117
- "tags": [],
118
- "text": ""
119
- },
120
- "getter": false,
121
- "setter": false,
122
- "reflect": true,
123
- "attribute": "disabled",
124
- "defaultValue": "false"
125
- }
126
- };
127
- }
128
- static get elementRef() { return "host"; }
129
- static get watchers() {
130
- return [{
131
- "propName": "variant",
132
- "methodName": "syncToButton"
133
- }, {
134
- "propName": "size",
135
- "methodName": "syncToButton"
136
- }, {
137
- "propName": "disabled",
138
- "methodName": "syncToButton"
139
- }];
140
- }
141
- }