tyrell-components 1.0.0-RC13 → 1.0.0-RC15

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 (358) hide show
  1. package/README.md +10 -2
  2. package/css/tyrell-theme.css +192 -180
  3. package/css/tyrell.css +23 -0
  4. package/dist/tyrell-colors-static.css +1 -316
  5. package/dist/tyrell-theme.css +1 -1454
  6. package/dist/tyrell.css +1 -1371
  7. package/dist/tyrell.js +1 -1
  8. package/lib/base/ty-component.d.ts +20 -10
  9. package/lib/base/ty-component.js +196 -319
  10. package/lib/components/button.d.ts +3 -17
  11. package/lib/components/button.js +261 -295
  12. package/lib/components/calendar-month.d.ts +4 -50
  13. package/lib/components/calendar-month.js +443 -582
  14. package/lib/components/calendar-navigation.d.ts +3 -48
  15. package/lib/components/calendar-navigation.js +239 -362
  16. package/lib/components/calendar.d.ts +8 -83
  17. package/lib/components/calendar.js +616 -829
  18. package/lib/components/checkbox.d.ts +5 -72
  19. package/lib/components/checkbox.js +273 -416
  20. package/lib/components/copy.d.ts +4 -57
  21. package/lib/components/copy.js +280 -397
  22. package/lib/components/date-picker.d.ts +21 -163
  23. package/lib/components/date-picker.js +1143 -1674
  24. package/lib/components/file-upload.d.ts +9 -15
  25. package/lib/components/file-upload.js +404 -426
  26. package/lib/components/icon.d.ts +3 -24
  27. package/lib/components/icon.js +141 -230
  28. package/lib/components/input.d.ts +8 -108
  29. package/lib/components/input.js +593 -784
  30. package/lib/components/modal.d.ts +17 -26
  31. package/lib/components/modal.js +340 -484
  32. package/lib/components/option.d.ts +2 -9
  33. package/lib/components/option.js +168 -216
  34. package/lib/components/popup.d.ts +2 -17
  35. package/lib/components/popup.js +249 -380
  36. package/lib/components/radio.d.ts +5 -25
  37. package/lib/components/radio.js +407 -461
  38. package/lib/components/resize-observer.d.ts +3 -30
  39. package/lib/components/resize-observer.js +69 -103
  40. package/lib/components/scroll-container.d.ts +2 -12
  41. package/lib/components/scroll-container.js +293 -338
  42. package/lib/components/select.d.ts +87 -159
  43. package/lib/components/select.js +1609 -2090
  44. package/lib/components/selected-tags.d.ts +5 -48
  45. package/lib/components/selected-tags.js +188 -276
  46. package/lib/components/step.d.ts +1 -6
  47. package/lib/components/step.js +62 -68
  48. package/lib/components/switch.d.ts +1 -12
  49. package/lib/components/switch.js +214 -247
  50. package/lib/components/tab.d.ts +1 -6
  51. package/lib/components/tab.js +62 -69
  52. package/lib/components/tabs.d.ts +6 -63
  53. package/lib/components/tabs.js +545 -777
  54. package/lib/components/tag.d.ts +3 -37
  55. package/lib/components/tag.js +236 -335
  56. package/lib/components/textarea.d.ts +7 -87
  57. package/lib/components/textarea.js +457 -627
  58. package/lib/components/tooltip.d.ts +3 -11
  59. package/lib/components/tooltip.js +307 -443
  60. package/lib/components/wizard.d.ts +6 -54
  61. package/lib/components/wizard.js +405 -618
  62. package/lib/icons/fontawesome/brands.d.ts +0 -1
  63. package/lib/icons/fontawesome/brands.js +0 -8
  64. package/lib/icons/fontawesome/regular.d.ts +0 -1
  65. package/lib/icons/fontawesome/regular.js +0 -8
  66. package/lib/icons/fontawesome/solid.d.ts +0 -1
  67. package/lib/icons/fontawesome/solid.js +0 -8
  68. package/lib/icons/heroicons/micro.d.ts +0 -1
  69. package/lib/icons/heroicons/micro.js +392 -400
  70. package/lib/icons/heroicons/mini.d.ts +0 -1
  71. package/lib/icons/heroicons/mini.js +382 -390
  72. package/lib/icons/heroicons/outline.d.ts +0 -1
  73. package/lib/icons/heroicons/outline.js +337 -345
  74. package/lib/icons/heroicons/solid.d.ts +0 -1
  75. package/lib/icons/heroicons/solid.js +407 -415
  76. package/lib/icons/lucide.d.ts +0 -1
  77. package/lib/icons/lucide.js +24479 -26351
  78. package/lib/icons/material/filled.d.ts +0 -1
  79. package/lib/icons/material/filled.js +9653 -9663
  80. package/lib/icons/material/outlined.d.ts +0 -1
  81. package/lib/icons/material/outlined.js +10271 -10281
  82. package/lib/icons/material/round.d.ts +0 -1
  83. package/lib/icons/material/round.js +10495 -10505
  84. package/lib/icons/material/sharp.d.ts +0 -1
  85. package/lib/icons/material/sharp.js +9905 -9915
  86. package/lib/icons/material/two-tone.d.ts +0 -1
  87. package/lib/icons/material/two-tone.js +12792 -12802
  88. package/lib/index.d.ts +0 -1
  89. package/lib/index.js +21 -41
  90. package/lib/styles/button.d.ts +2 -20
  91. package/lib/styles/button.js +202 -404
  92. package/lib/styles/calendar-month.d.ts +1 -5
  93. package/lib/styles/calendar-month.js +127 -244
  94. package/lib/styles/calendar-navigation.d.ts +2 -6
  95. package/lib/styles/calendar-navigation.js +64 -104
  96. package/lib/styles/calendar.d.ts +1 -2
  97. package/lib/styles/calendar.js +9 -22
  98. package/lib/styles/checkbox.d.ts +0 -1
  99. package/lib/styles/checkbox.js +45 -94
  100. package/lib/styles/copy.d.ts +0 -1
  101. package/lib/styles/copy.js +67 -106
  102. package/lib/styles/custom-scrollbar.d.ts +1 -2
  103. package/lib/styles/custom-scrollbar.js +80 -115
  104. package/lib/styles/date-picker.d.ts +1 -5
  105. package/lib/styles/date-picker.js +261 -335
  106. package/lib/styles/field-size.d.ts +6 -0
  107. package/lib/styles/field-size.js +91 -0
  108. package/lib/styles/file-upload.d.ts +1 -2
  109. package/lib/styles/file-upload.js +143 -188
  110. package/lib/styles/icon.d.ts +2 -6
  111. package/lib/styles/icon.js +92 -170
  112. package/lib/styles/input.d.ts +1 -6
  113. package/lib/styles/input.js +125 -290
  114. package/lib/styles/modal.d.ts +1 -2
  115. package/lib/styles/modal.js +71 -108
  116. package/lib/styles/option.d.ts +2 -6
  117. package/lib/styles/option.js +49 -64
  118. package/lib/styles/popup.d.ts +1 -2
  119. package/lib/styles/popup.js +42 -77
  120. package/lib/styles/radio.d.ts +0 -1
  121. package/lib/styles/radio.js +69 -110
  122. package/lib/styles/resize-observer.d.ts +1 -2
  123. package/lib/styles/resize-observer.js +2 -12
  124. package/lib/styles/scroll-container.d.ts +1 -2
  125. package/lib/styles/scroll-container.js +100 -149
  126. package/lib/styles/select-base.d.ts +0 -1
  127. package/lib/styles/select-base.js +597 -785
  128. package/lib/styles/select.d.ts +1 -2
  129. package/lib/styles/select.js +140 -236
  130. package/lib/styles/step.d.ts +1 -2
  131. package/lib/styles/step.js +22 -33
  132. package/lib/styles/switch.d.ts +0 -1
  133. package/lib/styles/switch.js +34 -73
  134. package/lib/styles/tab.d.ts +1 -2
  135. package/lib/styles/tab.js +22 -34
  136. package/lib/styles/tabs.d.ts +3 -11
  137. package/lib/styles/tabs.js +190 -222
  138. package/lib/styles/tag.d.ts +1 -5
  139. package/lib/styles/tag.js +136 -218
  140. package/lib/styles/textarea.d.ts +1 -2
  141. package/lib/styles/textarea.js +210 -319
  142. package/lib/styles/tooltip.d.ts +0 -1
  143. package/lib/styles/tooltip.js +3 -13
  144. package/lib/styles/wizard.d.ts +5 -21
  145. package/lib/styles/wizard.js +170 -306
  146. package/lib/types/common.d.ts +2 -2
  147. package/lib/types/common.js +6 -17
  148. package/lib/utils/calendar-utils.d.ts +4 -21
  149. package/lib/utils/calendar-utils.js +100 -273
  150. package/lib/utils/custom-scrollbar.d.ts +6 -20
  151. package/lib/utils/custom-scrollbar.js +273 -317
  152. package/lib/utils/flavor-sheet.d.ts +0 -1
  153. package/lib/utils/flavor-sheet.js +14 -37
  154. package/lib/utils/icon-registry.d.ts +0 -2
  155. package/lib/utils/icon-registry.js +137 -243
  156. package/lib/utils/icons.d.ts +0 -1
  157. package/lib/utils/icons.js +0 -9
  158. package/lib/utils/loader-registry.d.ts +0 -1
  159. package/lib/utils/loader-registry.js +3 -35
  160. package/lib/utils/locale.d.ts +2 -23
  161. package/lib/utils/locale.js +34 -120
  162. package/lib/utils/mobile.d.ts +0 -1
  163. package/lib/utils/mobile.js +1 -18
  164. package/lib/utils/number-format.d.ts +6 -3
  165. package/lib/utils/number-format.js +54 -110
  166. package/lib/utils/positioning.d.ts +50 -7
  167. package/lib/utils/positioning.js +224 -234
  168. package/lib/utils/property-capture.d.ts +5 -27
  169. package/lib/utils/property-capture.js +36 -144
  170. package/lib/utils/property-manager.d.ts +0 -1
  171. package/lib/utils/property-manager.js +126 -196
  172. package/lib/utils/resize-observer.d.ts +0 -1
  173. package/lib/utils/resize-observer.js +23 -59
  174. package/lib/utils/scroll-lock.d.ts +4 -11
  175. package/lib/utils/scroll-lock.js +65 -172
  176. package/lib/utils/styles.d.ts +0 -1
  177. package/lib/utils/styles.js +17 -41
  178. package/lib/version.d.ts +1 -2
  179. package/lib/version.js +1 -11
  180. package/package.json +4 -4
  181. package/lib/base/ty-component.d.ts.map +0 -1
  182. package/lib/base/ty-component.js.map +0 -1
  183. package/lib/components/button.d.ts.map +0 -1
  184. package/lib/components/button.js.map +0 -1
  185. package/lib/components/calendar-month.d.ts.map +0 -1
  186. package/lib/components/calendar-month.js.map +0 -1
  187. package/lib/components/calendar-navigation.d.ts.map +0 -1
  188. package/lib/components/calendar-navigation.js.map +0 -1
  189. package/lib/components/calendar.d.ts.map +0 -1
  190. package/lib/components/calendar.js.map +0 -1
  191. package/lib/components/checkbox.d.ts.map +0 -1
  192. package/lib/components/checkbox.js.map +0 -1
  193. package/lib/components/copy.d.ts.map +0 -1
  194. package/lib/components/copy.js.map +0 -1
  195. package/lib/components/date-picker.d.ts.map +0 -1
  196. package/lib/components/date-picker.js.map +0 -1
  197. package/lib/components/file-upload.d.ts.map +0 -1
  198. package/lib/components/file-upload.js.map +0 -1
  199. package/lib/components/icon.d.ts.map +0 -1
  200. package/lib/components/icon.js.map +0 -1
  201. package/lib/components/input.d.ts.map +0 -1
  202. package/lib/components/input.js.map +0 -1
  203. package/lib/components/modal.d.ts.map +0 -1
  204. package/lib/components/modal.js.map +0 -1
  205. package/lib/components/option.d.ts.map +0 -1
  206. package/lib/components/option.js.map +0 -1
  207. package/lib/components/popup.d.ts.map +0 -1
  208. package/lib/components/popup.js.map +0 -1
  209. package/lib/components/radio.d.ts.map +0 -1
  210. package/lib/components/radio.js.map +0 -1
  211. package/lib/components/resize-observer.d.ts.map +0 -1
  212. package/lib/components/resize-observer.js.map +0 -1
  213. package/lib/components/scroll-container.d.ts.map +0 -1
  214. package/lib/components/scroll-container.js.map +0 -1
  215. package/lib/components/select.d.ts.map +0 -1
  216. package/lib/components/select.js.map +0 -1
  217. package/lib/components/selected-tags.d.ts.map +0 -1
  218. package/lib/components/selected-tags.js.map +0 -1
  219. package/lib/components/step.d.ts.map +0 -1
  220. package/lib/components/step.js.map +0 -1
  221. package/lib/components/switch.d.ts.map +0 -1
  222. package/lib/components/switch.js.map +0 -1
  223. package/lib/components/tab.d.ts.map +0 -1
  224. package/lib/components/tab.js.map +0 -1
  225. package/lib/components/tabs.d.ts.map +0 -1
  226. package/lib/components/tabs.js.map +0 -1
  227. package/lib/components/tag.d.ts.map +0 -1
  228. package/lib/components/tag.js.map +0 -1
  229. package/lib/components/textarea.d.ts.map +0 -1
  230. package/lib/components/textarea.js.map +0 -1
  231. package/lib/components/tooltip.d.ts.map +0 -1
  232. package/lib/components/tooltip.js.map +0 -1
  233. package/lib/components/wizard.d.ts.map +0 -1
  234. package/lib/components/wizard.js.map +0 -1
  235. package/lib/icons/fontawesome/brands.d.ts.map +0 -1
  236. package/lib/icons/fontawesome/brands.js.map +0 -1
  237. package/lib/icons/fontawesome/regular.d.ts.map +0 -1
  238. package/lib/icons/fontawesome/regular.js.map +0 -1
  239. package/lib/icons/fontawesome/solid.d.ts.map +0 -1
  240. package/lib/icons/fontawesome/solid.js.map +0 -1
  241. package/lib/icons/heroicons/micro.d.ts.map +0 -1
  242. package/lib/icons/heroicons/micro.js.map +0 -1
  243. package/lib/icons/heroicons/mini.d.ts.map +0 -1
  244. package/lib/icons/heroicons/mini.js.map +0 -1
  245. package/lib/icons/heroicons/outline.d.ts.map +0 -1
  246. package/lib/icons/heroicons/outline.js.map +0 -1
  247. package/lib/icons/heroicons/solid.d.ts.map +0 -1
  248. package/lib/icons/heroicons/solid.js.map +0 -1
  249. package/lib/icons/lucide.d.ts.map +0 -1
  250. package/lib/icons/lucide.js.map +0 -1
  251. package/lib/icons/material/filled.d.ts.map +0 -1
  252. package/lib/icons/material/filled.js.map +0 -1
  253. package/lib/icons/material/outlined.d.ts.map +0 -1
  254. package/lib/icons/material/outlined.js.map +0 -1
  255. package/lib/icons/material/round.d.ts.map +0 -1
  256. package/lib/icons/material/round.js.map +0 -1
  257. package/lib/icons/material/sharp.d.ts.map +0 -1
  258. package/lib/icons/material/sharp.js.map +0 -1
  259. package/lib/icons/material/two-tone.d.ts.map +0 -1
  260. package/lib/icons/material/two-tone.js.map +0 -1
  261. package/lib/index.d.ts.map +0 -1
  262. package/lib/index.js.map +0 -1
  263. package/lib/styles/button.d.ts.map +0 -1
  264. package/lib/styles/button.js.map +0 -1
  265. package/lib/styles/calendar-month.d.ts.map +0 -1
  266. package/lib/styles/calendar-month.js.map +0 -1
  267. package/lib/styles/calendar-navigation.d.ts.map +0 -1
  268. package/lib/styles/calendar-navigation.js.map +0 -1
  269. package/lib/styles/calendar.d.ts.map +0 -1
  270. package/lib/styles/calendar.js.map +0 -1
  271. package/lib/styles/checkbox.d.ts.map +0 -1
  272. package/lib/styles/checkbox.js.map +0 -1
  273. package/lib/styles/copy.d.ts.map +0 -1
  274. package/lib/styles/copy.js.map +0 -1
  275. package/lib/styles/custom-scrollbar.d.ts.map +0 -1
  276. package/lib/styles/custom-scrollbar.js.map +0 -1
  277. package/lib/styles/date-picker.d.ts.map +0 -1
  278. package/lib/styles/date-picker.js.map +0 -1
  279. package/lib/styles/file-upload.d.ts.map +0 -1
  280. package/lib/styles/file-upload.js.map +0 -1
  281. package/lib/styles/icon.d.ts.map +0 -1
  282. package/lib/styles/icon.js.map +0 -1
  283. package/lib/styles/input.d.ts.map +0 -1
  284. package/lib/styles/input.js.map +0 -1
  285. package/lib/styles/modal.d.ts.map +0 -1
  286. package/lib/styles/modal.js.map +0 -1
  287. package/lib/styles/multiselect.d.ts +0 -8
  288. package/lib/styles/multiselect.d.ts.map +0 -1
  289. package/lib/styles/multiselect.js +0 -849
  290. package/lib/styles/multiselect.js.map +0 -1
  291. package/lib/styles/option.d.ts.map +0 -1
  292. package/lib/styles/option.js.map +0 -1
  293. package/lib/styles/popup.d.ts.map +0 -1
  294. package/lib/styles/popup.js.map +0 -1
  295. package/lib/styles/radio.d.ts.map +0 -1
  296. package/lib/styles/radio.js.map +0 -1
  297. package/lib/styles/resize-observer.d.ts.map +0 -1
  298. package/lib/styles/resize-observer.js.map +0 -1
  299. package/lib/styles/scroll-container.d.ts.map +0 -1
  300. package/lib/styles/scroll-container.js.map +0 -1
  301. package/lib/styles/select-base.d.ts.map +0 -1
  302. package/lib/styles/select-base.js.map +0 -1
  303. package/lib/styles/select.d.ts.map +0 -1
  304. package/lib/styles/select.js.map +0 -1
  305. package/lib/styles/step.d.ts.map +0 -1
  306. package/lib/styles/step.js.map +0 -1
  307. package/lib/styles/switch.d.ts.map +0 -1
  308. package/lib/styles/switch.js.map +0 -1
  309. package/lib/styles/tab.d.ts.map +0 -1
  310. package/lib/styles/tab.js.map +0 -1
  311. package/lib/styles/tabs.d.ts.map +0 -1
  312. package/lib/styles/tabs.js.map +0 -1
  313. package/lib/styles/tag.d.ts.map +0 -1
  314. package/lib/styles/tag.js.map +0 -1
  315. package/lib/styles/textarea.d.ts.map +0 -1
  316. package/lib/styles/textarea.js.map +0 -1
  317. package/lib/styles/tooltip.d.ts.map +0 -1
  318. package/lib/styles/tooltip.js.map +0 -1
  319. package/lib/styles/wizard.d.ts.map +0 -1
  320. package/lib/styles/wizard.js.map +0 -1
  321. package/lib/types/common.d.ts.map +0 -1
  322. package/lib/types/common.js.map +0 -1
  323. package/lib/utils/calendar-utils.d.ts.map +0 -1
  324. package/lib/utils/calendar-utils.js.map +0 -1
  325. package/lib/utils/custom-scrollbar.d.ts.map +0 -1
  326. package/lib/utils/custom-scrollbar.js.map +0 -1
  327. package/lib/utils/flavor-sheet.d.ts.map +0 -1
  328. package/lib/utils/flavor-sheet.js.map +0 -1
  329. package/lib/utils/icon-registry.d.ts.map +0 -1
  330. package/lib/utils/icon-registry.js.map +0 -1
  331. package/lib/utils/icons.d.ts.map +0 -1
  332. package/lib/utils/icons.js.map +0 -1
  333. package/lib/utils/loader-registry.d.ts.map +0 -1
  334. package/lib/utils/loader-registry.js.map +0 -1
  335. package/lib/utils/locale.d.ts.map +0 -1
  336. package/lib/utils/locale.js.map +0 -1
  337. package/lib/utils/mobile.d.ts.map +0 -1
  338. package/lib/utils/mobile.js.map +0 -1
  339. package/lib/utils/number-format.d.ts.map +0 -1
  340. package/lib/utils/number-format.js.map +0 -1
  341. package/lib/utils/parse-boolean.d.ts +0 -39
  342. package/lib/utils/parse-boolean.d.ts.map +0 -1
  343. package/lib/utils/parse-boolean.js +0 -58
  344. package/lib/utils/parse-boolean.js.map +0 -1
  345. package/lib/utils/positioning.d.ts.map +0 -1
  346. package/lib/utils/positioning.js.map +0 -1
  347. package/lib/utils/property-capture.d.ts.map +0 -1
  348. package/lib/utils/property-capture.js.map +0 -1
  349. package/lib/utils/property-manager.d.ts.map +0 -1
  350. package/lib/utils/property-manager.js.map +0 -1
  351. package/lib/utils/resize-observer.d.ts.map +0 -1
  352. package/lib/utils/resize-observer.js.map +0 -1
  353. package/lib/utils/scroll-lock.d.ts.map +0 -1
  354. package/lib/utils/scroll-lock.js.map +0 -1
  355. package/lib/utils/styles.d.ts.map +0 -1
  356. package/lib/utils/styles.js.map +0 -1
  357. package/lib/version.d.ts.map +0 -1
  358. package/lib/version.js.map +0 -1
