@sellmate/design-system 1.28.0 → 1.29.0

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 (348) hide show
  1. package/dist/cjs/{component.datepicker-CUQbDSku.js → component.datepicker-zFTQQKMH.js} +1 -2
  2. package/dist/cjs/design-system.cjs.js +2 -2
  3. package/dist/cjs/{index-D12oddge.js → index-iiJZMzVM.js} +1 -15
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/sd-action-modal.cjs.entry.js +1 -1
  6. package/dist/cjs/sd-badge.cjs.entry.js +1 -1
  7. package/dist/cjs/sd-barcode-input.cjs.entry.js +1 -1
  8. package/dist/cjs/sd-button_2.cjs.entry.js +1 -1
  9. package/dist/cjs/sd-calendar_2.cjs.entry.js +6 -6
  10. package/dist/cjs/sd-callout.cjs.entry.js +1 -1
  11. package/dist/cjs/sd-card.cjs.entry.js +1 -1
  12. package/dist/cjs/sd-checkbox.cjs.entry.js +1 -1
  13. package/dist/cjs/sd-chip-input.cjs.entry.js +2 -2
  14. package/dist/cjs/sd-chip.cjs.entry.js +1 -1
  15. package/dist/cjs/sd-circle-progress.cjs.entry.js +3 -3
  16. package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +33 -36
  17. package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
  18. package/dist/cjs/{sd-date-picker.config-De7ahWIs.js → sd-date-picker.config-Chrd8c4v.js} +1 -1
  19. package/dist/cjs/{sd-date-picker_7.cjs.entry.js → sd-date-picker_8.cjs.entry.js} +327 -18
  20. package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +4 -4
  21. package/dist/cjs/sd-divider.cjs.entry.js +3 -3
  22. package/dist/cjs/sd-dropdown-button.cjs.entry.js +2 -2
  23. package/dist/cjs/sd-field_3.cjs.entry.js +9 -9
  24. package/dist/cjs/sd-form.cjs.entry.js +1 -1
  25. package/dist/cjs/sd-ghost-button_3.cjs.entry.js +3 -3
  26. package/dist/cjs/sd-guide.cjs.entry.js +2 -2
  27. package/dist/cjs/sd-key-value-table.cjs.entry.js +88 -18
  28. package/dist/cjs/sd-linear-progress.cjs.entry.js +3 -3
  29. package/dist/cjs/sd-loading-container.cjs.entry.js +3 -3
  30. package/dist/cjs/sd-modal-container.cjs.entry.js +16 -2
  31. package/dist/cjs/sd-pagination.cjs.entry.js +173 -0
  32. package/dist/cjs/sd-popover.cjs.entry.js +2 -2
  33. package/dist/cjs/sd-popup.cjs.entry.js +3 -3
  34. package/dist/cjs/sd-radio-button.cjs.entry.js +1 -1
  35. package/dist/cjs/sd-radio.cjs.entry.js +1 -1
  36. package/dist/cjs/{sd-select_3.cjs.entry.js → sd-select-list-item_4.cjs.entry.js} +294 -315
  37. package/dist/cjs/sd-switch.cjs.entry.js +2 -2
  38. package/dist/cjs/sd-tabs.cjs.entry.js +2 -2
  39. package/dist/cjs/sd-text-link.cjs.entry.js +1 -1
  40. package/dist/cjs/sd-toast-container.cjs.entry.js +2 -2
  41. package/dist/cjs/sd-toast.cjs.entry.js +3 -3
  42. package/dist/cjs/sd-toggle.cjs.entry.js +2 -2
  43. package/dist/cjs/{system-MjrAugX-.js → system-B4KkVpu2.js} +1 -7
  44. package/dist/cjs/{tooltipArrow-Dda4ik0V.js → tooltipArrow-DOOcBlLp.js} +1 -1
  45. package/dist/cjs/{useDatePicker-iMd6WToc.js → useDatePicker-CgpIfwLA.js} +1 -1
  46. package/dist/collection/collection-manifest.json +0 -5
  47. package/dist/collection/components/sd-circle-progress/sd-circle-progress.css +1 -0
  48. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.css +3 -0
  49. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +35 -59
  50. package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +2 -2
  51. package/dist/collection/components/sd-date-picker/sd-date-picker.js +2 -2
  52. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +1 -1
  53. package/dist/collection/components/sd-divider/sd-divider.js +1 -1
  54. package/dist/collection/components/sd-field/sd-field.js +4 -4
  55. package/dist/collection/components/sd-file-picker/sd-file-picker.js +6 -6
  56. package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
  57. package/dist/collection/components/sd-input/sd-input.js +2 -2
  58. package/dist/collection/components/sd-key-value-table/sd-key-value-table.config.js +2 -0
  59. package/dist/collection/components/sd-key-value-table/sd-key-value-table.css +5 -1
  60. package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +65 -15
  61. package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
  62. package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
  63. package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
  64. package/dist/collection/components/sd-modal-container/sd-modal-container.js +15 -1
  65. package/dist/collection/components/sd-number-input/sd-number-input.js +4 -4
  66. package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
  67. package/dist/collection/components/sd-popup/sd-popup.js +1 -1
  68. package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +2 -2
  69. package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +4 -4
  70. package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +2 -2
  71. package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +2 -2
  72. package/dist/collection/components/sd-select/sd-select.js +4 -4
  73. package/dist/collection/components/sd-switch/sd-switch.js +1 -1
  74. package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
  75. package/dist/collection/components/sd-tag/sd-tag.js +2 -2
  76. package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
  77. package/dist/collection/components/sd-toast/sd-toast.js +2 -2
  78. package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
  79. package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
  80. package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
  81. package/dist/components/index.js +1 -1
  82. package/dist/components/{p-pwGA4sDj.js → p-9Ap2W-Mi.js} +1 -1
  83. package/dist/components/p-BFVfSW9t.js +1 -0
  84. package/dist/components/{p-BuADVB78.js → p-BHjezpAC.js} +1 -1
  85. package/dist/components/{p-CHHlQceE.js → p-BIEPMPWA.js} +1 -1
  86. package/dist/components/{p-CMvHDxR5.js → p-BKu0I6Io.js} +1 -1
  87. package/dist/components/{p-B3HYnTGx.js → p-B_Zwr4Et.js} +1 -1
  88. package/dist/components/{p-BysikR_g.js → p-Bpv90tfa.js} +1 -1
  89. package/dist/components/p-Bth2l1cy.js +1 -0
  90. package/dist/components/{p-DNbbdJIc.js → p-C7mC7a1z.js} +1 -1
  91. package/dist/components/{p-B2pYDEK7.js → p-CBoDoYDO.js} +1 -1
  92. package/dist/components/p-CErFctrV.js +1 -0
  93. package/dist/components/{p-ClD0nx1l.js → p-CFTyEfB9.js} +1 -1
  94. package/dist/components/{p-1i6Q61TF.js → p-CSr33M9s.js} +1 -1
  95. package/dist/components/{p-C0tnN4yn.js → p-CYMMLsGt.js} +1 -1
  96. package/dist/components/{p-l9RiSWRc.js → p-C_SG4M4z.js} +1 -1
  97. package/dist/components/{p-BE6ymp9E.js → p-C_in6AVN.js} +1 -1
  98. package/dist/components/{p-BAVsc1Ml.js → p-CbS69IvC.js} +1 -1
  99. package/dist/components/{p-BWHQn4fD.js → p-CgSXYw_0.js} +1 -1
  100. package/dist/components/{p-BQ4Okfcm.js → p-CmRF12Fy.js} +1 -1
  101. package/dist/components/{p-DbPS61bp.js → p-CnRfET5y.js} +1 -1
  102. package/dist/components/{p-Bxb7TcZh.js → p-Cvsrc0be.js} +1 -1
  103. package/dist/components/{p-BCxePXvg.js → p-DJ8z7_EG.js} +1 -1
  104. package/dist/components/{p-paSLRXAR.js → p-DJmxpVkK.js} +1 -1
  105. package/dist/components/{p-IDlLs_KA.js → p-DMoFncVl.js} +1 -1
  106. package/dist/components/{p-B-pJW3nY.js → p-DN7MAx-q.js} +1 -1
  107. package/dist/components/{p-E8OA_psS.js → p-DS6NVBvu.js} +1 -1
  108. package/dist/components/{p-BNHhtZUf.js → p-D_56BjcD.js} +1 -1
  109. package/dist/components/{p-CTDPl65u.js → p-Dg1UrMqI.js} +1 -1
  110. package/dist/components/{p-BKV1WAFb.js → p-Di1q4f5E.js} +1 -1
  111. package/dist/components/{p-Bgxca9o5.js → p-OO7xxhkC.js} +1 -1
  112. package/dist/components/{p-vtuEYpc6.js → p-R-Sdglj0.js} +1 -1
  113. package/dist/components/p-Uh9emYrV.js +1 -0
  114. package/dist/components/{p-CSh-DcM7.js → p-f0aBxUBG.js} +1 -1
  115. package/dist/components/{p-BnI9HUOv.js → p-idG6CMO0.js} +1 -1
  116. package/dist/components/p-oYbVr-z0.js +1 -0
  117. package/dist/components/sd-action-modal.js +1 -1
  118. package/dist/components/sd-badge.js +1 -1
  119. package/dist/components/sd-barcode-input.js +1 -1
  120. package/dist/components/sd-button.js +1 -1
  121. package/dist/components/sd-calendar.js +1 -1
  122. package/dist/components/sd-callout.js +1 -1
  123. package/dist/components/sd-card.js +1 -1
  124. package/dist/components/sd-checkbox.js +1 -1
  125. package/dist/components/sd-chip-input.js +1 -1
  126. package/dist/components/sd-chip.js +1 -1
  127. package/dist/components/sd-circle-progress.js +1 -1
  128. package/dist/components/sd-confirm-modal.js +1 -1
  129. package/dist/components/sd-date-box.js +1 -1
  130. package/dist/components/sd-date-picker-trigger.js +1 -1
  131. package/dist/components/sd-date-picker.js +1 -1
  132. package/dist/components/sd-date-range-picker-calendar.js +1 -1
  133. package/dist/components/sd-date-range-picker.js +1 -1
  134. package/dist/components/sd-divider.js +1 -1
  135. package/dist/components/sd-dropdown-button.js +1 -1
  136. package/dist/components/sd-field.js +1 -1
  137. package/dist/components/sd-file-picker.js +1 -1
  138. package/dist/components/sd-floating-portal.js +1 -1
  139. package/dist/components/sd-form.js +1 -1
  140. package/dist/components/sd-ghost-button.js +1 -1
  141. package/dist/components/sd-guide.js +1 -1
  142. package/dist/components/sd-icon.js +1 -1
  143. package/dist/components/sd-input.js +1 -1
  144. package/dist/components/sd-key-value-table.js +1 -1
  145. package/dist/components/sd-linear-progress.js +1 -1
  146. package/dist/components/sd-loading-container.js +1 -1
  147. package/dist/components/sd-loading-modal.js +1 -1
  148. package/dist/components/sd-modal-container.js +1 -1
  149. package/dist/components/sd-number-input.js +1 -1
  150. package/dist/components/sd-pagination.js +1 -1
  151. package/dist/components/sd-popover.js +1 -1
  152. package/dist/components/sd-popup.js +1 -1
  153. package/dist/components/sd-portal.js +1 -1
  154. package/dist/components/sd-radio-button.js +1 -1
  155. package/dist/components/sd-radio-group.js +1 -1
  156. package/dist/components/sd-radio.js +1 -1
  157. package/dist/components/sd-select-list-item-search.js +1 -1
  158. package/dist/components/sd-select-list-item.js +1 -1
  159. package/dist/components/sd-select-listbox.js +1 -1
  160. package/dist/components/sd-select-trigger.js +1 -1
  161. package/dist/components/sd-select.js +1 -1
  162. package/dist/components/sd-switch.js +1 -1
  163. package/dist/components/sd-tabs.js +1 -1
  164. package/dist/components/sd-tag.js +1 -1
  165. package/dist/components/sd-text-link.js +1 -1
  166. package/dist/components/sd-textarea.js +1 -1
  167. package/dist/components/sd-toast-container.js +1 -1
  168. package/dist/components/sd-toast.js +1 -1
  169. package/dist/components/sd-toggle.js +1 -1
  170. package/dist/components/sd-tooltip.js +1 -1
  171. package/dist/design-system/design-system.css +1 -1
  172. package/dist/design-system/design-system.esm.js +1 -1
  173. package/dist/design-system/{p-fbeed0e4.entry.js → p-02f0b906.entry.js} +1 -1
  174. package/dist/design-system/{p-4970f1ff.entry.js → p-0c1d1a15.entry.js} +1 -1
  175. package/dist/design-system/{p-75726e20.entry.js → p-0e014b76.entry.js} +1 -1
  176. package/dist/design-system/{p-91f7be74.entry.js → p-1b5fcf7b.entry.js} +1 -1
  177. package/dist/design-system/{p-5687ed0c.entry.js → p-1ed1bfa1.entry.js} +1 -1
  178. package/dist/design-system/{p-bbd24816.entry.js → p-246aafb9.entry.js} +1 -1
  179. package/dist/design-system/p-26a27312.entry.js +1 -0
  180. package/dist/design-system/{p-5c8f4d9c.entry.js → p-2a4d2ee0.entry.js} +1 -1
  181. package/dist/design-system/{p-b831eded.entry.js → p-2d6a7d7b.entry.js} +1 -1
  182. package/dist/design-system/{p-2553bb1f.entry.js → p-3595cafb.entry.js} +1 -1
  183. package/dist/design-system/p-3cd2751a.entry.js +1 -0
  184. package/dist/design-system/p-4b474538.entry.js +1 -0
  185. package/dist/design-system/{p-bab692c6.entry.js → p-4c85f6f6.entry.js} +1 -1
  186. package/dist/design-system/{p-67f19734.entry.js → p-53fe2741.entry.js} +1 -1
  187. package/dist/design-system/{p-58ec51db.entry.js → p-55c0be7d.entry.js} +1 -1
  188. package/dist/design-system/p-5a257ed9.entry.js +1 -0
  189. package/dist/design-system/{p-a938ffee.entry.js → p-840006b1.entry.js} +1 -1
  190. package/dist/design-system/{p-9c0bca09.entry.js → p-86329ae3.entry.js} +1 -1
  191. package/dist/design-system/{p-287d8016.entry.js → p-8de3b502.entry.js} +1 -1
  192. package/dist/design-system/{p-071e73e0.entry.js → p-8ed1d470.entry.js} +1 -1
  193. package/dist/design-system/{p-D2S9Zafz.js → p-B91K50wC.js} +1 -1
  194. package/dist/design-system/{p-BqWuC4-J.js → p-BPKiBSGr.js} +1 -1
  195. package/dist/design-system/p-BhcvMs8c.js +1 -0
  196. package/dist/design-system/p-Bth2l1cy.js +1 -0
  197. package/dist/design-system/p-Dz490Ukt.js +2 -0
  198. package/dist/design-system/{p-d7e302af.entry.js → p-a631cd78.entry.js} +1 -1
  199. package/dist/design-system/p-adf2f398.entry.js +1 -0
  200. package/dist/design-system/{p-750a9112.entry.js → p-b585f94b.entry.js} +1 -1
  201. package/dist/design-system/p-be54fd3a.entry.js +1 -0
  202. package/dist/design-system/{p-0b8c86c3.entry.js → p-c1066f40.entry.js} +1 -1
  203. package/dist/design-system/{p-26f2f4c2.entry.js → p-c5cffcc6.entry.js} +1 -1
  204. package/dist/design-system/{p-3b3a46cd.entry.js → p-c7d2c195.entry.js} +1 -1
  205. package/dist/design-system/{p-d6b3d78b.entry.js → p-cb6ab65c.entry.js} +1 -1
  206. package/dist/design-system/{p-1230b51b.entry.js → p-d204cac5.entry.js} +1 -1
  207. package/dist/design-system/p-d2ce01ac.entry.js +1 -0
  208. package/dist/design-system/{p-84d0181b.entry.js → p-d51f4170.entry.js} +1 -1
  209. package/dist/design-system/{p-61f5d5ea.entry.js → p-d9f33192.entry.js} +1 -1
  210. package/dist/design-system/{p-c5502585.entry.js → p-e7740a5f.entry.js} +1 -1
  211. package/dist/design-system/p-e85bf462.entry.js +1 -0
  212. package/dist/design-system/{p-d4e2f412.entry.js → p-ea008087.entry.js} +1 -1
  213. package/dist/design-system/{p-70608fec.entry.js → p-ec4ad48c.entry.js} +1 -1
  214. package/dist/design-system/{p-fa967329.entry.js → p-f962e5d2.entry.js} +1 -1
  215. package/dist/esm/{component.datepicker-laVsm9VM.js → component.datepicker-BOxGhKKP.js} +1 -2
  216. package/dist/esm/design-system.js +3 -3
  217. package/dist/esm/{index-DDNBPrZh.js → index-Dz490Ukt.js} +2 -14
  218. package/dist/esm/loader.js +3 -3
  219. package/dist/esm/sd-action-modal.entry.js +1 -1
  220. package/dist/esm/sd-badge.entry.js +1 -1
  221. package/dist/esm/sd-barcode-input.entry.js +1 -1
  222. package/dist/esm/sd-button_2.entry.js +1 -1
  223. package/dist/esm/sd-calendar_2.entry.js +6 -6
  224. package/dist/esm/sd-callout.entry.js +1 -1
  225. package/dist/esm/sd-card.entry.js +1 -1
  226. package/dist/esm/sd-checkbox.entry.js +1 -1
  227. package/dist/esm/sd-chip-input.entry.js +2 -2
  228. package/dist/esm/sd-chip.entry.js +1 -1
  229. package/dist/esm/sd-circle-progress.entry.js +3 -3
  230. package/dist/esm/sd-confirm-modal_2.entry.js +33 -36
  231. package/dist/esm/sd-date-box.entry.js +1 -1
  232. package/dist/esm/{sd-date-picker.config-D-ks6qNf.js → sd-date-picker.config-krRuSUsA.js} +1 -1
  233. package/dist/esm/{sd-date-picker_7.entry.js → sd-date-picker_8.entry.js} +327 -19
  234. package/dist/esm/sd-date-range-picker-calendar.entry.js +4 -4
  235. package/dist/esm/sd-divider.entry.js +3 -3
  236. package/dist/esm/sd-dropdown-button.entry.js +2 -2
  237. package/dist/esm/sd-field_3.entry.js +9 -9
  238. package/dist/esm/sd-form.entry.js +1 -1
  239. package/dist/esm/sd-ghost-button_3.entry.js +3 -3
  240. package/dist/esm/sd-guide.entry.js +2 -2
  241. package/dist/esm/sd-key-value-table.entry.js +87 -17
  242. package/dist/esm/sd-linear-progress.entry.js +3 -3
  243. package/dist/esm/sd-loading-container.entry.js +3 -3
  244. package/dist/esm/sd-modal-container.entry.js +16 -2
  245. package/dist/esm/sd-pagination.entry.js +171 -0
  246. package/dist/esm/sd-popover.entry.js +2 -2
  247. package/dist/esm/sd-popup.entry.js +3 -3
  248. package/dist/esm/sd-radio-button.entry.js +1 -1
  249. package/dist/esm/sd-radio.entry.js +1 -1
  250. package/dist/esm/{sd-select_3.entry.js → sd-select-list-item_4.entry.js} +277 -299
  251. package/dist/esm/sd-switch.entry.js +2 -2
  252. package/dist/esm/sd-tabs.entry.js +2 -2
  253. package/dist/esm/sd-text-link.entry.js +1 -1
  254. package/dist/esm/sd-toast-container.entry.js +2 -2
  255. package/dist/esm/sd-toast.entry.js +3 -3
  256. package/dist/esm/sd-toggle.entry.js +2 -2
  257. package/dist/esm/{system-BJfiMC9H.js → system-Bth2l1cy.js} +1 -7
  258. package/dist/esm/{tooltipArrow-blL0aWPE.js → tooltipArrow-CEHVt90h.js} +1 -1
  259. package/dist/esm/{useDatePicker-DoUg--aq.js → useDatePicker-BG0lUGJG.js} +1 -1
  260. package/dist/types/components/sd-confirm-modal/sd-confirm-modal.d.ts +10 -10
  261. package/dist/types/components/sd-key-value-table/sd-key-value-table.config.d.ts +22 -3
  262. package/dist/types/components/sd-key-value-table/sd-key-value-table.d.ts +9 -1
  263. package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +3 -0
  264. package/dist/types/components/sd-modal-container/sd-modal-container.d.ts +2 -0
  265. package/dist/types/components.d.ts +17 -696
  266. package/dist/types/index.d.ts +0 -1
  267. package/hydrate/index.js +173 -2217
  268. package/hydrate/index.mjs +173 -2217
  269. package/package.json +1 -1
  270. package/dist/cjs/component.table-POXY492T.js +0 -72
  271. package/dist/cjs/constants-DJRV1upE.js +0 -5
  272. package/dist/cjs/sd-pagination_4.cjs.entry.js +0 -858
  273. package/dist/cjs/sd-select-list-item_2.cjs.entry.js +0 -173
  274. package/dist/cjs/sd-select.config-omyxekRa.js +0 -144
  275. package/dist/cjs/sd-table.cjs.entry.js +0 -956
  276. package/dist/cjs/sd-table.config-DFy_S4bc.js +0 -83
  277. package/dist/cjs/sd-td.cjs.entry.js +0 -201
  278. package/dist/collection/components/sd-table/constants.js +0 -1
  279. package/dist/collection/components/sd-table/sd-table.config.js +0 -88
  280. package/dist/collection/components/sd-table/sd-table.css +0 -180
  281. package/dist/collection/components/sd-table/sd-table.js +0 -1709
  282. package/dist/collection/components/sd-table/sd-table.stories.helpers.js +0 -242
  283. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.css +0 -10
  284. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +0 -110
  285. package/dist/collection/components/sd-table/sd-td/sd-td.css +0 -15
  286. package/dist/collection/components/sd-table/sd-td/sd-td.js +0 -381
  287. package/dist/collection/components/sd-table/sd-thead/sd-thead.css +0 -186
  288. package/dist/collection/components/sd-table/sd-thead/sd-thead.js +0 -629
  289. package/dist/collection/components/sd-table/sd-tr/sd-tr.css +0 -145
  290. package/dist/collection/components/sd-table/sd-tr/sd-tr.js +0 -530
  291. package/dist/components/p-5pkzwl5N.js +0 -1
  292. package/dist/components/p-B6ezDhRg.js +0 -1
  293. package/dist/components/p-BJfiMC9H.js +0 -1
  294. package/dist/components/p-BSxleKw8.js +0 -1
  295. package/dist/components/p-BUgGuigd.js +0 -1
  296. package/dist/components/p-BZXgIBUG.js +0 -1
  297. package/dist/components/p-Cf62Nvrx.js +0 -1
  298. package/dist/components/p-DckXBMgo.js +0 -1
  299. package/dist/components/p-DmAnTwUx.js +0 -1
  300. package/dist/components/p-PFLrdhQj.js +0 -1
  301. package/dist/components/p-sZMi_32I.js +0 -1
  302. package/dist/components/p-yxZBh03f.js +0 -1
  303. package/dist/components/sd-table.d.ts +0 -11
  304. package/dist/components/sd-table.js +0 -1
  305. package/dist/components/sd-tbody.d.ts +0 -11
  306. package/dist/components/sd-tbody.js +0 -1
  307. package/dist/components/sd-td.d.ts +0 -11
  308. package/dist/components/sd-td.js +0 -1
  309. package/dist/components/sd-thead.d.ts +0 -11
  310. package/dist/components/sd-thead.js +0 -1
  311. package/dist/components/sd-tr.d.ts +0 -11
  312. package/dist/components/sd-tr.js +0 -1
  313. package/dist/design-system/p-0048de73.entry.js +0 -1
  314. package/dist/design-system/p-20f69606.entry.js +0 -1
  315. package/dist/design-system/p-27197194.entry.js +0 -1
  316. package/dist/design-system/p-5pkzwl5N.js +0 -1
  317. package/dist/design-system/p-7abf62f3.entry.js +0 -1
  318. package/dist/design-system/p-7ae27a26.entry.js +0 -1
  319. package/dist/design-system/p-94d6b7b4.entry.js +0 -1
  320. package/dist/design-system/p-9b21773a.entry.js +0 -1
  321. package/dist/design-system/p-BJfiMC9H.js +0 -1
  322. package/dist/design-system/p-CRWmn35N.js +0 -1
  323. package/dist/design-system/p-Cf62Nvrx.js +0 -1
  324. package/dist/design-system/p-CuAh9n2o.js +0 -1
  325. package/dist/design-system/p-DDNBPrZh.js +0 -2
  326. package/dist/design-system/p-a12d7362.entry.js +0 -1
  327. package/dist/design-system/p-c81898a0.entry.js +0 -1
  328. package/dist/design-system/p-dbfa3931.entry.js +0 -1
  329. package/dist/design-system/p-f16985c9.entry.js +0 -1
  330. package/dist/design-system/p-sZMi_32I.js +0 -1
  331. package/dist/esm/component.table-5pkzwl5N.js +0 -70
  332. package/dist/esm/constants-sZMi_32I.js +0 -3
  333. package/dist/esm/sd-pagination_4.entry.js +0 -853
  334. package/dist/esm/sd-select-list-item_2.entry.js +0 -170
  335. package/dist/esm/sd-select.config-CeHGlqOT.js +0 -129
  336. package/dist/esm/sd-table.config-DmOBlnsM.js +0 -70
  337. package/dist/esm/sd-table.entry.js +0 -954
  338. package/dist/esm/sd-td.entry.js +0 -199
  339. package/dist/types/components/sd-table/constants.d.ts +0 -50
  340. package/dist/types/components/sd-table/sd-table.config.d.ts +0 -71
  341. package/dist/types/components/sd-table/sd-table.d.ts +0 -199
  342. package/dist/types/components/sd-table/sd-table.stories.helpers.d.ts +0 -39
  343. package/dist/types/components/sd-table/sd-tbody/sd-tbody.d.ts +0 -15
  344. package/dist/types/components/sd-table/sd-td/sd-td.d.ts +0 -38
  345. package/dist/types/components/sd-table/sd-thead/sd-thead.d.ts +0 -62
  346. package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +0 -54
  347. /package/dist/components/{p-laVsm9VM.js → p-BOxGhKKP.js} +0 -0
  348. /package/dist/design-system/{p-laVsm9VM.js → p-BOxGhKKP.js} +0 -0
