@sellmate/design-system 1.25.1 → 1.26.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 (175) 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-calendar_2.cjs.entry.js +2 -2
  4. package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +1 -1
  5. package/dist/cjs/sd-date-picker_7.cjs.entry.js +9 -9
  6. package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +1 -1
  7. package/dist/cjs/sd-divider.cjs.entry.js +1 -1
  8. package/dist/cjs/sd-field_3.cjs.entry.js +7 -7
  9. package/dist/cjs/sd-ghost-button_3.cjs.entry.js +11 -3
  10. package/dist/cjs/sd-linear-progress.cjs.entry.js +1 -1
  11. package/dist/cjs/sd-loading-container.cjs.entry.js +2 -2
  12. package/dist/cjs/sd-pagination_4.cjs.entry.js +8 -8
  13. package/dist/cjs/sd-popup.cjs.entry.js +1 -1
  14. package/dist/cjs/sd-select-list-item_2.cjs.entry.js +6 -6
  15. package/dist/cjs/sd-select_3.cjs.entry.js +8 -8
  16. package/dist/cjs/sd-switch.cjs.entry.js +1 -1
  17. package/dist/cjs/sd-table.cjs.entry.js +6 -6
  18. package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
  19. package/dist/cjs/sd-td.cjs.entry.js +1 -1
  20. package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
  21. package/dist/cjs/sd-toast.cjs.entry.js +2 -2
  22. package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
  23. package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +2 -2
  24. package/dist/collection/components/sd-date-picker/sd-date-picker.js +2 -2
  25. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +1 -1
  26. package/dist/collection/components/sd-divider/sd-divider.js +1 -1
  27. package/dist/collection/components/sd-field/sd-field.js +4 -4
  28. package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
  29. package/dist/collection/components/sd-input/sd-input.js +2 -2
  30. package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
  31. package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
  32. package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
  33. package/dist/collection/components/sd-number-input/sd-number-input.js +4 -4
  34. package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
  35. package/dist/collection/components/sd-popup/sd-popup.js +1 -1
  36. package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +2 -2
  37. package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +4 -4
  38. package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +2 -2
  39. package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +2 -2
  40. package/dist/collection/components/sd-select/sd-select.js +4 -4
  41. package/dist/collection/components/sd-switch/sd-switch.js +1 -1
  42. package/dist/collection/components/sd-table/sd-table.js +6 -6
  43. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +2 -2
  44. package/dist/collection/components/sd-table/sd-td/sd-td.js +1 -1
  45. package/dist/collection/components/sd-table/sd-thead/sd-thead.js +3 -3
  46. package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
  47. package/dist/collection/components/sd-tag/sd-tag.css +2 -1
  48. package/dist/collection/components/sd-tag/sd-tag.js +31 -3
  49. package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
  50. package/dist/collection/components/sd-toast/sd-toast.js +2 -2
  51. package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
  52. package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
  53. package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
  54. package/dist/components/{p-I-9rJnxk.js → p-0UeArSzN.js} +1 -1
  55. package/dist/components/{p-BW-I-6Id.js → p-1kjTqHez.js} +1 -1
  56. package/dist/components/{p-BlN03Cqm.js → p-B4ua22vZ.js} +1 -1
  57. package/dist/components/{p-CqivNcjh.js → p-BAIi5T00.js} +1 -1
  58. package/dist/components/{p-Dny4KukK.js → p-BCLDTSO0.js} +1 -1
  59. package/dist/components/{p-PMD-Col0.js → p-BGIwu6m1.js} +1 -1
  60. package/dist/components/{p-DMvWCQfX.js → p-BOrdn-Js.js} +1 -1
  61. package/dist/components/{p-B8uvCE1e.js → p-BTWV2vRX.js} +1 -1
  62. package/dist/components/{p-BuuIkYiY.js → p-Bv_CVYp1.js} +1 -1
  63. package/dist/components/{p-1fgPu1BU.js → p-BwwpMQLA.js} +1 -1
  64. package/dist/components/{p-0U99W-3Z.js → p-C1vqL1Kl.js} +1 -1
  65. package/dist/components/{p-CtNDxhxx.js → p-C7sPq8UM.js} +1 -1
  66. package/dist/components/p-C7sUn4qb.js +1 -0
  67. package/dist/components/{p-CQLezwlh.js → p-CA2sZAsI.js} +1 -1
  68. package/dist/components/{p-BAsjJuJJ.js → p-CFqCJx9B.js} +1 -1
  69. package/dist/components/{p-lGr865w2.js → p-D0Xz7CoK.js} +1 -1
  70. package/dist/components/{p-BzrpKueg.js → p-D15bTkjr.js} +1 -1
  71. package/dist/components/{p-BZUlNC0d.js → p-DPotN1QM.js} +1 -1
  72. package/dist/components/{p-DBw58vNP.js → p-DU2_jzh4.js} +1 -1
  73. package/dist/components/{p-BGpxtouI.js → p-DsGK3Aye.js} +1 -1
  74. package/dist/components/{p-DpYG9T3S.js → p-DznzJSU-.js} +1 -1
  75. package/dist/components/{p-BoH7ykYx.js → p-IBgCA-vo.js} +1 -1
  76. package/dist/components/{p-CNwoxvpg.js → p-JamWHNrr.js} +1 -1
  77. package/dist/components/{p-Dxye4-ZY.js → p-UkSGSWSA.js} +1 -1
  78. package/dist/components/{p-h9_f4fUW.js → p-aYmWxyum.js} +1 -1
  79. package/dist/components/{p-d3KpOGRC.js → p-tSYcqBKN.js} +1 -1
  80. package/dist/components/{p-DbbdfMAF.js → p-zGr4He38.js} +1 -1
  81. package/dist/components/sd-action-modal.js +1 -1
  82. package/dist/components/sd-barcode-input.js +1 -1
  83. package/dist/components/sd-calendar.js +1 -1
  84. package/dist/components/sd-chip-input.js +1 -1
  85. package/dist/components/sd-chip.js +1 -1
  86. package/dist/components/sd-confirm-modal.js +1 -1
  87. package/dist/components/sd-date-picker-trigger.js +1 -1
  88. package/dist/components/sd-date-picker.js +1 -1
  89. package/dist/components/sd-date-range-picker-calendar.js +1 -1
  90. package/dist/components/sd-date-range-picker.js +1 -1
  91. package/dist/components/sd-divider.js +1 -1
  92. package/dist/components/sd-field.js +1 -1
  93. package/dist/components/sd-file-picker.js +1 -1
  94. package/dist/components/sd-floating-portal.js +1 -1
  95. package/dist/components/sd-ghost-button.js +1 -1
  96. package/dist/components/sd-guide.js +1 -1
  97. package/dist/components/sd-input.js +1 -1
  98. package/dist/components/sd-key-value-table.js +1 -1
  99. package/dist/components/sd-linear-progress.js +1 -1
  100. package/dist/components/sd-loading-container.js +1 -1
  101. package/dist/components/sd-loading-modal.js +1 -1
  102. package/dist/components/sd-modal-container.js +1 -1
  103. package/dist/components/sd-number-input.js +1 -1
  104. package/dist/components/sd-pagination.js +1 -1
  105. package/dist/components/sd-popover.js +1 -1
  106. package/dist/components/sd-popup.js +1 -1
  107. package/dist/components/sd-select-list-item-search.js +1 -1
  108. package/dist/components/sd-select-list-item.js +1 -1
  109. package/dist/components/sd-select-listbox.js +1 -1
  110. package/dist/components/sd-select-trigger.js +1 -1
  111. package/dist/components/sd-select.js +1 -1
  112. package/dist/components/sd-switch.js +1 -1
  113. package/dist/components/sd-table.js +1 -1
  114. package/dist/components/sd-tabs.js +1 -1
  115. package/dist/components/sd-tag.js +1 -1
  116. package/dist/components/sd-tbody.js +1 -1
  117. package/dist/components/sd-td.js +1 -1
  118. package/dist/components/sd-text-link.js +1 -1
  119. package/dist/components/sd-textarea.js +1 -1
  120. package/dist/components/sd-thead.js +1 -1
  121. package/dist/components/sd-toast-container.js +1 -1
  122. package/dist/components/sd-toast.js +1 -1
  123. package/dist/components/sd-toggle.js +1 -1
  124. package/dist/components/sd-tooltip.js +1 -1
  125. package/dist/design-system/design-system.esm.js +1 -1
  126. package/dist/design-system/{p-9ea2fbec.entry.js → p-065cd2f4.entry.js} +1 -1
  127. package/dist/design-system/p-28e1cf94.entry.js +1 -0
  128. package/dist/design-system/{p-cb63d4cf.entry.js → p-2c704047.entry.js} +1 -1
  129. package/dist/design-system/{p-43d521c4.entry.js → p-4d747082.entry.js} +1 -1
  130. package/dist/design-system/{p-74e605c0.entry.js → p-4deb11d8.entry.js} +1 -1
  131. package/dist/design-system/{p-84b415d7.entry.js → p-681f8612.entry.js} +1 -1
  132. package/dist/design-system/{p-9afc1f7c.entry.js → p-79d85b32.entry.js} +1 -1
  133. package/dist/design-system/{p-8862e3e3.entry.js → p-7c22de74.entry.js} +1 -1
  134. package/dist/design-system/{p-3b71d1d4.entry.js → p-8b4d246f.entry.js} +1 -1
  135. package/dist/design-system/{p-b4df75b9.entry.js → p-8da06c09.entry.js} +1 -1
  136. package/dist/design-system/{p-5a67c40d.entry.js → p-940de4ba.entry.js} +1 -1
  137. package/dist/design-system/{p-a1438f7d.entry.js → p-9c3f7c57.entry.js} +1 -1
  138. package/dist/design-system/{p-a8d69ab2.entry.js → p-a992c64b.entry.js} +1 -1
  139. package/dist/design-system/{p-21d8f192.entry.js → p-b127ac21.entry.js} +1 -1
  140. package/dist/design-system/{p-6f77fc76.entry.js → p-ba10c791.entry.js} +1 -1
  141. package/dist/design-system/{p-f1e0ba30.entry.js → p-bd700588.entry.js} +1 -1
  142. package/dist/design-system/p-c3b032a1.entry.js +1 -0
  143. package/dist/design-system/{p-6b20c76b.entry.js → p-d8bebc8e.entry.js} +1 -1
  144. package/dist/design-system/{p-a505459f.entry.js → p-dca19618.entry.js} +1 -1
  145. package/dist/design-system/{p-c0198e3a.entry.js → p-e45e6e56.entry.js} +1 -1
  146. package/dist/esm/design-system.js +1 -1
  147. package/dist/esm/loader.js +1 -1
  148. package/dist/esm/sd-calendar_2.entry.js +2 -2
  149. package/dist/esm/sd-confirm-modal_2.entry.js +1 -1
  150. package/dist/esm/sd-date-picker_7.entry.js +9 -9
  151. package/dist/esm/sd-date-range-picker-calendar.entry.js +1 -1
  152. package/dist/esm/sd-divider.entry.js +1 -1
  153. package/dist/esm/sd-field_3.entry.js +7 -7
  154. package/dist/esm/sd-ghost-button_3.entry.js +12 -4
  155. package/dist/esm/sd-linear-progress.entry.js +1 -1
  156. package/dist/esm/sd-loading-container.entry.js +2 -2
  157. package/dist/esm/sd-pagination_4.entry.js +8 -8
  158. package/dist/esm/sd-popup.entry.js +1 -1
  159. package/dist/esm/sd-select-list-item_2.entry.js +6 -6
  160. package/dist/esm/sd-select_3.entry.js +8 -8
  161. package/dist/esm/sd-switch.entry.js +1 -1
  162. package/dist/esm/sd-table.entry.js +6 -6
  163. package/dist/esm/sd-tabs.entry.js +1 -1
  164. package/dist/esm/sd-td.entry.js +1 -1
  165. package/dist/esm/sd-toast-container.entry.js +1 -1
  166. package/dist/esm/sd-toast.entry.js +2 -2
  167. package/dist/esm/sd-toggle.entry.js +1 -1
  168. package/dist/types/components/sd-tag/sd-tag.d.ts +3 -0
  169. package/dist/types/components.d.ts +11 -0
  170. package/hydrate/index.js +73 -64
  171. package/hydrate/index.mjs +73 -64
  172. package/package.json +1 -1
  173. package/dist/components/p-D8T1XeGP.js +0 -1
  174. package/dist/design-system/p-0d5d2723.entry.js +0 -1
  175. package/dist/design-system/p-ad822c82.entry.js +0 -1