@@ -1,57 +1,18 @@
1
1
  /**
2
- * TySelect Web Component
3
- *
4
- * The select control — replaces ty-dropdown and ty-multiselect.
5
- *
6
- * Cardinality (native <select> semantics):
7
- * - default: SINGLE select — scalar value, picking an option closes the popup
8
- * - `multiple`: multi select — comma value / repeated FormData entries,
9
- * options toggle and the popup stays open
10
- *
11
- * Skins:
12
- * - default: form FIELD — full width, --ty-input-* tokens, matches ty-input;
13
- * shows the selected label(s) inline
14
- * - `compact`: content-hugging trigger for toolbars/filter bars; single shows
15
- * the selected label, multiple shows placeholder + count badge (pair with
16
- * <ty-selected-options>)
17
- * - slot="trigger": consumer skin — replaces field/compact chrome entirely,
18
- * behavior/ARIA/form participation unchanged
19
- *
20
- * - ty-option children (ty-tag also accepted)
21
- * - Desktop popup with smart positioning, mobile full-screen modal
22
- * - Search / external-search / debounce, keyboard navigation
23
- * - Form association: single submits one entry, multiple submits repeated
24
- * `name=` entries (HTMX-ready)
25
- * - change event detail: { value, values, items: [{value, label, flavor}], action, item }
26
- * (`value` is a scalar for single, array for multiple)
27
- *
28
- * @example
29
- * ```html
30
- * <!-- Single select, field skin -->
31
- * <ty-select label="Robot" name="robot">
32
- * <ty-option value="bobo">Bobo Robot</ty-option>
33
- * <ty-option value="eywa">EYWA Dataset Example</ty-option>
34
- * </ty-select>
35
- *
36
- * <!-- Multi select, compact skin + out-of-band chips -->
37
- * <ty-select multiple compact label="Robots" name="robots" id="robots">...</ty-select>
38
- * <ty-selected-options for="robots"></ty-selected-options>
39
- * ```
2
+ * TySelect Web Component — THE select control (replaces ty-dropdown/ty-multiselect).
3
+ * Cardinality follows native <select>: default single (scalar value, picking closes
4
+ * the popup), `multiple` toggles options and submits repeated `name=` FormData entries.
5
+ * Skins: default form field, `compact` content-hugging trigger, slot="trigger" custom.
40
6
  */
