@sellmate/design-system 1.19.0 → 1.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-badge.cjs.entry.js +1 -1
- package/dist/cjs/sd-barcode-input.cjs.entry.js +1 -1
- package/dist/cjs/sd-button_2.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 +2 -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 +4 -4
- 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-modal-container.cjs.entry.js +49 -1
- 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 +8 -8
- 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/assets/Close.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 +2 -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.css +2 -2
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +6 -6
- 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 +49 -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 +1 -1
- package/dist/collection/components/sd-table/sd-table.js +9 -9
- 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-5imde6N9.js +1 -0
- package/dist/components/p-B5bya7Gp.js +1 -0
- package/dist/components/p-B7PHGGFH.js +1 -0
- package/dist/components/p-BZfVV3gu.js +1 -0
- package/dist/components/p-BiBLp9_a.js +1 -0
- package/dist/components/{p-DMS9mQsg.js → p-BjcGzaFR.js} +1 -1
- package/dist/components/{p-BD8OoYud.js → p-Bz93hWXV.js} +1 -1
- package/dist/components/p-CB2A3pJ5.js +1 -0
- package/dist/components/{p-B_5uwji5.js → p-CJ69QmR3.js} +1 -1
- package/dist/components/p-CLlAhEDc.js +1 -0
- package/dist/components/{p-4HPAPKne.js → p-CQozoo2-.js} +1 -1
- package/dist/components/p-CRwvv7YM.js +1 -0
- package/dist/components/p-CTPImLDQ.js +1 -0
- package/dist/components/{p-CQWZv8vY.js → p-CUR9smP5.js} +1 -1
- package/dist/components/{p-DbLQoVx6.js → p-CXeOxSQ-.js} +1 -1
- package/dist/components/p-CZfsknba.js +1 -0
- package/dist/components/{p-CtWfOIxb.js → p-CoqA9KgU.js} +1 -1
- package/dist/components/{p-hzCGj0On.js → p-CrT06Uwc.js} +1 -1
- package/dist/components/p-CvSqieCH.js +1 -0
- package/dist/components/p-D99vy8Ip.js +1 -0
- package/dist/components/{p-B3SKaQId.js → p-DDAA-zcg.js} +1 -1
- package/dist/components/p-DIlNesBH.js +1 -0
- package/dist/components/p-DNnI3Nru.js +1 -0
- package/dist/components/p-DZTxHJlP.js +1 -0
- package/dist/components/{p-CH6cVc2a.js → p-DertIGhs.js} +1 -1
- package/dist/components/{p-CzCu_NDl.js → p-Dl89_4C3.js} +1 -1
- package/dist/components/{p-C_r3z9VA.js → p-FTvXz0-a.js} +1 -1
- package/dist/components/{p-BLNc_TL-.js → p-P2jWtk8J.js} +1 -1
- package/dist/components/{p-DrSHJYop.js → p-Rwc_ltPn.js} +1 -1
- package/dist/components/p-ZvI5A-_t.js +1 -0
- package/dist/components/{p-79DExV92.js → p-gOIeNT-Z.js} +1 -1
- package/dist/components/{p-BMIgVp9-.js → p-uSEbiD29.js} +1 -1
- package/dist/components/{p-DDR0VcRU.js → p-xkRWGISE.js} +1 -1
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-badge.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-callout.js +1 -1
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-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/{p-80bde621.entry.js → p-08343698.entry.js} +1 -1
- package/dist/design-system/p-17dcf0e4.entry.js +1 -0
- 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-9d35b674.entry.js → p-717eba5f.entry.js} +1 -1
- package/dist/design-system/p-7ed8c8f1.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-4b15247b.entry.js → p-b291baab.entry.js} +1 -1
- 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-4b626171.entry.js → p-c995e6c3.entry.js} +1 -1
- 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-button_2.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 +2 -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 +4 -4
- package/dist/esm/sd-linear-progress.entry.js +1 -1
- package/dist/esm/sd-loading-container.entry.js +2 -2
- package/dist/esm/sd-modal-container.entry.js +49 -1
- 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 +8 -8
- 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-ghost-button/sd-ghost-button.d.ts +7 -1
- package/dist/types/components/sd-key-value-table/sd-key-value-table.d.ts +2 -2
- package/dist/types/components/sd-modal-container/sd-modal-container.d.ts +9 -0
- 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 +20 -17
- package/hydrate/index.js +163 -98
- package/hydrate/index.mjs +163 -98
- package/package.json +1 -1
- 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-ClKABgST.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-12306783.entry.js +0 -1
- package/dist/design-system/p-3f7349ae.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-aa312937.entry.js +0 -1
- package/dist/esm/sd-portal.entry.js +0 -241
package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js
CHANGED
|
@@ -33,7 +33,7 @@ export class SdDatePickerTrigger {
|
|
|
33
33
|
? DATEPICKER_COLORS.icon.disabled
|
|
34
34
|
: DATEPICKER_COLORS.icon.default,
|
|
35
35
|
};
|
|
36
|
-
return (h("div", { key: '
|
|
36
|
+
return (h("div", { key: 'ed74f03f3860fe86e7bc3b5430501b064a0288a7', role: "button", tabindex: this.disabled ? -1 : 0, class: {
|
|
37
37
|
'sd-date-picker-trigger': true,
|
|
38
38
|
'sd-date-picker-trigger--disabled': this.disabled,
|
|
39
39
|
}, style: cssVars, onClick: this.handleClick, onKeyDown: e => {
|
|
@@ -41,7 +41,7 @@ export class SdDatePickerTrigger {
|
|
|
41
41
|
e.preventDefault();
|
|
42
42
|
this.handleClick();
|
|
43
43
|
}
|
|
44
|
-
} }, h("sd-icon", { key: '
|
|
44
|
+
} }, h("sd-icon", { key: '67994572f65a0f13622deef67f89b22c083791a0', name: "date", size: Number(sizeTokens.iconSize), color: "var(--trigger-icon-color)", class: "sd-date-picker-trigger__icon" }), h("span", { key: '142f26e05ae2287d03a9e733b64ddf34f2ed1256', class: "sd-date-picker-trigger__text" }, hasValue ? this.displayText : this.placeholder)));
|
|
45
45
|
}
|
|
46
46
|
static get is() { return "sd-date-picker-trigger"; }
|
|
47
47
|
static get originalStyleUrls() {
|
|
@@ -93,9 +93,9 @@ export class SdDatePicker {
|
|
|
93
93
|
'--sd-system-color-field-border-focus': DATEPICKER_COLORS.border.focus,
|
|
94
94
|
'--sd-system-color-field-bg-default': DATEPICKER_COLORS.bg.default,
|
|
95
95
|
};
|
|
96
|
-
return (h("sd-field", { key: '
|
|
96
|
+
return (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 }, h("div", { key: 'e7798ec50f7d22628a17a953ac87882160248de4', class: "sd-date-picker", ref: el => {
|
|
97
97
|
this.triggerRef = el;
|
|
98
|
-
} }, h("sd-date-picker-trigger", { key: '
|
|
98
|
+
} }, 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) && (h("sd-portal", { key: 'c5f875bc826fa1f899205cfefe2db57da3dd34b4', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, h("sd-calendar", { key: '8626faebafac8201979e02c444279124c3261b67', elevated: true, value: this.value, selectable: this.selectable, onSdUpdate: this.handleSelect, onSdViewChange: this.handleViewChange })))));
|
|
99
99
|
}
|
|
100
100
|
static get is() { return "sd-date-picker"; }
|
|
101
101
|
static get originalStyleUrls() {
|
|
@@ -239,7 +239,7 @@ export class SdDateRangePickerCalendar {
|
|
|
239
239
|
'--range-panel-gap': `${RANGE_LAYOUT.panelGap}px`,
|
|
240
240
|
'--range-divider': RANGE_LAYOUT.divider,
|
|
241
241
|
};
|
|
242
|
-
return (h(Fragment, { key: '
|
|
242
|
+
return (h(Fragment, { key: 'd46df258093b5c57d1b958efb7e52cabd4cb1eb4' }, h("div", { key: '04fc01524115d9b57462ad1eaf9281fe1c63dd84', class: "sd-date-range-picker-calendar", style: cssVars }, this.renderYearNav(), h("div", { key: '91428a1dd98b7a9c534b28a9cd683f35935dfee2', class: "sd-date-range-picker-calendar__panels" }, this.renderPanel(this.currentYear, this.currentMonth, true), h("span", { key: '26d4f7e3391c50340e0f45f018b02d11ad7bd23b', class: "sd-date-range-picker-calendar__divider", "aria-hidden": "true" }), this.renderPanel(this.rightYear, this.rightMonth, false)))));
|
|
243
243
|
}
|
|
244
244
|
static get is() { return "sd-date-range-picker-calendar"; }
|
|
245
245
|
static get originalStyleUrls() {
|
|
@@ -7,7 +7,7 @@ export class SdDivider {
|
|
|
7
7
|
const hostStyle = {
|
|
8
8
|
'--sd-divider-color': DIVIDER_COLORS.default,
|
|
9
9
|
};
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: 'd7adb8181071f7e6b1c2238c5512c332a0c9bafb', style: hostStyle }, h("hr", { key: '8d376fce5cced248a573ffb189931ce613ef79b7', "aria-orientation": this.vertical ? 'vertical' : 'horizontal' })));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "sd-divider"; }
|
|
13
13
|
static get originalStyleUrls() {
|
|
@@ -182,21 +182,21 @@ export class SdField {
|
|
|
182
182
|
: {}),
|
|
183
183
|
}
|
|
184
184
|
: {};
|
|
185
|
-
return (h("div", { key: '
|
|
185
|
+
return (h("div", { key: '76a1a2f41cafb2a665415f4e6e7bd9561aacb57f', class: {
|
|
186
186
|
'sd-field': true,
|
|
187
187
|
'sd-field--has-label': this.label !== '',
|
|
188
188
|
'sd-field--has-addon': addon !== '',
|
|
189
189
|
[this.fieldStatus]: this.fieldStatus !== '',
|
|
190
|
-
}, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars, ...messageCssVars } }, h("div", { key: '
|
|
190
|
+
}, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars, ...messageCssVars } }, h("div", { key: 'b4219a5e3e80ead00b0cb67d6c5c8a1b25e59f57', class: "sd-field__wrapper" }, this.renderLabel(this.label), h("div", { key: '91dd10be9bf9fe70615d6f4f0ee00601cab5ee4a', class: "sd-field__main", style: this.width !== '' && this.width !== 0
|
|
191
191
|
? {
|
|
192
192
|
width: typeof this.width === 'number' ? `${this.width}px` : this.width,
|
|
193
193
|
flex: 'none',
|
|
194
194
|
}
|
|
195
|
-
: {} }, h("div", { key: '
|
|
195
|
+
: {} }, h("div", { key: 'd15df53ff3d76ab9f9bd5e6ffe55f98b53c1211a', class: {
|
|
196
196
|
'sd-field__control': true,
|
|
197
197
|
'sd-field__control--has-addon': addon !== '',
|
|
198
|
-
} }, addon && (h("div", { key: '
|
|
199
|
-
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)), h("slot", { key: '
|
|
198
|
+
} }, addon && (h("div", { key: 'fa65e5f352e20ae9f533bdf93d95b2d2f3ec4d7b', class: "sd-field__addon" }, this.icon && (h("sd-icon", { key: '5c6d67ca4a72191622d14727567b8bca0975dcee', name: this.icon.name, size: this.icon.size ??
|
|
199
|
+
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)), h("slot", { key: 'c4f4e9392b3e6df8bba7a0f9e39bb3847ccf5931' })), this.errorMsg !== '' || this.errorMessage !== '' ? (h("div", { class: "sd-field__error-message" }, this.errorMsg !== '' ? this.errorMsg : this.errorMessage)) : (this.hint !== '' && h("div", { class: "sd-field__hint" }, this.hint))))));
|
|
200
200
|
}
|
|
201
201
|
renderLabel(label) {
|
|
202
202
|
if (label == null || label === '')
|
|
@@ -152,7 +152,7 @@ export class SdFloatingPopover {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
render() {
|
|
155
|
-
return h("slot", { key: '
|
|
155
|
+
return h("slot", { key: '77829bed54180a72d233738d1f82d9996ae29cae' });
|
|
156
156
|
}
|
|
157
157
|
static get is() { return "sd-floating-portal"; }
|
|
158
158
|
static get originalStyleUrls() {
|
|
@@ -42,23 +42,8 @@ sd-ghost-button {
|
|
|
42
42
|
cursor: not-allowed;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.sd-ghost-button__tooltip {
|
|
46
|
-
position: absolute;
|
|
47
|
-
left: 50%;
|
|
48
|
-
bottom: calc(100% + 4px);
|
|
49
|
-
transform: translateX(-50%) translateY(4px);
|
|
50
|
-
z-index: 1;
|
|
45
|
+
.sd-ghost-button__tooltip-inner {
|
|
51
46
|
display: inline-flex;
|
|
52
47
|
white-space: nowrap;
|
|
53
|
-
|
|
54
|
-
visibility: hidden;
|
|
55
|
-
pointer-events: none;
|
|
56
|
-
transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.sd-ghost-button--with-tooltip:hover:not(.sd-ghost-button--disabled) .sd-ghost-button__tooltip,
|
|
60
|
-
.sd-ghost-button--with-tooltip:focus-visible:not(.sd-ghost-button--disabled) .sd-ghost-button__tooltip {
|
|
61
|
-
opacity: 1;
|
|
62
|
-
visibility: visible;
|
|
63
|
-
transform: translateX(-50%) translateY(0);
|
|
48
|
+
transform: translateX(-50%);
|
|
64
49
|
}
|
|
@@ -5,15 +5,16 @@ export class SdGhostButton {
|
|
|
5
5
|
size = 'sm';
|
|
6
6
|
intent = 'default';
|
|
7
7
|
ariaLabel = '';
|
|
8
|
-
|
|
8
|
+
tooltipText;
|
|
9
9
|
disabled = false;
|
|
10
|
+
hostEl;
|
|
11
|
+
isTooltipOpen = false;
|
|
10
12
|
click;
|
|
11
13
|
hasWarnedMissingAriaLabel = false;
|
|
12
14
|
componentWillLoad() {
|
|
13
15
|
this.size ??= 'sm';
|
|
14
16
|
this.intent ??= 'default';
|
|
15
17
|
this.ariaLabel ??= '';
|
|
16
|
-
this.tooltipLabel ??= '';
|
|
17
18
|
}
|
|
18
19
|
handleClick = (event) => {
|
|
19
20
|
if (this.disabled) {
|
|
@@ -22,6 +23,10 @@ export class SdGhostButton {
|
|
|
22
23
|
}
|
|
23
24
|
this.click.emit(event);
|
|
24
25
|
};
|
|
26
|
+
handleMouseEnter = () => { this.isTooltipOpen = true; };
|
|
27
|
+
handleMouseLeave = () => { this.isTooltipOpen = false; };
|
|
28
|
+
handleFocus = () => { this.isTooltipOpen = true; };
|
|
29
|
+
handleBlur = () => { this.isTooltipOpen = false; };
|
|
25
30
|
componentWillRender() {
|
|
26
31
|
this.warnIfMissingAriaLabel();
|
|
27
32
|
}
|
|
@@ -44,19 +49,18 @@ export class SdGhostButton {
|
|
|
44
49
|
? GHOST_BUTTON_DISABLED_COLORS[intent]
|
|
45
50
|
: GHOST_BUTTON_CONTENT_COLORS[intent];
|
|
46
51
|
const accessibleName = (this.ariaLabel ?? '').trim() || undefined;
|
|
47
|
-
const
|
|
48
|
-
const hasTooltip =
|
|
49
|
-
return (h("button", { key: '
|
|
52
|
+
const tooltipText = (this.tooltipText ?? '').trim();
|
|
53
|
+
const hasTooltip = tooltipText.length > 0;
|
|
54
|
+
return (h("button", { key: '59b95275f6acd737d4b0d5c2187e1d40b3a6543f', class: {
|
|
50
55
|
'sd-ghost-button': true,
|
|
51
56
|
'sd-ghost-button--disabled': this.disabled,
|
|
52
|
-
'sd-ghost-button--with-tooltip': hasTooltip,
|
|
53
57
|
}, type: "button", disabled: this.disabled, "aria-label": accessibleName, style: {
|
|
54
58
|
'--sd-ghost-button-size': `${sizeConfig.size}px`,
|
|
55
59
|
'--sd-ghost-button-radius': `${GHOST_BUTTON_RADIUS[size]}px`,
|
|
56
60
|
'--sd-ghost-button-hover-bg': GHOST_BUTTON_HOVER_BG_COLORS[intent],
|
|
57
61
|
'--sd-ghost-button-hover-opacity': GHOST_BUTTON_HOVER_OPACITY,
|
|
58
62
|
'--sd-ghost-button-accent': GHOST_BUTTON_FOCUS_RING_COLOR,
|
|
59
|
-
}, onClick: this.handleClick }, hasTooltip && (h("
|
|
63
|
+
}, onClick: this.handleClick, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, onFocus: this.handleFocus, onBlur: this.handleBlur }, hasTooltip && this.isTooltipOpen && !this.disabled && (h("sd-portal", { key: 'd8ca94b6a931208c2c56eb2dbfee843935c6b666', parentRef: this.hostEl, open: true, offset: [sizeConfig.size / 2, 4], placement: "top" }, h("div", { key: '450d5dc528ad4eeb4a2a0d2920fe4553ab3f91f8', class: "sd-ghost-button__tooltip-inner", "aria-hidden": "true" }, h("sd-tag", { key: 'cc25d0e2794d3d4dc418b0c0aa1a57e4b76b56e1', name: "square_xs_grey", label: tooltipText })))), h("sd-icon", { key: 'bf9bf8bcc779011635fd34566ec7320d76f8d16b', name: this.icon, size: sizeConfig.icon, color: contentColor })));
|
|
60
64
|
}
|
|
61
65
|
static get is() { return "sd-ghost-button"; }
|
|
62
66
|
static get originalStyleUrls() {
|
|
@@ -169,16 +173,16 @@ export class SdGhostButton {
|
|
|
169
173
|
"attribute": "aria-label",
|
|
170
174
|
"defaultValue": "''"
|
|
171
175
|
},
|
|
172
|
-
"
|
|
176
|
+
"tooltipText": {
|
|
173
177
|
"type": "string",
|
|
174
178
|
"mutable": false,
|
|
175
179
|
"complexType": {
|
|
176
180
|
"original": "string",
|
|
177
|
-
"resolved": "string",
|
|
181
|
+
"resolved": "string | undefined",
|
|
178
182
|
"references": {}
|
|
179
183
|
},
|
|
180
184
|
"required": false,
|
|
181
|
-
"optional":
|
|
185
|
+
"optional": true,
|
|
182
186
|
"docs": {
|
|
183
187
|
"tags": [],
|
|
184
188
|
"text": ""
|
|
@@ -186,8 +190,7 @@ export class SdGhostButton {
|
|
|
186
190
|
"getter": false,
|
|
187
191
|
"setter": false,
|
|
188
192
|
"reflect": false,
|
|
189
|
-
"attribute": "tooltip-
|
|
190
|
-
"defaultValue": "''"
|
|
193
|
+
"attribute": "tooltip-text"
|
|
191
194
|
},
|
|
192
195
|
"disabled": {
|
|
193
196
|
"type": "boolean",
|
|
@@ -211,6 +214,11 @@ export class SdGhostButton {
|
|
|
211
214
|
}
|
|
212
215
|
};
|
|
213
216
|
}
|
|
217
|
+
static get states() {
|
|
218
|
+
return {
|
|
219
|
+
"isTooltipOpen": {}
|
|
220
|
+
};
|
|
221
|
+
}
|
|
214
222
|
static get events() {
|
|
215
223
|
return [{
|
|
216
224
|
"method": "click",
|
|
@@ -234,4 +242,5 @@ export class SdGhostButton {
|
|
|
234
242
|
}
|
|
235
243
|
}];
|
|
236
244
|
}
|
|
245
|
+
static get elementRef() { return "hostEl"; }
|
|
237
246
|
}
|
|
@@ -112,12 +112,12 @@ export class SdInput {
|
|
|
112
112
|
'--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
|
|
113
113
|
'--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
|
|
114
114
|
};
|
|
115
|
-
return (h("sd-field", { key: '
|
|
115
|
+
return (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 }, h("label", { key: '63661c1e1202e729bbcaedcf83d8b034a7bf2e0b', class: "sd-input__content" }, h("slot", { key: '6c17e53e77c0e6751deb664b67b7daa471bd08cc', name: "prefix" }), 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 }), h("slot", { key: '728316a43a96d7859849ef522c06a405f7d668b5', name: "suffix" }), this.clearable && this.internalValue && !this.disabled && !this.readonly && (h("sd-ghost-button", { key: 'ec89154a98d603db8eccc5db786d3330b33713ab', icon: "close", ariaLabel: "clear", size: "xxs", disabled: this.disabled, class: "sd-input__clear-icon", onClick: async () => {
|
|
116
116
|
if (this.disabled || this.readonly)
|
|
117
117
|
return;
|
|
118
118
|
this.internalValue = '';
|
|
119
119
|
await this.formField?.sdValidate();
|
|
120
|
-
} })), this.type === 'password' && (h("sd-ghost-button", { key: '
|
|
120
|
+
} })), this.type === 'password' && (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: () => {
|
|
121
121
|
if (this.disabled || this.readonly)
|
|
122
122
|
return;
|
|
123
123
|
this.passwordVisible = !this.passwordVisible;
|
|
@@ -14,7 +14,7 @@ sd-key-value-table .sd-key-value-table__wrapper .sd-key-value-table {
|
|
|
14
14
|
border: 0;
|
|
15
15
|
border-radius: 0;
|
|
16
16
|
}
|
|
17
|
-
sd-key-value-table .sd-key-value-table__wrapper.sd-key-value-table__wrapper--radius-
|
|
17
|
+
sd-key-value-table .sd-key-value-table__wrapper.sd-key-value-table__wrapper--radius-useTop {
|
|
18
18
|
border-top-left-radius: 0;
|
|
19
19
|
border-top-right-radius: 0;
|
|
20
20
|
}
|
|
@@ -39,7 +39,7 @@ sd-key-value-table .sd-key-value-table {
|
|
|
39
39
|
border-spacing: 0;
|
|
40
40
|
overflow: hidden;
|
|
41
41
|
}
|
|
42
|
-
sd-key-value-table .sd-key-value-table.sd-key-value-table--radius-
|
|
42
|
+
sd-key-value-table .sd-key-value-table.sd-key-value-table--radius-useTop {
|
|
43
43
|
border-top-left-radius: 0;
|
|
44
44
|
border-top-right-radius: 0;
|
|
45
45
|
}
|
|
@@ -13,7 +13,7 @@ export class SdKeyValueTable {
|
|
|
13
13
|
/**
|
|
14
14
|
* 테이블 border-radius 제어.
|
|
15
15
|
* - 'default': 전체 radius 적용
|
|
16
|
-
* - '
|
|
16
|
+
* - 'useTop': 상단 radius 0 (헤더·탭 등 하단에 붙여 쓸 때)
|
|
17
17
|
* - 'full': 상하단 모두 radius 0 (요소 사이에 끼워 쓸 때)
|
|
18
18
|
*/
|
|
19
19
|
radius = 'default';
|
|
@@ -191,7 +191,7 @@ export class SdKeyValueTable {
|
|
|
191
191
|
const maxCols = this.computeMaxCols(autoSkip);
|
|
192
192
|
const tableEl = (h("table", { class: {
|
|
193
193
|
'sd-key-value-table': true,
|
|
194
|
-
'sd-key-value-table--radius-
|
|
194
|
+
'sd-key-value-table--radius-useTop': this.radius === 'useTop',
|
|
195
195
|
'sd-key-value-table--radius-full': this.radius === 'full',
|
|
196
196
|
}, style: cssVars }, h("colgroup", null, Array.from({ length: maxCols }, (_, i) => {
|
|
197
197
|
if (i % 2 !== 0)
|
|
@@ -216,7 +216,7 @@ export class SdKeyValueTable {
|
|
|
216
216
|
return tableEl;
|
|
217
217
|
return (h("div", { class: {
|
|
218
218
|
'sd-key-value-table__wrapper': true,
|
|
219
|
-
'sd-key-value-table__wrapper--radius-
|
|
219
|
+
'sd-key-value-table__wrapper--radius-useTop': this.radius === 'useTop',
|
|
220
220
|
'sd-key-value-table__wrapper--radius-full': this.radius === 'full',
|
|
221
221
|
}, style: cssVars }, tableEl, h("div", { class: "sd-key-value-table__search-panel" }, h("sd-button", { label: "\uAC80\uC0C9", name: "neutral_outline_md", onSdClick: this.handleSearchClick }))));
|
|
222
222
|
}
|
|
@@ -282,15 +282,15 @@ export class SdKeyValueTable {
|
|
|
282
282
|
"type": "string",
|
|
283
283
|
"mutable": false,
|
|
284
284
|
"complexType": {
|
|
285
|
-
"original": "'default' | '
|
|
286
|
-
"resolved": "\"default\" | \"full\" | \"
|
|
285
|
+
"original": "'default' | 'useTop' | 'full'",
|
|
286
|
+
"resolved": "\"default\" | \"full\" | \"useTop\"",
|
|
287
287
|
"references": {}
|
|
288
288
|
},
|
|
289
289
|
"required": false,
|
|
290
290
|
"optional": false,
|
|
291
291
|
"docs": {
|
|
292
292
|
"tags": [],
|
|
293
|
-
"text": "\uD14C\uC774\uBE14 border-radius \uC81C\uC5B4.\n- 'default': \uC804\uCCB4 radius \uC801\uC6A9\n- '
|
|
293
|
+
"text": "\uD14C\uC774\uBE14 border-radius \uC81C\uC5B4.\n- 'default': \uC804\uCCB4 radius \uC801\uC6A9\n- 'useTop': \uC0C1\uB2E8 radius 0 (\uD5E4\uB354\u00B7\uD0ED \uB4F1 \uD558\uB2E8\uC5D0 \uBD99\uC5EC \uC4F8 \uB54C)\n- 'full': \uC0C1\uD558\uB2E8 \uBAA8\uB450 radius 0 (\uC694\uC18C \uC0AC\uC774\uC5D0 \uB07C\uC6CC \uC4F8 \uB54C)"
|
|
294
294
|
},
|
|
295
295
|
"getter": false,
|
|
296
296
|
"setter": false,
|
|
@@ -28,7 +28,7 @@ export class SdLinearProgress {
|
|
|
28
28
|
clipPath: `inset(0 ${100 - this.clampedValue}% 0 0)`,
|
|
29
29
|
};
|
|
30
30
|
const valueText = `${Math.round(this.clampedValue)}%`;
|
|
31
|
-
return (h(Host, { key: '
|
|
31
|
+
return (h(Host, { key: '1e6aa9c81d3e9516a2f986d3f209df005de38f48', style: hostStyle }, h("div", { key: '06115d6245603c7ae54d892a23074f34db203592', class: 'sd-linear-progress__track' }, h("div", { key: '353549cb3c885cef86f114830599f375bfad8e50', class: 'sd-linear-progress__fill', style: fillStyle }), !this.indeterminate && (h("span", { key: '61afec063cd8f6ccaca27217fe7b599926245192', class: 'sd-linear-progress__value sd-linear-progress__value--on-track' }, valueText)), !this.indeterminate && (h("span", { key: 'fec238b0a6c73e06db3e53c019319a21b62e2836', class: 'sd-linear-progress__value sd-linear-progress__value--on-fill', style: valueOnFillStyle }, valueText))), this.label && h("span", { key: '668f63765b78c1047e3b850f3a17d6b2a1b9bfd4', class: 'sd-linear-progress__label' }, this.label)));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "sd-linear-progress"; }
|
|
34
34
|
static get originalStyleUrls() {
|
|
@@ -10,10 +10,10 @@ export class SdLoadingContainer {
|
|
|
10
10
|
this.visible = false;
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h("div", { key: '
|
|
13
|
+
return (h("div", { key: '6525405e4edafd9257be9887cca824a436b2807c', class: {
|
|
14
14
|
'sd-loading-container': true,
|
|
15
15
|
'sd-loading-container--visible': this.visible,
|
|
16
|
-
}, "aria-hidden": this.visible ? 'false' : 'true' }, h("div", { key: '
|
|
16
|
+
}, "aria-hidden": this.visible ? 'false' : 'true' }, h("div", { key: 'd5f1e1e3df8b704d4a5dabe8cf7b50cc07a2699a', class: "sd-loading-container__backdrop" }), h("div", { key: '40dce62049e04a997b982ab65b47a755b6e917c7', class: "sd-loading-container__content" }, h("sd-circle-progress", { key: '9cb7a1ed52433f2d0982ceef1a298b1367a99dd4', indeterminate: true, type: "inverse" }), this.message && (h("p", { key: 'bc581b692122ef5553e4e8eb99056b89257eb6d9', class: "sd-loading-container__message" }, this.message)))));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "sd-loading-container"; }
|
|
19
19
|
static get originalStyleUrls() {
|
|
@@ -46,7 +46,7 @@ export class SdLoadingModal {
|
|
|
46
46
|
'--sd-loading-modal-width': this.toCssSize(this.width) ?? `${LOADING_MODAL_LAYOUT.minWidth}px`,
|
|
47
47
|
'--sd-loading-modal-height': this.toCssSize(this.height) ?? `${LOADING_MODAL_LAYOUT.minHeight}px`,
|
|
48
48
|
};
|
|
49
|
-
return (h(Host, { key: '
|
|
49
|
+
return (h(Host, { key: '12e8bb40871556dddad6bf3e9daa1703f3a29fc3', style: hostStyle }, h("div", { key: 'b1f0282746a8a4ceabd120a1c366b836edb805c1', class: "sd-loading-modal" }, h("div", { key: '496c034608b3d31557f154f77aa7cb7c2cb9558a', class: "sd-loading-modal__content" }, this.resolvedState === 'loading' ? (this.progress !== undefined ? (h("sd-circle-progress", { value: this.progress })) : (h("sd-circle-progress", { indeterminate: true }))) : (h("sd-icon", { class: "sd-loading-modal__icon", name: "warningOutline", size: LOADING_MODAL_LAYOUT.contentSize, color: LOADING_MODAL_COLORS.errorIcon }))), h("div", { key: 'e0a57ee49f6fe46680a8e2393a00014edd76d36f', class: "sd-loading-modal__message-wrapper" }, Array.isArray(this.resolvedMessage) ? (this.resolvedMessage.map(message => (h("p", { class: "sd-loading-modal__message" }, message)))) : (h("p", { class: "sd-loading-modal__message" }, this.resolvedMessage))), this.useButton && (h("div", { key: 'bd0c91c279a7cd4d58a18f7bfd6e8c345ae00fcf', class: "sd-loading-modal__button" }, h("sd-button", { key: '0d03006a668333de256b2142efc9d0c374bfef45', name: LOADING_MODAL_BUTTON_PRESET, label: this.resolvedButtonLabel, onSdClick: this.handleClick }))))));
|
|
50
50
|
}
|
|
51
51
|
static get is() { return "sd-loading-modal"; }
|
|
52
52
|
static get originalStyleUrls() {
|
|
@@ -2,6 +2,7 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { isTopInteractiveModal, registerModal, requestCloseForModal, setModalInteractive, unregisterModal, } from "../../utils/modal-stack";
|
|
3
3
|
let modalIdCounter = 0;
|
|
4
4
|
const ANIMATION_DURATION = 350;
|
|
5
|
+
const FOCUSABLE_SELECTOR = 'a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])';
|
|
5
6
|
export class SdModalContainer {
|
|
6
7
|
el;
|
|
7
8
|
autoRemove = false;
|
|
@@ -68,6 +69,7 @@ export class SdModalContainer {
|
|
|
68
69
|
return;
|
|
69
70
|
this.entries = this.entries.map(e => (e.id === id ? { ...e, backdropVisible: true } : e));
|
|
70
71
|
modalEl.classList.add('sd-modal-container__modal--visible');
|
|
72
|
+
this.focusInitialElement(modalEl);
|
|
71
73
|
});
|
|
72
74
|
});
|
|
73
75
|
}
|
|
@@ -97,7 +99,14 @@ export class SdModalContainer {
|
|
|
97
99
|
this.applyProps(entry.modalEl, props);
|
|
98
100
|
}
|
|
99
101
|
mountEntry(entry) {
|
|
100
|
-
|
|
102
|
+
const activeElement = typeof document !== 'undefined' ? document.activeElement : null;
|
|
103
|
+
this.entries = [
|
|
104
|
+
...(this.entries ?? []),
|
|
105
|
+
{
|
|
106
|
+
...entry,
|
|
107
|
+
previousActiveElement: activeElement,
|
|
108
|
+
},
|
|
109
|
+
];
|
|
101
110
|
registerModal({
|
|
102
111
|
id: entry.id,
|
|
103
112
|
persistent: entry.persistent,
|
|
@@ -155,6 +164,7 @@ export class SdModalContainer {
|
|
|
155
164
|
clearTimeout(currentEntry.dismissTimerId);
|
|
156
165
|
currentEntry.modalEl.remove();
|
|
157
166
|
unregisterModal(id);
|
|
167
|
+
this.restoreFocus(currentEntry.previousActiveElement);
|
|
158
168
|
currentEntry.modalRef._triggerDismissed();
|
|
159
169
|
this.layerRefs.delete(id);
|
|
160
170
|
this.entries = (this.entries ?? []).filter(e => e.id !== id);
|
|
@@ -240,6 +250,44 @@ export class SdModalContainer {
|
|
|
240
250
|
return;
|
|
241
251
|
requestCloseForModal(id);
|
|
242
252
|
}
|
|
253
|
+
/**
|
|
254
|
+
* 모달이 열릴 때 트리거 요소(버튼 등)에 남아 있던 포커스를 모달 내부로
|
|
255
|
+
* 이동시킨다. 이를 하지 않으면 모달을 연 버튼이 계속 포커스를 가져,
|
|
256
|
+
* Enter 키를 누를 때마다 트리거가 재실행되어 모달이 중첩으로 쌓인다.
|
|
257
|
+
*/
|
|
258
|
+
focusInitialElement(modalEl) {
|
|
259
|
+
const target = this.getInitialFocusTarget(modalEl);
|
|
260
|
+
target?.focus();
|
|
261
|
+
}
|
|
262
|
+
getInitialFocusTarget(modalEl) {
|
|
263
|
+
const explicit = modalEl.querySelector('[autofocus]');
|
|
264
|
+
if (explicit)
|
|
265
|
+
return explicit;
|
|
266
|
+
// 각 모달 타입의 메인(주요 액션) 버튼에 우선 포커스해 Enter 로 확정 가능하게 한다.
|
|
267
|
+
// confirm/action/loading 모두 대응한다.
|
|
268
|
+
const mainButton = modalEl.querySelector([
|
|
269
|
+
'.sd-confirm-modal__button sd-button:last-of-type button',
|
|
270
|
+
'.sd-action-modal__footer > sd-button button',
|
|
271
|
+
'.sd-loading-modal__button sd-button button',
|
|
272
|
+
].join(','));
|
|
273
|
+
if (mainButton)
|
|
274
|
+
return mainButton;
|
|
275
|
+
// 그 외(커스텀 모달 등): 헤더의 닫기(X) 버튼을 제외한 첫 포커스 가능 요소.
|
|
276
|
+
const focusables = Array.from(modalEl.querySelectorAll(FOCUSABLE_SELECTOR));
|
|
277
|
+
const preferred = focusables.find(el => !el.closest('.sd-action-modal__close, .sd-confirm-modal__close-button'));
|
|
278
|
+
if (focusables.length > 0)
|
|
279
|
+
return preferred ?? focusables[0];
|
|
280
|
+
if (!modalEl.hasAttribute('tabindex'))
|
|
281
|
+
modalEl.setAttribute('tabindex', '-1');
|
|
282
|
+
return modalEl;
|
|
283
|
+
}
|
|
284
|
+
restoreFocus(previousActiveElement) {
|
|
285
|
+
if (previousActiveElement &&
|
|
286
|
+
typeof previousActiveElement.focus === 'function' &&
|
|
287
|
+
previousActiveElement.isConnected) {
|
|
288
|
+
previousActiveElement.focus();
|
|
289
|
+
}
|
|
290
|
+
}
|
|
243
291
|
shakeModal(modalEl) {
|
|
244
292
|
const cls = 'sd-modal-container__modal--shake';
|
|
245
293
|
modalEl.classList.remove(cls);
|
|
@@ -275,15 +275,15 @@ export class SdNumberInput {
|
|
|
275
275
|
'--sd-textinput-input-hint-typography-line-height': `${NUMBER_INPUT_HINT.typography.lineHeight}px`,
|
|
276
276
|
'--sd-textinput-input-contents-gap': `${NUMBER_INPUT_CONTENTS_GAP}px`,
|
|
277
277
|
};
|
|
278
|
-
return (h("sd-field", { key: '
|
|
278
|
+
return (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 }, h("div", { key: '8e4e7561a8b42b4a8b2e1f9559f7409d17f32c14', class: {
|
|
279
279
|
'sd-number-input__content': true,
|
|
280
280
|
'sd-number-input__content--no-stepper': !this.useButton,
|
|
281
|
-
} }, this.useButton && (h("button", { key: '
|
|
281
|
+
} }, this.useButton && (h("button", { key: '642a5ce069d0af6347ecdbbb32c67ce2d8967cf4', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--decrement", disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, h("sd-icon", { key: 'd321af0b38dc8771ca58b52d079fe440551b4efc', name: "minus", size: iconSize, color: this.isDecrementDisabled()
|
|
282
282
|
? NUMBER_INPUT_STEPPER.icon.disabled
|
|
283
|
-
: NUMBER_INPUT_STEPPER.icon.default }))), this.inputPrefix && h("span", { key: '
|
|
283
|
+
: NUMBER_INPUT_STEPPER.icon.default }))), this.inputPrefix && h("span", { key: '5b84c95d1e4e8e151c9c71b8ff6513185e97dbf4', class: "sd-number-input__prefix" }, this.inputPrefix), 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: {
|
|
284
284
|
textAlign: this.useButton ? 'center' : 'right',
|
|
285
285
|
...this.inputStyle,
|
|
286
|
-
} }), this.inputSuffix && h("span", { key: '
|
|
286
|
+
} }), this.inputSuffix && h("span", { key: 'd24110a5913272b0379f36823507c3c6ea4102be', class: "sd-number-input__suffix" }, this.inputSuffix), this.useButton && (h("button", { key: '2bcf9b96f875322b269630f14bbec6c64d55f042', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--increment", disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, h("sd-icon", { key: '809fb4ae2f33c4812bf329abc7dc1a9f78e9dd81', name: "add", size: iconSize, color: this.isIncrementDisabled()
|
|
287
287
|
? NUMBER_INPUT_STEPPER.icon.disabled
|
|
288
288
|
: NUMBER_INPUT_STEPPER.icon.default }))))));
|
|
289
289
|
}
|
|
@@ -83,13 +83,13 @@ export class SdPagination {
|
|
|
83
83
|
'--sd-pagination-bg-selected': PAGINATION_COLORS.bgSelected,
|
|
84
84
|
'--sd-pagination-item-width': `${this.buttonWidth}px`,
|
|
85
85
|
};
|
|
86
|
-
return (h("div", { key: '
|
|
86
|
+
return (h("div", { key: '8a2219bbc3a17951ed66501e7246f230f0495e74', class: {
|
|
87
87
|
'sd-pagination': true,
|
|
88
88
|
'sd-pagination--simple': this.simple,
|
|
89
|
-
}, style: cssVars }, h("div", { key: '
|
|
89
|
+
}, style: cssVars }, h("div", { key: '7e9ddb98aff7506fc3b6053d84c1be211e3d1ff7', class: "sd-pagination__group sd-pagination__group--prev" }, this.renderPrevButtons()), this.simple ? (h("div", { class: "sd-pagination__info" }, h("span", { class: "sd-pagination__current" }, this.currentPage), h("span", { class: "sd-pagination__divider" }, "/"), h("span", { class: "sd-pagination__last" }, this.lastPage))) : (h("div", { class: "sd-pagination__numbers" }, this.pageNumbers.map(n => (h("button", { type: "button", "aria-current": this.currentPage === n ? 'page' : undefined, class: {
|
|
90
90
|
'sd-pagination__item': true,
|
|
91
91
|
'sd-pagination__item--selected': this.currentPage === n,
|
|
92
|
-
}, onClick: () => this.handlePageChange(n) }, n))))), h("div", { key: '
|
|
92
|
+
}, onClick: () => this.handlePageChange(n) }, n))))), h("div", { key: '937554ea8d3ae71da85e2c1f49d82c99658141f0', class: "sd-pagination__group sd-pagination__group--next" }, this.renderNextButtons())));
|
|
93
93
|
}
|
|
94
94
|
static get is() { return "sd-pagination"; }
|
|
95
95
|
static get originalStyleUrls() {
|
|
@@ -36,7 +36,7 @@ export class SdPopup {
|
|
|
36
36
|
...DEFAULT_SUBMIT_BUTTON_PROPS,
|
|
37
37
|
...this.submitButtonProps,
|
|
38
38
|
};
|
|
39
|
-
return (h("div", { key: '
|
|
39
|
+
return (h("div", { key: 'fd14b75d27d3006978ceae9287486d9716bbbf5a', class: `sd-popup sd-popup--${this.type}`, style: cssVars }, h("header", { key: 'ac0222dc9512b99cd1d1b4684b9775cd462f39fa', class: "sd-popup__header" }, h("h2", { key: 'a11bea9fac5828161090d09d06d6e1c54c390392', class: "sd-popup__title" }, this.popupTitle)), h("div", { key: 'ced8961a853cdf014d602c235cfc839a648fb19e', class: "sd-popup__body" }, h("slot", { key: '142807fd74e8b32a31ffb7ed8f3dfdcb07a6a1ba' })), this.useFooter && (h("footer", { key: '35a6b42e82ec13890b4fa56bda5b9781adeff229', class: "sd-popup__footer" }, h("div", { key: '44b2471e0f302bd001fdf1e1d72485dff4af094f', class: "sd-popup__footer-slot sd-popup__footer-slot--left" }, h("slot", { key: 'd1c8e29b60eb7ce86639e336c99a48a67437103a', name: "footer-left" })), h("sd-button", { key: '67b0a8530cae73e344cdae2ac0cb48fa3bdf4827', ...submitButtonProps, class: "sd-popup__submit", onSdClick: () => this.submit.emit() })))));
|
|
40
40
|
}
|
|
41
41
|
static get is() { return "sd-popup"; }
|
|
42
42
|
static get originalStyleUrls() {
|
|
@@ -7,6 +7,7 @@ export class SdPortal {
|
|
|
7
7
|
viewportPadding = 0;
|
|
8
8
|
zIndex = 998;
|
|
9
9
|
open = false;
|
|
10
|
+
placement = 'bottom';
|
|
10
11
|
close;
|
|
11
12
|
container;
|
|
12
13
|
wrapper;
|
|
@@ -122,10 +123,20 @@ export class SdPortal {
|
|
|
122
123
|
const wrapperRect = this.wrapper.getBoundingClientRect();
|
|
123
124
|
const availableBelow = viewport.height - parentRect.bottom - offset[1] - viewportPadding;
|
|
124
125
|
const availableAbove = parentRect.top - offset[1] - viewportPadding;
|
|
125
|
-
|
|
126
|
+
const preferTop = (this.placement ?? 'bottom') === 'top';
|
|
127
|
+
let top;
|
|
126
128
|
let left = parentRect.left + offset[0];
|
|
127
|
-
if (
|
|
129
|
+
if (preferTop) {
|
|
128
130
|
top = parentRect.top - wrapperRect.height - offset[1];
|
|
131
|
+
if (availableAbove < wrapperRect.height && availableBelow > availableAbove) {
|
|
132
|
+
top = parentRect.bottom + offset[1];
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
top = parentRect.bottom + offset[1];
|
|
137
|
+
if (availableBelow < wrapperRect.height && availableAbove > availableBelow) {
|
|
138
|
+
top = parentRect.top - wrapperRect.height - offset[1];
|
|
139
|
+
}
|
|
129
140
|
}
|
|
130
141
|
const minTop = viewportPadding;
|
|
131
142
|
const maxTop = viewport.height - viewportPadding - wrapperRect.height;
|
|
@@ -224,7 +235,7 @@ export class SdPortal {
|
|
|
224
235
|
this.close.emit();
|
|
225
236
|
}
|
|
226
237
|
render() {
|
|
227
|
-
return h("slot", { key: '
|
|
238
|
+
return h("slot", { key: '911d01b26a26a4bb4d7c4a15b51755acb9615c3a' });
|
|
228
239
|
}
|
|
229
240
|
static get is() { return "sd-portal"; }
|
|
230
241
|
static get properties() {
|
|
@@ -354,6 +365,26 @@ export class SdPortal {
|
|
|
354
365
|
"reflect": false,
|
|
355
366
|
"attribute": "open",
|
|
356
367
|
"defaultValue": "false"
|
|
368
|
+
},
|
|
369
|
+
"placement": {
|
|
370
|
+
"type": "string",
|
|
371
|
+
"mutable": false,
|
|
372
|
+
"complexType": {
|
|
373
|
+
"original": "'top' | 'bottom'",
|
|
374
|
+
"resolved": "\"bottom\" | \"top\"",
|
|
375
|
+
"references": {}
|
|
376
|
+
},
|
|
377
|
+
"required": false,
|
|
378
|
+
"optional": false,
|
|
379
|
+
"docs": {
|
|
380
|
+
"tags": [],
|
|
381
|
+
"text": ""
|
|
382
|
+
},
|
|
383
|
+
"getter": false,
|
|
384
|
+
"setter": false,
|
|
385
|
+
"reflect": false,
|
|
386
|
+
"attribute": "placement",
|
|
387
|
+
"defaultValue": "'bottom'"
|
|
357
388
|
}
|
|
358
389
|
};
|
|
359
390
|
}
|
|
@@ -71,7 +71,7 @@ export class SdSelectListItem {
|
|
|
71
71
|
return (
|
|
72
72
|
// 키보드 네비게이션은 부모 listbox 의 ArrowUp/Down + Enter 가 담당. 항목 자체는 role=option, tabindex=-1 으로 표시.
|
|
73
73
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
74
|
-
h("div", { key: '
|
|
74
|
+
h("div", { key: '4322a04d65e4b2e1d82d0a6b09fdf6a57cce79ca', role: "option", tabindex: -1, "aria-selected": this.isSelected === true ? 'true' : 'false', class: {
|
|
75
75
|
'sd-select-list-item': true,
|
|
76
76
|
'sd-select-list-item--group': isGroup,
|
|
77
77
|
'sd-select-list-item--depth1-group': isDepth1Group,
|
|
@@ -81,7 +81,7 @@ export class SdSelectListItem {
|
|
|
81
81
|
'sd-select-list-item--focused': this.isFocused,
|
|
82
82
|
'sd-select-list-item--selectable': this.isSelectable && !this.option.disabled,
|
|
83
83
|
'sd-select-list-item--disabled': !!this.option.disabled,
|
|
84
|
-
}, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (h("sd-checkbox", { key: '
|
|
84
|
+
}, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (h("sd-checkbox", { key: '47ae4bbe3c2fd960dcee0f1157ae8003dc45f205', value: this.isSelected === null ? null : !!this.isSelected, disabled: this.option.disabled, inverse: this.isFocused && this.isSelected !== false, class: "sd-select-list-item__checkbox", onClick: this.handleCheckboxClick, onSdUpdate: this.handleCheckboxUpdate })), isHtmlLabel(this.option.label) ? (h("span", { class: "sd-select-list-item__label", ref: el => el && (el.innerHTML = sanitizeInlineHtml(this.option.label)) })) : (h("span", { class: "sd-select-list-item__label" }, this.option.label)), this.countInfo && (h("span", { key: 'c89ba1e3ef52a1809d1252aaee5a18c40ff7cd61', class: "sd-select-list-item__count" }, "(", this.countInfo.selected, "/", this.countInfo.total, ")"))));
|
|
85
85
|
}
|
|
86
86
|
static get is() { return "sd-select-list-item"; }
|
|
87
87
|
static get originalStyleUrls() {
|