@sellmate/design-system 1.22.0 → 1.23.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 (246) hide show
  1. package/dist/cjs/design-system.cjs.js +2 -2
  2. package/dist/cjs/{index-C-F-JEv_.js → index-BuaQW9U4.js} +1 -1
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/sd-action-modal.cjs.entry.js +1 -1
  5. package/dist/cjs/sd-badge.cjs.entry.js +1 -1
  6. package/dist/cjs/sd-barcode-input.cjs.entry.js +1 -1
  7. package/dist/cjs/sd-button_2.cjs.entry.js +1 -1
  8. package/dist/cjs/sd-calendar_2.cjs.entry.js +1 -1
  9. package/dist/cjs/sd-callout.cjs.entry.js +1 -1
  10. package/dist/cjs/sd-card.cjs.entry.js +1 -1
  11. package/dist/cjs/sd-checkbox.cjs.entry.js +1 -1
  12. package/dist/cjs/sd-chip-input.cjs.entry.js +22 -4
  13. package/dist/cjs/sd-chip.cjs.entry.js +6 -4
  14. package/dist/cjs/{sd-chip.config-DiLoRpct.js → sd-chip.config-DCNCzV8s.js} +1 -1
  15. package/dist/cjs/sd-circle-progress.cjs.entry.js +1 -1
  16. package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +1 -1
  17. package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
  18. package/dist/cjs/sd-date-picker_7.cjs.entry.js +1 -1
  19. package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +1 -1
  20. package/dist/cjs/sd-divider.cjs.entry.js +1 -1
  21. package/dist/cjs/sd-dropdown-button.cjs.entry.js +1 -1
  22. package/dist/cjs/sd-field_3.cjs.entry.js +2 -2
  23. package/dist/cjs/sd-form.cjs.entry.js +1 -1
  24. package/dist/cjs/sd-ghost-button_3.cjs.entry.js +4 -4
  25. package/dist/cjs/sd-guide.cjs.entry.js +1 -1
  26. package/dist/cjs/sd-key-value-table.cjs.entry.js +1 -1
  27. package/dist/cjs/sd-linear-progress.cjs.entry.js +1 -1
  28. package/dist/cjs/sd-loading-container.cjs.entry.js +1 -1
  29. package/dist/cjs/sd-modal-container.cjs.entry.js +1 -1
  30. package/dist/cjs/sd-pagination_4.cjs.entry.js +1 -1
  31. package/dist/cjs/sd-popover.cjs.entry.js +2 -2
  32. package/dist/cjs/sd-popup.cjs.entry.js +1 -1
  33. package/dist/cjs/sd-radio-button.cjs.entry.js +1 -1
  34. package/dist/cjs/sd-radio.cjs.entry.js +1 -1
  35. package/dist/cjs/sd-select-list-item_2.cjs.entry.js +1 -1
  36. package/dist/cjs/sd-select_3.cjs.entry.js +1 -1
  37. package/dist/cjs/sd-switch.cjs.entry.js +1 -1
  38. package/dist/cjs/sd-table.cjs.entry.js +1 -1
  39. package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
  40. package/dist/cjs/sd-td.cjs.entry.js +1 -1
  41. package/dist/cjs/sd-text-link.cjs.entry.js +1 -1
  42. package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
  43. package/dist/cjs/sd-toast.cjs.entry.js +1 -1
  44. package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
  45. package/dist/cjs/{tooltipArrow-26hYtSrD.js → tooltipArrow-VQq73W83.js} +1 -1
  46. package/dist/collection/components/sd-chip/sd-chip.js +24 -2
  47. package/dist/collection/components/sd-chip-input/sd-chip-input.js +20 -2
  48. package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +3 -3
  49. package/dist/components/index.js +1 -1
  50. package/dist/components/{p-C1QezE7u.js → p-2-7UYvqL.js} +1 -1
  51. package/dist/components/{p-B-Igud6n.js → p-4I0LJNSg.js} +1 -1
  52. package/dist/components/p-B3bERWUt.js +1 -0
  53. package/dist/components/{p-YCGkwgiM.js → p-BDm6daTX.js} +1 -1
  54. package/dist/components/{p-BwTsP0Ak.js → p-BFMUpKa2.js} +1 -1
  55. package/dist/components/{p-Cj_1bYZF.js → p-BJMpxQSk.js} +1 -1
  56. package/dist/components/{p-vPS2GNz3.js → p-BLsuwMw4.js} +1 -1
  57. package/dist/components/{p-ZvP2Ce6J.js → p-BRKeMTWI.js} +1 -1
  58. package/dist/components/{p-BpjmheLG.js → p-BUB0CcPo.js} +1 -1
  59. package/dist/components/{p-B12iH3Zk.js → p-BYgT6mRD.js} +1 -1
  60. package/dist/components/p-BdFwmTyS.js +1 -0
  61. package/dist/components/{p-Du_qPqW-.js → p-BeKMwT89.js} +1 -1
  62. package/dist/components/{p-CCO1WtEj.js → p-BnhzUsGP.js} +1 -1
  63. package/dist/components/{p-BXRgi3NZ.js → p-Btpf6Xpg.js} +1 -1
  64. package/dist/components/{p-OjchKJGr.js → p-BwgUEhOa.js} +1 -1
  65. package/dist/components/{p-Bric-SEs.js → p-C2cNc56z.js} +1 -1
  66. package/dist/components/{p-D7StBSjK.js → p-C3rOud8J.js} +1 -1
  67. package/dist/components/{p-58DLP3IW.js → p-C9rjLN0u.js} +1 -1
  68. package/dist/components/{p-CCCwPJ5p.js → p-CEVDmQdt.js} +1 -1
  69. package/dist/components/{p-JMuxVcTW.js → p-CGJ1L8_Y.js} +1 -1
  70. package/dist/components/{p-FrqOl9KZ.js → p-CZpcFpSk.js} +1 -1
  71. package/dist/components/{p-kRH2GOb0.js → p-C_g09O6z.js} +1 -1
  72. package/dist/components/{p-B2bF2KlS.js → p-CaQ-qyG-.js} +1 -1
  73. package/dist/components/{p-S2-XqY2R.js → p-ChwRSZ6R.js} +1 -1
  74. package/dist/components/{p-mcMbSkii.js → p-ClBvavih.js} +1 -1
  75. package/dist/components/{p-Cdzn78dP.js → p-CpBPNHYe.js} +1 -1
  76. package/dist/components/{p-BpQwjSB8.js → p-D3dq5pt5.js} +1 -1
  77. package/dist/components/p-DDahT3Mp.js +1 -0
  78. package/dist/components/{p-CwSlRPMm.js → p-DfKZyde8.js} +1 -1
  79. package/dist/components/{p-CHxVi6l1.js → p-DgZ_vzrA.js} +1 -1
  80. package/dist/components/{p-BFlmHQm9.js → p-Dj1iJxUT.js} +1 -1
  81. package/dist/components/{p-CEKu7cxA.js → p-Dn93jl-w.js} +1 -1
  82. package/dist/components/{p-B0myARGe.js → p-DnHzWLdY.js} +1 -1
  83. package/dist/components/{p-DFbj6d3L.js → p-IMWw_SJ1.js} +1 -1
  84. package/dist/components/{p-Bm3NWPaP.js → p-iORPryb0.js} +1 -1
  85. package/dist/components/{p-DlXBFtBO.js → p-kDokArZu.js} +1 -1
  86. package/dist/components/{p-Co2ThnbG.js → p-lL2VxD2V.js} +1 -1
  87. package/dist/components/sd-action-modal.js +1 -1
  88. package/dist/components/sd-badge.js +1 -1
  89. package/dist/components/sd-barcode-input.js +1 -1
  90. package/dist/components/sd-button.js +1 -1
  91. package/dist/components/sd-calendar.js +1 -1
  92. package/dist/components/sd-callout.js +1 -1
  93. package/dist/components/sd-card.js +1 -1
  94. package/dist/components/sd-checkbox.js +1 -1
  95. package/dist/components/sd-chip-input.js +1 -1
  96. package/dist/components/sd-chip.js +1 -1
  97. package/dist/components/sd-circle-progress.js +1 -1
  98. package/dist/components/sd-confirm-modal.js +1 -1
  99. package/dist/components/sd-date-box.js +1 -1
  100. package/dist/components/sd-date-picker-trigger.js +1 -1
  101. package/dist/components/sd-date-picker.js +1 -1
  102. package/dist/components/sd-date-range-picker-calendar.js +1 -1
  103. package/dist/components/sd-date-range-picker.js +1 -1
  104. package/dist/components/sd-divider.js +1 -1
  105. package/dist/components/sd-dropdown-button.js +1 -1
  106. package/dist/components/sd-field.js +1 -1
  107. package/dist/components/sd-file-picker.js +1 -1
  108. package/dist/components/sd-floating-portal.js +1 -1
  109. package/dist/components/sd-form.js +1 -1
  110. package/dist/components/sd-ghost-button.js +1 -1
  111. package/dist/components/sd-guide.js +1 -1
  112. package/dist/components/sd-icon.js +1 -1
  113. package/dist/components/sd-input.js +1 -1
  114. package/dist/components/sd-key-value-table.js +1 -1
  115. package/dist/components/sd-linear-progress.js +1 -1
  116. package/dist/components/sd-loading-container.js +1 -1
  117. package/dist/components/sd-loading-modal.js +1 -1
  118. package/dist/components/sd-modal-container.js +1 -1
  119. package/dist/components/sd-number-input.js +1 -1
  120. package/dist/components/sd-pagination.js +1 -1
  121. package/dist/components/sd-popover.js +1 -1
  122. package/dist/components/sd-popup.js +1 -1
  123. package/dist/components/sd-portal.js +1 -1
  124. package/dist/components/sd-radio-button.js +1 -1
  125. package/dist/components/sd-radio-group.js +1 -1
  126. package/dist/components/sd-radio.js +1 -1
  127. package/dist/components/sd-select-list-item-search.js +1 -1
  128. package/dist/components/sd-select-list-item.js +1 -1
  129. package/dist/components/sd-select-listbox.js +1 -1
  130. package/dist/components/sd-select-trigger.js +1 -1
  131. package/dist/components/sd-select.js +1 -1
  132. package/dist/components/sd-switch.js +1 -1
  133. package/dist/components/sd-table.js +1 -1
  134. package/dist/components/sd-tabs.js +1 -1
  135. package/dist/components/sd-tag.js +1 -1
  136. package/dist/components/sd-tbody.js +1 -1
  137. package/dist/components/sd-td.js +1 -1
  138. package/dist/components/sd-text-link.js +1 -1
  139. package/dist/components/sd-textarea.js +1 -1
  140. package/dist/components/sd-thead.js +1 -1
  141. package/dist/components/sd-toast-container.js +1 -1
  142. package/dist/components/sd-toast.js +1 -1
  143. package/dist/components/sd-toggle.js +1 -1
  144. package/dist/components/sd-tooltip.js +1 -1
  145. package/dist/components/sd-tr.js +1 -1
  146. package/dist/design-system/design-system.css +1 -1
  147. package/dist/design-system/design-system.esm.js +1 -1
  148. package/dist/design-system/{p-2ba0b35a.entry.js → p-12e7b9fc.entry.js} +1 -1
  149. package/dist/design-system/{p-ccc85130.entry.js → p-1e1a5c69.entry.js} +1 -1
  150. package/dist/design-system/p-1e9793d6.entry.js +1 -0
  151. package/dist/design-system/{p-ce83eca1.entry.js → p-2646a746.entry.js} +1 -1
  152. package/dist/design-system/{p-a71a8b31.entry.js → p-3c4b57b5.entry.js} +1 -1
  153. package/dist/design-system/{p-99f33027.entry.js → p-43316703.entry.js} +1 -1
  154. package/dist/design-system/{p-e310f188.entry.js → p-43c79402.entry.js} +1 -1
  155. package/dist/design-system/{p-bfba449b.entry.js → p-45651573.entry.js} +1 -1
  156. package/dist/design-system/{p-88926a42.entry.js → p-496d3684.entry.js} +1 -1
  157. package/dist/design-system/{p-d5b535ad.entry.js → p-4d68b0a8.entry.js} +1 -1
  158. package/dist/design-system/{p-68687503.entry.js → p-578683b5.entry.js} +1 -1
  159. package/dist/design-system/{p-ce5df7ef.entry.js → p-586602a8.entry.js} +1 -1
  160. package/dist/design-system/{p-9dc0c2f9.entry.js → p-60f3ce4f.entry.js} +1 -1
  161. package/dist/design-system/{p-4f69fde0.entry.js → p-64d63a3f.entry.js} +1 -1
  162. package/dist/design-system/{p-563a8242.entry.js → p-6cd3da51.entry.js} +1 -1
  163. package/dist/design-system/p-7233ffb7.entry.js +1 -0
  164. package/dist/design-system/{p-4bbc894b.entry.js → p-754c11a8.entry.js} +1 -1
  165. package/dist/design-system/{p-ac81b46e.entry.js → p-8101c564.entry.js} +1 -1
  166. package/dist/design-system/{p-4bc0ce52.entry.js → p-829b7e4f.entry.js} +1 -1
  167. package/dist/design-system/{p-7c507d39.entry.js → p-83a86e6d.entry.js} +1 -1
  168. package/dist/design-system/p-86e54f19.entry.js +1 -0
  169. package/dist/design-system/{p-4eeca0cb.entry.js → p-93f876ce.entry.js} +1 -1
  170. package/dist/design-system/{p-14447dd5.entry.js → p-956956af.entry.js} +1 -1
  171. package/dist/design-system/{p-90436be8.entry.js → p-9761ef4a.entry.js} +1 -1
  172. package/dist/design-system/{p-50b5cf37.entry.js → p-9b7d3077.entry.js} +1 -1
  173. package/dist/design-system/{p-C7HJ-NfO.js → p-BZ5lcC25.js} +1 -1
  174. package/dist/{components/p-BRmilX-4.js → design-system/p-GXE2lEVj.js} +1 -1
  175. package/dist/design-system/{p-DDj5KTBF.js → p-ITP9Focx.js} +1 -1
  176. package/dist/design-system/{p-c684cd96.entry.js → p-a42bcc11.entry.js} +1 -1
  177. package/dist/design-system/{p-ff726fad.entry.js → p-a5fe8b9a.entry.js} +1 -1
  178. package/dist/design-system/{p-2ca4902b.entry.js → p-b1f4e1e5.entry.js} +1 -1
  179. package/dist/design-system/{p-abcc9367.entry.js → p-b29569d7.entry.js} +1 -1
  180. package/dist/design-system/{p-a80cc067.entry.js → p-b2ef677a.entry.js} +1 -1
  181. package/dist/design-system/{p-35e1e2fa.entry.js → p-b7e80770.entry.js} +1 -1
  182. package/dist/design-system/{p-6d8a4a23.entry.js → p-c4c81918.entry.js} +1 -1
  183. package/dist/design-system/{p-2df32f8c.entry.js → p-c79bf2eb.entry.js} +1 -1
  184. package/dist/design-system/{p-52e88677.entry.js → p-ccbf8687.entry.js} +1 -1
  185. package/dist/design-system/{p-b881bbb6.entry.js → p-d10efe7e.entry.js} +1 -1
  186. package/dist/design-system/{p-274dbc65.entry.js → p-df5e8dba.entry.js} +1 -1
  187. package/dist/design-system/{p-fc65bbe2.entry.js → p-e018fdb1.entry.js} +1 -1
  188. package/dist/design-system/{p-9a010c12.entry.js → p-e897484c.entry.js} +1 -1
  189. package/dist/design-system/{p-552acf98.entry.js → p-e94bd6d7.entry.js} +1 -1
  190. package/dist/design-system/{p-c93c623f.entry.js → p-f280e59d.entry.js} +1 -1
  191. package/dist/esm/design-system.js +3 -3
  192. package/dist/esm/{index-C7HJ-NfO.js → index-BZ5lcC25.js} +1 -1
  193. package/dist/esm/loader.js +3 -3
  194. package/dist/esm/sd-action-modal.entry.js +1 -1
  195. package/dist/esm/sd-badge.entry.js +1 -1
  196. package/dist/esm/sd-barcode-input.entry.js +1 -1
  197. package/dist/esm/sd-button_2.entry.js +1 -1
  198. package/dist/esm/sd-calendar_2.entry.js +1 -1
  199. package/dist/esm/sd-callout.entry.js +1 -1
  200. package/dist/esm/sd-card.entry.js +1 -1
  201. package/dist/esm/sd-checkbox.entry.js +1 -1
  202. package/dist/esm/sd-chip-input.entry.js +22 -4
  203. package/dist/esm/{sd-chip.config-DDj5KTBF.js → sd-chip.config-ITP9Focx.js} +1 -1
  204. package/dist/esm/sd-chip.entry.js +6 -4
  205. package/dist/esm/sd-circle-progress.entry.js +1 -1
  206. package/dist/esm/sd-confirm-modal_2.entry.js +1 -1
  207. package/dist/esm/sd-date-box.entry.js +1 -1
  208. package/dist/esm/sd-date-picker_7.entry.js +1 -1
  209. package/dist/esm/sd-date-range-picker-calendar.entry.js +1 -1
  210. package/dist/esm/sd-divider.entry.js +1 -1
  211. package/dist/esm/sd-dropdown-button.entry.js +1 -1
  212. package/dist/esm/sd-field_3.entry.js +2 -2
  213. package/dist/esm/sd-form.entry.js +1 -1
  214. package/dist/esm/sd-ghost-button_3.entry.js +4 -4
  215. package/dist/esm/sd-guide.entry.js +1 -1
  216. package/dist/esm/sd-key-value-table.entry.js +1 -1
  217. package/dist/esm/sd-linear-progress.entry.js +1 -1
  218. package/dist/esm/sd-loading-container.entry.js +1 -1
  219. package/dist/esm/sd-modal-container.entry.js +1 -1
  220. package/dist/esm/sd-pagination_4.entry.js +1 -1
  221. package/dist/esm/sd-popover.entry.js +2 -2
  222. package/dist/esm/sd-popup.entry.js +1 -1
  223. package/dist/esm/sd-radio-button.entry.js +1 -1
  224. package/dist/esm/sd-radio.entry.js +1 -1
  225. package/dist/esm/sd-select-list-item_2.entry.js +1 -1
  226. package/dist/esm/sd-select_3.entry.js +1 -1
  227. package/dist/esm/sd-switch.entry.js +1 -1
  228. package/dist/esm/sd-table.entry.js +1 -1
  229. package/dist/esm/sd-tabs.entry.js +1 -1
  230. package/dist/esm/sd-td.entry.js +1 -1
  231. package/dist/esm/sd-text-link.entry.js +1 -1
  232. package/dist/esm/sd-toast-container.entry.js +1 -1
  233. package/dist/esm/sd-toast.entry.js +1 -1
  234. package/dist/esm/sd-toggle.entry.js +1 -1
  235. package/dist/esm/{tooltipArrow-Bgf3crs7.js → tooltipArrow-ByHjyr3Z.js} +1 -1
  236. package/dist/types/components/sd-chip/sd-chip.d.ts +2 -0
  237. package/dist/types/components.d.ts +11 -0
  238. package/hydrate/index.js +30 -9
  239. package/hydrate/index.mjs +30 -9
  240. package/package.json +1 -1
  241. package/dist/components/p-Cjf8PHEl.js +0 -1
  242. package/dist/components/p-DzAvlr8W.js +0 -1
  243. package/dist/design-system/p-35da166a.entry.js +0 -1
  244. package/dist/design-system/p-4c1559c8.entry.js +0 -1
  245. package/dist/design-system/p-DUyBmuH_.js +0 -1
  246. package/dist/design-system/p-e7d4b78e.entry.js +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C-F-JEv_.js');
3
+ var index = require('./index-BuaQW9U4.js');
4
4
 
