tyrell-components 1.0.0-RC13 → 1.0.0-RC14

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 (355) hide show
  1. package/README.md +1 -1
  2. package/css/tyrell-theme.css +167 -178
  3. package/css/tyrell.css +19 -0
  4. package/dist/tyrell-theme.css +167 -178
  5. package/dist/tyrell.css +19 -0
  6. package/dist/tyrell.js +1 -1
  7. package/lib/base/ty-component.d.ts +20 -10
  8. package/lib/base/ty-component.js +21 -144
  9. package/lib/components/button.d.ts +2 -16
  10. package/lib/components/button.js +0 -36
  11. package/lib/components/calendar-month.d.ts +2 -48
  12. package/lib/components/calendar-month.js +4 -166
  13. package/lib/components/calendar-navigation.d.ts +3 -48
  14. package/lib/components/calendar-navigation.js +3 -126
  15. package/lib/components/calendar.d.ts +3 -80
  16. package/lib/components/calendar.js +8 -230
  17. package/lib/components/checkbox.d.ts +4 -71
  18. package/lib/components/checkbox.js +7 -151
  19. package/lib/components/copy.d.ts +3 -56
  20. package/lib/components/copy.js +1 -120
  21. package/lib/components/date-picker.d.ts +13 -162
  22. package/lib/components/date-picker.js +41 -592
  23. package/lib/components/file-upload.d.ts +9 -15
  24. package/lib/components/file-upload.js +19 -41
  25. package/lib/components/icon.d.ts +3 -24
  26. package/lib/components/icon.js +1 -90
  27. package/lib/components/input.d.ts +7 -107
  28. package/lib/components/input.js +5 -193
  29. package/lib/components/modal.d.ts +17 -26
  30. package/lib/components/modal.js +57 -201
  31. package/lib/components/option.d.ts +2 -9
  32. package/lib/components/option.js +0 -48
  33. package/lib/components/popup.d.ts +2 -17
  34. package/lib/components/popup.js +8 -139
  35. package/lib/components/radio.d.ts +3 -23
  36. package/lib/components/radio.js +10 -65
  37. package/lib/components/resize-observer.d.ts +3 -30
  38. package/lib/components/resize-observer.js +12 -46
  39. package/lib/components/scroll-container.d.ts +2 -12
  40. package/lib/components/scroll-container.js +3 -46
  41. package/lib/components/select.d.ts +22 -153
  42. package/lib/components/select.js +33 -590
  43. package/lib/components/selected-tags.d.ts +4 -47
  44. package/lib/components/selected-tags.js +1 -95
  45. package/lib/components/step.d.ts +1 -6
  46. package/lib/components/step.js +0 -6
  47. package/lib/components/switch.d.ts +0 -11
  48. package/lib/components/switch.js +2 -36
  49. package/lib/components/tab.d.ts +1 -6
  50. package/lib/components/tab.js +0 -7
  51. package/lib/components/tabs.d.ts +5 -63
  52. package/lib/components/tabs.js +20 -283
  53. package/lib/components/tag.d.ts +2 -36
  54. package/lib/components/tag.js +5 -105
  55. package/lib/components/textarea.d.ts +6 -86
  56. package/lib/components/textarea.js +2 -173
  57. package/lib/components/tooltip.d.ts +3 -11
  58. package/lib/components/tooltip.js +24 -160
  59. package/lib/components/wizard.d.ts +6 -54
  60. package/lib/components/wizard.js +15 -228
  61. package/lib/icons/fontawesome/brands.d.ts +0 -1
  62. package/lib/icons/fontawesome/brands.js +0 -8
  63. package/lib/icons/fontawesome/regular.d.ts +0 -1
  64. package/lib/icons/fontawesome/regular.js +0 -8
  65. package/lib/icons/fontawesome/solid.d.ts +0 -1
  66. package/lib/icons/fontawesome/solid.js +0 -8
  67. package/lib/icons/heroicons/micro.d.ts +0 -1
  68. package/lib/icons/heroicons/micro.js +0 -8
  69. package/lib/icons/heroicons/mini.d.ts +0 -1
  70. package/lib/icons/heroicons/mini.js +0 -8
  71. package/lib/icons/heroicons/outline.d.ts +0 -1
  72. package/lib/icons/heroicons/outline.js +0 -8
  73. package/lib/icons/heroicons/solid.d.ts +0 -1
  74. package/lib/icons/heroicons/solid.js +0 -8
  75. package/lib/icons/lucide.d.ts +0 -1
  76. package/lib/icons/lucide.js +0 -1872
  77. package/lib/icons/material/filled.d.ts +0 -1
  78. package/lib/icons/material/filled.js +0 -10
  79. package/lib/icons/material/outlined.d.ts +0 -1
  80. package/lib/icons/material/outlined.js +0 -10
  81. package/lib/icons/material/round.d.ts +0 -1
  82. package/lib/icons/material/round.js +0 -10
  83. package/lib/icons/material/sharp.d.ts +0 -1
  84. package/lib/icons/material/sharp.js +0 -10
  85. package/lib/icons/material/two-tone.d.ts +0 -1
  86. package/lib/icons/material/two-tone.js +0 -10
  87. package/lib/index.d.ts +0 -1
  88. package/lib/index.js +0 -20
  89. package/lib/styles/button.d.ts +2 -20
  90. package/lib/styles/button.js +22 -122
  91. package/lib/styles/calendar-month.d.ts +1 -5
  92. package/lib/styles/calendar-month.js +4 -61
  93. package/lib/styles/calendar-navigation.d.ts +2 -6
  94. package/lib/styles/calendar-navigation.js +2 -27
  95. package/lib/styles/calendar.d.ts +1 -2
  96. package/lib/styles/calendar.js +1 -14
  97. package/lib/styles/checkbox.d.ts +0 -1
  98. package/lib/styles/checkbox.js +1 -23
  99. package/lib/styles/copy.d.ts +0 -1
  100. package/lib/styles/copy.js +2 -17
  101. package/lib/styles/custom-scrollbar.d.ts +1 -2
  102. package/lib/styles/custom-scrollbar.js +3 -18
  103. package/lib/styles/date-picker.d.ts +1 -5
  104. package/lib/styles/date-picker.js +35 -39
  105. package/lib/styles/file-upload.d.ts +1 -2
  106. package/lib/styles/file-upload.js +1 -16
  107. package/lib/styles/icon.d.ts +2 -6
  108. package/lib/styles/icon.js +7 -21
  109. package/lib/styles/input.d.ts +1 -6
  110. package/lib/styles/input.js +5 -54
  111. package/lib/styles/modal.d.ts +1 -2
  112. package/lib/styles/modal.js +21 -23
  113. package/lib/styles/option.d.ts +2 -6
  114. package/lib/styles/option.js +17 -12
  115. package/lib/styles/popup.d.ts +1 -2
  116. package/lib/styles/popup.js +26 -30
  117. package/lib/styles/radio.d.ts +0 -1
  118. package/lib/styles/radio.js +2 -16
  119. package/lib/styles/resize-observer.d.ts +1 -2
  120. package/lib/styles/resize-observer.js +0 -7
  121. package/lib/styles/scroll-container.d.ts +1 -2
  122. package/lib/styles/scroll-container.js +0 -19
  123. package/lib/styles/select-base.d.ts +0 -1
  124. package/lib/styles/select-base.js +68 -79
  125. package/lib/styles/select.d.ts +1 -2
  126. package/lib/styles/select.js +7 -15
  127. package/lib/styles/step.d.ts +1 -2
  128. package/lib/styles/step.js +0 -4
  129. package/lib/styles/switch.d.ts +0 -1
  130. package/lib/styles/switch.js +2 -20
  131. package/lib/styles/tab.d.ts +1 -2
  132. package/lib/styles/tab.js +0 -5
  133. package/lib/styles/tabs.d.ts +3 -11
  134. package/lib/styles/tabs.js +10 -48
  135. package/lib/styles/tag.d.ts +1 -5
  136. package/lib/styles/tag.js +2 -31
  137. package/lib/styles/textarea.d.ts +1 -2
  138. package/lib/styles/textarea.js +2 -45
  139. package/lib/styles/tooltip.d.ts +0 -1
  140. package/lib/styles/tooltip.js +0 -10
  141. package/lib/styles/wizard.d.ts +5 -21
  142. package/lib/styles/wizard.js +8 -88
  143. package/lib/types/common.d.ts +0 -2
  144. package/lib/types/common.js +0 -12
  145. package/lib/utils/calendar-utils.d.ts +4 -21
  146. package/lib/utils/calendar-utils.js +4 -177
  147. package/lib/utils/custom-scrollbar.d.ts +6 -20
  148. package/lib/utils/custom-scrollbar.js +1 -45
  149. package/lib/utils/flavor-sheet.d.ts +0 -1
  150. package/lib/utils/flavor-sheet.js +0 -23
  151. package/lib/utils/icon-registry.d.ts +0 -2
  152. package/lib/utils/icon-registry.js +1 -107
  153. package/lib/utils/icons.d.ts +0 -1
  154. package/lib/utils/icons.js +0 -9
  155. package/lib/utils/loader-registry.d.ts +0 -1
  156. package/lib/utils/loader-registry.js +0 -32
  157. package/lib/utils/locale.d.ts +2 -23
  158. package/lib/utils/locale.js +0 -86
  159. package/lib/utils/mobile.d.ts +0 -1
  160. package/lib/utils/mobile.js +0 -17
  161. package/lib/utils/number-format.d.ts +6 -3
  162. package/lib/utils/number-format.js +11 -67
  163. package/lib/utils/positioning.d.ts +50 -7
  164. package/lib/utils/positioning.js +52 -62
  165. package/lib/utils/property-capture.d.ts +5 -27
  166. package/lib/utils/property-capture.js +0 -108
  167. package/lib/utils/property-manager.d.ts +0 -1
  168. package/lib/utils/property-manager.js +0 -70
  169. package/lib/utils/resize-observer.d.ts +0 -1
  170. package/lib/utils/resize-observer.js +0 -36
  171. package/lib/utils/scroll-lock.d.ts +4 -11
  172. package/lib/utils/scroll-lock.js +0 -107
  173. package/lib/utils/styles.d.ts +0 -1
  174. package/lib/utils/styles.js +0 -24
  175. package/lib/version.d.ts +1 -2
  176. package/lib/version.js +1 -11
  177. package/package.json +2 -2
  178. package/lib/base/ty-component.d.ts.map +0 -1
  179. package/lib/base/ty-component.js.map +0 -1
  180. package/lib/components/button.d.ts.map +0 -1
  181. package/lib/components/button.js.map +0 -1
  182. package/lib/components/calendar-month.d.ts.map +0 -1
  183. package/lib/components/calendar-month.js.map +0 -1
  184. package/lib/components/calendar-navigation.d.ts.map +0 -1
  185. package/lib/components/calendar-navigation.js.map +0 -1
  186. package/lib/components/calendar.d.ts.map +0 -1
  187. package/lib/components/calendar.js.map +0 -1
  188. package/lib/components/checkbox.d.ts.map +0 -1
  189. package/lib/components/checkbox.js.map +0 -1
  190. package/lib/components/copy.d.ts.map +0 -1
  191. package/lib/components/copy.js.map +0 -1
  192. package/lib/components/date-picker.d.ts.map +0 -1
  193. package/lib/components/date-picker.js.map +0 -1
  194. package/lib/components/file-upload.d.ts.map +0 -1
  195. package/lib/components/file-upload.js.map +0 -1
  196. package/lib/components/icon.d.ts.map +0 -1
  197. package/lib/components/icon.js.map +0 -1
  198. package/lib/components/input.d.ts.map +0 -1
  199. package/lib/components/input.js.map +0 -1
  200. package/lib/components/modal.d.ts.map +0 -1
  201. package/lib/components/modal.js.map +0 -1
  202. package/lib/components/option.d.ts.map +0 -1
  203. package/lib/components/option.js.map +0 -1
  204. package/lib/components/popup.d.ts.map +0 -1
  205. package/lib/components/popup.js.map +0 -1
  206. package/lib/components/radio.d.ts.map +0 -1
  207. package/lib/components/radio.js.map +0 -1
  208. package/lib/components/resize-observer.d.ts.map +0 -1
  209. package/lib/components/resize-observer.js.map +0 -1
  210. package/lib/components/scroll-container.d.ts.map +0 -1
  211. package/lib/components/scroll-container.js.map +0 -1
  212. package/lib/components/select.d.ts.map +0 -1
  213. package/lib/components/select.js.map +0 -1
  214. package/lib/components/selected-tags.d.ts.map +0 -1
  215. package/lib/components/selected-tags.js.map +0 -1
  216. package/lib/components/step.d.ts.map +0 -1
  217. package/lib/components/step.js.map +0 -1
  218. package/lib/components/switch.d.ts.map +0 -1
  219. package/lib/components/switch.js.map +0 -1
  220. package/lib/components/tab.d.ts.map +0 -1
  221. package/lib/components/tab.js.map +0 -1
  222. package/lib/components/tabs.d.ts.map +0 -1
  223. package/lib/components/tabs.js.map +0 -1
  224. package/lib/components/tag.d.ts.map +0 -1
  225. package/lib/components/tag.js.map +0 -1
  226. package/lib/components/textarea.d.ts.map +0 -1
  227. package/lib/components/textarea.js.map +0 -1
  228. package/lib/components/tooltip.d.ts.map +0 -1
  229. package/lib/components/tooltip.js.map +0 -1
  230. package/lib/components/wizard.d.ts.map +0 -1
  231. package/lib/components/wizard.js.map +0 -1
  232. package/lib/icons/fontawesome/brands.d.ts.map +0 -1
  233. package/lib/icons/fontawesome/brands.js.map +0 -1
  234. package/lib/icons/fontawesome/regular.d.ts.map +0 -1
  235. package/lib/icons/fontawesome/regular.js.map +0 -1
  236. package/lib/icons/fontawesome/solid.d.ts.map +0 -1
  237. package/lib/icons/fontawesome/solid.js.map +0 -1
  238. package/lib/icons/heroicons/micro.d.ts.map +0 -1
  239. package/lib/icons/heroicons/micro.js.map +0 -1
  240. package/lib/icons/heroicons/mini.d.ts.map +0 -1
  241. package/lib/icons/heroicons/mini.js.map +0 -1
  242. package/lib/icons/heroicons/outline.d.ts.map +0 -1
  243. package/lib/icons/heroicons/outline.js.map +0 -1
  244. package/lib/icons/heroicons/solid.d.ts.map +0 -1
  245. package/lib/icons/heroicons/solid.js.map +0 -1
  246. package/lib/icons/lucide.d.ts.map +0 -1
  247. package/lib/icons/lucide.js.map +0 -1
  248. package/lib/icons/material/filled.d.ts.map +0 -1
  249. package/lib/icons/material/filled.js.map +0 -1
  250. package/lib/icons/material/outlined.d.ts.map +0 -1
  251. package/lib/icons/material/outlined.js.map +0 -1
  252. package/lib/icons/material/round.d.ts.map +0 -1
  253. package/lib/icons/material/round.js.map +0 -1
  254. package/lib/icons/material/sharp.d.ts.map +0 -1
  255. package/lib/icons/material/sharp.js.map +0 -1
  256. package/lib/icons/material/two-tone.d.ts.map +0 -1
  257. package/lib/icons/material/two-tone.js.map +0 -1
  258. package/lib/index.d.ts.map +0 -1
  259. package/lib/index.js.map +0 -1
  260. package/lib/styles/button.d.ts.map +0 -1
  261. package/lib/styles/button.js.map +0 -1
  262. package/lib/styles/calendar-month.d.ts.map +0 -1
  263. package/lib/styles/calendar-month.js.map +0 -1
  264. package/lib/styles/calendar-navigation.d.ts.map +0 -1
  265. package/lib/styles/calendar-navigation.js.map +0 -1
  266. package/lib/styles/calendar.d.ts.map +0 -1
  267. package/lib/styles/calendar.js.map +0 -1
  268. package/lib/styles/checkbox.d.ts.map +0 -1
  269. package/lib/styles/checkbox.js.map +0 -1
  270. package/lib/styles/copy.d.ts.map +0 -1
  271. package/lib/styles/copy.js.map +0 -1
  272. package/lib/styles/custom-scrollbar.d.ts.map +0 -1
  273. package/lib/styles/custom-scrollbar.js.map +0 -1
  274. package/lib/styles/date-picker.d.ts.map +0 -1
  275. package/lib/styles/date-picker.js.map +0 -1
  276. package/lib/styles/file-upload.d.ts.map +0 -1
  277. package/lib/styles/file-upload.js.map +0 -1
  278. package/lib/styles/icon.d.ts.map +0 -1
  279. package/lib/styles/icon.js.map +0 -1
  280. package/lib/styles/input.d.ts.map +0 -1
  281. package/lib/styles/input.js.map +0 -1
  282. package/lib/styles/modal.d.ts.map +0 -1
  283. package/lib/styles/modal.js.map +0 -1
  284. package/lib/styles/multiselect.d.ts +0 -8
  285. package/lib/styles/multiselect.d.ts.map +0 -1
  286. package/lib/styles/multiselect.js +0 -849
  287. package/lib/styles/multiselect.js.map +0 -1
  288. package/lib/styles/option.d.ts.map +0 -1
  289. package/lib/styles/option.js.map +0 -1
  290. package/lib/styles/popup.d.ts.map +0 -1
  291. package/lib/styles/popup.js.map +0 -1
  292. package/lib/styles/radio.d.ts.map +0 -1
  293. package/lib/styles/radio.js.map +0 -1
  294. package/lib/styles/resize-observer.d.ts.map +0 -1
  295. package/lib/styles/resize-observer.js.map +0 -1
  296. package/lib/styles/scroll-container.d.ts.map +0 -1
  297. package/lib/styles/scroll-container.js.map +0 -1
  298. package/lib/styles/select-base.d.ts.map +0 -1
  299. package/lib/styles/select-base.js.map +0 -1
  300. package/lib/styles/select.d.ts.map +0 -1
  301. package/lib/styles/select.js.map +0 -1
  302. package/lib/styles/step.d.ts.map +0 -1
  303. package/lib/styles/step.js.map +0 -1
  304. package/lib/styles/switch.d.ts.map +0 -1
  305. package/lib/styles/switch.js.map +0 -1
  306. package/lib/styles/tab.d.ts.map +0 -1
  307. package/lib/styles/tab.js.map +0 -1
  308. package/lib/styles/tabs.d.ts.map +0 -1
  309. package/lib/styles/tabs.js.map +0 -1
  310. package/lib/styles/tag.d.ts.map +0 -1
  311. package/lib/styles/tag.js.map +0 -1
  312. package/lib/styles/textarea.d.ts.map +0 -1
  313. package/lib/styles/textarea.js.map +0 -1
  314. package/lib/styles/tooltip.d.ts.map +0 -1
  315. package/lib/styles/tooltip.js.map +0 -1
  316. package/lib/styles/wizard.d.ts.map +0 -1
  317. package/lib/styles/wizard.js.map +0 -1
  318. package/lib/types/common.d.ts.map +0 -1
  319. package/lib/types/common.js.map +0 -1
  320. package/lib/utils/calendar-utils.d.ts.map +0 -1
  321. package/lib/utils/calendar-utils.js.map +0 -1
  322. package/lib/utils/custom-scrollbar.d.ts.map +0 -1
  323. package/lib/utils/custom-scrollbar.js.map +0 -1
  324. package/lib/utils/flavor-sheet.d.ts.map +0 -1
  325. package/lib/utils/flavor-sheet.js.map +0 -1
  326. package/lib/utils/icon-registry.d.ts.map +0 -1
  327. package/lib/utils/icon-registry.js.map +0 -1
  328. package/lib/utils/icons.d.ts.map +0 -1
  329. package/lib/utils/icons.js.map +0 -1
  330. package/lib/utils/loader-registry.d.ts.map +0 -1
  331. package/lib/utils/loader-registry.js.map +0 -1
  332. package/lib/utils/locale.d.ts.map +0 -1
  333. package/lib/utils/locale.js.map +0 -1
  334. package/lib/utils/mobile.d.ts.map +0 -1
  335. package/lib/utils/mobile.js.map +0 -1
  336. package/lib/utils/number-format.d.ts.map +0 -1
  337. package/lib/utils/number-format.js.map +0 -1
  338. package/lib/utils/parse-boolean.d.ts +0 -39
  339. package/lib/utils/parse-boolean.d.ts.map +0 -1
  340. package/lib/utils/parse-boolean.js +0 -58
  341. package/lib/utils/parse-boolean.js.map +0 -1
  342. package/lib/utils/positioning.d.ts.map +0 -1
  343. package/lib/utils/positioning.js.map +0 -1
  344. package/lib/utils/property-capture.d.ts.map +0 -1
  345. package/lib/utils/property-capture.js.map +0 -1
  346. package/lib/utils/property-manager.d.ts.map +0 -1
  347. package/lib/utils/property-manager.js.map +0 -1
  348. package/lib/utils/resize-observer.d.ts.map +0 -1
  349. package/lib/utils/resize-observer.js.map +0 -1
  350. package/lib/utils/scroll-lock.d.ts.map +0 -1
  351. package/lib/utils/scroll-lock.js.map +0 -1
  352. package/lib/utils/styles.d.ts.map +0 -1
  353. package/lib/utils/styles.js.map +0 -1
  354. package/lib/version.d.ts.map +0 -1
  355. package/lib/version.js.map +0 -1