@@ -1,317 +1,295 @@
1
- import { r as registerInstance, c as createEvent, a as getElement, h } from './index-DDNBPrZh.js';
2
- import { n as nanoid } from './index-CCwNgVmC.js';
3
- import { c as countLeaves, S as SEARCH_THRESHOLD, f as filterTree, i as isHtmlLabel, e as extractText, E as EMPTY_MESSAGE, L as LIST_BOX_LAYOUT, a as SELECT_COLORS, b as SELECT_TYPOGRAPHY, d as SELECT_LAYOUT } from './sd-select.config-CeHGlqOT.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-Dz490Ukt.js';
2
+ import { l as listItemTokens } from './component.listItem-4S0_Ykmo.js';
3
+ import { l as listBoxTokens } from './component.listBox-DlJaYVWf.js';
4
4
  import { s as sanitizeInlineHtml } from './sanitize-inline-html-BE4tnQ2Z.js';
5
- import './component.listItem-4S0_Ykmo.js';
6
- import './component.listBox-DlJaYVWf.js';
7
5
 
8
- const sdSelectCss = () => `sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}`;
6
+ const select = {
7
+ sm: {
8
+ paddingX: "12",
9
+ gap: "8",
10
+ typography: {
11
+ fontWeight: "400",
12
+ fontSize: "12",
13
+ lineHeight: "20"}},
14
+ icon: {
15
+ "default": "#888888",
16
+ disabled: "#BBBBBB"
17
+ },
18
+ text: {
19
+ "default": "#222222",
20
+ disabled: "#888888"
21
+ }
22
+ };
23
+ var selectTokens = {
24
+ select: select
25
+ };
9
26
 
