@sellmate/design-system 1.25.1 → 1.26.1

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 (194) 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-chip-input.cjs.entry.js +48 -31
  5. package/dist/cjs/sd-circle-progress.cjs.entry.js +1 -1
  6. package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +3 -3
  7. package/dist/cjs/sd-date-picker_7.cjs.entry.js +9 -9
  8. package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +1 -1
  9. package/dist/cjs/sd-divider.cjs.entry.js +1 -1
  10. package/dist/cjs/sd-field_3.cjs.entry.js +7 -7
  11. package/dist/cjs/sd-ghost-button_3.cjs.entry.js +12 -4
  12. package/dist/cjs/sd-linear-progress.cjs.entry.js +1 -1
  13. package/dist/cjs/sd-loading-container.cjs.entry.js +2 -2
  14. package/dist/cjs/sd-pagination_4.cjs.entry.js +8 -8
  15. package/dist/cjs/sd-popup.cjs.entry.js +1 -1
  16. package/dist/cjs/sd-select-list-item_2.cjs.entry.js +6 -6
  17. package/dist/cjs/sd-select_3.cjs.entry.js +8 -8
  18. package/dist/cjs/sd-switch.cjs.entry.js +1 -1
  19. package/dist/cjs/sd-table.cjs.entry.js +6 -6
  20. package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
  21. package/dist/cjs/sd-td.cjs.entry.js +1 -1
  22. package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
  23. package/dist/cjs/sd-toast.cjs.entry.js +2 -2
  24. package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
  25. package/dist/collection/components/sd-chip-input/sd-chip-input.css +3 -0
  26. package/dist/collection/components/sd-chip-input/sd-chip-input.js +66 -30
  27. package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
  28. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +2 -2
  29. package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +2 -2
  30. package/dist/collection/components/sd-date-picker/sd-date-picker.js +2 -2
  31. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +1 -1
  32. package/dist/collection/components/sd-divider/sd-divider.js +1 -1
  33. package/dist/collection/components/sd-field/sd-field.js +4 -4
  34. package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
  35. package/dist/collection/components/sd-input/sd-input.js +2 -2
  36. package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
  37. package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
  38. package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
  39. package/dist/collection/components/sd-number-input/sd-number-input.js +4 -4
  40. package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
  41. package/dist/collection/components/sd-popup/sd-popup.js +1 -1
  42. package/dist/collection/components/sd-portal/sd-portal.js +1 -1
  43. package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +2 -2
  44. package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +4 -4
  45. package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +2 -2
  46. package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +2 -2
  47. package/dist/collection/components/sd-select/sd-select.js +4 -4
  48. package/dist/collection/components/sd-switch/sd-switch.js +1 -1
  49. package/dist/collection/components/sd-table/sd-table.js +6 -6
  50. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +2 -2
  51. package/dist/collection/components/sd-table/sd-td/sd-td.js +1 -1
  52. package/dist/collection/components/sd-table/sd-thead/sd-thead.js +3 -3
  53. package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
  54. package/dist/collection/components/sd-tag/sd-tag.css +2 -1
  55. package/dist/collection/components/sd-tag/sd-tag.js +31 -3
  56. package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
  57. package/dist/collection/components/sd-toast/sd-toast.js +2 -2
  58. package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
  59. package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
  60. package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
  61. package/dist/components/{p-Dny4KukK.js → p-346Z6-KH.js} +1 -1
  62. package/dist/components/{p-BGpxtouI.js → p-B90EQBEX.js} +1 -1
  63. package/dist/components/{p-BuuIkYiY.js → p-BBRQlkBM.js} +1 -1
  64. package/dist/components/{p-PMD-Col0.js → p-BNxNJ3CK.js} +1 -1
  65. package/dist/components/{p-BZUlNC0d.js → p-BOTW76OV.js} +1 -1
  66. package/dist/components/{p-CtNDxhxx.js → p-BSnINeoq.js} +1 -1
  67. package/dist/components/{p-BoH7ykYx.js → p-BTWJkT9Y.js} +1 -1
  68. package/dist/components/{p-CQLezwlh.js → p-BVVYrEje.js} +1 -1
  69. package/dist/components/{p-BlN03Cqm.js → p-B_12VhSA.js} +1 -1
  70. package/dist/components/{p-BAsjJuJJ.js → p-BxiJsH7Z.js} +1 -1
  71. package/dist/components/{p-0U99W-3Z.js → p-C3rAloxT.js} +1 -1
  72. package/dist/components/{p-DBw58vNP.js → p-C4Vfr3RI.js} +1 -1
  73. package/dist/components/{p-B8uvCE1e.js → p-D6AroYk-.js} +1 -1
  74. package/dist/components/{p-CqivNcjh.js → p-D9tjoBhH.js} +1 -1
  75. package/dist/components/{p-CNwoxvpg.js → p-DGBRubiD.js} +1 -1
  76. package/dist/components/p-DLZRxIKh.js +1 -0
  77. package/dist/components/{p-d3KpOGRC.js → p-DUHiXyfJ.js} +1 -1
  78. package/dist/components/{p-BckY1cBy.js → p-DhgwAPO4.js} +1 -1
  79. package/dist/components/p-DiJvHjSG.js +1 -0
  80. package/dist/components/{p-1fgPu1BU.js → p-DlBZuGIN.js} +1 -1
  81. package/dist/components/{p-Dxye4-ZY.js → p-DlROb9xa.js} +1 -1
  82. package/dist/components/{p-BzrpKueg.js → p-DoJxhlz2.js} +1 -1
  83. package/dist/components/{p-h9_f4fUW.js → p-DsZ3vasC.js} +1 -1
  84. package/dist/components/{p-DpYG9T3S.js → p-Dz70SQco.js} +1 -1
  85. package/dist/components/{p-lGr865w2.js → p-UIytIOVz.js} +1 -1
  86. package/dist/components/{p-I-9rJnxk.js → p-c9mdxFTZ.js} +1 -1
  87. package/dist/components/{p-DMvWCQfX.js → p-h-EFBJM4.js} +1 -1
  88. package/dist/components/{p-BW-I-6Id.js → p-j1n74q9u.js} +1 -1
  89. package/dist/components/{p-DbbdfMAF.js → p-k89ztBz6.js} +1 -1
  90. package/dist/components/sd-action-modal.js +1 -1
  91. package/dist/components/sd-barcode-input.js +1 -1
  92. package/dist/components/sd-calendar.js +1 -1
  93. package/dist/components/sd-chip-input.js +1 -1
  94. package/dist/components/sd-chip.js +1 -1
  95. package/dist/components/sd-circle-progress.js +1 -1
  96. package/dist/components/sd-confirm-modal.js +1 -1
  97. package/dist/components/sd-date-picker-trigger.js +1 -1
  98. package/dist/components/sd-date-picker.js +1 -1
  99. package/dist/components/sd-date-range-picker-calendar.js +1 -1
  100. package/dist/components/sd-date-range-picker.js +1 -1
  101. package/dist/components/sd-divider.js +1 -1
  102. package/dist/components/sd-dropdown-button.js +1 -1
  103. package/dist/components/sd-field.js +1 -1
  104. package/dist/components/sd-file-picker.js +1 -1
  105. package/dist/components/sd-floating-portal.js +1 -1
  106. package/dist/components/sd-ghost-button.js +1 -1
  107. package/dist/components/sd-guide.js +1 -1
  108. package/dist/components/sd-input.js +1 -1
  109. package/dist/components/sd-key-value-table.js +1 -1
  110. package/dist/components/sd-linear-progress.js +1 -1
  111. package/dist/components/sd-loading-container.js +1 -1
  112. package/dist/components/sd-loading-modal.js +1 -1
  113. package/dist/components/sd-modal-container.js +1 -1
  114. package/dist/components/sd-number-input.js +1 -1
  115. package/dist/components/sd-pagination.js +1 -1
  116. package/dist/components/sd-popover.js +1 -1
  117. package/dist/components/sd-popup.js +1 -1
  118. package/dist/components/sd-portal.js +1 -1
  119. package/dist/components/sd-select-list-item-search.js +1 -1
  120. package/dist/components/sd-select-list-item.js +1 -1
  121. package/dist/components/sd-select-listbox.js +1 -1
  122. package/dist/components/sd-select-trigger.js +1 -1
  123. package/dist/components/sd-select.js +1 -1
  124. package/dist/components/sd-switch.js +1 -1
  125. package/dist/components/sd-table.js +1 -1
  126. package/dist/components/sd-tabs.js +1 -1
  127. package/dist/components/sd-tag.js +1 -1
  128. package/dist/components/sd-tbody.js +1 -1
  129. package/dist/components/sd-td.js +1 -1
  130. package/dist/components/sd-text-link.js +1 -1
  131. package/dist/components/sd-textarea.js +1 -1
  132. package/dist/components/sd-thead.js +1 -1
  133. package/dist/components/sd-toast-container.js +1 -1
  134. package/dist/components/sd-toast.js +1 -1
  135. package/dist/components/sd-toggle.js +1 -1
  136. package/dist/components/sd-tooltip.js +1 -1
  137. package/dist/design-system/design-system.esm.js +1 -1
  138. package/dist/design-system/{p-9ea2fbec.entry.js → p-0fcb6fb3.entry.js} +1 -1
  139. package/dist/design-system/{p-5a67c40d.entry.js → p-1680b427.entry.js} +1 -1
  140. package/dist/design-system/{p-f1e0ba30.entry.js → p-20bb91ed.entry.js} +1 -1
  141. package/dist/design-system/{p-84b415d7.entry.js → p-250b8e5d.entry.js} +1 -1
  142. package/dist/design-system/{p-8862e3e3.entry.js → p-25a11d7d.entry.js} +1 -1
  143. package/dist/design-system/{p-0d5d2723.entry.js → p-3064d7c6.entry.js} +1 -1
  144. package/dist/design-system/{p-6b20c76b.entry.js → p-352a72ef.entry.js} +1 -1
  145. package/dist/design-system/{p-43d521c4.entry.js → p-3f16f44b.entry.js} +1 -1
  146. package/dist/design-system/{p-a8d69ab2.entry.js → p-43c47cd5.entry.js} +1 -1
  147. package/dist/design-system/{p-cb63d4cf.entry.js → p-6e702726.entry.js} +1 -1
  148. package/dist/design-system/{p-c0198e3a.entry.js → p-7cf2305b.entry.js} +1 -1
  149. package/dist/design-system/{p-9afc1f7c.entry.js → p-89c8585f.entry.js} +1 -1
  150. package/dist/design-system/p-8be26652.entry.js +1 -0
  151. package/dist/design-system/{p-a505459f.entry.js → p-8c5451f2.entry.js} +1 -1
  152. package/dist/design-system/{p-3b71d1d4.entry.js → p-992f9509.entry.js} +1 -1
  153. package/dist/design-system/{p-74e605c0.entry.js → p-a0349edd.entry.js} +1 -1
  154. package/dist/design-system/p-a32704bc.entry.js +1 -0
  155. package/dist/design-system/{p-b4df75b9.entry.js → p-a76a8463.entry.js} +1 -1
  156. package/dist/design-system/{p-c7ff7bc8.entry.js → p-c4e0c490.entry.js} +1 -1
  157. package/dist/design-system/{p-a1438f7d.entry.js → p-eb1233ff.entry.js} +1 -1
  158. package/dist/design-system/p-f089fc54.entry.js +1 -0
  159. package/dist/design-system/{p-6f77fc76.entry.js → p-f910d33f.entry.js} +1 -1
  160. package/dist/esm/design-system.js +1 -1
  161. package/dist/esm/loader.js +1 -1
  162. package/dist/esm/sd-calendar_2.entry.js +2 -2
  163. package/dist/esm/sd-chip-input.entry.js +48 -31
  164. package/dist/esm/sd-circle-progress.entry.js +1 -1
  165. package/dist/esm/sd-confirm-modal_2.entry.js +3 -3
  166. package/dist/esm/sd-date-picker_7.entry.js +9 -9
  167. package/dist/esm/sd-date-range-picker-calendar.entry.js +1 -1
  168. package/dist/esm/sd-divider.entry.js +1 -1
  169. package/dist/esm/sd-field_3.entry.js +7 -7
  170. package/dist/esm/sd-ghost-button_3.entry.js +13 -5
  171. package/dist/esm/sd-linear-progress.entry.js +1 -1
  172. package/dist/esm/sd-loading-container.entry.js +2 -2
  173. package/dist/esm/sd-pagination_4.entry.js +8 -8
  174. package/dist/esm/sd-popup.entry.js +1 -1
  175. package/dist/esm/sd-select-list-item_2.entry.js +6 -6
  176. package/dist/esm/sd-select_3.entry.js +8 -8
  177. package/dist/esm/sd-switch.entry.js +1 -1
  178. package/dist/esm/sd-table.entry.js +6 -6
  179. package/dist/esm/sd-tabs.entry.js +1 -1
  180. package/dist/esm/sd-td.entry.js +1 -1
  181. package/dist/esm/sd-toast-container.entry.js +1 -1
  182. package/dist/esm/sd-toast.entry.js +2 -2
  183. package/dist/esm/sd-toggle.entry.js +1 -1
  184. package/dist/types/components/sd-chip-input/sd-chip-input.d.ts +3 -0
  185. package/dist/types/components/sd-tag/sd-tag.d.ts +3 -0
  186. package/dist/types/components.d.ts +20 -0
  187. package/hydrate/index.js +126 -99
  188. package/hydrate/index.mjs +126 -99
  189. package/package.json +1 -1
  190. package/dist/components/p-D6noGX38.js +0 -1
  191. package/dist/components/p-D8T1XeGP.js +0 -1
  192. package/dist/design-system/p-21d8f192.entry.js +0 -1
  193. package/dist/design-system/p-662ce409.entry.js +0 -1
  194. package/dist/design-system/p-ad822c82.entry.js +0 -1