@@ -361,9 +361,9 @@ export class SdSelectListbox {
361
361
  '--listbox-max-height': this.maxHeight ?? '260px',
362
362
  '--listbox-radius': `${LIST_BOX_LAYOUT.radius}px`,
363
363
  };
364
- return (h("div", { key: 'df4d19f8807ce87384cad18ca981e0792da35682', class: "sd-select-listbox", style: cssVars }, this.showSearch && (h("sd-select-list-item-search", { key: 'b950890a9138fa5ab7f0df7c1d07bbea65140e67', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), h("div", { key: '1aeaf552893becedf8394c1e9af8ef7119e70fdb', class: "sd-select-listbox__list", onScroll: this.handleScroll, ref: el => {
364
+ return (h("div", { key: '86caa4b3d4fbc3bcc6214ffe8596f62b6595b2e0', class: "sd-select-listbox", style: cssVars }, this.showSearch && (h("sd-select-list-item-search", { key: '7a4f2cf77da2af673c7c11836cf1152f8cf55c2d', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), h("div", { key: '243c0be0b5898754a35adbce89d9f72671e39a3a', class: "sd-select-listbox__list", onScroll: this.handleScroll, ref: el => {
365
365
  this.listEl = el;
366
- } }, this.showSelectAll && (h("sd-select-list-item", { key: '83329f2d454d116d64155ef8a83c076e27cdc7b0', option: SdSelectListbox.SELECT_ALL_OPTION, depth: 1, isSelected: this.selectAllState, isFocused: this.isOptionFocused(SdSelectListbox.SELECT_ALL_OPTION), useCheckbox: true, onSdListItemClick: this.handleSelectAllClick, onMouseEnter: () => this.handleOptionHover(SdSelectListbox.SELECT_ALL_OPTION) })), this.isEmpty ? (h("div", { class: "sd-select-listbox__empty" }, EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (h("sd-select-list-item", { option: option, depth: 1, isSelected: this.isOptionSelected(option), isFocused: this.isOptionFocused(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick, onMouseEnter: () => this.handleOptionHover(option) })))))));
366
+ } }, this.showSelectAll && (h("sd-select-list-item", { key: 'eef122310c6a45ed876af8cd578b86d1f27a68d3', option: SdSelectListbox.SELECT_ALL_OPTION, depth: 1, isSelected: this.selectAllState, isFocused: this.isOptionFocused(SdSelectListbox.SELECT_ALL_OPTION), useCheckbox: true, onSdListItemClick: this.handleSelectAllClick, onMouseEnter: () => this.handleOptionHover(SdSelectListbox.SELECT_ALL_OPTION) })), this.isEmpty ? (h("div", { class: "sd-select-listbox__empty" }, EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (h("sd-select-list-item", { option: option, depth: 1, isSelected: this.isOptionSelected(option), isFocused: this.isOptionFocused(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick, onMouseEnter: () => this.handleOptionHover(option) })))))));
367
367
  }
368
368
  static get is() { return "sd-select-listbox"; }
369
369
  static get encapsulation() { return "shadow"; }
@@ -51,7 +51,7 @@ export class SdSelectTrigger {
51
51
  ? SELECT_COLORS.icon.disabled
52
52
  : SELECT_COLORS.icon.default,
53
53
  };
54
- return (h("div", { key: 'bd967efa32ed0692512e549db9f852c7c08d5dcd', ref: el => {
54
+ return (h("div", { key: '0c3e197cd8a238a979ee6d794a607e07585b2025', ref: el => {
55
55
  this.triggerEl = el;
56
56
  }, role: "button", "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, class: {
57
57
  'sd-select-trigger': true,
@@ -62,7 +62,7 @@ export class SdSelectTrigger {
62
62
  e.preventDefault();
63
63
  this.handleClick();
64
64
  }
65
- }, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '04a8568ac5d109f0635d3474a394030d630f441e', class: "sd-select-trigger__content" }, hasValue && isHtmlLabel(this.displayText) ? (h("span", { class: "sd-select-trigger__text", ref: el => el && (el.innerHTML = sanitizeInlineHtml(this.displayText)) })) : (h("span", { class: "sd-select-trigger__text" }, hasValue ? this.displayText : (this.placeholder ?? '선택'))), h("sd-icon", { key: 'ba256d1a780f7805c81330a6ba4e010c458be57e', name: "chevronDown", size: 12, color: "var(--trigger-icon-color)", class: {
65
+ }, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '4c068fb6a6784bde01669b7a5ad30d91dc358dd3', class: "sd-select-trigger__content" }, hasValue && isHtmlLabel(this.displayText) ? (h("span", { class: "sd-select-trigger__text", ref: el => el && (el.innerHTML = sanitizeInlineHtml(this.displayText)) })) : (h("span", { class: "sd-select-trigger__text" }, hasValue ? this.displayText : (this.placeholder ?? '선택'))), h("sd-icon", { key: '7172c372c2864574ca6ab0f726a0af091a3d0110', name: "chevronDown", size: 12, color: "var(--trigger-icon-color)", class: {
66
66
  'sd-select-trigger__icon': true,
67
67
  'sd-select-trigger__icon--open': this.isOpen,
68
68
  } }))));
@@ -283,15 +283,15 @@ export class SdSelect {
283
283
  this.closeDropdown();
284
284
  },
285
285
  };
286
- return (h("sd-field", { key: '5dceeb2361339527e65657f66966a5b843f7a03b', 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: () => {
286
+ return (h("sd-field", { key: 'dd5f5142ec0a6ba80a67b544543c592c4492246b', 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: () => {
287
287
  this.hovered = true;
288
288
  }, onMouseLeave: () => {
289
289
  this.hovered = false;
290
- } }, h("div", { key: '2fe78a384fef6083a08709fa72d98d2b2e399580', class: "sd-select", ref: el => {
290
+ } }, h("div", { key: '2069d25c1739610ee4bf8652da9a10bc149b0bc3', class: "sd-select", ref: el => {
291
291
  this.triggerRef = el;
292
- } }, h("sd-select-trigger", { key: 'be647e0ba29295be5a888d92cb18c273980ec38f', ref: el => {
292
+ } }, h("sd-select-trigger", { key: 'b9b332bee38e449802be1b6a2c4b02a8243aa220', ref: el => {
293
293
  this.triggerComponentRef = el;
294
- }, 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: '2d519a9957ff7201519502a2053785cc669642c2', ...portalProps }, h("sd-select-listbox", { key: '33377475b06c3be1f6ba7e6909a9bfb938144b3a', type: this.type, options: this.options, value: this.value, emitValue: this.emitValue, useSearch: this.useSearch, useSelectAll: this.useSelectAll, triggerWidth: this.dropdownWidth || this.triggerWidth, maxWidth: this.resolvedMaxDropdownWidth, maxHeight: this.resolvedDropdownHeight, onSdOptionSelect: event => this.handleOptionSelect(event.detail) })))));
294
+ }, 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: 'fba3b55ec6c0d7fa9afe2d0ac8d41ba85ad62e6b', ...portalProps }, h("sd-select-listbox", { key: 'ad505ebdcb6a2f27083520877e42eccf4aeacbc3', type: this.type, options: this.options, value: this.value, emitValue: this.emitValue, useSearch: this.useSearch, useSelectAll: this.useSelectAll, triggerWidth: this.dropdownWidth || this.triggerWidth, maxWidth: this.resolvedMaxDropdownWidth, maxHeight: this.resolvedDropdownHeight, onSdOptionSelect: event => this.handleOptionSelect(event.detail) })))));
295
295
  }
296
296
  static get is() { return "sd-select"; }
297
297
  static get originalStyleUrls() {
@@ -45,7 +45,7 @@ export class SdSwitch {
45
45
  '--sd-switch-line-height': `${SWITCH_TYPOGRAPHY.lineHeight}px`,
46
46
  '--sd-switch-text-decoration': SWITCH_TYPOGRAPHY.textDecoration,
47
47
  };
48
- return (h("label", { key: 'f63559e7ee0523e475e26e80bc568d9b79f03c2a', "aria-label": this.label || 'switch', class: this.switchClasses, style: cssVars }, h("input", { key: 'f1d0697ba500514923aeb6d514761641e34e6080', type: "checkbox", checked: this.value, disabled: this.disabled, onInput: this.handleChange }), h("div", { key: '988ccaf702365c76c76e11246e5de7035509cfa0', class: "sd-switch__track" }, h("div", { key: '5a413a7e89054f5f93821f098f4d3173c09ce180', class: "sd-switch__knob" })), this.label && h("span", { key: 'b1674d9039d0d1e9dc9c01525fc2e6b97c139ed1', class: "sd-switch__label" }, this.label)));
48
+ return (h("label", { key: '1c1ad8fff6d40b4e58f36f1238efe0e1d92ac391', "aria-label": this.label || 'switch', class: this.switchClasses, style: cssVars }, h("input", { key: 'c93a0da431b173fa705d5ffef018e605c625cb2a', type: "checkbox", checked: this.value, disabled: this.disabled, onInput: this.handleChange }), h("div", { key: '03483ff7893a072b4778230d9d1be3b737537d53', class: "sd-switch__track" }, h("div", { key: '0db9dc3442e77b327fe1c6544e4c320d71389ca6', class: "sd-switch__knob" })), this.label && h("span", { key: '35f6aad85d20458d364ea84aaabcf518b9c8983c', class: "sd-switch__label" }, this.label)));
49
49
  }
50
50
  static get is() { return "sd-switch"; }
51
51
  static get originalStyleUrls() {
@@ -853,25 +853,25 @@ export class SdTable {
853
853
  '--table-selectable-width': `${TABLE_SELECTABLE_COLUMN_WIDTH}px`,
854
854
  '--table-host-height': hostHeight,
855
855
  };
856
- return (h(Host, { key: '288633055ee4be465a96964b11d6c032fecd603f', style: hostStyle }, h("div", { key: 'ab9878f8515bddc3058aafb1806310677fc9f360', class: "sd-table__container", style: {
856
+ return (h(Host, { key: '91d045af5763bca824e393c597f4623da9e02705', style: hostStyle }, h("div", { key: 'b441e620f75dd0d71d5457fdb2a61f82d44096c0', class: "sd-table__container", style: {
857
857
  '--table-width': this.width,
858
858
  '--pagination-height': `${paginationHeight}px`,
859
- } }, h("div", { key: '9f7f16a5cbf27f32a2209586f5b2604066bba4b4', class: {
859
+ } }, h("div", { key: '4d78e38b038113894b175afbd0f26123f17cd0b4', class: {
860
860
  'sd-table__wrapper': true,
861
861
  'sd-table__wrapper--radius-useTop': this.radius === 'useTop',
862
862
  'sd-table__wrapper--radius-full': this.radius === 'full',
863
- } }, h("div", { key: 'c16e48a6dc55ddcf398a7053a93d6e1595fc83da', class: {
863
+ } }, h("div", { key: '263058e881fcd6f5b120d39df069823641a54e62', class: {
864
864
  'sd-table__scroll-container': true,
865
865
  'sd-table__scroll-container--loading': this.isLoading,
866
866
  'sd-table__scroll-container--no-data': isNoData,
867
- } }, this.isLoading && (h("div", { key: '1bc3cd25cbd34d912aee00dc43ad961f442a8d2a', class: "sd-table__loading", style: { top: `${this.loadingScrollTop}px` } }, h("sd-circle-progress", { key: '3c157990784d6f9e58fef6ff0e6b36ffd87d3a0d', indeterminate: true }))), isNoData && (h(h.Fragment, null, h("div", { key: 'ebb3e4560cc9729d496110e4f159a25737e26bca', class: "sd-table__no-data-header-overlay" }), h("div", { key: 'c9b02b2aef01542a2fe5be0578d31ce72566bff6', class: "sd-table__no-data" }, h("div", { key: '6ab6d9b90ef703b4865eedbf19deff2a04e9d278', class: "sd-table__no-data-content", ref: el => {
867
+ } }, this.isLoading && (h("div", { key: '5d3b2a9b93bb160e45c9dc68161c548e9b307a81', class: "sd-table__loading", style: { top: `${this.loadingScrollTop}px` } }, h("sd-circle-progress", { key: 'b951f5b435bc7bbd0bf97543b7ec68e7ca37a282', indeterminate: true }))), isNoData && (h(h.Fragment, null, h("div", { key: '646b4d962be56d3dcd410855a80ada7680a3471f', class: "sd-table__no-data-header-overlay" }), h("div", { key: 'e86161b138d07a50c579f65f3fef44a70a596774', class: "sd-table__no-data" }, h("div", { key: '5fd55dd68fbb7b55d8b00be6934076fbef919760', class: "sd-table__no-data-content", ref: el => {
868
868
  this.noDataContentEl = el;
869
869
  if (el)
870
870
  this.syncNoDataContentObserver();
871
- } }, h("slot", { key: '072b90261f1a0817ccc20d8d5d5346bdcd223304', name: "no-data" }, h("span", { key: 'bbef2b4c13f8cf7736f02b11d149fe00af3cb567' }, this.resolvedNoDataLabel)))))), h("table", { key: '2d7beab7b8fd42f5bfc4b2b5c9538e6cd7a08b2a', class: this.tableClasses }, this.autoThead ? (h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange }, h("sd-thead", { rows: this.rows ?? [] }))) : (h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange })), this.autoTbody ? (h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }, h("sd-tbody", { rows: this.rows ?? [] }, this.renderAutoRows()))) : (h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }))))), this.pagination &&
871
+ } }, h("slot", { key: 'ba83b3f3ae09e8768a2301e75653f3c4562436a4', name: "no-data" }, h("span", { key: 'd95683ca3bcd1f0dba2e8594e5751c76c2919d9c' }, this.resolvedNoDataLabel)))))), h("table", { key: 'a82706073a9e8c5d9c3b011db2c21697b30e8203', class: this.tableClasses }, this.autoThead ? (h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange }, h("sd-thead", { rows: this.rows ?? [] }))) : (h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange })), this.autoTbody ? (h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }, h("sd-tbody", { rows: this.rows ?? [] }, this.renderAutoRows()))) : (h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }))))), this.pagination &&
872
872
  this.pagination.rowsPerPage > 0 &&
