@sellmate/design-system 1.27.1 → 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 (378) hide show
  1. package/dist/cjs/{component.datepicker-CUQbDSku.js → component.datepicker-zFTQQKMH.js} +1 -2
  2. package/dist/cjs/component.listBox-MHAv4Yy7.js +15 -0
  3. package/dist/cjs/{component.listItem-Bnh0r_CA.js → component.listItem-cAO_ppOz.js} +0 -7
  4. package/dist/cjs/design-system.cjs.js +2 -2
  5. package/dist/cjs/{index-DsYLSqCp.js → index-iiJZMzVM.js} +1 -15
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/sd-action-modal.cjs.entry.js +1 -1
  8. package/dist/cjs/sd-badge.cjs.entry.js +1 -1
  9. package/dist/cjs/sd-barcode-input.cjs.entry.js +1 -1
  10. package/dist/cjs/sd-button_2.cjs.entry.js +1 -1
  11. package/dist/cjs/sd-calendar_2.cjs.entry.js +6 -6
  12. package/dist/cjs/sd-callout.cjs.entry.js +1 -1
  13. package/dist/cjs/sd-card.cjs.entry.js +1 -1
  14. package/dist/cjs/sd-checkbox.cjs.entry.js +2 -3
  15. package/dist/cjs/sd-chip-input.cjs.entry.js +5 -4
  16. package/dist/cjs/sd-chip.cjs.entry.js +1 -1
  17. package/dist/cjs/sd-circle-progress.cjs.entry.js +6 -4
  18. package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +37 -37
  19. package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
  20. package/dist/cjs/{sd-date-picker.config-De7ahWIs.js → sd-date-picker.config-Chrd8c4v.js} +1 -1
  21. package/dist/cjs/{sd-date-picker_7.cjs.entry.js → sd-date-picker_8.cjs.entry.js} +381 -19
  22. package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +4 -4
  23. package/dist/cjs/sd-divider.cjs.entry.js +3 -3
  24. package/dist/cjs/sd-dropdown-button.cjs.entry.js +2 -2
  25. package/dist/cjs/sd-field_3.cjs.entry.js +10 -10
  26. package/dist/cjs/sd-form.cjs.entry.js +1 -1
  27. package/dist/cjs/sd-ghost-button_3.cjs.entry.js +4 -5
  28. package/dist/cjs/sd-guide.cjs.entry.js +5 -10
  29. package/dist/cjs/sd-key-value-table.cjs.entry.js +88 -18
  30. package/dist/cjs/sd-linear-progress.cjs.entry.js +3 -3
  31. package/dist/cjs/sd-loading-container.cjs.entry.js +3 -3
  32. package/dist/cjs/sd-modal-container.cjs.entry.js +16 -2
  33. package/dist/cjs/sd-pagination.cjs.entry.js +173 -0
  34. package/dist/cjs/sd-popover.cjs.entry.js +2 -2
  35. package/dist/cjs/sd-popup.cjs.entry.js +3 -3
  36. package/dist/cjs/sd-radio-button.cjs.entry.js +1 -1
  37. package/dist/cjs/sd-radio.cjs.entry.js +2 -3
  38. package/dist/cjs/{sd-select_3.cjs.entry.js → sd-select-list-item_4.cjs.entry.js} +294 -314
  39. package/dist/cjs/sd-switch.cjs.entry.js +2 -2
  40. package/dist/cjs/sd-tabs.cjs.entry.js +2 -2
  41. package/dist/cjs/sd-text-link.cjs.entry.js +1 -1
  42. package/dist/cjs/sd-toast-container.cjs.entry.js +2 -2
  43. package/dist/cjs/sd-toast.cjs.entry.js +3 -3
  44. package/dist/cjs/sd-toggle.cjs.entry.js +2 -2
  45. package/dist/cjs/{system-MjrAugX-.js → system-B4KkVpu2.js} +1 -7
  46. package/dist/cjs/{tooltipArrow-FLiD3ceS.js → tooltipArrow-DOOcBlLp.js} +1 -1
  47. package/dist/cjs/{useDatePicker-iMd6WToc.js → useDatePicker-CgpIfwLA.js} +1 -1
  48. package/dist/collection/collection-manifest.json +0 -5
  49. package/dist/collection/components/sd-circle-progress/sd-circle-progress.css +13 -0
  50. package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +23 -1
  51. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.css +3 -0
  52. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +35 -59
  53. package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +2 -2
  54. package/dist/collection/components/sd-date-picker/sd-date-picker.js +2 -2
  55. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +1 -1
  56. package/dist/collection/components/sd-divider/sd-divider.js +1 -1
  57. package/dist/collection/components/sd-field/sd-field.js +4 -4
  58. package/dist/collection/components/sd-file-picker/sd-file-picker.config.js +9 -0
  59. package/dist/collection/components/sd-file-picker/sd-file-picker.css +18 -0
  60. package/dist/collection/components/sd-file-picker/sd-file-picker.js +73 -7
  61. package/dist/collection/components/sd-floating-portal/sd-floating-portal.css +1 -1
  62. package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
  63. package/dist/collection/components/sd-guide/sd-guide.config.js +0 -1
  64. package/dist/collection/components/sd-guide/sd-guide.css +0 -3
  65. package/dist/collection/components/sd-guide/sd-guide.js +2 -3
  66. package/dist/collection/components/sd-input/sd-input.js +2 -2
  67. package/dist/collection/components/sd-key-value-table/sd-key-value-table.config.js +2 -0
  68. package/dist/collection/components/sd-key-value-table/sd-key-value-table.css +5 -1
  69. package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +65 -15
  70. package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
  71. package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
  72. package/dist/collection/components/sd-loading-modal/sd-loading-modal.css +7 -0
  73. package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +18 -1
  74. package/dist/collection/components/sd-modal-container/sd-modal-container.js +15 -1
  75. package/dist/collection/components/sd-number-input/sd-number-input.js +4 -4
  76. package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
  77. package/dist/collection/components/sd-popup/sd-popup.js +1 -1
  78. package/dist/collection/components/sd-radio-group/sd-radio-group.css +2 -2
  79. package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +2 -2
  80. package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +4 -4
  81. package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +2 -2
  82. package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +2 -2
  83. package/dist/collection/components/sd-select/sd-select.js +4 -4
  84. package/dist/collection/components/sd-switch/sd-switch.js +1 -1
  85. package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
  86. package/dist/collection/components/sd-tag/sd-tag.js +2 -2
  87. package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
  88. package/dist/collection/components/sd-toast/sd-toast.js +2 -2
  89. package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
  90. package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
  91. package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
  92. package/dist/components/index.js +1 -1
  93. package/dist/components/p-4S0_Ykmo.js +1 -0
  94. package/dist/components/{p-Dy6LmOzw.js → p-9Ap2W-Mi.js} +1 -1
  95. package/dist/components/{p-NeXvaRu7.js → p-BFVfSW9t.js} +1 -1
  96. package/dist/components/{p-Du_Yc-lW.js → p-BHjezpAC.js} +1 -1
  97. package/dist/components/{p-DnxEeX9I.js → p-BIEPMPWA.js} +1 -1
  98. package/dist/components/{p--AZbwi7P.js → p-BKu0I6Io.js} +1 -1
  99. package/dist/components/{p-DTb2c83G.js → p-B_Zwr4Et.js} +1 -1
  100. package/dist/components/{p-BysikR_g.js → p-Bpv90tfa.js} +1 -1
  101. package/dist/components/p-Bth2l1cy.js +1 -0
  102. package/dist/components/{p-Cok_EW_N.js → p-C7mC7a1z.js} +1 -1
  103. package/dist/components/{p-CIPPETF-.js → p-CBoDoYDO.js} +1 -1
  104. package/dist/components/p-CErFctrV.js +1 -0
  105. package/dist/components/{p-SROa9QCy.js → p-CFTyEfB9.js} +1 -1
  106. package/dist/components/{p-BaRjXqSM.js → p-CSr33M9s.js} +1 -1
  107. package/dist/components/p-CYMMLsGt.js +1 -0
  108. package/dist/components/{p-CvSPsoRb.js → p-C_SG4M4z.js} +1 -1
  109. package/dist/components/{p-BV4cnHWn.js → p-C_in6AVN.js} +1 -1
  110. package/dist/components/{p-DsQQFJ8o.js → p-CbS69IvC.js} +1 -1
  111. package/dist/components/{p-BOJALVxB.js → p-CgSXYw_0.js} +1 -1
  112. package/dist/components/{p-DVq9oE_p.js → p-CmRF12Fy.js} +1 -1
  113. package/dist/components/p-CnRfET5y.js +1 -0
  114. package/dist/components/{p-BFy8txYj.js → p-Cvsrc0be.js} +1 -1
  115. package/dist/components/{p-PvltLPHp.js → p-DJ8z7_EG.js} +1 -1
  116. package/dist/components/{p-CwwJD-NF.js → p-DJmxpVkK.js} +1 -1
  117. package/dist/components/{p-D7XGOtx0.js → p-DMoFncVl.js} +1 -1
  118. package/dist/components/{p-BxphFsxh.js → p-DN7MAx-q.js} +1 -1
  119. package/dist/components/{p-hP1aeMuZ.js → p-DS6NVBvu.js} +1 -1
  120. package/dist/components/{p-Bk6aI8rL.js → p-D_56BjcD.js} +1 -1
  121. package/dist/components/{p-DMrzTImA.js → p-Dg1UrMqI.js} +1 -1
  122. package/dist/components/{p-BU1H7ElF.js → p-Di1q4f5E.js} +1 -1
  123. package/dist/components/p-DlJaYVWf.js +1 -0
  124. package/dist/components/p-OO7xxhkC.js +1 -0
  125. package/dist/components/{p-DYp8I4VH.js → p-R-Sdglj0.js} +1 -1
  126. package/dist/components/p-Uh9emYrV.js +1 -0
  127. package/dist/components/{p-DkaajrxX.js → p-f0aBxUBG.js} +1 -1
  128. package/dist/components/{p-DT-e9J59.js → p-idG6CMO0.js} +1 -1
  129. package/dist/components/p-oYbVr-z0.js +1 -0
  130. package/dist/components/p-x9AWBHPy.js +1 -0
  131. package/dist/components/sd-action-modal.js +1 -1
  132. package/dist/components/sd-badge.js +1 -1
  133. package/dist/components/sd-barcode-input.js +1 -1
  134. package/dist/components/sd-button.js +1 -1
  135. package/dist/components/sd-calendar.js +1 -1
  136. package/dist/components/sd-callout.js +1 -1
  137. package/dist/components/sd-card.js +1 -1
  138. package/dist/components/sd-checkbox.js +1 -1
  139. package/dist/components/sd-chip-input.js +1 -1
  140. package/dist/components/sd-chip.js +1 -1
  141. package/dist/components/sd-circle-progress.js +1 -1
  142. package/dist/components/sd-confirm-modal.js +1 -1
  143. package/dist/components/sd-date-box.js +1 -1
  144. package/dist/components/sd-date-picker-trigger.js +1 -1
  145. package/dist/components/sd-date-picker.js +1 -1
  146. package/dist/components/sd-date-range-picker-calendar.js +1 -1
  147. package/dist/components/sd-date-range-picker.js +1 -1
  148. package/dist/components/sd-divider.js +1 -1
  149. package/dist/components/sd-dropdown-button.js +1 -1
  150. package/dist/components/sd-field.js +1 -1
  151. package/dist/components/sd-file-picker.js +1 -1
  152. package/dist/components/sd-floating-portal.js +1 -1
  153. package/dist/components/sd-form.js +1 -1
  154. package/dist/components/sd-ghost-button.js +1 -1
  155. package/dist/components/sd-guide.js +1 -1
  156. package/dist/components/sd-icon.js +1 -1
  157. package/dist/components/sd-input.js +1 -1
  158. package/dist/components/sd-key-value-table.js +1 -1
  159. package/dist/components/sd-linear-progress.js +1 -1
  160. package/dist/components/sd-loading-container.js +1 -1
  161. package/dist/components/sd-loading-modal.js +1 -1
  162. package/dist/components/sd-modal-container.js +1 -1
  163. package/dist/components/sd-number-input.js +1 -1
  164. package/dist/components/sd-pagination.js +1 -1
  165. package/dist/components/sd-popover.js +1 -1
  166. package/dist/components/sd-popup.js +1 -1
  167. package/dist/components/sd-portal.js +1 -1
  168. package/dist/components/sd-radio-button.js +1 -1
  169. package/dist/components/sd-radio-group.js +1 -1
  170. package/dist/components/sd-radio.js +1 -1
  171. package/dist/components/sd-select-list-item-search.js +1 -1
  172. package/dist/components/sd-select-list-item.js +1 -1
  173. package/dist/components/sd-select-listbox.js +1 -1
  174. package/dist/components/sd-select-trigger.js +1 -1
  175. package/dist/components/sd-select.js +1 -1
  176. package/dist/components/sd-switch.js +1 -1
  177. package/dist/components/sd-tabs.js +1 -1
  178. package/dist/components/sd-tag.js +1 -1
  179. package/dist/components/sd-text-link.js +1 -1
  180. package/dist/components/sd-textarea.js +1 -1
  181. package/dist/components/sd-toast-container.js +1 -1
  182. package/dist/components/sd-toast.js +1 -1
  183. package/dist/components/sd-toggle.js +1 -1
  184. package/dist/components/sd-tooltip.js +1 -1
  185. package/dist/design-system/design-system.css +1 -1
  186. package/dist/design-system/design-system.esm.js +1 -1
  187. package/dist/design-system/{p-ddb9a2c4.entry.js → p-02f0b906.entry.js} +1 -1
  188. package/dist/design-system/{p-a4e1dd8c.entry.js → p-0c1d1a15.entry.js} +1 -1
  189. package/dist/design-system/{p-cb0cbcb0.entry.js → p-0e014b76.entry.js} +1 -1
  190. package/dist/design-system/{p-49b1636a.entry.js → p-1b5fcf7b.entry.js} +1 -1
  191. package/dist/design-system/{p-5aa5aec3.entry.js → p-1ed1bfa1.entry.js} +1 -1
  192. package/dist/design-system/{p-8c1a9374.entry.js → p-246aafb9.entry.js} +1 -1
  193. package/dist/design-system/p-26a27312.entry.js +1 -0
  194. package/dist/design-system/{p-d790fbb8.entry.js → p-2a4d2ee0.entry.js} +1 -1
  195. package/dist/design-system/{p-270c8529.entry.js → p-2d6a7d7b.entry.js} +1 -1
  196. package/dist/design-system/{p-947dcc28.entry.js → p-3595cafb.entry.js} +1 -1
  197. package/dist/design-system/p-3cd2751a.entry.js +1 -0
  198. package/dist/design-system/p-4S0_Ykmo.js +1 -0
  199. package/dist/design-system/p-4b474538.entry.js +1 -0
  200. package/dist/design-system/{p-e63bf0e1.entry.js → p-4c85f6f6.entry.js} +1 -1
  201. package/dist/design-system/{p-55c8ce37.entry.js → p-53fe2741.entry.js} +1 -1
  202. package/dist/design-system/{p-06b56059.entry.js → p-55c0be7d.entry.js} +1 -1
  203. package/dist/design-system/p-5a257ed9.entry.js +1 -0
  204. package/dist/design-system/{p-459a408f.entry.js → p-840006b1.entry.js} +1 -1
  205. package/dist/design-system/{p-dae6914d.entry.js → p-86329ae3.entry.js} +1 -1
  206. package/dist/design-system/{p-8ac340db.entry.js → p-8de3b502.entry.js} +1 -1
  207. package/dist/design-system/{p-9603971e.entry.js → p-8ed1d470.entry.js} +1 -1
  208. package/dist/design-system/{p-D2S9Zafz.js → p-B91K50wC.js} +1 -1
  209. package/dist/design-system/{p-BqWuC4-J.js → p-BPKiBSGr.js} +1 -1
  210. package/dist/design-system/p-BhcvMs8c.js +1 -0
  211. package/dist/design-system/p-Bth2l1cy.js +1 -0
  212. package/dist/design-system/p-DlJaYVWf.js +1 -0
  213. package/dist/design-system/p-Dz490Ukt.js +2 -0
  214. package/dist/design-system/{p-761c008c.entry.js → p-a631cd78.entry.js} +1 -1
  215. package/dist/design-system/p-adf2f398.entry.js +1 -0
  216. package/dist/design-system/{p-26297c6e.entry.js → p-b585f94b.entry.js} +1 -1
  217. package/dist/design-system/p-be54fd3a.entry.js +1 -0
  218. package/dist/design-system/{p-7540f591.entry.js → p-c1066f40.entry.js} +1 -1
  219. package/dist/design-system/{p-b86a69ce.entry.js → p-c5cffcc6.entry.js} +1 -1
  220. package/dist/design-system/p-c7d2c195.entry.js +1 -0
  221. package/dist/design-system/{p-839e6b5a.entry.js → p-cb6ab65c.entry.js} +1 -1
  222. package/dist/design-system/{p-07755193.entry.js → p-d204cac5.entry.js} +1 -1
  223. package/dist/design-system/p-d2ce01ac.entry.js +1 -0
  224. package/dist/design-system/p-d51f4170.entry.js +1 -0
  225. package/dist/design-system/{p-dfa16f49.entry.js → p-d9f33192.entry.js} +1 -1
  226. package/dist/design-system/{p-b9387621.entry.js → p-e7740a5f.entry.js} +1 -1
  227. package/dist/design-system/p-e85bf462.entry.js +1 -0
  228. package/dist/design-system/{p-9c0d3011.entry.js → p-ea008087.entry.js} +1 -1
  229. package/dist/design-system/{p-5142cd06.entry.js → p-ec4ad48c.entry.js} +1 -1
  230. package/dist/design-system/{p-5f1dae23.entry.js → p-f962e5d2.entry.js} +1 -1
  231. package/dist/esm/{component.datepicker-laVsm9VM.js → component.datepicker-BOxGhKKP.js} +1 -2
  232. package/dist/esm/component.listBox-DlJaYVWf.js +13 -0
  233. package/dist/esm/{component.listItem-U8VaRj9c.js → component.listItem-4S0_Ykmo.js} +1 -7
  234. package/dist/esm/design-system.js +3 -3
  235. package/dist/esm/{index-BZg-6aSz.js → index-Dz490Ukt.js} +2 -14
  236. package/dist/esm/loader.js +3 -3
  237. package/dist/esm/sd-action-modal.entry.js +1 -1
  238. package/dist/esm/sd-badge.entry.js +1 -1
  239. package/dist/esm/sd-barcode-input.entry.js +1 -1
  240. package/dist/esm/sd-button_2.entry.js +1 -1
  241. package/dist/esm/sd-calendar_2.entry.js +6 -6
  242. package/dist/esm/sd-callout.entry.js +1 -1
  243. package/dist/esm/sd-card.entry.js +1 -1
  244. package/dist/esm/sd-checkbox.entry.js +2 -3
  245. package/dist/esm/sd-chip-input.entry.js +4 -3
  246. package/dist/esm/sd-chip.entry.js +1 -1
  247. package/dist/esm/sd-circle-progress.entry.js +6 -4
  248. package/dist/esm/sd-confirm-modal_2.entry.js +37 -37
  249. package/dist/esm/sd-date-box.entry.js +1 -1
  250. package/dist/esm/{sd-date-picker.config-D-ks6qNf.js → sd-date-picker.config-krRuSUsA.js} +1 -1
  251. package/dist/esm/{sd-date-picker_7.entry.js → sd-date-picker_8.entry.js} +381 -20
  252. package/dist/esm/sd-date-range-picker-calendar.entry.js +4 -4
  253. package/dist/esm/sd-divider.entry.js +3 -3
  254. package/dist/esm/sd-dropdown-button.entry.js +2 -2
  255. package/dist/esm/sd-field_3.entry.js +10 -10
  256. package/dist/esm/sd-form.entry.js +1 -1
  257. package/dist/esm/sd-ghost-button_3.entry.js +4 -5
  258. package/dist/esm/sd-guide.entry.js +5 -10
  259. package/dist/esm/sd-key-value-table.entry.js +87 -17
  260. package/dist/esm/sd-linear-progress.entry.js +3 -3
  261. package/dist/esm/sd-loading-container.entry.js +3 -3
  262. package/dist/esm/sd-modal-container.entry.js +16 -2
  263. package/dist/esm/sd-pagination.entry.js +171 -0
  264. package/dist/esm/sd-popover.entry.js +2 -2
  265. package/dist/esm/sd-popup.entry.js +3 -3
  266. package/dist/esm/sd-radio-button.entry.js +1 -1
  267. package/dist/esm/sd-radio.entry.js +2 -3
  268. package/dist/esm/{sd-select_3.entry.js → sd-select-list-item_4.entry.js} +277 -298
  269. package/dist/esm/sd-switch.entry.js +2 -2
  270. package/dist/esm/sd-tabs.entry.js +2 -2
  271. package/dist/esm/sd-text-link.entry.js +1 -1
  272. package/dist/esm/sd-toast-container.entry.js +2 -2
  273. package/dist/esm/sd-toast.entry.js +3 -3
  274. package/dist/esm/sd-toggle.entry.js +2 -2
  275. package/dist/esm/{system-BJfiMC9H.js → system-Bth2l1cy.js} +1 -7
  276. package/dist/esm/{tooltipArrow-BAi-pktU.js → tooltipArrow-CEHVt90h.js} +1 -1
  277. package/dist/esm/{useDatePicker-DoUg--aq.js → useDatePicker-BG0lUGJG.js} +1 -1
  278. package/dist/types/components/sd-circle-progress/sd-circle-progress.d.ts +2 -0
  279. package/dist/types/components/sd-confirm-modal/sd-confirm-modal.d.ts +10 -10
  280. package/dist/types/components/sd-file-picker/sd-file-picker.config.d.ts +6 -0
  281. package/dist/types/components/sd-file-picker/sd-file-picker.d.ts +10 -0
  282. package/dist/types/components/sd-guide/sd-guide.config.d.ts +0 -1
  283. package/dist/types/components/sd-key-value-table/sd-key-value-table.config.d.ts +22 -3
  284. package/dist/types/components/sd-key-value-table/sd-key-value-table.d.ts +9 -1
  285. package/dist/types/components/sd-loading-modal/sd-loading-modal.d.ts +2 -0
  286. package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +3 -0
  287. package/dist/types/components/sd-modal-container/sd-modal-container.d.ts +2 -0
  288. package/dist/types/components.d.ts +44 -696
  289. package/dist/types/index.d.ts +0 -1
  290. package/hydrate/index.js +254 -2235
  291. package/hydrate/index.mjs +254 -2235
  292. package/package.json +1 -1
  293. package/dist/cjs/component.table-BrI3b--h.js +0 -71
  294. package/dist/cjs/constants-DJRV1upE.js +0 -5
  295. package/dist/cjs/sd-pagination_4.cjs.entry.js +0 -856
  296. package/dist/cjs/sd-select-list-item_2.cjs.entry.js +0 -172
  297. package/dist/cjs/sd-select.config-C9Ohe1QA.js +0 -143
  298. package/dist/cjs/sd-table.cjs.entry.js +0 -956
  299. package/dist/cjs/sd-table.config-DzC55sap.js +0 -82
  300. package/dist/cjs/sd-td.cjs.entry.js +0 -201
  301. package/dist/collection/components/sd-table/constants.js +0 -1
  302. package/dist/collection/components/sd-table/sd-table.config.js +0 -87
  303. package/dist/collection/components/sd-table/sd-table.css +0 -180
  304. package/dist/collection/components/sd-table/sd-table.js +0 -1709
  305. package/dist/collection/components/sd-table/sd-table.stories.helpers.js +0 -242
  306. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.css +0 -10
  307. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +0 -110
  308. package/dist/collection/components/sd-table/sd-td/sd-td.css +0 -15
  309. package/dist/collection/components/sd-table/sd-td/sd-td.js +0 -381
  310. package/dist/collection/components/sd-table/sd-thead/sd-thead.css +0 -186
  311. package/dist/collection/components/sd-table/sd-thead/sd-thead.js +0 -629
  312. package/dist/collection/components/sd-table/sd-tr/sd-tr.css +0 -145
  313. package/dist/collection/components/sd-table/sd-tr/sd-tr.js +0 -528
  314. package/dist/components/p-BHNytAtJ.js +0 -1
  315. package/dist/components/p-BJfiMC9H.js +0 -1
  316. package/dist/components/p-BQqXWtI6.js +0 -1
  317. package/dist/components/p-BXcizROm.js +0 -1
  318. package/dist/components/p-BZdgdRXJ.js +0 -1
  319. package/dist/components/p-CJcs7kNH.js +0 -1
  320. package/dist/components/p-CV5LiFKt.js +0 -1
  321. package/dist/components/p-CiTn4ZiI.js +0 -1
  322. package/dist/components/p-CmK45nj3.js +0 -1
  323. package/dist/components/p-D9tQwTWy.js +0 -1
  324. package/dist/components/p-DeXLIS7e.js +0 -1
  325. package/dist/components/p-DmC83_E9.js +0 -1
  326. package/dist/components/p-DvvGi4J_.js +0 -1
  327. package/dist/components/p-U8VaRj9c.js +0 -1
  328. package/dist/components/p-jwusYvH0.js +0 -1
  329. package/dist/components/p-sZMi_32I.js +0 -1
  330. package/dist/components/sd-table.d.ts +0 -11
  331. package/dist/components/sd-table.js +0 -1
  332. package/dist/components/sd-tbody.d.ts +0 -11
  333. package/dist/components/sd-tbody.js +0 -1
  334. package/dist/components/sd-td.d.ts +0 -11
  335. package/dist/components/sd-td.js +0 -1
  336. package/dist/components/sd-thead.d.ts +0 -11
  337. package/dist/components/sd-thead.js +0 -1
  338. package/dist/components/sd-tr.d.ts +0 -11
  339. package/dist/components/sd-tr.js +0 -1
  340. package/dist/design-system/p-147e0413.entry.js +0 -1
  341. package/dist/design-system/p-51c7839c.entry.js +0 -1
  342. package/dist/design-system/p-5f5f2fbe.entry.js +0 -1
  343. package/dist/design-system/p-65285327.entry.js +0 -1
  344. package/dist/design-system/p-6aec5853.entry.js +0 -1
  345. package/dist/design-system/p-80abdfe7.entry.js +0 -1
  346. package/dist/design-system/p-9825e76c.entry.js +0 -1
  347. package/dist/design-system/p-B-LOf2aM.js +0 -1
  348. package/dist/design-system/p-BJfiMC9H.js +0 -1
  349. package/dist/design-system/p-BXcizROm.js +0 -1
  350. package/dist/design-system/p-BZg-6aSz.js +0 -2
  351. package/dist/design-system/p-CAFz8W8_.js +0 -1
  352. package/dist/design-system/p-D9tQwTWy.js +0 -1
  353. package/dist/design-system/p-U8VaRj9c.js +0 -1
  354. package/dist/design-system/p-b84f5550.entry.js +0 -1
  355. package/dist/design-system/p-edfb5c83.entry.js +0 -1
  356. package/dist/design-system/p-efc55114.entry.js +0 -1
  357. package/dist/design-system/p-fd671afe.entry.js +0 -1
  358. package/dist/design-system/p-fe2b853f.entry.js +0 -1
  359. package/dist/design-system/p-ff9ccbf6.entry.js +0 -1
  360. package/dist/design-system/p-sZMi_32I.js +0 -1
  361. package/dist/esm/component.table-D9tQwTWy.js +0 -69
  362. package/dist/esm/constants-sZMi_32I.js +0 -3
  363. package/dist/esm/sd-pagination_4.entry.js +0 -851
  364. package/dist/esm/sd-select-list-item_2.entry.js +0 -169
  365. package/dist/esm/sd-select.config-D6ktrl7E.js +0 -128
  366. package/dist/esm/sd-table.config-BbIWNUE2.js +0 -69
  367. package/dist/esm/sd-table.entry.js +0 -954
  368. package/dist/esm/sd-td.entry.js +0 -199
  369. package/dist/types/components/sd-table/constants.d.ts +0 -50
  370. package/dist/types/components/sd-table/sd-table.config.d.ts +0 -70
  371. package/dist/types/components/sd-table/sd-table.d.ts +0 -199
  372. package/dist/types/components/sd-table/sd-table.stories.helpers.d.ts +0 -39
  373. package/dist/types/components/sd-table/sd-tbody/sd-tbody.d.ts +0 -15
  374. package/dist/types/components/sd-table/sd-td/sd-td.d.ts +0 -38
  375. package/dist/types/components/sd-table/sd-thead/sd-thead.d.ts +0 -62
  376. package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +0 -54
  377. /package/dist/components/{p-laVsm9VM.js → p-BOxGhKKP.js} +0 -0
  378. /package/dist/design-system/{p-laVsm9VM.js → p-BOxGhKKP.js} +0 -0
