@sellmate/design-system 1.18.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-badge.cjs.entry.js +1 -1
- package/dist/cjs/sd-barcode-input.cjs.entry.js +1 -1
- package/dist/cjs/sd-calendar_2.cjs.entry.js +5 -5
- package/dist/cjs/sd-callout.cjs.entry.js +1 -1
- package/dist/cjs/sd-card.cjs.entry.js +1 -1
- package/dist/cjs/sd-chip-input.cjs.entry.js +29 -2
- package/dist/cjs/sd-chip.cjs.entry.js +1 -1
- package/dist/cjs/sd-circle-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +3 -3
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +9 -9
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +1 -1
- package/dist/cjs/sd-divider.cjs.entry.js +1 -1
- package/dist/cjs/sd-field_3.cjs.entry.js +8 -8
- package/dist/cjs/{sd-ghost-button_2.cjs.entry.js → sd-ghost-button_3.cjs.entry.js} +264 -10
- package/dist/cjs/sd-key-value-table.cjs.entry.js +12 -6
- package/dist/cjs/sd-linear-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-loading-container.cjs.entry.js +2 -2
- package/dist/cjs/sd-pagination_4.cjs.entry.js +8 -8
- package/dist/cjs/sd-popup.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +6 -6
- package/dist/cjs/sd-select_3.cjs.entry.js +8 -8
- package/dist/cjs/sd-switch.cjs.entry.js +1 -1
- package/dist/cjs/sd-table.cjs.entry.js +10 -9
- package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
- package/dist/cjs/sd-td.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast.cjs.entry.js +2 -2
- package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
- package/dist/collection/components/sd-badge/sd-badge.js +1 -1
- package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +1 -1
- package/dist/collection/components/sd-calendar/sd-calendar.js +3 -3
- package/dist/collection/components/sd-callout/sd-callout.js +1 -1
- package/dist/collection/components/sd-card/sd-card.js +1 -1
- package/dist/collection/components/sd-chip/sd-chip.js +1 -1
- package/dist/collection/components/sd-chip-input/sd-chip-input.js +48 -2
- 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-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.css +2 -17
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +21 -12
- 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 +1 -0
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.css +10 -3
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +17 -12
- package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
- package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
- package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
- package/dist/collection/components/sd-number-input/sd-number-input.js +4 -4
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-popup/sd-popup.js +1 -1
- package/dist/collection/components/sd-portal/sd-portal.js +34 -3
- package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +2 -2
- package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +4 -4
- package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +2 -2
- package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +2 -2
- package/dist/collection/components/sd-select/sd-select.js +4 -4
- package/dist/collection/components/sd-switch/sd-switch.js +1 -1
- package/dist/collection/components/sd-table/sd-table.css +4 -1
- package/dist/collection/components/sd-table/sd-table.js +15 -14
- 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 +2 -2
- package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
- package/dist/collection/components/sd-toast/sd-toast.js +2 -2
- package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
- package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
- package/dist/components/{p-CH6cVc2a.js → p-5GcM22aW.js} +1 -1
- package/dist/components/p-B7PHGGFH.js +1 -0
- package/dist/components/{p-DMS9mQsg.js → p-BHW1fnDC.js} +1 -1
- package/dist/components/{p-B3SKaQId.js → p-BZjIn1hr.js} +1 -1
- package/dist/components/{p-CzCu_NDl.js → p-Bd-fDbVE.js} +1 -1
- package/dist/components/p-BeYMZ1fR.js +1 -0
- package/dist/components/{p-79DExV92.js → p-BuFzlA0M.js} +1 -1
- package/dist/components/{p-CQWZv8vY.js → p-BzUU-npj.js} +1 -1
- package/dist/components/p-CEhI4kUA.js +1 -0
- package/dist/components/{p-4HPAPKne.js → p-CQozoo2-.js} +1 -1
- package/dist/components/p-Cfko62rU.js +1 -0
- package/dist/components/{p-hzCGj0On.js → p-ChncPmp-.js} +1 -1
- package/dist/components/p-CiEAVQT4.js +1 -0
- package/dist/components/p-CjYYBlrZ.js +1 -0
- package/dist/components/p-CvSqieCH.js +1 -0
- package/dist/components/p-DAJIg-VD.js +1 -0
- package/dist/components/p-DRgPF0Fp.js +1 -0
- package/dist/components/p-DYOyb7rq.js +1 -0
- package/dist/components/{p-BD8OoYud.js → p-DaMzYzXI.js} +1 -1
- package/dist/components/{p-BMIgVp9-.js → p-De7UsPPk.js} +1 -1
- package/dist/components/p-Df1g_kVH.js +1 -0
- package/dist/components/p-DpfXh55-.js +1 -0
- package/dist/components/{p-B_5uwji5.js → p-E5buAge1.js} +1 -1
- package/dist/components/{p-BLNc_TL-.js → p-P2jWtk8J.js} +1 -1
- package/dist/components/{p-C_r3z9VA.js → p-lmVlfugh.js} +1 -1
- package/dist/components/p-nruUh8p1.js +1 -0
- package/dist/components/p-pSthmtsz.js +1 -0
- package/dist/components/p-vTnMooAF.js +1 -0
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-badge.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-callout.js +1 -1
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-chip-input.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-input.js +1 -1
- package/dist/components/sd-key-value-table.js +1 -1
- package/dist/components/sd-linear-progress.js +1 -1
- package/dist/components/sd-loading-container.js +1 -1
- package/dist/components/sd-loading-modal.js +1 -1
- package/dist/components/sd-modal-container.js +1 -1
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-popup.js +1 -1
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-select-list-item-search.js +1 -1
- package/dist/components/sd-select-list-item.js +1 -1
- package/dist/components/sd-select-listbox.js +1 -1
- package/dist/components/sd-select-trigger.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-switch.js +1 -1
- package/dist/components/sd-table.js +1 -1
- package/dist/components/sd-tabs.js +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-tbody.js +1 -1
- package/dist/components/sd-td.js +1 -1
- package/dist/components/sd-textarea.js +1 -1
- package/dist/components/sd-thead.js +1 -1
- package/dist/components/sd-toast-container.js +1 -1
- package/dist/components/sd-toast.js +1 -1
- package/dist/components/sd-toggle.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-80bde621.entry.js → p-08343698.entry.js} +1 -1
- package/dist/design-system/{p-bbbc4b27.entry.js → p-2151e081.entry.js} +1 -1
- package/dist/design-system/p-316b8a08.entry.js +1 -0
- package/dist/design-system/{p-f5190934.entry.js → p-4acfc5f9.entry.js} +1 -1
- package/dist/design-system/{p-22484d65.entry.js → p-5039241c.entry.js} +1 -1
- package/dist/design-system/p-52f551a1.entry.js +1 -0
- package/dist/design-system/{p-d726d8e7.entry.js → p-54853a2b.entry.js} +1 -1
- package/dist/design-system/p-5eaa12af.entry.js +1 -0
- package/dist/design-system/{p-827f067b.entry.js → p-646a7830.entry.js} +1 -1
- package/dist/design-system/p-717eba5f.entry.js +1 -0
- package/dist/design-system/{p-8f90620b.entry.js → p-9289eb14.entry.js} +1 -1
- package/dist/design-system/{p-b4b20a86.entry.js → p-98e0b332.entry.js} +1 -1
- package/dist/design-system/{p-9124a1af.entry.js → p-9c38ee79.entry.js} +1 -1
- package/dist/design-system/{p-c318b762.entry.js → p-a4331364.entry.js} +1 -1
- package/dist/design-system/{p-683c3b91.entry.js → p-a5a586da.entry.js} +1 -1
- package/dist/design-system/{p-1602a5fa.entry.js → p-aa1c6202.entry.js} +1 -1
- package/dist/design-system/{p-8a84a4fe.entry.js → p-ae344950.entry.js} +1 -1
- package/dist/design-system/p-b291baab.entry.js +1 -0
- package/dist/design-system/{p-e93dda25.entry.js → p-b63b8df9.entry.js} +1 -1
- package/dist/design-system/{p-3caf2c5b.entry.js → p-bdb7492c.entry.js} +1 -1
- package/dist/design-system/{p-cc5f5bff.entry.js → p-c47198fc.entry.js} +1 -1
- package/dist/design-system/p-c995e6c3.entry.js +1 -0
- package/dist/design-system/{p-9095aab6.entry.js → p-cb80327c.entry.js} +1 -1
- package/dist/design-system/{p-7ed5aed5.entry.js → p-ccf1a3fc.entry.js} +1 -1
- package/dist/design-system/{p-4e1d76b8.entry.js → p-df7c721d.entry.js} +1 -1
- package/dist/design-system/p-e3990243.entry.js +1 -0
- package/dist/design-system/{p-81aa23d1.entry.js → p-e9d1dbb5.entry.js} +1 -1
- package/dist/design-system/p-faf7b64c.entry.js +1 -0
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-badge.entry.js +1 -1
- package/dist/esm/sd-barcode-input.entry.js +1 -1
- package/dist/esm/sd-calendar_2.entry.js +5 -5
- package/dist/esm/sd-callout.entry.js +1 -1
- package/dist/esm/sd-card.entry.js +1 -1
- package/dist/esm/sd-chip-input.entry.js +29 -2
- package/dist/esm/sd-chip.entry.js +1 -1
- package/dist/esm/sd-circle-progress.entry.js +1 -1
- package/dist/esm/sd-confirm-modal_2.entry.js +3 -3
- package/dist/esm/sd-date-picker_7.entry.js +9 -9
- package/dist/esm/sd-date-range-picker-calendar.entry.js +1 -1
- package/dist/esm/sd-divider.entry.js +1 -1
- package/dist/esm/sd-field_3.entry.js +8 -8
- package/dist/esm/{sd-ghost-button_2.entry.js → sd-ghost-button_3.entry.js} +265 -12
- package/dist/esm/sd-key-value-table.entry.js +12 -6
- package/dist/esm/sd-linear-progress.entry.js +1 -1
- package/dist/esm/sd-loading-container.entry.js +2 -2
- package/dist/esm/sd-pagination_4.entry.js +8 -8
- package/dist/esm/sd-popup.entry.js +1 -1
- package/dist/esm/sd-select-list-item_2.entry.js +6 -6
- package/dist/esm/sd-select_3.entry.js +8 -8
- package/dist/esm/sd-switch.entry.js +1 -1
- package/dist/esm/sd-table.entry.js +10 -9
- package/dist/esm/sd-tabs.entry.js +1 -1
- package/dist/esm/sd-td.entry.js +1 -1
- package/dist/esm/sd-toast-container.entry.js +1 -1
- package/dist/esm/sd-toast.entry.js +2 -2
- package/dist/esm/sd-toggle.entry.js +1 -1
- package/dist/types/components/sd-chip-input/sd-chip-input.d.ts +4 -0
- package/dist/types/components/sd-ghost-button/sd-ghost-button.d.ts +7 -1
- package/dist/types/components/sd-key-value-table/sd-key-value-table.config.d.ts +1 -0
- package/dist/types/components/sd-key-value-table/sd-key-value-table.d.ts +5 -3
- package/dist/types/components/sd-portal/sd-portal.d.ts +1 -0
- package/dist/types/components/sd-table/sd-table.d.ts +1 -1
- package/dist/types/components.d.ts +35 -29
- package/hydrate/index.js +153 -101
- package/hydrate/index.mjs +153 -101
- package/package.json +3 -3
- package/dist/cjs/sd-portal.cjs.entry.js +0 -243
- package/dist/components/p-AI4YlQmL.js +0 -1
- package/dist/components/p-B-4ulKJj.js +0 -1
- package/dist/components/p-BX5uKVOt.js +0 -1
- package/dist/components/p-BYTrIk62.js +0 -1
- package/dist/components/p-Bzo51vnP.js +0 -1
- package/dist/components/p-C0tkFuhj.js +0 -1
- package/dist/components/p-C3wv8gVC.js +0 -1
- package/dist/components/p-CXRFEcE_.js +0 -1
- package/dist/components/p-Cl5io5TH.js +0 -1
- package/dist/components/p-DAOeioSV.js +0 -1
- package/dist/components/p-DTFXzlvq.js +0 -1
- package/dist/components/p-Dr5Q2ZKB.js +0 -1
- package/dist/components/p-DyVh4pNL.js +0 -1
- package/dist/components/p-Ng3JMPxb.js +0 -1
- package/dist/components/p-qJeUUOyB.js +0 -1
- package/dist/design-system/p-0a772d43.entry.js +0 -1
- package/dist/design-system/p-12306783.entry.js +0 -1
- package/dist/design-system/p-43529bba.entry.js +0 -1
- package/dist/design-system/p-46da89f2.entry.js +0 -1
- package/dist/design-system/p-8a025f91.entry.js +0 -1
- package/dist/design-system/p-a263af1b.entry.js +0 -1
- package/dist/design-system/p-a532d998.entry.js +0 -1
- package/dist/design-system/p-bcd7d358.entry.js +0 -1
- package/dist/design-system/p-ff939fbd.entry.js +0 -1
- package/dist/esm/sd-portal.entry.js +0 -241
|
@@ -106,9 +106,9 @@ const SdDatePicker = class {
|
|
|
106
106
|
'--sd-system-color-field-border-focus': sdDatePicker_config.DATEPICKER_COLORS.border.focus,
|
|
107
107
|
'--sd-system-color-field-bg-default': sdDatePicker_config.DATEPICKER_COLORS.bg.default,
|
|
108
108
|
};
|
|
109
|
-
return (index.h("sd-field", { key: '
|
|
109
|
+
return (index.h("sd-field", { key: 'cbd8e081f56fb2fb53854cd0937fe24e5d6d9b97', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, index.h("div", { key: 'e7798ec50f7d22628a17a953ac87882160248de4', class: "sd-date-picker", ref: el => {
|
|
110
110
|
this.triggerRef = el;
|
|
111
|
-
} }, index.h("sd-date-picker-trigger", { key: '
|
|
111
|
+
} }, index.h("sd-date-picker-trigger", { key: 'ce203f70a001f9caa9071fb667d9bf58f57748ec', displayText: this.value ?? '', placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (index.h("sd-portal", { key: 'c5f875bc826fa1f899205cfefe2db57da3dd34b4', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, index.h("sd-calendar", { key: '8626faebafac8201979e02c444279124c3261b67', elevated: true, value: this.value, selectable: this.selectable, onSdUpdate: this.handleSelect, onSdViewChange: this.handleViewChange })))));
|
|
112
112
|
}
|
|
113
113
|
static get watchers() { return {
|
|
114
114
|
"isOpen": [{
|
|
@@ -651,12 +651,12 @@ const SdInput = class {
|
|
|
651
651
|
'--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
|
|
652
652
|
'--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
|
|
653
653
|
};
|
|
654
|
-
return (index.h("sd-field", { key: '
|
|
654
|
+
return (index.h("sd-field", { key: 'bc95e469a741a7130b07b5e2ecbc3ce9a7d1799d', 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: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, index.h("label", { key: '63661c1e1202e729bbcaedcf83d8b034a7bf2e0b', class: "sd-input__content" }, index.h("slot", { key: '6c17e53e77c0e6751deb664b67b7daa471bd08cc', name: "prefix" }), index.h("input", { key: '1572e700b110b8d98b62ef30e72a17974288473c', name: this.name, ref: el => (this.nativeEl = el), class: `sd-input__native ${this.inputClass}`, type: this.type === 'password' && this.passwordVisible ? 'text' : (this.type ?? 'text'), value: this.internalValue || '', placeholder: this.placeholder ?? '입력해 주세요.', disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, autocomplete: this.autocomplete || undefined, maxlength: this.maxlength, minlength: this.minlength, inputmode: this.inputmode, enterkeyhint: this.enterkeyhint, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.inputStyle }), index.h("slot", { key: '728316a43a96d7859849ef522c06a405f7d668b5', name: "suffix" }), this.clearable && this.internalValue && !this.disabled && !this.readonly && (index.h("sd-ghost-button", { key: 'ec89154a98d603db8eccc5db786d3330b33713ab', icon: "close", ariaLabel: "clear", size: "xxs", disabled: this.disabled, class: "sd-input__clear-icon", onClick: async () => {
|
|
655
655
|
if (this.disabled || this.readonly)
|
|
656
656
|
return;
|
|
657
657
|
this.internalValue = '';
|
|
658
658
|
await this.formField?.sdValidate();
|
|
659
|
-
} })), this.type === 'password' && (index.h("sd-ghost-button", { key: '
|
|
659
|
+
} })), this.type === 'password' && (index.h("sd-ghost-button", { key: '8dd3e79ffa2bf731850e94b9a0752aeebf13aff6', icon: this.passwordVisible ? 'visibilityOn' : 'visibilityOff', ariaLabel: "visibility", size: "xxs", disabled: this.disabled || this.readonly, class: "sd-input__password-icon", onClick: () => {
|
|
660
660
|
if (this.disabled || this.readonly)
|
|
661
661
|
return;
|
|
662
662
|
this.passwordVisible = !this.passwordVisible;
|
|
@@ -1042,15 +1042,15 @@ const SdNumberInput = class {
|
|
|
1042
1042
|
'--sd-textinput-input-hint-typography-line-height': `${NUMBER_INPUT_HINT.typography.lineHeight}px`,
|
|
1043
1043
|
'--sd-textinput-input-contents-gap': `${NUMBER_INPUT_CONTENTS_GAP}px`,
|
|
1044
1044
|
};
|
|
1045
|
-
return (index.h("sd-field", { key: '
|
|
1045
|
+
return (index.h("sd-field", { key: 'f322e07238237b4b609fbc3cd819cf2856eb3e63', 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: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, index.h("div", { key: '8e4e7561a8b42b4a8b2e1f9559f7409d17f32c14', class: {
|
|
1046
1046
|
'sd-number-input__content': true,
|
|
1047
1047
|
'sd-number-input__content--no-stepper': !this.useButton,
|
|
1048
|
-
} }, this.useButton && (index.h("button", { key: '
|
|
1048
|
+
} }, this.useButton && (index.h("button", { key: '642a5ce069d0af6347ecdbbb32c67ce2d8967cf4', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--decrement", disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, index.h("sd-icon", { key: 'd321af0b38dc8771ca58b52d079fe440551b4efc', name: "minus", size: iconSize, color: this.isDecrementDisabled()
|
|
1049
1049
|
? NUMBER_INPUT_STEPPER.icon.disabled
|
|
1050
|
-
: NUMBER_INPUT_STEPPER.icon.default }))), this.inputPrefix && index.h("span", { key: '
|
|
1050
|
+
: NUMBER_INPUT_STEPPER.icon.default }))), this.inputPrefix && index.h("span", { key: '5b84c95d1e4e8e151c9c71b8ff6513185e97dbf4', class: "sd-number-input__prefix" }, this.inputPrefix), index.h("input", { key: '0580882231474e80471085e7d91748943caf2f73', name: this.name, ref: el => (this.nativeEl = el), 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: {
|
|
1051
1051
|
textAlign: this.useButton ? 'center' : 'right',
|
|
1052
1052
|
...this.inputStyle,
|
|
1053
|
-
} }), this.inputSuffix && index.h("span", { key: '
|
|
1053
|
+
} }), this.inputSuffix && index.h("span", { key: 'd24110a5913272b0379f36823507c3c6ea4102be', class: "sd-number-input__suffix" }, this.inputSuffix), this.useButton && (index.h("button", { key: '2bcf9b96f875322b269630f14bbec6c64d55f042', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--increment", disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, index.h("sd-icon", { key: '809fb4ae2f33c4812bf329abc7dc1a9f78e9dd81', name: "add", size: iconSize, color: this.isIncrementDisabled()
|
|
1054
1054
|
? NUMBER_INPUT_STEPPER.icon.disabled
|
|
1055
1055
|
: NUMBER_INPUT_STEPPER.icon.default }))))));
|
|
1056
1056
|
}
|
|
@@ -1232,7 +1232,7 @@ const SdTextarea = class {
|
|
|
1232
1232
|
'--sd-system-size-field-sm-height': 'auto',
|
|
1233
1233
|
'--sd-system-radius-field-sm': `${TEXTAREA_TOKENS.radius}px`,
|
|
1234
1234
|
};
|
|
1235
|
-
return (index.h("sd-field", { key: '
|
|
1235
|
+
return (index.h("sd-field", { key: '696b0aa26405687dad43ce934adbe7ec19e9b893', 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 }, index.h("div", { key: '69a996d757345e25ef94238f8fffa521e7b7252e', class: "sd-textarea__content" }, index.h("textarea", { key: 'dbfcc43cbbf3bdde147f6a784df1c122bcb70b0e', 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 }))));
|
|
1236
1236
|
}
|
|
1237
1237
|
static get watchers() { return {
|
|
1238
1238
|
"value": [{
|
|
@@ -267,7 +267,7 @@ const SdDateRangePickerCalendar = class {
|
|
|
267
267
|
'--range-panel-gap': `${RANGE_LAYOUT.panelGap}px`,
|
|
268
268
|
'--range-divider': RANGE_LAYOUT.divider,
|
|
269
269
|
};
|
|
270
|
-
return (index.h(index.Fragment, { key: '
|
|
270
|
+
return (index.h(index.Fragment, { key: 'd46df258093b5c57d1b958efb7e52cabd4cb1eb4' }, index.h("div", { key: '04fc01524115d9b57462ad1eaf9281fe1c63dd84', class: "sd-date-range-picker-calendar", style: cssVars }, this.renderYearNav(), index.h("div", { key: '91428a1dd98b7a9c534b28a9cd683f35935dfee2', class: "sd-date-range-picker-calendar__panels" }, this.renderPanel(this.currentYear, this.currentMonth, true), index.h("span", { key: '26d4f7e3391c50340e0f45f018b02d11ad7bd23b', class: "sd-date-range-picker-calendar__divider", "aria-hidden": "true" }), this.renderPanel(this.rightYear, this.rightMonth, false)))));
|
|
271
271
|
}
|
|
272
272
|
static get watchers() { return {
|
|
273
273
|
"value": [{
|
|
@@ -19,7 +19,7 @@ const SdDivider = class {
|
|
|
19
19
|
const hostStyle = {
|
|
20
20
|
'--sd-divider-color': DIVIDER_COLORS.default,
|
|
21
21
|
};
|
|
22
|
-
return (index.h(index.Host, { key: '
|
|
22
|
+
return (index.h(index.Host, { key: 'd7adb8181071f7e6b1c2238c5512c332a0c9bafb', style: hostStyle }, index.h("hr", { key: '8d376fce5cced248a573ffb189931ce613ef79b7', "aria-orientation": this.vertical ? 'vertical' : 'horizontal' })));
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
SdDivider.style = sdDividerCss();
|
|
@@ -216,21 +216,21 @@ const SdField = class {
|
|
|
216
216
|
: {}),
|
|
217
217
|
}
|
|
218
218
|
: {};
|
|
219
|
-
return (index.h("div", { key: '
|
|
219
|
+
return (index.h("div", { key: '76a1a2f41cafb2a665415f4e6e7bd9561aacb57f', class: {
|
|
220
220
|
'sd-field': true,
|
|
221
221
|
'sd-field--has-label': this.label !== '',
|
|
222
222
|
'sd-field--has-addon': addon !== '',
|
|
223
223
|
[this.fieldStatus]: this.fieldStatus !== '',
|
|
224
|
-
}, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars, ...messageCssVars } }, index.h("div", { key: '
|
|
224
|
+
}, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars, ...messageCssVars } }, index.h("div", { key: 'b4219a5e3e80ead00b0cb67d6c5c8a1b25e59f57', class: "sd-field__wrapper" }, this.renderLabel(this.label), index.h("div", { key: '91dd10be9bf9fe70615d6f4f0ee00601cab5ee4a', class: "sd-field__main", style: this.width !== '' && this.width !== 0
|
|
225
225
|
? {
|
|
226
226
|
width: typeof this.width === 'number' ? `${this.width}px` : this.width,
|
|
227
227
|
flex: 'none',
|
|
228
228
|
}
|
|
229
|
-
: {} }, index.h("div", { key: '
|
|
229
|
+
: {} }, index.h("div", { key: 'd15df53ff3d76ab9f9bd5e6ffe55f98b53c1211a', class: {
|
|
230
230
|
'sd-field__control': true,
|
|
231
231
|
'sd-field__control--has-addon': addon !== '',
|
|
232
|
-
} }, addon && (index.h("div", { key: '
|
|
233
|
-
Number(FIELD_LABEL_SIZE_MAP[(this.size in FIELD_LABEL_SIZE_MAP ? this.size : 'sm')].icon), color: this.icon.color, rotate: this.icon.rotate })), addon)), index.h("slot", { key: '
|
|
232
|
+
} }, addon && (index.h("div", { key: 'fa65e5f352e20ae9f533bdf93d95b2d2f3ec4d7b', class: "sd-field__addon" }, this.icon && (index.h("sd-icon", { key: '5c6d67ca4a72191622d14727567b8bca0975dcee', name: this.icon.name, size: this.icon.size ??
|
|
233
|
+
Number(FIELD_LABEL_SIZE_MAP[(this.size in FIELD_LABEL_SIZE_MAP ? this.size : 'sm')].icon), color: this.icon.color, rotate: this.icon.rotate })), addon)), index.h("slot", { key: 'c4f4e9392b3e6df8bba7a0f9e39bb3847ccf5931' })), this.errorMsg !== '' || this.errorMessage !== '' ? (index.h("div", { class: "sd-field__error-message" }, this.errorMsg !== '' ? this.errorMsg : this.errorMessage)) : (this.hint !== '' && index.h("div", { class: "sd-field__hint" }, this.hint))))));
|
|
234
234
|
}
|
|
235
235
|
renderLabel(label) {
|
|
236
236
|
if (label == null || label === '')
|
|
@@ -400,7 +400,7 @@ const SdFloatingPopover = class {
|
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
render() {
|
|
403
|
-
return index.h("slot", { key: '
|
|
403
|
+
return index.h("slot", { key: '77829bed54180a72d233738d1f82d9996ae29cae' });
|
|
404
404
|
}
|
|
405
405
|
};
|
|
406
406
|
SdFloatingPopover.style = sdFloatingPortalCss();
|
|
@@ -562,7 +562,7 @@ const SdTooltip = class {
|
|
|
562
562
|
const bodyHTML = this.message && this.message.length > 0
|
|
563
563
|
? this.message.map(line => `<div>${line}</div>`).join('')
|
|
564
564
|
: this.slotContentHTML;
|
|
565
|
-
return (index.h(index.Fragment, { key: '
|
|
565
|
+
return (index.h(index.Fragment, { key: 'da2904e5cc41627283ff383366548453ef892dbc' }, index.h("div", { key: 'e94184fa6a51524f0dc5d3ba0610a3fa63663b4f', ref: el => (this.triggerEl = el), class: triggerClasses, ...divTrigger }, anchorMode ? (index.h("slot", { name: "anchor" })) : hasLabel ? (index.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 })) : (index.h("sd-icon", { ref: el => (this.buttonEl = el), name: icon, size: this.iconSize ?? 12, color: color, class: "sd-tooltip" }))), this.showTooltip && (index.h("sd-floating-portal", { key: '52b86274d938e67a89018839812b4d26108f0921', parentRef: anchorMode ? this.triggerEl : this.buttonEl, onSdClose: this.handleClose, placement: placement, offset: this.tooltipOffset }, index.h("div", { key: '177149d153ca4659a1dc4b71cd9d98cf36e19cd9', ref: el => (this.menuEl = el), class: {
|
|
566
566
|
'sd-floating-menu': true,
|
|
567
567
|
[`sd-floating-menu--${tooltipType}`]: true,
|
|
568
568
|
[`sd-floating-menu--${placement}`]: true,
|
|
@@ -570,7 +570,7 @@ const SdTooltip = class {
|
|
|
570
570
|
}, style: {
|
|
571
571
|
'--sd-floating-bg': typeConfig.bg,
|
|
572
572
|
'--sd-floating-content': typeConfig.content,
|
|
573
|
-
}, onMouseEnter: () => this.openTooltip(), onMouseLeave: () => !this.useClose && this.startHideTimer() }, index.h("i", { key: '
|
|
573
|
+
}, onMouseEnter: () => this.openTooltip(), onMouseLeave: () => !this.useClose && this.startHideTimer() }, index.h("i", { key: '6412bc25156af7a4bc276bc29f46458df7ac123b', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${placement}` }, index.h(tooltipArrow.TooltipArrow, { key: 'af6b98e12d0ce7816b9888614d7f70e93c9accd6' })), index.h("div", { key: '4b3bdb5eda8a67374a68e2ef3dbc51d630720c08', class: "sd-floating-menu__content", innerHTML: bodyHTML }), this.useClose && (index.h("sd-ghost-button", { key: '2bbe32da05ec4e84dba7b00d12826d9fb2492dfe', class: "sd-floating-menu__close-button", icon: "close", ariaLabel: "close", size: "xxs", onClick: () => this.closeTooltip() })))))));
|
|
574
574
|
}
|
|
575
575
|
};
|
|
576
576
|
SdTooltip.style = sdTooltipCss();
|
|
@@ -114,7 +114,7 @@ const GHOST_BUTTON_DISABLED_COLORS = {
|
|
|
114
114
|
inverse: ghostButtonTokens.ghostButton.inverse.disabled,
|
|
115
115
|
};
|
|
116
116
|
|
|
117
|
-
const sdGhostButtonCss = () => `sd-ghost-button{display:inline-flex;width:fit-content;height:fit-content}.sd-ghost-button{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--sd-ghost-button-size);height:var(--sd-ghost-button-size);padding:0;border:none;border-radius:var(--sd-ghost-button-radius);background:transparent;cursor:pointer;box-sizing:border-box;transition:box-shadow 0.2s ease;-webkit-user-select:none;user-select:none}.sd-ghost-button::before{content:"";position:absolute;inset:0;border-radius:inherit;background:var(--sd-ghost-button-hover-bg);opacity:0;transition:opacity 0.2s ease;pointer-events:none}.sd-ghost-button:hover:not(.sd-ghost-button--disabled)::before{opacity:var(--sd-ghost-button-hover-opacity)}.sd-ghost-button:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-ghost-button-accent)}.sd-ghost-button--disabled{cursor:not-allowed}.sd-ghost-button__tooltip{
|
|
117
|
+
const sdGhostButtonCss = () => `sd-ghost-button{display:inline-flex;width:fit-content;height:fit-content}.sd-ghost-button{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--sd-ghost-button-size);height:var(--sd-ghost-button-size);padding:0;border:none;border-radius:var(--sd-ghost-button-radius);background:transparent;cursor:pointer;box-sizing:border-box;transition:box-shadow 0.2s ease;-webkit-user-select:none;user-select:none}.sd-ghost-button::before{content:"";position:absolute;inset:0;border-radius:inherit;background:var(--sd-ghost-button-hover-bg);opacity:0;transition:opacity 0.2s ease;pointer-events:none}.sd-ghost-button:hover:not(.sd-ghost-button--disabled)::before{opacity:var(--sd-ghost-button-hover-opacity)}.sd-ghost-button:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-ghost-button-accent)}.sd-ghost-button--disabled{cursor:not-allowed}.sd-ghost-button__tooltip-inner{display:inline-flex;white-space:nowrap;transform:translateX(-50%)}`;
|
|
118
118
|
|
|
119
119
|
const SdGhostButton = class {
|
|
120
120
|
constructor(hostRef) {
|
|
@@ -125,15 +125,16 @@ const SdGhostButton = class {
|
|
|
125
125
|
size = 'sm';
|
|
126
126
|
intent = 'default';
|
|
127
127
|
ariaLabel = '';
|
|
128
|
-
|
|
128
|
+
tooltipText;
|
|
129
129
|
disabled = false;
|
|
130
|
+
get hostEl() { return index.getElement(this); }
|
|
131
|
+
isTooltipOpen = false;
|
|
130
132
|
click;
|
|
131
133
|
hasWarnedMissingAriaLabel = false;
|
|
132
134
|
componentWillLoad() {
|
|
133
135
|
this.size ??= 'sm';
|
|
134
136
|
this.intent ??= 'default';
|
|
135
137
|
this.ariaLabel ??= '';
|
|
136
|
-
this.tooltipLabel ??= '';
|
|
137
138
|
}
|
|
138
139
|
handleClick = (event) => {
|
|
139
140
|
if (this.disabled) {
|
|
@@ -142,6 +143,10 @@ const SdGhostButton = class {
|
|
|
142
143
|
}
|
|
143
144
|
this.click.emit(event);
|
|
144
145
|
};
|
|
146
|
+
handleMouseEnter = () => { this.isTooltipOpen = true; };
|
|
147
|
+
handleMouseLeave = () => { this.isTooltipOpen = false; };
|
|
148
|
+
handleFocus = () => { this.isTooltipOpen = true; };
|
|
149
|
+
handleBlur = () => { this.isTooltipOpen = false; };
|
|
145
150
|
componentWillRender() {
|
|
146
151
|
this.warnIfMissingAriaLabel();
|
|
147
152
|
}
|
|
@@ -164,23 +169,271 @@ const SdGhostButton = class {
|
|
|
164
169
|
? GHOST_BUTTON_DISABLED_COLORS[intent]
|
|
165
170
|
: GHOST_BUTTON_CONTENT_COLORS[intent];
|
|
166
171
|
const accessibleName = (this.ariaLabel ?? '').trim() || undefined;
|
|
167
|
-
const
|
|
168
|
-
const hasTooltip =
|
|
169
|
-
return (index.h("button", { key: '
|
|
172
|
+
const tooltipText = (this.tooltipText ?? '').trim();
|
|
173
|
+
const hasTooltip = tooltipText.length > 0;
|
|
174
|
+
return (index.h("button", { key: '59b95275f6acd737d4b0d5c2187e1d40b3a6543f', class: {
|
|
170
175
|
'sd-ghost-button': true,
|
|
171
176
|
'sd-ghost-button--disabled': this.disabled,
|
|
172
|
-
'sd-ghost-button--with-tooltip': hasTooltip,
|
|
173
177
|
}, type: "button", disabled: this.disabled, "aria-label": accessibleName, style: {
|
|
174
178
|
'--sd-ghost-button-size': `${sizeConfig.size}px`,
|
|
175
179
|
'--sd-ghost-button-radius': `${GHOST_BUTTON_RADIUS[size]}px`,
|
|
176
180
|
'--sd-ghost-button-hover-bg': GHOST_BUTTON_HOVER_BG_COLORS[intent],
|
|
177
181
|
'--sd-ghost-button-hover-opacity': GHOST_BUTTON_HOVER_OPACITY,
|
|
178
182
|
'--sd-ghost-button-accent': GHOST_BUTTON_FOCUS_RING_COLOR,
|
|
179
|
-
}, onClick: this.handleClick }, hasTooltip && (index.h("
|
|
183
|
+
}, onClick: this.handleClick, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, onFocus: this.handleFocus, onBlur: this.handleBlur }, hasTooltip && this.isTooltipOpen && !this.disabled && (index.h("sd-portal", { key: 'd8ca94b6a931208c2c56eb2dbfee843935c6b666', parentRef: this.hostEl, open: true, offset: [sizeConfig.size / 2, 4], placement: "top" }, index.h("div", { key: '450d5dc528ad4eeb4a2a0d2920fe4553ab3f91f8', class: "sd-ghost-button__tooltip-inner", "aria-hidden": "true" }, index.h("sd-tag", { key: 'cc25d0e2794d3d4dc418b0c0aa1a57e4b76b56e1', name: "square_xs_grey", label: tooltipText })))), index.h("sd-icon", { key: 'bf9bf8bcc779011635fd34566ec7320d76f8d16b', name: this.icon, size: sizeConfig.icon, color: contentColor })));
|
|
180
184
|
}
|
|
181
185
|
};
|
|
182
186
|
SdGhostButton.style = sdGhostButtonCss();
|
|
183
187
|
|
|
188
|
+
const SdPortal = class {
|
|
189
|
+
constructor(hostRef) {
|
|
190
|
+
index.registerInstance(this, hostRef);
|
|
191
|
+
this.close = index.createEvent(this, "sdClose", 3);
|
|
192
|
+
}
|
|
193
|
+
get hostEl() { return index.getElement(this); }
|
|
194
|
+
to = 'body';
|
|
195
|
+
parentRef = null;
|
|
196
|
+
offset = [0, 4];
|
|
197
|
+
viewportPadding = 0;
|
|
198
|
+
zIndex = 998;
|
|
199
|
+
open = false;
|
|
200
|
+
placement = 'bottom';
|
|
201
|
+
close;
|
|
202
|
+
container;
|
|
203
|
+
wrapper;
|
|
204
|
+
rafId;
|
|
205
|
+
isInsideClick = false;
|
|
206
|
+
closeTransitionTimer;
|
|
207
|
+
handleObservedScroll = () => this.updatePosition();
|
|
208
|
+
resizeObserver;
|
|
209
|
+
mutationObserver;
|
|
210
|
+
scrollParents = [];
|
|
211
|
+
isObserved = false;
|
|
212
|
+
handleOpenChange() {
|
|
213
|
+
this.syncPortalState();
|
|
214
|
+
}
|
|
215
|
+
componentDidLoad() {
|
|
216
|
+
this.container = this.resolveContainer();
|
|
217
|
+
this.syncPortalState();
|
|
218
|
+
}
|
|
219
|
+
componentDidRender() {
|
|
220
|
+
this.syncPortalState();
|
|
221
|
+
}
|
|
222
|
+
disconnectedCallback() {
|
|
223
|
+
if (this.closeTransitionTimer)
|
|
224
|
+
clearTimeout(this.closeTransitionTimer);
|
|
225
|
+
this.unobserveParent();
|
|
226
|
+
if (this.wrapper?.parentNode) {
|
|
227
|
+
try {
|
|
228
|
+
this.wrapper.parentNode.removeChild(this.wrapper);
|
|
229
|
+
}
|
|
230
|
+
catch {
|
|
231
|
+
// Stencil spec mock DOM can already detach the wrapper before this callback runs.
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
resolveContainer() {
|
|
236
|
+
const el = typeof this.to === 'string' ? document.querySelector(this.to) : this.to;
|
|
237
|
+
return el instanceof HTMLElement ? el : document.body;
|
|
238
|
+
}
|
|
239
|
+
createWrapper() {
|
|
240
|
+
this.wrapper = document.createElement('div');
|
|
241
|
+
Object.assign(this.wrapper.style, {
|
|
242
|
+
position: 'fixed',
|
|
243
|
+
top: '0',
|
|
244
|
+
left: '0',
|
|
245
|
+
zIndex: (this.zIndex ?? 998).toString(),
|
|
246
|
+
opacity: '0',
|
|
247
|
+
transition: 'opacity 0.15s ease-out',
|
|
248
|
+
boxSizing: 'border-box',
|
|
249
|
+
visibility: 'hidden',
|
|
250
|
+
});
|
|
251
|
+
this.container.appendChild(this.wrapper);
|
|
252
|
+
}
|
|
253
|
+
ensureWrapper() {
|
|
254
|
+
if (this.wrapper)
|
|
255
|
+
return;
|
|
256
|
+
this.container ||= this.resolveContainer();
|
|
257
|
+
this.createWrapper();
|
|
258
|
+
this.moveSlotContent();
|
|
259
|
+
}
|
|
260
|
+
syncPortalState() {
|
|
261
|
+
if (!this.open) {
|
|
262
|
+
if (this.wrapper) {
|
|
263
|
+
this.wrapper.style.transition = 'opacity 0.15s ease-out';
|
|
264
|
+
this.wrapper.style.opacity = '0';
|
|
265
|
+
this.wrapper.style.pointerEvents = 'none';
|
|
266
|
+
if (this.closeTransitionTimer)
|
|
267
|
+
clearTimeout(this.closeTransitionTimer);
|
|
268
|
+
this.closeTransitionTimer = setTimeout(() => {
|
|
269
|
+
if (this.wrapper && !this.open) {
|
|
270
|
+
this.wrapper.style.display = 'none';
|
|
271
|
+
}
|
|
272
|
+
}, 150);
|
|
273
|
+
}
|
|
274
|
+
this.unobserveParent();
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
if (this.closeTransitionTimer)
|
|
278
|
+
clearTimeout(this.closeTransitionTimer);
|
|
279
|
+
this.ensureWrapper();
|
|
280
|
+
if (!this.wrapper)
|
|
281
|
+
return;
|
|
282
|
+
this.wrapper.style.display = 'block';
|
|
283
|
+
this.wrapper.style.transition = 'opacity 0.25s ease-out';
|
|
284
|
+
this.wrapper.style.opacity = '0';
|
|
285
|
+
this.wrapper.style.pointerEvents = '';
|
|
286
|
+
this.observeParent();
|
|
287
|
+
this.updatePosition();
|
|
288
|
+
}
|
|
289
|
+
moveSlotContent() {
|
|
290
|
+
if (!this.wrapper)
|
|
291
|
+
return;
|
|
292
|
+
const nodes = Array.from(this.hostEl.childNodes).filter(n => n.nodeType !== Node.COMMENT_NODE);
|
|
293
|
+
nodes.forEach(n => this.wrapper.appendChild(n));
|
|
294
|
+
}
|
|
295
|
+
// 위치 갱신 (scroll / resize)
|
|
296
|
+
updatePosition() {
|
|
297
|
+
if (this.rafId !== undefined)
|
|
298
|
+
cancelAnimationFrame(this.rafId);
|
|
299
|
+
this.rafId = requestAnimationFrame(() => {
|
|
300
|
+
if (!this.parentRef || !this.wrapper)
|
|
301
|
+
return;
|
|
302
|
+
const parentRect = this.parentRef.getBoundingClientRect();
|
|
303
|
+
const viewport = {
|
|
304
|
+
width: window.innerWidth,
|
|
305
|
+
height: window.innerHeight,
|
|
306
|
+
};
|
|
307
|
+
const offset = this.offset ?? [0, 4];
|
|
308
|
+
const viewportPadding = Math.max(0, this.viewportPadding ?? 0);
|
|
309
|
+
const maxWidth = Math.max(viewport.width - viewportPadding * 2, 0);
|
|
310
|
+
const maxHeight = Math.max(viewport.height - viewportPadding * 2, 0);
|
|
311
|
+
this.wrapper.style.maxWidth = `${maxWidth}px`;
|
|
312
|
+
this.wrapper.style.maxHeight = `${maxHeight}px`;
|
|
313
|
+
const wrapperRect = this.wrapper.getBoundingClientRect();
|
|
314
|
+
const availableBelow = viewport.height - parentRect.bottom - offset[1] - viewportPadding;
|
|
315
|
+
const availableAbove = parentRect.top - offset[1] - viewportPadding;
|
|
316
|
+
const preferTop = (this.placement ?? 'bottom') === 'top';
|
|
317
|
+
let top;
|
|
318
|
+
let left = parentRect.left + offset[0];
|
|
319
|
+
if (preferTop) {
|
|
320
|
+
top = parentRect.top - wrapperRect.height - offset[1];
|
|
321
|
+
if (availableAbove < wrapperRect.height && availableBelow > availableAbove) {
|
|
322
|
+
top = parentRect.bottom + offset[1];
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
top = parentRect.bottom + offset[1];
|
|
327
|
+
if (availableBelow < wrapperRect.height && availableAbove > availableBelow) {
|
|
328
|
+
top = parentRect.top - wrapperRect.height - offset[1];
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
const minTop = viewportPadding;
|
|
332
|
+
const maxTop = viewport.height - viewportPadding - wrapperRect.height;
|
|
333
|
+
if (maxTop < minTop) {
|
|
334
|
+
top = minTop;
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
top = Math.min(Math.max(top, minTop), maxTop);
|
|
338
|
+
}
|
|
339
|
+
if (parentRect.left + wrapperRect.width + offset[0] > viewport.width - viewportPadding) {
|
|
340
|
+
left = parentRect.right - wrapperRect.width - offset[0];
|
|
341
|
+
}
|
|
342
|
+
const minLeft = viewportPadding;
|
|
343
|
+
const maxLeft = viewport.width - viewportPadding - wrapperRect.width;
|
|
344
|
+
if (maxLeft < minLeft) {
|
|
345
|
+
left = minLeft;
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
left = Math.min(Math.max(left, minLeft), maxLeft);
|
|
349
|
+
}
|
|
350
|
+
this.wrapper.style.top = `${top}px`;
|
|
351
|
+
this.wrapper.style.left = `${left}px`;
|
|
352
|
+
this.wrapper.style.visibility = 'visible';
|
|
353
|
+
this.wrapper.style.opacity = '1';
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
// parentRef의 이동 / 크기변경 감지
|
|
357
|
+
observeParent() {
|
|
358
|
+
if (!this.parentRef || this.isObserved)
|
|
359
|
+
return;
|
|
360
|
+
this.observeScrollParents(this.parentRef);
|
|
361
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
362
|
+
this.resizeObserver = new ResizeObserver(() => this.updatePosition());
|
|
363
|
+
this.resizeObserver.observe(this.parentRef);
|
|
364
|
+
}
|
|
365
|
+
if (typeof MutationObserver !== 'undefined') {
|
|
366
|
+
this.mutationObserver = new MutationObserver(() => this.updatePosition());
|
|
367
|
+
this.mutationObserver.observe(document.body, {
|
|
368
|
+
childList: true,
|
|
369
|
+
subtree: true,
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
this.isObserved = true;
|
|
373
|
+
}
|
|
374
|
+
unobserveParent() {
|
|
375
|
+
if (!this.isObserved)
|
|
376
|
+
return;
|
|
377
|
+
this.unobserveScrollParents();
|
|
378
|
+
this.resizeObserver?.disconnect();
|
|
379
|
+
this.resizeObserver = undefined;
|
|
380
|
+
this.mutationObserver?.disconnect();
|
|
381
|
+
this.mutationObserver = undefined;
|
|
382
|
+
this.isObserved = false;
|
|
383
|
+
}
|
|
384
|
+
observeScrollParents(element) {
|
|
385
|
+
const nextScrollParents = this.getScrollParents(element);
|
|
386
|
+
nextScrollParents.forEach(parent => {
|
|
387
|
+
parent.addEventListener('scroll', this.handleObservedScroll, { passive: true });
|
|
388
|
+
});
|
|
389
|
+
this.scrollParents = nextScrollParents;
|
|
390
|
+
}
|
|
391
|
+
unobserveScrollParents() {
|
|
392
|
+
this.scrollParents.forEach(parent => {
|
|
393
|
+
parent.removeEventListener('scroll', this.handleObservedScroll);
|
|
394
|
+
});
|
|
395
|
+
this.scrollParents = [];
|
|
396
|
+
}
|
|
397
|
+
getScrollParents(element) {
|
|
398
|
+
const scrollParents = [];
|
|
399
|
+
let currentElement = element.parentElement;
|
|
400
|
+
while (currentElement) {
|
|
401
|
+
const { overflow, overflowX, overflowY } = getComputedStyle(currentElement);
|
|
402
|
+
const isScrollable = [overflow, overflowX, overflowY].some(value => /(auto|scroll|overlay)/.test(value));
|
|
403
|
+
if (isScrollable) {
|
|
404
|
+
scrollParents.push(currentElement);
|
|
405
|
+
}
|
|
406
|
+
currentElement = currentElement.parentElement;
|
|
407
|
+
}
|
|
408
|
+
return scrollParents;
|
|
409
|
+
}
|
|
410
|
+
isInsideTarget(target) {
|
|
411
|
+
return !!((this.wrapper?.contains(target)) ||
|
|
412
|
+
(this.parentRef?.contains(target)));
|
|
413
|
+
}
|
|
414
|
+
// 외부 클릭 감지
|
|
415
|
+
handleMouseDown(e) {
|
|
416
|
+
this.isInsideClick = this.isInsideTarget(e.target);
|
|
417
|
+
}
|
|
418
|
+
handleWindowClick(e) {
|
|
419
|
+
if (this.isInsideClick) {
|
|
420
|
+
this.isInsideClick = false;
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
if (this.isInsideTarget(e.target))
|
|
424
|
+
return;
|
|
425
|
+
this.close.emit();
|
|
426
|
+
}
|
|
427
|
+
render() {
|
|
428
|
+
return index.h("slot", { key: '911d01b26a26a4bb4d7c4a15b51755acb9615c3a' });
|
|
429
|
+
}
|
|
430
|
+
static get watchers() { return {
|
|
431
|
+
"open": [{
|
|
432
|
+
"handleOpenChange": 0
|
|
433
|
+
}]
|
|
434
|
+
}; }
|
|
435
|
+
};
|
|
436
|
+
|
|
184
437
|
const tag = {
|
|
185
438
|
xs: {
|
|
186
439
|
height: "20",
|
|
@@ -388,7 +641,7 @@ const SdTag = class {
|
|
|
388
641
|
render() {
|
|
389
642
|
const config = this.resolvedConfig;
|
|
390
643
|
const iconNode = this.renderIcon(config.icon, config.iconSize);
|
|
391
|
-
return (index.h("span", { key: '
|
|
644
|
+
return (index.h("span", { key: '3117d8d5f3d9751dc193e426dbab7e0ead9fb369', class: "sd-tag", style: {
|
|
392
645
|
'--sd-tag-background': config.background,
|
|
393
646
|
'--sd-tag-content': config.content,
|
|
394
647
|
'--sd-tag-height': config.height,
|
|
@@ -398,10 +651,11 @@ const SdTag = class {
|
|
|
398
651
|
'--sd-tag-font-weight': config.fontWeight,
|
|
399
652
|
'--sd-tag-line-height': config.lineHeight,
|
|
400
653
|
'--sd-tag-radius': config.radius,
|
|
401
|
-
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, index.h("span", { key: '
|
|
654
|
+
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, index.h("span", { key: '8c299f140dc5bd026ed52d3f0921939bbf69fdd5', class: "sd-tag__label" }, this.label), this.icon && !this.isLeft && iconNode));
|
|
402
655
|
}
|
|
403
656
|
};
|
|
404
657
|
SdTag.style = sdTagCss();
|
|
405
658
|
|
|
406
659
|
exports.sd_ghost_button = SdGhostButton;
|
|
660
|
+
exports.sd_portal = SdPortal;
|
|
407
661
|
exports.sd_tag = SdTag;
|
|
@@ -9,6 +9,7 @@ const KEY_VALUE_TABLE_LAYOUT = {
|
|
|
9
9
|
rowHeight: Number(t.keyValue.height),
|
|
10
10
|
thWidth: 120,
|
|
11
11
|
borderRadius: Number(t.radius),
|
|
12
|
+
thPaddingX: Number(t.header.paddingX),
|
|
12
13
|
padding: Number(t.keyValue.body.padding),
|
|
13
14
|
helpIconSize: 16,
|
|
14
15
|
requiredIconSize: 12,
|
|
@@ -38,7 +39,7 @@ const KEY_VALUE_TABLE_TYPOGRAPHY = {
|
|
|
38
39
|
tdLineHeight: Number(t.body.typography.lineHeight),
|
|
39
40
|
};
|
|
40
41
|
|
|
41
|
-
const sdKeyValueTableCss = () => `sd-key-value-table{display:block}sd-key-value-table .sd-key-value-table__wrapper{display:flex;align-items:stretch;width:100%;border:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color);border-radius:var(--sd-kvt-radius);overflow:hidden}sd-key-value-table .sd-key-value-table__wrapper .sd-key-value-table{flex:1 1 auto;border:0;border-radius:0}sd-key-value-table .sd-key-value-table__wrapper.sd-key-value-table__wrapper--
|
|
42
|
+
const sdKeyValueTableCss = () => `sd-key-value-table{display:block}sd-key-value-table .sd-key-value-table__wrapper{display:flex;align-items:stretch;width:100%;border:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color);border-radius:var(--sd-kvt-radius);overflow:hidden}sd-key-value-table .sd-key-value-table__wrapper .sd-key-value-table{flex:1 1 auto;border:0;border-radius:0}sd-key-value-table .sd-key-value-table__wrapper.sd-key-value-table__wrapper--radius-useTop{border-top-left-radius:0;border-top-right-radius:0}sd-key-value-table .sd-key-value-table__wrapper.sd-key-value-table__wrapper--radius-full{border-radius:0}sd-key-value-table .sd-key-value-table__search-panel{display:flex;align-items:center;justify-content:center;flex:0 0 auto;padding:var(--sd-kvt-padding) var(--sd-kvt-search-padding-x);background:var(--sd-kvt-search-bg);border-left:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color)}sd-key-value-table .sd-key-value-table{width:100%;table-layout:fixed;border:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color);border-radius:var(--sd-kvt-radius);border-collapse:separate;border-spacing:0;overflow:hidden}sd-key-value-table .sd-key-value-table.sd-key-value-table--radius-useTop{border-top-left-radius:0;border-top-right-radius:0}sd-key-value-table .sd-key-value-table.sd-key-value-table--radius-full{border-radius:0}sd-key-value-table .sd-key-value-table__th,sd-key-value-table .sd-key-value-table__td{height:var(--sd-kvt-row-height);box-sizing:border-box;vertical-align:middle;text-align:left;font-weight:normal;border-top:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color)}sd-key-value-table .sd-key-value-table tbody>tr:first-child>.sd-key-value-table__th,sd-key-value-table .sd-key-value-table tbody>tr:first-child>.sd-key-value-table__td{border-top:0}sd-key-value-table .sd-key-value-table__th{padding:var(--sd-kvt-padding) var(--sd-kvt-th-padding-x);width:var(--sd-kvt-th-width);background:var(--sd-kvt-th-bg);color:var(--sd-kvt-th-color)}sd-key-value-table .sd-key-value-table__th-inner{display:flex;align-items:center;justify-content:space-between;gap:var(--sd-kvt-gap);width:100%;height:100%}sd-key-value-table .sd-key-value-table__label{display:inline-flex;align-items:center;gap:var(--sd-kvt-label-gap);font-family:var(--sd-kvt-label-font-family);font-size:var(--sd-kvt-label-font-size);font-weight:var(--sd-kvt-label-font-weight);line-height:var(--sd-kvt-label-line-height);color:var(--sd-kvt-th-color)}sd-key-value-table .sd-key-value-table__required{display:inline-flex;align-items:center;flex-shrink:0}sd-key-value-table .sd-key-value-table__help{display:inline-flex;align-items:center;flex-shrink:0}sd-key-value-table .sd-key-value-table__td{padding:var(--sd-kvt-padding);background:var(--sd-kvt-td-bg);color:var(--sd-kvt-td-color)}sd-key-value-table .sd-key-value-table__td-inner{display:flex;align-items:center;width:100%;height:100%}sd-key-value-table .sd-key-value-table__td-inner>slot{display:block;flex:1 1 auto;min-width:0}sd-key-value-table .sd-key-value-table__td-inner sd-input,sd-key-value-table .sd-key-value-table__td-inner sd-textarea,sd-key-value-table .sd-key-value-table__td-inner sd-number-input,sd-key-value-table .sd-key-value-table__td-inner sd-select,sd-key-value-table .sd-key-value-table__td-inner sd-date-picker,sd-key-value-table .sd-key-value-table__td-inner sd-date-range-picker,sd-key-value-table .sd-key-value-table__td-inner sd-file-picker{width:100%}sd-key-value-table .sd-key-value-table__text{font-family:var(--sd-kvt-td-font-family);font-size:var(--sd-kvt-td-font-size);font-weight:var(--sd-kvt-td-font-weight);line-height:var(--sd-kvt-td-line-height);color:var(--sd-kvt-td-color)}`;
|
|
42
43
|
|
|
43
44
|
const SdKeyValueTable = class {
|
|
44
45
|
constructor(hostRef) {
|
|
@@ -56,10 +57,12 @@ const SdKeyValueTable = class {
|
|
|
56
57
|
*/
|
|
57
58
|
search = false;
|
|
58
59
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
60
|
+
* 테이블 border-radius 제어.
|
|
61
|
+
* - 'default': 전체 radius 적용
|
|
62
|
+
* - 'useTop': 상단 radius 0 (헤더·탭 등 하단에 붙여 쓸 때)
|
|
63
|
+
* - 'full': 상하단 모두 radius 0 (요소 사이에 끼워 쓸 때)
|
|
61
64
|
*/
|
|
62
|
-
|
|
65
|
+
radius = 'default';
|
|
63
66
|
change;
|
|
64
67
|
searchEvent;
|
|
65
68
|
emit = (name, value) => {
|
|
@@ -207,6 +210,7 @@ const SdKeyValueTable = class {
|
|
|
207
210
|
'--sd-kvt-row-height': `${KEY_VALUE_TABLE_LAYOUT.rowHeight}px`,
|
|
208
211
|
'--sd-kvt-th-width': `${KEY_VALUE_TABLE_LAYOUT.thWidth}px`,
|
|
209
212
|
'--sd-kvt-radius': `${KEY_VALUE_TABLE_LAYOUT.borderRadius}px`,
|
|
213
|
+
'--sd-kvt-th-padding-x': `${KEY_VALUE_TABLE_LAYOUT.thPaddingX}px`,
|
|
210
214
|
'--sd-kvt-padding': `${KEY_VALUE_TABLE_LAYOUT.padding}px`,
|
|
211
215
|
'--sd-kvt-gap': `${KEY_VALUE_TABLE_LAYOUT.gap}px`,
|
|
212
216
|
'--sd-kvt-label-gap': `${KEY_VALUE_TABLE_LAYOUT.labelGap}px`,
|
|
@@ -233,7 +237,8 @@ const SdKeyValueTable = class {
|
|
|
233
237
|
const maxCols = this.computeMaxCols(autoSkip);
|
|
234
238
|
const tableEl = (index.h("table", { class: {
|
|
235
239
|
'sd-key-value-table': true,
|
|
236
|
-
'sd-key-value-table--
|
|
240
|
+
'sd-key-value-table--radius-useTop': this.radius === 'useTop',
|
|
241
|
+
'sd-key-value-table--radius-full': this.radius === 'full',
|
|
237
242
|
}, style: cssVars }, index.h("colgroup", null, Array.from({ length: maxCols }, (_, i) => {
|
|
238
243
|
if (i % 2 !== 0)
|
|
239
244
|
return index.h("col", { key: `col-${i}` });
|
|
@@ -257,7 +262,8 @@ const SdKeyValueTable = class {
|
|
|
257
262
|
return tableEl;
|
|
258
263
|
return (index.h("div", { class: {
|
|
259
264
|
'sd-key-value-table__wrapper': true,
|
|
260
|
-
'sd-key-value-table__wrapper--
|
|
265
|
+
'sd-key-value-table__wrapper--radius-useTop': this.radius === 'useTop',
|
|
266
|
+
'sd-key-value-table__wrapper--radius-full': this.radius === 'full',
|
|
261
267
|
}, style: cssVars }, tableEl, index.h("div", { class: "sd-key-value-table__search-panel" }, index.h("sd-button", { label: "\uAC80\uC0C9", name: "neutral_outline_md", onSdClick: this.handleSearchClick }))));
|
|
262
268
|
}
|
|
263
269
|
};
|
|
@@ -49,7 +49,7 @@ const SdLinearProgress = class {
|
|
|
49
49
|
clipPath: `inset(0 ${100 - this.clampedValue}% 0 0)`,
|
|
50
50
|
};
|
|
51
51
|
const valueText = `${Math.round(this.clampedValue)}%`;
|
|
52
|
-
return (index.h(index.Host, { key: '
|
|
52
|
+
return (index.h(index.Host, { key: '1e6aa9c81d3e9516a2f986d3f209df005de38f48', style: hostStyle }, index.h("div", { key: '06115d6245603c7ae54d892a23074f34db203592', class: 'sd-linear-progress__track' }, index.h("div", { key: '353549cb3c885cef86f114830599f375bfad8e50', class: 'sd-linear-progress__fill', style: fillStyle }), !this.indeterminate && (index.h("span", { key: '61afec063cd8f6ccaca27217fe7b599926245192', class: 'sd-linear-progress__value sd-linear-progress__value--on-track' }, valueText)), !this.indeterminate && (index.h("span", { key: 'fec238b0a6c73e06db3e53c019319a21b62e2836', class: 'sd-linear-progress__value sd-linear-progress__value--on-fill', style: valueOnFillStyle }, valueText))), this.label && index.h("span", { key: '668f63765b78c1047e3b850f3a17d6b2a1b9bfd4', class: 'sd-linear-progress__label' }, this.label)));
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
SdLinearProgress.style = sdLinearProgressCss();
|
|
@@ -18,10 +18,10 @@ const SdLoadingContainer = class {
|
|
|
18
18
|
this.visible = false;
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return (index.h("div", { key: '
|
|
21
|
+
return (index.h("div", { key: '6525405e4edafd9257be9887cca824a436b2807c', class: {
|
|
22
22
|
'sd-loading-container': true,
|
|
23
23
|
'sd-loading-container--visible': this.visible,
|
|
24
|
-
}, "aria-hidden": this.visible ? 'false' : 'true' }, index.h("div", { key: '
|
|
24
|
+
}, "aria-hidden": this.visible ? 'false' : 'true' }, index.h("div", { key: 'd5f1e1e3df8b704d4a5dabe8cf7b50cc07a2699a', class: "sd-loading-container__backdrop" }), index.h("div", { key: '40dce62049e04a997b982ab65b47a755b6e917c7', class: "sd-loading-container__content" }, index.h("sd-circle-progress", { key: '9cb7a1ed52433f2d0982ceef1a298b1367a99dd4', indeterminate: true, type: "inverse" }), this.message && (index.h("p", { key: 'bc581b692122ef5553e4e8eb99056b89257eb6d9', class: "sd-loading-container__message" }, this.message)))));
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
SdLoadingContainer.style = sdLoadingContainerCss();
|