@sellmate/design-system 1.0.78 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (483) hide show
  1. package/dist/cjs/component.table-CMqGfEui.js +66 -0
  2. package/dist/cjs/design-system.cjs.js +2 -2
  3. package/dist/cjs/{index--F2wGuAi.js → index-Cw-78mnC.js} +1 -1
  4. package/dist/cjs/index.cjs.js +5 -5
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/{resolveColor-LhfOKtTZ.js → resolveColor-B0hzQNLG.js} +2 -2
  7. package/dist/cjs/sd-action-modal.cjs.entry.js +3 -3
  8. package/dist/cjs/sd-badge.cjs.entry.js +2 -3
  9. package/dist/cjs/sd-barcode-input.cjs.entry.js +3 -3
  10. package/dist/cjs/{sd-button-v2.config-CnqCQQMi.js → sd-button.config-DH08UNfl.js} +114 -28
  11. package/dist/cjs/{sd-button-v2_2.cjs.entry.js → sd-button_2.cjs.entry.js} +102 -85
  12. package/dist/cjs/sd-calendar.cjs.entry.js +15 -15
  13. package/dist/cjs/sd-card.cjs.entry.js +2 -2
  14. package/dist/cjs/sd-checkbox.cjs.entry.js +4 -4
  15. package/dist/cjs/sd-chip.cjs.entry.js +4 -4
  16. package/dist/cjs/sd-circle-progress.cjs.entry.js +3 -3
  17. package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +19 -11
  18. package/dist/cjs/sd-date-box.cjs.entry.js +9 -4
  19. package/dist/cjs/{sd-date-picker-calendar.cjs.entry.js → sd-date-picker-calendar_2.cjs.entry.js} +59 -6
  20. package/dist/cjs/{sd-date-picker.config-CRgCT5dn.js → sd-date-picker.config-CjvrFpYK.js} +1 -2
  21. package/dist/cjs/sd-date-picker_7.cjs.entry.js +1235 -0
  22. package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +14 -14
  23. package/dist/cjs/sd-dropdown-button.cjs.entry.js +32 -27
  24. package/dist/cjs/{sd-button_4.cjs.entry.js → sd-field_3.cjs.entry.js} +47 -102
  25. package/dist/cjs/sd-form.cjs.entry.js +5 -5
  26. package/dist/cjs/sd-ghost-button.cjs.entry.js +12 -10
  27. package/dist/cjs/sd-guide.cjs.entry.js +11 -11
  28. package/dist/cjs/sd-key-value-table.cjs.entry.js +230 -0
  29. package/dist/cjs/sd-linear-progress.cjs.entry.js +3 -3
  30. package/dist/cjs/sd-loading-container.cjs.entry.js +3 -3
  31. package/dist/cjs/sd-modal-container.cjs.entry.js +3 -3
  32. package/dist/cjs/{sd-pagination_5.cjs.entry.js → sd-pagination_4.cjs.entry.js} +136 -325
  33. package/dist/cjs/sd-popover.cjs.entry.js +18 -11
  34. package/dist/cjs/sd-popup.cjs.entry.js +112 -0
  35. package/dist/cjs/sd-portal.cjs.entry.js +3 -3
  36. package/dist/cjs/sd-radio-button.cjs.entry.js +9 -6
  37. package/dist/cjs/sd-radio.cjs.entry.js +2 -2
  38. package/dist/cjs/sd-select-list-item_2.cjs.entry.js +159 -0
  39. package/dist/cjs/sd-select.config-B19ptCT2.js +178 -0
  40. package/dist/cjs/{sd-select-list-item_4.cjs.entry.js → sd-select_3.cjs.entry.js} +296 -323
  41. package/dist/cjs/sd-switch.cjs.entry.js +2 -2
  42. package/dist/cjs/sd-table.cjs.entry.js +188 -48
  43. package/dist/cjs/sd-table.config-BIpldZtw.js +76 -0
  44. package/dist/cjs/sd-tabs.cjs.entry.js +8 -3
  45. package/dist/cjs/sd-tag.cjs.entry.js +56 -21
  46. package/dist/cjs/sd-td.cjs.entry.js +52 -10
  47. package/dist/cjs/sd-text-link.cjs.entry.js +13 -5
  48. package/dist/cjs/sd-toast-container.cjs.entry.js +5 -5
  49. package/dist/cjs/sd-toast.cjs.entry.js +35 -5
  50. package/dist/cjs/sd-toggle.cjs.entry.js +2 -2
  51. package/dist/cjs/{system-DpTN1vBC.js → system-VmZRYp6V.js} +4 -2
  52. package/dist/cjs/{tooltipArrow-D1-wcNm1.js → tooltipArrow-BjSFKIUq.js} +1 -1
  53. package/dist/collection/collection-manifest.json +4 -3
  54. package/dist/collection/components/assets/CheckboxCheck.js +5 -0
  55. package/dist/collection/components/assets/CheckboxIndeterminate.js +5 -0
  56. package/dist/collection/components/assets/index.js +4 -0
  57. package/dist/collection/components/sd-action-modal/sd-action-modal.css +1 -1
  58. package/dist/collection/components/sd-action-modal/sd-action-modal.js +7 -7
  59. package/dist/collection/components/sd-badge/sd-badge.config.js +10 -1
  60. package/dist/collection/components/sd-badge/sd-badge.js +1 -22
  61. package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +4 -4
  62. package/dist/collection/components/{sd-button-v2/sd-button-v2.config.js → sd-button/sd-button.config.js} +1 -1
  63. package/dist/collection/components/sd-button/sd-button.css +47 -93
  64. package/dist/collection/components/sd-button/sd-button.js +100 -173
  65. package/dist/collection/components/sd-calendar/sd-calendar.js +14 -14
  66. package/dist/collection/components/sd-card/sd-card.js +1 -1
  67. package/dist/collection/components/sd-checkbox/sd-checkbox.js +3 -3
  68. package/dist/collection/components/sd-chip/sd-chip.js +4 -4
  69. package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
  70. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +13 -8
  71. package/dist/collection/components/sd-date-box/sd-date-box.js +8 -3
  72. package/dist/collection/components/sd-date-picker/sd-date-picker-calendar/sd-date-picker-calendar.js +4 -4
  73. package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.css +1 -1
  74. package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +13 -6
  75. package/dist/collection/components/sd-date-picker/sd-date-picker.js +4 -4
  76. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +12 -12
  77. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +5 -5
  78. package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.config.js +7 -3
  79. package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +13 -11
  80. package/dist/collection/components/sd-field/sd-field.css +6 -2
  81. package/dist/collection/components/sd-field/sd-field.js +48 -22
  82. package/dist/collection/components/sd-file-picker/sd-file-picker.js +10 -5
  83. package/dist/collection/components/sd-floating-portal/sd-floating-portal.css +1 -3
  84. package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +6 -6
  85. package/dist/collection/components/sd-form/sd-form.js +4 -4
  86. package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +12 -10
  87. package/dist/collection/components/sd-guide/sd-guide.css +8 -172
  88. package/dist/collection/components/sd-guide/sd-guide.js +8 -6
  89. package/dist/collection/components/sd-icon/sd-icon.js +4 -4
  90. package/dist/collection/components/sd-input/sd-input.css +4 -2
  91. package/dist/collection/components/sd-input/sd-input.js +6 -6
  92. package/dist/collection/components/sd-key-value-table/sd-key-value-table.config.js +36 -0
  93. package/dist/collection/components/sd-key-value-table/sd-key-value-table.css +119 -0
  94. package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +301 -0
  95. package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
  96. package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
  97. package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +6 -3
  98. package/dist/collection/components/sd-modal-container/sd-modal-container.js +2 -2
  99. package/dist/collection/components/sd-number-input/sd-number-input.css +7 -0
  100. package/dist/collection/components/sd-number-input/sd-number-input.js +8 -5
  101. package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
  102. package/dist/collection/components/sd-popover/sd-popover.js +129 -36
  103. package/dist/collection/components/sd-popup/sd-popup.config.js +34 -0
  104. package/dist/collection/components/sd-popup/sd-popup.css +73 -0
  105. package/dist/collection/components/sd-popup/sd-popup.js +163 -0
  106. package/dist/collection/components/sd-portal/sd-portal.js +2 -2
  107. package/dist/collection/components/sd-radio/sd-radio.js +1 -1
  108. package/dist/collection/components/sd-radio-button/sd-radio-button.js +8 -5
  109. package/dist/collection/components/sd-radio-group/sd-radio-group.js +2 -2
  110. package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +7 -3
  111. package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.css +4 -4
  112. package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +7 -7
  113. package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +8 -8
  114. package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +9 -4
  115. package/dist/collection/components/sd-select/sd-select.js +6 -6
  116. package/dist/collection/components/sd-switch/sd-switch.js +1 -1
  117. package/dist/collection/components/sd-table/sd-table.config.js +6 -2
  118. package/dist/collection/components/sd-table/sd-table.css +30 -11
  119. package/dist/collection/components/sd-table/sd-table.js +233 -50
  120. package/dist/collection/components/sd-table/sd-table.stories.helpers.js +2 -3
  121. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +5 -5
  122. package/dist/collection/components/sd-table/sd-td/sd-td.js +111 -9
  123. package/dist/collection/components/sd-table/sd-thead/sd-thead.js +30 -16
  124. package/dist/collection/components/sd-table/sd-tr/sd-tr.css +24 -1
  125. package/dist/collection/components/sd-table/sd-tr/sd-tr.js +116 -19
  126. package/dist/collection/components/sd-tabs/sd-tabs.js +7 -2
  127. package/dist/collection/components/sd-tag/sd-tag.config.js +43 -11
  128. package/dist/collection/components/sd-tag/sd-tag.js +13 -7
  129. package/dist/collection/components/sd-text-link/sd-text-link.css +1 -0
  130. package/dist/collection/components/sd-text-link/sd-text-link.js +10 -4
  131. package/dist/collection/components/sd-textarea/sd-textarea.css +3 -0
  132. package/dist/collection/components/sd-textarea/sd-textarea.js +2 -2
  133. package/dist/collection/components/sd-toast/sd-toast.config.js +14 -0
  134. package/dist/collection/components/sd-toast/sd-toast.css +3 -5
  135. package/dist/collection/components/sd-toast/sd-toast.js +52 -5
  136. package/dist/collection/components/sd-toast-container/sd-toast-container.js +4 -4
  137. package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
  138. package/dist/collection/components/sd-tooltip/sd-tooltip.js +77 -30
  139. package/dist/collection/utils/color/resolveColor.js +2 -2
  140. package/dist/collection/utils/dropdown-manager.js +1 -1
  141. package/dist/collection/utils/modal.js +1 -1
  142. package/dist/collection/utils/toast.js +4 -4
  143. package/dist/components/index.js +1 -1
  144. package/dist/components/p-2wB9cing.js +1 -0
  145. package/dist/components/p-B-sK7I83.js +1 -0
  146. package/dist/components/p-B3D43x7F.js +1 -0
  147. package/dist/components/p-B7mpdnNl.js +1 -0
  148. package/dist/components/{p-TwGlKfsC.js → p-BAcmO7w0.js} +1 -1
  149. package/dist/components/p-BL0ZcHK8.js +1 -0
  150. package/dist/components/p-BXCyVrle.js +1 -0
  151. package/dist/components/p-BY1LGlfc.js +1 -0
  152. package/dist/components/p-BjkROjjt.js +1 -0
  153. package/dist/components/p-Bm3W_eBv.js +1 -0
  154. package/dist/components/p-BnfUIhUj.js +1 -0
  155. package/dist/components/{p-Dcc2Vm6z.js → p-BorUSgEK.js} +1 -1
  156. package/dist/components/{p-Bvq0Vpln.js → p-BsM-fwYd.js} +1 -1
  157. package/dist/components/p-C5CH-s6a.js +1 -0
  158. package/dist/components/p-C7WLft_0.js +1 -0
  159. package/dist/components/p-CK9ciBIR.js +1 -0
  160. package/dist/components/p-CQI40kiY.js +1 -0
  161. package/dist/components/p-CRL7TjSB.js +1 -0
  162. package/dist/components/p-CdOHomUp.js +1 -0
  163. package/dist/components/p-Ch5Yu1qd.js +1 -0
  164. package/dist/components/p-Cktiasfd.js +1 -0
  165. package/dist/components/p-CsVAx6KV.js +1 -0
  166. package/dist/components/p-D0Jiw-Zk.js +1 -0
  167. package/dist/components/p-D5F7wCNo.js +1 -0
  168. package/dist/components/p-DBFgk0rX.js +1 -0
  169. package/dist/components/p-DFLCjX1a.js +1 -0
  170. package/dist/components/p-DL1ac1QS.js +1 -0
  171. package/dist/components/p-DdLntfiw.js +1 -0
  172. package/dist/components/p-DeQcDHpn.js +1 -0
  173. package/dist/components/p-DfK4DiDI.js +1 -0
  174. package/dist/components/p-DhTcn6jX.js +1 -0
  175. package/dist/components/p-Dl8TIEQu.js +1 -0
  176. package/dist/components/p-DyAnn9ea.js +1 -0
  177. package/dist/components/p-GBlVDmy4.js +1 -0
  178. package/dist/components/p-Jts7ueOa.js +1 -0
  179. package/dist/components/p-arZfxxPn.js +1 -0
  180. package/dist/components/p-mmdt-WnS.js +1 -0
  181. package/dist/components/p-nOCYbyW4.js +1 -0
  182. package/dist/components/p-teN3CfOr.js +1 -0
  183. package/dist/components/p-u8teDaMa.js +1 -0
  184. package/dist/components/p-wCNRlKLa.js +1 -0
  185. package/dist/components/sd-action-modal.js +1 -1
  186. package/dist/components/sd-badge.js +1 -1
  187. package/dist/components/sd-barcode-input.js +1 -1
  188. package/dist/components/sd-button.js +1 -1
  189. package/dist/components/sd-calendar.js +1 -1
  190. package/dist/components/sd-card.js +1 -1
  191. package/dist/components/sd-checkbox.js +1 -1
  192. package/dist/components/sd-chip.js +1 -1
  193. package/dist/components/sd-circle-progress.js +1 -1
  194. package/dist/components/sd-confirm-modal.js +1 -1
  195. package/dist/components/sd-date-box.js +1 -1
  196. package/dist/components/sd-date-picker-calendar.js +1 -1
  197. package/dist/components/sd-date-picker-trigger.js +1 -1
  198. package/dist/components/sd-date-picker.js +1 -1
  199. package/dist/components/sd-date-range-picker-calendar.js +1 -1
  200. package/dist/components/sd-date-range-picker.js +1 -1
  201. package/dist/components/sd-dropdown-button.js +1 -1
  202. package/dist/components/sd-field.js +1 -1
  203. package/dist/components/sd-file-picker.js +1 -1
  204. package/dist/components/sd-floating-portal.js +1 -1
  205. package/dist/components/sd-form.js +1 -1
  206. package/dist/components/sd-ghost-button.js +1 -1
  207. package/dist/components/sd-guide.js +1 -1
  208. package/dist/components/sd-icon.js +1 -1
  209. package/dist/components/sd-input.js +1 -1
  210. package/dist/components/sd-key-value-table.d.ts +11 -0
  211. package/dist/components/sd-key-value-table.js +1 -0
  212. package/dist/components/sd-linear-progress.js +1 -1
  213. package/dist/components/sd-loading-container.js +1 -1
  214. package/dist/components/sd-loading-modal.js +1 -1
  215. package/dist/components/sd-modal-container.js +1 -1
  216. package/dist/components/sd-number-input.js +1 -1
  217. package/dist/components/sd-pagination.js +1 -1
  218. package/dist/components/sd-popover.js +1 -1
  219. package/dist/components/{sd-button-v2.d.ts → sd-popup.d.ts} +4 -4
  220. package/dist/components/sd-popup.js +1 -0
  221. package/dist/components/sd-portal.js +1 -1
  222. package/dist/components/sd-radio-button.js +1 -1
  223. package/dist/components/sd-radio-group.js +1 -1
  224. package/dist/components/sd-radio.js +1 -1
  225. package/dist/components/sd-select-list-item-search.js +1 -1
  226. package/dist/components/sd-select-list-item.js +1 -1
  227. package/dist/components/sd-select-listbox.js +1 -1
  228. package/dist/components/sd-select-trigger.js +1 -1
  229. package/dist/components/sd-select.js +1 -1
  230. package/dist/components/sd-switch.js +1 -1
  231. package/dist/components/sd-table.js +1 -1
  232. package/dist/components/sd-tabs.js +1 -1
  233. package/dist/components/sd-tag.js +1 -1
  234. package/dist/components/sd-tbody.js +1 -1
  235. package/dist/components/sd-td.js +1 -1
  236. package/dist/components/sd-text-link.js +1 -1
  237. package/dist/components/sd-textarea.js +1 -1
  238. package/dist/components/sd-thead.js +1 -1
  239. package/dist/components/sd-toast-container.js +1 -1
  240. package/dist/components/sd-toast.js +1 -1
  241. package/dist/components/sd-toggle.js +1 -1
  242. package/dist/components/sd-tooltip.js +1 -1
  243. package/dist/components/sd-tr.js +1 -1
  244. package/dist/design-system/design-system.css +1 -1
  245. package/dist/design-system/design-system.esm.js +1 -1
  246. package/dist/design-system/index.esm.js +1 -1
  247. package/dist/design-system/p-04fdb4b1.entry.js +1 -0
  248. package/dist/design-system/p-05611ff7.entry.js +1 -0
  249. package/dist/design-system/p-0U6dRjlq.js +2 -0
  250. package/dist/design-system/{p-fe9cef6a.entry.js → p-0fe603a4.entry.js} +1 -1
  251. package/dist/design-system/p-100f5887.entry.js +1 -0
  252. package/dist/design-system/p-18c5ae1a.entry.js +1 -0
  253. package/dist/design-system/p-1baa05ae.entry.js +1 -0
  254. package/dist/design-system/p-2a1ef965.entry.js +1 -0
  255. package/dist/design-system/p-2c63404f.entry.js +1 -0
  256. package/dist/design-system/{p-33bc3176.entry.js → p-435ae69e.entry.js} +1 -1
  257. package/dist/design-system/p-43e97572.entry.js +1 -0
  258. package/dist/design-system/p-44d05570.entry.js +1 -0
  259. package/dist/design-system/p-501fae20.entry.js +1 -0
  260. package/dist/design-system/{p-ead3e688.entry.js → p-5705e6d6.entry.js} +1 -1
  261. package/dist/design-system/p-5cbaf1db.entry.js +1 -0
  262. package/dist/design-system/p-5ed0becf.entry.js +1 -0
  263. package/dist/design-system/p-5f1c39b8.entry.js +1 -0
  264. package/dist/design-system/p-66af0ba0.entry.js +1 -0
  265. package/dist/design-system/p-77690440.entry.js +1 -0
  266. package/dist/design-system/p-78cc0289.entry.js +1 -0
  267. package/dist/design-system/p-790165f8.entry.js +1 -0
  268. package/dist/design-system/p-80466582.entry.js +1 -0
  269. package/dist/design-system/{p-e5cebccd.entry.js → p-857c44e8.entry.js} +1 -1
  270. package/dist/design-system/{p-f522c91d.entry.js → p-87c868c3.entry.js} +1 -1
  271. package/dist/design-system/p-8db7d8f2.entry.js +1 -0
  272. package/dist/design-system/p-8ee990bd.entry.js +1 -0
  273. package/dist/design-system/p-8f22106e.entry.js +1 -0
  274. package/dist/design-system/p-BDjErF_K.js +1 -0
  275. package/dist/design-system/p-BnfUIhUj.js +1 -0
  276. package/dist/{components/p-DkJqVXpD.js → design-system/p-C29HUShl.js} +1 -1
  277. package/dist/design-system/{p-BxPyZJaz.js → p-Ce0cmS4R.js} +1 -1
  278. package/dist/design-system/p-CxOCk_ge.js +1 -0
  279. package/dist/design-system/p-GBlVDmy4.js +1 -0
  280. package/dist/design-system/p-a6545130.entry.js +1 -0
  281. package/dist/design-system/p-ae2d45a2.entry.js +1 -0
  282. package/dist/design-system/{p-797517b5.entry.js → p-aeccfb2b.entry.js} +1 -1
  283. package/dist/design-system/p-b0aad445.entry.js +1 -0
  284. package/dist/design-system/p-b3c144ff.entry.js +1 -0
  285. package/dist/design-system/p-caee95b0.entry.js +1 -0
  286. package/dist/design-system/p-d30c823e.entry.js +1 -0
  287. package/dist/design-system/{p-3f7bc660.entry.js → p-d3212544.entry.js} +1 -1
  288. package/dist/design-system/p-d8c41313.entry.js +1 -0
  289. package/dist/design-system/{p-6bfe3612.entry.js → p-de8bb9ba.entry.js} +1 -1
  290. package/dist/design-system/p-e2334c1c.entry.js +1 -0
  291. package/dist/design-system/p-f4d73a0c.entry.js +1 -0
  292. package/dist/design-system/p-fc973500.entry.js +1 -0
  293. package/dist/design-system/p-fe0a5368.entry.js +1 -0
  294. package/dist/design-system/p-mmdt-WnS.js +1 -0
  295. package/dist/esm/component.table-BnfUIhUj.js +64 -0
  296. package/dist/esm/design-system.js +3 -3
  297. package/dist/esm/{index-Cnwbjz1F.js → index-0U6dRjlq.js} +1 -1
  298. package/dist/esm/index.js +5 -5
  299. package/dist/esm/loader.js +3 -3
  300. package/dist/esm/{resolveColor-BxPyZJaz.js → resolveColor-Ce0cmS4R.js} +2 -2
  301. package/dist/esm/sd-action-modal.entry.js +3 -3
  302. package/dist/esm/sd-badge.entry.js +2 -3
  303. package/dist/esm/sd-barcode-input.entry.js +3 -3
  304. package/dist/esm/{sd-button-v2.config-CV4xelxV.js → sd-button.config-BDjErF_K.js} +88 -3
  305. package/dist/esm/{sd-button-v2_2.entry.js → sd-button_2.entry.js} +102 -85
  306. package/dist/esm/sd-calendar.entry.js +15 -15
  307. package/dist/esm/sd-card.entry.js +2 -2
  308. package/dist/esm/sd-checkbox.entry.js +4 -4
  309. package/dist/esm/sd-chip.entry.js +4 -4
  310. package/dist/esm/sd-circle-progress.entry.js +3 -3
  311. package/dist/esm/sd-confirm-modal_2.entry.js +19 -11
  312. package/dist/esm/sd-date-box.entry.js +9 -4
  313. package/dist/esm/{sd-date-picker-calendar.entry.js → sd-date-picker-calendar_2.entry.js} +59 -7
  314. package/dist/esm/{sd-date-picker.config-C2fDbE9d.js → sd-date-picker.config-B6cqMQaM.js} +1 -2
  315. package/dist/esm/sd-date-picker_7.entry.js +1227 -0
  316. package/dist/esm/sd-date-range-picker-calendar.entry.js +14 -14
  317. package/dist/esm/sd-dropdown-button.entry.js +21 -16
  318. package/dist/esm/{sd-button_4.entry.js → sd-field_3.entry.js} +48 -102
  319. package/dist/esm/sd-form.entry.js +5 -5
  320. package/dist/esm/sd-ghost-button.entry.js +12 -10
  321. package/dist/esm/sd-guide.entry.js +11 -11
  322. package/dist/esm/sd-key-value-table.entry.js +228 -0
  323. package/dist/esm/sd-linear-progress.entry.js +3 -3
  324. package/dist/esm/sd-loading-container.entry.js +3 -3
  325. package/dist/esm/sd-modal-container.entry.js +3 -3
  326. package/dist/esm/{sd-pagination_5.entry.js → sd-pagination_4.entry.js} +137 -325
  327. package/dist/esm/sd-popover.entry.js +18 -11
  328. package/dist/esm/sd-popup.entry.js +110 -0
  329. package/dist/esm/sd-portal.entry.js +3 -3
  330. package/dist/esm/sd-radio-button.entry.js +9 -6
  331. package/dist/esm/sd-radio.entry.js +2 -2
  332. package/dist/esm/sd-select-list-item_2.entry.js +156 -0
  333. package/dist/esm/sd-select.config-CxOCk_ge.js +165 -0
  334. package/dist/esm/{sd-select-list-item_4.entry.js → sd-select_3.entry.js} +281 -307
  335. package/dist/esm/sd-switch.entry.js +2 -2
  336. package/dist/esm/{sd-table.config-Bj-EEo7N.js → sd-table.config-B-VgXXT7.js} +16 -46
  337. package/dist/esm/sd-table.entry.js +188 -48
  338. package/dist/esm/sd-tabs.entry.js +8 -3
  339. package/dist/esm/sd-tag.entry.js +56 -21
  340. package/dist/esm/sd-td.entry.js +52 -10
  341. package/dist/esm/sd-text-link.entry.js +13 -5
  342. package/dist/esm/sd-toast-container.entry.js +5 -5
  343. package/dist/esm/sd-toast.entry.js +35 -5
  344. package/dist/esm/sd-toggle.entry.js +2 -2
  345. package/dist/esm/{system-CZ4ltUOw.js → system-GBlVDmy4.js} +4 -2
  346. package/dist/esm/{tooltipArrow-D8sr81Xw.js → tooltipArrow-O5LOsHae.js} +1 -1
  347. package/dist/types/components/assets/CheckboxCheck.d.ts +1 -0
  348. package/dist/types/components/assets/CheckboxIndeterminate.d.ts +1 -0
  349. package/dist/types/components/assets/index.d.ts +2 -0
  350. package/dist/types/components/sd-action-modal/sd-action-modal.d.ts +2 -2
  351. package/dist/types/components/sd-badge/sd-badge.d.ts +0 -1
  352. package/dist/types/components/{sd-button-v2/sd-button-v2.config.d.ts → sd-button/sd-button.config.d.ts} +9 -15
  353. package/dist/types/components/sd-button/sd-button.d.ts +11 -13
  354. package/dist/types/components/sd-confirm-modal/sd-confirm-modal.config.d.ts +3 -3
  355. package/dist/types/components/sd-confirm-modal/sd-confirm-modal.d.ts +2 -1
  356. package/dist/types/components/sd-dropdown-button/sd-dropdown-button.config.d.ts +6 -5
  357. package/dist/types/components/sd-dropdown-button/sd-dropdown-button.d.ts +1 -0
  358. package/dist/types/components/sd-field/sd-field.d.ts +1 -0
  359. package/dist/types/components/sd-key-value-table/sd-key-value-table.config.d.ts +105 -0
  360. package/dist/types/components/sd-key-value-table/sd-key-value-table.d.ts +38 -0
  361. package/dist/types/components/sd-loading-modal/sd-loading-modal.config.d.ts +2 -2
  362. package/dist/types/components/sd-loading-modal/sd-loading-modal.d.ts +1 -0
  363. package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +1 -1
  364. package/dist/types/components/sd-popover/sd-popover.d.ts +16 -10
  365. package/dist/types/components/sd-popup/sd-popup.config.d.ts +30 -0
  366. package/dist/types/components/sd-popup/sd-popup.d.ts +11 -0
  367. package/dist/types/components/sd-table/constants.d.ts +2 -0
  368. package/dist/types/components/sd-table/sd-table.config.d.ts +4 -0
  369. package/dist/types/components/sd-table/sd-table.d.ts +21 -15
  370. package/dist/types/components/sd-table/sd-td/sd-td.d.ts +6 -0
  371. package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +9 -0
  372. package/dist/types/components/sd-tag/sd-tag.d.ts +2 -0
  373. package/dist/types/components/sd-toast/sd-toast.config.d.ts +5 -1
  374. package/dist/types/components/sd-toast/sd-toast.d.ts +2 -0
  375. package/dist/types/components/sd-toast-container/sd-toast-container.config.d.ts +2 -0
  376. package/dist/types/components/sd-tooltip/sd-tooltip.config.d.ts +2 -13
  377. package/dist/types/components/sd-tooltip/sd-tooltip.d.ts +6 -4
  378. package/dist/types/components.d.ts +278 -192
  379. package/dist/types/index.d.ts +1 -1
  380. package/dist/types/types/form.d.ts +1 -1
  381. package/dist/types/types/global.d.ts +14 -13
  382. package/dist/types/utils/toast.d.ts +1 -1
  383. package/hydrate/index.js +5513 -4761
  384. package/hydrate/index.mjs +5513 -4761
  385. package/package.json +111 -97
  386. package/readme.md +13 -7
  387. package/dist/cjs/component.button-cqV-iCG5.js +0 -90
  388. package/dist/cjs/sd-date-picker-trigger.cjs.entry.js +0 -51
  389. package/dist/cjs/sd-date-picker.cjs.entry.js +0 -117
  390. package/dist/cjs/sd-date-range-picker.cjs.entry.js +0 -123
  391. package/dist/cjs/sd-file-picker.cjs.entry.js +0 -244
  392. package/dist/cjs/sd-input.cjs.entry.js +0 -175
  393. package/dist/cjs/sd-number-input.cjs.entry.js +0 -409
  394. package/dist/cjs/sd-radio-group.cjs.entry.js +0 -46
  395. package/dist/cjs/sd-table.config-Cb0Ot3C6.js +0 -105
  396. package/dist/cjs/sd-textarea.cjs.entry.js +0 -146
  397. package/dist/collection/components/sd-button-v2/sd-button-v2.css +0 -125
  398. package/dist/collection/components/sd-button-v2/sd-button-v2.js +0 -273
  399. package/dist/components/p-B1XBwjCW.js +0 -1
  400. package/dist/components/p-B8jXOXtJ.js +0 -1
  401. package/dist/components/p-BE6TxbtX.js +0 -1
  402. package/dist/components/p-BJsHakU2.js +0 -1
  403. package/dist/components/p-BStczlLa.js +0 -1
  404. package/dist/components/p-BcMNA89i.js +0 -1
  405. package/dist/components/p-BheX6lAy.js +0 -1
  406. package/dist/components/p-BmYM7-4v.js +0 -1
  407. package/dist/components/p-BppjYHF6.js +0 -1
  408. package/dist/components/p-BwWDMpJc.js +0 -1
  409. package/dist/components/p-C-kw2p2a.js +0 -1
  410. package/dist/components/p-C5qZtNLl.js +0 -1
  411. package/dist/components/p-C7DajKYn.js +0 -1
  412. package/dist/components/p-CZ4ltUOw.js +0 -1
  413. package/dist/components/p-CeVMl_M9.js +0 -1
  414. package/dist/components/p-D1DpOp6M.js +0 -1
  415. package/dist/components/p-D3gjBBCU.js +0 -1
  416. package/dist/components/p-DC-6inj0.js +0 -1
  417. package/dist/components/p-DRF0He-x.js +0 -1
  418. package/dist/components/p-DegvQLTF.js +0 -1
  419. package/dist/components/p-Dey-lS6x.js +0 -1
  420. package/dist/components/p-DfH_fO01.js +0 -1
  421. package/dist/components/p-DngV3MT1.js +0 -1
  422. package/dist/components/p-EbjZr2OA.js +0 -1
  423. package/dist/components/p-LwWOleLJ.js +0 -1
  424. package/dist/components/p-Nvx13YlG.js +0 -1
  425. package/dist/components/p-ZMpCZhXP.js +0 -1
  426. package/dist/components/p-dNJIFthT.js +0 -1
  427. package/dist/components/p-q0VWISKA.js +0 -1
  428. package/dist/components/p-xnLvZ-xn.js +0 -1
  429. package/dist/components/sd-button-v2.js +0 -1
  430. package/dist/design-system/p-0356c195.entry.js +0 -1
  431. package/dist/design-system/p-045bc426.entry.js +0 -1
  432. package/dist/design-system/p-12dfd239.entry.js +0 -1
  433. package/dist/design-system/p-16d3a485.entry.js +0 -1
  434. package/dist/design-system/p-1706ed6f.entry.js +0 -1
  435. package/dist/design-system/p-182548f7.entry.js +0 -1
  436. package/dist/design-system/p-1a79edce.entry.js +0 -1
  437. package/dist/design-system/p-1cf87e87.entry.js +0 -1
  438. package/dist/design-system/p-25a08e98.entry.js +0 -1
  439. package/dist/design-system/p-2812b9ce.entry.js +0 -1
  440. package/dist/design-system/p-38f661ea.entry.js +0 -1
  441. package/dist/design-system/p-429dab5c.entry.js +0 -1
  442. package/dist/design-system/p-455dccf5.entry.js +0 -1
  443. package/dist/design-system/p-59313838.entry.js +0 -1
  444. package/dist/design-system/p-6af01ab0.entry.js +0 -1
  445. package/dist/design-system/p-70d4903f.entry.js +0 -1
  446. package/dist/design-system/p-767e99f9.entry.js +0 -1
  447. package/dist/design-system/p-7c370335.entry.js +0 -1
  448. package/dist/design-system/p-7fe8be6a.entry.js +0 -1
  449. package/dist/design-system/p-83b262dc.entry.js +0 -1
  450. package/dist/design-system/p-881adaa5.entry.js +0 -1
  451. package/dist/design-system/p-88d7303c.entry.js +0 -1
  452. package/dist/design-system/p-8a601e0f.entry.js +0 -1
  453. package/dist/design-system/p-B1XBwjCW.js +0 -1
  454. package/dist/design-system/p-BsrEibf7.js +0 -1
  455. package/dist/design-system/p-C5qZtNLl.js +0 -1
  456. package/dist/design-system/p-CZ4ltUOw.js +0 -1
  457. package/dist/design-system/p-Cnwbjz1F.js +0 -2
  458. package/dist/design-system/p-DnCBBIoq.js +0 -1
  459. package/dist/design-system/p-a82be987.entry.js +0 -1
  460. package/dist/design-system/p-b917c82a.entry.js +0 -1
  461. package/dist/design-system/p-b9f00eef.entry.js +0 -1
  462. package/dist/design-system/p-bcb53788.entry.js +0 -1
  463. package/dist/design-system/p-c24344ac.entry.js +0 -1
  464. package/dist/design-system/p-d76192bd.entry.js +0 -1
  465. package/dist/design-system/p-d9d8c51b.entry.js +0 -1
  466. package/dist/design-system/p-de67937d.entry.js +0 -1
  467. package/dist/design-system/p-ea5e6c2c.entry.js +0 -1
  468. package/dist/design-system/p-eeb1cac2.entry.js +0 -1
  469. package/dist/design-system/p-f1a74359.entry.js +0 -1
  470. package/dist/design-system/p-f44786a9.entry.js +0 -1
  471. package/dist/design-system/p-f69c7539.entry.js +0 -1
  472. package/dist/esm/component.button-B1XBwjCW.js +0 -88
  473. package/dist/esm/sd-date-picker-trigger.entry.js +0 -49
  474. package/dist/esm/sd-date-picker.entry.js +0 -115
  475. package/dist/esm/sd-date-range-picker.entry.js +0 -121
  476. package/dist/esm/sd-file-picker.entry.js +0 -242
  477. package/dist/esm/sd-input.entry.js +0 -173
  478. package/dist/esm/sd-number-input.entry.js +0 -407
  479. package/dist/esm/sd-radio-group.entry.js +0 -44
  480. package/dist/esm/sd-textarea.entry.js +0 -144
  481. package/dist/types/components/sd-button-v2/sd-button-v2.d.ts +0 -19
  482. /package/dist/components/{p-C2fDbE9d.js → p-B6cqMQaM.js} +0 -0
  483. /package/dist/design-system/{p-C2fDbE9d.js → p-B6cqMQaM.js} +0 -0
