@sellmate/design-system 1.0.68 → 1.0.70

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 (253) hide show
  1. package/dist/cjs/design-system.cjs.js +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/sd-action-modal.cjs.entry.js +1 -1
  4. package/dist/cjs/sd-badge.cjs.entry.js +1 -1
  5. package/dist/cjs/sd-barcode-input.cjs.entry.js +2 -1
  6. package/dist/cjs/sd-button-v2_2.cjs.entry.js +3 -3
  7. package/dist/cjs/sd-button_4.cjs.entry.js +23 -6
  8. package/dist/cjs/sd-card.cjs.entry.js +1 -1
  9. package/dist/cjs/sd-chip.cjs.entry.js +1 -1
  10. package/dist/cjs/sd-circle-progress.cjs.entry.js +1 -1
  11. package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +3 -3
  12. package/dist/cjs/sd-date-picker-calendar.cjs.entry.js +1 -1
  13. package/dist/cjs/sd-date-picker-trigger.cjs.entry.js +2 -2
  14. package/dist/cjs/sd-date-picker.cjs.entry.js +3 -2
  15. package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +1 -1
  16. package/dist/cjs/sd-date-range-picker.cjs.entry.js +3 -2
  17. package/dist/cjs/sd-dropdown-button.cjs.entry.js +3 -3
  18. package/dist/cjs/sd-file-picker.cjs.entry.js +2 -1
  19. package/dist/cjs/sd-ghost-button.cjs.entry.js +2 -2
  20. package/dist/cjs/sd-input_2.cjs.entry.js +3 -2
  21. package/dist/cjs/sd-loading-container.cjs.entry.js +2 -2
  22. package/dist/cjs/sd-number-input.cjs.entry.js +4 -3
  23. package/dist/cjs/sd-pagination_2.cjs.entry.js +61 -29
  24. package/dist/cjs/sd-popover.cjs.entry.js +23 -23
  25. package/dist/cjs/sd-portal.cjs.entry.js +1 -1
  26. package/dist/cjs/sd-radio-button.cjs.entry.js +1 -1
  27. package/dist/cjs/sd-radio-group.cjs.entry.js +1 -1
  28. package/dist/cjs/sd-radio.cjs.entry.js +1 -1
  29. package/dist/cjs/sd-select-group.cjs.entry.js +2 -1
  30. package/dist/cjs/sd-select-multiple-group.cjs.entry.js +1 -1
  31. package/dist/cjs/sd-select-v2-list-item_4.cjs.entry.js +28 -4
  32. package/dist/cjs/sd-select.cjs.entry.js +2 -1
  33. package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
  34. package/dist/cjs/sd-textarea.cjs.entry.js +2 -1
  35. package/dist/cjs/table-test.cjs.entry.js +1 -1
  36. package/dist/collection/collection-manifest.json +1 -1
  37. package/dist/collection/components/sd-action-modal/sd-action-modal.js +1 -1
  38. package/dist/collection/components/sd-badge/sd-badge.js +1 -1
  39. package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +29 -1
  40. package/dist/collection/components/sd-button-v2/sd-button-v2.js +3 -3
  41. package/dist/collection/components/sd-card/sd-card.js +1 -1
  42. package/dist/collection/components/sd-chip/sd-chip.js +1 -1
  43. package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
  44. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +2 -2
  45. package/dist/collection/components/sd-date-picker/sd-date-picker-calendar/sd-date-picker-calendar.js +1 -1
  46. package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +2 -2
  47. package/dist/collection/components/sd-date-picker/sd-date-picker.js +30 -2
  48. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +1 -1
  49. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +30 -2
  50. package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +3 -3
  51. package/dist/collection/components/sd-field/sd-field.config.js +5 -0
  52. package/dist/collection/components/sd-field/sd-field.css +4 -0
  53. package/dist/collection/components/sd-field/sd-field.js +39 -5
  54. package/dist/collection/components/sd-file-picker/sd-file-picker.js +29 -1
  55. package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +12 -1
  56. package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +2 -2
  57. package/dist/collection/components/sd-input/sd-input.js +30 -2
  58. package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
  59. package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
  60. package/dist/collection/components/sd-number-input/sd-number-input.js +31 -3
  61. package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
  62. package/dist/collection/components/sd-popover/sd-popover.js +49 -53
  63. package/dist/collection/components/sd-portal/sd-portal.js +1 -1
  64. package/dist/collection/components/sd-radio/sd-radio.js +1 -1
  65. package/dist/collection/components/sd-radio-button/sd-radio-button.js +1 -1
  66. package/dist/collection/components/sd-radio-group/sd-radio-group.js +1 -1
  67. package/dist/collection/components/sd-select/sd-select.js +29 -1
  68. package/dist/collection/components/sd-select-group/sd-select-group.js +29 -1
  69. package/dist/collection/components/sd-select-multiple-group/sd-select-multiple-group.js +1 -1
  70. package/dist/collection/components/sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.js +8 -2
  71. package/dist/collection/components/sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.js +69 -2
  72. package/dist/collection/components/sd-select-v2/sd-select-v2.js +124 -27
  73. package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
  74. package/dist/collection/components/sd-textarea/sd-textarea.js +29 -1
  75. package/dist/collection/components/table-test/table-test.js +1 -1
  76. package/dist/components/{p-z9MoRjYX.js → p-9HhG23Vy.js} +1 -1
  77. package/dist/components/p-B8XV0vD8.js +1 -0
  78. package/dist/components/{p-DlkxQ9Jn.js → p-BLxwBD2G.js} +1 -1
  79. package/dist/components/{p-B1j9ZWLJ.js → p-BM9Fr6OX.js} +1 -1
  80. package/dist/components/{p-CEeNVTzW.js → p-BfG60atH.js} +1 -1
  81. package/dist/components/p-CU7IOtCw.js +1 -0
  82. package/dist/components/{p-DPCj-bFr.js → p-Cc3bTBBn.js} +1 -1
  83. package/dist/components/{p-CS62OEXf.js → p-CeHRQb7A.js} +1 -1
  84. package/dist/components/{p-D21iKAp7.js → p-CoOl8zeX.js} +1 -1
  85. package/dist/components/p-CscUxW9p.js +1 -0
  86. package/dist/components/p-CuiFB2yQ.js +1 -0
  87. package/dist/components/p-D1SaZEYh.js +1 -0
  88. package/dist/components/{p-BPXQ6DXz.js → p-DM5vbfxB.js} +1 -1
  89. package/dist/components/{p-T5BGXHZg.js → p-DWJ3CIKO.js} +1 -1
  90. package/dist/components/{p-BFd54Imz.js → p-D_XZAh9v.js} +1 -1
  91. package/dist/components/{p-CtrDZYN5.js → p-DboqT9Do.js} +1 -1
  92. package/dist/components/p-DkHyt3Dz.js +1 -0
  93. package/dist/components/{p-DIro-Wat.js → p-Dmk-f7qn.js} +1 -1
  94. package/dist/components/p-DpBU4AWy.js +1 -0
  95. package/dist/components/p-r8kAA1Su.js +1 -0
  96. package/dist/components/{p-BaHpEtbz.js → p-raiEivQ1.js} +1 -1
  97. package/dist/components/sd-action-modal.js +1 -1
  98. package/dist/components/sd-badge.js +1 -1
  99. package/dist/components/sd-barcode-input.js +1 -1
  100. package/dist/components/sd-button-v2.js +1 -1
  101. package/dist/components/sd-card.js +1 -1
  102. package/dist/components/sd-chip.js +1 -1
  103. package/dist/components/sd-circle-progress.js +1 -1
  104. package/dist/components/sd-confirm-modal.js +1 -1
  105. package/dist/components/sd-date-picker-calendar.js +1 -1
  106. package/dist/components/sd-date-picker-trigger.js +1 -1
  107. package/dist/components/sd-date-picker.js +1 -1
  108. package/dist/components/sd-date-range-picker-calendar.js +1 -1
  109. package/dist/components/sd-date-range-picker.js +1 -1
  110. package/dist/components/sd-dropdown-button.js +1 -1
  111. package/dist/components/sd-field.js +1 -1
  112. package/dist/components/sd-file-picker.js +1 -1
  113. package/dist/components/sd-floating-portal.js +1 -1
  114. package/dist/components/sd-ghost-button.js +1 -1
  115. package/dist/components/sd-guide.js +1 -1
  116. package/dist/components/sd-input.js +1 -1
  117. package/dist/components/sd-loading-container.js +1 -1
  118. package/dist/components/sd-loading-modal.js +1 -1
  119. package/dist/components/sd-modal-container.js +1 -1
  120. package/dist/components/sd-number-input.js +1 -1
  121. package/dist/components/sd-pagination.js +1 -1
  122. package/dist/components/sd-popover.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-dropdown.js +1 -1
  128. package/dist/components/sd-select-group.js +1 -1
  129. package/dist/components/sd-select-multiple-group.js +1 -1
  130. package/dist/components/sd-select-multiple.js +1 -1
  131. package/dist/components/sd-select-search-input.js +1 -1
  132. package/dist/components/sd-select-v2-listbox.js +1 -1
  133. package/dist/components/sd-select-v2-trigger.js +1 -1
  134. package/dist/components/sd-select-v2.js +1 -1
  135. package/dist/components/sd-select.js +1 -1
  136. package/dist/components/sd-table.js +1 -1
  137. package/dist/components/sd-tabs.js +1 -1
  138. package/dist/components/sd-textarea.js +1 -1
  139. package/dist/components/sd-thead.js +1 -1
  140. package/dist/components/sd-toast-container.js +1 -1
  141. package/dist/components/sd-toast.js +1 -1
  142. package/dist/components/sd-tooltip.js +1 -1
  143. package/dist/components/table-test.js +1 -1
  144. package/dist/design-system/design-system.esm.js +1 -1
  145. package/dist/design-system/p-06080355.entry.js +1 -0
  146. package/dist/design-system/{p-1b8e63a6.entry.js → p-0967ef4b.entry.js} +1 -1
  147. package/dist/design-system/{p-449e58ee.entry.js → p-12f13678.entry.js} +1 -1
  148. package/dist/design-system/{p-23c31074.entry.js → p-132721ad.entry.js} +1 -1
  149. package/dist/design-system/{p-8cd1b533.entry.js → p-1af3c5c5.entry.js} +1 -1
  150. package/dist/design-system/p-2196f439.entry.js +1 -0
  151. package/dist/design-system/{p-01ac7743.entry.js → p-2319b722.entry.js} +1 -1
  152. package/dist/design-system/{p-0d485537.entry.js → p-27165b31.entry.js} +1 -1
  153. package/dist/design-system/{p-4d434794.entry.js → p-3677b3ce.entry.js} +1 -1
  154. package/dist/design-system/{p-60ece09d.entry.js → p-3c64616c.entry.js} +1 -1
  155. package/dist/design-system/p-4ba03850.entry.js +1 -0
  156. package/dist/design-system/p-639d237f.entry.js +1 -0
  157. package/dist/design-system/{p-35b29182.entry.js → p-7232731b.entry.js} +1 -1
  158. package/dist/design-system/p-7dc33db0.entry.js +1 -0
  159. package/dist/design-system/{p-002e10ac.entry.js → p-8cb8444e.entry.js} +1 -1
  160. package/dist/design-system/p-8d65090b.entry.js +1 -0
  161. package/dist/design-system/{p-9f0fe1f6.entry.js → p-9960d880.entry.js} +1 -1
  162. package/dist/design-system/p-9dd7befe.entry.js +1 -0
  163. package/dist/design-system/{p-92a52f89.entry.js → p-a4e85dba.entry.js} +1 -1
  164. package/dist/design-system/p-a70ca82b.entry.js +1 -0
  165. package/dist/design-system/{p-48f1f9ff.entry.js → p-a8e7406e.entry.js} +1 -1
  166. package/dist/design-system/{p-1a455448.entry.js → p-ac441e78.entry.js} +1 -1
  167. package/dist/design-system/p-ac9f7551.entry.js +1 -0
  168. package/dist/design-system/p-b3b1f25d.entry.js +1 -0
  169. package/dist/design-system/p-beb8d3de.entry.js +1 -0
  170. package/dist/design-system/{p-4f9f25a1.entry.js → p-c290c0e0.entry.js} +1 -1
  171. package/dist/design-system/p-c62ad2f4.entry.js +1 -0
  172. package/dist/design-system/{p-4de3b6b1.entry.js → p-c67ff78d.entry.js} +1 -1
  173. package/dist/design-system/{p-7dd8beba.entry.js → p-c68e37f2.entry.js} +1 -1
  174. package/dist/design-system/p-d668fd71.entry.js +1 -0
  175. package/dist/design-system/{p-6ef2d08f.entry.js → p-d8a48add.entry.js} +1 -1
  176. package/dist/design-system/{p-cdedac3c.entry.js → p-dc43ebf9.entry.js} +1 -1
  177. package/dist/design-system/{p-6b478f5c.entry.js → p-f6869087.entry.js} +1 -1
  178. package/dist/esm/design-system.js +1 -1
  179. package/dist/esm/loader.js +1 -1
  180. package/dist/esm/sd-action-modal.entry.js +1 -1
  181. package/dist/esm/sd-badge.entry.js +1 -1
  182. package/dist/esm/sd-barcode-input.entry.js +2 -1
  183. package/dist/esm/sd-button-v2_2.entry.js +3 -3
  184. package/dist/esm/sd-button_4.entry.js +23 -6
  185. package/dist/esm/sd-card.entry.js +1 -1
  186. package/dist/esm/sd-chip.entry.js +1 -1
  187. package/dist/esm/sd-circle-progress.entry.js +1 -1
  188. package/dist/esm/sd-confirm-modal_2.entry.js +3 -3
  189. package/dist/esm/sd-date-picker-calendar.entry.js +1 -1
  190. package/dist/esm/sd-date-picker-trigger.entry.js +2 -2
  191. package/dist/esm/sd-date-picker.entry.js +3 -2
  192. package/dist/esm/sd-date-range-picker-calendar.entry.js +1 -1
  193. package/dist/esm/sd-date-range-picker.entry.js +3 -2
  194. package/dist/esm/sd-dropdown-button.entry.js +3 -3
  195. package/dist/esm/sd-file-picker.entry.js +2 -1
  196. package/dist/esm/sd-ghost-button.entry.js +2 -2
  197. package/dist/esm/sd-input_2.entry.js +3 -2
  198. package/dist/esm/sd-loading-container.entry.js +2 -2
  199. package/dist/esm/sd-number-input.entry.js +4 -3
  200. package/dist/esm/sd-pagination_2.entry.js +61 -29
  201. package/dist/esm/sd-popover.entry.js +24 -24
  202. package/dist/esm/sd-portal.entry.js +1 -1
  203. package/dist/esm/sd-radio-button.entry.js +1 -1
  204. package/dist/esm/sd-radio-group.entry.js +1 -1
  205. package/dist/esm/sd-radio.entry.js +1 -1
  206. package/dist/esm/sd-select-group.entry.js +2 -1
  207. package/dist/esm/sd-select-multiple-group.entry.js +1 -1
  208. package/dist/esm/sd-select-v2-list-item_4.entry.js +28 -4
  209. package/dist/esm/sd-select.entry.js +2 -1
  210. package/dist/esm/sd-tabs.entry.js +1 -1
  211. package/dist/esm/sd-textarea.entry.js +2 -1
  212. package/dist/esm/table-test.entry.js +1 -1
  213. package/dist/types/components/sd-barcode-input/sd-barcode-input.d.ts +2 -0
  214. package/dist/types/components/sd-date-picker/sd-date-picker.d.ts +2 -0
  215. package/dist/types/components/sd-date-range-picker/sd-date-range-picker.d.ts +2 -0
  216. package/dist/types/components/sd-field/sd-field.config.d.ts +2 -0
  217. package/dist/types/components/sd-field/sd-field.d.ts +2 -1
  218. package/dist/types/components/sd-file-picker/sd-file-picker.d.ts +2 -0
  219. package/dist/types/components/sd-floating-portal/sd-floating-portal.d.ts +1 -0
  220. package/dist/types/components/sd-input/sd-input.d.ts +2 -0
  221. package/dist/types/components/sd-number-input/sd-number-input.d.ts +2 -0
  222. package/dist/types/components/sd-popover/sd-popover.d.ts +12 -8
  223. package/dist/types/components/sd-select/sd-select.d.ts +2 -0
  224. package/dist/types/components/sd-select-group/sd-select-group.d.ts +2 -0
  225. package/dist/types/components/sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.d.ts +4 -0
  226. package/dist/types/components/sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.d.ts +6 -0
  227. package/dist/types/components/sd-select-v2/sd-select-v2.d.ts +10 -0
  228. package/dist/types/components/sd-textarea/sd-textarea.d.ts +2 -0
  229. package/dist/types/components.d.ts +128 -17
  230. package/hydrate/index.js +207 -114
  231. package/hydrate/index.mjs +207 -114
  232. package/package.json +1 -1
  233. package/dist/components/p-Cb1M05mf.js +0 -1
  234. package/dist/components/p-CsPyZohK.js +0 -1
  235. package/dist/components/p-DGPGMB_Z.js +0 -1
  236. package/dist/components/p-DQLyH3dr.js +0 -1
  237. package/dist/components/p-DWW5xr6r.js +0 -1
  238. package/dist/components/p-D_lyw4rN.js +0 -1
  239. package/dist/components/p-Diis5oCN.js +0 -1
  240. package/dist/components/p-N_EbEY8s.js +0 -1
  241. package/dist/design-system/p-07736d67.entry.js +0 -1
  242. package/dist/design-system/p-0c98676e.entry.js +0 -1
  243. package/dist/design-system/p-16eae7ae.entry.js +0 -1
  244. package/dist/design-system/p-23ff6bee.entry.js +0 -1
  245. package/dist/design-system/p-2a663b3b.entry.js +0 -1
  246. package/dist/design-system/p-33713805.entry.js +0 -1
  247. package/dist/design-system/p-5a0b0a1b.entry.js +0 -1
  248. package/dist/design-system/p-6ca6dfaf.entry.js +0 -1
  249. package/dist/design-system/p-8281dc36.entry.js +0 -1
  250. package/dist/design-system/p-87222184.entry.js +0 -1
  251. package/dist/design-system/p-ca6b4d4a.entry.js +0 -1
  252. package/dist/design-system/p-e1b307ee.entry.js +0 -1
  253. package/dist/design-system/p-ebc72b3f.entry.js +0 -1