873
873
  this.rowCount > 0 &&
874
- !this.useVirtualScroll && (h("div", { key: 'ee81359d024a466a2730c2e7df7a4a0f2b319de3', class: "sd-table__pagination" }, h("sd-pagination", { key: '069c72080181324d82c9ef207398e11d7766cb34', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onSdPageChange: (e) => this.changePage(e.detail) }), this.useRowsPerPageSelect && (h("sd-select", { key: 'ce1798a0c99cff78318087d25bfc1ece86993e4a', value: this.useInternalPagination
874
+ !this.useVirtualScroll && (h("div", { key: 'bde43c82f954ba6bc5a70b07683e1159cdf0b7c6', class: "sd-table__pagination" }, h("sd-pagination", { key: '7d8bc79ae3452a8cc22d7e51871eeb4fa495b276', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onSdPageChange: (e) => this.changePage(e.detail) }), this.useRowsPerPageSelect && (h("sd-select", { key: 'a087902b29b75129d52f5513b6c317cddbb6de15', value: this.useInternalPagination
875
875
  ? this.innerRowsPerPage
876
876
  : this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", emitValue: true, onSdUpdate: e => {
877
877
  if (!this.isRowsPerPageValue(e.detail))
@@ -46,9 +46,9 @@ export class SdTbody {
46
46
  }
47
47
  }
48
48
  render() {
49
- return (h(Host, { key: 'af02c942fe83b515e2065840ff3b83ad22fd5542', slot: `${this.tableId}-body` }, h("tbody", { key: '6f1b771c2a21ff087b5feb32b19e0fb4b0abed35', class: { tbody: true } }, [
49
+ return (h(Host, { key: '3c3b748b436dc9db4054a5528fc205da7d21c8e8', slot: `${this.tableId}-body` }, h("tbody", { key: '7cd092ce9b54bed7e4aaaf4b9b3df788d13e382c', class: { tbody: true } }, [
50
50
  this.topSpacerHeight > 0 && (h("tr", { key: "spacer-top", class: "tbody__spacer", style: { height: `${this.topSpacerHeight}px`, display: 'block' } })),
51
- h("slot", { key: '0c7c439b269527f9bfbb00bf60a1aec10646da56' }),
51
+ h("slot", { key: '0a8c271acdd45802cb036c58303bd08037067c7d' }),
52
52
  this.bottomSpacerHeight > 0 && (h("tr", { key: "spacer-bottom", class: "tbody__spacer", style: { height: `${this.bottomSpacerHeight}px`, display: 'block' } })),
53
53
  ])));
54
54
  }
@@ -159,7 +159,7 @@ export class SdTd {
159
159
  }
160
160
  }
161
161
  render() {
162
- return (h(Host, { key: 'a8b2ea05cfaa821b1e4766657cce6a2b7a399881', class: { [`align-${this.align}`]: Boolean(this.align) } }, h("slot", { key: '7fa181915d15192257bc38500787207810ec2739' })));
162
+ return (h(Host, { key: '3a57e2c9669facd934506fcac11d3fe6474cf4e6', class: { [`align-${this.align}`]: Boolean(this.align) } }, h("slot", { key: '1936262e4fa08e364cc57a5587703c546199007a' })));
163
163
  }
164
164
  static get is() { return "sd-td"; }
165
165
  static get originalStyleUrls() {
@@ -241,16 +241,16 @@ export class SdThead {
241
241
  '--table-border-color': TABLE_BORDER.color,
242
242
  '--table-border-width': `${TABLE_BORDER.width}px`,
243
243
  };
244
- return (h(Host, { key: '521fa63c751f74ba620aad7355127c7d7fe8217c', slot: `${this.tableId}-head`, style: headStyle }, h("thead", { key: '226911deb4a0a0898e064875fbba7aa1d326634b', class: {
244
+ return (h(Host, { key: '0f9c6f9eb3c1afbd2af6c729152e3767b9637886', slot: `${this.tableId}-head`, style: headStyle }, h("thead", { key: '35a3d8864c5801058e810b6c0b7b281bf7943b85', class: {
245
245
  'thead': true,
246
246
  'thead--sticky': this._stickyHeader,
247
- } }, h("tr", { key: 'f60653ae5dc8b773b73ab05f9631358272e90df5', class: "tr" }, this._selectable && (h("th", { key: '7826b9c1fa8ec84f83825f8380e7bcd014d3782a', class: {
247
+ } }, h("tr", { key: '04827a6c5148f1be3de475e4e0a9ead839aab89e', class: "tr" }, this._selectable && (h("th", { key: '169e3b47c9710851ee6dbe58765a1b9da5ac6f75', class: {
248
248
  'th': true,
249
249
  'th--selected': true,
250
250
  'sticky-left': true,
251
251
  'sticky-left-edge': stickyLeftCount === 0,
252
252
  'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
253
- }, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '412a9ee49954014dc45dd0a2444642a549782d8e', value: this.getIsAllChecked(), disabled: safeRows.length === 0, onSdUpdate: (e) => this.handleSelectAll(e.detail) }), h("div", { key: '116b6c2a55cc7553090b39338e251101c1de057b', class: "th__bar" }))), stickyLeftCols.map((col, idx) => (h("th", { key: col.name, class: {
253
+ }, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '85f1dc11ae78307cd814813736e9e3097fdd4a47', value: this.getIsAllChecked(), disabled: safeRows.length === 0, onSdUpdate: (e) => this.handleSelectAll(e.detail) }), h("div", { key: 'adc4e163b5161fe7e6adf41c4b48284654a223b9', class: "th__bar" }))), stickyLeftCols.map((col, idx) => (h("th", { key: col.name, class: {
254
254
  'th': true,
255
255
  [`${col.thClass}`]: Boolean(col.thClass),
256
256
  'sticky-left': true,
@@ -78,7 +78,7 @@ export class SdTabs {
78
78
  };
79
79
  }
80
80
  render() {
81
- return (h("div", { key: 'c824bcceda28b2591d57e713ae49f5f8260043c4', class: this.getContainerClasses(), style: this.buildCssVars() }, this.tabs.map((tab, index) => {
81
+ return (h("div", { key: 'c88c2d10181fd02076ac9c0ecdb6d3e95bd727c3', class: this.getContainerClasses(), style: this.buildCssVars() }, this.tabs.map((tab, index) => {
82
82
  const badgeName = this.getBadgeName(tab);
83
83
  return (h("div", { key: `tab-${index}`, role: "tab", tabindex: 0, "aria-selected": tab.value === this.value ? 'true' : 'false', class: this.getTabClasses(tab), "aria-label": tab.label || 'tab', onClick: () => this.handleTabClick(tab), onKeyDown: e => {
84
84
  if (e.key === 'Enter' || e.key === ' ') {
@@ -1,11 +1,12 @@
1
1
  sd-tag {
2
2
  display: inline-flex;
3
- width: fit-content;
3
+ width: var(--sd-tag-width, fit-content);
4
4
  height: fit-content;
5
5
  }
6
6
 
7
7
  .sd-tag {
8
8
  display: inline-flex;
9
+ width: 100%;
9
10
  align-items: center;
10
11
  justify-content: center;
11
12
  gap: var(--sd-tag-gap, 5px);
@@ -1,4 +1,4 @@
1
- import { h } from "@stencil/core";
1
+ import { Host, h } from "@stencil/core";
2
2
  import { TAG_CONFIG, isTagName } from "./sd-tag.config";
3
3
  export class SdTag {
4
4
  /** 태그 프리셋 이름 */
@@ -10,6 +10,8 @@ export class SdTag {
10
10
  // 아이콘이 좌측 배치되는 게 자연스러운 default. prop 이름 변경(isRight 등)은 public API breaking 이라 별도 이슈로 분리.
11
11
  /** true이면 아이콘을 레이블 왼쪽에 배치 */
12
12
  isLeft = true;
13
+ /** 태그 너비 (숫자면 px, 문자열이면 그대로 적용). 미지정 시 콘텐츠 크기(fit-content) */
14
+ width = '';
13
15
  componentWillLoad() {
14
16
  this.name = this.name ?? 'square_sm_grey';
15
17
  }
@@ -27,10 +29,16 @@ export class SdTag {
27
29
  return null;
28
30
  return h("sd-icon", { class: "sd-tag__icon", name: this.icon, size: size, color: color });
29
31
  }
32
+ get resolvedWidth() {
33
+ if (this.width === '' || this.width === 0)
34
+ return undefined;
35
+ return typeof this.width === 'number' ? `${this.width}px` : this.width;
36
+ }
30
37
  render() {
31
38
  const config = this.resolvedConfig;
32
39
  const iconNode = this.renderIcon(config.icon, config.iconSize);
33
- return (h("span", { key: '6cbf6fb37f0e926e604b24d482c8d648079b41dd', class: "sd-tag", style: {
40
+ const width = this.resolvedWidth;
41
+ return (h(Host, { key: '77b65a35be3456f1bf821a0b276fd1e5820f5b90', style: width != null ? { '--sd-tag-width': width } : undefined }, h("span", { key: '806c855067690cedefa8d867d3535fd83aab4d73', class: "sd-tag", style: {
34
42
  '--sd-tag-background': config.background,
35
43
  '--sd-tag-content': config.content,
36
44
  '--sd-tag-height': config.height,
@@ -40,7 +48,7 @@ export class SdTag {
40
48
  '--sd-tag-font-weight': config.fontWeight,
41
49
  '--sd-tag-line-height': config.lineHeight,
42
50
  '--sd-tag-radius': config.radius,
43
- }, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: 'e0e9410afe716341dc7fb7891bb46c85cde9d51b', class: "sd-tag__label" }, this.label), this.icon && !this.isLeft && iconNode));
51
+ }, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '88891681230cc9b916428d60814b4d90c1614c20', class: "sd-tag__label" }, this.label), this.icon && !this.isLeft && iconNode)));
44
52
  }
45
53
  static get is() { return "sd-tag"; }
46
54
  static get originalStyleUrls() {
@@ -145,6 +153,26 @@ export class SdTag {
145
153
  "reflect": false,
146
154
  "attribute": "is-left",
147
155
  "defaultValue": "true"
156
+ },
157
+ "width": {
158
+ "type": "any",
159
+ "mutable": false,
160
+ "complexType": {
161
+ "original": "string | number",
162
+ "resolved": "number | string",
163
+ "references": {}
164
+ },
165
+ "required": false,
166
+ "optional": false,
167
+ "docs": {
168
+ "tags": [],
169
+ "text": "\uD0DC\uADF8 \uB108\uBE44 (\uC22B\uC790\uBA74 px, \uBB38\uC790\uC5F4\uC774\uBA74 \uADF8\uB300\uB85C \uC801\uC6A9). \uBBF8\uC9C0\uC815 \uC2DC \uCF58\uD150\uCE20 \uD06C\uAE30(fit-content)"
170
+ },
171
+ "getter": false,
172
+ "setter": false,
173
+ "reflect": false,
174
+ "attribute": "width",
175
+ "defaultValue": "''"
148
176
  }
149
177
  };
150
178
  }
@@ -139,7 +139,7 @@ export class SdTextarea {
139
139
  '--sd-system-size-field-sm-height': 'auto',
140
140
  '--sd-system-radius-field-sm': `${TEXTAREA_TOKENS.radius}px`,
141
141
  };
142
- return (h("sd-field", { key: '08375e678b02c61a201b70214772e8a354280601', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, readonly: this.readonly, focused: this.focused, hovered: this.hovered, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: '5c9462b2b0c8f0078c34b044b8cd626dfd9f18be', class: "sd-textarea__content" }, h("textarea", { key: 'a5f0d448791be4b75388c02e8a356486c0487d78', 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 }))));
142
+ return (h("sd-field", { key: '007bdda5f38f94997c65f3542b4075a62c11a391', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, readonly: this.readonly, focused: this.focused, hovered: this.hovered, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: '536185bb53815baae7807a5d4708d9f0100c07c1', class: "sd-textarea__content" }, h("textarea", { key: '144ae3ca78f8c3953bfef9951cb79952186b856c', 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 }))));
143
143
  }
144
144
  static get is() { return "sd-textarea"; }
145
145
  static get originalStyleUrls() {
@@ -26,12 +26,12 @@ export class SdToast {
26
26
  const linkColor = typeConfig.linkColor ?? typeConfig.content;
27
27
  const useDefaultCloseIntent = ['default', 'caution', 'info'].includes(this.type);
28
28
  const buttonName = TOAST_BUTTON_NAME_BY_TYPE[this.type] ?? TOAST_BUTTON_NAME_BY_TYPE.default;
29
- return (h("div", { key: '240ed7553fa03d18bb4384b1192d16a821be5832', style: {
29
+ return (h("div", { key: '98f2adc86e98e6e1a33eec9f1166a36fd0132091', style: {
30
30
  '--sd-toast-bg': typeConfig.bg,
31
31
  '--sd-toast-text': typeConfig.content,
32
32
  '--sd-toast-icon': iconColor,
33
33
  '--sd-toast-link': linkColor,
34
- } }, h("div", { key: 'bdb9a45473dcab86e2dd8bb6321e7b717f93b784', class: "sd-toast", role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (h("div", { key: '2a02e47336cd6a46c7cc3560f3f82d4f10a3d211', class: "sd-toast__icon" }, h("sd-icon", { key: '872cfb213c3a080fc1e5458ce53efa04c1fa8840', name: this.icon, size: iconSize, color: iconColor }))), h("div", { key: '3a22f7518f63676e22c4faeb76873c31d6cf6b11', class: "sd-toast__content" }, h("span", { key: 'dd6a533b60c07bdcbdc80090d61bdf29b8879609', class: "sd-toast__message" }, this.message)), this.link && (h("a", { key: '45efddf62b906e8f0b2136ad3d1131204d0b9125', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.buttonLabel && (h("sd-button", { key: '3729f4f21ba7e59c2702137053de946e284b226a', class: "sd-toast__button", name: buttonName, label: this.buttonLabel, onSdClick: (event) => this.buttonClick.emit(event.detail) })), this.useClose && (h("sd-ghost-button", { key: 'd7f0f670aef527be6253cd70bd2b19a900ccaddd', class: "sd-toast__close", icon: "close", intent: useDefaultCloseIntent ? 'default' : 'inverse', ariaLabel: "close", size: "xs", onClick: () => this.close.emit() })))));
34
+ } }, h("div", { key: 'bf62e48b849b5d233b917e9bff8b516cdee3273d', class: "sd-toast", role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (h("div", { key: '4a17910884a1778ff647cc4037d23a25834a5c8d', class: "sd-toast__icon" }, h("sd-icon", { key: '7b6d9567d94f8351d5c07bdf4351bc028f9b0b06', name: this.icon, size: iconSize, color: iconColor }))), h("div", { key: '1a0fa06eeb4b5aaf9a3b7804c3aa90be85797839', class: "sd-toast__content" }, h("span", { key: '32eed9d06fae03ffea1de307eb006bc2889731c2', class: "sd-toast__message" }, this.message)), this.link && (h("a", { key: 'f1bafc6c06d5faad3fc556419ca556df9e76ee4f', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.buttonLabel && (h("sd-button", { key: '94fcfb175c9e302cbb27d2dc3ed7256a65960013', class: "sd-toast__button", name: buttonName, label: this.buttonLabel, onSdClick: (event) => this.buttonClick.emit(event.detail) })), this.useClose && (h("sd-ghost-button", { key: 'ae2bcd09d6c0ee5afbdfeed6e268b899a308ec64', class: "sd-toast__close", icon: "close", intent: useDefaultCloseIntent ? 'default' : 'inverse', ariaLabel: "close", size: "xs", onClick: () => this.close.emit() })))));
35
35
  }
36
36
  static get is() { return "sd-toast"; }
37
37
  static get originalStyleUrls() {
@@ -225,7 +225,7 @@ export class SdToastContainer {
225
225
  const activeToasts = toasts.filter(t => t.state !== 'exiting').reverse();
226
226
  const indexMap = new Map();
227
227
  activeToasts.forEach((t, i) => indexMap.set(t.id, i));
228
- return (h("div", { key: '6a6db296cca6ee2b3f1f5ba1b2014f3787fd6ee0', class: "sd-toast-container", style: this.getContainerStyles(), onMouseEnter: () => {
228
+ return (h("div", { key: 'ce0bd7179ac744e558f900228fcf80d16b676d1d', class: "sd-toast-container", style: this.getContainerStyles(), onMouseEnter: () => {
229
229
  this.expanded = true;
230
230
  this.pauseTimers();
231
231
  }, onMouseLeave: () => {
@@ -49,7 +49,7 @@ export class SdToggle {
49
49
  '--sd-toggle-content-select': TOGGLE_COLORS.content.select,
50
50
  '--sd-toggle-content-disabled': TOGGLE_COLORS.content.disabled,
51
51
  };
52
- return (h("label", { key: 'f5bc6364e15bfd720d639959d4b8eca1faf022ff', class: this.toggleClasses, style: cssVars, "aria-label": this.label || 'toggle' }, this.label, h("input", { key: 'e6046c1887bac5fc46dfe94d065c4e782090997f', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
52
+ return (h("label", { key: '79ca3923f8eda2791a41bc3ce6c61798102a078c', class: this.toggleClasses, style: cssVars, "aria-label": this.label || 'toggle' }, this.label, h("input", { key: '7ff2b7a49b65fa0b5f6bed383928880f1771239d', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
53
53
  }
54
54
  static get is() { return "sd-toggle"; }
55
55
  static get originalStyleUrls() {
@@ -142,7 +142,7 @@ export class SdTooltip {
142
142
  const bodyHTML = this.message && this.message.length > 0
143
143
  ? this.message.map(line => `<div>${line}</div>`).join('')
144
144
  : this.slotContentHTML;
145
- return (h(Fragment, { key: '81d582c4c8847a0f57abf632d975461cdf07b535' }, h("div", { key: 'c7515fb866fa85749405bb10512e27575850eb27', ref: el => (this.triggerEl = el), class: triggerClasses, ...divTrigger }, anchorMode ? (h("slot", { name: "anchor" })) : hasLabel ? (h("sd-button", { ref: el => (this.buttonEl = el), name: this.name ?? 'primary_sm', label: this.label, icon: icon, rightIcon: this.rightIcon, ariaLabel: this.ariaLabel, disabled: this.disabled, type: this.type ?? 'button', class: "sd-tooltip", ...buttonClickTrigger })) : (h("sd-icon", { ref: el => (this.buttonEl = el), name: icon, size: this.iconSize ?? 12, color: color, class: "sd-tooltip" }))), this.showTooltip && (h("sd-floating-portal", { key: '903aaa3723a119687e5af8120d54fb1b9e43c584', parentRef: anchorMode ? this.triggerEl : this.buttonEl, onSdClose: this.handleClose, placement: placement, offset: this.tooltipOffset }, h("div", { key: '813e1dbf7f2d8e0378f4fcac1225341aafbd9948', ref: el => (this.menuEl = el), class: {
145
+ return (h(Fragment, { key: 'f50cb9c1397c479dd994edeb044cb95764976344' }, h("div", { key: '0b6f62051b47015a1e0bb7e9f6ee66750b74c4e0', ref: el => (this.triggerEl = el), class: triggerClasses, ...divTrigger }, anchorMode ? (h("slot", { name: "anchor" })) : hasLabel ? (h("sd-button", { ref: el => (this.buttonEl = el), name: this.name ?? 'primary_sm', label: this.label, icon: icon, rightIcon: this.rightIcon, ariaLabel: this.ariaLabel, disabled: this.disabled, type: this.type ?? 'button', class: "sd-tooltip", ...buttonClickTrigger })) : (h("sd-icon", { ref: el => (this.buttonEl = el), name: icon, size: this.iconSize ?? 12, color: color, class: "sd-tooltip" }))), this.showTooltip && (h("sd-floating-portal", { key: '4e750b20c8ee4649f3474de06e12c7008f8796c3', parentRef: anchorMode ? this.triggerEl : this.buttonEl, onSdClose: this.handleClose, placement: placement, offset: this.tooltipOffset }, h("div", { key: 'd9f86aa8e074d516350ffc621d28b3d70ed08713', ref: el => (this.menuEl = el), class: {
146
146
  'sd-floating-menu': true,
147
147
  [`sd-floating-menu--${tooltipType}`]: true,
148
148
  [`sd-floating-menu--${placement}`]: true,
@@ -150,7 +150,7 @@ export class SdTooltip {
150
150
  }, style: {
151
151
  '--sd-floating-bg': typeConfig.bg,
152
152
  '--sd-floating-content': typeConfig.content,
153
- }, onMouseEnter: () => this.openTooltip(), onMouseLeave: () => !this.useClose && this.startHideTimer() }, h("i", { key: 'd74071d3d236382bc952ad03a05ebd77219b4ddb', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${placement}` }, h(TooltipArrow, { key: '91c35bd2bc22294b7e7998965930219a43799310' })), h("div", { key: '16edd2fc6e9ad02b646c05c6404d3eb79e2a7a71', class: "sd-floating-menu__content", innerHTML: bodyHTML }), this.useClose && (h("sd-ghost-button", { key: 'd234906f7a4a603a8e18cef6da49f9d893adb731', class: "sd-floating-menu__close-button", icon: "close", ariaLabel: "close", size: "xxs", onClick: () => this.closeTooltip() })))))));
153
+ }, onMouseEnter: () => this.openTooltip(), onMouseLeave: () => !this.useClose && this.startHideTimer() }, h("i", { key: '91080790a99c0aaad815c8deddce5fc6a9ff405d', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${placement}` }, h(TooltipArrow, { key: 'db89405989bfb909e6f86050de407cbc5f821717' })), h("div", { key: '24cc5aa569cbf316aaaf23e5cc7e85144d51ab9b', class: "sd-floating-menu__content", innerHTML: bodyHTML }), this.useClose && (h("sd-ghost-button", { key: '32b62d9c48d72428783375b68bcf4807154b6bb1', class: "sd-floating-menu__close-button", icon: "close", ariaLabel: "close", size: "xxs", onClick: () => this.closeTooltip() })))))));
154
154
  }
155
155
  static get is() { return "sd-tooltip"; }
156
156
  static get originalStyleUrls() {
@@ -1 +1 @@
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-Dxye4-ZY.js";import{d as n}from"./p-DMvWCQfX.js";import{d as h}from"./p-BlN03Cqm.js";import{d as c}from"./p-BnhzUsGP.js";import{d as u}from"./p-BckY1cBy.js";import{d as p}from"./p-D8T1XeGP.js";import{d as x}from"./p-BGpxtouI.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:"08375e678b02c61a201b70214772e8a354280601",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:"5c9462b2b0c8f0078c34b044b8cd626dfd9f18be",class:"sd-textarea__content"},a("textarea",{key:"a5f0d448791be4b75388c02e8a356486c0487d78",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-UkSGSWSA.js";import{d as n}from"./p-BOrdn-Js.js";import{d as h}from"./p-B4ua22vZ.js";import{d as c}from"./p-BnhzUsGP.js";import{d as u}from"./p-BckY1cBy.js";import{d as p}from"./p-C7sUn4qb.js";import{d as x}from"./p-DsGK3Aye.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:"007bdda5f38f94997c65f3542b4075a62c11a391",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:"536185bb53815baae7807a5d4708d9f0100c07c1",class:"sd-textarea__content"},a("textarea",{key:"144ae3ca78f8c3953bfef9951cb79952186b856c",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 +1 @@
1
- import{p as e,H as s,c as t,h as i,t as a}from"./p-CEVDmQdt.js";import{n as d}from"./p-CCwNgVmC.js";import{d as r,D as o,a as l}from"./p-h9_f4fUW.js";import{d as n}from"./p-C3rOud8J.js";import{d as h}from"./p-d3KpOGRC.js";import{d as c}from"./p-Dxye4-ZY.js";import{d as p}from"./p-DMvWCQfX.js";import{d as m}from"./p-BlN03Cqm.js";import{d as u}from"./p-BnhzUsGP.js";import{d as b}from"./p-BckY1cBy.js";import{d as g}from"./p-D8T1XeGP.js";import{d as f}from"./p-BGpxtouI.js";const k=e(class e extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=t(this,"sdUpdate",7),this.viewChange=t(this,"sdViewChange",7)}static CLOSE_ANIMATION_DURATION=150;get el(){return this}value=null;size="sm";placeholder="YYYY-MM-DD ~ YYYY-MM-DD";selectable;maxRange;disabled=!1;width="";label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";rules=[];error=!1;icon=void 0;labelTooltip="";labelTooltipProps=null;isOpen=!1;isAnimatingOut=!1;focused=!1;hovered=!1;update;viewChange;triggerRef;formField;closeAnimationTimer;name=d();watchIsOpen(e){this.focused=e}async sdValidate(){return this.formField?.sdValidate()}async sdReset(){return this.formField?.sdReset()}async sdResetValidate(){return this.formField?.sdResetValidation()}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),e.CLOSE_ANIMATION_DURATION))}handleTriggerClick=()=>{this.disabled||(this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0))};handleSelect=e=>{this.closeDropdown(),this.value=e.detail;const s=this.value;requestAnimationFrame((()=>{this.update.emit(s)}))};handleViewChange=e=>{this.viewChange.emit(e.detail)};get displayText(){return null==this.value||""===this.value[0]||""===this.value[1]?"":`${this.value[0]} ~ ${this.value[1]}`}disconnectedCallback(){this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e=l[this.size]??l.sm;return i("sd-field",{key:"00e25ab4608b5340b8be9e1dd19050968e34b758",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-system-size-field-sm-height":`${e.height}px`,"--sd-system-radius-field-sm":`${e.radius}px`,"--sd-system-color-field-border-default":o.border.default,"--sd-system-color-field-border-focus":o.border.focus,"--sd-system-color-field-bg-default":o.bg.default}},i("div",{key:"98179e2ec90e55f83e5deff6e36fc821fc103456",class:"sd-date-range-picker",ref:e=>{this.triggerRef=e}},i("sd-date-picker-trigger",{key:"fe123228a851da602f0a5a8929fc20782742a24b",displayText:this.displayText,placeholder:this.placeholder,disabled:this.disabled,size:this.size,onSdTriggerClick:this.handleTriggerClick})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"ee7eb14cc09fd067a8eeb9f19bd93178378d81b2",open:this.isOpen,parentRef:this.triggerRef,onSdClose:()=>this.closeDropdown()},i("sd-date-range-picker-calendar",{key:"8dc57a29f1ecd6811fb4538a96eea823dfebe080",value:this.value,selectable:this.selectable,maxRange:this.maxRange,onSdSelect:this.handleSelect,onSdViewChange:this.handleViewChange})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-date-range-picker{display:inline-flex}sd-date-range-picker sd-portal{display:none}sd-date-range-picker .sd-date-range-picker{position:relative;width:100%;height:100%}"}},[512,"sd-date-range-picker",{value:[1040],size:[513],placeholder:[513],selectable:[16],maxRange:[2,"max-range"],disabled:[516],width:[8],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],hint:[1],errorMessage:[1,"error-message"],rules:[16],error:[1028],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],name:[1],isOpen:[32],isAnimatingOut:[32],focused:[32],hovered:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function y(){"undefined"!=typeof customElements&&["sd-date-range-picker","sd-button","sd-date-picker-trigger","sd-date-range-picker-calendar","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-date-range-picker":customElements.get(a(e))||customElements.define(a(e),k);break;case"sd-button":customElements.get(a(e))||n();break;case"sd-date-picker-trigger":customElements.get(a(e))||r();break;case"sd-date-range-picker-calendar":customElements.get(a(e))||h();break;case"sd-field":customElements.get(a(e))||c();break;case"sd-floating-portal":customElements.get(a(e))||p();break;case"sd-ghost-button":customElements.get(a(e))||m();break;case"sd-icon":customElements.get(a(e))||u();break;case"sd-portal":customElements.get(a(e))||b();break;case"sd-tag":customElements.get(a(e))||g();break;case"sd-tooltip":customElements.get(a(e))||f()}}))}export{k as S,y as d}
1
+ import{p as e,H as s,c as t,h as i,t as a}from"./p-CEVDmQdt.js";import{n as d}from"./p-CCwNgVmC.js";import{d as r,D as o,a as l}from"./p-aYmWxyum.js";import{d as n}from"./p-C3rOud8J.js";import{d as h}from"./p-tSYcqBKN.js";import{d as c}from"./p-UkSGSWSA.js";import{d as p}from"./p-BOrdn-Js.js";import{d as m}from"./p-B4ua22vZ.js";import{d as u}from"./p-BnhzUsGP.js";import{d as b}from"./p-BckY1cBy.js";import{d as g}from"./p-C7sUn4qb.js";import{d as f}from"./p-DsGK3Aye.js";const k=e(class e extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=t(this,"sdUpdate",7),this.viewChange=t(this,"sdViewChange",7)}static CLOSE_ANIMATION_DURATION=150;get el(){return this}value=null;size="sm";placeholder="YYYY-MM-DD ~ YYYY-MM-DD";selectable;maxRange;disabled=!1;width="";label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";rules=[];error=!1;icon=void 0;labelTooltip="";labelTooltipProps=null;isOpen=!1;isAnimatingOut=!1;focused=!1;hovered=!1;update;viewChange;triggerRef;formField;closeAnimationTimer;name=d();watchIsOpen(e){this.focused=e}async sdValidate(){return this.formField?.sdValidate()}async sdReset(){return this.formField?.sdReset()}async sdResetValidate(){return this.formField?.sdResetValidation()}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),e.CLOSE_ANIMATION_DURATION))}handleTriggerClick=()=>{this.disabled||(this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0))};handleSelect=e=>{this.closeDropdown(),this.value=e.detail;const s=this.value;requestAnimationFrame((()=>{this.update.emit(s)}))};handleViewChange=e=>{this.viewChange.emit(e.detail)};get displayText(){return null==this.value||""===this.value[0]||""===this.value[1]?"":`${this.value[0]} ~ ${this.value[1]}`}disconnectedCallback(){this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e=l[this.size]??l.sm;return i("sd-field",{key:"00e25ab4608b5340b8be9e1dd19050968e34b758",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-system-size-field-sm-height":`${e.height}px`,"--sd-system-radius-field-sm":`${e.radius}px`,"--sd-system-color-field-border-default":o.border.default,"--sd-system-color-field-border-focus":o.border.focus,"--sd-system-color-field-bg-default":o.bg.default}},i("div",{key:"98179e2ec90e55f83e5deff6e36fc821fc103456",class:"sd-date-range-picker",ref:e=>{this.triggerRef=e}},i("sd-date-picker-trigger",{key:"fe123228a851da602f0a5a8929fc20782742a24b",displayText:this.displayText,placeholder:this.placeholder,disabled:this.disabled,size:this.size,onSdTriggerClick:this.handleTriggerClick})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"ee7eb14cc09fd067a8eeb9f19bd93178378d81b2",open:this.isOpen,parentRef:this.triggerRef,onSdClose:()=>this.closeDropdown()},i("sd-date-range-picker-calendar",{key:"8dc57a29f1ecd6811fb4538a96eea823dfebe080",value:this.value,selectable:this.selectable,maxRange:this.maxRange,onSdSelect:this.handleSelect,onSdViewChange:this.handleViewChange})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-date-range-picker{display:inline-flex}sd-date-range-picker sd-portal{display:none}sd-date-range-picker .sd-date-range-picker{position:relative;width:100%;height:100%}"}},[512,"sd-date-range-picker",{value:[1040],size:[513],placeholder:[513],selectable:[16],maxRange:[2,"max-range"],disabled:[516],width:[8],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],hint:[1],errorMessage:[1,"error-message"],rules:[16],error:[1028],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],name:[1],isOpen:[32],isAnimatingOut:[32],focused:[32],hovered:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function y(){"undefined"!=typeof customElements&&["sd-date-range-picker","sd-button","sd-date-picker-trigger","sd-date-range-picker-calendar","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-date-range-picker":customElements.get(a(e))||customElements.define(a(e),k);break;case"sd-button":customElements.get(a(e))||n();break;case"sd-date-picker-trigger":customElements.get(a(e))||r();break;case"sd-date-range-picker-calendar":customElements.get(a(e))||h();break;case"sd-field":customElements.get(a(e))||c();break;case"sd-floating-portal":customElements.get(a(e))||p();break;case"sd-ghost-button":customElements.get(a(e))||m();break;case"sd-icon":customElements.get(a(e))||u();break;case"sd-portal":customElements.get(a(e))||b();break;case"sd-tag":customElements.get(a(e))||g();break;case"sd-tooltip":customElements.get(a(e))||f()}}))}export{k as S,y as d}
@@ -1 +1 @@
1
- import{p as t,H as e,c as s,h as o,t as i}from"./p-CEVDmQdt.js";import{d as n}from"./p-BnhzUsGP.js";import{d as a}from"./p-BckY1cBy.js";import{d}from"./p-D8T1XeGP.js";var r={size:"16",icon:"12"},c={size:"24",icon:"16"},b={size:"28",icon:"20"},h={size:"36",icon:"24"},u={size:"62",icon:"32"},l={sm:"4",md:"6"},g={opacity:"5%"},m={disabled:"#BBBBBB"},p={content:"#888888",hover:{bg:"#222222"}},f={content:"#E30000",hover:{bg:"#E30000"}},v={content:"#025497",hover:{bg:"#0075FF"}},x={content:"#FFFFFF",disabled:"#E1E1E1",hover:{bg:"#FFFFFF"}};const y={xxs:{size:Number(r.size),icon:Number(r.icon)},xs:{size:Number(c.size),icon:Number(c.icon)},sm:{size:Number(b.size),icon:Number(b.icon)},md:{size:Number(h.size),icon:Number(h.icon)},lg:{size:Number(u.size),icon:Number(u.icon)}},z={xxs:Number(l.sm),xs:Number(l.sm),sm:Number(l.sm),md:Number(l.md),lg:Number(l.md)},F=g.opacity,k={default:p.content,danger:f.content,action:v.content,inverse:x.content},E={default:p.hover.bg,danger:f.hover.bg,action:v.hover.bg,inverse:x.hover.bg},N=m.disabled,B={default:N,danger:N,action:N,inverse:x.disabled},w=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.click=s(this,"sdClick",7)}icon;size="sm";intent="default";ariaLabel="";tooltipText;disabled=!1;get hostEl(){return this}isTooltipOpen=!1;click;hasWarnedMissingAriaLabel=!1;componentWillLoad(){this.size??="sm",this.intent??="default",this.ariaLabel??=""}handleClick=t=>{this.disabled?t.preventDefault():this.click.emit(t)};handleMouseEnter=()=>{this.isTooltipOpen=!0};handleMouseLeave=()=>{this.isTooltipOpen=!1};handleFocus=()=>{this.isTooltipOpen=!0};handleBlur=()=>{this.isTooltipOpen=!1};componentWillRender(){this.warnIfMissingAriaLabel()}warnIfMissingAriaLabel(){""===(this.ariaLabel??"").trim()?this.hasWarnedMissingAriaLabel||(console.warn(`[sd-ghost-button] icon-only buttons require \`ariaLabel\`. Received icon="${this.icon}".`),this.hasWarnedMissingAriaLabel=!0):this.hasWarnedMissingAriaLabel=!1}render(){const t=this.size??"sm",e=this.intent??"default",s=y[t]??y.sm,i=this.disabled?B[e]:k[e],n=(this.ariaLabel??"").trim()||void 0,a=(this.tooltipText??"").trim();return o("button",{key:"9d2d352d36c7c34c67d8c57de6236d72727bd078",class:{"sd-ghost-button":!0,"sd-ghost-button--disabled":this.disabled},type:"button","aria-disabled":this.disabled?"true":void 0,tabIndex:this.disabled?-1:void 0,"aria-label":n,style:{"--sd-ghost-button-size":`${s.size}px`,"--sd-ghost-button-radius":`${z[t]}px`,"--sd-ghost-button-hover-bg":E[e],"--sd-ghost-button-hover-opacity":F,"--sd-ghost-button-accent":"#0075FF"},onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur},a.length>0&&this.isTooltipOpen&&o("sd-portal",{key:"1a73fb53be28a622d03e4f20be0b30e0e76bccd4",parentRef:this.hostEl,open:!0,offset:[s.size/2,4],placement:"top"},o("div",{key:"e4a349dbfbf2fd16eed9a46f5e2ed43935212cfe",class:"sd-ghost-button__tooltip-inner","aria-hidden":"true"},o("sd-tag",{key:"4aa1525a6da6ee72daf1815f1440d665bd1cf2c8",name:"square_xs_grey",label:a}))),o("sd-icon",{key:"4caac22d0d888c1998032697043e3a3761e012aa",name:this.icon,size:s.icon,color:i}))}static get style(){return'sd-ghost-button{display:inline-flex;width:fit-content;height:fit-content}.sd-ghost-button{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--sd-ghost-button-size);height:var(--sd-ghost-button-size);padding:0;border:none;border-radius:var(--sd-ghost-button-radius);background:transparent;cursor:pointer;box-sizing:border-box;transition:box-shadow 0.2s ease;-webkit-user-select:none;user-select:none}.sd-ghost-button::before{content:"";position:absolute;inset:0;border-radius:inherit;background:var(--sd-ghost-button-hover-bg);opacity:0;transition:opacity 0.2s ease;pointer-events:none}.sd-ghost-button:hover:not(.sd-ghost-button--disabled)::before{opacity:var(--sd-ghost-button-hover-opacity)}.sd-ghost-button:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-ghost-button-accent)}.sd-ghost-button--disabled{cursor:not-allowed}.sd-ghost-button__tooltip-inner{display:inline-flex;white-space:nowrap;transform:translateX(-50%)}[data-align=right] .sd-ghost-button__tooltip-inner{transform:none}'}},[512,"sd-ghost-button",{icon:[1],size:[1],intent:[1],ariaLabel:[1,"aria-label"],tooltipText:[1,"tooltip-text"],disabled:[4],isTooltipOpen:[32]}]);function L(){"undefined"!=typeof customElements&&["sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-ghost-button":customElements.get(i(t))||customElements.define(i(t),w);break;case"sd-icon":customElements.get(i(t))||n();break;case"sd-portal":customElements.get(i(t))||a();break;case"sd-tag":customElements.get(i(t))||d()}}))}export{w as S,L as d}
1
+ import{p as t,H as e,c as s,h as o,t as i}from"./p-CEVDmQdt.js";import{d as n}from"./p-BnhzUsGP.js";import{d as a}from"./p-BckY1cBy.js";import{d}from"./p-C7sUn4qb.js";var r={size:"16",icon:"12"},b={size:"24",icon:"16"},c={size:"28",icon:"20"},h={size:"36",icon:"24"},u={size:"62",icon:"32"},l={sm:"4",md:"6"},g={opacity:"5%"},m={disabled:"#BBBBBB"},p={content:"#888888",hover:{bg:"#222222"}},f={content:"#E30000",hover:{bg:"#E30000"}},v={content:"#025497",hover:{bg:"#0075FF"}},x={content:"#FFFFFF",disabled:"#E1E1E1",hover:{bg:"#FFFFFF"}};const y={xxs:{size:Number(r.size),icon:Number(r.icon)},xs:{size:Number(b.size),icon:Number(b.icon)},sm:{size:Number(c.size),icon:Number(c.icon)},md:{size:Number(h.size),icon:Number(h.icon)},lg:{size:Number(u.size),icon:Number(u.icon)}},z={xxs:Number(l.sm),xs:Number(l.sm),sm:Number(l.sm),md:Number(l.md),lg:Number(l.md)},F=g.opacity,k={default:p.content,danger:f.content,action:v.content,inverse:x.content},E={default:p.hover.bg,danger:f.hover.bg,action:v.hover.bg,inverse:x.hover.bg},N=m.disabled,B={default:N,danger:N,action:N,inverse:x.disabled},w=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.click=s(this,"sdClick",7)}icon;size="sm";intent="default";ariaLabel="";tooltipText;disabled=!1;get hostEl(){return this}isTooltipOpen=!1;click;hasWarnedMissingAriaLabel=!1;componentWillLoad(){this.size??="sm",this.intent??="default",this.ariaLabel??=""}handleClick=t=>{this.disabled?t.preventDefault():this.click.emit(t)};handleMouseEnter=()=>{this.isTooltipOpen=!0};handleMouseLeave=()=>{this.isTooltipOpen=!1};handleFocus=()=>{this.isTooltipOpen=!0};handleBlur=()=>{this.isTooltipOpen=!1};componentWillRender(){this.warnIfMissingAriaLabel()}warnIfMissingAriaLabel(){""===(this.ariaLabel??"").trim()?this.hasWarnedMissingAriaLabel||(console.warn(`[sd-ghost-button] icon-only buttons require \`ariaLabel\`. Received icon="${this.icon}".`),this.hasWarnedMissingAriaLabel=!0):this.hasWarnedMissingAriaLabel=!1}render(){const t=this.size??"sm",e=this.intent??"default",s=y[t]??y.sm,i=this.disabled?B[e]:k[e],n=(this.ariaLabel??"").trim()||void 0,a=(this.tooltipText??"").trim();return o("button",{key:"9d2d352d36c7c34c67d8c57de6236d72727bd078",class:{"sd-ghost-button":!0,"sd-ghost-button--disabled":this.disabled},type:"button","aria-disabled":this.disabled?"true":void 0,tabIndex:this.disabled?-1:void 0,"aria-label":n,style:{"--sd-ghost-button-size":`${s.size}px`,"--sd-ghost-button-radius":`${z[t]}px`,"--sd-ghost-button-hover-bg":E[e],"--sd-ghost-button-hover-opacity":F,"--sd-ghost-button-accent":"#0075FF"},onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur},a.length>0&&this.isTooltipOpen&&o("sd-portal",{key:"1a73fb53be28a622d03e4f20be0b30e0e76bccd4",parentRef:this.hostEl,open:!0,offset:[s.size/2,4],placement:"top"},o("div",{key:"e4a349dbfbf2fd16eed9a46f5e2ed43935212cfe",class:"sd-ghost-button__tooltip-inner","aria-hidden":"true"},o("sd-tag",{key:"4aa1525a6da6ee72daf1815f1440d665bd1cf2c8",name:"square_xs_grey",label:a}))),o("sd-icon",{key:"4caac22d0d888c1998032697043e3a3761e012aa",name:this.icon,size:s.icon,color:i}))}static get style(){return'sd-ghost-button{display:inline-flex;width:fit-content;height:fit-content}.sd-ghost-button{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--sd-ghost-button-size);height:var(--sd-ghost-button-size);padding:0;border:none;border-radius:var(--sd-ghost-button-radius);background:transparent;cursor:pointer;box-sizing:border-box;transition:box-shadow 0.2s ease;-webkit-user-select:none;user-select:none}.sd-ghost-button::before{content:"";position:absolute;inset:0;border-radius:inherit;background:var(--sd-ghost-button-hover-bg);opacity:0;transition:opacity 0.2s ease;pointer-events:none}.sd-ghost-button:hover:not(.sd-ghost-button--disabled)::before{opacity:var(--sd-ghost-button-hover-opacity)}.sd-ghost-button:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-ghost-button-accent)}.sd-ghost-button--disabled{cursor:not-allowed}.sd-ghost-button__tooltip-inner{display:inline-flex;white-space:nowrap;transform:translateX(-50%)}[data-align=right] .sd-ghost-button__tooltip-inner{transform:none}'}},[512,"sd-ghost-button",{icon:[1],size:[1],intent:[1],ariaLabel:[1,"aria-label"],tooltipText:[1,"tooltip-text"],disabled:[4],isTooltipOpen:[32]}]);function L(){"undefined"!=typeof customElements&&["sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-ghost-button":customElements.get(i(t))||customElements.define(i(t),w);break;case"sd-icon":customElements.get(i(t))||n();break;case"sd-portal":customElements.get(i(t))||a();break;case"sd-tag":customElements.get(i(t))||d()}}))}export{w as S,L as d}
@@ -1 +1 @@
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-BlN03Cqm.js";import{d as o}from"./p-BnhzUsGP.js";import{d as h}from"./p-BckY1cBy.js";import{d as g}from"./p-D8T1XeGP.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:"317beb7cdffbba8982306539441fec46e6330d82",class:{"sd-calendar":!0,"sd-calendar--elevated":this.elevated},style:e},n("div",{key:"0d9e1084ee0bff994b4a00b7f2d490c0e101aa16",class:"sd-calendar__header"},n("div",{key:"8d82438f1820721fcbcd14cf42c1ae00b3a517d9",class:"sd-calendar__nav-group"},n("sd-ghost-button",{key:"4e3391c57c0fdf3ad95b82d82c7a130c3202229d",ariaLabel:"prevYear",size:"xxs",icon:"chevronLeft",onClick:this.goPrevYear}),n("span",{key:"6a7cbfb0069dd1d29e195cc09a9c55a8ae52aa40",class:"sd-calendar__label"},this.currentYear),n("sd-ghost-button",{key:"239d5e623f830e8ceeb069e78126175772af48de",ariaLabel:"nextYear",size:"xxs",icon:"chevronRight",onClick:this.goNextYear})),n("span",{key:"24362199d36afc204eebe5c5f14a41705f6782d9",class:"sd-calendar__divider","aria-hidden":"true"}),n("div",{key:"7aa04fa1fbb355d8b3fae4cca011999b4f7f5850",class:"sd-calendar__nav-group sd-calendar__nav-group-month"},n("sd-ghost-button",{key:"ea5d0129d4f7eecaeff5793460363e2f15c238b8",ariaLabel:"prevMonth",size:"xxs",icon:"chevronLeft",onClick:this.goPrevMonth}),n("span",{key:"7a3879edb74cb71c46fc500d7c230c21e19042c4",class:"sd-calendar__label sd-calendar__label-month"},this.currentMonth,"월"),n("sd-ghost-button",{key:"7532053f6607d9e4940403f22fd32994128fc457",ariaLabel:"nextMonth",size:"xxs",icon:"chevronRight",onClick:this.goNextMonth}))),n("div",{key:"ef59638defed69c325e49fc71ca0cc73a7d778bf",class:"sd-calendar__week"},s.map((e=>n("span",{key:e,class:"sd-calendar__week-cell"},e)))),n("div",{key:"0205b10254c75567336bc7e4ed8a26d2227ecb33",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:"a06b1cd9ec93891e3762f6334949cd23b643290f",class:"sd-calendar__divider-bottom","aria-hidden":"true"}),n("div",{key:"8dc6bd2495ab471b56ed6fa252c9e0ad5ebe8341",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-B4ua22vZ.js";import{d as o}from"./p-BnhzUsGP.js";import{d as h}from"./p-BckY1cBy.js";import{d as g}from"./p-C7sUn4qb.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:"317beb7cdffbba8982306539441fec46e6330d82",class:{"sd-calendar":!0,"sd-calendar--elevated":this.elevated},style:e},n("div",{key:"0d9e1084ee0bff994b4a00b7f2d490c0e101aa16",class:"sd-calendar__header"},n("div",{key:"8d82438f1820721fcbcd14cf42c1ae00b3a517d9",class:"sd-calendar__nav-group"},n("sd-ghost-button",{key:"4e3391c57c0fdf3ad95b82d82c7a130c3202229d",ariaLabel:"prevYear",size:"xxs",icon:"chevronLeft",onClick:this.goPrevYear}),n("span",{key:"6a7cbfb0069dd1d29e195cc09a9c55a8ae52aa40",class:"sd-calendar__label"},this.currentYear),n("sd-ghost-button",{key:"239d5e623f830e8ceeb069e78126175772af48de",ariaLabel:"nextYear",size:"xxs",icon:"chevronRight",onClick:this.goNextYear})),n("span",{key:"24362199d36afc204eebe5c5f14a41705f6782d9",class:"sd-calendar__divider","aria-hidden":"true"}),n("div",{key:"7aa04fa1fbb355d8b3fae4cca011999b4f7f5850",class:"sd-calendar__nav-group sd-calendar__nav-group-month"},n("sd-ghost-button",{key:"ea5d0129d4f7eecaeff5793460363e2f15c238b8",ariaLabel:"prevMonth",size:"xxs",icon:"chevronLeft",onClick:this.goPrevMonth}),n("span",{key:"7a3879edb74cb71c46fc500d7c230c21e19042c4",class:"sd-calendar__label sd-calendar__label-month"},this.currentMonth,"월"),n("sd-ghost-button",{key:"7532053f6607d9e4940403f22fd32994128fc457",ariaLabel:"nextMonth",size:"xxs",icon:"chevronRight",onClick:this.goNextMonth}))),n("div",{key:"ef59638defed69c325e49fc71ca0cc73a7d778bf",class:"sd-calendar__week"},s.map((e=>n("span",{key:e,class:"sd-calendar__week-cell"},e)))),n("div",{key:"0205b10254c75567336bc7e4ed8a26d2227ecb33",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:"a06b1cd9ec93891e3762f6334949cd23b643290f",class:"sd-calendar__divider-bottom","aria-hidden":"true"}),n("div",{key:"8dc6bd2495ab471b56ed6fa252c9e0ad5ebe8341",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 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 l}from"./p-C3rOud8J.js";import{d as h}from"./p-D3dq5pt5.js";import{d as a}from"./p-Dxye4-ZY.js";import{d}from"./p-DMvWCQfX.js";import{d as n}from"./p-BlN03Cqm.js";import{d as c}from"./p-BnhzUsGP.js";import{d as p}from"./p-BckY1cBy.js";import{d as u}from"./p-CtNDxhxx.js";import{d as m}from"./p-CNwoxvpg.js";import{d as b}from"./p-BZUlNC0d.js";import{d as f}from"./p-PMD-Col0.js";import{d as g}from"./p-D8T1XeGP.js";import{d as w}from"./p-BGpxtouI.js";const x=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),h=Math.max(e.top-s-i,0),a=Math.max(l,h),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:"5dceeb2361339527e65657f66966a5b843f7a03b",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:"2fe78a384fef6083a08709fa72d98d2b2e399580",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"be647e0ba29295be5a888d92cb18c273980ec38f",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:"2d519a9957ff7201519502a2053785cc669642c2",...e},i("sd-select-listbox",{key:"33377475b06c3be1f6ba7e6909a9bfb938144b3a",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),x);break;case"sd-button":customElements.get(o(t))||l();break;case"sd-checkbox":customElements.get(o(t))||h();break;case"sd-field":customElements.get(o(t))||a();break;case"sd-floating-portal":customElements.get(o(t))||d();break;case"sd-ghost-button":customElements.get(o(t))||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{x as 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 a}from"./p-C3rOud8J.js";import{d as l}from"./p-D3dq5pt5.js";import{d as h}from"./p-UkSGSWSA.js";import{d}from"./p-BOrdn-Js.js";import{d as n}from"./p-B4ua22vZ.js";import{d as c}from"./p-BnhzUsGP.js";import{d as p}from"./p-BckY1cBy.js";import{d as u}from"./p-C7sPq8UM.js";import{d as m}from"./p-JamWHNrr.js";import{d as b}from"./p-DPotN1QM.js";import{d as g}from"./p-BGIwu6m1.js";import{d as f}from"./p-C7sUn4qb.js";import{d as w}from"./p-DsGK3Aye.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),a=Math.max(window.innerHeight-e.bottom-s-i,0),l=Math.max(e.top-s-i,0),h=Math.max(a,l),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:"dd5f5142ec0a6ba80a67b544543c592c4492246b",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:"2069d25c1739610ee4bf8652da9a10bc149b0bc3",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"b9b332bee38e449802be1b6a2c4b02a8243aa220",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:"fba3b55ec6c0d7fa9afe2d0ac8d41ba85ad62e6b",...e},i("sd-select-listbox",{key:"ad505ebdcb6a2f27083520877e42eccf4aeacbc3",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))||a();break;case"sd-checkbox":customElements.get(o(t))||l();break;case"sd-field":customElements.get(o(t))||h();break;case"sd-floating-portal":customElements.get(o(t))||d();break;case"sd-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))||g();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 s,c as t,h as r,t as i}from"./p-CEVDmQdt.js";import{i as g,h as d,j as o,k as l}from"./p-DvvGi4J_.js";import{s as c}from"./p-BE4tnQ2Z.js";import{d as n}from"./p-BnhzUsGP.js";const a=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.triggerClick=t(this,"sdTriggerClick",7),this.triggerFocus=t(this,"sdTriggerFocus",7),this.triggerBlur=t(this,"sdTriggerBlur",7)}displayText="";placeholder="선택";disabled=!1;isOpen=!1;triggerClick;triggerFocus;triggerBlur;triggerEl;async sdFocus(){this.disabled||this.triggerEl?.focus()}handleClick=()=>{this.disabled||this.triggerClick.emit()};handleFocus=()=>{this.triggerFocus.emit()};handleBlur=()=>{this.triggerBlur.emit()};render(){const e=""!==this.displayText;return r("div",{key:"bd967efa32ed0692512e549db9f852c7c08d5dcd",ref:e=>{this.triggerEl=e},role:"button","aria-haspopup":"listbox","aria-expanded":this.isOpen?"true":"false",tabindex:this.disabled?-1:0,class:{"sd-select-trigger":!0,"sd-select-trigger--open":this.isOpen,"sd-select-trigger--disabled":this.disabled},style:{"--trigger-padding-x":`${l.paddingX}px`,"--trigger-gap":`${l.gap}px`,"--trigger-font-size":`${o.fontSize}px`,"--trigger-line-height":`${o.lineHeight}px`,"--trigger-font-weight":o.fontWeight,"--trigger-color":this.disabled?d.text.disabled:e?d.text.default:d.icon.default,"--trigger-icon-color":this.disabled?d.icon.disabled:d.icon.default},onClick:this.handleClick,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())},onFocus:this.handleFocus,onBlur:this.handleBlur},r("div",{key:"04a8568ac5d109f0635d3474a394030d630f441e",class:"sd-select-trigger__content"},e&&g(this.displayText)?r("span",{class:"sd-select-trigger__text",ref:e=>e&&(e.innerHTML=c(this.displayText))}):r("span",{class:"sd-select-trigger__text"},e?this.displayText:this.placeholder??"선택"),r("sd-icon",{key:"ba256d1a780f7805c81330a6ba4e010c458be57e",name:"chevronDown",size:12,color:"var(--trigger-icon-color)",class:{"sd-select-trigger__icon":!0,"sd-select-trigger__icon--open":this.isOpen}})))}static get style(){return"sd-select-trigger{display:block;width:100%;height:100%}sd-select-trigger .sd-select-trigger{display:flex;width:100%;height:100%;cursor:pointer;user-select:none;overflow:hidden;border-radius:3px}sd-select-trigger .sd-select-trigger--disabled{cursor:not-allowed}sd-select-trigger .sd-select-trigger__content{display:flex;align-items:center;gap:var(--trigger-gap);flex:1;padding:0 var(--trigger-padding-x);min-width:0}sd-select-trigger .sd-select-trigger__text{flex:1;font-size:var(--trigger-font-size);line-height:var(--trigger-line-height);font-weight:var(--trigger-font-weight);color:var(--trigger-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-trigger .sd-select-trigger__icon{flex-shrink:0;transition:transform 0.2s ease}sd-select-trigger .sd-select-trigger__icon--open{transform:rotate(180deg)}"}},[512,"sd-select-trigger",{displayText:[1,"display-text"],placeholder:[1],disabled:[4],isOpen:[4,"is-open"],sdFocus:[64]}]);function h(){"undefined"!=typeof customElements&&["sd-select-trigger","sd-icon"].forEach((e=>{switch(e){case"sd-select-trigger":customElements.get(i(e))||customElements.define(i(e),a);break;case"sd-icon":customElements.get(i(e))||n()}}))}export{a as S,h as d}
1
+ import{p as e,H as s,c as t,h as r,t as i}from"./p-CEVDmQdt.js";import{i as g,h as o,j as d,k as l}from"./p-DvvGi4J_.js";import{s as c}from"./p-BE4tnQ2Z.js";import{d as a}from"./p-BnhzUsGP.js";const n=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.triggerClick=t(this,"sdTriggerClick",7),this.triggerFocus=t(this,"sdTriggerFocus",7),this.triggerBlur=t(this,"sdTriggerBlur",7)}displayText="";placeholder="선택";disabled=!1;isOpen=!1;triggerClick;triggerFocus;triggerBlur;triggerEl;async sdFocus(){this.disabled||this.triggerEl?.focus()}handleClick=()=>{this.disabled||this.triggerClick.emit()};handleFocus=()=>{this.triggerFocus.emit()};handleBlur=()=>{this.triggerBlur.emit()};render(){const e=""!==this.displayText;return r("div",{key:"0c3e197cd8a238a979ee6d794a607e07585b2025",ref:e=>{this.triggerEl=e},role:"button","aria-haspopup":"listbox","aria-expanded":this.isOpen?"true":"false",tabindex:this.disabled?-1:0,class:{"sd-select-trigger":!0,"sd-select-trigger--open":this.isOpen,"sd-select-trigger--disabled":this.disabled},style:{"--trigger-padding-x":`${l.paddingX}px`,"--trigger-gap":`${l.gap}px`,"--trigger-font-size":`${d.fontSize}px`,"--trigger-line-height":`${d.lineHeight}px`,"--trigger-font-weight":d.fontWeight,"--trigger-color":this.disabled?o.text.disabled:e?o.text.default:o.icon.default,"--trigger-icon-color":this.disabled?o.icon.disabled:o.icon.default},onClick:this.handleClick,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())},onFocus:this.handleFocus,onBlur:this.handleBlur},r("div",{key:"4c068fb6a6784bde01669b7a5ad30d91dc358dd3",class:"sd-select-trigger__content"},e&&g(this.displayText)?r("span",{class:"sd-select-trigger__text",ref:e=>e&&(e.innerHTML=c(this.displayText))}):r("span",{class:"sd-select-trigger__text"},e?this.displayText:this.placeholder??"선택"),r("sd-icon",{key:"7172c372c2864574ca6ab0f726a0af091a3d0110",name:"chevronDown",size:12,color:"var(--trigger-icon-color)",class:{"sd-select-trigger__icon":!0,"sd-select-trigger__icon--open":this.isOpen}})))}static get style(){return"sd-select-trigger{display:block;width:100%;height:100%}sd-select-trigger .sd-select-trigger{display:flex;width:100%;height:100%;cursor:pointer;user-select:none;overflow:hidden;border-radius:3px}sd-select-trigger .sd-select-trigger--disabled{cursor:not-allowed}sd-select-trigger .sd-select-trigger__content{display:flex;align-items:center;gap:var(--trigger-gap);flex:1;padding:0 var(--trigger-padding-x);min-width:0}sd-select-trigger .sd-select-trigger__text{flex:1;font-size:var(--trigger-font-size);line-height:var(--trigger-line-height);font-weight:var(--trigger-font-weight);color:var(--trigger-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-trigger .sd-select-trigger__icon{flex-shrink:0;transition:transform 0.2s ease}sd-select-trigger .sd-select-trigger__icon--open{transform:rotate(180deg)}"}},[512,"sd-select-trigger",{displayText:[1,"display-text"],placeholder:[1],disabled:[4],isOpen:[4,"is-open"],sdFocus:[64]}]);function h(){"undefined"!=typeof customElements&&["sd-select-trigger","sd-icon"].forEach((e=>{switch(e){case"sd-select-trigger":customElements.get(i(e))||customElements.define(i(e),n);break;case"sd-icon":customElements.get(i(e))||a()}}))}export{n as S,h as d}