@@ -1,50 +1,8 @@
1
1
  /**
2
- * TySelectedOptions Web Component
3
- *
4
- * Out-of-band chip display for a picker (ty-select).
5
- * The picker owns the value + form submission; this element just renders the
6
- * selected values as dismissible <ty-tag> chips, anywhere in the layout.
7
- *
8
- * Pairs with any element that exposes a comma-joined `value` string and emits a
9
- * bubbling `change` event. Labels/flavors are read from the picker's matching
10
- * option (`[value="..."]`), so chips stay rich without duplicating data.
11
- *
12
- * If the picker also emits `open`/`close` (ty-select does), the chips hide
13
- * for the duration — the picker's own popup is independently sized/
14
- * positioned and can otherwise visually collide with this row.
15
- *
16
- * Also registered as `ty-selected-tags` — the original tag name, kept
17
- * working indefinitely for backward compatibility. `ty-selected-options` is
18
- * the name going forward: it names the element by what it's driven by
19
- * (a picker's selected `ty-option`s), not by the chip primitive it happens
20
- * to render with.
21
- *
22
- * @example
23
- * ```html
24
- * <ty-select id="robots">
25
- * <ty-option value="bobo" flavor="primary">Bobo Robot</ty-option>
26
- * </ty-select>
27
- * <ty-selected-options for="robots"></ty-selected-options>
28
- * ```
29
- *
30
- * Custom chips via a <template> child. Placeholders {value}, {label}, {flavor}
31
- * and any {data-*} attribute of the matching option are interpolated into
32
- * attributes and text — on cloned DOM nodes, never via innerHTML (no injection).
33
- *
34
- * @example
35
- * ```html
36
- * <ty-select id="team">
37
- * <ty-option value="ivan" data-avatar="/avatars/ivan.png">Ivan</ty-option>
38
- * </ty-select>
39
- * <ty-selected-options for="team">
40
- * <template>
41
- * <ty-tag flavor="{flavor}" dismissible>
42
- * <img slot="start" src="{data-avatar}" class="w-4 h-4 rounded-full">
43
- * {label}
44
- * </ty-tag>
45
- * </template>
46
- * </ty-selected-options>
47
- * ```
2
+ * TySelectedOptions - out-of-band dismissible <ty-tag> chips for a picker's selection.
3
+ * Pairs with any element exposing a comma-joined `value` + bubbling `change`; labels
4
+ * and flavors are read from the picker's matching option (`[value="..."]`). Custom chips
5
+ * come from an optional <template> child, stamped onto cloned nodes (never innerHTML).
48
6
  */
