@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-CAxodB5I.js';
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-CAxodB5I.js';
|
|
2
2
|
|
|
3
3
|
const ghostButton = {
|
|
4
4
|
xxs: {
|
|
@@ -112,7 +112,7 @@ const GHOST_BUTTON_DISABLED_COLORS = {
|
|
|
112
112
|
inverse: ghostButtonTokens.ghostButton.inverse.disabled,
|
|
113
113
|
};
|
|
114
114
|
|
|
115
|
-
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{
|
|
115
|
+
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%)}`;
|
|
116
116
|
|
|
117
117
|
const SdGhostButton = class {
|
|
118
118
|
constructor(hostRef) {
|
|
@@ -123,15 +123,16 @@ const SdGhostButton = class {
|
|
|
123
123
|
size = 'sm';
|
|
124
124
|
intent = 'default';
|
|
125
125
|
ariaLabel = '';
|
|
126
|
-
|
|
126
|
+
tooltipText;
|
|
127
127
|
disabled = false;
|
|
128
|
+
get hostEl() { return getElement(this); }
|
|
129
|
+
isTooltipOpen = false;
|
|
128
130
|
click;
|
|
129
131
|
hasWarnedMissingAriaLabel = false;
|
|
130
132
|
componentWillLoad() {
|
|
131
133
|
this.size ??= 'sm';
|
|
132
134
|
this.intent ??= 'default';
|
|
133
135
|
this.ariaLabel ??= '';
|
|
134
|
-
this.tooltipLabel ??= '';
|
|
135
136
|
}
|
|
136
137
|
handleClick = (event) => {
|
|
137
138
|
if (this.disabled) {
|
|
@@ -140,6 +141,10 @@ const SdGhostButton = class {
|
|
|
140
141
|
}
|
|
141
142
|
this.click.emit(event);
|
|
142
143
|
};
|
|
144
|
+
handleMouseEnter = () => { this.isTooltipOpen = true; };
|
|
145
|
+
handleMouseLeave = () => { this.isTooltipOpen = false; };
|
|
146
|
+
handleFocus = () => { this.isTooltipOpen = true; };
|
|
147
|
+
handleBlur = () => { this.isTooltipOpen = false; };
|
|
143
148
|
componentWillRender() {
|
|
144
149
|
this.warnIfMissingAriaLabel();
|
|
145
150
|
}
|
|
@@ -162,23 +167,271 @@ const SdGhostButton = class {
|
|
|
162
167
|
? GHOST_BUTTON_DISABLED_COLORS[intent]
|
|
163
168
|
: GHOST_BUTTON_CONTENT_COLORS[intent];
|
|
164
169
|
const accessibleName = (this.ariaLabel ?? '').trim() || undefined;
|
|
165
|
-
const
|
|
166
|
-
const hasTooltip =
|
|
167
|
-
return (h("button", { key: '
|
|
170
|
+
const tooltipText = (this.tooltipText ?? '').trim();
|
|
171
|
+
const hasTooltip = tooltipText.length > 0;
|
|
172
|
+
return (h("button", { key: '59b95275f6acd737d4b0d5c2187e1d40b3a6543f', class: {
|
|
168
173
|
'sd-ghost-button': true,
|
|
169
174
|
'sd-ghost-button--disabled': this.disabled,
|
|
170
|
-
'sd-ghost-button--with-tooltip': hasTooltip,
|
|
171
175
|
}, type: "button", disabled: this.disabled, "aria-label": accessibleName, style: {
|
|
172
176
|
'--sd-ghost-button-size': `${sizeConfig.size}px`,
|
|
173
177
|
'--sd-ghost-button-radius': `${GHOST_BUTTON_RADIUS[size]}px`,
|
|
174
178
|
'--sd-ghost-button-hover-bg': GHOST_BUTTON_HOVER_BG_COLORS[intent],
|
|
175
179
|
'--sd-ghost-button-hover-opacity': GHOST_BUTTON_HOVER_OPACITY,
|
|
176
180
|
'--sd-ghost-button-accent': GHOST_BUTTON_FOCUS_RING_COLOR,
|
|
177
|
-
}, onClick: this.handleClick }, hasTooltip && (h("
|
|
181
|
+
}, 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 })));
|
|
178
182
|
}
|
|
179
183
|
};
|
|
180
184
|
SdGhostButton.style = sdGhostButtonCss();
|
|
181
185
|
|
|
186
|
+
const SdPortal = class {
|
|
187
|
+
constructor(hostRef) {
|
|
188
|
+
registerInstance(this, hostRef);
|
|
189
|
+
this.close = createEvent(this, "sdClose", 3);
|
|
190
|
+
}
|
|
191
|
+
get hostEl() { return getElement(this); }
|
|
192
|
+
to = 'body';
|
|
193
|
+
parentRef = null;
|
|
194
|
+
offset = [0, 4];
|
|
195
|
+
viewportPadding = 0;
|
|
196
|
+
zIndex = 998;
|
|
197
|
+
open = false;
|
|
198
|
+
placement = 'bottom';
|
|
199
|
+
close;
|
|
200
|
+
container;
|
|
201
|
+
wrapper;
|
|
202
|
+
rafId;
|
|
203
|
+
isInsideClick = false;
|
|
204
|
+
closeTransitionTimer;
|
|
205
|
+
handleObservedScroll = () => this.updatePosition();
|
|
206
|
+
resizeObserver;
|
|
207
|
+
mutationObserver;
|
|
208
|
+
scrollParents = [];
|
|
209
|
+
isObserved = false;
|
|
210
|
+
handleOpenChange() {
|
|
211
|
+
this.syncPortalState();
|
|
212
|
+
}
|
|
213
|
+
componentDidLoad() {
|
|
214
|
+
this.container = this.resolveContainer();
|
|
215
|
+
this.syncPortalState();
|
|
216
|
+
}
|
|
217
|
+
componentDidRender() {
|
|
218
|
+
this.syncPortalState();
|
|
219
|
+
}
|
|
220
|
+
disconnectedCallback() {
|
|
221
|
+
if (this.closeTransitionTimer)
|
|
222
|
+
clearTimeout(this.closeTransitionTimer);
|
|
223
|
+
this.unobserveParent();
|
|
224
|
+
if (this.wrapper?.parentNode) {
|
|
225
|
+
try {
|
|
226
|
+
this.wrapper.parentNode.removeChild(this.wrapper);
|
|
227
|
+
}
|
|
228
|
+
catch {
|
|
229
|
+
// Stencil spec mock DOM can already detach the wrapper before this callback runs.
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
resolveContainer() {
|
|
234
|
+
const el = typeof this.to === 'string' ? document.querySelector(this.to) : this.to;
|
|
235
|
+
return el instanceof HTMLElement ? el : document.body;
|
|
236
|
+
}
|
|
237
|
+
createWrapper() {
|
|
238
|
+
this.wrapper = document.createElement('div');
|
|
239
|
+
Object.assign(this.wrapper.style, {
|
|
240
|
+
position: 'fixed',
|
|
241
|
+
top: '0',
|
|
242
|
+
left: '0',
|
|
243
|
+
zIndex: (this.zIndex ?? 998).toString(),
|
|
244
|
+
opacity: '0',
|
|
245
|
+
transition: 'opacity 0.15s ease-out',
|
|
246
|
+
boxSizing: 'border-box',
|
|
247
|
+
visibility: 'hidden',
|
|
248
|
+
});
|
|
249
|
+
this.container.appendChild(this.wrapper);
|
|
250
|
+
}
|
|
251
|
+
ensureWrapper() {
|
|
252
|
+
if (this.wrapper)
|
|
253
|
+
return;
|
|
254
|
+
this.container ||= this.resolveContainer();
|
|
255
|
+
this.createWrapper();
|
|
256
|
+
this.moveSlotContent();
|
|
257
|
+
}
|
|
258
|
+
syncPortalState() {
|
|
259
|
+
if (!this.open) {
|
|
260
|
+
if (this.wrapper) {
|
|
261
|
+
this.wrapper.style.transition = 'opacity 0.15s ease-out';
|
|
262
|
+
this.wrapper.style.opacity = '0';
|
|
263
|
+
this.wrapper.style.pointerEvents = 'none';
|
|
264
|
+
if (this.closeTransitionTimer)
|
|
265
|
+
clearTimeout(this.closeTransitionTimer);
|
|
266
|
+
this.closeTransitionTimer = setTimeout(() => {
|
|
267
|
+
if (this.wrapper && !this.open) {
|
|
268
|
+
this.wrapper.style.display = 'none';
|
|
269
|
+
}
|
|
270
|
+
}, 150);
|
|
271
|
+
}
|
|
272
|
+
this.unobserveParent();
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
if (this.closeTransitionTimer)
|
|
276
|
+
clearTimeout(this.closeTransitionTimer);
|
|
277
|
+
this.ensureWrapper();
|
|
278
|
+
if (!this.wrapper)
|
|
279
|
+
return;
|
|
280
|
+
this.wrapper.style.display = 'block';
|
|
281
|
+
this.wrapper.style.transition = 'opacity 0.25s ease-out';
|
|
282
|
+
this.wrapper.style.opacity = '0';
|
|
283
|
+
this.wrapper.style.pointerEvents = '';
|
|
284
|
+
this.observeParent();
|
|
285
|
+
this.updatePosition();
|
|
286
|
+
}
|
|
287
|
+
moveSlotContent() {
|
|
288
|
+
if (!this.wrapper)
|
|
289
|
+
return;
|
|
290
|
+
const nodes = Array.from(this.hostEl.childNodes).filter(n => n.nodeType !== Node.COMMENT_NODE);
|
|
291
|
+
nodes.forEach(n => this.wrapper.appendChild(n));
|
|
292
|
+
}
|
|
293
|
+
// 위치 갱신 (scroll / resize)
|
|
294
|
+
updatePosition() {
|
|
295
|
+
if (this.rafId !== undefined)
|
|
296
|
+
cancelAnimationFrame(this.rafId);
|
|
297
|
+
this.rafId = requestAnimationFrame(() => {
|
|
298
|
+
if (!this.parentRef || !this.wrapper)
|
|
299
|
+
return;
|
|
300
|
+
const parentRect = this.parentRef.getBoundingClientRect();
|
|
301
|
+
const viewport = {
|
|
302
|
+
width: window.innerWidth,
|
|
303
|
+
height: window.innerHeight,
|
|
304
|
+
};
|
|
305
|
+
const offset = this.offset ?? [0, 4];
|
|
306
|
+
const viewportPadding = Math.max(0, this.viewportPadding ?? 0);
|
|
307
|
+
const maxWidth = Math.max(viewport.width - viewportPadding * 2, 0);
|
|
308
|
+
const maxHeight = Math.max(viewport.height - viewportPadding * 2, 0);
|
|
309
|
+
this.wrapper.style.maxWidth = `${maxWidth}px`;
|
|
310
|
+
this.wrapper.style.maxHeight = `${maxHeight}px`;
|
|
311
|
+
const wrapperRect = this.wrapper.getBoundingClientRect();
|
|
312
|
+
const availableBelow = viewport.height - parentRect.bottom - offset[1] - viewportPadding;
|
|
313
|
+
const availableAbove = parentRect.top - offset[1] - viewportPadding;
|
|
314
|
+
const preferTop = (this.placement ?? 'bottom') === 'top';
|
|
315
|
+
let top;
|
|
316
|
+
let left = parentRect.left + offset[0];
|
|
317
|
+
if (preferTop) {
|
|
318
|
+
top = parentRect.top - wrapperRect.height - offset[1];
|
|
319
|
+
if (availableAbove < wrapperRect.height && availableBelow > availableAbove) {
|
|
320
|
+
top = parentRect.bottom + offset[1];
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
else {
|
|
324
|
+
top = parentRect.bottom + offset[1];
|
|
325
|
+
if (availableBelow < wrapperRect.height && availableAbove > availableBelow) {
|
|
326
|
+
top = parentRect.top - wrapperRect.height - offset[1];
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
const minTop = viewportPadding;
|
|
330
|
+
const maxTop = viewport.height - viewportPadding - wrapperRect.height;
|
|
331
|
+
if (maxTop < minTop) {
|
|
332
|
+
top = minTop;
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
top = Math.min(Math.max(top, minTop), maxTop);
|
|
336
|
+
}
|
|
337
|
+
if (parentRect.left + wrapperRect.width + offset[0] > viewport.width - viewportPadding) {
|
|
338
|
+
left = parentRect.right - wrapperRect.width - offset[0];
|
|
339
|
+
}
|
|
340
|
+
const minLeft = viewportPadding;
|
|
341
|
+
const maxLeft = viewport.width - viewportPadding - wrapperRect.width;
|
|
342
|
+
if (maxLeft < minLeft) {
|
|
343
|
+
left = minLeft;
|
|
344
|
+
}
|
|
345
|
+
else {
|
|
346
|
+
left = Math.min(Math.max(left, minLeft), maxLeft);
|
|
347
|
+
}
|
|
348
|
+
this.wrapper.style.top = `${top}px`;
|
|
349
|
+
this.wrapper.style.left = `${left}px`;
|
|
350
|
+
this.wrapper.style.visibility = 'visible';
|
|
351
|
+
this.wrapper.style.opacity = '1';
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
// parentRef의 이동 / 크기변경 감지
|
|
355
|
+
observeParent() {
|
|
356
|
+
if (!this.parentRef || this.isObserved)
|
|
357
|
+
return;
|
|
358
|
+
this.observeScrollParents(this.parentRef);
|
|
359
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
360
|
+
this.resizeObserver = new ResizeObserver(() => this.updatePosition());
|
|
361
|
+
this.resizeObserver.observe(this.parentRef);
|
|
362
|
+
}
|
|
363
|
+
if (typeof MutationObserver !== 'undefined') {
|
|
364
|
+
this.mutationObserver = new MutationObserver(() => this.updatePosition());
|
|
365
|
+
this.mutationObserver.observe(document.body, {
|
|
366
|
+
childList: true,
|
|
367
|
+
subtree: true,
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
this.isObserved = true;
|
|
371
|
+
}
|
|
372
|
+
unobserveParent() {
|
|
373
|
+
if (!this.isObserved)
|
|
374
|
+
return;
|
|
375
|
+
this.unobserveScrollParents();
|
|
376
|
+
this.resizeObserver?.disconnect();
|
|
377
|
+
this.resizeObserver = undefined;
|
|
378
|
+
this.mutationObserver?.disconnect();
|
|
379
|
+
this.mutationObserver = undefined;
|
|
380
|
+
this.isObserved = false;
|
|
381
|
+
}
|
|
382
|
+
observeScrollParents(element) {
|
|
383
|
+
const nextScrollParents = this.getScrollParents(element);
|
|
384
|
+
nextScrollParents.forEach(parent => {
|
|
385
|
+
parent.addEventListener('scroll', this.handleObservedScroll, { passive: true });
|
|
386
|
+
});
|
|
387
|
+
this.scrollParents = nextScrollParents;
|
|
388
|
+
}
|
|
389
|
+
unobserveScrollParents() {
|
|
390
|
+
this.scrollParents.forEach(parent => {
|
|
391
|
+
parent.removeEventListener('scroll', this.handleObservedScroll);
|
|
392
|
+
});
|
|
393
|
+
this.scrollParents = [];
|
|
394
|
+
}
|
|
395
|
+
getScrollParents(element) {
|
|
396
|
+
const scrollParents = [];
|
|
397
|
+
let currentElement = element.parentElement;
|
|
398
|
+
while (currentElement) {
|
|
399
|
+
const { overflow, overflowX, overflowY } = getComputedStyle(currentElement);
|
|
400
|
+
const isScrollable = [overflow, overflowX, overflowY].some(value => /(auto|scroll|overlay)/.test(value));
|
|
401
|
+
if (isScrollable) {
|
|
402
|
+
scrollParents.push(currentElement);
|
|
403
|
+
}
|
|
404
|
+
currentElement = currentElement.parentElement;
|
|
405
|
+
}
|
|
406
|
+
return scrollParents;
|
|
407
|
+
}
|
|
408
|
+
isInsideTarget(target) {
|
|
409
|
+
return !!((this.wrapper?.contains(target)) ||
|
|
410
|
+
(this.parentRef?.contains(target)));
|
|
411
|
+
}
|
|
412
|
+
// 외부 클릭 감지
|
|
413
|
+
handleMouseDown(e) {
|
|
414
|
+
this.isInsideClick = this.isInsideTarget(e.target);
|
|
415
|
+
}
|
|
416
|
+
handleWindowClick(e) {
|
|
417
|
+
if (this.isInsideClick) {
|
|
418
|
+
this.isInsideClick = false;
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
if (this.isInsideTarget(e.target))
|
|
422
|
+
return;
|
|
423
|
+
this.close.emit();
|
|
424
|
+
}
|
|
425
|
+
render() {
|
|
426
|
+
return h("slot", { key: '911d01b26a26a4bb4d7c4a15b51755acb9615c3a' });
|
|
427
|
+
}
|
|
428
|
+
static get watchers() { return {
|
|
429
|
+
"open": [{
|
|
430
|
+
"handleOpenChange": 0
|
|
431
|
+
}]
|
|
432
|
+
}; }
|
|
433
|
+
};
|
|
434
|
+
|
|
182
435
|
const tag = {
|
|
183
436
|
xs: {
|
|
184
437
|
height: "20",
|
|
@@ -386,7 +639,7 @@ const SdTag = class {
|
|
|
386
639
|
render() {
|
|
387
640
|
const config = this.resolvedConfig;
|
|
388
641
|
const iconNode = this.renderIcon(config.icon, config.iconSize);
|
|
389
|
-
return (h("span", { key: '
|
|
642
|
+
return (h("span", { key: '3117d8d5f3d9751dc193e426dbab7e0ead9fb369', class: "sd-tag", style: {
|
|
390
643
|
'--sd-tag-background': config.background,
|
|
391
644
|
'--sd-tag-content': config.content,
|
|
392
645
|
'--sd-tag-height': config.height,
|
|
@@ -396,9 +649,9 @@ const SdTag = class {
|
|
|
396
649
|
'--sd-tag-font-weight': config.fontWeight,
|
|
397
650
|
'--sd-tag-line-height': config.lineHeight,
|
|
398
651
|
'--sd-tag-radius': config.radius,
|
|
399
|
-
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '
|
|
652
|
+
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '8c299f140dc5bd026ed52d3f0921939bbf69fdd5', class: "sd-tag__label" }, this.label), this.icon && !this.isLeft && iconNode));
|
|
400
653
|
}
|
|
401
654
|
};
|
|
402
655
|
SdTag.style = sdTagCss();
|
|
403
656
|
|
|
404
|
-
export { SdGhostButton as sd_ghost_button, SdTag as sd_tag };
|
|
657
|
+
export { SdGhostButton as sd_ghost_button, SdPortal as sd_portal, SdTag as sd_tag };
|
|
@@ -7,6 +7,7 @@ const KEY_VALUE_TABLE_LAYOUT = {
|
|
|
7
7
|
rowHeight: Number(t.keyValue.height),
|
|
8
8
|
thWidth: 120,
|
|
9
9
|
borderRadius: Number(t.radius),
|
|
10
|
+
thPaddingX: Number(t.header.paddingX),
|
|
10
11
|
padding: Number(t.keyValue.body.padding),
|
|
11
12
|
helpIconSize: 16,
|
|
12
13
|
requiredIconSize: 12,
|
|
@@ -36,7 +37,7 @@ const KEY_VALUE_TABLE_TYPOGRAPHY = {
|
|
|
36
37
|
tdLineHeight: Number(t.body.typography.lineHeight),
|
|
37
38
|
};
|
|
38
39
|
|
|
39
|
-
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--
|
|
40
|
+
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)}`;
|
|
40
41
|
|
|
41
42
|
const SdKeyValueTable = class {
|
|
42
43
|
constructor(hostRef) {
|
|
@@ -54,10 +55,12 @@ const SdKeyValueTable = class {
|
|
|
54
55
|
*/
|
|
55
56
|
search = false;
|
|
56
57
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
58
|
+
* 테이블 border-radius 제어.
|
|
59
|
+
* - 'default': 전체 radius 적용
|
|
60
|
+
* - 'useTop': 상단 radius 0 (헤더·탭 등 하단에 붙여 쓸 때)
|
|
61
|
+
* - 'full': 상하단 모두 radius 0 (요소 사이에 끼워 쓸 때)
|
|
59
62
|
*/
|
|
60
|
-
|
|
63
|
+
radius = 'default';
|
|
61
64
|
change;
|
|
62
65
|
searchEvent;
|
|
63
66
|
emit = (name, value) => {
|
|
@@ -205,6 +208,7 @@ const SdKeyValueTable = class {
|
|
|
205
208
|
'--sd-kvt-row-height': `${KEY_VALUE_TABLE_LAYOUT.rowHeight}px`,
|
|
206
209
|
'--sd-kvt-th-width': `${KEY_VALUE_TABLE_LAYOUT.thWidth}px`,
|
|
207
210
|
'--sd-kvt-radius': `${KEY_VALUE_TABLE_LAYOUT.borderRadius}px`,
|
|
211
|
+
'--sd-kvt-th-padding-x': `${KEY_VALUE_TABLE_LAYOUT.thPaddingX}px`,
|
|
208
212
|
'--sd-kvt-padding': `${KEY_VALUE_TABLE_LAYOUT.padding}px`,
|
|
209
213
|
'--sd-kvt-gap': `${KEY_VALUE_TABLE_LAYOUT.gap}px`,
|
|
210
214
|
'--sd-kvt-label-gap': `${KEY_VALUE_TABLE_LAYOUT.labelGap}px`,
|
|
@@ -231,7 +235,8 @@ const SdKeyValueTable = class {
|
|
|
231
235
|
const maxCols = this.computeMaxCols(autoSkip);
|
|
232
236
|
const tableEl = (h("table", { class: {
|
|
233
237
|
'sd-key-value-table': true,
|
|
234
|
-
'sd-key-value-table--
|
|
238
|
+
'sd-key-value-table--radius-useTop': this.radius === 'useTop',
|
|
239
|
+
'sd-key-value-table--radius-full': this.radius === 'full',
|
|
235
240
|
}, style: cssVars }, h("colgroup", null, Array.from({ length: maxCols }, (_, i) => {
|
|
236
241
|
if (i % 2 !== 0)
|
|
237
242
|
return h("col", { key: `col-${i}` });
|
|
@@ -255,7 +260,8 @@ const SdKeyValueTable = class {
|
|
|
255
260
|
return tableEl;
|
|
256
261
|
return (h("div", { class: {
|
|
257
262
|
'sd-key-value-table__wrapper': true,
|
|
258
|
-
'sd-key-value-table__wrapper--
|
|
263
|
+
'sd-key-value-table__wrapper--radius-useTop': this.radius === 'useTop',
|
|
264
|
+
'sd-key-value-table__wrapper--radius-full': this.radius === 'full',
|
|
259
265
|
}, 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 }))));
|
|
260
266
|
}
|
|
261
267
|
};
|
|
@@ -47,7 +47,7 @@ const SdLinearProgress = class {
|
|
|
47
47
|
clipPath: `inset(0 ${100 - this.clampedValue}% 0 0)`,
|
|
48
48
|
};
|
|
49
49
|
const valueText = `${Math.round(this.clampedValue)}%`;
|
|
50
|
-
return (h(Host, { key: '
|
|
50
|
+
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)));
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
SdLinearProgress.style = sdLinearProgressCss();
|
|
@@ -16,10 +16,10 @@ const SdLoadingContainer = class {
|
|
|
16
16
|
this.visible = false;
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (h("div", { key: '
|
|
19
|
+
return (h("div", { key: '6525405e4edafd9257be9887cca824a436b2807c', class: {
|
|
20
20
|
'sd-loading-container': true,
|
|
21
21
|
'sd-loading-container--visible': this.visible,
|
|
22
|
-
}, "aria-hidden": this.visible ? 'false' : 'true' }, h("div", { key: '
|
|
22
|
+
}, "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)))));
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
SdLoadingContainer.style = sdLoadingContainerCss();
|
|
@@ -152,13 +152,13 @@ const SdPagination = class {
|
|
|
152
152
|
'--sd-pagination-bg-selected': PAGINATION_COLORS.bgSelected,
|
|
153
153
|
'--sd-pagination-item-width': `${this.buttonWidth}px`,
|
|
154
154
|
};
|
|
155
|
-
return (h("div", { key: '
|
|
155
|
+
return (h("div", { key: '8a2219bbc3a17951ed66501e7246f230f0495e74', class: {
|
|
156
156
|
'sd-pagination': true,
|
|
157
157
|
'sd-pagination--simple': this.simple,
|
|
158
|
-
}, style: cssVars }, h("div", { key: '
|
|
158
|
+
}, 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: {
|
|
159
159
|
'sd-pagination__item': true,
|
|
160
160
|
'sd-pagination__item--selected': this.currentPage === n,
|
|
161
|
-
}, onClick: () => this.handlePageChange(n) }, n))))), h("div", { key: '
|
|
161
|
+
}, onClick: () => this.handlePageChange(n) }, n))))), h("div", { key: '937554ea8d3ae71da85e2c1f49d82c99658141f0', class: "sd-pagination__group sd-pagination__group--next" }, this.renderNextButtons())));
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
SdPagination.style = sdPaginationCss();
|
|
@@ -213,9 +213,9 @@ const SdTbody = class {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
render() {
|
|
216
|
-
return (h(Host, { key: '
|
|
216
|
+
return (h(Host, { key: 'ae49b4a7e18afd3d44d07e7da6c3663a6a043796', slot: `${this.tableId}-body` }, h("tbody", { key: '7275cf9214f6917c5437b8a72a06cde3ca48dc8c', class: { tbody: true } }, [
|
|
217
217
|
this.topSpacerHeight > 0 && (h("tr", { key: "spacer-top", class: "tbody__spacer", style: { height: `${this.topSpacerHeight}px`, display: 'block' } })),
|
|
218
|
-
h("slot", { key: '
|
|
218
|
+
h("slot", { key: '6455be878c24df5371e094fbfe9687ddb992e0e6' }),
|
|
219
219
|
this.bottomSpacerHeight > 0 && (h("tr", { key: "spacer-bottom", class: "tbody__spacer", style: { height: `${this.bottomSpacerHeight}px`, display: 'block' } })),
|
|
220
220
|
])));
|
|
221
221
|
}
|
|
@@ -390,16 +390,16 @@ const SdThead = class {
|
|
|
390
390
|
'--table-border-color': TABLE_BORDER.color,
|
|
391
391
|
'--table-border-width': `${TABLE_BORDER.width}px`,
|
|
392
392
|
};
|
|
393
|
-
return (h(Host, { key: '
|
|
393
|
+
return (h(Host, { key: 'c25f6f9704c079d4cb93da7e65c8c15b6dedcb67', slot: `${this.tableId}-head`, style: headStyle }, h("thead", { key: 'd91019378caafa2ec32dfa838eaa4d1fe815fb0d', class: {
|
|
394
394
|
'thead': true,
|
|
395
395
|
'thead--sticky': this._stickyHeader,
|
|
396
|
-
} }, h("tr", { key: '
|
|
396
|
+
} }, h("tr", { key: '84e581f5c564693d356f56525f57d6b1da211442', class: "tr" }, this._selectable && (h("th", { key: 'fb92e978229c32d560f46af4e90e0980c9c0a213', class: {
|
|
397
397
|
'th': true,
|
|
398
398
|
'th--selected': true,
|
|
399
399
|
'sticky-left': true,
|
|
400
400
|
'sticky-left-edge': stickyLeftCount === 0,
|
|
401
401
|
'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
|
|
402
|
-
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '
|
|
402
|
+
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '157f59b56a4ef2a8529318c8beaf6f59b91e12f0', value: this.getIsAllChecked(), disabled: safeRows.length === 0, onSdUpdate: (e) => this.handleSelectAll(e.detail) }), h("div", { key: 'b65e099ebe4940b26cc251961e66a375400f2379', class: "th__bar" }))), stickyLeftCols.map((col, idx) => (h("th", { key: col.name, class: {
|
|
403
403
|
'th': true,
|
|
404
404
|
[`${col.thClass}`]: Boolean(col.thClass),
|
|
405
405
|
'sticky-left': true,
|
|
@@ -103,7 +103,7 @@ const SdPopup = class {
|
|
|
103
103
|
...DEFAULT_SUBMIT_BUTTON_PROPS,
|
|
104
104
|
...this.submitButtonProps,
|
|
105
105
|
};
|
|
106
|
-
return (h("div", { key: '
|
|
106
|
+
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() })))));
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
109
|
SdPopup.style = sdPopupCss();
|
|
@@ -79,7 +79,7 @@ const SdSelectListItem = class {
|
|
|
79
79
|
return (
|
|
80
80
|
// 키보드 네비게이션은 부모 listbox 의 ArrowUp/Down + Enter 가 담당. 항목 자체는 role=option, tabindex=-1 으로 표시.
|
|
81
81
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
82
|
-
h("div", { key: '
|
|
82
|
+
h("div", { key: '4322a04d65e4b2e1d82d0a6b09fdf6a57cce79ca', role: "option", tabindex: -1, "aria-selected": this.isSelected === true ? 'true' : 'false', class: {
|
|
83
83
|
'sd-select-list-item': true,
|
|
84
84
|
'sd-select-list-item--group': isGroup,
|
|
85
85
|
'sd-select-list-item--depth1-group': isDepth1Group,
|
|
@@ -89,7 +89,7 @@ const SdSelectListItem = class {
|
|
|
89
89
|
'sd-select-list-item--focused': this.isFocused,
|
|
90
90
|
'sd-select-list-item--selectable': this.isSelectable && !this.option.disabled,
|
|
91
91
|
'sd-select-list-item--disabled': !!this.option.disabled,
|
|
92
|
-
}, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (h("sd-checkbox", { key: '
|
|
92
|
+
}, 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, ")"))));
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
SdSelectListItem.style = sdSelectListItemCss();
|
|
@@ -142,15 +142,15 @@ const SdSelectListItemSearch = class {
|
|
|
142
142
|
clearTimeout(this.debounceTimer);
|
|
143
143
|
}
|
|
144
144
|
render() {
|
|
145
|
-
return (h("div", { key: '
|
|
145
|
+
return (h("div", { key: '94215143f5e47887943c726147739cdb1a9fcbf7', class: {
|
|
146
146
|
'sd-select-list-item-search': true,
|
|
147
147
|
'sd-select-list-item-search--scrolled': this.isScrolled,
|
|
148
|
-
} }, h("div", { key: '
|
|
148
|
+
} }, h("div", { key: '0ff422b93d0e15f2425ef760706ae0e6e2cb79f6', class: "sd-select-list-item-search__inner" }, h("sd-icon", { key: 'cc3468339c8b76103b67182309fa3aa2baf24380', name: "search", size: 16, color: "grey_70", class: "sd-select-list-item-search__icon" }), h("input", { key: 'acc468ede845d0f5890c7908311443ea2aa156cf', ref: el => {
|
|
149
149
|
this.inputEl = el;
|
|
150
|
-
}, type: "text", class: "sd-select-list-item-search__input", placeholder: "\uAC80\uC0C9\uC5B4 \uC785\uB825", value: this.searchText, onInput: this.handleInput, onFocus: () => this.searchFocus.emit() }), h("button", { key: '
|
|
150
|
+
}, type: "text", class: "sd-select-list-item-search__input", placeholder: "\uAC80\uC0C9\uC5B4 \uC785\uB825", value: this.searchText, onInput: this.handleInput, onFocus: () => this.searchFocus.emit() }), h("button", { key: 'b1f1539aea4eb76458794dcb041e53c7af7b91e2', type: "button", class: {
|
|
151
151
|
'sd-select-list-item-search__clear': true,
|
|
152
152
|
'sd-select-list-item-search__clear--hidden': this.searchText === '',
|
|
153
|
-
}, onClick: this.handleClear, tabindex: this.searchText !== '' ? 0 : -1, "aria-hidden": this.searchText !== '' ? 'false' : 'true' }, h("sd-icon", { key: '
|
|
153
|
+
}, onClick: this.handleClear, tabindex: this.searchText !== '' ? 0 : -1, "aria-hidden": this.searchText !== '' ? 'false' : 'true' }, h("sd-icon", { key: 'a137986e0c801a6cf95e279edeb6a9b21cf00170', name: "close", size: 12, color: "#888888" })))));
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
156
|
SdSelectListItemSearch.style = sdSelectListItemSearchCss();
|
|
@@ -265,15 +265,15 @@ const SdSelect = class {
|
|
|
265
265
|
this.closeDropdown();
|
|
266
266
|
},
|
|
267
267
|
};
|
|
268
|
-
return (h("sd-field", { key: '
|
|
268
|
+
return (h("sd-field", { key: 'f95dc4008dd1f252f8cb41637aa817bdd4d72ba0', 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, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, onMouseEnter: () => {
|
|
269
269
|
this.hovered = true;
|
|
270
270
|
}, onMouseLeave: () => {
|
|
271
271
|
this.hovered = false;
|
|
272
|
-
} }, h("div", { key: '
|
|
272
|
+
} }, h("div", { key: 'f12b88dc846a01fc2076242623ac1376ebc0105c', class: "sd-select", ref: el => {
|
|
273
273
|
this.triggerRef = el;
|
|
274
|
-
} }, h("sd-select-trigger", { key: '
|
|
274
|
+
} }, h("sd-select-trigger", { key: '8cef3403ca0a0430c3ce9f8255c98f0e28142d80', ref: el => {
|
|
275
275
|
this.triggerComponentRef = el;
|
|
276
|
-
}, displayText: this.displayText, placeholder: this.placeholder ?? '선택', disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick, onSdTriggerFocus: this.handleTriggerFocus, onSdTriggerBlur: this.handleTriggerBlur })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '
|
|
276
|
+
}, displayText: this.displayText, placeholder: this.placeholder ?? '선택', disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick, onSdTriggerFocus: this.handleTriggerFocus, onSdTriggerBlur: this.handleTriggerBlur })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '417194938ff7aac0b22abbba621342dbe767b146', ...portalProps }, h("sd-select-listbox", { key: '0c311407fdc72f37fa7dddf48fdfbaab668a18f4', type: this.type, options: this.options, value: this.value, emitValue: this.emitValue, useSearch: this.useSearch, useSelectAll: this.useSelectAll, triggerWidth: this.dropdownWidth || this.triggerWidth, maxWidth: this.resolvedMaxDropdownWidth, maxHeight: this.resolvedDropdownHeight, onSdOptionSelect: event => this.handleOptionSelect(event.detail) })))));
|
|
277
277
|
}
|
|
278
278
|
static get watchers() { return {
|
|
279
279
|
"isOpen": [{
|
|
@@ -640,9 +640,9 @@ const SdSelectListbox = class {
|
|
|
640
640
|
'--listbox-max-height': this.maxHeight ?? '260px',
|
|
641
641
|
'--listbox-radius': `${LIST_BOX_LAYOUT.radius}px`,
|
|
642
642
|
};
|
|
643
|
-
return (h("div", { key: '
|
|
643
|
+
return (h("div", { key: '77f3df8e7105f08340cf46ee0ce146d48b927228', class: "sd-select-listbox", style: cssVars }, this.showSearch && (h("sd-select-list-item-search", { key: 'bd79903b4799e6a074895e0ea2b0987a4775a8e0', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), h("div", { key: '08c5e0a70837025d62b08d85b0f5044b826dc133', class: "sd-select-listbox__list", onScroll: this.handleScroll, ref: el => {
|
|
644
644
|
this.listEl = el;
|
|
645
|
-
} }, this.showSelectAll && (h("sd-select-list-item", { key: '
|
|
645
|
+
} }, this.showSelectAll && (h("sd-select-list-item", { key: '918c481cc05f4839d6a133e68a90c68ddfac5fba', option: SdSelectListbox.SELECT_ALL_OPTION, depth: 1, isSelected: this.selectAllState, isFocused: this.isOptionFocused(SdSelectListbox.SELECT_ALL_OPTION), useCheckbox: true, onSdListItemClick: this.handleSelectAllClick, onMouseEnter: () => this.handleOptionHover(SdSelectListbox.SELECT_ALL_OPTION) })), this.isEmpty ? (h("div", { class: "sd-select-listbox__empty" }, EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (h("sd-select-list-item", { option: option, depth: 1, isSelected: this.isOptionSelected(option), isFocused: this.isOptionFocused(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick, onMouseEnter: () => this.handleOptionHover(option) })))))));
|
|
646
646
|
}
|
|
647
647
|
static get watchers() { return {
|
|
648
648
|
"searchKeyword": [{
|
|
@@ -702,7 +702,7 @@ const SdSelectTrigger = class {
|
|
|
702
702
|
? SELECT_COLORS.icon.disabled
|
|
703
703
|
: SELECT_COLORS.icon.default,
|
|
704
704
|
};
|
|
705
|
-
return (h("div", { key: '
|
|
705
|
+
return (h("div", { key: '361344e040569fa6f7c2b5d16762d9b2120ca50e', ref: el => {
|
|
706
706
|
this.triggerEl = el;
|
|
707
707
|
}, role: "button", "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, class: {
|
|
708
708
|
'sd-select-trigger': true,
|
|
@@ -713,7 +713,7 @@ const SdSelectTrigger = class {
|
|
|
713
713
|
e.preventDefault();
|
|
714
714
|
this.handleClick();
|
|
715
715
|
}
|
|
716
|
-
}, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '
|
|
716
|
+
}, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '3ccbf7c188ca90dc8ba94f10ef2fa3f7cea70076', class: "sd-select-trigger__content" }, hasValue && isHtmlLabel(this.displayText) ? (h("span", { class: "sd-select-trigger__text", ref: el => el && (el.innerHTML = sanitizeInlineHtml(this.displayText)) })) : (h("span", { class: "sd-select-trigger__text" }, hasValue ? this.displayText : (this.placeholder ?? '선택'))), h("sd-icon", { key: '623f1f83d7b8c89e64f9ec8d8e3261bd771c45b4', name: "chevronDown", size: 12, color: "var(--trigger-icon-color)", class: {
|
|
717
717
|
'sd-select-trigger__icon': true,
|
|
718
718
|
'sd-select-trigger__icon--open': this.isOpen,
|
|
719
719
|
} }))));
|
|
@@ -103,7 +103,7 @@ const SdSwitch = class {
|
|
|
103
103
|
'--sd-switch-line-height': `${SWITCH_TYPOGRAPHY.lineHeight}px`,
|
|
104
104
|
'--sd-switch-text-decoration': SWITCH_TYPOGRAPHY.textDecoration,
|
|
105
105
|
};
|
|
106
|
-
return (h("label", { key: '
|
|
106
|
+
return (h("label", { key: '4746eeb0cd3b977be3bc537c30cbf58c51d3a8fc', "aria-label": this.label || 'switch', class: this.switchClasses, style: cssVars }, h("input", { key: 'f022803741f2ac787a8993a2d987eedc5d6c8f24', type: "checkbox", checked: this.value, disabled: this.disabled, onInput: this.handleChange }), h("div", { key: 'd8684dcb2b446885f849e6f00d773ef340e37c73', class: "sd-switch__track" }, h("div", { key: '572bd3dd7f65c9a9fd36c27b4444b0e653ae2b23', class: "sd-switch__knob" })), this.label && h("span", { key: '5228763c541a4bc0a71bfb457a4432dca01d452f', class: "sd-switch__label" }, this.label)));
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
109
|
SdSwitch.style = sdSwitchCss();
|