@@ -1,316 +1,295 @@
1
- import { r as registerInstance, c as createEvent, a as getElement, h } from './index-BZg-6aSz.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-D6ktrl7E.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-U8VaRj9c.js';
6
5
 
7
- 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
+ };
8
26
 
9
- const SdSelect = class {
10
- constructor(hostRef) {
11
- registerInstance(this, hostRef);
12
- this.update = createEvent(this, "sdUpdate", 7);
13
- this.dropDownShow = createEvent(this, "sdDropDownShow", 7);
14
- }
15
- static VIEWPORT_PADDING = 20;
16
- static PORTAL_OFFSET_Y = 4;
17
- static CLOSE_ANIMATION_DURATION = 150;
18
- get el() { return getElement(this); }
19
- /** 셀렉트 타입 (단일/다중/계층) */
20
- type = 'default';
21
- /** 현재 선택된 값 */
22
- value = null;
23
- /** 선택 옵션 목록 */
24
- options = [];
25
- /** 값이 없을 때 표시할 플레이스홀더 */
26
- placeholder = '선택';
27
- /** 드롭다운 너비 (없으면 트리거 너비로 자동 맞춤) */
28
- dropdownWidth = '';
29
- /** 드롭다운 최대 너비 */
30
- maxDropdownWidth = '640px';
31
- /** 드롭다운 최대 높이 */
32
- dropdownHeight = '260px';
33
- /** 비활성 상태 여부 */
34
- disabled = false;
35
- /** 레이블 텍스트 */
36
- label = '';
37
- /** 레이블 너비 */
38
- labelWidth = '';
39
- /** 필드 우측 어드온 레이블 */
40
- addonLabel = '';
41
- /** 어드온 정렬 방향 */
42
- addonAlign = 'start';
43
- /** 에러 상태 여부 */
44
- error = false;
45
- /** 필드 하단 힌트 텍스트 */
46
- hint = '';
47
- /** 에러 메시지 */
48
- errorMessage = '';
49
- /** 유효성 검사 규칙 목록 */
50
- rules = [];
51
- /** 레이블 영역 아이콘 */
52
- icon = undefined;
53
- /** 레이블 툴팁 텍스트 */
54
- labelTooltip = '';
55
- /** 레이블 툴팁 상세 옵션 */
56
- labelTooltipProps = null;
57
- /** true이면 value로 SelectOption 대신 원시값(string|number) 방출 */
58
- emitValue = false;
59
- /** 필드 너비 */
60
- width = '';
61
- /** 드롭다운 내 검색 입력 표시 여부 */
62
- useSearch = false;
63
- /** 전체 선택 시 표시할 레이블 */
64
- allSelectedLabel = '전체';
65
- /** 전체 선택 체크박스 표시 여부 */
66
- useSelectAll = false;
67
- isOpen = false;
68
- isAnimatingOut = false;
69
- triggerWidth = '200px';
70
- resolvedDropdownHeight = '260px';
71
- resolvedMaxDropdownWidth = '640px';
72
- focused = false;
73
- hovered = false;
74
- /** 선택 값이 변경될 때 발생합니다. */
75
- update;
76
- /** 드롭다운 열림/닫힘 상태가 바뀔 때 발생합니다. */
77
- dropDownShow;
78
- /** 셀렉트 트리거에 포커스를 이동합니다. */
79
- async sdFocus() {
80
- if (this.disabled)
81
- return;
82
- await this.triggerComponentRef?.sdFocus();
83
- }
84
- /** 드롭다운을 엽니다. */
85
- async sdOpen() {
86
- // sdFocus 직후 호출 시 트리거 ref/레이아웃이 안정될 때까지 한 틱 대기
87
- await new Promise(resolve => setTimeout(resolve, 0));
88
- if (this.disabled || this.isOpen)
89
- return;
90
- this.prepareDropdownGeometry();
91
- if (this.closeAnimationTimer)
92
- clearTimeout(this.closeAnimationTimer);
93
- this.isAnimatingOut = false;
94
- this.isOpen = true;
95
- }
96
- triggerRef;
97
- triggerComponentRef;
98
- closeAnimationTimer;
99
- /** 폼 연동용 name 속성 */
100
- name = nanoid();
101
- triggerHasFocus = false;
102
- watchIsOpen(newValue) {
103
- this.syncFocusedState(newValue);
104
- this.dropDownShow.emit({ isOpen: newValue });
105
- }
106
- get isMulti() {
107
- return this.type === 'multi' || this.type === 'multi_depth';
108
- }
109
- get displayText() {
110
- if (this.isMulti) {
111
- if (!Array.isArray(this.value) || this.value.length === 0)
112
- return '';
113
- const nonDisabledLeaves = this.getNonDisabledLeaves(this.options);
114
- const selected = this.getSelectedOptions();
115
- const allSelected = nonDisabledLeaves.length > 0 &&
116
- nonDisabledLeaves.every(leaf => selected.some(s => s.value === leaf.value));
117
- if (allSelected)
118
- return this.allSelectedLabel ?? '전체';
119
- const flat = this.flattenOptions(this.options);
120
- return this.value
121
- .map(item => {
122
- if (item != null && typeof item === 'object') {
123
- const opt = item;
124
- return opt.label ?? flat.find(o => o.value === opt.value)?.label ?? '';
125
- }
126
- return flat.find(o => o.value === item)?.label ?? '';
127
- })
128
- .filter(Boolean)
129
- .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);
130
101
  }
131
- if (this.value == null)
132
- return '';
133
- if (!this.emitValue && typeof this.value === 'object' && !Array.isArray(this.value)) {
134
- 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
+ }
135
123
  }
