@sellmate/design-system 1.0.56 → 1.0.57

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 (126) hide show
  1. package/dist/cjs/design-system.cjs.js +1 -1
  2. package/dist/cjs/index.cjs.js +54 -16
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/sd-action-modal.cjs.entry.js +1 -1
  5. package/dist/cjs/sd-button_4.cjs.entry.js +1 -1
  6. package/dist/cjs/sd-calendar.cjs.entry.js +4 -4
  7. package/dist/cjs/sd-checkbox.cjs.entry.js +1 -1
  8. package/dist/cjs/sd-date-box.cjs.entry.js +2 -2
  9. package/dist/cjs/sd-form.cjs.entry.js +1 -1
  10. package/dist/cjs/sd-loading-spinner_3.cjs.entry.js +1 -1
  11. package/dist/cjs/sd-modal-container.cjs.entry.js +13 -10
  12. package/dist/cjs/sd-radio-button-group.cjs.entry.js +1 -1
  13. package/dist/cjs/sd-radio-group.cjs.entry.js +1 -1
  14. package/dist/cjs/sd-radio.cjs.entry.js +1 -1
  15. package/dist/cjs/sd-select-multiple-group.cjs.entry.js +1 -1
  16. package/dist/cjs/sd-table.cjs.entry.js +4 -4
  17. package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
  18. package/dist/collection/collection-manifest.json +1 -1
  19. package/dist/collection/components/sd-action-modal/sd-action-modal.js +1 -1
  20. package/dist/collection/components/sd-button/sd-button.js +1 -1
  21. package/dist/collection/components/sd-calendar/sd-calendar.js +4 -4
  22. package/dist/collection/components/sd-checkbox/sd-checkbox.js +1 -1
  23. package/dist/collection/components/sd-date-box/sd-date-box.js +2 -2
  24. package/dist/collection/components/sd-form/sd-form.js +1 -1
  25. package/dist/collection/components/sd-modal-container/sd-modal-container.js +50 -22
  26. package/dist/collection/components/sd-radio/sd-radio.js +1 -1
  27. package/dist/collection/components/sd-radio-button-group/sd-radio-button-group.js +1 -1
  28. package/dist/collection/components/sd-radio-group/sd-radio-group.js +1 -1
  29. package/dist/collection/components/sd-select/sd-select.js +1 -1
  30. package/dist/collection/components/sd-select-multiple-group/sd-select-multiple-group.js +1 -1
  31. package/dist/collection/components/sd-table/sd-table.js +4 -4
  32. package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
  33. package/dist/collection/index.js +1 -1
  34. package/dist/collection/utils/modal.js +52 -16
  35. package/dist/components/index.js +1 -1
  36. package/dist/components/{p-CqzgCVtM.js → p-B9t9pwo_.js} +1 -1
  37. package/dist/components/{p-Drngu_DV.js → p-BM4qDFZj.js} +1 -1
  38. package/dist/components/{p-5a-vaX0a.js → p-BR0LWoJL.js} +1 -1
  39. package/dist/components/{p-0zA9F8Lm.js → p-C2uZkOBj.js} +1 -1
  40. package/dist/components/{p-C6WuqUWC.js → p-CDR-4auv.js} +1 -1
  41. package/dist/components/{p-AvVgx8d3.js → p-Cbtpfl9F.js} +1 -1
  42. package/dist/components/{p-t4yN2fpo.js → p-CmXAKr-2.js} +1 -1
  43. package/dist/components/{p-DsqyxLeH.js → p-CqU3a1re.js} +1 -1
  44. package/dist/components/{p-gwccuwWe.js → p-DCJWAesd.js} +1 -1
  45. package/dist/components/{p-gOEtvhSH.js → p-DXAB0k9r.js} +1 -1
  46. package/dist/components/{p-CUDww9I2.js → p-DxzIjbQJ.js} +1 -1
  47. package/dist/components/{p-BNZuZ-DC.js → p-IRd25v7v.js} +1 -1
  48. package/dist/components/{p-CZWF0Ha8.js → p-iZSyoiHU.js} +1 -1
  49. package/dist/components/{p-DnZZMuzX.js → p-mnDAufNv.js} +1 -1
  50. package/dist/components/{p-uv1FQPWY.js → p-w3CsjVGg.js} +1 -1
  51. package/dist/components/sd-action-modal.js +1 -1
  52. package/dist/components/sd-barcode-input.js +1 -1
  53. package/dist/components/sd-button.js +1 -1
  54. package/dist/components/sd-calendar.js +1 -1
  55. package/dist/components/sd-checkbox.js +1 -1
  56. package/dist/components/sd-date-box.js +1 -1
  57. package/dist/components/sd-date-picker.js +1 -1
  58. package/dist/components/sd-date-range-picker.js +1 -1
  59. package/dist/components/sd-field.js +1 -1
  60. package/dist/components/sd-file-picker.js +1 -1
  61. package/dist/components/sd-form.js +1 -1
  62. package/dist/components/sd-guide.js +1 -1
  63. package/dist/components/sd-input.js +1 -1
  64. package/dist/components/sd-modal-container.js +1 -1
  65. package/dist/components/sd-number-input.js +1 -1
  66. package/dist/components/sd-popover.js +1 -1
  67. package/dist/components/sd-radio-button-group.js +1 -1
  68. package/dist/components/sd-radio-group.js +1 -1
  69. package/dist/components/sd-radio.js +1 -1
  70. package/dist/components/sd-select-dropdown.js +1 -1
  71. package/dist/components/sd-select-group.js +1 -1
  72. package/dist/components/sd-select-multiple-group.js +1 -1
  73. package/dist/components/sd-select-multiple.js +1 -1
  74. package/dist/components/sd-select-option-group.js +1 -1
  75. package/dist/components/sd-select-option.js +1 -1
  76. package/dist/components/sd-select-search-input.js +1 -1
  77. package/dist/components/sd-select-v2-list-item.js +1 -1
  78. package/dist/components/sd-select-v2-listbox.js +1 -1
  79. package/dist/components/sd-select-v2.js +1 -1
  80. package/dist/components/sd-select.js +1 -1
  81. package/dist/components/sd-table.js +1 -1
  82. package/dist/components/sd-tabs.js +1 -1
  83. package/dist/components/sd-textarea.js +1 -1
  84. package/dist/components/sd-tooltip.js +1 -1
  85. package/dist/design-system/design-system.esm.js +1 -1
  86. package/dist/design-system/index.esm.js +1 -1
  87. package/dist/design-system/{p-a873d717.entry.js → p-0c026571.entry.js} +1 -1
  88. package/dist/design-system/{p-d4f8e2f7.entry.js → p-10dd9343.entry.js} +1 -1
  89. package/dist/design-system/{p-4021d3f4.entry.js → p-2a25b3dc.entry.js} +1 -1
  90. package/dist/design-system/{p-cbe94549.entry.js → p-3686b44e.entry.js} +1 -1
  91. package/dist/design-system/{p-2909a0a3.entry.js → p-43512d46.entry.js} +1 -1
  92. package/dist/design-system/{p-fa68e96d.entry.js → p-74079256.entry.js} +1 -1
  93. package/dist/design-system/{p-7ce03e1c.entry.js → p-7a18a52b.entry.js} +1 -1
  94. package/dist/design-system/{p-7c48affc.entry.js → p-85e22acd.entry.js} +1 -1
  95. package/dist/design-system/{p-f2021df6.entry.js → p-a7e4994e.entry.js} +1 -1
  96. package/dist/design-system/p-aedd45f7.entry.js +1 -0
  97. package/dist/design-system/{p-a1b190f0.entry.js → p-cee768a2.entry.js} +1 -1
  98. package/dist/design-system/{p-f465c79d.entry.js → p-d5b5cfc7.entry.js} +1 -1
  99. package/dist/design-system/{p-5bd180a0.entry.js → p-eb11f6cc.entry.js} +1 -1
  100. package/dist/design-system/{p-1e14fb6b.entry.js → p-fdf7ed87.entry.js} +1 -1
  101. package/dist/esm/design-system.js +1 -1
  102. package/dist/esm/index.js +53 -17
  103. package/dist/esm/loader.js +1 -1
  104. package/dist/esm/sd-action-modal.entry.js +1 -1
  105. package/dist/esm/sd-button_4.entry.js +1 -1
  106. package/dist/esm/sd-calendar.entry.js +4 -4
  107. package/dist/esm/sd-checkbox.entry.js +1 -1
  108. package/dist/esm/sd-date-box.entry.js +2 -2
  109. package/dist/esm/sd-form.entry.js +1 -1
  110. package/dist/esm/sd-loading-spinner_3.entry.js +1 -1
  111. package/dist/esm/sd-modal-container.entry.js +13 -10
  112. package/dist/esm/sd-radio-button-group.entry.js +1 -1
  113. package/dist/esm/sd-radio-group.entry.js +1 -1
  114. package/dist/esm/sd-radio.entry.js +1 -1
  115. package/dist/esm/sd-select-multiple-group.entry.js +1 -1
  116. package/dist/esm/sd-table.entry.js +4 -4
  117. package/dist/esm/sd-tabs.entry.js +1 -1
  118. package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +2 -2
  119. package/dist/types/components/sd-modal-container/sd-modal-container.d.ts +4 -3
  120. package/dist/types/components.d.ts +5 -4
  121. package/dist/types/index.d.ts +2 -2
  122. package/dist/types/utils/modal.d.ts +26 -8
  123. package/hydrate/index.js +34 -30
  124. package/hydrate/index.mjs +34 -30
  125. package/package.json +1 -1
  126. package/dist/design-system/p-d8b4b24f.entry.js +0 -1
