@sellmate/design-system 1.24.0 → 1.25.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/sd-chip-input.cjs.entry.js +6 -7
- package/dist/cjs/sd-field_3.cjs.entry.js +5 -8
- package/dist/cjs/sd-ghost-button_3.cjs.entry.js +6 -1
- package/dist/cjs/sd-pagination_4.cjs.entry.js +38 -8
- package/dist/collection/components/sd-chip-input/sd-chip-input.css +3 -0
- package/dist/collection/components/sd-chip-input/sd-chip-input.js +5 -6
- package/dist/collection/components/sd-field/sd-field.js +5 -8
- package/dist/collection/components/sd-portal/sd-portal.js +6 -1
- package/dist/collection/components/sd-table/sd-thead/sd-thead.css +4 -0
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +37 -7
- package/dist/components/{p-Ck2aozmE.js → p-1fgPu1BU.js} +1 -1
- package/dist/components/{p-qbClgrdG.js → p-BAsjJuJJ.js} +1 -1
- package/dist/components/{p-C-Cje7aS.js → p-BGpxtouI.js} +1 -1
- package/dist/components/{p-DcJ7u2_W.js → p-BW-I-6Id.js} +1 -1
- package/dist/components/{p-D_SxeDkS.js → p-BckY1cBy.js} +1 -1
- package/dist/components/{p-C4_oeGm-.js → p-BlN03Cqm.js} +1 -1
- package/dist/components/{p-Fwb7LRwv.js → p-BuuIkYiY.js} +1 -1
- package/dist/components/{p-D-a6H314.js → p-BzrpKueg.js} +1 -1
- package/dist/components/{p-BoPkOevJ.js → p-CQLezwlh.js} +1 -1
- package/dist/components/{p-DPmMT-y0.js → p-CqivNcjh.js} +1 -1
- package/dist/components/{p-Ycs3I9cT.js → p-DBw58vNP.js} +1 -1
- package/dist/components/{p-PXhjh7pH.js → p-DbbdfMAF.js} +1 -1
- package/dist/components/{p-fzFFhJlr.js → p-Dny4KukK.js} +1 -1
- package/dist/components/p-DpYG9T3S.js +1 -0
- package/dist/components/p-Dxye4-ZY.js +1 -0
- package/dist/components/{p-Bqfoe_ek.js → p-I-9rJnxk.js} +1 -1
- package/dist/components/{p-1cW-9wVB.js → p-d3KpOGRC.js} +1 -1
- package/dist/components/{p-C5uz_eFs.js → p-lGr865w2.js} +1 -1
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-chip-input.js +1 -1
- package/dist/components/sd-chip.js +1 -1
- package/dist/components/sd-confirm-modal.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-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-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-modal-container.js +1 -1
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-table.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-tooltip.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/p-662ce409.entry.js +1 -0
- package/dist/design-system/p-84b415d7.entry.js +1 -0
- package/dist/design-system/{p-2fb9a5e6.entry.js → p-ad822c82.entry.js} +1 -1
- package/dist/design-system/p-c0198e3a.entry.js +1 -0
- package/dist/esm/sd-chip-input.entry.js +6 -7
- package/dist/esm/sd-field_3.entry.js +5 -8
- package/dist/esm/sd-ghost-button_3.entry.js +6 -1
- package/dist/esm/sd-pagination_4.entry.js +38 -8
- package/hydrate/index.js +55 -24
- package/hydrate/index.mjs +55 -24
- package/package.json +1 -1
- package/dist/components/p-BtVuPyhl.js +0 -1
- package/dist/components/p-DyfR6eGl.js +0 -1
- package/dist/design-system/p-210123b1.entry.js +0 -1
- package/dist/design-system/p-a49cf337.entry.js +0 -1
- package/dist/design-system/p-fb609583.entry.js +0 -1
|
@@ -105,7 +105,7 @@ const CHIP_INPUT_SUGGESTIONS = {
|
|
|
105
105
|
emptyLineHeight: '20px',
|
|
106
106
|
};
|
|
107
107
|
|
|
108
|
-
const sdChipInputCss = () => `sd-chip-input{display:inline-flex}sd-chip-input .sd-chip-input{position:relative;width:100%;isolation:isolate;min-height:var(--sd-chip-input-min-height);display:flex;flex-flow:row wrap;align-items:center;gap:var(--sd-chip-input-chip-gap);padding:var(--sd-chip-input-padding-y) var(--sd-chip-input-padding-x);cursor:text}sd-chip-input .sd-chip-input__reset{display:inline-flex;align-items:center;gap:var(--sd-chip-input-reset-gap);flex-shrink:0}sd-chip-input .sd-chip-input__divider{display:inline-block;width:1px;height:12px;background-color:var(--sd-chip-input-divider-color);flex-shrink:0}sd-chip-input .sd-chip-input__max-count{font-size:var(--sd-chip-input-max-count-font-size);font-weight:var(--sd-chip-input-max-count-font-weight);color:var(--sd-chip-input-max-count-color);white-space:nowrap;flex-shrink:0}sd-chip-input .sd-chip-input__field{flex:0 0 auto;display:inline-grid;grid-template-columns:minmax(0, max-content);align-items:center;min-width:1ch;max-width:100%;height:var(--sd-chip-input-field-height);box-sizing:border-box;padding:0;border:none;border-radius:0;background:transparent;overflow:hidden}sd-chip-input .sd-chip-input__field::after{content:attr(data-value);grid-area:1/1;visibility:hidden;white-space:pre;font-size:var(--sd-chip-input-field-font-size);line-height:var(--sd-chip-input-field-line-height);font-weight:var(--sd-chip-input-field-font-weight);font-family:var(--sd-chip-input-field-font-family)}sd-chip-input .sd-chip-input__field--filled{padding:0 var(--sd-chip-input-field-padding-x);border:var(--sd-chip-input-field-border-width) solid var(--sd-chip-input-field-border-color);border-radius:var(--sd-chip-input-field-radius);background:var(--sd-chip-input-field-bg)}sd-chip-input .sd-chip-input__field--empty{position:absolute;top:0;left:0;width:0;height:0;min-width:0;overflow:hidden}sd-chip-input .sd-chip-input__input{grid-area:1/1;width:100%;min-width:1ch;height:var(--sd-chip-input-field-height);margin:0;padding:0;border:none;outline:none;overflow:hidden;text-overflow:ellipsis;background:transparent;font-size:var(--sd-chip-input-field-font-size);line-height:var(--sd-chip-input-field-line-height);font-weight:var(--sd-chip-input-field-font-weight);font-family:var(--sd-chip-input-field-font-family);color:var(--sd-chip-input-field-content)}sd-chip-input .sd-chip-input__input[disabled]{cursor:not-allowed;pointer-events:none}sd-chip-input .sd-chip-input__input::placeholder{color:var(--sd-chip-input-placeholder-color)}sd-chip-input .sd-chip-input__suggestions{display:flex;flex-direction:column;box-sizing:border-box;background:white;border-radius:var(--sd-chip-input-suggestions-radius);box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);max-height:var(--sd-chip-input-suggestions-max-height);min-height:0;overflow-y:auto;overflow-x:hidden;outline:none}sd-chip-input .sd-chip-input__suggestion-item{display:flex;flex-shrink:0;align-items:center;gap:var(--sd-chip-input-suggestion-gap);padding:var(--sd-chip-input-suggestion-padding-y) var(--sd-chip-input-suggestion-padding-right) var(--sd-chip-input-suggestion-padding-y) var(--sd-chip-input-suggestion-padding-x);font-size:var(--sd-chip-input-suggestion-font-size);line-height:var(--sd-chip-input-suggestion-line-height);font-weight:var(--sd-chip-input-suggestion-font-weight);font-family:var(--sd-chip-input-suggestion-font-family);color:var(--sd-chip-input-suggestion-color);cursor:pointer;user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-chip-input .sd-chip-input__suggestion-item--active{background:var(--sd-chip-input-suggestion-bg-hover);color:var(--sd-chip-input-suggestion-color-hover);font-weight:var(--sd-chip-input-suggestion-font-weight-selected)}sd-chip-input .sd-chip-input__suggestion-item--selected{cursor:default;overflow:visible;text-overflow:unset}sd-chip-input .sd-chip-input__suggestions-empty{padding:12px;text-align:center;font-size:var(--sd-chip-input-suggestions-empty-font-size);line-height:var(--sd-chip-input-suggestions-empty-line-height);font-family:var(--sd-chip-input-suggestion-font-family);color:var(--sd-chip-input-suggestions-empty-color)}`;
|
|
108
|
+
const sdChipInputCss = () => `sd-chip-input{display:inline-flex}sd-chip-input sd-portal{display:none}sd-chip-input .sd-chip-input{position:relative;width:100%;isolation:isolate;min-height:var(--sd-chip-input-min-height);display:flex;flex-flow:row wrap;align-items:center;gap:var(--sd-chip-input-chip-gap);padding:var(--sd-chip-input-padding-y) var(--sd-chip-input-padding-x);cursor:text}sd-chip-input .sd-chip-input__reset{display:inline-flex;align-items:center;gap:var(--sd-chip-input-reset-gap);flex-shrink:0}sd-chip-input .sd-chip-input__divider{display:inline-block;width:1px;height:12px;background-color:var(--sd-chip-input-divider-color);flex-shrink:0}sd-chip-input .sd-chip-input__max-count{font-size:var(--sd-chip-input-max-count-font-size);font-weight:var(--sd-chip-input-max-count-font-weight);color:var(--sd-chip-input-max-count-color);white-space:nowrap;flex-shrink:0}sd-chip-input .sd-chip-input__field{flex:0 0 auto;display:inline-grid;grid-template-columns:minmax(0, max-content);align-items:center;min-width:1ch;max-width:100%;height:var(--sd-chip-input-field-height);box-sizing:border-box;padding:0;border:none;border-radius:0;background:transparent;overflow:hidden}sd-chip-input .sd-chip-input__field::after{content:attr(data-value);grid-area:1/1;visibility:hidden;white-space:pre;font-size:var(--sd-chip-input-field-font-size);line-height:var(--sd-chip-input-field-line-height);font-weight:var(--sd-chip-input-field-font-weight);font-family:var(--sd-chip-input-field-font-family)}sd-chip-input .sd-chip-input__field--filled{padding:0 var(--sd-chip-input-field-padding-x);border:var(--sd-chip-input-field-border-width) solid var(--sd-chip-input-field-border-color);border-radius:var(--sd-chip-input-field-radius);background:var(--sd-chip-input-field-bg)}sd-chip-input .sd-chip-input__field--empty{position:absolute;top:0;left:0;width:0;height:0;min-width:0;overflow:hidden}sd-chip-input .sd-chip-input__input{grid-area:1/1;width:100%;min-width:1ch;height:var(--sd-chip-input-field-height);margin:0;padding:0;border:none;outline:none;overflow:hidden;text-overflow:ellipsis;background:transparent;font-size:var(--sd-chip-input-field-font-size);line-height:var(--sd-chip-input-field-line-height);font-weight:var(--sd-chip-input-field-font-weight);font-family:var(--sd-chip-input-field-font-family);color:var(--sd-chip-input-field-content)}sd-chip-input .sd-chip-input__input[disabled]{cursor:not-allowed;pointer-events:none}sd-chip-input .sd-chip-input__input::placeholder{color:var(--sd-chip-input-placeholder-color)}sd-chip-input .sd-chip-input__suggestions{display:flex;flex-direction:column;box-sizing:border-box;background:white;border-radius:var(--sd-chip-input-suggestions-radius);box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);max-height:var(--sd-chip-input-suggestions-max-height);min-height:0;overflow-y:auto;overflow-x:hidden;outline:none}sd-chip-input .sd-chip-input__suggestion-item{display:flex;flex-shrink:0;align-items:center;gap:var(--sd-chip-input-suggestion-gap);padding:var(--sd-chip-input-suggestion-padding-y) var(--sd-chip-input-suggestion-padding-right) var(--sd-chip-input-suggestion-padding-y) var(--sd-chip-input-suggestion-padding-x);font-size:var(--sd-chip-input-suggestion-font-size);line-height:var(--sd-chip-input-suggestion-line-height);font-weight:var(--sd-chip-input-suggestion-font-weight);font-family:var(--sd-chip-input-suggestion-font-family);color:var(--sd-chip-input-suggestion-color);cursor:pointer;user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-chip-input .sd-chip-input__suggestion-item--active{background:var(--sd-chip-input-suggestion-bg-hover);color:var(--sd-chip-input-suggestion-color-hover);font-weight:var(--sd-chip-input-suggestion-font-weight-selected)}sd-chip-input .sd-chip-input__suggestion-item--selected{cursor:default;overflow:visible;text-overflow:unset}sd-chip-input .sd-chip-input__suggestions-empty{padding:12px;text-align:center;font-size:var(--sd-chip-input-suggestions-empty-font-size);line-height:var(--sd-chip-input-suggestions-empty-line-height);font-family:var(--sd-chip-input-suggestion-font-family);color:var(--sd-chip-input-suggestions-empty-color)}`;
|
|
109
109
|
|
|
110
110
|
const SdChipInput = class {
|
|
111
111
|
constructor(hostRef) {
|
|
@@ -280,7 +280,6 @@ const SdChipInput = class {
|
|
|
280
280
|
this.update.emit(next);
|
|
281
281
|
this.inputEvent.emit('');
|
|
282
282
|
this.inputEl?.focus();
|
|
283
|
-
this.suppressRecommendations = true;
|
|
284
283
|
};
|
|
285
284
|
handleChipRemove = (index) => {
|
|
286
285
|
const next = this.internalValues.filter((_, i) => i !== index);
|
|
@@ -544,7 +543,7 @@ const SdChipInput = class {
|
|
|
544
543
|
fontFamily: CHIP_INPUT_SUGGESTIONS.itemFontFamily,
|
|
545
544
|
color: CHIP_INPUT_SUGGESTIONS.emptyColor,
|
|
546
545
|
};
|
|
547
|
-
return (index.h("sd-field", { key: '
|
|
546
|
+
return (index.h("sd-field", { key: '5f654a66d1ba404b156c0fabcebd5006d033f67a', name: this.name, label: this.label, labelWidth: this.labelWidth, hint: this.hint, errorMessage: this.errorMessage, rules: [this.duplicateRule, ...(this.rules ?? [])], error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, size: this.size, width: this.width, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: cssVars, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, index.h("div", { key: 'c1b4648298f16f4d7ee5b4ef8b75da7ae380c70d', class: "sd-chip-input", ref: el => (this.chipInputRef = el), onClick: this.handleContainerClick }, (this.internalValues ?? []).map((value, i) => (index.h("sd-chip", { key: i, value: value, error: this.getChipError(i), disabled: this.getChipDisabled(i), editable: false, onSdRemove: () => this.handleChipRemove(i) }))), !isMaxReached && (index.h("div", { key: 'b838efe46b7b62be09c3ac5acc8c3d522d2859bf', class: {
|
|
548
547
|
'sd-chip-input__field': true,
|
|
549
548
|
'sd-chip-input__field--filled': this.inputValue !== '',
|
|
550
549
|
'sd-chip-input__field--empty': this.inputValue === '' && this.internalValues.length > 0 && !this.focused,
|
|
@@ -552,12 +551,12 @@ const SdChipInput = class {
|
|
|
552
551
|
? this.inputValue
|
|
553
552
|
: this.internalValues.length === 0
|
|
554
553
|
? this.placeholder
|
|
555
|
-
: '' }, index.h("input", { key: '
|
|
554
|
+
: '' }, index.h("input", { key: '6d29024fd020e9a7e2ff2c68eb64aa6b1790f7c5', ref: el => (this.inputEl = el), class: "sd-chip-input__input", placeholder: this.internalValues.length === 0 ? this.placeholder : '', disabled: this.disabled, size: 1, onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur }))), showResetArea && (
|
|
556
555
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
557
|
-
index.h("div", { key: '
|
|
556
|
+
index.h("div", { key: 'e816bb2bab75cb2f2862913d3e18b4c8ea6e3d1b', class: "sd-chip-input__reset",
|
|
558
557
|
// 리셋 버튼 클릭 시 input blur → portal unmount → refocus → 새 portal mount로
|
|
559
558
|
// 두 wrapper가 body에 잠깐 겹치는 타이밍 이슈를 방지한다.
|
|
560
|
-
onMouseDown: e => e.preventDefault() }, this.inputValue === '' && index.h("span", { key: '
|
|
559
|
+
onMouseDown: e => e.preventDefault() }, this.inputValue === '' && index.h("span", { key: '1c53892f50b7f7c3ce2bdb681dc745b5922bef48', class: "sd-chip-input__divider" }), this.maxCount != null && (index.h("span", { key: '07efa515dce065f89642966da96cb4c4b90d6da9', class: "sd-chip-input__max-count" }, "\uCD5C\uB300 ", this.maxCount, "\uAC1C")), this.useReset && this.internalValues.length > 0 && (index.h("sd-text-link", { key: 'a021bbe5ec6e0a74b58b758ec33088be7c2bbb00', icon: "reset", iconColor: CHIP_INPUT_RESET.iconColor, label: "\uC785\uB825 \uCD08\uAE30\uD654", underline: true, disabled: this.disabled, style: { '--sd-text-link-color': CHIP_INPUT_RESET.labelColor }, onSdClick: this.handleResetInput })))), index.h("sd-portal", { key: '3b6b9044053fca449a225d68125a25796e4b3e20', open: showDropdown, parentRef: this.chipInputRef ?? null, viewportPadding: SdChipInput.SUGGESTIONS_VIEWPORT_PADDING, onSdClose: this.closeSuggestions }, index.h("div", { key: '9095dc0dfb4755b430910f6b5c43196f0aa24501', class: "sd-chip-input__suggestions", role: "listbox", style: suggestionBoxStyle }, isDropdownLoading && (index.h("div", { key: '82aa5105a054a76ca3d8da78ef519bd8fc78f122', class: "sd-chip-input__suggestions-empty", style: suggestionEmptyStyle }, "\uBD88\uB7EC\uC624\uB294 \uC911...")), showRecommendations ? (index.h("div", { style: {
|
|
561
560
|
display: 'flex',
|
|
562
561
|
flexWrap: 'wrap',
|
|
563
562
|
gap: '8px',
|
|
@@ -601,7 +600,7 @@ const SdChipInput = class {
|
|
|
601
600
|
if (!isSelected)
|
|
602
601
|
this.addChip(item);
|
|
603
602
|
} }, index.h("span", { style: { flex: '1' } }, item), isSelected && (index.h("sd-icon", { name: "check", size: "12", style: { color: '#0075FF', flexShrink: '0' } }))));
|
|
604
|
-
})))))))
|
|
603
|
+
})))))));
|
|
605
604
|
}
|
|
606
605
|
static get watchers() { return {
|
|
607
606
|
"values": [{
|
|
@@ -244,16 +244,13 @@ const SdField = class {
|
|
|
244
244
|
'sd-field--has-label': this.label !== '',
|
|
245
245
|
'sd-field--has-addon': addon !== '',
|
|
246
246
|
[this.fieldStatus]: this.fieldStatus !== '',
|
|
247
|
-
}, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars, ...messageCssVars } }, index.h("div", { key: '75f3be0dae03f292b66980b7c92d574bd0bda988', class: "sd-field__wrapper" }, this.renderLabel(this.label), index.h("div", { key: '
|
|
248
|
-
? {
|
|
249
|
-
width: typeof this.width === 'number' ? `${this.width}px` : this.width,
|
|
250
|
-
flex: 'none',
|
|
251
|
-
}
|
|
252
|
-
: {} }, index.h("div", { key: 'ba0e98fd309c32ee73b2ba92f956358d51790f58', class: {
|
|
247
|
+
}, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars, ...messageCssVars } }, index.h("div", { key: '75f3be0dae03f292b66980b7c92d574bd0bda988', class: "sd-field__wrapper" }, this.renderLabel(this.label), index.h("div", { key: '0c3bdc72f11481a94bdfef65ac1152c93403f926', class: "sd-field__main" }, index.h("div", { key: '707215e7087f8bfee3cf53f415caaaed2d37254d', class: {
|
|
253
248
|
'sd-field__control': true,
|
|
254
249
|
'sd-field__control--has-addon': addon !== '',
|
|
255
|
-
}
|
|
256
|
-
|
|
250
|
+
}, style: this.width !== '' && this.width !== 0
|
|
251
|
+
? { width: typeof this.width === 'number' ? `${this.width}px` : this.width }
|
|
252
|
+
: {} }, addon && (index.h("div", { key: '4b96766a728f23d50effc7c4032b12e9fdb2f16d', class: "sd-field__addon" }, this.icon && (index.h("sd-icon", { key: 'f34105536690750f8b96d50e6a2b1c3c03a6b248', name: this.icon.name, size: this.icon.size ??
|
|
253
|
+
Number(FIELD_LABEL_SIZE_MAP[(this.size in FIELD_LABEL_SIZE_MAP ? this.size : 'sm')].icon), color: this.icon.color, rotate: this.icon.rotate })), addon)), index.h("slot", { key: '3f7139b64e0f94ff29a3f27b03ae35b3fbfe0202' })), this.errorMsg !== '' || this.errorMessage !== '' ? (index.h("div", { class: "sd-field__error-message" }, this.errorMsg !== '' ? this.errorMsg : this.errorMessage)) : (this.hint !== '' && index.h("div", { class: "sd-field__hint" }, this.hint))))));
|
|
257
254
|
}
|
|
258
255
|
renderLabel(label) {
|
|
259
256
|
if (label == null || label === '')
|
|
@@ -457,9 +457,13 @@ const SdPortal = class {
|
|
|
457
457
|
}
|
|
458
458
|
// 외부 클릭 감지
|
|
459
459
|
handleMouseDown(e) {
|
|
460
|
+
if (!this.open)
|
|
461
|
+
return;
|
|
460
462
|
this.isInsideClick = this.isInsideTarget(e.target);
|
|
461
463
|
}
|
|
462
464
|
handleWindowClick(e) {
|
|
465
|
+
if (!this.open)
|
|
466
|
+
return;
|
|
463
467
|
if (this.isInsideClick) {
|
|
464
468
|
this.isInsideClick = false;
|
|
465
469
|
return;
|
|
@@ -469,7 +473,7 @@ const SdPortal = class {
|
|
|
469
473
|
this.close.emit();
|
|
470
474
|
}
|
|
471
475
|
render() {
|
|
472
|
-
return index.h("slot", { key: '
|
|
476
|
+
return index.h("slot", { key: '0b01050e7c1ab2b648bf1118aec27140ff1aed4c' });
|
|
473
477
|
}
|
|
474
478
|
static get watchers() { return {
|
|
475
479
|
"open": [{
|
|
@@ -477,6 +481,7 @@ const SdPortal = class {
|
|
|
477
481
|
}]
|
|
478
482
|
}; }
|
|
479
483
|
};
|
|
484
|
+
SdPortal.style = `:host { display: none !important; }`;
|
|
480
485
|
|
|
481
486
|
const tag = {
|
|
482
487
|
xs: {
|
|
@@ -234,7 +234,7 @@ const SdTbody = class {
|
|
|
234
234
|
};
|
|
235
235
|
SdTbody.style = sdTbodyCss();
|
|
236
236
|
|
|
237
|
-
const sdTheadCss = () => `sd-thead{display:contents}sd-thead *{box-sizing:border-box}.thead{display:table-header-group;height:var(--table-header-height, 36px)}.thead--sticky{position:sticky;top:0;z-index:120}.tr{display:table-row;width:100%}.th{display:table-cell;background:var(--table-header-bg, #F5FAFF);height:var(--table-header-height, 36px);padding:0 var(--table-header-padding-x, 16px);font-family:var(--table-header-font-family, inherit);font-weight:var(--table-header-font-weight, 500);font-size:var(--table-header-font-size, 12px);line-height:var(--table-header-line-height, 20px);text-decoration:var(--table-header-text-decoration, none);vertical-align:middle;border-bottom:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);-webkit-user-select:none;user-select:none;position:relative;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.th--selected{position:relative;width:var(--table-selectable-width, 48px) !important;max-width:var(--table-selectable-width, 48px) !important;min-width:var(--table-selectable-width, 48px) !important;text-align:center}.th--selected sd-checkbox label{position:relative}.th--selected sd-checkbox label:before{content:"";position:absolute;inset:-6px}.th.sticky-left{position:sticky;background-color:var(--table-header-bg, #F5FAFF);z-index:110 !important;left:var(--sticky-left-offset, 0)}.th.sticky-right{position:sticky;background-color:var(--table-header-bg, #F5FAFF);z-index:110 !important;right:var(--sticky-right-offset, 0)}.th.sticky-left-edge:after{content:"";position:absolute;top:0;left:100%;right:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset 12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.th.sticky-right-edge:after{content:"";position:absolute;top:0;left:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset -12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.th.sticky-left-edge.is-scrolled-left{overflow:visible}.th.sticky-left-edge.is-scrolled-left:after{opacity:1}.th.sticky-right-edge.is-scrolled-right{overflow:visible}.th.sticky-right-edge.is-scrolled-right:after{opacity:1}.th__content{display:flex;flex-flow:row nowrap;align-items:center;gap:var(--table-header-gap, 4px)}.th__content--left{justify-content:flex-start}.th__content--center{justify-content:center}.th__content--right{justify-content:flex-end}.th__content--label{white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.th__bar{position:absolute;top:50%;right:0;transform:translateY(-50%);width:var(--table-border-width, 1px);height:var(--table-header-resizer-height, 16px);z-index:3;background-color:var(--table-header-resizer-color, #CCCCCC)}.th__dropdown-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:16px;height:16px;padding:0;border:none;background:transparent;cursor:pointer;color:inherit;border-radius:2px}.th__dropdown-trigger sd-icon{transition:transform 0.15s ease}.th__dropdown-trigger--open sd-icon{transform:rotate(180deg)}.th__resizer{position:absolute;top:50%;right:0;transform:translateY(-50%);width:4px;height:var(--table-header-resizer-height, 16px);cursor:col-resize;z-index:3;border-left:var(--table-border-width, 1px) solid var(--table-header-resizer-color, #CCCCCC);border-right:var(--table-border-width, 1px) solid var(--table-header-resizer-color, #CCCCCC)}.th__resizer--left{right:auto;left:0}`;
|
|
237
|
+
const sdTheadCss = () => `sd-thead{display:contents}sd-thead *{box-sizing:border-box}.thead{display:table-header-group;height:var(--table-header-height, 36px)}.thead--sticky{position:sticky;top:0;z-index:120}.tr{display:table-row;width:100%}.th{display:table-cell;background:var(--table-header-bg, #F5FAFF);height:var(--table-header-height, 36px);padding:0 var(--table-header-padding-x, 16px);font-family:var(--table-header-font-family, inherit);font-weight:var(--table-header-font-weight, 500);font-size:var(--table-header-font-size, 12px);line-height:var(--table-header-line-height, 20px);text-decoration:var(--table-header-text-decoration, none);vertical-align:middle;border-bottom:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);-webkit-user-select:none;user-select:none;position:relative;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.th--selected{position:relative;width:var(--table-selectable-width, 48px) !important;max-width:var(--table-selectable-width, 48px) !important;min-width:var(--table-selectable-width, 48px) !important;text-align:center}.th--selected sd-checkbox label{position:relative}.th--selected sd-checkbox label:before{content:"";position:absolute;inset:-6px}.th.sticky-left{position:sticky;background-color:var(--table-header-bg, #F5FAFF);z-index:110 !important;left:var(--sticky-left-offset, 0)}.th.sticky-right{position:sticky;background-color:var(--table-header-bg, #F5FAFF);z-index:110 !important;right:var(--sticky-right-offset, 0)}.th.sticky-left-edge:after{content:"";position:absolute;top:0;left:100%;right:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset 12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.th.sticky-right-edge:after{content:"";position:absolute;top:0;left:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset -12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.th.sticky-left-edge.is-scrolled-left{overflow:visible}.th.sticky-left-edge.is-scrolled-left:after{opacity:1}.th.sticky-right-edge.is-scrolled-right{overflow:visible}.th.sticky-right-edge.is-scrolled-right:after{opacity:1}.th__content{display:flex;flex-flow:row nowrap;align-items:center;gap:var(--table-header-gap, 4px)}.th__content--left{justify-content:flex-start}.th__content--center{justify-content:center}.th__content--right{justify-content:flex-end}.th__content--label{white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.th__bar{position:absolute;top:50%;right:0;transform:translateY(-50%);width:var(--table-border-width, 1px);height:var(--table-header-resizer-height, 16px);z-index:3;background-color:var(--table-header-resizer-color, #CCCCCC)}.th--has-dropdown{cursor:pointer}.th__dropdown-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:16px;height:16px;padding:0;border:none;background:transparent;cursor:pointer;color:inherit;border-radius:2px}.th__dropdown-trigger sd-icon{transition:transform 0.15s ease}.th__dropdown-trigger--open sd-icon{transform:rotate(180deg)}.th__resizer{position:absolute;top:50%;right:0;transform:translateY(-50%);width:4px;height:var(--table-header-resizer-height, 16px);cursor:col-resize;z-index:3;border-left:var(--table-border-width, 1px) solid var(--table-header-resizer-color, #CCCCCC);border-right:var(--table-border-width, 1px) solid var(--table-header-resizer-color, #CCCCCC)}.th__resizer--left{right:auto;left:0}`;
|
|
238
238
|
|
|
239
239
|
const SdThead = class {
|
|
240
240
|
constructor(hostRef) {
|
|
@@ -495,21 +495,41 @@ const SdThead = class {
|
|
|
495
495
|
'sticky-left': true,
|
|
496
496
|
'sticky-left-edge': idx === stickyLeftCount - 1,
|
|
497
497
|
'is-scrolled-left': idx === stickyLeftCount - 1 && this._scrolledLeft,
|
|
498
|
-
|
|
498
|
+
'th--has-dropdown': col.hasDropdown === true,
|
|
499
|
+
}, style: { ...col.thStyle, ...this.getStickyStyle(idx) }, ref: col.hasDropdown === true
|
|
500
|
+
? el => {
|
|
501
|
+
this.dropdownThRefs[col.name] = el;
|
|
502
|
+
}
|
|
503
|
+
: undefined, onClick: col.hasDropdown === true ? () => this.toggleDropdown(col.name) : undefined }, index.h("div", { class: `th__content th__content--${col.align || 'left'}` }, index.h("div", { class: "th__content--label" }, col.label), col.icon && (index.h("sd-icon", { name: col.icon, size: "12", color: sdTable_config.resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (index.h("sd-icon", { name: sdTable_config.resolveSortIconName(col.sort), size: "12", color: sdTable_config.resolveTableIconColor(sdTable_config.resolveSortIconName(col.sort), col.iconColor), onClick: (e) => {
|
|
504
|
+
e.stopPropagation();
|
|
505
|
+
this.handleColumnSort(col);
|
|
506
|
+
}, style: { cursor: 'pointer' } })), col.tooltip && (index.h("sd-tooltip", { ...col.tooltipOptions }, index.h("div", { slot: "content" }, col.tooltip.map(text => (index.h("p", null, text)))))), col.hasDropdown === true && (index.h("button", { class: {
|
|
499
507
|
'th__dropdown-trigger': true,
|
|
500
508
|
'th__dropdown-trigger--open': dropdownOpenMap[col.name] === true,
|
|
501
|
-
}, ref: el => {
|
|
509
|
+
}, ref: el => {
|
|
510
|
+
dropdownRefs[col.name] = el;
|
|
511
|
+
}, "aria-haspopup": "listbox", "aria-expanded": dropdownOpenMap[col.name] === true ? 'true' : 'false' }, index.h("sd-icon", { name: "caretDown", size: "12" })))), this._resizable && idx !== lastColIdx && (
|
|
502
512
|
// column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
|
|
503
513
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
504
514
|
index.h("div", { class: "th__resizer", onMouseDown: (evt) => this.handleResize(idx, evt) }))))), middleCols.map((col, relativeIdx) => {
|
|
505
515
|
const actualColIdx = stickyLeftCount + relativeIdx;
|
|
506
516
|
return (index.h("th", { key: col.name, class: {
|
|
507
|
-
th: true,
|
|
517
|
+
'th': true,
|
|
508
518
|
[`${col.thClass}`]: Boolean(col.thClass),
|
|
509
|
-
|
|
519
|
+
'th--has-dropdown': col.hasDropdown === true,
|
|
520
|
+
}, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) }, ref: col.hasDropdown === true
|
|
521
|
+
? el => {
|
|
522
|
+
this.dropdownThRefs[col.name] = el;
|
|
523
|
+
}
|
|
524
|
+
: undefined, onClick: col.hasDropdown === true ? () => this.toggleDropdown(col.name) : undefined }, index.h("div", { class: `th__content th__content--${col.align || 'left'}` }, index.h("div", { class: "th__content--label" }, col.label), col.icon && (index.h("sd-icon", { name: col.icon, size: "12", color: sdTable_config.resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (index.h("sd-icon", { name: sdTable_config.resolveSortIconName(col.sort), size: "12", color: sdTable_config.resolveTableIconColor(sdTable_config.resolveSortIconName(col.sort), col.iconColor), onClick: (e) => {
|
|
525
|
+
e.stopPropagation();
|
|
526
|
+
this.handleColumnSort(col);
|
|
527
|
+
}, style: { cursor: 'pointer' } })), col.tooltip && (index.h("sd-tooltip", { ...col.tooltipOptions }, index.h("div", { slot: "content" }, col.tooltip.map(text => (index.h("p", null, text)))))), col.hasDropdown === true && (index.h("button", { class: {
|
|
510
528
|
'th__dropdown-trigger': true,
|
|
511
529
|
'th__dropdown-trigger--open': this.dropdownOpenMap[col.name] === true,
|
|
512
|
-
}, ref: el => {
|
|
530
|
+
}, ref: el => {
|
|
531
|
+
this.dropdownRefs[col.name] = el;
|
|
532
|
+
}, "aria-haspopup": "listbox", "aria-expanded": this.dropdownOpenMap[col.name] === true ? 'true' : 'false' }, index.h("sd-icon", { name: "caretDown", size: "12" })))), this._resizable && actualColIdx !== lastColIdx && (
|
|
513
533
|
// column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
|
|
514
534
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
515
535
|
index.h("div", { class: "th__resizer", onMouseDown: (evt) => this.handleResize(actualColIdx, evt) }))));
|
|
@@ -521,10 +541,20 @@ const SdThead = class {
|
|
|
521
541
|
'sticky-right': true,
|
|
522
542
|
'sticky-right-edge': relativeIdx === 0,
|
|
523
543
|
'is-scrolled-right': relativeIdx === 0 && this._scrolledRight,
|
|
524
|
-
|
|
544
|
+
'th--has-dropdown': col.hasDropdown === true,
|
|
545
|
+
}, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) }, ref: col.hasDropdown === true
|
|
546
|
+
? el => {
|
|
547
|
+
this.dropdownThRefs[col.name] = el;
|
|
548
|
+
}
|
|
549
|
+
: undefined, onClick: col.hasDropdown === true ? () => this.toggleDropdown(col.name) : undefined }, index.h("div", { class: `th__content th__content--${col.align || 'left'}` }, index.h("div", { class: "th__content--label" }, col.label), col.icon && (index.h("sd-icon", { name: col.icon, size: "12", color: sdTable_config.resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (index.h("sd-icon", { name: sdTable_config.resolveSortIconName(col.sort), size: "12", color: sdTable_config.resolveTableIconColor(sdTable_config.resolveSortIconName(col.sort), col.iconColor), onClick: (e) => {
|
|
550
|
+
e.stopPropagation();
|
|
551
|
+
this.handleColumnSort(col);
|
|
552
|
+
}, style: { cursor: 'pointer' } })), col.tooltip && (index.h("sd-tooltip", { ...col.tooltipOptions }, index.h("div", { slot: "content" }, col.tooltip.map(text => (index.h("p", null, text)))))), col.hasDropdown === true && (index.h("button", { class: {
|
|
525
553
|
'th__dropdown-trigger': true,
|
|
526
554
|
'th__dropdown-trigger--open': this.dropdownOpenMap[col.name] === true,
|
|
527
|
-
}, ref: el => {
|
|
555
|
+
}, ref: el => {
|
|
556
|
+
this.dropdownRefs[col.name] = el;
|
|
557
|
+
}, "aria-haspopup": "listbox", "aria-expanded": this.dropdownOpenMap[col.name] === true ? 'true' : 'false' }, index.h("sd-icon", { name: "caretDown", size: "12" })))), this._resizable && (
|
|
528
558
|
// column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
|
|
529
559
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
530
560
|
index.h("div", { class: "th__resizer th__resizer--left", onMouseDown: (evt) => this.handleResize(actualColIdx, evt, true) }))));
|
|
@@ -168,7 +168,6 @@ export class SdChipInput {
|
|
|
168
168
|
this.update.emit(next);
|
|
169
169
|
this.inputEvent.emit('');
|
|
170
170
|
this.inputEl?.focus();
|
|
171
|
-
this.suppressRecommendations = true;
|
|
172
171
|
};
|
|
173
172
|
handleChipRemove = (index) => {
|
|
174
173
|
const next = this.internalValues.filter((_, i) => i !== index);
|
|
@@ -432,7 +431,7 @@ export class SdChipInput {
|
|
|
432
431
|
fontFamily: CHIP_INPUT_SUGGESTIONS.itemFontFamily,
|
|
433
432
|
color: CHIP_INPUT_SUGGESTIONS.emptyColor,
|
|
434
433
|
};
|
|
435
|
-
return (h("sd-field", { key: '
|
|
434
|
+
return (h("sd-field", { key: '5f654a66d1ba404b156c0fabcebd5006d033f67a', name: this.name, label: this.label, labelWidth: this.labelWidth, hint: this.hint, errorMessage: this.errorMessage, rules: [this.duplicateRule, ...(this.rules ?? [])], error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, size: this.size, width: this.width, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: cssVars, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, h("div", { key: 'c1b4648298f16f4d7ee5b4ef8b75da7ae380c70d', class: "sd-chip-input", ref: el => (this.chipInputRef = el), onClick: this.handleContainerClick }, (this.internalValues ?? []).map((value, i) => (h("sd-chip", { key: i, value: value, error: this.getChipError(i), disabled: this.getChipDisabled(i), editable: false, onSdRemove: () => this.handleChipRemove(i) }))), !isMaxReached && (h("div", { key: 'b838efe46b7b62be09c3ac5acc8c3d522d2859bf', class: {
|
|
436
435
|
'sd-chip-input__field': true,
|
|
437
436
|
'sd-chip-input__field--filled': this.inputValue !== '',
|
|
438
437
|
'sd-chip-input__field--empty': this.inputValue === '' && this.internalValues.length > 0 && !this.focused,
|
|
@@ -440,12 +439,12 @@ export class SdChipInput {
|
|
|
440
439
|
? this.inputValue
|
|
441
440
|
: this.internalValues.length === 0
|
|
442
441
|
? this.placeholder
|
|
443
|
-
: '' }, h("input", { key: '
|
|
442
|
+
: '' }, h("input", { key: '6d29024fd020e9a7e2ff2c68eb64aa6b1790f7c5', ref: el => (this.inputEl = el), class: "sd-chip-input__input", placeholder: this.internalValues.length === 0 ? this.placeholder : '', disabled: this.disabled, size: 1, onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur }))), showResetArea && (
|
|
444
443
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
445
|
-
h("div", { key: '
|
|
444
|
+
h("div", { key: 'e816bb2bab75cb2f2862913d3e18b4c8ea6e3d1b', class: "sd-chip-input__reset",
|
|
446
445
|
// 리셋 버튼 클릭 시 input blur → portal unmount → refocus → 새 portal mount로
|
|
447
446
|
// 두 wrapper가 body에 잠깐 겹치는 타이밍 이슈를 방지한다.
|
|
448
|
-
onMouseDown: e => e.preventDefault() }, this.inputValue === '' && h("span", { key: '
|
|
447
|
+
onMouseDown: e => e.preventDefault() }, this.inputValue === '' && h("span", { key: '1c53892f50b7f7c3ce2bdb681dc745b5922bef48', class: "sd-chip-input__divider" }), this.maxCount != null && (h("span", { key: '07efa515dce065f89642966da96cb4c4b90d6da9', class: "sd-chip-input__max-count" }, "\uCD5C\uB300 ", this.maxCount, "\uAC1C")), this.useReset && this.internalValues.length > 0 && (h("sd-text-link", { key: 'a021bbe5ec6e0a74b58b758ec33088be7c2bbb00', icon: "reset", iconColor: CHIP_INPUT_RESET.iconColor, label: "\uC785\uB825 \uCD08\uAE30\uD654", underline: true, disabled: this.disabled, style: { '--sd-text-link-color': CHIP_INPUT_RESET.labelColor }, onSdClick: this.handleResetInput })))), h("sd-portal", { key: '3b6b9044053fca449a225d68125a25796e4b3e20', open: showDropdown, parentRef: this.chipInputRef ?? null, viewportPadding: SdChipInput.SUGGESTIONS_VIEWPORT_PADDING, onSdClose: this.closeSuggestions }, h("div", { key: '9095dc0dfb4755b430910f6b5c43196f0aa24501', class: "sd-chip-input__suggestions", role: "listbox", style: suggestionBoxStyle }, isDropdownLoading && (h("div", { key: '82aa5105a054a76ca3d8da78ef519bd8fc78f122', class: "sd-chip-input__suggestions-empty", style: suggestionEmptyStyle }, "\uBD88\uB7EC\uC624\uB294 \uC911...")), showRecommendations ? (h("div", { style: {
|
|
449
448
|
display: 'flex',
|
|
450
449
|
flexWrap: 'wrap',
|
|
451
450
|
gap: '8px',
|
|
@@ -489,7 +488,7 @@ export class SdChipInput {
|
|
|
489
488
|
if (!isSelected)
|
|
490
489
|
this.addChip(item);
|
|
491
490
|
} }, h("span", { style: { flex: '1' } }, item), isSelected && (h("sd-icon", { name: "check", size: "12", style: { color: '#0075FF', flexShrink: '0' } }))));
|
|
492
|
-
})))))))
|
|
491
|
+
})))))));
|
|
493
492
|
}
|
|
494
493
|
static get is() { return "sd-chip-input"; }
|
|
495
494
|
static get originalStyleUrls() {
|
|
@@ -210,16 +210,13 @@ export class SdField {
|
|
|
210
210
|
'sd-field--has-label': this.label !== '',
|
|
211
211
|
'sd-field--has-addon': addon !== '',
|
|
212
212
|
[this.fieldStatus]: this.fieldStatus !== '',
|
|
213
|
-
}, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars, ...messageCssVars } }, h("div", { key: '75f3be0dae03f292b66980b7c92d574bd0bda988', class: "sd-field__wrapper" }, this.renderLabel(this.label), h("div", { key: '
|
|
214
|
-
? {
|
|
215
|
-
width: typeof this.width === 'number' ? `${this.width}px` : this.width,
|
|
216
|
-
flex: 'none',
|
|
217
|
-
}
|
|
218
|
-
: {} }, h("div", { key: 'ba0e98fd309c32ee73b2ba92f956358d51790f58', class: {
|
|
213
|
+
}, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars, ...messageCssVars } }, h("div", { key: '75f3be0dae03f292b66980b7c92d574bd0bda988', class: "sd-field__wrapper" }, this.renderLabel(this.label), h("div", { key: '0c3bdc72f11481a94bdfef65ac1152c93403f926', class: "sd-field__main" }, h("div", { key: '707215e7087f8bfee3cf53f415caaaed2d37254d', class: {
|
|
219
214
|
'sd-field__control': true,
|
|
220
215
|
'sd-field__control--has-addon': addon !== '',
|
|
221
|
-
}
|
|
222
|
-
|
|
216
|
+
}, style: this.width !== '' && this.width !== 0
|
|
217
|
+
? { width: typeof this.width === 'number' ? `${this.width}px` : this.width }
|
|
218
|
+
: {} }, addon && (h("div", { key: '4b96766a728f23d50effc7c4032b12e9fdb2f16d', class: "sd-field__addon" }, this.icon && (h("sd-icon", { key: 'f34105536690750f8b96d50e6a2b1c3c03a6b248', name: this.icon.name, size: this.icon.size ??
|
|
219
|
+
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: '3f7139b64e0f94ff29a3f27b03ae35b3fbfe0202' })), 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))))));
|
|
223
220
|
}
|
|
224
221
|
renderLabel(label) {
|
|
225
222
|
if (label == null || label === '')
|
|
@@ -252,9 +252,13 @@ export class SdPortal {
|
|
|
252
252
|
}
|
|
253
253
|
// 외부 클릭 감지
|
|
254
254
|
handleMouseDown(e) {
|
|
255
|
+
if (!this.open)
|
|
256
|
+
return;
|
|
255
257
|
this.isInsideClick = this.isInsideTarget(e.target);
|
|
256
258
|
}
|
|
257
259
|
handleWindowClick(e) {
|
|
260
|
+
if (!this.open)
|
|
261
|
+
return;
|
|
258
262
|
if (this.isInsideClick) {
|
|
259
263
|
this.isInsideClick = false;
|
|
260
264
|
return;
|
|
@@ -264,9 +268,10 @@ export class SdPortal {
|
|
|
264
268
|
this.close.emit();
|
|
265
269
|
}
|
|
266
270
|
render() {
|
|
267
|
-
return h("slot", { key: '
|
|
271
|
+
return h("slot", { key: '0b01050e7c1ab2b648bf1118aec27140ff1aed4c' });
|
|
268
272
|
}
|
|
269
273
|
static get is() { return "sd-portal"; }
|
|
274
|
+
static get styles() { return ":host { display: none !important; }"; }
|
|
270
275
|
static get properties() {
|
|
271
276
|
return {
|
|
272
277
|
"to": {
|
|
@@ -256,21 +256,41 @@ export class SdThead {
|
|
|
256
256
|
'sticky-left': true,
|
|
257
257
|
'sticky-left-edge': idx === stickyLeftCount - 1,
|
|
258
258
|
'is-scrolled-left': idx === stickyLeftCount - 1 && this._scrolledLeft,
|
|
259
|
-
|
|
259
|
+
'th--has-dropdown': col.hasDropdown === true,
|
|
260
|
+
}, style: { ...col.thStyle, ...this.getStickyStyle(idx) }, ref: col.hasDropdown === true
|
|
261
|
+
? el => {
|
|
262
|
+
this.dropdownThRefs[col.name] = el;
|
|
263
|
+
}
|
|
264
|
+
: undefined, onClick: col.hasDropdown === true ? () => this.toggleDropdown(col.name) : undefined }, h("div", { class: `th__content th__content--${col.align || 'left'}` }, h("div", { class: "th__content--label" }, col.label), col.icon && (h("sd-icon", { name: col.icon, size: "12", color: resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (h("sd-icon", { name: resolveSortIconName(col.sort), size: "12", color: resolveTableIconColor(resolveSortIconName(col.sort), col.iconColor), onClick: (e) => {
|
|
265
|
+
e.stopPropagation();
|
|
266
|
+
this.handleColumnSort(col);
|
|
267
|
+
}, style: { cursor: 'pointer' } })), col.tooltip && (h("sd-tooltip", { ...col.tooltipOptions }, h("div", { slot: "content" }, col.tooltip.map(text => (h("p", null, text)))))), col.hasDropdown === true && (h("button", { class: {
|
|
260
268
|
'th__dropdown-trigger': true,
|
|
261
269
|
'th__dropdown-trigger--open': dropdownOpenMap[col.name] === true,
|
|
262
|
-
}, ref: el => {
|
|
270
|
+
}, ref: el => {
|
|
271
|
+
dropdownRefs[col.name] = el;
|
|
272
|
+
}, "aria-haspopup": "listbox", "aria-expanded": dropdownOpenMap[col.name] === true ? 'true' : 'false' }, h("sd-icon", { name: "caretDown", size: "12" })))), this._resizable && idx !== lastColIdx && (
|
|
263
273
|
// column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
|
|
264
274
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
265
275
|
h("div", { class: "th__resizer", onMouseDown: (evt) => this.handleResize(idx, evt) }))))), middleCols.map((col, relativeIdx) => {
|
|
266
276
|
const actualColIdx = stickyLeftCount + relativeIdx;
|
|
267
277
|
return (h("th", { key: col.name, class: {
|
|
268
|
-
th: true,
|
|
278
|
+
'th': true,
|
|
269
279
|
[`${col.thClass}`]: Boolean(col.thClass),
|
|
270
|
-
|
|
280
|
+
'th--has-dropdown': col.hasDropdown === true,
|
|
281
|
+
}, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) }, ref: col.hasDropdown === true
|
|
282
|
+
? el => {
|
|
283
|
+
this.dropdownThRefs[col.name] = el;
|
|
284
|
+
}
|
|
285
|
+
: undefined, onClick: col.hasDropdown === true ? () => this.toggleDropdown(col.name) : undefined }, h("div", { class: `th__content th__content--${col.align || 'left'}` }, h("div", { class: "th__content--label" }, col.label), col.icon && (h("sd-icon", { name: col.icon, size: "12", color: resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (h("sd-icon", { name: resolveSortIconName(col.sort), size: "12", color: resolveTableIconColor(resolveSortIconName(col.sort), col.iconColor), onClick: (e) => {
|
|
286
|
+
e.stopPropagation();
|
|
287
|
+
this.handleColumnSort(col);
|
|
288
|
+
}, style: { cursor: 'pointer' } })), col.tooltip && (h("sd-tooltip", { ...col.tooltipOptions }, h("div", { slot: "content" }, col.tooltip.map(text => (h("p", null, text)))))), col.hasDropdown === true && (h("button", { class: {
|
|
271
289
|
'th__dropdown-trigger': true,
|
|
272
290
|
'th__dropdown-trigger--open': this.dropdownOpenMap[col.name] === true,
|
|
273
|
-
}, ref: el => {
|
|
291
|
+
}, ref: el => {
|
|
292
|
+
this.dropdownRefs[col.name] = el;
|
|
293
|
+
}, "aria-haspopup": "listbox", "aria-expanded": this.dropdownOpenMap[col.name] === true ? 'true' : 'false' }, h("sd-icon", { name: "caretDown", size: "12" })))), this._resizable && actualColIdx !== lastColIdx && (
|
|
274
294
|
// column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
|
|
275
295
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
276
296
|
h("div", { class: "th__resizer", onMouseDown: (evt) => this.handleResize(actualColIdx, evt) }))));
|
|
@@ -282,10 +302,20 @@ export class SdThead {
|
|
|
282
302
|
'sticky-right': true,
|
|
283
303
|
'sticky-right-edge': relativeIdx === 0,
|
|
284
304
|
'is-scrolled-right': relativeIdx === 0 && this._scrolledRight,
|
|
285
|
-
|
|
305
|
+
'th--has-dropdown': col.hasDropdown === true,
|
|
306
|
+
}, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) }, ref: col.hasDropdown === true
|
|
307
|
+
? el => {
|
|
308
|
+
this.dropdownThRefs[col.name] = el;
|
|
309
|
+
}
|
|
310
|
+
: undefined, onClick: col.hasDropdown === true ? () => this.toggleDropdown(col.name) : undefined }, h("div", { class: `th__content th__content--${col.align || 'left'}` }, h("div", { class: "th__content--label" }, col.label), col.icon && (h("sd-icon", { name: col.icon, size: "12", color: resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (h("sd-icon", { name: resolveSortIconName(col.sort), size: "12", color: resolveTableIconColor(resolveSortIconName(col.sort), col.iconColor), onClick: (e) => {
|
|
311
|
+
e.stopPropagation();
|
|
312
|
+
this.handleColumnSort(col);
|
|
313
|
+
}, style: { cursor: 'pointer' } })), col.tooltip && (h("sd-tooltip", { ...col.tooltipOptions }, h("div", { slot: "content" }, col.tooltip.map(text => (h("p", null, text)))))), col.hasDropdown === true && (h("button", { class: {
|
|
286
314
|
'th__dropdown-trigger': true,
|
|
287
315
|
'th__dropdown-trigger--open': this.dropdownOpenMap[col.name] === true,
|
|
288
|
-
}, ref: el => {
|
|
316
|
+
}, ref: el => {
|
|
317
|
+
this.dropdownRefs[col.name] = el;
|
|
318
|
+
}, "aria-haspopup": "listbox", "aria-expanded": this.dropdownOpenMap[col.name] === true ? 'true' : 'false' }, h("sd-icon", { name: "caretDown", size: "12" })))), this._resizable && (
|
|
289
319
|
// column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
|
|
290
320
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
291
321
|
h("div", { class: "th__resizer th__resizer--left", onMouseDown: (evt) => this.handleResize(actualColIdx, evt, true) }))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,c as s,h as i,t as n}from"./p-CEVDmQdt.js";import{n as r}from"./p-CCwNgVmC.js";import{f as d}from"./p-BOJJ_sQS.js";import{d as u}from"./p-C3rOud8J.js";import{d as a}from"./p-BtVuPyhl.js";import{d as o}from"./p-DMvWCQfX.js";import{d as l}from"./p-C4_oeGm-.js";import{d as p}from"./p-BnhzUsGP.js";import{d as h}from"./p-D_SxeDkS.js";import{d as c}from"./p-D8T1XeGP.js";import{d as m}from"./p-C-Cje7aS.js";var b={numberInput:{sm:{height:"28",paddingX:"6",radius:"4",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"}},md:{height:"36",paddingX:"8",radius:"6",typography:{fontWeight:"400",fontSize:"14",lineHeight:"24"}},border:{default:"#AAAAAA",focus:"#0075FF",danger:"#FB4444"},bg:{default:"#FFFFFF"},text:{default:"#222222",placeholder:"#AAAAAA",disabled:"#888888"},stepper:{sm:{size:"20"},md:{size:"24"},radius:"4",bg:{default:"#EFF6FF",disabled:"#EEEEEE"},icon:{default:"#0075FF",disabled:"#BBBBBB"}}}};const f=b.numberInput.sm,g=b.numberInput.md,y={sm:{height:f.height,paddingX:f.paddingX,radius:f.radius,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight},md:{height:g.height,paddingX:g.paddingX,radius:g.radius,fontSize:g.typography.fontSize,lineHeight:g.typography.lineHeight,fontWeight:g.typography.fontWeight}},_={border:b.numberInput.border,bg:b.numberInput.bg,text:b.numberInput.text},x={sm:{size:b.numberInput.stepper.sm.size},md:{size:b.numberInput.stepper.md.size},radius:b.numberInput.stepper.radius,bg:b.numberInput.stepper.bg,icon:b.numberInput.stepper.icon},v=d.field.hint,w=d.field.errorMessage,k=d.field.contents.gap,z=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.focus=s(this,"sdFocus",7),this.blur=s(this,"sdBlur",7)}get el(){return this}size="sm";min=Number.NEGATIVE_INFINITY;max=Number.POSITIVE_INFINITY;step=1;useButton=!1;useDecimal=!1;value=null;label;labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;width;rules=[];autoFocus=!1;status;hint="";errorMessage="";inputPrefix="";inputSuffix="";inputClass="";readonly=!1;inputStyle={};error=!1;focused=!1;hovered=!1;internalValue=null;displayValue="";nativeEl=void 0;formField;name=r();update;focus;blur;toNumber(t){if(null==t||""===t)return null;if("number"==typeof t)return isNaN(t)?null:t;if("string"==typeof t)return this.parseInput(t);const e=Number(t);return isNaN(e)?null:e}formatWithCommas(t){if(null==t||isNaN(t))return"";const e=t<0,s=Math.abs(t),[i,n]=s.toString().split("."),r=(+i).toLocaleString(),d=e?"-"+r:r;return void 0!==n&&""!==n?d+"."+n:String(d)}parseInput(t){if(""===t.trim())return null;const e=t.replace(/,/g,"").trim();if(!/^-?(\d+\.?\d*|\d*\.\d+)$/.test(e))return null;const s=parseFloat(e);return isNaN(s)||!this.useDecimal&&e.includes(".")?null:s}clampMinMax(t){return isNaN(t)?0:Math.min(Math.max(t,this.min),this.max)}updateDisplay(){this.displayValue=this.formatWithCommas(this.internalValue)}isIncrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue>=this.max}isDecrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue<=this.min}valueChanged(t){const e=this.toNumber(t);this.internalValue=null!==e?this.clampMinMax(e):null,this.updateDisplay()}internalValueChanged(t){this.updateDisplay(),t!==this.value&&(this.value=t,this.update?.emit(t))}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async sdGetNativeElement(){return this.nativeEl||null}componentWillLoad(){const t=this.toNumber(this.value);null!==t&&(this.internalValue=this.clampMinMax(t)),this.updateDisplay()}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{const e=t.target,s=e.value;if(""===s)return this.internalValue=null,void(this.displayValue="");const i=s.replace(/,/g,""),n=(i.match(/\./g)||[]).length;if(n>1)return void(e.value=this.displayValue);if("-"===i||"."===i||"-."===i)return void(e.value=i);if(i.endsWith(".")&&1===n){const t=i.slice(0,-1),s=this.parseInput(t);if(null!==s){const t=this.formatWithCommas(s);return void(e.value=t+".")}}const r=this.parseInput(i);if(null!==r){if(r<this.min)return void(e.value=this.displayValue);if(r>this.max)return void(e.value=this.displayValue);this.internalValue=r,this.displayValue=this.formatWithCommas(r),e.value=this.displayValue}else e.value=this.displayValue};handleFocus=t=>{this.focused=!0,this.focus?.emit(t)};handleBlur=async t=>{this.updateDisplay(),this.nativeEl&&(this.nativeEl.value=this.displayValue),this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.focused=!1,this.blur?.emit(t)};handleKeyDown=t=>{"ArrowUp"===t.key?(t.preventDefault(),this.handleIncrement()):"ArrowDown"===t.key&&(t.preventDefault(),this.handleDecrement())};handleIncrement=()=>{if(this.isIncrementDisabled())return;const t=this.internalValue??this.min??0;let e=t+this.step;e>this.max&&(e=this.max),e!==t&&(this.internalValue=e)};handleDecrement=()=>{if(this.isDecrementDisabled())return;const t=this.internalValue??this.min??0;let e=t-this.step;e<this.min&&(e=this.min),e!==t&&(this.internalValue=e)};render(){const t=y[this.size]??y.sm,e="md"===this.size?14:12;return i("sd-field",{key:"c50811d15f4b698d889132ac8e4527df72059a0d",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,readonly:this.readonly,focused:this.focused,hovered:this.hovered,status:this.status,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:t=>this.formField=t,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-number-input-font-size":`${t.fontSize}px`,"--sd-number-input-line-height":`${t.lineHeight}px`,"--sd-number-input-font-weight":t.fontWeight,"--sd-number-input-padding-x":`${t.paddingX}px`,"--sd-number-input-text-color":_.text.default,"--sd-number-input-placeholder-color":_.text.placeholder,"--sd-number-input-disabled-color":_.text.disabled,"--sd-number-input-stepper-size":`${x[this.size]?.size??x.sm.size}px`,"--sd-number-input-stepper-radius":`${x.radius}px`,"--sd-number-input-stepper-bg":x.bg.default,"--sd-number-input-stepper-bg-disabled":x.bg.disabled,"--sd-number-input-stepper-icon-color":x.icon.default,"--sd-number-input-stepper-icon-disabled":x.icon.disabled,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`,"--sd-system-color-field-border-default":_.border.default,"--sd-system-color-field-border-focus":_.border.focus,"--sd-system-color-field-border-danger":_.border.danger,"--sd-system-color-field-bg-default":_.bg.default,"--sd-textinput-input-text-error-message":w.color,"--sd-textinput-input-error-message-typography-font-size":`${w.typography.fontSize}px`,"--sd-textinput-input-error-message-typography-line-height":`${w.typography.lineHeight}px`,"--sd-textinput-input-text-hint":v.color,"--sd-textinput-input-hint-typography-font-size":`${v.typography.fontSize}px`,"--sd-textinput-input-hint-typography-line-height":`${v.typography.lineHeight}px`,"--sd-textinput-input-contents-gap":`${k}px`}},i("div",{key:"c36595fc48eeb88090cfdeeda3da0e51a86d814e",class:{"sd-number-input__content":!0,"sd-number-input__content--no-stepper":!this.useButton}},this.useButton&&i("button",{key:"89a68f1264907284d8718c59c42cbcc0d06ec29d",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--decrement",disabled:this.isDecrementDisabled(),onClick:this.handleDecrement,tabindex:-1},i("sd-icon",{key:"9e9c5f4d33eadf088c6e8c428dd97d2c717905b3",name:"minus",size:e,color:this.isDecrementDisabled()?x.icon.disabled:x.icon.default})),this.inputPrefix&&i("span",{key:"b5d2bef21242c1dc65d10f6dcb3b4c50380804d2",class:"sd-number-input__prefix"},this.inputPrefix),i("input",{key:"2f1d5c24a3462ae5aded71d645317ad84ca2dd6b",name:this.name,ref:t=>this.nativeEl=t,class:`sd-number-input__native ${this.inputClass}`,type:"text",inputMode:"numeric",value:this.displayValue,placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,style:{textAlign:this.useButton?"center":"right",...this.inputStyle}}),this.inputSuffix&&i("span",{key:"53391ecdede9630774be6891412835dad3975186",class:"sd-number-input__suffix"},this.inputSuffix),this.useButton&&i("button",{key:"9383cf29b0688252023b6bc9e10189c70f049ccf",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--increment",disabled:this.isIncrementDisabled(),onClick:this.handleIncrement,tabindex:-1},i("sd-icon",{key:"a380dce8f2cf42c2f312657ea8304e94b9af8fe7",name:"add",size:e,color:this.isIncrementDisabled()?x.icon.disabled:x.icon.default}))))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-number-input{display:inline-flex}sd-number-input .sd-number-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;gap:var(--sd-number-input-padding-x);color:var(--sd-number-input-text-color);font-size:var(--sd-number-input-font-size);line-height:var(--sd-number-input-line-height);font-weight:var(--sd-number-input-font-weight);padding:0 var(--sd-number-input-padding-x)}sd-number-input .sd-number-input__content--no-stepper{padding:0 calc(var(--sd-number-input-padding-x) * 2)}sd-number-input .sd-number-input__content .sd-number-input__native{width:100%;height:100%;min-width:0;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;padding-block:0;padding-inline:0}sd-number-input .sd-number-input__content .sd-number-input__native[disabled]{cursor:not-allowed;color:var(--sd-number-input-disabled-color)}sd-number-input .sd-number-input__content .sd-number-input__native[readonly]{color:var(--sd-system-color-field-text-read-only)}sd-number-input .sd-number-input__content .sd-number-input__native::placeholder{color:var(--sd-number-input-placeholder-color)}sd-number-input .sd-number-input__content .sd-number-input__prefix,sd-number-input .sd-number-input__content .sd-number-input__suffix{flex-shrink:0;white-space:nowrap;color:var(--sd-number-input-placeholder-color);font-size:inherit;line-height:inherit}sd-number-input .sd-number-input__content .sd-number-input__stepper{flex-shrink:0;width:var(--sd-number-input-stepper-size);height:var(--sd-number-input-stepper-size);border:none;border-radius:var(--sd-number-input-stepper-radius);background-color:var(--sd-number-input-stepper-bg);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;margin:0;transition:background-color 0.15s ease}sd-number-input .sd-number-input__content .sd-number-input__stepper:hover:not(:disabled){filter:brightness(0.95)}sd-number-input .sd-number-input__content .sd-number-input__stepper:disabled{background-color:var(--sd-number-input-stepper-bg-disabled);cursor:not-allowed}"}},[512,"sd-number-input",{size:[1],min:[2],max:[2],step:[2],useButton:[4,"use-button"],useDecimal:[4,"use-decimal"],value:[1032],label:[1],labelWidth:[8,"label-width"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],placeholder:[1],disabled:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],status:[1],hint:[1],errorMessage:[1,"error-message"],inputPrefix:[1,"input-prefix"],inputSuffix:[1,"input-suffix"],inputClass:[1,"input-class"],readonly:[4],inputStyle:[16],error:[1028],focused:[1028],hovered:[1028],name:[1],internalValue:[32],displayValue:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64],sdGetNativeElement:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function F(){"undefined"!=typeof customElements&&["sd-number-input","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-number-input":customElements.get(n(t))||customElements.define(n(t),z);break;case"sd-button":customElements.get(n(t))||u();break;case"sd-field":customElements.get(n(t))||a();break;case"sd-floating-portal":customElements.get(n(t))||o();break;case"sd-ghost-button":customElements.get(n(t))||l();break;case"sd-icon":customElements.get(n(t))||p();break;case"sd-portal":customElements.get(n(t))||h();break;case"sd-tag":customElements.get(n(t))||c();break;case"sd-tooltip":customElements.get(n(t))||m()}}))}export{z as S,F as d}
|
|
1
|
+
import{p as t,H as e,c as s,h as i,t as n}from"./p-CEVDmQdt.js";import{n as r}from"./p-CCwNgVmC.js";import{f as d}from"./p-BOJJ_sQS.js";import{d as u}from"./p-C3rOud8J.js";import{d as a}from"./p-Dxye4-ZY.js";import{d as o}from"./p-DMvWCQfX.js";import{d as l}from"./p-BlN03Cqm.js";import{d as p}from"./p-BnhzUsGP.js";import{d as h}from"./p-BckY1cBy.js";import{d as c}from"./p-D8T1XeGP.js";import{d as m}from"./p-BGpxtouI.js";var b={numberInput:{sm:{height:"28",paddingX:"6",radius:"4",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"}},md:{height:"36",paddingX:"8",radius:"6",typography:{fontWeight:"400",fontSize:"14",lineHeight:"24"}},border:{default:"#AAAAAA",focus:"#0075FF",danger:"#FB4444"},bg:{default:"#FFFFFF"},text:{default:"#222222",placeholder:"#AAAAAA",disabled:"#888888"},stepper:{sm:{size:"20"},md:{size:"24"},radius:"4",bg:{default:"#EFF6FF",disabled:"#EEEEEE"},icon:{default:"#0075FF",disabled:"#BBBBBB"}}}};const f=b.numberInput.sm,g=b.numberInput.md,y={sm:{height:f.height,paddingX:f.paddingX,radius:f.radius,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight},md:{height:g.height,paddingX:g.paddingX,radius:g.radius,fontSize:g.typography.fontSize,lineHeight:g.typography.lineHeight,fontWeight:g.typography.fontWeight}},_={border:b.numberInput.border,bg:b.numberInput.bg,text:b.numberInput.text},x={sm:{size:b.numberInput.stepper.sm.size},md:{size:b.numberInput.stepper.md.size},radius:b.numberInput.stepper.radius,bg:b.numberInput.stepper.bg,icon:b.numberInput.stepper.icon},v=d.field.hint,w=d.field.errorMessage,k=d.field.contents.gap,z=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.focus=s(this,"sdFocus",7),this.blur=s(this,"sdBlur",7)}get el(){return this}size="sm";min=Number.NEGATIVE_INFINITY;max=Number.POSITIVE_INFINITY;step=1;useButton=!1;useDecimal=!1;value=null;label;labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;width;rules=[];autoFocus=!1;status;hint="";errorMessage="";inputPrefix="";inputSuffix="";inputClass="";readonly=!1;inputStyle={};error=!1;focused=!1;hovered=!1;internalValue=null;displayValue="";nativeEl=void 0;formField;name=r();update;focus;blur;toNumber(t){if(null==t||""===t)return null;if("number"==typeof t)return isNaN(t)?null:t;if("string"==typeof t)return this.parseInput(t);const e=Number(t);return isNaN(e)?null:e}formatWithCommas(t){if(null==t||isNaN(t))return"";const e=t<0,s=Math.abs(t),[i,n]=s.toString().split("."),r=(+i).toLocaleString(),d=e?"-"+r:r;return void 0!==n&&""!==n?d+"."+n:String(d)}parseInput(t){if(""===t.trim())return null;const e=t.replace(/,/g,"").trim();if(!/^-?(\d+\.?\d*|\d*\.\d+)$/.test(e))return null;const s=parseFloat(e);return isNaN(s)||!this.useDecimal&&e.includes(".")?null:s}clampMinMax(t){return isNaN(t)?0:Math.min(Math.max(t,this.min),this.max)}updateDisplay(){this.displayValue=this.formatWithCommas(this.internalValue)}isIncrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue>=this.max}isDecrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue<=this.min}valueChanged(t){const e=this.toNumber(t);this.internalValue=null!==e?this.clampMinMax(e):null,this.updateDisplay()}internalValueChanged(t){this.updateDisplay(),t!==this.value&&(this.value=t,this.update?.emit(t))}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async sdGetNativeElement(){return this.nativeEl||null}componentWillLoad(){const t=this.toNumber(this.value);null!==t&&(this.internalValue=this.clampMinMax(t)),this.updateDisplay()}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{const e=t.target,s=e.value;if(""===s)return this.internalValue=null,void(this.displayValue="");const i=s.replace(/,/g,""),n=(i.match(/\./g)||[]).length;if(n>1)return void(e.value=this.displayValue);if("-"===i||"."===i||"-."===i)return void(e.value=i);if(i.endsWith(".")&&1===n){const t=i.slice(0,-1),s=this.parseInput(t);if(null!==s){const t=this.formatWithCommas(s);return void(e.value=t+".")}}const r=this.parseInput(i);if(null!==r){if(r<this.min)return void(e.value=this.displayValue);if(r>this.max)return void(e.value=this.displayValue);this.internalValue=r,this.displayValue=this.formatWithCommas(r),e.value=this.displayValue}else e.value=this.displayValue};handleFocus=t=>{this.focused=!0,this.focus?.emit(t)};handleBlur=async t=>{this.updateDisplay(),this.nativeEl&&(this.nativeEl.value=this.displayValue),this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.focused=!1,this.blur?.emit(t)};handleKeyDown=t=>{"ArrowUp"===t.key?(t.preventDefault(),this.handleIncrement()):"ArrowDown"===t.key&&(t.preventDefault(),this.handleDecrement())};handleIncrement=()=>{if(this.isIncrementDisabled())return;const t=this.internalValue??this.min??0;let e=t+this.step;e>this.max&&(e=this.max),e!==t&&(this.internalValue=e)};handleDecrement=()=>{if(this.isDecrementDisabled())return;const t=this.internalValue??this.min??0;let e=t-this.step;e<this.min&&(e=this.min),e!==t&&(this.internalValue=e)};render(){const t=y[this.size]??y.sm,e="md"===this.size?14:12;return i("sd-field",{key:"c50811d15f4b698d889132ac8e4527df72059a0d",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,readonly:this.readonly,focused:this.focused,hovered:this.hovered,status:this.status,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:t=>this.formField=t,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-number-input-font-size":`${t.fontSize}px`,"--sd-number-input-line-height":`${t.lineHeight}px`,"--sd-number-input-font-weight":t.fontWeight,"--sd-number-input-padding-x":`${t.paddingX}px`,"--sd-number-input-text-color":_.text.default,"--sd-number-input-placeholder-color":_.text.placeholder,"--sd-number-input-disabled-color":_.text.disabled,"--sd-number-input-stepper-size":`${x[this.size]?.size??x.sm.size}px`,"--sd-number-input-stepper-radius":`${x.radius}px`,"--sd-number-input-stepper-bg":x.bg.default,"--sd-number-input-stepper-bg-disabled":x.bg.disabled,"--sd-number-input-stepper-icon-color":x.icon.default,"--sd-number-input-stepper-icon-disabled":x.icon.disabled,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`,"--sd-system-color-field-border-default":_.border.default,"--sd-system-color-field-border-focus":_.border.focus,"--sd-system-color-field-border-danger":_.border.danger,"--sd-system-color-field-bg-default":_.bg.default,"--sd-textinput-input-text-error-message":w.color,"--sd-textinput-input-error-message-typography-font-size":`${w.typography.fontSize}px`,"--sd-textinput-input-error-message-typography-line-height":`${w.typography.lineHeight}px`,"--sd-textinput-input-text-hint":v.color,"--sd-textinput-input-hint-typography-font-size":`${v.typography.fontSize}px`,"--sd-textinput-input-hint-typography-line-height":`${v.typography.lineHeight}px`,"--sd-textinput-input-contents-gap":`${k}px`}},i("div",{key:"c36595fc48eeb88090cfdeeda3da0e51a86d814e",class:{"sd-number-input__content":!0,"sd-number-input__content--no-stepper":!this.useButton}},this.useButton&&i("button",{key:"89a68f1264907284d8718c59c42cbcc0d06ec29d",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--decrement",disabled:this.isDecrementDisabled(),onClick:this.handleDecrement,tabindex:-1},i("sd-icon",{key:"9e9c5f4d33eadf088c6e8c428dd97d2c717905b3",name:"minus",size:e,color:this.isDecrementDisabled()?x.icon.disabled:x.icon.default})),this.inputPrefix&&i("span",{key:"b5d2bef21242c1dc65d10f6dcb3b4c50380804d2",class:"sd-number-input__prefix"},this.inputPrefix),i("input",{key:"2f1d5c24a3462ae5aded71d645317ad84ca2dd6b",name:this.name,ref:t=>this.nativeEl=t,class:`sd-number-input__native ${this.inputClass}`,type:"text",inputMode:"numeric",value:this.displayValue,placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,style:{textAlign:this.useButton?"center":"right",...this.inputStyle}}),this.inputSuffix&&i("span",{key:"53391ecdede9630774be6891412835dad3975186",class:"sd-number-input__suffix"},this.inputSuffix),this.useButton&&i("button",{key:"9383cf29b0688252023b6bc9e10189c70f049ccf",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--increment",disabled:this.isIncrementDisabled(),onClick:this.handleIncrement,tabindex:-1},i("sd-icon",{key:"a380dce8f2cf42c2f312657ea8304e94b9af8fe7",name:"add",size:e,color:this.isIncrementDisabled()?x.icon.disabled:x.icon.default}))))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-number-input{display:inline-flex}sd-number-input .sd-number-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;gap:var(--sd-number-input-padding-x);color:var(--sd-number-input-text-color);font-size:var(--sd-number-input-font-size);line-height:var(--sd-number-input-line-height);font-weight:var(--sd-number-input-font-weight);padding:0 var(--sd-number-input-padding-x)}sd-number-input .sd-number-input__content--no-stepper{padding:0 calc(var(--sd-number-input-padding-x) * 2)}sd-number-input .sd-number-input__content .sd-number-input__native{width:100%;height:100%;min-width:0;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;padding-block:0;padding-inline:0}sd-number-input .sd-number-input__content .sd-number-input__native[disabled]{cursor:not-allowed;color:var(--sd-number-input-disabled-color)}sd-number-input .sd-number-input__content .sd-number-input__native[readonly]{color:var(--sd-system-color-field-text-read-only)}sd-number-input .sd-number-input__content .sd-number-input__native::placeholder{color:var(--sd-number-input-placeholder-color)}sd-number-input .sd-number-input__content .sd-number-input__prefix,sd-number-input .sd-number-input__content .sd-number-input__suffix{flex-shrink:0;white-space:nowrap;color:var(--sd-number-input-placeholder-color);font-size:inherit;line-height:inherit}sd-number-input .sd-number-input__content .sd-number-input__stepper{flex-shrink:0;width:var(--sd-number-input-stepper-size);height:var(--sd-number-input-stepper-size);border:none;border-radius:var(--sd-number-input-stepper-radius);background-color:var(--sd-number-input-stepper-bg);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;margin:0;transition:background-color 0.15s ease}sd-number-input .sd-number-input__content .sd-number-input__stepper:hover:not(:disabled){filter:brightness(0.95)}sd-number-input .sd-number-input__content .sd-number-input__stepper:disabled{background-color:var(--sd-number-input-stepper-bg-disabled);cursor:not-allowed}"}},[512,"sd-number-input",{size:[1],min:[2],max:[2],step:[2],useButton:[4,"use-button"],useDecimal:[4,"use-decimal"],value:[1032],label:[1],labelWidth:[8,"label-width"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],placeholder:[1],disabled:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],status:[1],hint:[1],errorMessage:[1,"error-message"],inputPrefix:[1,"input-prefix"],inputSuffix:[1,"input-suffix"],inputClass:[1,"input-class"],readonly:[4],inputStyle:[16],error:[1028],focused:[1028],hovered:[1028],name:[1],internalValue:[32],displayValue:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64],sdGetNativeElement:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function F(){"undefined"!=typeof customElements&&["sd-number-input","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-number-input":customElements.get(n(t))||customElements.define(n(t),z);break;case"sd-button":customElements.get(n(t))||u();break;case"sd-field":customElements.get(n(t))||a();break;case"sd-floating-portal":customElements.get(n(t))||o();break;case"sd-ghost-button":customElements.get(n(t))||l();break;case"sd-icon":customElements.get(n(t))||p();break;case"sd-portal":customElements.get(n(t))||h();break;case"sd-tag":customElements.get(n(t))||c();break;case"sd-tooltip":customElements.get(n(t))||m()}}))}export{z as S,F as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,c as e,h as o,t as a}from"./p-CEVDmQdt.js";import{d as n}from"./p-C3rOud8J.js";import{d}from"./p-
|
|
1
|
+
import{p as t,H as s,c as e,h as o,t as a}from"./p-CEVDmQdt.js";import{d as n}from"./p-C3rOud8J.js";import{d}from"./p-BlN03Cqm.js";import{d as i}from"./p-BnhzUsGP.js";import{d as c}from"./p-BckY1cBy.js";import{d as l}from"./p-D8T1XeGP.js";var r={bg:"#07284A",content:"#FFFFFF"},b={bg:"#FB4444",content:"#FFFFFF"},f={bg:"#FFC700",content:"#222222"},p={bg:"#00973C",content:"#FFFFFF"},u={bg:"#005CC9",content:"#FFFFFF"},m={bg:"#E6F1FF",icon:"#0075FF",text:"#222222",textLink:"#555555"};const g={default:"secondary_sm",danger:"danger_outline_sm",caution:"neutral_outline_sm",complete:"neutral_outline_sm",accent:"neutral_outline_sm",info:"secondary_sm"},h={default:{bg:r.bg,content:r.content},danger:{bg:b.bg,content:b.content},caution:{bg:f.bg,content:f.content},complete:{bg:p.bg,content:p.content},accent:{bg:u.bg,content:u.content},info:{bg:m.bg,content:m.text,icon:m.icon,linkColor:m.textLink}},k={iconSize:"16"},_=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=e(this,"sdClose",7),this.buttonClick=e(this,"sdButtonClick",7)}icon;message;link;linkLabel;buttonLabel;useClose=!1;type="default";close;buttonClick;render(){const t=h[this.type]??h.default,s=Number(k.iconSize),e=t.icon??t.content,a=t.linkColor??t.content,n=["default","caution","info"].includes(this.type),d=g[this.type]??g.default;return o("div",{key:"240ed7553fa03d18bb4384b1192d16a821be5832",style:{"--sd-toast-bg":t.bg,"--sd-toast-text":t.content,"--sd-toast-icon":e,"--sd-toast-link":a}},o("div",{key:"bdb9a45473dcab86e2dd8bb6321e7b717f93b784",class:"sd-toast",role:"status","aria-live":"polite","aria-atomic":"true"},this.icon&&o("div",{key:"2a02e47336cd6a46c7cc3560f3f82d4f10a3d211",class:"sd-toast__icon"},o("sd-icon",{key:"872cfb213c3a080fc1e5458ce53efa04c1fa8840",name:this.icon,size:s,color:e})),o("div",{key:"3a22f7518f63676e22c4faeb76873c31d6cf6b11",class:"sd-toast__content"},o("span",{key:"dd6a533b60c07bdcbdc80090d61bdf29b8879609",class:"sd-toast__message"},this.message)),this.link&&o("a",{key:"45efddf62b906e8f0b2136ad3d1131204d0b9125",href:this.link,class:"sd-toast__link",target:"_blank",rel:"noopener noreferrer"},this.linkLabel||this.link),this.buttonLabel&&o("sd-button",{key:"3729f4f21ba7e59c2702137053de946e284b226a",class:"sd-toast__button",name:d,label:this.buttonLabel,onSdClick:t=>this.buttonClick.emit(t.detail)}),this.useClose&&o("sd-ghost-button",{key:"d7f0f670aef527be6253cd70bd2b19a900ccaddd",class:"sd-toast__close",icon:"close",intent:n?"default":"inverse",ariaLabel:"close",size:"xs",onClick:()=>this.close.emit()})))}static get style(){return"sd-toast{display:block;width:fit-content;height:fit-content}sd-toast .sd-toast{display:flex;width:fit-content;align-items:center;gap:var(--sd-toast-gap, 16px);padding:var(--sd-toast-padding-y, 12px) var(--sd-toast-padding-x, 24px);border-radius:var(--sd-toast-radius, 8px);background-color:var(--sd-toast-bg);color:var(--sd-toast-text);box-shadow:2px 2px 8px 2px rgba(0, 0, 0, 0.2)}sd-toast .sd-toast__icon{display:flex;align-items:center;flex-shrink:0}sd-toast .sd-toast__content{display:flex;flex:1}sd-toast .sd-toast__message{font-size:14px;line-height:24px;font-weight:500;white-space:nowrap}sd-toast .sd-toast__link{font-size:14px;line-height:24px;font-weight:700;color:var(--sd-toast-link, var(--sd-toast-text));text-decoration:underline;cursor:pointer;transition:opacity 0.2s ease;margin-left:4px;white-space:nowrap}sd-toast .sd-toast__link:hover{opacity:0.8}sd-toast .sd-toast__button{flex-shrink:0}sd-toast .sd-toast__close{flex-shrink:0}"}},[512,"sd-toast",{icon:[1],message:[1],link:[1],linkLabel:[1,"link-label"],buttonLabel:[1,"button-label"],useClose:[4,"use-close"],type:[1]}]);function F(){"undefined"!=typeof customElements&&["sd-toast","sd-button","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-toast":customElements.get(a(t))||customElements.define(a(t),_);break;case"sd-button":customElements.get(a(t))||n();break;case"sd-ghost-button":customElements.get(a(t))||d();break;case"sd-icon":customElements.get(a(t))||i();break;case"sd-portal":customElements.get(a(t))||c();break;case"sd-tag":customElements.get(a(t))||l()}}))}export{_ as S,F as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,h as e,F as i,t as o}from"./p-CEVDmQdt.js";import{T as n}from"./p-B3bERWUt.js";import{d as a}from"./p-C3rOud8J.js";import{d as l}from"./p-DMvWCQfX.js";import{d as r}from"./p-
|
|
1
|
+
import{p as t,H as s,h as e,F as i,t as o}from"./p-CEVDmQdt.js";import{T as n}from"./p-B3bERWUt.js";import{d as a}from"./p-C3rOud8J.js";import{d as l}from"./p-DMvWCQfX.js";import{d as r}from"./p-BlN03Cqm.js";import{d as c}from"./p-BnhzUsGP.js";import{d}from"./p-BckY1cBy.js";import{d as h}from"./p-D8T1XeGP.js";var m={bg:"#07284A",content:"#FFFFFF"},p={bg:"#FCEFEF",content:"#FB4444"},g={bg:"#FEF1EA",content:"#FF6B00"},b={bg:"#E6F1FF",content:"#0075FF"};const u={default:{bg:m.bg,content:m.content},danger:{bg:p.bg,content:p.content},warning:{bg:g.bg,content:g.content},accent:{bg:b.bg,content:b.content}},f=t(class t extends s{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}trigger="hover";placement="top";color="#01BB4B";tooltipType="default";icon="helpOutline";iconSize=12;label="";name="primary_sm";rightIcon;ariaLabel="";disabled=!1;type="button";useClose=!1;sdClass="";message=[];triggerClass="";triggerStyle="";showTooltip=!1;slotContentHTML="";buttonEl;triggerEl;isAnchorMode=!1;menuEl;hideTimeout;closeTimeout;static CLOSE_ANIM_MS=150;openTooltip=()=>{this.cancelHideTimer(),this.showTooltip=!0,this.menuEl&&this.menuEl.classList.remove("sd-floating-menu--closing")};closeTooltip=()=>{this.menuEl&&this.menuEl.classList.add("sd-floating-menu--closing"),this.closeTimeout=setTimeout((()=>{this.showTooltip=!1}),t.CLOSE_ANIM_MS)};startHideTimer=()=>{this.hideTimeout=setTimeout((()=>this.closeTooltip()),100)};cancelHideTimer=()=>{this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=void 0),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=void 0)};get tooltipOffset(){switch(this.placement??"top"){case"top":return[0,-4];case"bottom":return[0,4];case"left":case"right":return[4,0]}}handleClose=()=>!this.useClose&&this.closeTooltip();async show(){this.openTooltip()}async hide(){this.closeTooltip()}componentWillLoad(){this.isAnchorMode=Array.from(this.el.children).some((t=>"anchor"===t.getAttribute("slot"))),this.isAnchorMode||(this.slotContentHTML=this.el.innerHTML,this.el.replaceChildren()),this.el.classList.toggle("visible",!0)}componentDidRender(){this.triggerEl&&""!==this.triggerStyle&&this.triggerEl.setAttribute("style",this.triggerStyle)}render(){const t=this.trigger??"hover",s=this.placement??"top",o=this.tooltipType??"default",a=this.icon??"helpOutline",l=this.color??"#01BB4B",r=u[o]??u.default,c=()=>this.showTooltip=!this.showTooltip,d=void 0!==this.label&&""!==this.label,h=this.isAnchorMode,m="hover"===t?{onMouseEnter:()=>this.openTooltip(),onMouseLeave:()=>!this.useClose&&this.startHideTimer()}:h||!d?{onClick:c}:{},p="click"===t&&!h&&d?{onSdClick:c}:{},g=["sd-tooltip-trigger",this.sdClass,this.triggerClass].filter((t=>void 0!==t&&""!==t)).join(" "),b=this.message&&this.message.length>0?this.message.map((t=>`<div>${t}</div>`)).join(""):this.slotContentHTML;return e(i,{key:"81d582c4c8847a0f57abf632d975461cdf07b535"},e("div",{key:"c7515fb866fa85749405bb10512e27575850eb27",ref:t=>this.triggerEl=t,class:g,...m},h?e("slot",{name:"anchor"}):d?e("sd-button",{ref:t=>this.buttonEl=t,name:this.name??"primary_sm",label:this.label,icon:a,rightIcon:this.rightIcon,ariaLabel:this.ariaLabel,disabled:this.disabled,type:this.type??"button",class:"sd-tooltip",...p}):e("sd-icon",{ref:t=>this.buttonEl=t,name:a,size:this.iconSize??12,color:l,class:"sd-tooltip"})),this.showTooltip&&e("sd-floating-portal",{key:"903aaa3723a119687e5af8120d54fb1b9e43c584",parentRef:h?this.triggerEl:this.buttonEl,onSdClose:this.handleClose,placement:s,offset:this.tooltipOffset},e("div",{key:"813e1dbf7f2d8e0378f4fcac1225341aafbd9948",ref:t=>this.menuEl=t,class:{"sd-floating-menu":!0,[`sd-floating-menu--${o}`]:!0,[`sd-floating-menu--${s}`]:!0,"sd-floating-menu--has-close":this.useClose},style:{"--sd-floating-bg":r.bg,"--sd-floating-content":r.content},onMouseEnter:()=>this.openTooltip(),onMouseLeave:()=>!this.useClose&&this.startHideTimer()},e("i",{key:"d74071d3d236382bc952ad03a05ebd77219b4ddb",class:`sd-floating-menu__arrow sd-floating-menu__arrow--${s}`},e(n,{key:"91c35bd2bc22294b7e7998965930219a43799310"})),e("div",{key:"16edd2fc6e9ad02b646c05c6404d3eb79e2a7a71",class:"sd-floating-menu__content",innerHTML:b}),this.useClose&&e("sd-ghost-button",{key:"d234906f7a4a603a8e18cef6da49f9d893adb731",class:"sd-floating-menu__close-button",icon:"close",ariaLabel:"close",size:"xxs",onClick:()=>this.closeTooltip()}))))}static get style(){return"sd-tooltip{visibility:hidden !important;display:inline-flex}sd-tooltip.visible{visibility:visible !important}sd-tooltip .sd-tooltip-trigger{display:inline-flex;position:relative;cursor:pointer;align-items:center;justify-content:center}"}},[772,"sd-tooltip",{trigger:[1],placement:[1],color:[1],tooltipType:[1,"tooltip-type"],icon:[1],iconSize:[2,"icon-size"],label:[1],name:[1],rightIcon:[1,"right-icon"],ariaLabel:[1,"aria-label"],disabled:[4],type:[1],useClose:[4,"use-close"],sdClass:[1,"sd-class"],message:[16],triggerClass:[1,"trigger-class"],triggerStyle:[1,"trigger-style"],showTooltip:[32],slotContentHTML:[32],show:[64],hide:[64]}]);function y(){"undefined"!=typeof customElements&&["sd-tooltip","sd-button","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-tooltip":customElements.get(o(t))||customElements.define(o(t),f);break;case"sd-button":customElements.get(o(t))||a();break;case"sd-floating-portal":customElements.get(o(t))||l();break;case"sd-ghost-button":customElements.get(o(t))||r();break;case"sd-icon":customElements.get(o(t))||c();break;case"sd-portal":customElements.get(o(t))||d();break;case"sd-tag":customElements.get(o(t))||h()}}))}export{f as S,y as d}
|