@sellmate/design-system 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-badge.cjs.entry.js +1 -1
- package/dist/cjs/sd-barcode-input.cjs.entry.js +1 -1
- package/dist/cjs/{sd-button.config-WeoddlTQ.js → sd-button.config-eTAJM2iW.js} +17 -3
- package/dist/cjs/sd-button_2.cjs.entry.js +6 -5
- package/dist/cjs/sd-calendar_2.cjs.entry.js +5 -5
- package/dist/cjs/sd-callout.cjs.entry.js +1 -1
- package/dist/cjs/sd-card.cjs.entry.js +1 -1
- package/dist/cjs/sd-chip-input.cjs.entry.js +274 -0
- package/dist/cjs/sd-chip.cjs.entry.js +14 -84
- package/dist/cjs/sd-chip.config-DiLoRpct.js +71 -0
- package/dist/cjs/sd-circle-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +3 -3
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +9 -9
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +1 -1
- package/dist/cjs/sd-divider.cjs.entry.js +1 -1
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +9 -5
- package/dist/cjs/sd-field_3.cjs.entry.js +9 -8
- package/dist/cjs/sd-ghost-button_2.cjs.entry.js +407 -0
- package/dist/cjs/sd-linear-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-loading-container.cjs.entry.js +2 -2
- package/dist/cjs/sd-pagination_4.cjs.entry.js +8 -8
- package/dist/cjs/sd-popup.cjs.entry.js +1 -1
- package/dist/cjs/sd-portal.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +6 -6
- package/dist/cjs/sd-select_3.cjs.entry.js +8 -8
- package/dist/cjs/sd-switch.cjs.entry.js +1 -1
- package/dist/cjs/sd-table.cjs.entry.js +6 -6
- package/dist/cjs/sd-tabs.cjs.entry.js +5 -2
- package/dist/cjs/sd-td.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast.cjs.entry.js +2 -2
- package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/sd-badge/sd-badge.js +1 -1
- package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +1 -1
- package/dist/collection/components/sd-button/sd-button.config.js +9 -1
- package/dist/collection/components/sd-button/sd-button.css +6 -5
- package/dist/collection/components/sd-button/sd-button.js +5 -4
- package/dist/collection/components/sd-calendar/sd-calendar.js +3 -3
- package/dist/collection/components/sd-callout/sd-callout.js +1 -1
- package/dist/collection/components/sd-card/sd-card.js +1 -1
- package/dist/collection/components/sd-chip/sd-chip.config.js +0 -1
- package/dist/collection/components/sd-chip/sd-chip.css +5 -0
- package/dist/collection/components/sd-chip/sd-chip.js +7 -5
- package/dist/collection/components/sd-chip-input/sd-chip-input.config.js +48 -0
- package/dist/collection/components/sd-chip-input/sd-chip-input.css +92 -0
- package/dist/collection/components/sd-chip-input/sd-chip-input.js +709 -0
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +2 -2
- package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +2 -2
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +2 -2
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +1 -1
- package/dist/collection/components/sd-divider/sd-divider.js +1 -1
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.config.js +3 -2
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.css +4 -0
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +5 -3
- package/dist/collection/components/sd-field/sd-field.js +6 -5
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.css +21 -0
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +27 -2
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
- package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
- package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
- package/dist/collection/components/sd-number-input/sd-number-input.js +4 -4
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-popup/sd-popup.js +1 -1
- package/dist/collection/components/sd-portal/sd-portal.js +1 -1
- package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +2 -2
- package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +4 -4
- package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +2 -2
- package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +2 -2
- package/dist/collection/components/sd-select/sd-select.js +4 -4
- package/dist/collection/components/sd-switch/sd-switch.js +1 -1
- package/dist/collection/components/sd-table/sd-table.js +6 -6
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +2 -2
- package/dist/collection/components/sd-table/sd-td/sd-td.js +1 -1
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +3 -3
- package/dist/collection/components/sd-tabs/sd-tabs.css +27 -0
- package/dist/collection/components/sd-tabs/sd-tabs.js +24 -1
- package/dist/collection/components/sd-tag/sd-tag.js +2 -2
- package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
- package/dist/collection/components/sd-toast/sd-toast.js +2 -2
- package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
- package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
- package/dist/components/{p-CnCH_nnG.js → p-0KaFFbD8.js} +1 -1
- package/dist/components/{p-B3vmDhWb.js → p-4XivETkt.js} +1 -1
- package/dist/components/p-AmkZCF9y.js +1 -0
- package/dist/components/p-BA8i1i5_.js +1 -0
- package/dist/components/{p-7TYtYYrb.js → p-BcsFHQH8.js} +1 -1
- package/dist/components/{p-C_RL1gZR.js → p-BnaD56dI.js} +1 -1
- package/dist/components/p-Bq9q5LoZ.js +1 -0
- package/dist/components/p-BwUUaGFU.js +1 -0
- package/dist/components/{p-C2LhOf89.js → p-CJdrq8cV.js} +1 -1
- package/dist/components/{p-Due8URWT.js → p-CJr5BdNN.js} +1 -1
- package/dist/components/p-CWlwx4xx.js +1 -0
- package/dist/components/p-CWz_dfBG.js +1 -0
- package/dist/components/{p-PDLDFsH7.js → p-CjVOfLam.js} +1 -1
- package/dist/components/{p-BaOCZ7B6.js → p-Ck9bJZTm.js} +1 -1
- package/dist/components/{p-BS1cT5dG.js → p-CkQzw2e0.js} +1 -1
- package/dist/components/p-CqvS2J1B.js +1 -0
- package/dist/components/p-CyGi6aGo.js +1 -0
- package/dist/components/p-Cz9ralVS.js +1 -0
- package/dist/components/{p-C8MKSPNX.js → p-D4TisqIF.js} +1 -1
- package/dist/components/{p-B5XCkCeg.js → p-D5O7fZYw.js} +1 -1
- package/dist/components/{p-BDUIw6As.js → p-DApxX0af.js} +1 -1
- package/dist/components/p-DR0N8_Vt.js +1 -0
- package/dist/components/p-DUhqd8c7.js +1 -0
- package/dist/components/{p-DLNwV8Wa.js → p-DmbwfZF7.js} +1 -1
- package/dist/components/p-Dp6NByuZ.js +1 -0
- package/dist/components/{p-CwUPCrDk.js → p-Dt9-l05k.js} +1 -1
- package/dist/components/{p-J57vnHhu.js → p-DwU-e9i1.js} +1 -1
- package/dist/components/{p-BnJJAhY6.js → p-Dwl1u73P.js} +1 -1
- package/dist/components/{p-yTY5CmAx.js → p-NaAHdFVI.js} +1 -1
- package/dist/components/{p-B8Z5qc_1.js → p-jtJFHONo.js} +1 -1
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-badge.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-callout.js +1 -1
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-chip-input.d.ts +11 -0
- package/dist/components/sd-chip-input.js +1 -0
- package/dist/components/sd-chip.js +1 -1
- package/dist/components/sd-circle-progress.js +1 -1
- package/dist/components/sd-confirm-modal.js +1 -1
- package/dist/components/sd-date-picker-trigger.js +1 -1
- package/dist/components/sd-date-picker.js +1 -1
- package/dist/components/sd-date-range-picker-calendar.js +1 -1
- package/dist/components/sd-date-range-picker.js +1 -1
- package/dist/components/sd-divider.js +1 -1
- package/dist/components/sd-dropdown-button.js +1 -1
- package/dist/components/sd-field.js +1 -1
- package/dist/components/sd-file-picker.js +1 -1
- package/dist/components/sd-floating-portal.js +1 -1
- package/dist/components/sd-ghost-button.js +1 -1
- package/dist/components/sd-guide.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-key-value-table.js +1 -1
- package/dist/components/sd-linear-progress.js +1 -1
- package/dist/components/sd-loading-container.js +1 -1
- package/dist/components/sd-loading-modal.js +1 -1
- package/dist/components/sd-modal-container.js +1 -1
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-popup.js +1 -1
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-select-list-item-search.js +1 -1
- package/dist/components/sd-select-list-item.js +1 -1
- package/dist/components/sd-select-listbox.js +1 -1
- package/dist/components/sd-select-trigger.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-switch.js +1 -1
- package/dist/components/sd-table.js +1 -1
- package/dist/components/sd-tabs.js +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-tbody.js +1 -1
- package/dist/components/sd-td.js +1 -1
- package/dist/components/sd-textarea.js +1 -1
- package/dist/components/sd-thead.js +1 -1
- package/dist/components/sd-toast-container.js +1 -1
- package/dist/components/sd-toast.js +1 -1
- package/dist/components/sd-toggle.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-6716691b.entry.js → p-0ac4d17b.entry.js} +1 -1
- package/dist/design-system/{p-19d47ac2.entry.js → p-12c1ddfc.entry.js} +1 -1
- package/dist/design-system/{p-8926c5ec.entry.js → p-15518cf5.entry.js} +1 -1
- package/dist/design-system/{p-de743615.entry.js → p-20ebfd9e.entry.js} +1 -1
- package/dist/design-system/{p-11e99ac5.entry.js → p-24cb3aef.entry.js} +1 -1
- package/dist/design-system/p-2f53e2f9.entry.js +1 -0
- package/dist/design-system/{p-3eb72b33.entry.js → p-36b8f224.entry.js} +1 -1
- package/dist/design-system/{p-86db28ce.entry.js → p-3bd59260.entry.js} +1 -1
- package/dist/design-system/p-4fd59127.entry.js +1 -0
- package/dist/design-system/{p-95cce55d.entry.js → p-5b2dd552.entry.js} +1 -1
- package/dist/design-system/p-5deefcbc.entry.js +1 -0
- package/dist/design-system/{p-e1ef1eb8.entry.js → p-6ebd85ae.entry.js} +1 -1
- package/dist/design-system/p-798c0f9b.entry.js +1 -0
- package/dist/design-system/p-7ca9a6c9.entry.js +1 -0
- package/dist/design-system/{p-5b7ea330.entry.js → p-9f899376.entry.js} +1 -1
- package/dist/design-system/p-9ff473b2.entry.js +1 -0
- package/dist/design-system/p-DDj5KTBF.js +1 -0
- package/dist/design-system/p-DjcjlPt7.js +1 -0
- package/dist/design-system/p-a1f248ed.entry.js +1 -0
- package/dist/design-system/{p-1dd139cb.entry.js → p-a9892cbe.entry.js} +1 -1
- package/dist/design-system/{p-39a2bf05.entry.js → p-acaaf137.entry.js} +1 -1
- package/dist/design-system/{p-06344171.entry.js → p-b1d1f1d3.entry.js} +1 -1
- package/dist/design-system/{p-4ca63a2d.entry.js → p-b495f26c.entry.js} +1 -1
- package/dist/design-system/{p-362ac234.entry.js → p-b63c672a.entry.js} +1 -1
- package/dist/design-system/{p-b3b46576.entry.js → p-bbae006c.entry.js} +1 -1
- package/dist/design-system/p-bbb51afa.entry.js +1 -0
- package/dist/design-system/p-d40ffa84.entry.js +1 -0
- package/dist/design-system/{p-acfe5585.entry.js → p-e4944ae6.entry.js} +1 -1
- package/dist/design-system/{p-a0607a9f.entry.js → p-e5f1156c.entry.js} +1 -1
- package/dist/design-system/p-f462bc54.entry.js +1 -0
- package/dist/design-system/{p-21f654e3.entry.js → p-f8b6b169.entry.js} +1 -1
- package/dist/design-system/{p-a0daadc8.entry.js → p-fcd3961f.entry.js} +1 -1
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-badge.entry.js +1 -1
- package/dist/esm/sd-barcode-input.entry.js +1 -1
- package/dist/esm/{sd-button.config-CdRvJ-Uc.js → sd-button.config-DjcjlPt7.js} +16 -3
- package/dist/esm/sd-button_2.entry.js +6 -5
- package/dist/esm/sd-calendar_2.entry.js +5 -5
- package/dist/esm/sd-callout.entry.js +1 -1
- package/dist/esm/sd-card.entry.js +1 -1
- package/dist/esm/sd-chip-input.entry.js +272 -0
- package/dist/esm/sd-chip.config-DDj5KTBF.js +67 -0
- package/dist/esm/sd-chip.entry.js +9 -79
- package/dist/esm/sd-circle-progress.entry.js +1 -1
- package/dist/esm/sd-confirm-modal_2.entry.js +3 -3
- package/dist/esm/sd-date-picker_7.entry.js +9 -9
- package/dist/esm/sd-date-range-picker-calendar.entry.js +1 -1
- package/dist/esm/sd-divider.entry.js +1 -1
- package/dist/esm/sd-dropdown-button.entry.js +9 -5
- package/dist/esm/sd-field_3.entry.js +9 -8
- package/dist/esm/sd-ghost-button_2.entry.js +404 -0
- package/dist/esm/sd-linear-progress.entry.js +1 -1
- package/dist/esm/sd-loading-container.entry.js +2 -2
- package/dist/esm/sd-pagination_4.entry.js +8 -8
- package/dist/esm/sd-popup.entry.js +1 -1
- package/dist/esm/sd-portal.entry.js +1 -1
- package/dist/esm/sd-select-list-item_2.entry.js +6 -6
- package/dist/esm/sd-select_3.entry.js +8 -8
- package/dist/esm/sd-switch.entry.js +1 -1
- package/dist/esm/sd-table.entry.js +6 -6
- package/dist/esm/sd-tabs.entry.js +5 -2
- package/dist/esm/sd-td.entry.js +1 -1
- package/dist/esm/sd-toast-container.entry.js +1 -1
- package/dist/esm/sd-toast.entry.js +2 -2
- package/dist/esm/sd-toggle.entry.js +1 -1
- package/dist/types/components/sd-button/sd-button.config.d.ts +10 -2
- package/dist/types/components/sd-chip/sd-chip.config.d.ts +0 -1
- package/dist/types/components/sd-chip-input/sd-chip-input.config.d.ts +34 -0
- package/dist/types/components/sd-chip-input/sd-chip-input.d.ts +53 -0
- package/dist/types/components/sd-dropdown-button/sd-dropdown-button.config.d.ts +9 -1
- package/dist/types/components/sd-ghost-button/sd-ghost-button.d.ts +1 -0
- package/dist/types/components/sd-tabs/sd-tabs.d.ts +1 -0
- package/dist/types/components.d.ts +210 -0
- package/hydrate/index.js +449 -121
- package/hydrate/index.mjs +449 -121
- package/package.json +1 -1
- package/dist/cjs/sd-ghost-button.cjs.entry.js +0 -179
- package/dist/cjs/sd-tag.cjs.entry.js +0 -227
- package/dist/components/p-B8QZRiYH.js +0 -1
- package/dist/components/p-BYgOJUk0.js +0 -1
- package/dist/components/p-BmmIQQlT.js +0 -1
- package/dist/components/p-CMUpMkva.js +0 -1
- package/dist/components/p-CeoBnd3w.js +0 -1
- package/dist/components/p-CpdFMy8s.js +0 -1
- package/dist/components/p-CqcGVHzJ.js +0 -1
- package/dist/components/p-CtxH9xQc.js +0 -1
- package/dist/components/p-DEfG8t7h.js +0 -1
- package/dist/components/p-DGCbSjhn.js +0 -1
- package/dist/components/p-DLeITJ-j.js +0 -1
- package/dist/components/p-DqXt80Qn.js +0 -1
- package/dist/design-system/p-0a225a4a.entry.js +0 -1
- package/dist/design-system/p-17d8457d.entry.js +0 -1
- package/dist/design-system/p-2bd09b2f.entry.js +0 -1
- package/dist/design-system/p-515e837b.entry.js +0 -1
- package/dist/design-system/p-5ee1e5e6.entry.js +0 -1
- package/dist/design-system/p-79e73305.entry.js +0 -1
- package/dist/design-system/p-97b16b63.entry.js +0 -1
- package/dist/design-system/p-CdRvJ-Uc.js +0 -1
- package/dist/design-system/p-a39016ac.entry.js +0 -1
- package/dist/design-system/p-d9c1ec16.entry.js +0 -1
- package/dist/design-system/p-de565b9f.entry.js +0 -1
- package/dist/esm/sd-ghost-button.entry.js +0 -177
- package/dist/esm/sd-tag.entry.js +0 -225
|
@@ -818,24 +818,24 @@ export class SdTable {
|
|
|
818
818
|
'--table-selectable-width': `${TABLE_SELECTABLE_COLUMN_WIDTH}px`,
|
|
819
819
|
'--table-host-height': hostHeight,
|
|
820
820
|
};
|
|
821
|
-
return (h(Host, { key: '
|
|
821
|
+
return (h(Host, { key: '164ba96033be0195fa50e3d4d684059b9c471479', style: hostStyle }, h("div", { key: '2f1a1be73f86c72e7caa46981ee691d29bb237c7', class: "sd-table__container", style: {
|
|
822
822
|
'--table-width': this.width,
|
|
823
823
|
'--pagination-height': `${paginationHeight}px`,
|
|
824
|
-
} }, h("div", { key: '
|
|
824
|
+
} }, h("div", { key: '16976d24d4c21714183f9691b06c503b86388c54', class: {
|
|
825
825
|
'sd-table__wrapper': true,
|
|
826
826
|
'sd-table__wrapper--use-top': this.useTop,
|
|
827
|
-
} }, h("div", { key: '
|
|
827
|
+
} }, h("div", { key: 'fdd0dcfbff4c3a5e441d720d2e1a39a69c51f9cf', class: {
|
|
828
828
|
'sd-table__scroll-container': true,
|
|
829
829
|
'sd-table__scroll-container--loading': this.isLoading,
|
|
830
830
|
'sd-table__scroll-container--no-data': isNoData,
|
|
831
|
-
} }, this.isLoading && (h("div", { key: '
|
|
831
|
+
} }, this.isLoading && (h("div", { key: 'facb26c0d1651d4a2a6e0dee5c1b8ca73586de89', class: "sd-table__loading", style: { top: `${this.loadingScrollTop}px` } }, h("sd-circle-progress", { key: '844b92fc9fc38f95d51092b698b67b685bcba076', indeterminate: true }))), isNoData && (h(h.Fragment, null, h("div", { key: '458c8e24b85c0e7c99afe940c3d5856e63bc582a', class: "sd-table__no-data-header-overlay" }), h("div", { key: 'bd29a77ac11da7e5d513955a4c4baa0dd89a623d', class: "sd-table__no-data" }, h("div", { key: '7db0e8e3888e97638f3c78d560e844cc0f8b2944', class: "sd-table__no-data-content", ref: el => {
|
|
832
832
|
this.noDataContentEl = el;
|
|
833
833
|
if (el)
|
|
834
834
|
this.syncNoDataContentObserver();
|
|
835
|
-
} }, h("slot", { key: '
|
|
835
|
+
} }, h("slot", { key: 'fa175041907d4af7e5e0db7cad6e9a3e16e96901', name: "no-data" }, h("span", { key: '3fae3a23d86dc543502f74574a4b5c3f026b9992' }, this.resolvedNoDataLabel)))))), h("table", { key: '9ae98e0697e045b308f7e584fb496692acade8ba', 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 &&
|
|
836
836
|
this.pagination.rowsPerPage > 0 &&
|
|
837
837
|
this.rowCount > 0 &&
|
|
838
|
-
!this.useVirtualScroll && (h("div", { key: '
|
|
838
|
+
!this.useVirtualScroll && (h("div", { key: 'a0da779351490332035ec784bc301ea2cb017afd', class: "sd-table__pagination" }, h("sd-pagination", { key: '8c3bcd06e1644afaebabd3762cdb03900f727142', 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: '4bff157ac6e0fb5efe03663d4bbf58d67f8308b6', value: this.useInternalPagination
|
|
839
839
|
? this.innerRowsPerPage
|
|
840
840
|
: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", emitValue: true, onSdUpdate: e => {
|
|
841
841
|
if (!this.isRowsPerPageValue(e.detail))
|
|
@@ -45,9 +45,9 @@ export class SdTbody {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return (h(Host, { key: '
|
|
48
|
+
return (h(Host, { key: 'bc05db24c914d72f0480e0d6d9b594e21cf03153', slot: `${this.tableId}-body` }, h("tbody", { key: 'ba4eb8fcbc184bcd245f47093ca5acfacc3aebf3', class: { tbody: true } }, [
|
|
49
49
|
this.topSpacerHeight > 0 && (h("tr", { key: "spacer-top", class: "tbody__spacer", style: { height: `${this.topSpacerHeight}px`, display: 'block' } })),
|
|
50
|
-
h("slot", { key: '
|
|
50
|
+
h("slot", { key: '3c9d25b226dfb20b044a718416d3cdda13eff798' }),
|
|
51
51
|
this.bottomSpacerHeight > 0 && (h("tr", { key: "spacer-bottom", class: "tbody__spacer", style: { height: `${this.bottomSpacerHeight}px`, display: 'block' } })),
|
|
52
52
|
])));
|
|
53
53
|
}
|
|
@@ -150,7 +150,7 @@ export class SdTd {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
render() {
|
|
153
|
-
return (h(Host, { key: '
|
|
153
|
+
return (h(Host, { key: '95f97474c4d00a35085c558bf43593322a9f69e7', class: { [`align-${this.align}`]: Boolean(this.align) } }, h("slot", { key: 'f67d1e8b125c10446dac3abdfa0da01bfb83f470' })));
|
|
154
154
|
}
|
|
155
155
|
static get is() { return "sd-td"; }
|
|
156
156
|
static get originalStyleUrls() {
|
|
@@ -158,16 +158,16 @@ export class SdThead {
|
|
|
158
158
|
'--table-border-color': TABLE_BORDER.color,
|
|
159
159
|
'--table-border-width': `${TABLE_BORDER.width}px`,
|
|
160
160
|
};
|
|
161
|
-
return (h(Host, { key: '
|
|
161
|
+
return (h(Host, { key: '822abd0e5ff71d9e55b6478d56c9277009983deb', slot: `${this.tableId}-head`, style: headStyle }, h("thead", { key: '7c690c49eb0d9be48637b8a6e92287fac22bf377', class: {
|
|
162
162
|
'thead': true,
|
|
163
163
|
'thead--sticky': this._stickyHeader,
|
|
164
|
-
} }, h("tr", { key: '
|
|
164
|
+
} }, h("tr", { key: '81c64bb5b06d7e8525ebceaf6a229034e90f7a48', class: "tr" }, this._selectable && (h("th", { key: 'fe00535fb5cd54d053c17b3d3a6fa8869d483b8b', class: {
|
|
165
165
|
'th': true,
|
|
166
166
|
'th--selected': true,
|
|
167
167
|
'sticky-left': true,
|
|
168
168
|
'sticky-left-edge': stickyLeftCount === 0,
|
|
169
169
|
'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
|
|
170
|
-
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '
|
|
170
|
+
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: 'de1a3ddf9b3df06d8cc9b85431c31ff84b7b8218', value: this.getIsAllChecked(), disabled: safeRows.length === 0, onSdUpdate: (e) => this.handleSelectAll(e.detail) }), h("div", { key: 'afe516ce212b24abcb075b6e6eb661ffcb6ce297', class: "th__bar" }))), stickyLeftCols.map((col, idx) => (h("th", { key: col.name, class: {
|
|
171
171
|
'th': true,
|
|
172
172
|
[`${col.thClass}`]: Boolean(col.thClass),
|
|
173
173
|
'sticky-left': true,
|
|
@@ -115,4 +115,31 @@ sd-tabs .sd-tabs--sub .sd-tabs__label {
|
|
|
115
115
|
}
|
|
116
116
|
sd-tabs .sd-tabs--sub .sd-tabs__label::before {
|
|
117
117
|
font-weight: var(--sd-tabs-sub-font-weight-default);
|
|
118
|
+
}
|
|
119
|
+
sd-tabs .sd-tabs--vertical {
|
|
120
|
+
flex-direction: column;
|
|
121
|
+
align-items: stretch;
|
|
122
|
+
width: fit-content;
|
|
123
|
+
border-bottom: none;
|
|
124
|
+
border-right: var(--sd-tabs-main-border-width) solid var(--sd-tabs-main-selected-border);
|
|
125
|
+
}
|
|
126
|
+
sd-tabs .sd-tabs--vertical .sd-tabs__tab {
|
|
127
|
+
justify-content: flex-start;
|
|
128
|
+
border-bottom: var(--sd-tabs-main-border-width) solid var(--sd-tabs-main-default-border);
|
|
129
|
+
border-right: none;
|
|
130
|
+
border-top-right-radius: 0;
|
|
131
|
+
border-bottom-left-radius: var(--sd-tabs-main-radius);
|
|
132
|
+
}
|
|
133
|
+
sd-tabs .sd-tabs--vertical .sd-tabs__tab--selected {
|
|
134
|
+
border-color: var(--sd-tabs-main-selected-border);
|
|
135
|
+
}
|
|
136
|
+
sd-tabs .sd-tabs--vertical.sd-tabs--sub {
|
|
137
|
+
gap: 16px;
|
|
138
|
+
border-right: none;
|
|
139
|
+
}
|
|
140
|
+
sd-tabs .sd-tabs--vertical.sd-tabs--sub .sd-tabs__tab {
|
|
141
|
+
justify-content: center;
|
|
142
|
+
width: 100%;
|
|
143
|
+
border: none;
|
|
144
|
+
border-radius: 0;
|
|
118
145
|
}
|
|
@@ -5,6 +5,7 @@ export class SdTabs {
|
|
|
5
5
|
tabs = [];
|
|
6
6
|
size = 'md';
|
|
7
7
|
isSub = false;
|
|
8
|
+
vertical = false;
|
|
8
9
|
update;
|
|
9
10
|
valueChanged(newValue) {
|
|
10
11
|
this.value = newValue;
|
|
@@ -27,6 +28,8 @@ export class SdTabs {
|
|
|
27
28
|
const classes = ['sd-tabs', `sd-tabs--${this.size ?? 'md'}`];
|
|
28
29
|
if (this.isSub)
|
|
29
30
|
classes.push('sd-tabs--sub');
|
|
31
|
+
if (this.vertical)
|
|
32
|
+
classes.push('sd-tabs--vertical');
|
|
30
33
|
return classes.join(' ');
|
|
31
34
|
}
|
|
32
35
|
getBadgeName(tab) {
|
|
@@ -67,7 +70,7 @@ export class SdTabs {
|
|
|
67
70
|
};
|
|
68
71
|
}
|
|
69
72
|
render() {
|
|
70
|
-
return (h("div", { key: '
|
|
73
|
+
return (h("div", { key: '277188138dd50992b468b35f723cc3f852ad38c3', class: this.getContainerClasses(), style: this.buildCssVars() }, this.tabs.map((tab, index) => {
|
|
71
74
|
const badgeName = this.getBadgeName(tab);
|
|
72
75
|
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 => {
|
|
73
76
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
@@ -180,6 +183,26 @@ export class SdTabs {
|
|
|
180
183
|
"reflect": true,
|
|
181
184
|
"attribute": "is-sub",
|
|
182
185
|
"defaultValue": "false"
|
|
186
|
+
},
|
|
187
|
+
"vertical": {
|
|
188
|
+
"type": "boolean",
|
|
189
|
+
"mutable": false,
|
|
190
|
+
"complexType": {
|
|
191
|
+
"original": "boolean",
|
|
192
|
+
"resolved": "boolean",
|
|
193
|
+
"references": {}
|
|
194
|
+
},
|
|
195
|
+
"required": false,
|
|
196
|
+
"optional": false,
|
|
197
|
+
"docs": {
|
|
198
|
+
"tags": [],
|
|
199
|
+
"text": ""
|
|
200
|
+
},
|
|
201
|
+
"getter": false,
|
|
202
|
+
"setter": false,
|
|
203
|
+
"reflect": true,
|
|
204
|
+
"attribute": "vertical",
|
|
205
|
+
"defaultValue": "false"
|
|
183
206
|
}
|
|
184
207
|
};
|
|
185
208
|
}
|
|
@@ -27,7 +27,7 @@ export class SdTag {
|
|
|
27
27
|
render() {
|
|
28
28
|
const config = this.resolvedConfig;
|
|
29
29
|
const iconNode = this.renderIcon(config.icon, config.iconSize);
|
|
30
|
-
return (h("span", { key: '
|
|
30
|
+
return (h("span", { key: 'f5dd5e267ffdde104f36ec7f19390357dbf03610', class: "sd-tag", style: {
|
|
31
31
|
'--sd-tag-background': config.background,
|
|
32
32
|
'--sd-tag-content': config.content,
|
|
33
33
|
'--sd-tag-height': config.height,
|
|
@@ -37,7 +37,7 @@ export class SdTag {
|
|
|
37
37
|
'--sd-tag-font-weight': config.fontWeight,
|
|
38
38
|
'--sd-tag-line-height': config.lineHeight,
|
|
39
39
|
'--sd-tag-radius': config.radius,
|
|
40
|
-
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '
|
|
40
|
+
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '53c649171b1bba53bf71bbf8f382c0678f1a3a6f', class: "sd-tag__label" }, this.label), this.icon && !this.isLeft && iconNode));
|
|
41
41
|
}
|
|
42
42
|
static get is() { return "sd-tag"; }
|
|
43
43
|
static get originalStyleUrls() {
|
|
@@ -105,7 +105,7 @@ export class SdTextarea {
|
|
|
105
105
|
'--sd-system-size-field-sm-height': 'auto',
|
|
106
106
|
'--sd-system-radius-field-sm': `${TEXTAREA_TOKENS.radius}px`,
|
|
107
107
|
};
|
|
108
|
-
return (h("sd-field", { key: '
|
|
108
|
+
return (h("sd-field", { key: '2a1cd03e4f0fa5457b3164f1b6b71d808633414c', 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: 'b4e25ced8e583ed3d6e8a6026db0d3a2f198acb4', class: "sd-textarea__content" }, h("textarea", { key: '4faeceee380a7ab9a4ff337d16f46c4d7f42fa50', 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 }))));
|
|
109
109
|
}
|
|
110
110
|
static get is() { return "sd-textarea"; }
|
|
111
111
|
static get originalStyleUrls() {
|
|
@@ -17,12 +17,12 @@ export class SdToast {
|
|
|
17
17
|
const linkColor = typeConfig.linkColor ?? typeConfig.content;
|
|
18
18
|
const useDefaultCloseIntent = ['default', 'caution', 'info'].includes(this.type);
|
|
19
19
|
const buttonName = TOAST_BUTTON_NAME_BY_TYPE[this.type] ?? TOAST_BUTTON_NAME_BY_TYPE.default;
|
|
20
|
-
return (h("div", { key: '
|
|
20
|
+
return (h("div", { key: '82c8063406a534e60c985d3c8321612077f75623', style: {
|
|
21
21
|
'--sd-toast-bg': typeConfig.bg,
|
|
22
22
|
'--sd-toast-text': typeConfig.content,
|
|
23
23
|
'--sd-toast-icon': iconColor,
|
|
24
24
|
'--sd-toast-link': linkColor,
|
|
25
|
-
} }, h("div", { key: '
|
|
25
|
+
} }, h("div", { key: 'e83c5b7ddc0edec3fb9e29325dcb52e3295fad4d', class: "sd-toast", role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (h("div", { key: 'd249e5915f0c92a0a2cff43dee5c61d809ffc7f0', class: "sd-toast__icon" }, h("sd-icon", { key: '088da81d0083cc0ca72f2bf59392a72d3f2ed4de', name: this.icon, size: iconSize, color: iconColor }))), h("div", { key: '5cad9a3a81b00d8926d92d9895c4cca1389dc63b', class: "sd-toast__content" }, h("span", { key: '1fbc72aac70fbb3bb630ad10343ea2c8f76f924c', class: "sd-toast__message" }, this.message)), this.link && (h("a", { key: '769a85fa539bab8b478ef999cab615285a842085', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.buttonLabel && (h("sd-button", { key: '77612614898b6abdade4b4599987cbb90bc09c4e', class: "sd-toast__button", name: buttonName, label: this.buttonLabel, onSdClick: (event) => this.buttonClick.emit(event.detail) })), this.useClose && (h("sd-ghost-button", { key: '3bef6c0e7f3dec3f2b1f493f9c979a121bc897e9', class: "sd-toast__close", icon: "close", intent: useDefaultCloseIntent ? 'default' : 'inverse', ariaLabel: "close", size: "xs", onClick: () => this.close.emit() })))));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "sd-toast"; }
|
|
28
28
|
static get originalStyleUrls() {
|
|
@@ -216,7 +216,7 @@ export class SdToastContainer {
|
|
|
216
216
|
const activeToasts = toasts.filter(t => t.state !== 'exiting').reverse();
|
|
217
217
|
const indexMap = new Map();
|
|
218
218
|
activeToasts.forEach((t, i) => indexMap.set(t.id, i));
|
|
219
|
-
return (h("div", { key: '
|
|
219
|
+
return (h("div", { key: '2b0bc86b7e2ea19a44f3c0b870ce5dec1de3a140', class: "sd-toast-container", style: this.getContainerStyles(), onMouseEnter: () => {
|
|
220
220
|
this.expanded = true;
|
|
221
221
|
this.pauseTimers();
|
|
222
222
|
}, onMouseLeave: () => {
|
|
@@ -45,7 +45,7 @@ export class SdToggle {
|
|
|
45
45
|
'--sd-toggle-content-select': TOGGLE_COLORS.content.select,
|
|
46
46
|
'--sd-toggle-content-disabled': TOGGLE_COLORS.content.disabled,
|
|
47
47
|
};
|
|
48
|
-
return (h("label", { key: '
|
|
48
|
+
return (h("label", { key: 'f61e80701bc85205794aec0c960965d29b94a247', class: this.toggleClasses, style: cssVars, "aria-label": this.label || 'toggle' }, this.label, h("input", { key: '26a31febfdae6bebe55291d3454a177366dc3db0', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "sd-toggle"; }
|
|
51
51
|
static get originalStyleUrls() {
|
|
@@ -84,14 +84,14 @@ export class SdTooltip {
|
|
|
84
84
|
const hasLabel = this.label !== undefined && this.label !== '';
|
|
85
85
|
const divTrigger = trigger === 'hover' ? hoverTrigger : hasLabel ? {} : { onClick: toggleTooltip };
|
|
86
86
|
const buttonClickTrigger = trigger === 'click' && hasLabel ? { onSdClick: toggleTooltip } : {};
|
|
87
|
-
return (h(Fragment, { key: '
|
|
87
|
+
return (h(Fragment, { key: 'dab010e285f9cf77097b2d18115d1c8dbb462933' }, h("div", { key: 'c49d1f8d55898cedc462fd321ab47d8a82360ae8', class: `sd-tooltip-trigger ${this.sdClass !== undefined && this.sdClass !== '' ? this.sdClass : ''}`, ...divTrigger }, 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: '53dbdd7df43e2eacf23c2e1b97bf901b225eab1e', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: placement, offset: this.tooltipOffset }, h("div", { key: '3130ace8e25b783d49fde3b682249a8cf1783cde', ref: el => (this.menuEl = el), class: {
|
|
88
88
|
'sd-floating-menu': true,
|
|
89
89
|
[`sd-floating-menu--${tooltipType}`]: true,
|
|
90
90
|
[`sd-floating-menu--${placement}`]: true,
|
|
91
91
|
}, style: {
|
|
92
92
|
'--sd-floating-bg': typeConfig.bg,
|
|
93
93
|
'--sd-floating-content': typeConfig.content,
|
|
94
|
-
}, onMouseEnter: () => this.show(), onMouseLeave: () => this.startHideTimer() }, h("i", { key: '
|
|
94
|
+
}, onMouseEnter: () => this.show(), onMouseLeave: () => this.startHideTimer() }, h("i", { key: '2120f9056ef18218b2ba55d5c921fef9c9a04d67', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${placement}` }, h(TooltipArrow, { key: '557f9ae13f101416d962a84438690078fa7bd16f' })), h("div", { key: '54fb0f3cf0f228184f2eca54a5f3364084b6f834', class: "sd-floating-menu__content", innerHTML: this.slotContentHTML }))))));
|
|
95
95
|
}
|
|
96
96
|
static get is() { return "sd-tooltip"; }
|
|
97
97
|
static get originalStyleUrls() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as
|
|
1
|
+
import{p as t,H as s,c as e,h as i,t as h}from"./p-siTDlOb6.js";import{c as o,d as r,f as l,i as n,e as c,E as d,g as a}from"./p-C5wgHjtx.js";import{d as u}from"./p-CFL9Rfh8.js";import{d as m}from"./p-BNkExhYB.js";import{d as p}from"./p-DmbwfZF7.js";import{d as f}from"./p-NaAHdFVI.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)>=r}get filteredOptions(){if(""===this.searchKeyword)return this.options;if(this.isDepth)return l(this.options,this.searchKeyword);const t=this.searchKeyword.toLowerCase();return this.options.filter((s=>(n(s.label)?c(s.label):s.label).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:"6c2cbad13f8aaa8c0552068c7cbc35a147bee77d",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:"052d783e27e2458aa397c77fe891dad4a440f09e",isScrolled:this.isScrolled,onSdSearchFilter:this.handleSearchFilter}),i("div",{key:"bba95f3c4475d01a65562ba079c8666e3325195d",class:"sd-select-listbox__list",onScroll:this.handleScroll,ref:t=>{this.listEl=t}},this.showSelectAll&&i("sd-select-list-item",{key:"2f55bbacbed71952903599db0739773176ac55fd",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 +1 @@
|
|
|
1
|
-
import{p as e,H as r,h as s,d as c,t}from"./p-siTDlOb6.js";import{p as a}from"./p-D1vaasIp.js";import{s as o}from"./p-j2khhcHY.js";var i={track:"#EEEEEE",arc:"#2D8DFF"};const l=a.progress.color.label,n=o.color.fg.tertiary,p={primary:{arc:i.arc,track:i.track},inverse:{arc:"#FFFFFF",track:"transparent"},error:{arc:"#E30000",track:i.track},complete:{arc:"#01BB4B",track:i.track}},d=2*Math.PI*34,g=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost()}indeterminate=!1;value=0;type="primary";label;get clampedValue(){return Number.isFinite(this.value)?Math.max(0,Math.min(100,this.value)):0}render(){const e=p[this.type]??p.primary,r={"--sd-circle-progress-track":e.track,"--sd-circle-progress-arc":e.arc,"--sd-circle-progress-label-color":l,"--sd-circle-progress-percent-color":0===this.clampedValue?n:e.arc},t={};this.indeterminate||(t.strokeDasharray=`${this.clampedValue/100*d} ${d}`,t.strokeDashoffset="0");const a=!this.indeterminate;return s(c,{key:"
|
|
1
|
+
import{p as e,H as r,h as s,d as c,t}from"./p-siTDlOb6.js";import{p as a}from"./p-D1vaasIp.js";import{s as o}from"./p-j2khhcHY.js";var i={track:"#EEEEEE",arc:"#2D8DFF"};const l=a.progress.color.label,n=o.color.fg.tertiary,p={primary:{arc:i.arc,track:i.track},inverse:{arc:"#FFFFFF",track:"transparent"},error:{arc:"#E30000",track:i.track},complete:{arc:"#01BB4B",track:i.track}},d=2*Math.PI*34,g=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost()}indeterminate=!1;value=0;type="primary";label;get clampedValue(){return Number.isFinite(this.value)?Math.max(0,Math.min(100,this.value)):0}render(){const e=p[this.type]??p.primary,r={"--sd-circle-progress-track":e.track,"--sd-circle-progress-arc":e.arc,"--sd-circle-progress-label-color":l,"--sd-circle-progress-percent-color":0===this.clampedValue?n:e.arc},t={};this.indeterminate||(t.strokeDasharray=`${this.clampedValue/100*d} ${d}`,t.strokeDashoffset="0");const a=!this.indeterminate;return s(c,{key:"46d74c0edb5a5e8cd0472c83efc45a0efaf353b4",style:r},s("svg",{key:"34117c89eb180370a215807e614ad08f4f72b517",class:"sd-circle-progress",viewBox:"0 0 80 80",xmlns:"http://www.w3.org/2000/svg"},s("circle",{key:"08ac6f011b6a4b6744ddcf437b1e0a5b96abfc6e",class:"sd-circle-progress__track",cx:40,cy:40,r:34,fill:"none","stroke-width":12}),s("circle",{key:"5ae0a53ce10bd5a8b2f316ebd00d3ee28c4336d6",class:"sd-circle-progress__arc",cx:40,cy:40,r:34,fill:"none","stroke-width":12,"stroke-linecap":"round",style:t})),a&&s("span",{key:"fd52ee1947d41b2117c9ea6e4cc9a448799342e3",class:"sd-circle-progress__percent"},Math.round(this.clampedValue),"%"),this.label&&s("span",{key:"a58776c4ef67eb900eba97ff4fed138c8f5e8452",class:"sd-circle-progress__label"},this.label))}static get style(){return'@charset "UTF-8";sd-circle-progress{display:inline-flex;flex-direction:column;align-items:center;gap:8px}sd-circle-progress .sd-circle-progress{width:80px;height:80px}sd-circle-progress .sd-circle-progress__track{stroke:var(--sd-circle-progress-track)}sd-circle-progress .sd-circle-progress__arc{stroke:var(--sd-circle-progress-arc);transform:rotate(-90deg);transform-origin:center center;transition:stroke-dasharray 0.4s linear, stroke-dashoffset 0.4s linear}sd-circle-progress .sd-circle-progress__percent{text-align:center;color:var(--sd-circle-progress-percent-color);font-family:"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;font-size:16px;font-weight:700;line-height:26px}sd-circle-progress .sd-circle-progress__label{text-align:center;color:var(--sd-circle-progress-label-color);font-family:"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;font-size:12px;font-weight:400;line-height:20px}sd-circle-progress{}sd-circle-progress[indeterminate] .sd-circle-progress{animation:sd-circle-progress-spin 2s linear infinite;transform-origin:center center}sd-circle-progress[indeterminate] .sd-circle-progress__arc{transform:none;transition:none;animation:sd-circle-progress-spin-path 1.5s ease-in-out infinite}@keyframes sd-circle-progress-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes sd-circle-progress-spin-path{0%{stroke-dasharray:1, 340;stroke-dashoffset:0}50%{stroke-dasharray:151, 340;stroke-dashoffset:-60}100%{stroke-dasharray:151, 340;stroke-dashoffset:-211}}'}},[512,"sd-circle-progress",{indeterminate:[516],value:[2],type:[513],label:[1]}]);function f(){"undefined"!=typeof customElements&&["sd-circle-progress"].forEach((e=>{"sd-circle-progress"===e&&(customElements.get(t(e))||customElements.define(t(e),g))}))}export{g as S,f as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as s,c as i,h as e,t as n}from"./p-siTDlOb6.js";import{n as o}from"./p-CCwNgVmC.js";import{i as a}from"./p-e0ABNkP6.js";import{d as l}from"./p-CWlwx4xx.js";import{d}from"./p-BA8i1i5_.js";import{d as r}from"./p-CkQzw2e0.js";import{d as u}from"./p-CyGi6aGo.js";import{d as h}from"./p-BNkExhYB.js";import{d as p}from"./p-Ck9bJZTm.js";import{d as c}from"./p-CjVOfLam.js";const f=a.textinput.sm,b=a.textinput.md,m={sm:{height:f.height,paddingX:f.paddingX,gap:f.gap,radius:f.radius,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight},md:{height:b.height,paddingX:b.paddingX,gap:b.gap,radius:b.radius,fontSize:b.typography.fontSize,lineHeight:b.typography.lineHeight,fontWeight:b.typography.fontWeight}},g={text:a.textinput.text,icon:a.textinput.icon},_=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.input=i(this,"sdUpdate",7),this.focus=i(this,"sdFocus",7),this.blur=i(this,"sdBlur",7)}get host(){return this}value=null;type="text";size="sm";addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;clearable=!1;width="";rules=[];autoFocus=!1;autocomplete="";maxlength;minlength;inputmode;enterkeyhint;spellcheck=!1;status;hint="";errorMessage="";inputClass="";readonly=!1;error=!1;focused=!1;hovered=!1;label="";labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;inputStyle={};internalValue=null;passwordVisible=!1;nativeEl=void 0;formField;name=o();input;focus;blur;valueChanged(t){this.internalValue=t}internalValueChanged(t){t!==this.value&&(this.value=t,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){null!=this.value&&""!==this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{this.internalValue=t.target.value};handleFocus=async(t,s)=>{this.focused="focus"===t,"blur"===t?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(s)):this.focus?.emit(s)};render(){const t=m[this.size]??m.sm;return e("sd-field",{key:"fce402fae267b5700501e44935f23bebc28efb62",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,readonly:this.readonly,focused:this.focused,hovered:this.hovered,status:this.status,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:t=>this.formField=t,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-input-font-size":`${t.fontSize}px`,"--sd-input-line-height":`${t.lineHeight}px`,"--sd-input-font-weight":t.fontWeight,"--sd-input-padding-x":`${t.paddingX}px`,"--sd-input-gap":`${t.gap}px`,"--sd-input-text-color":g.text.default,"--sd-input-placeholder-color":g.text.placeholder,"--sd-input-disabled-color":g.text.disabled,"--sd-input-icon-color":g.icon.default,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`}},e("label",{key:"f7d8f95cf5ee38a7aa2e44940ba39b9eb001064c",class:"sd-input__content"},e("slot",{key:"23f1f770a268a0798293420ce0df9e5cc94e07b2",name:"prefix"}),e("input",{key:"b8c041cc4a8761cf1cf93a8d1af139cd7720d2d8",name:this.name,ref:t=>this.nativeEl=t,class:`sd-input__native ${this.inputClass}`,type:"password"===this.type&&this.passwordVisible?"text":this.type??"text",value:this.internalValue||"",placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,autocomplete:this.autocomplete||void 0,maxlength:this.maxlength,minlength:this.minlength,inputmode:this.inputmode,enterkeyhint:this.enterkeyhint,spellcheck:this.spellcheck,onInput:this.handleInput,onFocus:t=>this.handleFocus("focus",t),onBlur:t=>this.handleFocus("blur",t),style:this.inputStyle}),e("slot",{key:"5a288d50726b21c156da480937b9759e6c76d33a",name:"suffix"}),this.clearable&&this.internalValue&&!this.disabled&&!this.readonly&&e("sd-ghost-button",{key:"b5315624a6fd5fdcb70526b1abea4fbac83641c1",icon:"close",ariaLabel:"clear",size:"xxs",disabled:this.disabled,class:"sd-input__clear-icon",onClick:async()=>{this.disabled||this.readonly||(this.internalValue="",await(this.formField?.sdValidate()))}}),"password"===this.type&&e("sd-ghost-button",{key:"5ae70d65c531db0bc57d17f85c328a275f7aab2b",icon:this.passwordVisible?"visibilityOn":"visibilityOff",ariaLabel:"visibility",size:"xxs",disabled:this.disabled||this.readonly,class:"sd-input__password-icon",onClick:()=>{this.disabled||this.readonly||(this.passwordVisible=!this.passwordVisible)}})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-icon{display:inline-block;line-height:0}sd-icon .sd-icon--rotate-90{transform:rotate(90deg)}sd-icon .sd-icon--rotate-180{transform:rotate(180deg)}sd-icon .sd-icon--rotate-270{transform:rotate(270deg)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fff inset;box-shadow:0 0 0px 1000px #fff inset;transition:background-color 5000s ease-in-out 0s}input:autofill,input:autofill:hover,input:autofill:focus,input:autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fff inset;box-shadow:0 0 0px 1000px #fff inset;transition:background-color 5000s ease-in-out 0s}sd-input{display:inline-flex}sd-input .sd-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;color:var(--sd-input-text-color);font-size:var(--sd-input-font-size);line-height:var(--sd-input-line-height);font-weight:var(--sd-input-font-weight);padding:0 var(--sd-input-padding-x);gap:var(--sd-input-gap)}sd-input .sd-input__content .sd-input__native{width:100%;height:100%;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}sd-input .sd-input__content .sd-input__native[disabled]{cursor:not-allowed;color:var(--sd-input-disabled-color)}sd-input .sd-input__content .sd-input__native[readonly]{color:var(--sd-system-color-field-text-read-only)}sd-input .sd-input__content .sd-input__native::placeholder{color:var(--sd-input-placeholder-color)}sd-input .sd-input__content .sd-input__clear-icon,sd-input .sd-input__content .sd-input__password-icon{flex-shrink:0}sd-input .sd-input__content .sd-input__native[disabled]~.sd-input__clear-icon,sd-input .sd-input__content .sd-input__native[disabled]~.sd-input__password-icon,sd-input .sd-input__content .sd-input__native[readonly]~.sd-input__clear-icon,sd-input .sd-input__content .sd-input__native[readonly]~.sd-input__password-icon{cursor:not-allowed;pointer-events:none}"}},[772,"sd-input",{value:[1032],type:[1],size:[1],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],placeholder:[1],disabled:[4],clearable:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],autocomplete:[1],maxlength:[2],minlength:[2],inputmode:[1],enterkeyhint:[1],spellcheck:[4],status:[1],hint:[1],errorMessage:[1,"error-message"],inputClass:[1,"input-class"],readonly:[4],error:[1028],focused:[1028],hovered:[1028],label:[1],labelWidth:[8,"label-width"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],inputStyle:[16],name:[1],internalValue:[32],passwordVisible:[32],sdGetNativeElement:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function x(){"undefined"!=typeof customElements&&["sd-input","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-input":customElements.get(n(t))||customElements.define(n(t),_);break;case"sd-button":customElements.get(n(t))||l();break;case"sd-field":customElements.get(n(t))||d();break;case"sd-floating-portal":customElements.get(n(t))||r();break;case"sd-ghost-button":customElements.get(n(t))||u();break;case"sd-icon":customElements.get(n(t))||h();break;case"sd-tag":customElements.get(n(t))||p();break;case"sd-tooltip":customElements.get(n(t))||c()}}))}export{_ as S,x as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,H as d,h as s,t as i}from"./p-siTDlOb6.js";import{f as t}from"./p-BOJJ_sQS.js";import{d as l}from"./p-CWlwx4xx.js";import{d as r}from"./p-CkQzw2e0.js";import{d as o}from"./p-BNkExhYB.js";import{d as a}from"./p-CjVOfLam.js";const n={start:"flex-start",center:"center",end:"flex-end"},f=t.field.label.sm,h=t.field.label.md,p={sm:{height:f.height,gap:f.gap,icon:f.icon,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight},md:{height:h.height,gap:h.gap,icon:h.icon,fontSize:h.typography.fontSize,lineHeight:h.typography.lineHeight,fontWeight:h.typography.fontWeight}},c=["sd-input","sd-barcode-input","sd-textarea","sd-number-input","sd-select","sd-file-picker","sd-date-picker","sd-date-range-picker","sd-chip-input"],b=e(class extends d{constructor(e){super(),!1!==e&&this.__registerHost()}get el(){return this}name="";rules=[];error=!1;disabled=!1;readonly=!1;hovered=!1;focused=!1;status;hint="";errorMessage="";width="";size="sm";label="";labelWidth="";addonLabel="";addonAlign="start";icon=void 0;labelTooltip="";labelTooltipProps=null;errorMsg="";hostElement=null;get value(){return this.hostElement?.value??null}get fieldStatus(){let e="";return this.disabled?(e="disabled",`sd-field--${e}`):this.readonly?(e="readonly",`sd-field--${e}`):this.focused?(e="focus",`sd-field--${e}`):(this.hovered&&(e="hover"),void 0!==this.status&&(e=this.status),this.error&&(e="error"),""!==e?`sd-field--${e}`:"")}componentDidLoad(){this.hostElement=this.findHostElement(),this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}findHostElement(){for(const e of c){const d=this.el.closest(e);if(d&&"value"in d)return d}return null}registerToForm(){const e=this.el.closest("sd-form");e&&"function"==typeof e.componentOnReady&&e.componentOnReady().then((e=>{e.sdRegisterField(this)}))}unregisterFromForm(){if(""===this.name)return;const e=this.el.closest("sd-form");e?.componentOnReady().then((e=>{e.sdUnregisterField(this)}))}async sdValidate(){if(!this.rules||0===this.rules.length)return!0;for(const e of this.rules){const d=e(this.value??"");if(!0!==d)return this.setError(!0,d),!1}return this.setError(!1,""),!0}async sdReset(){this.hostElement&&(this.hostElement.value=null),this.setError(!1,"")}async sdResetValidation(){this.setError(!1,"")}async sdFocus(){this.hostElement?.focus?.(),this.hostElement?.scrollIntoView({behavior:"smooth",block:"center"})}setError(e,d){this.errorMsg=d,this.hostElement&&(this.hostElement.error=e)}render(){const e=this.addonLabel,d=t.field.addonLabel,i=this.size in p?this.size:"sm",l=p[i],r={"--sd-field-wrapper-height":`var(--sd-system-size-field-${i}-height)`,"--sd-field-control-radius":`var(--sd-system-radius-field-${i})`,"--sd-field-label-margin-right":`var(--sd-system-space-field-${i}-gap)`},o=""!==this.label?{"--sd-field-label-height":`${l.height}px`,"--sd-field-label-gap":`${l.gap}px`,"--sd-field-label-font-size":`${l.fontSize}px`,"--sd-field-label-line-height":`${l.lineHeight}px`,"--sd-field-label-font-weight":l.fontWeight,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-label-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{},a=""!==e?{"--sd-field-addon-padding-x":`${d.paddingX}px`,"--sd-field-addon-font-size":`${d.typography.fontSize}px`,"--sd-field-addon-line-height":`${d.typography.lineHeight}px`,"--sd-field-addon-font-weight":d.typography.fontWeight,"--sd-field-addon-bg":d.bg,"--sd-field-addon-border-color":this.disabled?d.border.disabled:d.border.default,"--sd-field-addon-gap":`${d.gap}px`,"--sd-field-addon-border-width":`${d.border.width}px`,"--sd-field-addon-justify":n[this.addonAlign]??n.start,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-addon-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{};return s("div",{key:"b2a4122378dd725d8b392b89ae44669f097ff767",class:{"sd-field":!0,"sd-field--has-label":""!==this.label,"sd-field--has-addon":""!==e,[this.fieldStatus]:""!==this.fieldStatus},style:{...r,...o,...a}},s("div",{key:"ae6ead740a745248f89a3b9049480954091f5991",class:"sd-field__wrapper"},this.renderLabel(this.label),s("div",{key:"42699ddc5eb366d035986274dcf3ae7c17396e9c",class:"sd-field__main",style:""!==this.width&&0!==this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},s("div",{key:"f8c058d44411d27997e90bf3627a4b905f1a6112",class:{"sd-field__control":!0,"sd-field__control--has-addon":""!==e}},e&&s("div",{key:"86592d8a5046853eef3392e598c23d6348313e56",class:"sd-field__addon"},this.icon&&s("sd-icon",{key:"147082f30f173615e9a4253e99eabae868960f6f",name:this.icon.name,size:this.icon.size??Number(p[this.size in p?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate}),e),s("slot",{key:"a91c7c8ab0075f0cc1d2169b201bf37900872b99"})),""!==this.errorMsg||""!==this.errorMessage?s("div",{class:"sd-field__error-message"},""!==this.errorMsg?this.errorMsg:this.errorMessage):""!==this.hint&&s("div",{class:"sd-field__hint"},this.hint))))}renderLabel(e){return null==e||""===e?null:s("label",{class:"sd-field__label"},this.icon&&s("sd-icon",{name:this.icon.name,size:this.icon.size??Number(p[this.size in p?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate,class:"sd-field__label__icon"}),s("div",{class:"sd-field__label__text"},e),this.labelTooltip&&s("sd-tooltip",{class:"sd-field__label__tooltip",...this.labelTooltipProps},this.labelTooltip))}static get style(){return"sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#E1E1E1;border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--readonly .sd-field__wrapper .sd-field__control{background-color:var(--sd-system-color-field-bg-read-only);color:var(--sd-system-color-field-text-read-only)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;flex-shrink:0;width:var(--sd-field-label-width, auto);height:var(--sd-field-label-height);margin-right:var(--sd-field-label-margin-right)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__icon{margin-right:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:var(--sd-field-label-font-size);line-height:var(--sd-field-label-line-height);font-weight:var(--sd-field-label-font-weight);color:var(--sd-system-color-field-text-default);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-addon .sd-field__control .sd-field__addon{display:flex;gap:var(--sd-field-addon-gap);align-items:center;justify-content:var(--sd-field-addon-justify, flex-start);white-space:nowrap;box-sizing:border-box;flex-shrink:0;width:var(--sd-field-addon-width, auto);padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right:var(--sd-field-addon-border-width) solid var(--sd-field-addon-border-color);border-radius:calc(var(--sd-field-control-radius) - 1px) 0 0 calc(var(--sd-field-control-radius) - 1px)}sd-field .sd-field__wrapper{width:100%;display:flex;align-items:flex-start;flex-flow:row nowrap;position:relative;color:var(--sd-system-color-field-text-default);-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__main{flex:1;min-width:0;display:flex;flex-direction:column}sd-field .sd-field__wrapper .sd-field__control{position:relative;height:var(--sd-field-wrapper-height);display:flex;min-width:0;border:1px solid var(--sd-system-color-field-border-default);border-radius:var(--sd-field-control-radius);background:var(--sd-system-color-field-bg-default)}sd-field .sd-field--error .sd-field__wrapper .sd-field__control:not(:hover){border:1px solid var(--sd-system-color-field-border-danger) !important}sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-success) !important}sd-field .sd-field:not(.sd-field--disabled):not(.sd-field--readonly) .sd-field__wrapper .sd-field__control:hover{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--focus:not(.sd-field--readonly) .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field .sd-field__error-message{color:var(--sd-textinput-textinput-text-error-message);font-size:var(--sd-textinput-textinput-error-message-typography-font-size);line-height:var(--sd-textinput-textinput-error-message-typography-line-height);margin-top:var(--sd-textinput-textinput-contents-gap)}sd-field .sd-field .sd-field__hint{color:var(--sd-textinput-textinput-text-hint);font-size:var(--sd-textinput-textinput-hint-typography-font-size);line-height:var(--sd-textinput-textinput-hint-typography-line-height);margin-top:var(--sd-textinput-textinput-contents-gap)}"}},[772,"sd-field",{name:[1],rules:[16],error:[1028],disabled:[1028],readonly:[1028],hovered:[1028],focused:[1028],status:[1],hint:[1],errorMessage:[1,"error-message"],width:[8],size:[513],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],errorMsg:[32],sdValidate:[64],sdReset:[64],sdResetValidation:[64],sdFocus:[64]}]);function u(){"undefined"!=typeof customElements&&["sd-field","sd-button","sd-floating-portal","sd-icon","sd-tooltip"].forEach((e=>{switch(e){case"sd-field":customElements.get(i(e))||customElements.define(i(e),b);break;case"sd-button":customElements.get(i(e))||l();break;case"sd-floating-portal":customElements.get(i(e))||r();break;case"sd-icon":customElements.get(i(e))||o();break;case"sd-tooltip":customElements.get(i(e))||a()}}))}export{b as S,u 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-siTDlOb6.js";import{d as o}from"./p-BNkExhYB.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:"
|
|
1
|
+
import{p as t,H as i,c as n,h as a,F as e,t as s}from"./p-siTDlOb6.js";import{d as o}from"./p-BNkExhYB.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:"abfac6b075ce59ac37f747bf15729bf3879b1749",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:"6c8a3eb2ad708649054068a671cf156fe154fae3",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:"f0013d0057e6addb6a7fae39ebddd2c4f7af5bd0",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 +1 @@
|
|
|
1
|
-
import{p as e,H as s,c as t,h as r,t as i}from"./p-siTDlOb6.js";import{i as g,h as l,j as o,k as c}from"./p-C5wgHjtx.js";import{s as d}from"./p-BE4tnQ2Z.js";import{d as
|
|
1
|
+
import{p as e,H as s,c as t,h as r,t as i}from"./p-siTDlOb6.js";import{i as g,h as l,j as o,k as c}from"./p-C5wgHjtx.js";import{s as d}from"./p-BE4tnQ2Z.js";import{d as n}from"./p-BNkExhYB.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:"b5a4f750c00889d0d9b985211063fc6b20bc2e38",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":`${c.paddingX}px`,"--trigger-gap":`${c.gap}px`,"--trigger-font-size":`${o.fontSize}px`,"--trigger-line-height":`${o.lineHeight}px`,"--trigger-font-weight":o.fontWeight,"--trigger-color":this.disabled?l.text.disabled:e?l.text.default:l.icon.default,"--trigger-icon-color":this.disabled?l.icon.disabled:l.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:"be0b61c0550618602ef016504fa1672f7520fa93",class:"sd-select-trigger__content"},e&&g(this.displayText)?r("span",{class:"sd-select-trigger__text",ref:e=>e&&(e.innerHTML=d(this.displayText))}):r("span",{class:"sd-select-trigger__text"},e?this.displayText:this.placeholder??"선택"),r("sd-icon",{key:"9d60c3eeae54ce6ed9609534e3530d0349d1a3ff",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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as s,c as e,h as a,t as o}from"./p-siTDlOb6.js";import{d as n}from"./p-CWlwx4xx.js";import{d as i}from"./p-CyGi6aGo.js";import{d as c}from"./p-BNkExhYB.js";import{d}from"./p-Ck9bJZTm.js";var l={bg:"#07284A",content:"#FFFFFF"},r={bg:"#FB4444",content:"#FFFFFF"},b={bg:"#FFC700",content:"#222222"},f={bg:"#00973C",content:"#FFFFFF"},u={bg:"#005CC9",content:"#FFFFFF"},p={bg:"#E6F1FF",icon:"#0075FF",text:"#222222",textLink:"#555555"};const m={default:"secondary_sm",danger:"danger_outline_sm",caution:"neutral_outline_sm",complete:"neutral_outline_sm",accent:"neutral_outline_sm",info:"secondary_sm"},g={default:{bg:l.bg,content:l.content},danger:{bg:r.bg,content:r.content},caution:{bg:b.bg,content:b.content},complete:{bg:f.bg,content:f.content},accent:{bg:u.bg,content:u.content},info:{bg:p.bg,content:p.text,icon:p.icon,linkColor:p.textLink}},h={iconSize:"16"},k=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=e(this,"sdClose",7),this.buttonClick=e(this,"sdButtonClick",7)}icon;message;link;linkLabel;buttonLabel;useClose=!1;type="default";close;buttonClick;render(){const t=g[this.type]??g.default,s=Number(h.iconSize),e=t.icon??t.content,o=t.linkColor??t.content,n=["default","caution","info"].includes(this.type),i=m[this.type]??m.default;return a("div",{key:"82c8063406a534e60c985d3c8321612077f75623",style:{"--sd-toast-bg":t.bg,"--sd-toast-text":t.content,"--sd-toast-icon":e,"--sd-toast-link":o}},a("div",{key:"e83c5b7ddc0edec3fb9e29325dcb52e3295fad4d",class:"sd-toast",role:"status","aria-live":"polite","aria-atomic":"true"},this.icon&&a("div",{key:"d249e5915f0c92a0a2cff43dee5c61d809ffc7f0",class:"sd-toast__icon"},a("sd-icon",{key:"088da81d0083cc0ca72f2bf59392a72d3f2ed4de",name:this.icon,size:s,color:e})),a("div",{key:"5cad9a3a81b00d8926d92d9895c4cca1389dc63b",class:"sd-toast__content"},a("span",{key:"1fbc72aac70fbb3bb630ad10343ea2c8f76f924c",class:"sd-toast__message"},this.message)),this.link&&a("a",{key:"769a85fa539bab8b478ef999cab615285a842085",href:this.link,class:"sd-toast__link",target:"_blank",rel:"noopener noreferrer"},this.linkLabel||this.link),this.buttonLabel&&a("sd-button",{key:"77612614898b6abdade4b4599987cbb90bc09c4e",class:"sd-toast__button",name:i,label:this.buttonLabel,onSdClick:t=>this.buttonClick.emit(t.detail)}),this.useClose&&a("sd-ghost-button",{key:"3bef6c0e7f3dec3f2b1f493f9c979a121bc897e9",class:"sd-toast__close",icon:"close",intent:n?"default":"inverse",ariaLabel:"close",size:"xs",onClick:()=>this.close.emit()})))}static get style(){return"sd-toast{display:block;width:fit-content;height:fit-content}sd-toast .sd-toast{display:flex;width:fit-content;align-items:center;gap:var(--sd-toast-gap, 16px);padding:var(--sd-toast-padding-y, 12px) var(--sd-toast-padding-x, 24px);border-radius:var(--sd-toast-radius, 8px);background-color:var(--sd-toast-bg);color:var(--sd-toast-text);box-shadow:2px 2px 8px 2px rgba(0, 0, 0, 0.2)}sd-toast .sd-toast__icon{display:flex;align-items:center;flex-shrink:0}sd-toast .sd-toast__content{display:flex;flex:1}sd-toast .sd-toast__message{font-size:14px;line-height:24px;font-weight:500;white-space:nowrap}sd-toast .sd-toast__link{font-size:14px;line-height:24px;font-weight:700;color:var(--sd-toast-link, var(--sd-toast-text));text-decoration:underline;cursor:pointer;transition:opacity 0.2s ease;margin-left:4px;white-space:nowrap}sd-toast .sd-toast__link:hover{opacity:0.8}sd-toast .sd-toast__button{flex-shrink:0}sd-toast .sd-toast__close{flex-shrink:0}"}},[512,"sd-toast",{icon:[1],message:[1],link:[1],linkLabel:[1,"link-label"],buttonLabel:[1,"button-label"],useClose:[4,"use-close"],type:[1]}]);function _(){"undefined"!=typeof customElements&&["sd-toast","sd-button","sd-ghost-button","sd-icon","sd-tag"].forEach((t=>{switch(t){case"sd-toast":customElements.get(o(t))||customElements.define(o(t),k);break;case"sd-button":customElements.get(o(t))||n();break;case"sd-ghost-button":customElements.get(o(t))||i();break;case"sd-icon":customElements.get(o(t))||c();break;case"sd-tag":customElements.get(o(t))||d()}}))}export{k as S,_ as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,H as i,c as s,h as t,t as l}from"./p-siTDlOb6.js";import{n as r}from"./p-CCwNgVmC.js";import{d as o}from"./p-CWlwx4xx.js";import{d as a}from"./p-CWz_dfBG.js";import{d}from"./p-BA8i1i5_.js";import{d as n}from"./p-CkQzw2e0.js";import{d as c}from"./p-CyGi6aGo.js";import{d as h}from"./p-BNkExhYB.js";import{d as p}from"./p-Ck9bJZTm.js";import{d as f}from"./p-CjVOfLam.js";var u={sm:{height:"28",paddingX:"12",gap:"8",radius:"4",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"},icon:"16"},text:{default:"#222222",placeholder:"#AAAAAA",disabled:"#888888"},icon:{disabled:"#BBBBBB"}};const k={height:u.sm.height,paddingX:u.sm.paddingX,gap:u.sm.gap,radius:u.sm.radius,fontSize:u.sm.typography.fontSize,lineHeight:u.sm.typography.lineHeight,fontWeight:u.sm.typography.fontWeight,iconSize:u.sm.icon},m={text:u.text,icon:{default:"#888888",disabled:u.icon.disabled}},x=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.reject=s(this,"sdReject",7)}get el(){return this}value=null;placeholder="Click to upload";disabled=!1;inline=!1;multiple=!1;accept;maxFileSize;maxTotalSize;maxFiles;name=r();label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";width="";rules;error=!1;status;icon=void 0;labelTooltip="";labelTooltipProps=null;focused=!1;hovered=!1;internalValue=null;showTooltip=!1;fileInputRef;fileNamesRef;formField;update;reject;valueChanged(e){this.internalValue=e}componentDidLoad(){this.checkOverflow()}componentDidUpdate(){this.checkOverflow()}async sdValidate(){return this.formField?.sdValidate()??Promise.resolve(!0)}async sdReset(){const e=this.multiple?[]:null;this.value=e,this.internalValue=e,this.fileInputRef&&(this.fileInputRef.value=""),await(this.formField?.sdResetValidation())}async sdResetValidate(){await(this.formField?.sdResetValidation())}toBytes(e){if(null!=e)return"string"==typeof e?Number(e):e}validateFiles(e,i=0){const s=this.toBytes(this.maxFileSize),t=this.toBytes(this.maxTotalSize),l=null!=this.maxFiles?Number(this.maxFiles):void 0;if(null!=l&&i+e.length>l)return{accepted:[],rejected:e,reason:"max-files"};if(null!=s){const i=e.filter((e=>e.size>s));if(i.length>0)return{accepted:[],rejected:i,reason:"max-file-size"}}return null!=t&&e.reduce(((e,i)=>e+i.size),0)>t?{accepted:[],rejected:e,reason:"max-total-size"}:{accepted:e,rejected:[]}}handleFileChange=e=>{const i=e.target.files;if(!i||0===i.length)return;const s=Array.from(i);if(this.multiple){const e=Array.isArray(this.internalValue)?this.internalValue:[],{accepted:i,rejected:t,reason:l}=this.validateFiles(s,e.length);if(this.fileInputRef&&(this.fileInputRef.value=""),null!=l)return void this.reject?.emit({files:t,reason:l});const r=[...e,...i];this.internalValue=r,this.value=r,this.update?.emit(this.value)}else{const{accepted:e,rejected:i,reason:t}=this.validateFiles(s);if(null!=t)return this.reject?.emit({files:i,reason:t}),void(this.fileInputRef&&(this.fileInputRef.value=""));this.internalValue=e[0],this.value=this.internalValue,this.update?.emit(this.value)}};handleClear=e=>{if(this.disabled)return;e.stopPropagation();const i=this.multiple?[]:null;this.value=i,this.internalValue=i,this.update?.emit(i),this.fileInputRef&&(this.fileInputRef.value="")};handleClick=()=>{this.disabled||this.fileInputRef?.click()};hasFiles(){return!this.multiple&&!!this.internalValue&&(!Array.isArray(this.internalValue)||this.internalValue.length>0)}hasChips(){return Array.isArray(this.internalValue)&&this.internalValue.length>0}getDisplayText(){return this.hasFiles()&&this.internalValue?.name||(this.placeholder??"Click to upload")}handleChipRemove=e=>{if(!Array.isArray(this.internalValue))return;const i=[...this.internalValue];i.splice(e,1),this.internalValue=i,this.value=i,this.update?.emit(this.value)};renderChipList(){return this.hasChips()?t("div",{class:"sd-file-picker__chip-list"},this.internalValue.map(((e,i)=>t("sd-chip",{value:e.name,onSdRemove:()=>this.handleChipRemove(i)})))):null}checkOverflow(){this.fileNamesRef&&(this.showTooltip=this.fileNamesRef.scrollWidth>this.fileNamesRef.clientWidth)}getIconColor(){return this.disabled?m.icon.disabled:m.icon.default}render(){const e=this.hasFiles(),i=this.getDisplayText(),s={"--sd-file-picker-font-size":`${k.fontSize}px`,"--sd-file-picker-line-height":`${k.lineHeight}px`,"--sd-file-picker-font-weight":k.fontWeight,"--sd-file-picker-padding-x":`${k.paddingX}px`,"--sd-file-picker-gap":`${k.gap}px`,"--sd-file-picker-text-color":m.text.default,"--sd-file-picker-placeholder-color":m.text.placeholder,"--sd-file-picker-disabled-color":m.text.disabled,"--sd-system-size-field-sm-height":`${k.height}px`,"--sd-system-radius-field-sm":`${k.radius}px`},l=t("div",{role:"button",tabindex:this.disabled?-1:0,class:"sd-file-picker__content",onClick:this.handleClick,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())}},t("input",{ref:e=>this.fileInputRef=e,type:"file",class:"sd-file-picker__input",disabled:this.disabled,multiple:this.multiple,accept:this.accept,onInput:this.handleFileChange,"aria-label":this.placeholder??"Click to upload"}),t("sd-icon",{name:"attachFile",size:Number(k.iconSize),color:this.getIconColor(),class:"sd-file-picker__icon"}),t("div",{ref:e=>this.fileNamesRef=e,class:{"sd-file-picker__text":!0,"sd-file-picker__text--placeholder":!e,"sd-file-picker__text--active":e}},i),!this.disabled&&e&&t("sd-ghost-button",{icon:"close",size:"xxs",ariaLabel:"clear",disabled:this.disabled,class:"sd-file-picker__clear-icon",onClick:this.handleClear}),this.showTooltip&&e&&this.hovered&&t("div",{class:"sd-file-picker__tooltip"},i));return this.inline?t("div",{class:{"sd-file-picker--inline":!0,"sd-file-picker--inline-disabled":this.disabled},style:s,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1},l,this.renderChipList()):t("div",{class:"sd-file-picker__wrapper",style:s},t("sd-field",{name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,status:this.status,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1},l),this.renderChipList())}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return"sd-file-picker{display:flex;flex-direction:column;width:100%}.sd-file-picker__wrapper{display:flex;flex-direction:column;width:100%}.sd-file-picker__chip-list{display:flex;flex-direction:column;gap:8px;margin-top:8px}.sd-file-picker__content{width:100%;height:100%;display:flex;align-items:center;padding:0 var(--sd-file-picker-padding-x);gap:var(--sd-file-picker-gap);cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;vertical-align:middle}.sd-file-picker__text{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:var(--sd-file-picker-font-weight);font-size:var(--sd-file-picker-font-size);line-height:var(--sd-file-picker-line-height);color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker__text--placeholder{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__icon{flex-shrink:0}.sd-file-picker__clear-icon{flex-shrink:0;cursor:pointer;transition:opacity 0.2s ease}.sd-file-picker__clear-icon:hover{opacity:0.7}.sd-file-picker__input{display:none}.sd-file-picker__tooltip{position:absolute;top:calc(100% - 4px);left:50%;transform:translate(-50%);z-index:998;white-space:nowrap;padding:8px 12px;background:rgba(0, 0, 0, 0.8);color:white;font-size:12px;line-height:18px;border-radius:4px;pointer-events:none}.sd-field--disabled .sd-file-picker__content{cursor:not-allowed}.sd-field--disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}.sd-file-picker--inline .sd-file-picker__content{border:none;background-color:transparent;padding:0;height:auto}.sd-file-picker--inline .sd-file-picker__text{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker--inline:hover:not(.sd-file-picker--inline-disabled) .sd-file-picker__text{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline .sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__content{cursor:not-allowed}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}"}},[512,"sd-file-picker",{value:[1040],placeholder:[513],disabled:[516],inline:[516],multiple:[516],accept:[1],maxFileSize:[8,"max-file-size"],maxTotalSize:[8,"max-total-size"],maxFiles:[8,"max-files"],name:[1],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],hint:[1],errorMessage:[1,"error-message"],width:[8],rules:[16],error:[1028],status:[1],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],focused:[1028],hovered:[1028],internalValue:[32],showTooltip:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64]},void 0,{value:[{valueChanged:0}]}]);function b(){"undefined"!=typeof customElements&&["sd-file-picker","sd-button","sd-chip","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-file-picker":customElements.get(l(e))||customElements.define(l(e),x);break;case"sd-button":customElements.get(l(e))||o();break;case"sd-chip":customElements.get(l(e))||a();break;case"sd-field":customElements.get(l(e))||d();break;case"sd-floating-portal":customElements.get(l(e))||n();break;case"sd-ghost-button":customElements.get(l(e))||c();break;case"sd-icon":customElements.get(l(e))||h();break;case"sd-tag":customElements.get(l(e))||p();break;case"sd-tooltip":customElements.get(l(e))||f()}}))}export{x as S,b as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,h as e,d as o,t as i}from"./p-siTDlOb6.js";import{T as a}from"./p-sZMi_32I.js";const d=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get el(){return this}rows=[];tableId="";topSpacerHeight=0;bottomSpacerHeight=0;tableEl=null;handleRowsChange(t){const s=t??[];this.tableEl?.setRowCountSync&&this.tableEl.setRowCountSync(s.length)}componentWillLoad(){this.syncTableContext(),this.rows=this.rows??[],this.tableEl?.setRowCountSync&&this.tableEl.setRowCountSync(this.rows.length),this.el.setSpacersSync=(t,s)=>{this.topSpacerHeight=t,this.bottomSpacerHeight=s}}componentDidLoad(){this.syncTableContext()}syncTableContext(){const t=this.el.closest("sd-table"),s=this.el.getRootNode(),e=s instanceof ShadowRoot?s.host:null,o=t??e;this.tableEl=o;const i=o?.getTableIdSync?.(),d=o?.getAttribute(a),n=(null!=i&&""!==i&&"undefined"!==i?i:null)??(null!=d&&""!==d&&"undefined"!==d?d:null)??"";""!==n&&n!==this.tableId&&(this.tableId=n)}render(){return e(o,{key:"
|
|
1
|
+
import{p as t,H as s,h as e,d as o,t as i}from"./p-siTDlOb6.js";import{T as a}from"./p-sZMi_32I.js";const d=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get el(){return this}rows=[];tableId="";topSpacerHeight=0;bottomSpacerHeight=0;tableEl=null;handleRowsChange(t){const s=t??[];this.tableEl?.setRowCountSync&&this.tableEl.setRowCountSync(s.length)}componentWillLoad(){this.syncTableContext(),this.rows=this.rows??[],this.tableEl?.setRowCountSync&&this.tableEl.setRowCountSync(this.rows.length),this.el.setSpacersSync=(t,s)=>{this.topSpacerHeight=t,this.bottomSpacerHeight=s}}componentDidLoad(){this.syncTableContext()}syncTableContext(){const t=this.el.closest("sd-table"),s=this.el.getRootNode(),e=s instanceof ShadowRoot?s.host:null,o=t??e;this.tableEl=o;const i=o?.getTableIdSync?.(),d=o?.getAttribute(a),n=(null!=i&&""!==i&&"undefined"!==i?i:null)??(null!=d&&""!==d&&"undefined"!==d?d:null)??"";""!==n&&n!==this.tableId&&(this.tableId=n)}render(){return e(o,{key:"bc05db24c914d72f0480e0d6d9b594e21cf03153",slot:`${this.tableId}-body`},e("tbody",{key:"ba4eb8fcbc184bcd245f47093ca5acfacc3aebf3",class:{tbody:!0}},[this.topSpacerHeight>0&&e("tr",{key:"spacer-top",class:"tbody__spacer",style:{height:`${this.topSpacerHeight}px`,display:"block"}}),e("slot",{key:"3c9d25b226dfb20b044a718416d3cdda13eff798"}),this.bottomSpacerHeight>0&&e("tr",{key:"spacer-bottom",class:"tbody__spacer",style:{height:`${this.bottomSpacerHeight}px`,display:"block"}})]))}static get watchers(){return{rows:[{handleRowsChange:0}]}}static get style(){return":host{display:contents}:host *{box-sizing:border-box}.tbody{display:table-row-group}"}},[769,"sd-tbody",{rows:[16],tableId:[32],topSpacerHeight:[32],bottomSpacerHeight:[32]},void 0,{rows:[{handleRowsChange:0}]}]);function n(){"undefined"!=typeof customElements&&["sd-tbody"].forEach((t=>{"sd-tbody"===t&&(customElements.get(i(t))||customElements.define(i(t),d))}))}export{d as S,n as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,c as i,h as e,t as o}from"./p-siTDlOb6.js";const n=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=i(this,"sdClose",3)}get hostEl(){return this}to="body";parentRef=null;offset=[0,4];viewportPadding=0;zIndex=998;open=!1;close;container;wrapper;rafId;isInsideClick=!1;closeTransitionTimer;handleObservedScroll=()=>this.updatePosition();resizeObserver;mutationObserver;scrollParents=[];isObserved=!1;handleOpenChange(){this.syncPortalState()}componentDidLoad(){this.container=this.resolveContainer(),this.syncPortalState()}componentDidRender(){this.syncPortalState()}disconnectedCallback(){if(this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.unobserveParent(),this.wrapper?.parentNode)try{this.wrapper.parentNode.removeChild(this.wrapper)}catch{}}resolveContainer(){const t="string"==typeof this.to?document.querySelector(this.to):this.to;return t instanceof s?t:document.body}createWrapper(){this.wrapper=document.createElement("div"),Object.assign(this.wrapper.style,{position:"absolute",top:"0",left:"0",zIndex:(this.zIndex??998).toString(),opacity:"0",transition:"opacity 0.15s ease-out",boxSizing:"border-box",visibility:"hidden"}),this.container.appendChild(this.wrapper)}ensureWrapper(){this.wrapper||(this.container||=this.resolveContainer(),this.createWrapper(),this.moveSlotContent())}syncPortalState(){if(!this.open)return this.wrapper&&(this.wrapper.style.transition="opacity 0.15s ease-out",this.wrapper.style.opacity="0",this.wrapper.style.pointerEvents="none",this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.closeTransitionTimer=setTimeout((()=>{this.wrapper&&!this.open&&(this.wrapper.style.display="none")}),150)),void this.unobserveParent();this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.ensureWrapper(),this.wrapper&&(this.wrapper.style.display="block",this.wrapper.style.transition="opacity 0.25s ease-out",this.wrapper.style.opacity="0",this.wrapper.style.pointerEvents="",this.observeParent(),this.updatePosition())}moveSlotContent(){this.wrapper&&Array.from(this.hostEl.childNodes).filter((t=>t.nodeType!==Node.COMMENT_NODE)).forEach((t=>this.wrapper.appendChild(t)))}updatePosition(){void 0!==this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{if(!this.parentRef||!this.wrapper)return;const t=this.parentRef.getBoundingClientRect(),s=window.innerWidth,i=window.innerHeight,e=this.offset??[0,4],o=Math.max(0,this.viewportPadding??0),n=Math.max(s-2*o,0),h=Math.max(i-2*o,0);this.wrapper.style.maxWidth=`${n}px`,this.wrapper.style.maxHeight=`${h}px`;const r=this.wrapper.getBoundingClientRect(),a=i-t.bottom-e[1]-o;let d=t.bottom+window.scrollY+e[1],l=t.left+window.scrollX+e[0];a<r.height&&t.top-e[1]-o>a&&(d=t.top+window.scrollY-r.height-e[1]);const c=window.scrollY+o,p=window.scrollY+i-o-r.height;d=p<c?c:Math.min(Math.max(d,c),p),t.left+r.width+e[0]>s-o&&(l=t.right+window.scrollX-r.width-e[0]);const u=window.scrollX+o,w=window.scrollX+s-o-r.width;l=w<u?u:Math.min(Math.max(l,u),w),this.wrapper.style.top=`${d}px`,this.wrapper.style.left=`${l}px`,this.wrapper.style.visibility="visible",this.wrapper.style.opacity="1"}))}observeParent(){this.parentRef&&!this.isObserved&&(this.observeScrollParents(this.parentRef),"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>this.updatePosition())),this.resizeObserver.observe(this.parentRef)),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((()=>this.updatePosition())),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0})),this.isObserved=!0)}unobserveParent(){this.isObserved&&(this.unobserveScrollParents(),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.mutationObserver?.disconnect(),this.mutationObserver=void 0,this.isObserved=!1)}observeScrollParents(t){const s=this.getScrollParents(t);s.forEach((t=>{t.addEventListener("scroll",this.handleObservedScroll,{passive:!0})})),this.scrollParents=s}unobserveScrollParents(){this.scrollParents.forEach((t=>{t.removeEventListener("scroll",this.handleObservedScroll)})),this.scrollParents=[]}getScrollParents(t){const s=[];let i=t.parentElement;for(;i;){const{overflow:t,overflowX:e,overflowY:o}=getComputedStyle(i);[t,e,o].some((t=>/(auto|scroll|overlay)/.test(t)))&&s.push(i),i=i.parentElement}return s}handleMouseDown(t){this.isInsideClick=!(!this.wrapper||!this.wrapper.contains(t.target))}handleWindowClick(t){this.isInsideClick?this.isInsideClick=!1:this.wrapper?.contains(t.target)||this.close.emit()}render(){return e("slot",{key:"
|
|
1
|
+
import{p as t,H as s,c as i,h as e,t as o}from"./p-siTDlOb6.js";const n=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=i(this,"sdClose",3)}get hostEl(){return this}to="body";parentRef=null;offset=[0,4];viewportPadding=0;zIndex=998;open=!1;close;container;wrapper;rafId;isInsideClick=!1;closeTransitionTimer;handleObservedScroll=()=>this.updatePosition();resizeObserver;mutationObserver;scrollParents=[];isObserved=!1;handleOpenChange(){this.syncPortalState()}componentDidLoad(){this.container=this.resolveContainer(),this.syncPortalState()}componentDidRender(){this.syncPortalState()}disconnectedCallback(){if(this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.unobserveParent(),this.wrapper?.parentNode)try{this.wrapper.parentNode.removeChild(this.wrapper)}catch{}}resolveContainer(){const t="string"==typeof this.to?document.querySelector(this.to):this.to;return t instanceof s?t:document.body}createWrapper(){this.wrapper=document.createElement("div"),Object.assign(this.wrapper.style,{position:"absolute",top:"0",left:"0",zIndex:(this.zIndex??998).toString(),opacity:"0",transition:"opacity 0.15s ease-out",boxSizing:"border-box",visibility:"hidden"}),this.container.appendChild(this.wrapper)}ensureWrapper(){this.wrapper||(this.container||=this.resolveContainer(),this.createWrapper(),this.moveSlotContent())}syncPortalState(){if(!this.open)return this.wrapper&&(this.wrapper.style.transition="opacity 0.15s ease-out",this.wrapper.style.opacity="0",this.wrapper.style.pointerEvents="none",this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.closeTransitionTimer=setTimeout((()=>{this.wrapper&&!this.open&&(this.wrapper.style.display="none")}),150)),void this.unobserveParent();this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.ensureWrapper(),this.wrapper&&(this.wrapper.style.display="block",this.wrapper.style.transition="opacity 0.25s ease-out",this.wrapper.style.opacity="0",this.wrapper.style.pointerEvents="",this.observeParent(),this.updatePosition())}moveSlotContent(){this.wrapper&&Array.from(this.hostEl.childNodes).filter((t=>t.nodeType!==Node.COMMENT_NODE)).forEach((t=>this.wrapper.appendChild(t)))}updatePosition(){void 0!==this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{if(!this.parentRef||!this.wrapper)return;const t=this.parentRef.getBoundingClientRect(),s=window.innerWidth,i=window.innerHeight,e=this.offset??[0,4],o=Math.max(0,this.viewportPadding??0),n=Math.max(s-2*o,0),h=Math.max(i-2*o,0);this.wrapper.style.maxWidth=`${n}px`,this.wrapper.style.maxHeight=`${h}px`;const r=this.wrapper.getBoundingClientRect(),a=i-t.bottom-e[1]-o;let d=t.bottom+window.scrollY+e[1],l=t.left+window.scrollX+e[0];a<r.height&&t.top-e[1]-o>a&&(d=t.top+window.scrollY-r.height-e[1]);const c=window.scrollY+o,p=window.scrollY+i-o-r.height;d=p<c?c:Math.min(Math.max(d,c),p),t.left+r.width+e[0]>s-o&&(l=t.right+window.scrollX-r.width-e[0]);const u=window.scrollX+o,w=window.scrollX+s-o-r.width;l=w<u?u:Math.min(Math.max(l,u),w),this.wrapper.style.top=`${d}px`,this.wrapper.style.left=`${l}px`,this.wrapper.style.visibility="visible",this.wrapper.style.opacity="1"}))}observeParent(){this.parentRef&&!this.isObserved&&(this.observeScrollParents(this.parentRef),"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>this.updatePosition())),this.resizeObserver.observe(this.parentRef)),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((()=>this.updatePosition())),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0})),this.isObserved=!0)}unobserveParent(){this.isObserved&&(this.unobserveScrollParents(),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.mutationObserver?.disconnect(),this.mutationObserver=void 0,this.isObserved=!1)}observeScrollParents(t){const s=this.getScrollParents(t);s.forEach((t=>{t.addEventListener("scroll",this.handleObservedScroll,{passive:!0})})),this.scrollParents=s}unobserveScrollParents(){this.scrollParents.forEach((t=>{t.removeEventListener("scroll",this.handleObservedScroll)})),this.scrollParents=[]}getScrollParents(t){const s=[];let i=t.parentElement;for(;i;){const{overflow:t,overflowX:e,overflowY:o}=getComputedStyle(i);[t,e,o].some((t=>/(auto|scroll|overlay)/.test(t)))&&s.push(i),i=i.parentElement}return s}handleMouseDown(t){this.isInsideClick=!(!this.wrapper||!this.wrapper.contains(t.target))}handleWindowClick(t){this.isInsideClick?this.isInsideClick=!1:this.wrapper?.contains(t.target)||this.close.emit()}render(){return e("slot",{key:"f7b160cb574608fa16f6edd27d259b85787e6144"})}static get watchers(){return{open:[{handleOpenChange:0}]}}},[772,"sd-portal",{to:[1],parentRef:[16],offset:[16],viewportPadding:[2,"viewport-padding"],zIndex:[2,"z-index"],open:[4]},[[9,"scroll","updatePosition"],[9,"resize","updatePosition"],[9,"mousedown","handleMouseDown"],[8,"click","handleWindowClick"]],{open:[{handleOpenChange:0}]}]);function h(){"undefined"!=typeof customElements&&["sd-portal"].forEach((t=>{"sd-portal"===t&&(customElements.get(o(t))||customElements.define(o(t),n))}))}export{n as S,h as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as n,c as o,h as s,t as d}from"./p-siTDlOb6.js";import{I as i,d as b}from"./p-BNkExhYB.js";import{i as e,g as a,B as u,f as r,e as h,a as l,c,P as p,d as g}from"./p-Dp6NByuZ.js";const v=t=>null!=t&&t in i,f=t(class extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.click=o(this,"sdClick",7)}name="primary_sm";label="";icon;rightIcon;ariaLabel="";disabled=!1;type="button";click;hasWarnedMissingAriaLabel=!1;handleClick=t=>{this.disabled?t.preventDefault():this.click.emit(t)};get resolvedName(){const t=this.name||"primary_sm";if(!e(t))throw new Error(`Invalid sd-button name: "${t}"`);return t}get resolvedConfig(){const t=this.resolvedName;return{config:u[t],preset:a(t)}}getButtonClasses(t,n,o,s){const d=["sd-button",`sd-button--${t}`,`sd-button--${n}`];return this.disabled&&d.push("sd-button--disabled"),s&&d.push("sd-button--icon-only"),o&&d.push("sd-button--has-label"),d.join(" ")}componentWillRender(){this.warnIfMissingAriaLabel()}warnIfMissingAriaLabel(){""===this.label&&(v(this.icon)||v(this.rightIcon))&&""===this.ariaLabel.trim()?this.hasWarnedMissingAriaLabel||(console.warn(`[sd-button] icon-only buttons require \`ariaLabel\`. Received name="${this.name}" icon="${this.icon??this.rightIcon}".`),this.hasWarnedMissingAriaLabel=!0):this.hasWarnedMissingAriaLabel=!1}render(){const{config:t,preset:n}=this.resolvedConfig,o=Boolean(this.label),d=v(this.icon)?this.icon:void 0,i=v(this.rightIcon)?this.rightIcon:void 0,b=!o&&Boolean(d)!==Boolean(i),e=b&&""!==this.ariaLabel.trim()?this.ariaLabel:void 0;return s("button",{key:"da3228e64ba27430283d55a49d3e13b2112929b6",class:this.getButtonClasses(n,t.size,o,b),type:this.type??"button",disabled:this.disabled,"aria-label":e,style:{"--sd-button-bg":t.color,"--sd-button-bg-hover":g[n],"--sd-button-border":p[n],"--sd-button-text":c[n],"--sd-button-icon":l[n],"--sd-button-accent":h},onClick:this.handleClick},s("span",{key:"22f4dac854314abb3edf3f6d4746057337d2d1c6",class:"sd-button__content"},d&&s("sd-icon",{key:"cd88155fa1783071fe6bee390df47daa96133eab",class:"sd-button__icon",name:d,size:r[t.size],color:"var(--sd-button-current-icon)"}),this.label&&s("span",{key:"27798d8db1d633ef99572982bddf40fbca415ed7",class:"sd-button__label"},this.label),i&&s("sd-icon",{key:"6393eb128f66a88b7ad1b5f2c1cec5654af07fae",class:"sd-button__icon sd-button__icon--right",name:i,size:r[t.size],color:"var(--sd-button-current-icon)"})))}static get style(){return"sd-button{display:inline-flex;width:fit-content;height:fit-content}.sd-button{--sd-button-height:36px;--sd-button-padding-x:20px;--sd-button-gap:8px;--sd-button-font-family:inherit;--sd-button-font-size:16px;--sd-button-font-weight:500;--sd-button-text-decoration:none;--sd-button-label-min-width:auto;--sd-button-icon-only-size:var(--sd-button-height);--sd-button-bg:#025497;--sd-button-bg-hover:#004177;--sd-button-border:transparent;--sd-button-text:#FFFFFF;--sd-button-icon:var(--sd-button-text);--sd-button-current-text:var(--sd-button-text);--sd-button-current-icon:var(--sd-button-icon);display:inline-flex;align-items:center;justify-content:center;min-height:var(--sd-button-height);min-width:var(--sd-button-min-width, auto);padding:0 var(--sd-button-padding-x);border:var(--sd-button-button-border-width-default, 1px) solid var(--sd-button-border);border-radius:var(--sd-button-button-radius-sm, 4px);background:var(--sd-button-bg);color:var(--sd-button-current-text);cursor:pointer;box-sizing:border-box;font-family:var(--sd-button-font-family);font-size:var(--sd-button-font-size);font-weight:var(--sd-button-font-weight);line-height:1;text-decoration:var(--sd-button-text-decoration);transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;white-space:nowrap;-webkit-user-select:none;user-select:none}.sd-button:hover:not(.sd-button--disabled){background:var(--sd-button-bg-hover)}.sd-button:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-button-accent)}.sd-button--xs{--sd-button-height:var(--sd-button-button-xs-height, 24px);--sd-button-padding-x:var(--sd-button-button-xs-padding-x, 8px);--sd-button-gap:var(--sd-button-button-xs-gap, 4px);--sd-button-font-family:var(--sd-button-button-xs-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-xs-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-button-xs-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-xs-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-xs-min-width, 36px);--sd-button-icon-only-size:var(--sd-button-button-icon-only-xs-width, var(--sd-button-height))}.sd-button--sm{--sd-button-height:var(--sd-button-button-sm-height, 28px);--sd-button-padding-x:var(--sd-button-button-sm-padding-x, 12px);--sd-button-gap:var(--sd-button-button-sm-gap, 6px);--sd-button-font-family:var(--sd-button-button-sm-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-sm-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-button-sm-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-sm-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-sm-min-width, 70px);--sd-button-icon-only-size:var(--sd-button-button-icon-only-sm-width, var(--sd-button-height))}.sd-button--md{--sd-button-height:var(--sd-button-button-md-height, 36px);--sd-button-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-button-gap:var(--sd-button-button-md-gap, 8px);--sd-button-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-md-typography-font-size, 16px);--sd-button-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-md-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-md-min-width, 100px);--sd-button-icon-only-size:var(--sd-button-button-icon-only-md-width, var(--sd-button-height));border-radius:var(--sd-button-button-radius-md, 6px)}.sd-button--lg{--sd-button-height:var(--sd-button-button-lg-height, 62px);--sd-button-padding-x:var(--sd-button-button-lg-padding-x, 28px);--sd-button-gap:var(--sd-button-button-lg-gap, 12px);--sd-button-font-family:var(--sd-button-button-lg-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-lg-typography-font-size, 18px);--sd-button-font-weight:var(--sd-button-button-lg-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-lg-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-lg-min-width, 120px);--sd-button-icon-only-size:var(--sd-button-button-icon-only-lg-width, var(--sd-button-height));border-radius:var(--sd-button-button-radius-md, 6px)}.sd-button--has-label{--sd-button-min-width:var(--sd-button-label-min-width, auto)}.sd-button--icon-only{width:var(--sd-button-icon-only-size, var(--sd-button-height));min-width:var(--sd-button-icon-only-size, var(--sd-button-height));height:var(--sd-button-icon-only-size, var(--sd-button-height));padding:0}.sd-button--icon-only .sd-button__content{gap:0}.sd-button--disabled{border-color:var(--sd-button-button-border-disabled, #CCCCCC);background:var(--sd-button-button-bg-disabled, #E1E1E1);--sd-button-current-text:var(--sd-button-button-text-disabled, #888888);--sd-button-current-icon:var(--sd-button-button-icon-disabled, #BBBBBB);cursor:not-allowed}.sd-button .sd-button__content{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-button-gap)}.sd-button .sd-button__label{font:inherit}"}},[512,"sd-button",{name:[1],label:[1],icon:[1],rightIcon:[1,"right-icon"],ariaLabel:[1,"aria-label"],disabled:[4],type:[1]}]);function x(){"undefined"!=typeof customElements&&["sd-button","sd-icon"].forEach((t=>{switch(t){case"sd-button":customElements.get(d(t))||customElements.define(d(t),f);break;case"sd-icon":customElements.get(d(t))||b()}}))}export{f as S,x as d}
|