136
- const flat = this.flattenOptions(this.options);
137
- return flat.find(o => o.value === this.value)?.label ?? '';
138
- }
139
- flattenOptions(options) {
140
- return options.flatMap(o => (o.children ? this.flattenOptions(o.children) : [o]));
141
- }
142
- getNonDisabledLeaves(options) {
143
- return options.flatMap(o => {
144
- if (o.disabled)
145
- return [];
146
- if (o.children)
147
- return this.getNonDisabledLeaves(o.children);
148
- return [o];
149
- });
150
- }
151
- getSelectedOptions() {
152
- const val = this.value;
153
- if (val == null || !Array.isArray(val))
154
- return [];
155
- if (this.emitValue) {
156
- return val
157
- .map(v => this.findOriginalOption(v, this.options))
158
- .filter((o) => !!o);
124
+ else if (selfMatch) {
125
+ acc.push({ ...option });
159
126
  }
160
- return val;
161
- }
162
- toMultiValue(options) {
163
- return this.emitValue ? options.map(o => o.value) : options;
164
- }
165
- parsePixelValue(value, fallback) {
166
- const parsed = Number.parseFloat(value);
167
- return Number.isFinite(parsed) ? parsed : fallback;
168
- }
169
- updateDropdownViewportConstraints() {
170
- 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)
171
171
  return;
172
- const triggerRect = this.triggerRef.getBoundingClientRect();
173
- const viewportPadding = SdSelect.VIEWPORT_PADDING;
174
- const offsetY = SdSelect.PORTAL_OFFSET_Y;
175
- const preferredHeight = this.parsePixelValue(this.dropdownHeight, 260);
176
- const preferredWidth = this.parsePixelValue(this.maxDropdownWidth, 640);
177
- const availableBelow = Math.max(window.innerHeight - triggerRect.bottom - viewportPadding - offsetY, 0);
178
- const availableAbove = Math.max(triggerRect.top - viewportPadding - offsetY, 0);
179
- const availableHeight = Math.max(availableBelow, availableAbove);
180
- const availableWidth = Math.max(window.innerWidth - viewportPadding * 2, 0);
181
- this.resolvedDropdownHeight = `${Math.min(preferredHeight, availableHeight)}px`;
182
- this.resolvedMaxDropdownWidth = `${Math.min(preferredWidth, availableWidth)}px`;
183
- }
184
- handleViewportResize = () => {
185
- 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)
186
180
  return;