41
7
  import type { Flavor, Size } from "../types/common.js";
8
+ import { type Placement } from "../utils/positioning.js";
42
9
  import { TyComponent } from "../base/ty-component.js";
43
10
  import type { PropertyChange } from "../utils/property-manager.js";
44
- /**
45
- * Tag data structure
46
- */
47
11
  interface TagData {
48
12
  value: string;
49
13
  text: string;
50
14
  element: HTMLElement;
51
15
  }
52
- /**
53
- * Component state structure
54
- */
55
16
  interface SelectState {
56
17
  open: boolean;
57
18
  search: string;
@@ -145,23 +106,27 @@ export declare class TySelect extends TyComponent<SelectState> {
145
106
  };
146
107
  coerce: (v: any) => "none" | "slug";
147
108
  };
148
- searchable: {
149
- type: "string";
109
+ notSearchable: {
110
+ type: "boolean";
150
111
  visual: boolean;
151
- default: string;
152
- coerce: (v: any) => "auto" | "always" | "never";
112
+ default: boolean;
153
113
  };
154
114
  align: {
155
115
  type: "string";
156
116
  visual: boolean;
157
117
  default: string;
158
118
  validate: (v: any) => boolean;
159
- coerce: (v: any) => "start" | "end";
119
+ coerce: (v: any) => "start" | "end" | "center";
160
120
  };
161
- size: {
121
+ placement: {
162
122
  type: "string";
163
123
  visual: boolean;
164
124
  default: string;
125
+ };
126
+ size: {
127
+ type: "string";
128
+ visual: boolean;
129
+ default: Size;
165
130
  validate: (v: any) => boolean;
166
131
  coerce: (v: any) => any;
167
132
  };
@@ -176,6 +141,11 @@ export declare class TySelect extends TyComponent<SelectState> {
176
141
  visual: boolean;
177
142
  default: string;
178
143
  };
144
+ "selected-label": {
145
+ type: "string";
146
+ visual: boolean;
147
+ default: string;
148
+ };
179
149
  "no-options-message": {
180
150
  type: "string";
181
151
  visual: boolean;
@@ -204,11 +174,12 @@ export declare class TySelect extends TyComponent<SelectState> {
204
174
  private _externalSearch;
205
175
  private _allowCreate;
206
176
  private _createTransform;
207
- private _searchable;
177
+ private _notSearchable;
208
178
  private _loading;
209
179
  private _scrollLockId;
210
180
  private _size;
211
181
  private _availableLabel;
182
+ private _selectedLabel;
212
183
  private _noOptionsMessage;
213
184
  private _state;
214
185
  private _stubClickHandler;
@@ -223,22 +194,12 @@ export declare class TySelect extends TyComponent<SelectState> {
223
194
  private _selectedClone;
224
195
  private _customFlavorSheet;
225
196
  constructor();
226
- /**
227
- * Called when component is connected to DOM
228
- * TyComponent handles property capture automatically
229
- */
197
+ /** TyComponent handles property capture automatically. */
230
198
  protected onConnect(): void;
231
199
  /** Custom (non-built-in) flavors — see utils/flavor-sheet.ts. */
232
200
  private _syncCustomFlavor;
233
- /**
234
- * Called when component is disconnected from DOM
235
- * Clean up event listeners and timers
236
- */
237
201
  protected onDisconnect(): void;
238
- /**
239
- * Called when properties change
240
- * Handle state synchronization BEFORE render
241
- */
202
+ /** Handle state synchronization BEFORE render. */
242
203
  protected onPropertiesChanged(changes: PropertyChange[]): void;
243
204
  /**
244
205
  * Toggle the loading visual state on the open popup.
@@ -247,27 +208,38 @@ export declare class TySelect extends TyComponent<SelectState> {
247
208
  * take effect on the next loading toggle.
248
209
  */
249
210
  private applyLoadingState;
250
- /**
251
- * Get the form value for this component
252
- * Returns FormData with multiple entries (HTMX standard)
253
- */
211
+ /** Form value: a plain entry for single, FormData with repeated entries for multiple (HTMX standard). */
254
212
  protected getFormValue(): FormDataEntryValue | FormData | null;
255
- /**
256
- * Parse select value (comma-separated string to array)
257
- */
258
213
  private parseValue;
214
+ /** Initialize component state from the value property / pre-selected children. */
215
+ private initializeState;
259
216
  /**
260
- * Initialize component state from attributes
261
- * Reads from both property and attribute (like ClojureScript version)
217
+ * Declarative init: no `value` attribute, but markup pre-marked one or more
218
+ * options `selected` — native <select> semantics. This is the ONE place
219
+ * selection is read FROM the DOM rather than treated as a rendering of
220
+ * state (see getSelectedValues()): it seeds initial state, once. After
221
+ * this, `value` rules — flipping an option's `selected` property later
222
+ * does nothing, same as native.
223
+ *
224
+ * Called from initializeState() at connect AND from the child observer:
225
+ * a real HTML parser upgrades a custom element the moment its start tag is
226
+ * seen, BEFORE its children exist — `<ty-select>` connects with zero
227
+ * `<ty-option>` children when it's part of the page's own markup (as
228
+ * opposed to an already-built fragment attached via innerHTML/appendChild,
229
+ * where children exist at connect). Calling this only at connect would
230
+ * silently miss every option parsed after that instant, which is the
231
+ * common case for markup that is literally in the page's initial HTML.
232
+ *
233
+ * Safe to call repeatedly: no-ops once `value` has ever been explicitly
234
+ * set (attribute or property) or state is already non-empty — including
235
+ * after a real `.clear()`, which removes `selected` from every option via
236
+ * syncSelectedTags, so there is nothing left here to (re-)seed from.
262
237
  */
263
- private initializeState;
238
+ private resolveDeclarativeSelection;
264
239
  /**
265
240
  * Get all option elements from the component (ty-option preferred, ty-tag accepted)
266
241
  */
267
242
  private getTagElements;
268
- /**
269
- * Extract value and text from a ty-tag element
270
- */
271
243
  private getTagData;
272
244
  /**
273
245
  * Select an option - attribute only. The option stays in the list with
@@ -279,12 +251,17 @@ export declare class TySelect extends TyComponent<SelectState> {
279
251
  */
280
252
  private deselectTag;
281
253
  /**
282
- * Get array of currently selected values from tags (ALWAYS reads from DOM)
254
+ * Get the array of currently selected values.
255
+ *
256
+ * Reads STATE (`_state.selectedValues`), not the DOM: `value` is the
257
+ * selection, and an option's `selected` attribute is a rendering of it
258
+ * (written by syncSelectedTags below), never the other way round. This
259
+ * matters whenever options don't fully reflect the selection — external
260
+ * search legitimately has a selected value with no matching option
261
+ * present; a DOM scan would report empty and desync .value, `required`
262
+ * validation and the click-toggle logic from what's actually selected.
283
263
  */
284
264
  private getSelectedValues;
285
- /**
286
- * Sync tag selection states with desired values
287
- */
288
265
  private syncSelectedTags;
289
266
  /**
290
267
  * role="option" for every current option/tag — separate from
@@ -294,18 +271,12 @@ export declare class TySelect extends TyComponent<SelectState> {
294
271
  * on every light-DOM change.
295
272
  */
296
273
  private ensureOptionRoles;
297
- /**
298
- * Central update function - synchronizes everything
299
- * Uses TyComponent's property system for proper lifecycle
300
- */
274
+ /** Central update function — synchronizes everything via TyComponent's property system. */
301
275
  private updateComponentValue;
302
276
  /**
303
277
  * Build rich item info for values, read off the matching option elements
304
278
  */
305
279
  private getSelectedItems;
306
- /**
307
- * Calculate and set dropdown position with smart direction detection
308
- */
309
280
  private calculatePosition;
310
281
  private _setupOptionsScrollbar;
311
282
  private _destroyOptionsScrollbar;
@@ -319,19 +290,9 @@ export declare class TySelect extends TyComponent<SelectState> {
319
290
  * implement.
320
291
  */
321
292
  private openDropdown;
322
- /**
323
- * Close dropdown dialog (desktop mode)
324
- */
325
293
  private closeDropdown;
326
- /**
327
- * Open mobile modal (mobile mode)
328
- * Now using <dialog> element for native z-index management
329
- */
294
+ /** Open mobile modal — <dialog> handles z-index natively. */
330
295
  private openMobileModal;
331
- /**
332
- * Close mobile modal (mobile mode)
333
- * Now using <dialog> element for native management
334
- */
335
296
  private closeMobileModal;
336
297
  private handleStubClick;
337
298
  /**
@@ -375,33 +336,19 @@ export declare class TySelect extends TyComponent<SelectState> {
375
336
  private handleSearchInput;
376
337
  private handleKeyboard;
377
338
  /**
378
- * Filter tags based on search query
339
+ * Next tag index in `direction` (-1/1) that isn't disabled, wrapping
340
+ * around — mirrors handleTagClick's disabled check so keyboard nav can
341
+ * never land on/select what a click already refuses to. Returns -1 if
342
+ * every tag is disabled (or there are none).
379
343
  */
344
+ private nextEnabledTagIndex;
380
345
  private filterTags;
381
- /**
382
- * Update visibility of tags based on filtered list
383
- */
384
346
  private updateTagVisibility;
385
- /**
386
- * Show/hide the dropdown options area
387
- */
388
347
  private updateOptionsVisibility;
389
- /**
390
- * Clear all tag highlights
391
- */
392
348
  private clearHighlights;
393
- /**
394
- * Highlight tag at specific index
395
- */
396
349
  private highlightTag;
397
- /**
398
- * Dispatch search event for external search handling
399
- * With optional debounce support
400
- */
350
+ /** Dispatch the search event for external search handling, with optional debounce. */
401
351
  private dispatchSearchEvent;
402
- /**
403
- * Fire the actual search event
404
- */
405
352
  private fireSearchEvent;
406
353
  /**
407
354
  * Dispatch lifecycle events for popup open/close.
@@ -410,14 +357,7 @@ export declare class TySelect extends TyComponent<SelectState> {
410
357
  */
411
358
  private fireOpenEvent;
412
359
  private fireCloseEvent;
413
- /**
414
- * Dispatch custom change event
415
- */
416
360
  private dispatchChangeEvent;
417
- /**
418
- * Main render method (required by TyComponent)
419
- * Delegates to mode-specific renderer
420
- */
421
361
  protected render(): void;
422
362
  /**
423
363
  * Reflect constraint validation to the owning <form> via ElementInternals.
@@ -432,49 +372,36 @@ export declare class TySelect extends TyComponent<SelectState> {
432
372
  * default field chrome so the trigger is styled entirely by the consumer.
433
373
  */
434
374
  private setupTriggerSlot;
435
- /**
436
- * Setup event listeners
437
- */
438
375
  private setupEventListeners;
439
- /**
440
- * Build CSS class list for stub
441
- */
442
376
  private buildStubClasses;
443
- /**
444
- * Render desktop mode with dialog
445
- */
446
377
  private renderDesktop;
447
- /**
448
- * Render mobile mode with full-screen modal
449
- * Following dropdown.ts mobile structure
450
- */
451
378
  private renderMobile;
452
- /**
453
- * Setup event listeners for mobile mode
454
- * Using <dialog> element - backdrop clicks handled natively
455
- */
456
379
  private setupMobileEventListeners;
457
- /**
458
- * Handle mobile stub click - open modal
459
- */
460
380
  private handleMobileStubClick;
461
381
  /** Keyboard-open the (closed) mobile stub — see handleStubKeydown for why this is needed. */
462
382
  private handleMobileStubKeydown;
463
- /**
464
- * Handle mobile tag click - select and potentially close
465
- */
466
383
  private handleMobileTagClick;
384
+ private updateMobileSelectedState;
467
385
  /**
468
- * Update mobile options section state (count, empty state)
386
+ * Hand the dialog's spare vertical space to one section or the other. Only
387
+ * one can own it: on a phone there isn't enough height for two scrollable
388
+ * lists to both be usefully tall, so tapping a header trades the space
389
+ * rather than splitting it. Selecting from the list hands it back to
390
+ * "available" — you're still picking, so that's the list you want open.
469
391
  */
470
- private updateMobileSelectedState;
392
+ private expandMobileSection;
471
393
  /**
472
- * Update selection display: count badge next to the placeholder
394
+ * The selected values as dismissible chips, pinned above the available
395
+ * list so a long list can never scroll the current selection out of sight.
396
+ * Rebuilt wholesale: the strip is small, and diffing it would have to
397
+ * track chip identity for the sake of a handful of nodes.
473
398
  */
399
+ private renderMobileSelectedChips;
474
400
  /**
475
- * Should the popup show a search row? external-search always (the input is
476
- * the mechanism); searchable always/never wins otherwise; 'auto' shows it
477
- * only when the option list is long enough to need filtering.
401
+ * Should the popup show a search row? external-search/allow-create pin it
402
+ * on (the input is the only way to get a query out at all), not-searchable
403
+ * forces it off, and otherwise it follows the list: shown once there are
404
+ * more options than fit without scrolling.
478
405
  */
479
406
  private shouldShowSearch;
480
407
  /**
@@ -532,19 +459,20 @@ export declare class TySelect extends TyComponent<SelectState> {
532
459
  set clearable(value: boolean);
533
460
  get required(): boolean;
534
461
  set required(value: boolean);
535
- get searchable(): "auto" | "always" | "never";
536
- set searchable(value: "auto" | "always" | "never" | boolean);
462
+ get notSearchable(): boolean;
463
+ set notSearchable(value: boolean);
537
464
  get externalSearch(): boolean;
538
465
  set externalSearch(value: boolean);
539
466
  get debounce(): number;
540
467
  set debounce(value: number | string);
541
468
  get size(): Size;
542
469
  set size(value: Size);
543
- get align(): "start" | "end";
544
- set align(value: "start" | "end");
470
+ get align(): "start" | "center" | "end";
471
+ set align(value: "start" | "center" | "end");
472
+ get placement(): Placement | "";
473
+ set placement(value: Placement | "");
545
474
  get flavor(): Flavor;
546
475
  set flavor(value: Flavor);
547
476
  get form(): HTMLFormElement | null;
548
477
  }
549
478
  export {};
550
- //# sourceMappingURL=select.d.ts.map