@sellmate/design-system 1.0.49 → 1.0.51

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 (397) hide show
  1. package/dist/cjs/{component.button-BKa5OPya.js → component.button-DUsddONR.js} +15 -14
  2. package/dist/cjs/{component.modal-CtW5Gmy5.js → component.modal-DmQUWbve.js} +0 -4
  3. package/dist/cjs/{component.textinput-43trvZ5m.js → component.textinput-DIDZPtYE.js} +0 -3
  4. package/dist/cjs/design-system.cjs.js +2 -2
  5. package/dist/cjs/{index-Qvv0fGgj.js → index-BQt-JC6r.js} +3 -3
  6. package/dist/cjs/index.cjs.js +0 -5
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/{resolveColor-Di1RNekE.js → resolveColor-LhfOKtTZ.js} +2 -0
  9. package/dist/cjs/sd-action-modal.cjs.entry.js +5 -7
  10. package/dist/cjs/sd-badge.cjs.entry.js +1 -1
  11. package/dist/cjs/sd-barcode-input.cjs.entry.js +9 -11
  12. package/dist/cjs/{sd-button-v2.config-CQoTThio.js → sd-button-v2.config-B4___nhv.js} +5 -5
  13. package/dist/cjs/sd-button-v2_2.cjs.entry.js +5 -5
  14. package/dist/cjs/{sd-button_4.cjs.entry.js → sd-button_5.cjs.entry.js} +210 -34
  15. package/dist/cjs/sd-calendar.cjs.entry.js +4 -4
  16. package/dist/cjs/sd-card.cjs.entry.js +1 -1
  17. package/dist/cjs/sd-checkbox.cjs.entry.js +2 -2
  18. package/dist/cjs/sd-confirm-modal.cjs.entry.js +8 -10
  19. package/dist/cjs/sd-date-box.cjs.entry.js +3 -3
  20. package/dist/cjs/sd-date-picker.cjs.entry.js +3 -3
  21. package/dist/cjs/sd-date-range-picker.cjs.entry.js +3 -3
  22. package/dist/cjs/sd-dropdown-button.cjs.entry.js +20 -9
  23. package/dist/cjs/sd-file-picker.cjs.entry.js +143 -23
  24. package/dist/cjs/sd-form.cjs.entry.js +3 -3
  25. package/dist/cjs/sd-guide.cjs.entry.js +3 -3
  26. package/dist/cjs/sd-input_2.cjs.entry.js +13 -18
  27. package/dist/cjs/sd-loading-spinner_3.cjs.entry.js +8 -8
  28. package/dist/cjs/sd-modal-container.cjs.entry.js +2 -2
  29. package/dist/cjs/sd-number-input.cjs.entry.js +7 -7
  30. package/dist/cjs/sd-popover.cjs.entry.js +12 -12
  31. package/dist/cjs/sd-portal.cjs.entry.js +3 -3
  32. package/dist/cjs/sd-progress.cjs.entry.js +3 -3
  33. package/dist/cjs/sd-radio-button-group.cjs.entry.js +2 -2
  34. package/dist/cjs/sd-radio-group.cjs.entry.js +2 -2
  35. package/dist/cjs/sd-radio.cjs.entry.js +2 -2
  36. package/dist/cjs/sd-select-dropdown_2.cjs.entry.js +8 -8
  37. package/dist/cjs/sd-select-group.cjs.entry.js +4 -4
  38. package/dist/cjs/sd-select-multiple-group.cjs.entry.js +3 -3
  39. package/dist/cjs/sd-select-multiple.cjs.entry.js +4 -4
  40. package/dist/cjs/sd-select-option-group.cjs.entry.js +5 -5
  41. package/dist/cjs/sd-select-v2-list-item_2.cjs.entry.js +9 -9
  42. package/dist/cjs/sd-select-v2-listbox_2.cjs.entry.js +6 -6
  43. package/dist/cjs/sd-select-v2.cjs.entry.js +6 -6
  44. package/dist/cjs/sd-table.cjs.entry.js +4 -4
  45. package/dist/cjs/sd-tabs.cjs.entry.js +4 -5
  46. package/dist/cjs/sd-tag.cjs.entry.js +3 -3
  47. package/dist/cjs/sd-text-link.cjs.entry.js +5 -5
  48. package/dist/cjs/sd-textarea.cjs.entry.js +6 -6
  49. package/dist/cjs/sd-toast-container.cjs.entry.js +4 -4
  50. package/dist/cjs/sd-toast.cjs.entry.js +5 -5
  51. package/dist/cjs/sd-toggle-button.cjs.entry.js +3 -3
  52. package/dist/cjs/sd-toggle.cjs.entry.js +3 -3
  53. package/dist/cjs/{tooltipArrow-Mb2Dhc7T.js → tooltipArrow-CRCpqOYA.js} +1 -1
  54. package/dist/collection/collection-manifest.json +1 -0
  55. package/dist/collection/components/sd-action-modal/sd-action-modal.config.js +0 -2
  56. package/dist/collection/components/sd-action-modal/sd-action-modal.js +2 -2
  57. package/dist/collection/components/sd-barcode-input/sd-barcode-input.config.js +0 -5
  58. package/dist/collection/components/sd-barcode-input/sd-barcode-input.css +8 -5
  59. package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +4 -2
  60. package/dist/collection/components/sd-button/sd-button.js +5 -5
  61. package/dist/collection/components/sd-button-v2/sd-button-v2.config.js +4 -4
  62. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.config.js +0 -2
  63. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.css +2 -3
  64. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +3 -3
  65. package/dist/collection/components/sd-field/sd-field.css +11 -6
  66. package/dist/collection/components/sd-field/sd-field.js +34 -16
  67. package/dist/collection/components/sd-file-picker/sd-file-picker.config.js +23 -0
  68. package/dist/collection/components/sd-file-picker/sd-file-picker.css +33 -38
  69. package/dist/collection/components/sd-file-picker/sd-file-picker.js +520 -21
  70. package/dist/collection/components/sd-floating-portal/sd-floating-portal.css +0 -4
  71. package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
  72. package/dist/collection/components/sd-ghost-button/sd-ghost-button.config.js +37 -0
  73. package/dist/collection/components/sd-ghost-button/sd-ghost-button.css +43 -0
  74. package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +205 -0
  75. package/dist/collection/components/sd-guide/sd-guide.js +2 -2
  76. package/dist/collection/components/sd-input/sd-input.config.js +0 -5
  77. package/dist/collection/components/sd-input/sd-input.css +0 -1
  78. package/dist/collection/components/sd-input/sd-input.js +3 -3
  79. package/dist/collection/components/sd-loading-spinner/sd-loading-spinner.js +1 -1
  80. package/dist/collection/components/sd-modal-container/sd-modal-container.css +1 -1
  81. package/dist/collection/components/sd-number-input/sd-number-input.js +3 -3
  82. package/dist/collection/components/sd-pagination/sd-pagination.js +2 -2
  83. package/dist/collection/components/sd-popover/sd-popover.js +11 -7
  84. package/dist/collection/components/sd-portal/sd-portal.js +2 -2
  85. package/dist/collection/components/sd-progress/sd-progress.js +2 -34
  86. package/dist/collection/components/sd-select/sd-select-dropdown/sd-select-dropdown.js +2 -2
  87. package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +1 -1
  88. package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.js +3 -3
  89. package/dist/collection/components/sd-select-group/sd-select-group.js +1 -1
  90. package/dist/collection/components/sd-select-multiple/sd-select-multiple.js +1 -1
  91. package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js +3 -3
  92. package/dist/collection/components/sd-select-v2/sd-select-v2-list-item/sd-select-v2-list-item.js +2 -2
  93. package/dist/collection/components/sd-select-v2/sd-select-v2-list-item-search/sd-select-v2-list-item-search.js +3 -3
  94. package/dist/collection/components/sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.js +1 -1
  95. package/dist/collection/components/sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.js +2 -2
  96. package/dist/collection/components/sd-select-v2/sd-select-v2.js +3 -3
  97. package/dist/collection/components/sd-tabs/sd-tabs.js +2 -3
  98. package/dist/collection/components/sd-tag/sd-tag.js +2 -2
  99. package/dist/collection/components/sd-text-link/sd-text-link.js +3 -3
  100. package/dist/collection/components/sd-textarea/sd-textarea.js +2 -2
  101. package/dist/collection/components/sd-toast/sd-toast.css +0 -14
  102. package/dist/collection/components/sd-toast/sd-toast.js +2 -2
  103. package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
  104. package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
  105. package/dist/collection/components/sd-toggle-button/sd-toggle-button.js +1 -1
  106. package/dist/collection/components/sd-tooltip/sd-tooltip.css +2 -2
  107. package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
  108. package/dist/collection/index.js +0 -1
  109. package/dist/components/index.js +1 -1
  110. package/dist/components/p-5aLT6ILZ.js +1 -0
  111. package/dist/components/p-B3CfLqLu.js +1 -0
  112. package/dist/components/p-B9t9pwo_.js +1 -0
  113. package/dist/components/{p-CbjDAdZ_.js → p-BGovA1BG.js} +1 -1
  114. package/dist/components/p-BIpitpaB.js +1 -0
  115. package/dist/components/p-BZwAZpfW.js +1 -0
  116. package/dist/components/p-BcM38Hvd.js +1 -0
  117. package/dist/components/p-BxPyZJaz.js +1 -0
  118. package/dist/components/{p-D-ian_bu.js → p-C2Yw3PoX.js} +1 -1
  119. package/dist/components/p-C2uZkOBj.js +1 -0
  120. package/dist/components/{p-DdjivpAF.js → p-C9GMwYKA.js} +1 -1
  121. package/dist/components/p-CDR-4auv.js +1 -0
  122. package/dist/components/p-CKl79fdN.js +1 -0
  123. package/dist/components/{p-B6NYLHOZ.js → p-CSCkf9FA.js} +1 -1
  124. package/dist/components/p-Ck-2jtzb.js +1 -0
  125. package/dist/components/p-CnUsbdL7.js +1 -0
  126. package/dist/components/p-CpGiSLY_.js +1 -0
  127. package/dist/components/p-CqU3a1re.js +1 -0
  128. package/dist/components/p-D-pFdq6g.js +1 -0
  129. package/dist/components/p-DB_gU4hh.js +1 -0
  130. package/dist/components/p-DCJWAesd.js +1 -0
  131. package/dist/components/{p-BBYig1zV.js → p-DSYw-7RA.js} +1 -1
  132. package/dist/components/p-DXAB0k9r.js +1 -0
  133. package/dist/components/p-DkMewZNL.js +1 -0
  134. package/dist/components/{p-BeIOWDKk.js → p-DuqfYDrU.js} +1 -1
  135. package/dist/components/p-Dx7R5s53.js +1 -0
  136. package/dist/components/p-IRd25v7v.js +1 -0
  137. package/dist/components/p-UUxu2akd.js +1 -0
  138. package/dist/components/p-eOGZo-WB.js +1 -0
  139. package/dist/components/p-hWm-Llzv.js +1 -0
  140. package/dist/components/p-iZSyoiHU.js +1 -0
  141. package/dist/components/{p-BNuWMSR_.js → p-lKwhftf9.js} +1 -1
  142. package/dist/components/p-mO5GcwI3.js +1 -0
  143. package/dist/components/p-mnDAufNv.js +1 -0
  144. package/dist/components/p-tR70yRjm.js +1 -0
  145. package/dist/components/sd-action-modal.js +1 -1
  146. package/dist/components/sd-badge.js +1 -1
  147. package/dist/components/sd-barcode-input.js +1 -1
  148. package/dist/components/sd-button-v2.js +1 -1
  149. package/dist/components/sd-button.js +1 -1
  150. package/dist/components/sd-calendar.js +1 -1
  151. package/dist/components/sd-card.js +1 -1
  152. package/dist/components/sd-checkbox.js +1 -1
  153. package/dist/components/sd-confirm-modal.js +1 -1
  154. package/dist/components/sd-date-box.js +1 -1
  155. package/dist/components/sd-date-picker.js +1 -1
  156. package/dist/components/sd-date-range-picker.js +1 -1
  157. package/dist/components/sd-dropdown-button.js +1 -1
  158. package/dist/components/sd-field.js +1 -1
  159. package/dist/components/sd-file-picker.js +1 -1
  160. package/dist/components/sd-floating-portal.js +1 -1
  161. package/dist/components/sd-form.js +1 -1
  162. package/dist/components/sd-ghost-button.d.ts +11 -0
  163. package/dist/components/sd-ghost-button.js +1 -0
  164. package/dist/components/sd-guide.js +1 -1
  165. package/dist/components/sd-icon.js +1 -1
  166. package/dist/components/sd-input.js +1 -1
  167. package/dist/components/sd-loading-spinner.js +1 -1
  168. package/dist/components/sd-modal-container.js +1 -1
  169. package/dist/components/sd-number-input.js +1 -1
  170. package/dist/components/sd-pagination.js +1 -1
  171. package/dist/components/sd-popover.js +1 -1
  172. package/dist/components/sd-portal.js +1 -1
  173. package/dist/components/sd-progress.js +1 -1
  174. package/dist/components/sd-radio-button-group.js +1 -1
  175. package/dist/components/sd-radio-group.js +1 -1
  176. package/dist/components/sd-radio.js +1 -1
  177. package/dist/components/sd-select-dropdown.js +1 -1
  178. package/dist/components/sd-select-group.js +1 -1
  179. package/dist/components/sd-select-multiple-group.js +1 -1
  180. package/dist/components/sd-select-multiple.js +1 -1
  181. package/dist/components/sd-select-option-group.js +1 -1
  182. package/dist/components/sd-select-option.js +1 -1
  183. package/dist/components/sd-select-search-input.js +1 -1
  184. package/dist/components/sd-select-v2-list-item-search.js +1 -1
  185. package/dist/components/sd-select-v2-list-item.js +1 -1
  186. package/dist/components/sd-select-v2-listbox.js +1 -1
  187. package/dist/components/sd-select-v2-trigger.js +1 -1
  188. package/dist/components/sd-select-v2.js +1 -1
  189. package/dist/components/sd-select.js +1 -1
  190. package/dist/components/sd-table.js +1 -1
  191. package/dist/components/sd-tabs.js +1 -1
  192. package/dist/components/sd-tag.js +1 -1
  193. package/dist/components/sd-text-link.js +1 -1
  194. package/dist/components/sd-textarea.js +1 -1
  195. package/dist/components/sd-toast-container.js +1 -1
  196. package/dist/components/sd-toast.js +1 -1
  197. package/dist/components/sd-toggle-button.js +1 -1
  198. package/dist/components/sd-toggle.js +1 -1
  199. package/dist/components/sd-tooltip.js +1 -1
  200. package/dist/design-system/design-system.css +1 -1
  201. package/dist/design-system/design-system.esm.js +1 -1
  202. package/dist/design-system/index.esm.js +1 -1
  203. package/dist/design-system/p-00e236e1.entry.js +1 -0
  204. package/dist/design-system/p-09369f2c.entry.js +1 -0
  205. package/dist/design-system/p-0c026571.entry.js +1 -0
  206. package/dist/design-system/p-15c051cb.entry.js +1 -0
  207. package/dist/design-system/p-17429476.entry.js +1 -0
  208. package/dist/design-system/p-1cf60275.entry.js +1 -0
  209. package/dist/design-system/p-2a25b3dc.entry.js +1 -0
  210. package/dist/design-system/p-3686b44e.entry.js +1 -0
  211. package/dist/design-system/{p-d0414155.entry.js → p-3b824d36.entry.js} +1 -1
  212. package/dist/design-system/p-3f657bf8.entry.js +1 -0
  213. package/dist/design-system/{p-d659e98e.entry.js → p-3fdfb2ed.entry.js} +1 -1
  214. package/dist/design-system/{p-2436d5f5.entry.js → p-3fff78c7.entry.js} +1 -1
  215. package/dist/design-system/p-43512d46.entry.js +1 -0
  216. package/dist/design-system/p-4487b2ec.entry.js +1 -0
  217. package/dist/design-system/p-47931c26.entry.js +1 -0
  218. package/dist/design-system/p-47f068ca.entry.js +1 -0
  219. package/dist/design-system/{p-53326ad6.entry.js → p-4e13256e.entry.js} +1 -1
  220. package/dist/design-system/p-52d6d7b5.entry.js +1 -0
  221. package/dist/design-system/p-5ba8caa2.entry.js +1 -0
  222. package/dist/design-system/p-5db2b37b.entry.js +1 -0
  223. package/dist/design-system/p-64f2a188.entry.js +1 -0
  224. package/dist/design-system/p-6aaacaef.entry.js +1 -0
  225. package/dist/design-system/p-74079256.entry.js +1 -0
  226. package/dist/design-system/p-7a18a52b.entry.js +1 -0
  227. package/dist/design-system/p-8187020e.entry.js +1 -0
  228. package/dist/design-system/p-85e22acd.entry.js +1 -0
  229. package/dist/design-system/p-99bcc635.entry.js +1 -0
  230. package/dist/design-system/{p-CbjDAdZ_.js → p-BGovA1BG.js} +1 -1
  231. package/dist/design-system/p-BcM38Hvd.js +1 -0
  232. package/dist/design-system/p-BxPyZJaz.js +1 -0
  233. package/dist/design-system/p-DSRYrM1n.js +1 -0
  234. package/dist/design-system/p-DsU722JF.js +2 -0
  235. package/dist/design-system/p-a7e4994e.entry.js +1 -0
  236. package/dist/design-system/p-c7c0aa6c.entry.js +1 -0
  237. package/dist/design-system/p-c9af0fc9.entry.js +1 -0
  238. package/dist/design-system/p-c9bc4fa6.entry.js +1 -0
  239. package/dist/design-system/p-cebaca7c.entry.js +1 -0
  240. package/dist/design-system/p-cee768a2.entry.js +1 -0
  241. package/dist/design-system/p-cf7d46cf.entry.js +1 -0
  242. package/dist/design-system/p-d5b5cfc7.entry.js +1 -0
  243. package/dist/design-system/p-d8a3e32d.entry.js +1 -0
  244. package/dist/design-system/{p-03160e15.entry.js → p-d8b4b24f.entry.js} +1 -1
  245. package/dist/design-system/p-dea33b4d.entry.js +1 -0
  246. package/dist/design-system/p-dee605b1.entry.js +1 -0
  247. package/dist/design-system/p-e37772c2.entry.js +1 -0
  248. package/dist/design-system/{p-DzagopqQ.js → p-ePjRdqmD.js} +1 -1
  249. package/dist/design-system/p-ea768c2e.entry.js +1 -0
  250. package/dist/design-system/p-eb11f6cc.entry.js +1 -0
  251. package/dist/design-system/{p-07a3c3fc.entry.js → p-fd11ac4d.entry.js} +1 -1
  252. package/dist/design-system/p-mO5GcwI3.js +1 -0
  253. package/dist/esm/{component.button-DwYSoCyW.js → component.button-BcM38Hvd.js} +15 -14
  254. package/dist/esm/{component.modal-rGbM8XR_.js → component.modal-mO5GcwI3.js} +0 -4
  255. package/dist/esm/{component.textinput-CbjDAdZ_.js → component.textinput-BGovA1BG.js} +0 -3
  256. package/dist/esm/design-system.js +3 -3
  257. package/dist/esm/{index-B8tGP77V.js → index-DsU722JF.js} +3 -3
  258. package/dist/esm/index.js +1 -5
  259. package/dist/esm/loader.js +3 -3
  260. package/dist/esm/{resolveColor-CquSJNHV.js → resolveColor-BxPyZJaz.js} +2 -0
  261. package/dist/esm/sd-action-modal.entry.js +5 -7
  262. package/dist/esm/sd-badge.entry.js +1 -1
  263. package/dist/esm/sd-barcode-input.entry.js +9 -11
  264. package/dist/esm/{sd-button-v2.config-B4Fmn4Ju.js → sd-button-v2.config-C7s1j4_P.js} +5 -5
  265. package/dist/esm/sd-button-v2_2.entry.js +5 -5
  266. package/dist/esm/{sd-button_4.entry.js → sd-button_5.entry.js} +210 -35
  267. package/dist/esm/sd-calendar.entry.js +4 -4
  268. package/dist/esm/sd-card.entry.js +1 -1
  269. package/dist/esm/sd-checkbox.entry.js +2 -2
  270. package/dist/esm/sd-confirm-modal.entry.js +8 -10
  271. package/dist/esm/sd-date-box.entry.js +3 -3
  272. package/dist/esm/sd-date-picker.entry.js +3 -3
  273. package/dist/esm/sd-date-range-picker.entry.js +3 -3
  274. package/dist/esm/sd-dropdown-button.entry.js +17 -6
  275. package/dist/esm/sd-file-picker.entry.js +143 -23
  276. package/dist/esm/sd-form.entry.js +3 -3
  277. package/dist/esm/sd-guide.entry.js +3 -3
  278. package/dist/esm/sd-input_2.entry.js +13 -18
  279. package/dist/esm/sd-loading-spinner_3.entry.js +8 -8
  280. package/dist/esm/sd-modal-container.entry.js +2 -2
  281. package/dist/esm/sd-number-input.entry.js +7 -7
  282. package/dist/esm/sd-popover.entry.js +12 -12
  283. package/dist/esm/sd-portal.entry.js +3 -3
  284. package/dist/esm/sd-progress.entry.js +3 -3
  285. package/dist/esm/sd-radio-button-group.entry.js +2 -2
  286. package/dist/esm/sd-radio-group.entry.js +2 -2
  287. package/dist/esm/sd-radio.entry.js +2 -2
  288. package/dist/esm/sd-select-dropdown_2.entry.js +8 -8
  289. package/dist/esm/sd-select-group.entry.js +4 -4
  290. package/dist/esm/sd-select-multiple-group.entry.js +3 -3
  291. package/dist/esm/sd-select-multiple.entry.js +4 -4
  292. package/dist/esm/sd-select-option-group.entry.js +5 -5
  293. package/dist/esm/sd-select-v2-list-item_2.entry.js +9 -9
  294. package/dist/esm/sd-select-v2-listbox_2.entry.js +6 -6
  295. package/dist/esm/sd-select-v2.entry.js +6 -6
  296. package/dist/esm/sd-table.entry.js +4 -4
  297. package/dist/esm/sd-tabs.entry.js +4 -5
  298. package/dist/esm/sd-tag.entry.js +3 -3
  299. package/dist/esm/sd-text-link.entry.js +5 -5
  300. package/dist/esm/sd-textarea.entry.js +6 -6
  301. package/dist/esm/sd-toast-container.entry.js +4 -4
  302. package/dist/esm/sd-toast.entry.js +5 -5
  303. package/dist/esm/sd-toggle-button.entry.js +3 -3
  304. package/dist/esm/sd-toggle.entry.js +3 -3
  305. package/dist/esm/{tooltipArrow-Pdc3NIc9.js → tooltipArrow-CJuzsrdH.js} +1 -1
  306. package/dist/types/components/sd-action-modal/sd-action-modal.config.d.ts +0 -2
  307. package/dist/types/components/sd-barcode-input/sd-barcode-input.config.d.ts +0 -4
  308. package/dist/types/components/sd-confirm-modal/sd-confirm-modal.config.d.ts +0 -2
  309. package/dist/types/components/sd-file-picker/sd-file-picker.config.d.ts +31 -0
  310. package/dist/types/components/sd-file-picker/sd-file-picker.d.ts +29 -2
  311. package/dist/types/components/sd-ghost-button/sd-ghost-button.config.d.ts +12 -0
  312. package/dist/types/components/sd-ghost-button/sd-ghost-button.d.ts +15 -0
  313. package/dist/types/components/sd-input/sd-input.config.d.ts +0 -4
  314. package/dist/types/components.d.ts +201 -4
  315. package/dist/types/index.d.ts +0 -1
  316. package/hydrate/index.js +574 -264
  317. package/hydrate/index.mjs +574 -264
  318. package/package.json +1 -1
  319. package/dist/cjs/system-lN7yOMPF.js +0 -20
  320. package/dist/collection/components/event-management.js +0 -19
  321. package/dist/collection/styles/fonts/fontBase64.js +0 -141910
  322. package/dist/collection/utils/utils.js +0 -3
  323. package/dist/components/p-7tPcjtqM.js +0 -1
  324. package/dist/components/p-B09D2cZD.js +0 -1
  325. package/dist/components/p-B1vJXa29.js +0 -1
  326. package/dist/components/p-BYaBx4Ar.js +0 -1
  327. package/dist/components/p-BeZsmobQ.js +0 -1
  328. package/dist/components/p-By4ufaS3.js +0 -1
  329. package/dist/components/p-C0ptbo29.js +0 -1
  330. package/dist/components/p-C3XBhNH9.js +0 -1
  331. package/dist/components/p-CS6ohqwt.js +0 -1
  332. package/dist/components/p-CUy8ulXZ.js +0 -1
  333. package/dist/components/p-CdoxVzYC.js +0 -1
  334. package/dist/components/p-Chqlvi5E.js +0 -1
  335. package/dist/components/p-CquSJNHV.js +0 -1
  336. package/dist/components/p-CxJY5DLb.js +0 -1
  337. package/dist/components/p-DAWMGK_A.js +0 -1
  338. package/dist/components/p-DE3qbfEZ.js +0 -1
  339. package/dist/components/p-DJScHgLW.js +0 -1
  340. package/dist/components/p-DeTDTmN7.js +0 -1
  341. package/dist/components/p-DhKZT8lW.js +0 -1
  342. package/dist/components/p-Dl7yIIDW.js +0 -1
  343. package/dist/components/p-DqwiOEb3.js +0 -1
  344. package/dist/components/p-Du3VqeNP.js +0 -1
  345. package/dist/components/p-DwYSoCyW.js +0 -1
  346. package/dist/components/p-ZoQO0p2E.js +0 -1
  347. package/dist/components/p-jilbrMIA.js +0 -1
  348. package/dist/components/p-poQ9yAeD.js +0 -1
  349. package/dist/components/p-rGbM8XR_.js +0 -1
  350. package/dist/components/p-uWsY9w9i.js +0 -1
  351. package/dist/design-system/p-021e4171.entry.js +0 -1
  352. package/dist/design-system/p-0e0992bf.entry.js +0 -1
  353. package/dist/design-system/p-127445af.entry.js +0 -1
  354. package/dist/design-system/p-14d1d9d7.entry.js +0 -1
  355. package/dist/design-system/p-15aa5f57.entry.js +0 -1
  356. package/dist/design-system/p-19b18e4c.entry.js +0 -1
  357. package/dist/design-system/p-19e62a3d.entry.js +0 -1
  358. package/dist/design-system/p-242c605c.entry.js +0 -1
  359. package/dist/design-system/p-498d333c.entry.js +0 -1
  360. package/dist/design-system/p-4d904e5a.entry.js +0 -1
  361. package/dist/design-system/p-4e9abae8.entry.js +0 -1
  362. package/dist/design-system/p-50cecb3a.entry.js +0 -1
  363. package/dist/design-system/p-5eb98ac7.entry.js +0 -1
  364. package/dist/design-system/p-6d9e16bd.entry.js +0 -1
  365. package/dist/design-system/p-7a029f03.entry.js +0 -1
  366. package/dist/design-system/p-833f828d.entry.js +0 -1
  367. package/dist/design-system/p-83e46793.entry.js +0 -1
  368. package/dist/design-system/p-9616d8d1.entry.js +0 -1
  369. package/dist/design-system/p-9e044f42.entry.js +0 -1
  370. package/dist/design-system/p-B8tGP77V.js +0 -2
  371. package/dist/design-system/p-BeCHKP_I.js +0 -1
  372. package/dist/design-system/p-CS6ohqwt.js +0 -1
  373. package/dist/design-system/p-CquSJNHV.js +0 -1
  374. package/dist/design-system/p-DwYSoCyW.js +0 -1
  375. package/dist/design-system/p-ade2ed02.entry.js +0 -1
  376. package/dist/design-system/p-aeed9b29.entry.js +0 -1
  377. package/dist/design-system/p-b5d8e54d.entry.js +0 -1
  378. package/dist/design-system/p-b924251e.entry.js +0 -1
  379. package/dist/design-system/p-bddf2246.entry.js +0 -1
  380. package/dist/design-system/p-bffc1455.entry.js +0 -1
  381. package/dist/design-system/p-cf641008.entry.js +0 -1
  382. package/dist/design-system/p-d4da5815.entry.js +0 -1
  383. package/dist/design-system/p-d5dcd2ff.entry.js +0 -1
  384. package/dist/design-system/p-d93c6ea8.entry.js +0 -1
  385. package/dist/design-system/p-dd330438.entry.js +0 -1
  386. package/dist/design-system/p-de02d3b8.entry.js +0 -1
  387. package/dist/design-system/p-e58e5fa2.entry.js +0 -1
  388. package/dist/design-system/p-e8cb12b7.entry.js +0 -1
  389. package/dist/design-system/p-ee25a675.entry.js +0 -1
  390. package/dist/design-system/p-ef654bbe.entry.js +0 -1
  391. package/dist/design-system/p-fc235907.entry.js +0 -1
  392. package/dist/design-system/p-fd2e0035.entry.js +0 -1
  393. package/dist/design-system/p-rGbM8XR_.js +0 -1
  394. package/dist/esm/system-CS6ohqwt.js +0 -18
  395. package/dist/types/components/event-management.d.ts +0 -6
  396. package/dist/types/styles/fonts/fontBase64.d.ts +0 -3
  397. package/dist/types/utils/utils.d.ts +0 -1
