@sellmate/design-system 1.16.0 → 1.18.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/component.listItem-Bnh0r_CA.js +53 -0
- package/dist/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/index.cjs.js +11 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-button_2.cjs.entry.js +54 -0
- package/dist/cjs/sd-calendar_2.cjs.entry.js +2 -2
- package/dist/cjs/sd-chip-input.cjs.entry.js +236 -18
- package/dist/cjs/sd-circle-progress.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +17 -7
- package/dist/cjs/sd-field_3.cjs.entry.js +8 -8
- package/dist/cjs/sd-ghost-button_2.cjs.entry.js +2 -2
- package/dist/cjs/sd-guide.cjs.entry.js +1 -1
- package/dist/cjs/sd-key-value-table.cjs.entry.js +45 -9
- package/dist/cjs/sd-linear-progress.cjs.entry.js +2 -2
- package/dist/cjs/sd-loading-container.cjs.entry.js +2 -2
- package/dist/cjs/sd-modal-container.cjs.entry.js +8 -1
- package/dist/cjs/sd-pagination_4.cjs.entry.js +10 -10
- package/dist/cjs/sd-popup.cjs.entry.js +2 -2
- package/dist/cjs/sd-portal.cjs.entry.js +16 -12
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +8 -7
- package/dist/cjs/{sd-select.config-DrJ4LNVz.js → sd-select.config-C9Ohe1QA.js} +25 -71
- package/dist/cjs/sd-select_3.cjs.entry.js +12 -11
- package/dist/cjs/sd-switch.cjs.entry.js +1 -1
- package/dist/cjs/sd-table.cjs.entry.js +8 -8
- package/dist/cjs/{sd-table.config-BjJW74Zx.js → sd-table.config-B7MuRLoR.js} +1 -1
- package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
- package/dist/cjs/sd-td.cjs.entry.js +1 -1
- package/dist/cjs/sd-text-link.cjs.entry.js +4 -4
- 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/cjs/{system-CdAyz3ej.js → system-MjrAugX-.js} +7 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/assets/Bill.js +5 -0
- package/dist/collection/components/assets/Coupon.js +5 -0
- package/dist/collection/components/assets/Delete.js +5 -0
- package/dist/collection/components/assets/Dot.js +5 -0
- package/dist/collection/components/assets/Launcher.js +5 -0
- package/dist/collection/components/assets/Monitor.js +5 -0
- package/dist/collection/components/assets/Shield.js +5 -0
- package/dist/collection/components/assets/Sidebar.js +5 -0
- package/dist/collection/components/assets/Store.js +5 -0
- package/dist/collection/components/assets/index.js +18 -0
- package/dist/collection/components/sd-button/sd-button.js +2 -2
- package/dist/collection/components/sd-chip-input/sd-chip-input.config.js +29 -0
- package/dist/collection/components/sd-chip-input/sd-chip-input.css +50 -0
- package/dist/collection/components/sd-chip-input/sd-chip-input.js +321 -19
- 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 +7 -0
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +10 -7
- package/dist/collection/components/sd-field/sd-field.js +5 -5
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +1 -1
- package/dist/collection/components/sd-icon/sd-icon.js +1 -1
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.config.js +2 -3
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.css +2 -2
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +41 -4
- 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-modal-container/sd-modal-container.js +8 -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-popover/sd-popover.js +2 -2
- package/dist/collection/components/sd-popup/sd-popup.js +1 -1
- package/dist/collection/components/sd-portal/sd-portal.js +16 -12
- 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 +4 -4
- package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +2 -2
- package/dist/collection/components/sd-select/sd-select.config.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.js +1 -1
- package/dist/collection/components/sd-tag/sd-tag.js +3 -3
- package/dist/collection/components/sd-text-link/sd-text-link.js +4 -4
- package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
- package/dist/collection/components/sd-toast/sd-toast.js +3 -3
- 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 +4 -4
- package/dist/collection/utils/modal.js +11 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{p-DfZ8X4ly.js → p-4HPAPKne.js} +1 -1
- package/dist/components/{p-B57sOZvR.js → p-79DExV92.js} +1 -1
- package/dist/components/{p-RE577yb-.js → p-AI4YlQmL.js} +1 -1
- package/dist/components/{p-B4pLCd0_.js → p-B-4ulKJj.js} +1 -1
- package/dist/components/{p-G_N9xEDL.js → p-B3SKaQId.js} +1 -1
- package/dist/components/p-BD8OoYud.js +1 -0
- package/dist/components/p-BJfiMC9H.js +1 -0
- package/dist/components/{p-DknZgTo9.js → p-BLNc_TL-.js} +1 -1
- package/dist/components/{p-CLEAGFjW.js → p-BMIgVp9-.js} +1 -1
- package/dist/components/{p-vS0t7bWk.js → p-BX5uKVOt.js} +1 -1
- package/dist/components/p-BYTrIk62.js +1 -0
- package/dist/components/{p-_P21dOPl.js → p-B_5uwji5.js} +1 -1
- package/dist/components/{p-DUwrMHYa.js → p-Bzo51vnP.js} +1 -1
- package/dist/components/{p-DtG23tkr.js → p-C0tkFuhj.js} +1 -1
- package/dist/components/{p-YlaidN9T.js → p-C3wv8gVC.js} +1 -1
- package/dist/components/{p-YKESuy-p.js → p-CH6cVc2a.js} +1 -1
- package/dist/components/{p-Bfrg9lvO.js → p-CQWZv8vY.js} +1 -1
- package/dist/components/{p-BsQf9d7Q.js → p-CXRFEcE_.js} +1 -1
- package/dist/components/{p-B-61rIur.js → p-C_r3z9VA.js} +1 -1
- package/dist/components/{p-BvAJ_toQ.js → p-Cl5io5TH.js} +1 -1
- package/dist/components/p-ClKABgST.js +1 -0
- package/dist/components/{p-DGyTYauz.js → p-Cmg10jpN.js} +1 -1
- package/dist/components/{p-DeXO3mpJ.js → p-CtWfOIxb.js} +1 -1
- package/dist/components/{p-CIZpVJBx.js → p-CzCu_NDl.js} +1 -1
- package/dist/components/{p-FGvi8J2D.js → p-DAOeioSV.js} +1 -1
- package/dist/components/{p-iGvyLmbb.js → p-DDR0VcRU.js} +1 -1
- package/dist/components/{p-CnfnK5aj.js → p-DMS9mQsg.js} +1 -1
- package/dist/components/{p-B73U-Zw2.js → p-DTFXzlvq.js} +1 -1
- package/dist/components/{p-CHjF0mwj.js → p-DbLQoVx6.js} +1 -1
- package/dist/components/p-Dr5Q2ZKB.js +1 -0
- package/dist/components/{p-B4UxhQes.js → p-DrSHJYop.js} +1 -1
- package/dist/components/p-DvvGi4J_.js +1 -0
- package/dist/components/{p-BrzBnO1L.js → p-DyVh4pNL.js} +1 -1
- package/dist/components/{p-C_6HUUGg.js → p-Ng3JMPxb.js} +1 -1
- package/dist/components/p-U8VaRj9c.js +1 -0
- package/dist/components/{p-BY1ItC8N.js → p-hzCGj0On.js} +1 -1
- package/dist/components/{p-BMVHvEDw.js → p-qJeUUOyB.js} +1 -1
- package/dist/components/sd-action-modal.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-checkbox.js +1 -1
- package/dist/components/sd-chip-input.js +1 -1
- 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-icon.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-text-link.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/components/sd-tr.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/index.esm.js +1 -1
- package/dist/design-system/{p-13b0db59.entry.js → p-0a772d43.entry.js} +1 -1
- package/dist/design-system/p-12306783.entry.js +1 -0
- package/dist/design-system/{p-b457611c.entry.js → p-1602a5fa.entry.js} +1 -1
- package/dist/design-system/p-1f3c1cca.entry.js +1 -0
- package/dist/design-system/{p-3045ffe1.entry.js → p-22484d65.entry.js} +1 -1
- package/dist/design-system/p-3caf2c5b.entry.js +1 -0
- package/dist/design-system/p-3f7349ae.entry.js +1 -0
- package/dist/design-system/{p-b8ea656d.entry.js → p-43529bba.entry.js} +1 -1
- package/dist/design-system/p-46da89f2.entry.js +1 -0
- package/dist/design-system/{p-a1f756ab.entry.js → p-4e1d76b8.entry.js} +1 -1
- package/dist/design-system/{p-03bcd782.entry.js → p-683c3b91.entry.js} +1 -1
- package/dist/design-system/{p-99ffe505.entry.js → p-6ce68bf2.entry.js} +1 -1
- package/dist/design-system/{p-a5131a43.entry.js → p-80bde621.entry.js} +1 -1
- package/dist/design-system/{p-22883fe1.entry.js → p-81aa23d1.entry.js} +1 -1
- package/dist/design-system/{p-c78b8822.entry.js → p-827f067b.entry.js} +1 -1
- package/dist/design-system/p-8a025f91.entry.js +1 -0
- package/dist/design-system/{p-3e62a3ea.entry.js → p-8a84a4fe.entry.js} +1 -1
- package/dist/design-system/{p-d2833150.entry.js → p-8f90620b.entry.js} +1 -1
- package/dist/design-system/{p-a0775a0c.entry.js → p-9124a1af.entry.js} +1 -1
- package/dist/design-system/p-BJfiMC9H.js +1 -0
- package/dist/design-system/p-CAFz8W8_.js +1 -0
- package/dist/design-system/{p-DGyTYauz.js → p-Cmg10jpN.js} +1 -1
- package/dist/design-system/p-U8VaRj9c.js +1 -0
- package/dist/design-system/{p-c6307ba4.entry.js → p-a263af1b.entry.js} +1 -1
- package/dist/design-system/p-aa312937.entry.js +1 -0
- package/dist/design-system/p-b4b20a86.entry.js +1 -0
- package/dist/design-system/{p-7eb31041.entry.js → p-bbbc4b27.entry.js} +1 -1
- package/dist/design-system/p-bcd7d358.entry.js +1 -0
- package/dist/design-system/{p-14340e46.entry.js → p-cc5f5bff.entry.js} +1 -1
- package/dist/design-system/{p-8140a225.entry.js → p-d5032f31.entry.js} +1 -1
- package/dist/design-system/{p-6d765b25.entry.js → p-e93dda25.entry.js} +1 -1
- package/dist/design-system/{p-c4e1641b.entry.js → p-f5190934.entry.js} +1 -1
- package/dist/design-system/p-ff939fbd.entry.js +1 -0
- package/dist/esm/component.listItem-U8VaRj9c.js +50 -0
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/index.js +11 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-button_2.entry.js +54 -0
- package/dist/esm/sd-calendar_2.entry.js +2 -2
- package/dist/esm/sd-chip-input.entry.js +236 -18
- package/dist/esm/sd-circle-progress.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/sd-dropdown-button.entry.js +17 -7
- package/dist/esm/sd-field_3.entry.js +8 -8
- package/dist/esm/sd-ghost-button_2.entry.js +2 -2
- package/dist/esm/sd-guide.entry.js +1 -1
- package/dist/esm/sd-key-value-table.entry.js +45 -9
- package/dist/esm/sd-linear-progress.entry.js +2 -2
- package/dist/esm/sd-loading-container.entry.js +2 -2
- package/dist/esm/sd-modal-container.entry.js +8 -1
- package/dist/esm/sd-pagination_4.entry.js +10 -10
- package/dist/esm/sd-popup.entry.js +2 -2
- package/dist/esm/sd-portal.entry.js +16 -12
- package/dist/esm/sd-select-list-item_2.entry.js +8 -7
- package/dist/esm/{sd-select.config-DtrsLG0Z.js → sd-select.config-D6ktrl7E.js} +4 -50
- package/dist/esm/sd-select_3.entry.js +12 -11
- package/dist/esm/sd-switch.entry.js +1 -1
- package/dist/esm/{sd-table.config-D9meRqTx.js → sd-table.config-B3wuA5wX.js} +1 -1
- package/dist/esm/sd-table.entry.js +8 -8
- package/dist/esm/sd-tabs.entry.js +1 -1
- package/dist/esm/sd-td.entry.js +1 -1
- package/dist/esm/sd-text-link.entry.js +4 -4
- 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/esm/{system-j2khhcHY.js → system-BJfiMC9H.js} +7 -0
- package/dist/types/components/assets/Bill.d.ts +1 -0
- package/dist/types/components/assets/Coupon.d.ts +1 -0
- package/dist/types/components/assets/Delete.d.ts +1 -0
- package/dist/types/components/assets/Dot.d.ts +1 -0
- package/dist/types/components/assets/Launcher.d.ts +1 -0
- package/dist/types/components/assets/Monitor.d.ts +1 -0
- package/dist/types/components/assets/Shield.d.ts +1 -0
- package/dist/types/components/assets/Sidebar.d.ts +1 -0
- package/dist/types/components/assets/Store.d.ts +1 -0
- package/dist/types/components/assets/index.d.ts +9 -0
- package/dist/types/components/sd-chip-input/sd-chip-input.config.d.ts +24 -0
- package/dist/types/components/sd-chip-input/sd-chip-input.d.ts +15 -0
- package/dist/types/components/sd-dropdown-button/sd-dropdown-button.config.d.ts +4 -0
- package/dist/types/components/sd-dropdown-button/sd-dropdown-button.d.ts +1 -0
- package/dist/types/components/sd-key-value-table/sd-key-value-table.config.d.ts +3 -2
- package/dist/types/components/sd-key-value-table/sd-key-value-table.d.ts +5 -0
- package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +2 -0
- package/dist/types/components/sd-portal/sd-portal.d.ts +1 -0
- package/dist/types/components.d.ts +39 -0
- package/dist/types/utils/modal.d.ts +6 -0
- package/hydrate/index.js +547 -204
- package/hydrate/index.mjs +547 -204
- package/package.json +1 -1
- package/dist/components/p-6oSCGUOo.js +0 -1
- package/dist/components/p-BWoC-hMr.js +0 -1
- package/dist/components/p-C5wgHjtx.js +0 -1
- package/dist/components/p-Cftyepf_.js +0 -1
- package/dist/components/p-IgBxAXyL.js +0 -1
- package/dist/components/p-j2khhcHY.js +0 -1
- package/dist/design-system/p-0c5192b8.entry.js +0 -1
- package/dist/design-system/p-1652ae55.entry.js +0 -1
- package/dist/design-system/p-21fa7f85.entry.js +0 -1
- package/dist/design-system/p-2753c6c9.entry.js +0 -1
- package/dist/design-system/p-5c6dd20b.entry.js +0 -1
- package/dist/design-system/p-71739336.entry.js +0 -1
- package/dist/design-system/p-DtrsLG0Z.js +0 -1
- package/dist/design-system/p-b22cb811.entry.js +0 -1
- package/dist/design-system/p-b576bc21.entry.js +0 -1
- package/dist/design-system/p-c1f71355.entry.js +0 -1
- package/dist/design-system/p-da90b448.entry.js +0 -1
- package/dist/design-system/p-j2khhcHY.js +0 -1
|
@@ -41,7 +41,7 @@ export class SdSwitch {
|
|
|
41
41
|
'--sd-switch-line-height': `${SWITCH_TYPOGRAPHY.lineHeight}px`,
|
|
42
42
|
'--sd-switch-text-decoration': SWITCH_TYPOGRAPHY.textDecoration,
|
|
43
43
|
};
|
|
44
|
-
return (h("label", { key: '
|
|
44
|
+
return (h("label", { key: '8038810bfcf78ddea9ef73706689e19fdfe0b57f', "aria-label": this.label || 'switch', class: this.switchClasses, style: cssVars }, h("input", { key: 'ee4c60f379f20f56af01bafb0533e6b64bb3054a', type: "checkbox", checked: this.value, disabled: this.disabled, onInput: this.handleChange }), h("div", { key: '8ce56df6d631b742331466ded340298a888576c7', class: "sd-switch__track" }, h("div", { key: 'e02c48a7af9e005524b5d3ba8689e99dd42555f2', class: "sd-switch__knob" })), this.label && h("span", { key: 'c1533c489ef8d0a2b8374d2eaeeb0ac743a9c507', class: "sd-switch__label" }, this.label)));
|
|
45
45
|
}
|
|
46
46
|
static get is() { return "sd-switch"; }
|
|
47
47
|
static get originalStyleUrls() {
|
|
@@ -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: '337909d6279baf60effec188eb60422ce47c0585', style: hostStyle }, h("div", { key: '46d53ced85e1700da3c6ca082d5752c0bb4a155b', 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: '159fad6dec16b3328d0da4ce22ae6bca537046e9', class: {
|
|
825
825
|
'sd-table__wrapper': true,
|
|
826
826
|
'sd-table__wrapper--use-top': this.useTop,
|
|
827
|
-
} }, h("div", { key: '
|
|
827
|
+
} }, h("div", { key: '22acbc7de61e11807b1a8919090286bb04a98bed', 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: '040736d35428396068d5237a17f23f8f70ba2541', class: "sd-table__loading", style: { top: `${this.loadingScrollTop}px` } }, h("sd-circle-progress", { key: 'eae076a71161e315951692f051522b8b5f094271', indeterminate: true }))), isNoData && (h(h.Fragment, null, h("div", { key: 'e8bdf5ae38a77988fce0a60ae9309f5d03b34928', class: "sd-table__no-data-header-overlay" }), h("div", { key: 'd6ce4d4479eb927137b1afd5494a91494568b274', class: "sd-table__no-data" }, h("div", { key: 'cfccc6382e7d0cc76d7f50515cd157ccd56cbac8', 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: '45a2df0c0fa234408ca5a5fb76b5a74729cad482', name: "no-data" }, h("span", { key: 'a126d8ce4149ac87e55f5a6acc67bbb3a650cdf4' }, this.resolvedNoDataLabel)))))), h("table", { key: 'aa4b94ed02700edd1846ca51235f47fe7de570be', 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: 'f4d357d62af40e3ea8f35c799b4409c7deb2606f', class: "sd-table__pagination" }, h("sd-pagination", { key: '6aad139f1f06d1851f30b5c8331899fe9d23ba37', 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: '85aa19726fca6dce007d8ffcc5550de8115546cb', 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: '1f9dba3a06233de0457c6fe7d2df39e0e406fb30', slot: `${this.tableId}-body` }, h("tbody", { key: '758d795512ff546ec23863a1b9a0940f5d0f445a', 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: 'cd9755c4f082478b1e75a6efcf9b4e7a9a9767b4' }),
|
|
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: '02464050ab6179a4d19bc5885aff8c2690cc3dd6', class: { [`align-${this.align}`]: Boolean(this.align) } }, h("slot", { key: 'a4cde26644aea2e1a99690c407b7020b20bd3981' })));
|
|
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: '1e352d3996dc6cd60acd20c22c8c426edabaa9ea', slot: `${this.tableId}-head`, style: headStyle }, h("thead", { key: 'd76dbdd5b03096197fe09d69c198ab3a5892106c', class: {
|
|
162
162
|
'thead': true,
|
|
163
163
|
'thead--sticky': this._stickyHeader,
|
|
164
|
-
} }, h("tr", { key: '
|
|
164
|
+
} }, h("tr", { key: 'fb0c1f8ff93ddb8682b07e9b4f55eaf56b1be41a', class: "tr" }, this._selectable && (h("th", { key: 'a53b9771dbec3ef7f3888bf9fc9393c683356c50', 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: '8dc233b34b68a5daca91a60364ec8faffeb4b21d', value: this.getIsAllChecked(), disabled: safeRows.length === 0, onSdUpdate: (e) => this.handleSelectAll(e.detail) }), h("div", { key: 'bfc496c2468f3f81c1db4ffe70584a9229bd3512', 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,
|
|
@@ -72,7 +72,7 @@ export class SdTabs {
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
render() {
|
|
75
|
-
return (h("div", { key: '
|
|
75
|
+
return (h("div", { key: 'fd65e555621e8b9f9c8e93578f41f1c24a8cbeda', class: this.getContainerClasses(), style: this.buildCssVars() }, this.tabs.map((tab, index) => {
|
|
76
76
|
const badgeName = this.getBadgeName(tab);
|
|
77
77
|
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 => {
|
|
78
78
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
@@ -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: 'b4d86dee7290a74d73fd27a9a4133c5c0ef9b750', 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: '490c703ca9ce3d0516b1da89fec18045a750d715', 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() {
|
|
@@ -104,7 +104,7 @@ export class SdTag {
|
|
|
104
104
|
"mutable": false,
|
|
105
105
|
"complexType": {
|
|
106
106
|
"original": "IconName",
|
|
107
|
-
"resolved": "\"add\" | \"alert\" | \"alignKorean\" | \"archive\" | \"arrowDown\" | \"arrowLeft\" | \"arrowRight\" | \"arrowUp\" | \"attachFile\" | \"barcode\" | \"bell\" | \"board\" | \"box\" | \"camera\" | \"cancelFill\" | \"cancelOutline\" | \"caretDown\" | \"caretLeft\" | \"caretRight\" | \"caretUp\" | \"check\" | \"checkFill\" | \"checkOutline\" | \"checkboxCheck\" | \"checkboxIndeterminate\" | \"chevronDown\" | \"chevronLeft\" | \"chevronLeftEnd\" | \"chevronRight\" | \"chevronRightEnd\" | \"chevronUp\" | \"clockFill\" | \"clockOutline\" | \"close\" | \"copy\" | \"dashboard\" | \"date\" | \"download\" | \"drag\" | \"edit\" | \"etc\" | \"event\" | \"global\" | \"helpFill\" | \"helpOutline\" | \"history\" | \"imageFill\" | \"imageOutline\" | \"inline\" | \"line\" | \"location\" | \"logout\" | \"minus\" | \"new\" | \"notificationFill\" | \"notificationOutline\" | \"notion\" | \"outline\" | \"pageEdit\" | \"pageMove\" | \"pdf\" | \"print\" | \"remove\" | \"reset\" | \"robot\" | \"row\" | \"save\" | \"search\" | \"setting\" | \"star\" | \"synchronize\" | \"updown\" | \"user\" | \"visibilityOff\" | \"visibilityOn\" | \"warehouseFill\" | \"warehouseOutline\" | \"warningFill\" | \"warningOutline\" | \"youtube\" | undefined",
|
|
107
|
+
"resolved": "\"add\" | \"alert\" | \"alignKorean\" | \"archive\" | \"arrowDown\" | \"arrowLeft\" | \"arrowRight\" | \"arrowUp\" | \"attachFile\" | \"barcode\" | \"bell\" | \"bill\" | \"board\" | \"box\" | \"camera\" | \"cancelFill\" | \"cancelOutline\" | \"caretDown\" | \"caretLeft\" | \"caretRight\" | \"caretUp\" | \"check\" | \"checkFill\" | \"checkOutline\" | \"checkboxCheck\" | \"checkboxIndeterminate\" | \"chevronDown\" | \"chevronLeft\" | \"chevronLeftEnd\" | \"chevronRight\" | \"chevronRightEnd\" | \"chevronUp\" | \"clockFill\" | \"clockOutline\" | \"close\" | \"copy\" | \"coupon\" | \"dashboard\" | \"date\" | \"delete\" | \"dot\" | \"download\" | \"drag\" | \"edit\" | \"etc\" | \"event\" | \"global\" | \"helpFill\" | \"helpOutline\" | \"history\" | \"imageFill\" | \"imageOutline\" | \"inline\" | \"launcher\" | \"line\" | \"location\" | \"logout\" | \"minus\" | \"monitor\" | \"new\" | \"notificationFill\" | \"notificationOutline\" | \"notion\" | \"outline\" | \"pageEdit\" | \"pageMove\" | \"pdf\" | \"print\" | \"remove\" | \"reset\" | \"robot\" | \"row\" | \"save\" | \"search\" | \"setting\" | \"shield\" | \"sidebar\" | \"star\" | \"store\" | \"synchronize\" | \"updown\" | \"user\" | \"visibilityOff\" | \"visibilityOn\" | \"warehouseFill\" | \"warehouseOutline\" | \"warningFill\" | \"warningOutline\" | \"youtube\" | undefined",
|
|
108
108
|
"references": {
|
|
109
109
|
"IconName": {
|
|
110
110
|
"location": "global",
|
|
@@ -16,7 +16,7 @@ export class SdTextLink {
|
|
|
16
16
|
this.click.emit();
|
|
17
17
|
};
|
|
18
18
|
render() {
|
|
19
|
-
const sizeConfig = TEXT_LINK_SIZE_CONFIG[this.size];
|
|
19
|
+
const sizeConfig = TEXT_LINK_SIZE_CONFIG[this.size] ?? TEXT_LINK_SIZE_CONFIG.sm;
|
|
20
20
|
const typo = this.underline ? sizeConfig.typography.underline : sizeConfig.typography.default;
|
|
21
21
|
const labelClassName = ['sd-text-link__label', this.labelClass].filter(Boolean).join(' ');
|
|
22
22
|
const iconColor = this.disabled
|
|
@@ -30,7 +30,7 @@ export class SdTextLink {
|
|
|
30
30
|
'--sd-text-link-text-decoration': typo.textDecoration,
|
|
31
31
|
...(this.disabled ? { '--sd-text-link-color': TEXT_LINK_COLORS.content.disabled } : {}),
|
|
32
32
|
};
|
|
33
|
-
return (h("span", { key: '
|
|
33
|
+
return (h("span", { key: '74e9dd05f3efa3ecfec4edca1b74c29bb7207894', role: "button", tabindex: this.disabled ? -1 : 0, class: {
|
|
34
34
|
'sd-text-link': true,
|
|
35
35
|
'sd-text-link--disabled': this.disabled,
|
|
36
36
|
}, style: cssVars, onClick: this.handleClick, onKeyDown: e => {
|
|
@@ -38,13 +38,13 @@ export class SdTextLink {
|
|
|
38
38
|
e.preventDefault();
|
|
39
39
|
this.handleClick();
|
|
40
40
|
}
|
|
41
|
-
} }, this.icon && (h("sd-icon", { key: '
|
|
41
|
+
} }, this.icon && (h("sd-icon", { key: 'e60be0764adf889af988fd887582776d44239e07', name: this.icon, size: sizeConfig.iconSize, color: iconColor, class: "sd-text-link__icon" })), h("span", { key: '17996ef0620948fe1660945e68c9bb55e62fc982', class: labelClassName }, this.label), this.rightArrow && this.rightArrow !== 'none' && (h("span", { key: 'b9cfc03d4295beb9956f661032ea3fd1d9acfbe9', class: "sd-text-link__arrow", style: {
|
|
42
42
|
width: `${TEXT_LINK_ARROW.arrowFrame}px`,
|
|
43
43
|
height: `${TEXT_LINK_ARROW.arrowFrame}px`,
|
|
44
44
|
display: 'inline-flex',
|
|
45
45
|
alignItems: 'center',
|
|
46
46
|
justifyContent: 'center',
|
|
47
|
-
} }, h("sd-icon", { key: '
|
|
47
|
+
} }, h("sd-icon", { key: '6c2e4640a767acd5e66089e7e78f27c0fb8a0955', name: this.rightArrow === 'chevron' ? 'chevronRight' : 'caretRight', size: TEXT_LINK_ARROW.arrowIconSize, color: arrowColor })))));
|
|
48
48
|
}
|
|
49
49
|
static get is() { return "sd-text-link"; }
|
|
50
50
|
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: '526fc1a73f13e5170125a570c5a1c8459931aa25', 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: 'e3c52fccc564a2488eb9e0d9399437b76e919c6a', class: "sd-textarea__content" }, h("textarea", { key: '3253873da3b9591e64a6dfd170c8d9ccb4861599', 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: '656bf6231262cc7d974adbe5f0ce0053d03aca84', 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: '1e15e50c926ce65cea86db069dd1e79a642da01c', class: "sd-toast", role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (h("div", { key: '692277c23c4530d9fa0c5e26ea9d3b9759024dea', class: "sd-toast__icon" }, h("sd-icon", { key: '0a15993313f3a9d1f27d6ae727c2c248c3390701', name: this.icon, size: iconSize, color: iconColor }))), h("div", { key: '9c1af0c9cedbb772b9b59ae80a0ff861066aa0de', class: "sd-toast__content" }, h("span", { key: '2aacd89fe1cf31f271da027459a6cfaece3dbdbf', class: "sd-toast__message" }, this.message)), this.link && (h("a", { key: '094a68e843d9ab50cea46a506d6ccdc1ebf375d7', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.buttonLabel && (h("sd-button", { key: '7dabe182870a01cf285ee7441dfe39b07e943751', class: "sd-toast__button", name: buttonName, label: this.buttonLabel, onSdClick: (event) => this.buttonClick.emit(event.detail) })), this.useClose && (h("sd-ghost-button", { key: '2a893c6ace888d8f21ce16c9dbf2a35b23bc9372', 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() {
|
|
@@ -42,7 +42,7 @@ export class SdToast {
|
|
|
42
42
|
"mutable": false,
|
|
43
43
|
"complexType": {
|
|
44
44
|
"original": "IconName",
|
|
45
|
-
"resolved": "\"add\" | \"alert\" | \"alignKorean\" | \"archive\" | \"arrowDown\" | \"arrowLeft\" | \"arrowRight\" | \"arrowUp\" | \"attachFile\" | \"barcode\" | \"bell\" | \"board\" | \"box\" | \"camera\" | \"cancelFill\" | \"cancelOutline\" | \"caretDown\" | \"caretLeft\" | \"caretRight\" | \"caretUp\" | \"check\" | \"checkFill\" | \"checkOutline\" | \"checkboxCheck\" | \"checkboxIndeterminate\" | \"chevronDown\" | \"chevronLeft\" | \"chevronLeftEnd\" | \"chevronRight\" | \"chevronRightEnd\" | \"chevronUp\" | \"clockFill\" | \"clockOutline\" | \"close\" | \"copy\" | \"dashboard\" | \"date\" | \"download\" | \"drag\" | \"edit\" | \"etc\" | \"event\" | \"global\" | \"helpFill\" | \"helpOutline\" | \"history\" | \"imageFill\" | \"imageOutline\" | \"inline\" | \"line\" | \"location\" | \"logout\" | \"minus\" | \"new\" | \"notificationFill\" | \"notificationOutline\" | \"notion\" | \"outline\" | \"pageEdit\" | \"pageMove\" | \"pdf\" | \"print\" | \"remove\" | \"reset\" | \"robot\" | \"row\" | \"save\" | \"search\" | \"setting\" | \"star\" | \"synchronize\" | \"updown\" | \"user\" | \"visibilityOff\" | \"visibilityOn\" | \"warehouseFill\" | \"warehouseOutline\" | \"warningFill\" | \"warningOutline\" | \"youtube\" | undefined",
|
|
45
|
+
"resolved": "\"add\" | \"alert\" | \"alignKorean\" | \"archive\" | \"arrowDown\" | \"arrowLeft\" | \"arrowRight\" | \"arrowUp\" | \"attachFile\" | \"barcode\" | \"bell\" | \"bill\" | \"board\" | \"box\" | \"camera\" | \"cancelFill\" | \"cancelOutline\" | \"caretDown\" | \"caretLeft\" | \"caretRight\" | \"caretUp\" | \"check\" | \"checkFill\" | \"checkOutline\" | \"checkboxCheck\" | \"checkboxIndeterminate\" | \"chevronDown\" | \"chevronLeft\" | \"chevronLeftEnd\" | \"chevronRight\" | \"chevronRightEnd\" | \"chevronUp\" | \"clockFill\" | \"clockOutline\" | \"close\" | \"copy\" | \"coupon\" | \"dashboard\" | \"date\" | \"delete\" | \"dot\" | \"download\" | \"drag\" | \"edit\" | \"etc\" | \"event\" | \"global\" | \"helpFill\" | \"helpOutline\" | \"history\" | \"imageFill\" | \"imageOutline\" | \"inline\" | \"launcher\" | \"line\" | \"location\" | \"logout\" | \"minus\" | \"monitor\" | \"new\" | \"notificationFill\" | \"notificationOutline\" | \"notion\" | \"outline\" | \"pageEdit\" | \"pageMove\" | \"pdf\" | \"print\" | \"remove\" | \"reset\" | \"robot\" | \"row\" | \"save\" | \"search\" | \"setting\" | \"shield\" | \"sidebar\" | \"star\" | \"store\" | \"synchronize\" | \"updown\" | \"user\" | \"visibilityOff\" | \"visibilityOn\" | \"warehouseFill\" | \"warehouseOutline\" | \"warningFill\" | \"warningOutline\" | \"youtube\" | undefined",
|
|
46
46
|
"references": {
|
|
47
47
|
"IconName": {
|
|
48
48
|
"location": "global",
|
|
@@ -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: '44b4f34b231186fd00ef9c1a65bd68a83fced6da', 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: '5657698c379c71e770b18006b5f5c69c122a06a7', class: this.toggleClasses, style: cssVars, "aria-label": this.label || 'toggle' }, this.label, h("input", { key: '8f72307d4efd029df200243cf670377aea2cff02', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "sd-toggle"; }
|
|
51
51
|
static get originalStyleUrls() {
|
|
@@ -128,7 +128,7 @@ export class SdTooltip {
|
|
|
128
128
|
const bodyHTML = this.message && this.message.length > 0
|
|
129
129
|
? this.message.map(line => `<div>${line}</div>`).join('')
|
|
130
130
|
: this.slotContentHTML;
|
|
131
|
-
return (h(Fragment, { key: '
|
|
131
|
+
return (h(Fragment, { key: 'c0d000057ed61fe7b6b4d92bc0df5e0c6d42d714' }, h("div", { key: '4ae084008ddec50e912fa81efbe3adbe0428d7ea', ref: el => (this.triggerEl = el), class: triggerClasses, ...divTrigger }, anchorMode ? (h("slot", { name: "anchor" })) : hasLabel ? (h("sd-button", { ref: el => (this.buttonEl = el), name: this.name ?? 'primary_sm', label: this.label, icon: icon, rightIcon: this.rightIcon, ariaLabel: this.ariaLabel, disabled: this.disabled, type: this.type ?? 'button', class: "sd-tooltip", ...buttonClickTrigger })) : (h("sd-icon", { ref: el => (this.buttonEl = el), name: icon, size: this.iconSize ?? 12, color: color, class: "sd-tooltip" }))), this.showTooltip && (h("sd-floating-portal", { key: 'd5a8718b4e4556b989e5439b89296a259d99c636', parentRef: anchorMode ? this.triggerEl : this.buttonEl, onSdClose: this.handleClose, placement: placement, offset: this.tooltipOffset }, h("div", { key: 'e81f2704ddbc90a19c1e8dd0c4660c4b057ca895', ref: el => (this.menuEl = el), class: {
|
|
132
132
|
'sd-floating-menu': true,
|
|
133
133
|
[`sd-floating-menu--${tooltipType}`]: true,
|
|
134
134
|
[`sd-floating-menu--${placement}`]: true,
|
|
@@ -136,7 +136,7 @@ export class SdTooltip {
|
|
|
136
136
|
}, style: {
|
|
137
137
|
'--sd-floating-bg': typeConfig.bg,
|
|
138
138
|
'--sd-floating-content': typeConfig.content,
|
|
139
|
-
}, onMouseEnter: () => this.openTooltip(), onMouseLeave: () => !this.useClose && this.startHideTimer() }, h("i", { key: '
|
|
139
|
+
}, onMouseEnter: () => this.openTooltip(), onMouseLeave: () => !this.useClose && this.startHideTimer() }, h("i", { key: '735cfb9956644542afb3b9f65aea127c37d756b2', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${placement}` }, h(TooltipArrow, { key: '53bac0c98b652b580b53b206d3da77deac0eea77' })), h("div", { key: '50c55e606002225363364ca6b5238a55a25374ba', class: "sd-floating-menu__content", innerHTML: bodyHTML }), this.useClose && (h("sd-ghost-button", { key: '7ab15f030aef1ecda2a3be0c08af2c7ab4992f1c', class: "sd-floating-menu__close-button", icon: "close", ariaLabel: "close", size: "xxs", onClick: () => this.closeTooltip() })))))));
|
|
140
140
|
}
|
|
141
141
|
static get is() { return "sd-tooltip"; }
|
|
142
142
|
static get originalStyleUrls() {
|
|
@@ -243,7 +243,7 @@ export class SdTooltip {
|
|
|
243
243
|
"mutable": false,
|
|
244
244
|
"complexType": {
|
|
245
245
|
"original": "IconName",
|
|
246
|
-
"resolved": "\"add\" | \"alert\" | \"alignKorean\" | \"archive\" | \"arrowDown\" | \"arrowLeft\" | \"arrowRight\" | \"arrowUp\" | \"attachFile\" | \"barcode\" | \"bell\" | \"board\" | \"box\" | \"camera\" | \"cancelFill\" | \"cancelOutline\" | \"caretDown\" | \"caretLeft\" | \"caretRight\" | \"caretUp\" | \"check\" | \"checkFill\" | \"checkOutline\" | \"checkboxCheck\" | \"checkboxIndeterminate\" | \"chevronDown\" | \"chevronLeft\" | \"chevronLeftEnd\" | \"chevronRight\" | \"chevronRightEnd\" | \"chevronUp\" | \"clockFill\" | \"clockOutline\" | \"close\" | \"copy\" | \"dashboard\" | \"date\" | \"download\" | \"drag\" | \"edit\" | \"etc\" | \"event\" | \"global\" | \"helpFill\" | \"helpOutline\" | \"history\" | \"imageFill\" | \"imageOutline\" | \"inline\" | \"line\" | \"location\" | \"logout\" | \"minus\" | \"new\" | \"notificationFill\" | \"notificationOutline\" | \"notion\" | \"outline\" | \"pageEdit\" | \"pageMove\" | \"pdf\" | \"print\" | \"remove\" | \"reset\" | \"robot\" | \"row\" | \"save\" | \"search\" | \"setting\" | \"star\" | \"synchronize\" | \"updown\" | \"user\" | \"visibilityOff\" | \"visibilityOn\" | \"warehouseFill\" | \"warehouseOutline\" | \"warningFill\" | \"warningOutline\" | \"youtube\"",
|
|
246
|
+
"resolved": "\"add\" | \"alert\" | \"alignKorean\" | \"archive\" | \"arrowDown\" | \"arrowLeft\" | \"arrowRight\" | \"arrowUp\" | \"attachFile\" | \"barcode\" | \"bell\" | \"bill\" | \"board\" | \"box\" | \"camera\" | \"cancelFill\" | \"cancelOutline\" | \"caretDown\" | \"caretLeft\" | \"caretRight\" | \"caretUp\" | \"check\" | \"checkFill\" | \"checkOutline\" | \"checkboxCheck\" | \"checkboxIndeterminate\" | \"chevronDown\" | \"chevronLeft\" | \"chevronLeftEnd\" | \"chevronRight\" | \"chevronRightEnd\" | \"chevronUp\" | \"clockFill\" | \"clockOutline\" | \"close\" | \"copy\" | \"coupon\" | \"dashboard\" | \"date\" | \"delete\" | \"dot\" | \"download\" | \"drag\" | \"edit\" | \"etc\" | \"event\" | \"global\" | \"helpFill\" | \"helpOutline\" | \"history\" | \"imageFill\" | \"imageOutline\" | \"inline\" | \"launcher\" | \"line\" | \"location\" | \"logout\" | \"minus\" | \"monitor\" | \"new\" | \"notificationFill\" | \"notificationOutline\" | \"notion\" | \"outline\" | \"pageEdit\" | \"pageMove\" | \"pdf\" | \"print\" | \"remove\" | \"reset\" | \"robot\" | \"row\" | \"save\" | \"search\" | \"setting\" | \"shield\" | \"sidebar\" | \"star\" | \"store\" | \"synchronize\" | \"updown\" | \"user\" | \"visibilityOff\" | \"visibilityOn\" | \"warehouseFill\" | \"warehouseOutline\" | \"warningFill\" | \"warningOutline\" | \"youtube\"",
|
|
247
247
|
"references": {
|
|
248
248
|
"IconName": {
|
|
249
249
|
"location": "global",
|
|
@@ -335,7 +335,7 @@ export class SdTooltip {
|
|
|
335
335
|
"mutable": false,
|
|
336
336
|
"complexType": {
|
|
337
337
|
"original": "IconName",
|
|
338
|
-
"resolved": "\"add\" | \"alert\" | \"alignKorean\" | \"archive\" | \"arrowDown\" | \"arrowLeft\" | \"arrowRight\" | \"arrowUp\" | \"attachFile\" | \"barcode\" | \"bell\" | \"board\" | \"box\" | \"camera\" | \"cancelFill\" | \"cancelOutline\" | \"caretDown\" | \"caretLeft\" | \"caretRight\" | \"caretUp\" | \"check\" | \"checkFill\" | \"checkOutline\" | \"checkboxCheck\" | \"checkboxIndeterminate\" | \"chevronDown\" | \"chevronLeft\" | \"chevronLeftEnd\" | \"chevronRight\" | \"chevronRightEnd\" | \"chevronUp\" | \"clockFill\" | \"clockOutline\" | \"close\" | \"copy\" | \"dashboard\" | \"date\" | \"download\" | \"drag\" | \"edit\" | \"etc\" | \"event\" | \"global\" | \"helpFill\" | \"helpOutline\" | \"history\" | \"imageFill\" | \"imageOutline\" | \"inline\" | \"line\" | \"location\" | \"logout\" | \"minus\" | \"new\" | \"notificationFill\" | \"notificationOutline\" | \"notion\" | \"outline\" | \"pageEdit\" | \"pageMove\" | \"pdf\" | \"print\" | \"remove\" | \"reset\" | \"robot\" | \"row\" | \"save\" | \"search\" | \"setting\" | \"star\" | \"synchronize\" | \"updown\" | \"user\" | \"visibilityOff\" | \"visibilityOn\" | \"warehouseFill\" | \"warehouseOutline\" | \"warningFill\" | \"warningOutline\" | \"youtube\" | undefined",
|
|
338
|
+
"resolved": "\"add\" | \"alert\" | \"alignKorean\" | \"archive\" | \"arrowDown\" | \"arrowLeft\" | \"arrowRight\" | \"arrowUp\" | \"attachFile\" | \"barcode\" | \"bell\" | \"bill\" | \"board\" | \"box\" | \"camera\" | \"cancelFill\" | \"cancelOutline\" | \"caretDown\" | \"caretLeft\" | \"caretRight\" | \"caretUp\" | \"check\" | \"checkFill\" | \"checkOutline\" | \"checkboxCheck\" | \"checkboxIndeterminate\" | \"chevronDown\" | \"chevronLeft\" | \"chevronLeftEnd\" | \"chevronRight\" | \"chevronRightEnd\" | \"chevronUp\" | \"clockFill\" | \"clockOutline\" | \"close\" | \"copy\" | \"coupon\" | \"dashboard\" | \"date\" | \"delete\" | \"dot\" | \"download\" | \"drag\" | \"edit\" | \"etc\" | \"event\" | \"global\" | \"helpFill\" | \"helpOutline\" | \"history\" | \"imageFill\" | \"imageOutline\" | \"inline\" | \"launcher\" | \"line\" | \"location\" | \"logout\" | \"minus\" | \"monitor\" | \"new\" | \"notificationFill\" | \"notificationOutline\" | \"notion\" | \"outline\" | \"pageEdit\" | \"pageMove\" | \"pdf\" | \"print\" | \"remove\" | \"reset\" | \"robot\" | \"row\" | \"save\" | \"search\" | \"setting\" | \"shield\" | \"sidebar\" | \"star\" | \"store\" | \"synchronize\" | \"updown\" | \"user\" | \"visibilityOff\" | \"visibilityOn\" | \"warehouseFill\" | \"warehouseOutline\" | \"warningFill\" | \"warningOutline\" | \"youtube\" | undefined",
|
|
339
339
|
"references": {
|
|
340
340
|
"IconName": {
|
|
341
341
|
"location": "global",
|
|
@@ -12,6 +12,7 @@ class ModalDialogRefImpl {
|
|
|
12
12
|
cancelFn;
|
|
13
13
|
closeFn;
|
|
14
14
|
clickFn;
|
|
15
|
+
submitFn;
|
|
15
16
|
dismissedFn;
|
|
16
17
|
containerRef;
|
|
17
18
|
pendingActions = [];
|
|
@@ -36,6 +37,10 @@ class ModalDialogRefImpl {
|
|
|
36
37
|
this.clickFn = fn;
|
|
37
38
|
return this;
|
|
38
39
|
}
|
|
40
|
+
onSubmit(fn) {
|
|
41
|
+
this.submitFn = fn;
|
|
42
|
+
return this;
|
|
43
|
+
}
|
|
39
44
|
onDismissed(fn) {
|
|
40
45
|
this.dismissedFn = fn;
|
|
41
46
|
return this;
|
|
@@ -65,9 +70,15 @@ class ModalDialogRefImpl {
|
|
|
65
70
|
});
|
|
66
71
|
return this;
|
|
67
72
|
}
|
|
73
|
+
_hasSubmit() {
|
|
74
|
+
return this.submitFn != null;
|
|
75
|
+
}
|
|
68
76
|
_triggerOk() {
|
|
69
77
|
this.okFn?.();
|
|
70
78
|
}
|
|
79
|
+
_triggerSubmit() {
|
|
80
|
+
this.submitFn?.();
|
|
81
|
+
}
|
|
71
82
|
_triggerCancel() {
|
|
72
83
|
this.cancelFn?.();
|
|
73
84
|
}
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-Bg9XySrz.js";import{c as t}from"./p-DRVnqiWc.js";let n=null;function e(t,n){void 0!==n&&(void 0!==n.position&&t.setAttribute("position",n.position),null!=n.maxVisible&&t.setAttribute("max-visible",n.maxVisible+""),null!=n.defaultDuration&&t.setAttribute("default-duration",n.defaultDuration+""),null!=n.zIndex&&t.setAttribute("z-index",n.zIndex+""))}function
|
|
1
|
+
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-Bg9XySrz.js";import{c as t}from"./p-DRVnqiWc.js";let n=null;function e(t,n){void 0!==n&&(void 0!==n.position&&t.setAttribute("position",n.position),null!=n.maxVisible&&t.setAttribute("max-visible",n.maxVisible+""),null!=n.defaultDuration&&t.setAttribute("default-duration",n.defaultDuration+""),null!=n.zIndex&&t.setAttribute("z-index",n.zIndex+""))}function i(t){return n&&document.body.contains(n)?(e(n,t),n):(n=document.createElement("sd-toast-container"),e(n,t),document.body.appendChild(n),n)}function o(t){return"function"==typeof t.create?Promise.resolve():new Promise((n=>{const e=()=>{"function"==typeof t.create?n():requestAnimationFrame(e)};requestAnimationFrame(e)}))}const c={async create(t,n,e){const{globalOptions:s,...r}=e??{},c=i(s);return await o(c),c.create({message:t,type:n,...r})},async dismiss(t){if(null!=n)return await o(n),n.dismiss(t)},async dismissAll(){if(null!=n)return await o(n),n.dismissAll()},configure(t){i(t)}},u="sd-modal-container";let d=null;const l={ok:"confirm",cancel:"cancel",close:"close"};class m{modalId;okFn;cancelFn;closeFn;clickFn;submitFn;dismissedFn;containerRef;pendingActions=[];dismissRequested=!1;constructor(t,n){this.modalId=t,this.containerRef=n}onOk(t){return this.okFn=t,this}onCancel(t){return this.cancelFn=t,this}onClose(t){return this.closeFn=t,this}onClick(t){return this.clickFn=t,this}onSubmit(t){return this.submitFn=t,this}onDismissed(t){return this.dismissedFn=t,this}update(t){return this.runOrQueue((()=>{this.containerRef?.update(this.modalId,t)})),this}ok(){return this.dismiss("ok")}cancel(){return this.dismiss("cancel")}close(){return this.dismiss("close")}dismiss(t="close"){if(this.dismissRequested)return this;this.dismissRequested=!0;const n=l[t];return this.runOrQueue((()=>{this.containerRef?.dismissById(this.modalId,n)})),this}_hasSubmit(){return null!=this.submitFn}_triggerOk(){this.okFn?.()}_triggerSubmit(){this.submitFn?.()}_triggerCancel(){this.cancelFn?.()}_triggerClose(){this.closeFn?.()}_triggerClick(){this.clickFn?.()}_triggerDismissed(){this.dismissedFn?.()}_setId(t){this.modalId=t;const n=[...this.pendingActions];this.pendingActions=[],n.forEach((t=>t()))}_setContainer(t){this.containerRef=t}runOrQueue(t){""===this.modalId||null==this.containerRef?this.pendingActions.push(t):t()}}function h(){if("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof customElements)throw Error("[sdModal] Browser APIs are unavailable. Use `sdModal` only on the client.")}function f(){if(h(),function(){if(!customElements.get(u))throw Error("[sdModal] `sd-modal-container` is not registered. Call `defineCustomElements(window)` before using `sdModal`.")}(),d&&d.isConnected)return d;const t=document.createElement(u);return t.setAttribute("auto-remove",""),document.body.appendChild(t),d=t,t}async function w(t){if(await customElements.whenDefined(u),"function"==typeof t.open)return Promise.resolve();throw Error("[sdModal] `sd-modal-container` is registered but not ready to open dialogs.")}function p(){return new m("")}function y(t,n){const{component:e,persistent:s}=n,i=f(),o={persistent:s};t._setContainer(i),w(i).then((async()=>{const n=await i.createCustom(e,o,t);t._setId(n)}))}const E={confirm(t){const n=f(),e=new m("",n);return w(n).then((async()=>{const s=await n.open(t,e);e._setId(s)})),e},loading(t={}){const n=f(),e=new m("",n);return w(n).then((async()=>{const s=await n.openLoading(t,e);e._setId(s)})),e},create(t){const n=p();return y(n,t),n},configure(n){h(),t(n)}},C="sd-loading-container";let k=null;async function _(t){const n=(function(){if("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof customElements)throw Error("[sdLoading] Browser APIs are unavailable. Use `sdLoading` only on the client.")}(),function(){if(!customElements.get(C))throw Error("[sdLoading] `sd-loading-container` is not registered. Call `defineCustomElements(window)` before using `sdLoading`.")}(),k&&document.body.contains(k)||(k=document.createElement(C),document.body.appendChild(k)),k);await customElements.whenDefined(C),t(n)}const A={show(t={}){_((n=>{n.show?.(t)}))},hide(){k&&_((t=>{t.hide?.()}))}};export{y as _attachSdModalWithRef,p as _createSdModalRef,A as sdLoading,E as sdModal,c as sdToast}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,h as e,d as o,t as i}from"./p-Bg9XySrz.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-Bg9XySrz.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:"1f9dba3a06233de0457c6fe7d2df39e0e406fb30",slot:`${this.tableId}-body`},e("tbody",{key:"758d795512ff546ec23863a1b9a0940f5d0f445a",class:{tbody:!0}},[this.topSpacerHeight>0&&e("tr",{key:"spacer-top",class:"tbody__spacer",style:{height:`${this.topSpacerHeight}px`,display:"block"}}),e("slot",{key:"cd9755c4f082478b1e75a6efcf9b4e7a9a9767b4"}),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 e,H as s,c as t,h as i,t as c}from"./p-Bg9XySrz.js";import{S as a}from"./p-
|
|
1
|
+
import{p as e,H as s,c as t,h as i,t as c}from"./p-Bg9XySrz.js";import{S as a}from"./p-DvvGi4J_.js";import{d as l}from"./p-ClKABgST.js";const r=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.searchFilter=t(this,"sdSearchFilter",7),this.searchFocus=t(this,"sdSearchFocus",7)}isScrolled=!1;searchText="";searchFilter;searchFocus;inputEl;debounceTimer;focusRafId;componentDidLoad(){requestAnimationFrame((()=>{this.focusRafId=requestAnimationFrame((()=>{this.inputEl?.focus()}))}))}async sdFocus(){this.inputEl?.focus()}handleInput=e=>{this.searchText=e.target.value,this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>{this.searchFilter.emit(this.searchText)}),a)};handleClear=e=>{e.stopPropagation(),this.searchText="",this.debounceTimer&&clearTimeout(this.debounceTimer),this.searchFilter.emit(""),this.inputEl?.focus()};disconnectedCallback(){void 0!==this.focusRafId&&cancelAnimationFrame(this.focusRafId),void 0!==this.debounceTimer&&clearTimeout(this.debounceTimer)}render(){return i("div",{key:"6250cee5611a36f6c5fb317d7d24abeae1ed142f",class:{"sd-select-list-item-search":!0,"sd-select-list-item-search--scrolled":this.isScrolled}},i("div",{key:"fa48adb1406c8922b61083a19cc270f02ddab100",class:"sd-select-list-item-search__inner"},i("sd-icon",{key:"868519f09dc11fc4e9bde7a1148ce5ce666dd851",name:"search",size:16,color:"grey_70",class:"sd-select-list-item-search__icon"}),i("input",{key:"ff946fa2f360cd21eb785d13cb91e23f18abe05c",ref:e=>{this.inputEl=e},type:"text",class:"sd-select-list-item-search__input",placeholder:"검색어 입력",value:this.searchText,onInput:this.handleInput,onFocus:()=>this.searchFocus.emit()}),i("button",{key:"e70e4c0af6e11f89d2893ae5bb28887a0ed8a5ee",type:"button",class:{"sd-select-list-item-search__clear":!0,"sd-select-list-item-search__clear--hidden":""===this.searchText},onClick:this.handleClear,tabindex:""!==this.searchText?0:-1,"aria-hidden":""!==this.searchText?"false":"true"},i("sd-icon",{key:"57b4af6446a565b6e1e95153e8553b1c3c363a33",name:"close",size:12,color:"#888888"}))))}static get style(){return"sd-select-list-item-search{display:block}sd-select-list-item-search .sd-select-list-item-search{padding:4px 8px;position:sticky;top:0;z-index:1;background:white}sd-select-list-item-search .sd-select-list-item-search--scrolled{box-shadow:0 2px 4px rgba(0, 0, 0, 0.08)}sd-select-list-item-search .sd-select-list-item-search__inner{display:flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid #cccccc;border-radius:4px;background:white}sd-select-list-item-search .sd-select-list-item-search__inner:focus-within{border-color:#0075ff}sd-select-list-item-search .sd-select-list-item-search__icon{flex-shrink:0}sd-select-list-item-search .sd-select-list-item-search__input{flex:1;border:none;outline:none;font-size:12px;line-height:20px;color:#222222;background:transparent;min-width:0}sd-select-list-item-search .sd-select-list-item-search__input::placeholder{color:#aaaaaa}sd-select-list-item-search .sd-select-list-item-search__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:2px;border:none;background:transparent;cursor:pointer;border-radius:2px}sd-select-list-item-search .sd-select-list-item-search__clear:hover{background:#f0f0f0}sd-select-list-item-search .sd-select-list-item-search__clear--hidden{visibility:hidden;pointer-events:none}"}},[512,"sd-select-list-item-search",{isScrolled:[4,"is-scrolled"],searchText:[32],sdFocus:[64]}]);function d(){"undefined"!=typeof customElements&&["sd-select-list-item-search","sd-icon"].forEach((e=>{switch(e){case"sd-select-list-item-search":customElements.get(c(e))||customElements.define(c(e),r);break;case"sd-icon":customElements.get(c(e))||l()}}))}export{r as S,d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,c as s,h as i,t as n}from"./p-Bg9XySrz.js";import{n as r}from"./p-CCwNgVmC.js";import{f as d}from"./p-BOJJ_sQS.js";import{d as u}from"./p-iGvyLmbb.js";import{d as a}from"./p-vS0t7bWk.js";import{d as o}from"./p-DknZgTo9.js";import{d as l}from"./p-B73U-Zw2.js";import{d as p}from"./p-Cftyepf_.js";import{d as h}from"./p-CLEAGFjW.js";import{d as b}from"./p-BvAJ_toQ.js";var c={numberInput:{sm:{height:"28",paddingX:"6",radius:"4",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"}},md:{height:"36",paddingX:"8",radius:"6",typography:{fontWeight:"400",fontSize:"14",lineHeight:"24"}},border:{default:"#AAAAAA",focus:"#0075FF",danger:"#FB4444"},bg:{default:"#FFFFFF"},text:{default:"#222222",placeholder:"#AAAAAA",disabled:"#888888"},stepper:{sm:{size:"20"},md:{size:"24"},radius:"4",bg:{default:"#EFF6FF",disabled:"#EEEEEE"},icon:{default:"#0075FF",disabled:"#BBBBBB"}}}};const m=c.numberInput.sm,f=c.numberInput.md,g={sm:{height:m.height,paddingX:m.paddingX,radius:m.radius,fontSize:m.typography.fontSize,lineHeight:m.typography.lineHeight,fontWeight:m.typography.fontWeight},md:{height:f.height,paddingX:f.paddingX,radius:f.radius,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight}},y={border:c.numberInput.border,bg:c.numberInput.bg,text:c.numberInput.text},_={sm:{size:c.numberInput.stepper.sm.size},md:{size:c.numberInput.stepper.md.size},radius:c.numberInput.stepper.radius,bg:c.numberInput.stepper.bg,icon:c.numberInput.stepper.icon},x=d.field.hint,v=d.field.errorMessage,w=d.field.contents.gap,k=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.focus=s(this,"sdFocus",7),this.blur=s(this,"sdBlur",7)}get el(){return this}size="sm";min=Number.NEGATIVE_INFINITY;max=Number.POSITIVE_INFINITY;step=1;useButton=!1;useDecimal=!1;value=null;label;labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;width;rules=[];autoFocus=!1;status;hint="";errorMessage="";inputPrefix="";inputSuffix="";inputClass="";readonly=!1;inputStyle={};error=!1;focused=!1;hovered=!1;internalValue=null;displayValue="";nativeEl=void 0;formField;name=r();update;focus;blur;toNumber(t){if(null==t||""===t)return null;if("number"==typeof t)return isNaN(t)?null:t;if("string"==typeof t)return this.parseInput(t);const e=Number(t);return isNaN(e)?null:e}formatWithCommas(t){if(null==t||isNaN(t))return"";const e=t<0,s=Math.abs(t),[i,n]=s.toString().split("."),r=(+i).toLocaleString(),d=e?"-"+r:r;return void 0!==n&&""!==n?d+"."+n:String(d)}parseInput(t){if(""===t.trim())return null;const e=t.replace(/,/g,"").trim();if(!/^-?(\d+\.?\d*|\d*\.\d+)$/.test(e))return null;const s=parseFloat(e);return isNaN(s)||!this.useDecimal&&e.includes(".")?null:s}clampMinMax(t){return isNaN(t)?0:Math.min(Math.max(t,this.min),this.max)}updateDisplay(){this.displayValue=this.formatWithCommas(this.internalValue)}isIncrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue>=this.max}isDecrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue<=this.min}valueChanged(t){const e=this.toNumber(t);this.internalValue=null!==e?this.clampMinMax(e):null,this.updateDisplay()}internalValueChanged(t){this.updateDisplay(),t!==this.value&&(this.value=t,this.update?.emit(t))}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async sdGetNativeElement(){return this.nativeEl||null}componentWillLoad(){const t=this.toNumber(this.value);null!==t&&(this.internalValue=this.clampMinMax(t)),this.updateDisplay()}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{const e=t.target,s=e.value;if(""===s)return this.internalValue=null,void(this.displayValue="");const i=s.replace(/,/g,""),n=(i.match(/\./g)||[]).length;if(n>1)return void(e.value=this.displayValue);if("-"===i||"."===i||"-."===i)return void(e.value=i);if(i.endsWith(".")&&1===n){const t=i.slice(0,-1),s=this.parseInput(t);if(null!==s){const t=this.formatWithCommas(s);return void(e.value=t+".")}}const r=this.parseInput(i);if(null!==r){if(r<this.min)return void(e.value=this.displayValue);if(r>this.max)return void(e.value=this.displayValue);this.internalValue=r,this.displayValue=this.formatWithCommas(r),e.value=this.displayValue}else e.value=this.displayValue};handleFocus=t=>{this.focused=!0,this.focus?.emit(t)};handleBlur=async t=>{this.updateDisplay(),this.nativeEl&&(this.nativeEl.value=this.displayValue),this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.focused=!1,this.blur?.emit(t)};handleKeyDown=t=>{"ArrowUp"===t.key?(t.preventDefault(),this.handleIncrement()):"ArrowDown"===t.key&&(t.preventDefault(),this.handleDecrement())};handleIncrement=()=>{if(this.isIncrementDisabled())return;const t=this.internalValue??this.min??0;let e=t+this.step;e>this.max&&(e=this.max),e!==t&&(this.internalValue=e)};handleDecrement=()=>{if(this.isDecrementDisabled())return;const t=this.internalValue??this.min??0;let e=t-this.step;e<this.min&&(e=this.min),e!==t&&(this.internalValue=e)};render(){const t=g[this.size]??g.sm,e="md"===this.size?14:12;return i("sd-field",{key:"53c6935bbf98ed1eb0f28d6bed675ea369b0b2bc",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-number-input-font-size":`${t.fontSize}px`,"--sd-number-input-line-height":`${t.lineHeight}px`,"--sd-number-input-font-weight":t.fontWeight,"--sd-number-input-padding-x":`${t.paddingX}px`,"--sd-number-input-text-color":y.text.default,"--sd-number-input-placeholder-color":y.text.placeholder,"--sd-number-input-disabled-color":y.text.disabled,"--sd-number-input-stepper-size":`${_[this.size]?.size??_.sm.size}px`,"--sd-number-input-stepper-radius":`${_.radius}px`,"--sd-number-input-stepper-bg":_.bg.default,"--sd-number-input-stepper-bg-disabled":_.bg.disabled,"--sd-number-input-stepper-icon-color":_.icon.default,"--sd-number-input-stepper-icon-disabled":_.icon.disabled,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`,"--sd-system-color-field-border-default":y.border.default,"--sd-system-color-field-border-focus":y.border.focus,"--sd-system-color-field-border-danger":y.border.danger,"--sd-system-color-field-bg-default":y.bg.default,"--sd-textinput-input-text-error-message":v.color,"--sd-textinput-input-error-message-typography-font-size":`${v.typography.fontSize}px`,"--sd-textinput-input-error-message-typography-line-height":`${v.typography.lineHeight}px`,"--sd-textinput-input-text-hint":x.color,"--sd-textinput-input-hint-typography-font-size":`${x.typography.fontSize}px`,"--sd-textinput-input-hint-typography-line-height":`${x.typography.lineHeight}px`,"--sd-textinput-input-contents-gap":`${w}px`}},i("div",{key:"8f0da8b179cd3946d625ab6b525a2ffd614a5333",class:{"sd-number-input__content":!0,"sd-number-input__content--no-stepper":!this.useButton}},this.useButton&&i("button",{key:"1be42c16d5e671c567d4768f505c2c17c50f1b60",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--decrement",disabled:this.isDecrementDisabled(),onClick:this.handleDecrement,tabindex:-1},i("sd-icon",{key:"dc074328208c8da2ee43ea2cb03dbc838b7d46c9",name:"minus",size:e,color:this.isDecrementDisabled()?_.icon.disabled:_.icon.default})),this.inputPrefix&&i("span",{key:"84896d40d79e936480052ab45d618cd73550ee87",class:"sd-number-input__prefix"},this.inputPrefix),i("input",{key:"f2c8995b6c059c2a4130018b2ff0c7eabcd7abfb",name:this.name,ref:t=>this.nativeEl=t,class:`sd-number-input__native ${this.inputClass}`,type:"text",inputMode:"numeric",value:this.displayValue,placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,style:{textAlign:this.useButton?"center":"right",...this.inputStyle}}),this.inputSuffix&&i("span",{key:"d6b1ca9f5991f1b2382dd4a35ae4f20832192e3c",class:"sd-number-input__suffix"},this.inputSuffix),this.useButton&&i("button",{key:"56a59f94ca27e8ef4255cabdd5fe003c602bb8d6",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--increment",disabled:this.isIncrementDisabled(),onClick:this.handleIncrement,tabindex:-1},i("sd-icon",{key:"1b8fca91e893b5ade47ed63db4d4d54933c94e53",name:"add",size:e,color:this.isIncrementDisabled()?_.icon.disabled:_.icon.default}))))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-number-input{display:inline-flex}sd-number-input .sd-number-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;gap:var(--sd-number-input-padding-x);color:var(--sd-number-input-text-color);font-size:var(--sd-number-input-font-size);line-height:var(--sd-number-input-line-height);font-weight:var(--sd-number-input-font-weight);padding:0 var(--sd-number-input-padding-x)}sd-number-input .sd-number-input__content--no-stepper{padding:0 calc(var(--sd-number-input-padding-x) * 2)}sd-number-input .sd-number-input__content .sd-number-input__native{width:100%;height:100%;min-width:0;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;padding-block:0;padding-inline:0}sd-number-input .sd-number-input__content .sd-number-input__native[disabled]{cursor:not-allowed;color:var(--sd-number-input-disabled-color)}sd-number-input .sd-number-input__content .sd-number-input__native[readonly]{color:var(--sd-system-color-field-text-read-only)}sd-number-input .sd-number-input__content .sd-number-input__native::placeholder{color:var(--sd-number-input-placeholder-color)}sd-number-input .sd-number-input__content .sd-number-input__prefix,sd-number-input .sd-number-input__content .sd-number-input__suffix{flex-shrink:0;white-space:nowrap;color:var(--sd-number-input-placeholder-color);font-size:inherit;line-height:inherit}sd-number-input .sd-number-input__content .sd-number-input__stepper{flex-shrink:0;width:var(--sd-number-input-stepper-size);height:var(--sd-number-input-stepper-size);border:none;border-radius:var(--sd-number-input-stepper-radius);background-color:var(--sd-number-input-stepper-bg);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;margin:0;transition:background-color 0.15s ease}sd-number-input .sd-number-input__content .sd-number-input__stepper:hover:not(:disabled){filter:brightness(0.95)}sd-number-input .sd-number-input__content .sd-number-input__stepper:disabled{background-color:var(--sd-number-input-stepper-bg-disabled);cursor:not-allowed}"}},[512,"sd-number-input",{size:[1],min:[2],max:[2],step:[2],useButton:[4,"use-button"],useDecimal:[4,"use-decimal"],value:[1032],label:[1],labelWidth:[8,"label-width"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],placeholder:[1],disabled:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],status:[1],hint:[1],errorMessage:[1,"error-message"],inputPrefix:[1,"input-prefix"],inputSuffix:[1,"input-suffix"],inputClass:[1,"input-class"],readonly:[4],inputStyle:[16],error:[1028],focused:[1028],hovered:[1028],name:[1],internalValue:[32],displayValue:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64],sdGetNativeElement:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function z(){"undefined"!=typeof customElements&&["sd-number-input","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-number-input":customElements.get(n(t))||customElements.define(n(t),k);break;case"sd-button":customElements.get(n(t))||u();break;case"sd-field":customElements.get(n(t))||a();break;case"sd-floating-portal":customElements.get(n(t))||o();break;case"sd-ghost-button":customElements.get(n(t))||l();break;case"sd-icon":customElements.get(n(t))||p();break;case"sd-tag":customElements.get(n(t))||h();break;case"sd-tooltip":customElements.get(n(t))||b()}}))}export{k as S,z as d}
|
|
1
|
+
import{p as t,H as e,c as s,h as i,t as n}from"./p-Bg9XySrz.js";import{n as r}from"./p-CCwNgVmC.js";import{f as d}from"./p-BOJJ_sQS.js";import{d as u}from"./p-DDR0VcRU.js";import{d as a}from"./p-BX5uKVOt.js";import{d as o}from"./p-BLNc_TL-.js";import{d as l}from"./p-DTFXzlvq.js";import{d as p}from"./p-ClKABgST.js";import{d as h}from"./p-BMIgVp9-.js";import{d as c}from"./p-Cl5io5TH.js";var b={numberInput:{sm:{height:"28",paddingX:"6",radius:"4",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"}},md:{height:"36",paddingX:"8",radius:"6",typography:{fontWeight:"400",fontSize:"14",lineHeight:"24"}},border:{default:"#AAAAAA",focus:"#0075FF",danger:"#FB4444"},bg:{default:"#FFFFFF"},text:{default:"#222222",placeholder:"#AAAAAA",disabled:"#888888"},stepper:{sm:{size:"20"},md:{size:"24"},radius:"4",bg:{default:"#EFF6FF",disabled:"#EEEEEE"},icon:{default:"#0075FF",disabled:"#BBBBBB"}}}};const m=b.numberInput.sm,f=b.numberInput.md,g={sm:{height:m.height,paddingX:m.paddingX,radius:m.radius,fontSize:m.typography.fontSize,lineHeight:m.typography.lineHeight,fontWeight:m.typography.fontWeight},md:{height:f.height,paddingX:f.paddingX,radius:f.radius,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight}},y={border:b.numberInput.border,bg:b.numberInput.bg,text:b.numberInput.text},_={sm:{size:b.numberInput.stepper.sm.size},md:{size:b.numberInput.stepper.md.size},radius:b.numberInput.stepper.radius,bg:b.numberInput.stepper.bg,icon:b.numberInput.stepper.icon},x=d.field.hint,v=d.field.errorMessage,w=d.field.contents.gap,z=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.focus=s(this,"sdFocus",7),this.blur=s(this,"sdBlur",7)}get el(){return this}size="sm";min=Number.NEGATIVE_INFINITY;max=Number.POSITIVE_INFINITY;step=1;useButton=!1;useDecimal=!1;value=null;label;labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;width;rules=[];autoFocus=!1;status;hint="";errorMessage="";inputPrefix="";inputSuffix="";inputClass="";readonly=!1;inputStyle={};error=!1;focused=!1;hovered=!1;internalValue=null;displayValue="";nativeEl=void 0;formField;name=r();update;focus;blur;toNumber(t){if(null==t||""===t)return null;if("number"==typeof t)return isNaN(t)?null:t;if("string"==typeof t)return this.parseInput(t);const e=Number(t);return isNaN(e)?null:e}formatWithCommas(t){if(null==t||isNaN(t))return"";const e=t<0,s=Math.abs(t),[i,n]=s.toString().split("."),r=(+i).toLocaleString(),d=e?"-"+r:r;return void 0!==n&&""!==n?d+"."+n:String(d)}parseInput(t){if(""===t.trim())return null;const e=t.replace(/,/g,"").trim();if(!/^-?(\d+\.?\d*|\d*\.\d+)$/.test(e))return null;const s=parseFloat(e);return isNaN(s)||!this.useDecimal&&e.includes(".")?null:s}clampMinMax(t){return isNaN(t)?0:Math.min(Math.max(t,this.min),this.max)}updateDisplay(){this.displayValue=this.formatWithCommas(this.internalValue)}isIncrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue>=this.max}isDecrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue<=this.min}valueChanged(t){const e=this.toNumber(t);this.internalValue=null!==e?this.clampMinMax(e):null,this.updateDisplay()}internalValueChanged(t){this.updateDisplay(),t!==this.value&&(this.value=t,this.update?.emit(t))}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async sdGetNativeElement(){return this.nativeEl||null}componentWillLoad(){const t=this.toNumber(this.value);null!==t&&(this.internalValue=this.clampMinMax(t)),this.updateDisplay()}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{const e=t.target,s=e.value;if(""===s)return this.internalValue=null,void(this.displayValue="");const i=s.replace(/,/g,""),n=(i.match(/\./g)||[]).length;if(n>1)return void(e.value=this.displayValue);if("-"===i||"."===i||"-."===i)return void(e.value=i);if(i.endsWith(".")&&1===n){const t=i.slice(0,-1),s=this.parseInput(t);if(null!==s){const t=this.formatWithCommas(s);return void(e.value=t+".")}}const r=this.parseInput(i);if(null!==r){if(r<this.min)return void(e.value=this.displayValue);if(r>this.max)return void(e.value=this.displayValue);this.internalValue=r,this.displayValue=this.formatWithCommas(r),e.value=this.displayValue}else e.value=this.displayValue};handleFocus=t=>{this.focused=!0,this.focus?.emit(t)};handleBlur=async t=>{this.updateDisplay(),this.nativeEl&&(this.nativeEl.value=this.displayValue),this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.focused=!1,this.blur?.emit(t)};handleKeyDown=t=>{"ArrowUp"===t.key?(t.preventDefault(),this.handleIncrement()):"ArrowDown"===t.key&&(t.preventDefault(),this.handleDecrement())};handleIncrement=()=>{if(this.isIncrementDisabled())return;const t=this.internalValue??this.min??0;let e=t+this.step;e>this.max&&(e=this.max),e!==t&&(this.internalValue=e)};handleDecrement=()=>{if(this.isDecrementDisabled())return;const t=this.internalValue??this.min??0;let e=t-this.step;e<this.min&&(e=this.min),e!==t&&(this.internalValue=e)};render(){const t=g[this.size]??g.sm,e="md"===this.size?14:12;return i("sd-field",{key:"ad212dcbaf8e19cac070e6bdfa292ca614480fbc",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-number-input-font-size":`${t.fontSize}px`,"--sd-number-input-line-height":`${t.lineHeight}px`,"--sd-number-input-font-weight":t.fontWeight,"--sd-number-input-padding-x":`${t.paddingX}px`,"--sd-number-input-text-color":y.text.default,"--sd-number-input-placeholder-color":y.text.placeholder,"--sd-number-input-disabled-color":y.text.disabled,"--sd-number-input-stepper-size":`${_[this.size]?.size??_.sm.size}px`,"--sd-number-input-stepper-radius":`${_.radius}px`,"--sd-number-input-stepper-bg":_.bg.default,"--sd-number-input-stepper-bg-disabled":_.bg.disabled,"--sd-number-input-stepper-icon-color":_.icon.default,"--sd-number-input-stepper-icon-disabled":_.icon.disabled,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`,"--sd-system-color-field-border-default":y.border.default,"--sd-system-color-field-border-focus":y.border.focus,"--sd-system-color-field-border-danger":y.border.danger,"--sd-system-color-field-bg-default":y.bg.default,"--sd-textinput-input-text-error-message":v.color,"--sd-textinput-input-error-message-typography-font-size":`${v.typography.fontSize}px`,"--sd-textinput-input-error-message-typography-line-height":`${v.typography.lineHeight}px`,"--sd-textinput-input-text-hint":x.color,"--sd-textinput-input-hint-typography-font-size":`${x.typography.fontSize}px`,"--sd-textinput-input-hint-typography-line-height":`${x.typography.lineHeight}px`,"--sd-textinput-input-contents-gap":`${w}px`}},i("div",{key:"b9c403df166e2f05f815ebf3851b6517b8afbd2a",class:{"sd-number-input__content":!0,"sd-number-input__content--no-stepper":!this.useButton}},this.useButton&&i("button",{key:"206f45b19bf8dd56b65ff55fb65d760e36d80ba7",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--decrement",disabled:this.isDecrementDisabled(),onClick:this.handleDecrement,tabindex:-1},i("sd-icon",{key:"d39cadc9a83cf7a0170144b8734a90f71d7aa9d1",name:"minus",size:e,color:this.isDecrementDisabled()?_.icon.disabled:_.icon.default})),this.inputPrefix&&i("span",{key:"0c97309540467d56ee3415001df7a027ba581a3d",class:"sd-number-input__prefix"},this.inputPrefix),i("input",{key:"9462f0c7ac028c038894ad184c7cf052e366e48c",name:this.name,ref:t=>this.nativeEl=t,class:`sd-number-input__native ${this.inputClass}`,type:"text",inputMode:"numeric",value:this.displayValue,placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,style:{textAlign:this.useButton?"center":"right",...this.inputStyle}}),this.inputSuffix&&i("span",{key:"fdd4f4e680fe5de55cb68c848615ec6b00f00430",class:"sd-number-input__suffix"},this.inputSuffix),this.useButton&&i("button",{key:"8cdfcc46a010fb0f503b48c34290fd096403524a",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--increment",disabled:this.isIncrementDisabled(),onClick:this.handleIncrement,tabindex:-1},i("sd-icon",{key:"ec8826370cd9d8c6054ca6ab216de6baa62d90db",name:"add",size:e,color:this.isIncrementDisabled()?_.icon.disabled:_.icon.default}))))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-number-input{display:inline-flex}sd-number-input .sd-number-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;gap:var(--sd-number-input-padding-x);color:var(--sd-number-input-text-color);font-size:var(--sd-number-input-font-size);line-height:var(--sd-number-input-line-height);font-weight:var(--sd-number-input-font-weight);padding:0 var(--sd-number-input-padding-x)}sd-number-input .sd-number-input__content--no-stepper{padding:0 calc(var(--sd-number-input-padding-x) * 2)}sd-number-input .sd-number-input__content .sd-number-input__native{width:100%;height:100%;min-width:0;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;padding-block:0;padding-inline:0}sd-number-input .sd-number-input__content .sd-number-input__native[disabled]{cursor:not-allowed;color:var(--sd-number-input-disabled-color)}sd-number-input .sd-number-input__content .sd-number-input__native[readonly]{color:var(--sd-system-color-field-text-read-only)}sd-number-input .sd-number-input__content .sd-number-input__native::placeholder{color:var(--sd-number-input-placeholder-color)}sd-number-input .sd-number-input__content .sd-number-input__prefix,sd-number-input .sd-number-input__content .sd-number-input__suffix{flex-shrink:0;white-space:nowrap;color:var(--sd-number-input-placeholder-color);font-size:inherit;line-height:inherit}sd-number-input .sd-number-input__content .sd-number-input__stepper{flex-shrink:0;width:var(--sd-number-input-stepper-size);height:var(--sd-number-input-stepper-size);border:none;border-radius:var(--sd-number-input-stepper-radius);background-color:var(--sd-number-input-stepper-bg);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;margin:0;transition:background-color 0.15s ease}sd-number-input .sd-number-input__content .sd-number-input__stepper:hover:not(:disabled){filter:brightness(0.95)}sd-number-input .sd-number-input__content .sd-number-input__stepper:disabled{background-color:var(--sd-number-input-stepper-bg-disabled);cursor:not-allowed}"}},[512,"sd-number-input",{size:[1],min:[2],max:[2],step:[2],useButton:[4,"use-button"],useDecimal:[4,"use-decimal"],value:[1032],label:[1],labelWidth:[8,"label-width"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],placeholder:[1],disabled:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],status:[1],hint:[1],errorMessage:[1,"error-message"],inputPrefix:[1,"input-prefix"],inputSuffix:[1,"input-suffix"],inputClass:[1,"input-class"],readonly:[4],inputStyle:[16],error:[1028],focused:[1028],hovered:[1028],name:[1],internalValue:[32],displayValue:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64],sdGetNativeElement:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function k(){"undefined"!=typeof customElements&&["sd-number-input","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-number-input":customElements.get(n(t))||customElements.define(n(t),z);break;case"sd-button":customElements.get(n(t))||u();break;case"sd-field":customElements.get(n(t))||a();break;case"sd-floating-portal":customElements.get(n(t))||o();break;case"sd-ghost-button":customElements.get(n(t))||l();break;case"sd-icon":customElements.get(n(t))||p();break;case"sd-tag":customElements.get(n(t))||h();break;case"sd-tooltip":customElements.get(n(t))||c()}}))}export{z as S,k as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as i,c as s,h as t,t as l}from"./p-Bg9XySrz.js";import{n as r}from"./p-CCwNgVmC.js";import{d as o}from"./p-
|
|
1
|
+
import{p as e,H as i,c as s,h as t,t as l}from"./p-Bg9XySrz.js";import{n as r}from"./p-CCwNgVmC.js";import{d as o}from"./p-DDR0VcRU.js";import{d as a}from"./p-Bzo51vnP.js";import{d}from"./p-BX5uKVOt.js";import{d as n}from"./p-BLNc_TL-.js";import{d as c}from"./p-DTFXzlvq.js";import{d as h}from"./p-ClKABgST.js";import{d as p}from"./p-BMIgVp9-.js";import{d as f}from"./p-Cl5io5TH.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 m={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},k={text:u.text,icon:{default:"#888888",disabled:u.icon.disabled}},g=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?k.icon.disabled:k.icon.default}render(){const e=this.hasFiles(),i=this.getDisplayText(),s={"--sd-file-picker-font-size":`${m.fontSize}px`,"--sd-file-picker-line-height":`${m.lineHeight}px`,"--sd-file-picker-font-weight":m.fontWeight,"--sd-file-picker-padding-x":`${m.paddingX}px`,"--sd-file-picker-gap":`${m.gap}px`,"--sd-file-picker-text-color":k.text.default,"--sd-file-picker-placeholder-color":k.text.placeholder,"--sd-file-picker-disabled-color":k.text.disabled,"--sd-system-size-field-sm-height":`${m.height}px`,"--sd-system-radius-field-sm":`${m.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(m.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 x(){"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),g);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{g as S,x as d}
|