5
5
  const textLink = {
6
6
  sm: {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C-F-JEv_.js');
3
+ var index = require('./index-BuaQW9U4.js');
4
4
 
5
5
  const DEFAULT_DURATION = 4000;
6
6
  const DEFAULT_MAX_VISIBLE = 3;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C-F-JEv_.js');
3
+ var index = require('./index-BuaQW9U4.js');
4
4
 
5
5
  const toast = {
6
6
  icon: "16",
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C-F-JEv_.js');
3
+ var index = require('./index-BuaQW9U4.js');
4
4
 
5
5
  const toggle = {
6
6
  height: "28",
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C-F-JEv_.js');
3
+ var index = require('./index-BuaQW9U4.js');
4
4
 
5
5
  const TooltipArrow = (props) => (index.h("svg", { width: "16", height: "12", viewBox: "0 0 16 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, index.h("path", { d: "M8.83205 10.7519C8.43623 11.3457 7.56377 11.3457 7.16795 10.7519L1.04907e-06 -1.39876e-06L16 0L8.83205 10.7519Z", fill: "currentColor" })));
6
6
 
@@ -12,6 +12,8 @@ export class SdChip {
12
12
  disabled = false;
13
13
  /** 인라인 편집 가능 여부 */
14
14
  editable = true;
15
+ /** 닫기 버튼 표시 여부 */
16
+ showRemove = true;
15
17
  /** 편집 중 표시할 placeholder */
16
18
  placeholder = '';
17
19
  /** 유효성 검사 규칙 목록 */
@@ -232,14 +234,14 @@ export class SdChip {
232
234
  '--sd-chip-font-weight': typography.fontWeight,
233
235
  '--sd-chip-line-height': typography.lineHeight,
234
236
  };
235
- return (h("span", { key: '03dca835a12de78ae3c72cf50a8f1ed16b19cf00', class: {
237
+ return (h("span", { key: '619cbcb7bac8b8c92c0b12c773d5ee4e34fbe8ea', class: {
236
238
  'sd-chip': true,
237
239
  [`sd-chip--${state}`]: true,
238
240
  'sd-chip--disabled': this.disabled,
239
241
  'sd-chip--editable': !this.disabled && this.isEditable,
240
242
  }, role: this.disabled || !this.isEditable ? undefined : 'button', tabIndex: this.disabled || this.isEditing || !this.isEditable ? -1 : 0, "aria-disabled": this.disabled ? 'true' : undefined, style: cssVars, onClick: this.handleChipClick, onKeyDown: this.handleChipKeyDown }, this.isEditing ? (h("span", { key: "chip-input", ref: el => (this.inputEl = el), class: "sd-chip__input", role: "textbox", tabindex: this.disabled ? -1 : 0, contentEditable: !this.disabled, "data-placeholder": this.placeholder, spellcheck: false, onInput: this.handleInputChange, onKeyDown: this.handleInputKeyDown, onBlur: this.handleInputBlur, onPaste: this.handlePaste, onClick: event => event.stopPropagation() })) : ([
241
243
  h("span", { key: "chip-label", class: "sd-chip__label" }, this.internalValue),
242
- !this.disabled && (h("sd-ghost-button", { key: "chip-remove", class: "sd-chip__remove", icon: "close", size: "xxs", ariaLabel: "remove", onClick: this.handleRemoveClick })),
244
+ !this.disabled && (this.showRemove ?? true) && (h("sd-ghost-button", { key: "chip-remove", class: "sd-chip__remove", icon: "close", size: "xxs", ariaLabel: "remove", onClick: this.handleRemoveClick })),
243
245
  ])));
244
246
  }
245
247
  static get is() { return "sd-chip"; }
@@ -355,6 +357,26 @@ export class SdChip {
355
357
  "attribute": "editable",
356
358
  "defaultValue": "true"
357
359
  },
360
+ "showRemove": {
361
+ "type": "boolean",
362
+ "mutable": false,
363
+ "complexType": {
364
+ "original": "boolean",
365
+ "resolved": "boolean",
366
+ "references": {}
367
+ },
368
+ "required": false,
369
+ "optional": false,
370
+ "docs": {
371
+ "tags": [],
372
+ "text": "\uB2EB\uAE30 \uBC84\uD2BC \uD45C\uC2DC \uC5EC\uBD80"
373
+ },
374
+ "getter": false,
375
+ "setter": false,
376
+ "reflect": false,
377
+ "attribute": "show-remove",
378
+ "defaultValue": "true"
379
+ },
358
380
  "placeholder": {
359
381
  "type": "string",
360
382
  "mutable": false,
@@ -445,7 +445,25 @@ export class SdChipInput {
445
445
  h("div", { key: '4aa212280a928b88b85dffa3d453ea8f563e1fe0', class: "sd-chip-input__reset",
446
446
  // 리셋 버튼 클릭 시 input blur → portal unmount → refocus → 새 portal mount로
447
447
  // 두 wrapper가 body에 잠깐 겹치는 타이밍 이슈를 방지한다.
448
- onMouseDown: e => e.preventDefault() }, this.inputValue === '' && h("span", { key: 'f7faa45b57d8e38dda8cc98119357f92d914fee4', class: "sd-chip-input__divider" }), this.maxCount != null && (h("span", { key: 'dfde4ea82558414614fb2d817f7bfa1fb5d4bf5f', class: "sd-chip-input__max-count" }, "\uCD5C\uB300 ", this.maxCount, "\uAC1C")), this.useReset && this.internalValues.length > 0 && (h("sd-text-link", { key: '9b43c82c1a5d425e5b187e92b4259e7d919491e3', icon: "reset", iconColor: CHIP_INPUT_RESET.iconColor, label: "\uC785\uB825 \uCD08\uAE30\uD654", underline: true, disabled: this.disabled, style: { '--sd-text-link-color': CHIP_INPUT_RESET.labelColor }, onSdClick: this.handleResetInput })))), showDropdown && (h("sd-portal", { key: 'aa205aacbbafcd8c3d9855268637e6da956d4a74', open: showDropdown, parentRef: this.chipInputRef ?? null, viewportPadding: SdChipInput.SUGGESTIONS_VIEWPORT_PADDING, onSdClose: this.closeSuggestions }, h("div", { key: '26814734f202da3a13e695ae1d0c913ea430b888', class: "sd-chip-input__suggestions", role: "listbox", style: suggestionBoxStyle }, isDropdownLoading && (h("div", { key: 'df80d11b79f67dc6cfe6503b258528efa3752265', class: "sd-chip-input__suggestions-empty", style: suggestionEmptyStyle }, "\uBD88\uB7EC\uC624\uB294 \uC911...")), dropdownItems.map((item, i) => {
448
+ onMouseDown: e => e.preventDefault() }, this.inputValue === '' && h("span", { key: 'f7faa45b57d8e38dda8cc98119357f92d914fee4', class: "sd-chip-input__divider" }), this.maxCount != null && (h("span", { key: 'dfde4ea82558414614fb2d817f7bfa1fb5d4bf5f', class: "sd-chip-input__max-count" }, "\uCD5C\uB300 ", this.maxCount, "\uAC1C")), this.useReset && this.internalValues.length > 0 && (h("sd-text-link", { key: '9b43c82c1a5d425e5b187e92b4259e7d919491e3', icon: "reset", iconColor: CHIP_INPUT_RESET.iconColor, label: "\uC785\uB825 \uCD08\uAE30\uD654", underline: true, disabled: this.disabled, style: { '--sd-text-link-color': CHIP_INPUT_RESET.labelColor }, onSdClick: this.handleResetInput })))), showDropdown && (h("sd-portal", { key: 'aa205aacbbafcd8c3d9855268637e6da956d4a74', open: showDropdown, parentRef: this.chipInputRef ?? null, viewportPadding: SdChipInput.SUGGESTIONS_VIEWPORT_PADDING, onSdClose: this.closeSuggestions }, h("div", { key: '26814734f202da3a13e695ae1d0c913ea430b888', class: "sd-chip-input__suggestions", role: "listbox", style: suggestionBoxStyle }, isDropdownLoading && (h("div", { key: 'df80d11b79f67dc6cfe6503b258528efa3752265', class: "sd-chip-input__suggestions-empty", style: suggestionEmptyStyle }, "\uBD88\uB7EC\uC624\uB294 \uC911...")), showRecommendations ? (h("div", { style: {
449
+ display: 'flex',
450
+ flexWrap: 'wrap',
451
+ gap: '8px',
452
+ padding: '12px',
453
+ } }, recommendedItems.map((item, i) => {
454
+ const isSelected = (this.internalValues ?? []).includes(item);
455
+ const isActive = i === this.activeSuggestionIndex && !isSelected;
456
+ return (h("div", { key: item, role: "option", tabIndex: -1, "aria-selected": isSelected || isActive, "aria-disabled": isSelected ? 'true' : undefined, style: {
457
+ cursor: isSelected ? 'default' : 'pointer',
458
+ borderRadius: '999px',
459
+ outline: isActive ? '2px solid #0075FF' : undefined,
460
+ outlineOffset: '1px',
461
+ }, onMouseDown: e => {
462
+ e.preventDefault();
463
+ if (!isSelected)
464
+ this.addChip(item);
465
+ } }, h("sd-chip", { value: item, disabled: isSelected, editable: false, showRemove: false })));
466
+ }))) : (dropdownItems.map((item, i) => {
449
467
  const isSelected = (this.internalValues ?? []).includes(item);
450
468
  const isActive = i === this.activeSuggestionIndex && !isSelected;
451
469
  return (h("div", { key: item, class: {
@@ -471,7 +489,7 @@ export class SdChipInput {
471
489
  if (!isSelected)
472
490
  this.addChip(item);
473
491
  } }, h("span", { style: { flex: '1' } }, item), isSelected && (h("sd-icon", { name: "check", size: "12", style: { color: '#0075FF', flexShrink: '0' } }))));
474
- })))))));
492
+ }))))))));
475
493
  }
476
494
  static get is() { return "sd-chip-input"; }
477
495
  static get originalStyleUrls() {
@@ -66,16 +66,16 @@ export class SdGhostButton {
66
66
  const accessibleName = (this.ariaLabel ?? '').trim() || undefined;
67
67
  const tooltipText = (this.tooltipText ?? '').trim();
68
68
  const hasTooltip = tooltipText.length > 0;
69
- return (h("button", { key: 'a49c5b93f4dfcd434c20225acae4c7454e8f8e4f', class: {
69
+ return (h("button", { key: '6e5bcbc740d561702ce8849dfc4fb5a1ee3e5406', class: {
70
70
  'sd-ghost-button': true,
71
71
  'sd-ghost-button--disabled': this.disabled,
72
- }, type: "button", disabled: this.disabled, "aria-label": accessibleName, style: {
72
+ }, type: "button", "aria-disabled": this.disabled ? 'true' : undefined, tabIndex: this.disabled ? -1 : undefined, "aria-label": accessibleName, style: {
73
73
  '--sd-ghost-button-size': `${sizeConfig.size}px`,
74
74
  '--sd-ghost-button-radius': `${GHOST_BUTTON_RADIUS[size]}px`,
75
75
  '--sd-ghost-button-hover-bg': GHOST_BUTTON_HOVER_BG_COLORS[intent],
76
76
  '--sd-ghost-button-hover-opacity': GHOST_BUTTON_HOVER_OPACITY,
77
77
  '--sd-ghost-button-accent': GHOST_BUTTON_FOCUS_RING_COLOR,
78
- }, onClick: this.handleClick, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, onFocus: this.handleFocus, onBlur: this.handleBlur }, hasTooltip && this.isTooltipOpen && !this.disabled && (h("sd-portal", { key: '36ef78d79a99da1fd26c282ef68293b9fb9f87b1', parentRef: this.hostEl, open: true, offset: [sizeConfig.size / 2, 4], placement: "top" }, h("div", { key: 'a0cf8b4e84a79841ab09e6a81ee6bcbfe57e6805', class: "sd-ghost-button__tooltip-inner", "aria-hidden": "true" }, h("sd-tag", { key: 'a263167142b891add0a32900504f541dcb3a4959', name: "square_xs_grey", label: tooltipText })))), h("sd-icon", { key: 'ba90e9b489b4f43577313052635db598e3d30037', name: this.icon, size: sizeConfig.icon, color: contentColor })));
78
+ }, onClick: this.handleClick, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, onFocus: this.handleFocus, onBlur: this.handleBlur }, hasTooltip && this.isTooltipOpen && (h("sd-portal", { key: '2a55efb24a478982d60b3c292f601feacfc46625', parentRef: this.hostEl, open: true, offset: [sizeConfig.size / 2, 4], placement: "top" }, h("div", { key: '9ad100ef8c67ec000ab7f9bafd85adf65f66d725', class: "sd-ghost-button__tooltip-inner", "aria-hidden": "true" }, h("sd-tag", { key: '1c0972bad91a4ee406087745c7671e6ad82bc7bc', name: "square_xs_grey", label: tooltipText })))), h("sd-icon", { key: '93d10ee62828ad2b9fa93ae9f717cb9e4da6a107', name: this.icon, size: sizeConfig.icon, color: contentColor })));
79
79
  }
80
80
  static get is() { return "sd-ghost-button"; }
81
81
  static get originalStyleUrls() {
@@ -1 +1 @@
1
- export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-CCCwPJ5p.js";import{c as t}from"./p-DRVnqiWc.js";let n=null;function e(t,n){void 0!==n&&(void 0!==n.position&&t.setAttribute("position",n.position),null!=n.maxVisible&&t.setAttribute("max-visible",n.maxVisible+""),null!=n.defaultDuration&&t.setAttribute("default-duration",n.defaultDuration+""),null!=n.zIndex&&t.setAttribute("z-index",n.zIndex+""))}function i(t){return n&&document.body.contains(n)?(e(n,t),n):(n=document.createElement("sd-toast-container"),e(n,t),document.body.appendChild(n),n)}function o(t){return"function"==typeof t.create?Promise.resolve():new Promise((n=>{const e=()=>{"function"==typeof t.create?n():requestAnimationFrame(e)};requestAnimationFrame(e)}))}const c={async create(t,n,e){const{globalOptions:s,...r}=e??{},c=i(s);return await o(c),c.create({message:t,type:n,...r})},async dismiss(t){if(null!=n)return await o(n),n.dismiss(t)},async dismissAll(){if(null!=n)return await o(n),n.dismissAll()},configure(t){i(t)}},u="sd-modal-container";let d=null;const l={ok:"confirm",cancel:"cancel",close:"close"};class m{modalId;okFn;cancelFn;closeFn;clickFn;submitFn;dismissedFn;containerRef;pendingActions=[];dismissRequested=!1;constructor(t,n){this.modalId=t,this.containerRef=n}onOk(t){return this.okFn=t,this}onCancel(t){return this.cancelFn=t,this}onClose(t){return this.closeFn=t,this}onClick(t){return this.clickFn=t,this}onSubmit(t){return this.submitFn=t,this}onDismissed(t){return this.dismissedFn=t,this}update(t){return this.runOrQueue((()=>{this.containerRef?.update(this.modalId,t)})),this}ok(){return this.dismiss("ok")}cancel(){return this.dismiss("cancel")}close(){return this.dismiss("close")}dismiss(t="close"){if(this.dismissRequested)return this;this.dismissRequested=!0;const n=l[t];return this.runOrQueue((()=>{this.containerRef?.dismissById(this.modalId,n)})),this}_hasSubmit(){return null!=this.submitFn}_triggerOk(){this.okFn?.()}_triggerSubmit(){this.submitFn?.()}_triggerCancel(){this.cancelFn?.()}_triggerClose(){this.closeFn?.()}_triggerClick(){this.clickFn?.()}_triggerDismissed(){this.dismissedFn?.()}_setId(t){this.modalId=t;const n=[...this.pendingActions];this.pendingActions=[],n.forEach((t=>t()))}_setContainer(t){this.containerRef=t}runOrQueue(t){""===this.modalId||null==this.containerRef?this.pendingActions.push(t):t()}}function h(){if("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof customElements)throw Error("[sdModal] Browser APIs are unavailable. Use `sdModal` only on the client.")}function f(){if(h(),function(){if(!customElements.get(u))throw Error("[sdModal] `sd-modal-container` is not registered. Call `defineCustomElements(window)` before using `sdModal`.")}(),d&&d.isConnected)return d;const t=document.createElement(u);return t.setAttribute("auto-remove",""),document.body.appendChild(t),d=t,t}async function w(t){if(await customElements.whenDefined(u),"function"==typeof t.open)return Promise.resolve();throw Error("[sdModal] `sd-modal-container` is registered but not ready to open dialogs.")}function p(){return new m("")}function y(t,n){const{component:e,persistent:s}=n,i=f(),o={persistent:s};t._setContainer(i),w(i).then((async()=>{const n=await i.createCustom(e,o,t);t._setId(n)}))}const C={confirm(t){const n=f(),e=new m("",n);return w(n).then((async()=>{const s=await n.open(t,e);e._setId(s)})),e},loading(t={}){const n=f(),e=new m("",n);return w(n).then((async()=>{const s=await n.openLoading(t,e);e._setId(s)})),e},create(t){const n=p();return y(n,t),n},configure(n){h(),t(n)}},E="sd-loading-container";let k=null;async function P(t){const n=(function(){if("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof customElements)throw Error("[sdLoading] Browser APIs are unavailable. Use `sdLoading` only on the client.")}(),function(){if(!customElements.get(E))throw Error("[sdLoading] `sd-loading-container` is not registered. Call `defineCustomElements(window)` before using `sdLoading`.")}(),k&&document.body.contains(k)||(k=document.createElement(E),document.body.appendChild(k)),k);await customElements.whenDefined(E),t(n)}const _={show(t={}){P((n=>{n.show?.(t)}))},hide(){k&&P((t=>{t.hide?.()}))}};export{y as _attachSdModalWithRef,p as _createSdModalRef,_ as sdLoading,C as sdModal,c as sdToast}
1
+ export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-CEVDmQdt.js";import{c as t}from"./p-DRVnqiWc.js";let n=null;function e(t,n){void 0!==n&&(void 0!==n.position&&t.setAttribute("position",n.position),null!=n.maxVisible&&t.setAttribute("max-visible",n.maxVisible+""),null!=n.defaultDuration&&t.setAttribute("default-duration",n.defaultDuration+""),null!=n.zIndex&&t.setAttribute("z-index",n.zIndex+""))}function i(t){return n&&document.body.contains(n)?(e(n,t),n):(n=document.createElement("sd-toast-container"),e(n,t),document.body.appendChild(n),n)}function o(t){return"function"==typeof t.create?Promise.resolve():new Promise((n=>{const e=()=>{"function"==typeof t.create?n():requestAnimationFrame(e)};requestAnimationFrame(e)}))}const c={async create(t,n,e){const{globalOptions:s,...r}=e??{},c=i(s);return await o(c),c.create({message:t,type:n,...r})},async dismiss(t){if(null!=n)return await o(n),n.dismiss(t)},async dismissAll(){if(null!=n)return await o(n),n.dismissAll()},configure(t){i(t)}},u="sd-modal-container";let d=null;const l={ok:"confirm",cancel:"cancel",close:"close"};class m{modalId;okFn;cancelFn;closeFn;clickFn;submitFn;dismissedFn;containerRef;pendingActions=[];dismissRequested=!1;constructor(t,n){this.modalId=t,this.containerRef=n}onOk(t){return this.okFn=t,this}onCancel(t){return this.cancelFn=t,this}onClose(t){return this.closeFn=t,this}onClick(t){return this.clickFn=t,this}onSubmit(t){return this.submitFn=t,this}onDismissed(t){return this.dismissedFn=t,this}update(t){return this.runOrQueue((()=>{this.containerRef?.update(this.modalId,t)})),this}ok(){return this.dismiss("ok")}cancel(){return this.dismiss("cancel")}close(){return this.dismiss("close")}dismiss(t="close"){if(this.dismissRequested)return this;this.dismissRequested=!0;const n=l[t];return this.runOrQueue((()=>{this.containerRef?.dismissById(this.modalId,n)})),this}_hasSubmit(){return null!=this.submitFn}_triggerOk(){this.okFn?.()}_triggerSubmit(){this.submitFn?.()}_triggerCancel(){this.cancelFn?.()}_triggerClose(){this.closeFn?.()}_triggerClick(){this.clickFn?.()}_triggerDismissed(){this.dismissedFn?.()}_setId(t){this.modalId=t;const n=[...this.pendingActions];this.pendingActions=[],n.forEach((t=>t()))}_setContainer(t){this.containerRef=t}runOrQueue(t){""===this.modalId||null==this.containerRef?this.pendingActions.push(t):t()}}function h(){if("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof customElements)throw Error("[sdModal] Browser APIs are unavailable. Use `sdModal` only on the client.")}function f(){if(h(),function(){if(!customElements.get(u))throw Error("[sdModal] `sd-modal-container` is not registered. Call `defineCustomElements(window)` before using `sdModal`.")}(),d&&d.isConnected)return d;const t=document.createElement(u);return t.setAttribute("auto-remove",""),document.body.appendChild(t),d=t,t}async function w(t){if(await customElements.whenDefined(u),"function"==typeof t.open)return Promise.resolve();throw Error("[sdModal] `sd-modal-container` is registered but not ready to open dialogs.")}function p(){return new m("")}function y(t,n){const{component:e,persistent:s}=n,i=f(),o={persistent:s};t._setContainer(i),w(i).then((async()=>{const n=await i.createCustom(e,o,t);t._setId(n)}))}const E={confirm(t){const n=f(),e=new m("",n);return w(n).then((async()=>{const s=await n.open(t,e);e._setId(s)})),e},loading(t={}){const n=f(),e=new m("",n);return w(n).then((async()=>{const s=await n.openLoading(t,e);e._setId(s)})),e},create(t){const n=p();return y(n,t),n},configure(n){h(),t(n)}},C="sd-loading-container";let k=null;async function _(t){const n=(function(){if("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof customElements)throw Error("[sdLoading] Browser APIs are unavailable. Use `sdLoading` only on the client.")}(),function(){if(!customElements.get(C))throw Error("[sdLoading] `sd-loading-container` is not registered. Call `defineCustomElements(window)` before using `sdLoading`.")}(),k&&document.body.contains(k)||(k=document.createElement(C),document.body.appendChild(k)),k);await customElements.whenDefined(C),t(n)}const A={show(t={}){_((n=>{n.show?.(t)}))},hide(){k&&_((t=>{t.hide?.()}))}};export{y as _attachSdModalWithRef,p as _createSdModalRef,A as sdLoading,E as sdModal,c as sdToast}
@@ -1 +1 @@
1
- import{p as d,H as i,c as r,h as e,t as o}from"./p-CCCwPJ5p.js";import{d as a}from"./p-BFlmHQm9.js";const s=d(class extends i{constructor(d){super(),!1!==d&&this.__registerHost(),this.change=r(this,"sdUpdate",7)}value;options=[];direction="vertical";disabled=!1;groupName;change;valueChanged(d){this.value=d}handleRadioChange=d=>{if(this.disabled)return;const i=this.options.find((i=>String(i.value)===String(d))),r=i?i.value:d;this.value=r,this.change?.emit(r)};getGroupClasses(){return["sd-radio-group",`sd-radio-group--${this.direction??"vertical"}`].join(" ")}render(){return e("div",{key:"3a1694daddf5794a1598838c44bc965de2976770",class:this.getGroupClasses(),role:"radiogroup"},this.options.map((d=>e("sd-radio",{key:`radio-${d.value}`,val:String(d.value),value:String(this.value),label:d.label,disabled:this.disabled||!!d.disabled,onSdUpdate:({detail:d})=>this.handleRadioChange(d)}))))}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return'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);display:inline-flex;flex-direction:column}sd-radio .sd-radio__label::before{content:attr(data-label);height:0;font-weight:var(--sd-radio-selected-font-weight);visibility:hidden;overflow:hidden;user-select:none;pointer-events:none}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__label{font-weight:var(--sd-radio-selected-font-weight)}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__label{color:var(--sd-radio-label-disabled-color)}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}'}},[512,"sd-radio-group",{value:[1032],options:[1040],direction:[1],disabled:[4],groupName:[1,"group-name"]},void 0,{value:[{valueChanged:0}]}]);function t(){"undefined"!=typeof customElements&&["sd-radio-group","sd-radio"].forEach((d=>{switch(d){case"sd-radio-group":customElements.get(o(d))||customElements.define(o(d),s);break;case"sd-radio":customElements.get(o(d))||a()}}))}export{s as S,t as d}
1
+ import{p as d,H as i,c as r,h as e,t as o}from"./p-CEVDmQdt.js";import{d as a}from"./p-Dj1iJxUT.js";const s=d(class extends i{constructor(d){super(),!1!==d&&this.__registerHost(),this.change=r(this,"sdUpdate",7)}value;options=[];direction="vertical";disabled=!1;groupName;change;valueChanged(d){this.value=d}handleRadioChange=d=>{if(this.disabled)return;const i=this.options.find((i=>String(i.value)===String(d))),r=i?i.value:d;this.value=r,this.change?.emit(r)};getGroupClasses(){return["sd-radio-group",`sd-radio-group--${this.direction??"vertical"}`].join(" ")}render(){return e("div",{key:"3a1694daddf5794a1598838c44bc965de2976770",class:this.getGroupClasses(),role:"radiogroup"},this.options.map((d=>e("sd-radio",{key:`radio-${d.value}`,val:String(d.value),value:String(this.value),label:d.label,disabled:this.disabled||!!d.disabled,onSdUpdate:({detail:d})=>this.handleRadioChange(d)}))))}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return'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);display:inline-flex;flex-direction:column}sd-radio .sd-radio__label::before{content:attr(data-label);height:0;font-weight:var(--sd-radio-selected-font-weight);visibility:hidden;overflow:hidden;user-select:none;pointer-events:none}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__label{font-weight:var(--sd-radio-selected-font-weight)}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__label{color:var(--sd-radio-label-disabled-color)}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}'}},[512,"sd-radio-group",{value:[1032],options:[1040],direction:[1],disabled:[4],groupName:[1,"group-name"]},void 0,{value:[{valueChanged:0}]}]);function t(){"undefined"!=typeof customElements&&["sd-radio-group","sd-radio"].forEach((d=>{switch(d){case"sd-radio-group":customElements.get(o(d))||customElements.define(o(d),s);break;case"sd-radio":customElements.get(o(d))||a()}}))}export{s as S,t as d}
@@ -1 +1 @@
1
- import{p as t,H as s,h as e,d as o,t as i}from"./p-CCCwPJ5p.js";import{T as a}from"./p-sZMi_32I.js";const c=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get el(){return this}rows=[];tableId="";topSpacerHeight=0;bottomSpacerHeight=0;tableEl=null;handleRowsChange(t){const s=t??[];this.tableEl?.setRowCountSync&&this.tableEl.setRowCountSync(s.length)}componentWillLoad(){this.syncTableContext(),this.rows=this.rows??[],this.tableEl?.setRowCountSync&&this.tableEl.setRowCountSync(this.rows.length),this.el.setSpacersSync=(t,s)=>{this.topSpacerHeight=t,this.bottomSpacerHeight=s}}componentDidLoad(){this.syncTableContext()}syncTableContext(){const t=this.el.closest("sd-table"),s=this.el.getRootNode(),e=s instanceof ShadowRoot?s.host:null,o=t??e;this.tableEl=o;const i=o?.getTableIdSync?.(),c=o?.getAttribute(a),d=(null!=i&&""!==i&&"undefined"!==i?i:null)??(null!=c&&""!==c&&"undefined"!==c?c:null)??"";""!==d&&d!==this.tableId&&(this.tableId=d)}render(){return e(o,{key:"0f85168b22221551714f3c75bd12c366538cc5ec",slot:`${this.tableId}-body`},e("tbody",{key:"f9a8528d40c51988cfbca2c349905dafdafce8d3",class:{tbody:!0}},[this.topSpacerHeight>0&&e("tr",{key:"spacer-top",class:"tbody__spacer",style:{height:`${this.topSpacerHeight}px`,display:"block"}}),e("slot",{key:"7ecfe2f730b4c909d394fdee2d9aa015c5410cb4"}),this.bottomSpacerHeight>0&&e("tr",{key:"spacer-bottom",class:"tbody__spacer",style:{height:`${this.bottomSpacerHeight}px`,display:"block"}})]))}static get watchers(){return{rows:[{handleRowsChange:0}]}}static get style(){return":host{display:contents}:host *{box-sizing:border-box}.tbody{display:table-row-group}"}},[769,"sd-tbody",{rows:[16],tableId:[32],topSpacerHeight:[32],bottomSpacerHeight:[32]},void 0,{rows:[{handleRowsChange:0}]}]);function d(){"undefined"!=typeof customElements&&["sd-tbody"].forEach((t=>{"sd-tbody"===t&&(customElements.get(i(t))||customElements.define(i(t),c))}))}export{c as S,d}
1
+ import{p as t,H as s,h as e,d as o,t as i}from"./p-CEVDmQdt.js";import{T as a}from"./p-sZMi_32I.js";const d=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get el(){return this}rows=[];tableId="";topSpacerHeight=0;bottomSpacerHeight=0;tableEl=null;handleRowsChange(t){const s=t??[];this.tableEl?.setRowCountSync&&this.tableEl.setRowCountSync(s.length)}componentWillLoad(){this.syncTableContext(),this.rows=this.rows??[],this.tableEl?.setRowCountSync&&this.tableEl.setRowCountSync(this.rows.length),this.el.setSpacersSync=(t,s)=>{this.topSpacerHeight=t,this.bottomSpacerHeight=s}}componentDidLoad(){this.syncTableContext()}syncTableContext(){const t=this.el.closest("sd-table"),s=this.el.getRootNode(),e=s instanceof ShadowRoot?s.host:null,o=t??e;this.tableEl=o;const i=o?.getTableIdSync?.(),d=o?.getAttribute(a),c=(null!=i&&""!==i&&"undefined"!==i?i:null)??(null!=d&&""!==d&&"undefined"!==d?d:null)??"";""!==c&&c!==this.tableId&&(this.tableId=c)}render(){return e(o,{key:"0f85168b22221551714f3c75bd12c366538cc5ec",slot:`${this.tableId}-body`},e("tbody",{key:"f9a8528d40c51988cfbca2c349905dafdafce8d3",class:{tbody:!0}},[this.topSpacerHeight>0&&e("tr",{key:"spacer-top",class:"tbody__spacer",style:{height:`${this.topSpacerHeight}px`,display:"block"}}),e("slot",{key:"7ecfe2f730b4c909d394fdee2d9aa015c5410cb4"}),this.bottomSpacerHeight>0&&e("tr",{key:"spacer-bottom",class:"tbody__spacer",style:{height:`${this.bottomSpacerHeight}px`,display:"block"}})]))}static get watchers(){return{rows:[{handleRowsChange:0}]}}static get style(){return":host{display:contents}:host *{box-sizing:border-box}.tbody{display:table-row-group}"}},[769,"sd-tbody",{rows:[16],tableId:[32],topSpacerHeight:[32],bottomSpacerHeight:[32]},void 0,{rows:[{handleRowsChange:0}]}]);function c(){"undefined"!=typeof customElements&&["sd-tbody"].forEach((t=>{"sd-tbody"===t&&(customElements.get(i(t))||customElements.define(i(t),d))}))}export{d as S,c as d}
@@ -0,0 +1 @@
1
+ import{h as t}from"./p-CEVDmQdt.js";const o=o=>t("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o},t("path",{d:"M8.83205 10.7519C8.43623 11.3457 7.56377 11.3457 7.16795 10.7519L1.04907e-06 -1.39876e-06L16 0L8.83205 10.7519Z",fill:"currentColor"}));export{o as T}
@@ -1 +1 @@
1
- import{p as t,H as e,c as s,h as i,t as o}from"./p-CCCwPJ5p.js";import{n as r}from"./p-CCwNgVmC.js";import{d as l}from"./p-D7StBSjK.js";import{d as a}from"./p-BpQwjSB8.js";import{d as h}from"./p-BwTsP0Ak.js";import{d}from"./p-Cj_1bYZF.js";import{d as n}from"./p-Cjf8PHEl.js";import{d as c}from"./p-CCO1WtEj.js";import{d as p}from"./p-S2-XqY2R.js";import{d as u}from"./p-OjchKJGr.js";import{d as m}from"./p-CwSlRPMm.js";import{d as b}from"./p-DFbj6d3L.js";import{d as f}from"./p-Bm3NWPaP.js";import{d as g}from"./p-JMuxVcTW.js";import{d as w}from"./p-Cdzn78dP.js";const S=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}type="default";value=null;options=[];placeholder="선택";dropdownWidth="";maxDropdownWidth="640px";dropdownHeight="260px";disabled=!1;label="";labelWidth="";addonLabel="";addonAlign="start";error=!1;hint="";errorMessage="";rules=[];icon=void 0;labelTooltip="";labelTooltipProps=null;emitValue=!1;width="";useSearch=!1;allSelectedLabel="전체";useSelectAll=!1;isOpen=!1;isAnimatingOut=!1;triggerWidth="200px";resolvedDropdownHeight="260px";resolvedMaxDropdownWidth="640px";focused=!1;hovered=!1;update;dropDownShow;async sdFocus(){this.disabled||await(this.triggerComponentRef?.sdFocus())}async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.disabled||this.isOpen||(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)}triggerRef;triggerComponentRef;closeAnimationTimer;name=r();triggerHasFocus=!1;watchIsOpen(t){this.syncFocusedState(t),this.dropDownShow.emit({isOpen:t})}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}get displayText(){if(this.isMulti){if(!Array.isArray(this.value)||0===this.value.length)return"";const t=this.getNonDisabledLeaves(this.options),e=this.getSelectedOptions();if(t.length>0&&t.every((t=>e.some((e=>e.value===t.value)))))return this.allSelectedLabel??"전체";const s=this.flattenOptions(this.options);return this.value.map((t=>{if(null!=t&&"object"==typeof t){const e=t;return e.label??s.find((t=>t.value===e.value))?.label??""}return s.find((e=>e.value===t))?.label??""})).filter(Boolean).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);return t.find((t=>t.value===this.value))?.label??""}flattenOptions(t){return t.flatMap((t=>t.children?this.flattenOptions(t.children):[t]))}getNonDisabledLeaves(t){return t.flatMap((t=>t.disabled?[]:t.children?this.getNonDisabledLeaves(t.children):[t]))}getSelectedOptions(){const t=this.value;return null!=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),l=Math.max(window.innerHeight-e.bottom-s-i,0),a=Math.max(e.top-s-i,0),h=Math.max(l,a),d=Math.max(window.innerWidth-2*s,0);this.resolvedDropdownHeight=`${Math.min(o,h)}px`,this.resolvedMaxDropdownWidth=`${Math.min(r,d)}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))}prepareDropdownGeometry(){this.triggerRef&&(this.triggerWidth=`${this.triggerRef.offsetWidth}px`),this.updateDropdownViewportConstraints()}syncFocusedState(t=this.isOpen){this.focused=t||this.triggerHasFocus}handleTriggerFocus=()=>{this.triggerHasFocus=!0,this.syncFocusedState()};handleTriggerBlur=()=>{this.triggerHasFocus=!1,this.syncFocusedState()};handleTriggerClick=()=>{this.isOpen?this.closeDropdown():(this.prepareDropdownGeometry(),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:"3387dc16a6f54bfae652338c71c4c0e1553828c9",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,onMouseEnter:()=>{this.hovered=!0},onMouseLeave:()=>{this.hovered=!1}},i("div",{key:"124325f8f6882a3c9ee1a1795ee969f13d67dfe2",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"2e0e44ae666282d3931f9889650a7999929a312b",ref:t=>{this.triggerComponentRef=t},displayText:this.displayText,placeholder:this.placeholder??"선택",disabled:this.disabled,isOpen:this.isOpen,onSdTriggerClick:this.handleTriggerClick,onSdTriggerFocus:this.handleTriggerFocus,onSdTriggerBlur:this.handleTriggerBlur})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"b6e97e43c5ea3a06fbb2976dab52d4f544822ae0",...e},i("sd-select-listbox",{key:"3d8a01c54667149507db2757d81813d2f285b32d",type:this.type,options:this.options,value:this.value,emitValue:this.emitValue,useSearch:this.useSearch,useSelectAll:this.useSelectAll,triggerWidth:this.dropdownWidth||this.triggerWidth,maxWidth:this.resolvedMaxDropdownWidth,maxHeight:this.resolvedDropdownHeight,onSdOptionSelect:t=>this.handleOptionSelect(t.detail)})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}"}},[512,"sd-select",{type:[1],value:[1032],options:[16],placeholder:[1],dropdownWidth:[1,"dropdown-width"],maxDropdownWidth:[1,"max-dropdown-width"],dropdownHeight:[1,"dropdown-height"],disabled:[4],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],error:[1028],hint:[1],errorMessage:[1,"error-message"],rules:[16],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],emitValue:[4,"emit-value"],width:[8],useSearch:[4,"use-search"],allSelectedLabel:[1,"all-selected-label"],useSelectAll:[4,"use-select-all"],name:[1],isOpen:[32],isAnimatingOut:[32],triggerWidth:[32],resolvedDropdownHeight:[32],resolvedMaxDropdownWidth:[32],focused:[32],hovered:[32],sdFocus:[64],sdOpen:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function T(){"undefined"!=typeof customElements&&["sd-select","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-select-list-item","sd-select-list-item-search","sd-select-listbox","sd-select-trigger","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-select":customElements.get(o(t))||customElements.define(o(t),S);break;case"sd-button":customElements.get(o(t))||l();break;case"sd-checkbox":customElements.get(o(t))||a();break;case"sd-field":customElements.get(o(t))||h();break;case"sd-floating-portal":customElements.get(o(t))||d();break;case"sd-ghost-button":customElements.get(o(t))||n();break;case"sd-icon":customElements.get(o(t))||c();break;case"sd-portal":customElements.get(o(t))||p();break;case"sd-select-list-item":customElements.get(o(t))||u();break;case"sd-select-list-item-search":customElements.get(o(t))||m();break;case"sd-select-listbox":customElements.get(o(t))||b();break;case"sd-select-trigger":customElements.get(o(t))||f();break;case"sd-tag":customElements.get(o(t))||g();break;case"sd-tooltip":customElements.get(o(t))||w()}}))}export{S,T as d}
1
+ import{p as t,H as e,c as s,h as i,t as o}from"./p-CEVDmQdt.js";import{n as r}from"./p-CCwNgVmC.js";import{d as h}from"./p-C3rOud8J.js";import{d as l}from"./p-D3dq5pt5.js";import{d as a}from"./p-BFMUpKa2.js";import{d}from"./p-BJMpxQSk.js";import{d as n}from"./p-BdFwmTyS.js";import{d as c}from"./p-BnhzUsGP.js";import{d as p}from"./p-ChwRSZ6R.js";import{d as u}from"./p-BwgUEhOa.js";import{d as m}from"./p-DfKZyde8.js";import{d as g}from"./p-IMWw_SJ1.js";import{d as b}from"./p-iORPryb0.js";import{d as f}from"./p-CGJ1L8_Y.js";import{d as w}from"./p-CpBPNHYe.js";const S=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}type="default";value=null;options=[];placeholder="선택";dropdownWidth="";maxDropdownWidth="640px";dropdownHeight="260px";disabled=!1;label="";labelWidth="";addonLabel="";addonAlign="start";error=!1;hint="";errorMessage="";rules=[];icon=void 0;labelTooltip="";labelTooltipProps=null;emitValue=!1;width="";useSearch=!1;allSelectedLabel="전체";useSelectAll=!1;isOpen=!1;isAnimatingOut=!1;triggerWidth="200px";resolvedDropdownHeight="260px";resolvedMaxDropdownWidth="640px";focused=!1;hovered=!1;update;dropDownShow;async sdFocus(){this.disabled||await(this.triggerComponentRef?.sdFocus())}async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.disabled||this.isOpen||(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)}triggerRef;triggerComponentRef;closeAnimationTimer;name=r();triggerHasFocus=!1;watchIsOpen(t){this.syncFocusedState(t),this.dropDownShow.emit({isOpen:t})}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}get displayText(){if(this.isMulti){if(!Array.isArray(this.value)||0===this.value.length)return"";const t=this.getNonDisabledLeaves(this.options),e=this.getSelectedOptions();if(t.length>0&&t.every((t=>e.some((e=>e.value===t.value)))))return this.allSelectedLabel??"전체";const s=this.flattenOptions(this.options);return this.value.map((t=>{if(null!=t&&"object"==typeof t){const e=t;return e.label??s.find((t=>t.value===e.value))?.label??""}return s.find((e=>e.value===t))?.label??""})).filter(Boolean).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);return t.find((t=>t.value===this.value))?.label??""}flattenOptions(t){return t.flatMap((t=>t.children?this.flattenOptions(t.children):[t]))}getNonDisabledLeaves(t){return t.flatMap((t=>t.disabled?[]:t.children?this.getNonDisabledLeaves(t.children):[t]))}getSelectedOptions(){const t=this.value;return null!=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),h=Math.max(window.innerHeight-e.bottom-s-i,0),l=Math.max(e.top-s-i,0),a=Math.max(h,l),d=Math.max(window.innerWidth-2*s,0);this.resolvedDropdownHeight=`${Math.min(o,a)}px`,this.resolvedMaxDropdownWidth=`${Math.min(r,d)}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))}prepareDropdownGeometry(){this.triggerRef&&(this.triggerWidth=`${this.triggerRef.offsetWidth}px`),this.updateDropdownViewportConstraints()}syncFocusedState(t=this.isOpen){this.focused=t||this.triggerHasFocus}handleTriggerFocus=()=>{this.triggerHasFocus=!0,this.syncFocusedState()};handleTriggerBlur=()=>{this.triggerHasFocus=!1,this.syncFocusedState()};handleTriggerClick=()=>{this.isOpen?this.closeDropdown():(this.prepareDropdownGeometry(),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:"3387dc16a6f54bfae652338c71c4c0e1553828c9",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,onMouseEnter:()=>{this.hovered=!0},onMouseLeave:()=>{this.hovered=!1}},i("div",{key:"124325f8f6882a3c9ee1a1795ee969f13d67dfe2",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"2e0e44ae666282d3931f9889650a7999929a312b",ref:t=>{this.triggerComponentRef=t},displayText:this.displayText,placeholder:this.placeholder??"선택",disabled:this.disabled,isOpen:this.isOpen,onSdTriggerClick:this.handleTriggerClick,onSdTriggerFocus:this.handleTriggerFocus,onSdTriggerBlur:this.handleTriggerBlur})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"b6e97e43c5ea3a06fbb2976dab52d4f544822ae0",...e},i("sd-select-listbox",{key:"3d8a01c54667149507db2757d81813d2f285b32d",type:this.type,options:this.options,value:this.value,emitValue:this.emitValue,useSearch:this.useSearch,useSelectAll:this.useSelectAll,triggerWidth:this.dropdownWidth||this.triggerWidth,maxWidth:this.resolvedMaxDropdownWidth,maxHeight:this.resolvedDropdownHeight,onSdOptionSelect:t=>this.handleOptionSelect(t.detail)})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}"}},[512,"sd-select",{type:[1],value:[1032],options:[16],placeholder:[1],dropdownWidth:[1,"dropdown-width"],maxDropdownWidth:[1,"max-dropdown-width"],dropdownHeight:[1,"dropdown-height"],disabled:[4],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],error:[1028],hint:[1],errorMessage:[1,"error-message"],rules:[16],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],emitValue:[4,"emit-value"],width:[8],useSearch:[4,"use-search"],allSelectedLabel:[1,"all-selected-label"],useSelectAll:[4,"use-select-all"],name:[1],isOpen:[32],isAnimatingOut:[32],triggerWidth:[32],resolvedDropdownHeight:[32],resolvedMaxDropdownWidth:[32],focused:[32],hovered:[32],sdFocus:[64],sdOpen:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function O(){"undefined"!=typeof customElements&&["sd-select","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-select-list-item","sd-select-list-item-search","sd-select-listbox","sd-select-trigger","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-select":customElements.get(o(t))||customElements.define(o(t),S);break;case"sd-button":customElements.get(o(t))||h();break;case"sd-checkbox":customElements.get(o(t))||l();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))||n();break;case"sd-icon":customElements.get(o(t))||c();break;case"sd-portal":customElements.get(o(t))||p();break;case"sd-select-list-item":customElements.get(o(t))||u();break;case"sd-select-list-item-search":customElements.get(o(t))||m();break;case"sd-select-listbox":customElements.get(o(t))||g();break;case"sd-select-trigger":customElements.get(o(t))||b();break;case"sd-tag":customElements.get(o(t))||f();break;case"sd-tooltip":customElements.get(o(t))||w()}}))}export{S,O as d}
@@ -1 +1 @@
1
- import{p as e,H as d,h as s,t as i}from"./p-CCCwPJ5p.js";import{f as l}from"./p-BOJJ_sQS.js";import{d as t}from"./p-D7StBSjK.js";import{d as o}from"./p-Cj_1bYZF.js";import{d as r}from"./p-Cjf8PHEl.js";import{d as a}from"./p-CCO1WtEj.js";import{d as f}from"./p-S2-XqY2R.js";import{d as n}from"./p-JMuxVcTW.js";import{d as h}from"./p-Cdzn78dP.js";const c={start:"flex-start",center:"center",end:"flex-end"},p=l.field.label.sm,b=l.field.label.md,m={sm:{height:p.height,gap:p.gap,icon:p.icon,fontSize:p.typography.fontSize,lineHeight:p.typography.lineHeight,fontWeight:p.typography.fontWeight},md:{height:b.height,gap:b.gap,icon:b.icon,fontSize:b.typography.fontSize,lineHeight:b.typography.lineHeight,fontWeight:b.typography.fontWeight}},g=["sd-input","sd-barcode-input","sd-textarea","sd-number-input","sd-select","sd-file-picker","sd-date-picker","sd-date-range-picker","sd-chip-input"],_=e(class extends d{constructor(e){super(),!1!==e&&this.__registerHost()}get el(){return this}name="";rules=[];error=!1;disabled=!1;readonly=!1;hovered=!1;focused=!1;status;hint="";errorMessage="";width="";size="sm";label="";labelWidth="";addonLabel="";addonAlign="start";icon=void 0;labelTooltip="";labelTooltipProps=null;errorMsg="";hostElement=null;get value(){return this.hostElement?.value??null}get fieldStatus(){let e="";return this.disabled?(e="disabled",`sd-field--${e}`):this.readonly?(e="readonly",`sd-field--${e}`):this.focused?(e="focus",`sd-field--${e}`):(this.hovered&&(e="hover"),void 0!==this.status&&(e=this.status),this.error&&(e="error"),""!==e?`sd-field--${e}`:"")}componentDidLoad(){this.hostElement=this.findHostElement(),this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}findHostElement(){for(const e of g){const d=this.el.closest(e);if(d&&"value"in d)return d}return null}registerToForm(){const e=this.el.closest("sd-form");e&&"function"==typeof e.componentOnReady&&e.componentOnReady().then((e=>{e.sdRegisterField(this)}))}unregisterFromForm(){if(""===this.name)return;const e=this.el.closest("sd-form");e?.componentOnReady().then((e=>{e.sdUnregisterField(this)}))}async sdValidate(){if(!this.rules||0===this.rules.length)return!0;for(const e of this.rules){const d=e(this.value??"");if(!0!==d)return this.setError(!0,d),!1}return this.setError(!1,""),!0}async sdReset(){this.hostElement&&(this.hostElement.value=null),this.setError(!1,"")}async sdResetValidation(){this.setError(!1,"")}async sdFocus(){this.hostElement?.focus?.(),this.hostElement?.scrollIntoView({behavior:"smooth",block:"center"})}setError(e,d){this.errorMsg=d,this.hostElement&&(this.hostElement.error=e)}render(){const e=this.addonLabel,d=l.field.addonLabel,i=this.size in m?this.size:"sm",t=m[i],o={"--sd-field-wrapper-height":`var(--sd-system-size-field-${i}-height)`,"--sd-field-control-radius":`var(--sd-system-radius-field-${i})`,"--sd-field-label-margin-right":`var(--sd-system-space-field-${i}-gap)`},r={"--sd-field-error-message-color":l.field.errorMessage.color,"--sd-field-error-message-font-size":`${l.field.errorMessage.typography.fontSize}px`,"--sd-field-error-message-line-height":`${l.field.errorMessage.typography.lineHeight}px`,"--sd-field-hint-color":l.field.hint.color,"--sd-field-hint-font-size":`${l.field.hint.typography.fontSize}px`,"--sd-field-hint-line-height":`${l.field.hint.typography.lineHeight}px`,"--sd-field-message-gap":`${l.field.contents.gap}px`},a=""!==this.label?{"--sd-field-label-height":`${t.height}px`,"--sd-field-label-gap":`${t.gap}px`,"--sd-field-label-font-size":`${t.fontSize}px`,"--sd-field-label-line-height":`${t.lineHeight}px`,"--sd-field-label-font-weight":t.fontWeight,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-label-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{},f=""!==e?{"--sd-field-addon-padding-x":`${d.paddingX}px`,"--sd-field-addon-font-size":`${d.typography.fontSize}px`,"--sd-field-addon-line-height":`${d.typography.lineHeight}px`,"--sd-field-addon-font-weight":d.typography.fontWeight,"--sd-field-addon-bg":d.bg,"--sd-field-addon-border-color":this.disabled?d.border.disabled:d.border.default,"--sd-field-addon-gap":`${d.gap}px`,"--sd-field-addon-border-width":`${d.border.width}px`,"--sd-field-addon-justify":c[this.addonAlign]??c.start,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-addon-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{};return s("div",{key:"baf943d77385c9c02e2fe1d938f9622bd858129c",class:{"sd-field":!0,"sd-field--has-label":""!==this.label,"sd-field--has-addon":""!==e,[this.fieldStatus]:""!==this.fieldStatus},style:{...o,...a,...f,...r}},s("div",{key:"f5f204929ef4a4e1a260d7609bc00d9a1fe998f4",class:"sd-field__wrapper"},this.renderLabel(this.label),s("div",{key:"eff02956e5aae08691b2850bb0d1978865a446f9",class:"sd-field__main",style:""!==this.width&&0!==this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},s("div",{key:"bf00b81dbb3d36a8a8ddf4919c9ec3383a1f3f14",class:{"sd-field__control":!0,"sd-field__control--has-addon":""!==e}},e&&s("div",{key:"4cef1308de0b709d5924ff7a02ee5bd3b78c1502",class:"sd-field__addon"},this.icon&&s("sd-icon",{key:"7fdfca555d80f5409082c43967224fd8108a6f29",name:this.icon.name,size:this.icon.size??Number(m[this.size in m?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate}),e),s("slot",{key:"c523813390db6f6f4acce3ffb8377820ffb95fad"})),""!==this.errorMsg||""!==this.errorMessage?s("div",{class:"sd-field__error-message"},""!==this.errorMsg?this.errorMsg:this.errorMessage):""!==this.hint&&s("div",{class:"sd-field__hint"},this.hint))))}renderLabel(e){return null==e||""===e?null:s("label",{class:"sd-field__label"},this.icon&&s("sd-icon",{name:this.icon.name,size:this.icon.size??Number(m[this.size in m?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate,class:"sd-field__label__icon"}),s("div",{class:"sd-field__label__text"},e),this.labelTooltip&&s("sd-tooltip",{class:"sd-field__label__tooltip",...this.labelTooltipProps},this.labelTooltip))}static get style(){return"sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#E1E1E1;border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--readonly .sd-field__wrapper .sd-field__control{background-color:var(--sd-system-color-field-bg-read-only);color:var(--sd-system-color-field-text-read-only)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;flex-shrink:0;width:var(--sd-field-label-width, auto);height:var(--sd-field-label-height);margin-right:var(--sd-field-label-margin-right)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__icon{margin-right:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:var(--sd-field-label-font-size);line-height:var(--sd-field-label-line-height);font-weight:var(--sd-field-label-font-weight);color:var(--sd-system-color-field-text-default);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-addon .sd-field__control .sd-field__addon{display:flex;gap:var(--sd-field-addon-gap);align-items:center;justify-content:var(--sd-field-addon-justify, flex-start);white-space:nowrap;box-sizing:border-box;flex-shrink:0;width:var(--sd-field-addon-width, auto);padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right:var(--sd-field-addon-border-width) solid var(--sd-field-addon-border-color);border-radius:calc(var(--sd-field-control-radius) - 1px) 0 0 calc(var(--sd-field-control-radius) - 1px)}sd-field .sd-field__wrapper{width:100%;display:flex;align-items:flex-start;flex-flow:row nowrap;position:relative;color:var(--sd-system-color-field-text-default);-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__main{flex:1;min-width:0;display:flex;flex-direction:column}sd-field .sd-field__wrapper .sd-field__control{position:relative;height:var(--sd-field-wrapper-height);display:flex;min-width:0;border:1px solid var(--sd-system-color-field-border-default);border-radius:var(--sd-field-control-radius);background:var(--sd-system-color-field-bg-default)}sd-field .sd-field--error .sd-field__wrapper .sd-field__control:not(:hover){border:1px solid var(--sd-system-color-field-border-danger) !important}sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-success) !important}sd-field .sd-field:not(.sd-field--disabled):not(.sd-field--readonly) .sd-field__wrapper .sd-field__control:hover{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--focus:not(.sd-field--readonly) .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field .sd-field__error-message{color:var(--sd-field-error-message-color);font-size:var(--sd-field-error-message-font-size);line-height:var(--sd-field-error-message-line-height);margin-top:var(--sd-field-message-gap)}sd-field .sd-field .sd-field__hint{color:var(--sd-field-hint-color);font-size:var(--sd-field-hint-font-size);line-height:var(--sd-field-hint-line-height);margin-top:var(--sd-field-message-gap)}"}},[772,"sd-field",{name:[1],rules:[16],error:[1028],disabled:[1028],readonly:[1028],hovered:[1028],focused:[1028],status:[1],hint:[1],errorMessage:[1,"error-message"],width:[8],size:[513],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],errorMsg:[32],sdValidate:[64],sdReset:[64],sdResetValidation:[64],sdFocus:[64]}]);function u(){"undefined"!=typeof customElements&&["sd-field","sd-button","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-field":customElements.get(i(e))||customElements.define(i(e),_);break;case"sd-button":customElements.get(i(e))||t();break;case"sd-floating-portal":customElements.get(i(e))||o();break;case"sd-ghost-button":customElements.get(i(e))||r();break;case"sd-icon":customElements.get(i(e))||a();break;case"sd-portal":customElements.get(i(e))||f();break;case"sd-tag":customElements.get(i(e))||n();break;case"sd-tooltip":customElements.get(i(e))||h()}}))}export{_ as S,u as d}
1
+ import{p as e,H as d,h as s,t as i}from"./p-CEVDmQdt.js";import{f as l}from"./p-BOJJ_sQS.js";import{d as t}from"./p-C3rOud8J.js";import{d as r}from"./p-BJMpxQSk.js";import{d as o}from"./p-BdFwmTyS.js";import{d as a}from"./p-BnhzUsGP.js";import{d as f}from"./p-ChwRSZ6R.js";import{d as n}from"./p-CGJ1L8_Y.js";import{d as h}from"./p-CpBPNHYe.js";const c={start:"flex-start",center:"center",end:"flex-end"},p=l.field.label.sm,b=l.field.label.md,m={sm:{height:p.height,gap:p.gap,icon:p.icon,fontSize:p.typography.fontSize,lineHeight:p.typography.lineHeight,fontWeight:p.typography.fontWeight},md:{height:b.height,gap:b.gap,icon:b.icon,fontSize:b.typography.fontSize,lineHeight:b.typography.lineHeight,fontWeight:b.typography.fontWeight}},g=["sd-input","sd-barcode-input","sd-textarea","sd-number-input","sd-select","sd-file-picker","sd-date-picker","sd-date-range-picker","sd-chip-input"],_=e(class extends d{constructor(e){super(),!1!==e&&this.__registerHost()}get el(){return this}name="";rules=[];error=!1;disabled=!1;readonly=!1;hovered=!1;focused=!1;status;hint="";errorMessage="";width="";size="sm";label="";labelWidth="";addonLabel="";addonAlign="start";icon=void 0;labelTooltip="";labelTooltipProps=null;errorMsg="";hostElement=null;get value(){return this.hostElement?.value??null}get fieldStatus(){let e="";return this.disabled?(e="disabled",`sd-field--${e}`):this.readonly?(e="readonly",`sd-field--${e}`):this.focused?(e="focus",`sd-field--${e}`):(this.hovered&&(e="hover"),void 0!==this.status&&(e=this.status),this.error&&(e="error"),""!==e?`sd-field--${e}`:"")}componentDidLoad(){this.hostElement=this.findHostElement(),this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}findHostElement(){for(const e of g){const d=this.el.closest(e);if(d&&"value"in d)return d}return null}registerToForm(){const e=this.el.closest("sd-form");e&&"function"==typeof e.componentOnReady&&e.componentOnReady().then((e=>{e.sdRegisterField(this)}))}unregisterFromForm(){if(""===this.name)return;const e=this.el.closest("sd-form");e?.componentOnReady().then((e=>{e.sdUnregisterField(this)}))}async sdValidate(){if(!this.rules||0===this.rules.length)return!0;for(const e of this.rules){const d=e(this.value??"");if(!0!==d)return this.setError(!0,d),!1}return this.setError(!1,""),!0}async sdReset(){this.hostElement&&(this.hostElement.value=null),this.setError(!1,"")}async sdResetValidation(){this.setError(!1,"")}async sdFocus(){this.hostElement?.focus?.(),this.hostElement?.scrollIntoView({behavior:"smooth",block:"center"})}setError(e,d){this.errorMsg=d,this.hostElement&&(this.hostElement.error=e)}render(){const e=this.addonLabel,d=l.field.addonLabel,i=this.size in m?this.size:"sm",t=m[i],r={"--sd-field-wrapper-height":`var(--sd-system-size-field-${i}-height)`,"--sd-field-control-radius":`var(--sd-system-radius-field-${i})`,"--sd-field-label-margin-right":`var(--sd-system-space-field-${i}-gap)`},o={"--sd-field-error-message-color":l.field.errorMessage.color,"--sd-field-error-message-font-size":`${l.field.errorMessage.typography.fontSize}px`,"--sd-field-error-message-line-height":`${l.field.errorMessage.typography.lineHeight}px`,"--sd-field-hint-color":l.field.hint.color,"--sd-field-hint-font-size":`${l.field.hint.typography.fontSize}px`,"--sd-field-hint-line-height":`${l.field.hint.typography.lineHeight}px`,"--sd-field-message-gap":`${l.field.contents.gap}px`},a=""!==this.label?{"--sd-field-label-height":`${t.height}px`,"--sd-field-label-gap":`${t.gap}px`,"--sd-field-label-font-size":`${t.fontSize}px`,"--sd-field-label-line-height":`${t.lineHeight}px`,"--sd-field-label-font-weight":t.fontWeight,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-label-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{},f=""!==e?{"--sd-field-addon-padding-x":`${d.paddingX}px`,"--sd-field-addon-font-size":`${d.typography.fontSize}px`,"--sd-field-addon-line-height":`${d.typography.lineHeight}px`,"--sd-field-addon-font-weight":d.typography.fontWeight,"--sd-field-addon-bg":d.bg,"--sd-field-addon-border-color":this.disabled?d.border.disabled:d.border.default,"--sd-field-addon-gap":`${d.gap}px`,"--sd-field-addon-border-width":`${d.border.width}px`,"--sd-field-addon-justify":c[this.addonAlign]??c.start,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-addon-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{};return s("div",{key:"baf943d77385c9c02e2fe1d938f9622bd858129c",class:{"sd-field":!0,"sd-field--has-label":""!==this.label,"sd-field--has-addon":""!==e,[this.fieldStatus]:""!==this.fieldStatus},style:{...r,...a,...f,...o}},s("div",{key:"f5f204929ef4a4e1a260d7609bc00d9a1fe998f4",class:"sd-field__wrapper"},this.renderLabel(this.label),s("div",{key:"eff02956e5aae08691b2850bb0d1978865a446f9",class:"sd-field__main",style:""!==this.width&&0!==this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},s("div",{key:"bf00b81dbb3d36a8a8ddf4919c9ec3383a1f3f14",class:{"sd-field__control":!0,"sd-field__control--has-addon":""!==e}},e&&s("div",{key:"4cef1308de0b709d5924ff7a02ee5bd3b78c1502",class:"sd-field__addon"},this.icon&&s("sd-icon",{key:"7fdfca555d80f5409082c43967224fd8108a6f29",name:this.icon.name,size:this.icon.size??Number(m[this.size in m?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate}),e),s("slot",{key:"c523813390db6f6f4acce3ffb8377820ffb95fad"})),""!==this.errorMsg||""!==this.errorMessage?s("div",{class:"sd-field__error-message"},""!==this.errorMsg?this.errorMsg:this.errorMessage):""!==this.hint&&s("div",{class:"sd-field__hint"},this.hint))))}renderLabel(e){return null==e||""===e?null:s("label",{class:"sd-field__label"},this.icon&&s("sd-icon",{name:this.icon.name,size:this.icon.size??Number(m[this.size in m?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate,class:"sd-field__label__icon"}),s("div",{class:"sd-field__label__text"},e),this.labelTooltip&&s("sd-tooltip",{class:"sd-field__label__tooltip",...this.labelTooltipProps},this.labelTooltip))}static get style(){return"sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#E1E1E1;border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--readonly .sd-field__wrapper .sd-field__control{background-color:var(--sd-system-color-field-bg-read-only);color:var(--sd-system-color-field-text-read-only)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;flex-shrink:0;width:var(--sd-field-label-width, auto);height:var(--sd-field-label-height);margin-right:var(--sd-field-label-margin-right)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__icon{margin-right:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:var(--sd-field-label-font-size);line-height:var(--sd-field-label-line-height);font-weight:var(--sd-field-label-font-weight);color:var(--sd-system-color-field-text-default);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-addon .sd-field__control .sd-field__addon{display:flex;gap:var(--sd-field-addon-gap);align-items:center;justify-content:var(--sd-field-addon-justify, flex-start);white-space:nowrap;box-sizing:border-box;flex-shrink:0;width:var(--sd-field-addon-width, auto);padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right:var(--sd-field-addon-border-width) solid var(--sd-field-addon-border-color);border-radius:calc(var(--sd-field-control-radius) - 1px) 0 0 calc(var(--sd-field-control-radius) - 1px)}sd-field .sd-field__wrapper{width:100%;display:flex;align-items:flex-start;flex-flow:row nowrap;position:relative;color:var(--sd-system-color-field-text-default);-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__main{flex:1;min-width:0;display:flex;flex-direction:column}sd-field .sd-field__wrapper .sd-field__control{position:relative;height:var(--sd-field-wrapper-height);display:flex;min-width:0;border:1px solid var(--sd-system-color-field-border-default);border-radius:var(--sd-field-control-radius);background:var(--sd-system-color-field-bg-default)}sd-field .sd-field--error .sd-field__wrapper .sd-field__control:not(:hover){border:1px solid var(--sd-system-color-field-border-danger) !important}sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-success) !important}sd-field .sd-field:not(.sd-field--disabled):not(.sd-field--readonly) .sd-field__wrapper .sd-field__control:hover{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--focus:not(.sd-field--readonly) .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field .sd-field__error-message{color:var(--sd-field-error-message-color);font-size:var(--sd-field-error-message-font-size);line-height:var(--sd-field-error-message-line-height);margin-top:var(--sd-field-message-gap)}sd-field .sd-field .sd-field__hint{color:var(--sd-field-hint-color);font-size:var(--sd-field-hint-font-size);line-height:var(--sd-field-hint-line-height);margin-top:var(--sd-field-message-gap)}"}},[772,"sd-field",{name:[1],rules:[16],error:[1028],disabled:[1028],readonly:[1028],hovered:[1028],focused:[1028],status:[1],hint:[1],errorMessage:[1,"error-message"],width:[8],size:[513],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],errorMsg:[32],sdValidate:[64],sdReset:[64],sdResetValidation:[64],sdFocus:[64]}]);function u(){"undefined"!=typeof customElements&&["sd-field","sd-button","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-field":customElements.get(i(e))||customElements.define(i(e),_);break;case"sd-button":customElements.get(i(e))||t();break;case"sd-floating-portal":customElements.get(i(e))||r();break;case"sd-ghost-button":customElements.get(i(e))||o();break;case"sd-icon":customElements.get(i(e))||a();break;case"sd-portal":customElements.get(i(e))||f();break;case"sd-tag":customElements.get(i(e))||n();break;case"sd-tooltip":customElements.get(i(e))||h()}}))}export{_ as S,u as d}
@@ -1 +1 @@
1
- import{p as t,H as n,c as o,h as e,t as i}from"./p-CCCwPJ5p.js";const a=t(class t extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=o(this,"sdClose",7)}get el(){return this}to="body";parentRef=null;offset=[0,0];zIndex=996;placement="bottom";open=!1;close;container;wrapper;rafId;isInsideClick=!1;resizeObserver;mutationObserver;scrollHandler=()=>this.updatePosition();static ARROW_SIZE=11.2;componentDidLoad(){this.container=this.resolveContainer(),this.createWrapper(),this.moveSlotContent(),requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")})),this.observeParent(),window.addEventListener("scroll",this.scrollHandler,!0)}componentDidRender(){this.wrapper&&(this.open?(this.wrapper.style.display="block",requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")}))):(this.wrapper.style.display="none",this.wrapper.style.visibility="hidden"))}disconnectedCallback(){void 0!==this.rafId&&cancelAnimationFrame(this.rafId),window.removeEventListener("scroll",this.scrollHandler,!0),this.unobserveParent(),this.wrapper?.remove()}resolveContainer(){const t="string"==typeof this.to?document.querySelector(this.to):this.to;return t instanceof n?t:document.body}resolveZIndex(){const t=this.zIndex??996,o=this.parentRef?.closest(".sd-modal-container__layer");if(!o)return t;const e=o.closest(".sd-modal-container"),i=e instanceof n?parseInt(getComputedStyle(e).zIndex,10):NaN,a=Number.isFinite(i)?i:997;return Math.max(t,a+1)}createWrapper(){this.wrapper=document.createElement("div"),Object.assign(this.wrapper.style,{position:"fixed",zIndex:this.resolveZIndex().toString(),transition:"opacity 0.4s",top:"-9999px",left:"-9999px"}),this.container.appendChild(this.wrapper)}moveSlotContent(){this.wrapper&&Array.from(this.el.childNodes).filter((t=>t.nodeType!==Node.COMMENT_NODE)).forEach((t=>this.wrapper.appendChild(t)))}updatePosition(){void 0!==this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{if(!this.parentRef||!this.wrapper)return;const n=this.parentRef.getBoundingClientRect();if(0===n.width&&0===n.height)return;const[o,e]=this.offset??[0,0],i=t.ARROW_SIZE;let a=0,s=0;switch(this.placement??"bottom"){case"top":a=n.top-this.wrapper.offsetHeight+e-i,s=n.left+n.width/2-this.wrapper.offsetWidth/2+o;break;case"bottom":a=n.bottom+e+i,s=n.left+n.width/2-this.wrapper.offsetWidth/2+o;break;case"left":a=n.top+n.height/2-this.wrapper.offsetHeight/2+e,s=n.left-this.wrapper.offsetWidth-o-i;break;case"right":a=n.top+n.height/2-this.wrapper.offsetHeight/2+e,s=n.right+o+i}Object.assign(this.wrapper.style,{top:`${a}px`,left:`${s}px`})}))}observeParent(){this.parentRef&&(this.resizeObserver=new ResizeObserver((()=>this.updatePosition())),this.resizeObserver.observe(this.parentRef),this.mutationObserver=new MutationObserver((()=>this.updatePosition())),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0}))}unobserveParent(){this.resizeObserver?.disconnect(),this.mutationObserver?.disconnect()}handleMouseDown(t){this.isInsideClick=!!(this.wrapper&&this.wrapper.contains(t.target)||this.parentRef&&this.parentRef.contains(t.target))}handleWindowClick(t){this.isInsideClick?this.isInsideClick=!1:this.wrapper?.contains(t.target)||this.close.emit()}handleKeydown(t){"Escape"===t.key&&this.close.emit()}render(){return e("slot",{key:"ee2a502ac1c924abb9be9fae19b4450659515c15"})}static get style(){return".sd-floating-menu{width:fit-content;padding:12px 16px;border-radius:6px;font-size:12px;font-weight:500;line-height:20px;position:relative;box-sizing:border-box;background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);animation:sd-floating-fade-in 0.35s ease-out}.sd-floating-menu--top{animation-name:sd-floating-slide-top}.sd-floating-menu--bottom{animation-name:sd-floating-slide-bottom}.sd-floating-menu--left{animation-name:sd-floating-slide-left}.sd-floating-menu--right{animation-name:sd-floating-slide-right}.sd-floating-menu .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--default{background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);font-weight:500}.sd-floating-menu--default .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--danger{background:var(--sd-floating-bg, #FCE6E6);color:var(--sd-floating-content, #FB4444);font-weight:700}.sd-floating-menu--danger .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FCE6E6)}.sd-floating-menu--warning{background:var(--sd-floating-bg, #FEF1EA);color:var(--sd-floating-content, #FF6B00);font-weight:700}.sd-floating-menu--warning .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FEF1EA)}.sd-floating-menu--accent{background:var(--sd-floating-bg, #E6F1FF);color:var(--sd-floating-content, #0075FF);font-weight:700}.sd-floating-menu--accent .sd-floating-menu__arrow{color:var(--sd-floating-bg, #E6F1FF)}.sd-floating-menu__arrow{position:absolute;display:flex;width:16px;height:12px}.sd-floating-menu__arrow svg{width:100%;height:100%}.sd-floating-menu__arrow--top{bottom:-12px;left:50%;transform:translateX(-50%)}.sd-floating-menu__arrow--bottom{top:-12px;left:50%;transform:translateX(-50%) rotate(180deg)}.sd-floating-menu__arrow--left{right:-12px;top:50%;transform:translateY(-50%) rotate(-90deg)}.sd-floating-menu__arrow--right{left:-12px;top:50%;transform:translateY(-50%) rotate(90deg)}.sd-floating-menu__content{font-size:12px;line-height:20px}.sd-floating-menu__content .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px;margin-bottom:4px}.sd-floating-menu__content .sd-floating-menu__messages{font-weight:500}.sd-floating-menu__content .sd-floating-menu__buttons{margin-top:12px;display:flex;gap:8px;align-items:center;justify-content:flex-end}.sd-floating-menu__content .sd-floating-menu__buttons--with-link{justify-content:space-between}.sd-floating-menu--popover{padding:16px 20px}.sd-floating-menu--popover .sd-floating-menu__content{gap:4px}.sd-floating-menu--popover .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px}.sd-floating-menu--popover .sd-floating-menu__messages{font-size:12px;font-weight:500;line-height:20px}.sd-floating-menu--closing{animation:sd-floating-fade-out 0.15s ease-in forwards}.sd-floating-menu--closing.sd-floating-menu--top{animation-name:sd-floating-slide-out-top}.sd-floating-menu--closing.sd-floating-menu--bottom{animation-name:sd-floating-slide-out-bottom}.sd-floating-menu--closing.sd-floating-menu--left{animation-name:sd-floating-slide-out-left}.sd-floating-menu--closing.sd-floating-menu--right{animation-name:sd-floating-slide-out-right}.sd-floating-menu--has-close .sd-floating-menu__content{padding-right:28px}.sd-floating-menu__close-button{position:absolute;top:12px;right:12px}@keyframes sd-floating-fade-out{from{opacity:1}to{opacity:0}}@keyframes sd-floating-slide-out-top{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}@keyframes sd-floating-slide-out-bottom{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}@keyframes sd-floating-slide-out-left{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(4px)}}@keyframes sd-floating-slide-out-right{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-4px)}}@keyframes sd-floating-fade-in{from{opacity:0}to{opacity:1}}@keyframes sd-floating-slide-top{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes sd-floating-slide-bottom{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes sd-floating-slide-left{from{opacity:0;transform:translateX(4px)}to{opacity:1;transform:translateX(0)}}@keyframes sd-floating-slide-right{from{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:translateX(0)}}"}},[772,"sd-floating-portal",{to:[1],parentRef:[16],offset:[16],zIndex:[2,"z-index"],placement:[1],open:[4]},[[9,"resize","updatePosition"],[9,"mousedown","handleMouseDown"],[8,"click","handleWindowClick"],[8,"keydown","handleKeydown"]]]);function s(){"undefined"!=typeof customElements&&["sd-floating-portal"].forEach((t=>{"sd-floating-portal"===t&&(customElements.get(i(t))||customElements.define(i(t),a))}))}export{a as S,s as d}
1
+ import{p as t,H as n,c as o,h as e,t as i}from"./p-CEVDmQdt.js";const a=t(class t extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=o(this,"sdClose",7)}get el(){return this}to="body";parentRef=null;offset=[0,0];zIndex=996;placement="bottom";open=!1;close;container;wrapper;rafId;isInsideClick=!1;resizeObserver;mutationObserver;scrollHandler=()=>this.updatePosition();static ARROW_SIZE=11.2;componentDidLoad(){this.container=this.resolveContainer(),this.createWrapper(),this.moveSlotContent(),requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")})),this.observeParent(),window.addEventListener("scroll",this.scrollHandler,!0)}componentDidRender(){this.wrapper&&(this.open?(this.wrapper.style.display="block",requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")}))):(this.wrapper.style.display="none",this.wrapper.style.visibility="hidden"))}disconnectedCallback(){void 0!==this.rafId&&cancelAnimationFrame(this.rafId),window.removeEventListener("scroll",this.scrollHandler,!0),this.unobserveParent(),this.wrapper?.remove()}resolveContainer(){const t="string"==typeof this.to?document.querySelector(this.to):this.to;return t instanceof n?t:document.body}resolveZIndex(){const t=this.zIndex??996,o=this.parentRef?.closest(".sd-modal-container__layer");if(!o)return t;const e=o.closest(".sd-modal-container"),i=e instanceof n?parseInt(getComputedStyle(e).zIndex,10):NaN,a=Number.isFinite(i)?i:997;return Math.max(t,a+1)}createWrapper(){this.wrapper=document.createElement("div"),Object.assign(this.wrapper.style,{position:"fixed",zIndex:this.resolveZIndex().toString(),transition:"opacity 0.4s",top:"-9999px",left:"-9999px"}),this.container.appendChild(this.wrapper)}moveSlotContent(){this.wrapper&&Array.from(this.el.childNodes).filter((t=>t.nodeType!==Node.COMMENT_NODE)).forEach((t=>this.wrapper.appendChild(t)))}updatePosition(){void 0!==this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{if(!this.parentRef||!this.wrapper)return;const n=this.parentRef.getBoundingClientRect();if(0===n.width&&0===n.height)return;const[o,e]=this.offset??[0,0],i=t.ARROW_SIZE;let a=0,s=0;switch(this.placement??"bottom"){case"top":a=n.top-this.wrapper.offsetHeight+e-i,s=n.left+n.width/2-this.wrapper.offsetWidth/2+o;break;case"bottom":a=n.bottom+e+i,s=n.left+n.width/2-this.wrapper.offsetWidth/2+o;break;case"left":a=n.top+n.height/2-this.wrapper.offsetHeight/2+e,s=n.left-this.wrapper.offsetWidth-o-i;break;case"right":a=n.top+n.height/2-this.wrapper.offsetHeight/2+e,s=n.right+o+i}Object.assign(this.wrapper.style,{top:`${a}px`,left:`${s}px`})}))}observeParent(){this.parentRef&&(this.resizeObserver=new ResizeObserver((()=>this.updatePosition())),this.resizeObserver.observe(this.parentRef),this.mutationObserver=new MutationObserver((()=>this.updatePosition())),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0}))}unobserveParent(){this.resizeObserver?.disconnect(),this.mutationObserver?.disconnect()}handleMouseDown(t){this.isInsideClick=!!(this.wrapper&&this.wrapper.contains(t.target)||this.parentRef&&this.parentRef.contains(t.target))}handleWindowClick(t){this.isInsideClick?this.isInsideClick=!1:this.wrapper?.contains(t.target)||this.close.emit()}handleKeydown(t){"Escape"===t.key&&this.close.emit()}render(){return e("slot",{key:"ee2a502ac1c924abb9be9fae19b4450659515c15"})}static get style(){return".sd-floating-menu{width:fit-content;padding:12px 16px;border-radius:6px;font-size:12px;font-weight:500;line-height:20px;position:relative;box-sizing:border-box;background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);animation:sd-floating-fade-in 0.35s ease-out}.sd-floating-menu--top{animation-name:sd-floating-slide-top}.sd-floating-menu--bottom{animation-name:sd-floating-slide-bottom}.sd-floating-menu--left{animation-name:sd-floating-slide-left}.sd-floating-menu--right{animation-name:sd-floating-slide-right}.sd-floating-menu .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--default{background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);font-weight:500}.sd-floating-menu--default .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--danger{background:var(--sd-floating-bg, #FCE6E6);color:var(--sd-floating-content, #FB4444);font-weight:700}.sd-floating-menu--danger .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FCE6E6)}.sd-floating-menu--warning{background:var(--sd-floating-bg, #FEF1EA);color:var(--sd-floating-content, #FF6B00);font-weight:700}.sd-floating-menu--warning .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FEF1EA)}.sd-floating-menu--accent{background:var(--sd-floating-bg, #E6F1FF);color:var(--sd-floating-content, #0075FF);font-weight:700}.sd-floating-menu--accent .sd-floating-menu__arrow{color:var(--sd-floating-bg, #E6F1FF)}.sd-floating-menu__arrow{position:absolute;display:flex;width:16px;height:12px}.sd-floating-menu__arrow svg{width:100%;height:100%}.sd-floating-menu__arrow--top{bottom:-12px;left:50%;transform:translateX(-50%)}.sd-floating-menu__arrow--bottom{top:-12px;left:50%;transform:translateX(-50%) rotate(180deg)}.sd-floating-menu__arrow--left{right:-12px;top:50%;transform:translateY(-50%) rotate(-90deg)}.sd-floating-menu__arrow--right{left:-12px;top:50%;transform:translateY(-50%) rotate(90deg)}.sd-floating-menu__content{font-size:12px;line-height:20px}.sd-floating-menu__content .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px;margin-bottom:4px}.sd-floating-menu__content .sd-floating-menu__messages{font-weight:500}.sd-floating-menu__content .sd-floating-menu__buttons{margin-top:12px;display:flex;gap:8px;align-items:center;justify-content:flex-end}.sd-floating-menu__content .sd-floating-menu__buttons--with-link{justify-content:space-between}.sd-floating-menu--popover{padding:16px 20px}.sd-floating-menu--popover .sd-floating-menu__content{gap:4px}.sd-floating-menu--popover .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px}.sd-floating-menu--popover .sd-floating-menu__messages{font-size:12px;font-weight:500;line-height:20px}.sd-floating-menu--closing{animation:sd-floating-fade-out 0.15s ease-in forwards}.sd-floating-menu--closing.sd-floating-menu--top{animation-name:sd-floating-slide-out-top}.sd-floating-menu--closing.sd-floating-menu--bottom{animation-name:sd-floating-slide-out-bottom}.sd-floating-menu--closing.sd-floating-menu--left{animation-name:sd-floating-slide-out-left}.sd-floating-menu--closing.sd-floating-menu--right{animation-name:sd-floating-slide-out-right}.sd-floating-menu--has-close .sd-floating-menu__content{padding-right:28px}.sd-floating-menu__close-button{position:absolute;top:12px;right:12px}@keyframes sd-floating-fade-out{from{opacity:1}to{opacity:0}}@keyframes sd-floating-slide-out-top{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}@keyframes sd-floating-slide-out-bottom{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}@keyframes sd-floating-slide-out-left{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(4px)}}@keyframes sd-floating-slide-out-right{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-4px)}}@keyframes sd-floating-fade-in{from{opacity:0}to{opacity:1}}@keyframes sd-floating-slide-top{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes sd-floating-slide-bottom{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes sd-floating-slide-left{from{opacity:0;transform:translateX(4px)}to{opacity:1;transform:translateX(0)}}@keyframes sd-floating-slide-right{from{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:translateX(0)}}"}},[772,"sd-floating-portal",{to:[1],parentRef:[16],offset:[16],zIndex:[2,"z-index"],placement:[1],open:[4]},[[9,"resize","updatePosition"],[9,"mousedown","handleMouseDown"],[8,"click","handleWindowClick"],[8,"keydown","handleKeydown"]]]);function s(){"undefined"!=typeof customElements&&["sd-floating-portal"].forEach((t=>{"sd-floating-portal"===t&&(customElements.get(i(t))||customElements.define(i(t),a))}))}export{a as S,s as d}
@@ -1 +1 @@
1
- import{p as e,H as a,c as d,h as n,t as r}from"./p-CCCwPJ5p.js";import{u as t,t as l,W as s,C as c}from"./p-BysikR_g.js";import{d as i}from"./p-Cjf8PHEl.js";import{d as o}from"./p-CCO1WtEj.js";import{d as h}from"./p-S2-XqY2R.js";import{d as g}from"./p-JMuxVcTW.js";const p=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=d(this,"sdUpdate",7),this.viewChange=d(this,"sdViewChange",7)}value=null;selectable;events;elevated=!1;currentYear;currentMonth;update;viewChange;dateUtil=t();_eventMapCache;get eventMap(){const e=this._eventMapCache;if(e&&e.src===this.events)return e.map;const a=new Map;return(this.events??[]).forEach((e=>e.dates.forEach((d=>{const n=a.get(d)??[];n.push({color:e.color,label:e.label}),a.set(d,n)})))),this._eventMapCache={src:this.events,map:a},a}get legendItems(){const e=new Set,a=[];return(this.events??[]).forEach((d=>{const n=`${d.color}|${d.label}`;e.has(n)||(e.add(n),a.push({color:d.color,label:d.label}))})),a}componentWillLoad(){this.syncViewFromValue()}handleValueChange(){this.syncViewFromValue()}syncViewFromValue(){const e=this.value||l,[a,d]=e.split("-").map(Number);this.currentYear=a,this.currentMonth=d}formatDate(e,a,d){return`${e}-${String(a).padStart(2,"0")}-${String(d).padStart(2,"0")}`}get cells(){const e=this.currentYear,a=this.currentMonth,d=new Date(e,a-1,1).getDay(),n=new Date(e,a,0).getDate(),r=1===a?12:a-1,t=1===a?e-1:e,l=new Date(t,r,0).getDate(),s=12===a?1:a+1,c=12===a?e+1:e,i=[];for(let e=d-1;e>=0;e--){const a=l-e;i.push({date:this.formatDate(t,r,a),day:a,inCurrentMonth:!1})}for(let d=1;d<=n;d++)i.push({date:this.formatDate(e,a,d),day:d,inCurrentMonth:!0});const o=(7-i.length%7)%7;for(let e=1;e<=o;e++)i.push({date:this.formatDate(c,s,e),day:e,inCurrentMonth:!1});return i}emitViewChange(){this.viewChange.emit({year:this.currentYear,month:this.currentMonth})}goPrevYear=e=>{e.stopPropagation(),this.currentYear-=1,this.emitViewChange()};goNextYear=e=>{e.stopPropagation(),this.currentYear+=1,this.emitViewChange()};goPrevMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:d}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"prev");this.currentYear=a,this.currentMonth=d,this.emitViewChange()};goNextMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:d}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"next");this.currentYear=a,this.currentMonth=d,this.emitViewChange()};isDisabled(e){if(!this.selectable)return!1;const[a,d]=this.selectable;return""!==a&&e<a||""!==d&&e>d}handleDayClick(e){this.isDisabled(e.date)||(this.value=e.date,this.update.emit(e.date))}render(){const e={"--calendar-bg":c.bg,"--calendar-padding":`${c.paddingXY}px`,"--calendar-gap":`${c.gap}px`,"--calendar-radius":`${c.radius}px`,"--calendar-header-gap":`${c.header.gap}px`,"--calendar-header-divider":c.header.divider,"--calendar-header-font-size":`${c.header.fontSize}px`,"--calendar-header-line-height":`${c.header.lineHeight}px`,"--calendar-header-font-weight":c.header.fontWeight,"--calendar-week-font-size":`${c.week.fontSize}px`,"--calendar-week-line-height":`${c.week.lineHeight}px`,"--calendar-week-font-weight":c.week.fontWeight,"--calendar-week-color":c.week.color,"--calendar-grid-row-gap":`${c.grid.rowGap}px`,"--calendar-day-size":`${c.day.size}px`,"--calendar-day-circle-size":`${c.day.circleSize}px`,"--calendar-day-circle-radius":`${c.day.circleRadius}px`,"--calendar-day-text":c.day.defaultText,"--calendar-day-hover-text":c.day.hoverText,"--calendar-day-hover-border":c.day.hoverBorder,"--calendar-day-select-bg":c.day.selectBg,"--calendar-day-select-text":c.day.selectText,"--calendar-day-disabled-text":c.day.disabledText,"--calendar-day-font-size":`${c.day.fontSize}px`,"--calendar-day-line-height":`${c.day.lineHeight}px`,"--calendar-day-font-weight":c.day.fontWeight,"--calendar-day-bold-font-weight":c.day.boldFontWeight,"--calendar-day-dot-size":`${c.day.dot.size}px`,"--calendar-day-dot-gap":`${c.day.dot.gap}px`,"--calendar-day-dot-padding-y":`${c.day.dot.paddingY}px`,"--calendar-legend-font-size":`${c.legend.fontSize}px`,"--calendar-legend-line-height":`${c.legend.lineHeight}px`,"--calendar-legend-font-weight":c.legend.fontWeight,"--calendar-legend-gap":`${c.legend.gap}px`,"--calendar-legend-group-gap":`${c.legend.groupGap}px`},a=this.eventMap,d=this.legendItems,r=(this.events?.length??0)>0;return n("div",{key:"1ff9f894078f4b24d52c738509878ee504e02c6b",class:{"sd-calendar":!0,"sd-calendar--elevated":this.elevated},style:e},n("div",{key:"a4e894dbf3c808ba1a2a6711997c956c8b4525c0",class:"sd-calendar__header"},n("div",{key:"d559c861937fd51cab7e4cc39cfece49bed20037",class:"sd-calendar__nav-group"},n("sd-ghost-button",{key:"6b793f2a07cc9c26a8b517d7a4d0cc065305a19f",ariaLabel:"prevYear",size:"xxs",icon:"chevronLeft",onClick:this.goPrevYear}),n("span",{key:"324fa08a3583543a75cfd6a3cfeb8450586c9265",class:"sd-calendar__label"},this.currentYear),n("sd-ghost-button",{key:"d0951fe7bf84f58348e0ad2ed9e89531daa68242",ariaLabel:"nextYear",size:"xxs",icon:"chevronRight",onClick:this.goNextYear})),n("span",{key:"953a382082f5be65a1df7dab23faae8be1975bfa",class:"sd-calendar__divider","aria-hidden":"true"}),n("div",{key:"aa751f69f3864875d4e6f16a816660cb8636281f",class:"sd-calendar__nav-group sd-calendar__nav-group-month"},n("sd-ghost-button",{key:"7fe05970e9385cf8b744b16abce6a536ba639d8d",ariaLabel:"prevMonth",size:"xxs",icon:"chevronLeft",onClick:this.goPrevMonth}),n("span",{key:"0f528c7bde86f64f482a5a6b433beef2456e5832",class:"sd-calendar__label sd-calendar__label-month"},this.currentMonth,"월"),n("sd-ghost-button",{key:"3ddbb8f64f86fda85e5f8c6963cc4e11a95e8a37",ariaLabel:"nextMonth",size:"xxs",icon:"chevronRight",onClick:this.goNextMonth}))),n("div",{key:"de37bc97970b23c49757ff103f62a5ef8c3deb2a",class:"sd-calendar__week"},s.map((e=>n("span",{key:e,class:"sd-calendar__week-cell"},e)))),n("div",{key:"218d4ff90b67bfcea0fb52984338b5bf486ec6b1",class:"sd-calendar__grid"},this.cells.map((e=>{const d=e.inCurrentMonth&&""!==this.value&&this.value===e.date,t=e.inCurrentMonth&&l===e.date,s=e.inCurrentMonth&&this.isDisabled(e.date),c=e.inCurrentMonth?a.get(e.date):void 0;return n("button",{type:"button",key:e.date,class:{"sd-calendar__day":!0,"sd-calendar__day--empty":!e.inCurrentMonth,"sd-calendar__day--today":t,"sd-calendar__day--selected":d,"sd-calendar__day--disabled":s},disabled:!e.inCurrentMonth||s,tabindex:e.inCurrentMonth?void 0:-1,"aria-hidden":e.inCurrentMonth?void 0:"true",onClick:()=>e.inCurrentMonth&&this.handleDayClick(e)},n("span",{class:"sd-calendar__day-circle"},e.inCurrentMonth?e.day:""),r&&n("span",{class:"sd-calendar__dot-row","aria-hidden":"true"},c?.map(((e,a)=>n("span",{key:`${e.color}|${e.label}|${a}`,class:"sd-calendar__dot",style:{backgroundColor:e.color}})))))}))),d.length>0&&[n("span",{key:"713522194a9052e28b970f5eb6ad34941f7b6459",class:"sd-calendar__divider-bottom","aria-hidden":"true"}),n("div",{key:"fffe4cf9c14362c14e04be5cab0172c73490137f",class:"sd-calendar__legend"},d.map((e=>n("span",{key:`${e.color}|${e.label}`,class:"sd-calendar__legend-item"},n("span",{class:"sd-calendar__legend-dot",style:{backgroundColor:e.color},"aria-hidden":"true"}),n("span",{class:"sd-calendar__legend-label"},e.label)))))])}static get watchers(){return{value:[{handleValueChange:0}]}}static get style(){return"sd-calendar{display:block}sd-calendar .sd-calendar{display:flex;flex-direction:column;gap:var(--calendar-gap);width:328px;min-height:328px;padding:var(--calendar-padding);background:var(--calendar-bg);border-radius:var(--calendar-radius);user-select:none}sd-calendar .sd-calendar--elevated{box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2)}sd-calendar .sd-calendar__header{display:flex;align-items:center;justify-content:center;gap:var(--calendar-header-gap);font-size:var(--calendar-header-font-size);line-height:var(--calendar-header-line-height);font-weight:var(--calendar-header-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__nav-group{display:inline-flex;align-items:center;gap:var(--calendar-gap)}sd-calendar .sd-calendar__nav-group-month{width:100%}sd-calendar .sd-calendar__label{display:inline-flex;align-items:center;justify-content:center;min-width:40px;text-align:center}sd-calendar .sd-calendar__label-month{width:100%}sd-calendar .sd-calendar__divider{display:inline-block;width:1px;height:16px;background:var(--calendar-header-divider)}sd-calendar .sd-calendar__week{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size))}sd-calendar .sd-calendar__week-cell{display:inline-flex;align-items:center;justify-content:center;height:20px;font-size:var(--calendar-week-font-size);line-height:var(--calendar-week-line-height);font-weight:var(--calendar-week-font-weight);color:var(--calendar-week-color)}sd-calendar .sd-calendar__grid{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size));row-gap:var(--calendar-grid-row-gap)}sd-calendar .sd-calendar__day{display:inline-flex;flex-direction:column;align-items:center;justify-content:flex-start;width:var(--calendar-day-size);min-height:var(--calendar-day-circle-size);padding:0;border:none;background:transparent;cursor:pointer;font-size:var(--calendar-day-font-size);line-height:var(--calendar-day-line-height);font-weight:var(--calendar-day-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__day-circle{display:inline-flex;align-items:center;justify-content:center;width:var(--calendar-day-circle-size);height:var(--calendar-day-circle-size);border-radius:calc(var(--calendar-day-circle-radius) * 1px);border:1px solid transparent;box-sizing:border-box}sd-calendar .sd-calendar__day:not(:disabled):hover .sd-calendar__day-circle{border-radius:16px;border:1px solid var(--calendar-day-hover-border)}sd-calendar .sd-calendar__day--today .sd-calendar__day-circle{font-weight:700}sd-calendar .sd-calendar__day--selected .sd-calendar__day-circle{border-radius:16px;background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-calendar .sd-calendar__day--selected:not(:disabled):hover .sd-calendar__day-circle{background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-calendar .sd-calendar__day--disabled{color:var(--calendar-day-disabled-text);background:none !important;cursor:not-allowed}sd-calendar .sd-calendar__day--empty{visibility:hidden;pointer-events:none}sd-calendar .sd-calendar__dot-row{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--calendar-day-dot-gap);box-sizing:border-box;width:100%;min-height:14px;padding-top:var(--calendar-day-dot-padding-y);padding-bottom:var(--calendar-day-dot-padding-y)}sd-calendar .sd-calendar__dot{display:inline-block;width:var(--calendar-day-dot-size);height:var(--calendar-day-dot-size);border-radius:50%}sd-calendar .sd-calendar__divider-bottom{display:block;width:100%;height:1px;background:var(--calendar-header-divider)}sd-calendar .sd-calendar__legend{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;column-gap:var(--calendar-legend-group-gap);row-gap:4px;font-size:var(--calendar-legend-font-size);line-height:var(--calendar-legend-line-height);font-weight:var(--calendar-legend-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__legend-item{display:inline-flex;align-items:center;gap:var(--calendar-legend-gap)}sd-calendar .sd-calendar__legend-dot{display:inline-block;width:var(--calendar-day-dot-size);height:var(--calendar-day-dot-size);border-radius:50%;flex-shrink:0}sd-calendar .sd-calendar__legend-label{display:inline-block}"}},[512,"sd-calendar",{value:[1025],selectable:[16],events:[16],elevated:[4],currentYear:[32],currentMonth:[32]},void 0,{value:[{handleValueChange:0}]}]);function y(){"undefined"!=typeof customElements&&["sd-calendar","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((e=>{switch(e){case"sd-calendar":customElements.get(r(e))||customElements.define(r(e),p);break;case"sd-ghost-button":customElements.get(r(e))||i();break;case"sd-icon":customElements.get(r(e))||o();break;case"sd-portal":customElements.get(r(e))||h();break;case"sd-tag":customElements.get(r(e))||g()}}))}export{p as S,y as d}
1
+ import{p as e,H as a,c as d,h as n,t as r}from"./p-CEVDmQdt.js";import{u as t,t as l,W as s,C as c}from"./p-BysikR_g.js";import{d as i}from"./p-BdFwmTyS.js";import{d as o}from"./p-BnhzUsGP.js";import{d as h}from"./p-ChwRSZ6R.js";import{d as g}from"./p-CGJ1L8_Y.js";const p=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=d(this,"sdUpdate",7),this.viewChange=d(this,"sdViewChange",7)}value=null;selectable;events;elevated=!1;currentYear;currentMonth;update;viewChange;dateUtil=t();_eventMapCache;get eventMap(){const e=this._eventMapCache;if(e&&e.src===this.events)return e.map;const a=new Map;return(this.events??[]).forEach((e=>e.dates.forEach((d=>{const n=a.get(d)??[];n.push({color:e.color,label:e.label}),a.set(d,n)})))),this._eventMapCache={src:this.events,map:a},a}get legendItems(){const e=new Set,a=[];return(this.events??[]).forEach((d=>{const n=`${d.color}|${d.label}`;e.has(n)||(e.add(n),a.push({color:d.color,label:d.label}))})),a}componentWillLoad(){this.syncViewFromValue()}handleValueChange(){this.syncViewFromValue()}syncViewFromValue(){const e=this.value||l,[a,d]=e.split("-").map(Number);this.currentYear=a,this.currentMonth=d}formatDate(e,a,d){return`${e}-${String(a).padStart(2,"0")}-${String(d).padStart(2,"0")}`}get cells(){const e=this.currentYear,a=this.currentMonth,d=new Date(e,a-1,1).getDay(),n=new Date(e,a,0).getDate(),r=1===a?12:a-1,t=1===a?e-1:e,l=new Date(t,r,0).getDate(),s=12===a?1:a+1,c=12===a?e+1:e,i=[];for(let e=d-1;e>=0;e--){const a=l-e;i.push({date:this.formatDate(t,r,a),day:a,inCurrentMonth:!1})}for(let d=1;d<=n;d++)i.push({date:this.formatDate(e,a,d),day:d,inCurrentMonth:!0});const o=(7-i.length%7)%7;for(let e=1;e<=o;e++)i.push({date:this.formatDate(c,s,e),day:e,inCurrentMonth:!1});return i}emitViewChange(){this.viewChange.emit({year:this.currentYear,month:this.currentMonth})}goPrevYear=e=>{e.stopPropagation(),this.currentYear-=1,this.emitViewChange()};goNextYear=e=>{e.stopPropagation(),this.currentYear+=1,this.emitViewChange()};goPrevMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:d}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"prev");this.currentYear=a,this.currentMonth=d,this.emitViewChange()};goNextMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:d}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"next");this.currentYear=a,this.currentMonth=d,this.emitViewChange()};isDisabled(e){if(!this.selectable)return!1;const[a,d]=this.selectable;return""!==a&&e<a||""!==d&&e>d}handleDayClick(e){this.isDisabled(e.date)||(this.value=e.date,this.update.emit(e.date))}render(){const e={"--calendar-bg":c.bg,"--calendar-padding":`${c.paddingXY}px`,"--calendar-gap":`${c.gap}px`,"--calendar-radius":`${c.radius}px`,"--calendar-header-gap":`${c.header.gap}px`,"--calendar-header-divider":c.header.divider,"--calendar-header-font-size":`${c.header.fontSize}px`,"--calendar-header-line-height":`${c.header.lineHeight}px`,"--calendar-header-font-weight":c.header.fontWeight,"--calendar-week-font-size":`${c.week.fontSize}px`,"--calendar-week-line-height":`${c.week.lineHeight}px`,"--calendar-week-font-weight":c.week.fontWeight,"--calendar-week-color":c.week.color,"--calendar-grid-row-gap":`${c.grid.rowGap}px`,"--calendar-day-size":`${c.day.size}px`,"--calendar-day-circle-size":`${c.day.circleSize}px`,"--calendar-day-circle-radius":`${c.day.circleRadius}px`,"--calendar-day-text":c.day.defaultText,"--calendar-day-hover-text":c.day.hoverText,"--calendar-day-hover-border":c.day.hoverBorder,"--calendar-day-select-bg":c.day.selectBg,"--calendar-day-select-text":c.day.selectText,"--calendar-day-disabled-text":c.day.disabledText,"--calendar-day-font-size":`${c.day.fontSize}px`,"--calendar-day-line-height":`${c.day.lineHeight}px`,"--calendar-day-font-weight":c.day.fontWeight,"--calendar-day-bold-font-weight":c.day.boldFontWeight,"--calendar-day-dot-size":`${c.day.dot.size}px`,"--calendar-day-dot-gap":`${c.day.dot.gap}px`,"--calendar-day-dot-padding-y":`${c.day.dot.paddingY}px`,"--calendar-legend-font-size":`${c.legend.fontSize}px`,"--calendar-legend-line-height":`${c.legend.lineHeight}px`,"--calendar-legend-font-weight":c.legend.fontWeight,"--calendar-legend-gap":`${c.legend.gap}px`,"--calendar-legend-group-gap":`${c.legend.groupGap}px`},a=this.eventMap,d=this.legendItems,r=(this.events?.length??0)>0;return n("div",{key:"1ff9f894078f4b24d52c738509878ee504e02c6b",class:{"sd-calendar":!0,"sd-calendar--elevated":this.elevated},style:e},n("div",{key:"a4e894dbf3c808ba1a2a6711997c956c8b4525c0",class:"sd-calendar__header"},n("div",{key:"d559c861937fd51cab7e4cc39cfece49bed20037",class:"sd-calendar__nav-group"},n("sd-ghost-button",{key:"6b793f2a07cc9c26a8b517d7a4d0cc065305a19f",ariaLabel:"prevYear",size:"xxs",icon:"chevronLeft",onClick:this.goPrevYear}),n("span",{key:"324fa08a3583543a75cfd6a3cfeb8450586c9265",class:"sd-calendar__label"},this.currentYear),n("sd-ghost-button",{key:"d0951fe7bf84f58348e0ad2ed9e89531daa68242",ariaLabel:"nextYear",size:"xxs",icon:"chevronRight",onClick:this.goNextYear})),n("span",{key:"953a382082f5be65a1df7dab23faae8be1975bfa",class:"sd-calendar__divider","aria-hidden":"true"}),n("div",{key:"aa751f69f3864875d4e6f16a816660cb8636281f",class:"sd-calendar__nav-group sd-calendar__nav-group-month"},n("sd-ghost-button",{key:"7fe05970e9385cf8b744b16abce6a536ba639d8d",ariaLabel:"prevMonth",size:"xxs",icon:"chevronLeft",onClick:this.goPrevMonth}),n("span",{key:"0f528c7bde86f64f482a5a6b433beef2456e5832",class:"sd-calendar__label sd-calendar__label-month"},this.currentMonth,"월"),n("sd-ghost-button",{key:"3ddbb8f64f86fda85e5f8c6963cc4e11a95e8a37",ariaLabel:"nextMonth",size:"xxs",icon:"chevronRight",onClick:this.goNextMonth}))),n("div",{key:"de37bc97970b23c49757ff103f62a5ef8c3deb2a",class:"sd-calendar__week"},s.map((e=>n("span",{key:e,class:"sd-calendar__week-cell"},e)))),n("div",{key:"218d4ff90b67bfcea0fb52984338b5bf486ec6b1",class:"sd-calendar__grid"},this.cells.map((e=>{const d=e.inCurrentMonth&&""!==this.value&&this.value===e.date,t=e.inCurrentMonth&&l===e.date,s=e.inCurrentMonth&&this.isDisabled(e.date),c=e.inCurrentMonth?a.get(e.date):void 0;return n("button",{type:"button",key:e.date,class:{"sd-calendar__day":!0,"sd-calendar__day--empty":!e.inCurrentMonth,"sd-calendar__day--today":t,"sd-calendar__day--selected":d,"sd-calendar__day--disabled":s},disabled:!e.inCurrentMonth||s,tabindex:e.inCurrentMonth?void 0:-1,"aria-hidden":e.inCurrentMonth?void 0:"true",onClick:()=>e.inCurrentMonth&&this.handleDayClick(e)},n("span",{class:"sd-calendar__day-circle"},e.inCurrentMonth?e.day:""),r&&n("span",{class:"sd-calendar__dot-row","aria-hidden":"true"},c?.map(((e,a)=>n("span",{key:`${e.color}|${e.label}|${a}`,class:"sd-calendar__dot",style:{backgroundColor:e.color}})))))}))),d.length>0&&[n("span",{key:"713522194a9052e28b970f5eb6ad34941f7b6459",class:"sd-calendar__divider-bottom","aria-hidden":"true"}),n("div",{key:"fffe4cf9c14362c14e04be5cab0172c73490137f",class:"sd-calendar__legend"},d.map((e=>n("span",{key:`${e.color}|${e.label}`,class:"sd-calendar__legend-item"},n("span",{class:"sd-calendar__legend-dot",style:{backgroundColor:e.color},"aria-hidden":"true"}),n("span",{class:"sd-calendar__legend-label"},e.label)))))])}static get watchers(){return{value:[{handleValueChange:0}]}}static get style(){return"sd-calendar{display:block}sd-calendar .sd-calendar{display:flex;flex-direction:column;gap:var(--calendar-gap);width:328px;min-height:328px;padding:var(--calendar-padding);background:var(--calendar-bg);border-radius:var(--calendar-radius);user-select:none}sd-calendar .sd-calendar--elevated{box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2)}sd-calendar .sd-calendar__header{display:flex;align-items:center;justify-content:center;gap:var(--calendar-header-gap);font-size:var(--calendar-header-font-size);line-height:var(--calendar-header-line-height);font-weight:var(--calendar-header-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__nav-group{display:inline-flex;align-items:center;gap:var(--calendar-gap)}sd-calendar .sd-calendar__nav-group-month{width:100%}sd-calendar .sd-calendar__label{display:inline-flex;align-items:center;justify-content:center;min-width:40px;text-align:center}sd-calendar .sd-calendar__label-month{width:100%}sd-calendar .sd-calendar__divider{display:inline-block;width:1px;height:16px;background:var(--calendar-header-divider)}sd-calendar .sd-calendar__week{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size))}sd-calendar .sd-calendar__week-cell{display:inline-flex;align-items:center;justify-content:center;height:20px;font-size:var(--calendar-week-font-size);line-height:var(--calendar-week-line-height);font-weight:var(--calendar-week-font-weight);color:var(--calendar-week-color)}sd-calendar .sd-calendar__grid{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size));row-gap:var(--calendar-grid-row-gap)}sd-calendar .sd-calendar__day{display:inline-flex;flex-direction:column;align-items:center;justify-content:flex-start;width:var(--calendar-day-size);min-height:var(--calendar-day-circle-size);padding:0;border:none;background:transparent;cursor:pointer;font-size:var(--calendar-day-font-size);line-height:var(--calendar-day-line-height);font-weight:var(--calendar-day-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__day-circle{display:inline-flex;align-items:center;justify-content:center;width:var(--calendar-day-circle-size);height:var(--calendar-day-circle-size);border-radius:calc(var(--calendar-day-circle-radius) * 1px);border:1px solid transparent;box-sizing:border-box}sd-calendar .sd-calendar__day:not(:disabled):hover .sd-calendar__day-circle{border-radius:16px;border:1px solid var(--calendar-day-hover-border)}sd-calendar .sd-calendar__day--today .sd-calendar__day-circle{font-weight:700}sd-calendar .sd-calendar__day--selected .sd-calendar__day-circle{border-radius:16px;background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-calendar .sd-calendar__day--selected:not(:disabled):hover .sd-calendar__day-circle{background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-calendar .sd-calendar__day--disabled{color:var(--calendar-day-disabled-text);background:none !important;cursor:not-allowed}sd-calendar .sd-calendar__day--empty{visibility:hidden;pointer-events:none}sd-calendar .sd-calendar__dot-row{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--calendar-day-dot-gap);box-sizing:border-box;width:100%;min-height:14px;padding-top:var(--calendar-day-dot-padding-y);padding-bottom:var(--calendar-day-dot-padding-y)}sd-calendar .sd-calendar__dot{display:inline-block;width:var(--calendar-day-dot-size);height:var(--calendar-day-dot-size);border-radius:50%}sd-calendar .sd-calendar__divider-bottom{display:block;width:100%;height:1px;background:var(--calendar-header-divider)}sd-calendar .sd-calendar__legend{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;column-gap:var(--calendar-legend-group-gap);row-gap:4px;font-size:var(--calendar-legend-font-size);line-height:var(--calendar-legend-line-height);font-weight:var(--calendar-legend-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__legend-item{display:inline-flex;align-items:center;gap:var(--calendar-legend-gap)}sd-calendar .sd-calendar__legend-dot{display:inline-block;width:var(--calendar-day-dot-size);height:var(--calendar-day-dot-size);border-radius:50%;flex-shrink:0}sd-calendar .sd-calendar__legend-label{display:inline-block}"}},[512,"sd-calendar",{value:[1025],selectable:[16],events:[16],elevated:[4],currentYear:[32],currentMonth:[32]},void 0,{value:[{handleValueChange:0}]}]);function y(){"undefined"!=typeof customElements&&["sd-calendar","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((e=>{switch(e){case"sd-calendar":customElements.get(r(e))||customElements.define(r(e),p);break;case"sd-ghost-button":customElements.get(r(e))||i();break;case"sd-icon":customElements.get(r(e))||o();break;case"sd-portal":customElements.get(r(e))||h();break;case"sd-tag":customElements.get(r(e))||g()}}))}export{p as S,y as d}
@@ -1 +1 @@
1
- import{p as t,H as o,c as s,h as e,t as a}from"./p-CCCwPJ5p.js";import{s as i}from"./p-BE4tnQ2Z.js";import{m as d}from"./p-DOXMJi-V.js";import{d as n}from"./p-D7StBSjK.js";import{d as l}from"./p-Cjf8PHEl.js";import{d as m}from"./p-CCO1WtEj.js";import{d as c}from"./p-S2-XqY2R.js";import{d as r}from"./p-JMuxVcTW.js";const f={positive:"primary_md",negative:"danger_md",default:"neutral_outline_md"},h={positive:"notificationOutline",negative:"warningOutline",default:null},b={positive:d.modal.confirm.positive.icon,negative:d.modal.confirm.negative.icon,default:""},p=Number(d.modal.confirm.title.icon),u=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=s(this,"sdClose",7),this.cancel=s(this,"sdCancel",7),this.ok=s(this,"sdOk",7)}get el(){return this}hasSlottedContent=!1;customContentRef;slotObserver;type="positive";modalTitle="";titleClass="";topMessage=[];bottomMessage=[];mainButtonName;mainButtonLabel="확인";subButtonLabel="";tagPreset="square_sm_grey";tagLabel="";slotLabel="";tagContents;close;cancel;ok;componentWillLoad(){this.syncHasSlottedContent()}componentDidLoad(){"undefined"!=typeof MutationObserver&&(this.slotObserver=new MutationObserver((()=>this.syncHasSlottedContent())),this.slotObserver.observe(this.el,{childList:!0,characterData:!0}))}componentDidRender(){this.customContentRef&&this.tagContents instanceof o&&("function"==typeof this.customContentRef.replaceChildren?this.customContentRef.replaceChildren(this.tagContents):(this.customContentRef.innerHTML="",this.customContentRef.appendChild(this.tagContents)))}disconnectedCallback(){this.slotObserver?.disconnect()}get resolvedType(){return this.type??"positive"}get resolvedMainButton(){return this.mainButtonName??f[this.resolvedType]}get hasTagContent(){return void 0!==this.tagLabel&&""!==this.tagLabel||void 0!==this.slotLabel&&""!==this.slotLabel}get showContentBox(){return null!=this.tagContents||this.hasTagContent||this.hasSlottedContent}syncHasSlottedContent(){const t=Array.from(this.el.childNodes).some((t=>!(t.nodeType===Node.ELEMENT_NODE&&t.classList.contains("sd-confirm-modal"))&&(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&t.textContent?.trim())));t!==this.hasSlottedContent&&(this.hasSlottedContent=t)}render(){const t=this.resolvedType,o=h[t],s=b[t];return e("div",{key:"26270c4ca645f0e7e245b4bd40423bcf09029e22",class:"sd-confirm-modal"},e("sd-ghost-button",{key:"672b73221f8638eff70c3074614fcc90b489702e",class:"sd-confirm-modal__close-button",icon:"close",ariaLabel:"close",onClick:()=>this.close.emit()}),o&&e("sd-icon",{key:"895dda6ba69d41f33f9465fb9db28739da28d2e6",class:"sd-confirm-modal__icon",name:o,size:p,color:s}),e("h2",{key:"ace6b9da4421c28e2bb828c60cae1c1cc7547f9a",class:`sd-confirm-modal__title ${this.titleClass??""}`},this.modalTitle),e("div",{key:"3370fe954c33f8ce6a643fcc9b19f299682b43e8",class:"sd-confirm-modal__body"},(this.topMessage??[]).length>0&&e("div",{key:"6a6bc182c638e909a821353c188d2ef558452e17",class:"sd-confirm-modal__message"},(this.topMessage??[]).map((t=>e("p",{class:"sd-confirm-modal__message-text",innerHTML:i(t)})))),this.showContentBox&&e("div",{key:"dba37f4ab114f3641a9f287d123fb7f94e49c00a",class:"sd-confirm-modal__content-box"},this.tagContents?e("div",{class:"sd-confirm-modal__custom-content",ref:t=>{this.customContentRef=t}}):e("slot",{onSlotchange:()=>this.syncHasSlottedContent()},this.tagLabel&&e("sd-tag",{name:this.tagPreset??"square_sm_grey",label:this.tagLabel}),this.slotLabel&&e("span",{class:"sd-confirm-modal__slot-label"},this.slotLabel))),(this.bottomMessage??[]).length>0&&e("div",{key:"ed29da73d968017c44cd61540139fac24592ea70",class:"sd-confirm-modal__message"},(this.bottomMessage??[]).map((t=>e("p",{class:"sd-confirm-modal__message-text",innerHTML:i(t)}))))),e("div",{key:"608287c021f4191dcea0a0b5798381cbc8742170",class:"sd-confirm-modal__button"},this.subButtonLabel&&e("sd-button",{key:"a67c309617c6e1f30aa9167587e8cbb9fb961482",name:"neutral_outline_md",label:this.subButtonLabel,onSdClick:()=>this.cancel.emit()}),e("sd-button",{key:"3c1a698a8276e2924f62cf1c7e472bd34ac581a1",name:this.resolvedMainButton,label:this.mainButtonLabel??"확인",onSdClick:()=>this.ok.emit()})))}static get style(){return"sd-confirm-modal{display:block;width:fit-content;min-width:520px}sd-confirm-modal .sd-confirm-modal{position:relative;padding:var(--sd-modal-modal-confirm-padding-y) var(--sd-modal-modal-confirm-padding-x);border-radius:var(--sd-modal-modal-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);background:var(--sd-modal-modal-bg)}sd-confirm-modal .sd-confirm-modal__close-button{position:absolute;top:12px;right:12px}sd-confirm-modal .sd-confirm-modal__icon{display:block;width:var(--sd-modal-modal-confirm-title-icon);height:var(--sd-modal-modal-confirm-title-icon);margin:0 auto var(--sd-modal-modal-confirm-title-gap) auto}sd-confirm-modal .sd-confirm-modal__title{color:var(--sd-modal-modal-confirm-title-color);font-size:var(--sd-modal-modal-confirm-title-typography-font-size);font-weight:var(--sd-modal-modal-confirm-title-typography-font-weight);line-height:var(--sd-modal-modal-confirm-title-typography-line-height);text-align:center;margin:0 0 var(--sd-modal-modal-confirm-body-gap) 0}sd-confirm-modal .sd-confirm-modal__body{display:flex;flex-direction:column;gap:var(--sd-modal-modal-confirm-body-gap)}sd-confirm-modal .sd-confirm-modal__message-text{color:var(--sd-modal-modal-confirm-message-color);font-size:12px;font-weight:400;line-height:20px;text-align:center;margin:0}sd-confirm-modal .sd-confirm-modal__content-box{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border:1px solid #e1e1e1;border-radius:8px;background:white}sd-confirm-modal .sd-confirm-modal__slot-label{font-size:14px;font-weight:700;line-height:22px;color:var(--sd-modal-modal-confirm-message-color)}sd-confirm-modal .sd-confirm-modal__button{display:flex;justify-content:center;gap:var(--sd-modal-modal-confirm-button-gap);margin-top:40px}"}},[772,"sd-confirm-modal",{type:[1],modalTitle:[1,"modal-title"],titleClass:[1,"title-class"],topMessage:[16],bottomMessage:[16],mainButtonName:[1,"main-button-name"],mainButtonLabel:[1,"main-button-label"],subButtonLabel:[1,"sub-button-label"],tagPreset:[1,"tag-preset"],tagLabel:[1,"tag-label"],slotLabel:[1,"slot-label"],tagContents:[16],hasSlottedContent:[32]}]);function g(){"undefined"!=typeof customElements&&["sd-confirm-modal","sd-button","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-confirm-modal":customElements.get(a(t))||customElements.define(a(t),u);break;case"sd-button":customElements.get(a(t))||n();break;case"sd-ghost-button":customElements.get(a(t))||l();break;case"sd-icon":customElements.get(a(t))||m();break;case"sd-portal":customElements.get(a(t))||c();break;case"sd-tag":customElements.get(a(t))||r()}}))}export{u as S,g as d}
1
+ import{p as t,H as o,c as s,h as e,t as a}from"./p-CEVDmQdt.js";import{s as i}from"./p-BE4tnQ2Z.js";import{m as d}from"./p-DOXMJi-V.js";import{d as n}from"./p-C3rOud8J.js";import{d as l}from"./p-BdFwmTyS.js";import{d as m}from"./p-BnhzUsGP.js";import{d as c}from"./p-ChwRSZ6R.js";import{d as r}from"./p-CGJ1L8_Y.js";const f={positive:"primary_md",negative:"danger_md",default:"neutral_outline_md"},h={positive:"notificationOutline",negative:"warningOutline",default:null},b={positive:d.modal.confirm.positive.icon,negative:d.modal.confirm.negative.icon,default:""},p=Number(d.modal.confirm.title.icon),u=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=s(this,"sdClose",7),this.cancel=s(this,"sdCancel",7),this.ok=s(this,"sdOk",7)}get el(){return this}hasSlottedContent=!1;customContentRef;slotObserver;type="positive";modalTitle="";titleClass="";topMessage=[];bottomMessage=[];mainButtonName;mainButtonLabel="확인";subButtonLabel="";tagPreset="square_sm_grey";tagLabel="";slotLabel="";tagContents;close;cancel;ok;componentWillLoad(){this.syncHasSlottedContent()}componentDidLoad(){"undefined"!=typeof MutationObserver&&(this.slotObserver=new MutationObserver((()=>this.syncHasSlottedContent())),this.slotObserver.observe(this.el,{childList:!0,characterData:!0}))}componentDidRender(){this.customContentRef&&this.tagContents instanceof o&&("function"==typeof this.customContentRef.replaceChildren?this.customContentRef.replaceChildren(this.tagContents):(this.customContentRef.innerHTML="",this.customContentRef.appendChild(this.tagContents)))}disconnectedCallback(){this.slotObserver?.disconnect()}get resolvedType(){return this.type??"positive"}get resolvedMainButton(){return this.mainButtonName??f[this.resolvedType]}get hasTagContent(){return void 0!==this.tagLabel&&""!==this.tagLabel||void 0!==this.slotLabel&&""!==this.slotLabel}get showContentBox(){return null!=this.tagContents||this.hasTagContent||this.hasSlottedContent}syncHasSlottedContent(){const t=Array.from(this.el.childNodes).some((t=>!(t.nodeType===Node.ELEMENT_NODE&&t.classList.contains("sd-confirm-modal"))&&(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&t.textContent?.trim())));t!==this.hasSlottedContent&&(this.hasSlottedContent=t)}render(){const t=this.resolvedType,o=h[t],s=b[t];return e("div",{key:"26270c4ca645f0e7e245b4bd40423bcf09029e22",class:"sd-confirm-modal"},e("sd-ghost-button",{key:"672b73221f8638eff70c3074614fcc90b489702e",class:"sd-confirm-modal__close-button",icon:"close",ariaLabel:"close",onClick:()=>this.close.emit()}),o&&e("sd-icon",{key:"895dda6ba69d41f33f9465fb9db28739da28d2e6",class:"sd-confirm-modal__icon",name:o,size:p,color:s}),e("h2",{key:"ace6b9da4421c28e2bb828c60cae1c1cc7547f9a",class:`sd-confirm-modal__title ${this.titleClass??""}`},this.modalTitle),e("div",{key:"3370fe954c33f8ce6a643fcc9b19f299682b43e8",class:"sd-confirm-modal__body"},(this.topMessage??[]).length>0&&e("div",{key:"6a6bc182c638e909a821353c188d2ef558452e17",class:"sd-confirm-modal__message"},(this.topMessage??[]).map((t=>e("p",{class:"sd-confirm-modal__message-text",innerHTML:i(t)})))),this.showContentBox&&e("div",{key:"dba37f4ab114f3641a9f287d123fb7f94e49c00a",class:"sd-confirm-modal__content-box"},this.tagContents?e("div",{class:"sd-confirm-modal__custom-content",ref:t=>{this.customContentRef=t}}):e("slot",{onSlotchange:()=>this.syncHasSlottedContent()},this.tagLabel&&e("sd-tag",{name:this.tagPreset??"square_sm_grey",label:this.tagLabel}),this.slotLabel&&e("span",{class:"sd-confirm-modal__slot-label"},this.slotLabel))),(this.bottomMessage??[]).length>0&&e("div",{key:"ed29da73d968017c44cd61540139fac24592ea70",class:"sd-confirm-modal__message"},(this.bottomMessage??[]).map((t=>e("p",{class:"sd-confirm-modal__message-text",innerHTML:i(t)}))))),e("div",{key:"608287c021f4191dcea0a0b5798381cbc8742170",class:"sd-confirm-modal__button"},this.subButtonLabel&&e("sd-button",{key:"a67c309617c6e1f30aa9167587e8cbb9fb961482",name:"neutral_outline_md",label:this.subButtonLabel,onSdClick:()=>this.cancel.emit()}),e("sd-button",{key:"3c1a698a8276e2924f62cf1c7e472bd34ac581a1",name:this.resolvedMainButton,label:this.mainButtonLabel??"확인",onSdClick:()=>this.ok.emit()})))}static get style(){return"sd-confirm-modal{display:block;width:fit-content;min-width:520px}sd-confirm-modal .sd-confirm-modal{position:relative;padding:var(--sd-modal-modal-confirm-padding-y) var(--sd-modal-modal-confirm-padding-x);border-radius:var(--sd-modal-modal-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);background:var(--sd-modal-modal-bg)}sd-confirm-modal .sd-confirm-modal__close-button{position:absolute;top:12px;right:12px}sd-confirm-modal .sd-confirm-modal__icon{display:block;width:var(--sd-modal-modal-confirm-title-icon);height:var(--sd-modal-modal-confirm-title-icon);margin:0 auto var(--sd-modal-modal-confirm-title-gap) auto}sd-confirm-modal .sd-confirm-modal__title{color:var(--sd-modal-modal-confirm-title-color);font-size:var(--sd-modal-modal-confirm-title-typography-font-size);font-weight:var(--sd-modal-modal-confirm-title-typography-font-weight);line-height:var(--sd-modal-modal-confirm-title-typography-line-height);text-align:center;margin:0 0 var(--sd-modal-modal-confirm-body-gap) 0}sd-confirm-modal .sd-confirm-modal__body{display:flex;flex-direction:column;gap:var(--sd-modal-modal-confirm-body-gap)}sd-confirm-modal .sd-confirm-modal__message-text{color:var(--sd-modal-modal-confirm-message-color);font-size:12px;font-weight:400;line-height:20px;text-align:center;margin:0}sd-confirm-modal .sd-confirm-modal__content-box{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border:1px solid #e1e1e1;border-radius:8px;background:white}sd-confirm-modal .sd-confirm-modal__slot-label{font-size:14px;font-weight:700;line-height:22px;color:var(--sd-modal-modal-confirm-message-color)}sd-confirm-modal .sd-confirm-modal__button{display:flex;justify-content:center;gap:var(--sd-modal-modal-confirm-button-gap);margin-top:40px}"}},[772,"sd-confirm-modal",{type:[1],modalTitle:[1,"modal-title"],titleClass:[1,"title-class"],topMessage:[16],bottomMessage:[16],mainButtonName:[1,"main-button-name"],mainButtonLabel:[1,"main-button-label"],subButtonLabel:[1,"sub-button-label"],tagPreset:[1,"tag-preset"],tagLabel:[1,"tag-label"],slotLabel:[1,"slot-label"],tagContents:[16],hasSlottedContent:[32]}]);function g(){"undefined"!=typeof customElements&&["sd-confirm-modal","sd-button","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-confirm-modal":customElements.get(a(t))||customElements.define(a(t),u);break;case"sd-button":customElements.get(a(t))||n();break;case"sd-ghost-button":customElements.get(a(t))||l();break;case"sd-icon":customElements.get(a(t))||m();break;case"sd-portal":customElements.get(a(t))||c();break;case"sd-tag":customElements.get(a(t))||r()}}))}export{u as S,g as d}
@@ -1 +1 @@
1
- import{p as t,H as s,c as i,h as e,t as n}from"./p-CCCwPJ5p.js";import{n as o}from"./p-CCwNgVmC.js";import{i as a}from"./p-e0ABNkP6.js";import{d}from"./p-D7StBSjK.js";import{d as l}from"./p-BwTsP0Ak.js";import{d as r}from"./p-Cj_1bYZF.js";import{d as u}from"./p-Cjf8PHEl.js";import{d as p}from"./p-CCO1WtEj.js";import{d as h}from"./p-S2-XqY2R.js";import{d as c}from"./p-JMuxVcTW.js";import{d as b}from"./p-Cdzn78dP.js";const f=a.textinput.sm,m=a.textinput.md,g={sm:{height:f.height,paddingX:f.paddingX,gap:f.gap,radius:f.radius,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight},md:{height:m.height,paddingX:m.paddingX,gap:m.gap,radius:m.radius,fontSize:m.typography.fontSize,lineHeight:m.typography.lineHeight,fontWeight:m.typography.fontWeight}},_={text:a.textinput.text,icon:a.textinput.icon},v=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.input=i(this,"sdUpdate",7),this.focus=i(this,"sdFocus",7),this.blur=i(this,"sdBlur",7)}get host(){return this}value=null;type="text";size="sm";addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;clearable=!1;width="";rules=[];autoFocus=!1;autocomplete="";maxlength;minlength;inputmode;enterkeyhint;spellcheck=!1;status;hint="";errorMessage="";inputClass="";readonly=!1;error=!1;focused=!1;hovered=!1;label="";labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;inputStyle={};internalValue=null;passwordVisible=!1;nativeEl=void 0;formField;name=o();input;focus;blur;valueChanged(t){this.internalValue=t}internalValueChanged(t){t!==this.value&&(this.value=t,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){null!=this.value&&""!==this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{this.internalValue=t.target.value};handleFocus=async(t,s)=>{this.focused="focus"===t,"blur"===t?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(s)):this.focus?.emit(s)};render(){const t=g[this.size]??g.sm;return e("sd-field",{key:"7444ee5ebb482fe9c4f837114456cab90de6b3aa",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:t=>this.formField=t,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-input-font-size":`${t.fontSize}px`,"--sd-input-line-height":`${t.lineHeight}px`,"--sd-input-font-weight":t.fontWeight,"--sd-input-padding-x":`${t.paddingX}px`,"--sd-input-gap":`${t.gap}px`,"--sd-input-text-color":_.text.default,"--sd-input-placeholder-color":_.text.placeholder,"--sd-input-disabled-color":_.text.disabled,"--sd-input-icon-color":_.icon.default,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`}},e("label",{key:"0dbb6bc35522fb2d0c6d6d147756954ed96d2467",class:"sd-input__content"},e("slot",{key:"d5e8488bc3e29bd671bb337051d7b768c3c37c4b",name:"prefix"}),e("input",{key:"9dff73dbc5af19b0e2f19e95a26ad32211761484",name:this.name,ref:t=>this.nativeEl=t,class:`sd-input__native ${this.inputClass}`,type:"password"===this.type&&this.passwordVisible?"text":this.type??"text",value:this.internalValue||"",placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,autocomplete:this.autocomplete||void 0,maxlength:this.maxlength,minlength:this.minlength,inputmode:this.inputmode,enterkeyhint:this.enterkeyhint,spellcheck:this.spellcheck,onInput:this.handleInput,onFocus:t=>this.handleFocus("focus",t),onBlur:t=>this.handleFocus("blur",t),style:this.inputStyle}),e("slot",{key:"f1020b3ab68d5db6f83a2d6ba84722faa76c354e",name:"suffix"}),this.clearable&&this.internalValue&&!this.disabled&&!this.readonly&&e("sd-ghost-button",{key:"547a309bb4434e558cf8b33fe8bcd51533d36cd5",icon:"close",ariaLabel:"clear",size:"xxs",disabled:this.disabled,class:"sd-input__clear-icon",onClick:async()=>{this.disabled||this.readonly||(this.internalValue="",await(this.formField?.sdValidate()))}}),"password"===this.type&&e("sd-ghost-button",{key:"39c77e164b08d4a0169f76c1b8dc519e0f39d993",icon:this.passwordVisible?"visibilityOn":"visibilityOff",ariaLabel:"visibility",size:"xxs",disabled:this.disabled||this.readonly,class:"sd-input__password-icon",onClick:()=>{this.disabled||this.readonly||(this.passwordVisible=!this.passwordVisible)}})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"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}"}},[772,"sd-input",{value:[1032],type:[1],size:[1],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],placeholder:[1],disabled:[4],clearable:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],autocomplete:[1],maxlength:[2],minlength:[2],inputmode:[1],enterkeyhint:[1],spellcheck:[4],status:[1],hint:[1],errorMessage:[1,"error-message"],inputClass:[1,"input-class"],readonly:[4],error:[1028],focused:[1028],hovered:[1028],label:[1],labelWidth:[8,"label-width"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],inputStyle:[16],name:[1],internalValue:[32],passwordVisible:[32],sdGetNativeElement:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function x(){"undefined"!=typeof customElements&&["sd-input","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-input":customElements.get(n(t))||customElements.define(n(t),v);break;case"sd-button":customElements.get(n(t))||d();break;case"sd-field":customElements.get(n(t))||l();break;case"sd-floating-portal":customElements.get(n(t))||r();break;case"sd-ghost-button":customElements.get(n(t))||u();break;case"sd-icon":customElements.get(n(t))||p();break;case"sd-portal":customElements.get(n(t))||h();break;case"sd-tag":customElements.get(n(t))||c();break;case"sd-tooltip":customElements.get(n(t))||b()}}))}export{v as S,x as d}
1
+ import{p as t,H as s,c as i,h as e,t as n}from"./p-CEVDmQdt.js";import{n as o}from"./p-CCwNgVmC.js";import{i as a}from"./p-e0ABNkP6.js";import{d}from"./p-C3rOud8J.js";import{d as l}from"./p-BFMUpKa2.js";import{d as r}from"./p-BJMpxQSk.js";import{d as u}from"./p-BdFwmTyS.js";import{d as p}from"./p-BnhzUsGP.js";import{d as h}from"./p-ChwRSZ6R.js";import{d as c}from"./p-CGJ1L8_Y.js";import{d as b}from"./p-CpBPNHYe.js";const f=a.textinput.sm,m=a.textinput.md,g={sm:{height:f.height,paddingX:f.paddingX,gap:f.gap,radius:f.radius,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight},md:{height:m.height,paddingX:m.paddingX,gap:m.gap,radius:m.radius,fontSize:m.typography.fontSize,lineHeight:m.typography.lineHeight,fontWeight:m.typography.fontWeight}},_={text:a.textinput.text,icon:a.textinput.icon},v=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.input=i(this,"sdUpdate",7),this.focus=i(this,"sdFocus",7),this.blur=i(this,"sdBlur",7)}get host(){return this}value=null;type="text";size="sm";addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;clearable=!1;width="";rules=[];autoFocus=!1;autocomplete="";maxlength;minlength;inputmode;enterkeyhint;spellcheck=!1;status;hint="";errorMessage="";inputClass="";readonly=!1;error=!1;focused=!1;hovered=!1;label="";labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;inputStyle={};internalValue=null;passwordVisible=!1;nativeEl=void 0;formField;name=o();input;focus;blur;valueChanged(t){this.internalValue=t}internalValueChanged(t){t!==this.value&&(this.value=t,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){null!=this.value&&""!==this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{this.internalValue=t.target.value};handleFocus=async(t,s)=>{this.focused="focus"===t,"blur"===t?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(s)):this.focus?.emit(s)};render(){const t=g[this.size]??g.sm;return e("sd-field",{key:"7444ee5ebb482fe9c4f837114456cab90de6b3aa",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:t=>this.formField=t,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-input-font-size":`${t.fontSize}px`,"--sd-input-line-height":`${t.lineHeight}px`,"--sd-input-font-weight":t.fontWeight,"--sd-input-padding-x":`${t.paddingX}px`,"--sd-input-gap":`${t.gap}px`,"--sd-input-text-color":_.text.default,"--sd-input-placeholder-color":_.text.placeholder,"--sd-input-disabled-color":_.text.disabled,"--sd-input-icon-color":_.icon.default,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`}},e("label",{key:"0dbb6bc35522fb2d0c6d6d147756954ed96d2467",class:"sd-input__content"},e("slot",{key:"d5e8488bc3e29bd671bb337051d7b768c3c37c4b",name:"prefix"}),e("input",{key:"9dff73dbc5af19b0e2f19e95a26ad32211761484",name:this.name,ref:t=>this.nativeEl=t,class:`sd-input__native ${this.inputClass}`,type:"password"===this.type&&this.passwordVisible?"text":this.type??"text",value:this.internalValue||"",placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,autocomplete:this.autocomplete||void 0,maxlength:this.maxlength,minlength:this.minlength,inputmode:this.inputmode,enterkeyhint:this.enterkeyhint,spellcheck:this.spellcheck,onInput:this.handleInput,onFocus:t=>this.handleFocus("focus",t),onBlur:t=>this.handleFocus("blur",t),style:this.inputStyle}),e("slot",{key:"f1020b3ab68d5db6f83a2d6ba84722faa76c354e",name:"suffix"}),this.clearable&&this.internalValue&&!this.disabled&&!this.readonly&&e("sd-ghost-button",{key:"547a309bb4434e558cf8b33fe8bcd51533d36cd5",icon:"close",ariaLabel:"clear",size:"xxs",disabled:this.disabled,class:"sd-input__clear-icon",onClick:async()=>{this.disabled||this.readonly||(this.internalValue="",await(this.formField?.sdValidate()))}}),"password"===this.type&&e("sd-ghost-button",{key:"39c77e164b08d4a0169f76c1b8dc519e0f39d993",icon:this.passwordVisible?"visibilityOn":"visibilityOff",ariaLabel:"visibility",size:"xxs",disabled:this.disabled||this.readonly,class:"sd-input__password-icon",onClick:()=>{this.disabled||this.readonly||(this.passwordVisible=!this.passwordVisible)}})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"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}"}},[772,"sd-input",{value:[1032],type:[1],size:[1],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],placeholder:[1],disabled:[4],clearable:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],autocomplete:[1],maxlength:[2],minlength:[2],inputmode:[1],enterkeyhint:[1],spellcheck:[4],status:[1],hint:[1],errorMessage:[1,"error-message"],inputClass:[1,"input-class"],readonly:[4],error:[1028],focused:[1028],hovered:[1028],label:[1],labelWidth:[8,"label-width"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],inputStyle:[16],name:[1],internalValue:[32],passwordVisible:[32],sdGetNativeElement:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function x(){"undefined"!=typeof customElements&&["sd-input","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-input":customElements.get(n(t))||customElements.define(n(t),v);break;case"sd-button":customElements.get(n(t))||d();break;case"sd-field":customElements.get(n(t))||l();break;case"sd-floating-portal":customElements.get(n(t))||r();break;case"sd-ghost-button":customElements.get(n(t))||u();break;case"sd-icon":customElements.get(n(t))||p();break;case"sd-portal":customElements.get(n(t))||h();break;case"sd-tag":customElements.get(n(t))||c();break;case"sd-tooltip":customElements.get(n(t))||b()}}))}export{v as S,x as d}
@@ -1 +1 @@
1
- import{p as e,H as t,c as s,h as a,t as r}from"./p-CCCwPJ5p.js";import{n as d}from"./p-CCwNgVmC.js";import{i as o}from"./p-e0ABNkP6.js";import{d as i}from"./p-D7StBSjK.js";import{d as l}from"./p-BwTsP0Ak.js";import{d as n}from"./p-Cj_1bYZF.js";import{d as h}from"./p-Cjf8PHEl.js";import{d as c}from"./p-CCO1WtEj.js";import{d as u}from"./p-S2-XqY2R.js";import{d as p}from"./p-JMuxVcTW.js";import{d as x}from"./p-Cdzn78dP.js";const m={paddingX:o.textinput.sm.paddingX,paddingY:o.textinput.sm.paddingY,radius:o.textinput.sm.radius,fontSize:o.textinput.sm.typography.fontSize,lineHeight:o.textinput.sm.typography.lineHeight,fontWeight:o.textinput.sm.typography.fontWeight},b={text:o.textinput.text,bg:o.textinput.bg,border:o.textinput.border,resizer:o.textinput.resizer},f=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.input=s(this,"sdUpdate",7),this.focus=s(this,"sdFocus",7),this.blur=s(this,"sdBlur",7)}get host(){return this}value=null;placeholder="입력해 주세요.";disabled=!1;readonly=!1;autoFocus=!1;textareaClass="";textareaStyle={};maxLength;rows;spellcheck=!1;width="";label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;status;focused=!1;hovered=!1;internalValue=null;nativeEl=void 0;formField;name=d();input;focus;blur;valueChanged(e){this.internalValue=e}internalValueChanged(e){e!==this.value&&(this.value=e,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){null!=this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=e=>{this.internalValue=e.target.value};handleFocus=async(e,t)=>{this.focused="focus"===e,"blur"===e?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(t)):this.focus?.emit(t)};render(){return a("sd-field",{key:"f8fd8949824938bb79f101de2e5eca7980224b09",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:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-textarea-font-size":`${m.fontSize}px`,"--sd-textarea-line-height":`${m.lineHeight}px`,"--sd-textarea-font-weight":m.fontWeight,"--sd-textarea-padding-x":`${m.paddingX}px`,"--sd-textarea-padding-y":`${m.paddingY}px`,"--sd-textarea-radius":`${m.radius}px`,"--sd-textarea-text-color":b.text.default,"--sd-textarea-placeholder-color":b.text.placeholder,"--sd-textarea-disabled-color":b.text.disabled,"--sd-textarea-bg-color":b.bg.default,"--sd-textarea-disabled-bg-color":b.bg.disabled,"--sd-textarea-border-color":b.border.default,"--sd-textarea-resizer-color":b.resizer.color,"--sd-system-size-field-sm-height":"auto","--sd-system-radius-field-sm":`${m.radius}px`}},a("div",{key:"382441be15dd047888cf876006f1966256a503b7",class:"sd-textarea__content"},a("textarea",{key:"5f5985ccdcc401f4aff2f47fe40003abeb76e8b3",name:this.name,ref:e=>this.nativeEl=e,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:e=>this.handleFocus("focus",e),onBlur:e=>this.handleFocus("blur",e),style:this.textareaStyle})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"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)}"}},[512,"sd-textarea",{value:[1025],placeholder:[1],disabled:[4],readonly:[4],autoFocus:[4,"auto-focus"],textareaClass:[1,"textarea-class"],textareaStyle:[16],maxLength:[2,"max-length"],rows:[2],spellcheck:[4],width:[8],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],hint:[1],errorMessage:[1,"error-message"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],rules:[16],error:[1028],status:[1],focused:[1028],hovered:[1028],name:[1],internalValue:[32],sdGetNativeElement:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function g(){"undefined"!=typeof customElements&&["sd-textarea","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-textarea":customElements.get(r(e))||customElements.define(r(e),f);break;case"sd-button":customElements.get(r(e))||i();break;case"sd-field":customElements.get(r(e))||l();break;case"sd-floating-portal":customElements.get(r(e))||n();break;case"sd-ghost-button":customElements.get(r(e))||h();break;case"sd-icon":customElements.get(r(e))||c();break;case"sd-portal":customElements.get(r(e))||u();break;case"sd-tag":customElements.get(r(e))||p();break;case"sd-tooltip":customElements.get(r(e))||x()}}))}export{f as S,g as d}
1
+ import{p as e,H as t,c as s,h as a,t as r}from"./p-CEVDmQdt.js";import{n as d}from"./p-CCwNgVmC.js";import{i as o}from"./p-e0ABNkP6.js";import{d as i}from"./p-C3rOud8J.js";import{d as l}from"./p-BFMUpKa2.js";import{d as n}from"./p-BJMpxQSk.js";import{d as h}from"./p-BdFwmTyS.js";import{d as c}from"./p-BnhzUsGP.js";import{d as u}from"./p-ChwRSZ6R.js";import{d as p}from"./p-CGJ1L8_Y.js";import{d as x}from"./p-CpBPNHYe.js";const m={paddingX:o.textinput.sm.paddingX,paddingY:o.textinput.sm.paddingY,radius:o.textinput.sm.radius,fontSize:o.textinput.sm.typography.fontSize,lineHeight:o.textinput.sm.typography.lineHeight,fontWeight:o.textinput.sm.typography.fontWeight},b={text:o.textinput.text,bg:o.textinput.bg,border:o.textinput.border,resizer:o.textinput.resizer},f=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.input=s(this,"sdUpdate",7),this.focus=s(this,"sdFocus",7),this.blur=s(this,"sdBlur",7)}get host(){return this}value=null;placeholder="입력해 주세요.";disabled=!1;readonly=!1;autoFocus=!1;textareaClass="";textareaStyle={};maxLength;rows;spellcheck=!1;width="";label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;status;focused=!1;hovered=!1;internalValue=null;nativeEl=void 0;formField;name=d();input;focus;blur;valueChanged(e){this.internalValue=e}internalValueChanged(e){e!==this.value&&(this.value=e,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){null!=this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=e=>{this.internalValue=e.target.value};handleFocus=async(e,t)=>{this.focused="focus"===e,"blur"===e?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(t)):this.focus?.emit(t)};render(){return a("sd-field",{key:"f8fd8949824938bb79f101de2e5eca7980224b09",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:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-textarea-font-size":`${m.fontSize}px`,"--sd-textarea-line-height":`${m.lineHeight}px`,"--sd-textarea-font-weight":m.fontWeight,"--sd-textarea-padding-x":`${m.paddingX}px`,"--sd-textarea-padding-y":`${m.paddingY}px`,"--sd-textarea-radius":`${m.radius}px`,"--sd-textarea-text-color":b.text.default,"--sd-textarea-placeholder-color":b.text.placeholder,"--sd-textarea-disabled-color":b.text.disabled,"--sd-textarea-bg-color":b.bg.default,"--sd-textarea-disabled-bg-color":b.bg.disabled,"--sd-textarea-border-color":b.border.default,"--sd-textarea-resizer-color":b.resizer.color,"--sd-system-size-field-sm-height":"auto","--sd-system-radius-field-sm":`${m.radius}px`}},a("div",{key:"382441be15dd047888cf876006f1966256a503b7",class:"sd-textarea__content"},a("textarea",{key:"5f5985ccdcc401f4aff2f47fe40003abeb76e8b3",name:this.name,ref:e=>this.nativeEl=e,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:e=>this.handleFocus("focus",e),onBlur:e=>this.handleFocus("blur",e),style:this.textareaStyle})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"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)}"}},[512,"sd-textarea",{value:[1025],placeholder:[1],disabled:[4],readonly:[4],autoFocus:[4,"auto-focus"],textareaClass:[1,"textarea-class"],textareaStyle:[16],maxLength:[2,"max-length"],rows:[2],spellcheck:[4],width:[8],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],hint:[1],errorMessage:[1,"error-message"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],rules:[16],error:[1028],status:[1],focused:[1028],hovered:[1028],name:[1],internalValue:[32],sdGetNativeElement:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function g(){"undefined"!=typeof customElements&&["sd-textarea","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-textarea":customElements.get(r(e))||customElements.define(r(e),f);break;case"sd-button":customElements.get(r(e))||i();break;case"sd-field":customElements.get(r(e))||l();break;case"sd-floating-portal":customElements.get(r(e))||n();break;case"sd-ghost-button":customElements.get(r(e))||h();break;case"sd-icon":customElements.get(r(e))||c();break;case"sd-portal":customElements.get(r(e))||u();break;case"sd-tag":customElements.get(r(e))||p();break;case"sd-tooltip":customElements.get(r(e))||x()}}))}export{f as S,g as d}