@@ -1 +1 @@
1
- import{p as t,H as o,h as e,t as n}from"./p-B1vJXa29.js";import{d as i}from"./p-DeTDTmN7.js";import{d}from"./p-BBYig1zV.js";import{d as s}from"./p-Chqlvi5E.js";const a={help:"활용 TIP",pdf:"PDF Guide",youtube:"Video Guide",notion:"사용법 안내",event:"Event Button"},r={help:{name:"helpOutline",size:20,color:"green_75"},pdf:{name:"pdf",size:20,color:"red_75"},youtube:{name:"youtube",size:20,color:"red_75"},notion:{name:"notion",size:16,color:"black"},event:{name:"event",size:16,color:"brilliantblue_70"}},u=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}type="help";label="";message="";guideUrl="";popupTitle="";popupWidth;popupShow=!1;guideRef;handleClickGuide=()=>{"help"!==this.type?this.guideUrl&&window.open(this.guideUrl,"_blank"):this.popupShow=!this.popupShow};get guideClass(){const t=["sd-guide","sd-guide--"+this.type];return this.popupShow&&t.push("sd-guide--active"),t.join(" ")}closeDropdown=()=>{this.popupShow=!1};render(){const{name:t,size:o,color:n}=r[this.type];return e("div",{key:"89499e72eef00e3ec8a18f3cdafa4a204653c22f",class:"sd-guide",style:{"--sd-guide-color":r[this.type].color}},e("sd-button",{key:"20b7c0b5ec7ac13075db533c63c99ff8140a8a80",ref:t=>this.guideRef=t,class:this.guideClass,variant:this.popupShow?"primary":"outline",label:this.label||a[this.type],size:"sm",color:this.popupShow?r[this.type].color:"grey_45",icon:t,iconColor:this.popupShow?"white":n,iconSize:o,noHover:this.popupShow,onSdClick:this.handleClickGuide}),"help"===this.type&&this.popupShow&&e("sd-portal",{key:"db9fcfe211fc1b35f1111d09fa3c6d105b08bb62",open:this.popupShow,parentRef:this.guideRef,onSdClose:this.closeDropdown,offset:[0,4]},e("div",{key:"8bd28388e0492bd909e440c0ddf8850aeb2abc92",style:{position:"absolute",width:"0px",height:"0px"}},e("div",{key:"3ac75e22a37abaf94422acb66be7056a4ecad289",class:"sd-guide__popup",style:{width:this.popupWidth?this.popupWidth+"px":"426px"}},e("sd-button",{key:"2bef90a771e50f1f31823b6eca7f890645b329a8",class:"sd-guide__popup__close",icon:"close",color:"grey_65",size:"md",variant:"ghost",noHover:!0,onSdClick:this.closeDropdown}),e("div",{key:"603e334f19b7ce0afaddfdbe9890f58071bd6638",class:"sd-guide__popup__header"},e("sd-icon",{key:"219dd58caf462d77b814828e1ba61a6f958acba3",name:"helpOutline",size:24,color:"green_65"}),e("h3",{key:"f225bdf560d43079c87c9345e09f134ef27cf1d4",class:"sd-guide__popup__title"},this.popupTitle||a[this.type])),e("ul",{key:"2fb791f2392f0d38554f5a688660eae90ff34f9f",class:"sd-guide__popup__list"},this.renderListItem(this.message))))))}renderListItem(t,o=0){const e=[];if(Array.isArray(t)){const n=t.map((t=>this.renderListItem(t,o+1)));e.push(...n.flat())}else e.push(this.renderLi(t,o));return e}renderLi=(t,o)=>e("li",{class:"sd-guide__popup__list__item sd-guide__popup__list__item--depth-"+o},e("p",{innerHTML:t}));static get style(){return'@charset "UTF-8";sd-button{display:inline-flex;width:fit-content;height:fit-content}.sd-button{--sd-button-height:34px;--sd-button-padding-x:20px;--sd-button-gap:8px;--sd-button-font-family:inherit;--sd-button-font-size:16px;--sd-button-font-weight:500;--sd-button-text-decoration:none;--sd-button-label-min-width:auto;--sd-button-icon-only-size:var(--sd-button-height);text-decoration:none;cursor:pointer;border-radius:var(--sd-button-radius-default, 4px);transition:all 0.2s ease-in-out;position:relative;overflow:hidden;white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;border:none;padding:0 var(--sd-button-padding-x);min-width:var(--sd-button-min-width, auto);min-height:var(--sd-button-height);font-family:var(--sd-button-font-family);font-size:var(--sd-button-font-size);font-weight:var(--sd-button-font-weight);text-decoration:var(--sd-button-text-decoration)}.sd-button--xs{--sd-button-height:var(--sd-button-xs-height, 24px);--sd-button-padding-x:var(--sd-button-xs-padding-x, 8px);--sd-button-gap:var(--sd-button-xs-gap, 4px);--sd-button-font-family:var(--sd-button-xs-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-xs-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-xs-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-xs-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-xs-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-xs-width, var(--sd-button-height));line-height:20px}.sd-button--sm{--sd-button-height:var(--sd-button-sm-height, 28px);--sd-button-padding-x:var(--sd-button-sm-padding-x, 12px);--sd-button-gap:var(--sd-button-sm-gap, 6px);--sd-button-font-family:var(--sd-button-sm-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-sm-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-sm-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-sm-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-sm-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-sm-width, var(--sd-button-height));line-height:20px}.sd-button--md{--sd-button-height:var(--sd-button-md-height, 34px);--sd-button-padding-x:var(--sd-button-md-padding-x, 20px);--sd-button-gap:var(--sd-button-md-gap, 8px);--sd-button-font-family:var(--sd-button-md-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-md-typography-font-size, 16px);--sd-button-font-weight:var(--sd-button-md-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-md-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-md-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-md-width, var(--sd-button-height));line-height:26px}.sd-button--lg{--sd-button-height:var(--sd-button-lg-height, 62px);--sd-button-padding-x:var(--sd-button-lg-padding-x, 28px);--sd-button-gap:var(--sd-button-lg-gap, 12px);--sd-button-font-family:var(--sd-button-lg-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-lg-typography-font-size, 18px);--sd-button-font-weight:var(--sd-button-lg-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-lg-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-lg-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-lg-width, var(--sd-button-height));line-height:30px}.sd-button--has-label{--sd-button-min-width:var(--sd-button-label-min-width, auto)}.sd-button--primary{background-color:var(--button-color);color:white;transition:filter 0.2s ease}.sd-button--primary::before{content:"";position:absolute;inset:0;background:#000000;opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--primary:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.25}.sd-button--outline{background:white;border:var(--sd-button-border-width-default, 1px) solid var(--button-color);color:var(--button-color)}.sd-button--outline::before{content:"";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--outline:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--outline .sd-button__content{position:relative;z-index:1}.sd-button--ghost{background-color:transparent;color:var(--button-color);border-color:transparent}.sd-button--ghost::before{content:"";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--ghost:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--ghost .sd-button__content{position:relative;z-index:1}.sd-button--disabled{border:var(--sd-button-border-width-default, 1px) solid var(--sd-button-border-disabled, #CCCCCC);background:var(--sd-button-bg-disabled, #E1E1E1);color:var(--sd-button-content-disabled, #888888);cursor:not-allowed !important}.sd-button--icon-only{padding:0;width:var(--sd-button-icon-only-size, var(--sd-button-height));min-width:var(--sd-button-icon-only-size, var(--sd-button-height));height:var(--sd-button-icon-only-size, var(--sd-button-height))}.sd-button--no-hover:hover::before{opacity:0 !important}.sd-button .sd-button__content{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-button-gap);z-index:1;font-weight:inherit}sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}sd-guide .sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}sd-guide .sd-guide .sd-button{padding:0 16px 0 12px;border-radius:16px;color:#333333 !important;display:flex;align-items:center;transition:none}sd-guide .sd-guide .sd-button .sd-button__content{color:#333333 !important}sd-guide .sd-guide .sd-button .sd-button__content .sd-button__label{color:#333333 !important;margin-left:4px}sd-guide .sd-guide--active .sd-button{border:1px solid #00973C}sd-guide .sd-guide--active .sd-button .sd-button__content .sd-button__label{color:white !important}.sd-guide__popup{position:relative;padding:20px 32px;border-radius:8px;box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.1);background:white}.sd-guide__popup>.sd-guide__popup__close{position:absolute;top:12px;right:12px}.sd-guide__popup__header{display:flex;align-items:center;gap:8px;margin-bottom:12px}.sd-guide__popup__header .sd-guide__popup__title{margin-top:0;font-size:16px;font-weight:700;line-height:26px;color:#333333}.sd-guide__popup__list{width:100%;padding:0;margin:0}.sd-guide__popup__list__item{display:flex;width:100%;align-items:start;list-style:none;color:#333333;font-size:12px;font-weight:400}.sd-guide__popup__list__item p{width:100%;padding:0;margin:0;word-wrap:break-word;word-break:break-word;white-space:normal;overflow-wrap:break-word;min-width:0}.sd-guide__popup__list__item::before{display:block;content:"-";width:6px;color:#333333;font-size:12px;font-weight:400;margin-left:10px;margin-right:12px;flex-shrink:0}.sd-guide__popup__list__item--depth-2::before{content:"•"}.sd-guide__popup__list__item--depth-2{padding-left:26px}'}},[512,"sd-guide",{type:[1],label:[1],message:[1],guideUrl:[1,"guide-url"],popupTitle:[1,"popup-title"],popupWidth:[2,"popup-width"],popupShow:[32]}]),p=u,b=function(){"undefined"!=typeof customElements&&["sd-guide","sd-button","sd-icon","sd-portal"].forEach((t=>{switch(t){case"sd-guide":customElements.get(n(t))||customElements.define(n(t),u);break;case"sd-button":customElements.get(n(t))||i();break;case"sd-icon":customElements.get(n(t))||d();break;case"sd-portal":customElements.get(n(t))||s()}}))};export{p as SdGuide,b as defineCustomElement}
1
+ import{p as t,H as o,h as e,t as n}from"./p-D-pFdq6g.js";import{d as i}from"./p-CDR-4auv.js";import{d}from"./p-DSYw-7RA.js";import{d as s}from"./p-DB_gU4hh.js";const a={help:"활용 TIP",pdf:"PDF Guide",youtube:"Video Guide",notion:"사용법 안내",event:"Event Button"},r={help:{name:"helpOutline",size:20,color:"green_75"},pdf:{name:"pdf",size:20,color:"red_75"},youtube:{name:"youtube",size:20,color:"red_75"},notion:{name:"notion",size:16,color:"black"},event:{name:"event",size:16,color:"brilliantblue_70"}},u=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}type="help";label="";message="";guideUrl="";popupTitle="";popupWidth;popupShow=!1;guideRef;handleClickGuide=()=>{"help"!==this.type?this.guideUrl&&window.open(this.guideUrl,"_blank"):this.popupShow=!this.popupShow};get guideClass(){const t=["sd-guide","sd-guide--"+this.type];return this.popupShow&&t.push("sd-guide--active"),t.join(" ")}closeDropdown=()=>{this.popupShow=!1};render(){const{name:t,size:o,color:n}=r[this.type];return e("div",{key:"d98a48deb586592dbb379acb4e3725a97601dccd",class:"sd-guide",style:{"--sd-guide-color":r[this.type].color}},e("sd-button",{key:"35b3215ac7d73f2ae9375ab46b2981b314769fdd",ref:t=>this.guideRef=t,class:this.guideClass,variant:this.popupShow?"primary":"outline",label:this.label||a[this.type],size:"sm",color:this.popupShow?r[this.type].color:"grey_45",icon:t,iconColor:this.popupShow?"white":n,iconSize:o,noHover:this.popupShow,onSdClick:this.handleClickGuide}),"help"===this.type&&this.popupShow&&e("sd-portal",{key:"56bda42619f3f10fbdc428e3d11abc1a4a812029",open:this.popupShow,parentRef:this.guideRef,onSdClose:this.closeDropdown,offset:[0,4]},e("div",{key:"a73954469eb2f711ece68c8b17fe2d197b4fd515",style:{position:"absolute",width:"0px",height:"0px"}},e("div",{key:"bf07222fe61b7121d99f0ae39e1e7ffb539db1de",class:"sd-guide__popup",style:{width:this.popupWidth?this.popupWidth+"px":"426px"}},e("sd-button",{key:"c9b8d6c2a311e7a83e9c8b2568b3010e5619ad51",class:"sd-guide__popup__close",icon:"close",color:"grey_65",size:"md",variant:"ghost",noHover:!0,onSdClick:this.closeDropdown}),e("div",{key:"da280eb73610cb0f70c5adbf10e413ea4d8a4629",class:"sd-guide__popup__header"},e("sd-icon",{key:"ec73b6ed0777b464208e9bf94d96b044d8770714",name:"helpOutline",size:24,color:"green_65"}),e("h3",{key:"18a221c3dedb1882479c2a567b3c870d7dfd157b",class:"sd-guide__popup__title"},this.popupTitle||a[this.type])),e("ul",{key:"5a8abec7b5c3246a5eb6a7ec45a3c16a05ccab72",class:"sd-guide__popup__list"},this.renderListItem(this.message))))))}renderListItem(t,o=0){const e=[];if(Array.isArray(t)){const n=t.map((t=>this.renderListItem(t,o+1)));e.push(...n.flat())}else e.push(this.renderLi(t,o));return e}renderLi=(t,o)=>e("li",{class:"sd-guide__popup__list__item sd-guide__popup__list__item--depth-"+o},e("p",{innerHTML:t}));static get style(){return'@charset "UTF-8";sd-button{display:inline-flex;width:fit-content;height:fit-content}.sd-button{--sd-button-height:34px;--sd-button-padding-x:20px;--sd-button-gap:8px;--sd-button-font-family:inherit;--sd-button-font-size:16px;--sd-button-font-weight:500;--sd-button-text-decoration:none;--sd-button-label-min-width:auto;--sd-button-icon-only-size:var(--sd-button-height);text-decoration:none;cursor:pointer;border-radius:var(--sd-button-radius-default, 4px);transition:all 0.2s ease-in-out;position:relative;overflow:hidden;white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;border:none;padding:0 var(--sd-button-padding-x);min-width:var(--sd-button-min-width, auto);min-height:var(--sd-button-height);font-family:var(--sd-button-font-family);font-size:var(--sd-button-font-size);font-weight:var(--sd-button-font-weight);text-decoration:var(--sd-button-text-decoration)}.sd-button--xs{--sd-button-height:var(--sd-button-xs-height, 24px);--sd-button-padding-x:var(--sd-button-xs-padding-x, 8px);--sd-button-gap:var(--sd-button-xs-gap, 4px);--sd-button-font-family:var(--sd-button-xs-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-xs-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-xs-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-xs-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-xs-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-xs-width, var(--sd-button-height));line-height:20px}.sd-button--sm{--sd-button-height:var(--sd-button-sm-height, 28px);--sd-button-padding-x:var(--sd-button-sm-padding-x, 12px);--sd-button-gap:var(--sd-button-sm-gap, 6px);--sd-button-font-family:var(--sd-button-sm-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-sm-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-sm-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-sm-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-sm-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-sm-width, var(--sd-button-height));line-height:20px}.sd-button--md{--sd-button-height:var(--sd-button-md-height, 34px);--sd-button-padding-x:var(--sd-button-md-padding-x, 20px);--sd-button-gap:var(--sd-button-md-gap, 8px);--sd-button-font-family:var(--sd-button-md-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-md-typography-font-size, 16px);--sd-button-font-weight:var(--sd-button-md-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-md-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-md-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-md-width, var(--sd-button-height));line-height:26px}.sd-button--lg{--sd-button-height:var(--sd-button-lg-height, 62px);--sd-button-padding-x:var(--sd-button-lg-padding-x, 28px);--sd-button-gap:var(--sd-button-lg-gap, 12px);--sd-button-font-family:var(--sd-button-lg-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-lg-typography-font-size, 18px);--sd-button-font-weight:var(--sd-button-lg-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-lg-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-lg-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-lg-width, var(--sd-button-height));line-height:30px}.sd-button--has-label{--sd-button-min-width:var(--sd-button-label-min-width, auto)}.sd-button--primary{background-color:var(--button-color);color:white;transition:filter 0.2s ease}.sd-button--primary::before{content:"";position:absolute;inset:0;background:#000000;opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--primary:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.25}.sd-button--outline{background:white;border:var(--sd-button-border-width-default, 1px) solid var(--button-color);color:var(--button-color)}.sd-button--outline::before{content:"";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--outline:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--outline .sd-button__content{position:relative;z-index:1}.sd-button--ghost{background-color:transparent;color:var(--button-color);border-color:transparent}.sd-button--ghost::before{content:"";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--ghost:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--ghost .sd-button__content{position:relative;z-index:1}.sd-button--disabled{border:var(--sd-button-border-width-default, 1px) solid var(--sd-button-border-disabled, #CCCCCC);background:var(--sd-button-bg-disabled, #E1E1E1);color:var(--sd-button-content-disabled, #888888);cursor:not-allowed !important}.sd-button--icon-only{padding:0;width:var(--sd-button-icon-only-size, var(--sd-button-height));min-width:var(--sd-button-icon-only-size, var(--sd-button-height));height:var(--sd-button-icon-only-size, var(--sd-button-height))}.sd-button--no-hover:hover::before{opacity:0 !important}.sd-button .sd-button__content{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-button-gap);z-index:1;font-weight:inherit}sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}sd-guide .sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}sd-guide .sd-guide .sd-button{padding:0 16px 0 12px;border-radius:16px;color:#333333 !important;display:flex;align-items:center;transition:none}sd-guide .sd-guide .sd-button .sd-button__content{color:#333333 !important}sd-guide .sd-guide .sd-button .sd-button__content .sd-button__label{color:#333333 !important;margin-left:4px}sd-guide .sd-guide--active .sd-button{border:1px solid #00973C}sd-guide .sd-guide--active .sd-button .sd-button__content .sd-button__label{color:white !important}.sd-guide__popup{position:relative;padding:20px 32px;border-radius:8px;box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.1);background:white}.sd-guide__popup>.sd-guide__popup__close{position:absolute;top:12px;right:12px}.sd-guide__popup__header{display:flex;align-items:center;gap:8px;margin-bottom:12px}.sd-guide__popup__header .sd-guide__popup__title{margin-top:0;font-size:16px;font-weight:700;line-height:26px;color:#333333}.sd-guide__popup__list{width:100%;padding:0;margin:0}.sd-guide__popup__list__item{display:flex;width:100%;align-items:start;list-style:none;color:#333333;font-size:12px;font-weight:400}.sd-guide__popup__list__item p{width:100%;padding:0;margin:0;word-wrap:break-word;word-break:break-word;white-space:normal;overflow-wrap:break-word;min-width:0}.sd-guide__popup__list__item::before{display:block;content:"-";width:6px;color:#333333;font-size:12px;font-weight:400;margin-left:10px;margin-right:12px;flex-shrink:0}.sd-guide__popup__list__item--depth-2::before{content:"•"}.sd-guide__popup__list__item--depth-2{padding-left:26px}'}},[512,"sd-guide",{type:[1],label:[1],message:[1],guideUrl:[1,"guide-url"],popupTitle:[1,"popup-title"],popupWidth:[2,"popup-width"],popupShow:[32]}]),p=u,b=function(){"undefined"!=typeof customElements&&["sd-guide","sd-button","sd-icon","sd-portal"].forEach((t=>{switch(t){case"sd-guide":customElements.get(n(t))||customElements.define(n(t),u);break;case"sd-button":customElements.get(n(t))||i();break;case"sd-icon":customElements.get(n(t))||d();break;case"sd-portal":customElements.get(n(t))||s()}}))};export{p as SdGuide,b as defineCustomElement}
@@ -1 +1 @@
1
- import{S as o,d as s}from"./p-BBYig1zV.js";const p=o,r=s;export{p as SdIcon,r as defineCustomElement}
1
+ import{S as o,d as s}from"./p-DSYw-7RA.js";const p=o,r=s;export{p as SdIcon,r as defineCustomElement}
@@ -1 +1 @@
1
- import{S as o,d as s}from"./p-Du3VqeNP.js";const p=o,r=s;export{p as SdInput,r as defineCustomElement}
1
+ import{S as s,d as o}from"./p-Dx7R5s53.js";const p=s,r=o;export{p as SdInput,r as defineCustomElement}
@@ -1 +1 @@
1
- import{S as o,d as s}from"./p-BeIOWDKk.js";const p=o,r=s;export{p as SdLoadingSpinner,r as defineCustomElement}
1
+ import{S as o,d as r}from"./p-DuqfYDrU.js";const s=o,p=r;export{s as SdLoadingSpinner,p as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as s,h as i,t as e}from"./p-B1vJXa29.js";import{d as a}from"./p-By4ufaS3.js";import{d as o}from"./p-poQ9yAeD.js";import{d as n}from"./p-BBYig1zV.js";import{d as r}from"./p-DdjivpAF.js";let d=0;const l=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}entries=[];isVisible=!1;isBackdropVisible=!1;contentRef;containerDismissTimerId;handleKeydown(t){if("Escape"===t.key){const t=this.getTopEntry();if(!t)return;if(t.persistent)return void this.shakeModal(t.modalEl);this.dispatchClose(t.modalEl)}}async open(t,s){const i="modal-"+ ++d,e=this.createConfirmModal(i,t);return this.attachModalEventListeners(i,e),this.registerEntry(i,e,s,{persistent:!!t.persistent}),i}async createCustom(t,s,i){const e="modal-"+ ++d;return t.setAttribute("data-modal-id",e),t.classList.add("sd-modal-container__modal"),this.attachModalEventListeners(e,t),this.registerEntry(e,t,i,{persistent:!!s.persistent}),e}attachModalEventListeners(t,s){s.addEventListener("sdOk",(()=>this.requestDismiss(t,"confirm"))),s.addEventListener("sdCancel",(()=>this.requestDismiss(t,"cancel"))),s.addEventListener("sdClose",(()=>this.requestDismiss(t,"close")))}dispatchClose(t){t.dispatchEvent(new CustomEvent("sdClose"))}registerEntry(t,s,i,e){this.containerDismissTimerId&&(clearTimeout(this.containerDismissTimerId),this.containerDismissTimerId=void 0),this.entries=[...this.entries??[],{id:t,modalEl:s,chain:i,persistent:e.persistent,closing:!1}],this.isVisible=!0,requestAnimationFrame((()=>{this.contentRef&&(this.contentRef.appendChild(s),this.waitForModalReady(s).then((()=>{requestAnimationFrame((()=>{const i=(this.entries??[]).find((s=>s.id===t));i&&!i.closing&&s.isConnected&&(this.isBackdropVisible=!0,s.classList.add("sd-modal-container__modal--visible"))}))})))}))}async update(t,s){const i=(this.entries??[]).find((s=>s.id===t));i&&!i.closing&&this.applyProps(i.modalEl,s)}createConfirmModal(t,s){const i=document.createElement("sd-confirm-modal");return i.setAttribute("data-modal-id",t),i.classList.add("sd-modal-container__modal"),this.applyProps(i,s),i}applyProps(t,s){this.hasOwnProp(s,"type")&&this.setAttr(t,"type",s.type),this.hasOwnProp(s,"title")&&this.setAttr(t,"modal-title",s.title),this.hasOwnProp(s,"titleClass")&&this.setAttr(t,"title-class",s.titleClass),this.hasOwnProp(s,"mainButtonLabel")&&this.setAttr(t,"main-button-label",s.mainButtonLabel),this.hasOwnProp(s,"mainButtonName")&&this.setAttr(t,"main-button-name",s.mainButtonName),this.hasOwnProp(s,"subButtonLabel")&&this.setAttr(t,"sub-button-label",s.subButtonLabel),this.hasOwnProp(s,"tagPreset")&&this.setAttr(t,"tag-preset",s.tagPreset),this.hasOwnProp(s,"tagLabel")&&this.setAttr(t,"tag-label",s.tagLabel),this.hasOwnProp(s,"slotLabel")&&this.setAttr(t,"slot-label",s.slotLabel),this.hasOwnProp(s,"topMessage")&&(t.topMessage=s.topMessage??[]),this.hasOwnProp(s,"bottomMessage")&&(t.bottomMessage=s.bottomMessage??[]),this.hasOwnProp(s,"tagContents")&&(t.tagContents=s.tagContents)}handleBackdropClick=()=>{const t=this.getTopEntry();t&&(t.persistent?this.shakeModal(t.modalEl):this.dispatchClose(t.modalEl))};shakeModal(t){const s="sd-modal-container__modal--shake";t.classList.remove(s),t.addEventListener("animationend",(()=>t.classList.remove(s)),{once:!0}),requestAnimationFrame((()=>{t.classList.add(s)}))}disconnectedCallback(){(this.entries??[]).forEach((t=>{t.dismissTimerId&&clearTimeout(t.dismissTimerId)})),this.containerDismissTimerId&&clearTimeout(this.containerDismissTimerId)}getTopEntry(){return[...this.entries??[]].reverse().find((t=>!t.closing))}requestDismiss(t,s){const i=(this.entries??[]).find((s=>s.id===t));if(!i||i.closing)return;i.modalEl.classList.remove("sd-modal-container__modal--visible"),0===(this.entries??[]).filter((s=>s.id!==t&&!s.closing)).length&&(this.isBackdropVisible=!1);const e=setTimeout((()=>{this.finalizeDismiss(t)}),350);this.entries=(this.entries??[]).map((s=>s.id===t?{...s,closing:!0,dismissTimerId:e}:s)),"confirm"===s?i.chain._triggerOk():"cancel"===s?i.chain._triggerCancel():"close"===s&&i.chain._triggerClose()}finalizeDismiss(t){const s=(this.entries??[]).find((s=>s.id===t));if(!s)return;s.dismissTimerId&&clearTimeout(s.dismissTimerId),s.modalEl.remove();const i=(this.entries??[]).filter((s=>s.id!==t));this.entries=i,0===i.length&&(this.containerDismissTimerId=setTimeout((()=>{0===(this.entries??[]).length&&(this.isVisible=!1),this.containerDismissTimerId=void 0}),350)),s.chain._triggerDismissed()}waitForModalReady(t){const s=t.componentOnReady;return"function"==typeof s?s.call(t).then((()=>{})):new Promise((t=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>t()))}))}))}hasOwnProp(t,s){return Object.prototype.hasOwnProperty.call(t,s)}setAttr(t,s,i){null!=i&&t.setAttribute(s,i)}render(){return this.isVisible?i("div",{class:"sd-modal-container"},i("div",{class:{"sd-modal-container__backdrop":!0,"sd-modal-container__backdrop--visible":this.isBackdropVisible},onClick:this.handleBackdropClick}),i("div",{class:"sd-modal-container__content",ref:t=>{this.contentRef=t}})):null}static get style(){return"sd-modal-container{display:block}sd-modal-container .sd-modal-container{position:fixed;inset:0;z-index:var(--sd-modal-container-z-index, 10000);display:flex;align-items:center;justify-content:center}sd-modal-container .sd-modal-container__backdrop{position:absolute;inset:0;background:rgba(0, 0, 0, 0.4);opacity:0;transition:opacity 0.3s ease-out}sd-modal-container .sd-modal-container__backdrop--visible{opacity:1}sd-modal-container .sd-modal-container__content{position:relative;z-index:1;display:grid;place-items:center}sd-modal-container .sd-modal-container__content>*{grid-row:1;grid-column:1}sd-modal-container .sd-modal-container__modal{opacity:0;transform:scale(0);transition:opacity 0.3s ease-out, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)}sd-modal-container .sd-modal-container__modal--visible{opacity:1;transform:scale(1)}sd-modal-container .sd-modal-container__modal--shake{animation:modal-shake 0.3s ease-out}@keyframes modal-shake{0%,100%{transform:scale(1)}25%{transform:scale(1.03)}50%{transform:scale(0.97)}75%{transform:scale(1.01)}}"}},[512,"sd-modal-container",{entries:[32],isVisible:[32],isBackdropVisible:[32],open:[64],createCustom:[64],update:[64]},[[8,"keydown","handleKeydown"]]]),c=l,m=function(){"undefined"!=typeof customElements&&["sd-modal-container","sd-button-v2","sd-confirm-modal","sd-icon","sd-tag"].forEach((t=>{switch(t){case"sd-modal-container":customElements.get(e(t))||customElements.define(e(t),l);break;case"sd-button-v2":customElements.get(e(t))||a();break;case"sd-confirm-modal":customElements.get(e(t))||o();break;case"sd-icon":customElements.get(e(t))||n();break;case"sd-tag":customElements.get(e(t))||r()}}))};export{c as SdModalContainer,m as defineCustomElement}
1
+ import{p as t,H as s,h as e,t as i}from"./p-D-pFdq6g.js";import{d as o}from"./p-DkMewZNL.js";import{d as a}from"./p-CKl79fdN.js";import{d as n}from"./p-B3CfLqLu.js";import{d as r}from"./p-DSYw-7RA.js";import{d}from"./p-C9GMwYKA.js";let l=0;const c=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}entries=[];isVisible=!1;isBackdropVisible=!1;contentRef;containerDismissTimerId;handleKeydown(t){if("Escape"===t.key){const t=this.getTopEntry();if(!t)return;if(t.persistent)return void this.shakeModal(t.modalEl);this.dispatchClose(t.modalEl)}}async open(t,s){const e="modal-"+ ++l,i=this.createConfirmModal(e,t);return this.attachModalEventListeners(e,i),this.registerEntry(e,i,s,{persistent:!!t.persistent}),e}async createCustom(t,s,e){const i="modal-"+ ++l;return t.setAttribute("data-modal-id",i),t.classList.add("sd-modal-container__modal"),this.attachModalEventListeners(i,t),this.registerEntry(i,t,e,{persistent:!!s.persistent}),i}attachModalEventListeners(t,s){s.addEventListener("sdOk",(()=>this.requestDismiss(t,"confirm"))),s.addEventListener("sdCancel",(()=>this.requestDismiss(t,"cancel"))),s.addEventListener("sdClose",(()=>this.requestDismiss(t,"close")))}dispatchClose(t){t.dispatchEvent(new CustomEvent("sdClose"))}registerEntry(t,s,e,i){this.containerDismissTimerId&&(clearTimeout(this.containerDismissTimerId),this.containerDismissTimerId=void 0),this.entries=[...this.entries??[],{id:t,modalEl:s,chain:e,persistent:i.persistent,closing:!1}],this.isVisible=!0,requestAnimationFrame((()=>{this.contentRef&&(this.contentRef.appendChild(s),this.waitForModalReady(s).then((()=>{requestAnimationFrame((()=>{const e=(this.entries??[]).find((s=>s.id===t));e&&!e.closing&&s.isConnected&&(this.isBackdropVisible=!0,s.classList.add("sd-modal-container__modal--visible"))}))})))}))}async update(t,s){const e=(this.entries??[]).find((s=>s.id===t));e&&!e.closing&&this.applyProps(e.modalEl,s)}createConfirmModal(t,s){const e=document.createElement("sd-confirm-modal");return e.setAttribute("data-modal-id",t),e.classList.add("sd-modal-container__modal"),this.applyProps(e,s),e}applyProps(t,s){this.hasOwnProp(s,"type")&&this.setAttr(t,"type",s.type),this.hasOwnProp(s,"title")&&this.setAttr(t,"modal-title",s.title),this.hasOwnProp(s,"titleClass")&&this.setAttr(t,"title-class",s.titleClass),this.hasOwnProp(s,"mainButtonLabel")&&this.setAttr(t,"main-button-label",s.mainButtonLabel),this.hasOwnProp(s,"mainButtonName")&&this.setAttr(t,"main-button-name",s.mainButtonName),this.hasOwnProp(s,"subButtonLabel")&&this.setAttr(t,"sub-button-label",s.subButtonLabel),this.hasOwnProp(s,"tagPreset")&&this.setAttr(t,"tag-preset",s.tagPreset),this.hasOwnProp(s,"tagLabel")&&this.setAttr(t,"tag-label",s.tagLabel),this.hasOwnProp(s,"slotLabel")&&this.setAttr(t,"slot-label",s.slotLabel),this.hasOwnProp(s,"topMessage")&&(t.topMessage=s.topMessage??[]),this.hasOwnProp(s,"bottomMessage")&&(t.bottomMessage=s.bottomMessage??[]),this.hasOwnProp(s,"tagContents")&&(t.tagContents=s.tagContents)}handleBackdropClick=()=>{const t=this.getTopEntry();t&&(t.persistent?this.shakeModal(t.modalEl):this.dispatchClose(t.modalEl))};shakeModal(t){const s="sd-modal-container__modal--shake";t.classList.remove(s),t.addEventListener("animationend",(()=>t.classList.remove(s)),{once:!0}),requestAnimationFrame((()=>{t.classList.add(s)}))}disconnectedCallback(){(this.entries??[]).forEach((t=>{t.dismissTimerId&&clearTimeout(t.dismissTimerId)})),this.containerDismissTimerId&&clearTimeout(this.containerDismissTimerId)}getTopEntry(){return[...this.entries??[]].reverse().find((t=>!t.closing))}requestDismiss(t,s){const e=(this.entries??[]).find((s=>s.id===t));if(!e||e.closing)return;e.modalEl.classList.remove("sd-modal-container__modal--visible"),0===(this.entries??[]).filter((s=>s.id!==t&&!s.closing)).length&&(this.isBackdropVisible=!1);const i=setTimeout((()=>{this.finalizeDismiss(t)}),350);this.entries=(this.entries??[]).map((s=>s.id===t?{...s,closing:!0,dismissTimerId:i}:s)),"confirm"===s?e.chain._triggerOk():"cancel"===s?e.chain._triggerCancel():"close"===s&&e.chain._triggerClose()}finalizeDismiss(t){const s=(this.entries??[]).find((s=>s.id===t));if(!s)return;s.dismissTimerId&&clearTimeout(s.dismissTimerId),s.modalEl.remove();const e=(this.entries??[]).filter((s=>s.id!==t));this.entries=e,0===e.length&&(this.containerDismissTimerId=setTimeout((()=>{0===(this.entries??[]).length&&(this.isVisible=!1),this.containerDismissTimerId=void 0}),350)),s.chain._triggerDismissed()}waitForModalReady(t){const s=t.componentOnReady;return"function"==typeof s?s.call(t).then((()=>{})):new Promise((t=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>t()))}))}))}hasOwnProp(t,s){return Object.prototype.hasOwnProperty.call(t,s)}setAttr(t,s,e){null!=e&&t.setAttribute(s,e)}render(){return this.isVisible?e("div",{class:"sd-modal-container"},e("div",{class:{"sd-modal-container__backdrop":!0,"sd-modal-container__backdrop--visible":this.isBackdropVisible},onClick:this.handleBackdropClick}),e("div",{class:"sd-modal-container__content",ref:t=>{this.contentRef=t}})):null}static get style(){return"sd-modal-container{display:block}sd-modal-container .sd-modal-container{position:fixed;inset:0;z-index:var(--sd-modal-container-z-index, 9999);display:flex;align-items:center;justify-content:center}sd-modal-container .sd-modal-container__backdrop{position:absolute;inset:0;background:rgba(0, 0, 0, 0.4);opacity:0;transition:opacity 0.3s ease-out}sd-modal-container .sd-modal-container__backdrop--visible{opacity:1}sd-modal-container .sd-modal-container__content{position:relative;z-index:1;display:grid;place-items:center}sd-modal-container .sd-modal-container__content>*{grid-row:1;grid-column:1}sd-modal-container .sd-modal-container__modal{opacity:0;transform:scale(0);transition:opacity 0.3s ease-out, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)}sd-modal-container .sd-modal-container__modal--visible{opacity:1;transform:scale(1)}sd-modal-container .sd-modal-container__modal--shake{animation:modal-shake 0.3s ease-out}@keyframes modal-shake{0%,100%{transform:scale(1)}25%{transform:scale(1.03)}50%{transform:scale(0.97)}75%{transform:scale(1.01)}}"}},[512,"sd-modal-container",{entries:[32],isVisible:[32],isBackdropVisible:[32],open:[64],createCustom:[64],update:[64]},[[8,"keydown","handleKeydown"]]]),m=c,h=function(){"undefined"!=typeof customElements&&["sd-modal-container","sd-button-v2","sd-confirm-modal","sd-ghost-button","sd-icon","sd-tag"].forEach((t=>{switch(t){case"sd-modal-container":customElements.get(i(t))||customElements.define(i(t),c);break;case"sd-button-v2":customElements.get(i(t))||o();break;case"sd-confirm-modal":customElements.get(i(t))||a();break;case"sd-ghost-button":customElements.get(i(t))||n();break;case"sd-icon":customElements.get(i(t))||r();break;case"sd-tag":customElements.get(i(t))||d()}}))};export{m as SdModalContainer,h as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,c as s,h as i,t as n}from"./p-B1vJXa29.js";import{n as r}from"./p-CCwNgVmC.js";import{d}from"./p-DeTDTmN7.js";import{d as u}from"./p-CdoxVzYC.js";import{d as a}from"./p-BYaBx4Ar.js";import{d as o}from"./p-BBYig1zV.js";import{d as l}from"./p-CUy8ulXZ.js";var p={numberInput:{sm:{height:"28",paddingX:"6",gap:"8",radius:"4",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"}},md:{height:"36",paddingX:"8",gap:"12",radius:"6",typography:{fontWeight:"400",fontSize:"16",lineHeight:"26"}},contents:{gap:"4"},border:{default:"#AAAAAA",focus:"#0075FF",danger:"#FB4444"},bg:{default:"#FFFFFF"},text:{default:"#222222",placeholder:"#AAAAAA",disabled:"#888888"},hint:{color:"#555555",typography:{fontSize:"12",lineHeight:"20"}},errorMessage:{color:"#E30000",typography:{fontSize:"12",lineHeight:"20"}},stepper:{sm:{size:"20"},md:{size:"24"},radius:"4",bg:{default:"#EFF6FF",disabled:"#EEEEEE"},icon:{default:"#0075FF",disabled:"#BBBBBB"}}}};const h=p.numberInput.sm,c=p.numberInput.md,m={sm:{height:h.height,paddingX:h.paddingX,gap:h.gap,radius:h.radius,fontSize:h.typography.fontSize,lineHeight:h.typography.lineHeight,fontWeight:h.typography.fontWeight},md:{height:c.height,paddingX:c.paddingX,gap:c.gap,radius:c.radius,fontSize:c.typography.fontSize,lineHeight:c.typography.lineHeight,fontWeight:c.typography.fontWeight}},b={border:p.numberInput.border,bg:p.numberInput.bg,text:p.numberInput.text},f={sm:{size:p.numberInput.stepper.sm.size},md:{size:p.numberInput.stepper.md.size},radius:p.numberInput.stepper.radius,bg:p.numberInput.stepper.bg,icon:p.numberInput.stepper.icon},g=p.numberInput.hint,y=p.numberInput.errorMessage,x=p.numberInput.contents.gap,_=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate"),this.focus=s(this,"sdFocus"),this.blur=s(this,"sdBlur")}get el(){return this}size="sm";min=-1/0;max=1/0;step=1;useButton=!1;useDecimal=!1;value=null;label;addonLabel="";placeholder="입력해 주세요.";disabled=!1;width;rules=[];autoFocus=!1;status;hint="";errorMessage="";inputPrefix="";inputSuffix="";inputClass="";readonly=!1;inputStyle={};error=!1;focused=!1;hovered=!1;internalValue=null;displayValue="";nativeEl=void 0;formField;name=r();update;focus;blur;toNumber(t){if(null==t||""===t)return null;if("number"==typeof t)return isNaN(t)?null:t;if("string"==typeof t)return this.parseInput(t);const e=Number(t);return isNaN(e)?null:e}formatWithCommas(t){if(null==t||isNaN(t))return"";const e=t<0,s=Math.abs(t),[i,n]=(""+s).split("."),r=(+i).toLocaleString(),d=e?"-"+r:r;return n?d+"."+n:d+""}parseInput(t){if(!t||""===t.trim())return null;const e=t.replace(/,/g,"").trim();if(!/^-?(\d+\.?\d*|\d*\.\d+)$/.test(e))return null;const s=parseFloat(e);return isNaN(s)||!this.useDecimal&&e.includes(".")?null:s}clampMinMax(t){return isNaN(t)?0:Math.min(Math.max(t,this.min),this.max)}updateDisplay(){this.displayValue=this.formatWithCommas(this.internalValue)}isIncrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue>=this.max}isDecrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue<=this.min}valueChanged(t){const e=this.toNumber(t);this.internalValue=null!==e?this.clampMinMax(e):null,this.updateDisplay()}internalValueChanged(t){this.updateDisplay(),t!==this.value&&(this.value=t,this.update?.emit(t))}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async sdGetNativeElement(){return this.nativeEl||null}componentWillLoad(){const t=this.toNumber(this.value);null!==t&&(this.internalValue=this.clampMinMax(t)),this.updateDisplay()}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{const e=t.target,s=e.value;if(""===s)return this.internalValue=null,void(this.displayValue="");const i=s.replace(/,/g,""),n=(i.match(/\./g)||[]).length;if(n>1)return void(e.value=this.displayValue);if("-"===i||"."===i||"-."===i)return void(e.value=i);if(i.endsWith(".")&&1===n){const t=i.slice(0,-1),s=this.parseInput(t);if(null!==s){const t=this.formatWithCommas(s);return void(e.value=t+".")}}const r=this.parseInput(i);if(null!==r){if(r<this.min)return void(e.value=this.displayValue);if(r>this.max)return void(e.value=this.displayValue);this.internalValue=r,this.displayValue=this.formatWithCommas(r),e.value=this.displayValue}else e.value=this.displayValue};handleFocus=t=>{this.focused=!0,this.focus?.emit(t)};handleBlur=async t=>{this.updateDisplay(),this.nativeEl&&(this.nativeEl.value=this.displayValue),this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.focused=!1,this.blur?.emit(t)};handleKeyDown=t=>{"ArrowUp"===t.key?(t.preventDefault(),this.handleIncrement()):"ArrowDown"===t.key&&(t.preventDefault(),this.handleDecrement())};handleIncrement=()=>{if(this.isIncrementDisabled())return;const t=this.internalValue??this.min??0;let e=t+this.step;e>this.max&&(e=this.max),e!==t&&(this.internalValue=e)};handleDecrement=()=>{if(this.isDecrementDisabled())return;const t=this.internalValue??this.min??0;let e=t-this.step;e<this.min&&(e=this.min),e!==t&&(this.internalValue=e)};render(){const t=m[this.size]??m.sm,e="md"===this.size?14:12;return i("sd-field",{key:"3c0c340cb1078a7f3763ee9f7339ef0cec63b020",name:this.name,label:this.label,addonLabel:this.addonLabel,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,status:this.status,ref:t=>this.formField=t,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-number-input-font-size":t.fontSize+"px","--sd-number-input-line-height":t.lineHeight+"px","--sd-number-input-font-weight":t.fontWeight,"--sd-number-input-padding-x":t.paddingX+"px","--sd-number-input-gap":t.gap+"px","--sd-number-input-text-color":b.text.default,"--sd-number-input-placeholder-color":b.text.placeholder,"--sd-number-input-disabled-color":b.text.disabled,"--sd-number-input-stepper-size":(f[this.size]?.size??f.sm.size)+"px","--sd-number-input-stepper-radius":f.radius+"px","--sd-number-input-stepper-bg":f.bg.default,"--sd-number-input-stepper-bg-disabled":f.bg.disabled,"--sd-number-input-stepper-icon-color":f.icon.default,"--sd-number-input-stepper-icon-disabled":f.icon.disabled,"--sd-system-size-field-sm-height":t.height+"px","--sd-system-radius-field-sm":t.radius+"px","--sd-system-color-field-border-default":b.border.default,"--sd-system-color-field-border-focus":b.border.focus,"--sd-system-color-field-border-danger":b.border.danger,"--sd-system-color-field-bg-default":b.bg.default,"--sd-textinput-input-text-error-message":y.color,"--sd-textinput-input-error-message-typography-font-size":y.typography.fontSize+"px","--sd-textinput-input-error-message-typography-line-height":y.typography.lineHeight+"px","--sd-textinput-input-text-hint":g.color,"--sd-textinput-input-hint-typography-font-size":g.typography.fontSize+"px","--sd-textinput-input-hint-typography-line-height":g.typography.lineHeight+"px","--sd-textinput-input-contents-gap":x+"px"}},i("div",{key:"d2be35e6a7e1201436ad625f4d9678b023187666",class:"sd-number-input__content"},this.useButton&&i("button",{key:"d048a5c576601ff6ac61eda9613d5981b415cd53",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--decrement",disabled:this.isDecrementDisabled(),onClick:this.handleDecrement,tabindex:-1},i("sd-icon",{key:"e618f41dda4f8afcb52ec4dc20828adf0ddc77c3",name:"minus",size:e,color:this.isDecrementDisabled()?f.icon.disabled:f.icon.default})),this.inputPrefix&&i("span",{key:"d293f7530b94c340af5495feaa3323f5f6d7e6bc",class:"sd-number-input__prefix"},this.inputPrefix),i("input",{key:"21d97799b6222f8c5f2145660d4cf25bf5fdeabe",name:this.name,ref:t=>this.nativeEl=t,class:"sd-number-input__native "+this.inputClass,type:"text",inputMode:"numeric",value:this.displayValue,placeholder:this.placeholder,disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,style:{textAlign:this.useButton?"center":"right",...this.inputStyle}}),this.inputSuffix&&i("span",{key:"2008a9aa47389bcac4df03de3e357df6f684f379",class:"sd-number-input__suffix"},this.inputSuffix),this.useButton&&i("button",{key:"5841af412ad228796debe31f7578fd332bf8883a",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--increment",disabled:this.isIncrementDisabled(),onClick:this.handleIncrement,tabindex:-1},i("sd-icon",{key:"ebc2f66dbb12664a976b36eb5b333ff7597d6d52",name:"add",size:e,color:this.isIncrementDisabled()?f.icon.disabled:f.icon.default}))))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-number-input{display:inline-flex}sd-number-input .sd-number-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;color:var(--sd-number-input-text-color);font-size:var(--sd-number-input-font-size);line-height:var(--sd-number-input-line-height);font-weight:var(--sd-number-input-font-weight);padding:0 var(--sd-number-input-padding-x);gap:var(--sd-number-input-gap)}sd-number-input .sd-number-input__content .sd-number-input__native{width:100%;height:100%;min-width:0;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;padding-block:0;padding-inline:0}sd-number-input .sd-number-input__content .sd-number-input__native[disabled]{cursor:not-allowed;color:var(--sd-number-input-disabled-color)}sd-number-input .sd-number-input__content .sd-number-input__native::placeholder{color:var(--sd-number-input-placeholder-color)}sd-number-input .sd-number-input__content .sd-number-input__prefix,sd-number-input .sd-number-input__content .sd-number-input__suffix{flex-shrink:0;white-space:nowrap;color:var(--sd-number-input-placeholder-color);font-size:inherit;line-height:inherit}sd-number-input .sd-number-input__content .sd-number-input__stepper{flex-shrink:0;width:var(--sd-number-input-stepper-size);height:var(--sd-number-input-stepper-size);border:none;border-radius:var(--sd-number-input-stepper-radius);background-color:var(--sd-number-input-stepper-bg);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;margin:0;transition:background-color 0.15s ease}sd-number-input .sd-number-input__content .sd-number-input__stepper:hover:not(:disabled){filter:brightness(0.95)}sd-number-input .sd-number-input__content .sd-number-input__stepper:disabled{background-color:var(--sd-number-input-stepper-bg-disabled);cursor:not-allowed}"}},[512,"sd-number-input",{size:[1],min:[2],max:[2],step:[2],useButton:[4,"use-button"],useDecimal:[4,"use-decimal"],value:[1032],label:[1],addonLabel:[1,"addon-label"],placeholder:[1],disabled:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],status:[1],hint:[1],errorMessage:[1,"error-message"],inputPrefix:[1,"input-prefix"],inputSuffix:[1,"input-suffix"],inputClass:[1,"input-class"],readonly:[4],inputStyle:[16],error:[1028],focused:[1028],hovered:[1028],internalValue:[32],displayValue:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64],sdGetNativeElement:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]),v=_,w=function(){"undefined"!=typeof customElements&&["sd-number-input","sd-button","sd-field","sd-floating-portal","sd-icon","sd-tooltip"].forEach((t=>{switch(t){case"sd-number-input":customElements.get(n(t))||customElements.define(n(t),_);break;case"sd-button":customElements.get(n(t))||d();break;case"sd-field":customElements.get(n(t))||u();break;case"sd-floating-portal":customElements.get(n(t))||a();break;case"sd-icon":customElements.get(n(t))||o();break;case"sd-tooltip":customElements.get(n(t))||l()}}))};export{v as SdNumberInput,w as defineCustomElement}
1
+ import{p as t,H as e,c as s,h as i,t as n}from"./p-D-pFdq6g.js";import{n as r}from"./p-CCwNgVmC.js";import{d as u}from"./p-CDR-4auv.js";import{d}from"./p-hWm-Llzv.js";import{d as a}from"./p-tR70yRjm.js";import{d as o}from"./p-DSYw-7RA.js";import{d as l}from"./p-CpGiSLY_.js";var p={numberInput:{sm:{height:"28",paddingX:"6",gap:"8",radius:"4",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"}},md:{height:"36",paddingX:"8",gap:"12",radius:"6",typography:{fontWeight:"400",fontSize:"16",lineHeight:"26"}},contents:{gap:"4"},border:{default:"#AAAAAA",focus:"#0075FF",danger:"#FB4444"},bg:{default:"#FFFFFF"},text:{default:"#222222",placeholder:"#AAAAAA",disabled:"#888888"},hint:{color:"#555555",typography:{fontSize:"12",lineHeight:"20"}},errorMessage:{color:"#E30000",typography:{fontSize:"12",lineHeight:"20"}},stepper:{sm:{size:"20"},md:{size:"24"},radius:"4",bg:{default:"#EFF6FF",disabled:"#EEEEEE"},icon:{default:"#0075FF",disabled:"#BBBBBB"}}}};const h=p.numberInput.sm,c=p.numberInput.md,b={sm:{height:h.height,paddingX:h.paddingX,gap:h.gap,radius:h.radius,fontSize:h.typography.fontSize,lineHeight:h.typography.lineHeight,fontWeight:h.typography.fontWeight},md:{height:c.height,paddingX:c.paddingX,gap:c.gap,radius:c.radius,fontSize:c.typography.fontSize,lineHeight:c.typography.lineHeight,fontWeight:c.typography.fontWeight}},m={border:p.numberInput.border,bg:p.numberInput.bg,text:p.numberInput.text},f={sm:{size:p.numberInput.stepper.sm.size},md:{size:p.numberInput.stepper.md.size},radius:p.numberInput.stepper.radius,bg:p.numberInput.stepper.bg,icon:p.numberInput.stepper.icon},g=p.numberInput.hint,y=p.numberInput.errorMessage,x=p.numberInput.contents.gap,_=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.focus=s(this,"sdFocus",7),this.blur=s(this,"sdBlur",7)}get el(){return this}size="sm";min=-1/0;max=1/0;step=1;useButton=!1;useDecimal=!1;value=null;label;addonLabel="";placeholder="입력해 주세요.";disabled=!1;width;rules=[];autoFocus=!1;status;hint="";errorMessage="";inputPrefix="";inputSuffix="";inputClass="";readonly=!1;inputStyle={};error=!1;focused=!1;hovered=!1;internalValue=null;displayValue="";nativeEl=void 0;formField;name=r();update;focus;blur;toNumber(t){if(null==t||""===t)return null;if("number"==typeof t)return isNaN(t)?null:t;if("string"==typeof t)return this.parseInput(t);const e=Number(t);return isNaN(e)?null:e}formatWithCommas(t){if(null==t||isNaN(t))return"";const e=t<0,s=Math.abs(t),[i,n]=(""+s).split("."),r=(+i).toLocaleString(),u=e?"-"+r:r;return n?u+"."+n:u+""}parseInput(t){if(!t||""===t.trim())return null;const e=t.replace(/,/g,"").trim();if(!/^-?(\d+\.?\d*|\d*\.\d+)$/.test(e))return null;const s=parseFloat(e);return isNaN(s)||!this.useDecimal&&e.includes(".")?null:s}clampMinMax(t){return isNaN(t)?0:Math.min(Math.max(t,this.min),this.max)}updateDisplay(){this.displayValue=this.formatWithCommas(this.internalValue)}isIncrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue>=this.max}isDecrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue<=this.min}valueChanged(t){const e=this.toNumber(t);this.internalValue=null!==e?this.clampMinMax(e):null,this.updateDisplay()}internalValueChanged(t){this.updateDisplay(),t!==this.value&&(this.value=t,this.update?.emit(t))}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async sdGetNativeElement(){return this.nativeEl||null}componentWillLoad(){const t=this.toNumber(this.value);null!==t&&(this.internalValue=this.clampMinMax(t)),this.updateDisplay()}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{const e=t.target,s=e.value;if(""===s)return this.internalValue=null,void(this.displayValue="");const i=s.replace(/,/g,""),n=(i.match(/\./g)||[]).length;if(n>1)return void(e.value=this.displayValue);if("-"===i||"."===i||"-."===i)return void(e.value=i);if(i.endsWith(".")&&1===n){const t=i.slice(0,-1),s=this.parseInput(t);if(null!==s){const t=this.formatWithCommas(s);return void(e.value=t+".")}}const r=this.parseInput(i);if(null!==r){if(r<this.min)return void(e.value=this.displayValue);if(r>this.max)return void(e.value=this.displayValue);this.internalValue=r,this.displayValue=this.formatWithCommas(r),e.value=this.displayValue}else e.value=this.displayValue};handleFocus=t=>{this.focused=!0,this.focus?.emit(t)};handleBlur=async t=>{this.updateDisplay(),this.nativeEl&&(this.nativeEl.value=this.displayValue),this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.focused=!1,this.blur?.emit(t)};handleKeyDown=t=>{"ArrowUp"===t.key?(t.preventDefault(),this.handleIncrement()):"ArrowDown"===t.key&&(t.preventDefault(),this.handleDecrement())};handleIncrement=()=>{if(this.isIncrementDisabled())return;const t=this.internalValue??this.min??0;let e=t+this.step;e>this.max&&(e=this.max),e!==t&&(this.internalValue=e)};handleDecrement=()=>{if(this.isDecrementDisabled())return;const t=this.internalValue??this.min??0;let e=t-this.step;e<this.min&&(e=this.min),e!==t&&(this.internalValue=e)};render(){const t=b[this.size]??b.sm,e="md"===this.size?14:12;return i("sd-field",{key:"c09a48d9c0bfb0eb6c4327e63ff190b4fee7eff9",name:this.name,label:this.label,addonLabel:this.addonLabel,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,status:this.status,ref:t=>this.formField=t,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-number-input-font-size":t.fontSize+"px","--sd-number-input-line-height":t.lineHeight+"px","--sd-number-input-font-weight":t.fontWeight,"--sd-number-input-padding-x":t.paddingX+"px","--sd-number-input-gap":t.gap+"px","--sd-number-input-text-color":m.text.default,"--sd-number-input-placeholder-color":m.text.placeholder,"--sd-number-input-disabled-color":m.text.disabled,"--sd-number-input-stepper-size":(f[this.size]?.size??f.sm.size)+"px","--sd-number-input-stepper-radius":f.radius+"px","--sd-number-input-stepper-bg":f.bg.default,"--sd-number-input-stepper-bg-disabled":f.bg.disabled,"--sd-number-input-stepper-icon-color":f.icon.default,"--sd-number-input-stepper-icon-disabled":f.icon.disabled,"--sd-system-size-field-sm-height":t.height+"px","--sd-system-radius-field-sm":t.radius+"px","--sd-system-color-field-border-default":m.border.default,"--sd-system-color-field-border-focus":m.border.focus,"--sd-system-color-field-border-danger":m.border.danger,"--sd-system-color-field-bg-default":m.bg.default,"--sd-textinput-input-text-error-message":y.color,"--sd-textinput-input-error-message-typography-font-size":y.typography.fontSize+"px","--sd-textinput-input-error-message-typography-line-height":y.typography.lineHeight+"px","--sd-textinput-input-text-hint":g.color,"--sd-textinput-input-hint-typography-font-size":g.typography.fontSize+"px","--sd-textinput-input-hint-typography-line-height":g.typography.lineHeight+"px","--sd-textinput-input-contents-gap":x+"px"}},i("div",{key:"7ba690b017d58326640083feb4f88ab74e20f7e3",class:"sd-number-input__content"},this.useButton&&i("button",{key:"0eb3ccd26428fce21d74b1e2f06258b054337017",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--decrement",disabled:this.isDecrementDisabled(),onClick:this.handleDecrement,tabindex:-1},i("sd-icon",{key:"4af528aa82ddc6f8abbee1fa8617f5fefc77f41b",name:"minus",size:e,color:this.isDecrementDisabled()?f.icon.disabled:f.icon.default})),this.inputPrefix&&i("span",{key:"f524a85295c29dc02b6803d5a145d24d6d7c3f1b",class:"sd-number-input__prefix"},this.inputPrefix),i("input",{key:"4f3c539cb82745b317ebc2e17f2852a5b386ba6b",name:this.name,ref:t=>this.nativeEl=t,class:"sd-number-input__native "+this.inputClass,type:"text",inputMode:"numeric",value:this.displayValue,placeholder:this.placeholder,disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,style:{textAlign:this.useButton?"center":"right",...this.inputStyle}}),this.inputSuffix&&i("span",{key:"35a1cd706a87cf9320262b12aab7679cbb9eb7f2",class:"sd-number-input__suffix"},this.inputSuffix),this.useButton&&i("button",{key:"a818bf380ac32291155bf8a3c35cf9b9a007ec5e",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--increment",disabled:this.isIncrementDisabled(),onClick:this.handleIncrement,tabindex:-1},i("sd-icon",{key:"0d2e75fb5ebada9aa0846e807695d31f29b18647",name:"add",size:e,color:this.isIncrementDisabled()?f.icon.disabled:f.icon.default}))))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-number-input{display:inline-flex}sd-number-input .sd-number-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;color:var(--sd-number-input-text-color);font-size:var(--sd-number-input-font-size);line-height:var(--sd-number-input-line-height);font-weight:var(--sd-number-input-font-weight);padding:0 var(--sd-number-input-padding-x);gap:var(--sd-number-input-gap)}sd-number-input .sd-number-input__content .sd-number-input__native{width:100%;height:100%;min-width:0;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;padding-block:0;padding-inline:0}sd-number-input .sd-number-input__content .sd-number-input__native[disabled]{cursor:not-allowed;color:var(--sd-number-input-disabled-color)}sd-number-input .sd-number-input__content .sd-number-input__native::placeholder{color:var(--sd-number-input-placeholder-color)}sd-number-input .sd-number-input__content .sd-number-input__prefix,sd-number-input .sd-number-input__content .sd-number-input__suffix{flex-shrink:0;white-space:nowrap;color:var(--sd-number-input-placeholder-color);font-size:inherit;line-height:inherit}sd-number-input .sd-number-input__content .sd-number-input__stepper{flex-shrink:0;width:var(--sd-number-input-stepper-size);height:var(--sd-number-input-stepper-size);border:none;border-radius:var(--sd-number-input-stepper-radius);background-color:var(--sd-number-input-stepper-bg);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;margin:0;transition:background-color 0.15s ease}sd-number-input .sd-number-input__content .sd-number-input__stepper:hover:not(:disabled){filter:brightness(0.95)}sd-number-input .sd-number-input__content .sd-number-input__stepper:disabled{background-color:var(--sd-number-input-stepper-bg-disabled);cursor:not-allowed}"}},[512,"sd-number-input",{size:[1],min:[2],max:[2],step:[2],useButton:[4,"use-button"],useDecimal:[4,"use-decimal"],value:[1032],label:[1],addonLabel:[1,"addon-label"],placeholder:[1],disabled:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],status:[1],hint:[1],errorMessage:[1,"error-message"],inputPrefix:[1,"input-prefix"],inputSuffix:[1,"input-suffix"],inputClass:[1,"input-class"],readonly:[4],inputStyle:[16],error:[1028],focused:[1028],hovered:[1028],internalValue:[32],displayValue:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64],sdGetNativeElement:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]),v=_,w=function(){"undefined"!=typeof customElements&&["sd-number-input","sd-button","sd-field","sd-floating-portal","sd-icon","sd-tooltip"].forEach((t=>{switch(t){case"sd-number-input":customElements.get(n(t))||customElements.define(n(t),_);break;case"sd-button":customElements.get(n(t))||u();break;case"sd-field":customElements.get(n(t))||d();break;case"sd-floating-portal":customElements.get(n(t))||a();break;case"sd-icon":customElements.get(n(t))||o();break;case"sd-tooltip":customElements.get(n(t))||l()}}))};export{v as SdNumberInput,w as defineCustomElement}
@@ -1 +1 @@
1
- import{S as o,d as s}from"./p-DAWMGK_A.js";const p=o,r=s;export{p as SdPagination,r as defineCustomElement}
1
+ import{S as p,d as o}from"./p-BIpitpaB.js";const s=p,t=o;export{s as SdPagination,t as defineCustomElement}
@@ -1 +1 @@
1
- import{p as s,H as t,h as e,F as o,t as i}from"./p-B1vJXa29.js";import{T as a}from"./p-D-ian_bu.js";import{d as n}from"./p-DeTDTmN7.js";import{d as c}from"./p-BYaBx4Ar.js";import{d as l}from"./p-BBYig1zV.js";var r={icon:"12",color:"#888888"},d="#07284A";const h=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost()}get el(){return this}show=!1;placement="bottom";color="#01BB4B";icon="helpOutline";iconSize=12;label="";buttonSize="sm";buttonVariant="primary";menuTitle;messages=[];buttons=[];menuClass="";noHover=!0;useClose=!1;showPopover=!1;slotContent="";watchShowHandler(s){this.showPopover=s}componentWillLoad(){this.showPopover=this.show,this.slotContent=this.el.innerHTML}buttonEl;get popoverOffset(){switch(this.placement){case"top":return[0,-4];case"bottom":return[0,4];case"left":case"right":return[4,0]}}handleClose=()=>{this.showPopover=!1};render(){return e(o,{key:"32543028f51799b838817a81d82c8fc4e16d34d9"},this.label?e("sd-button",{ref:s=>this.buttonEl=s,label:this.label,icon:this.icon,size:this.buttonSize,color:this.color,variant:this.buttonVariant,class:"sd-popover",onSdClick:()=>this.showPopover=!this.showPopover}):e("sd-icon",{ref:s=>this.buttonEl=s,name:this.icon,size:this.iconSize,color:this.color,class:"sd-popover",onClick:()=>this.showPopover=!this.showPopover}),this.showPopover&&e("sd-floating-portal",{key:"146f7b10c48d0e43d9daad84f2b0d73a53c1f083",parentRef:this.buttonEl,onSdClose:this.handleClose,placement:this.placement,offset:this.popoverOffset},e("div",{key:"020b1bc52cb001ef761aac5e88fdfe4a3cc1dbfc",class:{"sd-floating-menu":!0,"sd-floating-menu--popover":!0,["sd-floating-menu--"+this.placement]:!0,[this.menuClass]:!!this.menuClass},style:{"--sd-floating-bg":d}},e("i",{key:"819af7776ce65a25c996262105b05e37d4d04652",class:"sd-floating-menu__arrow sd-floating-menu__arrow--"+this.placement},e(a,{key:"053b299c5a41acb16042adfa2aba7c35eedb0602"})),e("div",{key:"109f2b1044827112922e40b04671785209b9d816",class:"sd-floating-menu__content"},this.menuTitle&&e("div",{key:"99f49b0165ce502ba30ecac3369ba6086cbabb6f",class:"sd-floating-menu__title"},this.menuTitle),this.messages.length>0&&e("div",{key:"5ecd1eea5a83c3fcf71719b308b75734ba42f96d",class:"sd-floating-menu__messages"},this.messages.map((s=>e("div",null,s)))),this.buttons.length>0&&e("div",{key:"9a3a3a38dd3fac46e370f45e65dd22dbcf49bce7",class:"sd-floating-menu__buttons sd-floating-menu__buttons--"+this.buttons.length},this.buttons.map((s=>e("sd-button",{...s}))))),this.useClose&&e("button",{key:"6f231ddb997a45f23c258a092b45f3d6a5e49e60",title:"close",class:"sd-floating-menu__close-button",onClick:()=>this.handleClose()},e("sd-icon",{key:"738c152ec2435992ae21394bf2c164515cef7ed9",name:"close",size:r.icon,color:r.color})))))}static get watchers(){return{show:[{watchShowHandler:0}]}}static get style(){return"sd-popover{position:relative;cursor:pointer;display:inline-flex}"}},[512,"sd-popover",{show:[1028],placement:[513],color:[513],icon:[513],iconSize:[514,"icon-size"],label:[1],buttonSize:[513,"button-size"],buttonVariant:[513,"button-variant"],menuTitle:[513,"title"],messages:[16],buttons:[16],menuClass:[1,"menu-class"],noHover:[4,"no-hover"],useClose:[4,"use-close"],showPopover:[32],slotContent:[32]},void 0,{show:[{watchShowHandler:0}]}]),f=h,u=function(){"undefined"!=typeof customElements&&["sd-popover","sd-button","sd-floating-portal","sd-icon"].forEach((s=>{switch(s){case"sd-popover":customElements.get(i(s))||customElements.define(i(s),h);break;case"sd-button":customElements.get(i(s))||n();break;case"sd-floating-portal":customElements.get(i(s))||c();break;case"sd-icon":customElements.get(i(s))||l()}}))};export{f as SdPopover,u as defineCustomElement}
1
+ import{p as s,H as t,h as e,F as o,t as a}from"./p-D-pFdq6g.js";import{T as i}from"./p-C2Yw3PoX.js";import{d as n}from"./p-CDR-4auv.js";import{d as l}from"./p-tR70yRjm.js";import{d as c}from"./p-B3CfLqLu.js";import{d}from"./p-DSYw-7RA.js";var r="#07284A";const h=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost()}get el(){return this}show=!1;placement="bottom";color="#01BB4B";icon="helpOutline";iconSize=12;label="";buttonSize="sm";buttonVariant="primary";menuTitle;messages=[];buttons=[];menuClass="";noHover=!0;useClose=!1;showPopover=!1;slotContent="";watchShowHandler(s){this.showPopover=s}componentWillLoad(){this.showPopover=this.show,this.slotContent=this.el.innerHTML}buttonEl;get popoverOffset(){switch(this.placement){case"top":return[0,-4];case"bottom":return[0,4];case"left":case"right":return[4,0]}}handleClose=()=>{this.showPopover=!1};render(){return e(o,{key:"6a0b64ce442f1bd1dc76f22a160172a87a63a1d8"},this.label?e("sd-button",{ref:s=>this.buttonEl=s,label:this.label,icon:this.icon,size:this.buttonSize,color:this.color,variant:this.buttonVariant,class:"sd-popover",onSdClick:()=>this.showPopover=!this.showPopover}):e("sd-icon",{ref:s=>this.buttonEl=s,name:this.icon,size:this.iconSize,color:this.color,class:"sd-popover",onClick:()=>this.showPopover=!this.showPopover}),this.showPopover&&e("sd-floating-portal",{key:"e8d39da8af440c81773805331ab97a0105124d81",parentRef:this.buttonEl,onSdClose:this.handleClose,placement:this.placement,offset:this.popoverOffset},e("div",{key:"f608e4dc384f48a9f52133055b718e305d1e9f86",class:{"sd-floating-menu":!0,"sd-floating-menu--popover":!0,["sd-floating-menu--"+this.placement]:!0,[this.menuClass]:!!this.menuClass},style:{"--sd-floating-bg":r}},e("i",{key:"8052d9f446b03770c22857048c88048f0bc982cd",class:"sd-floating-menu__arrow sd-floating-menu__arrow--"+this.placement},e(i,{key:"f6266c4da625b539f9864da6b09599a5b4bf07cb"})),e("div",{key:"8de90282dae5ba223b6495c1f5ef9baaac88ed17",class:"sd-floating-menu__content"},this.menuTitle&&e("div",{key:"79e26ede34d97abce06bfda8dc1bd29122c2e1ac",class:"sd-floating-menu__title"},this.menuTitle),this.messages.length>0&&e("div",{key:"a25d8a379e373e136363a3bce19be76fd2fba182",class:"sd-floating-menu__messages"},this.messages.map((s=>e("div",null,s)))),this.buttons.length>0&&e("div",{key:"9cf61069c654a2d884ae0660ec6ffceb563e3617",class:"sd-floating-menu__buttons sd-floating-menu__buttons--"+this.buttons.length},this.buttons.map((s=>e("sd-button",{...s}))))),this.useClose&&e("sd-ghost-button",{key:"14ef6918e763521ff4db0a0f05e1598e767f257d",class:"sd-floating-menu__close-button",icon:"close",ariaLabel:"close",size:"xs",onClick:()=>this.handleClose()}))))}static get watchers(){return{show:[{watchShowHandler:0}]}}static get style(){return"sd-popover{position:relative;cursor:pointer;display:inline-flex}"}},[512,"sd-popover",{show:[1028],placement:[513],color:[513],icon:[513],iconSize:[514,"icon-size"],label:[1],buttonSize:[513,"button-size"],buttonVariant:[513,"button-variant"],menuTitle:[513,"title"],messages:[16],buttons:[16],menuClass:[1,"menu-class"],noHover:[4,"no-hover"],useClose:[4,"use-close"],showPopover:[32],slotContent:[32]},void 0,{show:[{watchShowHandler:0}]}]),u=h,f=function(){"undefined"!=typeof customElements&&["sd-popover","sd-button","sd-floating-portal","sd-ghost-button","sd-icon"].forEach((s=>{switch(s){case"sd-popover":customElements.get(a(s))||customElements.define(a(s),h);break;case"sd-button":customElements.get(a(s))||n();break;case"sd-floating-portal":customElements.get(a(s))||l();break;case"sd-ghost-button":customElements.get(a(s))||c();break;case"sd-icon":customElements.get(a(s))||d()}}))};export{u as SdPopover,f as defineCustomElement}
@@ -1 +1 @@
1
- import{S as o,d as s}from"./p-Chqlvi5E.js";const p=o,r=s;export{p as SdPortal,r as defineCustomElement}
1
+ import{S as o,d as s}from"./p-DB_gU4hh.js";const p=o,r=s;export{p as SdPortal,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as r,H as s,h as e,t}from"./p-B1vJXa29.js";const o=r(class extends s{constructor(r){super(),!1!==r&&this.__registerHost()}type="bar";error=!1;percentage=0;size=80;strokeWidth=12;label;statusColor={default:"#aaaaaa",progress:"#0075ff",complete:"#12B553",error:"#FB4444"};get progressPercentage(){return this.error?100:this.percentage}get progressStatus(){if(this.error)return"error";switch(this.percentage){case 100:return"complete";case 0:return"default";default:return"progress"}}get progressColor(){return this.statusColor[this.progressStatus]}render(){return e("div",{key:"483f8f0ec69bc7f4bd608332eb2f87b722bc947f",style:{"--progress-color":this.progressColor,"--progress-percentage":this.progressPercentage+"%"}},"bar"===this.type?this.renderBarProgress():this.renderSpinnerProgress(),this.label&&e("div",{key:"b4d3f1f425cd4ae96ef02a6c56671a182ab7ca09",class:"sd-progress__label"},this.label))}renderBarProgress(){return e("div",{class:"sd-progress__bar sd-progress__bar--"+this.progressStatus},e("div",{class:["sd-progress__bar__percent",this.progressPercentage<100?"proceed":""].join(" ")}),e("div",{class:"sd-progress__bar__indicator sd-progress__bar__indicator--left"},this.progressPercentage,"%"),e("div",{class:"sd-progress__bar__indicator sd-progress__bar__indicator--right"},this.progressPercentage,"%"))}renderSpinnerProgress(){const r=(this.size-this.strokeWidth)/2,s=2*Math.PI*r,t=s-this.progressPercentage/100*s,o=this.size+"px",i=this.size/2+"px";return e("div",{class:"sd-progress__spinner sd-progress__spinner--"+this.progressStatus},e("svg",{width:o,height:o},e("circle",{cx:i,cy:i,r,stroke:"#EEEEEE","stroke-width":this.strokeWidth,fill:"transparent"}),e("circle",{cx:i,cy:i,r,stroke:this.progressColor,"stroke-width":this.strokeWidth,fill:"transparent","stroke-dasharray":s,"stroke-dashoffset":t,"stroke-linecap":"round",class:"transition-all duration-500"})),e("strong",{class:"sd-progress__spinner__label"},this.progressPercentage," %"))}static get style(){return"sd-progress{display:block}sd-progress .sd-progress__bar{position:relative;width:100%;height:20px;overflow:hidden;border-radius:4px;background-color:#EEEEEE;text-align:center}sd-progress .sd-progress__bar__percent{width:var(--progress-percentage);height:100%;border-radius:4px;background-color:var(--progress-color, #0075FF);transition:all 0.5s}sd-progress .sd-progress__bar__percent.proceed{border-top-right-radius:50%}sd-progress .sd-progress__bar__indicator{position:absolute;left:0;top:0;height:20px;width:100%;background-color:#EEEEEE;font-size:12px;font-weight:700;line-height:20px;z-index:1}sd-progress .sd-progress__bar__indicator--left{color:var(--progress-color, #0075FF);clip-path:inset(0 0 0 var(--progress-percentage))}sd-progress .sd-progress__bar__indicator--right{color:white;background-color:var(--progress-color, #0075FF);clip-path:inset(0 calc(100% - var(--progress-percentage)) 0 0)}sd-progress .sd-progress__spinner{display:flex;flex-direction:column;align-items:center;justify-content:center}sd-progress .sd-progress__spinner svg{transform:rotate(-90deg)}sd-progress .sd-progress__spinner__label{margin-top:8px;font-size:16px;color:var(--progress-color, #0075FF)}sd-progress .sd-progress__label{margin-top:4px;font-size:12px;color:#222222;text-align:center}"}},[512,"sd-progress",{type:[1],error:[4],percentage:[2],size:[2],strokeWidth:[2,"stroke-width"],label:[1]}]),i=o,a=function(){"undefined"!=typeof customElements&&["sd-progress"].forEach((r=>{"sd-progress"===r&&(customElements.get(t(r))||customElements.define(t(r),o))}))};export{i as SdProgress,a as defineCustomElement}
1
+ import{p as r,H as s,h as e,t}from"./p-D-pFdq6g.js";const o=r(class extends s{constructor(r){super(),!1!==r&&this.__registerHost()}type="bar";error=!1;percentage=0;size=80;strokeWidth=12;label;statusColor={default:"#aaaaaa",progress:"#0075ff",complete:"#12B553",error:"#FB4444"};get progressPercentage(){return this.error?100:this.percentage}get progressStatus(){if(this.error)return"error";switch(this.percentage){case 100:return"complete";case 0:return"default";default:return"progress"}}get progressColor(){return this.statusColor[this.progressStatus]}render(){return e("div",{key:"f5b723807c29b9e4a742febaf7d2f984f9de61d5",style:{"--progress-color":this.progressColor,"--progress-percentage":this.progressPercentage+"%"}},"bar"===this.type?this.renderBarProgress():this.renderSpinnerProgress(),this.label&&e("div",{key:"369e1b7805414b8a2fa5e44f4746435335a251cb",class:"sd-progress__label"},this.label))}renderBarProgress(){return e("div",{class:"sd-progress__bar sd-progress__bar--"+this.progressStatus},e("div",{class:["sd-progress__bar__percent",this.progressPercentage<100?"proceed":""].join(" ")}),e("div",{class:"sd-progress__bar__indicator sd-progress__bar__indicator--left"},this.progressPercentage,"%"),e("div",{class:"sd-progress__bar__indicator sd-progress__bar__indicator--right"},this.progressPercentage,"%"))}renderSpinnerProgress(){const r=(this.size-this.strokeWidth)/2,s=2*Math.PI*r,t=s-this.progressPercentage/100*s,o=this.size+"px",i=this.size/2+"px";return e("div",{class:"sd-progress__spinner sd-progress__spinner--"+this.progressStatus},e("svg",{width:o,height:o},e("circle",{cx:i,cy:i,r,stroke:"#EEEEEE","stroke-width":this.strokeWidth,fill:"transparent"}),e("circle",{cx:i,cy:i,r,stroke:this.progressColor,"stroke-width":this.strokeWidth,fill:"transparent","stroke-dasharray":s,"stroke-dashoffset":t,"stroke-linecap":"round",class:"transition-all duration-500"})),e("strong",{class:"sd-progress__spinner__label"},this.progressPercentage," %"))}static get style(){return"sd-progress{display:block}sd-progress .sd-progress__bar{position:relative;width:100%;height:20px;overflow:hidden;border-radius:4px;background-color:#EEEEEE;text-align:center}sd-progress .sd-progress__bar__percent{width:var(--progress-percentage);height:100%;border-radius:4px;background-color:var(--progress-color, #0075FF);transition:all 0.5s}sd-progress .sd-progress__bar__percent.proceed{border-top-right-radius:50%}sd-progress .sd-progress__bar__indicator{position:absolute;left:0;top:0;height:20px;width:100%;background-color:#EEEEEE;font-size:12px;font-weight:700;line-height:20px;z-index:1}sd-progress .sd-progress__bar__indicator--left{color:var(--progress-color, #0075FF);clip-path:inset(0 0 0 var(--progress-percentage))}sd-progress .sd-progress__bar__indicator--right{color:white;background-color:var(--progress-color, #0075FF);clip-path:inset(0 calc(100% - var(--progress-percentage)) 0 0)}sd-progress .sd-progress__spinner{display:flex;flex-direction:column;align-items:center;justify-content:center}sd-progress .sd-progress__spinner svg{transform:rotate(-90deg)}sd-progress .sd-progress__spinner__label{margin-top:8px;font-size:16px;color:var(--progress-color, #0075FF)}sd-progress .sd-progress__label{margin-top:4px;font-size:12px;color:#222222;text-align:center}"}},[512,"sd-progress",{type:[1],error:[4],percentage:[2],size:[2],strokeWidth:[2,"stroke-width"],label:[1]}]),i=o,a=function(){"undefined"!=typeof customElements&&["sd-progress"].forEach((r=>{"sd-progress"===r&&(customElements.get(t(r))||customElements.define(t(r),o))}))};export{i as SdProgress,a as defineCustomElement}
@@ -1 +1 @@
1
- import{p as o,H as t,c as r,h as d,t as i}from"./p-B1vJXa29.js";const n=o(class extends t{constructor(o){super(),!1!==o&&this.__registerHost(),this.change=r(this,"sdUpdate")}value;options=[];size="md";disabled=!1;name;change;handleRadioChange=(o,t)=>{this.disabled||t||(this.value=o,this.change.emit(o))};isOptionSelected(o){return this.value===o.value}isOptionDisabled(o){return this.disabled||!!o.disabled}getButtonClasses(o){const t=["sd-radio-button-group__option",this.isOptionSelected(o)?"sd-radio-button-group__option--selected":"sd-radio-button-group__option--unselected"];return this.isOptionDisabled(o)&&t.push("sd-radio-button-group__option--disabled"),t.join(" ")}getGroupClasses(){return["sd-radio-button-group","sd-radio-button-group--"+this.size].join(" ")}groupName=this.name||"sd-radio-button-group-"+crypto.randomUUID();render(){return d("div",{key:"419d62e718ddcecb4a901f4c4bc98b560c8c4f01",class:this.getGroupClasses(),role:"radiogroup","aria-disabled":""+this.disabled},this.options.map((o=>{const t=this.isOptionSelected(o),r=this.isOptionDisabled(o);return d("label",{key:"radio-"+o.value,class:this.getButtonClasses(o),"aria-label":o.label||"radio option","data-label":o.label},d("input",{type:"radio",name:this.groupName,value:""+o.value,checked:t,disabled:r,onInput:()=>this.handleRadioChange(o.value,o.disabled)}),o.label&&d("span",{class:"sd-radio-button-group__label"},o.label))})))}static get style(){return"sd-radio-button-group{display:inline-flex;width:fit-content;height:fit-content}sd-radio-button-group .sd-radio-button-group{display:inline-flex;flex-flow:row nowrap;gap:0}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option{display:flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid #CCCCCC;background-color:white;color:#333333;font-weight:400;transition:all 0.2s ease;position:relative;-webkit-user-select:none;user-select:none}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option input{display:none}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option:not(:first-child){margin-left:-1px}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option:first-child{border-radius:4px 0 0 4px}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option:last-child{border-radius:0 4px 4px 0}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option:only-child{border-radius:4px}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option::after{content:attr(data-label);position:absolute;font-weight:400;transition:font-weight 0.2s ease}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option:not(sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option--disabled):not(sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option--selected):hover{background-color:#0075FF;color:white;border-color:#0075FF;z-index:2}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option:not(sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option--disabled):not(sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option--selected):hover::after{font-weight:500}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option--selected{border-color:#0075FF;color:#0075FF;background-color:white;z-index:1}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option--disabled{background-color:#E1E1E1;border-color:#CCCCCC;color:#888888;cursor:not-allowed}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option:has(input:disabled){cursor:not-allowed}sd-radio-button-group .sd-radio-button-group__label{-webkit-user-select:none;user-select:none;font-weight:500;visibility:hidden}sd-radio-button-group .sd-radio-button-group--sm .sd-radio-button-group__option{padding:4px 12px;font-size:12px;line-height:20px}sd-radio-button-group .sd-radio-button-group--md .sd-radio-button-group__option{padding:4px 20px;font-size:16px;line-height:26px}"}},[512,"sd-radio-button-group",{value:[1032],options:[1040],size:[1],disabled:[4],name:[1]}]),s=n,u=function(){"undefined"!=typeof customElements&&["sd-radio-button-group"].forEach((o=>{"sd-radio-button-group"===o&&(customElements.get(i(o))||customElements.define(i(o),n))}))};export{s as SdRadioButtonGroup,u as defineCustomElement}
1
+ import{p as o,H as t,c as r,h as d,t as i}from"./p-D-pFdq6g.js";const n=o(class extends t{constructor(o){super(),!1!==o&&this.__registerHost(),this.change=r(this,"sdUpdate",7)}value;options=[];size="md";disabled=!1;name;change;handleRadioChange=(o,t)=>{this.disabled||t||(this.value=o,this.change.emit(o))};isOptionSelected(o){return this.value===o.value}isOptionDisabled(o){return this.disabled||!!o.disabled}getButtonClasses(o){const t=["sd-radio-button-group__option",this.isOptionSelected(o)?"sd-radio-button-group__option--selected":"sd-radio-button-group__option--unselected"];return this.isOptionDisabled(o)&&t.push("sd-radio-button-group__option--disabled"),t.join(" ")}getGroupClasses(){return["sd-radio-button-group","sd-radio-button-group--"+this.size].join(" ")}groupName=this.name||"sd-radio-button-group-"+crypto.randomUUID();render(){return d("div",{key:"419d62e718ddcecb4a901f4c4bc98b560c8c4f01",class:this.getGroupClasses(),role:"radiogroup","aria-disabled":""+this.disabled},this.options.map((o=>{const t=this.isOptionSelected(o),r=this.isOptionDisabled(o);return d("label",{key:"radio-"+o.value,class:this.getButtonClasses(o),"aria-label":o.label||"radio option","data-label":o.label},d("input",{type:"radio",name:this.groupName,value:""+o.value,checked:t,disabled:r,onInput:()=>this.handleRadioChange(o.value,o.disabled)}),o.label&&d("span",{class:"sd-radio-button-group__label"},o.label))})))}static get style(){return"sd-radio-button-group{display:inline-flex;width:fit-content;height:fit-content}sd-radio-button-group .sd-radio-button-group{display:inline-flex;flex-flow:row nowrap;gap:0}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option{display:flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid #CCCCCC;background-color:white;color:#333333;font-weight:400;transition:all 0.2s ease;position:relative;-webkit-user-select:none;user-select:none}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option input{display:none}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option:not(:first-child){margin-left:-1px}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option:first-child{border-radius:4px 0 0 4px}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option:last-child{border-radius:0 4px 4px 0}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option:only-child{border-radius:4px}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option::after{content:attr(data-label);position:absolute;font-weight:400;transition:font-weight 0.2s ease}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option:not(sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option--disabled):not(sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option--selected):hover{background-color:#0075FF;color:white;border-color:#0075FF;z-index:2}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option:not(sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option--disabled):not(sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option--selected):hover::after{font-weight:500}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option--selected{border-color:#0075FF;color:#0075FF;background-color:white;z-index:1}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option--disabled{background-color:#E1E1E1;border-color:#CCCCCC;color:#888888;cursor:not-allowed}sd-radio-button-group .sd-radio-button-group .sd-radio-button-group__option:has(input:disabled){cursor:not-allowed}sd-radio-button-group .sd-radio-button-group__label{-webkit-user-select:none;user-select:none;font-weight:500;visibility:hidden}sd-radio-button-group .sd-radio-button-group--sm .sd-radio-button-group__option{padding:4px 12px;font-size:12px;line-height:20px}sd-radio-button-group .sd-radio-button-group--md .sd-radio-button-group__option{padding:4px 20px;font-size:16px;line-height:26px}"}},[512,"sd-radio-button-group",{value:[1032],options:[1040],size:[1],disabled:[4],name:[1]}]),s=n,u=function(){"undefined"!=typeof customElements&&["sd-radio-button-group"].forEach((o=>{"sd-radio-button-group"===o&&(customElements.get(i(o))||customElements.define(i(o),n))}))};export{s as SdRadioButtonGroup,u as defineCustomElement}
@@ -1 +1 @@
1
- import{p as o,H as d,c as r,h as i,t as e}from"./p-B1vJXa29.js";import{d as a}from"./p-jilbrMIA.js";const s=o(class extends d{constructor(o){super(),!1!==o&&this.__registerHost(),this.change=r(this,"sdUpdate")}value;options=[];direction="vertical";disabled=!1;groupName;change;valueChanged(o){this.value=o}handleRadioChange=o=>{if(this.disabled)return;const d=this.options.find((d=>d.value+""==o+"")),r=d?d.value:o;this.value=r,this.change?.emit(r)};getGroupClasses(){return["sd-radio-group","sd-radio-group--"+this.direction].join(" ")}render(){return i("div",{key:"82979426bafc24b48858588ad186dfe069616883",class:this.getGroupClasses(),role:"radiogroup"},this.options.map((o=>i("sd-radio",{key:"radio-"+o.value,val:o.value+"",value:this.value+"",label:o.label,disabled:this.disabled||!!o.disabled,onSdUpdate:({detail:o})=>this.handleRadioChange(o)}))))}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return'sd-radio{display:inline-flex;width:fit-content}sd-radio .sd-radio{cursor:pointer;height:20px;display:inline-flex;align-items:center}sd-radio .sd-radio label{display:inline-flex;width:fit-content;align-items:center;gap:8px;cursor:pointer}sd-radio .sd-radio label input{display:inline-block;position:relative;appearance:none;margin:0;width:16px;height:16px;border:1px solid #888888;border-radius:50%;accent-color:#0075FF;background-color:white;cursor:pointer}sd-radio .sd-radio label input:checked{border-color:#0075FF;background-color:white}sd-radio .sd-radio label input:checked::before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:10px;height:10px;border-radius:50%;background-color:#0075FF}sd-radio .sd-radio label input:disabled{border-color:#CCCCCC;background-color:#EEEEEE}sd-radio .sd-radio label input:disabled:checked::before{background-color:#CCCCCC}sd-radio .sd-radio label input:not(:disabled):hover{border-color:#0075FF;background-color:#D9EAFF}sd-radio .sd-radio--disabled{cursor:not-allowed !important}sd-radio .sd-radio--disabled label{cursor:not-allowed !important}sd-radio .sd-radio--disabled label input{cursor:not-allowed !important}sd-radio-group{display:inline-block}sd-radio-group .sd-radio-group{display:flex}sd-radio-group .sd-radio-group--vertical{flex-direction:column;gap:8px}sd-radio-group .sd-radio-group--horizontal{flex-direction:row;align-items:center;gap:20px}'}},[512,"sd-radio-group",{value:[1032],options:[1040],direction:[1],disabled:[4],groupName:[1,"group-name"]},void 0,{value:[{valueChanged:0}]}]),t=s,l=function(){"undefined"!=typeof customElements&&["sd-radio-group","sd-radio"].forEach((o=>{switch(o){case"sd-radio-group":customElements.get(e(o))||customElements.define(e(o),s);break;case"sd-radio":customElements.get(e(o))||a()}}))};export{t as SdRadioGroup,l as defineCustomElement}
1
+ import{p as o,H as d,c as r,h as i,t as e}from"./p-D-pFdq6g.js";import{d as a}from"./p-C2uZkOBj.js";const s=o(class extends d{constructor(o){super(),!1!==o&&this.__registerHost(),this.change=r(this,"sdUpdate",7)}value;options=[];direction="vertical";disabled=!1;groupName;change;valueChanged(o){this.value=o}handleRadioChange=o=>{if(this.disabled)return;const d=this.options.find((d=>d.value+""==o+"")),r=d?d.value:o;this.value=r,this.change?.emit(r)};getGroupClasses(){return["sd-radio-group","sd-radio-group--"+this.direction].join(" ")}render(){return i("div",{key:"82979426bafc24b48858588ad186dfe069616883",class:this.getGroupClasses(),role:"radiogroup"},this.options.map((o=>i("sd-radio",{key:"radio-"+o.value,val:o.value+"",value:this.value+"",label:o.label,disabled:this.disabled||!!o.disabled,onSdUpdate:({detail:o})=>this.handleRadioChange(o)}))))}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return'sd-radio{display:inline-flex;width:fit-content}sd-radio .sd-radio{cursor:pointer;height:20px;display:inline-flex;align-items:center}sd-radio .sd-radio label{display:inline-flex;width:fit-content;align-items:center;gap:8px;cursor:pointer}sd-radio .sd-radio label input{display:inline-block;position:relative;appearance:none;margin:0;width:16px;height:16px;border:1px solid #888888;border-radius:50%;accent-color:#0075FF;background-color:white;cursor:pointer}sd-radio .sd-radio label input:checked{border-color:#0075FF;background-color:white}sd-radio .sd-radio label input:checked::before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:10px;height:10px;border-radius:50%;background-color:#0075FF}sd-radio .sd-radio label input:disabled{border-color:#CCCCCC;background-color:#EEEEEE}sd-radio .sd-radio label input:disabled:checked::before{background-color:#CCCCCC}sd-radio .sd-radio label input:not(:disabled):hover{border-color:#0075FF;background-color:#D9EAFF}sd-radio .sd-radio--disabled{cursor:not-allowed !important}sd-radio .sd-radio--disabled label{cursor:not-allowed !important}sd-radio .sd-radio--disabled label input{cursor:not-allowed !important}sd-radio-group{display:inline-block}sd-radio-group .sd-radio-group{display:flex}sd-radio-group .sd-radio-group--vertical{flex-direction:column;gap:8px}sd-radio-group .sd-radio-group--horizontal{flex-direction:row;align-items:center;gap:20px}'}},[512,"sd-radio-group",{value:[1032],options:[1040],direction:[1],disabled:[4],groupName:[1,"group-name"]},void 0,{value:[{valueChanged:0}]}]),t=s,l=function(){"undefined"!=typeof customElements&&["sd-radio-group","sd-radio"].forEach((o=>{switch(o){case"sd-radio-group":customElements.get(e(o))||customElements.define(e(o),s);break;case"sd-radio":customElements.get(e(o))||a()}}))};export{t as SdRadioGroup,l as defineCustomElement}
@@ -1 +1 @@
1
- import{S as o,d as r}from"./p-jilbrMIA.js";const s=o,p=r;export{s as SdRadio,p as defineCustomElement}
1
+ import{S as o,d as s}from"./p-C2uZkOBj.js";const p=o,r=s;export{p as SdRadio,r as defineCustomElement}
@@ -1 +1 @@
1
- import{S as o,d as s}from"./p-C3XBhNH9.js";const p=o,r=s;export{p as SdSelectDropdown,r as defineCustomElement}
1
+ import{S as s,d as o}from"./p-CnUsbdL7.js";const p=s,r=o;export{p as SdSelectDropdown,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,c as t,h as s,F as o,t as i}from"./p-B1vJXa29.js";import{n as r}from"./p-CCwNgVmC.js";import{B as n}from"./p-BNuWMSR_.js";import{S as l}from"./p-Cy6HMEsK.js";import{d as a}from"./p-DeTDTmN7.js";import{d}from"./p-Dl7yIIDW.js";import{d as p}from"./p-CdoxVzYC.js";import{d as h}from"./p-BYaBx4Ar.js";import{d as c}from"./p-BBYig1zV.js";import{d as u}from"./p-Du3VqeNP.js";import{d as g}from"./p-Chqlvi5E.js";import{d as m}from"./p-DJScHgLW.js";import{d as f}from"./p-B09D2cZD.js";import{d as w}from"./p-CUy8ulXZ.js";const x=e(class extends n{constructor(e){super(!1),!1!==e&&this.__registerHost(),this.update=t(this,"sdUpdate"),this.dropDownShow=t(this,"sdDropDownShow")}get el(){return this}value=null;options=[];placeholder="선택";optionPlaceholder="선택지가 없습니다.";width="200px";dropdownHeight="260px";autoFocus=!1;disabled=!1;clearable=!1;searchable=!1;label="";addonLabel="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;containerStyle={};triggerStyle={};dropdownStyle={};optionStyle={};labelStyle={};optionRenderer;filteredOptions=[];isOpen=!1;searchText=null;itemIndex=-1;isScrolled=!1;isDropdownReady=!1;update;dropDownShow;selectRef;searchRef;triggerRef;optionRef;dropdownRef;formField;dropDownWidth="200px";name=r();async sdOpen(){await new Promise((e=>setTimeout(e,0))),this.isOpen=!0}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}optionsChanged(){this.filteredOptions=this.options,this.filterOptions()}searchTextChanged(){this.filterOptions()}async itemIndexChanged(e,t){if(this.searchable){const e=await this.getNativeInputElement();if(-1===this.itemIndex)return void e?.focus({preventScroll:!0});e?.matches(":focus")&&e?.blur()}const s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option-group")||[]),o=s?.[this.itemIndex];o&&this.isOpen&&(this.optionRef=o,await this.optionRef.isDisabled()?e>t?this.itemIndex++:this.itemIndex--:this.scrollToOption(o))}async isOpenChanged(){this.onDropdownToggle(this.isOpen),this.dropDownShow?.emit({isOpen:this.isOpen}),this.isDropdownReady=!1,!1!==this.isOpen?requestAnimationFrame((()=>{requestAnimationFrame((async()=>{const e=this.getSelectedOption();if(e){const t=this.filteredOptions.indexOf(e),s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option-group")||[]),o=Math.min(t+4,s.length-1),i=s?.[o];i&&this.scrollToOption(i)}if(this.isDropdownReady=!0,this.searchable){const e=await this.getNativeInputElement();e&&requestAnimationFrame((()=>{e.focus({preventScroll:!0})}))}}))})):await(this.formField?.sdValidate())}componentWillLoad(){this.filteredOptions=this.options,this.dropDownWidth=this.width,this.initializeEvent()}componentDidLoad(){this.autoFocus&&this.selectRef?.focus()}componentDidRender(){const e=this.triggerRef,t=e?.getBoundingClientRect();this.dropDownWidth=t?.width?t.width+"px":this.width}disconnectedCallback(){this.cleanupEvent()}handleDocumentClick(e){this.selectRef?.contains(e.target)||(this.isOpen=!1)}handleDocumentKeydown(e){if(e.stopPropagation(),["ArrowDown","ArrowUp","Enter","Escape"].includes(e.key))switch(e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":const t=new l(this.searchable,this.filteredOptions).getNextIndex(this.itemIndex,e.key);this.itemIndex=t;break;case"Enter":const s=this.filteredOptions[this.itemIndex];s&&!s.disabled&&"item"===s.type&&this.handleOptionSelection(s);break;case"Escape":this.isOpen=!1}}handleTriggerClick=e=>{e.stopPropagation(),this.disabled||(this.isOpen=!this.isOpen,this.dropDownShow?.emit({isOpen:this.isOpen}))};handleOptionClick=e=>{const{option:t,event:s}=e;s.stopPropagation(),"item"===t.type&&this.handleOptionSelection(t)};filterOptions(){if(!this.searchText||""===this.searchText.trim())return void(this.filteredOptions=this.options);const e=this.searchText.toLowerCase(),t=new Set;this.options.forEach((s=>{s.label.toLowerCase().includes(e)&&(t.add(s),this.addParentGroups(s,t))})),this.filteredOptions=this.options.filter((e=>t.has(e)))}addParentGroups(e,t){if(!e.parent)return;const s=this.options.find((t=>t.value===e.parent));s&&!t.has(s)&&(t.add(s),this.addParentGroups(s,t))}getSelectedOption(){return this.options.find((e=>e.value===this.value))}handleDropdownScroll=e=>{this.isScrolled=e.target.scrollTop>0};async getNativeInputElement(){return this.searchRef?this.searchRef.sdGetNativeElement():null}handleOptionSelection=e=>{if(!e||e.disabled)return;this.value=e.value,this.isOpen=!1;const t=this.getSelectedOption();this.update?.emit({value:t?.value||null,option:t||null})};closeDropdown(){this.isOpen=!1}async scrollToOption(e){this.dropdownRef&&e&&requestAnimationFrame((()=>{const t=this.dropdownRef,s=e.offsetTop,o=e.offsetHeight,i=t.scrollTop,r=t.clientHeight,n=t.querySelector(".sd-select-group__search-container"),l=n?n.offsetHeight:0,a=r-l,d=i+r;s<i+l?t.scrollTo({top:s-l,behavior:"instant"}):s+o>d&&t.scrollTo({top:s+o-a-l,behavior:"instant"})}))}render(){return s("sd-field",{key:"7dc16e6167d57ea23971ddc60f6414c1894f4163",label:this.label,name:this.name,rules:this.rules,error:this.error,disabled:this.disabled,icon:this.icon,addonLabel:this.addonLabel,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,style:{"--field-width":this.width||"200px"}},s("div",{key:"470501b3bd905154bb090c11237feea3c3566fd5",class:{"sd-select-group":!0,"sd-select-group--open":this.isOpen,"sd-select-group--disabled":this.disabled,"sd-select-group--label":!!this.label},ref:e=>this.selectRef=e},this.renderTrigger(),this.renderDropdown()))}renderTrigger(){const e=this.getSelectedOption();return s("div",{class:"sd-select-group__trigger",tabindex:this.disabled?-1:0,onClick:this.handleTriggerClick,style:this.triggerStyle,ref:e=>this.triggerRef=e},s("span",{class:"sd-select-group__value"},e?e.label:this.placeholder),this.clearable&&e&&!this.disabled&&s("sd-icon",{key:"close-icon",name:"close",size:10,color:"grey_65",class:"sd-select-group__clear",onClick:async e=>{e.stopPropagation(),this.value=null,this.update?.emit({value:null,option:null}),await(this.formField?.sdValidate())}}),s("sd-icon",{key:"arrow-icon",name:"arrowDown",color:"grey_65",class:{"sd-select-group__arrow":!0,"sd-select-group__arrow--open":this.isOpen}}))}renderDropdown(){return!1===this.isOpen?null:s("sd-portal",{open:this.isOpen,parentRef:this.selectRef,onSdClose:this.closeDropdown},s("div",{style:{width:"0",height:"0",overflow:"visible"}},s("div",{class:{"sd-select-group__dropdown":!0,"sd-select-group__dropdown--ready":this.isDropdownReady},style:{"--select-width":this.dropDownWidth||"200px","--select-dropdown-height":this.dropdownHeight||"260px",...this.dropdownStyle},onScroll:this.handleDropdownScroll,ref:e=>this.dropdownRef=e},this.searchable&&s("sd-select-search-input",{ref:e=>this.searchRef=e,isScrolled:this.isScrolled,searchText:this.searchText,onSdSearchInput:e=>this.searchText=e.detail||"",onSdSearchFocus:()=>this.itemIndex=-1}),this.filteredOptions.length>0?s(o,null,this.filteredOptions.map(((e,t)=>s("slot",{name:"option-"+e.value},s("sd-select-option-group",{option:e,index:t,isSelected:"item"===e.type&&e.value===this.value,isFocused:t===this.itemIndex,optionStyle:this.optionStyle,onOptionClick:({detail:t})=>{"item"===e.type&&this.handleOptionClick(t)},useCheckbox:!1,useIndicator:!1}))))):s("slot",{name:"option-placeholder"},s("div",{class:"sd-select-group__option-placeholder",style:this.optionStyle},this.optionPlaceholder)))))}static get watchers(){return{options:[{optionsChanged:0}],searchText:[{searchTextChanged:0}],itemIndex:[{itemIndexChanged:0}],isOpen:[{isOpenChanged:0}]}}static get style(){return".sd-select-group__dropdown .sd-select-group__option-placeholder{height:48px;display:flex;align-items:center;padding:8px 16px;font-size:12px;line-height:0;text-align:left;color:#888888}sd-select-group{display:inline-flex;flex-flow:column nowrap;width:fit-content;height:fit-content}sd-select-group:focus,sd-select-group:focus-visible,sd-select-group:focus-within{outline:none !important}sd-select-group .sd-select-group{width:100%}sd-select-group .sd-select-group .sd-select-group__trigger{padding:4px 28px 4px 12px;display:flex;width:100%;height:100%;align-items:center}sd-select-group .sd-select-group .sd-select-group__trigger .sd-select-group__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400;text-align:left}sd-select-group .sd-select-group .sd-select-group__trigger .sd-select-group__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}sd-select-group .sd-select-group .sd-select-group__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease}sd-select-group .sd-select-group .sd-select-group__arrow--open{transform:rotate(180deg)}.sd-select-group__dropdown{overflow:auto;width:var(--select-width, 200px);max-height:var(--select-dropdown-height, 260px);padding-bottom:2px;background-color:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);border-radius:4px;overflow-y:auto;color:#333333;opacity:0.5;transition:opacity 0.15s ease-in}.sd-select-group__dropdown--ready{opacity:1}"}},[772,"sd-select-group",{value:[1032],options:[1040],placeholder:[1],optionPlaceholder:[1,"option-placeholder"],width:[1],dropdownHeight:[1,"dropdown-height"],autoFocus:[4,"auto-focus"],disabled:[4],clearable:[4],searchable:[4],label:[1],addonLabel:[1,"addon-label"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],rules:[16],error:[4],containerStyle:[16],triggerStyle:[16],dropdownStyle:[16],optionStyle:[16],labelStyle:[16],optionRenderer:[16],filteredOptions:[32],isOpen:[32],searchText:[32],itemIndex:[32],isScrolled:[32],isDropdownReady:[32],sdOpen:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{options:[{optionsChanged:0}],searchText:[{searchTextChanged:0}],itemIndex:[{itemIndexChanged:0}],isOpen:[{isOpenChanged:0}]}]),b=x,y=function(){"undefined"!=typeof customElements&&["sd-select-group","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-icon","sd-input","sd-portal","sd-select-option-group","sd-select-search-input","sd-tooltip"].forEach((e=>{switch(e){case"sd-select-group":customElements.get(i(e))||customElements.define(i(e),x);break;case"sd-button":customElements.get(i(e))||a();break;case"sd-checkbox":customElements.get(i(e))||d();break;case"sd-field":customElements.get(i(e))||p();break;case"sd-floating-portal":customElements.get(i(e))||h();break;case"sd-icon":customElements.get(i(e))||c();break;case"sd-input":customElements.get(i(e))||u();break;case"sd-portal":customElements.get(i(e))||g();break;case"sd-select-option-group":customElements.get(i(e))||m();break;case"sd-select-search-input":customElements.get(i(e))||f();break;case"sd-tooltip":customElements.get(i(e))||w()}}))};export{b as SdSelectGroup,y as defineCustomElement}
1
+ import{p as e,c as t,h as s,F as o,t as i}from"./p-D-pFdq6g.js";import{n as r}from"./p-CCwNgVmC.js";import{B as n}from"./p-lKwhftf9.js";import{S as l}from"./p-Cy6HMEsK.js";import{d as a}from"./p-CDR-4auv.js";import{d}from"./p-DXAB0k9r.js";import{d as p}from"./p-hWm-Llzv.js";import{d as h}from"./p-tR70yRjm.js";import{d as c}from"./p-B3CfLqLu.js";import{d as u}from"./p-DSYw-7RA.js";import{d as g}from"./p-Dx7R5s53.js";import{d as m}from"./p-DB_gU4hh.js";import{d as f}from"./p-mnDAufNv.js";import{d as w}from"./p-eOGZo-WB.js";import{d as b}from"./p-CpGiSLY_.js";const x=e(class extends n{constructor(e){super(!1),!1!==e&&this.__registerHost(),this.update=t(this,"sdUpdate",7),this.dropDownShow=t(this,"sdDropDownShow",7)}get el(){return this}value=null;options=[];placeholder="선택";optionPlaceholder="선택지가 없습니다.";width="200px";dropdownHeight="260px";autoFocus=!1;disabled=!1;clearable=!1;searchable=!1;label="";addonLabel="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;containerStyle={};triggerStyle={};dropdownStyle={};optionStyle={};labelStyle={};optionRenderer;filteredOptions=[];isOpen=!1;searchText=null;itemIndex=-1;isScrolled=!1;isDropdownReady=!1;update;dropDownShow;selectRef;searchRef;triggerRef;optionRef;dropdownRef;formField;dropDownWidth="200px";name=r();async sdOpen(){await new Promise((e=>setTimeout(e,0))),this.isOpen=!0}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}optionsChanged(){this.filteredOptions=this.options,this.filterOptions()}searchTextChanged(){this.filterOptions()}async itemIndexChanged(e,t){if(this.searchable){const e=await this.getNativeInputElement();if(-1===this.itemIndex)return void e?.focus({preventScroll:!0});e?.matches(":focus")&&e?.blur()}const s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option-group")||[]),o=s?.[this.itemIndex];o&&this.isOpen&&(this.optionRef=o,await this.optionRef.isDisabled()?e>t?this.itemIndex++:this.itemIndex--:this.scrollToOption(o))}async isOpenChanged(){this.onDropdownToggle(this.isOpen),this.dropDownShow?.emit({isOpen:this.isOpen}),this.isDropdownReady=!1,!1!==this.isOpen?requestAnimationFrame((()=>{requestAnimationFrame((async()=>{const e=this.getSelectedOption();if(e){const t=this.filteredOptions.indexOf(e),s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option-group")||[]),o=Math.min(t+4,s.length-1),i=s?.[o];i&&this.scrollToOption(i)}if(this.isDropdownReady=!0,this.searchable){const e=await this.getNativeInputElement();e&&requestAnimationFrame((()=>{e.focus({preventScroll:!0})}))}}))})):await(this.formField?.sdValidate())}componentWillLoad(){this.filteredOptions=this.options,this.dropDownWidth=this.width,this.initializeEvent()}componentDidLoad(){this.autoFocus&&this.selectRef?.focus()}componentDidRender(){const e=this.triggerRef,t=e?.getBoundingClientRect();this.dropDownWidth=t?.width?t.width+"px":this.width}disconnectedCallback(){this.cleanupEvent()}handleDocumentClick(e){this.selectRef?.contains(e.target)||(this.isOpen=!1)}handleDocumentKeydown(e){if(e.stopPropagation(),["ArrowDown","ArrowUp","Enter","Escape"].includes(e.key))switch(e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":const t=new l(this.searchable,this.filteredOptions).getNextIndex(this.itemIndex,e.key);this.itemIndex=t;break;case"Enter":const s=this.filteredOptions[this.itemIndex];s&&!s.disabled&&"item"===s.type&&this.handleOptionSelection(s);break;case"Escape":this.isOpen=!1}}handleTriggerClick=e=>{e.stopPropagation(),this.disabled||(this.isOpen=!this.isOpen,this.dropDownShow?.emit({isOpen:this.isOpen}))};handleOptionClick=e=>{const{option:t,event:s}=e;s.stopPropagation(),"item"===t.type&&this.handleOptionSelection(t)};filterOptions(){if(!this.searchText||""===this.searchText.trim())return void(this.filteredOptions=this.options);const e=this.searchText.toLowerCase(),t=new Set;this.options.forEach((s=>{s.label.toLowerCase().includes(e)&&(t.add(s),this.addParentGroups(s,t))})),this.filteredOptions=this.options.filter((e=>t.has(e)))}addParentGroups(e,t){if(!e.parent)return;const s=this.options.find((t=>t.value===e.parent));s&&!t.has(s)&&(t.add(s),this.addParentGroups(s,t))}getSelectedOption(){return this.options.find((e=>e.value===this.value))}handleDropdownScroll=e=>{this.isScrolled=e.target.scrollTop>0};async getNativeInputElement(){return this.searchRef?this.searchRef.sdGetNativeElement():null}handleOptionSelection=e=>{if(!e||e.disabled)return;this.value=e.value,this.isOpen=!1;const t=this.getSelectedOption();this.update?.emit({value:t?.value||null,option:t||null})};closeDropdown(){this.isOpen=!1}async scrollToOption(e){this.dropdownRef&&e&&requestAnimationFrame((()=>{const t=this.dropdownRef,s=e.offsetTop,o=e.offsetHeight,i=t.scrollTop,r=t.clientHeight,n=t.querySelector(".sd-select-group__search-container"),l=n?n.offsetHeight:0,a=r-l,d=i+r;s<i+l?t.scrollTo({top:s-l,behavior:"instant"}):s+o>d&&t.scrollTo({top:s+o-a-l,behavior:"instant"})}))}render(){return s("sd-field",{key:"a0269e6ebfce2363c451fdb6afbe3979265ffb52",label:this.label,name:this.name,rules:this.rules,error:this.error,disabled:this.disabled,icon:this.icon,addonLabel:this.addonLabel,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,style:{"--field-width":this.width||"200px"}},s("div",{key:"55c8f062080befa65986e29d3b7835146150302a",class:{"sd-select-group":!0,"sd-select-group--open":this.isOpen,"sd-select-group--disabled":this.disabled,"sd-select-group--label":!!this.label},ref:e=>this.selectRef=e},this.renderTrigger(),this.renderDropdown()))}renderTrigger(){const e=this.getSelectedOption();return s("div",{class:"sd-select-group__trigger",tabindex:this.disabled?-1:0,onClick:this.handleTriggerClick,style:this.triggerStyle,ref:e=>this.triggerRef=e},s("span",{class:"sd-select-group__value"},e?e.label:this.placeholder),this.clearable&&e&&!this.disabled&&s("sd-icon",{key:"close-icon",name:"close",size:10,color:"grey_65",class:"sd-select-group__clear",onClick:async e=>{e.stopPropagation(),this.value=null,this.update?.emit({value:null,option:null}),await(this.formField?.sdValidate())}}),s("sd-icon",{key:"arrow-icon",name:"arrowDown",color:"grey_65",class:{"sd-select-group__arrow":!0,"sd-select-group__arrow--open":this.isOpen}}))}renderDropdown(){return!1===this.isOpen?null:s("sd-portal",{open:this.isOpen,parentRef:this.selectRef,onSdClose:this.closeDropdown},s("div",{style:{width:"0",height:"0",overflow:"visible"}},s("div",{class:{"sd-select-group__dropdown":!0,"sd-select-group__dropdown--ready":this.isDropdownReady},style:{"--select-width":this.dropDownWidth||"200px","--select-dropdown-height":this.dropdownHeight||"260px",...this.dropdownStyle},onScroll:this.handleDropdownScroll,ref:e=>this.dropdownRef=e},this.searchable&&s("sd-select-search-input",{ref:e=>this.searchRef=e,isScrolled:this.isScrolled,searchText:this.searchText,onSdSearchInput:e=>this.searchText=e.detail||"",onSdSearchFocus:()=>this.itemIndex=-1}),this.filteredOptions.length>0?s(o,null,this.filteredOptions.map(((e,t)=>s("slot",{name:"option-"+e.value},s("sd-select-option-group",{option:e,index:t,isSelected:"item"===e.type&&e.value===this.value,isFocused:t===this.itemIndex,optionStyle:this.optionStyle,onOptionClick:({detail:t})=>{"item"===e.type&&this.handleOptionClick(t)},useCheckbox:!1,useIndicator:!1}))))):s("slot",{name:"option-placeholder"},s("div",{class:"sd-select-group__option-placeholder",style:this.optionStyle},this.optionPlaceholder)))))}static get watchers(){return{options:[{optionsChanged:0}],searchText:[{searchTextChanged:0}],itemIndex:[{itemIndexChanged:0}],isOpen:[{isOpenChanged:0}]}}static get style(){return".sd-select-group__dropdown .sd-select-group__option-placeholder{height:48px;display:flex;align-items:center;padding:8px 16px;font-size:12px;line-height:0;text-align:left;color:#888888}sd-select-group{display:inline-flex;flex-flow:column nowrap;width:fit-content;height:fit-content}sd-select-group:focus,sd-select-group:focus-visible,sd-select-group:focus-within{outline:none !important}sd-select-group .sd-select-group{width:100%}sd-select-group .sd-select-group .sd-select-group__trigger{padding:4px 28px 4px 12px;display:flex;width:100%;height:100%;align-items:center}sd-select-group .sd-select-group .sd-select-group__trigger .sd-select-group__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400;text-align:left}sd-select-group .sd-select-group .sd-select-group__trigger .sd-select-group__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}sd-select-group .sd-select-group .sd-select-group__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease}sd-select-group .sd-select-group .sd-select-group__arrow--open{transform:rotate(180deg)}.sd-select-group__dropdown{overflow:auto;width:var(--select-width, 200px);max-height:var(--select-dropdown-height, 260px);padding-bottom:2px;background-color:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);border-radius:4px;overflow-y:auto;color:#333333;opacity:0.5;transition:opacity 0.15s ease-in}.sd-select-group__dropdown--ready{opacity:1}"}},[772,"sd-select-group",{value:[1032],options:[1040],placeholder:[1],optionPlaceholder:[1,"option-placeholder"],width:[1],dropdownHeight:[1,"dropdown-height"],autoFocus:[4,"auto-focus"],disabled:[4],clearable:[4],searchable:[4],label:[1],addonLabel:[1,"addon-label"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],rules:[16],error:[4],containerStyle:[16],triggerStyle:[16],dropdownStyle:[16],optionStyle:[16],labelStyle:[16],optionRenderer:[16],filteredOptions:[32],isOpen:[32],searchText:[32],itemIndex:[32],isScrolled:[32],isDropdownReady:[32],sdOpen:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{options:[{optionsChanged:0}],searchText:[{searchTextChanged:0}],itemIndex:[{itemIndexChanged:0}],isOpen:[{isOpenChanged:0}]}]),y=x,_=function(){"undefined"!=typeof customElements&&["sd-select-group","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-input","sd-portal","sd-select-option-group","sd-select-search-input","sd-tooltip"].forEach((e=>{switch(e){case"sd-select-group":customElements.get(i(e))||customElements.define(i(e),x);break;case"sd-button":customElements.get(i(e))||a();break;case"sd-checkbox":customElements.get(i(e))||d();break;case"sd-field":customElements.get(i(e))||p();break;case"sd-floating-portal":customElements.get(i(e))||h();break;case"sd-ghost-button":customElements.get(i(e))||c();break;case"sd-icon":customElements.get(i(e))||u();break;case"sd-input":customElements.get(i(e))||g();break;case"sd-portal":customElements.get(i(e))||m();break;case"sd-select-option-group":customElements.get(i(e))||f();break;case"sd-select-search-input":customElements.get(i(e))||w();break;case"sd-tooltip":customElements.get(i(e))||b()}}))};export{y as SdSelectGroup,_ as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,c as t,h as s,F as i,t as o}from"./p-B1vJXa29.js";import{n as l}from"./p-CCwNgVmC.js";import{B as n}from"./p-BNuWMSR_.js";import{S as r}from"./p-Cy6HMEsK.js";import{d as p}from"./p-DeTDTmN7.js";import{d as h}from"./p-Dl7yIIDW.js";import{d as a}from"./p-CdoxVzYC.js";import{d}from"./p-BYaBx4Ar.js";import{d as c}from"./p-BBYig1zV.js";import{d as u}from"./p-Du3VqeNP.js";import{d as m}from"./p-Chqlvi5E.js";import{d as g}from"./p-DJScHgLW.js";import{d as f}from"./p-B09D2cZD.js";import{d as w}from"./p-CUy8ulXZ.js";const b=e(class extends n{constructor(e){super(!1),!1!==e&&this.__registerHost(),this.update=t(this,"sdUpdate"),this.dropDownShow=t(this,"sdDropDownShow")}get el(){return this}value=null;options=[];placeholder="선택";optionPlaceholder="선택지가 없습니다.";width="200px";dropdownHeight="260px";disabled=!1;clearable=!1;searchable=!1;useCheckbox=!1;useAll=!1;allCheckedLabel="전체";allCheckOptionLabel="전체";label="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;containerStyle={};triggerStyle={};dropdownStyle={};optionStyle={};labelStyle={};optionRenderer;filteredOptions=[];isOpen=!1;searchText=null;itemIndex=-1;isScrolled=!1;isDropdownReady=!1;update;dropDownShow;selectRef;searchRef;triggerRef;optionRef;dropdownRef;formField;dropDownWidth="200px";name=l();async sdOpen(){await new Promise((e=>setTimeout(e,0))),this.isOpen=!0}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}valueChanged(){this.update?.emit(this.value)}optionsChanged(){this.filteredOptions=this.options,this.filterOptions()}searchTextChanged(){this.filterOptions()}async itemIndexChanged(e,t){if(this.searchable){const e=await this.getNativeInputElement();if(-1===this.itemIndex)return void e?.focus({preventScroll:!0});e?.matches(":focus")&&e?.blur()}const s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option-group")||[]),i=this.useAll?this.itemIndex+1:this.itemIndex,o=s?.[i];o&&this.isOpen&&(this.optionRef=o,await this.optionRef.isDisabled()?e>t?this.itemIndex++:this.itemIndex--:this.scrollToOption(o))}async isOpenChanged(){this.onDropdownToggle(this.isOpen),this.dropDownShow?.emit({isOpen:this.isOpen}),this.isDropdownReady=!1,!1!==this.isOpen?requestAnimationFrame((()=>{requestAnimationFrame((async()=>{const e=this.getSelectedOption();if(e&&e.length>0){const t=this.options.indexOf(e[0]),s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option-group")||[]),i=Math.min((this.useAll?t+1:t)+4,s.length-1),o=s?.[i];o&&this.scrollToOption(o)}if(this.isDropdownReady=!0,this.searchable){const e=await this.getNativeInputElement();e&&requestAnimationFrame((()=>{e.focus({preventScroll:!0})}))}}))})):await(this.formField?.sdValidate())}componentWillLoad(){this.filteredOptions=this.options,this.dropDownWidth=this.width,this.initializeEvent()}componentDidRender(){const e=this.triggerRef,t=e?.getBoundingClientRect();this.dropDownWidth=t?.width?t.width+"px":this.width}disconnectedCallback(){this.cleanupEvent()}handleDocumentClick(e){this.selectRef?.contains(e.target)||(this.isOpen=!1)}handleDocumentKeydown(e){if(e.stopPropagation(),["ArrowDown","ArrowUp","Enter","Escape"].includes(e.key))switch(e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":const t=new r(this.searchable,this.filteredOptions).getNextIndex(this.itemIndex,e.key);this.itemIndex=t;break;case"Enter":const s=this.filteredOptions[this.itemIndex];s&&!s.disabled&&this.handleOptionSelection(s);break;case"Escape":this.isOpen=!1}}handleTriggerClick=e=>{e.stopPropagation(),this.disabled||(this.isOpen=!this.isOpen,this.dropDownShow?.emit({isOpen:this.isOpen}))};handleAllOptionClick=e=>{if(e.isSelected){const e=this.filteredOptions.filter((e=>"item"===e.type&&!e.disabled));this.value=this.value?.filter((t=>!e.some((e=>e.value===t.value))))||this.value}else{const e=new Set([...this.value||[],...this.filteredOptions.filter((e=>"item"===e.type&&!e.disabled))]);this.value=Array.from(e)}};handleOptionClick=e=>{const{option:t,event:s}=e;s.stopPropagation(),"group"===t.type&&this.handleGroupOptionClick(e),"subgroup"===t.type&&this.handleSubGroupOptionClick(e),"item"===t.type&&this.handleOptionSelection(t)};handleGroupOptionClick=e=>{const{option:t,isSelected:s}=e;this.filteredOptions.filter((e=>e.parent===t.value&&!e.disabled)).forEach((e=>{this.handleSubGroupOptionClick({option:e,isSelected:s||null===s})}))};handleSubGroupOptionClick=e=>{const{option:t,isSelected:s}=e,i=this.filteredOptions.filter((e=>e.parent===t.value&&!e.disabled));if(s||null===s)this.value=this.value?.filter((e=>!i.some((t=>t.value===e.value))))||null;else{const e=i.filter((e=>!this.value?.some((t=>t.value===e.value))));this.value=[...this.value||[],...e]}};filterOptions(){if(!this.searchText||""===this.searchText.trim())return void(this.filteredOptions=this.options);const e=this.searchText.toLowerCase(),t=new Set;this.options.forEach((s=>{s.label.toLowerCase().includes(e)&&(t.add(s),this.addParentGroups(s,t))})),this.filteredOptions=this.options.filter((e=>t.has(e)))}addParentGroups(e,t){if(!e.parent)return;const s=this.options.find((t=>t.value===e.parent));s&&!t.has(s)&&(t.add(s),this.addParentGroups(s,t))}getSelectedOption(){return this.options.filter((e=>this.value?.includes(e)))}handleDropdownScroll=e=>{this.isScrolled=e.target.scrollTop>0};async getNativeInputElement(){return this.searchRef?this.searchRef.sdGetNativeElement():null}handleOptionSelection=e=>{if(!e||e.disabled)return;const t=this.value?.some((t=>t.value===e.value));this.value=t?this.value?.filter((t=>t.value!==e.value))||null:[...this.value||[],e]};getAllItemsUnderOption(e,t=!1){const s=s=>s.parent===e.value&&(t||!s.disabled);if("subgroup"===e.type)return this.filteredOptions.filter((e=>s(e)&&"item"===e.type));const i=[],o=this.filteredOptions.filter(s);o.filter((e=>"subgroup"===e.type)).forEach((e=>{const s=this.filteredOptions.filter((s=>!(s.parent!==e.value||"item"!==s.type||!t&&s.disabled)));i.push(...s)}));const l=o.filter((e=>"item"===e.type));return i.push(...l),i}isAllChildrenSelected(e){const t=this.getAllItemsUnderOption(e);if(0===t.length)return!1;const s=t.filter((e=>this.value?.some((t=>t.value===e.value))));return s.length===t.length||s.length>0&&null}getChildrenOptions(e){const t=this.getAllItemsUnderOption(e,!0);return{selectedCount:t.filter((e=>this.value?.some((t=>t.value===e.value)))).length,totalCount:t.length}}isAllOptionsSelected(){if(!this.value||0===this.value.length)return!1;const e=this.options.filter((e=>"item"===e.type&&!e.disabled));if(0===e.length)return!1;const t=new Set(this.value.map((e=>e.value)));return e.every((e=>t.has(e.value)))}getTriggerLabel(){const e=this.getSelectedOption();return e?0===e.length?this.placeholder:this.isAllOptionsSelected()?this.allCheckedLabel:e.map((e=>e.label)).join(", "):"선택"}closeDropdown(){this.isOpen=!1}async scrollToOption(e){this.dropdownRef&&e&&requestAnimationFrame((()=>{const t=this.dropdownRef,s=e.offsetTop,i=e.offsetHeight,o=t.scrollTop,l=t.clientHeight,n=t.querySelector(".sd-select-multiple-group__search-container"),r=n?n.offsetHeight:0,p=l-r,h=o+l;s<o+r?t.scrollTo({top:s-r,behavior:"instant"}):s+i>h&&t.scrollTo({top:s+i-p-r,behavior:"instant"})}))}render(){return s("sd-field",{key:"350c7b2df807166a1439a2151f0f168385adac4a",label:this.label,name:this.name,rules:this.rules,error:this.error,disabled:this.disabled,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,style:{"--field-width":this.width||"200px"}},s("div",{key:"cce989263e1c7dcb38216e734aabe6eea643676a",class:{"sd-select-multiple-group":!0,"sd-select-multiple-group--open":this.isOpen,"sd-select-multiple-group--disabled":this.disabled,"sd-select-multiple-group--label":!!this.label},ref:e=>this.selectRef=e},this.renderTrigger(),this.renderDropdown()))}renderTrigger(){const e=this.getSelectedOption();return s("div",{class:"sd-select-multiple-group__trigger",tabindex:this.disabled?-1:0,onClick:this.handleTriggerClick,style:this.triggerStyle},s("span",{class:"sd-select-multiple-group__value"},this.getTriggerLabel()),this.clearable&&e?.length>0&&!this.disabled&&s("sd-icon",{key:"close-icon",name:"close",size:10,color:"#888",class:"sd-select-multiple-group__clear",onClick:async e=>{e.stopPropagation(),this.value=null,await(this.formField?.sdValidate())}}),s("sd-icon",{key:"arrow-icon",name:"arrowDown",color:"#888",class:{"sd-select-multiple-group__arrow":!0,"sd-select-multiple-group__arrow--open":this.isOpen}}))}renderDropdown(){return!1===this.isOpen?null:s("sd-portal",{open:this.isOpen,parentRef:this.selectRef,onSdClose:this.closeDropdown},s("div",{style:{width:"0",height:"0",overflow:"visible"}},s("div",{class:{"sd-select-multiple-group__dropdown":!0,"sd-select-multiple-group__dropdown--ready":this.isDropdownReady},style:{"--select-width":this.dropDownWidth||"200px","--select-dropdown-height":this.dropdownHeight||"260px",...this.dropdownStyle},onScroll:this.handleDropdownScroll,ref:e=>this.dropdownRef=e},this.searchable&&s("sd-select-search-input",{ref:e=>this.searchRef=e,isScrolled:this.isScrolled,searchText:this.searchText,onSdSearchInput:e=>this.searchText=e.detail||"",onSdSearchFocus:()=>this.itemIndex=-1}),this.filteredOptions.length>0?s(i,null,this.useAll&&s("sd-select-option-group",{option:{label:this.allCheckOptionLabel,value:"",type:"all"},index:0,isSelected:this.isAllOptionsSelected(),isFocused:0===this.itemIndex,optionStyle:this.optionStyle,onOptionClick:({detail:e})=>this.handleAllOptionClick(e),useCheckbox:this.useCheckbox,useIndicator:!1}),this.filteredOptions.map(((e,t)=>s("slot",{name:"option-"+e.value},s("sd-select-option-group",{option:e,index:t,isSelected:"item"===e.type?this.value?.some((t=>t.value===e.value)):this.isAllChildrenSelected(e),isFocused:t===this.itemIndex,optionStyle:this.optionStyle,onOptionClick:({detail:t})=>{("item"===e.type||this.useCheckbox)&&this.handleOptionClick(t)},useCheckbox:this.useCheckbox,..."item"!==e.type&&{countInfo:this.getChildrenOptions(e)}}))))):s("slot",{name:"option-placeholder"},s("div",{class:"sd-select-multiple-group__option-placeholder",style:this.optionStyle},this.optionPlaceholder)))))}static get watchers(){return{value:[{valueChanged:0}],options:[{optionsChanged:0}],searchText:[{searchTextChanged:0}],itemIndex:[{itemIndexChanged:0}],isOpen:[{isOpenChanged:0}]}}static get style(){return".sd-select-multiple-group__dropdown .sd-select-multiple-group__option-placeholder{height:48px;display:flex;align-items:center;padding:8px 16px;font-size:12px;line-height:0;text-align:left;color:#888888}sd-select-multiple-group{display:inline-flex;flex-flow:column nowrap;width:fit-content;height:fit-content}sd-select-multiple-group:focus,sd-select-multiple-group:focus-visible,sd-select-multiple-group:focus-within{outline:none !important}sd-select-multiple-group .sd-select-multiple-group{width:100%}sd-select-multiple-group .sd-select-multiple-group .sd-select-multiple-group__trigger{padding:4px 20px 4px 12px;display:flex;width:100%;align-items:center}sd-select-multiple-group .sd-select-multiple-group .sd-select-multiple-group__trigger .sd-select-multiple-group__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400}sd-select-multiple-group .sd-select-multiple-group .sd-select-multiple-group__trigger .sd-select-multiple-group__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}sd-select-multiple-group .sd-select-multiple-group .sd-select-multiple-group__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease}sd-select-multiple-group .sd-select-multiple-group .sd-select-multiple-group__arrow--open{transform:rotate(180deg)}.sd-select-multiple-group__dropdown{overflow:auto;width:var(--select-width, 200px);max-height:var(--select-dropdown-height, 260px);padding-bottom:2px;background-color:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);border-radius:4px;overflow-y:auto;color:#333333;opacity:0.5;transition:opacity 0.15s ease-in}.sd-select-multiple-group__dropdown--ready{opacity:1}"}},[772,"sd-select-multiple-group",{value:[1040],options:[1040],placeholder:[1],optionPlaceholder:[1,"option-placeholder"],width:[1],dropdownHeight:[1,"dropdown-height"],disabled:[4],clearable:[4],searchable:[4],useCheckbox:[4,"use-checkbox"],useAll:[4,"use-all"],allCheckedLabel:[1,"all-checked-label"],allCheckOptionLabel:[1,"all-check-option-label"],label:[1],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],rules:[16],error:[4],containerStyle:[16],triggerStyle:[16],dropdownStyle:[16],optionStyle:[16],labelStyle:[16],optionRenderer:[16],filteredOptions:[32],isOpen:[32],searchText:[32],itemIndex:[32],isScrolled:[32],isDropdownReady:[32],sdOpen:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{value:[{valueChanged:0}],options:[{optionsChanged:0}],searchText:[{searchTextChanged:0}],itemIndex:[{itemIndexChanged:0}],isOpen:[{isOpenChanged:0}]}]),x=b,y=function(){"undefined"!=typeof customElements&&["sd-select-multiple-group","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-icon","sd-input","sd-portal","sd-select-option-group","sd-select-search-input","sd-tooltip"].forEach((e=>{switch(e){case"sd-select-multiple-group":customElements.get(o(e))||customElements.define(o(e),b);break;case"sd-button":customElements.get(o(e))||p();break;case"sd-checkbox":customElements.get(o(e))||h();break;case"sd-field":customElements.get(o(e))||a();break;case"sd-floating-portal":customElements.get(o(e))||d();break;case"sd-icon":customElements.get(o(e))||c();break;case"sd-input":customElements.get(o(e))||u();break;case"sd-portal":customElements.get(o(e))||m();break;case"sd-select-option-group":customElements.get(o(e))||g();break;case"sd-select-search-input":customElements.get(o(e))||f();break;case"sd-tooltip":customElements.get(o(e))||w()}}))};export{x as SdSelectMultipleGroup,y as defineCustomElement}
1
+ import{p as t,c as e,h as s,F as i,t as o}from"./p-D-pFdq6g.js";import{n as l}from"./p-CCwNgVmC.js";import{B as n}from"./p-lKwhftf9.js";import{S as r}from"./p-Cy6HMEsK.js";import{d as p}from"./p-CDR-4auv.js";import{d as h}from"./p-DXAB0k9r.js";import{d as a}from"./p-hWm-Llzv.js";import{d}from"./p-tR70yRjm.js";import{d as c}from"./p-B3CfLqLu.js";import{d as u}from"./p-DSYw-7RA.js";import{d as m}from"./p-Dx7R5s53.js";import{d as g}from"./p-DB_gU4hh.js";import{d as f}from"./p-mnDAufNv.js";import{d as w}from"./p-eOGZo-WB.js";import{d as b}from"./p-CpGiSLY_.js";const x=t(class extends n{constructor(t){super(!1),!1!==t&&this.__registerHost(),this.update=e(this,"sdUpdate",7),this.dropDownShow=e(this,"sdDropDownShow",7)}get el(){return this}value=null;options=[];placeholder="선택";optionPlaceholder="선택지가 없습니다.";width="200px";dropdownHeight="260px";disabled=!1;clearable=!1;searchable=!1;useCheckbox=!1;useAll=!1;allCheckedLabel="전체";allCheckOptionLabel="전체";label="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;containerStyle={};triggerStyle={};dropdownStyle={};optionStyle={};labelStyle={};optionRenderer;filteredOptions=[];isOpen=!1;searchText=null;itemIndex=-1;isScrolled=!1;isDropdownReady=!1;update;dropDownShow;selectRef;searchRef;triggerRef;optionRef;dropdownRef;formField;dropDownWidth="200px";name=l();async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.isOpen=!0}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}valueChanged(){this.update?.emit(this.value)}optionsChanged(){this.filteredOptions=this.options,this.filterOptions()}searchTextChanged(){this.filterOptions()}async itemIndexChanged(t,e){if(this.searchable){const t=await this.getNativeInputElement();if(-1===this.itemIndex)return void t?.focus({preventScroll:!0});t?.matches(":focus")&&t?.blur()}const s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option-group")||[]),i=this.useAll?this.itemIndex+1:this.itemIndex,o=s?.[i];o&&this.isOpen&&(this.optionRef=o,await this.optionRef.isDisabled()?t>e?this.itemIndex++:this.itemIndex--:this.scrollToOption(o))}async isOpenChanged(){this.onDropdownToggle(this.isOpen),this.dropDownShow?.emit({isOpen:this.isOpen}),this.isDropdownReady=!1,!1!==this.isOpen?requestAnimationFrame((()=>{requestAnimationFrame((async()=>{const t=this.getSelectedOption();if(t&&t.length>0){const e=this.options.indexOf(t[0]),s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option-group")||[]),i=Math.min((this.useAll?e+1:e)+4,s.length-1),o=s?.[i];o&&this.scrollToOption(o)}if(this.isDropdownReady=!0,this.searchable){const t=await this.getNativeInputElement();t&&requestAnimationFrame((()=>{t.focus({preventScroll:!0})}))}}))})):await(this.formField?.sdValidate())}componentWillLoad(){this.filteredOptions=this.options,this.dropDownWidth=this.width,this.initializeEvent()}componentDidRender(){const t=this.triggerRef,e=t?.getBoundingClientRect();this.dropDownWidth=e?.width?e.width+"px":this.width}disconnectedCallback(){this.cleanupEvent()}handleDocumentClick(t){this.selectRef?.contains(t.target)||(this.isOpen=!1)}handleDocumentKeydown(t){if(t.stopPropagation(),["ArrowDown","ArrowUp","Enter","Escape"].includes(t.key))switch(t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":const e=new r(this.searchable,this.filteredOptions).getNextIndex(this.itemIndex,t.key);this.itemIndex=e;break;case"Enter":const s=this.filteredOptions[this.itemIndex];s&&!s.disabled&&this.handleOptionSelection(s);break;case"Escape":this.isOpen=!1}}handleTriggerClick=t=>{t.stopPropagation(),this.disabled||(this.isOpen=!this.isOpen,this.dropDownShow?.emit({isOpen:this.isOpen}))};handleAllOptionClick=t=>{if(t.isSelected){const t=this.filteredOptions.filter((t=>"item"===t.type&&!t.disabled));this.value=this.value?.filter((e=>!t.some((t=>t.value===e.value))))||this.value}else{const t=new Set([...this.value||[],...this.filteredOptions.filter((t=>"item"===t.type&&!t.disabled))]);this.value=Array.from(t)}};handleOptionClick=t=>{const{option:e,event:s}=t;s.stopPropagation(),"group"===e.type&&this.handleGroupOptionClick(t),"subgroup"===e.type&&this.handleSubGroupOptionClick(t),"item"===e.type&&this.handleOptionSelection(e)};handleGroupOptionClick=t=>{const{option:e,isSelected:s}=t;this.filteredOptions.filter((t=>t.parent===e.value&&!t.disabled)).forEach((t=>{this.handleSubGroupOptionClick({option:t,isSelected:s||null===s})}))};handleSubGroupOptionClick=t=>{const{option:e,isSelected:s}=t,i=this.filteredOptions.filter((t=>t.parent===e.value&&!t.disabled));if(s||null===s)this.value=this.value?.filter((t=>!i.some((e=>e.value===t.value))))||null;else{const t=i.filter((t=>!this.value?.some((e=>e.value===t.value))));this.value=[...this.value||[],...t]}};filterOptions(){if(!this.searchText||""===this.searchText.trim())return void(this.filteredOptions=this.options);const t=this.searchText.toLowerCase(),e=new Set;this.options.forEach((s=>{s.label.toLowerCase().includes(t)&&(e.add(s),this.addParentGroups(s,e))})),this.filteredOptions=this.options.filter((t=>e.has(t)))}addParentGroups(t,e){if(!t.parent)return;const s=this.options.find((e=>e.value===t.parent));s&&!e.has(s)&&(e.add(s),this.addParentGroups(s,e))}getSelectedOption(){return this.options.filter((t=>this.value?.includes(t)))}handleDropdownScroll=t=>{this.isScrolled=t.target.scrollTop>0};async getNativeInputElement(){return this.searchRef?this.searchRef.sdGetNativeElement():null}handleOptionSelection=t=>{if(!t||t.disabled)return;const e=this.value?.some((e=>e.value===t.value));this.value=e?this.value?.filter((e=>e.value!==t.value))||null:[...this.value||[],t]};getAllItemsUnderOption(t,e=!1){const s=s=>s.parent===t.value&&(e||!s.disabled);if("subgroup"===t.type)return this.filteredOptions.filter((t=>s(t)&&"item"===t.type));const i=[],o=this.filteredOptions.filter(s);o.filter((t=>"subgroup"===t.type)).forEach((t=>{const s=this.filteredOptions.filter((s=>!(s.parent!==t.value||"item"!==s.type||!e&&s.disabled)));i.push(...s)}));const l=o.filter((t=>"item"===t.type));return i.push(...l),i}isAllChildrenSelected(t){const e=this.getAllItemsUnderOption(t);if(0===e.length)return!1;const s=e.filter((t=>this.value?.some((e=>e.value===t.value))));return s.length===e.length||s.length>0&&null}getChildrenOptions(t){const e=this.getAllItemsUnderOption(t,!0);return{selectedCount:e.filter((t=>this.value?.some((e=>e.value===t.value)))).length,totalCount:e.length}}isAllOptionsSelected(){if(!this.value||0===this.value.length)return!1;const t=this.options.filter((t=>"item"===t.type&&!t.disabled));if(0===t.length)return!1;const e=new Set(this.value.map((t=>t.value)));return t.every((t=>e.has(t.value)))}getTriggerLabel(){const t=this.getSelectedOption();return t?0===t.length?this.placeholder:this.isAllOptionsSelected()?this.allCheckedLabel:t.map((t=>t.label)).join(", "):"선택"}closeDropdown(){this.isOpen=!1}async scrollToOption(t){this.dropdownRef&&t&&requestAnimationFrame((()=>{const e=this.dropdownRef,s=t.offsetTop,i=t.offsetHeight,o=e.scrollTop,l=e.clientHeight,n=e.querySelector(".sd-select-multiple-group__search-container"),r=n?n.offsetHeight:0,p=l-r,h=o+l;s<o+r?e.scrollTo({top:s-r,behavior:"instant"}):s+i>h&&e.scrollTo({top:s+i-p-r,behavior:"instant"})}))}render(){return s("sd-field",{key:"350c7b2df807166a1439a2151f0f168385adac4a",label:this.label,name:this.name,rules:this.rules,error:this.error,disabled:this.disabled,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:t=>this.formField=t,style:{"--field-width":this.width||"200px"}},s("div",{key:"cce989263e1c7dcb38216e734aabe6eea643676a",class:{"sd-select-multiple-group":!0,"sd-select-multiple-group--open":this.isOpen,"sd-select-multiple-group--disabled":this.disabled,"sd-select-multiple-group--label":!!this.label},ref:t=>this.selectRef=t},this.renderTrigger(),this.renderDropdown()))}renderTrigger(){const t=this.getSelectedOption();return s("div",{class:"sd-select-multiple-group__trigger",tabindex:this.disabled?-1:0,onClick:this.handleTriggerClick,style:this.triggerStyle},s("span",{class:"sd-select-multiple-group__value"},this.getTriggerLabel()),this.clearable&&t?.length>0&&!this.disabled&&s("sd-icon",{key:"close-icon",name:"close",size:10,color:"#888",class:"sd-select-multiple-group__clear",onClick:async t=>{t.stopPropagation(),this.value=null,await(this.formField?.sdValidate())}}),s("sd-icon",{key:"arrow-icon",name:"arrowDown",color:"#888",class:{"sd-select-multiple-group__arrow":!0,"sd-select-multiple-group__arrow--open":this.isOpen}}))}renderDropdown(){return!1===this.isOpen?null:s("sd-portal",{open:this.isOpen,parentRef:this.selectRef,onSdClose:this.closeDropdown},s("div",{style:{width:"0",height:"0",overflow:"visible"}},s("div",{class:{"sd-select-multiple-group__dropdown":!0,"sd-select-multiple-group__dropdown--ready":this.isDropdownReady},style:{"--select-width":this.dropDownWidth||"200px","--select-dropdown-height":this.dropdownHeight||"260px",...this.dropdownStyle},onScroll:this.handleDropdownScroll,ref:t=>this.dropdownRef=t},this.searchable&&s("sd-select-search-input",{ref:t=>this.searchRef=t,isScrolled:this.isScrolled,searchText:this.searchText,onSdSearchInput:t=>this.searchText=t.detail||"",onSdSearchFocus:()=>this.itemIndex=-1}),this.filteredOptions.length>0?s(i,null,this.useAll&&s("sd-select-option-group",{option:{label:this.allCheckOptionLabel,value:"",type:"all"},index:0,isSelected:this.isAllOptionsSelected(),isFocused:0===this.itemIndex,optionStyle:this.optionStyle,onOptionClick:({detail:t})=>this.handleAllOptionClick(t),useCheckbox:this.useCheckbox,useIndicator:!1}),this.filteredOptions.map(((t,e)=>s("slot",{name:"option-"+t.value},s("sd-select-option-group",{option:t,index:e,isSelected:"item"===t.type?this.value?.some((e=>e.value===t.value)):this.isAllChildrenSelected(t),isFocused:e===this.itemIndex,optionStyle:this.optionStyle,onOptionClick:({detail:e})=>{("item"===t.type||this.useCheckbox)&&this.handleOptionClick(e)},useCheckbox:this.useCheckbox,..."item"!==t.type&&{countInfo:this.getChildrenOptions(t)}}))))):s("slot",{name:"option-placeholder"},s("div",{class:"sd-select-multiple-group__option-placeholder",style:this.optionStyle},this.optionPlaceholder)))))}static get watchers(){return{value:[{valueChanged:0}],options:[{optionsChanged:0}],searchText:[{searchTextChanged:0}],itemIndex:[{itemIndexChanged:0}],isOpen:[{isOpenChanged:0}]}}static get style(){return".sd-select-multiple-group__dropdown .sd-select-multiple-group__option-placeholder{height:48px;display:flex;align-items:center;padding:8px 16px;font-size:12px;line-height:0;text-align:left;color:#888888}sd-select-multiple-group{display:inline-flex;flex-flow:column nowrap;width:fit-content;height:fit-content}sd-select-multiple-group:focus,sd-select-multiple-group:focus-visible,sd-select-multiple-group:focus-within{outline:none !important}sd-select-multiple-group .sd-select-multiple-group{width:100%}sd-select-multiple-group .sd-select-multiple-group .sd-select-multiple-group__trigger{padding:4px 20px 4px 12px;display:flex;width:100%;align-items:center}sd-select-multiple-group .sd-select-multiple-group .sd-select-multiple-group__trigger .sd-select-multiple-group__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400}sd-select-multiple-group .sd-select-multiple-group .sd-select-multiple-group__trigger .sd-select-multiple-group__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}sd-select-multiple-group .sd-select-multiple-group .sd-select-multiple-group__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease}sd-select-multiple-group .sd-select-multiple-group .sd-select-multiple-group__arrow--open{transform:rotate(180deg)}.sd-select-multiple-group__dropdown{overflow:auto;width:var(--select-width, 200px);max-height:var(--select-dropdown-height, 260px);padding-bottom:2px;background-color:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);border-radius:4px;overflow-y:auto;color:#333333;opacity:0.5;transition:opacity 0.15s ease-in}.sd-select-multiple-group__dropdown--ready{opacity:1}"}},[772,"sd-select-multiple-group",{value:[1040],options:[1040],placeholder:[1],optionPlaceholder:[1,"option-placeholder"],width:[1],dropdownHeight:[1,"dropdown-height"],disabled:[4],clearable:[4],searchable:[4],useCheckbox:[4,"use-checkbox"],useAll:[4,"use-all"],allCheckedLabel:[1,"all-checked-label"],allCheckOptionLabel:[1,"all-check-option-label"],label:[1],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],rules:[16],error:[4],containerStyle:[16],triggerStyle:[16],dropdownStyle:[16],optionStyle:[16],labelStyle:[16],optionRenderer:[16],filteredOptions:[32],isOpen:[32],searchText:[32],itemIndex:[32],isScrolled:[32],isDropdownReady:[32],sdOpen:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{value:[{valueChanged:0}],options:[{optionsChanged:0}],searchText:[{searchTextChanged:0}],itemIndex:[{itemIndexChanged:0}],isOpen:[{isOpenChanged:0}]}]),y=x,C=function(){"undefined"!=typeof customElements&&["sd-select-multiple-group","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-input","sd-portal","sd-select-option-group","sd-select-search-input","sd-tooltip"].forEach((t=>{switch(t){case"sd-select-multiple-group":customElements.get(o(t))||customElements.define(o(t),x);break;case"sd-button":customElements.get(o(t))||p();break;case"sd-checkbox":customElements.get(o(t))||h();break;case"sd-field":customElements.get(o(t))||a();break;case"sd-floating-portal":customElements.get(o(t))||d();break;case"sd-ghost-button":customElements.get(o(t))||c();break;case"sd-icon":customElements.get(o(t))||u();break;case"sd-input":customElements.get(o(t))||m();break;case"sd-portal":customElements.get(o(t))||g();break;case"sd-select-option-group":customElements.get(o(t))||f();break;case"sd-select-search-input":customElements.get(o(t))||w();break;case"sd-tooltip":customElements.get(o(t))||b()}}))};export{y as SdSelectMultipleGroup,C as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,c as s,h as t,t as i}from"./p-B1vJXa29.js";import{S as l}from"./p-Cy6HMEsK.js";import{B as o}from"./p-BNuWMSR_.js";import{n as r}from"./p-CCwNgVmC.js";import{d as n}from"./p-DeTDTmN7.js";import{d}from"./p-Dl7yIIDW.js";import{d as a}from"./p-CdoxVzYC.js";import{d as c}from"./p-BYaBx4Ar.js";import{d as p}from"./p-BBYig1zV.js";import{d as h}from"./p-Du3VqeNP.js";import{d as m}from"./p-Chqlvi5E.js";import{d as u}from"./p-C3XBhNH9.js";import{d as f}from"./p-BeZsmobQ.js";import{d as b}from"./p-B09D2cZD.js";import{d as w}from"./p-CUy8ulXZ.js";const g=e(class extends o{constructor(e){super(!1),!1!==e&&this.__registerHost(),this.update=s(this,"sdUpdate"),this.dropDownShow=s(this,"sdDropDownShow")}get el(){return this}value=null;options=[];placeholder="선택";optionPlaceholder="선택지가 없습니다.";width="200px";dropdownHeight="260px";autoFocus=!1;disabled=!1;clearable=!1;searchable=!1;useAll=!1;useCheckbox=!1;label="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;optionRenderer;isOpen=!1;itemIndex=-1;isScrolled=!1;update;dropDownShow;selectRef;triggerRef;formField;filteredOptions=[];dropDownWidth="200px";name=r();async sdOpen(){this.isOpen=!0}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async isOpenChanged(){this.onDropdownToggle(this.isOpen),this.dropDownShow?.emit({isOpen:this.isOpen}),!1===this.isOpen&&await(this.formField?.sdValidate())}componentWillLoad(){this.filteredOptions=this.options,this.dropDownWidth=this.width,this.initializeEvent()}componentDidLoad(){this.autoFocus&&this.selectRef?.focus()}componentDidRender(){const e=this.triggerRef,s=e?.getBoundingClientRect();this.dropDownWidth=s?.width?s.width+"px":this.width}disconnectedCallback(){this.cleanupEvent()}handleDocumentClick(e){this.selectRef?.contains(e.target)||(this.isOpen=!1)}handleDocumentKeydown(e){if(e.stopPropagation(),["ArrowDown","ArrowUp","Enter","Escape"].includes(e.key))switch(e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":const s=new l(this.searchable,this.filteredOptions).getNextIndex(this.itemIndex,e.key);this.itemIndex=s;break;case"Enter":const t=this.filteredOptions[this.itemIndex];t&&!t.disabled&&this.handleOptionSelection(t);break;case"Escape":this.isOpen=!1}}handleOptionSelection=e=>{if(!e||e.disabled)return;const s=this.value?.some((s=>s.value===e.value));this.value=s?this.value?.filter((s=>s.value!==e.value))||null:[...this.value||[],e],this.update?.emit(this.value)};getSelectedOption(){return this.options.filter((e=>this.value?.includes(e)))}closeDropdown(){this.isOpen=!1}handleTriggerClick=e=>{e.stopPropagation(),this.disabled||(this.isOpen=!this.isOpen,this.dropDownShow?.emit({isOpen:this.isOpen}))};handleOptionClick=e=>{const{option:s,event:t}=e;t.stopPropagation(),this.handleOptionSelection(s)};render(){return t("sd-field",{key:"526a52f1fb3a8bd80a55d7094857901d7c933ca5",label:this.label,name:this.name,rules:this.rules,error:this.error,disabled:this.disabled,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e},t("div",{key:"1084a5740aca5ea9d27485807e7edfc276d78ba3",class:{"sd-select-multiple":!0,"sd-select-multiple--open":this.isOpen,"sd-select-multiple--disabled":this.disabled,"sd-select-multiple--error":!!this.error},ref:e=>this.selectRef=e},this.renderTrigger(),this.renderDropdown()))}renderTrigger(){const e=this.getSelectedOption();return t("div",{class:"sd-select-multiple__trigger",tabindex:this.disabled?-1:0,onClick:this.handleTriggerClick,ref:e=>this.triggerRef=e},t("span",{class:"sd-select-multiple__value"},e&&0!==e.length?e.map((e=>e.label)).join(", "):this.placeholder),this.clearable&&e?.length>0&&!this.disabled&&t("sd-icon",{key:"close-icon",name:"close",size:10,color:"#888",class:"sd-select-multiple__clear",onClick:async e=>{e.stopPropagation(),this.value=null,await(this.formField?.sdValidate())}}),t("sd-icon",{key:"arrow-icon",name:"arrowDown",color:"#888",class:{"sd-select-multiple__arrow":!0,"sd-select-multiple__arrow--open":this.isOpen}}))}renderDropdown(){if(!1===this.isOpen)return null;const e=this.selectRef?.querySelector(".sd-select-multiple__trigger")||this.selectRef;return t("sd-portal",{open:this.isOpen,parentRef:e,onSdClose:this.closeDropdown},t("sd-select-dropdown",{value:this.value,options:this.options,itemIndex:this.itemIndex,width:this.dropDownWidth,dropdownHeight:this.dropdownHeight,searchable:this.searchable,optionPlaceholder:this.optionPlaceholder,useCheckbox:this.useCheckbox,useAll:this.useAll,onSdOptionClick:({detail:e})=>this.handleOptionClick(e),onSdOptionFiltered:({detail:e})=>this.filteredOptions=e}))}static get watchers(){return{isOpen:[{isOpenChanged:0}]}}static get style(){return"sd-select-multiple{display:inline-flex;flex-flow:column nowrap;height:fit-content}sd-select-multiple *:focus,sd-select-multiple *:focus-visible,sd-select-multiple *:focus-within{outline:none !important}sd-select-multiple .sd-select-multiple{width:100%}sd-select-multiple .sd-select-multiple .sd-select-multiple__trigger{padding:4px 28px 4px 12px;display:flex;width:100%;align-items:center}sd-select-multiple .sd-select-multiple .sd-select-multiple__trigger .sd-select-multiple__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400;text-align:left}sd-select-multiple .sd-select-multiple .sd-select-multiple__trigger .sd-select-multiple__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}sd-select-multiple .sd-select-multiple__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease;margin-left:8px}sd-select-multiple .sd-select-multiple__arrow--open{transform:rotate(180deg)}"}},[512,"sd-select-multiple",{value:[1040],options:[1040],placeholder:[1],optionPlaceholder:[1,"option-placeholder"],width:[1],dropdownHeight:[1,"dropdown-height"],autoFocus:[4,"auto-focus"],disabled:[4],clearable:[4],searchable:[4],useAll:[4,"use-all"],useCheckbox:[4,"use-checkbox"],label:[1],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],rules:[16],error:[4],optionRenderer:[16],isOpen:[32],itemIndex:[32],isScrolled:[32],sdOpen:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{isOpen:[{isOpenChanged:0}]}]),x=g,k=function(){"undefined"!=typeof customElements&&["sd-select-multiple","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-icon","sd-input","sd-portal","sd-select-dropdown","sd-select-option","sd-select-search-input","sd-tooltip"].forEach((e=>{switch(e){case"sd-select-multiple":customElements.get(i(e))||customElements.define(i(e),g);break;case"sd-button":customElements.get(i(e))||n();break;case"sd-checkbox":customElements.get(i(e))||d();break;case"sd-field":customElements.get(i(e))||a();break;case"sd-floating-portal":customElements.get(i(e))||c();break;case"sd-icon":customElements.get(i(e))||p();break;case"sd-input":customElements.get(i(e))||h();break;case"sd-portal":customElements.get(i(e))||m();break;case"sd-select-dropdown":customElements.get(i(e))||u();break;case"sd-select-option":customElements.get(i(e))||f();break;case"sd-select-search-input":customElements.get(i(e))||b();break;case"sd-tooltip":customElements.get(i(e))||w()}}))};export{x as SdSelectMultiple,k as defineCustomElement}
1
+ import{p as e,c as s,h as t,t as i}from"./p-D-pFdq6g.js";import{S as l}from"./p-Cy6HMEsK.js";import{B as o}from"./p-lKwhftf9.js";import{n as r}from"./p-CCwNgVmC.js";import{d}from"./p-CDR-4auv.js";import{d as n}from"./p-DXAB0k9r.js";import{d as a}from"./p-hWm-Llzv.js";import{d as c}from"./p-tR70yRjm.js";import{d as p}from"./p-B3CfLqLu.js";import{d as h}from"./p-DSYw-7RA.js";import{d as m}from"./p-Dx7R5s53.js";import{d as u}from"./p-DB_gU4hh.js";import{d as b}from"./p-CnUsbdL7.js";import{d as f}from"./p-IRd25v7v.js";import{d as w}from"./p-eOGZo-WB.js";import{d as g}from"./p-CpGiSLY_.js";const x=e(class extends o{constructor(e){super(!1),!1!==e&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.dropDownShow=s(this,"sdDropDownShow",7)}get el(){return this}value=null;options=[];placeholder="선택";optionPlaceholder="선택지가 없습니다.";width="200px";dropdownHeight="260px";autoFocus=!1;disabled=!1;clearable=!1;searchable=!1;useAll=!1;useCheckbox=!1;label="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;optionRenderer;isOpen=!1;itemIndex=-1;isScrolled=!1;update;dropDownShow;selectRef;triggerRef;formField;filteredOptions=[];dropDownWidth="200px";name=r();async sdOpen(){this.isOpen=!0}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async isOpenChanged(){this.onDropdownToggle(this.isOpen),this.dropDownShow?.emit({isOpen:this.isOpen}),!1===this.isOpen&&await(this.formField?.sdValidate())}componentWillLoad(){this.filteredOptions=this.options,this.dropDownWidth=this.width,this.initializeEvent()}componentDidLoad(){this.autoFocus&&this.selectRef?.focus()}componentDidRender(){const e=this.triggerRef,s=e?.getBoundingClientRect();this.dropDownWidth=s?.width?s.width+"px":this.width}disconnectedCallback(){this.cleanupEvent()}handleDocumentClick(e){this.selectRef?.contains(e.target)||(this.isOpen=!1)}handleDocumentKeydown(e){if(e.stopPropagation(),["ArrowDown","ArrowUp","Enter","Escape"].includes(e.key))switch(e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":const s=new l(this.searchable,this.filteredOptions).getNextIndex(this.itemIndex,e.key);this.itemIndex=s;break;case"Enter":const t=this.filteredOptions[this.itemIndex];t&&!t.disabled&&this.handleOptionSelection(t);break;case"Escape":this.isOpen=!1}}handleOptionSelection=e=>{if(!e||e.disabled)return;const s=this.value?.some((s=>s.value===e.value));this.value=s?this.value?.filter((s=>s.value!==e.value))||null:[...this.value||[],e],this.update?.emit(this.value)};getSelectedOption(){return this.options.filter((e=>this.value?.includes(e)))}closeDropdown(){this.isOpen=!1}handleTriggerClick=e=>{e.stopPropagation(),this.disabled||(this.isOpen=!this.isOpen,this.dropDownShow?.emit({isOpen:this.isOpen}))};handleOptionClick=e=>{const{option:s,event:t}=e;t.stopPropagation(),this.handleOptionSelection(s)};render(){return t("sd-field",{key:"c2509aa07a6d69bd24bca0afd708d92db47e8084",label:this.label,name:this.name,rules:this.rules,error:this.error,disabled:this.disabled,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e},t("div",{key:"d0e5ac84ad2aeb947b02b5a2cd4fbb66bf6e9419",class:{"sd-select-multiple":!0,"sd-select-multiple--open":this.isOpen,"sd-select-multiple--disabled":this.disabled,"sd-select-multiple--error":!!this.error},ref:e=>this.selectRef=e},this.renderTrigger(),this.renderDropdown()))}renderTrigger(){const e=this.getSelectedOption();return t("div",{class:"sd-select-multiple__trigger",tabindex:this.disabled?-1:0,onClick:this.handleTriggerClick,ref:e=>this.triggerRef=e},t("span",{class:"sd-select-multiple__value"},e&&0!==e.length?e.map((e=>e.label)).join(", "):this.placeholder),this.clearable&&e?.length>0&&!this.disabled&&t("sd-icon",{key:"close-icon",name:"close",size:10,color:"#888",class:"sd-select-multiple__clear",onClick:async e=>{e.stopPropagation(),this.value=null,await(this.formField?.sdValidate())}}),t("sd-icon",{key:"arrow-icon",name:"arrowDown",color:"#888",class:{"sd-select-multiple__arrow":!0,"sd-select-multiple__arrow--open":this.isOpen}}))}renderDropdown(){if(!1===this.isOpen)return null;const e=this.selectRef?.querySelector(".sd-select-multiple__trigger")||this.selectRef;return t("sd-portal",{open:this.isOpen,parentRef:e,onSdClose:this.closeDropdown},t("sd-select-dropdown",{value:this.value,options:this.options,itemIndex:this.itemIndex,width:this.dropDownWidth,dropdownHeight:this.dropdownHeight,searchable:this.searchable,optionPlaceholder:this.optionPlaceholder,useCheckbox:this.useCheckbox,useAll:this.useAll,onSdOptionClick:({detail:e})=>this.handleOptionClick(e),onSdOptionFiltered:({detail:e})=>this.filteredOptions=e}))}static get watchers(){return{isOpen:[{isOpenChanged:0}]}}static get style(){return"sd-select-multiple{display:inline-flex;flex-flow:column nowrap;height:fit-content}sd-select-multiple *:focus,sd-select-multiple *:focus-visible,sd-select-multiple *:focus-within{outline:none !important}sd-select-multiple .sd-select-multiple{width:100%}sd-select-multiple .sd-select-multiple .sd-select-multiple__trigger{padding:4px 28px 4px 12px;display:flex;width:100%;align-items:center}sd-select-multiple .sd-select-multiple .sd-select-multiple__trigger .sd-select-multiple__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400;text-align:left}sd-select-multiple .sd-select-multiple .sd-select-multiple__trigger .sd-select-multiple__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}sd-select-multiple .sd-select-multiple__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease;margin-left:8px}sd-select-multiple .sd-select-multiple__arrow--open{transform:rotate(180deg)}"}},[512,"sd-select-multiple",{value:[1040],options:[1040],placeholder:[1],optionPlaceholder:[1,"option-placeholder"],width:[1],dropdownHeight:[1,"dropdown-height"],autoFocus:[4,"auto-focus"],disabled:[4],clearable:[4],searchable:[4],useAll:[4,"use-all"],useCheckbox:[4,"use-checkbox"],label:[1],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],rules:[16],error:[4],optionRenderer:[16],isOpen:[32],itemIndex:[32],isScrolled:[32],sdOpen:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{isOpen:[{isOpenChanged:0}]}]),k=x,_=function(){"undefined"!=typeof customElements&&["sd-select-multiple","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-input","sd-portal","sd-select-dropdown","sd-select-option","sd-select-search-input","sd-tooltip"].forEach((e=>{switch(e){case"sd-select-multiple":customElements.get(i(e))||customElements.define(i(e),x);break;case"sd-button":customElements.get(i(e))||d();break;case"sd-checkbox":customElements.get(i(e))||n();break;case"sd-field":customElements.get(i(e))||a();break;case"sd-floating-portal":customElements.get(i(e))||c();break;case"sd-ghost-button":customElements.get(i(e))||p();break;case"sd-icon":customElements.get(i(e))||h();break;case"sd-input":customElements.get(i(e))||m();break;case"sd-portal":customElements.get(i(e))||u();break;case"sd-select-dropdown":customElements.get(i(e))||b();break;case"sd-select-option":customElements.get(i(e))||f();break;case"sd-select-search-input":customElements.get(i(e))||w();break;case"sd-tooltip":customElements.get(i(e))||g()}}))};export{k as SdSelectMultiple,_ as defineCustomElement}
@@ -1 +1 @@
1
- import{S as o,d as s}from"./p-DJScHgLW.js";const p=o,r=s;export{p as SdSelectOptionGroup,r as defineCustomElement}
1
+ import{S as o,d as s}from"./p-mnDAufNv.js";const m=o,p=s;export{m as SdSelectOptionGroup,p as defineCustomElement}
@@ -1 +1 @@
1
- import{S as o,d as s}from"./p-BeZsmobQ.js";const m=o,p=s;export{m as SdSelectOption,p as defineCustomElement}
1
+ import{S as o,d as s}from"./p-IRd25v7v.js";const p=o,r=s;export{p as SdSelectOption,r as defineCustomElement}
@@ -1 +1 @@
1
- import{S as o,d as s}from"./p-B09D2cZD.js";const p=o,r=s;export{p as SdSelectSearchInput,r as defineCustomElement}
1
+ import{S as o,d as s}from"./p-eOGZo-WB.js";const p=o,r=s;export{p as SdSelectSearchInput,r as defineCustomElement}
@@ -1 +1 @@
1
- import{S as s,d as o}from"./p-uWsY9w9i.js";const p=s,r=o;export{p as SdSelectV2ListItemSearch,r as defineCustomElement}
1
+ import{S as o,d as s}from"./p-5aLT6ILZ.js";const a=o,p=s;export{a as SdSelectV2ListItemSearch,p as defineCustomElement}
@@ -1 +1 @@
1
- import{S as o,d as p}from"./p-ZoQO0p2E.js";const s=o,r=p;export{s as SdSelectV2ListItem,r as defineCustomElement}
1
+ import{S as o,d as p}from"./p-B9t9pwo_.js";const s=o,t=p;export{s as SdSelectV2ListItem,t as defineCustomElement}
@@ -1 +1 @@
1
- import{S as o,d as s}from"./p-DhKZT8lW.js";const p=o,r=s;export{p as SdSelectV2Listbox,r as defineCustomElement}
1
+ import{S as o,d as s}from"./p-iZSyoiHU.js";const i=o,p=s;export{i as SdSelectV2Listbox,p as defineCustomElement}
@@ -1 +1 @@
1
- import{S as o,d as s}from"./p-DqwiOEb3.js";const p=o,r=s;export{p as SdSelectV2Trigger,r as defineCustomElement}
1
+ import{S as o,d as p}from"./p-BZwAZpfW.js";const s=o,r=p;export{s as SdSelectV2Trigger,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,c as s,h as i,t as o}from"./p-B1vJXa29.js";import{n as r}from"./p-CCwNgVmC.js";import{d as a}from"./p-DeTDTmN7.js";import{d as l}from"./p-Dl7yIIDW.js";import{d as h}from"./p-CdoxVzYC.js";import{d}from"./p-BYaBx4Ar.js";import{d as n}from"./p-BBYig1zV.js";import{d as c}from"./p-Chqlvi5E.js";import{d as p}from"./p-ZoQO0p2E.js";import{d as m}from"./p-uWsY9w9i.js";import{d as u}from"./p-DhKZT8lW.js";import{d as f}from"./p-DqwiOEb3.js";import{d as b}from"./p-CUy8ulXZ.js";const g=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate"),this.dropDownShow=s(this,"sdDropDownShow")}static VIEWPORT_PADDING=20;static PORTAL_OFFSET_Y=4;static CLOSE_ANIMATION_DURATION=150;get el(){return this}name="default";value=null;options=[];placeholder="선택";maxDropdownWidth="640px";dropdownHeight="260px";disabled=!1;label="";addonLabel="";error=!1;hint="";errorMessage="";fieldName="";rules=[];icon=void 0;labelTooltip="";labelTooltipProps=null;emitValue=!1;width="";isOpen=!1;isAnimatingOut=!1;triggerWidth="200px";resolvedDropdownHeight="260px";resolvedMaxDropdownWidth="640px";focused=!1;hovered=!1;update;dropDownShow;triggerRef;closeAnimationTimer;internalName=r();watchIsOpen(t){this.focused=t,this.dropDownShow.emit({isOpen:t})}get isMulti(){return"multi"===this.name||"multi_depth"===this.name}get displayText(){if(this.isMulti){if(!this.value||!Array.isArray(this.value))return"";if(this.emitValue){const t=this.flattenOptions(this.options);return this.value.map((e=>t.find((t=>t.value===e))?.label??"")).filter(Boolean).join(", ")}const t=this.value;return 0===t.length?"":t.map((t=>t.label)).join(", ")}if(null==this.value)return"";if(!this.emitValue&&"object"==typeof this.value&&!Array.isArray(this.value))return this.value.label??"";const t=this.flattenOptions(this.options).find((t=>t.value===this.value));return t?.label??""}flattenOptions(t){return t.flatMap((t=>t.children?this.flattenOptions(t.children):[t]))}getSelectedOptions(){const t=this.value;return t&&Array.isArray(t)?this.emitValue?t.map((t=>this.findOriginalOption(t,this.options))).filter((t=>!!t)):t:[]}toMultiValue(t){return this.emitValue?t.map((t=>t.value)):t}parsePixelValue(t,e){const s=Number.parseFloat(t);return Number.isFinite(s)?s:e}updateDropdownViewportConstraints(){if(!this.triggerRef)return;const e=this.triggerRef.getBoundingClientRect(),s=t.VIEWPORT_PADDING,i=t.PORTAL_OFFSET_Y,o=this.parsePixelValue(this.dropdownHeight,260),r=this.parsePixelValue(this.maxDropdownWidth,640),a=Math.max(window.innerHeight-e.bottom-s-i,0),l=Math.max(a,Math.max(e.top-s-i,0)),h=Math.max(window.innerWidth-2*s,0);this.resolvedDropdownHeight=Math.min(o,l)+"px",this.resolvedMaxDropdownWidth=Math.min(r,h)+"px"}handleViewportResize=()=>{this.isOpen&&this.updateDropdownViewportConstraints()};findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),t.CLOSE_ANIMATION_DURATION))}handleTriggerClick=()=>{this.triggerRef&&(this.triggerWidth=this.triggerRef.offsetWidth+"px"),this.updateDropdownViewportConstraints(),this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)};emitUpdate(t){this.update.emit(t)}handleOptionSelect=t=>{const{option:e,leaves:s}=t;if(this.isMulti)this.handleMultiSelect(e,s);else{this.closeDropdown(),this.value=this.emitValue?e.value:e;const t=this.value;requestAnimationFrame((()=>{this.emitUpdate(t)}))}};handleMultiSelect(t,e){const s=this.getSelectedOptions();let i;if(t.children)if(e.every((t=>s.some((e=>e.value===t.value))))){const t=new Set(e.map((t=>t.value)));i=s.filter((e=>!t.has(e.value)))}else{const t=new Set(s.map((t=>t.value))),o=e.filter((e=>!t.has(e.value)));i=[...s,...o]}else i=s.some((e=>e.value===t.value))?s.filter((e=>e.value!==t.value)):[...s,t];this.value=this.toMultiValue(i),this.emitUpdate(this.value)}connectedCallback(){window.addEventListener("resize",this.handleViewportResize)}disconnectedCallback(){window.removeEventListener("resize",this.handleViewportResize),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e={open:this.isOpen,parentRef:this.triggerRef,viewportPadding:t.VIEWPORT_PADDING,onSdClose:()=>{this.closeDropdown()}};return i("sd-field",{key:"94a50bd86ecb1fdaab2e5edd816f123f985bb5e1",name:this.fieldName||this.internalName,label:this.label,addonLabel:this.addonLabel,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:()=>{this.hovered=!0},onMouseLeave:()=>{this.hovered=!1}},i("div",{key:"6986034ffd38602b111724ea998199d88bbed270",class:"sd-select-v2",ref:t=>{this.triggerRef=t}},i("sd-select-v2-trigger",{key:"3af08facaebc0ec5b99ced0bb93cf8daea3367cb",displayText:this.displayText,placeholder:this.placeholder,disabled:this.disabled,isOpen:this.isOpen,onSdTriggerClick:this.handleTriggerClick})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"6fa4284cdd6d69d02a93e2e18423a7029122e58f",...e},i("sd-select-v2-listbox",{key:"323f811ace6ee59c1d7b15ae7fa497a49b1d2f17",name:this.name,options:this.options,value:this.value,emitValue:this.emitValue,triggerWidth:this.triggerWidth,maxWidth:this.resolvedMaxDropdownWidth,maxHeight:this.resolvedDropdownHeight,onSdOptionSelect:t=>this.handleOptionSelect(t.detail)})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-select-v2{display:inline-flex}sd-select-v2 sd-portal{display:none}sd-select-v2 .sd-select-v2{position:relative;width:100%;height:100%}"}},[512,"sd-select-v2",{name:[1],value:[1032],options:[16],placeholder:[1],maxDropdownWidth:[1,"max-dropdown-width"],dropdownHeight:[1,"dropdown-height"],disabled:[4],label:[1],addonLabel:[1,"addon-label"],error:[1028],hint:[1],errorMessage:[1,"error-message"],fieldName:[1,"field-name"],rules:[16],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],emitValue:[4,"emit-value"],width:[8],isOpen:[32],isAnimatingOut:[32],triggerWidth:[32],resolvedDropdownHeight:[32],resolvedMaxDropdownWidth:[32],focused:[32],hovered:[32]},void 0,{isOpen:[{watchIsOpen:0}]}]),w=g,v=function(){"undefined"!=typeof customElements&&["sd-select-v2","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-icon","sd-portal","sd-select-v2-list-item","sd-select-v2-list-item-search","sd-select-v2-listbox","sd-select-v2-trigger","sd-tooltip"].forEach((t=>{switch(t){case"sd-select-v2":customElements.get(o(t))||customElements.define(o(t),g);break;case"sd-button":customElements.get(o(t))||a();break;case"sd-checkbox":customElements.get(o(t))||l();break;case"sd-field":customElements.get(o(t))||h();break;case"sd-floating-portal":customElements.get(o(t))||d();break;case"sd-icon":customElements.get(o(t))||n();break;case"sd-portal":customElements.get(o(t))||c();break;case"sd-select-v2-list-item":customElements.get(o(t))||p();break;case"sd-select-v2-list-item-search":customElements.get(o(t))||m();break;case"sd-select-v2-listbox":customElements.get(o(t))||u();break;case"sd-select-v2-trigger":customElements.get(o(t))||f();break;case"sd-tooltip":customElements.get(o(t))||b()}}))};export{w as SdSelectV2,v as defineCustomElement}
1
+ import{p as t,H as e,c as s,h as i,t as o}from"./p-D-pFdq6g.js";import{n as r}from"./p-CCwNgVmC.js";import{d as a}from"./p-CDR-4auv.js";import{d as h}from"./p-DXAB0k9r.js";import{d as l}from"./p-hWm-Llzv.js";import{d}from"./p-tR70yRjm.js";import{d as n}from"./p-DSYw-7RA.js";import{d as c}from"./p-DB_gU4hh.js";import{d as p}from"./p-B9t9pwo_.js";import{d as m}from"./p-5aLT6ILZ.js";import{d as u}from"./p-iZSyoiHU.js";import{d as f}from"./p-BZwAZpfW.js";import{d as b}from"./p-CpGiSLY_.js";const g=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.dropDownShow=s(this,"sdDropDownShow",7)}static VIEWPORT_PADDING=20;static PORTAL_OFFSET_Y=4;static CLOSE_ANIMATION_DURATION=150;get el(){return this}name="default";value=null;options=[];placeholder="선택";maxDropdownWidth="640px";dropdownHeight="260px";disabled=!1;label="";addonLabel="";error=!1;hint="";errorMessage="";fieldName="";rules=[];icon=void 0;labelTooltip="";labelTooltipProps=null;emitValue=!1;width="";isOpen=!1;isAnimatingOut=!1;triggerWidth="200px";resolvedDropdownHeight="260px";resolvedMaxDropdownWidth="640px";focused=!1;hovered=!1;update;dropDownShow;triggerRef;closeAnimationTimer;internalName=r();watchIsOpen(t){this.focused=t,this.dropDownShow.emit({isOpen:t})}get isMulti(){return"multi"===this.name||"multi_depth"===this.name}get displayText(){if(this.isMulti){if(!this.value||!Array.isArray(this.value))return"";if(this.emitValue){const t=this.flattenOptions(this.options);return this.value.map((e=>t.find((t=>t.value===e))?.label??"")).filter(Boolean).join(", ")}const t=this.value;return 0===t.length?"":t.map((t=>t.label)).join(", ")}if(null==this.value)return"";if(!this.emitValue&&"object"==typeof this.value&&!Array.isArray(this.value))return this.value.label??"";const t=this.flattenOptions(this.options).find((t=>t.value===this.value));return t?.label??""}flattenOptions(t){return t.flatMap((t=>t.children?this.flattenOptions(t.children):[t]))}getSelectedOptions(){const t=this.value;return t&&Array.isArray(t)?this.emitValue?t.map((t=>this.findOriginalOption(t,this.options))).filter((t=>!!t)):t:[]}toMultiValue(t){return this.emitValue?t.map((t=>t.value)):t}parsePixelValue(t,e){const s=Number.parseFloat(t);return Number.isFinite(s)?s:e}updateDropdownViewportConstraints(){if(!this.triggerRef)return;const e=this.triggerRef.getBoundingClientRect(),s=t.VIEWPORT_PADDING,i=t.PORTAL_OFFSET_Y,o=this.parsePixelValue(this.dropdownHeight,260),r=this.parsePixelValue(this.maxDropdownWidth,640),a=Math.max(window.innerHeight-e.bottom-s-i,0),h=Math.max(a,Math.max(e.top-s-i,0)),l=Math.max(window.innerWidth-2*s,0);this.resolvedDropdownHeight=Math.min(o,h)+"px",this.resolvedMaxDropdownWidth=Math.min(r,l)+"px"}handleViewportResize=()=>{this.isOpen&&this.updateDropdownViewportConstraints()};findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),t.CLOSE_ANIMATION_DURATION))}handleTriggerClick=()=>{this.triggerRef&&(this.triggerWidth=this.triggerRef.offsetWidth+"px"),this.updateDropdownViewportConstraints(),this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)};emitUpdate(t){this.update.emit(t)}handleOptionSelect=t=>{const{option:e,leaves:s}=t;if(this.isMulti)this.handleMultiSelect(e,s);else{this.closeDropdown(),this.value=this.emitValue?e.value:e;const t=this.value;requestAnimationFrame((()=>{this.emitUpdate(t)}))}};handleMultiSelect(t,e){const s=this.getSelectedOptions();let i;if(t.children)if(e.every((t=>s.some((e=>e.value===t.value))))){const t=new Set(e.map((t=>t.value)));i=s.filter((e=>!t.has(e.value)))}else{const t=new Set(s.map((t=>t.value))),o=e.filter((e=>!t.has(e.value)));i=[...s,...o]}else i=s.some((e=>e.value===t.value))?s.filter((e=>e.value!==t.value)):[...s,t];this.value=this.toMultiValue(i),this.emitUpdate(this.value)}connectedCallback(){window.addEventListener("resize",this.handleViewportResize)}disconnectedCallback(){window.removeEventListener("resize",this.handleViewportResize),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e={open:this.isOpen,parentRef:this.triggerRef,viewportPadding:t.VIEWPORT_PADDING,onSdClose:()=>{this.closeDropdown()}};return i("sd-field",{key:"85614fb127c63bec86a17e73ac1942aefbc62ad1",name:this.fieldName||this.internalName,label:this.label,addonLabel:this.addonLabel,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:()=>{this.hovered=!0},onMouseLeave:()=>{this.hovered=!1}},i("div",{key:"4231e75590fec54915d580d7a4f6248232bca365",class:"sd-select-v2",ref:t=>{this.triggerRef=t}},i("sd-select-v2-trigger",{key:"4e75ec1af0ba09ba8cd63c795e527035114037a9",displayText:this.displayText,placeholder:this.placeholder,disabled:this.disabled,isOpen:this.isOpen,onSdTriggerClick:this.handleTriggerClick})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"de609975a56d52e542fc46a4d367b74bdcaa7e7b",...e},i("sd-select-v2-listbox",{key:"7d2fff4a3877701a68e422aa29e4f5a18e1d033c",name:this.name,options:this.options,value:this.value,emitValue:this.emitValue,triggerWidth:this.triggerWidth,maxWidth:this.resolvedMaxDropdownWidth,maxHeight:this.resolvedDropdownHeight,onSdOptionSelect:t=>this.handleOptionSelect(t.detail)})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-select-v2{display:inline-flex}sd-select-v2 sd-portal{display:none}sd-select-v2 .sd-select-v2{position:relative;width:100%;height:100%}"}},[512,"sd-select-v2",{name:[1],value:[1032],options:[16],placeholder:[1],maxDropdownWidth:[1,"max-dropdown-width"],dropdownHeight:[1,"dropdown-height"],disabled:[4],label:[1],addonLabel:[1,"addon-label"],error:[1028],hint:[1],errorMessage:[1,"error-message"],fieldName:[1,"field-name"],rules:[16],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],emitValue:[4,"emit-value"],width:[8],isOpen:[32],isAnimatingOut:[32],triggerWidth:[32],resolvedDropdownHeight:[32],resolvedMaxDropdownWidth:[32],focused:[32],hovered:[32]},void 0,{isOpen:[{watchIsOpen:0}]}]),w=g,v=function(){"undefined"!=typeof customElements&&["sd-select-v2","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-icon","sd-portal","sd-select-v2-list-item","sd-select-v2-list-item-search","sd-select-v2-listbox","sd-select-v2-trigger","sd-tooltip"].forEach((t=>{switch(t){case"sd-select-v2":customElements.get(o(t))||customElements.define(o(t),g);break;case"sd-button":customElements.get(o(t))||a();break;case"sd-checkbox":customElements.get(o(t))||h();break;case"sd-field":customElements.get(o(t))||l();break;case"sd-floating-portal":customElements.get(o(t))||d();break;case"sd-icon":customElements.get(o(t))||n();break;case"sd-portal":customElements.get(o(t))||c();break;case"sd-select-v2-list-item":customElements.get(o(t))||p();break;case"sd-select-v2-list-item-search":customElements.get(o(t))||m();break;case"sd-select-v2-listbox":customElements.get(o(t))||u();break;case"sd-select-v2-trigger":customElements.get(o(t))||f();break;case"sd-tooltip":customElements.get(o(t))||b()}}))};export{w as SdSelectV2,v as defineCustomElement}
@@ -1 +1 @@
1
- import{S as o,d as s}from"./p-DE3qbfEZ.js";const p=o,r=s;export{p as SdSelect,r as defineCustomElement}
1
+ import{S as o,d as s}from"./p-UUxu2akd.js";const a=o,p=s;export{a as SdSelect,p as defineCustomElement}