187
- this.updateDropdownViewportConstraints();
181
+ this.listItemClick.emit(this.option);
188
182
  };
189
- findOriginalOption(value, options) {
190
- for (const opt of options) {
191
- if (opt.value === value)
192
- return opt;
193
- if (opt.children) {
194
- const found = this.findOriginalOption(value, opt.children);
195
- if (found)
196
- return found;
197
- }
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}`;
198
210
  }
199
- 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, ")"))));
200
225
  }
201
- closeDropdown() {
202
- if (!this.isOpen)
203
- return;
204
- this.isOpen = false;
205
- this.isAnimatingOut = true;
206
- if (this.closeAnimationTimer)
207
- clearTimeout(this.closeAnimationTimer);
208
- this.closeAnimationTimer = setTimeout(() => {
209
- this.isAnimatingOut = false;
210
- }, SdSelect.CLOSE_ANIMATION_DURATION);
211
- }
212
- prepareDropdownGeometry() {
213
- if (this.triggerRef) {
214
- this.triggerWidth = `${this.triggerRef.offsetWidth}px`;
215
- }
216
- 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);
217
236
  }
218
- syncFocusedState(isOpen = this.isOpen) {
219
- 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
+ });
220
253
  }
221
- handleTriggerFocus = () => {
222
- this.triggerHasFocus = true;
223
- this.syncFocusedState();
224
- };
225
- handleTriggerBlur = () => {
226
- this.triggerHasFocus = false;
227
- this.syncFocusedState();
228
- };
229
- handleTriggerClick = () => {
230
- if (this.isOpen) {
231
- this.closeDropdown();
232
- return;
233
- }
234
- this.prepareDropdownGeometry();
235
- if (this.closeAnimationTimer)
236
- clearTimeout(this.closeAnimationTimer);
237
- this.isAnimatingOut = false;
238
- 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);
239
265
  };
240
- emitUpdate(value) {
241
- this.update.emit(value);
242
- }
243
- handleOptionSelect = (detail) => {
244
- const { option, leaves } = detail;
245
- if (this.isMulti) {
246
- this.handleMultiSelect(option, leaves);
247
- }
248
- else {
249
- this.closeDropdown();
250
- this.value = this.emitValue ? option.value : option;
251
- const nextValue = this.value;
252
- requestAnimationFrame(() => {
253
- this.emitUpdate(nextValue);
254
- });
255
- }
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();
256
273
  };
257
- handleMultiSelect(option, leaves) {
258
- const selected = this.getSelectedOptions();
259
- const isGroup = !!option.children;
260
- let newSelected;
261
- if (isGroup) {
262
- const allSelected = leaves.every(l => selected.some(s => s.value === l.value));
263
- if (allSelected) {
264
- const leafValues = new Set(leaves.map(l => l.value));
265
- newSelected = selected.filter(s => !leafValues.has(s.value));
266
- }
267
- else {
268
- const existing = new Set(selected.map(s => s.value));
269
- const toAdd = leaves.filter(l => !existing.has(l.value));
270
- newSelected = [...selected, ...toAdd];
271
- }
272
- }
273
- else {
274
- const exists = selected.some(s => s.value === option.value);
275
- newSelected = exists ? selected.filter(s => s.value !== option.value) : [...selected, option];
276
- }
277
- this.value = this.toMultiValue(newSelected);
278
- this.emitUpdate(this.value);
279
- }
280
- connectedCallback() {
281
- window.addEventListener('resize', this.handleViewportResize);
282
- }
283
274
  disconnectedCallback() {
284
- window.removeEventListener('resize', this.handleViewportResize);
285
- if (this.closeAnimationTimer)
286
- clearTimeout(this.closeAnimationTimer);
275
+ if (this.focusRafId !== undefined)
276
+ cancelAnimationFrame(this.focusRafId);
277
+ if (this.debounceTimer !== undefined)
278
+ clearTimeout(this.debounceTimer);
287
279
  }
288
280
  render() {
289
- const portalProps = {
290
- open: this.isOpen,
291
- parentRef: this.triggerRef,
292
- viewportPadding: SdSelect.VIEWPORT_PADDING,
293
- onSdClose: () => {
294
- this.closeDropdown();
295
- },
296
- };
297
- return (h("sd-field", { key: '426e5777a976da591726108e8a19c27822151c34', 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: () => {
298
- this.hovered = true;
299
- }, onMouseLeave: () => {
300
- this.hovered = false;
301
- } }, h("div", { key: '2e47d100a63bd6445f452701409cf05efabb30e0', class: "sd-select", ref: el => {
302
- this.triggerRef = el;
303
- } }, h("sd-select-trigger", { key: '65763371f56bae558f927189931b567e5ca73df6', ref: el => {
304
- this.triggerComponentRef = el;
305
- }, 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: '98518c875649c8e38c15565d9bfccf9c0b0eeb9a', ...portalProps }, h("sd-select-listbox", { key: 'be8e2c814bd30a57ee20b0a0b378f3809ffef26a', 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" })))));
306
290
  }
307
- static get watchers() { return {
308
- "isOpen": [{
309
- "watchIsOpen": 0
310
- }]
311
- }; }
312
291
  };
313
- SdSelect.style = sdSelectCss();
292
+ SdSelectListItemSearch.style = sdSelectListItemSearchCss();
314
293
 
315
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}`;
316
295
 
@@ -679,9 +658,9 @@ const SdSelectListbox = class {
679
658
  '--listbox-max-height': this.maxHeight ?? '260px',
680
659
  '--listbox-radius': `${LIST_BOX_LAYOUT.radius}px`,
681
660
  };
682
- return (h("div", { key: '0e322ab6384a37b9ea83883e8012799f157ec833', class: "sd-select-listbox", style: cssVars }, this.showSearch && (h("sd-select-list-item-search", { key: '12d35a6ab654d4ce0cf504c0d1b1b6e4cc7eac78', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), h("div", { key: 'ba99682e9c486fe0efa02a888166a06a600c189e', 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 => {
683
662
  this.listEl = el;
684
- } }, this.showSelectAll && (h("sd-select-list-item", { key: '8f66c32cc3f8287d04ad7081e71903ccb4467b4f', 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) })))))));
685
664
  }