@@ -30,7 +30,7 @@ const SdRadio = class {
30
30
  }
31
31
  render() {
32
32
  const isSelected = String(this.val) === String(this.value);
33
- return (index.h("div", { key: '7db77e527fe79fcc55c81c7d827d0cc8026214cd', "aria-label": String(this.val) || 'radio option', "aria-checked": isSelected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', class: this.getRadioClasses() }, index.h("label", { key: `radio-${this.val}` }, index.h("input", { key: 'b8f3d5f83c2ee12d7e447d2b6cf8512fcde086ef', type: "radio", name: String(this.val), value: String(this.val), checked: isSelected, disabled: this.disabled, onInput: () => this.handleRadioChange() }), this.val != null && (index.h("span", { key: '43e56a21cab0dd9a5dbc57174dd7f309f8152660', class: "sd-radio-group__label" }, this.label || String(this.val))))));
33
+ return (index.h("div", { key: 'e9d7875b19c108505e7dfd455432102c8035097f', "aria-label": String(this.val) || 'radio option', "aria-checked": isSelected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', class: this.getRadioClasses() }, index.h("label", { key: `radio-${this.val}` }, index.h("input", { key: 'cc0aa88287000b77c2329bba2371e9e4404f8203', type: "radio", name: String(this.val), value: String(this.val), checked: isSelected, disabled: this.disabled, onInput: () => this.handleRadioChange() }), this.val != null && (index.h("span", { key: 'b2a371ef8bc4ccc57ffbbc6acc22bf4b9c391fc1', class: "sd-radio-group__label" }, this.label || String(this.val))))));
34
34
  }
35
35
  };
36
36
  SdRadio.style = sdRadioCss();
@@ -397,7 +397,7 @@ const SdSelectMultipleGroup = class extends baseDropdownEvent.BaseDropdownEvent
397
397
  });
398
398
  }
399
399
  render() {
400
- return (index.h("sd-field", { key: 'b0b3eeacc1dc3244a17c91c81adc8cd79df74bf3', label: this.label, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: { '--field-width': this.width || '200px' } }, index.h("div", { key: '7738287fc12ce54623d20797e70b885ba643501e', class: {
400
+ return (index.h("sd-field", { key: '350c7b2df807166a1439a2151f0f168385adac4a', label: this.label, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: { '--field-width': this.width || '200px' } }, index.h("div", { key: 'cce989263e1c7dcb38216e734aabe6eea643676a', class: {
401
401
  'sd-select-multiple-group': true,
402
402
  'sd-select-multiple-group--open': this.isOpen,
403
403
  'sd-select-multiple-group--disabled': this.disabled,
@@ -770,16 +770,16 @@ const SdTable = class {
770
770
  return (index.h("td", { key: `virtual-${position}-spacer-${rowIdx}`, class: "sd-table__virtual-spacer", style: this.getSpacerCellStyle(spacerWidth), "aria-hidden": "true" }, index.h("div", { class: "sd-table__skeleton-cell" })));
771
771
  }
772
772
  render() {
773
- return (index.h(index.Fragment, { key: '51c6e388c76a39b791e54e350d28a7ee7dd58b9e' }, index.h("div", { key: '8d43403b53e16173c559f6636bd5b74f3640b770', class: "sd-table__wrapper", style: {
773
+ return (index.h(index.Fragment, { key: 'f3e4930d36d080fd546dddc1e80190b831e93012' }, index.h("div", { key: 'ad2f798951631319190d93f83e25b87f871e58de', class: "sd-table__wrapper", style: {
774
774
  '--table-width': this.width,
775
775
  '--table-height': this.height,
776
- } }, index.h("div", { key: '43d8dba10880816cb414b1df24493d5617e31bec', class: "sd-table__container", style: {
776
+ } }, index.h("div", { key: 'c4b6d4080f1416d1c88ab1413c66848bdafe9019', class: "sd-table__container", style: {
777
777
  '--table-container-height': `calc(${this.height} - ${this.pagination && this.innerRows.length > 0 ? 48 : 0}px)`,
778
- } }, index.h("div", { key: 'a5c9e235a77dad5d3b061951e489ceafaee2d7a6', class: {
778
+ } }, index.h("div", { key: '3aacc27970b0c6d8b700063c0af7c57175e2cb22', class: {
779
779
  'sd-table__middle': true,
780
780
  'sd-table__middle--scrollable': this.paginatedRows.length > 0,
781
781
  'sd-table__middle--loading': this.isLoading,
782
- } }, this.isLoading && (index.h("div", { key: 'b2fd19d29cb053e5747a1ff55ff109e5e154a8e0', class: "sd-table__middle--loading__spinner" }, index.h("sd-loading-spinner", { key: '2f16c480b25032a9547ecdca61ce1c3838eab7ba' }))), index.h("table", { key: 'ece092ed1ecb20a7ea7b131f8f6a4954b5bad1e3', part: "table", class: this.sdTableClasses }, this.renderHead(), this.renderBody())), !this.paginatedRows.length && (index.h("div", { key: '076839c1e278879a01bfae3c42b62565b30796f7', class: "sd-table__bottom" }, index.h("div", { key: 'e3dd7080da396abb350d31f7125f4a6f04c2f31b', class: "sd-table__no-data" }, index.h("slot", { key: '81181ee58a7cb9ec8c89fa0e6cf37ef50e22f019', name: "no-data" }, this.noDataLabel))))), this.pagination && this.innerRows.length > 0 && (index.h("div", { key: '14e4653021886d3d7241806429ff02430c5ff09f', class: "sd-table__pagination" }, index.h("sd-pagination", { key: 'e266a9bffeaf7ba012945e0866928cee7b8220d4', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onSdPageChange: (e) => this.changePage(e.detail) }), this.useRowsPerPageSelect && (index.h("sd-select", { key: '5ef017820acdcca279c9e1b46b79b4ba44b7dfca', value: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", onSdUpdate: (e) => this.changeRowsPerPage(e.detail.value) })))))));
782
+ } }, this.isLoading && (index.h("div", { key: '25fca304a4e8ebf43aeeff20de3e3446d25e1ffb', class: "sd-table__middle--loading__spinner" }, index.h("sd-loading-spinner", { key: '48b0adad60cf422b884557b53097c28a4f0b8879' }))), index.h("table", { key: 'ec4328a1f43c865de642cc5814fbdef6a374b7e3', part: "table", class: this.sdTableClasses }, this.renderHead(), this.renderBody())), !this.paginatedRows.length && (index.h("div", { key: 'ba362ecb9fb8134a15ff3d0a3b8e6a523e94166a', class: "sd-table__bottom" }, index.h("div", { key: 'ca5c2e0b19a1e301ac159588436ef24eecfb6365', class: "sd-table__no-data" }, index.h("slot", { key: '68564a60a05833ba87743212d7189eef6e179fb4', name: "no-data" }, this.noDataLabel))))), this.pagination && this.innerRows.length > 0 && (index.h("div", { key: '88c3c7362234c20a60f6437ecd79d4c75b2caa6e', class: "sd-table__pagination" }, index.h("sd-pagination", { key: 'c3c8c435fcb752f2b1139981bb764cf4dfb153ab', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onSdPageChange: (e) => this.changePage(e.detail) }), this.useRowsPerPageSelect && (index.h("sd-select", { key: '03801039397a31321e5af96c2bd2d2900151240e', value: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", onSdUpdate: (e) => this.changeRowsPerPage(e.detail.value) })))))));
783
783
  }
784
784
  static get watchers() { return {
785
785
  "columns": [{
@@ -48,7 +48,7 @@ const SdTabs = class {
48
48
  return `square_${this.size}_${color}`;
49
49
  }
50
50
  render() {
51
- return (index.h("div", { key: '826e7c3a694d1243506fe8361553d476e21e71fb', class: this.getContainerClasses() }, this.tabs.map((tab, index$1) => {
51
+ return (index.h("div", { key: '74a25ee4311c84e79f4918b884385f27d6af6313', class: this.getContainerClasses() }, this.tabs.map((tab, index$1) => {
52
52
  const badgeName = this.getBadgeName(tab);
53
53
  return (index.h("div", { key: `tab-${index$1}`, class: this.getTabClasses(tab), "aria-label": tab.label || 'tab', onClick: () => this.handleTabClick(tab.value) }, index.h("span", { "data-label": tab.label, class: "sd-tabs__label" }, tab.label), tab.badge && index.h("sd-tag", { name: badgeName, label: tab.badge.toString() })));
54
54
  })));
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "entries": [
3
- "components/sd-action-modal/sd-action-modal.js",
4
3
  "components/sd-button/sd-button.js",
5
4
  "components/sd-calendar/sd-calendar.js",
6
5
  "components/sd-checkbox/sd-checkbox.js",
@@ -13,6 +12,7 @@
13
12
  "components/sd-select-multiple-group/sd-select-multiple-group.js",
14
13
  "components/sd-table/sd-table.js",
15
14
  "components/sd-tabs/sd-tabs.js",
15
+ "components/sd-action-modal/sd-action-modal.js",
16
16
  "components/sd-badge/sd-badge.js",
17
17
  "components/sd-barcode-input/sd-barcode-input.js",
18
18
  "components/sd-button-v2/sd-button-v2.js",
@@ -29,7 +29,7 @@ export class SdActionModal {
29
29
  '--sd-action-modal-title-font-size': `${ACTION_MODAL_TITLE.fontSize}px`,
30
30
  '--sd-action-modal-title-line-height': `${ACTION_MODAL_TITLE.lineHeight}px`,
31
31
  };
32
- return (h("div", { key: '8b3199bfcb78121b72a97e0d15bb032757080706', class: "sd-action-modal", style: cssVars }, h("header", { key: '26075ddc7f0a6d96c5457483faa1dcce945058a1', class: "sd-action-modal__header" }, h("h2", { key: 'a207d1f211ac8826d425d9c1ff84f08037967d2b', class: "sd-action-modal__title" }, this.modalTitle), h("div", { key: 'aaef21b786dd110066d5cbfaa2824f87ef705e13', class: "sd-action-modal__header-sub" }, h("slot", { key: 'cfbb60575a14e3f297d7c97da59039e9fd0bcb7a', name: "header-sub-title" })), h("sd-ghost-button", { key: '368a6c44add48953beaa8809184813179075d022', class: "sd-action-modal__close", icon: "close", ariaLabel: "close", onClick: () => this.close.emit() })), h("div", { key: '51e25fa037d7a23a5c3aea434b2d73ddc0bf3552', class: "sd-action-modal__body" }, h("slot", { key: '32454a97a41a1dd1402f112292c347f02cfd5186', name: "body" })), h("footer", { key: '639a174a8451bb4ece0339c6aeb81b20d31933fd', class: "sd-action-modal__footer" }, h("div", { key: '0da91c9254a9e69e8ef5effb3123e098bdfb0fcb', class: "sd-action-modal__footer-sub" }, h("slot", { key: '9c19df37ea9f20353440595b32b304e40dfcfb28', name: "bottom-sub-content" })), h("sd-button-v2", { key: '6fa6a31e3147f4457a4d2021394ed18994831147', ...DEFAULT_BUTTON_PROPS, ...this.buttonProps, onSdClick: () => this.ok.emit() }))));
32
+ return (h("div", { key: 'b306dc102137e9b76faeeb19587dce32d670163c', class: "sd-action-modal", style: cssVars }, h("header", { key: 'e6b9699e9943d1f4001b4cd23f99975474c3e86e', class: "sd-action-modal__header" }, h("h2", { key: '4d30b98d01a191e4bdc3fb1ff772483dfd3a8397', class: "sd-action-modal__title" }, this.modalTitle), h("div", { key: 'f1083fe5c2643d09dc4bad4c50064ffda2db65ab', class: "sd-action-modal__header-sub" }, h("slot", { key: 'a11c9a13ae11569226ac11fb4be6b782667defeb', name: "header-sub-title" })), h("sd-ghost-button", { key: 'e8a76ecd5d1388a79ac19705d634f40c05e6c2fc', class: "sd-action-modal__close", icon: "close", ariaLabel: "close", onClick: () => this.close.emit() })), h("div", { key: 'eb615713a8fbfdd1c40c805e3146fc8341686c72', class: "sd-action-modal__body" }, h("slot", { key: 'd56a3331bc2e94748f150c11dba9e5bd1fad8043', name: "body" })), h("footer", { key: 'd80ad9de537846b01f79588e363bb40e76c64fba', class: "sd-action-modal__footer" }, h("div", { key: '49187df32a64d18b2492995a80ce49df02e9303e', class: "sd-action-modal__footer-sub" }, h("slot", { key: 'd73e66710152c0718d7cab6bbcbd1ab2cebf1f87', name: "bottom-sub-content" })), h("sd-button-v2", { key: '03d2f2a0fa6960983c46e47460f623dfd42811a3', ...DEFAULT_BUTTON_PROPS, ...this.buttonProps, onSdClick: () => this.ok.emit() }))));
33
33
  }
34
34
  static get is() { return "sd-action-modal"; }
35
35
  static get originalStyleUrls() {
@@ -51,7 +51,7 @@ export class SdButton {
51
51
  const buttonClasses = this.getButtonClasses();
52
52
  // 유틸로 색상 키 -> HEX 매핑 (없으면 원본 그대로)
53
53
  const resolvedColor = resolveColor(this.color);
54
- return (h("button", { key: '3afd0a3392bc11cd49b8a8d76f0c92b158652822', class: `${buttonClasses} ${this.sdClass}`, type: this.type, disabled: this.disabled, style: { '--button-color': resolvedColor }, onClick: this.handleClick }, h("div", { key: 'f9741b8f6c5f119f4d54ebd65c2745cd61667c89', class: "sd-button__content" }, this.icon && (h("sd-icon", { key: 'f2a969c8fe4c127951d426c3ffa61c22cd566b1a', class: "sd-button__icon sd-button__icon--left", name: this.icon, size: this.iconSize ?? ICON_SIZES[this.size], color: this.iconColor ?? (this.variant === 'primary' ? '#fff' : resolvedColor) })), this.label && h("div", { key: 'ce542bb75ad0175a6d3e8bd81d0aeddbbbed0bf5', class: "sd-button__label" }, this.label), this.iconRight && (h("sd-icon", { key: '04c7bc061777823a7ac6c91945a2f56caac0eb77', class: "sd-button__icon sd-button__icon--right", name: this.iconRight, size: ICON_SIZES[this.size], color: this.variant === 'primary' ? '#fff' : resolvedColor })))));
54
+ return (h("button", { key: '079f66bd47a67c5e7cf95ff6b0b6a10aa84697d5', class: `${buttonClasses} ${this.sdClass}`, type: this.type, disabled: this.disabled, style: { '--button-color': resolvedColor }, onClick: this.handleClick }, h("div", { key: '78c7b1b6b7828fe93c5a2752fbaf41b0b8c17cb2', class: "sd-button__content" }, this.icon && (h("sd-icon", { key: '3f0afbeec89e0064f404d4967870516c87f35ac2', class: "sd-button__icon sd-button__icon--left", name: this.icon, size: this.iconSize ?? ICON_SIZES[this.size], color: this.iconColor ?? (this.variant === 'primary' ? '#fff' : resolvedColor) })), this.label && h("div", { key: '319ac39031f4118489d88eec50eb590067422f87', class: "sd-button__label" }, this.label), this.iconRight && (h("sd-icon", { key: '3e25e709e39ffbaceec0863c4fc5c54b8d34d5e1', class: "sd-button__icon sd-button__icon--right", name: this.iconRight, size: ICON_SIZES[this.size], color: this.variant === 'primary' ? '#fff' : resolvedColor })))));
55
55
  }
56
56
  static get is() { return "sd-button"; }
57
57
  static get originalStyleUrls() {
@@ -100,13 +100,13 @@ export class SdCalendar {
100
100
  // eventsRevision 참조로 events/eventColors 변경 시 re-render 보장
101
101
  void this.eventsRevision;
102
102
  const allEventNames = this.getAllEventNames();
103
- return (h("div", { key: '9a286709cd9891c60f3a9e3f96bbb10febf7f69c', class: "sd-calendar" }, h("div", { key: 'cb52cef3371662e7fda7c4226c22aa1c01c7d4c1', class: "sd-calendar__header" }, h("div", { key: '7e1cf45b0a75c0cc44f0b1b126017049a8af2b1d', class: "year-nav" }, h("button", { key: '0edb0d7be512fdc36e5c3382c47e47cef04d75c8', type: "button", name: "prev-year", title: "Previous Year", onClick: () => {
103
+ return (h("div", { key: '149ca9ae588a7bd2d70ecf1bf13cc639c99f7da9', class: "sd-calendar" }, h("div", { key: '65f58d53fbaf35cee16007bad0b5e56dd208393e', class: "sd-calendar__header" }, h("div", { key: '76709fd094edaece5ede720a983d1103801ba76d', class: "year-nav" }, h("button", { key: '6d46cfa4cb1d12507ba7570cb6c0bb88bcba3402', type: "button", name: "prev-year", title: "Previous Year", onClick: () => {
104
104
  this.currentYear = this.currentYear - 1;
105
105
  this.viewChange.emit({ year: this.currentYear, month: this.currentMonth });
106
- } }, h("sd-icon", { key: 'e336280d87d459615721cc03d75b2d02d1c87ee0', name: "arrowLeft", size: "12", color: "grey_45" })), h("span", { key: 'a9d9de8ef82508f0d6e998e434ecc5dcc6f84017', class: "year-nav__current" }, this.currentYear), h("button", { key: '4d0d76f89442baf209628ca1708d092776ed4606', type: "button", name: "next-year", title: "Next Year", onClick: () => {
106
+ } }, h("sd-icon", { key: '1319ec1fa0f2533a5d02853cb7638b1f1c10e050', name: "arrowLeft", size: "12", color: "grey_45" })), h("span", { key: '678b705cd95dc499975e071f1607f26bdd50c36d', class: "year-nav__current" }, this.currentYear), h("button", { key: '1f5c3a0cd6108da5ed1beb10bd6af4ea5f22cf4c', type: "button", name: "next-year", title: "Next Year", onClick: () => {
107
107
  this.currentYear = this.currentYear + 1;
108
108
  this.viewChange.emit({ year: this.currentYear, month: this.currentMonth });
109
- } }, h("sd-icon", { key: '065c391f62e7ba33631b61c84f032224e594f476', name: "arrowRight", size: "12", color: "grey_45" }))), h("div", { key: '36de2a57b793f67a73d4125fb6574b4235d0cdf7', class: "month-nav" }, h("button", { key: '99d67577999e4304ec5c414af6ec35711570e7de', type: "button", name: "prev-month", title: "Previous Month", onClick: () => this.handleUpdateMonth('prev') }, h("sd-icon", { key: '2c04f97d92580d3392d6ee94b239999d889ecdab', name: "arrowLeft", size: "12", color: "grey_45" })), h("span", { key: '4e2ad881df27eafa93544a1cd17e4ad0deb70cc6', class: "month-nav__current" }, this.currentMonth, "\uC6D4"), h("button", { key: 'fa365a20c253047bb51e02495b537d7404cbdda7', type: "button", name: "next-month", title: "Next Month", onClick: () => this.handleUpdateMonth('next') }, h("sd-icon", { key: '0aecbf5c466465dd5674d8e69972ba1b08360305', name: "arrowRight", size: "12", color: "grey_45" })))), h("div", { key: 'b60e5105e1a4ab2b44dda037645be75604d92df7', class: "sd-calendar__days" }, ['일', '월', '화', '수', '목', '금', '토'].map(day => (h("div", { key: day, class: "day" }, day)))), h("div", { key: '4f60a19754da1a707569887d909a7b01163d07b8', class: { 'sd-calendar__body': true, 'sd-calendar__body--has-events': !!this.events } }, [
109
+ } }, h("sd-icon", { key: '9dff93aef0996c3679a6a8c93c0fce1ea390f4aa', name: "arrowRight", size: "12", color: "grey_45" }))), h("div", { key: '9a6840420da580096fbf24d2c4df656114e23e6e', class: "month-nav" }, h("button", { key: '94bf7598e5b80d6deb407f607034ed6e9f88151f', type: "button", name: "prev-month", title: "Previous Month", onClick: () => this.handleUpdateMonth('prev') }, h("sd-icon", { key: '4ab19da5f6a12bf37b3c4d9aac4e2283762799e8', name: "arrowLeft", size: "12", color: "grey_45" })), h("span", { key: 'c207959595c107cae05a7cbe1d169357b063a29d', class: "month-nav__current" }, this.currentMonth, "\uC6D4"), h("button", { key: 'fe319c8b26d9259bcba2b1f251bb827977e6afdc', type: "button", name: "next-month", title: "Next Month", onClick: () => this.handleUpdateMonth('next') }, h("sd-icon", { key: 'af5bb1c06058b6ce22c8d7ffacace2f558bdb013', name: "arrowRight", size: "12", color: "grey_45" })))), h("div", { key: 'ca66c0d7744970364f7d5e11e61014471df3325b', class: "sd-calendar__days" }, ['일', '월', '화', '수', '목', '금', '토'].map(day => (h("div", { key: day, class: "day" }, day)))), h("div", { key: '9d42c252b8b42754aedc64156ec1dbe45200cef0', class: { 'sd-calendar__body': true, 'sd-calendar__body--has-events': !!this.events } }, [
110
110
  ...this.calendar.prevMonthDays,
111
111
  ...this.calendar.days,
112
112
  ...this.calendar.afterMonthDays,
@@ -117,7 +117,7 @@ export class SdCalendar {
117
117
  return (h("div", { class: "sd-calendar__cell", key: `${day}_${idx}` }, h("sd-date-box", { date: !day ? '' : Number(day), selected: this.value === formattedDate, isToday: today === formattedDate, disabled: !day ? true : this.isDisabledDate(formattedDate), onClick: !this.isDisabledDate(formattedDate) && day
118
118
  ? () => this.handleDateClick(Number(day))
119
119
  : undefined }), this.events && (h("div", { class: "sd-calendar__dots" }, uniqueEvents.map(eventName => (h("span", { key: eventName, class: "sd-calendar__dot", style: { backgroundColor: this.getEventColor(eventName) } })))))));
120
- })), allEventNames.length > 0 && (h("div", { key: '97d41f2a28b76d97568d50cb029ff8a5eaa13f9e', class: "sd-calendar__legend" }, allEventNames.map(name => (h("div", { key: name, class: "sd-calendar__legend-item" }, h("span", { class: "sd-calendar__legend-dot", style: { backgroundColor: this.getEventColor(name) } }), h("span", { class: "sd-calendar__legend-label" }, name))))))));
120
+ })), allEventNames.length > 0 && (h("div", { key: 'dac97204484b1def1fd3d73939ef64ef6969bce2', class: "sd-calendar__legend" }, allEventNames.map(name => (h("div", { key: name, class: "sd-calendar__legend-item" }, h("span", { class: "sd-calendar__legend-dot", style: { backgroundColor: this.getEventColor(name) } }), h("span", { class: "sd-calendar__legend-label" }, name))))))));
121
121
  }
122
122
  static get is() { return "sd-calendar"; }
123
123
  static get encapsulation() { return "scoped"; }
@@ -89,7 +89,7 @@ export class SdCheckbox {
89
89
  '--sd-checkbox-disabled-bg': CHECKBOX_COLORS.disabled.bg,
90
90
  '--sd-checkbox-disabled-border': CHECKBOX_COLORS.disabled.border,
91
91
  };
92
- return (h("label", { key: '4c92d46aab587f6e03f27d2a6356eca268141737', class: this.checkboxClasses, style: cssVars }, h("input", { key: '22934eecb45213964374042e999ee0102fe3ae07', type: "checkbox", ref: el => { this.inputEl = el; }, value: this.val, checked: !!this.isChecked, disabled: this.disabled, onChange: this.handleChange, name: this.val?.toString() || 'checkbox', "aria-label": this.label || 'checkbox', "aria-checked": this.isChecked === null ? 'mixed' : this.isChecked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }), h("div", { key: 'fc18ccbcfe3403a1b8c1df6adc161d8b70ef7b5c', class: "sd-checkbox__bg" }, this.isChecked !== false ? (h("sd-icon", { name: this.isChecked === true ? 'check' : 'minus', size: Number(CHECKBOX_LAYOUT.iconSize), color: this.disabled ? CHECKBOX_COLORS.checked.iconDisabled : CHECKBOX_COLORS.checked.icon })) : null), this.label && h("span", { key: 'eb0d41a18406991affce5ea81f303e1a64d5b9c1', class: "sd-checkbox__label" }, this.label)));
92
+ return (h("label", { key: 'b343ac293abfb6a7834cccc597cd30e56e3a161c', class: this.checkboxClasses, style: cssVars }, h("input", { key: '89d3c5ec214af16680f2111e5e85fcb228ff2223', type: "checkbox", ref: el => { this.inputEl = el; }, value: this.val, checked: !!this.isChecked, disabled: this.disabled, onChange: this.handleChange, name: this.val?.toString() || 'checkbox', "aria-label": this.label || 'checkbox', "aria-checked": this.isChecked === null ? 'mixed' : this.isChecked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }), h("div", { key: '8eef48a269cbbf8c479d60a53996b09cc4aa8f20', class: "sd-checkbox__bg" }, this.isChecked !== false ? (h("sd-icon", { name: this.isChecked === true ? 'check' : 'minus', size: Number(CHECKBOX_LAYOUT.iconSize), color: this.disabled ? CHECKBOX_COLORS.checked.iconDisabled : CHECKBOX_COLORS.checked.icon })) : null), this.label && h("span", { key: '43bf36ec3a3890f68ef699dbb73b48eb6a98451d', class: "sd-checkbox__label" }, this.label)));
93
93
  }
94
94
  static get is() { return "sd-checkbox"; }
95
95
  static get originalStyleUrls() {
@@ -23,7 +23,7 @@ export class SdDateBox {
23
23
  this.mouseOver?.emit(this.date);
24
24
  }
25
25
  render() {
26
- return (h("div", { key: '0c1e27245a3589ed493b26ad17cfe1b7c64c0be3', role: "button", tabindex: this.disabled ? -1 : 0, class: {
26
+ return (h("div", { key: 'b14dd7c9806828807cdfc232420a30c816ffbeb2', role: "button", tabindex: this.disabled ? -1 : 0, class: {
27
27
  'sd-date-box': true,
28
28
  'sd-hoverable': !this.disabled || !this.selected || this.type === '',
29
29
  'sd-date-box--disabled': this.disabled,
@@ -34,7 +34,7 @@ export class SdDateBox {
34
34
  'sd-date-box--in-range': this.inRange,
35
35
  'sd-date-box--type-start': this.type === 'start',
36
36
  'sd-date-box--type-end': this.type === 'end',
37
- }, onClick: () => this.handleClickDate(), onMouseOver: () => this.handleHoverDate() }, h("div", { key: 'c40b8e120298ca356ce2016f9b9dc72df703c6fe', class: "sd-date-box__content" }, h("div", { key: '7edd94f83506397683620166322c1ab6095fedec', class: "sd-date-box__label" }, this.date))));
37
+ }, onClick: () => this.handleClickDate(), onMouseOver: () => this.handleHoverDate() }, h("div", { key: 'acb1a2d51d018913e39f8fd1fc54ab85c4ce6957', class: "sd-date-box__content" }, h("div", { key: '8c9445e4268cd254d76297ac1e775697d889f721', class: "sd-date-box__label" }, this.date))));
38
38
  }
39
39
  static get is() { return "sd-date-box"; }
40
40
  static get encapsulation() { return "scoped"; }
@@ -59,7 +59,7 @@ export class SdForm {
59
59
  this.submitSuccess.emit();
60
60
  }
61
61
  render() {
62
- return (h("form", { key: '82112bf33b4b3090d45f2be051a4586ef81ce413', onSubmit: e => this.onSubmit(e), class: this.formClass }, h("slot", { key: '56ab994680c225eb8b09b16b1a6a2bb789f470c7' })));
62
+ return (h("form", { key: '2a72e0fb172294913a22560311e8dfcc4b151968', onSubmit: e => this.onSubmit(e), class: this.formClass }, h("slot", { key: 'd0bd0c7f915e10c7fd9aa36af68b2020035a43d4' })));
63
63
  }
64
64
  static get is() { return "sd-form"; }
65
65
  static get properties() {
@@ -20,21 +20,21 @@ export class SdModalContainer {
20
20
  this.dispatchClose(top.modalEl);
21
21
  }
22
22
  }
23
- async open(options, chain) {
23
+ async open(options, modalRef) {
24
24
  const id = `modal-${++modalIdCounter}`;
25
25
  const modalEl = this.createConfirmModal(id, options);
26
26
  this.attachModalEventListeners(id, modalEl);
27
- this.registerEntry(id, modalEl, chain, {
27
+ this.registerEntry(id, modalEl, modalRef, {
28
28
  persistent: !!options.persistent,
29
29
  });
30
30
  return id;
31
31
  }
32
- async createCustom(element, options, chain) {
32
+ async createCustom(element, options, modalRef) {
33
33
  const id = `modal-${++modalIdCounter}`;
34
34
  element.setAttribute('data-modal-id', id);
35
35
  element.classList.add('sd-modal-container__modal');
36
36
  this.attachModalEventListeners(id, element);
37
- this.registerEntry(id, element, chain, {
37
+ this.registerEntry(id, element, modalRef, {
38
38
  persistent: !!options.persistent,
39
39
  });
40
40
  return id;
@@ -47,7 +47,7 @@ export class SdModalContainer {
47
47
  dispatchClose(modalEl) {
48
48
  modalEl.dispatchEvent(new CustomEvent('sdClose'));
49
49
  }
50
- registerEntry(id, modalEl, chain, meta) {
50
+ registerEntry(id, modalEl, modalRef, meta) {
51
51
  if (this.containerDismissTimerId) {
52
52
  clearTimeout(this.containerDismissTimerId);
53
53
  this.containerDismissTimerId = undefined;
@@ -57,7 +57,7 @@ export class SdModalContainer {
57
57
  {
58
58
  id,
59
59
  modalEl,
60
- chain,
60
+ modalRef,
61
61
  persistent: meta.persistent,
62
62
  closing: false,
63
63
  },
@@ -78,6 +78,9 @@ export class SdModalContainer {
78
78
  });
79
79
  });
80
80
  }
81
+ async dismissById(id, reason) {
82
+ this.requestDismiss(id, reason);
83
+ }
81
84
  async update(id, props) {
82
85
  const entry = (this.entries ?? []).find(e => e.id === id);
83
86
  if (!entry || entry.closing)
@@ -163,11 +166,11 @@ export class SdModalContainer {
163
166
  }, ANIMATION_DURATION);
164
167
  this.entries = (this.entries ?? []).map(item => item.id === id ? { ...item, closing: true, dismissTimerId } : item);
165
168
  if (reason === 'confirm')
166
- entry.chain._triggerOk();
169
+ entry.modalRef._triggerOk();
167
170
  else if (reason === 'cancel')
168
- entry.chain._triggerCancel();
171
+ entry.modalRef._triggerCancel();
169
172
  else if (reason === 'close')
170
- entry.chain._triggerClose();
173
+ entry.modalRef._triggerClose();
171
174
  }
172
175
  finalizeDismiss(id) {
173
176
  const entry = (this.entries ?? []).find(item => item.id === id);
@@ -186,7 +189,7 @@ export class SdModalContainer {
186
189
  this.containerDismissTimerId = undefined;
187
190
  }, ANIMATION_DURATION);
188
191
  }
189
- entry.chain._triggerDismissed();
192
+ entry.modalRef._triggerDismissed();
190
193
  }
191
194
  waitForModalReady(modalEl) {
192
195
  const componentOnReady = modalEl.componentOnReady;
@@ -237,14 +240,14 @@ export class SdModalContainer {
237
240
  return {
238
241
  "open": {
239
242
  "complexType": {
240
- "signature": "(options: ConfirmModalOptions, chain: ModalDialogChainLike) => Promise<string>",
243
+ "signature": "(options: ConfirmModalOptions, modalRef: ModalDialogRefLike) => Promise<string>",
241
244
  "parameters": [{
242
245
  "name": "options",
243
246
  "type": "ConfirmModalOptions",
244
247
  "docs": ""
245
248
  }, {
246
- "name": "chain",
247
- "type": "ModalDialogChainLike",
249
+ "name": "modalRef",
250
+ "type": "ModalDialogRefLike",
248
251
  "docs": ""
249
252
  }],
250
253
  "references": {
@@ -258,11 +261,11 @@ export class SdModalContainer {
258
261
  "id": "src/components/sd-modal-container/sd-modal-container.config.ts::ConfirmModalOptions",
259
262
  "referenceLocation": "ConfirmModalOptions"
260
263
  },
261
- "ModalDialogChainLike": {
264
+ "ModalDialogRefLike": {
262
265
  "location": "import",
263
266
  "path": "./sd-modal-container.config",
264
- "id": "src/components/sd-modal-container/sd-modal-container.config.ts::ModalDialogChainLike",
265
- "referenceLocation": "ModalDialogChainLike"
267
+ "id": "src/components/sd-modal-container/sd-modal-container.config.ts::ModalDialogRefLike",
268
+ "referenceLocation": "ModalDialogRefLike"
266
269
  }
267
270
  },
268
271
  "return": "Promise<string>"
@@ -274,7 +277,7 @@ export class SdModalContainer {
274
277
  },
275
278
  "createCustom": {
276
279
  "complexType": {
277
- "signature": "(element: HTMLElement, options: SdModalCreateOptions, chain: ModalDialogChainLike) => Promise<string>",
280
+ "signature": "(element: HTMLElement, options: SdModalCreateOptions, modalRef: ModalDialogRefLike) => Promise<string>",
278
281
  "parameters": [{
279
282
  "name": "element",
280
283
  "type": "HTMLElement",
@@ -284,8 +287,8 @@ export class SdModalContainer {
284
287
  "type": "SdModalCreateOptions",
285
288
  "docs": ""
286
289
  }, {
287
- "name": "chain",
288
- "type": "ModalDialogChainLike",
290
+ "name": "modalRef",
291
+ "type": "ModalDialogRefLike",
289
292
  "docs": ""
290
293
  }],
291
294
  "references": {
@@ -303,11 +306,11 @@ export class SdModalContainer {
303
306
  "id": "src/components/sd-modal-container/sd-modal-container.config.ts::SdModalCreateOptions",
304
307
  "referenceLocation": "SdModalCreateOptions"
305
308
  },
306
- "ModalDialogChainLike": {
309
+ "ModalDialogRefLike": {
307
310
  "location": "import",
308
311
  "path": "./sd-modal-container.config",
309
- "id": "src/components/sd-modal-container/sd-modal-container.config.ts::ModalDialogChainLike",
310
- "referenceLocation": "ModalDialogChainLike"
312
+ "id": "src/components/sd-modal-container/sd-modal-container.config.ts::ModalDialogRefLike",
313
+ "referenceLocation": "ModalDialogRefLike"
311
314
  }
312
315
  },
313
316
  "return": "Promise<string>"
@@ -317,6 +320,31 @@ export class SdModalContainer {
317
320
  "tags": []
318
321
  }
319
322
  },
323
+ "dismissById": {
324
+ "complexType": {
325
+ "signature": "(id: string, reason?: \"confirm\" | \"cancel\" | \"close\") => Promise<void>",
326
+ "parameters": [{
327
+ "name": "id",
328
+ "type": "string",
329
+ "docs": ""
330
+ }, {
331
+ "name": "reason",
332
+ "type": "\"close\" | \"cancel\" | \"confirm\" | undefined",
333
+ "docs": ""
334
+ }],
335
+ "references": {
336
+ "Promise": {
337
+ "location": "global",
338
+ "id": "global::Promise"
339
+ }
340
+ },
341
+ "return": "Promise<void>"
342
+ },
343
+ "docs": {
344
+ "text": "",
345
+ "tags": []
346
+ }
347
+ },
320
348
  "update": {
321
349
  "complexType": {
322
350
  "signature": "(id: string, props: Partial<ConfirmModalOptions>) => Promise<void>",
@@ -21,7 +21,7 @@ export class SdRadio {
21
21
  }
22
22
  render() {
23
23
  const isSelected = String(this.val) === String(this.value);
24
- return (h("div", { key: '7db77e527fe79fcc55c81c7d827d0cc8026214cd', "aria-label": String(this.val) || 'radio option', "aria-checked": isSelected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', class: this.getRadioClasses() }, h("label", { key: `radio-${this.val}` }, h("input", { key: 'b8f3d5f83c2ee12d7e447d2b6cf8512fcde086ef', type: "radio", name: String(this.val), value: String(this.val), checked: isSelected, disabled: this.disabled, onInput: () => this.handleRadioChange() }), this.val != null && (h("span", { key: '43e56a21cab0dd9a5dbc57174dd7f309f8152660', class: "sd-radio-group__label" }, this.label || String(this.val))))));
24
+ return (h("div", { key: 'e9d7875b19c108505e7dfd455432102c8035097f', "aria-label": String(this.val) || 'radio option', "aria-checked": isSelected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', class: this.getRadioClasses() }, h("label", { key: `radio-${this.val}` }, h("input", { key: 'cc0aa88287000b77c2329bba2371e9e4404f8203', type: "radio", name: String(this.val), value: String(this.val), checked: isSelected, disabled: this.disabled, onInput: () => this.handleRadioChange() }), this.val != null && (h("span", { key: 'b2a371ef8bc4ccc57ffbbc6acc22bf4b9c391fc1', class: "sd-radio-group__label" }, this.label || String(this.val))))));
25
25
  }
26
26
  static get is() { return "sd-radio"; }
27
27
  static get originalStyleUrls() {
@@ -36,7 +36,7 @@ export class SdRadioButtonGroup {
36
36
  }
37
37
  groupName = this.name || `sd-radio-button-group-${crypto.randomUUID()}`;
38
38
  render() {
39
- return (h("div", { key: '4a1f76b1f53f07f7a062d4a0ce8bf44a47c5366b', class: this.getGroupClasses(), role: "radiogroup", "aria-disabled": this.disabled.toString() }, this.options.map(option => {
39
+ return (h("div", { key: '419d62e718ddcecb4a901f4c4bc98b560c8c4f01', class: this.getGroupClasses(), role: "radiogroup", "aria-disabled": this.disabled.toString() }, this.options.map(option => {
40
40
  const isSelected = this.isOptionSelected(option);
41
41
  const isDisabled = this.isOptionDisabled(option);
42
42
  return (h("label", { key: `radio-${option.value}`, class: this.getButtonClasses(option), "aria-label": option.label || 'radio option', "data-label": option.label }, h("input", { type: "radio", name: this.groupName, value: option.value.toString(), checked: isSelected, disabled: isDisabled, onInput: () => this.handleRadioChange(option.value, option.disabled) }), option.label && h("span", { class: "sd-radio-button-group__label" }, option.label)));
@@ -22,7 +22,7 @@ export class SdRadioGroup {
22
22
  return classes.join(' ');
23
23
  }
24
24
  render() {
25
- return (h("div", { key: 'd2296269f2d47fd35c5ad2653bdb0048be14836d', class: this.getGroupClasses(), role: "radiogroup" }, this.options.map(option => {
25
+ return (h("div", { key: '82979426bafc24b48858588ad186dfe069616883', class: this.getGroupClasses(), role: "radiogroup" }, this.options.map(option => {
26
26
  return (h("sd-radio", { key: `radio-${option.value}`, val: String(option.value), value: String(this.value), label: option.label, disabled: this.disabled || !!option.disabled, onSdUpdate: ({ detail }) => this.handleRadioChange(detail) }));
27
27
  })));
28
28
  }
@@ -141,7 +141,7 @@ export class SdSelect extends BaseDropdownEvent {
141
141
  }
142
142
  };
143
143
  render() {
144
- return (h("sd-field", { key: '94b1ba70718a366048ba4287b28f88bd42b12ee1', label: this.label, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, addonLabel: this.addonLabel, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el) }, h("div", { key: 'feaa2f25ebdf8aa919490bdf0cba88e30a9de33d', class: {
144
+ return (h("sd-field", { key: 'f7cd0c34188712a30389d07bde7edc7875e9923b', label: this.label, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, addonLabel: this.addonLabel, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el) }, h("div", { key: '460a8a23247e24a02bd25470105598914029e205', class: {
145
145
  'sd-select': true,
146
146
  'sd-select--disabled': this.disabled,
147
147
  'sd-select--error': !!this.error,
@@ -392,7 +392,7 @@ export class SdSelectMultipleGroup extends BaseDropdownEvent {
392
392
  });
393
393
  }
394
394
  render() {
395
- return (h("sd-field", { key: 'b0b3eeacc1dc3244a17c91c81adc8cd79df74bf3', label: this.label, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: { '--field-width': this.width || '200px' } }, h("div", { key: '7738287fc12ce54623d20797e70b885ba643501e', class: {
395
+ return (h("sd-field", { key: '350c7b2df807166a1439a2151f0f168385adac4a', label: this.label, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: { '--field-width': this.width || '200px' } }, h("div", { key: 'cce989263e1c7dcb38216e734aabe6eea643676a', class: {
396
396
  'sd-select-multiple-group': true,
397
397
  'sd-select-multiple-group--open': this.isOpen,
398
398
  'sd-select-multiple-group--disabled': this.disabled,
@@ -759,16 +759,16 @@ export class SdTable {
759
759
  return (h("td", { key: `virtual-${position}-spacer-${rowIdx}`, class: "sd-table__virtual-spacer", style: this.getSpacerCellStyle(spacerWidth), "aria-hidden": "true" }, h("div", { class: "sd-table__skeleton-cell" })));
760
760
  }
761
761
  render() {
762
- return (h(Fragment, { key: '51c6e388c76a39b791e54e350d28a7ee7dd58b9e' }, h("div", { key: '8d43403b53e16173c559f6636bd5b74f3640b770', class: "sd-table__wrapper", style: {
762
+ return (h(Fragment, { key: 'f3e4930d36d080fd546dddc1e80190b831e93012' }, h("div", { key: 'ad2f798951631319190d93f83e25b87f871e58de', class: "sd-table__wrapper", style: {
763
763
  '--table-width': this.width,
764
764
  '--table-height': this.height,
765
- } }, h("div", { key: '43d8dba10880816cb414b1df24493d5617e31bec', class: "sd-table__container", style: {
765
+ } }, h("div", { key: 'c4b6d4080f1416d1c88ab1413c66848bdafe9019', class: "sd-table__container", style: {
766
766
  '--table-container-height': `calc(${this.height} - ${this.pagination && this.innerRows.length > 0 ? 48 : 0}px)`,
767
- } }, h("div", { key: 'a5c9e235a77dad5d3b061951e489ceafaee2d7a6', class: {
767
+ } }, h("div", { key: '3aacc27970b0c6d8b700063c0af7c57175e2cb22', class: {
768
768
  'sd-table__middle': true,
769
769
  'sd-table__middle--scrollable': this.paginatedRows.length > 0,
770
770
  'sd-table__middle--loading': this.isLoading,
771
- } }, this.isLoading && (h("div", { key: 'b2fd19d29cb053e5747a1ff55ff109e5e154a8e0', class: "sd-table__middle--loading__spinner" }, h("sd-loading-spinner", { key: '2f16c480b25032a9547ecdca61ce1c3838eab7ba' }))), h("table", { key: 'ece092ed1ecb20a7ea7b131f8f6a4954b5bad1e3', part: "table", class: this.sdTableClasses }, this.renderHead(), this.renderBody())), !this.paginatedRows.length && (h("div", { key: '076839c1e278879a01bfae3c42b62565b30796f7', class: "sd-table__bottom" }, h("div", { key: 'e3dd7080da396abb350d31f7125f4a6f04c2f31b', class: "sd-table__no-data" }, h("slot", { key: '81181ee58a7cb9ec8c89fa0e6cf37ef50e22f019', name: "no-data" }, this.noDataLabel))))), this.pagination && this.innerRows.length > 0 && (h("div", { key: '14e4653021886d3d7241806429ff02430c5ff09f', class: "sd-table__pagination" }, h("sd-pagination", { key: 'e266a9bffeaf7ba012945e0866928cee7b8220d4', 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: '5ef017820acdcca279c9e1b46b79b4ba44b7dfca', value: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", onSdUpdate: (e) => this.changeRowsPerPage(e.detail.value) })))))));
771
+ } }, this.isLoading && (h("div", { key: '25fca304a4e8ebf43aeeff20de3e3446d25e1ffb', class: "sd-table__middle--loading__spinner" }, h("sd-loading-spinner", { key: '48b0adad60cf422b884557b53097c28a4f0b8879' }))), h("table", { key: 'ec4328a1f43c865de642cc5814fbdef6a374b7e3', part: "table", class: this.sdTableClasses }, this.renderHead(), this.renderBody())), !this.paginatedRows.length && (h("div", { key: 'ba362ecb9fb8134a15ff3d0a3b8e6a523e94166a', class: "sd-table__bottom" }, h("div", { key: 'ca5c2e0b19a1e301ac159588436ef24eecfb6365', class: "sd-table__no-data" }, h("slot", { key: '68564a60a05833ba87743212d7189eef6e179fb4', name: "no-data" }, this.noDataLabel))))), this.pagination && this.innerRows.length > 0 && (h("div", { key: '88c3c7362234c20a60f6437ecd79d4c75b2caa6e', class: "sd-table__pagination" }, h("sd-pagination", { key: 'c3c8c435fcb752f2b1139981bb764cf4dfb153ab', 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: '03801039397a31321e5af96c2bd2d2900151240e', value: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", onSdUpdate: (e) => this.changeRowsPerPage(e.detail.value) })))))));
772
772
  }
773
773
  static get is() { return "sd-table"; }
774
774
  static get originalStyleUrls() {
@@ -39,7 +39,7 @@ export class SdTabs {
39
39
  return `square_${this.size}_${color}`;
40
40
  }
41
41
  render() {
42
- return (h("div", { key: '826e7c3a694d1243506fe8361553d476e21e71fb', class: this.getContainerClasses() }, this.tabs.map((tab, index) => {
42
+ return (h("div", { key: '74a25ee4311c84e79f4918b884385f27d6af6313', class: this.getContainerClasses() }, this.tabs.map((tab, index) => {
43
43
  const badgeName = this.getBadgeName(tab);
44
44
  return (h("div", { key: `tab-${index}`, class: this.getTabClasses(tab), "aria-label": tab.label || 'tab', onClick: () => this.handleTabClick(tab.value) }, h("span", { "data-label": tab.label, class: "sd-tabs__label" }, tab.label), tab.badge && h("sd-tag", { name: badgeName, label: tab.badge.toString() })));
45
45
  })));
@@ -8,4 +8,4 @@
8
8
  * to consume components of this package as outlined in the `README.md`.
9
9
  */
10
10
  export { sdToast } from './utils/toast';
11
- export { sdModal } from './utils/modal';
11
+ export { sdModal, _createSdModalRef, _attachSdModalWithRef, } from './utils/modal';
@@ -1,5 +1,10 @@
1
1
  const MODAL_CONTAINER_TAG = 'sd-modal-container';
2
- class ModalDialogChainImpl {
2
+ const REASON_TO_CONTAINER = {
3
+ ok: 'confirm',
4
+ cancel: 'cancel',
5
+ close: 'close',
6
+ };
7
+ class ModalDialogRefImpl {
3
8
  modalId;
4
9
  okFn;
5
10
  cancelFn;
@@ -7,6 +12,7 @@ class ModalDialogChainImpl {
7
12
  dismissedFn;
8
13
  containerRef;
9
14
  pendingActions = [];
15
+ dismissRequested = false;
10
16
  constructor(id, containerRef) {
11
17
  this.modalId = id;
12
18
  this.containerRef = containerRef;
@@ -33,6 +39,25 @@ class ModalDialogChainImpl {
33
39
  });
34
40
  return this;
35
41
  }
42
+ ok() {
43
+ return this.dismiss('ok');
44
+ }
45
+ cancel() {
46
+ return this.dismiss('cancel');
47
+ }
48
+ close() {
49
+ return this.dismiss('close');
50
+ }
51
+ dismiss(reason = 'close') {
52
+ if (this.dismissRequested)
53
+ return this;
54
+ this.dismissRequested = true;
55
+ const containerReason = REASON_TO_CONTAINER[reason];
56
+ this.runOrQueue(() => {
57
+ this.containerRef.dismissById?.(this.modalId, containerReason);
58
+ });
59
+ return this;
60
+ }
36
61
  _triggerOk() {
37
62
  this.okFn?.();
38
63
  }
@@ -96,28 +121,39 @@ async function whenReady(el) {
96
121
  return Promise.resolve();
97
122
  throw new Error('[sdModal] `sd-modal-container` is registered but not ready to open dialogs.');
98
123
  }
124
+ /**
125
+ * 프레임워크 래퍼 전용 헬퍼. Vue/React 어댑터가 modalRef 인스턴스를 먼저
126
+ * 생성해 컴포넌트 props 로 주입한 뒤, 실제 element 를 컨테이너에 attach
127
+ * 할 수 있도록 "modalRef 선공급" 경로를 제공합니다. 공개 API 가 아니며
128
+ * 시그니처가 바뀔 수 있습니다.
129
+ */
130
+ export function _createSdModalRef() {
131
+ const container = getContainer();
132
+ return new ModalDialogRefImpl('', container);
133
+ }
134
+ export function _attachSdModalWithRef(modalRef, input) {
135
+ const { component, persist } = input;
136
+ const container = getContainer();
137
+ const options = { persistent: persist };
138
+ whenReady(container).then(async () => {
139
+ const id = await container.createCustom(component, options, modalRef);
140
+ modalRef._setId(id);
141
+ });
142
+ }
99
143
  export const sdModal = {
100
144
  confirm(options) {
101
145
  const container = getContainer();
102
- const chain = new ModalDialogChainImpl('', container);
146
+ const modalRef = new ModalDialogRefImpl('', container);
103
147
  whenReady(container).then(async () => {
104
- const id = await container.open(options, chain);
105
- chain._setId(id);
148
+ const id = await container.open(options, modalRef);
149
+ modalRef._setId(id);
106
150
  });
107
- return chain;
151
+ return modalRef;
108
152
  },
109
153
  create(input) {
110
- const { component, persist } = input;
111
- const container = getContainer();
112
- const chain = new ModalDialogChainImpl('', container);
113
- const options = {
114
- persistent: persist,
115
- };
116
- whenReady(container).then(async () => {
117
- const id = await container.createCustom(component, options, chain);
118
- chain._setId(id);
119
- });
120
- return chain;
154
+ const modalRef = _createSdModalRef();
155
+ _attachSdModalWithRef(modalRef, input);
156
+ return modalRef;
121
157
  },
122
158
  configure(options) {
123
159
  getContainer(options);
@@ -1 +1 @@
1
- export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-D-pFdq6g.js";let t=null;function n(t,n){n&&(n.position&&t.setAttribute("position",n.position),null!=n.maxVisible&&t.setAttribute("max-visible",n.maxVisible+""),null!=n.defaultDuration&&t.setAttribute("default-duration",n.defaultDuration+""),null!=n.zIndex&&t.setAttribute("z-index",n.zIndex+""))}function e(e){return t&&document.body.contains(t)?(n(t,e),t):(t=document.createElement("sd-toast-container"),n(t,e),document.body.appendChild(t),t)}function o(t){return"function"==typeof t.create?Promise.resolve():new Promise((n=>{const e=()=>{"function"==typeof t.create?n():requestAnimationFrame(e)};requestAnimationFrame(e)}))}const i={async create(t,n,s){const{globalOptions:i,...r}=s??{},a=e(i);return await o(a),a.create({message:t,type:n,...r})},async dismiss(n){if(t)return await o(t),t.dismiss(n)},async dismissAll(){if(t)return await o(t),t.dismissAll()},configure(t){e(t)}},c="sd-modal-container";class u{modalId;okFn;cancelFn;closeFn;dismissedFn;containerRef;pendingActions=[];constructor(t,n){this.modalId=t,this.containerRef=n}onOk(t){return this.okFn=t,this}onCancel(t){return this.cancelFn=t,this}onClose(t){return this.closeFn=t,this}onDismissed(t){return this.dismissedFn=t,this}update(t){return this.runOrQueue((()=>{this.containerRef.update?.(this.modalId,t)})),this}_triggerOk(){this.okFn?.()}_triggerCancel(){this.cancelFn?.()}_triggerClose(){this.closeFn?.()}_triggerDismissed(){this.dismissedFn?.()}_setId(t){this.modalId=t;const n=[...this.pendingActions];this.pendingActions=[],n.forEach((t=>t()))}runOrQueue(t){this.modalId?t():this.pendingActions.push(t)}}let d=null;function l(t,n){n&&null!=n.zIndex&&t.style.setProperty("--sd-modal-container-z-index",n.zIndex+"")}function m(t){return function(){if("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof customElements)throw Error("[sdModal] Browser APIs are unavailable. Use `sdModal` only on the client.")}(),function(){if(!customElements.get(c))throw Error("[sdModal] `sd-modal-container` is not registered. Call `defineCustomElements(window)` before using `sdModal`.")}(),d&&document.body.contains(d)?(l(d,t),d):(d=document.createElement(c),l(d,t),document.body.appendChild(d),d)}async function f(t){if(await customElements.whenDefined(c),"function"==typeof t.open)return Promise.resolve();throw Error("[sdModal] `sd-modal-container` is registered but not ready to open dialogs.")}const h={confirm(t){const n=m(),e=new u("",n);return f(n).then((async()=>{const s=await n.open(t,e);e._setId(s)})),e},create(t){const{component:n,persist:e}=t,s=m(),o=new u("",s),i={persistent:e};return f(s).then((async()=>{const t=await s.createCustom(n,i,o);o._setId(t)})),o},configure(t){m(t)}};export{h as sdModal,i as sdToast}
1
+ export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-D-pFdq6g.js";let t=null;function n(t,n){n&&(n.position&&t.setAttribute("position",n.position),null!=n.maxVisible&&t.setAttribute("max-visible",n.maxVisible+""),null!=n.defaultDuration&&t.setAttribute("default-duration",n.defaultDuration+""),null!=n.zIndex&&t.setAttribute("z-index",n.zIndex+""))}function e(e){return t&&document.body.contains(t)?(n(t,e),t):(t=document.createElement("sd-toast-container"),n(t,e),document.body.appendChild(t),t)}function i(t){return"function"==typeof t.create?Promise.resolve():new Promise((n=>{const e=()=>{"function"==typeof t.create?n():requestAnimationFrame(e)};requestAnimationFrame(e)}))}const o={async create(t,n,s){const{globalOptions:o,...r}=s??{},c=e(o);return await i(c),c.create({message:t,type:n,...r})},async dismiss(n){if(t)return await i(t),t.dismiss(n)},async dismissAll(){if(t)return await i(t),t.dismissAll()},configure(t){e(t)}},c="sd-modal-container",u={ok:"confirm",cancel:"cancel",close:"close"};class d{modalId;okFn;cancelFn;closeFn;dismissedFn;containerRef;pendingActions=[];dismissRequested=!1;constructor(t,n){this.modalId=t,this.containerRef=n}onOk(t){return this.okFn=t,this}onCancel(t){return this.cancelFn=t,this}onClose(t){return this.closeFn=t,this}onDismissed(t){return this.dismissedFn=t,this}update(t){return this.runOrQueue((()=>{this.containerRef.update?.(this.modalId,t)})),this}ok(){return this.dismiss("ok")}cancel(){return this.dismiss("cancel")}close(){return this.dismiss("close")}dismiss(t="close"){if(this.dismissRequested)return this;this.dismissRequested=!0;const n=u[t];return this.runOrQueue((()=>{this.containerRef.dismissById?.(this.modalId,n)})),this}_triggerOk(){this.okFn?.()}_triggerCancel(){this.cancelFn?.()}_triggerClose(){this.closeFn?.()}_triggerDismissed(){this.dismissedFn?.()}_setId(t){this.modalId=t;const n=[...this.pendingActions];this.pendingActions=[],n.forEach((t=>t()))}runOrQueue(t){this.modalId?t():this.pendingActions.push(t)}}let l=null;function m(t,n){n&&null!=n.zIndex&&t.style.setProperty("--sd-modal-container-z-index",n.zIndex+"")}function h(t){return function(){if("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof customElements)throw Error("[sdModal] Browser APIs are unavailable. Use `sdModal` only on the client.")}(),function(){if(!customElements.get(c))throw Error("[sdModal] `sd-modal-container` is not registered. Call `defineCustomElements(window)` before using `sdModal`.")}(),l&&document.body.contains(l)?(m(l,t),l):(l=document.createElement(c),m(l,t),document.body.appendChild(l),l)}async function f(t){if(await customElements.whenDefined(c),"function"==typeof t.open)return Promise.resolve();throw Error("[sdModal] `sd-modal-container` is registered but not ready to open dialogs.")}function p(){const t=h();return new d("",t)}function w(t,n){const{component:e,persist:s}=n,i=h(),o={persistent:s};f(i).then((async()=>{const n=await i.createCustom(e,o,t);t._setId(n)}))}const y={confirm(t){const n=h(),e=new d("",n);return f(n).then((async()=>{const s=await n.open(t,e);e._setId(s)})),e},create(t){const n=p();return w(n,t),n},configure(t){h(t)}};export{w as _attachSdModalWithRef,p as _createSdModalRef,y as sdModal,o as sdToast}