@sellmate/design-system 1.23.0 → 1.25.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-action-modal.cjs.entry.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 +6 -7
- 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 +10 -10
- 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-dropdown-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-field_3.cjs.entry.js +8 -8
- package/dist/cjs/sd-ghost-button_3.cjs.entry.js +25 -12
- 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 +46 -16
- package/dist/cjs/sd-popover.cjs.entry.js +3 -3
- package/dist/cjs/sd-popup.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio.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 +6 -6
- package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
- package/dist/cjs/sd-td.cjs.entry.js +1 -1
- package/dist/cjs/sd-text-link.cjs.entry.js +22 -4
- package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast.cjs.entry.js +2 -2
- package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
- package/dist/collection/components/sd-action-modal/sd-action-modal.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.css +3 -0
- package/dist/collection/components/sd-chip-input/sd-chip-input.js +5 -6
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +2 -2
- package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +2 -2
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +2 -2
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +1 -1
- package/dist/collection/components/sd-divider/sd-divider.js +1 -1
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.css +4 -4
- 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 +4 -0
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +2 -2
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- 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-popover/sd-popover.js +3 -3
- package/dist/collection/components/sd-popup/sd-popup.js +1 -1
- package/dist/collection/components/sd-portal/sd-portal.js +20 -7
- package/dist/collection/components/sd-radio/sd-radio.js +1 -1
- package/dist/collection/components/sd-radio-button/sd-radio-button.js +1 -1
- package/dist/collection/components/sd-radio-group/sd-radio-group.js +1 -1
- 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.js +6 -6
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +2 -2
- package/dist/collection/components/sd-table/sd-td/sd-td.js +1 -1
- package/dist/collection/components/sd-table/sd-thead/sd-thead.css +4 -0
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +40 -10
- 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-text-link/sd-text-link.css +17 -0
- package/dist/collection/components/sd-text-link/sd-text-link.js +46 -3
- 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-BYgT6mRD.js → p--qAfho9a.js} +1 -1
- package/dist/components/{p-Btpf6Xpg.js → p-0U99W-3Z.js} +1 -1
- package/dist/components/{p-BFMUpKa2.js → p-0eogwabp.js} +1 -1
- package/dist/components/{p-4I0LJNSg.js → p-B8uvCE1e.js} +1 -1
- package/dist/components/{p-CZpcFpSk.js → p-BAsjJuJJ.js} +1 -1
- package/dist/components/{p-CpBPNHYe.js → p-BGpxtouI.js} +1 -1
- package/dist/components/{p-BDm6daTX.js → p-BQHbIUbt.js} +1 -1
- package/dist/components/{p-IMWw_SJ1.js → p-BZUlNC0d.js} +1 -1
- package/dist/components/p-BckY1cBy.js +1 -0
- package/dist/components/p-BlN03Cqm.js +1 -0
- package/dist/components/{p-C2cNc56z.js → p-Bls7CCxZ.js} +1 -1
- package/dist/components/{p-DgZ_vzrA.js → p-BoH7ykYx.js} +1 -1
- package/dist/components/{p-BRKeMTWI.js → p-BuuIkYiY.js} +1 -1
- package/dist/components/{p-lL2VxD2V.js → p-BvJuT-H0.js} +1 -1
- package/dist/components/{p-Dj1iJxUT.js → p-CBXH-GWN.js} +1 -1
- package/dist/components/{p-DfKZyde8.js → p-CNwoxvpg.js} +1 -1
- package/dist/components/{p-DnHzWLdY.js → p-CnEZJlEp.js} +1 -1
- package/dist/components/{p-BLsuwMw4.js → p-CqivNcjh.js} +1 -1
- package/dist/components/{p-BwgUEhOa.js → p-CtNDxhxx.js} +1 -1
- package/dist/components/p-D6noGX38.js +1 -0
- package/dist/components/{p-CGJ1L8_Y.js → p-D8T1XeGP.js} +1 -1
- package/dist/components/{p-DDahT3Mp.js → p-DBw58vNP.js} +1 -1
- package/dist/components/{p-BUB0CcPo.js → p-DFp9nJnT.js} +1 -1
- package/dist/components/{p-BJMpxQSk.js → p-DMvWCQfX.js} +1 -1
- package/dist/components/{p-2-7UYvqL.js → p-DNRm9_Bv.js} +1 -1
- package/dist/components/{p-ClBvavih.js → p-DpHtcEDP.js} +1 -1
- package/dist/components/p-DpYG9T3S.js +1 -0
- package/dist/components/{p-iORPryb0.js → p-PMD-Col0.js} +1 -1
- package/dist/components/{p-kDokArZu.js → p-d3KpOGRC.js} +1 -1
- package/dist/components/{p-C9rjLN0u.js → p-h9_f4fUW.js} +1 -1
- package/dist/components/p-lGr865w2.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-radio-button.js +1 -1
- package/dist/components/sd-radio-group.js +1 -1
- package/dist/components/sd-radio.js +1 -1
- package/dist/components/sd-select-list-item-search.js +1 -1
- package/dist/components/sd-select-list-item.js +1 -1
- package/dist/components/sd-select-listbox.js +1 -1
- package/dist/components/sd-select-trigger.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-switch.js +1 -1
- package/dist/components/sd-table.js +1 -1
- package/dist/components/sd-tabs.js +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-tbody.js +1 -1
- package/dist/components/sd-td.js +1 -1
- package/dist/components/sd-text-link.js +1 -1
- package/dist/components/sd-textarea.js +1 -1
- package/dist/components/sd-thead.js +1 -1
- package/dist/components/sd-toast-container.js +1 -1
- package/dist/components/sd-toast.js +1 -1
- package/dist/components/sd-toggle.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/p-0d5d2723.entry.js +1 -0
- package/dist/design-system/{p-578683b5.entry.js → p-21d8f192.entry.js} +1 -1
- package/dist/design-system/{p-b29569d7.entry.js → p-3b71d1d4.entry.js} +1 -1
- package/dist/design-system/{p-64d63a3f.entry.js → p-43d521c4.entry.js} +1 -1
- package/dist/design-system/{p-45651573.entry.js → p-5a67c40d.entry.js} +1 -1
- package/dist/design-system/{p-86e54f19.entry.js → p-5b184e17.entry.js} +1 -1
- package/dist/design-system/p-662ce409.entry.js +1 -0
- package/dist/design-system/{p-43316703.entry.js → p-6b20c76b.entry.js} +1 -1
- package/dist/design-system/{p-e897484c.entry.js → p-6f77fc76.entry.js} +1 -1
- package/dist/design-system/{p-586602a8.entry.js → p-74e605c0.entry.js} +1 -1
- package/dist/design-system/{p-b2ef677a.entry.js → p-8001447c.entry.js} +1 -1
- package/dist/design-system/{p-f280e59d.entry.js → p-8862e3e3.entry.js} +1 -1
- package/dist/design-system/{p-93f876ce.entry.js → p-90a360ca.entry.js} +1 -1
- package/dist/design-system/{p-1e1a5c69.entry.js → p-9afc1f7c.entry.js} +1 -1
- package/dist/design-system/{p-6cd3da51.entry.js → p-9b53de38.entry.js} +1 -1
- package/dist/design-system/{p-a5fe8b9a.entry.js → p-9ea2fbec.entry.js} +1 -1
- package/dist/design-system/{p-d10efe7e.entry.js → p-a1438f7d.entry.js} +1 -1
- package/dist/design-system/{p-e018fdb1.entry.js → p-a505459f.entry.js} +1 -1
- package/dist/design-system/{p-df5e8dba.entry.js → p-a8d69ab2.entry.js} +1 -1
- package/dist/design-system/p-ad822c82.entry.js +1 -0
- package/dist/design-system/{p-e94bd6d7.entry.js → p-b4df75b9.entry.js} +1 -1
- package/dist/design-system/p-ba5bb1ee.entry.js +1 -0
- package/dist/design-system/p-c0198e3a.entry.js +1 -0
- package/dist/design-system/{p-8101c564.entry.js → p-c7ff7bc8.entry.js} +1 -1
- package/dist/design-system/{p-b7e80770.entry.js → p-c8e86fb4.entry.js} +1 -1
- package/dist/design-system/{p-496d3684.entry.js → p-cb63d4cf.entry.js} +1 -1
- package/dist/design-system/p-d4097b87.entry.js +1 -0
- package/dist/design-system/{p-60f3ce4f.entry.js → p-d6329729.entry.js} +1 -1
- package/dist/design-system/{p-9b7d3077.entry.js → p-e77fe58a.entry.js} +1 -1
- package/dist/design-system/{p-43c79402.entry.js → p-f1e0ba30.entry.js} +1 -1
- package/dist/design-system/{p-3c4b57b5.entry.js → p-f418055d.entry.js} +1 -1
- package/dist/design-system/{p-c4c81918.entry.js → p-f9c0013c.entry.js} +1 -1
- package/dist/design-system/{p-a42bcc11.entry.js → p-fb609583.entry.js} +1 -1
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-action-modal.entry.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 +6 -7
- 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 +10 -10
- 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-dropdown-button.entry.js +1 -1
- package/dist/esm/sd-field_3.entry.js +8 -8
- package/dist/esm/sd-ghost-button_3.entry.js +25 -12
- 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 +46 -16
- package/dist/esm/sd-popover.entry.js +3 -3
- package/dist/esm/sd-popup.entry.js +1 -1
- package/dist/esm/sd-radio-button.entry.js +1 -1
- package/dist/esm/sd-radio.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 +6 -6
- package/dist/esm/sd-tabs.entry.js +1 -1
- package/dist/esm/sd-td.entry.js +1 -1
- package/dist/esm/sd-text-link.entry.js +23 -5
- 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-text-link/sd-text-link.d.ts +8 -0
- package/dist/types/components.d.ts +9 -0
- package/hydrate/index.js +174 -112
- package/hydrate/index.mjs +174 -112
- package/package.json +1 -1
- package/dist/components/p-BdFwmTyS.js +0 -1
- package/dist/components/p-BeKMwT89.js +0 -1
- package/dist/components/p-C_g09O6z.js +0 -1
- package/dist/components/p-ChwRSZ6R.js +0 -1
- package/dist/components/p-Dn93jl-w.js +0 -1
- package/dist/design-system/p-1e9793d6.entry.js +0 -1
- package/dist/design-system/p-7233ffb7.entry.js +0 -1
- package/dist/design-system/p-829b7e4f.entry.js +0 -1
- package/dist/design-system/p-956956af.entry.js +0 -1
- package/dist/design-system/p-b1f4e1e5.entry.js +0 -1
- package/dist/design-system/p-ccbf8687.entry.js +0 -1
|
@@ -241,36 +241,56 @@ export class SdThead {
|
|
|
241
241
|
'--table-border-color': TABLE_BORDER.color,
|
|
242
242
|
'--table-border-width': `${TABLE_BORDER.width}px`,
|
|
243
243
|
};
|
|
244
|
-
return (h(Host, { key: '
|
|
244
|
+
return (h(Host, { key: '521fa63c751f74ba620aad7355127c7d7fe8217c', slot: `${this.tableId}-head`, style: headStyle }, h("thead", { key: '226911deb4a0a0898e064875fbba7aa1d326634b', class: {
|
|
245
245
|
'thead': true,
|
|
246
246
|
'thead--sticky': this._stickyHeader,
|
|
247
|
-
} }, h("tr", { key: '
|
|
247
|
+
} }, h("tr", { key: 'f60653ae5dc8b773b73ab05f9631358272e90df5', class: "tr" }, this._selectable && (h("th", { key: '7826b9c1fa8ec84f83825f8380e7bcd014d3782a', class: {
|
|
248
248
|
'th': true,
|
|
249
249
|
'th--selected': true,
|
|
250
250
|
'sticky-left': true,
|
|
251
251
|
'sticky-left-edge': stickyLeftCount === 0,
|
|
252
252
|
'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
|
|
253
|
-
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '
|
|
253
|
+
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '412a9ee49954014dc45dd0a2444642a549782d8e', value: this.getIsAllChecked(), disabled: safeRows.length === 0, onSdUpdate: (e) => this.handleSelectAll(e.detail) }), h("div", { key: '116b6c2a55cc7553090b39338e251101c1de057b', class: "th__bar" }))), stickyLeftCols.map((col, idx) => (h("th", { key: col.name, class: {
|
|
254
254
|
'th': true,
|
|
255
255
|
[`${col.thClass}`]: Boolean(col.thClass),
|
|
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) }))));
|
|
@@ -78,7 +78,7 @@ export class SdTabs {
|
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
render() {
|
|
81
|
-
return (h("div", { key: '
|
|
81
|
+
return (h("div", { key: 'c824bcceda28b2591d57e713ae49f5f8260043c4', class: this.getContainerClasses(), style: this.buildCssVars() }, this.tabs.map((tab, index) => {
|
|
82
82
|
const badgeName = this.getBadgeName(tab);
|
|
83
83
|
return (h("div", { key: `tab-${index}`, role: "tab", tabindex: 0, "aria-selected": tab.value === this.value ? 'true' : 'false', class: this.getTabClasses(tab), "aria-label": tab.label || 'tab', onClick: () => this.handleTabClick(tab), onKeyDown: e => {
|
|
84
84
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
@@ -30,7 +30,7 @@ export class SdTag {
|
|
|
30
30
|
render() {
|
|
31
31
|
const config = this.resolvedConfig;
|
|
32
32
|
const iconNode = this.renderIcon(config.icon, config.iconSize);
|
|
33
|
-
return (h("span", { key: '
|
|
33
|
+
return (h("span", { key: '6cbf6fb37f0e926e604b24d482c8d648079b41dd', class: "sd-tag", style: {
|
|
34
34
|
'--sd-tag-background': config.background,
|
|
35
35
|
'--sd-tag-content': config.content,
|
|
36
36
|
'--sd-tag-height': config.height,
|
|
@@ -40,7 +40,7 @@ export class SdTag {
|
|
|
40
40
|
'--sd-tag-font-weight': config.fontWeight,
|
|
41
41
|
'--sd-tag-line-height': config.lineHeight,
|
|
42
42
|
'--sd-tag-radius': config.radius,
|
|
43
|
-
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '
|
|
43
|
+
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: 'e0e9410afe716341dc7fb7891bb46c85cde9d51b', class: "sd-tag__label" }, this.label), this.icon && !this.isLeft && iconNode));
|
|
44
44
|
}
|
|
45
45
|
static get is() { return "sd-tag"; }
|
|
46
46
|
static get originalStyleUrls() {
|
|
@@ -2,6 +2,7 @@ sd-text-link {
|
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
}
|
|
4
4
|
sd-text-link .sd-text-link {
|
|
5
|
+
position: relative;
|
|
5
6
|
display: inline-flex;
|
|
6
7
|
align-items: center;
|
|
7
8
|
gap: var(--sd-text-link-gap);
|
|
@@ -19,4 +20,20 @@ sd-text-link .sd-text-link:not(.sd-text-link--disabled):hover .sd-text-link__lab
|
|
|
19
20
|
}
|
|
20
21
|
sd-text-link .sd-text-link--disabled {
|
|
21
22
|
cursor: not-allowed;
|
|
23
|
+
}
|
|
24
|
+
sd-text-link .sd-text-link sd-portal {
|
|
25
|
+
position: absolute;
|
|
26
|
+
width: 0;
|
|
27
|
+
height: 0;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.sd-text-link__tooltip-inner {
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
transform: translateX(-50%);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
[data-align=right] .sd-text-link__tooltip-inner {
|
|
38
|
+
transform: none;
|
|
22
39
|
}
|
|
@@ -17,6 +17,10 @@ export class SdTextLink {
|
|
|
17
17
|
disabled = false;
|
|
18
18
|
/** 텍스트 크기 */
|
|
19
19
|
size = 'sm';
|
|
20
|
+
/** 호버 시 표시할 툴팁 텍스트 */
|
|
21
|
+
tooltipText;
|
|
22
|
+
hostEl;
|
|
23
|
+
isTooltipOpen = false;
|
|
20
24
|
/** 클릭 시 발생합니다. */
|
|
21
25
|
click;
|
|
22
26
|
handleClick = () => {
|
|
@@ -24,6 +28,18 @@ export class SdTextLink {
|
|
|
24
28
|
return;
|
|
25
29
|
this.click.emit();
|
|
26
30
|
};
|
|
31
|
+
handleMouseEnter = () => {
|
|
32
|
+
this.isTooltipOpen = true;
|
|
33
|
+
};
|
|
34
|
+
handleMouseLeave = () => {
|
|
35
|
+
this.isTooltipOpen = false;
|
|
36
|
+
};
|
|
37
|
+
handleFocus = () => {
|
|
38
|
+
this.isTooltipOpen = true;
|
|
39
|
+
};
|
|
40
|
+
handleBlur = () => {
|
|
41
|
+
this.isTooltipOpen = false;
|
|
42
|
+
};
|
|
27
43
|
render() {
|
|
28
44
|
const sizeConfig = TEXT_LINK_SIZE_CONFIG[this.size] ?? TEXT_LINK_SIZE_CONFIG.sm;
|
|
29
45
|
const typo = this.underline ? sizeConfig.typography.underline : sizeConfig.typography.default;
|
|
@@ -39,7 +55,9 @@ export class SdTextLink {
|
|
|
39
55
|
'--sd-text-link-text-decoration': typo.textDecoration,
|
|
40
56
|
...(this.disabled ? { '--sd-text-link-color': TEXT_LINK_COLORS.content.disabled } : {}),
|
|
41
57
|
};
|
|
42
|
-
|
|
58
|
+
const tooltipText = (this.tooltipText ?? '').trim();
|
|
59
|
+
const hasTooltip = tooltipText.length > 0;
|
|
60
|
+
return (h("span", { key: 'd9653ed47a77fb5c00dc57f8f7cc2b4dc9035ca4', role: "button", tabindex: this.disabled ? -1 : 0, class: {
|
|
43
61
|
'sd-text-link': true,
|
|
44
62
|
'sd-text-link--disabled': this.disabled,
|
|
45
63
|
}, style: cssVars, onClick: this.handleClick, onKeyDown: e => {
|
|
@@ -47,13 +65,13 @@ export class SdTextLink {
|
|
|
47
65
|
e.preventDefault();
|
|
48
66
|
this.handleClick();
|
|
49
67
|
}
|
|
50
|
-
} }, this.icon && (h("sd-icon", { key: '
|
|
68
|
+
}, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, onFocus: this.handleFocus, onBlur: this.handleBlur }, hasTooltip && this.isTooltipOpen && (h("sd-portal", { key: '62b3cb48c5b5fa6eb0b2b2962ef6c78bac5ac545', parentRef: this.hostEl, open: true, offset: [this.hostEl.offsetWidth / 2, 4], placement: "top" }, h("div", { key: '5a428366f5bc2f8686a78fc73d91517ccca13eb9', class: "sd-text-link__tooltip-inner", "aria-hidden": "true" }, h("sd-tag", { key: '3416662595e9bfd164279e684e2ead9d1575a9d8', name: "square_xs_grey", label: tooltipText })))), this.icon && (h("sd-icon", { key: '5056f0c55ebe92963e856f2970cfd74143876cfb', name: this.icon, size: sizeConfig.iconSize, color: iconColor, class: "sd-text-link__icon" })), h("span", { key: '6cf8474ba642c9ec3dc5952c5530f9ba15046053', class: labelClassName }, this.label), this.rightArrow && this.rightArrow !== 'none' && (h("span", { key: '17a74ec3a3e1a26f18b73f7d4816ea0aee0cb22c', class: "sd-text-link__arrow", style: {
|
|
51
69
|
width: `${TEXT_LINK_ARROW.arrowFrame}px`,
|
|
52
70
|
height: `${TEXT_LINK_ARROW.arrowFrame}px`,
|
|
53
71
|
display: 'inline-flex',
|
|
54
72
|
alignItems: 'center',
|
|
55
73
|
justifyContent: 'center',
|
|
56
|
-
} }, h("sd-icon", { key: '
|
|
74
|
+
} }, h("sd-icon", { key: 'ed0a6bf8b678a93fa8a0da907efb0cbf60427738', name: this.rightArrow === 'chevron' ? 'chevronRight' : 'caretRight', size: TEXT_LINK_ARROW.arrowIconSize, color: arrowColor })))));
|
|
57
75
|
}
|
|
58
76
|
static get is() { return "sd-text-link"; }
|
|
59
77
|
static get originalStyleUrls() {
|
|
@@ -234,9 +252,33 @@ export class SdTextLink {
|
|
|
234
252
|
"reflect": true,
|
|
235
253
|
"attribute": "size",
|
|
236
254
|
"defaultValue": "'sm'"
|
|
255
|
+
},
|
|
256
|
+
"tooltipText": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"mutable": false,
|
|
259
|
+
"complexType": {
|
|
260
|
+
"original": "string",
|
|
261
|
+
"resolved": "string | undefined",
|
|
262
|
+
"references": {}
|
|
263
|
+
},
|
|
264
|
+
"required": false,
|
|
265
|
+
"optional": true,
|
|
266
|
+
"docs": {
|
|
267
|
+
"tags": [],
|
|
268
|
+
"text": "\uD638\uBC84 \uC2DC \uD45C\uC2DC\uD560 \uD234\uD301 \uD14D\uC2A4\uD2B8"
|
|
269
|
+
},
|
|
270
|
+
"getter": false,
|
|
271
|
+
"setter": false,
|
|
272
|
+
"reflect": false,
|
|
273
|
+
"attribute": "tooltip-text"
|
|
237
274
|
}
|
|
238
275
|
};
|
|
239
276
|
}
|
|
277
|
+
static get states() {
|
|
278
|
+
return {
|
|
279
|
+
"isTooltipOpen": {}
|
|
280
|
+
};
|
|
281
|
+
}
|
|
240
282
|
static get events() {
|
|
241
283
|
return [{
|
|
242
284
|
"method": "click",
|
|
@@ -255,4 +297,5 @@ export class SdTextLink {
|
|
|
255
297
|
}
|
|
256
298
|
}];
|
|
257
299
|
}
|
|
300
|
+
static get elementRef() { return "hostEl"; }
|
|
258
301
|
}
|
|
@@ -139,7 +139,7 @@ export class SdTextarea {
|
|
|
139
139
|
'--sd-system-size-field-sm-height': 'auto',
|
|
140
140
|
'--sd-system-radius-field-sm': `${TEXTAREA_TOKENS.radius}px`,
|
|
141
141
|
};
|
|
142
|
-
return (h("sd-field", { key: '
|
|
142
|
+
return (h("sd-field", { key: '08375e678b02c61a201b70214772e8a354280601', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, readonly: this.readonly, focused: this.focused, hovered: this.hovered, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: '5c9462b2b0c8f0078c34b044b8cd626dfd9f18be', class: "sd-textarea__content" }, h("textarea", { key: 'a5f0d448791be4b75388c02e8a356486c0487d78', name: this.name, ref: el => (this.nativeEl = el), class: `sd-textarea__native ${this.textareaClass}`, value: this.internalValue || '', placeholder: this.placeholder ?? '입력해 주세요.', disabled: this.disabled, readOnly: this.readonly, autofocus: this.autoFocus, maxLength: this.maxLength, rows: this.rows, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.textareaStyle }))));
|
|
143
143
|
}
|
|
144
144
|
static get is() { return "sd-textarea"; }
|
|
145
145
|
static get originalStyleUrls() {
|
|
@@ -26,12 +26,12 @@ export class SdToast {
|
|
|
26
26
|
const linkColor = typeConfig.linkColor ?? typeConfig.content;
|
|
27
27
|
const useDefaultCloseIntent = ['default', 'caution', 'info'].includes(this.type);
|
|
28
28
|
const buttonName = TOAST_BUTTON_NAME_BY_TYPE[this.type] ?? TOAST_BUTTON_NAME_BY_TYPE.default;
|
|
29
|
-
return (h("div", { key: '
|
|
29
|
+
return (h("div", { key: '240ed7553fa03d18bb4384b1192d16a821be5832', style: {
|
|
30
30
|
'--sd-toast-bg': typeConfig.bg,
|
|
31
31
|
'--sd-toast-text': typeConfig.content,
|
|
32
32
|
'--sd-toast-icon': iconColor,
|
|
33
33
|
'--sd-toast-link': linkColor,
|
|
34
|
-
} }, h("div", { key: '
|
|
34
|
+
} }, h("div", { key: 'bdb9a45473dcab86e2dd8bb6321e7b717f93b784', class: "sd-toast", role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (h("div", { key: '2a02e47336cd6a46c7cc3560f3f82d4f10a3d211', class: "sd-toast__icon" }, h("sd-icon", { key: '872cfb213c3a080fc1e5458ce53efa04c1fa8840', name: this.icon, size: iconSize, color: iconColor }))), h("div", { key: '3a22f7518f63676e22c4faeb76873c31d6cf6b11', class: "sd-toast__content" }, h("span", { key: 'dd6a533b60c07bdcbdc80090d61bdf29b8879609', class: "sd-toast__message" }, this.message)), this.link && (h("a", { key: '45efddf62b906e8f0b2136ad3d1131204d0b9125', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.buttonLabel && (h("sd-button", { key: '3729f4f21ba7e59c2702137053de946e284b226a', class: "sd-toast__button", name: buttonName, label: this.buttonLabel, onSdClick: (event) => this.buttonClick.emit(event.detail) })), this.useClose && (h("sd-ghost-button", { key: 'd7f0f670aef527be6253cd70bd2b19a900ccaddd', class: "sd-toast__close", icon: "close", intent: useDefaultCloseIntent ? 'default' : 'inverse', ariaLabel: "close", size: "xs", onClick: () => this.close.emit() })))));
|
|
35
35
|
}
|
|
36
36
|
static get is() { return "sd-toast"; }
|
|
37
37
|
static get originalStyleUrls() {
|
|
@@ -225,7 +225,7 @@ export class SdToastContainer {
|
|
|
225
225
|
const activeToasts = toasts.filter(t => t.state !== 'exiting').reverse();
|
|
226
226
|
const indexMap = new Map();
|
|
227
227
|
activeToasts.forEach((t, i) => indexMap.set(t.id, i));
|
|
228
|
-
return (h("div", { key: '
|
|
228
|
+
return (h("div", { key: '6a6db296cca6ee2b3f1f5ba1b2014f3787fd6ee0', class: "sd-toast-container", style: this.getContainerStyles(), onMouseEnter: () => {
|
|
229
229
|
this.expanded = true;
|
|
230
230
|
this.pauseTimers();
|
|
231
231
|
}, onMouseLeave: () => {
|
|
@@ -49,7 +49,7 @@ export class SdToggle {
|
|
|
49
49
|
'--sd-toggle-content-select': TOGGLE_COLORS.content.select,
|
|
50
50
|
'--sd-toggle-content-disabled': TOGGLE_COLORS.content.disabled,
|
|
51
51
|
};
|
|
52
|
-
return (h("label", { key: '
|
|
52
|
+
return (h("label", { key: 'f5bc6364e15bfd720d639959d4b8eca1faf022ff', class: this.toggleClasses, style: cssVars, "aria-label": this.label || 'toggle' }, this.label, h("input", { key: 'e6046c1887bac5fc46dfe94d065c4e782090997f', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
|
|
53
53
|
}
|
|
54
54
|
static get is() { return "sd-toggle"; }
|
|
55
55
|
static get originalStyleUrls() {
|
|
@@ -142,7 +142,7 @@ export class SdTooltip {
|
|
|
142
142
|
const bodyHTML = this.message && this.message.length > 0
|
|
143
143
|
? this.message.map(line => `<div>${line}</div>`).join('')
|
|
144
144
|
: this.slotContentHTML;
|
|
145
|
-
return (h(Fragment, { key: '
|
|
145
|
+
return (h(Fragment, { key: '81d582c4c8847a0f57abf632d975461cdf07b535' }, h("div", { key: 'c7515fb866fa85749405bb10512e27575850eb27', ref: el => (this.triggerEl = el), class: triggerClasses, ...divTrigger }, anchorMode ? (h("slot", { name: "anchor" })) : hasLabel ? (h("sd-button", { ref: el => (this.buttonEl = el), name: this.name ?? 'primary_sm', label: this.label, icon: icon, rightIcon: this.rightIcon, ariaLabel: this.ariaLabel, disabled: this.disabled, type: this.type ?? 'button', class: "sd-tooltip", ...buttonClickTrigger })) : (h("sd-icon", { ref: el => (this.buttonEl = el), name: icon, size: this.iconSize ?? 12, color: color, class: "sd-tooltip" }))), this.showTooltip && (h("sd-floating-portal", { key: '903aaa3723a119687e5af8120d54fb1b9e43c584', parentRef: anchorMode ? this.triggerEl : this.buttonEl, onSdClose: this.handleClose, placement: placement, offset: this.tooltipOffset }, h("div", { key: '813e1dbf7f2d8e0378f4fcac1225341aafbd9948', ref: el => (this.menuEl = el), class: {
|
|
146
146
|
'sd-floating-menu': true,
|
|
147
147
|
[`sd-floating-menu--${tooltipType}`]: true,
|
|
148
148
|
[`sd-floating-menu--${placement}`]: true,
|
|
@@ -150,7 +150,7 @@ export class SdTooltip {
|
|
|
150
150
|
}, style: {
|
|
151
151
|
'--sd-floating-bg': typeConfig.bg,
|
|
152
152
|
'--sd-floating-content': typeConfig.content,
|
|
153
|
-
}, onMouseEnter: () => this.openTooltip(), onMouseLeave: () => !this.useClose && this.startHideTimer() }, h("i", { key: '
|
|
153
|
+
}, onMouseEnter: () => this.openTooltip(), onMouseLeave: () => !this.useClose && this.startHideTimer() }, h("i", { key: 'd74071d3d236382bc952ad03a05ebd77219b4ddb', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${placement}` }, h(TooltipArrow, { key: '91c35bd2bc22294b7e7998965930219a43799310' })), h("div", { key: '16edd2fc6e9ad02b646c05c6404d3eb79e2a7a71', class: "sd-floating-menu__content", innerHTML: bodyHTML }), this.useClose && (h("sd-ghost-button", { key: 'd234906f7a4a603a8e18cef6da49f9d893adb731', class: "sd-floating-menu__close-button", icon: "close", ariaLabel: "close", size: "xxs", onClick: () => this.closeTooltip() })))))));
|
|
154
154
|
}
|
|
155
155
|
static get is() { return "sd-tooltip"; }
|
|
156
156
|
static get originalStyleUrls() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,c as s,h as a,t as r}from"./p-CEVDmQdt.js";import{n as d}from"./p-CCwNgVmC.js";import{i as o}from"./p-e0ABNkP6.js";import{d as i}from"./p-C3rOud8J.js";import{d as l}from"./p-
|
|
1
|
+
import{p as e,H as t,c as s,h as a,t as r}from"./p-CEVDmQdt.js";import{n as d}from"./p-CCwNgVmC.js";import{i as o}from"./p-e0ABNkP6.js";import{d as i}from"./p-C3rOud8J.js";import{d as l}from"./p-0eogwabp.js";import{d as n}from"./p-DMvWCQfX.js";import{d as h}from"./p-BlN03Cqm.js";import{d as c}from"./p-BnhzUsGP.js";import{d as u}from"./p-BckY1cBy.js";import{d as p}from"./p-D8T1XeGP.js";import{d as x}from"./p-BGpxtouI.js";const m={paddingX:o.textinput.sm.paddingX,paddingY:o.textinput.sm.paddingY,radius:o.textinput.sm.radius,fontSize:o.textinput.sm.typography.fontSize,lineHeight:o.textinput.sm.typography.lineHeight,fontWeight:o.textinput.sm.typography.fontWeight},b={text:o.textinput.text,bg:o.textinput.bg,border:o.textinput.border,resizer:o.textinput.resizer},f=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.input=s(this,"sdUpdate",7),this.focus=s(this,"sdFocus",7),this.blur=s(this,"sdBlur",7)}get host(){return this}value=null;placeholder="입력해 주세요.";disabled=!1;readonly=!1;autoFocus=!1;textareaClass="";textareaStyle={};maxLength;rows;spellcheck=!1;width="";label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;status;focused=!1;hovered=!1;internalValue=null;nativeEl=void 0;formField;name=d();input;focus;blur;valueChanged(e){this.internalValue=e}internalValueChanged(e){e!==this.value&&(this.value=e,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){null!=this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=e=>{this.internalValue=e.target.value};handleFocus=async(e,t)=>{this.focused="focus"===e,"blur"===e?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(t)):this.focus?.emit(t)};render(){return a("sd-field",{key:"08375e678b02c61a201b70214772e8a354280601",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,readonly:this.readonly,focused:this.focused,hovered:this.hovered,status:this.status,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-textarea-font-size":`${m.fontSize}px`,"--sd-textarea-line-height":`${m.lineHeight}px`,"--sd-textarea-font-weight":m.fontWeight,"--sd-textarea-padding-x":`${m.paddingX}px`,"--sd-textarea-padding-y":`${m.paddingY}px`,"--sd-textarea-radius":`${m.radius}px`,"--sd-textarea-text-color":b.text.default,"--sd-textarea-placeholder-color":b.text.placeholder,"--sd-textarea-disabled-color":b.text.disabled,"--sd-textarea-bg-color":b.bg.default,"--sd-textarea-disabled-bg-color":b.bg.disabled,"--sd-textarea-border-color":b.border.default,"--sd-textarea-resizer-color":b.resizer.color,"--sd-system-size-field-sm-height":"auto","--sd-system-radius-field-sm":`${m.radius}px`}},a("div",{key:"5c9462b2b0c8f0078c34b044b8cd626dfd9f18be",class:"sd-textarea__content"},a("textarea",{key:"a5f0d448791be4b75388c02e8a356486c0487d78",name:this.name,ref:e=>this.nativeEl=e,class:`sd-textarea__native ${this.textareaClass}`,value:this.internalValue||"",placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readOnly:this.readonly,autofocus:this.autoFocus,maxLength:this.maxLength,rows:this.rows,spellcheck:this.spellcheck,onInput:this.handleInput,onFocus:e=>this.handleFocus("focus",e),onBlur:e=>this.handleFocus("blur",e),style:this.textareaStyle})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-textarea{display:inline-flex}sd-textarea .sd-textarea__content{width:100%;display:flex}sd-textarea .sd-textarea__content .sd-textarea__native{width:100%;min-height:100px;border:none;outline:none;background:transparent;padding:var(--sd-textarea-padding-y) var(--sd-textarea-padding-x);font-family:inherit;font-size:var(--sd-textarea-font-size);line-height:var(--sd-textarea-line-height);font-weight:var(--sd-textarea-font-weight);color:var(--sd-textarea-text-color);resize:vertical}sd-textarea .sd-textarea__content .sd-textarea__native::placeholder{color:var(--sd-textarea-placeholder-color)}sd-textarea .sd-textarea__content .sd-textarea__native:disabled{cursor:not-allowed;color:var(--sd-textarea-disabled-color)}sd-textarea .sd-textarea__content .sd-textarea__native[readonly]{color:var(--sd-system-color-field-text-read-only)}"}},[512,"sd-textarea",{value:[1025],placeholder:[1],disabled:[4],readonly:[4],autoFocus:[4,"auto-focus"],textareaClass:[1,"textarea-class"],textareaStyle:[16],maxLength:[2,"max-length"],rows:[2],spellcheck:[4],width:[8],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],hint:[1],errorMessage:[1,"error-message"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],rules:[16],error:[1028],status:[1],focused:[1028],hovered:[1028],name:[1],internalValue:[32],sdGetNativeElement:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function g(){"undefined"!=typeof customElements&&["sd-textarea","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-textarea":customElements.get(r(e))||customElements.define(r(e),f);break;case"sd-button":customElements.get(r(e))||i();break;case"sd-field":customElements.get(r(e))||l();break;case"sd-floating-portal":customElements.get(r(e))||n();break;case"sd-ghost-button":customElements.get(r(e))||h();break;case"sd-icon":customElements.get(r(e))||c();break;case"sd-portal":customElements.get(r(e))||u();break;case"sd-tag":customElements.get(r(e))||p();break;case"sd-tooltip":customElements.get(r(e))||x()}}))}export{f as S,g as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as s,H as d,c as a,h as e,d as o,t as i}from"./p-CEVDmQdt.js";import{m as t}from"./p-DOXMJi-V.js";import{d as l}from"./p-C3rOud8J.js";import{d as n}from"./p-
|
|
1
|
+
import{p as s,H as d,c as a,h as e,d as o,t as i}from"./p-CEVDmQdt.js";import{m as t}from"./p-DOXMJi-V.js";import{d as l}from"./p-C3rOud8J.js";import{d as n}from"./p-D6noGX38.js";import{d as m}from"./p-BnhzUsGP.js";const r={minWidth:Number(t.modal.loading.width),minHeight:Number(t.modal.loading.height),gap:Number(t.modal.loading.gap),contentSize:Number(t.modal.loading.content),radius:Number(t.modal.radius)},g={bg:t.modal.bg,messageColor:t.modal.loading.message.color,errorIcon:t.modal.confirm.negative.icon},c=t.modal.loading.message.typography.fontFamily,h=Number(t.modal.loading.message.typography.fontSize),u=Number(t.modal.loading.message.typography.fontWeight),b=Number(t.modal.loading.message.typography.lineHeight),p={loading:"작업을 진행하고 있습니다. 잠시만 기다려 주세요.",error:"작업에 실패하였습니다. 다시 시도해 주세요."},f={loading:"작업 취소",error:"다시 시도"},v=s(class extends d{constructor(s){super(),!1!==s&&this.__registerHost(),this.click=a(this,"sdClick",7)}state="loading";message="";useButton=!1;buttonLabel="";width;height;progress;click;get resolvedState(){return this.state??"loading"}get resolvedMessage(){return this.message||p[this.resolvedState]}get resolvedButtonLabel(){return this.buttonLabel||f[this.resolvedState]}handleClick=()=>{this.click.emit()};toCssSize(s){if(null!=s&&""!==s)return"number"==typeof s?`${s}px`:s}render(){const s={"--sd-loading-modal-min-width":`${r.minWidth}px`,"--sd-loading-modal-min-height":`${r.minHeight}px`,"--sd-loading-modal-gap":`${r.gap}px`,"--sd-loading-modal-content-size":`${r.contentSize}px`,"--sd-loading-modal-radius":`${r.radius}px`,"--sd-loading-modal-bg":g.bg,"--sd-loading-modal-message-color":g.messageColor,"--sd-loading-modal-message-font-family":c,"--sd-loading-modal-message-font-size":`${h}px`,"--sd-loading-modal-message-font-weight":`${u}`,"--sd-loading-modal-message-line-height":`${b}px`,"--sd-loading-modal-error-color":g.errorIcon,"--sd-loading-modal-width":this.toCssSize(this.width)??`${r.minWidth}px`,"--sd-loading-modal-height":this.toCssSize(this.height)??`${r.minHeight}px`};return e(o,{key:"163783850461aff1255dbd0784db91ad28da3f16",style:s},e("div",{key:"1e09f93378b0813d03c444570d06ffb09b494b63",class:"sd-loading-modal"},e("div",{key:"97a4919967f5be295b57b4194295c919b13151a4",class:"sd-loading-modal__content"},"loading"===this.resolvedState?e("sd-circle-progress",void 0!==this.progress?{value:this.progress}:{indeterminate:!0}):e("sd-icon",{class:"sd-loading-modal__icon",name:"warningOutline",size:r.contentSize,color:g.errorIcon})),e("div",{key:"aea0e4b45a55f0907e073f125ba0195bfa128078",class:"sd-loading-modal__message-wrapper"},Array.isArray(this.resolvedMessage)?this.resolvedMessage.map((s=>e("p",{class:"sd-loading-modal__message"},s))):e("p",{class:"sd-loading-modal__message"},this.resolvedMessage)),this.useButton&&e("div",{key:"b64767c954b366f6414886f032c80dd1c8c0190b",class:"sd-loading-modal__button"},e("sd-button",{key:"8a99e885b5561656f4046698235537d461b41455",name:"neutral_outline_sm",label:this.resolvedButtonLabel,onSdClick:this.handleClick}))))}static get style(){return"sd-loading-modal{display:inline-block}sd-loading-modal .sd-loading-modal{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sd-loading-modal-gap);min-width:var(--sd-loading-modal-min-width);min-height:var(--sd-loading-modal-min-height);width:var(--sd-loading-modal-width, auto);height:var(--sd-loading-modal-height, auto);border-radius:var(--sd-loading-modal-radius);background:var(--sd-loading-modal-bg);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2)}sd-loading-modal .sd-loading-modal__content{display:flex;align-items:center;justify-content:center;width:var(--sd-loading-modal-content-size);height:var(--sd-loading-modal-content-size)}sd-loading-modal .sd-loading-modal__message{margin:0;color:var(--sd-loading-modal-message-color);font-family:var(--sd-loading-modal-message-font-family);font-size:var(--sd-loading-modal-message-font-size);font-weight:var(--sd-loading-modal-message-font-weight);line-height:var(--sd-loading-modal-message-line-height);text-align:center}sd-loading-modal .sd-loading-modal__button{display:flex;justify-content:center}"}},[512,"sd-loading-modal",{state:[513],message:[1],useButton:[516,"use-button"],buttonLabel:[1,"button-label"],width:[8],height:[8],progress:[2]}]);function x(){"undefined"!=typeof customElements&&["sd-loading-modal","sd-button","sd-circle-progress","sd-icon"].forEach((s=>{switch(s){case"sd-loading-modal":customElements.get(i(s))||customElements.define(i(s),v);break;case"sd-button":customElements.get(i(s))||l();break;case"sd-circle-progress":customElements.get(i(s))||n();break;case"sd-icon":customElements.get(i(s))||m()}}))}export{v as S,x as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as d,h as s,t as i}from"./p-CEVDmQdt.js";import{f as l}from"./p-BOJJ_sQS.js";import{d as t}from"./p-C3rOud8J.js";import{d as r}from"./p-BJMpxQSk.js";import{d as o}from"./p-BdFwmTyS.js";import{d as a}from"./p-BnhzUsGP.js";import{d as f}from"./p-ChwRSZ6R.js";import{d as n}from"./p-CGJ1L8_Y.js";import{d as h}from"./p-CpBPNHYe.js";const c={start:"flex-start",center:"center",end:"flex-end"},p=l.field.label.sm,b=l.field.label.md,m={sm:{height:p.height,gap:p.gap,icon:p.icon,fontSize:p.typography.fontSize,lineHeight:p.typography.lineHeight,fontWeight:p.typography.fontWeight},md:{height:b.height,gap:b.gap,icon:b.icon,fontSize:b.typography.fontSize,lineHeight:b.typography.lineHeight,fontWeight:b.typography.fontWeight}},g=["sd-input","sd-barcode-input","sd-textarea","sd-number-input","sd-select","sd-file-picker","sd-date-picker","sd-date-range-picker","sd-chip-input"],_=e(class extends d{constructor(e){super(),!1!==e&&this.__registerHost()}get el(){return this}name="";rules=[];error=!1;disabled=!1;readonly=!1;hovered=!1;focused=!1;status;hint="";errorMessage="";width="";size="sm";label="";labelWidth="";addonLabel="";addonAlign="start";icon=void 0;labelTooltip="";labelTooltipProps=null;errorMsg="";hostElement=null;get value(){return this.hostElement?.value??null}get fieldStatus(){let e="";return this.disabled?(e="disabled",`sd-field--${e}`):this.readonly?(e="readonly",`sd-field--${e}`):this.focused?(e="focus",`sd-field--${e}`):(this.hovered&&(e="hover"),void 0!==this.status&&(e=this.status),this.error&&(e="error"),""!==e?`sd-field--${e}`:"")}componentDidLoad(){this.hostElement=this.findHostElement(),this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}findHostElement(){for(const e of g){const d=this.el.closest(e);if(d&&"value"in d)return d}return null}registerToForm(){const e=this.el.closest("sd-form");e&&"function"==typeof e.componentOnReady&&e.componentOnReady().then((e=>{e.sdRegisterField(this)}))}unregisterFromForm(){if(""===this.name)return;const e=this.el.closest("sd-form");e?.componentOnReady().then((e=>{e.sdUnregisterField(this)}))}async sdValidate(){if(!this.rules||0===this.rules.length)return!0;for(const e of this.rules){const d=e(this.value??"");if(!0!==d)return this.setError(!0,d),!1}return this.setError(!1,""),!0}async sdReset(){this.hostElement&&(this.hostElement.value=null),this.setError(!1,"")}async sdResetValidation(){this.setError(!1,"")}async sdFocus(){this.hostElement?.focus?.(),this.hostElement?.scrollIntoView({behavior:"smooth",block:"center"})}setError(e,d){this.errorMsg=d,this.hostElement&&(this.hostElement.error=e)}render(){const e=this.addonLabel,d=l.field.addonLabel,i=this.size in m?this.size:"sm",t=m[i],r={"--sd-field-wrapper-height":`var(--sd-system-size-field-${i}-height)`,"--sd-field-control-radius":`var(--sd-system-radius-field-${i})`,"--sd-field-label-margin-right":`var(--sd-system-space-field-${i}-gap)`},o={"--sd-field-error-message-color":l.field.errorMessage.color,"--sd-field-error-message-font-size":`${l.field.errorMessage.typography.fontSize}px`,"--sd-field-error-message-line-height":`${l.field.errorMessage.typography.lineHeight}px`,"--sd-field-hint-color":l.field.hint.color,"--sd-field-hint-font-size":`${l.field.hint.typography.fontSize}px`,"--sd-field-hint-line-height":`${l.field.hint.typography.lineHeight}px`,"--sd-field-message-gap":`${l.field.contents.gap}px`},a=""!==this.label?{"--sd-field-label-height":`${t.height}px`,"--sd-field-label-gap":`${t.gap}px`,"--sd-field-label-font-size":`${t.fontSize}px`,"--sd-field-label-line-height":`${t.lineHeight}px`,"--sd-field-label-font-weight":t.fontWeight,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-label-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{},f=""!==e?{"--sd-field-addon-padding-x":`${d.paddingX}px`,"--sd-field-addon-font-size":`${d.typography.fontSize}px`,"--sd-field-addon-line-height":`${d.typography.lineHeight}px`,"--sd-field-addon-font-weight":d.typography.fontWeight,"--sd-field-addon-bg":d.bg,"--sd-field-addon-border-color":this.disabled?d.border.disabled:d.border.default,"--sd-field-addon-gap":`${d.gap}px`,"--sd-field-addon-border-width":`${d.border.width}px`,"--sd-field-addon-justify":c[this.addonAlign]??c.start,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-addon-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{};return s("div",{key:"baf943d77385c9c02e2fe1d938f9622bd858129c",class:{"sd-field":!0,"sd-field--has-label":""!==this.label,"sd-field--has-addon":""!==e,[this.fieldStatus]:""!==this.fieldStatus},style:{...r,...a,...f,...o}},s("div",{key:"f5f204929ef4a4e1a260d7609bc00d9a1fe998f4",class:"sd-field__wrapper"},this.renderLabel(this.label),s("div",{key:"eff02956e5aae08691b2850bb0d1978865a446f9",class:"sd-field__main",style:""!==this.width&&0!==this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},s("div",{key:"bf00b81dbb3d36a8a8ddf4919c9ec3383a1f3f14",class:{"sd-field__control":!0,"sd-field__control--has-addon":""!==e}},e&&s("div",{key:"4cef1308de0b709d5924ff7a02ee5bd3b78c1502",class:"sd-field__addon"},this.icon&&s("sd-icon",{key:"7fdfca555d80f5409082c43967224fd8108a6f29",name:this.icon.name,size:this.icon.size??Number(m[this.size in m?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate}),e),s("slot",{key:"c523813390db6f6f4acce3ffb8377820ffb95fad"})),""!==this.errorMsg||""!==this.errorMessage?s("div",{class:"sd-field__error-message"},""!==this.errorMsg?this.errorMsg:this.errorMessage):""!==this.hint&&s("div",{class:"sd-field__hint"},this.hint))))}renderLabel(e){return null==e||""===e?null:s("label",{class:"sd-field__label"},this.icon&&s("sd-icon",{name:this.icon.name,size:this.icon.size??Number(m[this.size in m?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate,class:"sd-field__label__icon"}),s("div",{class:"sd-field__label__text"},e),this.labelTooltip&&s("sd-tooltip",{class:"sd-field__label__tooltip",...this.labelTooltipProps},this.labelTooltip))}static get style(){return"sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#E1E1E1;border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--readonly .sd-field__wrapper .sd-field__control{background-color:var(--sd-system-color-field-bg-read-only);color:var(--sd-system-color-field-text-read-only)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;flex-shrink:0;width:var(--sd-field-label-width, auto);height:var(--sd-field-label-height);margin-right:var(--sd-field-label-margin-right)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__icon{margin-right:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:var(--sd-field-label-font-size);line-height:var(--sd-field-label-line-height);font-weight:var(--sd-field-label-font-weight);color:var(--sd-system-color-field-text-default);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-addon .sd-field__control .sd-field__addon{display:flex;gap:var(--sd-field-addon-gap);align-items:center;justify-content:var(--sd-field-addon-justify, flex-start);white-space:nowrap;box-sizing:border-box;flex-shrink:0;width:var(--sd-field-addon-width, auto);padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right:var(--sd-field-addon-border-width) solid var(--sd-field-addon-border-color);border-radius:calc(var(--sd-field-control-radius) - 1px) 0 0 calc(var(--sd-field-control-radius) - 1px)}sd-field .sd-field__wrapper{width:100%;display:flex;align-items:flex-start;flex-flow:row nowrap;position:relative;color:var(--sd-system-color-field-text-default);-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__main{flex:1;min-width:0;display:flex;flex-direction:column}sd-field .sd-field__wrapper .sd-field__control{position:relative;height:var(--sd-field-wrapper-height);display:flex;min-width:0;border:1px solid var(--sd-system-color-field-border-default);border-radius:var(--sd-field-control-radius);background:var(--sd-system-color-field-bg-default)}sd-field .sd-field--error .sd-field__wrapper .sd-field__control:not(:hover){border:1px solid var(--sd-system-color-field-border-danger) !important}sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-success) !important}sd-field .sd-field:not(.sd-field--disabled):not(.sd-field--readonly) .sd-field__wrapper .sd-field__control:hover{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--focus:not(.sd-field--readonly) .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field .sd-field__error-message{color:var(--sd-field-error-message-color);font-size:var(--sd-field-error-message-font-size);line-height:var(--sd-field-error-message-line-height);margin-top:var(--sd-field-message-gap)}sd-field .sd-field .sd-field__hint{color:var(--sd-field-hint-color);font-size:var(--sd-field-hint-font-size);line-height:var(--sd-field-hint-line-height);margin-top:var(--sd-field-message-gap)}"}},[772,"sd-field",{name:[1],rules:[16],error:[1028],disabled:[1028],readonly:[1028],hovered:[1028],focused:[1028],status:[1],hint:[1],errorMessage:[1,"error-message"],width:[8],size:[513],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],errorMsg:[32],sdValidate:[64],sdReset:[64],sdResetValidation:[64],sdFocus:[64]}]);function u(){"undefined"!=typeof customElements&&["sd-field","sd-button","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-field":customElements.get(i(e))||customElements.define(i(e),_);break;case"sd-button":customElements.get(i(e))||t();break;case"sd-floating-portal":customElements.get(i(e))||r();break;case"sd-ghost-button":customElements.get(i(e))||o();break;case"sd-icon":customElements.get(i(e))||a();break;case"sd-portal":customElements.get(i(e))||f();break;case"sd-tag":customElements.get(i(e))||n();break;case"sd-tooltip":customElements.get(i(e))||h()}}))}export{_ as S,u as d}
|
|
1
|
+
import{p as e,H as d,h as s,t as i}from"./p-CEVDmQdt.js";import{f as l}from"./p-BOJJ_sQS.js";import{d as t}from"./p-C3rOud8J.js";import{d as o}from"./p-DMvWCQfX.js";import{d as r}from"./p-BlN03Cqm.js";import{d as a}from"./p-BnhzUsGP.js";import{d as f}from"./p-BckY1cBy.js";import{d as n}from"./p-D8T1XeGP.js";import{d as h}from"./p-BGpxtouI.js";const c={start:"flex-start",center:"center",end:"flex-end"},p=l.field.label.sm,b=l.field.label.md,m={sm:{height:p.height,gap:p.gap,icon:p.icon,fontSize:p.typography.fontSize,lineHeight:p.typography.lineHeight,fontWeight:p.typography.fontWeight},md:{height:b.height,gap:b.gap,icon:b.icon,fontSize:b.typography.fontSize,lineHeight:b.typography.lineHeight,fontWeight:b.typography.fontWeight}},g=["sd-input","sd-barcode-input","sd-textarea","sd-number-input","sd-select","sd-file-picker","sd-date-picker","sd-date-range-picker","sd-chip-input"],u=e(class extends d{constructor(e){super(),!1!==e&&this.__registerHost()}get el(){return this}name="";rules=[];error=!1;disabled=!1;readonly=!1;hovered=!1;focused=!1;status;hint="";errorMessage="";width="";size="sm";label="";labelWidth="";addonLabel="";addonAlign="start";icon=void 0;labelTooltip="";labelTooltipProps=null;errorMsg="";hostElement=null;get value(){return this.hostElement?.value??null}get fieldStatus(){let e="";return this.disabled?(e="disabled",`sd-field--${e}`):this.readonly?(e="readonly",`sd-field--${e}`):this.focused?(e="focus",`sd-field--${e}`):(this.hovered&&(e="hover"),void 0!==this.status&&(e=this.status),this.error&&(e="error"),""!==e?`sd-field--${e}`:"")}componentDidLoad(){this.hostElement=this.findHostElement(),this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}findHostElement(){for(const e of g){const d=this.el.closest(e);if(d&&"value"in d)return d}return null}registerToForm(){const e=this.el.closest("sd-form");e&&"function"==typeof e.componentOnReady&&e.componentOnReady().then((e=>{e.sdRegisterField(this)}))}unregisterFromForm(){if(""===this.name)return;const e=this.el.closest("sd-form");e?.componentOnReady().then((e=>{e.sdUnregisterField(this)}))}async sdValidate(){if(!this.rules||0===this.rules.length)return!0;for(const e of this.rules){const d=e(this.value??"");if(!0!==d)return this.setError(!0,d),!1}return this.setError(!1,""),!0}async sdReset(){this.hostElement&&(this.hostElement.value=null),this.setError(!1,"")}async sdResetValidation(){this.setError(!1,"")}async sdFocus(){this.hostElement?.focus?.(),this.hostElement?.scrollIntoView({behavior:"smooth",block:"center"})}setError(e,d){this.errorMsg=d,this.hostElement&&(this.hostElement.error=e)}render(){const e=this.addonLabel,d=l.field.addonLabel,i=this.size in m?this.size:"sm",t=m[i],o={"--sd-field-wrapper-height":`var(--sd-system-size-field-${i}-height)`,"--sd-field-control-radius":`var(--sd-system-radius-field-${i})`,"--sd-field-label-margin-right":`var(--sd-system-space-field-${i}-gap)`},r={"--sd-field-error-message-color":l.field.errorMessage.color,"--sd-field-error-message-font-size":`${l.field.errorMessage.typography.fontSize}px`,"--sd-field-error-message-line-height":`${l.field.errorMessage.typography.lineHeight}px`,"--sd-field-hint-color":l.field.hint.color,"--sd-field-hint-font-size":`${l.field.hint.typography.fontSize}px`,"--sd-field-hint-line-height":`${l.field.hint.typography.lineHeight}px`,"--sd-field-message-gap":`${l.field.contents.gap}px`},a=""!==this.label?{"--sd-field-label-height":`${t.height}px`,"--sd-field-label-gap":`${t.gap}px`,"--sd-field-label-font-size":`${t.fontSize}px`,"--sd-field-label-line-height":`${t.lineHeight}px`,"--sd-field-label-font-weight":t.fontWeight,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-label-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{},f=""!==e?{"--sd-field-addon-padding-x":`${d.paddingX}px`,"--sd-field-addon-font-size":`${d.typography.fontSize}px`,"--sd-field-addon-line-height":`${d.typography.lineHeight}px`,"--sd-field-addon-font-weight":d.typography.fontWeight,"--sd-field-addon-bg":d.bg,"--sd-field-addon-border-color":this.disabled?d.border.disabled:d.border.default,"--sd-field-addon-gap":`${d.gap}px`,"--sd-field-addon-border-width":`${d.border.width}px`,"--sd-field-addon-justify":c[this.addonAlign]??c.start,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-addon-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{};return s("div",{key:"45a5353fb451aa829092ca34f3212d6e62f1843a",class:{"sd-field":!0,"sd-field--has-label":""!==this.label,"sd-field--has-addon":""!==e,[this.fieldStatus]:""!==this.fieldStatus},style:{...o,...a,...f,...r}},s("div",{key:"75f3be0dae03f292b66980b7c92d574bd0bda988",class:"sd-field__wrapper"},this.renderLabel(this.label),s("div",{key:"69b9827a2599a2e01fad26224b4b9800fde6e347",class:"sd-field__main",style:""!==this.width&&0!==this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},s("div",{key:"ba0e98fd309c32ee73b2ba92f956358d51790f58",class:{"sd-field__control":!0,"sd-field__control--has-addon":""!==e}},e&&s("div",{key:"8f941150147145368d340c4be0e3636ef67060c3",class:"sd-field__addon"},this.icon&&s("sd-icon",{key:"78d5d092094c0f3e8562127d77821dadb2a21b6a",name:this.icon.name,size:this.icon.size??Number(m[this.size in m?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate}),e),s("slot",{key:"b494ab4550ae739096957cad46cb95a8c71f5a0b"})),""!==this.errorMsg||""!==this.errorMessage?s("div",{class:"sd-field__error-message"},""!==this.errorMsg?this.errorMsg:this.errorMessage):""!==this.hint&&s("div",{class:"sd-field__hint"},this.hint))))}renderLabel(e){return null==e||""===e?null:s("label",{class:"sd-field__label"},this.icon&&s("sd-icon",{name:this.icon.name,size:this.icon.size??Number(m[this.size in m?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate,class:"sd-field__label__icon"}),s("div",{class:"sd-field__label__text"},e),this.labelTooltip&&s("sd-tooltip",{class:"sd-field__label__tooltip",...this.labelTooltipProps},this.labelTooltip))}static get style(){return"sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#E1E1E1;border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--readonly .sd-field__wrapper .sd-field__control{background-color:var(--sd-system-color-field-bg-read-only);color:var(--sd-system-color-field-text-read-only)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;flex-shrink:0;width:var(--sd-field-label-width, auto);height:var(--sd-field-label-height);margin-right:var(--sd-field-label-margin-right)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__icon{margin-right:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:var(--sd-field-label-font-size);line-height:var(--sd-field-label-line-height);font-weight:var(--sd-field-label-font-weight);color:var(--sd-system-color-field-text-default);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-addon .sd-field__control .sd-field__addon{display:flex;gap:var(--sd-field-addon-gap);align-items:center;justify-content:var(--sd-field-addon-justify, flex-start);white-space:nowrap;box-sizing:border-box;flex-shrink:0;width:var(--sd-field-addon-width, auto);padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right:var(--sd-field-addon-border-width) solid var(--sd-field-addon-border-color);border-radius:calc(var(--sd-field-control-radius) - 1px) 0 0 calc(var(--sd-field-control-radius) - 1px)}sd-field .sd-field__wrapper{width:100%;display:flex;align-items:flex-start;flex-flow:row nowrap;position:relative;color:var(--sd-system-color-field-text-default);-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__main{flex:1;min-width:0;display:flex;flex-direction:column}sd-field .sd-field__wrapper .sd-field__control{position:relative;height:var(--sd-field-wrapper-height);display:flex;min-width:0;border:1px solid var(--sd-system-color-field-border-default);border-radius:var(--sd-field-control-radius);background:var(--sd-system-color-field-bg-default)}sd-field .sd-field--error .sd-field__wrapper .sd-field__control:not(:hover){border:1px solid var(--sd-system-color-field-border-danger) !important}sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-success) !important}sd-field .sd-field:not(.sd-field--disabled):not(.sd-field--readonly) .sd-field__wrapper .sd-field__control:hover{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--focus:not(.sd-field--readonly) .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field .sd-field__error-message{color:var(--sd-field-error-message-color);font-size:var(--sd-field-error-message-font-size);line-height:var(--sd-field-error-message-line-height);margin-top:var(--sd-field-message-gap)}sd-field .sd-field .sd-field__hint{color:var(--sd-field-hint-color);font-size:var(--sd-field-hint-font-size);line-height:var(--sd-field-hint-line-height);margin-top:var(--sd-field-message-gap)}"}},[772,"sd-field",{name:[1],rules:[16],error:[1028],disabled:[1028],readonly:[1028],hovered:[1028],focused:[1028],status:[1],hint:[1],errorMessage:[1,"error-message"],width:[8],size:[513],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],errorMsg:[32],sdValidate:[64],sdReset:[64],sdResetValidation:[64],sdFocus:[64]}]);function _(){"undefined"!=typeof customElements&&["sd-field","sd-button","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-field":customElements.get(i(e))||customElements.define(i(e),u);break;case"sd-button":customElements.get(i(e))||t();break;case"sd-floating-portal":customElements.get(i(e))||o();break;case"sd-ghost-button":customElements.get(i(e))||r();break;case"sd-icon":customElements.get(i(e))||a();break;case"sd-portal":customElements.get(i(e))||f();break;case"sd-tag":customElements.get(i(e))||n();break;case"sd-tooltip":customElements.get(i(e))||h()}}))}export{u as S,_ as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,h as e,d as o,t as i}from"./p-CEVDmQdt.js";import{T as a}from"./p-sZMi_32I.js";const
|
|
1
|
+
import{p as t,H as s,h as e,d as o,t as i}from"./p-CEVDmQdt.js";import{T as a}from"./p-sZMi_32I.js";const n=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get el(){return this}rows=[];tableId="";topSpacerHeight=0;bottomSpacerHeight=0;tableEl=null;handleRowsChange(t){const s=t??[];this.tableEl?.setRowCountSync&&this.tableEl.setRowCountSync(s.length)}componentWillLoad(){this.syncTableContext(),this.rows=this.rows??[],this.tableEl?.setRowCountSync&&this.tableEl.setRowCountSync(this.rows.length),this.el.setSpacersSync=(t,s)=>{this.topSpacerHeight=t,this.bottomSpacerHeight=s}}componentDidLoad(){this.syncTableContext()}syncTableContext(){const t=this.el.closest("sd-table"),s=this.el.getRootNode(),e=s instanceof ShadowRoot?s.host:null,o=t??e;this.tableEl=o;const i=o?.getTableIdSync?.(),n=o?.getAttribute(a),d=(null!=i&&""!==i&&"undefined"!==i?i:null)??(null!=n&&""!==n&&"undefined"!==n?n:null)??"";""!==d&&d!==this.tableId&&(this.tableId=d)}render(){return e(o,{key:"af02c942fe83b515e2065840ff3b83ad22fd5542",slot:`${this.tableId}-body`},e("tbody",{key:"6f1b771c2a21ff087b5feb32b19e0fb4b0abed35",class:{tbody:!0}},[this.topSpacerHeight>0&&e("tr",{key:"spacer-top",class:"tbody__spacer",style:{height:`${this.topSpacerHeight}px`,display:"block"}}),e("slot",{key:"0c7c439b269527f9bfbb00bf60a1aec10646da56"}),this.bottomSpacerHeight>0&&e("tr",{key:"spacer-bottom",class:"tbody__spacer",style:{height:`${this.bottomSpacerHeight}px`,display:"block"}})]))}static get watchers(){return{rows:[{handleRowsChange:0}]}}static get style(){return":host{display:contents}:host *{box-sizing:border-box}.tbody{display:table-row-group}"}},[769,"sd-tbody",{rows:[16],tableId:[32],topSpacerHeight:[32],bottomSpacerHeight:[32]},void 0,{rows:[{handleRowsChange:0}]}]);function d(){"undefined"!=typeof customElements&&["sd-tbody"].forEach((t=>{"sd-tbody"===t&&(customElements.get(i(t))||customElements.define(i(t),n))}))}export{n as S,d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,c as e,h as
|
|
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-
|
|
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}
|