49
7
  export declare class TySelectedOptions extends HTMLElement {
50
8
  static get observedAttributes(): string[];
@@ -90,4 +48,3 @@ export declare class TySelectedOptions extends HTMLElement {
90
48
  /** Remove a value from the picker; picker re-emits change → chips re-render. */
91
49
  private deselect;
92
50
  }
93
- //# sourceMappingURL=selected-tags.d.ts.map
@@ -1,56 +1,6 @@
1
- /**
2
- * TySelectedOptions Web Component
3
- *
4
- * Out-of-band chip display for a picker (ty-select).
5
- * The picker owns the value + form submission; this element just renders the
6
- * selected values as dismissible <ty-tag> chips, anywhere in the layout.
7
- *
8
- * Pairs with any element that exposes a comma-joined `value` string and emits a
9
- * bubbling `change` event. Labels/flavors are read from the picker's matching
10
- * option (`[value="..."]`), so chips stay rich without duplicating data.
11
- *
12
- * If the picker also emits `open`/`close` (ty-select does), the chips hide
13
- * for the duration — the picker's own popup is independently sized/
14
- * positioned and can otherwise visually collide with this row.
15
- *
16
- * Also registered as `ty-selected-tags` — the original tag name, kept
17
- * working indefinitely for backward compatibility. `ty-selected-options` is
18
- * the name going forward: it names the element by what it's driven by
19
- * (a picker's selected `ty-option`s), not by the chip primitive it happens
20
- * to render with.
21
- *
22
- * @example
23
- * ```html
24
- * <ty-select id="robots">
25
- * <ty-option value="bobo" flavor="primary">Bobo Robot</ty-option>
26
- * </ty-select>
27
- * <ty-selected-options for="robots"></ty-selected-options>
28
- * ```
29
- *
30
- * Custom chips via a <template> child. Placeholders {value}, {label}, {flavor}
31
- * and any {data-*} attribute of the matching option are interpolated into
32
- * attributes and text — on cloned DOM nodes, never via innerHTML (no injection).
33
- *
34
- * @example
35
- * ```html
36
- * <ty-select id="team">
37
- * <ty-option value="ivan" data-avatar="/avatars/ivan.png">Ivan</ty-option>
38
- * </ty-select>
39
- * <ty-selected-options for="team">
40
- * <template>
41
- * <ty-tag flavor="{flavor}" dismissible>
42
- * <img slot="start" src="{data-avatar}" class="w-4 h-4 rounded-full">
43
- * {label}
44
- * </ty-tag>
45
- * </template>
46
- * </ty-selected-options>
47
- * ```
48
- */
49
- /** Split a comma-joined picker value into clean values. */
50
1
  function parseValues(raw) {
51
2
  return raw.split(',').map(s => s.trim()).filter(Boolean);
52
3
  }
53
- /** Replace {key} placeholders from ctx; unknown keys are left as-is. */
54
4
  function interpolate(text, ctx) {
55
5
  return text.replace(/\{([\w-]+)\}/g, (match, key) => ctx[key] ?? match);
56
6
  }
@@ -62,12 +12,6 @@ export class TySelectedOptions extends HTMLElement {
62
12
  this._childObserver = null;
63
13
  this._pickerObserver = null;
64
14
  this._lastTemplate = null;
65
- // While the linked picker's own popup is open, its independently-sized,
66
- // independently-positioned dropdown can visually collide with this chip
67
- // row (it's a separate element, placed wherever the consumer wants it —
68
- // there's no layout relationship to enforce). Hiding the chips for the
69
- // duration sidesteps that instead of trying to out-z-index or reflow
70
- // around an overlay whose size/position we don't control.
71
15
  this._restoreDisplay = 'contents';
72
16
  this._onPickerOpen = () => {
73
17
  this._restoreDisplay = this.style.display || 'contents';
@@ -81,15 +25,10 @@ export class TySelectedOptions extends HTMLElement {
81
25
  return ['for'];
82
26
  }
83
27
  connectedCallback() {
84
- // Chips participate directly in the parent layout (flex gap, wrap, etc.)
85
28
  if (!this.style.display)
86
29
  this.style.display = 'contents';
87
30
  this.bind();
88
31
  this.renderChips();
89
- // During HTML parsing we connect BEFORE our <template> child is parsed —
90
- // re-render when it arrives so server-rendered pages get templated chips.
91
- // renderChips re-appends the SAME template node, so its own mutations
92
- // don't change template() identity → no re-render loop.
93
32
  this._childObserver = new MutationObserver(() => {
94
33
  const template = this.template();
95
34
  if (template !== this._lastTemplate) {
@@ -109,7 +48,6 @@ export class TySelectedOptions extends HTMLElement {
109
48
  this.bind();
110
49
  this.renderChips();
111
50
  }
112
- /** Resolve the picker: `for` id, else the previous element sibling. */
113
51
  resolvePicker() {
114
52
  const id = this.getAttribute('for');
115
53
  const el = id
@@ -126,9 +64,6 @@ export class TySelectedOptions extends HTMLElement {
126
64
  this._picker?.addEventListener('change', this._onChange);
127
65
  this._picker?.addEventListener('open', this._onPickerOpen);
128
66
  this._picker?.addEventListener('close', this._onPickerClose);
129
- // The picker stamps `selected` onto its options ASYNC after connect
130
- // (rAF init) and on external option swaps — neither fires `change`.
131
- // Watch the picker's subtree so initial values render as chips too.
132
67
  if (this._picker) {
133
68
  this._pickerObserver = new MutationObserver(() => this.renderChips());
134
69
  this._pickerObserver.observe(this._picker, {
@@ -146,25 +81,18 @@ export class TySelectedOptions extends HTMLElement {
146
81
  this._pickerObserver?.disconnect();
147
82
  this._pickerObserver = null;
148
83
  this._picker = null;
149
- // Don't leave chips hidden if the picker is swapped/removed mid-open.
150
84
  this.style.display = this._restoreDisplay;
151
85
  }
152
86
  values() {
153
87
  return parseValues(this._picker?.value ?? '');
154
88
  }
155
- /** The optional chip template (direct child only). */
156
89
  template() {
157
90
  return this.querySelector(':scope > template');
158
91
  }
159
- /**
160
- * Interpolation context for a value: value, label, flavor plus every
161
- * data-* attribute of the picker's matching option.
162
- */
163
92
  context(value) {
164
93
  const opt = this._picker?.querySelector(`[value="${CSS.escape(value)}"]`);
165
94
  const ctx = {
166
95
  value,
167
- // label attribute wins (native <option label> semantics)
168
96
  label: opt?.getAttribute('label') || opt?.textContent?.trim() || value,
169
97
  flavor: opt?.getAttribute('flavor') ?? '',
170
98
  };
@@ -176,24 +104,13 @@ export class TySelectedOptions extends HTMLElement {
176
104
  }
177
105
  return ctx;
178
106
  }
179
- /**
180
- * The template's blueprint fragment. HTML-parsed templates carry children in
181
- * .content; framework-rendered ones (DOM-created by React/Replicant/etc.)
182
- * carry them as regular childNodes — support both.
183
- */
184
107
  templateSource(template) {
185
- if (template.content.firstElementChild)
108
+ if (template.content.hasChildNodes())
186
109
  return template.content;
187
110
  const frag = document.createDocumentFragment();
188
111
  template.childNodes.forEach(n => frag.appendChild(n.cloneNode(true)));
189
112
  return frag;
190
113
  }
191
- /**
192
- * Stamp the template for one value: clone, interpolate placeholders in
193
- * attributes and text nodes, wire dismiss. Attribute values that were a
194
- * single unresolved placeholder are removed (e.g. flavor="{flavor}" with
195
- * no flavor on the option).
196
- */
197
114
  stampTemplate(template, value) {
198
115
  const ctx = this.context(value);
199
116
  const clone = this.templateSource(template).cloneNode(true);
@@ -210,8 +127,6 @@ export class TySelectedOptions extends HTMLElement {
210
127
  if (!attr.value.includes('{'))
211
128
  continue;
212
129
  const resolved = interpolate(attr.value, ctx);
213
- // Single-placeholder attribute that is empty OR unresolved → drop it
214
- // (e.g. flavor="{flavor}" with no flavor, name="{data-icon}" with no data-icon)
215
130
  if (/^\{[\w-]+\}$/.test(attr.value) && (resolved === '' || resolved === attr.value)) {
216
131
  el.removeAttribute(attr.name);
217
132
  }
@@ -221,7 +136,6 @@ export class TySelectedOptions extends HTMLElement {
221
136
  }
222
137
  }
223
138
  }
224
- // Dismiss anywhere inside the stamped chip deselects this value
225
139
  for (const el of Array.from(clone.children)) {
226
140
  el.addEventListener('dismiss', (e) => {
227
141
  e.stopPropagation();
@@ -230,7 +144,6 @@ export class TySelectedOptions extends HTMLElement {
230
144
  }
231
145
  return clone;
232
146
  }
233
- /** Default chip when no template is provided. */
234
147
  defaultChip(value) {
235
148
  const ctx = this.context(value);
236
149
  const tag = document.createElement('ty-tag');
@@ -250,7 +163,6 @@ export class TySelectedOptions extends HTMLElement {
250
163
  return;
251
164
  }
252
165
  const frag = document.createDocumentFragment();
253
- // Template survives re-renders - it is part of our light DOM
254
166
  if (template)
255
167
  frag.appendChild(template);
256
168
  for (const value of this.values()) {
@@ -258,17 +170,14 @@ export class TySelectedOptions extends HTMLElement {
258
170
  }
259
171
  this.replaceChildren(frag);
260
172
  }
261
- /** Remove a value from the picker; picker re-emits change → chips re-render. */
262
173
  deselect(value) {
263
174
  if (!this._picker)
264
175
  return;
265
176
  const picker = this._picker;
266
177
  if (typeof picker.deselectValue === 'function') {
267
- // ty-select path — fires a proper change event (chips re-render via listener)
268
178
  picker.deselectValue(value);
269
179
  }
270
180
  else {
271
- // Generic picker fallback — value setters usually don't emit change
272
181
  picker.value = this.values().filter(v => v !== value).join(',');
273
182
  this.renderChips();
274
183
  }
@@ -277,10 +186,7 @@ export class TySelectedOptions extends HTMLElement {
277
186
  if (!customElements.get('ty-selected-options')) {
278
187
  customElements.define('ty-selected-options', TySelectedOptions);
279
188
  }
280
- // Original tag name — kept working indefinitely. A constructor can only
281
- // register once, hence the subclass (see ty-modal/ty-dialog for precedent).
282
189
  if (!customElements.get('ty-selected-tags')) {
283
190
  customElements.define('ty-selected-tags', class TySelectedTags extends TySelectedOptions {
284
191
  });
285
192
  }
286
- //# sourceMappingURL=selected-tags.js.map
@@ -1,8 +1,4 @@
1
- /**
2
- * Step Component
3
- *
4
- * Individual wizard step panel with custom scrollbar via CustomScrollbar utility.
5
- */
1
+ /** Individual wizard step panel with custom scrollbar via CustomScrollbar utility. */
6
2
  export type StepStatus = 'completed' | 'active' | 'pending' | 'error';
7
3
  export interface StepAttributes {
8
4
  id: string | null;
@@ -23,4 +19,3 @@ export declare class TyStep extends HTMLElement {
23
19
  private _destroyScrollbar;
24
20
  resetScroll(): void;
25
21
  }
26
- //# sourceMappingURL=step.d.ts.map
@@ -1,8 +1,3 @@
1
- /**
2
- * Step Component
3
- *
4
- * Individual wizard step panel with custom scrollbar via CustomScrollbar utility.
5
- */
6
1
  import { ensureStyles } from '../utils/styles.js';
7
2
  import { stepStyles } from '../styles/step.js';
8
3
  import { CustomScrollbar, isCustomScrollbarEnabled } from '../utils/custom-scrollbar.js';
@@ -72,4 +67,3 @@ export class TyStep extends HTMLElement {
72
67
  if (!customElements.get('ty-step')) {
73
68
  customElements.define('ty-step', TyStep);
74
69
  }
75
- //# sourceMappingURL=step.js.map
@@ -4,16 +4,6 @@
4
4
  * "Just the toggle" primitive — renders only the track + thumb visual.
5
5
  * Label, required asterisk, and error display are the consumer's
6
6
  * responsibility — wrap in a `<label>` for click delegation.
7
- *
8
- * - Boolean checked state, role="switch" ARIA
9
- * - Form-associated, keyboard accessibility
10
- * - Sizes (xs, sm, md, lg, xl) and semantic flavors
11
- *
12
- * @example
13
- * <label>
14
- * <ty-switch name="notifications" checked></ty-switch>
15
- * Email notifications
16
- * </label>
17
7
  */
18
8
  import type { Flavor, Size } from "../types/common.js";
19
9
  import { TyComponent } from "../base/ty-component.js";
@@ -111,4 +101,3 @@ export declare class TySwitch extends TyComponent<SwitchState> implements TySwit
111
101
  get form(): HTMLFormElement | null;
112
102
  }
113
103
  export {};
114
- //# sourceMappingURL=switch.d.ts.map
@@ -1,20 +1,3 @@
1
- /**
2
- * TySwitch Web Component
3
- *
4
- * "Just the toggle" primitive — renders only the track + thumb visual.
5
- * Label, required asterisk, and error display are the consumer's
6
- * responsibility — wrap in a `<label>` for click delegation.
7
- *
8
- * - Boolean checked state, role="switch" ARIA
9
- * - Form-associated, keyboard accessibility
10
- * - Sizes (xs, sm, md, lg, xl) and semantic flavors
11
- *
12
- * @example
13
- * <label>
14
- * <ty-switch name="notifications" checked></ty-switch>
15
- * Email notifications
16
- * </label>
17
- */
18
1
  import { TyComponent } from "../base/ty-component.js";
19
2
  import { ensureStyles } from "../utils/styles.js";
20
3
  import { syncCustomFlavorSheet } from "../utils/flavor-sheet.js";
@@ -32,8 +15,6 @@ export class TySwitch extends TyComponent {
32
15
  ensureStyles(shadow, { css: switchStyles, id: "ty-switch" });
33
16
  }
34
17
  onConnect() {
35
- // Re-arm listeners on RE-connect (base skips render() when already
36
- // rendered; onDisconnect removed them). No-op on first connect.
37
18
  this.setupEventListeners();
38
19
  this._syncCustomFlavor();
39
20
  }
@@ -45,7 +26,6 @@ export class TySwitch extends TyComponent {
45
26
  this._syncCustomFlavor();
46
27
  }
47
28
  }
48
- /** Custom (non-built-in) flavors — see utils/flavor-sheet.ts. */
49
29
  _syncCustomFlavor() {
50
30
  this._customFlavorSheet = syncCustomFlavorSheet(this.shadowRoot, this._customFlavorSheet, this.flavor, ({ base }) => switchCustomFlavorCss(base));
51
31
  }
@@ -63,6 +43,8 @@ export class TySwitch extends TyComponent {
63
43
  handleSwitchClick(e) {
64
44
  if (this.disabled)
65
45
  return;
46
+ if (this.isDuplicateActivationClick())
47
+ return;
66
48
  const newValue = !this.checked;
67
49
  this.checked = newValue;
68
50
  setTimeout(() => {
@@ -88,8 +70,6 @@ export class TySwitch extends TyComponent {
88
70
  removeEventListeners() {
89
71
  if (!this._listenersSetup)
90
72
  return;
91
- // Click lives on the HOST (label delegation + full-element trigger) —
92
- // remove it before the shadow-container guard below.
93
73
  if (this._clickHandler) {
94
74
  this.removeEventListener("click", this._clickHandler);
95
75
  this._clickHandler = null;
@@ -127,8 +107,6 @@ export class TySwitch extends TyComponent {
127
107
  this._keydownHandler = (e) => this.handleSwitchKeydown(e);
128
108
  this._focusHandler = () => el.classList.add("focused");
129
109
  this._blurHandler = () => el.classList.remove("focused");
130
- // Click on the HOST: whole element is a trigger and a wrapping <label>
131
- // delegates (the synthetic click lands on the host, not the shadow).
132
110
  this.addEventListener("click", this._clickHandler);
133
111
  el.addEventListener("keydown", this._keydownHandler);
134
112
  el.addEventListener("focus", this._focusHandler);
@@ -162,15 +140,10 @@ export class TySwitch extends TyComponent {
162
140
  switchEl.setAttribute("aria-disabled", this.disabled ? "true" : "false");
163
141
  switchEl.setAttribute("aria-required", this.required ? "true" : "false");
164
142
  }
165
- // (Re)attach listeners — onDisconnect removes them, so a reconnected
166
- // element needs them again even though the container already exists.
167
143
  this.setupEventListeners();
168
- // a11y: mirror the wrapping <label> name onto the role="switch" element.
169
144
  this.applyLabelName(switchEl);
170
- // Reflect constraint validation to the owning <form> (required was cosmetic).
171
145
  this.updateValidity();
172
146
  }
173
- /** required + unchecked => valueMissing; otherwise valid. */
174
147
  updateValidity() {
175
148
  const anchor = this.shadowRoot?.querySelector(".switch-container");
176
149
  if (this.disabled) {
@@ -184,9 +157,6 @@ export class TySwitch extends TyComponent {
184
157
  this._internals.setValidity({});
185
158
  }
186
159
  }
187
- // ============================================================================
188
- // PROPERTY ACCESSORS
189
- // ============================================================================
190
160
  get checked() { return this.getProperty("checked"); }
191
161
  set checked(value) { this.setProperty("checked", value); }
192
162
  get value() { return this.getProperty("value"); }
@@ -243,9 +213,6 @@ TySwitch.properties = {
243
213
  return v;
244
214
  },
245
215
  },
246
- // Any string is accepted: built-ins get static CSS, other identifiers
247
- // become custom flavors (see _syncCustomFlavor), garbage degrades to
248
- // the default look.
249
216
  flavor: {
250
217
  type: "string",
251
218
  visual: true,
@@ -255,4 +222,3 @@ TySwitch.properties = {
255
222
  if (!customElements.get("ty-switch")) {
256
223
  customElements.define("ty-switch", TySwitch);
257
224
  }
258
- //# sourceMappingURL=switch.js.map
@@ -1,8 +1,4 @@
1
- /**
2
- * Tab Component
3
- *
4
- * Individual tab panel with custom scrollbar via CustomScrollbar utility.
5
- */
1
+ /** Individual tab panel with custom scrollbar via CustomScrollbar utility. */
6
2
  export interface TabAttributes {
7
3
  id: string | null;
8
4
  label: string | null;
@@ -20,4 +16,3 @@ export declare class TyTab extends HTMLElement {
20
16
  private _destroyScrollbar;
21
17
  resetScroll(): void;
22
18
  }
23
- //# sourceMappingURL=tab.d.ts.map
@@ -1,8 +1,3 @@
1
- /**
2
- * Tab Component
3
- *
4
- * Individual tab panel with custom scrollbar via CustomScrollbar utility.
5
- */
6
1
  import { ensureStyles } from '../utils/styles.js';
7
2
  import { tabStyles } from '../styles/tab.js';
8
3
  import { CustomScrollbar, isCustomScrollbarEnabled } from '../utils/custom-scrollbar.js';
@@ -54,7 +49,6 @@ export class TyTab extends HTMLElement {
54
49
  return;
55
50
  panel.classList.add('ty-custom-scroll');
56
51
  this._scrollbar = new CustomScrollbar(panel, { vertical: true });
57
- // Append track to wrapper (outside the scroll area, so it stays fixed)
58
52
  if (this._scrollbar.trackY) {
59
53
  wrapper.appendChild(this._scrollbar.trackY);
60
54
  }
@@ -73,4 +67,3 @@ export class TyTab extends HTMLElement {
73
67
  if (!customElements.get('ty-tab')) {
74
68
  customElements.define('ty-tab', TyTab);
75
69
  }
76
- //# sourceMappingURL=tab.js.map
@@ -1,65 +1,7 @@
1
1
  /**
2
- * Tabs Component
3
- *
4
- * A carousel-based tabs component with smooth animations and fixed container dimensions.
5
- * Features horizontal sliding transitions, smart positioning marker, and independent panel scrolling.
6
- *
7
- * Features:
8
- * - Carousel animation with smooth sliding transitions
9
- * - Fixed dimensions prevent layout shift between tabs
10
- * - Animated marker that follows active tab button
11
- * - Rich label support via slots (icons, badges, custom content)
12
- * - Custom marker slot for complete active tab styling control
13
- * - Independent panel scrolling with scroll position reset
14
- * - ResizeObserver for responsive percentage widths
15
- * - Smart rendering - only updates DOM when necessary
16
- * - Accessibility with ARIA roles and attributes
17
- * - Top/bottom placement for tab buttons
18
- *
19
- * @example
20
- * <!-- Basic tabs with text labels -->
21
- * <ty-tabs width="800px" height="600px" active="general">
22
- * <ty-tab id="general" label="General Settings">
23
- * <div class="p-6">General content...</div>
24
- * </ty-tab>
25
- * <ty-tab id="advanced" label="Advanced Settings">
26
- * <div class="p-6">Advanced content...</div>
27
- * </ty-tab>
28
- * </ty-tabs>
29
- *
30
- * @example
31
- * <!-- Rich labels with icons and badges -->
32
- * <ty-tabs width="800px" height="600px">
33
- * <!-- Rich label as direct child -->
34
- * <span slot="label-profile" class="flex items-center gap-2">
35
- * <ty-icon name="user" size="sm"></ty-icon>
36
- * Profile
37
- * </span>
38
- *
39
- * <span slot="label-notifications" class="flex items-center gap-2">
40
- * <ty-icon name="bell" size="sm"></ty-icon>
41
- * Notifications
42
- * <span class="ty-bg-danger ty-text-danger++ px-2 py-0.5 rounded-full text-xs">5</span>
43
- * </span>
44
- *
45
- * <!-- Tab panels -->
46
- * <ty-tab id="profile">...</ty-tab>
47
- * <ty-tab id="notifications">...</ty-tab>
48
- * </ty-tabs>
49
- *
50
- * @example
51
- * <!-- Custom marker styling -->
52
- * <ty-tabs width="100%" height="400px">
53
- * <!-- Gradient marker slot -->
54
- * <div slot="marker" style="
55
- * background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
56
- * border-radius: 0.5rem;
57
- * box-shadow: 0 2px 8px rgba(0,0,0,0.15);
58
- * "></div>
59
- *
60
- * <ty-tab id="tab1" label="Dashboard">...</ty-tab>
61
- * <ty-tab id="tab2" label="Analytics">...</ty-tab>
62
- * </ty-tabs>
2
+ * Tabs Component — carousel-based tabs with sliding transitions, an animated
3
+ * active marker, and fixed container dimensions. Expects `ty-tab` children;
4
+ * rich labels come from `slot="label-{tab-id}"` children of `ty-tabs` itself.
63
5
  */
64
6
  /**
65
7
  * Tabs container attributes configuration
@@ -83,11 +25,11 @@ export interface TabChangeDetail {
83
25
  * TyTabs Web Component
84
26
  */
85
27
  export declare class TyTabs extends HTMLElement {
86
- /** Observed attributes */
87
28
  static get observedAttributes(): string[];
88
29
  constructor();
30
+ private _childObserver;
31
+ private _childRenderQueued;
89
32
  connectedCallback(): void;
90
33
  disconnectedCallback(): void;
91
34
  attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
92
35
  }
93
- //# sourceMappingURL=tabs.d.ts.map