@@ -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: 'd080b561e43c55d34a5f1f6571991183ebdd39b7', style: hostStyle }, h("div", { key: '0ef7831905dca8fde2bb8eb6cde81e1fd9706074', 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: 'c6a836574f4b4c3cd72a3718061dcf727d1ec823', 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: '8343d8c82c4575733254ad92c968fbbb1588af1f', 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: 'a6e049c2c1f5f825d874f25e184efb1915713074', class: "sd-table__loading", style: { top: `${this.loadingScrollTop}px` } }, h("sd-circle-progress", { key: 'ea110a9e185c3af02c9d0da3c2c36bd675952696', indeterminate: true }))), isNoData && (h(h.Fragment, null, h("div", { key: '56861d20b5bd57ed3f43f5774e67cc4ae7e6c947', class: "sd-table__no-data-header-overlay" }), h("div", { key: '19e463e0524b09ca72ba457b66f97dfd97fddf95', class: "sd-table__no-data" }, h("div", { key: 'ed0c669a55a562772d37d89f7f332759a73fbab6', 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: '06998e931804fb94b95df49a5c4b6c5976cefe41', name: "no-data" }, h("span", { key: '4f639ae85d63f516f593f2d88d788f96ba7c538f' }, this.resolvedNoDataLabel)))))), h("table", { key: 'a32058798111bfa84bf81279bcf424d2423cebfa', 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: '9d1c500b147c2b11ea2df7cb095d9b28527b6902', class: "sd-table__pagination" }, h("sd-pagination", { key: 'c476d8326991890de9fd82311b0c90f0d4b92bb0', 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: '275dfb2c4c3bb4c76ce71c123795d967aa155bf8', 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: 'e8d3873248658b9899e4daf1d6ffb1c60ad658e4', slot: `${this.tableId}-body` }, h("tbody", { key: 'ae9617a588e45bce5ffaa50bc300fdd038b1db1e', 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: '1bd8ca3179ad36584813c14e1df1c1c175fcf77b' }),
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: '28d45d8cd629c6cdd826834cbae719fd7c851511', class: { [`align-${this.align}`]: Boolean(this.align) } }, h("slot", { key: '0bab0005e4513464ad18698c111a55eb684434e9' })));
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: '89bb8a5873c480544cc6a298ca9738577469ae43', slot: `${this.tableId}-head`, style: headStyle }, h("thead", { key: '390aad02b5e42bc39c9eb72091b1bcb54eae8098', 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: 'a5889ed5b9fe810590f1c1d869aa6b72dabe195b', class: "tr" }, this._selectable && (h("th", { key: '8cf6b81cd5b02cf08597b1b4f8d1b858f10d9403', 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: '94b92d786fde6d5382e7955f97e54915597c04ad', value: this.getIsAllChecked(), disabled: safeRows.length === 0, onSdUpdate: (e) => this.handleSelectAll(e.detail) }), h("div", { key: 'fefd1a1de41b524e0525e60684bec2fb85ac9db6', 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: 'f43d5e2e441e11b57d488f8fe612a4e555006c2e', 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: '37bb1fefd51f583b0a9dde9fe46cf843a48e8e13', style: width != null ? { '--sd-tag-width': width } : undefined }, h("span", { key: 'e996471849834802eaeff02abaadee1a2addac4f', 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: '2e63073d1950046747521071ba5db5f9a404acef', 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: 'dfa331524cbbac728c961c7a27d6c8dbd83853f4', 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: 'bd2d6d4b537364e28992971279d3278021b1ab5a', class: "sd-textarea__content" }, h("textarea", { key: '270d55c84255a43153ed5f5cfdeed586c38d0cf1', 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: '3d7a3fe3647010a8a96246ef3cdbfdf1550c0a91', 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: 'a863ff763bced7656cedc69f3598b3371fc13059', class: "sd-toast", role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (h("div", { key: '7606930ad68ab81543a719db8abb61055fdaf97d', class: "sd-toast__icon" }, h("sd-icon", { key: '9b75fb05ab26ddab43b677482a026b5860613e07', name: this.icon, size: iconSize, color: iconColor }))), h("div", { key: '5fb10f690ad560f0be74b5bf6afd288318e22082', class: "sd-toast__content" }, h("span", { key: 'c474a5e1f215a19e47a89ba154f6149e0a875f61', class: "sd-toast__message" }, this.message)), this.link && (h("a", { key: 'a0dcbba791c123776ccb6de62e169359777b3bd2', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.buttonLabel && (h("sd-button", { key: 'b85f734cbe429207c028602b29bd5f7fa78f7910', class: "sd-toast__button", name: buttonName, label: this.buttonLabel, onSdClick: (event) => this.buttonClick.emit(event.detail) })), this.useClose && (h("sd-ghost-button", { key: '09cb6b946c18c1c079b036799272d7bc7bdb6480', 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: '1e9af4dd46dd901ba903518c1425ce0bc723e4b4', 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: 'b25e66cadfeee2714f137504ad49c8bf66622f60', class: this.toggleClasses, style: cssVars, "aria-label": this.label || 'toggle' }, this.label, h("input", { key: '276f7411899bcb14db93a6f2b93cc51b5363e1c9', 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: 'cd0c166191a9f83a11891786cd246a268d50b349' }, h("div", { key: '9e2872936629b886b779852c51f57874466edfb5', 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: '2db92e0d56a1a6cee04ab5f23f6bbe00fc279351', parentRef: anchorMode ? this.triggerEl : this.buttonEl, onSdClose: this.handleClose, placement: placement, offset: this.tooltipOffset }, h("div", { key: 'a4635141d3e9aa630be80b2b6071a5ba16de257d', 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: 'cf7f3186dd7c9cbf001700bd29de05480e807533', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${placement}` }, h(TooltipArrow, { key: '4aca7fbbc159bf61c9488a38431e0bcc40172446' })), h("div", { key: 'ffa09626b16742e6d774944bf8536def2b250519', class: "sd-floating-menu__content", innerHTML: bodyHTML }), this.useClose && (h("sd-ghost-button", { key: '934529cc6c8c4a46a09b7dd03baec6666029f169', 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 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 h}from"./p-C3rOud8J.js";import{d as l}from"./p-D3dq5pt5.js";import{d as a}from"./p-DlROb9xa.js";import{d}from"./p-h-EFBJM4.js";import{d as n}from"./p-B_12VhSA.js";import{d as c}from"./p-BnhzUsGP.js";import{d as p}from"./p-DhgwAPO4.js";import{d as u}from"./p-BSnINeoq.js";import{d as m}from"./p-DGBRubiD.js";import{d as f}from"./p-BOTW76OV.js";import{d as b}from"./p-BNxNJ3CK.js";import{d as g}from"./p-DiJvHjSG.js";import{d as w}from"./p-B90EQBEX.js";const O=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.dropDownShow=s(this,"sdDropDownShow",7)}static VIEWPORT_PADDING=20;static PORTAL_OFFSET_Y=4;static CLOSE_ANIMATION_DURATION=150;get el(){return this}type="default";value=null;options=[];placeholder="선택";dropdownWidth="";maxDropdownWidth="640px";dropdownHeight="260px";disabled=!1;label="";labelWidth="";addonLabel="";addonAlign="start";error=!1;hint="";errorMessage="";rules=[];icon=void 0;labelTooltip="";labelTooltipProps=null;emitValue=!1;width="";useSearch=!1;allSelectedLabel="전체";useSelectAll=!1;isOpen=!1;isAnimatingOut=!1;triggerWidth="200px";resolvedDropdownHeight="260px";resolvedMaxDropdownWidth="640px";focused=!1;hovered=!1;update;dropDownShow;async sdFocus(){this.disabled||await(this.triggerComponentRef?.sdFocus())}async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.disabled||this.isOpen||(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)}triggerRef;triggerComponentRef;closeAnimationTimer;name=r();triggerHasFocus=!1;watchIsOpen(t){this.syncFocusedState(t),this.dropDownShow.emit({isOpen:t})}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}get displayText(){if(this.isMulti){if(!Array.isArray(this.value)||0===this.value.length)return"";const t=this.getNonDisabledLeaves(this.options),e=this.getSelectedOptions();if(t.length>0&&t.every((t=>e.some((e=>e.value===t.value)))))return this.allSelectedLabel??"전체";const s=this.flattenOptions(this.options);return this.value.map((t=>{if(null!=t&&"object"==typeof t){const e=t;return e.label??s.find((t=>t.value===e.value))?.label??""}return s.find((e=>e.value===t))?.label??""})).filter(Boolean).join(", ")}if(null==this.value)return"";if(!this.emitValue&&"object"==typeof this.value&&!Array.isArray(this.value))return this.value.label??"";const t=this.flattenOptions(this.options);return t.find((t=>t.value===this.value))?.label??""}flattenOptions(t){return t.flatMap((t=>t.children?this.flattenOptions(t.children):[t]))}getNonDisabledLeaves(t){return t.flatMap((t=>t.disabled?[]:t.children?this.getNonDisabledLeaves(t.children):[t]))}getSelectedOptions(){const t=this.value;return null!=t&&Array.isArray(t)?this.emitValue?t.map((t=>this.findOriginalOption(t,this.options))).filter((t=>!!t)):t:[]}toMultiValue(t){return this.emitValue?t.map((t=>t.value)):t}parsePixelValue(t,e){const s=Number.parseFloat(t);return Number.isFinite(s)?s:e}updateDropdownViewportConstraints(){if(!this.triggerRef)return;const e=this.triggerRef.getBoundingClientRect(),s=t.VIEWPORT_PADDING,i=t.PORTAL_OFFSET_Y,o=this.parsePixelValue(this.dropdownHeight,260),r=this.parsePixelValue(this.maxDropdownWidth,640),h=Math.max(window.innerHeight-e.bottom-s-i,0),l=Math.max(e.top-s-i,0),a=Math.max(h,l),d=Math.max(window.innerWidth-2*s,0);this.resolvedDropdownHeight=`${Math.min(o,a)}px`,this.resolvedMaxDropdownWidth=`${Math.min(r,d)}px`}handleViewportResize=()=>{this.isOpen&&this.updateDropdownViewportConstraints()};findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),t.CLOSE_ANIMATION_DURATION))}prepareDropdownGeometry(){this.triggerRef&&(this.triggerWidth=`${this.triggerRef.offsetWidth}px`),this.updateDropdownViewportConstraints()}syncFocusedState(t=this.isOpen){this.focused=t||this.triggerHasFocus}handleTriggerFocus=()=>{this.triggerHasFocus=!0,this.syncFocusedState()};handleTriggerBlur=()=>{this.triggerHasFocus=!1,this.syncFocusedState()};handleTriggerClick=()=>{this.isOpen?this.closeDropdown():(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)};emitUpdate(t){this.update.emit(t)}handleOptionSelect=t=>{const{option:e,leaves:s}=t;if(this.isMulti)this.handleMultiSelect(e,s);else{this.closeDropdown(),this.value=this.emitValue?e.value:e;const t=this.value;requestAnimationFrame((()=>{this.emitUpdate(t)}))}};handleMultiSelect(t,e){const s=this.getSelectedOptions();let i;if(t.children)if(e.every((t=>s.some((e=>e.value===t.value))))){const t=new Set(e.map((t=>t.value)));i=s.filter((e=>!t.has(e.value)))}else{const t=new Set(s.map((t=>t.value))),o=e.filter((e=>!t.has(e.value)));i=[...s,...o]}else i=s.some((e=>e.value===t.value))?s.filter((e=>e.value!==t.value)):[...s,t];this.value=this.toMultiValue(i),this.emitUpdate(this.value)}connectedCallback(){window.addEventListener("resize",this.handleViewportResize)}disconnectedCallback(){window.removeEventListener("resize",this.handleViewportResize),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e={open:this.isOpen,parentRef:this.triggerRef,viewportPadding:t.VIEWPORT_PADDING,onSdClose:()=>{this.closeDropdown()}};return i("sd-field",{key:"0864fe68a337d4bab526fa61570e856c8eff6d1c",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:"781819ed75f47395e96fd6808766e6bb8c246fa5",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"8cebad98f0cd4b333954a55857aec3fbb6f3d283",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:"fe68f0b01256e1c1d3200f9f5fd17c2adf97f0e0",...e},i("sd-select-listbox",{key:"98368524ef06a6d752f2313756a89ae6e8c05955",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 x(){"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),O);break;case"sd-button":customElements.get(o(t))||h();break;case"sd-checkbox":customElements.get(o(t))||l();break;case"sd-field":customElements.get(o(t))||a();break;case"sd-floating-portal":customElements.get(o(t))||d();break;case"sd-ghost-button":customElements.get(o(t))||n();break;case"sd-icon":customElements.get(o(t))||c();break;case"sd-portal":customElements.get(o(t))||p();break;case"sd-select-list-item":customElements.get(o(t))||u();break;case"sd-select-list-item-search":customElements.get(o(t))||m();break;case"sd-select-listbox":customElements.get(o(t))||f();break;case"sd-select-trigger":customElements.get(o(t))||b();break;case"sd-tag":customElements.get(o(t))||g();break;case"sd-tooltip":customElements.get(o(t))||w()}}))}export{O as S,x as d}
@@ -1 +1 @@
1
- import{p as t,H as s,h as e,F as i,t as o}from"./p-CEVDmQdt.js";import{T as n}from"./p-B3bERWUt.js";import{d as a}from"./p-C3rOud8J.js";import{d as l}from"./p-DMvWCQfX.js";import{d as r}from"./p-BlN03Cqm.js";import{d as c}from"./p-BnhzUsGP.js";import{d}from"./p-BckY1cBy.js";import{d as h}from"./p-D8T1XeGP.js";var m={bg:"#07284A",content:"#FFFFFF"},p={bg:"#FCEFEF",content:"#FB4444"},g={bg:"#FEF1EA",content:"#FF6B00"},b={bg:"#E6F1FF",content:"#0075FF"};const u={default:{bg:m.bg,content:m.content},danger:{bg:p.bg,content:p.content},warning:{bg:g.bg,content:g.content},accent:{bg:b.bg,content:b.content}},f=t(class t extends s{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}trigger="hover";placement="top";color="#01BB4B";tooltipType="default";icon="helpOutline";iconSize=12;label="";name="primary_sm";rightIcon;ariaLabel="";disabled=!1;type="button";useClose=!1;sdClass="";message=[];triggerClass="";triggerStyle="";showTooltip=!1;slotContentHTML="";buttonEl;triggerEl;isAnchorMode=!1;menuEl;hideTimeout;closeTimeout;static CLOSE_ANIM_MS=150;openTooltip=()=>{this.cancelHideTimer(),this.showTooltip=!0,this.menuEl&&this.menuEl.classList.remove("sd-floating-menu--closing")};closeTooltip=()=>{this.menuEl&&this.menuEl.classList.add("sd-floating-menu--closing"),this.closeTimeout=setTimeout((()=>{this.showTooltip=!1}),t.CLOSE_ANIM_MS)};startHideTimer=()=>{this.hideTimeout=setTimeout((()=>this.closeTooltip()),100)};cancelHideTimer=()=>{this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=void 0),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=void 0)};get tooltipOffset(){switch(this.placement??"top"){case"top":return[0,-4];case"bottom":return[0,4];case"left":case"right":return[4,0]}}handleClose=()=>!this.useClose&&this.closeTooltip();async show(){this.openTooltip()}async hide(){this.closeTooltip()}componentWillLoad(){this.isAnchorMode=Array.from(this.el.children).some((t=>"anchor"===t.getAttribute("slot"))),this.isAnchorMode||(this.slotContentHTML=this.el.innerHTML,this.el.replaceChildren()),this.el.classList.toggle("visible",!0)}componentDidRender(){this.triggerEl&&""!==this.triggerStyle&&this.triggerEl.setAttribute("style",this.triggerStyle)}render(){const t=this.trigger??"hover",s=this.placement??"top",o=this.tooltipType??"default",a=this.icon??"helpOutline",l=this.color??"#01BB4B",r=u[o]??u.default,c=()=>this.showTooltip=!this.showTooltip,d=void 0!==this.label&&""!==this.label,h=this.isAnchorMode,m="hover"===t?{onMouseEnter:()=>this.openTooltip(),onMouseLeave:()=>!this.useClose&&this.startHideTimer()}:h||!d?{onClick:c}:{},p="click"===t&&!h&&d?{onSdClick:c}:{},g=["sd-tooltip-trigger",this.sdClass,this.triggerClass].filter((t=>void 0!==t&&""!==t)).join(" "),b=this.message&&this.message.length>0?this.message.map((t=>`<div>${t}</div>`)).join(""):this.slotContentHTML;return e(i,{key:"81d582c4c8847a0f57abf632d975461cdf07b535"},e("div",{key:"c7515fb866fa85749405bb10512e27575850eb27",ref:t=>this.triggerEl=t,class:g,...m},h?e("slot",{name:"anchor"}):d?e("sd-button",{ref:t=>this.buttonEl=t,name:this.name??"primary_sm",label:this.label,icon:a,rightIcon:this.rightIcon,ariaLabel:this.ariaLabel,disabled:this.disabled,type:this.type??"button",class:"sd-tooltip",...p}):e("sd-icon",{ref:t=>this.buttonEl=t,name:a,size:this.iconSize??12,color:l,class:"sd-tooltip"})),this.showTooltip&&e("sd-floating-portal",{key:"903aaa3723a119687e5af8120d54fb1b9e43c584",parentRef:h?this.triggerEl:this.buttonEl,onSdClose:this.handleClose,placement:s,offset:this.tooltipOffset},e("div",{key:"813e1dbf7f2d8e0378f4fcac1225341aafbd9948",ref:t=>this.menuEl=t,class:{"sd-floating-menu":!0,[`sd-floating-menu--${o}`]:!0,[`sd-floating-menu--${s}`]:!0,"sd-floating-menu--has-close":this.useClose},style:{"--sd-floating-bg":r.bg,"--sd-floating-content":r.content},onMouseEnter:()=>this.openTooltip(),onMouseLeave:()=>!this.useClose&&this.startHideTimer()},e("i",{key:"d74071d3d236382bc952ad03a05ebd77219b4ddb",class:`sd-floating-menu__arrow sd-floating-menu__arrow--${s}`},e(n,{key:"91c35bd2bc22294b7e7998965930219a43799310"})),e("div",{key:"16edd2fc6e9ad02b646c05c6404d3eb79e2a7a71",class:"sd-floating-menu__content",innerHTML:b}),this.useClose&&e("sd-ghost-button",{key:"d234906f7a4a603a8e18cef6da49f9d893adb731",class:"sd-floating-menu__close-button",icon:"close",ariaLabel:"close",size:"xxs",onClick:()=>this.closeTooltip()}))))}static get style(){return"sd-tooltip{visibility:hidden !important;display:inline-flex}sd-tooltip.visible{visibility:visible !important}sd-tooltip .sd-tooltip-trigger{display:inline-flex;position:relative;cursor:pointer;align-items:center;justify-content:center}"}},[772,"sd-tooltip",{trigger:[1],placement:[1],color:[1],tooltipType:[1,"tooltip-type"],icon:[1],iconSize:[2,"icon-size"],label:[1],name:[1],rightIcon:[1,"right-icon"],ariaLabel:[1,"aria-label"],disabled:[4],type:[1],useClose:[4,"use-close"],sdClass:[1,"sd-class"],message:[16],triggerClass:[1,"trigger-class"],triggerStyle:[1,"trigger-style"],showTooltip:[32],slotContentHTML:[32],show:[64],hide:[64]}]);function y(){"undefined"!=typeof customElements&&["sd-tooltip","sd-button","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-tooltip":customElements.get(o(t))||customElements.define(o(t),f);break;case"sd-button":customElements.get(o(t))||a();break;case"sd-floating-portal":customElements.get(o(t))||l();break;case"sd-ghost-button":customElements.get(o(t))||r();break;case"sd-icon":customElements.get(o(t))||c();break;case"sd-portal":customElements.get(o(t))||d();break;case"sd-tag":customElements.get(o(t))||h()}}))}export{f as S,y as d}
1
+ import{p as t,H as s,h as e,F as i,t as o}from"./p-CEVDmQdt.js";import{T as n}from"./p-B3bERWUt.js";import{d as a}from"./p-C3rOud8J.js";import{d as l}from"./p-h-EFBJM4.js";import{d as r}from"./p-B_12VhSA.js";import{d as c}from"./p-BnhzUsGP.js";import{d as h}from"./p-DhgwAPO4.js";import{d}from"./p-DiJvHjSG.js";var m={bg:"#07284A",content:"#FFFFFF"},p={bg:"#FCEFEF",content:"#FB4444"},g={bg:"#FEF1EA",content:"#FF6B00"},b={bg:"#E6F1FF",content:"#0075FF"};const u={default:{bg:m.bg,content:m.content},danger:{bg:p.bg,content:p.content},warning:{bg:g.bg,content:g.content},accent:{bg:b.bg,content:b.content}},f=t(class t extends s{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}trigger="hover";placement="top";color="#01BB4B";tooltipType="default";icon="helpOutline";iconSize=12;label="";name="primary_sm";rightIcon;ariaLabel="";disabled=!1;type="button";useClose=!1;sdClass="";message=[];triggerClass="";triggerStyle="";showTooltip=!1;slotContentHTML="";buttonEl;triggerEl;isAnchorMode=!1;menuEl;hideTimeout;closeTimeout;static CLOSE_ANIM_MS=150;openTooltip=()=>{this.cancelHideTimer(),this.showTooltip=!0,this.menuEl&&this.menuEl.classList.remove("sd-floating-menu--closing")};closeTooltip=()=>{this.menuEl&&this.menuEl.classList.add("sd-floating-menu--closing"),this.closeTimeout=setTimeout((()=>{this.showTooltip=!1}),t.CLOSE_ANIM_MS)};startHideTimer=()=>{this.hideTimeout=setTimeout((()=>this.closeTooltip()),100)};cancelHideTimer=()=>{this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=void 0),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=void 0)};get tooltipOffset(){switch(this.placement??"top"){case"top":return[0,-4];case"bottom":return[0,4];case"left":case"right":return[4,0]}}handleClose=()=>!this.useClose&&this.closeTooltip();async show(){this.openTooltip()}async hide(){this.closeTooltip()}componentWillLoad(){this.isAnchorMode=Array.from(this.el.children).some((t=>"anchor"===t.getAttribute("slot"))),this.isAnchorMode||(this.slotContentHTML=this.el.innerHTML,this.el.replaceChildren()),this.el.classList.toggle("visible",!0)}componentDidRender(){this.triggerEl&&""!==this.triggerStyle&&this.triggerEl.setAttribute("style",this.triggerStyle)}render(){const t=this.trigger??"hover",s=this.placement??"top",o=this.tooltipType??"default",a=this.icon??"helpOutline",l=this.color??"#01BB4B",r=u[o]??u.default,c=()=>this.showTooltip=!this.showTooltip,h=void 0!==this.label&&""!==this.label,d=this.isAnchorMode,m="hover"===t?{onMouseEnter:()=>this.openTooltip(),onMouseLeave:()=>!this.useClose&&this.startHideTimer()}:d||!h?{onClick:c}:{},p="click"===t&&!d&&h?{onSdClick:c}:{},g=["sd-tooltip-trigger",this.sdClass,this.triggerClass].filter((t=>void 0!==t&&""!==t)).join(" "),b=this.message&&this.message.length>0?this.message.map((t=>`<div>${t}</div>`)).join(""):this.slotContentHTML;return e(i,{key:"cd0c166191a9f83a11891786cd246a268d50b349"},e("div",{key:"9e2872936629b886b779852c51f57874466edfb5",ref:t=>this.triggerEl=t,class:g,...m},d?e("slot",{name:"anchor"}):h?e("sd-button",{ref:t=>this.buttonEl=t,name:this.name??"primary_sm",label:this.label,icon:a,rightIcon:this.rightIcon,ariaLabel:this.ariaLabel,disabled:this.disabled,type:this.type??"button",class:"sd-tooltip",...p}):e("sd-icon",{ref:t=>this.buttonEl=t,name:a,size:this.iconSize??12,color:l,class:"sd-tooltip"})),this.showTooltip&&e("sd-floating-portal",{key:"2db92e0d56a1a6cee04ab5f23f6bbe00fc279351",parentRef:d?this.triggerEl:this.buttonEl,onSdClose:this.handleClose,placement:s,offset:this.tooltipOffset},e("div",{key:"a4635141d3e9aa630be80b2b6071a5ba16de257d",ref:t=>this.menuEl=t,class:{"sd-floating-menu":!0,[`sd-floating-menu--${o}`]:!0,[`sd-floating-menu--${s}`]:!0,"sd-floating-menu--has-close":this.useClose},style:{"--sd-floating-bg":r.bg,"--sd-floating-content":r.content},onMouseEnter:()=>this.openTooltip(),onMouseLeave:()=>!this.useClose&&this.startHideTimer()},e("i",{key:"cf7f3186dd7c9cbf001700bd29de05480e807533",class:`sd-floating-menu__arrow sd-floating-menu__arrow--${s}`},e(n,{key:"4aca7fbbc159bf61c9488a38431e0bcc40172446"})),e("div",{key:"ffa09626b16742e6d774944bf8536def2b250519",class:"sd-floating-menu__content",innerHTML:b}),this.useClose&&e("sd-ghost-button",{key:"934529cc6c8c4a46a09b7dd03baec6666029f169",class:"sd-floating-menu__close-button",icon:"close",ariaLabel:"close",size:"xxs",onClick:()=>this.closeTooltip()}))))}static get style(){return"sd-tooltip{visibility:hidden !important;display:inline-flex}sd-tooltip.visible{visibility:visible !important}sd-tooltip .sd-tooltip-trigger{display:inline-flex;position:relative;cursor:pointer;align-items:center;justify-content:center}"}},[772,"sd-tooltip",{trigger:[1],placement:[1],color:[1],tooltipType:[1,"tooltip-type"],icon:[1],iconSize:[2,"icon-size"],label:[1],name:[1],rightIcon:[1,"right-icon"],ariaLabel:[1,"aria-label"],disabled:[4],type:[1],useClose:[4,"use-close"],sdClass:[1,"sd-class"],message:[16],triggerClass:[1,"trigger-class"],triggerStyle:[1,"trigger-style"],showTooltip:[32],slotContentHTML:[32],show:[64],hide:[64]}]);function y(){"undefined"!=typeof customElements&&["sd-tooltip","sd-button","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-tooltip":customElements.get(o(t))||customElements.define(o(t),f);break;case"sd-button":customElements.get(o(t))||a();break;case"sd-floating-portal":customElements.get(o(t))||l();break;case"sd-ghost-button":customElements.get(o(t))||r();break;case"sd-icon":customElements.get(o(t))||c();break;case"sd-portal":customElements.get(o(t))||h();break;case"sd-tag":customElements.get(o(t))||d()}}))}export{f as S,y as d}
@@ -1 +1 @@
1
- import{p as t,H as o,c as s,h as e,t as a}from"./p-CEVDmQdt.js";import{s as i}from"./p-BE4tnQ2Z.js";import{m as d}from"./p-DOXMJi-V.js";import{d as n}from"./p-C3rOud8J.js";import{d as l}from"./p-BlN03Cqm.js";import{d as m}from"./p-BnhzUsGP.js";import{d as c}from"./p-BckY1cBy.js";import{d as r}from"./p-D8T1XeGP.js";const f={positive:"primary_md",negative:"danger_md",default:"neutral_outline_md"},h={positive:"notificationOutline",negative:"warningOutline",default:null},b={positive:d.modal.confirm.positive.icon,negative:d.modal.confirm.negative.icon,default:""},p=Number(d.modal.confirm.title.icon),u=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=s(this,"sdClose",7),this.cancel=s(this,"sdCancel",7),this.ok=s(this,"sdOk",7)}get el(){return this}hasSlottedContent=!1;customContentRef;slotObserver;type="positive";modalTitle="";titleClass="";topMessage=[];bottomMessage=[];mainButtonName;mainButtonLabel="확인";subButtonLabel="";tagPreset="square_sm_grey";tagLabel="";slotLabel="";tagContents;close;cancel;ok;componentWillLoad(){this.syncHasSlottedContent()}componentDidLoad(){"undefined"!=typeof MutationObserver&&(this.slotObserver=new MutationObserver((()=>this.syncHasSlottedContent())),this.slotObserver.observe(this.el,{childList:!0,characterData:!0}))}componentDidRender(){this.customContentRef&&this.tagContents instanceof o&&("function"==typeof this.customContentRef.replaceChildren?this.customContentRef.replaceChildren(this.tagContents):(this.customContentRef.innerHTML="",this.customContentRef.appendChild(this.tagContents)))}disconnectedCallback(){this.slotObserver?.disconnect()}get resolvedType(){return this.type??"positive"}get resolvedMainButton(){return this.mainButtonName??f[this.resolvedType]}get hasTagContent(){return void 0!==this.tagLabel&&""!==this.tagLabel||void 0!==this.slotLabel&&""!==this.slotLabel}get showContentBox(){return null!=this.tagContents||this.hasTagContent||this.hasSlottedContent}syncHasSlottedContent(){const t=Array.from(this.el.childNodes).some((t=>!(t.nodeType===Node.ELEMENT_NODE&&t.classList.contains("sd-confirm-modal"))&&(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&t.textContent?.trim())));t!==this.hasSlottedContent&&(this.hasSlottedContent=t)}render(){const t=this.resolvedType,o=h[t],s=b[t];return e("div",{key:"e8fcb4879a5a9f2b3bf41753e4cc511e710db1f6",class:"sd-confirm-modal"},e("sd-ghost-button",{key:"a8595db97066963534d0ee5529f39481ed1e6c27",class:"sd-confirm-modal__close-button",icon:"close",ariaLabel:"close",onClick:()=>this.close.emit()}),o&&e("sd-icon",{key:"3b5cf4842176f6c039ecb64ec7942e7cb5a6f1ac",class:"sd-confirm-modal__icon",name:o,size:p,color:s}),e("h2",{key:"6f7032707292e71e0f8adc655ce88487c08e1b8d",class:`sd-confirm-modal__title ${this.titleClass??""}`},this.modalTitle),e("div",{key:"e21c66301b368ffd989063aaf9826e023de71925",class:"sd-confirm-modal__body"},(this.topMessage??[]).length>0&&e("div",{key:"3965561001b0520f491cac833bba3cfe92d7a200",class:"sd-confirm-modal__message"},(this.topMessage??[]).map((t=>e("p",{class:"sd-confirm-modal__message-text",innerHTML:i(t)})))),this.showContentBox&&e("div",{key:"dc2c38a945493e42d451e4fa3d3ebaa6dca75e4a",class:"sd-confirm-modal__content-box"},this.tagContents?e("div",{class:"sd-confirm-modal__custom-content",ref:t=>{this.customContentRef=t}}):e("slot",{onSlotchange:()=>this.syncHasSlottedContent()},this.tagLabel&&e("sd-tag",{name:this.tagPreset??"square_sm_grey",label:this.tagLabel}),this.slotLabel&&e("span",{class:"sd-confirm-modal__slot-label"},this.slotLabel))),(this.bottomMessage??[]).length>0&&e("div",{key:"ae35e60d69047547d159a452b838c8fc57a3e1a4",class:"sd-confirm-modal__message"},(this.bottomMessage??[]).map((t=>e("p",{class:"sd-confirm-modal__message-text",innerHTML:i(t)}))))),e("div",{key:"3bd41c58539faade80e61fac6a91a4ab318bbe88",class:"sd-confirm-modal__button"},this.subButtonLabel&&e("sd-button",{key:"177fba6b79a23c80b1037d3af4872c58a598aa33",name:"neutral_outline_md",label:this.subButtonLabel,onSdClick:()=>this.cancel.emit()}),e("sd-button",{key:"b332d980d9236c584ebca47f89fc2d9b217c0bfd",name:this.resolvedMainButton,label:this.mainButtonLabel??"확인",onSdClick:()=>this.ok.emit()})))}static get style(){return"sd-confirm-modal{display:block;width:fit-content;min-width:520px}sd-confirm-modal .sd-confirm-modal{position:relative;padding:var(--sd-modal-modal-confirm-padding-y) var(--sd-modal-modal-confirm-padding-x);border-radius:var(--sd-modal-modal-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);background:var(--sd-modal-modal-bg)}sd-confirm-modal .sd-confirm-modal__close-button{position:absolute;top:12px;right:12px}sd-confirm-modal .sd-confirm-modal__icon{display:block;width:var(--sd-modal-modal-confirm-title-icon);height:var(--sd-modal-modal-confirm-title-icon);margin:0 auto var(--sd-modal-modal-confirm-title-gap) auto}sd-confirm-modal .sd-confirm-modal__title{color:var(--sd-modal-modal-confirm-title-color);font-size:var(--sd-modal-modal-confirm-title-typography-font-size);font-weight:var(--sd-modal-modal-confirm-title-typography-font-weight);line-height:var(--sd-modal-modal-confirm-title-typography-line-height);text-align:center;margin:0 0 var(--sd-modal-modal-confirm-body-gap) 0}sd-confirm-modal .sd-confirm-modal__body{display:flex;flex-direction:column;gap:var(--sd-modal-modal-confirm-body-gap)}sd-confirm-modal .sd-confirm-modal__message-text{color:var(--sd-modal-modal-confirm-message-color);font-size:12px;font-weight:400;line-height:20px;text-align:center;margin:0}sd-confirm-modal .sd-confirm-modal__content-box{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border:1px solid #e1e1e1;border-radius:8px;background:white}sd-confirm-modal .sd-confirm-modal__slot-label{font-size:14px;font-weight:700;line-height:22px;color:var(--sd-modal-modal-confirm-message-color)}sd-confirm-modal .sd-confirm-modal__button{display:flex;justify-content:center;gap:var(--sd-modal-modal-confirm-button-gap);margin-top:40px}"}},[772,"sd-confirm-modal",{type:[1],modalTitle:[1,"modal-title"],titleClass:[1,"title-class"],topMessage:[16],bottomMessage:[16],mainButtonName:[1,"main-button-name"],mainButtonLabel:[1,"main-button-label"],subButtonLabel:[1,"sub-button-label"],tagPreset:[1,"tag-preset"],tagLabel:[1,"tag-label"],slotLabel:[1,"slot-label"],tagContents:[16],hasSlottedContent:[32]}]);function g(){"undefined"!=typeof customElements&&["sd-confirm-modal","sd-button","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-confirm-modal":customElements.get(a(t))||customElements.define(a(t),u);break;case"sd-button":customElements.get(a(t))||n();break;case"sd-ghost-button":customElements.get(a(t))||l();break;case"sd-icon":customElements.get(a(t))||m();break;case"sd-portal":customElements.get(a(t))||c();break;case"sd-tag":customElements.get(a(t))||r()}}))}export{u as S,g as d}
1
+ import{p as t,H as o,c as s,h as e,t as a}from"./p-CEVDmQdt.js";import{s as i}from"./p-BE4tnQ2Z.js";import{m as d}from"./p-DOXMJi-V.js";import{d as n}from"./p-C3rOud8J.js";import{d as l}from"./p-B_12VhSA.js";import{d as m}from"./p-BnhzUsGP.js";import{d as r}from"./p-DhgwAPO4.js";import{d as c}from"./p-DiJvHjSG.js";const f={positive:"primary_md",negative:"danger_md",default:"neutral_outline_md"},h={positive:"notificationOutline",negative:"warningOutline",default:null},b={positive:d.modal.confirm.positive.icon,negative:d.modal.confirm.negative.icon,default:""},p=Number(d.modal.confirm.title.icon),g=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=s(this,"sdClose",7),this.cancel=s(this,"sdCancel",7),this.ok=s(this,"sdOk",7)}get el(){return this}hasSlottedContent=!1;customContentRef;slotObserver;type="positive";modalTitle="";titleClass="";topMessage=[];bottomMessage=[];mainButtonName;mainButtonLabel="확인";subButtonLabel="";tagPreset="square_sm_grey";tagLabel="";slotLabel="";tagContents;close;cancel;ok;componentWillLoad(){this.syncHasSlottedContent()}componentDidLoad(){"undefined"!=typeof MutationObserver&&(this.slotObserver=new MutationObserver((()=>this.syncHasSlottedContent())),this.slotObserver.observe(this.el,{childList:!0,characterData:!0}))}componentDidRender(){this.customContentRef&&this.tagContents instanceof o&&("function"==typeof this.customContentRef.replaceChildren?this.customContentRef.replaceChildren(this.tagContents):(this.customContentRef.innerHTML="",this.customContentRef.appendChild(this.tagContents)))}disconnectedCallback(){this.slotObserver?.disconnect()}get resolvedType(){return this.type??"positive"}get resolvedMainButton(){return this.mainButtonName??f[this.resolvedType]}get hasTagContent(){return void 0!==this.tagLabel&&""!==this.tagLabel||void 0!==this.slotLabel&&""!==this.slotLabel}get showContentBox(){return null!=this.tagContents||this.hasTagContent||this.hasSlottedContent}syncHasSlottedContent(){const t=Array.from(this.el.childNodes).some((t=>!(t.nodeType===Node.ELEMENT_NODE&&t.classList.contains("sd-confirm-modal"))&&(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&t.textContent?.trim())));t!==this.hasSlottedContent&&(this.hasSlottedContent=t)}render(){const t=this.resolvedType,o=h[t],s=b[t];return e("div",{key:"396bef971efaab6638586fa1a067eae54c1897f4",class:"sd-confirm-modal"},e("sd-ghost-button",{key:"4716168808371f4515bf763e77198386fc9fe7cf",class:"sd-confirm-modal__close-button",icon:"close",ariaLabel:"close",onClick:()=>this.close.emit()}),o&&e("sd-icon",{key:"1ab7ca2c5262374a0823a8e5c501758433c25051",class:"sd-confirm-modal__icon",name:o,size:p,color:s}),e("h2",{key:"a190f975d27153e4d928c95395f13ecd8ba0667a",class:`sd-confirm-modal__title ${this.titleClass??""}`},this.modalTitle),e("div",{key:"da7821097377b7a9781df87ae40b2439a103ff9b",class:"sd-confirm-modal__body"},(this.topMessage??[]).length>0&&e("div",{key:"ced23315888ad43b3d91b8bb5388b77e517dd52a",class:"sd-confirm-modal__message"},(this.topMessage??[]).map((t=>e("p",{class:"sd-confirm-modal__message-text",innerHTML:i(t)})))),this.showContentBox&&e("div",{key:"5bdbe145bdb6639ebe582e7295f413a4b1990c15",class:"sd-confirm-modal__content-box"},this.tagContents?e("div",{class:"sd-confirm-modal__custom-content",ref:t=>{this.customContentRef=t}}):e("slot",{onSlotchange:()=>this.syncHasSlottedContent()},this.tagLabel&&e("sd-tag",{name:this.tagPreset??"square_sm_grey",label:this.tagLabel}),this.slotLabel&&e("span",{class:"sd-confirm-modal__slot-label"},this.slotLabel))),(this.bottomMessage??[]).length>0&&e("div",{key:"e99adc95c95be16945407d54833164908aad0b50",class:"sd-confirm-modal__message"},(this.bottomMessage??[]).map((t=>e("p",{class:"sd-confirm-modal__message-text",innerHTML:i(t)}))))),e("div",{key:"20a6660323e1d9f4ee096f0c07bf0596f5a2445a",class:"sd-confirm-modal__button"},this.subButtonLabel&&e("sd-button",{key:"73141dd6fc6f703bff11e71ca9820cf3e1045466",name:"neutral_outline_md",label:this.subButtonLabel,onSdClick:()=>this.cancel.emit()}),e("sd-button",{key:"bed2d910b4b35d59897e14222f86f20a7e8c3bde",name:this.resolvedMainButton,label:this.mainButtonLabel??"확인",onSdClick:()=>this.ok.emit()})))}static get style(){return"sd-confirm-modal{display:block;width:fit-content;min-width:520px}sd-confirm-modal .sd-confirm-modal{position:relative;padding:var(--sd-modal-modal-confirm-padding-y) var(--sd-modal-modal-confirm-padding-x);border-radius:var(--sd-modal-modal-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);background:var(--sd-modal-modal-bg)}sd-confirm-modal .sd-confirm-modal__close-button{position:absolute;top:12px;right:12px}sd-confirm-modal .sd-confirm-modal__icon{display:block;width:var(--sd-modal-modal-confirm-title-icon);height:var(--sd-modal-modal-confirm-title-icon);margin:0 auto var(--sd-modal-modal-confirm-title-gap) auto}sd-confirm-modal .sd-confirm-modal__title{color:var(--sd-modal-modal-confirm-title-color);font-size:var(--sd-modal-modal-confirm-title-typography-font-size);font-weight:var(--sd-modal-modal-confirm-title-typography-font-weight);line-height:var(--sd-modal-modal-confirm-title-typography-line-height);text-align:center;margin:0 0 var(--sd-modal-modal-confirm-body-gap) 0}sd-confirm-modal .sd-confirm-modal__body{display:flex;flex-direction:column;gap:var(--sd-modal-modal-confirm-body-gap)}sd-confirm-modal .sd-confirm-modal__message-text{color:var(--sd-modal-modal-confirm-message-color);font-size:12px;font-weight:400;line-height:20px;text-align:center;margin:0}sd-confirm-modal .sd-confirm-modal__content-box{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border:1px solid #e1e1e1;border-radius:8px;background:white}sd-confirm-modal .sd-confirm-modal__slot-label{font-size:14px;font-weight:700;line-height:22px;color:var(--sd-modal-modal-confirm-message-color)}sd-confirm-modal .sd-confirm-modal__button{display:flex;justify-content:center;gap:var(--sd-modal-modal-confirm-button-gap);margin-top:40px}"}},[772,"sd-confirm-modal",{type:[1],modalTitle:[1,"modal-title"],titleClass:[1,"title-class"],topMessage:[16],bottomMessage:[16],mainButtonName:[1,"main-button-name"],mainButtonLabel:[1,"main-button-label"],subButtonLabel:[1,"sub-button-label"],tagPreset:[1,"tag-preset"],tagLabel:[1,"tag-label"],slotLabel:[1,"slot-label"],tagContents:[16],hasSlottedContent:[32]}]);function u(){"undefined"!=typeof customElements&&["sd-confirm-modal","sd-button","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-confirm-modal":customElements.get(a(t))||customElements.define(a(t),g);break;case"sd-button":customElements.get(a(t))||n();break;case"sd-ghost-button":customElements.get(a(t))||l();break;case"sd-icon":customElements.get(a(t))||m();break;case"sd-portal":customElements.get(a(t))||r();break;case"sd-tag":customElements.get(a(t))||c()}}))}export{g as S,u 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 c,j as o,k as d}from"./p-DvvGi4J_.js";import{s as l}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:"b2f140907d6e4454a3adfb9d3dd9babd9058c178",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":`${d.paddingX}px`,"--trigger-gap":`${d.gap}px`,"--trigger-font-size":`${o.fontSize}px`,"--trigger-line-height":`${o.lineHeight}px`,"--trigger-font-weight":o.fontWeight,"--trigger-color":this.disabled?c.text.disabled:e?c.text.default:c.icon.default,"--trigger-icon-color":this.disabled?c.icon.disabled:c.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:"6803bc50c5f62dce1b1e9d874559f8ca5fca7b75",class:"sd-select-trigger__content"},e&&g(this.displayText)?r("span",{class:"sd-select-trigger__text",ref:e=>e&&(e.innerHTML=l(this.displayText))}):r("span",{class:"sd-select-trigger__text"},e?this.displayText:this.placeholder??"선택"),r("sd-icon",{key:"397264b3179fb6699c1ee5454f76ac9d0779488c",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 +1 @@
1
- import{p as t,H as s,c as e,h as i,t as h}from"./p-CEVDmQdt.js";import{c as o,d as l,f as r,i as n,e as c,E as d,g as a}from"./p-DvvGi4J_.js";import{d as u}from"./p-D3dq5pt5.js";import{d as m}from"./p-BnhzUsGP.js";import{d as p}from"./p-CtNDxhxx.js";import{d as f}from"./p-CNwoxvpg.js";const x=t(class t extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.optionSelect=e(this,"sdOptionSelect",7)}type="default";options=[];value=null;emitValue=!1;useSearch=!1;useSelectAll=!1;triggerWidth="200px";maxWidth="640px";maxHeight="260px";searchKeyword="";isScrolled=!1;focusedIndex=-1;optionSelect;listEl;lastScrolledIndex=-1;keydownAttached=!1;suppressHover=!1;get isDepth(){return"default_depth"===this.type||"multi_depth"===this.type}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}static SELECT_ALL_OPTION={value:"__select_all__",label:"전체"};get showSelectAll(){return this.useSelectAll&&this.isMulti&&this.getAllNonDisabledLeaves().length>0}getAllNonDisabledLeaves(){const t=s=>s.flatMap((s=>s.disabled?[]:s.children?t(s.children):[s]));return t(this.options)}get selectAllState(){if(!this.showSelectAll)return!1;const t=this.getAllNonDisabledLeaves();if(0===t.length)return!1;const s=this.getSelectedValues(),e=t.filter((t=>s.has(t.value))).length;return 0!==e&&(e===t.length||null)}get showSearch(){return!!this.useSearch&&(this.isDepth?o(this.options):this.options.length)>=l}get filteredOptions(){if(null==this.searchKeyword||""===this.searchKeyword)return this.options;if(this.isDepth)return r(this.options,this.searchKeyword);const t=this.searchKeyword.toLowerCase();return this.options.filter((s=>{const e=n(s.label)?c(s.label):s.label;return null!=e&&e.toLowerCase().includes(t)}))}get isEmpty(){return this.isDepth?0===o(this.filteredOptions)&&0===this.filteredOptions.length:0===this.filteredOptions.length}getSelectedValues(){return null!=this.value&&Array.isArray(this.value)?this.emitValue?new Set(this.value):new Set(this.value.map((t=>t.value))):new Set}isOptionSelected(t){return this.isMulti?this.getSelectedValues().has(t.value):this.emitValue||null==this.value||"object"!=typeof this.value||Array.isArray(this.value)?this.value===t.value:this.value.value===t.value}getGroupSelectionState(t){if(!this.isMulti||!t.children)return!1;const s=this.getSelectedValues();if(0===s.size)return!1;const e=this.collectVisibleLeaves(t);if(0===e.length)return!1;const i=e.filter((t=>s.has(t.value))).length;return 0!==i&&(i===e.length||null)}getCountInfo(t){if(!this.isMulti||!t.children)return;const s=this.getSelectedValues(),e=this.collectVisibleLeaves(t);return{selected:e.filter((t=>s.has(t.value))).length,total:e.length}}findOriginalOption(t,s){for(const e of s){if(e.value===t)return e;if(e.children){const s=this.findOriginalOption(t,e.children);if(s)return s}}}collectLeaves(t){return t.children?t.children.flatMap((t=>this.collectLeaves(t))):[t]}collectVisibleLeaves(t){if(t.disabled)return[];if(!t.children)return[t];if(0===t.children.length){const s=this.findOriginalOption(t.value,this.options);return s?this.collectLeaves(s).filter((t=>!t.disabled)):[]}return t.children.flatMap((t=>this.collectVisibleLeaves(t)))}get navigableOptions(){const s=[];this.showSelectAll&&s.push(t.SELECT_ALL_OPTION);const e=t=>{for(const i of t){const t=!!i.children;(!t||this.isMulti)&&!i.disabled&&s.push(i),t&&i.children&&i.children.length>0&&e(i.children)}};return e(this.filteredOptions),s}isSelectAllOption(s){return this.showSelectAll&&s.value===t.SELECT_ALL_OPTION.value}emitSelectAll(){if(!this.showSelectAll)return;const s=this.getAllNonDisabledLeaves();this.optionSelect.emit({option:{...t.SELECT_ALL_OPTION,children:s},leaves:s})}handleSelectAllClick=t=>{t.stopPropagation(),this.emitSelectAll()};isOptionFocused(t){if(this.focusedIndex<0)return!1;const s=this.navigableOptions[this.focusedIndex];return null!=s&&s.value===t.value}resetFocusOnFilter(){this.focusedIndex=this.navigableOptions.length>0?0:-1,this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}handleSearchFilter=t=>{this.searchKeyword=t.detail};handleScroll=t=>{this.isScrolled=t.target.scrollTop>0};emitOptionSelect(t){this.optionSelect.emit({option:t,leaves:this.collectVisibleLeaves(t)})}handleOptionClick=t=>{t.stopPropagation(),this.emitOptionSelect(t.detail)};handleOptionHover=t=>{if(this.suppressHover)return;const s=this.navigableOptions.findIndex((s=>s.value===t.value));s>=0&&(this.focusedIndex=s)};releaseHoverSuppress=()=>{this.suppressHover=!1,document.removeEventListener("mousemove",this.releaseHoverSuppress,!0)};handleKeyDown=t=>{const s=this.navigableOptions;if("ArrowDown"===t.key){if(0===s.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<0?0:(this.focusedIndex+1)%s.length,this.beginHoverSuppression()}else if("ArrowUp"===t.key){if(0===s.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<=0?s.length-1:this.focusedIndex-1,this.beginHoverSuppression()}else if("Enter"===t.key){if(this.focusedIndex<0||this.focusedIndex>=s.length)return;t.preventDefault(),t.stopPropagation();const e=s[this.focusedIndex];this.isSelectAllOption(e)?this.emitSelectAll():this.emitOptionSelect(e)}};beginHoverSuppression(){this.suppressHover||(this.suppressHover=!0,document.addEventListener("mousemove",this.releaseHoverSuppress,!0))}scrollFocusedIntoView(){const t=this.listEl,s=t?.querySelector(".sd-select-list-item--focused");if(!t||!s)return;const e=t.getBoundingClientRect(),i=s.getBoundingClientRect();i.top<e.top?t.scrollTop+=i.top-e.top:i.bottom>e.bottom&&(t.scrollTop+=i.bottom-e.bottom)}connectedCallback(){this.keydownAttached||(document.addEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!0)}disconnectedCallback(){this.keydownAttached&&(document.removeEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!1),this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}componentDidRender(){this.focusedIndex!==this.lastScrolledIndex&&(this.lastScrolledIndex=this.focusedIndex,this.focusedIndex>=0&&this.scrollFocusedIntoView())}renderOptions(t,s=1){return t.map((t=>{const e=!!t.children;return[i("sd-select-list-item",{option:t,depth:s,isSelected:e?this.getGroupSelectionState(t):this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,countInfo:this.getCountInfo(t),onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)}),e&&t.children?this.renderOptions(t.children,s+1):null]}))}render(){return i("div",{key:"df4d19f8807ce87384cad18ca981e0792da35682",class:"sd-select-listbox",style:{"--listbox-trigger-width":this.triggerWidth??"200px","--listbox-max-width":this.maxWidth??"640px","--listbox-max-height":this.maxHeight??"260px","--listbox-radius":`${a.radius}px`}},this.showSearch&&i("sd-select-list-item-search",{key:"b950890a9138fa5ab7f0df7c1d07bbea65140e67",isScrolled:this.isScrolled,onSdSearchFilter:this.handleSearchFilter}),i("div",{key:"1aeaf552893becedf8394c1e9af8ef7119e70fdb",class:"sd-select-listbox__list",onScroll:this.handleScroll,ref:t=>{this.listEl=t}},this.showSelectAll&&i("sd-select-list-item",{key:"83329f2d454d116d64155ef8a83c076e27cdc7b0",option:t.SELECT_ALL_OPTION,depth:1,isSelected:this.selectAllState,isFocused:this.isOptionFocused(t.SELECT_ALL_OPTION),useCheckbox:!0,onSdListItemClick:this.handleSelectAllClick,onMouseEnter:()=>this.handleOptionHover(t.SELECT_ALL_OPTION)}),this.isEmpty?i("div",{class:"sd-select-listbox__empty"},d):this.isDepth?this.renderOptions(this.filteredOptions):this.filteredOptions.map((t=>i("sd-select-list-item",{option:t,depth:1,isSelected:this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)})))))}static get watchers(){return{searchKeyword:[{resetFocusOnFilter:0}]}}static get style(){return":host{display:block}:host .sd-select-listbox{display:flex;flex-direction:column;width:var(--listbox-trigger-width);max-width:var(--listbox-max-width);max-height:var(--listbox-max-height);border-radius:var(--listbox-radius);background:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);overflow:hidden;outline:none}:host .sd-select-listbox__list{flex:1;min-height:0;overflow-y:auto;padding-bottom:0}:host .sd-select-listbox__empty{padding:12px;text-align:center;font-size:12px;line-height:20px;color:#888888}"}},[513,"sd-select-listbox",{type:[1],options:[16],value:[8],emitValue:[4,"emit-value"],useSearch:[4,"use-search"],useSelectAll:[4,"use-select-all"],triggerWidth:[1,"trigger-width"],maxWidth:[1,"max-width"],maxHeight:[1,"max-height"],searchKeyword:[32],isScrolled:[32],focusedIndex:[32]},void 0,{searchKeyword:[{resetFocusOnFilter:0}]}]);function b(){"undefined"!=typeof customElements&&["sd-select-listbox","sd-checkbox","sd-icon","sd-select-list-item","sd-select-list-item-search"].forEach((t=>{switch(t){case"sd-select-listbox":customElements.get(h(t))||customElements.define(h(t),x);break;case"sd-checkbox":customElements.get(h(t))||u();break;case"sd-icon":customElements.get(h(t))||m();break;case"sd-select-list-item":customElements.get(h(t))||p();break;case"sd-select-list-item-search":customElements.get(h(t))||f()}}))}export{x as S,b as d}
1
+ import{p as t,H as s,c as e,h as i,t as h}from"./p-CEVDmQdt.js";import{c as o,d as l,f as r,i as n,e as c,E as d,g as u}from"./p-DvvGi4J_.js";import{d as a}from"./p-D3dq5pt5.js";import{d as m}from"./p-BnhzUsGP.js";import{d as p}from"./p-BSnINeoq.js";import{d as f}from"./p-DGBRubiD.js";const x=t(class t extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.optionSelect=e(this,"sdOptionSelect",7)}type="default";options=[];value=null;emitValue=!1;useSearch=!1;useSelectAll=!1;triggerWidth="200px";maxWidth="640px";maxHeight="260px";searchKeyword="";isScrolled=!1;focusedIndex=-1;optionSelect;listEl;lastScrolledIndex=-1;keydownAttached=!1;suppressHover=!1;get isDepth(){return"default_depth"===this.type||"multi_depth"===this.type}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}static SELECT_ALL_OPTION={value:"__select_all__",label:"전체"};get showSelectAll(){return this.useSelectAll&&this.isMulti&&this.getAllNonDisabledLeaves().length>0}getAllNonDisabledLeaves(){const t=s=>s.flatMap((s=>s.disabled?[]:s.children?t(s.children):[s]));return t(this.options)}get selectAllState(){if(!this.showSelectAll)return!1;const t=this.getAllNonDisabledLeaves();if(0===t.length)return!1;const s=this.getSelectedValues(),e=t.filter((t=>s.has(t.value))).length;return 0!==e&&(e===t.length||null)}get showSearch(){return!!this.useSearch&&(this.isDepth?o(this.options):this.options.length)>=l}get filteredOptions(){if(null==this.searchKeyword||""===this.searchKeyword)return this.options;if(this.isDepth)return r(this.options,this.searchKeyword);const t=this.searchKeyword.toLowerCase();return this.options.filter((s=>{const e=n(s.label)?c(s.label):s.label;return null!=e&&e.toLowerCase().includes(t)}))}get isEmpty(){return this.isDepth?0===o(this.filteredOptions)&&0===this.filteredOptions.length:0===this.filteredOptions.length}getSelectedValues(){return null!=this.value&&Array.isArray(this.value)?this.emitValue?new Set(this.value):new Set(this.value.map((t=>t.value))):new Set}isOptionSelected(t){return this.isMulti?this.getSelectedValues().has(t.value):this.emitValue||null==this.value||"object"!=typeof this.value||Array.isArray(this.value)?this.value===t.value:this.value.value===t.value}getGroupSelectionState(t){if(!this.isMulti||!t.children)return!1;const s=this.getSelectedValues();if(0===s.size)return!1;const e=this.collectVisibleLeaves(t);if(0===e.length)return!1;const i=e.filter((t=>s.has(t.value))).length;return 0!==i&&(i===e.length||null)}getCountInfo(t){if(!this.isMulti||!t.children)return;const s=this.getSelectedValues(),e=this.collectVisibleLeaves(t);return{selected:e.filter((t=>s.has(t.value))).length,total:e.length}}findOriginalOption(t,s){for(const e of s){if(e.value===t)return e;if(e.children){const s=this.findOriginalOption(t,e.children);if(s)return s}}}collectLeaves(t){return t.children?t.children.flatMap((t=>this.collectLeaves(t))):[t]}collectVisibleLeaves(t){if(t.disabled)return[];if(!t.children)return[t];if(0===t.children.length){const s=this.findOriginalOption(t.value,this.options);return s?this.collectLeaves(s).filter((t=>!t.disabled)):[]}return t.children.flatMap((t=>this.collectVisibleLeaves(t)))}get navigableOptions(){const s=[];this.showSelectAll&&s.push(t.SELECT_ALL_OPTION);const e=t=>{for(const i of t){const t=!!i.children;(!t||this.isMulti)&&!i.disabled&&s.push(i),t&&i.children&&i.children.length>0&&e(i.children)}};return e(this.filteredOptions),s}isSelectAllOption(s){return this.showSelectAll&&s.value===t.SELECT_ALL_OPTION.value}emitSelectAll(){if(!this.showSelectAll)return;const s=this.getAllNonDisabledLeaves();this.optionSelect.emit({option:{...t.SELECT_ALL_OPTION,children:s},leaves:s})}handleSelectAllClick=t=>{t.stopPropagation(),this.emitSelectAll()};isOptionFocused(t){if(this.focusedIndex<0)return!1;const s=this.navigableOptions[this.focusedIndex];return null!=s&&s.value===t.value}resetFocusOnFilter(){this.focusedIndex=this.navigableOptions.length>0?0:-1,this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}handleSearchFilter=t=>{this.searchKeyword=t.detail};handleScroll=t=>{this.isScrolled=t.target.scrollTop>0};emitOptionSelect(t){this.optionSelect.emit({option:t,leaves:this.collectVisibleLeaves(t)})}handleOptionClick=t=>{t.stopPropagation(),this.emitOptionSelect(t.detail)};handleOptionHover=t=>{if(this.suppressHover)return;const s=this.navigableOptions.findIndex((s=>s.value===t.value));s>=0&&(this.focusedIndex=s)};releaseHoverSuppress=()=>{this.suppressHover=!1,document.removeEventListener("mousemove",this.releaseHoverSuppress,!0)};handleKeyDown=t=>{const s=this.navigableOptions;if("ArrowDown"===t.key){if(0===s.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<0?0:(this.focusedIndex+1)%s.length,this.beginHoverSuppression()}else if("ArrowUp"===t.key){if(0===s.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<=0?s.length-1:this.focusedIndex-1,this.beginHoverSuppression()}else if("Enter"===t.key){if(this.focusedIndex<0||this.focusedIndex>=s.length)return;t.preventDefault(),t.stopPropagation();const e=s[this.focusedIndex];this.isSelectAllOption(e)?this.emitSelectAll():this.emitOptionSelect(e)}};beginHoverSuppression(){this.suppressHover||(this.suppressHover=!0,document.addEventListener("mousemove",this.releaseHoverSuppress,!0))}scrollFocusedIntoView(){const t=this.listEl,s=t?.querySelector(".sd-select-list-item--focused");if(!t||!s)return;const e=t.getBoundingClientRect(),i=s.getBoundingClientRect();i.top<e.top?t.scrollTop+=i.top-e.top:i.bottom>e.bottom&&(t.scrollTop+=i.bottom-e.bottom)}connectedCallback(){this.keydownAttached||(document.addEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!0)}disconnectedCallback(){this.keydownAttached&&(document.removeEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!1),this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}componentDidRender(){this.focusedIndex!==this.lastScrolledIndex&&(this.lastScrolledIndex=this.focusedIndex,this.focusedIndex>=0&&this.scrollFocusedIntoView())}renderOptions(t,s=1){return t.map((t=>{const e=!!t.children;return[i("sd-select-list-item",{option:t,depth:s,isSelected:e?this.getGroupSelectionState(t):this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,countInfo:this.getCountInfo(t),onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)}),e&&t.children?this.renderOptions(t.children,s+1):null]}))}render(){return i("div",{key:"bb8c7f22a164d29e30d2f9da7740883daef4fc27",class:"sd-select-listbox",style:{"--listbox-trigger-width":this.triggerWidth??"200px","--listbox-max-width":this.maxWidth??"640px","--listbox-max-height":this.maxHeight??"260px","--listbox-radius":`${u.radius}px`}},this.showSearch&&i("sd-select-list-item-search",{key:"ac1b06b12ec20d2b9d57ca3b4074b3752b5da5e1",isScrolled:this.isScrolled,onSdSearchFilter:this.handleSearchFilter}),i("div",{key:"2c7735e7098090762f573d63c2673d6face702c1",class:"sd-select-listbox__list",onScroll:this.handleScroll,ref:t=>{this.listEl=t}},this.showSelectAll&&i("sd-select-list-item",{key:"5377511fd55f0d34056ad64707265dd2cc86afc4",option:t.SELECT_ALL_OPTION,depth:1,isSelected:this.selectAllState,isFocused:this.isOptionFocused(t.SELECT_ALL_OPTION),useCheckbox:!0,onSdListItemClick:this.handleSelectAllClick,onMouseEnter:()=>this.handleOptionHover(t.SELECT_ALL_OPTION)}),this.isEmpty?i("div",{class:"sd-select-listbox__empty"},d):this.isDepth?this.renderOptions(this.filteredOptions):this.filteredOptions.map((t=>i("sd-select-list-item",{option:t,depth:1,isSelected:this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)})))))}static get watchers(){return{searchKeyword:[{resetFocusOnFilter:0}]}}static get style(){return":host{display:block}:host .sd-select-listbox{display:flex;flex-direction:column;width:var(--listbox-trigger-width);max-width:var(--listbox-max-width);max-height:var(--listbox-max-height);border-radius:var(--listbox-radius);background:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);overflow:hidden;outline:none}:host .sd-select-listbox__list{flex:1;min-height:0;overflow-y:auto;padding-bottom:0}:host .sd-select-listbox__empty{padding:12px;text-align:center;font-size:12px;line-height:20px;color:#888888}"}},[513,"sd-select-listbox",{type:[1],options:[16],value:[8],emitValue:[4,"emit-value"],useSearch:[4,"use-search"],useSelectAll:[4,"use-select-all"],triggerWidth:[1,"trigger-width"],maxWidth:[1,"max-width"],maxHeight:[1,"max-height"],searchKeyword:[32],isScrolled:[32],focusedIndex:[32]},void 0,{searchKeyword:[{resetFocusOnFilter:0}]}]);function b(){"undefined"!=typeof customElements&&["sd-select-listbox","sd-checkbox","sd-icon","sd-select-list-item","sd-select-list-item-search"].forEach((t=>{switch(t){case"sd-select-listbox":customElements.get(h(t))||customElements.define(h(t),x);break;case"sd-checkbox":customElements.get(h(t))||a();break;case"sd-icon":customElements.get(h(t))||m();break;case"sd-select-list-item":customElements.get(h(t))||p();break;case"sd-select-list-item-search":customElements.get(h(t))||f()}}))}export{x as S,b as d}
@@ -1 +1 @@
1
- import{p as e,H as t,c as s,h as i,t as l}from"./p-CEVDmQdt.js";import{L as c,i as d,a as o,b as r}from"./p-DvvGi4J_.js";import{s as m}from"./p-BE4tnQ2Z.js";import{d as a}from"./p-D3dq5pt5.js";import{d as h}from"./p-BnhzUsGP.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.listItemClick=s(this,"sdListItemClick",7)}option;depth=1;isSelected=!1;isFocused=!1;useCheckbox=!1;countInfo;listItemClick;get isGroup(){return!!this.option.children}get isSelectable(){return!this.isGroup||this.useCheckbox}get depthKey(){return this.depth<=1?"depth1":2===this.depth?"depth2":"depth3"}get paddingLeft(){return`${c.paddingLeft[this.depthKey]}px`}handleClick=e=>{e.stopPropagation(),!this.option.disabled&&this.isSelectable&&this.listItemClick.emit(this.option)};handleCheckboxClick=e=>{e.stopPropagation()};handleCheckboxUpdate=e=>{e.stopPropagation(),!this.option.disabled&&this.isSelectable&&this.listItemClick.emit(this.option)};render(){const e=this.isGroup,t=e&&1===this.depth,s=e&&2===this.depth,l={"--list-item-padding-y":`${c.paddingY}px`,"--list-item-padding-left":this.paddingLeft,"--list-item-padding-right":`${c.paddingRight}px`,"--list-item-gap":`${c.gap}px`,"--list-item-font-size":`${r.fontSize}px`,"--list-item-line-height":`${r.lineHeight}px`,"--list-item-font-weight":r.fontWeight,"--list-item-bg":t?o.depth1.bg:s?o.depth2.bg:o.bg.default,"--list-item-bg-hover":o.bg.hover,"--list-item-color":o.content.default,"--list-item-color-hover":o.content.hover,"--list-item-color-disabled":o.content.disabled,"--list-item-color-selected":o.content.selected,"--list-item-font-weight-selected":r.selectedFontWeight};return t&&(l["--list-item-border-top"]=`${o.depth1.borderWidth}px solid ${o.depth1.border}`),i("div",{key:"2bec32f64859ef0e39928d4288cba3c727e16cf1",role:"option",tabindex:-1,"aria-selected":!0===this.isSelected?"true":"false",class:{"sd-select-list-item":!0,"sd-select-list-item--group":e,"sd-select-list-item--depth1-group":t,"sd-select-list-item--depth2-group":s,"sd-select-list-item--selected":!0===this.isSelected,"sd-select-list-item--indeterminate":null===this.isSelected,"sd-select-list-item--focused":this.isFocused,"sd-select-list-item--selectable":this.isSelectable&&!this.option.disabled,"sd-select-list-item--disabled":!!this.option.disabled},style:l,onClick:this.handleClick},this.useCheckbox&&i("sd-checkbox",{key:"fb6d2ed50e6d24d0491200b5be2cb3ab97df1b04",value:null===this.isSelected?null:!!this.isSelected,disabled:this.option.disabled,inverse:this.isFocused&&!1!==this.isSelected,class:"sd-select-list-item__checkbox",onClick:this.handleCheckboxClick,onSdUpdate:this.handleCheckboxUpdate}),d(this.option.label)?i("span",{class:"sd-select-list-item__label",ref:e=>e&&(e.innerHTML=m(this.option.label))}):i("span",{class:"sd-select-list-item__label"},this.option.label),this.countInfo&&i("span",{key:"52162297e94d672128ea0a2343c6baf6e04ee78c",class:"sd-select-list-item__count"},"(",this.countInfo.selected,"/",this.countInfo.total,")"))}static get style(){return"sd-select-list-item{display:block}sd-select-list-item .sd-select-list-item{display:flex;align-items:center;gap:var(--list-item-gap);padding:var(--list-item-padding-y) var(--list-item-padding-right) var(--list-item-padding-y) var(--list-item-padding-left);font-size:var(--list-item-font-size);line-height:var(--list-item-line-height);font-weight:var(--list-item-font-weight);background:var(--list-item-bg);color:var(--list-item-color);cursor:default;user-select:none}sd-select-list-item .sd-select-list-item--selectable{cursor:pointer}sd-select-list-item .sd-select-list-item--depth1-group{border-top:var(--list-item-border-top);font-weight:700}sd-select-list-item .sd-select-list-item--depth2-group{font-weight:500}sd-select-list-item .sd-select-list-item--focused.sd-select-list-item--selectable:not(.sd-select-list-item--disabled){background:var(--list-item-bg-hover);color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--selected:not(.sd-select-list-item--group){font-weight:var(--list-item-font-weight-selected);color:var(--list-item-color-selected)}sd-select-list-item .sd-select-list-item--selected.sd-select-list-item--focused{color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--disabled{color:var(--list-item-color-disabled);cursor:not-allowed}sd-select-list-item .sd-select-list-item__label{flex:0 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-list-item .sd-select-list-item__count{flex-shrink:0;font-weight:500;color:var(--list-item-color-disabled)}sd-select-list-item .sd-select-list-item--group.sd-select-list-item--focused .sd-select-list-item__count{color:#ffffff}sd-select-list-item .sd-select-list-item__checkbox{flex-shrink:0}"}},[512,"sd-select-list-item",{option:[16],depth:[2],isSelected:[4,"is-selected"],isFocused:[4,"is-focused"],useCheckbox:[4,"use-checkbox"],countInfo:[16]}]);function p(){"undefined"!=typeof customElements&&["sd-select-list-item","sd-checkbox","sd-icon"].forEach((e=>{switch(e){case"sd-select-list-item":customElements.get(l(e))||customElements.define(l(e),n);break;case"sd-checkbox":customElements.get(l(e))||a();break;case"sd-icon":customElements.get(l(e))||h()}}))}export{n as S,p as d}
1
+ import{p as t,H as e,c as s,h as i,t as l}from"./p-CEVDmQdt.js";import{L as c,i as d,a as o,b as r}from"./p-DvvGi4J_.js";import{s as m}from"./p-BE4tnQ2Z.js";import{d as a}from"./p-D3dq5pt5.js";import{d as h}from"./p-BnhzUsGP.js";const n=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.listItemClick=s(this,"sdListItemClick",7)}option;depth=1;isSelected=!1;isFocused=!1;useCheckbox=!1;countInfo;listItemClick;get isGroup(){return!!this.option.children}get isSelectable(){return!this.isGroup||this.useCheckbox}get depthKey(){return this.depth<=1?"depth1":2===this.depth?"depth2":"depth3"}get paddingLeft(){return`${c.paddingLeft[this.depthKey]}px`}handleClick=t=>{t.stopPropagation(),!this.option.disabled&&this.isSelectable&&this.listItemClick.emit(this.option)};handleCheckboxClick=t=>{t.stopPropagation()};handleCheckboxUpdate=t=>{t.stopPropagation(),!this.option.disabled&&this.isSelectable&&this.listItemClick.emit(this.option)};render(){const t=this.isGroup,e=t&&1===this.depth,s=t&&2===this.depth,l={"--list-item-padding-y":`${c.paddingY}px`,"--list-item-padding-left":this.paddingLeft,"--list-item-padding-right":`${c.paddingRight}px`,"--list-item-gap":`${c.gap}px`,"--list-item-font-size":`${r.fontSize}px`,"--list-item-line-height":`${r.lineHeight}px`,"--list-item-font-weight":r.fontWeight,"--list-item-bg":e?o.depth1.bg:s?o.depth2.bg:o.bg.default,"--list-item-bg-hover":o.bg.hover,"--list-item-color":o.content.default,"--list-item-color-hover":o.content.hover,"--list-item-color-disabled":o.content.disabled,"--list-item-color-selected":o.content.selected,"--list-item-font-weight-selected":r.selectedFontWeight};return e&&(l["--list-item-border-top"]=`${o.depth1.borderWidth}px solid ${o.depth1.border}`),i("div",{key:"ffd420e1d1a6ff395ed3fff94cbaba66f71644ac",role:"option",tabindex:-1,"aria-selected":!0===this.isSelected?"true":"false",class:{"sd-select-list-item":!0,"sd-select-list-item--group":t,"sd-select-list-item--depth1-group":e,"sd-select-list-item--depth2-group":s,"sd-select-list-item--selected":!0===this.isSelected,"sd-select-list-item--indeterminate":null===this.isSelected,"sd-select-list-item--focused":this.isFocused,"sd-select-list-item--selectable":this.isSelectable&&!this.option.disabled,"sd-select-list-item--disabled":!!this.option.disabled},style:l,onClick:this.handleClick},this.useCheckbox&&i("sd-checkbox",{key:"4bc492e2021f255cb87344bd0498023b50d89c8a",value:null===this.isSelected?null:!!this.isSelected,disabled:this.option.disabled,inverse:this.isFocused&&!1!==this.isSelected,class:"sd-select-list-item__checkbox",onClick:this.handleCheckboxClick,onSdUpdate:this.handleCheckboxUpdate}),d(this.option.label)?i("span",{class:"sd-select-list-item__label",ref:t=>t&&(t.innerHTML=m(this.option.label))}):i("span",{class:"sd-select-list-item__label"},this.option.label),this.countInfo&&i("span",{key:"34a7671fa3f6ec1bff7c302f02bb4bfd7a113ce5",class:"sd-select-list-item__count"},"(",this.countInfo.selected,"/",this.countInfo.total,")"))}static get style(){return"sd-select-list-item{display:block}sd-select-list-item .sd-select-list-item{display:flex;align-items:center;gap:var(--list-item-gap);padding:var(--list-item-padding-y) var(--list-item-padding-right) var(--list-item-padding-y) var(--list-item-padding-left);font-size:var(--list-item-font-size);line-height:var(--list-item-line-height);font-weight:var(--list-item-font-weight);background:var(--list-item-bg);color:var(--list-item-color);cursor:default;user-select:none}sd-select-list-item .sd-select-list-item--selectable{cursor:pointer}sd-select-list-item .sd-select-list-item--depth1-group{border-top:var(--list-item-border-top);font-weight:700}sd-select-list-item .sd-select-list-item--depth2-group{font-weight:500}sd-select-list-item .sd-select-list-item--focused.sd-select-list-item--selectable:not(.sd-select-list-item--disabled){background:var(--list-item-bg-hover);color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--selected:not(.sd-select-list-item--group){font-weight:var(--list-item-font-weight-selected);color:var(--list-item-color-selected)}sd-select-list-item .sd-select-list-item--selected.sd-select-list-item--focused{color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--disabled{color:var(--list-item-color-disabled);cursor:not-allowed}sd-select-list-item .sd-select-list-item__label{flex:0 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-list-item .sd-select-list-item__count{flex-shrink:0;font-weight:500;color:var(--list-item-color-disabled)}sd-select-list-item .sd-select-list-item--group.sd-select-list-item--focused .sd-select-list-item__count{color:#ffffff}sd-select-list-item .sd-select-list-item__checkbox{flex-shrink:0}"}},[512,"sd-select-list-item",{option:[16],depth:[2],isSelected:[4,"is-selected"],isFocused:[4,"is-focused"],useCheckbox:[4,"use-checkbox"],countInfo:[16]}]);function p(){"undefined"!=typeof customElements&&["sd-select-list-item","sd-checkbox","sd-icon"].forEach((t=>{switch(t){case"sd-select-list-item":customElements.get(l(t))||customElements.define(l(t),n);break;case"sd-checkbox":customElements.get(l(t))||a();break;case"sd-icon":customElements.get(l(t))||h()}}))}export{n as S,p as d}
@@ -1 +1 @@
1
- import{p as t,H as i,c as n,h as a,F as e,t as s}from"./p-CEVDmQdt.js";import{d as o}from"./p-BnhzUsGP.js";var g={default:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",lineHeight:"20"},selected:{fontWeight:"700"}},d={bg:{hover:"#EEEEEE",selected:"#E6F1FF"},content:{default:"#555555",hover:"#004290",selected:"#004290"}};const r={height:`${"24"}px`,paddingX:`${"6"}px`,radius:`${"6"}px`,gap:`${"12"}px`,moveGap:`${{gap:"4"}.gap}px`,iconSize:Number("12")},p={fontFamily:g.default.fontFamily,fontSize:`${g.default.fontSize}px`,lineHeight:`${g.default.lineHeight}px`,fontWeightDefault:g.default.fontWeight,fontWeightSelected:g.selected.fontWeight},h={contentDefault:d.content.default,contentHover:d.content.hover,contentSelected:d.content.selected,bgHover:d.bg.hover,bgSelected:d.bg.selected,iconDefault:"#888888"},l=10,c={1:24,2:34,3:40,4:48,5:56},u=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.pageChange=n(this,"sdPageChange",7)}currentPage=1;lastPage=1;simple=!1;pageChange;get pageNumbers(){const t=Math.floor((this.currentPage-1)/l)*l+1,i=Math.min(t+l-1,this.lastPage);return Array.from({length:i-t+1},((i,n)=>t+n))}get buttonWidth(){const t=(this.pageNumbers.at(-1)??1).toString().length;return c[t]||c[1]}get isFirstGroup(){return this.currentPage<=l}get isLastGroup(){return Math.floor((this.currentPage-1)/l)*l+1+l-1>=this.lastPage}handlePageChange=t=>{t<1||t>this.lastPage||(this.currentPage=t,this.pageChange.emit(t))};handleGroupChange=t=>{const i=Math.min(Math.max(this.currentPage+("forward"===t?l:-10),1),this.lastPage);this.handlePageChange(i)};renderNavButton(t,i,n){return a("button",{type:"button",class:"sd-pagination__nav","aria-label":i,onClick:n},a("sd-icon",{name:t,size:r.iconSize,color:h.iconDefault}))}renderPrevButtons(){return this.simple?this.currentPage<=1?null:a(e,null,this.renderNavButton("chevronLeftEnd","Go to first page",(()=>this.handlePageChange(1))),this.renderNavButton("chevronLeft","Go to previous page",(()=>this.handlePageChange(this.currentPage-1)))):this.isFirstGroup?null:a(e,null,this.renderNavButton("chevronLeftEnd","Go to first page",(()=>this.handlePageChange(1))),this.renderNavButton("chevronLeft","Go to previous page group",(()=>this.handleGroupChange("backward"))))}renderNextButtons(){return this.simple?this.currentPage>=this.lastPage?null:a(e,null,this.renderNavButton("chevronRight","Go to next page",(()=>this.handlePageChange(this.currentPage+1))),this.renderNavButton("chevronRightEnd","Go to last page",(()=>this.handlePageChange(this.lastPage)))):this.isLastGroup?null:a(e,null,this.renderNavButton("chevronRight","Go to next page group",(()=>this.handleGroupChange("forward"))),this.renderNavButton("chevronRightEnd","Go to last page",(()=>this.handlePageChange(this.lastPage))))}render(){return a("div",{key:"5a1ebb6aeb6732cd3b6133cedba47aeedf620291",class:{"sd-pagination":!0,"sd-pagination--simple":this.simple},style:{"--sd-pagination-height":r.height,"--sd-pagination-padding-x":r.paddingX,"--sd-pagination-radius":r.radius,"--sd-pagination-gap":r.gap,"--sd-pagination-move-gap":r.moveGap,"--sd-pagination-font-family":p.fontFamily,"--sd-pagination-font-size":p.fontSize,"--sd-pagination-line-height":p.lineHeight,"--sd-pagination-font-weight-default":p.fontWeightDefault,"--sd-pagination-font-weight-selected":p.fontWeightSelected,"--sd-pagination-content":h.contentDefault,"--sd-pagination-content-hover":h.contentHover,"--sd-pagination-content-selected":h.contentSelected,"--sd-pagination-bg-hover":h.bgHover,"--sd-pagination-bg-selected":h.bgSelected,"--sd-pagination-item-width":`${this.buttonWidth}px`}},a("div",{key:"a4856d8ffde66402eae909ad9f636f3b13f1b5d7",class:"sd-pagination__group sd-pagination__group--prev"},this.renderPrevButtons()),this.simple?a("div",{class:"sd-pagination__info"},a("span",{class:"sd-pagination__current"},this.currentPage),a("span",{class:"sd-pagination__divider"},"/"),a("span",{class:"sd-pagination__last"},this.lastPage)):a("div",{class:"sd-pagination__numbers"},this.pageNumbers.map((t=>a("button",{type:"button","aria-current":this.currentPage===t?"page":void 0,class:{"sd-pagination__item":!0,"sd-pagination__item--selected":this.currentPage===t},onClick:()=>this.handlePageChange(t)},t)))),a("div",{key:"fd1d6d0ba1c143ca4f9692f1c604f0e0fc0730db",class:"sd-pagination__group sd-pagination__group--next"},this.renderNextButtons()))}static get style(){return"sd-pagination{display:inline-flex}.sd-pagination{display:inline-flex;align-items:center;gap:var(--sd-pagination-gap);font-family:var(--sd-pagination-font-family)}.sd-pagination__group{display:inline-flex;align-items:center;gap:var(--sd-pagination-move-gap);min-width:calc(var(--sd-pagination-height) * 2 + var(--sd-pagination-move-gap))}.sd-pagination__group--prev{justify-content:flex-end}.sd-pagination__group--next{justify-content:flex-start}.sd-pagination__numbers{display:inline-flex;align-items:center;gap:var(--sd-pagination-move-gap)}.sd-pagination__nav{display:inline-flex;align-items:center;justify-content:center;width:var(--sd-pagination-height);height:var(--sd-pagination-height);padding:0;background:transparent;border:0;border-radius:var(--sd-pagination-radius);cursor:pointer;outline:none}.sd-pagination__nav:hover{background-color:var(--sd-pagination-bg-hover)}.sd-pagination__item{display:inline-flex;align-items:center;justify-content:center;width:var(--sd-pagination-item-width);height:var(--sd-pagination-height);padding:0 var(--sd-pagination-padding-x);background:transparent;border:0;border-radius:var(--sd-pagination-radius);color:var(--sd-pagination-content);font-size:var(--sd-pagination-font-size);font-weight:var(--sd-pagination-font-weight-default);line-height:var(--sd-pagination-line-height);cursor:pointer;outline:none;box-sizing:border-box}.sd-pagination__item:hover{background-color:var(--sd-pagination-bg-hover);color:var(--sd-pagination-content-hover)}.sd-pagination__item--selected{background-color:var(--sd-pagination-bg-selected);color:var(--sd-pagination-content-selected);font-weight:var(--sd-pagination-font-weight-selected)}.sd-pagination__item--selected:hover{background-color:var(--sd-pagination-bg-selected);color:var(--sd-pagination-content-selected)}.sd-pagination__info{display:inline-flex;align-items:center;gap:var(--sd-pagination-move-gap);height:var(--sd-pagination-height);padding:0 var(--sd-pagination-padding-x);color:var(--sd-pagination-content);font-size:var(--sd-pagination-font-size);font-weight:var(--sd-pagination-font-weight-default);line-height:var(--sd-pagination-line-height)}.sd-pagination__current{color:var(--sd-pagination-content-selected);font-weight:var(--sd-pagination-font-weight-selected)}"}},[512,"sd-pagination",{currentPage:[1026,"current-page"],lastPage:[2,"last-page"],simple:[4]}]);function f(){"undefined"!=typeof customElements&&["sd-pagination","sd-icon"].forEach((t=>{switch(t){case"sd-pagination":customElements.get(s(t))||customElements.define(s(t),u);break;case"sd-icon":customElements.get(s(t))||o()}}))}export{u as S,f as d}
1
+ import{p as t,H as i,c as n,h as a,F as e,t as s}from"./p-CEVDmQdt.js";import{d as o}from"./p-BnhzUsGP.js";var g={default:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",lineHeight:"20"},selected:{fontWeight:"700"}},r={bg:{hover:"#EEEEEE",selected:"#E6F1FF"},content:{default:"#555555",hover:"#004290",selected:"#004290"}};const d={height:`${"24"}px`,paddingX:`${"6"}px`,radius:`${"6"}px`,gap:`${"12"}px`,moveGap:`${{gap:"4"}.gap}px`,iconSize:Number("12")},p={fontFamily:g.default.fontFamily,fontSize:`${g.default.fontSize}px`,lineHeight:`${g.default.lineHeight}px`,fontWeightDefault:g.default.fontWeight,fontWeightSelected:g.selected.fontWeight},h={contentDefault:r.content.default,contentHover:r.content.hover,contentSelected:r.content.selected,bgHover:r.bg.hover,bgSelected:r.bg.selected,iconDefault:"#888888"},l=10,c={1:24,2:34,3:40,4:48,5:56},u=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.pageChange=n(this,"sdPageChange",7)}currentPage=1;lastPage=1;simple=!1;pageChange;get pageNumbers(){const t=Math.floor((this.currentPage-1)/l)*l+1,i=Math.min(t+l-1,this.lastPage);return Array.from({length:i-t+1},((i,n)=>t+n))}get buttonWidth(){const t=(this.pageNumbers.at(-1)??1).toString().length;return c[t]||c[1]}get isFirstGroup(){return this.currentPage<=l}get isLastGroup(){return Math.floor((this.currentPage-1)/l)*l+1+l-1>=this.lastPage}handlePageChange=t=>{t<1||t>this.lastPage||(this.currentPage=t,this.pageChange.emit(t))};handleGroupChange=t=>{const i=Math.min(Math.max(this.currentPage+("forward"===t?l:-10),1),this.lastPage);this.handlePageChange(i)};renderNavButton(t,i,n){return a("button",{type:"button",class:"sd-pagination__nav","aria-label":i,onClick:n},a("sd-icon",{name:t,size:d.iconSize,color:h.iconDefault}))}renderPrevButtons(){return this.simple?this.currentPage<=1?null:a(e,null,this.renderNavButton("chevronLeftEnd","Go to first page",(()=>this.handlePageChange(1))),this.renderNavButton("chevronLeft","Go to previous page",(()=>this.handlePageChange(this.currentPage-1)))):this.isFirstGroup?null:a(e,null,this.renderNavButton("chevronLeftEnd","Go to first page",(()=>this.handlePageChange(1))),this.renderNavButton("chevronLeft","Go to previous page group",(()=>this.handleGroupChange("backward"))))}renderNextButtons(){return this.simple?this.currentPage>=this.lastPage?null:a(e,null,this.renderNavButton("chevronRight","Go to next page",(()=>this.handlePageChange(this.currentPage+1))),this.renderNavButton("chevronRightEnd","Go to last page",(()=>this.handlePageChange(this.lastPage)))):this.isLastGroup?null:a(e,null,this.renderNavButton("chevronRight","Go to next page group",(()=>this.handleGroupChange("forward"))),this.renderNavButton("chevronRightEnd","Go to last page",(()=>this.handlePageChange(this.lastPage))))}render(){return a("div",{key:"1ab90aa479a2ec1985a79efbcb48f0453ce670a9",class:{"sd-pagination":!0,"sd-pagination--simple":this.simple},style:{"--sd-pagination-height":d.height,"--sd-pagination-padding-x":d.paddingX,"--sd-pagination-radius":d.radius,"--sd-pagination-gap":d.gap,"--sd-pagination-move-gap":d.moveGap,"--sd-pagination-font-family":p.fontFamily,"--sd-pagination-font-size":p.fontSize,"--sd-pagination-line-height":p.lineHeight,"--sd-pagination-font-weight-default":p.fontWeightDefault,"--sd-pagination-font-weight-selected":p.fontWeightSelected,"--sd-pagination-content":h.contentDefault,"--sd-pagination-content-hover":h.contentHover,"--sd-pagination-content-selected":h.contentSelected,"--sd-pagination-bg-hover":h.bgHover,"--sd-pagination-bg-selected":h.bgSelected,"--sd-pagination-item-width":`${this.buttonWidth}px`}},a("div",{key:"d5e9fdd9f221536f5eb404095b2b6d052aaa6a9e",class:"sd-pagination__group sd-pagination__group--prev"},this.renderPrevButtons()),this.simple?a("div",{class:"sd-pagination__info"},a("span",{class:"sd-pagination__current"},this.currentPage),a("span",{class:"sd-pagination__divider"},"/"),a("span",{class:"sd-pagination__last"},this.lastPage)):a("div",{class:"sd-pagination__numbers"},this.pageNumbers.map((t=>a("button",{type:"button","aria-current":this.currentPage===t?"page":void 0,class:{"sd-pagination__item":!0,"sd-pagination__item--selected":this.currentPage===t},onClick:()=>this.handlePageChange(t)},t)))),a("div",{key:"a48d39b7db769a39f58e4b399aa7bb1d15748934",class:"sd-pagination__group sd-pagination__group--next"},this.renderNextButtons()))}static get style(){return"sd-pagination{display:inline-flex}.sd-pagination{display:inline-flex;align-items:center;gap:var(--sd-pagination-gap);font-family:var(--sd-pagination-font-family)}.sd-pagination__group{display:inline-flex;align-items:center;gap:var(--sd-pagination-move-gap);min-width:calc(var(--sd-pagination-height) * 2 + var(--sd-pagination-move-gap))}.sd-pagination__group--prev{justify-content:flex-end}.sd-pagination__group--next{justify-content:flex-start}.sd-pagination__numbers{display:inline-flex;align-items:center;gap:var(--sd-pagination-move-gap)}.sd-pagination__nav{display:inline-flex;align-items:center;justify-content:center;width:var(--sd-pagination-height);height:var(--sd-pagination-height);padding:0;background:transparent;border:0;border-radius:var(--sd-pagination-radius);cursor:pointer;outline:none}.sd-pagination__nav:hover{background-color:var(--sd-pagination-bg-hover)}.sd-pagination__item{display:inline-flex;align-items:center;justify-content:center;width:var(--sd-pagination-item-width);height:var(--sd-pagination-height);padding:0 var(--sd-pagination-padding-x);background:transparent;border:0;border-radius:var(--sd-pagination-radius);color:var(--sd-pagination-content);font-size:var(--sd-pagination-font-size);font-weight:var(--sd-pagination-font-weight-default);line-height:var(--sd-pagination-line-height);cursor:pointer;outline:none;box-sizing:border-box}.sd-pagination__item:hover{background-color:var(--sd-pagination-bg-hover);color:var(--sd-pagination-content-hover)}.sd-pagination__item--selected{background-color:var(--sd-pagination-bg-selected);color:var(--sd-pagination-content-selected);font-weight:var(--sd-pagination-font-weight-selected)}.sd-pagination__item--selected:hover{background-color:var(--sd-pagination-bg-selected);color:var(--sd-pagination-content-selected)}.sd-pagination__info{display:inline-flex;align-items:center;gap:var(--sd-pagination-move-gap);height:var(--sd-pagination-height);padding:0 var(--sd-pagination-padding-x);color:var(--sd-pagination-content);font-size:var(--sd-pagination-font-size);font-weight:var(--sd-pagination-font-weight-default);line-height:var(--sd-pagination-line-height)}.sd-pagination__current{color:var(--sd-pagination-content-selected);font-weight:var(--sd-pagination-font-weight-selected)}"}},[512,"sd-pagination",{currentPage:[1026,"current-page"],lastPage:[2,"last-page"],simple:[4]}]);function v(){"undefined"!=typeof customElements&&["sd-pagination","sd-icon"].forEach((t=>{switch(t){case"sd-pagination":customElements.get(s(t))||customElements.define(s(t),u);break;case"sd-icon":customElements.get(s(t))||o()}}))}export{u as S,v as d}