@@ -25,6 +25,7 @@ export class SdSelectGroup extends BaseDropdownEvent {
25
25
  label = '';
26
26
  labelWidth = '';
27
27
  addonLabel = '';
28
+ addonAlign = 'start';
28
29
  icon = undefined;
29
30
  labelTooltip = '';
30
31
  labelTooltipProps = null;
@@ -271,7 +272,7 @@ export class SdSelectGroup extends BaseDropdownEvent {
271
272
  });
272
273
  }
273
274
  render() {
274
- return (h("sd-field", { key: 'c3d2a4365ba2594d3e0dca138ff63a335171125c', label: this.label, labelWidth: this.labelWidth, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, addonLabel: this.addonLabel, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: { '--field-width': this.width || '200px' } }, h("div", { key: 'b527250fecc69b8f5d4c88aa3f6090c2b291efc9', class: {
275
+ return (h("sd-field", { key: '698b76ed0785f475a099fac99e3564b20c252c01', label: this.label, labelWidth: this.labelWidth, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, addonLabel: this.addonLabel, addonAlign: this.addonAlign, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: { '--field-width': this.width || '200px' } }, h("div", { key: 'aa449fda5e32d0519792dc2e713d3c59658c86fa', class: {
275
276
  'sd-select-group': true,
276
277
  'sd-select-group--open': this.isOpen,
277
278
  'sd-select-group--disabled': this.disabled,
@@ -584,6 +585,33 @@ export class SdSelectGroup extends BaseDropdownEvent {
584
585
  "attribute": "addon-label",
585
586
  "defaultValue": "''"
586
587
  },
588
+ "addonAlign": {
589
+ "type": "string",
590
+ "mutable": false,
591
+ "complexType": {
592
+ "original": "FieldAddonAlign",
593
+ "resolved": "\"center\" | \"end\" | \"start\"",
594
+ "references": {
595
+ "FieldAddonAlign": {
596
+ "location": "import",
597
+ "path": "../sd-field/sd-field.config",
598
+ "id": "src/components/sd-field/sd-field.config.ts::FieldAddonAlign",
599
+ "referenceLocation": "FieldAddonAlign"
600
+ }
601
+ }
602
+ },
603
+ "required": false,
604
+ "optional": false,
605
+ "docs": {
606
+ "tags": [],
607
+ "text": ""
608
+ },
609
+ "getter": false,
610
+ "setter": false,
611
+ "reflect": false,
612
+ "attribute": "addon-align",
613
+ "defaultValue": "'start'"
614
+ },
587
615
  "icon": {
588
616
  "type": "unknown",
589
617
  "mutable": false,
@@ -393,7 +393,7 @@ export class SdSelectMultipleGroup extends BaseDropdownEvent {
393
393
  });
394
394
  }
395
395
  render() {
396
- return (h("sd-field", { key: '8e0cfc89b55809d3c5b556fc5c59077c2c952ad5', label: this.label, labelWidth: this.labelWidth, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: { '--field-width': this.width || '200px' } }, h("div", { key: '852a713b4c38c4845c407cb04801d9b0c33f0515', class: {
396
+ return (h("sd-field", { key: '4140b6529565f97fa65d81ae1462108476d52bcc', label: this.label, labelWidth: this.labelWidth, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: { '--field-width': this.width || '200px' } }, h("div", { key: '2dab2697f3e375d214b66464b0f57aa32e77757b', class: {
397
397
  'sd-select-multiple-group': true,
398
398
  'sd-select-multiple-group--open': this.isOpen,
399
399
  'sd-select-multiple-group--disabled': this.disabled,
@@ -106,13 +106,19 @@ export class SdSelectV2Listbox {
106
106
  * `children` is emptied by `filterTree`; in that case we fall back to the
107
107
  * full original subtree because the user has no way to deselect descendants
108
108
  * individually.
109
+ *
110
+ * disabled 항목은 사용자가 토글할 수 없으므로 leaves 집합에서 제외한다.
111
+ * 호출처(그룹 토글 / 카운트 / indeterminate 판정)가 모두 동일하게 "실제
112
+ * 토글 가능한 leaves" 만 보도록 통일한다.
109
113
  */
110
114
  collectVisibleLeaves(option) {
115
+ if (option.disabled)
116
+ return [];
111
117
  if (!option.children)
112
118
  return [option];
113
119
  if (option.children.length === 0) {
114
120
  const original = this.findOriginalOption(option.value, this.options);
115
- return original ? this.collectLeaves(original) : [];
121
+ return original ? this.collectLeaves(original).filter(l => !l.disabled) : [];
116
122
  }
117
123
  return option.children.flatMap(child => this.collectVisibleLeaves(child));
118
124
  }
@@ -282,7 +288,7 @@ export class SdSelectV2Listbox {
282
288
  '--listbox-max-height': this.maxHeight,
283
289
  '--listbox-radius': `${LIST_BOX_LAYOUT.radius}px`,
284
290
  };
285
- return (h("div", { key: 'ca3d529a4a20f394de1358cc0627c730843a8cf9', class: "sd-select-v2-listbox", style: cssVars }, this.showSearch && (h("sd-select-v2-list-item-search", { key: 'e7c421d676c6a94cc31b0df69a489818b26563e3', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), h("div", { key: 'f3f44e6df1fc8faf71c607cc0efb0d891dcbfb3d', class: "sd-select-v2-listbox__list", onScroll: this.handleScroll, ref: el => {
291
+ return (h("div", { key: '17ebae1a1589245944d7db5a05f2c011ad13e391', class: "sd-select-v2-listbox", style: cssVars }, this.showSearch && (h("sd-select-v2-list-item-search", { key: '181ddd3a11ebe3b81353d66111459c7929c5af0b', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), h("div", { key: '91114e82f60a6bdeb74142d6d7abea2871e6678e', class: "sd-select-v2-listbox__list", onScroll: this.handleScroll, ref: el => {
286
292
  this.listEl = el;
287
293
  } }, this.isEmpty ? (h("div", { class: "sd-select-v2-listbox__empty" }, EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (h("sd-select-v2-list-item", { option: option, depth: 1, isSelected: this.isOptionSelected(option), isFocused: this.isOptionFocused(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick, onMouseEnter: () => this.handleOptionHover(option) })))))));
288
294
  }
@@ -6,11 +6,25 @@ export class SdSelectV2Trigger {
6
6
  disabled = false;
7
7
  isOpen = false;
8
8
  triggerClick;
9
+ triggerFocus;
10
+ triggerBlur;
11
+ triggerEl;
12
+ async sdFocus() {
13
+ if (this.disabled)
14
+ return;
15
+ this.triggerEl?.focus();
16
+ }
9
17
  handleClick = () => {
10
18
  if (this.disabled)
11
19
  return;
12
20
  this.triggerClick.emit();
13
21
  };
22
+ handleFocus = () => {
23
+ this.triggerFocus.emit();
24
+ };
25
+ handleBlur = () => {
26
+ this.triggerBlur.emit();
27
+ };
14
28
  render() {
15
29
  const hasValue = !!this.displayText;
16
30
  const cssVars = {
@@ -28,11 +42,13 @@ export class SdSelectV2Trigger {
28
42
  ? SELECT_COLORS.icon.disabled
29
43
  : SELECT_COLORS.icon.default,
30
44
  };
31
- return (h("div", { key: '4b3f60a4bd00423337ebd472a628bc67f0a5d55c', class: {
45
+ return (h("div", { key: 'e5c4db3cfbaa29c0af7efd0376a972dee0e9db56', ref: el => {
46
+ this.triggerEl = el;
47
+ }, tabindex: this.disabled ? -1 : 0, class: {
32
48
  'sd-select-v2-trigger': true,
33
49
  'sd-select-v2-trigger--open': this.isOpen,
34
50
  'sd-select-v2-trigger--disabled': this.disabled,
35
- }, style: cssVars, onClick: this.handleClick }, h("div", { key: '8a6f9aa132aa6db4ba9035b3b97f91b4f29fa475', class: "sd-select-v2-trigger__content" }, h("span", { key: '3fb8fa054682eefc604623da9ecb906581cf1661', class: "sd-select-v2-trigger__text" }, hasValue ? this.displayText : this.placeholder), h("sd-icon", { key: 'c6ae918c442452018513a144a6f14613a49dedd4', name: "chevronDown", size: 12, color: "var(--trigger-icon-color)", class: {
51
+ }, style: cssVars, onClick: this.handleClick, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '76a946a587f6245f8a21ecbf25c5a21895f35970', class: "sd-select-v2-trigger__content" }, h("span", { key: '3224e13cc49371e7bcd8095a8b08bd62d4f8b295', class: "sd-select-v2-trigger__text" }, hasValue ? this.displayText : this.placeholder), h("sd-icon", { key: 'ea81dc671b63b14040292ed2ff4084a9c9fc6fca', name: "chevronDown", size: 12, color: "var(--trigger-icon-color)", class: {
36
52
  'sd-select-v2-trigger__icon': true,
37
53
  'sd-select-v2-trigger__icon--open': this.isOpen,
38
54
  } }))));
@@ -148,6 +164,57 @@ export class SdSelectV2Trigger {
148
164
  "resolved": "void",
149
165
  "references": {}
150
166
  }
167
+ }, {
168
+ "method": "triggerFocus",
169
+ "name": "sdTriggerFocus",
170
+ "bubbles": true,
171
+ "cancelable": true,
172
+ "composed": true,
173
+ "docs": {
174
+ "tags": [],
175
+ "text": ""
176
+ },
177
+ "complexType": {
178
+ "original": "void",
179
+ "resolved": "void",
180
+ "references": {}
181
+ }
182
+ }, {
183
+ "method": "triggerBlur",
184
+ "name": "sdTriggerBlur",
185
+ "bubbles": true,
186
+ "cancelable": true,
187
+ "composed": true,
188
+ "docs": {
189
+ "tags": [],
190
+ "text": ""
191
+ },
192
+ "complexType": {
193
+ "original": "void",
194
+ "resolved": "void",
195
+ "references": {}
196
+ }
151
197
  }];
152
198
  }
199
+ static get methods() {
200
+ return {
201
+ "sdFocus": {
202
+ "complexType": {
203
+ "signature": "() => Promise<void>",
204
+ "parameters": [],
205
+ "references": {
206
+ "Promise": {
207
+ "location": "global",
208
+ "id": "global::Promise"
209
+ }
210
+ },
211
+ "return": "Promise<void>"
212
+ },
213
+ "docs": {
214
+ "text": "",
215
+ "tags": []
216
+ }
217
+ }
218
+ };
219
+ }
153
220
  }
@@ -1,4 +1,4 @@
1
- import { h } from "@stencil/core";
1
+ import { h, } from "@stencil/core";
2
2
  import { nanoid } from "nanoid/non-secure";
3
3
  export class SdSelectV2 {
4
4
  static VIEWPORT_PADDING = 20;
@@ -15,6 +15,7 @@ export class SdSelectV2 {
15
15
  label = '';
16
16
  labelWidth = '';
17
17
  addonLabel = '';
18
+ addonAlign = 'start';
18
19
  error = false;
19
20
  hint = '';
20
21
  errorMessage = '';
@@ -34,11 +35,29 @@ export class SdSelectV2 {
34
35
  hovered = false;
35
36
  update;
36
37
  dropDownShow;
38
+ async sdFocus() {
39
+ if (this.disabled)
40
+ return;
41
+ await this.triggerComponentRef?.sdFocus();
42
+ }
43
+ async sdOpen() {
44
+ // sdFocus 직후 호출 시 트리거 ref/레이아웃이 안정될 때까지 한 틱 대기
45
+ await new Promise(resolve => setTimeout(resolve, 0));
46
+ if (this.disabled || this.isOpen)
47
+ return;
48
+ this.prepareDropdownGeometry();
49
+ if (this.closeAnimationTimer)
50
+ clearTimeout(this.closeAnimationTimer);
51
+ this.isAnimatingOut = false;
52
+ this.isOpen = true;
53
+ }
37
54
  triggerRef;
55
+ triggerComponentRef;
38
56
  closeAnimationTimer;
39
57
  internalName = nanoid();
58
+ triggerHasFocus = false;
40
59
  watchIsOpen(newValue) {
41
- this.focused = newValue;
60
+ this.syncFocusedState(newValue);
42
61
  this.dropDownShow.emit({ isOpen: newValue });
43
62
  }
44
63
  get isMulti() {
@@ -46,19 +65,19 @@ export class SdSelectV2 {
46
65
  }
47
66
  get displayText() {
48
67
  if (this.isMulti) {
49
- if (!this.value || !Array.isArray(this.value))
50
- return '';
51
- if (this.emitValue) {
52
- const flat = this.flattenOptions(this.options);
53
- return this.value
54
- .map(v => flat.find(o => o.value === v)?.label ?? '')
55
- .filter(Boolean)
56
- .join(', ');
57
- }
58
- const selected = this.value;
59
- if (selected.length === 0)
68
+ if (!Array.isArray(this.value) || this.value.length === 0)
60
69
  return '';
61
- return selected.map(s => s.label).join(', ');
70
+ const flat = this.flattenOptions(this.options);
71
+ return this.value
72
+ .map(item => {
73
+ if (item != null && typeof item === 'object') {
74
+ const opt = item;
75
+ return opt.label ?? flat.find(o => o.value === opt.value)?.label ?? '';
76
+ }
77
+ return flat.find(o => o.value === item)?.label ?? '';
78
+ })
79
+ .filter(Boolean)
80
+ .join(', ');
62
81
  }
63
82
  if (this.value == null)
64
83
  return '';
@@ -133,20 +152,33 @@ export class SdSelectV2 {
133
152
  this.isAnimatingOut = false;
134
153
  }, SdSelectV2.CLOSE_ANIMATION_DURATION);
135
154
  }
136
- handleTriggerClick = () => {
155
+ prepareDropdownGeometry() {
137
156
  if (this.triggerRef) {
138
157
  this.triggerWidth = `${this.triggerRef.offsetWidth}px`;
139
158
  }
140
159
  this.updateDropdownViewportConstraints();
160
+ }
161
+ syncFocusedState(isOpen = this.isOpen) {
162
+ this.focused = isOpen || this.triggerHasFocus;
163
+ }
164
+ handleTriggerFocus = () => {
165
+ this.triggerHasFocus = true;
166
+ this.syncFocusedState();
167
+ };
168
+ handleTriggerBlur = () => {
169
+ this.triggerHasFocus = false;
170
+ this.syncFocusedState();
171
+ };
172
+ handleTriggerClick = () => {
141
173
  if (this.isOpen) {
142
174
  this.closeDropdown();
175
+ return;
143
176
  }
144
- else {
145
- if (this.closeAnimationTimer)
146
- clearTimeout(this.closeAnimationTimer);
147
- this.isAnimatingOut = false;
148
- this.isOpen = true;
149
- }
177
+ this.prepareDropdownGeometry();
178
+ if (this.closeAnimationTimer)
179
+ clearTimeout(this.closeAnimationTimer);
180
+ this.isAnimatingOut = false;
181
+ this.isOpen = true;
150
182
  };
151
183
  emitUpdate(value) {
152
184
  this.update.emit(value);
@@ -183,9 +215,7 @@ export class SdSelectV2 {
183
215
  }
184
216
  else {
185
217
  const exists = selected.some(s => s.value === option.value);
186
- newSelected = exists
187
- ? selected.filter(s => s.value !== option.value)
188
- : [...selected, option];
218
+ newSelected = exists ? selected.filter(s => s.value !== option.value) : [...selected, option];
189
219
  }
190
220
  this.value = this.toMultiValue(newSelected);
191
221
  this.emitUpdate(this.value);
@@ -207,13 +237,15 @@ export class SdSelectV2 {
207
237
  this.closeDropdown();
208
238
  },
209
239
  };
210
- return (h("sd-field", { key: 'ffca1287cefaeedf867a6b86a752942a1c8d1703', name: this.fieldName || this.internalName, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, onMouseEnter: () => {
240
+ return (h("sd-field", { key: '8c9b5a1414bd0bb068acd53e07a61767b6904c62', name: this.fieldName || this.internalName, 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: () => {
211
241
  this.hovered = true;
212
242
  }, onMouseLeave: () => {
213
243
  this.hovered = false;
214
- } }, h("div", { key: 'f53f38543b165040eb48236e2a25e43b78444350', class: "sd-select-v2", ref: el => {
244
+ } }, h("div", { key: '47677529c530f06cb3a35a30dd4cc9f9a34d8759', class: "sd-select-v2", ref: el => {
215
245
  this.triggerRef = el;
216
- } }, h("sd-select-v2-trigger", { key: 'afd60ef0b492d9179318a5187565b45a58ef1ed5', displayText: this.displayText, placeholder: this.placeholder, disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: 'e482c1fffc24e893fe1c04f136a116bac6c1b2e9', ...portalProps }, h("sd-select-v2-listbox", { key: 'c864fdef604eee7cea7c946de970e78b59e8b0da', name: this.name, options: this.options, value: this.value, emitValue: this.emitValue, triggerWidth: this.triggerWidth, maxWidth: this.resolvedMaxDropdownWidth, maxHeight: this.resolvedDropdownHeight, onSdOptionSelect: event => this.handleOptionSelect(event.detail) })))));
246
+ } }, h("sd-select-v2-trigger", { key: '3aae441a7ec1a6d8faa0f04f41881f515b641853', ref: el => {
247
+ this.triggerComponentRef = el;
248
+ }, displayText: this.displayText, placeholder: this.placeholder, disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick, onSdTriggerFocus: this.handleTriggerFocus, onSdTriggerBlur: this.handleTriggerBlur })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '7c92db46231f4c46ce94668ac220dc7ec14ad118', ...portalProps }, h("sd-select-v2-listbox", { key: 'af3fc60a9554573e50145edeb0ea8f412116fd76', name: this.name, options: this.options, value: this.value, emitValue: this.emitValue, triggerWidth: this.triggerWidth, maxWidth: this.resolvedMaxDropdownWidth, maxHeight: this.resolvedDropdownHeight, onSdOptionSelect: event => this.handleOptionSelect(event.detail) })))));
217
249
  }
218
250
  static get is() { return "sd-select-v2"; }
219
251
  static get originalStyleUrls() {
@@ -447,6 +479,33 @@ export class SdSelectV2 {
447
479
  "attribute": "addon-label",
448
480
  "defaultValue": "''"
449
481
  },
482
+ "addonAlign": {
483
+ "type": "string",
484
+ "mutable": false,
485
+ "complexType": {
486
+ "original": "FieldAddonAlign",
487
+ "resolved": "\"center\" | \"end\" | \"start\"",
488
+ "references": {
489
+ "FieldAddonAlign": {
490
+ "location": "import",
491
+ "path": "../sd-field/sd-field.config",
492
+ "id": "src/components/sd-field/sd-field.config.ts::FieldAddonAlign",
493
+ "referenceLocation": "FieldAddonAlign"
494
+ }
495
+ }
496
+ },
497
+ "required": false,
498
+ "optional": false,
499
+ "docs": {
500
+ "tags": [],
501
+ "text": ""
502
+ },
503
+ "getter": false,
504
+ "setter": false,
505
+ "reflect": false,
506
+ "attribute": "addon-align",
507
+ "defaultValue": "'start'"
508
+ },
450
509
  "error": {
451
510
  "type": "boolean",
452
511
  "mutable": true,
@@ -713,6 +772,44 @@ export class SdSelectV2 {
713
772
  }
714
773
  }];
715
774
  }
775
+ static get methods() {
776
+ return {
777
+ "sdFocus": {
778
+ "complexType": {
779
+ "signature": "() => Promise<void>",
780
+ "parameters": [],
781
+ "references": {
782
+ "Promise": {
783
+ "location": "global",
784
+ "id": "global::Promise"
785
+ }
786
+ },
787
+ "return": "Promise<void>"
788
+ },
789
+ "docs": {
790
+ "text": "",
791
+ "tags": []
792
+ }
793
+ },
794
+ "sdOpen": {
795
+ "complexType": {
796
+ "signature": "() => Promise<void>",
797
+ "parameters": [],
798
+ "references": {
799
+ "Promise": {
800
+ "location": "global",
801
+ "id": "global::Promise"
802
+ }
803
+ },
804
+ "return": "Promise<void>"
805
+ },
806
+ "docs": {
807
+ "text": "",
808
+ "tags": []
809
+ }
810
+ }
811
+ };
812
+ }
716
813
  static get elementRef() { return "el"; }
717
814
  static get watchers() {
718
815
  return [{
@@ -39,7 +39,7 @@ export class SdTabs {
39
39
  return `square_xs_${color}`;
40
40
  }
41
41
  render() {
42
- return (h("div", { key: '62ace36515932f8889fc35121b6a8cf98fd9a314', class: this.getContainerClasses() }, this.tabs.map((tab, index) => {
42
+ return (h("div", { key: '85326c946694a115b466f07395872429c467d72f', class: this.getContainerClasses() }, this.tabs.map((tab, index) => {
43
43
  const badgeName = this.getBadgeName(tab);
44
44
  return (h("div", { key: `tab-${index}`, class: this.getTabClasses(tab), "aria-label": tab.label || 'tab', onClick: () => this.handleTabClick(tab.value) }, h("span", { "data-label": tab.label, class: "sd-tabs__label" }, tab.label), tab.badge && h("sd-tag", { name: badgeName, label: tab.badge.toString() })));
45
45
  })));
@@ -18,6 +18,7 @@ export class SdTextarea {
18
18
  label = '';
19
19
  labelWidth = '';
20
20
  addonLabel = '';
21
+ addonAlign = 'start';
21
22
  hint = '';
22
23
  errorMessage = '';
23
24
  icon = undefined;
@@ -104,7 +105,7 @@ export class SdTextarea {
104
105
  '--sd-system-size-field-sm-height': 'auto',
105
106
  '--sd-system-radius-field-sm': `${TEXTAREA_TOKENS.radius}px`,
106
107
  };
107
- return (h("sd-field", { key: '4c93d887429d6790d2d49c951be64e4be1496fd4', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: 'b64aa1b2f02c1f68db57e5e36e0a7146257629e1', class: "sd-textarea__content" }, h("textarea", { key: 'b2baff1d99b9c2347f0b0bb751fc51268d2c48c7', name: this.name, ref: el => (this.nativeEl = el), class: `sd-textarea__native ${this.textareaClass}`, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, autofocus: this.autoFocus, maxLength: this.maxLength, rows: this.rows, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.textareaStyle }))));
108
+ return (h("sd-field", { key: '9f456eb1b18d0d83fb40f0b6b66125d587bcb4c6', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: 'f201962ed64908c97d24923b62e97c33b356170a', class: "sd-textarea__content" }, h("textarea", { key: '826e4b3c4743dbf16387b68317bd09ca7c75746d', name: this.name, ref: el => (this.nativeEl = el), class: `sd-textarea__native ${this.textareaClass}`, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, autofocus: this.autoFocus, maxLength: this.maxLength, rows: this.rows, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.textareaStyle }))));
108
109
  }
109
110
  static get is() { return "sd-textarea"; }
110
111
  static get originalStyleUrls() {
@@ -395,6 +396,33 @@ export class SdTextarea {
395
396
  "attribute": "addon-label",
396
397
  "defaultValue": "''"
397
398
  },
399
+ "addonAlign": {
400
+ "type": "string",
401
+ "mutable": false,
402
+ "complexType": {
403
+ "original": "FieldAddonAlign",
404
+ "resolved": "\"center\" | \"end\" | \"start\"",
405
+ "references": {
406
+ "FieldAddonAlign": {
407
+ "location": "import",
408
+ "path": "../sd-field/sd-field.config",
409
+ "id": "src/components/sd-field/sd-field.config.ts::FieldAddonAlign",
410
+ "referenceLocation": "FieldAddonAlign"
411
+ }
412
+ }
413
+ },
414
+ "required": false,
415
+ "optional": false,
416
+ "docs": {
417
+ "tags": [],
418
+ "text": ""
419
+ },
420
+ "getter": false,
421
+ "setter": false,
422
+ "reflect": false,
423
+ "attribute": "addon-align",
424
+ "defaultValue": "'start'"
425
+ },
398
426
  "hint": {
399
427
  "type": "string",
400
428
  "mutable": false,
@@ -71,7 +71,7 @@ export class DataTable {
71
71
  return el.innerHTML;
72
72
  }
73
73
  render() {
74
- return (h("div", { key: 'eb6246d49bb46a1c2b2b9d93cff90e7c0d6788b4', class: "table-wrapper" }, h("table", { key: '584d752e51f252f2dd7a29868ae4300b55c47065', class: { 'data-table': true, 'bordered': this.bordered, 'striped': this.striped } }, h("thead", { key: 'fd35de9ad1cb79cf77ab9f7a806d2d7258d8b11b' }, h("tr", { key: '39a42d9fc76571aa5ef6073ec554471d5fd1b4c1' }, this.columns.map(column => (h("th", { key: column.field, style: { width: column.width } }, this.renderHeaderContent(column)))))), h("tbody", { key: '5c3a2b5853f619666b20145e0f7a221c75969071' }, this.rows.map((row, rowIndex) => (h("tr", { key: rowIndex }, this.columns.map(column => (h("td", { key: `${rowIndex}-${column.field}` }, this.renderCellContent(column, row, rowIndex))))))))), h("div", { key: 'bbbd15c2d1b517774340dbcdfb59338f260df21b', class: "templates-slot", hidden: true }, h("slot", { key: '28733f09dd4a90976d9bb60102039981c736cf87' }))));
74
+ return (h("div", { key: '2aaa005ce2516e841fdace352e9d8cf2b98cbde4', class: "table-wrapper" }, h("table", { key: '3b13c885dc0cefd1c2b7de3c336d803099009063', class: { 'data-table': true, 'bordered': this.bordered, 'striped': this.striped } }, h("thead", { key: 'a866c3ce695250fc6b220044955c6fafa68f5647' }, h("tr", { key: '465974d2bd2f39114cabda226aba8645d79b4a68' }, this.columns.map(column => (h("th", { key: column.field, style: { width: column.width } }, this.renderHeaderContent(column)))))), h("tbody", { key: '4b0a96da5bf54404774fca7bb9136561ddc57170' }, this.rows.map((row, rowIndex) => (h("tr", { key: rowIndex }, this.columns.map(column => (h("td", { key: `${rowIndex}-${column.field}` }, this.renderCellContent(column, row, rowIndex))))))))), h("div", { key: '1deba9664748b1953a65b2d7badc4b2e813ab2eb', class: "templates-slot", hidden: true }, h("slot", { key: '782d4ef14b8e6068e1d96a55af5f0b16af33dc0f' }))));
75
75
  }
76
76
  static get is() { return "table-test"; }
77
77
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- import{p as t,H as e,h as s,F as i,t as o}from"./p-C0VkfKIA.js";import{T as n}from"./p-Cj4NAUzE.js";import{d as a}from"./p-Csfk-CtX.js";import{d as l}from"./p-Diis5oCN.js";import{d as c}from"./p-YgnF5oje.js";var r={bg:"#07284A",content:"#FFFFFF"},d={bg:"#FCEFEF",content:"#FB4444"},h={bg:"#FEF1EA",content:"#FF6B00"},f={bg:"#E6F1FF",content:"#0075FF"};const p={default:{bg:r.bg,content:r.content},danger:{bg:d.bg,content:d.content},warning:{bg:h.bg,content:h.content},accent:{bg:f.bg,content:f.content}},m=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}trigger="hover";placement="top";color="#01BB4B";tooltipType="default";icon="helpOutline";iconSize=12;label="";buttonSize="sm";buttonVariant="primary";noHover=!0;sdClass="";showTooltip=!1;slotContentHTML="";buttonEl;menuEl;hideTimeout;closeTimeout;static CLOSE_ANIM_MS=150;show=()=>{this.cancelHideTimer(),this.showTooltip=!0,this.menuEl&&this.menuEl.classList.remove("sd-floating-menu--closing")};hide=()=>{this.menuEl&&this.menuEl.classList.add("sd-floating-menu--closing"),this.closeTimeout=setTimeout((()=>{this.showTooltip=!1}),t.CLOSE_ANIM_MS)};startHideTimer=()=>{this.hideTimeout=setTimeout((()=>this.hide()),100)};cancelHideTimer=()=>{this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=void 0),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=void 0)};get tooltipOffset(){switch(this.placement??"top"){case"top":return[0,-4];case"bottom":return[0,4];case"left":case"right":return[4,0]}}handleClose=()=>this.hide();componentWillLoad(){this.slotContentHTML=this.el.innerHTML,this.el.replaceChildren(),this.el.classList.toggle("visible",!0)}render(){const t=this.trigger??"hover",e=this.placement??"top",o=this.tooltipType??"default",a=this.icon??"helpOutline",l=this.color??"#01BB4B",c=p[o]??p.default,r=()=>this.showTooltip=!this.showTooltip;return s(i,{key:"aade7a4be8e9955ca4dc437845ee8de9d212fd61"},s("div",{key:"332c4872541bea334c1f0b6f06de8a1789dc10b8",class:`sd-tooltip-trigger ${this.sdClass||""}`,..."hover"===t?{onMouseEnter:()=>this.show(),onMouseLeave:()=>this.startHideTimer()}:this.label?{}:{onClick:r}},this.label?s("sd-button",{ref:t=>this.buttonEl=t,label:this.label,icon:a,size:this.buttonSize??"sm",color:l,variant:this.buttonVariant??"primary",class:"sd-tooltip",..."click"===t&&this.label?{onSdClick:r}:{}}):s("sd-icon",{ref:t=>this.buttonEl=t,name:a,size:this.iconSize??12,color:l,class:"sd-tooltip"})),this.showTooltip&&s("sd-floating-portal",{key:"96f19d91f765020ae5663f216011e2000617c9d1",parentRef:this.buttonEl,onSdClose:this.handleClose.bind(this),placement:e,offset:this.tooltipOffset},s("div",{key:"12c2f1fbf59dc1a790016da071805164b0426419",ref:t=>this.menuEl=t,class:{"sd-floating-menu":!0,[`sd-floating-menu--${o}`]:!0,[`sd-floating-menu--${e}`]:!0},style:{"--sd-floating-bg":c.bg,"--sd-floating-content":c.content},onMouseEnter:()=>this.show(),onMouseLeave:()=>this.startHideTimer()},s("i",{key:"f69c0cb66d5be975f60bfa7cdbd46e0283d4af2b",class:`sd-floating-menu__arrow sd-floating-menu__arrow--${e}`},s(n,{key:"3fbc2c3baa903e80d525225ab1f1aa4b3ec6ad4b"})),s("div",{key:"a2286ef4e9f5d6c1b1a26ea044ddf1051900c5a2",class:"sd-floating-menu__content",innerHTML:this.slotContentHTML}))))}static get style(){return"sd-tooltip{visibility:hidden !important;display:inline-flex}sd-tooltip.visible{visibility:visible !important}sd-tooltip .sd-tooltip-trigger{display:inline-flex;position:relative;cursor:pointer;align-items:center;justify-content:center}"}},[512,"sd-tooltip",{trigger:[1],placement:[1],color:[1],tooltipType:[1,"tooltip-type"],icon:[1],iconSize:[2,"icon-size"],label:[1],buttonSize:[1,"button-size"],buttonVariant:[1,"button-variant"],noHover:[4,"no-hover"],sdClass:[1,"sd-class"],showTooltip:[32],slotContentHTML:[32]}]);function u(){"undefined"!=typeof customElements&&["sd-tooltip","sd-button","sd-floating-portal","sd-icon"].forEach((t=>{switch(t){case"sd-tooltip":customElements.get(o(t))||customElements.define(o(t),m);break;case"sd-button":customElements.get(o(t))||a();break;case"sd-floating-portal":customElements.get(o(t))||l();break;case"sd-icon":customElements.get(o(t))||c()}}))}export{m as S,u as d}
1
+ import{p as t,H as e,h as s,F as i,t as o}from"./p-C0VkfKIA.js";import{T as n}from"./p-Cj4NAUzE.js";import{d as a}from"./p-Csfk-CtX.js";import{d as l}from"./p-CU7IOtCw.js";import{d as c}from"./p-YgnF5oje.js";var r={bg:"#07284A",content:"#FFFFFF"},d={bg:"#FCEFEF",content:"#FB4444"},h={bg:"#FEF1EA",content:"#FF6B00"},f={bg:"#E6F1FF",content:"#0075FF"};const p={default:{bg:r.bg,content:r.content},danger:{bg:d.bg,content:d.content},warning:{bg:h.bg,content:h.content},accent:{bg:f.bg,content:f.content}},m=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}trigger="hover";placement="top";color="#01BB4B";tooltipType="default";icon="helpOutline";iconSize=12;label="";buttonSize="sm";buttonVariant="primary";noHover=!0;sdClass="";showTooltip=!1;slotContentHTML="";buttonEl;menuEl;hideTimeout;closeTimeout;static CLOSE_ANIM_MS=150;show=()=>{this.cancelHideTimer(),this.showTooltip=!0,this.menuEl&&this.menuEl.classList.remove("sd-floating-menu--closing")};hide=()=>{this.menuEl&&this.menuEl.classList.add("sd-floating-menu--closing"),this.closeTimeout=setTimeout((()=>{this.showTooltip=!1}),t.CLOSE_ANIM_MS)};startHideTimer=()=>{this.hideTimeout=setTimeout((()=>this.hide()),100)};cancelHideTimer=()=>{this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=void 0),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=void 0)};get tooltipOffset(){switch(this.placement??"top"){case"top":return[0,-4];case"bottom":return[0,4];case"left":case"right":return[4,0]}}handleClose=()=>this.hide();componentWillLoad(){this.slotContentHTML=this.el.innerHTML,this.el.replaceChildren(),this.el.classList.toggle("visible",!0)}render(){const t=this.trigger??"hover",e=this.placement??"top",o=this.tooltipType??"default",a=this.icon??"helpOutline",l=this.color??"#01BB4B",c=p[o]??p.default,r=()=>this.showTooltip=!this.showTooltip;return s(i,{key:"aade7a4be8e9955ca4dc437845ee8de9d212fd61"},s("div",{key:"332c4872541bea334c1f0b6f06de8a1789dc10b8",class:`sd-tooltip-trigger ${this.sdClass||""}`,..."hover"===t?{onMouseEnter:()=>this.show(),onMouseLeave:()=>this.startHideTimer()}:this.label?{}:{onClick:r}},this.label?s("sd-button",{ref:t=>this.buttonEl=t,label:this.label,icon:a,size:this.buttonSize??"sm",color:l,variant:this.buttonVariant??"primary",class:"sd-tooltip",..."click"===t&&this.label?{onSdClick:r}:{}}):s("sd-icon",{ref:t=>this.buttonEl=t,name:a,size:this.iconSize??12,color:l,class:"sd-tooltip"})),this.showTooltip&&s("sd-floating-portal",{key:"96f19d91f765020ae5663f216011e2000617c9d1",parentRef:this.buttonEl,onSdClose:this.handleClose.bind(this),placement:e,offset:this.tooltipOffset},s("div",{key:"12c2f1fbf59dc1a790016da071805164b0426419",ref:t=>this.menuEl=t,class:{"sd-floating-menu":!0,[`sd-floating-menu--${o}`]:!0,[`sd-floating-menu--${e}`]:!0},style:{"--sd-floating-bg":c.bg,"--sd-floating-content":c.content},onMouseEnter:()=>this.show(),onMouseLeave:()=>this.startHideTimer()},s("i",{key:"f69c0cb66d5be975f60bfa7cdbd46e0283d4af2b",class:`sd-floating-menu__arrow sd-floating-menu__arrow--${e}`},s(n,{key:"3fbc2c3baa903e80d525225ab1f1aa4b3ec6ad4b"})),s("div",{key:"a2286ef4e9f5d6c1b1a26ea044ddf1051900c5a2",class:"sd-floating-menu__content",innerHTML:this.slotContentHTML}))))}static get style(){return"sd-tooltip{visibility:hidden !important;display:inline-flex}sd-tooltip.visible{visibility:visible !important}sd-tooltip .sd-tooltip-trigger{display:inline-flex;position:relative;cursor:pointer;align-items:center;justify-content:center}"}},[512,"sd-tooltip",{trigger:[1],placement:[1],color:[1],tooltipType:[1,"tooltip-type"],icon:[1],iconSize:[2,"icon-size"],label:[1],buttonSize:[1,"button-size"],buttonVariant:[1,"button-variant"],noHover:[4,"no-hover"],sdClass:[1,"sd-class"],showTooltip:[32],slotContentHTML:[32]}]);function u(){"undefined"!=typeof customElements&&["sd-tooltip","sd-button","sd-floating-portal","sd-icon"].forEach((t=>{switch(t){case"sd-tooltip":customElements.get(o(t))||customElements.define(o(t),m);break;case"sd-button":customElements.get(o(t))||a();break;case"sd-floating-portal":customElements.get(o(t))||l();break;case"sd-icon":customElements.get(o(t))||c()}}))}export{m as S,u as d}
@@ -0,0 +1 @@
1
+ import{p as t,H as s,c as i,h as e,t as n}from"./p-C0VkfKIA.js";import{n as o}from"./p-CCwNgVmC.js";import{i as a}from"./p-ByhWX2NK.js";import{d as l}from"./p-Csfk-CtX.js";import{d}from"./p-CscUxW9p.js";import{d as r}from"./p-CU7IOtCw.js";import{d as h}from"./p-CoOl8zeX.js";import{d as u}from"./p-YgnF5oje.js";import{d as p}from"./p-9HhG23Vy.js";const c=a.textinput.sm,f=a.textinput.md,b={sm:{height:c.height,paddingX:c.paddingX,gap:c.gap,radius:c.radius,fontSize:c.typography.fontSize,lineHeight:c.typography.lineHeight,fontWeight:c.typography.fontWeight},md:{height:f.height,paddingX:f.paddingX,gap:f.gap,radius:f.radius,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight}},m={text:a.textinput.text,icon:a.textinput.icon},g=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(){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=b[this.size]??b.sm;return e("sd-field",{key:"6270fb99043a06aa9a4c2ead77007e6c03adafef",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,status:this.status,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":m.text.default,"--sd-input-placeholder-color":m.text.placeholder,"--sd-input-disabled-color":m.text.disabled,"--sd-input-icon-color":m.icon.default,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`}},e("label",{key:"aaef18c323710235b41d76b26a21380cadcc6e0f",class:"sd-input__content"},e("slot",{key:"fd5d5845acf9d5351dec5af84e09d91246de8a68",name:"prefix"}),e("input",{key:"8b4dd1eab6488a29daec6e6dde5238b319001d5b",name:this.name,ref:t=>this.nativeEl=t,class:`sd-input__native ${this.inputClass}`,type:"password"===this.type&&this.passwordVisible?"text":this.type,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:"79918e68de3045b509a27d8567e095665040689b",name:"suffix"}),this.clearable&&this.internalValue&&!this.disabled&&e("sd-ghost-button",{key:"f5358346a20830c1fef955a2bb6783156b251178",icon:"close",ariaLabel:"clear",size:"xxs",disabled:this.disabled,class:"sd-input__clear-icon",onClick:async()=>{this.disabled||(this.internalValue="",await(this.formField?.sdValidate()))}}),"password"===this.type&&e("sd-ghost-button",{key:"77108ea21a4b9afc9e9051c98d4d49bcb571cffb",icon:this.passwordVisible?"visibilityOn":"visibilityOff",ariaLabel:"visibility",size:"xxs",disabled:this.disabled,class:"sd-input__password-icon",onClick:()=>{this.disabled||(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-input-disabled-color)}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{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],internalValue:[32],passwordVisible:[32],sdGetNativeElement:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function _(){"undefined"!=typeof customElements&&["sd-input","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-tooltip"].forEach((t=>{switch(t){case"sd-input":customElements.get(n(t))||customElements.define(n(t),g);break;case"sd-button":customElements.get(n(t))||l();break;case"sd-field":customElements.get(n(t))||d();break;case"sd-floating-portal":customElements.get(n(t))||r();break;case"sd-ghost-button":customElements.get(n(t))||h();break;case"sd-icon":customElements.get(n(t))||u();break;case"sd-tooltip":customElements.get(n(t))||p()}}))}export{g as S,_ as d}
@@ -1 +1 @@
1
- import{p as e,H as a,c as d,h as r,t}from"./p-C0VkfKIA.js";import{u as c,t as n}from"./p-DTrMR0rx.js";import{W as i,C as s}from"./p-bYCOh35g.js";import{d as l}from"./p-D21iKAp7.js";import{d as o}from"./p-YgnF5oje.js";const p=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.select=d(this,"sdSelect",7),this.viewChange=d(this,"sdViewChange",7)}value=null;selectable;currentYear;currentMonth;select;viewChange;dateUtil=c();componentWillLoad(){this.syncViewFromValue()}handleValueChange(){this.syncViewFromValue()}syncViewFromValue(){const e=this.value||n,[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(),r=new Date(e,a,0).getDate(),t=1===a?12:a-1,c=1===a?e-1:e,n=new Date(c,t,0).getDate(),i=12===a?1:a+1,s=12===a?e+1:e,l=[];for(let e=d-1;e>=0;e--){const a=n-e;l.push({date:this.formatDate(c,t,a),day:a,inCurrentMonth:!1})}for(let d=1;d<=r;d++)l.push({date:this.formatDate(e,a,d),day:d,inCurrentMonth:!0});const o=(7-l.length%7)%7;for(let e=1;e<=o;e++)l.push({date:this.formatDate(s,i,e),day:e,inCurrentMonth:!1});return l}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.select.emit(e.date)}render(){return r("div",{key:"d23c08b38605dad1e5b3266a7e1ad72e0aeb7eb9",class:"sd-date-picker-calendar",style:{"--calendar-bg":s.bg,"--calendar-padding":`${s.paddingXY}px`,"--calendar-gap":`${s.gap}px`,"--calendar-radius":`${s.radius}px`,"--calendar-header-gap":`${s.header.gap}px`,"--calendar-header-divider":s.header.divider,"--calendar-header-font-size":`${s.header.fontSize}px`,"--calendar-header-line-height":`${s.header.lineHeight}px`,"--calendar-header-font-weight":s.header.fontWeight,"--calendar-week-font-size":`${s.week.fontSize}px`,"--calendar-week-line-height":`${s.week.lineHeight}px`,"--calendar-week-font-weight":s.week.fontWeight,"--calendar-week-color":s.week.color,"--calendar-grid-row-gap":`${s.grid.rowGap}px`,"--calendar-day-size":`${s.day.size}px`,"--calendar-day-circle-size":`${s.day.circleSize}px`,"--calendar-day-circle-radius":`${s.day.circleRadius}px`,"--calendar-day-text":s.day.defaultText,"--calendar-day-hover-text":s.day.hoverText,"--calendar-day-hover-border":s.day.hoverBorder,"--calendar-day-select-bg":s.day.selectBg,"--calendar-day-select-text":s.day.selectText,"--calendar-day-disabled-text":s.day.disabledText,"--calendar-day-font-size":`${s.day.fontSize}px`,"--calendar-day-line-height":`${s.day.lineHeight}px`,"--calendar-day-font-weight":s.day.fontWeight,"--calendar-day-bold-font-weight":s.day.boldFontWeight}},r("div",{key:"1c25bd19272e1e7f4e81601a0ffa13d7b882e4e4",class:"sd-date-picker-calendar__header"},r("div",{key:"aed9a7ff3282d363c61b49dde6b6e9d6131a456c",class:"sd-date-picker-calendar__nav-group"},r("sd-ghost-button",{key:"68ae361b1cc4bfd9351b093aee6d4193f2ac5549",ariaLabel:"prevYear",size:"xxs",icon:"chevronLeft",onClick:this.goPrevYear}),r("span",{key:"e17d9a962faf96e8b70b0890e59e4c2e5ca515b0",class:"sd-date-picker-calendar__label"},this.currentYear),r("sd-ghost-button",{key:"ab65ce4f9f64fcc9f4084c073a0a0625ceeb9f2d",ariaLabel:"nextYear",size:"xxs",icon:"chevronRight",onClick:this.goNextYear})),r("span",{key:"a01cb1691e9f112efdd6fd632c7594aa082d7f9f",class:"sd-date-picker-calendar__divider","aria-hidden":"true"}),r("div",{key:"577085a6007e5e2c6b291bbe0a27c0ff4ec4ca78",class:"sd-date-picker-calendar__nav-group sd-date-picker-calendar__nav-group-month"},r("sd-ghost-button",{key:"c6b51b60d1bcc06e537800c10946ac49639fcb2c",ariaLabel:"prevMonth",size:"xxs",icon:"chevronLeft",onClick:this.goPrevMonth}),r("span",{key:"836008030a0d66533ffba9392fee0234a9b0b425",class:"sd-date-picker-calendar__label sd-date-picker-calendar__label-month"},this.currentMonth,"월"),r("sd-ghost-button",{key:"a602cb65934157c171201f01699aacf1eeee8a57",ariaLabel:"nextMonth",size:"xxs",icon:"chevronRight",onClick:this.goNextMonth}))),r("div",{key:"0c1a368d4e878b2942f2b37ddff47ac13262c580",class:"sd-date-picker-calendar__week"},i.map((e=>r("span",{key:e,class:"sd-date-picker-calendar__week-cell"},e)))),r("div",{key:"31cfa57cd8890a7cd70209c771598d6350009cc6",class:"sd-date-picker-calendar__grid"},this.cells.map((e=>{const a=e.inCurrentMonth&&!!this.value&&this.value===e.date,d=e.inCurrentMonth&&n===e.date,t=e.inCurrentMonth&&this.isDisabled(e.date);return r("button",{type:"button",key:e.date,class:{"sd-date-picker-calendar__day":!0,"sd-date-picker-calendar__day--empty":!e.inCurrentMonth,"sd-date-picker-calendar__day--today":d,"sd-date-picker-calendar__day--selected":a,"sd-date-picker-calendar__day--disabled":t},disabled:!e.inCurrentMonth||t,tabindex:e.inCurrentMonth?void 0:-1,"aria-hidden":e.inCurrentMonth?void 0:"true",onClick:()=>e.inCurrentMonth&&this.handleDayClick(e)},r("span",{class:"sd-date-picker-calendar__day-circle"},e.inCurrentMonth?e.day:""))}))))}static get watchers(){return{value:[{handleValueChange:0}]}}static get style(){return"sd-date-picker-calendar{display:block}sd-date-picker-calendar .sd-date-picker-calendar{display:flex;flex-direction:column;gap:var(--calendar-gap);height:328px;padding:var(--calendar-padding);background:var(--calendar-bg);border-radius:var(--calendar-radius);box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2);user-select:none}sd-date-picker-calendar .sd-date-picker-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-date-picker-calendar .sd-date-picker-calendar__nav-group{display:inline-flex;align-items:center;gap:var(--calendar-gap)}sd-date-picker-calendar .sd-date-picker-calendar__nav-group-month{width:100%}sd-date-picker-calendar .sd-date-picker-calendar__label{display:inline-flex;align-items:center;justify-content:center;min-width:40px;text-align:center}sd-date-picker-calendar .sd-date-picker-calendar__label-month{width:100%}sd-date-picker-calendar .sd-date-picker-calendar__divider{display:inline-block;width:1px;height:16px;background:var(--calendar-header-divider)}sd-date-picker-calendar .sd-date-picker-calendar__week{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size))}sd-date-picker-calendar .sd-date-picker-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-date-picker-calendar .sd-date-picker-calendar__grid{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size));row-gap:var(--calendar-grid-row-gap)}sd-date-picker-calendar .sd-date-picker-calendar__day{display:inline-flex;align-items:center;justify-content:center;width:var(--calendar-day-size);height:32px;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-date-picker-calendar .sd-date-picker-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-date-picker-calendar .sd-date-picker-calendar__day:not(:disabled):hover .sd-date-picker-calendar__day-circle{border-radius:16px;border:1px solid var(--calendar-day-hover-border)}sd-date-picker-calendar .sd-date-picker-calendar__day--today .sd-date-picker-calendar__day-circle{font-weight:700}sd-date-picker-calendar .sd-date-picker-calendar__day--selected .sd-date-picker-calendar__day-circle{border-radius:16px;background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-date-picker-calendar .sd-date-picker-calendar__day--selected:not(:disabled):hover .sd-date-picker-calendar__day-circle{background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-date-picker-calendar .sd-date-picker-calendar__day--disabled{color:var(--calendar-day-disabled-text);background:none !important;cursor:not-allowed}sd-date-picker-calendar .sd-date-picker-calendar__day--empty{visibility:hidden;pointer-events:none}"}},[512,"sd-date-picker-calendar",{value:[1],selectable:[16],currentYear:[32],currentMonth:[32]},void 0,{value:[{handleValueChange:0}]}]);function h(){"undefined"!=typeof customElements&&["sd-date-picker-calendar","sd-ghost-button","sd-icon"].forEach((e=>{switch(e){case"sd-date-picker-calendar":customElements.get(t(e))||customElements.define(t(e),p);break;case"sd-ghost-button":customElements.get(t(e))||l();break;case"sd-icon":customElements.get(t(e))||o()}}))}export{p as S,h as d}
1
+ import{p as e,H as a,c as d,h as r,t}from"./p-C0VkfKIA.js";import{u as c,t as n}from"./p-DTrMR0rx.js";import{W as i,C as s}from"./p-bYCOh35g.js";import{d as l}from"./p-CoOl8zeX.js";import{d as o}from"./p-YgnF5oje.js";const p=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.select=d(this,"sdSelect",7),this.viewChange=d(this,"sdViewChange",7)}value=null;selectable;currentYear;currentMonth;select;viewChange;dateUtil=c();componentWillLoad(){this.syncViewFromValue()}handleValueChange(){this.syncViewFromValue()}syncViewFromValue(){const e=this.value||n,[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(),r=new Date(e,a,0).getDate(),t=1===a?12:a-1,c=1===a?e-1:e,n=new Date(c,t,0).getDate(),i=12===a?1:a+1,s=12===a?e+1:e,l=[];for(let e=d-1;e>=0;e--){const a=n-e;l.push({date:this.formatDate(c,t,a),day:a,inCurrentMonth:!1})}for(let d=1;d<=r;d++)l.push({date:this.formatDate(e,a,d),day:d,inCurrentMonth:!0});const o=(7-l.length%7)%7;for(let e=1;e<=o;e++)l.push({date:this.formatDate(s,i,e),day:e,inCurrentMonth:!1});return l}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.select.emit(e.date)}render(){return r("div",{key:"8b1562e7be35eefd8b05c66931f6288edc48d4f7",class:"sd-date-picker-calendar",style:{"--calendar-bg":s.bg,"--calendar-padding":`${s.paddingXY}px`,"--calendar-gap":`${s.gap}px`,"--calendar-radius":`${s.radius}px`,"--calendar-header-gap":`${s.header.gap}px`,"--calendar-header-divider":s.header.divider,"--calendar-header-font-size":`${s.header.fontSize}px`,"--calendar-header-line-height":`${s.header.lineHeight}px`,"--calendar-header-font-weight":s.header.fontWeight,"--calendar-week-font-size":`${s.week.fontSize}px`,"--calendar-week-line-height":`${s.week.lineHeight}px`,"--calendar-week-font-weight":s.week.fontWeight,"--calendar-week-color":s.week.color,"--calendar-grid-row-gap":`${s.grid.rowGap}px`,"--calendar-day-size":`${s.day.size}px`,"--calendar-day-circle-size":`${s.day.circleSize}px`,"--calendar-day-circle-radius":`${s.day.circleRadius}px`,"--calendar-day-text":s.day.defaultText,"--calendar-day-hover-text":s.day.hoverText,"--calendar-day-hover-border":s.day.hoverBorder,"--calendar-day-select-bg":s.day.selectBg,"--calendar-day-select-text":s.day.selectText,"--calendar-day-disabled-text":s.day.disabledText,"--calendar-day-font-size":`${s.day.fontSize}px`,"--calendar-day-line-height":`${s.day.lineHeight}px`,"--calendar-day-font-weight":s.day.fontWeight,"--calendar-day-bold-font-weight":s.day.boldFontWeight}},r("div",{key:"0a5b4eeeb54eed144fcb89a2030fa33783e187e3",class:"sd-date-picker-calendar__header"},r("div",{key:"9d522b1a52afba7f035f2898aaec7252340f8f57",class:"sd-date-picker-calendar__nav-group"},r("sd-ghost-button",{key:"944e17391090faf35e68d39b2c8c8de04ef115e5",ariaLabel:"prevYear",size:"xxs",icon:"chevronLeft",onClick:this.goPrevYear}),r("span",{key:"2b708445cb919ecec6a72b9532a83d09c3324f77",class:"sd-date-picker-calendar__label"},this.currentYear),r("sd-ghost-button",{key:"501f4ac1ba04fe55856f891b8738454abe358d6b",ariaLabel:"nextYear",size:"xxs",icon:"chevronRight",onClick:this.goNextYear})),r("span",{key:"dff5ff19a16897c79ac85c887ebe358ecefb910b",class:"sd-date-picker-calendar__divider","aria-hidden":"true"}),r("div",{key:"cee819c90306c593e201aefcf278ecb6aeca2ee6",class:"sd-date-picker-calendar__nav-group sd-date-picker-calendar__nav-group-month"},r("sd-ghost-button",{key:"73c2fddb26e26fed12218a8320dce522c5de1303",ariaLabel:"prevMonth",size:"xxs",icon:"chevronLeft",onClick:this.goPrevMonth}),r("span",{key:"abaa67ebd52b3e906989b84ead4a74187da7a176",class:"sd-date-picker-calendar__label sd-date-picker-calendar__label-month"},this.currentMonth,"월"),r("sd-ghost-button",{key:"e90263362f21b2521bea4e587f801fa2994a618d",ariaLabel:"nextMonth",size:"xxs",icon:"chevronRight",onClick:this.goNextMonth}))),r("div",{key:"6913c667bd423d5930f7c3b802b391e15c6522c9",class:"sd-date-picker-calendar__week"},i.map((e=>r("span",{key:e,class:"sd-date-picker-calendar__week-cell"},e)))),r("div",{key:"7c85954ecc18216ebab15f9249882f88965e6490",class:"sd-date-picker-calendar__grid"},this.cells.map((e=>{const a=e.inCurrentMonth&&!!this.value&&this.value===e.date,d=e.inCurrentMonth&&n===e.date,t=e.inCurrentMonth&&this.isDisabled(e.date);return r("button",{type:"button",key:e.date,class:{"sd-date-picker-calendar__day":!0,"sd-date-picker-calendar__day--empty":!e.inCurrentMonth,"sd-date-picker-calendar__day--today":d,"sd-date-picker-calendar__day--selected":a,"sd-date-picker-calendar__day--disabled":t},disabled:!e.inCurrentMonth||t,tabindex:e.inCurrentMonth?void 0:-1,"aria-hidden":e.inCurrentMonth?void 0:"true",onClick:()=>e.inCurrentMonth&&this.handleDayClick(e)},r("span",{class:"sd-date-picker-calendar__day-circle"},e.inCurrentMonth?e.day:""))}))))}static get watchers(){return{value:[{handleValueChange:0}]}}static get style(){return"sd-date-picker-calendar{display:block}sd-date-picker-calendar .sd-date-picker-calendar{display:flex;flex-direction:column;gap:var(--calendar-gap);height:328px;padding:var(--calendar-padding);background:var(--calendar-bg);border-radius:var(--calendar-radius);box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2);user-select:none}sd-date-picker-calendar .sd-date-picker-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-date-picker-calendar .sd-date-picker-calendar__nav-group{display:inline-flex;align-items:center;gap:var(--calendar-gap)}sd-date-picker-calendar .sd-date-picker-calendar__nav-group-month{width:100%}sd-date-picker-calendar .sd-date-picker-calendar__label{display:inline-flex;align-items:center;justify-content:center;min-width:40px;text-align:center}sd-date-picker-calendar .sd-date-picker-calendar__label-month{width:100%}sd-date-picker-calendar .sd-date-picker-calendar__divider{display:inline-block;width:1px;height:16px;background:var(--calendar-header-divider)}sd-date-picker-calendar .sd-date-picker-calendar__week{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size))}sd-date-picker-calendar .sd-date-picker-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-date-picker-calendar .sd-date-picker-calendar__grid{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size));row-gap:var(--calendar-grid-row-gap)}sd-date-picker-calendar .sd-date-picker-calendar__day{display:inline-flex;align-items:center;justify-content:center;width:var(--calendar-day-size);height:32px;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-date-picker-calendar .sd-date-picker-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-date-picker-calendar .sd-date-picker-calendar__day:not(:disabled):hover .sd-date-picker-calendar__day-circle{border-radius:16px;border:1px solid var(--calendar-day-hover-border)}sd-date-picker-calendar .sd-date-picker-calendar__day--today .sd-date-picker-calendar__day-circle{font-weight:700}sd-date-picker-calendar .sd-date-picker-calendar__day--selected .sd-date-picker-calendar__day-circle{border-radius:16px;background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-date-picker-calendar .sd-date-picker-calendar__day--selected:not(:disabled):hover .sd-date-picker-calendar__day-circle{background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-date-picker-calendar .sd-date-picker-calendar__day--disabled{color:var(--calendar-day-disabled-text);background:none !important;cursor:not-allowed}sd-date-picker-calendar .sd-date-picker-calendar__day--empty{visibility:hidden;pointer-events:none}"}},[512,"sd-date-picker-calendar",{value:[1],selectable:[16],currentYear:[32],currentMonth:[32]},void 0,{value:[{handleValueChange:0}]}]);function h(){"undefined"!=typeof customElements&&["sd-date-picker-calendar","sd-ghost-button","sd-icon"].forEach((e=>{switch(e){case"sd-date-picker-calendar":customElements.get(t(e))||customElements.define(t(e),p);break;case"sd-ghost-button":customElements.get(t(e))||l();break;case"sd-icon":customElements.get(t(e))||o()}}))}export{p as S,h as d}
@@ -1 +1 @@
1
- import{p as d,H as a,c as e,h as s,d as o,t as i}from"./p-C0VkfKIA.js";import{m as t}from"./p-DOXMJi-V.js";import{d as l}from"./p-Cb1M05mf.js";import{d as n}from"./p-T5BGXHZg.js";import{d as m}from"./p-YgnF5oje.js";const g={minWidth:Number(t.modal.loading.width),minHeight:Number(t.modal.loading.height),gap:Number(t.modal.loading.gap),contentSize:Number(t.modal.loading.content),radius:Number(t.modal.radius)},r={bg:t.modal.bg,messageColor:t.modal.loading.message.color,errorIcon:t.modal.confirm.negative.icon},c=t.modal.loading.message.typography.fontFamily,b=Number(t.modal.loading.message.typography.fontSize),h=Number(t.modal.loading.message.typography.fontWeight),u=Number(t.modal.loading.message.typography.lineHeight),f={loading:"작업을 진행하고 있습니다. 잠시만 기다려 주세요.",error:"작업에 실패하였습니다. 다시 시도해 주세요."},p={loading:"작업 취소",error:"다시 시도"},v=d(class extends a{constructor(d){super(),!1!==d&&this.__registerHost(),this.click=e(this,"sdClick",7)}state="loading";message="";useButton=!1;buttonLabel="";width;height;click;get resolvedMessage(){return this.message||f[this.state]}get resolvedButtonLabel(){return this.buttonLabel||p[this.state]}handleClick=()=>{this.click.emit()};toCssSize(d){if(null!=d&&""!==d)return"number"==typeof d?`${d}px`:d}render(){const d={"--sd-loading-modal-min-width":`${g.minWidth}px`,"--sd-loading-modal-min-height":`${g.minHeight}px`,"--sd-loading-modal-gap":`${g.gap}px`,"--sd-loading-modal-content-size":`${g.contentSize}px`,"--sd-loading-modal-radius":`${g.radius}px`,"--sd-loading-modal-bg":r.bg,"--sd-loading-modal-message-color":r.messageColor,"--sd-loading-modal-message-font-family":c,"--sd-loading-modal-message-font-size":`${b}px`,"--sd-loading-modal-message-font-weight":`${h}`,"--sd-loading-modal-message-line-height":`${u}px`,"--sd-loading-modal-error-color":r.errorIcon,"--sd-loading-modal-width":this.toCssSize(this.width)??`${g.minWidth}px`,"--sd-loading-modal-height":this.toCssSize(this.height)??`${g.minHeight}px`};return s(o,{key:"8ecd5db2ffde201dd0c7d3c58b1da6b85b5a4116",style:d},s("div",{key:"61f79b16b22d5ab4bb4dca03f88568174cfcfb1f",class:"sd-loading-modal"},s("div",{key:"bc373cfebab5949bee9c024bd86ca92d8294ff7b",class:"sd-loading-modal__content"},"loading"===this.state?s("sd-circle-progress",{indeterminate:!0}):s("sd-icon",{class:"sd-loading-modal__icon",name:"warningOutline",size:g.contentSize,color:r.errorIcon})),s("p",{key:"e9015b9c9813b1968c8ca7991d654761eb3ee9b3",class:"sd-loading-modal__message"},this.resolvedMessage),this.useButton&&s("div",{key:"4ed941961611fe9533bd2b989c9b68ef6c7ca741",class:"sd-loading-modal__button"},s("sd-button-v2",{key:"13f4c5ef5ad5285d846716e5dd72d9f2565c08f9",name:"neutral_outline_sm",label:this.resolvedButtonLabel,onSdClick:this.handleClick}))))}static get style(){return"sd-loading-modal{display:inline-block}sd-loading-modal .sd-loading-modal{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sd-loading-modal-gap);min-width:var(--sd-loading-modal-min-width);min-height:var(--sd-loading-modal-min-height);width:var(--sd-loading-modal-width, auto);height:var(--sd-loading-modal-height, auto);border-radius:var(--sd-loading-modal-radius);background:var(--sd-loading-modal-bg);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2)}sd-loading-modal .sd-loading-modal__content{display:flex;align-items:center;justify-content:center;width:var(--sd-loading-modal-content-size);height:var(--sd-loading-modal-content-size)}sd-loading-modal .sd-loading-modal__message{margin:0;color:var(--sd-loading-modal-message-color);font-family:var(--sd-loading-modal-message-font-family);font-size:var(--sd-loading-modal-message-font-size);font-weight:var(--sd-loading-modal-message-font-weight);line-height:var(--sd-loading-modal-message-line-height);text-align:center}sd-loading-modal .sd-loading-modal__button{display:flex;justify-content:center}"}},[512,"sd-loading-modal",{state:[513],message:[1],useButton:[516,"use-button"],buttonLabel:[1,"button-label"],width:[8],height:[8]}]);function x(){"undefined"!=typeof customElements&&["sd-loading-modal","sd-button-v2","sd-circle-progress","sd-icon"].forEach((d=>{switch(d){case"sd-loading-modal":customElements.get(i(d))||customElements.define(i(d),v);break;case"sd-button-v2":customElements.get(i(d))||l();break;case"sd-circle-progress":customElements.get(i(d))||n();break;case"sd-icon":customElements.get(i(d))||m()}}))}export{v as S,x as d}
1
+ import{p as d,H as a,c as e,h as s,d as o,t as i}from"./p-C0VkfKIA.js";import{m as t}from"./p-DOXMJi-V.js";import{d as l}from"./p-DpBU4AWy.js";import{d as n}from"./p-DWJ3CIKO.js";import{d as m}from"./p-YgnF5oje.js";const g={minWidth:Number(t.modal.loading.width),minHeight:Number(t.modal.loading.height),gap:Number(t.modal.loading.gap),contentSize:Number(t.modal.loading.content),radius:Number(t.modal.radius)},r={bg:t.modal.bg,messageColor:t.modal.loading.message.color,errorIcon:t.modal.confirm.negative.icon},c=t.modal.loading.message.typography.fontFamily,h=Number(t.modal.loading.message.typography.fontSize),u=Number(t.modal.loading.message.typography.fontWeight),b=Number(t.modal.loading.message.typography.lineHeight),f={loading:"작업을 진행하고 있습니다. 잠시만 기다려 주세요.",error:"작업에 실패하였습니다. 다시 시도해 주세요."},p={loading:"작업 취소",error:"다시 시도"},v=d(class extends a{constructor(d){super(),!1!==d&&this.__registerHost(),this.click=e(this,"sdClick",7)}state="loading";message="";useButton=!1;buttonLabel="";width;height;click;get resolvedMessage(){return this.message||f[this.state]}get resolvedButtonLabel(){return this.buttonLabel||p[this.state]}handleClick=()=>{this.click.emit()};toCssSize(d){if(null!=d&&""!==d)return"number"==typeof d?`${d}px`:d}render(){const d={"--sd-loading-modal-min-width":`${g.minWidth}px`,"--sd-loading-modal-min-height":`${g.minHeight}px`,"--sd-loading-modal-gap":`${g.gap}px`,"--sd-loading-modal-content-size":`${g.contentSize}px`,"--sd-loading-modal-radius":`${g.radius}px`,"--sd-loading-modal-bg":r.bg,"--sd-loading-modal-message-color":r.messageColor,"--sd-loading-modal-message-font-family":c,"--sd-loading-modal-message-font-size":`${h}px`,"--sd-loading-modal-message-font-weight":`${u}`,"--sd-loading-modal-message-line-height":`${b}px`,"--sd-loading-modal-error-color":r.errorIcon,"--sd-loading-modal-width":this.toCssSize(this.width)??`${g.minWidth}px`,"--sd-loading-modal-height":this.toCssSize(this.height)??`${g.minHeight}px`};return s(o,{key:"d7e6e7d81ad63a6ddba6c4db9f49695be96b83f6",style:d},s("div",{key:"96a50aa04c7cab1c8797b7a187504107e383182b",class:"sd-loading-modal"},s("div",{key:"6741f7d180be2a7ffa4588aa73bf0b3831e3c869",class:"sd-loading-modal__content"},"loading"===this.state?s("sd-circle-progress",{indeterminate:!0}):s("sd-icon",{class:"sd-loading-modal__icon",name:"warningOutline",size:g.contentSize,color:r.errorIcon})),s("p",{key:"cd7d922fc8c8cd51de0a49e106d78a5254c9c35e",class:"sd-loading-modal__message"},this.resolvedMessage),this.useButton&&s("div",{key:"78a926af4940be80da984cf4e55e8dfee50d6c31",class:"sd-loading-modal__button"},s("sd-button-v2",{key:"a2e4ddf9b4b82fb6cecd9d859e6b95f8dd540137",name:"neutral_outline_sm",label:this.resolvedButtonLabel,onSdClick:this.handleClick}))))}static get style(){return"sd-loading-modal{display:inline-block}sd-loading-modal .sd-loading-modal{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sd-loading-modal-gap);min-width:var(--sd-loading-modal-min-width);min-height:var(--sd-loading-modal-min-height);width:var(--sd-loading-modal-width, auto);height:var(--sd-loading-modal-height, auto);border-radius:var(--sd-loading-modal-radius);background:var(--sd-loading-modal-bg);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2)}sd-loading-modal .sd-loading-modal__content{display:flex;align-items:center;justify-content:center;width:var(--sd-loading-modal-content-size);height:var(--sd-loading-modal-content-size)}sd-loading-modal .sd-loading-modal__message{margin:0;color:var(--sd-loading-modal-message-color);font-family:var(--sd-loading-modal-message-font-family);font-size:var(--sd-loading-modal-message-font-size);font-weight:var(--sd-loading-modal-message-font-weight);line-height:var(--sd-loading-modal-message-line-height);text-align:center}sd-loading-modal .sd-loading-modal__button{display:flex;justify-content:center}"}},[512,"sd-loading-modal",{state:[513],message:[1],useButton:[516,"use-button"],buttonLabel:[1,"button-label"],width:[8],height:[8]}]);function x(){"undefined"!=typeof customElements&&["sd-loading-modal","sd-button-v2","sd-circle-progress","sd-icon"].forEach((d=>{switch(d){case"sd-loading-modal":customElements.get(i(d))||customElements.define(i(d),v);break;case"sd-button-v2":customElements.get(i(d))||l();break;case"sd-circle-progress":customElements.get(i(d))||n();break;case"sd-icon":customElements.get(i(d))||m()}}))}export{v as S,x as d}