@@ -0,0 +1,1235 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-Cw-78mnC.js');
4
+ var index$1 = require('./index-BUvXpPc3.js');
5
+ var sdDatePicker_config = require('./sd-date-picker.config-CjvrFpYK.js');
6
+ var component_textinput = require('./component.textinput-BpXDeZPD.js');
7
+
8
+ const sdDatePickerCss = () => `sd-date-picker{display:inline-flex}sd-date-picker sd-portal{display:none}sd-date-picker .sd-date-picker{position:relative;width:100%;height:100%}`;
9
+
10
+ const SdDatePicker = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.update = index.createEvent(this, "sdUpdate", 7);
14
+ this.viewChange = index.createEvent(this, "sdViewChange", 7);
15
+ }
16
+ static CLOSE_ANIMATION_DURATION = 150;
17
+ get el() { return index.getElement(this); }
18
+ value = null;
19
+ size = 'sm';
20
+ placeholder = 'YYYY-MM-DD';
21
+ selectable;
22
+ disabled = false;
23
+ width = '';
24
+ // sd-field 공통 props
25
+ label = '';
26
+ labelWidth = '';
27
+ addonLabel = '';
28
+ addonAlign = 'start';
29
+ hint = '';
30
+ errorMessage = '';
31
+ rules = [];
32
+ error = false;
33
+ icon = undefined;
34
+ labelTooltip = '';
35
+ labelTooltipProps = null;
36
+ isOpen = false;
37
+ isAnimatingOut = false;
38
+ focused = false;
39
+ hovered = false;
40
+ update;
41
+ viewChange;
42
+ triggerRef;
43
+ formField;
44
+ closeAnimationTimer;
45
+ name = index$1.nanoid();
46
+ watchIsOpen(newValue) {
47
+ this.focused = newValue;
48
+ }
49
+ async sdValidate() {
50
+ return this.formField?.sdValidate();
51
+ }
52
+ async sdReset() {
53
+ return this.formField?.sdReset();
54
+ }
55
+ async sdResetValidate() {
56
+ return this.formField?.sdResetValidation();
57
+ }
58
+ closeDropdown() {
59
+ if (!this.isOpen)
60
+ return;
61
+ this.isOpen = false;
62
+ this.isAnimatingOut = true;
63
+ if (this.closeAnimationTimer)
64
+ clearTimeout(this.closeAnimationTimer);
65
+ this.closeAnimationTimer = setTimeout(() => {
66
+ this.isAnimatingOut = false;
67
+ }, SdDatePicker.CLOSE_ANIMATION_DURATION);
68
+ }
69
+ handleTriggerClick = () => {
70
+ if (this.disabled)
71
+ return;
72
+ if (this.isOpen) {
73
+ this.closeDropdown();
74
+ }
75
+ else {
76
+ if (this.closeAnimationTimer)
77
+ clearTimeout(this.closeAnimationTimer);
78
+ this.isAnimatingOut = false;
79
+ this.isOpen = true;
80
+ }
81
+ };
82
+ handleSelect = (e) => {
83
+ this.closeDropdown();
84
+ this.value = e.detail;
85
+ const nextValue = this.value;
86
+ requestAnimationFrame(() => {
87
+ this.update.emit(nextValue);
88
+ });
89
+ };
90
+ handleViewChange = (e) => {
91
+ this.viewChange.emit(e.detail);
92
+ };
93
+ disconnectedCallback() {
94
+ if (this.closeAnimationTimer)
95
+ clearTimeout(this.closeAnimationTimer);
96
+ }
97
+ render() {
98
+ const sizeTokens = sdDatePicker_config.DATEPICKER_SIZE_MAP[this.size] ?? sdDatePicker_config.DATEPICKER_SIZE_MAP.sm;
99
+ const cssVars = {
100
+ '--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
101
+ '--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
102
+ '--sd-system-color-field-border-default': sdDatePicker_config.DATEPICKER_COLORS.border.default,
103
+ '--sd-system-color-field-border-focus': sdDatePicker_config.DATEPICKER_COLORS.border.focus,
104
+ '--sd-system-color-field-bg-default': sdDatePicker_config.DATEPICKER_COLORS.bg.default,
105
+ };
106
+ return (index.h("sd-field", { key: '7678d58f741276e9848e05759f5c41f576e7fe66', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, index.h("div", { key: '8b3d615b241860ec1fb314fa0eeef5f51ea32f43', class: "sd-date-picker", ref: el => {
107
+ this.triggerRef = el;
108
+ } }, index.h("sd-date-picker-trigger", { key: '43185c67462cf0cb559c918e5f709723bf4d5aee', displayText: this.value ?? '', placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (index.h("sd-portal", { key: '2cf151b52b3117de9c4d55bbc3c045b0a7b614e9', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, index.h("sd-date-picker-calendar", { key: '9f77742d034dcb462eb1c4546b2c2a367544f97e', value: this.value, selectable: this.selectable, onSdSelect: this.handleSelect, onSdViewChange: this.handleViewChange })))));
109
+ }
110
+ static get watchers() { return {
111
+ "isOpen": [{
112
+ "watchIsOpen": 0
113
+ }]
114
+ }; }
115
+ };
116
+ SdDatePicker.style = sdDatePickerCss();
117
+
118
+ const sdDateRangePickerCss = () => `sd-date-range-picker{display:inline-flex}sd-date-range-picker sd-portal{display:none}sd-date-range-picker .sd-date-range-picker{position:relative;width:100%;height:100%}`;
119
+
120
+ const SdDateRangePicker = class {
121
+ constructor(hostRef) {
122
+ index.registerInstance(this, hostRef);
123
+ this.update = index.createEvent(this, "sdUpdate", 7);
124
+ this.viewChange = index.createEvent(this, "sdViewChange", 7);
125
+ }
126
+ static CLOSE_ANIMATION_DURATION = 150;
127
+ get el() { return index.getElement(this); }
128
+ value = null;
129
+ size = 'sm';
130
+ placeholder = 'YYYY-MM-DD ~ YYYY-MM-DD';
131
+ selectable;
132
+ maxRange;
133
+ disabled = false;
134
+ width = '';
135
+ // sd-field 공통 props
136
+ label = '';
137
+ labelWidth = '';
138
+ addonLabel = '';
139
+ addonAlign = 'start';
140
+ hint = '';
141
+ errorMessage = '';
142
+ rules = [];
143
+ error = false;
144
+ icon = undefined;
145
+ labelTooltip = '';
146
+ labelTooltipProps = null;
147
+ isOpen = false;
148
+ isAnimatingOut = false;
149
+ focused = false;
150
+ hovered = false;
151
+ update;
152
+ viewChange;
153
+ triggerRef;
154
+ formField;
155
+ closeAnimationTimer;
156
+ name = index$1.nanoid();
157
+ watchIsOpen(newValue) {
158
+ this.focused = newValue;
159
+ }
160
+ async sdValidate() {
161
+ return this.formField?.sdValidate();
162
+ }
163
+ async sdReset() {
164
+ return this.formField?.sdReset();
165
+ }
166
+ async sdResetValidate() {
167
+ return this.formField?.sdResetValidation();
168
+ }
169
+ closeDropdown() {
170
+ if (!this.isOpen)
171
+ return;
172
+ this.isOpen = false;
173
+ this.isAnimatingOut = true;
174
+ if (this.closeAnimationTimer)
175
+ clearTimeout(this.closeAnimationTimer);
176
+ this.closeAnimationTimer = setTimeout(() => {
177
+ this.isAnimatingOut = false;
178
+ }, SdDateRangePicker.CLOSE_ANIMATION_DURATION);
179
+ }
180
+ handleTriggerClick = () => {
181
+ if (this.disabled)
182
+ return;
183
+ if (this.isOpen) {
184
+ this.closeDropdown();
185
+ }
186
+ else {
187
+ if (this.closeAnimationTimer)
188
+ clearTimeout(this.closeAnimationTimer);
189
+ this.isAnimatingOut = false;
190
+ this.isOpen = true;
191
+ }
192
+ };
193
+ handleSelect = (e) => {
194
+ this.closeDropdown();
195
+ this.value = e.detail;
196
+ const nextValue = this.value;
197
+ requestAnimationFrame(() => {
198
+ this.update.emit(nextValue);
199
+ });
200
+ };
201
+ handleViewChange = (e) => {
202
+ this.viewChange.emit(e.detail);
203
+ };
204
+ get displayText() {
205
+ if (this.value == null || this.value[0] === '' || this.value[1] === '')
206
+ return '';
207
+ return `${this.value[0]} ~ ${this.value[1]}`;
208
+ }
209
+ disconnectedCallback() {
210
+ if (this.closeAnimationTimer)
211
+ clearTimeout(this.closeAnimationTimer);
212
+ }
213
+ render() {
214
+ const sizeTokens = sdDatePicker_config.DATEPICKER_SIZE_MAP[this.size] ?? sdDatePicker_config.DATEPICKER_SIZE_MAP.sm;
215
+ const cssVars = {
216
+ '--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
217
+ '--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
218
+ '--sd-system-color-field-border-default': sdDatePicker_config.DATEPICKER_COLORS.border.default,
219
+ '--sd-system-color-field-border-focus': sdDatePicker_config.DATEPICKER_COLORS.border.focus,
220
+ '--sd-system-color-field-bg-default': sdDatePicker_config.DATEPICKER_COLORS.bg.default,
221
+ };
222
+ return (index.h("sd-field", { key: '1c335b82235bc829f26b06d01c967d81268fc348', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, index.h("div", { key: '495f6e88d01bc6f19e57e04152e84bff2d0415d4', class: "sd-date-range-picker", ref: el => {
223
+ this.triggerRef = el;
224
+ } }, index.h("sd-date-picker-trigger", { key: '59c2d6ecdd7724e361ac4f6222d34d9ceca7ffd3', displayText: this.displayText, placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (index.h("sd-portal", { key: '5ba7ab62c1205823fba496e984f4819dbb89064d', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, index.h("sd-date-range-picker-calendar", { key: 'e6f84d99a4ceebee972900fd56593c18497cba9d', value: this.value, selectable: this.selectable, maxRange: this.maxRange, onSdSelect: this.handleSelect, onSdViewChange: this.handleViewChange })))));
225
+ }
226
+ static get watchers() { return {
227
+ "isOpen": [{
228
+ "watchIsOpen": 0
229
+ }]
230
+ }; }
231
+ };
232
+ SdDateRangePicker.style = sdDateRangePickerCss();
233
+
234
+ const filepicker = {
235
+ height: "28",
236
+ paddingX: "12",
237
+ gap: "8",
238
+ radius: "4",
239
+ typography: {
240
+ fontWeight: "400",
241
+ fontSize: "12",
242
+ lineHeight: "20"},
243
+ size: {
244
+ icon: "16"
245
+ },
246
+ text: {
247
+ "default": "#222222",
248
+ placeholder: "#AAAAAA",
249
+ disabled: "#888888"
250
+ },
251
+ icon: {
252
+ disabled: "#BBBBBB"
253
+ }
254
+ };
255
+ var filePickerTokens = {
256
+ filepicker: filepicker
257
+ };
258
+
259
+ const fp = filePickerTokens.filepicker;
260
+ const FILE_PICKER_LAYOUT = {
261
+ height: fp.height,
262
+ paddingX: fp.paddingX,
263
+ gap: fp.gap,
264
+ radius: fp.radius,
265
+ fontSize: fp.typography.fontSize,
266
+ lineHeight: fp.typography.lineHeight,
267
+ fontWeight: fp.typography.fontWeight,
268
+ iconSize: fp.size.icon};
269
+ const FILE_PICKER_COLORS = {
270
+ text: fp.text,
271
+ icon: {
272
+ default: '#888888', // TODO: 토큰 반영 후 교체
273
+ disabled: fp.icon.disabled,
274
+ },
275
+ };
276
+
277
+ const sdFilePickerCss = () => `sd-file-picker{display:inline-flex;width:100%}.sd-file-picker__content{width:100%;height:100%;display:flex;align-items:center;padding:0 var(--sd-file-picker-padding-x);gap:var(--sd-file-picker-gap);cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;vertical-align:middle}.sd-file-picker__text{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:var(--sd-file-picker-font-weight);font-size:var(--sd-file-picker-font-size);line-height:var(--sd-file-picker-line-height);color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker__text--placeholder{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__icon{flex-shrink:0}.sd-file-picker__clear-icon{flex-shrink:0;cursor:pointer;transition:opacity 0.2s ease}.sd-file-picker__clear-icon:hover{opacity:0.7}.sd-file-picker__input{display:none}.sd-file-picker__tooltip{position:absolute;top:calc(100% - 4px);left:50%;transform:translate(-50%);z-index:998;white-space:nowrap;padding:8px 12px;background:rgba(0, 0, 0, 0.8);color:white;font-size:12px;line-height:18px;border-radius:4px;pointer-events:none}.sd-field--disabled .sd-file-picker__content{cursor:not-allowed}.sd-field--disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}.sd-file-picker--inline .sd-file-picker__content{border:none;background-color:transparent;padding:0;height:auto}.sd-file-picker--inline .sd-file-picker__text{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker--inline:hover:not(.sd-file-picker--inline-disabled) .sd-file-picker__text{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline .sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__content{cursor:not-allowed}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}`;
278
+
279
+ const SdFilePicker = class {
280
+ constructor(hostRef) {
281
+ index.registerInstance(this, hostRef);
282
+ this.update = index.createEvent(this, "sdUpdate", 7);
283
+ this.reject = index.createEvent(this, "sdReject", 7);
284
+ }
285
+ get el() { return index.getElement(this); }
286
+ value = null;
287
+ placeholder = 'Click to upload';
288
+ disabled = false;
289
+ inline = false;
290
+ multiple = false;
291
+ accept;
292
+ maxFileSize;
293
+ maxTotalSize;
294
+ maxFiles;
295
+ // sd-field 패스스루 props
296
+ name = index$1.nanoid();
297
+ label = '';
298
+ labelWidth = '';
299
+ addonLabel = '';
300
+ addonAlign = 'start';
301
+ hint = '';
302
+ errorMessage = '';
303
+ width = '';
304
+ rules;
305
+ error = false;
306
+ status;
307
+ icon = undefined;
308
+ labelTooltip = '';
309
+ labelTooltipProps = null;
310
+ focused = false;
311
+ hovered = false;
312
+ internalValue = null;
313
+ showTooltip = false;
314
+ fileInputRef;
315
+ fileNamesRef;
316
+ formField;
317
+ update;
318
+ reject;
319
+ valueChanged(newValue) {
320
+ this.internalValue = newValue;
321
+ }
322
+ componentDidLoad() {
323
+ this.checkOverflow();
324
+ }
325
+ componentDidUpdate() {
326
+ this.checkOverflow();
327
+ }
328
+ async sdValidate() {
329
+ return this.formField?.sdValidate() ?? Promise.resolve(true);
330
+ }
331
+ async sdReset() {
332
+ const clearedValue = this.multiple ? [] : null;
333
+ this.value = clearedValue;
334
+ this.internalValue = clearedValue;
335
+ if (this.fileInputRef) {
336
+ this.fileInputRef.value = '';
337
+ }
338
+ await this.formField?.sdResetValidation();
339
+ }
340
+ async sdResetValidate() {
341
+ await this.formField?.sdResetValidation();
342
+ }
343
+ toBytes(value) {
344
+ if (value == null)
345
+ return undefined;
346
+ return typeof value === 'string' ? Number(value) : value;
347
+ }
348
+ validateFiles(files) {
349
+ const maxFileSize = this.toBytes(this.maxFileSize);
350
+ const maxTotalSize = this.toBytes(this.maxTotalSize);
351
+ const maxFiles = this.maxFiles != null ? Number(this.maxFiles) : undefined;
352
+ if (maxFiles != null && files.length > maxFiles) {
353
+ return { accepted: [], rejected: files, reason: 'max-files' };
354
+ }
355
+ if (maxFileSize != null) {
356
+ const oversized = files.filter(f => f.size > maxFileSize);
357
+ if (oversized.length > 0) {
358
+ return { accepted: [], rejected: oversized, reason: 'max-file-size' };
359
+ }
360
+ }
361
+ if (maxTotalSize != null) {
362
+ const totalSize = files.reduce((sum, f) => sum + f.size, 0);
363
+ if (totalSize > maxTotalSize) {
364
+ return { accepted: [], rejected: files, reason: 'max-total-size' };
365
+ }
366
+ }
367
+ return { accepted: files, rejected: [] };
368
+ }
369
+ handleFileChange = (event) => {
370
+ const input = event.target;
371
+ const files = input.files;
372
+ if (!files || files.length === 0) {
373
+ return;
374
+ }
375
+ const fileArray = Array.from(files);
376
+ const { accepted, rejected, reason } = this.validateFiles(fileArray);
377
+ if (reason != null) {
378
+ this.reject?.emit({ files: rejected, reason });
379
+ if (this.fileInputRef) {
380
+ this.fileInputRef.value = '';
381
+ }
382
+ return;
383
+ }
384
+ if (this.multiple) {
385
+ this.internalValue = accepted;
386
+ }
387
+ else {
388
+ this.internalValue = accepted[0];
389
+ }
390
+ this.value = this.internalValue;
391
+ this.update?.emit(this.value);
392
+ };
393
+ handleClear = (event) => {
394
+ if (this.disabled)
395
+ return;
396
+ event.stopPropagation();
397
+ const clearedValue = this.multiple ? [] : null;
398
+ this.value = clearedValue;
399
+ this.internalValue = clearedValue;
400
+ this.update?.emit(clearedValue);
401
+ if (this.fileInputRef) {
402
+ this.fileInputRef.value = '';
403
+ }
404
+ };
405
+ handleClick = () => {
406
+ if (this.disabled)
407
+ return;
408
+ this.fileInputRef?.click();
409
+ };
410
+ hasFiles() {
411
+ if (!this.internalValue)
412
+ return false;
413
+ if (Array.isArray(this.internalValue)) {
414
+ return this.internalValue.length > 0;
415
+ }
416
+ return true;
417
+ }
418
+ getDisplayText() {
419
+ if (!this.hasFiles())
420
+ return this.placeholder ?? 'Click to upload';
421
+ if (Array.isArray(this.internalValue)) {
422
+ return this.internalValue.map(f => f.name).join(', ');
423
+ }
424
+ return this.internalValue?.name || (this.placeholder ?? 'Click to upload');
425
+ }
426
+ checkOverflow() {
427
+ if (!this.fileNamesRef)
428
+ return;
429
+ const isOverflowing = this.fileNamesRef.scrollWidth > this.fileNamesRef.clientWidth;
430
+ this.showTooltip = isOverflowing;
431
+ }
432
+ getIconColor() {
433
+ return this.disabled ? FILE_PICKER_COLORS.icon.disabled : FILE_PICKER_COLORS.icon.default;
434
+ }
435
+ render() {
436
+ const hasFiles = this.hasFiles();
437
+ const displayText = this.getDisplayText();
438
+ const cssVars = {
439
+ '--sd-file-picker-font-size': `${FILE_PICKER_LAYOUT.fontSize}px`,
440
+ '--sd-file-picker-line-height': `${FILE_PICKER_LAYOUT.lineHeight}px`,
441
+ '--sd-file-picker-font-weight': FILE_PICKER_LAYOUT.fontWeight,
442
+ '--sd-file-picker-padding-x': `${FILE_PICKER_LAYOUT.paddingX}px`,
443
+ '--sd-file-picker-gap': `${FILE_PICKER_LAYOUT.gap}px`,
444
+ '--sd-file-picker-text-color': FILE_PICKER_COLORS.text.default,
445
+ '--sd-file-picker-placeholder-color': FILE_PICKER_COLORS.text.placeholder,
446
+ '--sd-file-picker-disabled-color': FILE_PICKER_COLORS.text.disabled,
447
+ // sd-field 시스템 변수 override
448
+ '--sd-system-size-field-sm-height': `${FILE_PICKER_LAYOUT.height}px`,
449
+ '--sd-system-radius-field-sm': `${FILE_PICKER_LAYOUT.radius}px`,
450
+ };
451
+ const content = (index.h("div", { role: "button", tabindex: this.disabled ? -1 : 0, class: "sd-file-picker__content", onClick: this.handleClick, onKeyDown: e => {
452
+ if (e.key === 'Enter' || e.key === ' ') {
453
+ e.preventDefault();
454
+ this.handleClick();
455
+ }
456
+ } }, index.h("input", { ref: el => (this.fileInputRef = el), type: "file", class: "sd-file-picker__input", disabled: this.disabled, multiple: this.multiple, accept: this.accept, onInput: this.handleFileChange, "aria-label": this.placeholder ?? 'Click to upload' }), index.h("sd-icon", { name: "attachFile", size: Number(FILE_PICKER_LAYOUT.iconSize), color: this.getIconColor(), class: "sd-file-picker__icon" }), index.h("div", { ref: el => (this.fileNamesRef = el), class: {
457
+ 'sd-file-picker__text': true,
458
+ 'sd-file-picker__text--placeholder': !hasFiles,
459
+ 'sd-file-picker__text--active': hasFiles,
460
+ } }, displayText), !this.disabled && hasFiles && (index.h("sd-ghost-button", { icon: "close", size: "xxs", ariaLabel: "clear", disabled: this.disabled, class: "sd-file-picker__clear-icon", onClick: this.handleClear })), this.showTooltip && hasFiles && this.hovered && (index.h("div", { class: "sd-file-picker__tooltip" }, displayText))));
461
+ if (this.inline) {
462
+ return (index.h("div", { class: {
463
+ 'sd-file-picker--inline': true,
464
+ 'sd-file-picker--inline-disabled': this.disabled,
465
+ }, style: cssVars, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, content));
466
+ }
467
+ return (index.h("sd-field", { name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, content));
468
+ }
469
+ static get watchers() { return {
470
+ "value": [{
471
+ "valueChanged": 0
472
+ }]
473
+ }; }
474
+ };
475
+ SdFilePicker.style = sdFilePickerCss();
476
+
477
+ const sm$1 = component_textinput.inputTokens.textinput.sm;
478
+ const md$1 = component_textinput.inputTokens.textinput.md;
479
+ const INPUT_SIZE_MAP = {
480
+ sm: {
481
+ height: sm$1.height,
482
+ paddingX: sm$1.paddingX,
483
+ gap: sm$1.gap,
484
+ radius: sm$1.radius,
485
+ fontSize: sm$1.typography.fontSize,
486
+ lineHeight: sm$1.typography.lineHeight,
487
+ fontWeight: sm$1.typography.fontWeight,
488
+ },
489
+ md: {
490
+ height: md$1.height,
491
+ paddingX: md$1.paddingX,
492
+ gap: md$1.gap,
493
+ radius: md$1.radius,
494
+ fontSize: md$1.typography.fontSize,
495
+ lineHeight: md$1.typography.lineHeight,
496
+ fontWeight: md$1.typography.fontWeight,
497
+ },
498
+ };
499
+ const INPUT_COLORS = {
500
+ text: component_textinput.inputTokens.textinput.text,
501
+ icon: component_textinput.inputTokens.textinput.icon,
502
+ };
503
+
504
+ const sdInputCss = () => `sd-icon{display:inline-block;line-height:0}sd-icon .sd-icon--rotate-90{transform:rotate(90deg)}sd-icon .sd-icon--rotate-180{transform:rotate(180deg)}sd-icon .sd-icon--rotate-270{transform:rotate(270deg)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fff inset;box-shadow:0 0 0px 1000px #fff inset;transition:background-color 5000s ease-in-out 0s}input:autofill,input:autofill:hover,input:autofill:focus,input:autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fff inset;box-shadow:0 0 0px 1000px #fff inset;transition:background-color 5000s ease-in-out 0s}sd-input{display:inline-flex}sd-input .sd-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;color:var(--sd-input-text-color);font-size:var(--sd-input-font-size);line-height:var(--sd-input-line-height);font-weight:var(--sd-input-font-weight);padding:0 var(--sd-input-padding-x);gap:var(--sd-input-gap)}sd-input .sd-input__content .sd-input__native{width:100%;height:100%;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}sd-input .sd-input__content .sd-input__native[disabled]{cursor:not-allowed;color:var(--sd-input-disabled-color)}sd-input .sd-input__content .sd-input__native[readonly]{color:var(--sd-system-color-field-text-read-only)}sd-input .sd-input__content .sd-input__native::placeholder{color:var(--sd-input-placeholder-color)}sd-input .sd-input__content .sd-input__clear-icon,sd-input .sd-input__content .sd-input__password-icon{flex-shrink:0}sd-input .sd-input__content .sd-input__native[disabled]~.sd-input__clear-icon,sd-input .sd-input__content .sd-input__native[disabled]~.sd-input__password-icon,sd-input .sd-input__content .sd-input__native[readonly]~.sd-input__clear-icon,sd-input .sd-input__content .sd-input__native[readonly]~.sd-input__password-icon{cursor:not-allowed;pointer-events:none}`;
505
+
506
+ const SdInput = class {
507
+ constructor(hostRef) {
508
+ index.registerInstance(this, hostRef);
509
+ this.input = index.createEvent(this, "sdUpdate", 7);
510
+ this.focus = index.createEvent(this, "sdFocus", 7);
511
+ this.blur = index.createEvent(this, "sdBlur", 7);
512
+ }
513
+ get host() { return index.getElement(this); }
514
+ value = null;
515
+ type = 'text';
516
+ size = 'sm';
517
+ addonLabel = '';
518
+ addonAlign = 'start';
519
+ placeholder = '입력해 주세요.';
520
+ disabled = false;
521
+ clearable = false;
522
+ width = '';
523
+ rules = [];
524
+ autoFocus = false;
525
+ autocomplete = '';
526
+ maxlength;
527
+ minlength;
528
+ inputmode;
529
+ enterkeyhint;
530
+ spellcheck = false;
531
+ status;
532
+ hint = '';
533
+ errorMessage = '';
534
+ inputClass = '';
535
+ readonly = false;
536
+ error = false;
537
+ focused = false;
538
+ hovered = false;
539
+ // props - label
540
+ label = '';
541
+ labelWidth = '';
542
+ icon = undefined;
543
+ labelTooltip = '';
544
+ labelTooltipProps = null;
545
+ // props - custom styles
546
+ inputStyle = {};
547
+ internalValue = null;
548
+ passwordVisible = false;
549
+ nativeEl = undefined;
550
+ formField;
551
+ name = index$1.nanoid();
552
+ input;
553
+ focus;
554
+ blur;
555
+ valueChanged(newValue) {
556
+ this.internalValue = newValue;
557
+ }
558
+ internalValueChanged(newValue) {
559
+ if (newValue !== this.value) {
560
+ this.value = newValue;
561
+ this.input?.emit(this.value);
562
+ }
563
+ }
564
+ async sdGetNativeElement() {
565
+ return this.nativeEl || null;
566
+ }
567
+ async sdValidate() {
568
+ this.formField?.sdValidate();
569
+ }
570
+ async sdReset() {
571
+ this.formField?.sdReset();
572
+ }
573
+ async sdResetValidate() {
574
+ this.formField?.sdResetValidation();
575
+ }
576
+ async sdFocus() {
577
+ this.formField?.sdFocus();
578
+ }
579
+ componentWillLoad() {
580
+ if (this.value != null && this.value !== '') {
581
+ this.internalValue = this.value;
582
+ }
583
+ }
584
+ componentDidLoad() {
585
+ if (this.autoFocus) {
586
+ this.nativeEl?.focus();
587
+ }
588
+ }
589
+ handleInput = (event) => {
590
+ const target = event.target;
591
+ this.internalValue = target.value;
592
+ };
593
+ handleFocus = async (type, event) => {
594
+ this.focused = type === 'focus';
595
+ if (type === 'blur') {
596
+ // Auto-validate on blur if rules exist
597
+ if (this.rules && this.rules.length > 0) {
598
+ await this.formField?.sdValidate();
599
+ }
600
+ this.blur?.emit(event);
601
+ }
602
+ else {
603
+ this.focus?.emit(event);
604
+ }
605
+ };
606
+ render() {
607
+ const sizeTokens = INPUT_SIZE_MAP[this.size] ?? INPUT_SIZE_MAP.sm;
608
+ const cssVars = {
609
+ // sd-input 자체 토큰
610
+ '--sd-input-font-size': `${sizeTokens.fontSize}px`,
611
+ '--sd-input-line-height': `${sizeTokens.lineHeight}px`,
612
+ '--sd-input-font-weight': sizeTokens.fontWeight,
613
+ '--sd-input-padding-x': `${sizeTokens.paddingX}px`,
614
+ '--sd-input-gap': `${sizeTokens.gap}px`,
615
+ '--sd-input-text-color': INPUT_COLORS.text.default,
616
+ '--sd-input-placeholder-color': INPUT_COLORS.text.placeholder,
617
+ '--sd-input-disabled-color': INPUT_COLORS.text.disabled,
618
+ '--sd-input-icon-color': INPUT_COLORS.icon.default,
619
+ // sd-field 시스템 변수 override (size별 높이/반경)
620
+ '--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
621
+ '--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
622
+ };
623
+ return (index.h("sd-field", { key: 'a81aefc3060587c77acf9f6de9f26f7f421b4c91', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, readonly: this.readonly, focused: this.focused, hovered: this.hovered, status: this.status, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, index.h("label", { key: '7486a081cceed565d2624125e74cbde4a97a4d5c', class: "sd-input__content" }, index.h("slot", { key: 'cf65ff444baddbf20004ae3ef80c5a54564d7d6f', name: "prefix" }), index.h("input", { key: '468d342c1cd6f60f7ad573a8c4b0acd4d7424e13', name: this.name, ref: el => (this.nativeEl = el), class: `sd-input__native ${this.inputClass}`, type: this.type === 'password' && this.passwordVisible ? 'text' : (this.type ?? 'text'), value: this.internalValue || '', placeholder: this.placeholder ?? '입력해 주세요.', disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, autocomplete: this.autocomplete || undefined, maxlength: this.maxlength, minlength: this.minlength, inputmode: this.inputmode, enterkeyhint: this.enterkeyhint, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.inputStyle }), index.h("slot", { key: '5de289a0767297fc1952dbcb26bbe256f2f0d6c4', name: "suffix" }), this.clearable && this.internalValue && !this.disabled && !this.readonly && (index.h("sd-ghost-button", { key: '2ef30f443a82492f1cdd56f812651605b4057fa2', icon: "close", ariaLabel: "clear", size: "xxs", disabled: this.disabled, class: "sd-input__clear-icon", onClick: async () => {
624
+ if (this.disabled || this.readonly)
625
+ return;
626
+ this.internalValue = '';
627
+ await this.formField?.sdValidate();
628
+ } })), this.type === 'password' && (index.h("sd-ghost-button", { key: 'a8cd4f37a0cea5512e080748310032256af9187d', icon: this.passwordVisible ? 'visibilityOn' : 'visibilityOff', ariaLabel: "visibility", size: "xxs", disabled: this.disabled || this.readonly, class: "sd-input__password-icon", onClick: () => {
629
+ if (this.disabled || this.readonly)
630
+ return;
631
+ this.passwordVisible = !this.passwordVisible;
632
+ } })))));
633
+ }
634
+ static get watchers() { return {
635
+ "value": [{
636
+ "valueChanged": 0
637
+ }],
638
+ "internalValue": [{
639
+ "internalValueChanged": 0
640
+ }]
641
+ }; }
642
+ };
643
+ SdInput.style = sdInputCss();
644
+
645
+ const numberInput = {
646
+ sm: {
647
+ height: "28",
648
+ paddingX: "6",
649
+ radius: "4",
650
+ typography: {
651
+ fontWeight: "400",
652
+ fontSize: "12",
653
+ lineHeight: "20"}},
654
+ md: {
655
+ height: "36",
656
+ paddingX: "8",
657
+ radius: "6",
658
+ typography: {
659
+ fontWeight: "400",
660
+ fontSize: "14",
661
+ lineHeight: "24"
662
+ }},
663
+ contents: {
664
+ gap: "4"
665
+ },
666
+ border: {
667
+ "default": "#AAAAAA",
668
+ focus: "#0075FF",
669
+ danger: "#FB4444"},
670
+ bg: {
671
+ "default": "#FFFFFF"},
672
+ text: {
673
+ "default": "#222222",
674
+ placeholder: "#AAAAAA",
675
+ disabled: "#888888"
676
+ },
677
+ hint: {
678
+ color: "#555555",
679
+ typography: {
680
+ fontSize: "12",
681
+ lineHeight: "20"}
682
+ },
683
+ errorMessage: {
684
+ color: "#E30000",
685
+ typography: {
686
+ fontSize: "12",
687
+ lineHeight: "20"}
688
+ },
689
+ stepper: {
690
+ sm: {
691
+ size: "20"
692
+ },
693
+ md: {
694
+ size: "24"
695
+ },
696
+ radius: "4",
697
+ bg: {
698
+ "default": "#EFF6FF",
699
+ disabled: "#EEEEEE"
700
+ },
701
+ icon: {
702
+ "default": "#0075FF",
703
+ disabled: "#BBBBBB"
704
+ }
705
+ }
706
+ };
707
+ var numberInputTokens = {
708
+ numberInput: numberInput
709
+ };
710
+
711
+ const sm = numberInputTokens.numberInput.sm;
712
+ const md = numberInputTokens.numberInput.md;
713
+ const NUMBER_INPUT_SIZE_MAP = {
714
+ sm: {
715
+ height: sm.height,
716
+ paddingX: sm.paddingX,
717
+ radius: sm.radius,
718
+ fontSize: sm.typography.fontSize,
719
+ lineHeight: sm.typography.lineHeight,
720
+ fontWeight: sm.typography.fontWeight,
721
+ },
722
+ md: {
723
+ height: md.height,
724
+ paddingX: md.paddingX,
725
+ radius: md.radius,
726
+ fontSize: md.typography.fontSize,
727
+ lineHeight: md.typography.lineHeight,
728
+ fontWeight: md.typography.fontWeight,
729
+ },
730
+ };
731
+ const NUMBER_INPUT_COLORS = {
732
+ border: numberInputTokens.numberInput.border,
733
+ bg: numberInputTokens.numberInput.bg,
734
+ text: numberInputTokens.numberInput.text,
735
+ };
736
+ const NUMBER_INPUT_STEPPER = {
737
+ sm: { size: numberInputTokens.numberInput.stepper.sm.size },
738
+ md: { size: numberInputTokens.numberInput.stepper.md.size },
739
+ radius: numberInputTokens.numberInput.stepper.radius,
740
+ bg: numberInputTokens.numberInput.stepper.bg,
741
+ icon: numberInputTokens.numberInput.stepper.icon,
742
+ };
743
+ const NUMBER_INPUT_HINT = numberInputTokens.numberInput.hint;
744
+ const NUMBER_INPUT_ERROR_MESSAGE = numberInputTokens.numberInput.errorMessage;
745
+ const NUMBER_INPUT_CONTENTS_GAP = numberInputTokens.numberInput.contents.gap;
746
+
747
+ const sdNumberInputCss = () => `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;gap:var(--sd-number-input-padding-x);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)}sd-number-input .sd-number-input__content--no-stepper{padding:0 calc(var(--sd-number-input-padding-x) * 2)}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[readonly]{color:var(--sd-system-color-field-text-read-only)}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}`;
748
+
749
+ const SdNumberInput = class {
750
+ constructor(hostRef) {
751
+ index.registerInstance(this, hostRef);
752
+ this.update = index.createEvent(this, "sdUpdate", 7);
753
+ this.focus = index.createEvent(this, "sdFocus", 7);
754
+ this.blur = index.createEvent(this, "sdBlur", 7);
755
+ }
756
+ get el() { return index.getElement(this); }
757
+ size = 'sm';
758
+ min = Number.NEGATIVE_INFINITY;
759
+ max = Number.POSITIVE_INFINITY;
760
+ step = 1;
761
+ useButton = false;
762
+ useDecimal = false;
763
+ value = null;
764
+ label;
765
+ labelWidth = '';
766
+ addonLabel = '';
767
+ addonAlign = 'start';
768
+ placeholder = '입력해 주세요.';
769
+ disabled = false;
770
+ width;
771
+ rules = [];
772
+ autoFocus = false;
773
+ status;
774
+ hint = '';
775
+ errorMessage = '';
776
+ inputPrefix = '';
777
+ inputSuffix = '';
778
+ inputClass = '';
779
+ readonly = false;
780
+ inputStyle = {};
781
+ error = false;
782
+ focused = false;
783
+ hovered = false;
784
+ internalValue = null;
785
+ displayValue = '';
786
+ nativeEl = undefined;
787
+ formField;
788
+ name = index$1.nanoid();
789
+ update;
790
+ focus;
791
+ blur;
792
+ toNumber(val) {
793
+ if (val === null || val === undefined || val === '')
794
+ return null;
795
+ if (typeof val === 'number')
796
+ return isNaN(val) ? null : val;
797
+ if (typeof val === 'string')
798
+ return this.parseInput(val);
799
+ const num = Number(val);
800
+ return isNaN(num) ? null : num;
801
+ }
802
+ formatWithCommas(value) {
803
+ if (value === null || value === undefined || isNaN(value))
804
+ return '';
805
+ const isNegative = value < 0;
806
+ const absValue = Math.abs(value);
807
+ const [intPart, decPart] = absValue.toString().split('.');
808
+ const formatted = (+intPart).toLocaleString();
809
+ const result = isNegative ? '-' + formatted : formatted;
810
+ return decPart !== undefined && decPart !== '' ? result + '.' + decPart : String(result);
811
+ }
812
+ parseInput(input) {
813
+ if (input.trim() === '')
814
+ return null;
815
+ const cleaned = input.replace(/,/g, '').trim();
816
+ if (!/^-?(\d+\.?\d*|\d*\.\d+)$/.test(cleaned)) {
817
+ return null;
818
+ }
819
+ const parsed = parseFloat(cleaned);
820
+ if (isNaN(parsed))
821
+ return null;
822
+ if (!this.useDecimal && cleaned.includes('.')) {
823
+ return null;
824
+ }
825
+ return parsed;
826
+ }
827
+ clampMinMax(value) {
828
+ if (isNaN(value))
829
+ return 0;
830
+ return Math.min(Math.max(value, this.min), this.max);
831
+ }
832
+ updateDisplay() {
833
+ this.displayValue = this.formatWithCommas(this.internalValue);
834
+ }
835
+ isIncrementDisabled() {
836
+ if (this.disabled || this.readonly)
837
+ return true;
838
+ if (this.internalValue !== null) {
839
+ return this.internalValue >= this.max;
840
+ }
841
+ return false;
842
+ }
843
+ isDecrementDisabled() {
844
+ if (this.disabled || this.readonly)
845
+ return true;
846
+ if (this.internalValue !== null) {
847
+ return this.internalValue <= this.min;
848
+ }
849
+ return false;
850
+ }
851
+ valueChanged(newValue) {
852
+ const parsed = this.toNumber(newValue);
853
+ if (parsed !== null) {
854
+ this.internalValue = this.clampMinMax(parsed);
855
+ }
856
+ else {
857
+ this.internalValue = null;
858
+ }
859
+ this.updateDisplay();
860
+ }
861
+ internalValueChanged(newValue) {
862
+ this.updateDisplay();
863
+ if (newValue !== this.value) {
864
+ this.value = newValue;
865
+ this.update?.emit(newValue);
866
+ }
867
+ }
868
+ async sdValidate() {
869
+ this.formField?.sdValidate();
870
+ }
871
+ async sdReset() {
872
+ this.formField?.sdReset();
873
+ }
874
+ async sdResetValidate() {
875
+ this.formField?.sdResetValidation();
876
+ }
877
+ async sdFocus() {
878
+ this.formField?.sdFocus();
879
+ }
880
+ async sdGetNativeElement() {
881
+ return this.nativeEl || null;
882
+ }
883
+ componentWillLoad() {
884
+ const parsed = this.toNumber(this.value);
885
+ if (parsed !== null) {
886
+ this.internalValue = this.clampMinMax(parsed);
887
+ }
888
+ this.updateDisplay();
889
+ }
890
+ componentDidLoad() {
891
+ if (this.autoFocus) {
892
+ this.nativeEl?.focus();
893
+ }
894
+ }
895
+ // TODO: 현재 숫자를 크게 넣어서 숫자e+21등의 형식으로 변환되면 값이 바뀌지않음 수정 필요
896
+ handleInput = (event) => {
897
+ const target = event.target;
898
+ const inputValue = target.value;
899
+ if (inputValue === '') {
900
+ this.internalValue = null;
901
+ this.displayValue = '';
902
+ return;
903
+ }
904
+ const commasRemoved = inputValue.replace(/,/g, '');
905
+ const decimalCount = (commasRemoved.match(/\./g) || []).length;
906
+ if (decimalCount > 1) {
907
+ target.value = this.displayValue;
908
+ return;
909
+ }
910
+ if (commasRemoved === '-' || commasRemoved === '.' || commasRemoved === '-.') {
911
+ target.value = commasRemoved;
912
+ return;
913
+ }
914
+ if (commasRemoved.endsWith('.') && decimalCount === 1) {
915
+ const numberPart = commasRemoved.slice(0, -1);
916
+ const parsed = this.parseInput(numberPart);
917
+ if (parsed !== null) {
918
+ const formatted = this.formatWithCommas(parsed);
919
+ target.value = formatted + '.';
920
+ return;
921
+ }
922
+ }
923
+ const parsed = this.parseInput(commasRemoved);
924
+ if (parsed !== null) {
925
+ if (parsed < this.min) {
926
+ target.value = this.displayValue;
927
+ return;
928
+ }
929
+ if (parsed > this.max) {
930
+ target.value = this.displayValue;
931
+ return;
932
+ }
933
+ this.internalValue = parsed;
934
+ this.displayValue = this.formatWithCommas(parsed);
935
+ target.value = this.displayValue;
936
+ }
937
+ else {
938
+ target.value = this.displayValue;
939
+ }
940
+ };
941
+ handleFocus = (event) => {
942
+ this.focused = true;
943
+ this.focus?.emit(event);
944
+ };
945
+ handleBlur = async (event) => {
946
+ this.updateDisplay();
947
+ if (this.nativeEl) {
948
+ this.nativeEl.value = this.displayValue;
949
+ }
950
+ if (this.rules && this.rules.length > 0) {
951
+ await this.formField?.sdValidate();
952
+ }
953
+ this.focused = false;
954
+ this.blur?.emit(event);
955
+ };
956
+ handleKeyDown = (event) => {
957
+ if (event.key === 'ArrowUp') {
958
+ event.preventDefault();
959
+ this.handleIncrement();
960
+ }
961
+ else if (event.key === 'ArrowDown') {
962
+ event.preventDefault();
963
+ this.handleDecrement();
964
+ }
965
+ };
966
+ handleIncrement = () => {
967
+ if (this.isIncrementDisabled())
968
+ return;
969
+ const currentVal = this.internalValue ?? this.min ?? 0;
970
+ let nextVal = currentVal + this.step;
971
+ if (nextVal > this.max) {
972
+ nextVal = this.max;
973
+ }
974
+ if (nextVal === currentVal)
975
+ return;
976
+ this.internalValue = nextVal;
977
+ };
978
+ handleDecrement = () => {
979
+ if (this.isDecrementDisabled())
980
+ return;
981
+ const currentVal = this.internalValue ?? this.min ?? 0;
982
+ let nextVal = currentVal - this.step;
983
+ if (nextVal < this.min) {
984
+ nextVal = this.min;
985
+ }
986
+ if (nextVal === currentVal)
987
+ return;
988
+ this.internalValue = nextVal;
989
+ };
990
+ render() {
991
+ const sizeTokens = NUMBER_INPUT_SIZE_MAP[this.size] ?? NUMBER_INPUT_SIZE_MAP.sm;
992
+ const stepperSize = NUMBER_INPUT_STEPPER[this.size]?.size ?? NUMBER_INPUT_STEPPER.sm.size;
993
+ const iconSize = this.size === 'md' ? 14 : 12;
994
+ const cssVars = {
995
+ // 컴포넌트 로컬 토큰
996
+ '--sd-number-input-font-size': `${sizeTokens.fontSize}px`,
997
+ '--sd-number-input-line-height': `${sizeTokens.lineHeight}px`,
998
+ '--sd-number-input-font-weight': sizeTokens.fontWeight,
999
+ '--sd-number-input-padding-x': `${sizeTokens.paddingX}px`,
1000
+ '--sd-number-input-text-color': NUMBER_INPUT_COLORS.text.default,
1001
+ '--sd-number-input-placeholder-color': NUMBER_INPUT_COLORS.text.placeholder,
1002
+ '--sd-number-input-disabled-color': NUMBER_INPUT_COLORS.text.disabled,
1003
+ // 스테퍼 토큰
1004
+ '--sd-number-input-stepper-size': `${stepperSize}px`,
1005
+ '--sd-number-input-stepper-radius': `${NUMBER_INPUT_STEPPER.radius}px`,
1006
+ '--sd-number-input-stepper-bg': NUMBER_INPUT_STEPPER.bg.default,
1007
+ '--sd-number-input-stepper-bg-disabled': NUMBER_INPUT_STEPPER.bg.disabled,
1008
+ '--sd-number-input-stepper-icon-color': NUMBER_INPUT_STEPPER.icon.default,
1009
+ '--sd-number-input-stepper-icon-disabled': NUMBER_INPUT_STEPPER.icon.disabled,
1010
+ // sd-field 시스템 변수 오버라이드
1011
+ '--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
1012
+ '--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
1013
+ '--sd-system-color-field-border-default': NUMBER_INPUT_COLORS.border.default,
1014
+ '--sd-system-color-field-border-focus': NUMBER_INPUT_COLORS.border.focus,
1015
+ '--sd-system-color-field-border-danger': NUMBER_INPUT_COLORS.border.danger,
1016
+ '--sd-system-color-field-bg-default': NUMBER_INPUT_COLORS.bg.default,
1017
+ // 힌트/에러 메시지 오버라이드
1018
+ '--sd-textinput-input-text-error-message': NUMBER_INPUT_ERROR_MESSAGE.color,
1019
+ '--sd-textinput-input-error-message-typography-font-size': `${NUMBER_INPUT_ERROR_MESSAGE.typography.fontSize}px`,
1020
+ '--sd-textinput-input-error-message-typography-line-height': `${NUMBER_INPUT_ERROR_MESSAGE.typography.lineHeight}px`,
1021
+ '--sd-textinput-input-text-hint': NUMBER_INPUT_HINT.color,
1022
+ '--sd-textinput-input-hint-typography-font-size': `${NUMBER_INPUT_HINT.typography.fontSize}px`,
1023
+ '--sd-textinput-input-hint-typography-line-height': `${NUMBER_INPUT_HINT.typography.lineHeight}px`,
1024
+ '--sd-textinput-input-contents-gap': `${NUMBER_INPUT_CONTENTS_GAP}px`,
1025
+ };
1026
+ return (index.h("sd-field", { key: '543a3fa5d759f4c64222e4eeca4de142296f663e', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, readonly: this.readonly, focused: this.focused, hovered: this.hovered, status: this.status, size: this.size, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, index.h("div", { key: '8d71a794e1c25f661d8260756f26ee6a47016aa9', class: {
1027
+ 'sd-number-input__content': true,
1028
+ 'sd-number-input__content--no-stepper': !this.useButton,
1029
+ } }, this.useButton && (index.h("button", { key: 'aaa21a743b73b1251780a9e03f40bef5765508d7', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--decrement", disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, index.h("sd-icon", { key: 'c94aa4c4dfb344de8c87b506eca7b02e7ffd8b0a', name: "minus", size: iconSize, color: this.isDecrementDisabled()
1030
+ ? NUMBER_INPUT_STEPPER.icon.disabled
1031
+ : NUMBER_INPUT_STEPPER.icon.default }))), this.inputPrefix && index.h("span", { key: '11b2efa4d6a665f03135adbb6a30b496deea820d', class: "sd-number-input__prefix" }, this.inputPrefix), index.h("input", { key: 'b58452e12a222c7adb0dd7be810db874788e63b0', name: this.name, ref: el => (this.nativeEl = el), 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: {
1032
+ textAlign: this.useButton ? 'center' : 'right',
1033
+ ...this.inputStyle,
1034
+ } }), this.inputSuffix && index.h("span", { key: 'c71e6fa80e99b9551d927b0958696dee2f278d85', class: "sd-number-input__suffix" }, this.inputSuffix), this.useButton && (index.h("button", { key: '620477a2710b32cba13433e7fd2c2ae59a20ce3c', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--increment", disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, index.h("sd-icon", { key: 'adb263a5d16743641429c611a006192677a2c0e0', name: "add", size: iconSize, color: this.isIncrementDisabled()
1035
+ ? NUMBER_INPUT_STEPPER.icon.disabled
1036
+ : NUMBER_INPUT_STEPPER.icon.default }))))));
1037
+ }
1038
+ static get watchers() { return {
1039
+ "value": [{
1040
+ "valueChanged": 0
1041
+ }],
1042
+ "internalValue": [{
1043
+ "internalValueChanged": 0
1044
+ }]
1045
+ }; }
1046
+ };
1047
+ SdNumberInput.style = sdNumberInputCss();
1048
+
1049
+ const sdRadioGroupCss = () => `sd-radio{display:inline-flex;width:fit-content;height:var(--sd-radio-line-height);line-height:0}sd-radio .sd-radio{cursor:pointer;display:inline-flex;align-items:center;gap:var(--sd-radio-gap);height:var(--sd-radio-line-height);max-height:var(--sd-radio-line-height)}sd-radio .sd-radio>input{position:absolute;width:0;height:0;opacity:0;pointer-events:none}sd-radio .sd-radio>input:focus-visible+.sd-radio__circle{box-shadow:0 0 0 2px white, 0 0 0 4px var(--sd-radio-checked-border);outline:none}sd-radio .sd-radio__circle{position:relative;width:var(--sd-radio-size);height:var(--sd-radio-size);border-radius:50%;border:var(--sd-radio-border-width) solid var(--sd-radio-unchecked-border);box-sizing:border-box;background:var(--sd-radio-unchecked-bg);display:inline-flex;flex-shrink:0}sd-radio .sd-radio__label{font-size:var(--sd-radio-font-size);font-weight:var(--sd-radio-font-weight);color:var(--sd-radio-label-color);line-height:var(--sd-radio-line-height)}sd-radio .sd-radio:hover:not(.sd-radio--disabled) .sd-radio__circle{background:var(--sd-radio-unchecked-bg-hover);border-color:var(--sd-radio-unchecked-border-hover)}sd-radio .sd-radio--checked .sd-radio__circle{border-color:var(--sd-radio-checked-border)}sd-radio .sd-radio--checked .sd-radio__circle::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:var(--sd-radio-dot-size);height:var(--sd-radio-dot-size);border-radius:50%;background:var(--sd-radio-checked-dot)}sd-radio .sd-radio--disabled{cursor:not-allowed}sd-radio .sd-radio--disabled .sd-radio__circle{background:var(--sd-radio-disabled-bg);border-color:var(--sd-radio-disabled-border)}sd-radio .sd-radio--disabled.sd-radio--checked .sd-radio__circle::after{background:var(--sd-radio-disabled-dot)}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}`;
1050
+
1051
+ const SdRadioGroup = class {
1052
+ constructor(hostRef) {
1053
+ index.registerInstance(this, hostRef);
1054
+ this.change = index.createEvent(this, "sdUpdate", 7);
1055
+ }
1056
+ value;
1057
+ options = [];
1058
+ direction = 'vertical';
1059
+ disabled = false;
1060
+ groupName;
1061
+ change;
1062
+ valueChanged(newValue) {
1063
+ this.value = newValue;
1064
+ }
1065
+ handleRadioChange = (optionValue) => {
1066
+ if (this.disabled)
1067
+ return;
1068
+ const matched = this.options.find(o => String(o.value) === String(optionValue));
1069
+ const resolved = matched ? matched.value : optionValue;
1070
+ this.value = resolved;
1071
+ this.change?.emit(resolved);
1072
+ };
1073
+ getGroupClasses() {
1074
+ const classes = ['sd-radio-group', `sd-radio-group--${this.direction ?? 'vertical'}`];
1075
+ return classes.join(' ');
1076
+ }
1077
+ render() {
1078
+ return (index.h("div", { key: 'c5404526e6a21258d616f6459499b636a6636384', class: this.getGroupClasses(), role: "radiogroup" }, this.options.map(option => {
1079
+ return (index.h("sd-radio", { key: `radio-${option.value}`, val: String(option.value), value: String(this.value), label: option.label, disabled: this.disabled || !!option.disabled, onSdUpdate: ({ detail }) => this.handleRadioChange(detail) }));
1080
+ })));
1081
+ }
1082
+ static get watchers() { return {
1083
+ "value": [{
1084
+ "valueChanged": 0
1085
+ }]
1086
+ }; }
1087
+ };
1088
+ SdRadioGroup.style = sdRadioGroupCss();
1089
+
1090
+ const TEXTAREA_TOKENS = {
1091
+ paddingX: component_textinput.inputTokens.textinput.sm.paddingX,
1092
+ paddingY: component_textinput.inputTokens.textinput.sm.paddingY,
1093
+ radius: component_textinput.inputTokens.textinput.sm.radius,
1094
+ fontSize: component_textinput.inputTokens.textinput.sm.typography.fontSize,
1095
+ lineHeight: component_textinput.inputTokens.textinput.sm.typography.lineHeight,
1096
+ fontWeight: component_textinput.inputTokens.textinput.sm.typography.fontWeight};
1097
+ const TEXTAREA_COLORS = {
1098
+ text: component_textinput.inputTokens.textinput.text,
1099
+ bg: component_textinput.inputTokens.textinput.bg,
1100
+ border: component_textinput.inputTokens.textinput.border,
1101
+ resizer: component_textinput.inputTokens.textinput.resizer,
1102
+ };
1103
+
1104
+ const sdTextareaCss = () => `sd-textarea{display:inline-flex}sd-textarea .sd-textarea__content{width:100%;display:flex}sd-textarea .sd-textarea__content .sd-textarea__native{width:100%;min-height:100px;border:none;outline:none;background:transparent;padding:var(--sd-textarea-padding-y) var(--sd-textarea-padding-x);font-family:inherit;font-size:var(--sd-textarea-font-size);line-height:var(--sd-textarea-line-height);font-weight:var(--sd-textarea-font-weight);color:var(--sd-textarea-text-color);resize:vertical}sd-textarea .sd-textarea__content .sd-textarea__native::placeholder{color:var(--sd-textarea-placeholder-color)}sd-textarea .sd-textarea__content .sd-textarea__native:disabled{cursor:not-allowed;color:var(--sd-textarea-disabled-color)}sd-textarea .sd-textarea__content .sd-textarea__native[readonly]{color:var(--sd-system-color-field-text-read-only)}`;
1105
+
1106
+ const SdTextarea = class {
1107
+ constructor(hostRef) {
1108
+ index.registerInstance(this, hostRef);
1109
+ this.input = index.createEvent(this, "sdUpdate", 7);
1110
+ this.focus = index.createEvent(this, "sdFocus", 7);
1111
+ this.blur = index.createEvent(this, "sdBlur", 7);
1112
+ }
1113
+ get host() { return index.getElement(this); }
1114
+ value = null;
1115
+ placeholder = '입력해 주세요.';
1116
+ disabled = false;
1117
+ readonly = false;
1118
+ autoFocus = false;
1119
+ textareaClass = '';
1120
+ textareaStyle = {};
1121
+ maxLength;
1122
+ rows;
1123
+ spellcheck = false;
1124
+ width = '';
1125
+ // props - sd-field
1126
+ label = '';
1127
+ labelWidth = '';
1128
+ addonLabel = '';
1129
+ addonAlign = 'start';
1130
+ hint = '';
1131
+ errorMessage = '';
1132
+ icon = undefined;
1133
+ labelTooltip = '';
1134
+ labelTooltipProps = null;
1135
+ rules = [];
1136
+ error = false;
1137
+ status;
1138
+ focused = false;
1139
+ hovered = false;
1140
+ internalValue = null;
1141
+ nativeEl = undefined;
1142
+ formField;
1143
+ name = index$1.nanoid();
1144
+ input;
1145
+ focus;
1146
+ blur;
1147
+ valueChanged(newValue) {
1148
+ this.internalValue = newValue;
1149
+ }
1150
+ internalValueChanged(newValue) {
1151
+ if (newValue !== this.value) {
1152
+ this.value = newValue;
1153
+ this.input?.emit(this.value);
1154
+ }
1155
+ }
1156
+ async sdGetNativeElement() {
1157
+ return this.nativeEl || null;
1158
+ }
1159
+ async sdValidate() {
1160
+ this.formField?.sdValidate();
1161
+ }
1162
+ async sdReset() {
1163
+ this.formField?.sdReset();
1164
+ }
1165
+ async sdResetValidate() {
1166
+ this.formField?.sdResetValidation();
1167
+ }
1168
+ async sdFocus() {
1169
+ this.formField?.sdFocus();
1170
+ }
1171
+ componentWillLoad() {
1172
+ if (this.value !== null && this.value !== undefined) {
1173
+ this.internalValue = this.value;
1174
+ }
1175
+ }
1176
+ componentDidLoad() {
1177
+ if (this.autoFocus) {
1178
+ this.nativeEl?.focus();
1179
+ }
1180
+ }
1181
+ handleInput = (event) => {
1182
+ const target = event.target;
1183
+ this.internalValue = target.value;
1184
+ };
1185
+ handleFocus = async (type, event) => {
1186
+ this.focused = type === 'focus';
1187
+ if (type === 'blur') {
1188
+ if (this.rules && this.rules.length > 0) {
1189
+ await this.formField?.sdValidate();
1190
+ }
1191
+ this.blur?.emit(event);
1192
+ }
1193
+ else {
1194
+ this.focus?.emit(event);
1195
+ }
1196
+ };
1197
+ render() {
1198
+ const cssVars = {
1199
+ '--sd-textarea-font-size': `${TEXTAREA_TOKENS.fontSize}px`,
1200
+ '--sd-textarea-line-height': `${TEXTAREA_TOKENS.lineHeight}px`,
1201
+ '--sd-textarea-font-weight': TEXTAREA_TOKENS.fontWeight,
1202
+ '--sd-textarea-padding-x': `${TEXTAREA_TOKENS.paddingX}px`,
1203
+ '--sd-textarea-padding-y': `${TEXTAREA_TOKENS.paddingY}px`,
1204
+ '--sd-textarea-radius': `${TEXTAREA_TOKENS.radius}px`,
1205
+ '--sd-textarea-text-color': TEXTAREA_COLORS.text.default,
1206
+ '--sd-textarea-placeholder-color': TEXTAREA_COLORS.text.placeholder,
1207
+ '--sd-textarea-disabled-color': TEXTAREA_COLORS.text.disabled,
1208
+ '--sd-textarea-bg-color': TEXTAREA_COLORS.bg.default,
1209
+ '--sd-textarea-disabled-bg-color': TEXTAREA_COLORS.bg.disabled,
1210
+ '--sd-textarea-border-color': TEXTAREA_COLORS.border.default,
1211
+ '--sd-textarea-resizer-color': TEXTAREA_COLORS.resizer.color,
1212
+ // sd-field 시스템 변수 override (textarea는 고정 높이가 아닌 auto)
1213
+ '--sd-system-size-field-sm-height': 'auto',
1214
+ '--sd-system-radius-field-sm': `${TEXTAREA_TOKENS.radius}px`,
1215
+ };
1216
+ return (index.h("sd-field", { key: '64595853405ae2a66231229516e93a74a4340ef0', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, readonly: this.readonly, focused: this.focused, hovered: this.hovered, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, index.h("div", { key: 'b7cddedc733c83d4c50234559c02c5f220634008', class: "sd-textarea__content" }, index.h("textarea", { key: '2d1b852e6ba7b913901c07fce36ce30598f15e12', name: this.name, ref: el => (this.nativeEl = el), class: `sd-textarea__native ${this.textareaClass}`, value: this.internalValue || '', placeholder: this.placeholder ?? '입력해 주세요.', disabled: this.disabled, readOnly: this.readonly, autofocus: this.autoFocus, maxLength: this.maxLength, rows: this.rows, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.textareaStyle }))));
1217
+ }
1218
+ static get watchers() { return {
1219
+ "value": [{
1220
+ "valueChanged": 0
1221
+ }],
1222
+ "internalValue": [{
1223
+ "internalValueChanged": 0
1224
+ }]
1225
+ }; }
1226
+ };
1227
+ SdTextarea.style = sdTextareaCss();
1228
+
1229
+ exports.sd_date_picker = SdDatePicker;
1230
+ exports.sd_date_range_picker = SdDateRangePicker;
1231
+ exports.sd_file_picker = SdFilePicker;
1232
+ exports.sd_input = SdInput;
1233
+ exports.sd_number_input = SdNumberInput;
1234
+ exports.sd_radio_group = SdRadioGroup;
1235
+ exports.sd_textarea = SdTextarea;