@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,319 +1,297 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D12oddge.js');
4
- var index$1 = require('./index-BUvXpPc3.js');
5
- var sdSelect_config = require('./sd-select.config-omyxekRa.js');
3
+ var index = require('./index-iiJZMzVM.js');
4
+ var component_listItem = require('./component.listItem-cAO_ppOz.js');
5
+ var component_listBox = require('./component.listBox-MHAv4Yy7.js');
6
6
  var sanitizeInlineHtml = require('./sanitize-inline-html-CRCAeQ46.js');
7
- require('./component.listItem-cAO_ppOz.js');
8
- require('./component.listBox-MHAv4Yy7.js');
9
7
 
10
- const sdSelectCss = () => `sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}`;
8
+ const select = {
9
+ sm: {
10
+ paddingX: "12",
11
+ gap: "8",
12
+ typography: {
13
+ fontWeight: "400",
14
+ fontSize: "12",
15
+ lineHeight: "20"}},
16
+ icon: {
17
+ "default": "#888888",
18
+ disabled: "#BBBBBB"
19
+ },
20
+ text: {
21
+ "default": "#222222",
22
+ disabled: "#888888"
23
+ }
24
+ };
25
+ var selectTokens = {
26
+ select: select
27
+ };
11
28
 
12
- const SdSelect = class {
13
- constructor(hostRef) {
14
- index.registerInstance(this, hostRef);
15
- this.update = index.createEvent(this, "sdUpdate", 7);
16
- this.dropDownShow = index.createEvent(this, "sdDropDownShow", 7);
17
- }
18
- static VIEWPORT_PADDING = 20;
19
- static PORTAL_OFFSET_Y = 4;
20
- static CLOSE_ANIMATION_DURATION = 150;
21
- get el() { return index.getElement(this); }
22
- /** 셀렉트 타입 (단일/다중/계층) */
23
- type = 'default';
24
- /** 현재 선택된 값 */
25
- value = null;
26
- /** 선택 옵션 목록 */
27
- options = [];
28
- /** 값이 없을 때 표시할 플레이스홀더 */
29
- placeholder = '선택';
30
- /** 드롭다운 너비 (없으면 트리거 너비로 자동 맞춤) */
31
- dropdownWidth = '';
32
- /** 드롭다운 최대 너비 */
33
- maxDropdownWidth = '640px';
34
- /** 드롭다운 최대 높이 */
35
- dropdownHeight = '260px';
36
- /** 비활성 상태 여부 */
37
- disabled = false;
38
- /** 레이블 텍스트 */
39
- label = '';
40
- /** 레이블 너비 */
41
- labelWidth = '';
42
- /** 필드 우측 어드온 레이블 */
43
- addonLabel = '';
44
- /** 어드온 정렬 방향 */
45
- addonAlign = 'start';
46
- /** 에러 상태 여부 */
47
- error = false;
48
- /** 필드 하단 힌트 텍스트 */
49
- hint = '';
50
- /** 에러 메시지 */
51
- errorMessage = '';
52
- /** 유효성 검사 규칙 목록 */
53
- rules = [];
54
- /** 레이블 영역 아이콘 */
55
- icon = undefined;
56
- /** 레이블 툴팁 텍스트 */
57
- labelTooltip = '';
58
- /** 레이블 툴팁 상세 옵션 */
59
- labelTooltipProps = null;
60
- /** true이면 value로 SelectOption 대신 원시값(string|number) 방출 */
61
- emitValue = false;
62
- /** 필드 너비 */
63
- width = '';
64
- /** 드롭다운 내 검색 입력 표시 여부 */
65
- useSearch = false;
66
- /** 전체 선택 시 표시할 레이블 */
67
- allSelectedLabel = '전체';
68
- /** 전체 선택 체크박스 표시 여부 */
69
- useSelectAll = false;
70
- isOpen = false;
71
- isAnimatingOut = false;
72
- triggerWidth = '200px';
73
- resolvedDropdownHeight = '260px';
74
- resolvedMaxDropdownWidth = '640px';
75
- focused = false;
76
- hovered = false;
77
- /** 선택 값이 변경될 때 발생합니다. */
78
- update;
79
- /** 드롭다운 열림/닫힘 상태가 바뀔 때 발생합니다. */
80
- dropDownShow;
81
- /** 셀렉트 트리거에 포커스를 이동합니다. */
82
- async sdFocus() {
83
- if (this.disabled)
84
- return;
85
- await this.triggerComponentRef?.sdFocus();
86
- }
87
- /** 드롭다운을 엽니다. */
88
- async sdOpen() {
89
- // sdFocus 직후 호출 시 트리거 ref/레이아웃이 안정될 때까지 한 틱 대기
90
- await new Promise(resolve => setTimeout(resolve, 0));
91
- if (this.disabled || this.isOpen)
92
- return;
93
- this.prepareDropdownGeometry();
94
- if (this.closeAnimationTimer)
95
- clearTimeout(this.closeAnimationTimer);
96
- this.isAnimatingOut = false;
97
- this.isOpen = true;
98
- }
99
- triggerRef;
100
- triggerComponentRef;
101
- closeAnimationTimer;
102
- /** 폼 연동용 name 속성 */
103
- name = index$1.nanoid();
104
- triggerHasFocus = false;
105
- watchIsOpen(newValue) {
106
- this.syncFocusedState(newValue);
107
- this.dropDownShow.emit({ isOpen: newValue });
108
- }
109
- get isMulti() {
110
- return this.type === 'multi' || this.type === 'multi_depth';
111
- }
112
- get displayText() {
113
- if (this.isMulti) {
114
- if (!Array.isArray(this.value) || this.value.length === 0)
115
- return '';
116
- const nonDisabledLeaves = this.getNonDisabledLeaves(this.options);
117
- const selected = this.getSelectedOptions();
118
- const allSelected = nonDisabledLeaves.length > 0 &&
119
- nonDisabledLeaves.every(leaf => selected.some(s => s.value === leaf.value));
120
- if (allSelected)
121
- return this.allSelectedLabel ?? '전체';
122
- const flat = this.flattenOptions(this.options);
123
- return this.value
124
- .map(item => {
125
- if (item != null && typeof item === 'object') {
126
- const opt = item;
127
- return opt.label ?? flat.find(o => o.value === opt.value)?.label ?? '';
128
- }
129
- return flat.find(o => o.value === item)?.label ?? '';
130
- })
131
- .filter(Boolean)
132
- .join(', ');
29
+ // ── Select Trigger Tokens ──
30
+ const SELECT_LAYOUT = {
31
+ paddingX: selectTokens.select.sm.paddingX,
32
+ gap: selectTokens.select.sm.gap};
33
+ const SELECT_TYPOGRAPHY = {
34
+ fontSize: selectTokens.select.sm.typography.fontSize,
35
+ lineHeight: selectTokens.select.sm.typography.lineHeight,
36
+ fontWeight: selectTokens.select.sm.typography.fontWeight,
37
+ };
38
+ const SELECT_COLORS = {
39
+ icon: {
40
+ default: selectTokens.select.icon.default,
41
+ disabled: selectTokens.select.icon.disabled,
42
+ },
43
+ text: {
44
+ default: selectTokens.select.text.default,
45
+ disabled: selectTokens.select.text.disabled,
46
+ },
47
+ };
48
+ // ── ListItem Tokens ──
49
+ const LIST_ITEM_LAYOUT = {
50
+ paddingY: component_listItem.listItemTokens.listItem.paddingY,
51
+ paddingRight: component_listItem.listItemTokens.listItem.paddingRight,
52
+ paddingLeft: {
53
+ depth1: component_listItem.listItemTokens.listItem.paddingLeft.depth1,
54
+ depth2: component_listItem.listItemTokens.listItem.paddingLeft.depth2,
55
+ depth3: component_listItem.listItemTokens.listItem.paddingLeft.depth3,
56
+ },
57
+ gap: component_listItem.listItemTokens.listItem.gap,
58
+ };
59
+ const LIST_ITEM_TYPOGRAPHY = {
60
+ fontSize: component_listItem.listItemTokens.listItem.typography.default.fontSize,
61
+ lineHeight: component_listItem.listItemTokens.listItem.typography.default.lineHeight,
62
+ fontWeight: component_listItem.listItemTokens.listItem.typography.default.fontWeight,
63
+ selectedFontWeight: component_listItem.listItemTokens.listItem.typography.selected.fontWeight,
64
+ };
65
+ const LIST_ITEM_COLORS = {
66
+ bg: {
67
+ default: component_listItem.listItemTokens.listItem.bg.default,
68
+ hover: component_listItem.listItemTokens.listItem.bg.hover,
69
+ },
70
+ content: {
71
+ default: component_listItem.listItemTokens.listItem.content.default,
72
+ hover: component_listItem.listItemTokens.listItem.content.hover,
73
+ disabled: component_listItem.listItemTokens.listItem.content.disabled,
74
+ selected: component_listItem.listItemTokens.listItem.content.selected,
75
+ },
76
+ depth1: {
77
+ bg: component_listItem.listItemTokens.listItem.depth1.bg.default,
78
+ border: component_listItem.listItemTokens.listItem.depth1.border.color,
79
+ borderWidth: component_listItem.listItemTokens.listItem.depth1.border.width,
80
+ },
81
+ depth2: {
82
+ bg: component_listItem.listItemTokens.listItem.depth2.middle.bg,
83
+ }};
84
+ // ── ListBox Tokens ──
85
+ const LIST_BOX_LAYOUT = {
86
+ radius: component_listBox.listBoxTokens.listBox.radius,
87
+ };
88
+ // ── Constants ──
89
+ const SEARCH_THRESHOLD = 11;
90
+ const SEARCH_DEBOUNCE_MS = 1000;
91
+ const EMPTY_MESSAGE = '표시할 항목이 없습니다.';
92
+ // ── Utilities ──
93
+ function isHtmlLabel(label) {
94
+ return /<[a-z][\s\S]*>/i.test(label);
95
+ }
96
+ function extractText(html) {
97
+ return html.replace(/<[^>]*>/g, '');
98
+ }
99
+ function countLeaves(options) {
100
+ return options.reduce((sum, option) => {
101
+ if (option.children) {
102
+ return sum + countLeaves(option.children);
133
103
  }
134
- if (this.value == null)
135
- return '';
136
- if (!this.emitValue && typeof this.value === 'object' && !Array.isArray(this.value)) {
137
- return this.value.label ?? '';
104
+ return sum + 1;
105
+ }, 0);
106
+ }
107
+ function filterTree(options, keyword) {
108
+ const lowerKeyword = (keyword ?? '').toLowerCase();
109
+ return options.reduce((acc, option) => {
110
+ const labelText = isHtmlLabel(option.label) ? extractText(option.label) : option.label;
111
+ const selfMatch = labelText != null && labelText.toLowerCase().includes(lowerKeyword);
112
+ if (option.children) {
113
+ // 그룹: 자식은 항상 추가로 필터링한다.
114
+ // - 자식 중 일치하는 게 있으면 그 자식들만 노출
115
+ // - 자식 매칭이 없더라도 그룹명이 매칭되면 그룹 헤더는 그대로 노출
116
+ // (이때 children 은 빈 배열로 두고, 선택 동작은 collectVisibleLeaves
117
+ // 의 fallback 이 원본 트리를 사용해 처리한다)
118
+ const filteredChildren = filterTree(option.children, keyword);
119
+ if (filteredChildren.length > 0) {
120
+ acc.push({ ...option, children: filteredChildren });
121
+ }
122
+ else if (selfMatch) {
123
+ acc.push({ ...option, children: [] });
124
+ }
138
125
  }
139
- const flat = this.flattenOptions(this.options);
140
- return flat.find(o => o.value === this.value)?.label ?? '';
141
- }
142
- flattenOptions(options) {
143
- return options.flatMap(o => (o.children ? this.flattenOptions(o.children) : [o]));
144
- }
145
- getNonDisabledLeaves(options) {
146
- return options.flatMap(o => {
147
- if (o.disabled)
148
- return [];
149
- if (o.children)
150
- return this.getNonDisabledLeaves(o.children);
151
- return [o];
152
- });
153
- }
154
- getSelectedOptions() {
155
- const val = this.value;
156
- if (val == null || !Array.isArray(val))
157
- return [];
158
- if (this.emitValue) {
159
- return val
160
- .map(v => this.findOriginalOption(v, this.options))
161
- .filter((o) => !!o);
126
+ else if (selfMatch) {
127
+ acc.push({ ...option });
162
128
  }
163
- return val;
164
- }
165
- toMultiValue(options) {
166
- return this.emitValue ? options.map(o => o.value) : options;
167
- }
168
- parsePixelValue(value, fallback) {
169
- const parsed = Number.parseFloat(value);
170
- return Number.isFinite(parsed) ? parsed : fallback;
171
- }
172
- updateDropdownViewportConstraints() {
173
- if (!this.triggerRef)
129
+ return acc;
130
+ }, []);
131
+ }
132
+
133
+ 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}`;
134
+
135
+ const SdSelectListItem = class {
136
+ constructor(hostRef) {
137
+ index.registerInstance(this, hostRef);
138
+ this.listItemClick = index.createEvent(this, "sdListItemClick", 7);
139
+ }
140
+ /** 렌더링할 옵션 데이터 */
141
+ option;
142
+ /** 계층 깊이 (1~3) */
143
+ depth = 1;
144
+ /** 선택 상태 (null=중간) */
145
+ isSelected = false;
146
+ /** 키보드 포커스 상태 여부 */
147
+ isFocused = false;
148
+ /** 체크박스 표시 여부 */
149
+ useCheckbox = false;
150
+ /** 다중 선택 시 (선택/전체) 카운트 */
151
+ countInfo;
152
+ /** 항목 클릭 시 발생합니다. */
153
+ listItemClick;
154
+ get isGroup() {
155
+ return !!this.option.children;
156
+ }
157
+ get isSelectable() {
158
+ return !this.isGroup || this.useCheckbox;
159
+ }
160
+ get depthKey() {
161
+ if (this.depth <= 1)
162
+ return 'depth1';
163
+ if (this.depth === 2)
164
+ return 'depth2';
165
+ return 'depth3';
166
+ }
167
+ get paddingLeft() {
168
+ return `${LIST_ITEM_LAYOUT.paddingLeft[this.depthKey]}px`;
169
+ }
170
+ handleClick = (e) => {
171
+ e.stopPropagation();
172
+ if (this.option.disabled || !this.isSelectable)
174
173
  return;
175
- const triggerRect = this.triggerRef.getBoundingClientRect();
176
- const viewportPadding = SdSelect.VIEWPORT_PADDING;
177
- const offsetY = SdSelect.PORTAL_OFFSET_Y;
178
- const preferredHeight = this.parsePixelValue(this.dropdownHeight, 260);
179
- const preferredWidth = this.parsePixelValue(this.maxDropdownWidth, 640);
180
- const availableBelow = Math.max(window.innerHeight - triggerRect.bottom - viewportPadding - offsetY, 0);
181
- const availableAbove = Math.max(triggerRect.top - viewportPadding - offsetY, 0);
182
- const availableHeight = Math.max(availableBelow, availableAbove);
183
- const availableWidth = Math.max(window.innerWidth - viewportPadding * 2, 0);
184
- this.resolvedDropdownHeight = `${Math.min(preferredHeight, availableHeight)}px`;
185
- this.resolvedMaxDropdownWidth = `${Math.min(preferredWidth, availableWidth)}px`;
186
- }
187
- handleViewportResize = () => {
188
- if (!this.isOpen)
174
+ this.listItemClick.emit(this.option);
175
+ };
176
+ handleCheckboxClick = (e) => {
177
+ e.stopPropagation();
178
+ };
179
+ handleCheckboxUpdate = (e) => {
180
+ e.stopPropagation();
181
+ if (this.option.disabled || !this.isSelectable)
189
182
  return;
190
- this.updateDropdownViewportConstraints();
183
+ this.listItemClick.emit(this.option);
191
184
  };
192
- findOriginalOption(value, options) {
193
- for (const opt of options) {
194
- if (opt.value === value)
195
- return opt;
196
- if (opt.children) {
197
- const found = this.findOriginalOption(value, opt.children);
198
- if (found)
199
- return found;
200
- }
185
+ render() {
186
+ const isGroup = this.isGroup;
187
+ const isDepth1Group = isGroup && this.depth === 1;
188
+ const isDepth2Group = isGroup && this.depth === 2;
189
+ const cssVars = {
190
+ '--list-item-padding-y': `${LIST_ITEM_LAYOUT.paddingY}px`,
191
+ '--list-item-padding-left': this.paddingLeft,
192
+ '--list-item-padding-right': `${LIST_ITEM_LAYOUT.paddingRight}px`,
193
+ '--list-item-gap': `${LIST_ITEM_LAYOUT.gap}px`,
194
+ '--list-item-font-size': `${LIST_ITEM_TYPOGRAPHY.fontSize}px`,
195
+ '--list-item-line-height': `${LIST_ITEM_TYPOGRAPHY.lineHeight}px`,
196
+ '--list-item-font-weight': LIST_ITEM_TYPOGRAPHY.fontWeight,
197
+ '--list-item-bg': isDepth1Group
198
+ ? LIST_ITEM_COLORS.depth1.bg
199
+ : isDepth2Group
200
+ ? LIST_ITEM_COLORS.depth2.bg
201
+ : LIST_ITEM_COLORS.bg.default,
202
+ '--list-item-bg-hover': LIST_ITEM_COLORS.bg.hover,
203
+ '--list-item-color': LIST_ITEM_COLORS.content.default,
204
+ '--list-item-color-hover': LIST_ITEM_COLORS.content.hover,
205
+ '--list-item-color-disabled': LIST_ITEM_COLORS.content.disabled,
206
+ '--list-item-color-selected': LIST_ITEM_COLORS.content.selected,
207
+ '--list-item-font-weight-selected': LIST_ITEM_TYPOGRAPHY.selectedFontWeight,
208
+ };
209
+ if (isDepth1Group) {
210
+ cssVars['--list-item-border-top'] =
211
+ `${LIST_ITEM_COLORS.depth1.borderWidth}px solid ${LIST_ITEM_COLORS.depth1.border}`;
201
212
  }
202
- return undefined;
213
+ return (
214
+ // 키보드 네비게이션은 부모 listbox 의 ArrowUp/Down + Enter 가 담당. 항목 자체는 role=option, tabindex=-1 으로 표시.
215
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events
216
+ index.h("div", { key: '86ebbdb437d7799cefb9a9466997df44ea346e44', role: "option", tabindex: -1, "aria-selected": this.isSelected === true ? 'true' : 'false', class: {
217
+ 'sd-select-list-item': true,
218
+ 'sd-select-list-item--group': isGroup,
219
+ 'sd-select-list-item--depth1-group': isDepth1Group,
220
+ 'sd-select-list-item--depth2-group': isDepth2Group,
221
+ 'sd-select-list-item--selected': this.isSelected === true,
222
+ 'sd-select-list-item--indeterminate': this.isSelected === null,
223
+ 'sd-select-list-item--focused': this.isFocused,
224
+ 'sd-select-list-item--selectable': this.isSelectable && !this.option.disabled,
225
+ 'sd-select-list-item--disabled': !!this.option.disabled,
226
+ }, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (index.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) ? (index.h("span", { class: "sd-select-list-item__label", ref: el => el && (el.innerHTML = sanitizeInlineHtml.sanitizeInlineHtml(this.option.label)) })) : (index.h("span", { class: "sd-select-list-item__label" }, this.option.label)), this.countInfo && (index.h("span", { key: 'e71dbbfcd454a43fe2364aa0205f14805de20653', class: "sd-select-list-item__count" }, "(", this.countInfo.selected, "/", this.countInfo.total, ")"))));
203
227
  }
204
- closeDropdown() {
205
- if (!this.isOpen)
206
- return;
207
- this.isOpen = false;
208
- this.isAnimatingOut = true;
209
- if (this.closeAnimationTimer)
210
- clearTimeout(this.closeAnimationTimer);
211
- this.closeAnimationTimer = setTimeout(() => {
212
- this.isAnimatingOut = false;
213
- }, SdSelect.CLOSE_ANIMATION_DURATION);
214
- }
215
- prepareDropdownGeometry() {
216
- if (this.triggerRef) {
217
- this.triggerWidth = `${this.triggerRef.offsetWidth}px`;
218
- }
219
- this.updateDropdownViewportConstraints();
228
+ };
229
+ SdSelectListItem.style = sdSelectListItemCss();
230
+
231
+ 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}`;
232
+
233
+ const SdSelectListItemSearch = class {
234
+ constructor(hostRef) {
235
+ index.registerInstance(this, hostRef);
236
+ this.searchFilter = index.createEvent(this, "sdSearchFilter", 7);
237
+ this.searchFocus = index.createEvent(this, "sdSearchFocus", 7);
220
238
  }
221
- syncFocusedState(isOpen = this.isOpen) {
222
- this.focused = isOpen || this.triggerHasFocus;
239
+ /** 리스트가 스크롤된 상태 여부 (그림자 효과용) */
240
+ isScrolled = false;
241
+ searchText = '';
242
+ /** 검색어가 변경될 때 발생합니다. */
243
+ searchFilter;
244
+ /** 검색 입력에 포커스될 때 발생합니다. */
245
+ searchFocus;
246
+ inputEl;
247
+ debounceTimer;
248
+ focusRafId;
249
+ componentDidLoad() {
250
+ requestAnimationFrame(() => {
251
+ this.focusRafId = requestAnimationFrame(() => {
252
+ this.inputEl?.focus();
253
+ });
254
+ });
223
255
  }
224
- handleTriggerFocus = () => {
225
- this.triggerHasFocus = true;
226
- this.syncFocusedState();
227
- };
228
- handleTriggerBlur = () => {
229
- this.triggerHasFocus = false;
230
- this.syncFocusedState();
231
- };
232
- handleTriggerClick = () => {
233
- if (this.isOpen) {
234
- this.closeDropdown();
235
- return;
236
- }
237
- this.prepareDropdownGeometry();
238
- if (this.closeAnimationTimer)
239
- clearTimeout(this.closeAnimationTimer);
240
- this.isAnimatingOut = false;
241
- this.isOpen = true;
256
+ /** 검색 입력에 포커스를 이동합니다. */
257
+ async sdFocus() {
258
+ this.inputEl?.focus();
259
+ }
260
+ handleInput = (e) => {
261
+ this.searchText = e.target.value;
262
+ if (this.debounceTimer)
263
+ clearTimeout(this.debounceTimer);
264
+ this.debounceTimer = setTimeout(() => {
265
+ this.searchFilter.emit(this.searchText);
266
+ }, SEARCH_DEBOUNCE_MS);
242
267
  };
243
- emitUpdate(value) {
244
- this.update.emit(value);
245
- }
246
- handleOptionSelect = (detail) => {
247
- const { option, leaves } = detail;
248
- if (this.isMulti) {
249
- this.handleMultiSelect(option, leaves);
250
- }
251
- else {
252
- this.closeDropdown();
253
- this.value = this.emitValue ? option.value : option;
254
- const nextValue = this.value;
255
- requestAnimationFrame(() => {
256
- this.emitUpdate(nextValue);
257
- });
258
- }
268
+ handleClear = (e) => {
269
+ e.stopPropagation();
270
+ this.searchText = '';
271
+ if (this.debounceTimer)
272
+ clearTimeout(this.debounceTimer);
273
+ this.searchFilter.emit('');
274
+ this.inputEl?.focus();
259
275
  };
260
- handleMultiSelect(option, leaves) {
261
- const selected = this.getSelectedOptions();
262
- const isGroup = !!option.children;
263
- let newSelected;
264
- if (isGroup) {
265
- const allSelected = leaves.every(l => selected.some(s => s.value === l.value));
266
- if (allSelected) {
267
- const leafValues = new Set(leaves.map(l => l.value));
268
- newSelected = selected.filter(s => !leafValues.has(s.value));
269
- }
270
- else {
271
- const existing = new Set(selected.map(s => s.value));
272
- const toAdd = leaves.filter(l => !existing.has(l.value));
273
- newSelected = [...selected, ...toAdd];
274
- }
275
- }
276
- else {
277
- const exists = selected.some(s => s.value === option.value);
278
- newSelected = exists ? selected.filter(s => s.value !== option.value) : [...selected, option];
279
- }
280
- this.value = this.toMultiValue(newSelected);
281
- this.emitUpdate(this.value);
282
- }
283
- connectedCallback() {
284
- window.addEventListener('resize', this.handleViewportResize);
285
- }
286
276
  disconnectedCallback() {
287
- window.removeEventListener('resize', this.handleViewportResize);
288
- if (this.closeAnimationTimer)
289
- clearTimeout(this.closeAnimationTimer);
277
+ if (this.focusRafId !== undefined)
278
+ cancelAnimationFrame(this.focusRafId);
279
+ if (this.debounceTimer !== undefined)
280
+ clearTimeout(this.debounceTimer);
290
281
  }
291
282
  render() {
292
- const portalProps = {
293
- open: this.isOpen,
294
- parentRef: this.triggerRef,
295
- viewportPadding: SdSelect.VIEWPORT_PADDING,
296
- onSdClose: () => {
297
- this.closeDropdown();
298
- },
299
- };
300
- return (index.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: () => {
301
- this.hovered = true;
302
- }, onMouseLeave: () => {
303
- this.hovered = false;
304
- } }, index.h("div", { key: 'b9c769146720634abb4d018d022e28749ef0b939', class: "sd-select", ref: el => {
305
- this.triggerRef = el;
306
- } }, index.h("sd-select-trigger", { key: '792bbee6e36298a306d720bc15bff61d5bba7545', ref: el => {
307
- this.triggerComponentRef = el;
308
- }, 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) && (index.h("sd-portal", { key: 'c70299735ea4f9fd257a0b3384e728bbf9fc9d97', ...portalProps }, index.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) })))));
283
+ return (index.h("div", { key: 'fd13ed863fa624bb672a80594a1397831c55b859', class: {
284
+ 'sd-select-list-item-search': true,
285
+ 'sd-select-list-item-search--scrolled': this.isScrolled,
286
+ } }, index.h("div", { key: 'c36783523de2c29b04ce300307770a666daad9df', class: "sd-select-list-item-search__inner" }, index.h("sd-icon", { key: '6e21aebf25090024c882dda1e9fec46219dce8ee', name: "search", size: 16, color: "grey_70", class: "sd-select-list-item-search__icon" }), index.h("input", { key: '2ed89f33de74c98cde3caa4e8924ef2e7b3baa0f', ref: el => {
287
+ this.inputEl = el;
288
+ }, 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() }), index.h("button", { key: 'c16ed94bbddd24e829548b4ff063a6a3095f955a', type: "button", class: {
289
+ 'sd-select-list-item-search__clear': true,
290
+ 'sd-select-list-item-search__clear--hidden': this.searchText === '',
291
+ }, onClick: this.handleClear, tabindex: this.searchText !== '' ? 0 : -1, "aria-hidden": this.searchText !== '' ? 'false' : 'true' }, index.h("sd-icon", { key: 'f2808e3b1b5ae6937bd818e4f29f999d04286b60', name: "close", size: 12, color: "#888888" })))));
309
292
  }
310
- static get watchers() { return {
311
- "isOpen": [{
312
- "watchIsOpen": 0
313
- }]
314
- }; }
315
293
  };
316
- SdSelect.style = sdSelectCss();
294
+ SdSelectListItemSearch.style = sdSelectListItemSearchCss();
317
295
 
318
296
  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}`;
319
297
 
@@ -389,23 +367,23 @@ const SdSelectListbox = class {
389
367
  get showSearch() {
390
368
  if (!this.useSearch)
391
369
  return false;
392
- const count = this.isDepth ? sdSelect_config.countLeaves(this.options) : this.options.length;
393
- return count >= sdSelect_config.SEARCH_THRESHOLD;
370
+ const count = this.isDepth ? countLeaves(this.options) : this.options.length;
371
+ return count >= SEARCH_THRESHOLD;
394
372
  }
395
373
  get filteredOptions() {
396
374
  if (this.searchKeyword == null || this.searchKeyword === '')
397
375
  return this.options;
398
376
  if (this.isDepth)
399
- return sdSelect_config.filterTree(this.options, this.searchKeyword);
377
+ return filterTree(this.options, this.searchKeyword);
400
378
  const keyword = this.searchKeyword.toLowerCase();
401
379
  return this.options.filter(o => {
402
- const labelText = sdSelect_config.isHtmlLabel(o.label) ? sdSelect_config.extractText(o.label) : o.label;
380
+ const labelText = isHtmlLabel(o.label) ? extractText(o.label) : o.label;
403
381
  return labelText != null && labelText.toLowerCase().includes(keyword);
404
382
  });
405
383
  }
406
384
  get isEmpty() {
407
385
  if (this.isDepth)
408
- return sdSelect_config.countLeaves(this.filteredOptions) === 0 && this.filteredOptions.length === 0;
386
+ return countLeaves(this.filteredOptions) === 0 && this.filteredOptions.length === 0;
409
387
  return this.filteredOptions.length === 0;
410
388
  }
411
389
  getSelectedValues() {
@@ -680,11 +658,11 @@ const SdSelectListbox = class {
680
658
  '--listbox-trigger-width': this.triggerWidth ?? '200px',
681
659
  '--listbox-max-width': this.maxWidth ?? '640px',
682
660
  '--listbox-max-height': this.maxHeight ?? '260px',
683
- '--listbox-radius': `${sdSelect_config.LIST_BOX_LAYOUT.radius}px`,
661
+ '--listbox-radius': `${LIST_BOX_LAYOUT.radius}px`,
684
662
  };
685
- return (index.h("div", { key: '4de15e4c150ee542656ee3f73aa41dd32379748f', class: "sd-select-listbox", style: cssVars }, this.showSearch && (index.h("sd-select-list-item-search", { key: 'cb656ccafc2833b438f14ac48ca8686684212ead', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), index.h("div", { key: '5ffaefb63605c4319810046e9d40aa5fcb4754de', class: "sd-select-listbox__list", onScroll: this.handleScroll, ref: el => {
663
+ return (index.h("div", { key: 'cec8e4e12dd806a93375853386a1d7cc3ac6b269', class: "sd-select-listbox", style: cssVars }, this.showSearch && (index.h("sd-select-list-item-search", { key: '9e07a7e742e956df314796e9babf6c0a7fb21d7f', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), index.h("div", { key: 'd5ff5620c63b5c53e69b6348f2c9cd6cb73cbe88', class: "sd-select-listbox__list", onScroll: this.handleScroll, ref: el => {
686
664
  this.listEl = el;
687
- } }, this.showSelectAll && (index.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 ? (index.h("div", { class: "sd-select-listbox__empty" }, sdSelect_config.EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (index.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) })))))));
665
+ } }, this.showSelectAll && (index.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 ? (index.h("div", { class: "sd-select-listbox__empty" }, EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (index.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) })))))));
688
666
  }
689
667
  static get watchers() { return {
690
668
  "searchKeyword": [{
@@ -738,21 +716,21 @@ const SdSelectTrigger = class {
738
716
  render() {
739
717
  const hasValue = this.displayText !== '';
740
718
  const cssVars = {
741
- '--trigger-padding-x': `${sdSelect_config.SELECT_LAYOUT.paddingX}px`,
742
- '--trigger-gap': `${sdSelect_config.SELECT_LAYOUT.gap}px`,
743
- '--trigger-font-size': `${sdSelect_config.SELECT_TYPOGRAPHY.fontSize}px`,
744
- '--trigger-line-height': `${sdSelect_config.SELECT_TYPOGRAPHY.lineHeight}px`,
745
- '--trigger-font-weight': sdSelect_config.SELECT_TYPOGRAPHY.fontWeight,
719
+ '--trigger-padding-x': `${SELECT_LAYOUT.paddingX}px`,
720
+ '--trigger-gap': `${SELECT_LAYOUT.gap}px`,
721
+ '--trigger-font-size': `${SELECT_TYPOGRAPHY.fontSize}px`,
722
+ '--trigger-line-height': `${SELECT_TYPOGRAPHY.lineHeight}px`,
723
+ '--trigger-font-weight': SELECT_TYPOGRAPHY.fontWeight,
746
724
  '--trigger-color': this.disabled
747
- ? sdSelect_config.SELECT_COLORS.text.disabled
725
+ ? SELECT_COLORS.text.disabled
748
726
  : hasValue
749
- ? sdSelect_config.SELECT_COLORS.text.default
750
- : sdSelect_config.SELECT_COLORS.icon.default,
727
+ ? SELECT_COLORS.text.default
728
+ : SELECT_COLORS.icon.default,
751
729
  '--trigger-icon-color': this.disabled
752
- ? sdSelect_config.SELECT_COLORS.icon.disabled
753
- : sdSelect_config.SELECT_COLORS.icon.default,
730
+ ? SELECT_COLORS.icon.disabled
731
+ : SELECT_COLORS.icon.default,
754
732
  };
755
- return (index.h("div", { key: '33e639898a581e8556e1e9c966f14cb863246c35', ref: el => {
733
+ return (index.h("div", { key: '2ec5e736c0742a10fdfa9b4b12b0820e99c30f7f', ref: el => {
756
734
  this.triggerEl = el;
757
735
  }, role: "button", "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, class: {
758
736
  'sd-select-trigger': true,
@@ -763,7 +741,7 @@ const SdSelectTrigger = class {
763
741
  e.preventDefault();
764
742
  this.handleClick();
765
743
  }
766
- }, onFocus: this.handleFocus, onBlur: this.handleBlur }, index.h("div", { key: 'a935f82879727eb212422c875b16e5fbf01460ba', class: "sd-select-trigger__content" }, hasValue && sdSelect_config.isHtmlLabel(this.displayText) ? (index.h("span", { class: "sd-select-trigger__text", ref: el => el && (el.innerHTML = sanitizeInlineHtml.sanitizeInlineHtml(this.displayText)) })) : (index.h("span", { class: "sd-select-trigger__text" }, hasValue ? this.displayText : (this.placeholder ?? '선택'))), index.h("sd-icon", { key: 'e98e8e317aa86a960674b21714ca90cfa3920197', name: "chevronDown", size: 12, color: "var(--trigger-icon-color)", class: {
744
+ }, onFocus: this.handleFocus, onBlur: this.handleBlur }, index.h("div", { key: '6b71e60a76d430bfe14bc5b7c59d82130be27c8a', class: "sd-select-trigger__content" }, hasValue && isHtmlLabel(this.displayText) ? (index.h("span", { class: "sd-select-trigger__text", ref: el => el && (el.innerHTML = sanitizeInlineHtml.sanitizeInlineHtml(this.displayText)) })) : (index.h("span", { class: "sd-select-trigger__text" }, hasValue ? this.displayText : (this.placeholder ?? '선택'))), index.h("sd-icon", { key: 'e34eae87f518f1b015e1d59bacf97bec66b6ec6d', name: "chevronDown", size: 12, color: "var(--trigger-icon-color)", class: {
767
745
  'sd-select-trigger__icon': true,
768
746
  'sd-select-trigger__icon--open': this.isOpen,
769
747
  } }))));
@@ -771,6 +749,7 @@ const SdSelectTrigger = class {
771
749
  };
772
750
  SdSelectTrigger.style = sdSelectTriggerCss();
773
751
 
774
- exports.sd_select = SdSelect;
752
+ exports.sd_select_list_item = SdSelectListItem;
753
+ exports.sd_select_list_item_search = SdSelectListItemSearch;
775
754
  exports.sd_select_listbox = SdSelectListbox;
776
755
  exports.sd_select_trigger = SdSelectTrigger;