686
665
  static get watchers() { return {
687
666
  "searchKeyword": [{
@@ -749,7 +728,7 @@ const SdSelectTrigger = class {
749
728
  ? SELECT_COLORS.icon.disabled
750
729
  : SELECT_COLORS.icon.default,
751
730
  };
752
- return (h("div", { key: 'a261a38ab844572d693bdb736e8c6c5df8b2b0c6', ref: el => {
731
+ return (h("div", { key: '2ec5e736c0742a10fdfa9b4b12b0820e99c30f7f', ref: el => {
753
732
  this.triggerEl = el;
754
733
  }, role: "button", "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, class: {
755
734
  'sd-select-trigger': true,
@@ -760,7 +739,7 @@ const SdSelectTrigger = class {
760
739
  e.preventDefault();
761
740
  this.handleClick();
762
741
  }
763
- }, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: 'c8255f624c101fa984d7dc081231f0ce957f8707', 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: 'bf2145a098a31eba8a5210eb265fb252b84c9e0b', 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: {
764
743
  'sd-select-trigger__icon': true,
765
744
  'sd-select-trigger__icon--open': this.isOpen,
766
745
  } }))));
@@ -768,4 +747,4 @@ const SdSelectTrigger = class {
768
747
  };
769
748
  SdSelectTrigger.style = sdSelectTriggerCss();
770
749
 
771
- 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 };