10
- const SdSelect = class {
11
- constructor(hostRef) {
12
- registerInstance(this, hostRef);
13
- this.update = createEvent(this, "sdUpdate", 7);
14
- this.dropDownShow = createEvent(this, "sdDropDownShow", 7);
15
- }
16
- static VIEWPORT_PADDING = 20;
17
- static PORTAL_OFFSET_Y = 4;
18
- static CLOSE_ANIMATION_DURATION = 150;
19
- get el() { return getElement(this); }
20
- /** 셀렉트 타입 (단일/다중/계층) */
21
- type = 'default';
22
- /** 현재 선택된 값 */
23
- value = null;
24
- /** 선택 옵션 목록 */
25
- options = [];
26
- /** 값이 없을 때 표시할 플레이스홀더 */
27
- placeholder = '선택';
28
- /** 드롭다운 너비 (없으면 트리거 너비로 자동 맞춤) */
29
- dropdownWidth = '';
30
- /** 드롭다운 최대 너비 */
31
- maxDropdownWidth = '640px';
32
- /** 드롭다운 최대 높이 */
33
- dropdownHeight = '260px';
34
- /** 비활성 상태 여부 */
35
- disabled = false;
36
- /** 레이블 텍스트 */
37
- label = '';
38
- /** 레이블 너비 */
39
- labelWidth = '';
40
- /** 필드 우측 어드온 레이블 */
41
- addonLabel = '';
42
- /** 어드온 정렬 방향 */
43
- addonAlign = 'start';
44
- /** 에러 상태 여부 */
45
- error = false;
46
- /** 필드 하단 힌트 텍스트 */
47
- hint = '';
48
- /** 에러 메시지 */
49
- errorMessage = '';
50
- /** 유효성 검사 규칙 목록 */
51
- rules = [];
52
- /** 레이블 영역 아이콘 */
53
- icon = undefined;
54
- /** 레이블 툴팁 텍스트 */
55
- labelTooltip = '';
56
- /** 레이블 툴팁 상세 옵션 */
57
- labelTooltipProps = null;
58
- /** true이면 value로 SelectOption 대신 원시값(string|number) 방출 */
59
- emitValue = false;
60
- /** 필드 너비 */
61
- width = '';
62
- /** 드롭다운 내 검색 입력 표시 여부 */
63
- useSearch = false;
64
- /** 전체 선택 시 표시할 레이블 */
65
- allSelectedLabel = '전체';
66
- /** 전체 선택 체크박스 표시 여부 */
67
- useSelectAll = false;
68
- isOpen = false;
69
- isAnimatingOut = false;
70
- triggerWidth = '200px';
71
- resolvedDropdownHeight = '260px';
72
- resolvedMaxDropdownWidth = '640px';
73
- focused = false;
74
- hovered = false;
75
- /** 선택 값이 변경될 때 발생합니다. */
76
- update;
77
- /** 드롭다운 열림/닫힘 상태가 바뀔 때 발생합니다. */
78
- dropDownShow;
79
- /** 셀렉트 트리거에 포커스를 이동합니다. */
80
- async sdFocus() {
81
- if (this.disabled)
82
- return;
83
- await this.triggerComponentRef?.sdFocus();
84
- }
85
- /** 드롭다운을 엽니다. */
86
- async sdOpen() {
87
- // sdFocus 직후 호출 시 트리거 ref/레이아웃이 안정될 때까지 한 틱 대기
88
- await new Promise(resolve => setTimeout(resolve, 0));
89
- if (this.disabled || this.isOpen)
90
- return;
91
- this.prepareDropdownGeometry();
92
- if (this.closeAnimationTimer)
93
- clearTimeout(this.closeAnimationTimer);
94
- this.isAnimatingOut = false;
95
- this.isOpen = true;
96
- }
97
- triggerRef;
98
- triggerComponentRef;
99
- closeAnimationTimer;
100
- /** 폼 연동용 name 속성 */
101
- name = nanoid();
102
- triggerHasFocus = false;
103
- watchIsOpen(newValue) {
104
- this.syncFocusedState(newValue);
105
- this.dropDownShow.emit({ isOpen: newValue });
106
- }
107
- get isMulti() {
108
- return this.type === 'multi' || this.type === 'multi_depth';
109
- }
110
- get displayText() {
111
- if (this.isMulti) {
112
- if (!Array.isArray(this.value) || this.value.length === 0)
113
- return '';
114
- const nonDisabledLeaves = this.getNonDisabledLeaves(this.options);
115
- const selected = this.getSelectedOptions();
116
- const allSelected = nonDisabledLeaves.length > 0 &&
117
- nonDisabledLeaves.every(leaf => selected.some(s => s.value === leaf.value));
118
- if (allSelected)
119
- return this.allSelectedLabel ?? '전체';
120
- const flat = this.flattenOptions(this.options);
121
- return this.value
122
- .map(item => {
123
- if (item != null && typeof item === 'object') {
124
- const opt = item;
125
- return opt.label ?? flat.find(o => o.value === opt.value)?.label ?? '';
126
- }
127
- return flat.find(o => o.value === item)?.label ?? '';
128
- })
129
- .filter(Boolean)
130
- .join(', ');
27
+ // ── Select Trigger Tokens ──
28
+ const SELECT_LAYOUT = {
29
+ paddingX: selectTokens.select.sm.paddingX,
30
+ gap: selectTokens.select.sm.gap};
31
+ const SELECT_TYPOGRAPHY = {
32
+ fontSize: selectTokens.select.sm.typography.fontSize,
33
+ lineHeight: selectTokens.select.sm.typography.lineHeight,
34
+ fontWeight: selectTokens.select.sm.typography.fontWeight,
35
+ };
36
+ const SELECT_COLORS = {
37
+ icon: {
38
+ default: selectTokens.select.icon.default,
39
+ disabled: selectTokens.select.icon.disabled,
40
+ },
41
+ text: {
42
+ default: selectTokens.select.text.default,
43
+ disabled: selectTokens.select.text.disabled,
44
+ },
45
+ };
46
+ // ── ListItem Tokens ──
47
+ const LIST_ITEM_LAYOUT = {
48
+ paddingY: listItemTokens.listItem.paddingY,
49
+ paddingRight: listItemTokens.listItem.paddingRight,
50
+ paddingLeft: {
51
+ depth1: listItemTokens.listItem.paddingLeft.depth1,
52
+ depth2: listItemTokens.listItem.paddingLeft.depth2,
53
+ depth3: listItemTokens.listItem.paddingLeft.depth3,
54
+ },
55
+ gap: listItemTokens.listItem.gap,
56
+ };
57
+ const LIST_ITEM_TYPOGRAPHY = {
58
+ fontSize: listItemTokens.listItem.typography.default.fontSize,
59
+ lineHeight: listItemTokens.listItem.typography.default.lineHeight,
60
+ fontWeight: listItemTokens.listItem.typography.default.fontWeight,
61
+ selectedFontWeight: listItemTokens.listItem.typography.selected.fontWeight,
62
+ };
63
+ const LIST_ITEM_COLORS = {
64
+ bg: {
65
+ default: listItemTokens.listItem.bg.default,
66
+ hover: listItemTokens.listItem.bg.hover,
67
+ },
68
+ content: {
69
+ default: listItemTokens.listItem.content.default,
70
+ hover: listItemTokens.listItem.content.hover,
71
+ disabled: listItemTokens.listItem.content.disabled,
72
+ selected: listItemTokens.listItem.content.selected,
73
+ },
74
+ depth1: {
75
+ bg: listItemTokens.listItem.depth1.bg.default,
76
+ border: listItemTokens.listItem.depth1.border.color,
77
+ borderWidth: listItemTokens.listItem.depth1.border.width,
78
+ },
79
+ depth2: {
80
+ bg: listItemTokens.listItem.depth2.middle.bg,
81
+ }};
82
+ // ── ListBox Tokens ──
83
+ const LIST_BOX_LAYOUT = {
84
+ radius: listBoxTokens.listBox.radius,
85
+ };
86
+ // ── Constants ──
87
+ const SEARCH_THRESHOLD = 11;
88
+ const SEARCH_DEBOUNCE_MS = 1000;
89
+ const EMPTY_MESSAGE = '표시할 항목이 없습니다.';
90
+ // ── Utilities ──
91
+ function isHtmlLabel(label) {
92
+ return /<[a-z][\s\S]*>/i.test(label);
93
+ }
94
+ function extractText(html) {
95
+ return html.replace(/<[^>]*>/g, '');
96
+ }
97
+ function countLeaves(options) {
98
+ return options.reduce((sum, option) => {
99
+ if (option.children) {
100
+ return sum + countLeaves(option.children);
131
101
  }
132
- if (this.value == null)
133
- return '';
134
- if (!this.emitValue && typeof this.value === 'object' && !Array.isArray(this.value)) {
135
- return this.value.label ?? '';
102
+ return sum + 1;
103
+ }, 0);
104
+ }
105
+ function filterTree(options, keyword) {
106
+ const lowerKeyword = (keyword ?? '').toLowerCase();
107
+ return options.reduce((acc, option) => {
108
+ const labelText = isHtmlLabel(option.label) ? extractText(option.label) : option.label;
109
+ const selfMatch = labelText != null && labelText.toLowerCase().includes(lowerKeyword);
110
+ if (option.children) {
111
+ // 그룹: 자식은 항상 추가로 필터링한다.
112
+ // - 자식 중 일치하는 게 있으면 그 자식들만 노출
113
+ // - 자식 매칭이 없더라도 그룹명이 매칭되면 그룹 헤더는 그대로 노출
114
+ // (이때 children 은 빈 배열로 두고, 선택 동작은 collectVisibleLeaves
115
+ // 의 fallback 이 원본 트리를 사용해 처리한다)
116
+ const filteredChildren = filterTree(option.children, keyword);
117
+ if (filteredChildren.length > 0) {
118
+ acc.push({ ...option, children: filteredChildren });
119
+ }
120
+ else if (selfMatch) {
121
+ acc.push({ ...option, children: [] });
122
+ }
136
123
  }
137
- const flat = this.flattenOptions(this.options);
138
- return flat.find(o => o.value === this.value)?.label ?? '';
139
- }
140
- flattenOptions(options) {
141
- return options.flatMap(o => (o.children ? this.flattenOptions(o.children) : [o]));
142
- }
143
- getNonDisabledLeaves(options) {
144
- return options.flatMap(o => {
145
- if (o.disabled)
146
- return [];
147
- if (o.children)
148
- return this.getNonDisabledLeaves(o.children);
149
- return [o];
150
- });
151
- }
152
- getSelectedOptions() {
153
- const val = this.value;
154
- if (val == null || !Array.isArray(val))
155
- return [];
156
- if (this.emitValue) {
157
- return val
158
- .map(v => this.findOriginalOption(v, this.options))
159
- .filter((o) => !!o);
124
+ else if (selfMatch) {
125
+ acc.push({ ...option });
160
126
  }
161
- return val;
162
- }
163
- toMultiValue(options) {
164
- return this.emitValue ? options.map(o => o.value) : options;
165
- }
166
- parsePixelValue(value, fallback) {
167
- const parsed = Number.parseFloat(value);
168
- return Number.isFinite(parsed) ? parsed : fallback;
169
- }
170
- updateDropdownViewportConstraints() {
171
- if (!this.triggerRef)
127
+ return acc;
128
+ }, []);
129
+ }
130
+
131
+ const sdSelectListItemCss = () => `sd-select-list-item{display:block}sd-select-list-item .sd-select-list-item{display:flex;align-items:center;gap:var(--list-item-gap);padding:var(--list-item-padding-y) var(--list-item-padding-right) var(--list-item-padding-y) var(--list-item-padding-left);font-size:var(--list-item-font-size);line-height:var(--list-item-line-height);font-weight:var(--list-item-font-weight);background:var(--list-item-bg);color:var(--list-item-color);cursor:default;user-select:none}sd-select-list-item .sd-select-list-item--selectable{cursor:pointer}sd-select-list-item .sd-select-list-item--depth1-group{border-top:var(--list-item-border-top);font-weight:700}sd-select-list-item .sd-select-list-item--depth2-group{font-weight:500}sd-select-list-item .sd-select-list-item--focused.sd-select-list-item--selectable:not(.sd-select-list-item--disabled){background:var(--list-item-bg-hover);color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--selected:not(.sd-select-list-item--group){font-weight:var(--list-item-font-weight-selected);color:var(--list-item-color-selected)}sd-select-list-item .sd-select-list-item--selected.sd-select-list-item--focused{color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--disabled{color:var(--list-item-color-disabled);cursor:not-allowed}sd-select-list-item .sd-select-list-item__label{flex:0 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-list-item .sd-select-list-item__count{flex-shrink:0;font-weight:500;color:var(--list-item-color-disabled)}sd-select-list-item .sd-select-list-item--group.sd-select-list-item--focused .sd-select-list-item__count{color:#ffffff}sd-select-list-item .sd-select-list-item__checkbox{flex-shrink:0}`;
132
+
133
+ const SdSelectListItem = class {
134
+ constructor(hostRef) {
135
+ registerInstance(this, hostRef);
136
+ this.listItemClick = createEvent(this, "sdListItemClick", 7);
137
+ }
138
+ /** 렌더링할 옵션 데이터 */
139
+ option;
140
+ /** 계층 깊이 (1~3) */
141
+ depth = 1;
142
+ /** 선택 상태 (null=중간) */
143
+ isSelected = false;
144
+ /** 키보드 포커스 상태 여부 */
145
+ isFocused = false;
146
+ /** 체크박스 표시 여부 */
147
+ useCheckbox = false;
148
+ /** 다중 선택 시 (선택/전체) 카운트 */
149
+ countInfo;
150
+ /** 항목 클릭 시 발생합니다. */
151
+ listItemClick;
152
+ get isGroup() {
153
+ return !!this.option.children;
154
+ }
155
+ get isSelectable() {
156
+ return !this.isGroup || this.useCheckbox;
157
+ }
158
+ get depthKey() {
159
+ if (this.depth <= 1)
160
+ return 'depth1';
161
+ if (this.depth === 2)
162
+ return 'depth2';
163
+ return 'depth3';
164
+ }
165
+ get paddingLeft() {
166
+ return `${LIST_ITEM_LAYOUT.paddingLeft[this.depthKey]}px`;
167
+ }
168
+ handleClick = (e) => {
169
+ e.stopPropagation();
170
+ if (this.option.disabled || !this.isSelectable)
172
171
  return;
173
- const triggerRect = this.triggerRef.getBoundingClientRect();
174
- const viewportPadding = SdSelect.VIEWPORT_PADDING;
175
- const offsetY = SdSelect.PORTAL_OFFSET_Y;
176
- const preferredHeight = this.parsePixelValue(this.dropdownHeight, 260);
177
- const preferredWidth = this.parsePixelValue(this.maxDropdownWidth, 640);
178
- const availableBelow = Math.max(window.innerHeight - triggerRect.bottom - viewportPadding - offsetY, 0);
179
- const availableAbove = Math.max(triggerRect.top - viewportPadding - offsetY, 0);
180
- const availableHeight = Math.max(availableBelow, availableAbove);
181
- const availableWidth = Math.max(window.innerWidth - viewportPadding * 2, 0);
182
- this.resolvedDropdownHeight = `${Math.min(preferredHeight, availableHeight)}px`;
183
- this.resolvedMaxDropdownWidth = `${Math.min(preferredWidth, availableWidth)}px`;
184
- }
185
- handleViewportResize = () => {
186
- if (!this.isOpen)
172
+ this.listItemClick.emit(this.option);
173
+ };
174
+ handleCheckboxClick = (e) => {
175
+ e.stopPropagation();
176
+ };
177
+ handleCheckboxUpdate = (e) => {
178
+ e.stopPropagation();
179
+ if (this.option.disabled || !this.isSelectable)
187
180
  return;
188
- this.updateDropdownViewportConstraints();
181
+ this.listItemClick.emit(this.option);
189
182
  };
190
- findOriginalOption(value, options) {
191
- for (const opt of options) {
192
- if (opt.value === value)
193
- return opt;
194
- if (opt.children) {
195
- const found = this.findOriginalOption(value, opt.children);
196
- if (found)
197
- return found;
198
- }
183
+ render() {
184
+ const isGroup = this.isGroup;
185
+ const isDepth1Group = isGroup && this.depth === 1;
186
+ const isDepth2Group = isGroup && this.depth === 2;
187
+ const cssVars = {
188
+ '--list-item-padding-y': `${LIST_ITEM_LAYOUT.paddingY}px`,
189
+ '--list-item-padding-left': this.paddingLeft,
190
+ '--list-item-padding-right': `${LIST_ITEM_LAYOUT.paddingRight}px`,
191
+ '--list-item-gap': `${LIST_ITEM_LAYOUT.gap}px`,
192
+ '--list-item-font-size': `${LIST_ITEM_TYPOGRAPHY.fontSize}px`,
193
+ '--list-item-line-height': `${LIST_ITEM_TYPOGRAPHY.lineHeight}px`,
194
+ '--list-item-font-weight': LIST_ITEM_TYPOGRAPHY.fontWeight,
195
+ '--list-item-bg': isDepth1Group
196
+ ? LIST_ITEM_COLORS.depth1.bg
197
+ : isDepth2Group
198
+ ? LIST_ITEM_COLORS.depth2.bg
199
+ : LIST_ITEM_COLORS.bg.default,
200
+ '--list-item-bg-hover': LIST_ITEM_COLORS.bg.hover,
201
+ '--list-item-color': LIST_ITEM_COLORS.content.default,
202
+ '--list-item-color-hover': LIST_ITEM_COLORS.content.hover,
203
+ '--list-item-color-disabled': LIST_ITEM_COLORS.content.disabled,
204
+ '--list-item-color-selected': LIST_ITEM_COLORS.content.selected,
205
+ '--list-item-font-weight-selected': LIST_ITEM_TYPOGRAPHY.selectedFontWeight,
206
+ };
207
+ if (isDepth1Group) {
208
+ cssVars['--list-item-border-top'] =
209
+ `${LIST_ITEM_COLORS.depth1.borderWidth}px solid ${LIST_ITEM_COLORS.depth1.border}`;
199
210
  }
200
- return undefined;
211
+ return (
212
+ // 키보드 네비게이션은 부모 listbox 의 ArrowUp/Down + Enter 가 담당. 항목 자체는 role=option, tabindex=-1 으로 표시.
213
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events
214
+ h("div", { key: '86ebbdb437d7799cefb9a9466997df44ea346e44', role: "option", tabindex: -1, "aria-selected": this.isSelected === true ? 'true' : 'false', class: {
215
+ 'sd-select-list-item': true,
216
+ 'sd-select-list-item--group': isGroup,
217
+ 'sd-select-list-item--depth1-group': isDepth1Group,
218
+ 'sd-select-list-item--depth2-group': isDepth2Group,
219
+ 'sd-select-list-item--selected': this.isSelected === true,
220
+ 'sd-select-list-item--indeterminate': this.isSelected === null,
221
+ 'sd-select-list-item--focused': this.isFocused,
222
+ 'sd-select-list-item--selectable': this.isSelectable && !this.option.disabled,
223
+ 'sd-select-list-item--disabled': !!this.option.disabled,
224
+ }, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (h("sd-checkbox", { key: '297067b88bedf8eed648f60050688e23e9dfcbdd', value: this.isSelected === null ? null : !!this.isSelected, disabled: this.option.disabled, inverse: this.isFocused && this.isSelected !== false, class: "sd-select-list-item__checkbox", onClick: this.handleCheckboxClick, onSdUpdate: this.handleCheckboxUpdate })), isHtmlLabel(this.option.label) ? (h("span", { class: "sd-select-list-item__label", ref: el => el && (el.innerHTML = sanitizeInlineHtml(this.option.label)) })) : (h("span", { class: "sd-select-list-item__label" }, this.option.label)), this.countInfo && (h("span", { key: 'e71dbbfcd454a43fe2364aa0205f14805de20653', class: "sd-select-list-item__count" }, "(", this.countInfo.selected, "/", this.countInfo.total, ")"))));
201
225
  }
202
- closeDropdown() {
203
- if (!this.isOpen)
204
- return;
205
- this.isOpen = false;
206
- this.isAnimatingOut = true;
207
- if (this.closeAnimationTimer)
208
- clearTimeout(this.closeAnimationTimer);
209
- this.closeAnimationTimer = setTimeout(() => {
210
- this.isAnimatingOut = false;
211
- }, SdSelect.CLOSE_ANIMATION_DURATION);
212
- }
213
- prepareDropdownGeometry() {
214
- if (this.triggerRef) {
215
- this.triggerWidth = `${this.triggerRef.offsetWidth}px`;
216
- }
217
- this.updateDropdownViewportConstraints();
226
+ };
227
+ SdSelectListItem.style = sdSelectListItemCss();
228
+
229
+ const sdSelectListItemSearchCss = () => `sd-select-list-item-search{display:block}sd-select-list-item-search .sd-select-list-item-search{padding:4px 8px;position:sticky;top:0;z-index:1;background:white}sd-select-list-item-search .sd-select-list-item-search--scrolled{box-shadow:0 2px 4px rgba(0, 0, 0, 0.08)}sd-select-list-item-search .sd-select-list-item-search__inner{display:flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid #cccccc;border-radius:4px;background:white}sd-select-list-item-search .sd-select-list-item-search__inner:focus-within{border-color:#0075ff}sd-select-list-item-search .sd-select-list-item-search__icon{flex-shrink:0}sd-select-list-item-search .sd-select-list-item-search__input{flex:1;border:none;outline:none;font-size:12px;line-height:20px;color:#222222;background:transparent;min-width:0}sd-select-list-item-search .sd-select-list-item-search__input::placeholder{color:#aaaaaa}sd-select-list-item-search .sd-select-list-item-search__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:2px;border:none;background:transparent;cursor:pointer;border-radius:2px}sd-select-list-item-search .sd-select-list-item-search__clear:hover{background:#f0f0f0}sd-select-list-item-search .sd-select-list-item-search__clear--hidden{visibility:hidden;pointer-events:none}`;
230
+
231
+ const SdSelectListItemSearch = class {
232
+ constructor(hostRef) {
233
+ registerInstance(this, hostRef);
234
+ this.searchFilter = createEvent(this, "sdSearchFilter", 7);
235
+ this.searchFocus = createEvent(this, "sdSearchFocus", 7);
218
236
  }
219
- syncFocusedState(isOpen = this.isOpen) {
220
- this.focused = isOpen || this.triggerHasFocus;
237
+ /** 리스트가 스크롤된 상태 여부 (그림자 효과용) */
238
+ isScrolled = false;
239
+ searchText = '';
240
+ /** 검색어가 변경될 때 발생합니다. */
241
+ searchFilter;
242
+ /** 검색 입력에 포커스될 때 발생합니다. */
243
+ searchFocus;
244
+ inputEl;
245
+ debounceTimer;
246
+ focusRafId;
247
+ componentDidLoad() {
248
+ requestAnimationFrame(() => {
249
+ this.focusRafId = requestAnimationFrame(() => {
250
+ this.inputEl?.focus();
251
+ });
252
+ });
221
253
  }
222
- handleTriggerFocus = () => {
223
- this.triggerHasFocus = true;
224
- this.syncFocusedState();
225
- };
226
- handleTriggerBlur = () => {
227
- this.triggerHasFocus = false;
228
- this.syncFocusedState();
229
- };
230
- handleTriggerClick = () => {
231
- if (this.isOpen) {
232
- this.closeDropdown();
233
- return;
234
- }
235
- this.prepareDropdownGeometry();
236
- if (this.closeAnimationTimer)
237
- clearTimeout(this.closeAnimationTimer);
238
- this.isAnimatingOut = false;
239
- this.isOpen = true;
254
+ /** 검색 입력에 포커스를 이동합니다. */
255
+ async sdFocus() {
256
+ this.inputEl?.focus();
257
+ }
258
+ handleInput = (e) => {
259
+ this.searchText = e.target.value;
260
+ if (this.debounceTimer)
261
+ clearTimeout(this.debounceTimer);
262
+ this.debounceTimer = setTimeout(() => {
263
+ this.searchFilter.emit(this.searchText);
264
+ }, SEARCH_DEBOUNCE_MS);
240
265
  };
241
- emitUpdate(value) {
242
- this.update.emit(value);
243
- }
244
- handleOptionSelect = (detail) => {
245
- const { option, leaves } = detail;
246
- if (this.isMulti) {
247
- this.handleMultiSelect(option, leaves);
248
- }
249
- else {
250
- this.closeDropdown();
251
- this.value = this.emitValue ? option.value : option;
252
- const nextValue = this.value;
253
- requestAnimationFrame(() => {
254
- this.emitUpdate(nextValue);
255
- });
256
- }
266
+ handleClear = (e) => {
267
+ e.stopPropagation();
268
+ this.searchText = '';
269
+ if (this.debounceTimer)
270
+ clearTimeout(this.debounceTimer);
271
+ this.searchFilter.emit('');
272
+ this.inputEl?.focus();
257
273
  };
258
- handleMultiSelect(option, leaves) {
259
- const selected = this.getSelectedOptions();
260
- const isGroup = !!option.children;
261
- let newSelected;
262
- if (isGroup) {
263
- const allSelected = leaves.every(l => selected.some(s => s.value === l.value));
264
- if (allSelected) {
265
- const leafValues = new Set(leaves.map(l => l.value));
266
- newSelected = selected.filter(s => !leafValues.has(s.value));
267
- }
268
- else {
269
- const existing = new Set(selected.map(s => s.value));
270
- const toAdd = leaves.filter(l => !existing.has(l.value));
271
- newSelected = [...selected, ...toAdd];
272
- }
273
- }
274
- else {
275
- const exists = selected.some(s => s.value === option.value);
276
- newSelected = exists ? selected.filter(s => s.value !== option.value) : [...selected, option];
277
- }
278
- this.value = this.toMultiValue(newSelected);
279
- this.emitUpdate(this.value);
280
- }
281
- connectedCallback() {
282
- window.addEventListener('resize', this.handleViewportResize);
283
- }
284
274
  disconnectedCallback() {
285
- window.removeEventListener('resize', this.handleViewportResize);
286
- if (this.closeAnimationTimer)
287
- clearTimeout(this.closeAnimationTimer);
275
+ if (this.focusRafId !== undefined)
276
+ cancelAnimationFrame(this.focusRafId);
277
+ if (this.debounceTimer !== undefined)
278
+ clearTimeout(this.debounceTimer);
288
279
  }
289
280
  render() {
290
- const portalProps = {
291
- open: this.isOpen,
292
- parentRef: this.triggerRef,
293
- viewportPadding: SdSelect.VIEWPORT_PADDING,
294
- onSdClose: () => {
295
- this.closeDropdown();
296
- },
297
- };
298
- return (h("sd-field", { key: '2272f300b9aa6645dd772d06694e728f9abcea28', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, onMouseEnter: () => {
299
- this.hovered = true;
300
- }, onMouseLeave: () => {
301
- this.hovered = false;
302
- } }, h("div", { key: 'b9c769146720634abb4d018d022e28749ef0b939', class: "sd-select", ref: el => {
303
- this.triggerRef = el;
304
- } }, h("sd-select-trigger", { key: '792bbee6e36298a306d720bc15bff61d5bba7545', ref: el => {
305
- this.triggerComponentRef = el;
306
- }, displayText: this.displayText, placeholder: this.placeholder ?? '선택', disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick, onSdTriggerFocus: this.handleTriggerFocus, onSdTriggerBlur: this.handleTriggerBlur })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: 'c70299735ea4f9fd257a0b3384e728bbf9fc9d97', ...portalProps }, h("sd-select-listbox", { key: 'd0dbfc0382131e998f54d6a0cb04fc6b1a9128c8', type: this.type, options: this.options, value: this.value, emitValue: this.emitValue, useSearch: this.useSearch, useSelectAll: this.useSelectAll, triggerWidth: this.dropdownWidth || this.triggerWidth, maxWidth: this.resolvedMaxDropdownWidth, maxHeight: this.resolvedDropdownHeight, onSdOptionSelect: event => this.handleOptionSelect(event.detail) })))));
281
+ return (h("div", { key: 'fd13ed863fa624bb672a80594a1397831c55b859', class: {
282
+ 'sd-select-list-item-search': true,
283
+ 'sd-select-list-item-search--scrolled': this.isScrolled,
284
+ } }, h("div", { key: 'c36783523de2c29b04ce300307770a666daad9df', class: "sd-select-list-item-search__inner" }, h("sd-icon", { key: '6e21aebf25090024c882dda1e9fec46219dce8ee', name: "search", size: 16, color: "grey_70", class: "sd-select-list-item-search__icon" }), h("input", { key: '2ed89f33de74c98cde3caa4e8924ef2e7b3baa0f', ref: el => {
285
+ this.inputEl = el;
286
+ }, type: "text", class: "sd-select-list-item-search__input", placeholder: "\uAC80\uC0C9\uC5B4 \uC785\uB825", value: this.searchText, onInput: this.handleInput, onFocus: () => this.searchFocus.emit() }), h("button", { key: 'c16ed94bbddd24e829548b4ff063a6a3095f955a', type: "button", class: {
287
+ 'sd-select-list-item-search__clear': true,
288
+ 'sd-select-list-item-search__clear--hidden': this.searchText === '',
289
+ }, onClick: this.handleClear, tabindex: this.searchText !== '' ? 0 : -1, "aria-hidden": this.searchText !== '' ? 'false' : 'true' }, h("sd-icon", { key: 'f2808e3b1b5ae6937bd818e4f29f999d04286b60', name: "close", size: 12, color: "#888888" })))));
307
290
  }
308
- static get watchers() { return {
309
- "isOpen": [{
310
- "watchIsOpen": 0
311
- }]
312
- }; }
313
291
  };
314
- SdSelect.style = sdSelectCss();
292
+ SdSelectListItemSearch.style = sdSelectListItemSearchCss();
315
293
 
316
294
  const sdSelectListboxCss = () => `:host{display:block}:host .sd-select-listbox{display:flex;flex-direction:column;width:var(--listbox-trigger-width);max-width:var(--listbox-max-width);max-height:var(--listbox-max-height);border-radius:var(--listbox-radius);background:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);overflow:hidden;outline:none}:host .sd-select-listbox__list{flex:1;min-height:0;overflow-y:auto;padding-bottom:0}:host .sd-select-listbox__list::-webkit-scrollbar{opacity:0;width:8px;background:#E5E5E5}:host .sd-select-listbox__list::-webkit-scrollbar:horizontal{height:8px}:host .sd-select-listbox__list::-webkit-scrollbar-thumb{height:80px;background-color:#CCCCCC;border-radius:4px}:host .sd-select-listbox__list::-webkit-scrollbar-track{background-color:#E5E5E5}:host .sd-select-listbox__empty{padding:12px;text-align:center;font-size:12px;line-height:20px;color:#888888}`;
317
295
 
@@ -680,9 +658,9 @@ const SdSelectListbox = class {
680
658
  '--listbox-max-height': this.maxHeight ?? '260px',
681
659
  '--listbox-radius': `${LIST_BOX_LAYOUT.radius}px`,
682
660
  };
683
- return (h("div", { key: '4de15e4c150ee542656ee3f73aa41dd32379748f', class: "sd-select-listbox", style: cssVars }, this.showSearch && (h("sd-select-list-item-search", { key: 'cb656ccafc2833b438f14ac48ca8686684212ead', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), h("div", { key: '5ffaefb63605c4319810046e9d40aa5fcb4754de', class: "sd-select-listbox__list", onScroll: this.handleScroll, ref: el => {
661
+ return (h("div", { key: 'cec8e4e12dd806a93375853386a1d7cc3ac6b269', class: "sd-select-listbox", style: cssVars }, this.showSearch && (h("sd-select-list-item-search", { key: '9e07a7e742e956df314796e9babf6c0a7fb21d7f', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), h("div", { key: 'd5ff5620c63b5c53e69b6348f2c9cd6cb73cbe88', class: "sd-select-listbox__list", onScroll: this.handleScroll, ref: el => {
684
662
  this.listEl = el;
685
- } }, this.showSelectAll && (h("sd-select-list-item", { key: 'e1d3f7a37a037b386aae50cceb61e2b79d37453e', option: SdSelectListbox.SELECT_ALL_OPTION, depth: 1, isSelected: this.selectAllState, isFocused: this.isOptionFocused(SdSelectListbox.SELECT_ALL_OPTION), useCheckbox: true, onSdListItemClick: this.handleSelectAllClick, onMouseEnter: () => this.handleOptionHover(SdSelectListbox.SELECT_ALL_OPTION) })), this.isEmpty ? (h("div", { class: "sd-select-listbox__empty" }, EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (h("sd-select-list-item", { option: option, depth: 1, isSelected: this.isOptionSelected(option), isFocused: this.isOptionFocused(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick, onMouseEnter: () => this.handleOptionHover(option) })))))));
663
+ } }, this.showSelectAll && (h("sd-select-list-item", { key: '9b36cdd7466b639c65497da94ee1e3c5129566cb', option: SdSelectListbox.SELECT_ALL_OPTION, depth: 1, isSelected: this.selectAllState, isFocused: this.isOptionFocused(SdSelectListbox.SELECT_ALL_OPTION), useCheckbox: true, onSdListItemClick: this.handleSelectAllClick, onMouseEnter: () => this.handleOptionHover(SdSelectListbox.SELECT_ALL_OPTION) })), this.isEmpty ? (h("div", { class: "sd-select-listbox__empty" }, EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (h("sd-select-list-item", { option: option, depth: 1, isSelected: this.isOptionSelected(option), isFocused: this.isOptionFocused(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick, onMouseEnter: () => this.handleOptionHover(option) })))))));
686
664
  }
687
665
  static get watchers() { return {
688
666
  "searchKeyword": [{
@@ -750,7 +728,7 @@ const SdSelectTrigger = class {
750
728
  ? SELECT_COLORS.icon.disabled
751
729
  : SELECT_COLORS.icon.default,
752
730
  };
753
- return (h("div", { key: '33e639898a581e8556e1e9c966f14cb863246c35', ref: el => {
731
+ return (h("div", { key: '2ec5e736c0742a10fdfa9b4b12b0820e99c30f7f', ref: el => {
754
732
  this.triggerEl = el;
755
733
  }, role: "button", "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, class: {
756
734
  'sd-select-trigger': true,
@@ -761,7 +739,7 @@ const SdSelectTrigger = class {
761
739
  e.preventDefault();
762
740
  this.handleClick();
763
741
  }
764
- }, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: 'a935f82879727eb212422c875b16e5fbf01460ba', class: "sd-select-trigger__content" }, hasValue && isHtmlLabel(this.displayText) ? (h("span", { class: "sd-select-trigger__text", ref: el => el && (el.innerHTML = sanitizeInlineHtml(this.displayText)) })) : (h("span", { class: "sd-select-trigger__text" }, hasValue ? this.displayText : (this.placeholder ?? '선택'))), h("sd-icon", { key: 'e98e8e317aa86a960674b21714ca90cfa3920197', name: "chevronDown", size: 12, color: "var(--trigger-icon-color)", class: {
742
+ }, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '6b71e60a76d430bfe14bc5b7c59d82130be27c8a', class: "sd-select-trigger__content" }, hasValue && isHtmlLabel(this.displayText) ? (h("span", { class: "sd-select-trigger__text", ref: el => el && (el.innerHTML = sanitizeInlineHtml(this.displayText)) })) : (h("span", { class: "sd-select-trigger__text" }, hasValue ? this.displayText : (this.placeholder ?? '선택'))), h("sd-icon", { key: 'e34eae87f518f1b015e1d59bacf97bec66b6ec6d', name: "chevronDown", size: 12, color: "var(--trigger-icon-color)", class: {
765
743
  'sd-select-trigger__icon': true,
766
744
  'sd-select-trigger__icon--open': this.isOpen,
767
745
  } }))));
@@ -769,4 +747,4 @@ const SdSelectTrigger = class {
769
747
  };
770
748
  SdSelectTrigger.style = sdSelectTriggerCss();
771
749
 
772
- export { SdSelect as sd_select, SdSelectListbox as sd_select_listbox, SdSelectTrigger as sd_select_trigger };
750
+ export { SdSelectListItem as sd_select_list_item, SdSelectListItemSearch as sd_select_list_item_search, SdSelectListbox as sd_select_listbox, SdSelectTrigger as sd_select_trigger };