@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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,a as i,h as s}from"./p-BZ5lcC25.js";import{n as a}from"./p-CCwNgVmC.js";import{i as o}from"./p-e0ABNkP6.js";const n=o.textinput.sm,d=o.textinput.md,r={sm:{height:n.height,paddingX:n.paddingX,gap:n.gap,radius:n.radius,fontSize:n.typography.fontSize,lineHeight:n.typography.lineHeight,fontWeight:n.typography.fontWeight},md:{height:d.height,paddingX:d.paddingX,gap:d.gap,radius:d.radius,fontSize:d.typography.fontSize,lineHeight:d.typography.lineHeight,fontWeight:d.typography.fontWeight}},l={bg:o.textinput.bg,text:o.textinput.text,icon:o.textinput.icon},c=class{constructor(i){t(this,i),this.input=e(this,"sdUpdate",7),this.focus=e(this,"sdFocus",7),this.blur=e(this,"sdBlur",7)}get host(){return i(this)}value=null;size="sm";addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;clearable=!1;width="";rules=[];autoFocus=!1;status;hint="";errorMessage="";inputClass="";readonly=!1;error=!1;focused=!1;hovered=!1;label="";labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;inputStyle={};internalValue=null;nativeEl=void 0;formField;name=a();input;focus;blur;valueChanged(t){this.internalValue=t}internalValueChanged(t){t!==this.value&&(this.value=t,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(){void 0!==this.value&&""!==this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{this.internalValue=t.target.value};handleFocus=async(t,e)=>{this.focused="focus"===t,"blur"===t?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(e)):this.focus?.emit(e)};render(){const t=r[this.size]??r.sm;return s("sd-field",{key:"
|
|
1
|
+
import{r as t,c as e,a as i,h as s}from"./p-BZ5lcC25.js";import{n as a}from"./p-CCwNgVmC.js";import{i as o}from"./p-e0ABNkP6.js";const n=o.textinput.sm,d=o.textinput.md,r={sm:{height:n.height,paddingX:n.paddingX,gap:n.gap,radius:n.radius,fontSize:n.typography.fontSize,lineHeight:n.typography.lineHeight,fontWeight:n.typography.fontWeight},md:{height:d.height,paddingX:d.paddingX,gap:d.gap,radius:d.radius,fontSize:d.typography.fontSize,lineHeight:d.typography.lineHeight,fontWeight:d.typography.fontWeight}},l={bg:o.textinput.bg,text:o.textinput.text,icon:o.textinput.icon},c=class{constructor(i){t(this,i),this.input=e(this,"sdUpdate",7),this.focus=e(this,"sdFocus",7),this.blur=e(this,"sdBlur",7)}get host(){return i(this)}value=null;size="sm";addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;clearable=!1;width="";rules=[];autoFocus=!1;status;hint="";errorMessage="";inputClass="";readonly=!1;error=!1;focused=!1;hovered=!1;label="";labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;inputStyle={};internalValue=null;nativeEl=void 0;formField;name=a();input;focus;blur;valueChanged(t){this.internalValue=t}internalValueChanged(t){t!==this.value&&(this.value=t,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(){void 0!==this.value&&""!==this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{this.internalValue=t.target.value};handleFocus=async(t,e)=>{this.focused="focus"===t,"blur"===t?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(e)):this.focus?.emit(e)};render(){const t=r[this.size]??r.sm;return s("sd-field",{key:"79dd05ab7f39104c2aa54c44a71cc3fe4cf7870f",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,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-barcode-input-font-size":`${t.fontSize}px`,"--sd-barcode-input-line-height":`${t.lineHeight}px`,"--sd-barcode-input-font-weight":t.fontWeight,"--sd-barcode-input-padding-x":`${t.paddingX}px`,"--sd-barcode-input-gap":`${t.gap}px`,"--sd-barcode-input-text-color":l.text.default,"--sd-barcode-input-placeholder-color":l.text.placeholder,"--sd-barcode-input-disabled-color":l.text.disabled,"--sd-barcode-input-icon-color":l.icon.default,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`,"--sd-system-color-field-bg-default":l.bg.barcode}},s("label",{key:"5470e7e6ddff60239bf1d42d78843f807a72c07b",class:"sd-barcode-input__content"},s("slot",{key:"ab15a2e5a9287f3c124f48f89610ab55c898b76e",name:"prefix"}),s("input",{key:"e2edbbcfb70ec035e68735c4de7792d6c8ef177f",name:this.name,ref:t=>this.nativeEl=t,class:`sd-barcode-input__native ${this.inputClass}`,type:"text",value:this.internalValue||"",placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onFocus:t=>this.handleFocus("focus",t),onBlur:t=>this.handleFocus("blur",t),style:this.inputStyle}),s("slot",{key:"d2065cad4d491747a2a61b60b2bb10a7ef5b18d9",name:"suffix"}),this.clearable&&this.internalValue&&s("sd-ghost-button",{key:"2b88fe6fd8c1c013c60b50584721a7c4d4f3bef5",icon:"close",ariaLabel:"clear",size:"xxs",disabled:this.disabled,class:"sd-barcode-input__clear-icon",onClick:async()=>{this.disabled||(this.internalValue="",await(this.formField?.sdValidate()))}})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}};c.style="sd-icon{display:inline-block;line-height:0}sd-icon .sd-icon--rotate-90{transform:rotate(90deg)}sd-icon .sd-icon--rotate-180{transform:rotate(180deg)}sd-icon .sd-icon--rotate-270{transform:rotate(270deg)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fafaa1 inset;box-shadow:0 0 0px 1000px #fafaa1 inset;transition:background-color 5000s ease-in-out 0s}input:autofill,input:autofill:hover,input:autofill:focus,input:autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fafaa1 inset;box-shadow:0 0 0px 1000px #fafaa1 inset;transition:background-color 5000s ease-in-out 0s}sd-barcode-input{display:inline-flex}sd-barcode-input .sd-barcode-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;color:var(--sd-barcode-input-text-color);font-size:var(--sd-barcode-input-font-size);line-height:var(--sd-barcode-input-line-height);font-weight:var(--sd-barcode-input-font-weight);padding:0 var(--sd-barcode-input-padding-x);gap:var(--sd-barcode-input-gap)}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__native{width:100%;height:100%;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__native[disabled]{cursor:not-allowed;color:var(--sd-barcode-input-disabled-color)}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__native[readonly]{color:var(--sd-barcode-input-disabled-color)}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__native::placeholder{color:var(--sd-barcode-input-placeholder-color)}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__clear-icon{flex-shrink:0}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__native[disabled]~.sd-barcode-input__clear-icon{cursor:not-allowed;pointer-events:none}";export{c as sd_barcode_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,a as i,f as s,h as n,H as e}from"./p-BZ5lcC25.js";import{T as h}from"./p-sZMi_32I.js";const a=class{constructor(i){t(this,i)}get el(){return i(this)}field;rowKey;align;rowspan;colspan;sdClass;dividerLeft=!1;dividerRight=!1;useFrame=!1;handleFieldChange(t,i){this.syncSlotName(),this.syncSpanRegistration(),this.syncCellClassRegistration(i),this.syncUseFrameRegistration(i)}handleRowKeyChange(t,i){this.syncSlotName(),this.syncSpanRegistration(),this.syncCellClassRegistration(void 0,i),this.syncUseFrameRegistration(void 0,i)}handleSpanChange(){this.syncSpanRegistration()}handleSdClassChange(){this.syncCellClassRegistration()}handleDividerChange(){this.syncCellClassRegistration()}handleUseFrameChange(){this.syncUseFrameRegistration(),this.requestParentTrUpdate()}componentWillLoad(){this.syncSlotName(),this.syncSpanRegistration(),this.syncCellClassRegistration(),this.syncUseFrameRegistration();const t=this.el.parentElement;"sd-tr"===t?.tagName?.toLowerCase()&&s(t)}componentDidLoad(){this.syncSlotName(),this.syncSpanRegistration(),this.syncCellClassRegistration(),this.syncUseFrameRegistration()}connectedCallback(){this.syncSpanRegistration(),this.syncCellClassRegistration(),this.syncUseFrameRegistration()}disconnectedCallback(){const t=this.findTable();null!=t&&""!==this.field&&null!=this.rowKey&&(t.unregisterSpanSync?.(String(this.rowKey),this.field),t.unregisterCellClassSync?.(String(this.rowKey),this.field),t.unregisterUseFrameSync?.(String(this.rowKey),this.field),this.requestParentTrUpdate())}findTable(){return this.el.closest("sd-table")}requestParentTrUpdate(){const t=this.el.parentElement;"sd-tr"===t?.tagName?.toLowerCase()&&("function"==typeof t.bumpSpansVersion?t.bumpSpansVersion():s(t))}syncSpanRegistration(){const t=this.findTable();if(null==t?.registerSpanSync||""===this.field||null==this.rowKey)return;const i=Math.max(1,Math.floor(Number(this.rowspan)||1)),s=Math.max(1,Math.floor(Number(this.colspan)||1));t.registerSpanSync(String(this.rowKey),this.field,i,s),this.requestParentTrUpdate()}syncCellClassRegistration(t,i){const s=this.findTable();if(!s)return;const n=t??this.field,e=i??(null!=this.rowKey?String(this.rowKey):void 0);if(""!==n&&null!=e&&s.unregisterCellClassSync?.(e,n),!s.registerCellClassSync||""===this.field||null==this.rowKey)return;const h=[this.sdClass,this.dividerLeft&&"td--divider-left",this.dividerRight&&"td--divider-right"].filter(Boolean).join(" ")||void 0;s.registerCellClassSync(String(this.rowKey),this.field,h),this.requestParentTrUpdate()}syncUseFrameRegistration(t,i){const s=this.findTable();if(!s)return;const n=t??this.field,e=i??(null!=this.rowKey?String(this.rowKey):void 0);""!==n&&null!=e&&s.unregisterUseFrameSync?.(e,n),""!==this.field&&null!=this.rowKey&&(this.useFrame?s.registerUseFrameSync?.(String(this.rowKey),this.field):s.unregisterUseFrameSync?.(String(this.rowKey),this.field))}syncSlotName(){const t=this.el.closest("sd-table"),i=t?.getTableIdSync?.(),s=t?.getAttribute(h),n=(null!=i&&""!==i&&"undefined"!==i?i:null)??(null!=s&&""!==s&&"undefined"!==s?s:null)??"";""!==this.field&&void 0!==this.rowKey&&""!==n&&this.el.setAttribute("slot",`${n}-${this.field}-${this.rowKey}`)}render(){return n(e,{key:"
|
|
1
|
+
import{r as t,a as i,f as s,h as n,H as e}from"./p-BZ5lcC25.js";import{T as h}from"./p-sZMi_32I.js";const a=class{constructor(i){t(this,i)}get el(){return i(this)}field;rowKey;align;rowspan;colspan;sdClass;dividerLeft=!1;dividerRight=!1;useFrame=!1;handleFieldChange(t,i){this.syncSlotName(),this.syncSpanRegistration(),this.syncCellClassRegistration(i),this.syncUseFrameRegistration(i)}handleRowKeyChange(t,i){this.syncSlotName(),this.syncSpanRegistration(),this.syncCellClassRegistration(void 0,i),this.syncUseFrameRegistration(void 0,i)}handleSpanChange(){this.syncSpanRegistration()}handleSdClassChange(){this.syncCellClassRegistration()}handleDividerChange(){this.syncCellClassRegistration()}handleUseFrameChange(){this.syncUseFrameRegistration(),this.requestParentTrUpdate()}componentWillLoad(){this.syncSlotName(),this.syncSpanRegistration(),this.syncCellClassRegistration(),this.syncUseFrameRegistration();const t=this.el.parentElement;"sd-tr"===t?.tagName?.toLowerCase()&&s(t)}componentDidLoad(){this.syncSlotName(),this.syncSpanRegistration(),this.syncCellClassRegistration(),this.syncUseFrameRegistration()}connectedCallback(){this.syncSpanRegistration(),this.syncCellClassRegistration(),this.syncUseFrameRegistration()}disconnectedCallback(){const t=this.findTable();null!=t&&""!==this.field&&null!=this.rowKey&&(t.unregisterSpanSync?.(String(this.rowKey),this.field),t.unregisterCellClassSync?.(String(this.rowKey),this.field),t.unregisterUseFrameSync?.(String(this.rowKey),this.field),this.requestParentTrUpdate())}findTable(){return this.el.closest("sd-table")}requestParentTrUpdate(){const t=this.el.parentElement;"sd-tr"===t?.tagName?.toLowerCase()&&("function"==typeof t.bumpSpansVersion?t.bumpSpansVersion():s(t))}syncSpanRegistration(){const t=this.findTable();if(null==t?.registerSpanSync||""===this.field||null==this.rowKey)return;const i=Math.max(1,Math.floor(Number(this.rowspan)||1)),s=Math.max(1,Math.floor(Number(this.colspan)||1));t.registerSpanSync(String(this.rowKey),this.field,i,s),this.requestParentTrUpdate()}syncCellClassRegistration(t,i){const s=this.findTable();if(!s)return;const n=t??this.field,e=i??(null!=this.rowKey?String(this.rowKey):void 0);if(""!==n&&null!=e&&s.unregisterCellClassSync?.(e,n),!s.registerCellClassSync||""===this.field||null==this.rowKey)return;const h=[this.sdClass,this.dividerLeft&&"td--divider-left",this.dividerRight&&"td--divider-right"].filter(Boolean).join(" ")||void 0;s.registerCellClassSync(String(this.rowKey),this.field,h),this.requestParentTrUpdate()}syncUseFrameRegistration(t,i){const s=this.findTable();if(!s)return;const n=t??this.field,e=i??(null!=this.rowKey?String(this.rowKey):void 0);""!==n&&null!=e&&s.unregisterUseFrameSync?.(e,n),""!==this.field&&null!=this.rowKey&&(this.useFrame?s.registerUseFrameSync?.(String(this.rowKey),this.field):s.unregisterUseFrameSync?.(String(this.rowKey),this.field))}syncSlotName(){const t=this.el.closest("sd-table"),i=t?.getTableIdSync?.(),s=t?.getAttribute(h),n=(null!=i&&""!==i&&"undefined"!==i?i:null)??(null!=s&&""!==s&&"undefined"!==s?s:null)??"";""!==this.field&&void 0!==this.rowKey&&""!==n&&this.el.setAttribute("slot",`${n}-${this.field}-${this.rowKey}`)}render(){return n(e,{key:"a8b2ea05cfaa821b1e4766657cce6a2b7a399881",class:{[`align-${this.align}`]:Boolean(this.align)}},n("slot",{key:"7fa181915d15192257bc38500787207810ec2739"}))}static get watchers(){return{field:[{handleFieldChange:0}],rowKey:[{handleRowKeyChange:0}],rowspan:[{handleSpanChange:0}],colspan:[{handleSpanChange:0}],sdClass:[{handleSdClassChange:0}],dividerLeft:[{handleDividerChange:0}],dividerRight:[{handleDividerChange:0}],useFrame:[{handleUseFrameChange:0}]}}};a.style="sd-td *{box-sizing:border-box}sd-td{display:contents}sd-td.align-left{text-align:left}sd-td.align-center{text-align:center}sd-td.align-right{text-align:right}";export{a as sd_td}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,c as e,h as i}from"./p-BZ5lcC25.js";var
|
|
1
|
+
import{r as d,c as e,h as i}from"./p-BZ5lcC25.js";var r={default:{fontWeight:"400",fontSize:"12",lineHeight:"20"},selected:{fontWeight:"500"}},a={default:"#FFFFFF",disabled:"#E1E1E1",hover:"#D9EAFF"},o={default:"#AAAAAA",hover:"#0075FF",active:"#0075FF",disabled:"#CCCCCC"},s={default:"#0075FF",disabled:"#CCCCCC",size:"10"},t={default:"#222222",disabled:"#888888"};const l="16",c="1",h="8",n=s.size,b={default:{fontSize:r.default.fontSize,lineHeight:r.default.lineHeight,fontWeight:r.default.fontWeight},selected:{fontWeight:r.selected.fontWeight}},g={unchecked:{bg:a.default,bgHover:a.hover,border:o.default,borderHover:o.hover},checked:{border:o.active,dot:s.default},disabled:{bg:a.disabled,border:o.disabled,dot:s.disabled},label:{default:t.default,disabled:t.disabled}},f=class{constructor(i){d(this,i),this.update=e(this,"sdUpdate",7)}value;val;disabled=!1;label;update;valueChanged(d){this.value=d}get isSelected(){return String(this.val)===String(this.value)}get radioClasses(){const d=["sd-radio",this.isSelected?"sd-radio--checked":"sd-radio--unchecked"];return this.disabled&&d.push("sd-radio--disabled"),d.join(" ")}handleRadioChange=()=>{this.disabled||(this.value=this.val,this.update.emit(this.value))};render(){return i("label",{key:"cc7ff62ac992791ef81db9212bb5986989f6b4d6",class:this.radioClasses,style:{"--sd-radio-size":`${l}px`,"--sd-radio-border-width":`${c}px`,"--sd-radio-gap":`${h}px`,"--sd-radio-dot-size":`${n}px`,"--sd-radio-font-size":`${b.default.fontSize}px`,"--sd-radio-line-height":`${b.default.lineHeight}px`,"--sd-radio-font-weight":b.default.fontWeight,"--sd-radio-selected-font-weight":b.selected.fontWeight,"--sd-radio-unchecked-bg":g.unchecked.bg,"--sd-radio-unchecked-bg-hover":g.unchecked.bgHover,"--sd-radio-unchecked-border":g.unchecked.border,"--sd-radio-unchecked-border-hover":g.unchecked.borderHover,"--sd-radio-checked-border":g.checked.border,"--sd-radio-checked-dot":g.checked.dot,"--sd-radio-disabled-bg":g.disabled.bg,"--sd-radio-disabled-border":g.disabled.border,"--sd-radio-disabled-dot":g.disabled.dot,"--sd-radio-label-color":g.label.default,"--sd-radio-label-disabled-color":g.label.disabled},"aria-checked":this.isSelected?"true":"false","aria-disabled":this.disabled?"true":"false"},i("input",{key:"20bfeaf5bc322335f5300955ebf653213d662fa6",type:"radio",name:String(this.val),value:String(this.val),checked:this.isSelected,disabled:this.disabled,"aria-label":this.label||String(this.val),onInput:this.handleRadioChange}),i("span",{key:"61d8bdfdb5f8309b8832b89ea2979db5b80968c8",class:"sd-radio__circle"}),this.label&&i("span",{key:"cc2a5402e4745aaae897c8f37d5fc287a2ba9b29",class:"sd-radio__label","data-label":this.label},this.label))}static get watchers(){return{value:[{valueChanged:0}]}}};f.style='sd-radio{display:inline-flex;width:fit-content;height:var(--sd-radio-line-height);line-height:0}sd-radio .sd-radio{cursor:pointer;display:inline-flex;align-items:center;gap:var(--sd-radio-gap);height:var(--sd-radio-line-height);max-height:var(--sd-radio-line-height)}sd-radio .sd-radio>input{position:absolute;width:0;height:0;opacity:0;pointer-events:none}sd-radio .sd-radio>input:focus-visible+.sd-radio__circle{box-shadow:0 0 0 2px white, 0 0 0 4px var(--sd-radio-checked-border);outline:none}sd-radio .sd-radio__circle{position:relative;width:var(--sd-radio-size);height:var(--sd-radio-size);border-radius:50%;border:var(--sd-radio-border-width) solid var(--sd-radio-unchecked-border);box-sizing:border-box;background:var(--sd-radio-unchecked-bg);display:inline-flex;flex-shrink:0}sd-radio .sd-radio__label{font-size:var(--sd-radio-font-size);font-weight:var(--sd-radio-font-weight);color:var(--sd-radio-label-color);line-height:var(--sd-radio-line-height);display:inline-flex;flex-direction:column}sd-radio .sd-radio__label::before{content:attr(data-label);height:0;font-weight:var(--sd-radio-selected-font-weight);visibility:hidden;overflow:hidden;user-select:none;pointer-events:none}sd-radio .sd-radio:hover:not(.sd-radio--disabled) .sd-radio__circle{background:var(--sd-radio-unchecked-bg-hover);border-color:var(--sd-radio-unchecked-border-hover)}sd-radio .sd-radio--checked .sd-radio__label{font-weight:var(--sd-radio-selected-font-weight)}sd-radio .sd-radio--checked .sd-radio__circle{border-color:var(--sd-radio-checked-border)}sd-radio .sd-radio--checked .sd-radio__circle::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:var(--sd-radio-dot-size);height:var(--sd-radio-dot-size);border-radius:50%;background:var(--sd-radio-checked-dot)}sd-radio .sd-radio--disabled{cursor:not-allowed}sd-radio .sd-radio--disabled .sd-radio__label{color:var(--sd-radio-label-disabled-color)}sd-radio .sd-radio--disabled .sd-radio__circle{background:var(--sd-radio-disabled-bg);border-color:var(--sd-radio-disabled-border)}sd-radio .sd-radio--disabled.sd-radio--checked .sd-radio__circle::after{background:var(--sd-radio-disabled-dot)}';export{f as sd_radio}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,a as s,h as i}from"./p-BZ5lcC25.js";import{n as r}from"./p-CCwNgVmC.js";import{c as h,S as o,f as l,i as n,e as d,E as c,L as a,a as u,b as g,d as p}from"./p-CAFz8W8_.js";import{s as f}from"./p-BE4tnQ2Z.js";import"./p-U8VaRj9c.js";const b=class{constructor(s){t(this,s),this.update=e(this,"sdUpdate",7),this.dropDownShow=e(this,"sdDropDownShow",7)}static VIEWPORT_PADDING=20;static PORTAL_OFFSET_Y=4;static CLOSE_ANIMATION_DURATION=150;get el(){return s(this)}type="default";value=null;options=[];placeholder="선택";dropdownWidth="";maxDropdownWidth="640px";dropdownHeight="260px";disabled=!1;label="";labelWidth="";addonLabel="";addonAlign="start";error=!1;hint="";errorMessage="";rules=[];icon=void 0;labelTooltip="";labelTooltipProps=null;emitValue=!1;width="";useSearch=!1;allSelectedLabel="전체";useSelectAll=!1;isOpen=!1;isAnimatingOut=!1;triggerWidth="200px";resolvedDropdownHeight="260px";resolvedMaxDropdownWidth="640px";focused=!1;hovered=!1;update;dropDownShow;async sdFocus(){this.disabled||await(this.triggerComponentRef?.sdFocus())}async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.disabled||this.isOpen||(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)}triggerRef;triggerComponentRef;closeAnimationTimer;name=r();triggerHasFocus=!1;watchIsOpen(t){this.syncFocusedState(t),this.dropDownShow.emit({isOpen:t})}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}get displayText(){if(this.isMulti){if(!Array.isArray(this.value)||0===this.value.length)return"";const t=this.getNonDisabledLeaves(this.options),e=this.getSelectedOptions();if(t.length>0&&t.every((t=>e.some((e=>e.value===t.value)))))return this.allSelectedLabel??"전체";const s=this.flattenOptions(this.options);return this.value.map((t=>{if(null!=t&&"object"==typeof t){const e=t;return e.label??s.find((t=>t.value===e.value))?.label??""}return s.find((e=>e.value===t))?.label??""})).filter(Boolean).join(", ")}if(null==this.value)return"";if(!this.emitValue&&"object"==typeof this.value&&!Array.isArray(this.value))return this.value.label??"";const t=this.flattenOptions(this.options);return t.find((t=>t.value===this.value))?.label??""}flattenOptions(t){return t.flatMap((t=>t.children?this.flattenOptions(t.children):[t]))}getNonDisabledLeaves(t){return t.flatMap((t=>t.disabled?[]:t.children?this.getNonDisabledLeaves(t.children):[t]))}getSelectedOptions(){const t=this.value;return null!=t&&Array.isArray(t)?this.emitValue?t.map((t=>this.findOriginalOption(t,this.options))).filter((t=>!!t)):t:[]}toMultiValue(t){return this.emitValue?t.map((t=>t.value)):t}parsePixelValue(t,e){const s=Number.parseFloat(t);return Number.isFinite(s)?s:e}updateDropdownViewportConstraints(){if(!this.triggerRef)return;const t=this.triggerRef.getBoundingClientRect(),e=b.VIEWPORT_PADDING,s=b.PORTAL_OFFSET_Y,i=this.parsePixelValue(this.dropdownHeight,260),r=this.parsePixelValue(this.maxDropdownWidth,640),h=Math.max(window.innerHeight-t.bottom-e-s,0),o=Math.max(t.top-e-s,0),l=Math.max(h,o),n=Math.max(window.innerWidth-2*e,0);this.resolvedDropdownHeight=`${Math.min(i,l)}px`,this.resolvedMaxDropdownWidth=`${Math.min(r,n)}px`}handleViewportResize=()=>{this.isOpen&&this.updateDropdownViewportConstraints()};findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),b.CLOSE_ANIMATION_DURATION))}prepareDropdownGeometry(){this.triggerRef&&(this.triggerWidth=`${this.triggerRef.offsetWidth}px`),this.updateDropdownViewportConstraints()}syncFocusedState(t=this.isOpen){this.focused=t||this.triggerHasFocus}handleTriggerFocus=()=>{this.triggerHasFocus=!0,this.syncFocusedState()};handleTriggerBlur=()=>{this.triggerHasFocus=!1,this.syncFocusedState()};handleTriggerClick=()=>{this.isOpen?this.closeDropdown():(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)};emitUpdate(t){this.update.emit(t)}handleOptionSelect=t=>{const{option:e,leaves:s}=t;if(this.isMulti)this.handleMultiSelect(e,s);else{this.closeDropdown(),this.value=this.emitValue?e.value:e;const t=this.value;requestAnimationFrame((()=>{this.emitUpdate(t)}))}};handleMultiSelect(t,e){const s=this.getSelectedOptions();let i;if(t.children)if(e.every((t=>s.some((e=>e.value===t.value))))){const t=new Set(e.map((t=>t.value)));i=s.filter((e=>!t.has(e.value)))}else{const t=new Set(s.map((t=>t.value))),r=e.filter((e=>!t.has(e.value)));i=[...s,...r]}else i=s.some((e=>e.value===t.value))?s.filter((e=>e.value!==t.value)):[...s,t];this.value=this.toMultiValue(i),this.emitUpdate(this.value)}connectedCallback(){window.addEventListener("resize",this.handleViewportResize)}disconnectedCallback(){window.removeEventListener("resize",this.handleViewportResize),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const t={open:this.isOpen,parentRef:this.triggerRef,viewportPadding:b.VIEWPORT_PADDING,onSdClose:()=>{this.closeDropdown()}};return i("sd-field",{key:"3387dc16a6f54bfae652338c71c4c0e1553828c9",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,onMouseEnter:()=>{this.hovered=!0},onMouseLeave:()=>{this.hovered=!1}},i("div",{key:"124325f8f6882a3c9ee1a1795ee969f13d67dfe2",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"2e0e44ae666282d3931f9889650a7999929a312b",ref:t=>{this.triggerComponentRef=t},displayText:this.displayText,placeholder:this.placeholder??"선택",disabled:this.disabled,isOpen:this.isOpen,onSdTriggerClick:this.handleTriggerClick,onSdTriggerFocus:this.handleTriggerFocus,onSdTriggerBlur:this.handleTriggerBlur})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"b6e97e43c5ea3a06fbb2976dab52d4f544822ae0",...t},i("sd-select-listbox",{key:"3d8a01c54667149507db2757d81813d2f285b32d",type:this.type,options:this.options,value:this.value,emitValue:this.emitValue,useSearch:this.useSearch,useSelectAll:this.useSelectAll,triggerWidth:this.dropdownWidth||this.triggerWidth,maxWidth:this.resolvedMaxDropdownWidth,maxHeight:this.resolvedDropdownHeight,onSdOptionSelect:t=>this.handleOptionSelect(t.detail)})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}};b.style="sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}";const x=class{constructor(s){t(this,s),this.optionSelect=e(this,"sdOptionSelect",7)}type="default";options=[];value=null;emitValue=!1;useSearch=!1;useSelectAll=!1;triggerWidth="200px";maxWidth="640px";maxHeight="260px";searchKeyword="";isScrolled=!1;focusedIndex=-1;optionSelect;listEl;lastScrolledIndex=-1;keydownAttached=!1;suppressHover=!1;get isDepth(){return"default_depth"===this.type||"multi_depth"===this.type}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}static SELECT_ALL_OPTION={value:"__select_all__",label:"전체"};get showSelectAll(){return this.useSelectAll&&this.isMulti&&this.getAllNonDisabledLeaves().length>0}getAllNonDisabledLeaves(){const t=e=>e.flatMap((e=>e.disabled?[]:e.children?t(e.children):[e]));return t(this.options)}get selectAllState(){if(!this.showSelectAll)return!1;const t=this.getAllNonDisabledLeaves();if(0===t.length)return!1;const e=this.getSelectedValues(),s=t.filter((t=>e.has(t.value))).length;return 0!==s&&(s===t.length||null)}get showSearch(){return!!this.useSearch&&(this.isDepth?h(this.options):this.options.length)>=o}get filteredOptions(){if(null==this.searchKeyword||""===this.searchKeyword)return this.options;if(this.isDepth)return l(this.options,this.searchKeyword);const t=this.searchKeyword.toLowerCase();return this.options.filter((e=>{const s=n(e.label)?d(e.label):e.label;return null!=s&&s.toLowerCase().includes(t)}))}get isEmpty(){return this.isDepth?0===h(this.filteredOptions)&&0===this.filteredOptions.length:0===this.filteredOptions.length}getSelectedValues(){return null!=this.value&&Array.isArray(this.value)?this.emitValue?new Set(this.value):new Set(this.value.map((t=>t.value))):new Set}isOptionSelected(t){return this.isMulti?this.getSelectedValues().has(t.value):this.emitValue||null==this.value||"object"!=typeof this.value||Array.isArray(this.value)?this.value===t.value:this.value.value===t.value}getGroupSelectionState(t){if(!this.isMulti||!t.children)return!1;const e=this.getSelectedValues();if(0===e.size)return!1;const s=this.collectVisibleLeaves(t);if(0===s.length)return!1;const i=s.filter((t=>e.has(t.value))).length;return 0!==i&&(i===s.length||null)}getCountInfo(t){if(!this.isMulti||!t.children)return;const e=this.getSelectedValues(),s=this.collectVisibleLeaves(t);return{selected:s.filter((t=>e.has(t.value))).length,total:s.length}}findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}collectLeaves(t){return t.children?t.children.flatMap((t=>this.collectLeaves(t))):[t]}collectVisibleLeaves(t){if(t.disabled)return[];if(!t.children)return[t];if(0===t.children.length){const e=this.findOriginalOption(t.value,this.options);return e?this.collectLeaves(e).filter((t=>!t.disabled)):[]}return t.children.flatMap((t=>this.collectVisibleLeaves(t)))}get navigableOptions(){const t=[];this.showSelectAll&&t.push(x.SELECT_ALL_OPTION);const e=s=>{for(const i of s){const s=!!i.children;(!s||this.isMulti)&&!i.disabled&&t.push(i),s&&i.children&&i.children.length>0&&e(i.children)}};return e(this.filteredOptions),t}isSelectAllOption(t){return this.showSelectAll&&t.value===x.SELECT_ALL_OPTION.value}emitSelectAll(){if(!this.showSelectAll)return;const t=this.getAllNonDisabledLeaves();this.optionSelect.emit({option:{...x.SELECT_ALL_OPTION,children:t},leaves:t})}handleSelectAllClick=t=>{t.stopPropagation(),this.emitSelectAll()};isOptionFocused(t){if(this.focusedIndex<0)return!1;const e=this.navigableOptions[this.focusedIndex];return null!=e&&e.value===t.value}resetFocusOnFilter(){this.focusedIndex=this.navigableOptions.length>0?0:-1,this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}handleSearchFilter=t=>{this.searchKeyword=t.detail};handleScroll=t=>{this.isScrolled=t.target.scrollTop>0};emitOptionSelect(t){this.optionSelect.emit({option:t,leaves:this.collectVisibleLeaves(t)})}handleOptionClick=t=>{t.stopPropagation(),this.emitOptionSelect(t.detail)};handleOptionHover=t=>{if(this.suppressHover)return;const e=this.navigableOptions.findIndex((e=>e.value===t.value));e>=0&&(this.focusedIndex=e)};releaseHoverSuppress=()=>{this.suppressHover=!1,document.removeEventListener("mousemove",this.releaseHoverSuppress,!0)};handleKeyDown=t=>{const e=this.navigableOptions;if("ArrowDown"===t.key){if(0===e.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<0?0:(this.focusedIndex+1)%e.length,this.beginHoverSuppression()}else if("ArrowUp"===t.key){if(0===e.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<=0?e.length-1:this.focusedIndex-1,this.beginHoverSuppression()}else if("Enter"===t.key){if(this.focusedIndex<0||this.focusedIndex>=e.length)return;t.preventDefault(),t.stopPropagation();const s=e[this.focusedIndex];this.isSelectAllOption(s)?this.emitSelectAll():this.emitOptionSelect(s)}};beginHoverSuppression(){this.suppressHover||(this.suppressHover=!0,document.addEventListener("mousemove",this.releaseHoverSuppress,!0))}scrollFocusedIntoView(){const t=this.listEl,e=t?.querySelector(".sd-select-list-item--focused");if(!t||!e)return;const s=t.getBoundingClientRect(),i=e.getBoundingClientRect();i.top<s.top?t.scrollTop+=i.top-s.top:i.bottom>s.bottom&&(t.scrollTop+=i.bottom-s.bottom)}connectedCallback(){this.keydownAttached||(document.addEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!0)}disconnectedCallback(){this.keydownAttached&&(document.removeEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!1),this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}componentDidRender(){this.focusedIndex!==this.lastScrolledIndex&&(this.lastScrolledIndex=this.focusedIndex,this.focusedIndex>=0&&this.scrollFocusedIntoView())}renderOptions(t,e=1){return t.map((t=>{const s=!!t.children;return[i("sd-select-list-item",{option:t,depth:e,isSelected:s?this.getGroupSelectionState(t):this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,countInfo:this.getCountInfo(t),onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)}),s&&t.children?this.renderOptions(t.children,e+1):null]}))}render(){return i("div",{key:"6ca1107a8aadc1fbae26f3d8d3385b355981b65e",class:"sd-select-listbox",style:{"--listbox-trigger-width":this.triggerWidth??"200px","--listbox-max-width":this.maxWidth??"640px","--listbox-max-height":this.maxHeight??"260px","--listbox-radius":`${a.radius}px`}},this.showSearch&&i("sd-select-list-item-search",{key:"8612b45a4e9b7d2701b8decd6865ebb50d6fcaa3",isScrolled:this.isScrolled,onSdSearchFilter:this.handleSearchFilter}),i("div",{key:"c02c9c1d96176f94d2f83c66ad3e7cc0946c0270",class:"sd-select-listbox__list",onScroll:this.handleScroll,ref:t=>{this.listEl=t}},this.showSelectAll&&i("sd-select-list-item",{key:"f4fe1769d14812ba63fb73ff21ebfdaaf9d76409",option:x.SELECT_ALL_OPTION,depth:1,isSelected:this.selectAllState,isFocused:this.isOptionFocused(x.SELECT_ALL_OPTION),useCheckbox:!0,onSdListItemClick:this.handleSelectAllClick,onMouseEnter:()=>this.handleOptionHover(x.SELECT_ALL_OPTION)}),this.isEmpty?i("div",{class:"sd-select-listbox__empty"},c):this.isDepth?this.renderOptions(this.filteredOptions):this.filteredOptions.map((t=>i("sd-select-list-item",{option:t,depth:1,isSelected:this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)})))))}static get watchers(){return{searchKeyword:[{resetFocusOnFilter:0}]}}};x.style=":host{display:block}:host .sd-select-listbox{display:flex;flex-direction:column;width:var(--listbox-trigger-width);max-width:var(--listbox-max-width);max-height:var(--listbox-max-height);border-radius:var(--listbox-radius);background:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);overflow:hidden;outline:none}:host .sd-select-listbox__list{flex:1;min-height:0;overflow-y:auto;padding-bottom:0}:host .sd-select-listbox__empty{padding:12px;text-align:center;font-size:12px;line-height:20px;color:#888888}";const m=class{constructor(s){t(this,s),this.triggerClick=e(this,"sdTriggerClick",7),this.triggerFocus=e(this,"sdTriggerFocus",7),this.triggerBlur=e(this,"sdTriggerBlur",7)}displayText="";placeholder="선택";disabled=!1;isOpen=!1;triggerClick;triggerFocus;triggerBlur;triggerEl;async sdFocus(){this.disabled||this.triggerEl?.focus()}handleClick=()=>{this.disabled||this.triggerClick.emit()};handleFocus=()=>{this.triggerFocus.emit()};handleBlur=()=>{this.triggerBlur.emit()};render(){const t=""!==this.displayText;return i("div",{key:"7f5940ce19feb2d3ae9b2cbb6b5fdeb6d0151f61",ref:t=>{this.triggerEl=t},role:"button","aria-haspopup":"listbox","aria-expanded":this.isOpen?"true":"false",tabindex:this.disabled?-1:0,class:{"sd-select-trigger":!0,"sd-select-trigger--open":this.isOpen,"sd-select-trigger--disabled":this.disabled},style:{"--trigger-padding-x":`${p.paddingX}px`,"--trigger-gap":`${p.gap}px`,"--trigger-font-size":`${g.fontSize}px`,"--trigger-line-height":`${g.lineHeight}px`,"--trigger-font-weight":g.fontWeight,"--trigger-color":this.disabled?u.text.disabled:t?u.text.default:u.icon.default,"--trigger-icon-color":this.disabled?u.icon.disabled:u.icon.default},onClick:this.handleClick,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.handleClick())},onFocus:this.handleFocus,onBlur:this.handleBlur},i("div",{key:"b50dea3450ee6fd2bf30811cc33facf00761f0d1",class:"sd-select-trigger__content"},t&&n(this.displayText)?i("span",{class:"sd-select-trigger__text",ref:t=>t&&(t.innerHTML=f(this.displayText))}):i("span",{class:"sd-select-trigger__text"},t?this.displayText:this.placeholder??"선택"),i("sd-icon",{key:"778b3d1c738951f9a18950b668a34a1bc36006ca",name:"chevronDown",size:12,color:"var(--trigger-icon-color)",class:{"sd-select-trigger__icon":!0,"sd-select-trigger__icon--open":this.isOpen}})))}};m.style="sd-select-trigger{display:block;width:100%;height:100%}sd-select-trigger .sd-select-trigger{display:flex;width:100%;height:100%;cursor:pointer;user-select:none;overflow:hidden;border-radius:3px}sd-select-trigger .sd-select-trigger--disabled{cursor:not-allowed}sd-select-trigger .sd-select-trigger__content{display:flex;align-items:center;gap:var(--trigger-gap);flex:1;padding:0 var(--trigger-padding-x);min-width:0}sd-select-trigger .sd-select-trigger__text{flex:1;font-size:var(--trigger-font-size);line-height:var(--trigger-line-height);font-weight:var(--trigger-font-weight);color:var(--trigger-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-trigger .sd-select-trigger__icon{flex-shrink:0;transition:transform 0.2s ease}sd-select-trigger .sd-select-trigger__icon--open{transform:rotate(180deg)}";export{b as sd_select,x as sd_select_listbox,m as sd_select_trigger}
|
|
1
|
+
import{r as t,c as e,a as s,h as i}from"./p-BZ5lcC25.js";import{n as r}from"./p-CCwNgVmC.js";import{c as h,S as o,f as l,i as n,e as d,E as c,L as a,a as u,b as g,d as p}from"./p-CAFz8W8_.js";import{s as f}from"./p-BE4tnQ2Z.js";import"./p-U8VaRj9c.js";const b=class{constructor(s){t(this,s),this.update=e(this,"sdUpdate",7),this.dropDownShow=e(this,"sdDropDownShow",7)}static VIEWPORT_PADDING=20;static PORTAL_OFFSET_Y=4;static CLOSE_ANIMATION_DURATION=150;get el(){return s(this)}type="default";value=null;options=[];placeholder="선택";dropdownWidth="";maxDropdownWidth="640px";dropdownHeight="260px";disabled=!1;label="";labelWidth="";addonLabel="";addonAlign="start";error=!1;hint="";errorMessage="";rules=[];icon=void 0;labelTooltip="";labelTooltipProps=null;emitValue=!1;width="";useSearch=!1;allSelectedLabel="전체";useSelectAll=!1;isOpen=!1;isAnimatingOut=!1;triggerWidth="200px";resolvedDropdownHeight="260px";resolvedMaxDropdownWidth="640px";focused=!1;hovered=!1;update;dropDownShow;async sdFocus(){this.disabled||await(this.triggerComponentRef?.sdFocus())}async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.disabled||this.isOpen||(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)}triggerRef;triggerComponentRef;closeAnimationTimer;name=r();triggerHasFocus=!1;watchIsOpen(t){this.syncFocusedState(t),this.dropDownShow.emit({isOpen:t})}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}get displayText(){if(this.isMulti){if(!Array.isArray(this.value)||0===this.value.length)return"";const t=this.getNonDisabledLeaves(this.options),e=this.getSelectedOptions();if(t.length>0&&t.every((t=>e.some((e=>e.value===t.value)))))return this.allSelectedLabel??"전체";const s=this.flattenOptions(this.options);return this.value.map((t=>{if(null!=t&&"object"==typeof t){const e=t;return e.label??s.find((t=>t.value===e.value))?.label??""}return s.find((e=>e.value===t))?.label??""})).filter(Boolean).join(", ")}if(null==this.value)return"";if(!this.emitValue&&"object"==typeof this.value&&!Array.isArray(this.value))return this.value.label??"";const t=this.flattenOptions(this.options);return t.find((t=>t.value===this.value))?.label??""}flattenOptions(t){return t.flatMap((t=>t.children?this.flattenOptions(t.children):[t]))}getNonDisabledLeaves(t){return t.flatMap((t=>t.disabled?[]:t.children?this.getNonDisabledLeaves(t.children):[t]))}getSelectedOptions(){const t=this.value;return null!=t&&Array.isArray(t)?this.emitValue?t.map((t=>this.findOriginalOption(t,this.options))).filter((t=>!!t)):t:[]}toMultiValue(t){return this.emitValue?t.map((t=>t.value)):t}parsePixelValue(t,e){const s=Number.parseFloat(t);return Number.isFinite(s)?s:e}updateDropdownViewportConstraints(){if(!this.triggerRef)return;const t=this.triggerRef.getBoundingClientRect(),e=b.VIEWPORT_PADDING,s=b.PORTAL_OFFSET_Y,i=this.parsePixelValue(this.dropdownHeight,260),r=this.parsePixelValue(this.maxDropdownWidth,640),h=Math.max(window.innerHeight-t.bottom-e-s,0),o=Math.max(t.top-e-s,0),l=Math.max(h,o),n=Math.max(window.innerWidth-2*e,0);this.resolvedDropdownHeight=`${Math.min(i,l)}px`,this.resolvedMaxDropdownWidth=`${Math.min(r,n)}px`}handleViewportResize=()=>{this.isOpen&&this.updateDropdownViewportConstraints()};findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),b.CLOSE_ANIMATION_DURATION))}prepareDropdownGeometry(){this.triggerRef&&(this.triggerWidth=`${this.triggerRef.offsetWidth}px`),this.updateDropdownViewportConstraints()}syncFocusedState(t=this.isOpen){this.focused=t||this.triggerHasFocus}handleTriggerFocus=()=>{this.triggerHasFocus=!0,this.syncFocusedState()};handleTriggerBlur=()=>{this.triggerHasFocus=!1,this.syncFocusedState()};handleTriggerClick=()=>{this.isOpen?this.closeDropdown():(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)};emitUpdate(t){this.update.emit(t)}handleOptionSelect=t=>{const{option:e,leaves:s}=t;if(this.isMulti)this.handleMultiSelect(e,s);else{this.closeDropdown(),this.value=this.emitValue?e.value:e;const t=this.value;requestAnimationFrame((()=>{this.emitUpdate(t)}))}};handleMultiSelect(t,e){const s=this.getSelectedOptions();let i;if(t.children)if(e.every((t=>s.some((e=>e.value===t.value))))){const t=new Set(e.map((t=>t.value)));i=s.filter((e=>!t.has(e.value)))}else{const t=new Set(s.map((t=>t.value))),r=e.filter((e=>!t.has(e.value)));i=[...s,...r]}else i=s.some((e=>e.value===t.value))?s.filter((e=>e.value!==t.value)):[...s,t];this.value=this.toMultiValue(i),this.emitUpdate(this.value)}connectedCallback(){window.addEventListener("resize",this.handleViewportResize)}disconnectedCallback(){window.removeEventListener("resize",this.handleViewportResize),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const t={open:this.isOpen,parentRef:this.triggerRef,viewportPadding:b.VIEWPORT_PADDING,onSdClose:()=>{this.closeDropdown()}};return i("sd-field",{key:"5dceeb2361339527e65657f66966a5b843f7a03b",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,onMouseEnter:()=>{this.hovered=!0},onMouseLeave:()=>{this.hovered=!1}},i("div",{key:"2fe78a384fef6083a08709fa72d98d2b2e399580",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"be647e0ba29295be5a888d92cb18c273980ec38f",ref:t=>{this.triggerComponentRef=t},displayText:this.displayText,placeholder:this.placeholder??"선택",disabled:this.disabled,isOpen:this.isOpen,onSdTriggerClick:this.handleTriggerClick,onSdTriggerFocus:this.handleTriggerFocus,onSdTriggerBlur:this.handleTriggerBlur})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"2d519a9957ff7201519502a2053785cc669642c2",...t},i("sd-select-listbox",{key:"33377475b06c3be1f6ba7e6909a9bfb938144b3a",type:this.type,options:this.options,value:this.value,emitValue:this.emitValue,useSearch:this.useSearch,useSelectAll:this.useSelectAll,triggerWidth:this.dropdownWidth||this.triggerWidth,maxWidth:this.resolvedMaxDropdownWidth,maxHeight:this.resolvedDropdownHeight,onSdOptionSelect:t=>this.handleOptionSelect(t.detail)})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}};b.style="sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}";const x=class{constructor(s){t(this,s),this.optionSelect=e(this,"sdOptionSelect",7)}type="default";options=[];value=null;emitValue=!1;useSearch=!1;useSelectAll=!1;triggerWidth="200px";maxWidth="640px";maxHeight="260px";searchKeyword="";isScrolled=!1;focusedIndex=-1;optionSelect;listEl;lastScrolledIndex=-1;keydownAttached=!1;suppressHover=!1;get isDepth(){return"default_depth"===this.type||"multi_depth"===this.type}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}static SELECT_ALL_OPTION={value:"__select_all__",label:"전체"};get showSelectAll(){return this.useSelectAll&&this.isMulti&&this.getAllNonDisabledLeaves().length>0}getAllNonDisabledLeaves(){const t=e=>e.flatMap((e=>e.disabled?[]:e.children?t(e.children):[e]));return t(this.options)}get selectAllState(){if(!this.showSelectAll)return!1;const t=this.getAllNonDisabledLeaves();if(0===t.length)return!1;const e=this.getSelectedValues(),s=t.filter((t=>e.has(t.value))).length;return 0!==s&&(s===t.length||null)}get showSearch(){return!!this.useSearch&&(this.isDepth?h(this.options):this.options.length)>=o}get filteredOptions(){if(null==this.searchKeyword||""===this.searchKeyword)return this.options;if(this.isDepth)return l(this.options,this.searchKeyword);const t=this.searchKeyword.toLowerCase();return this.options.filter((e=>{const s=n(e.label)?d(e.label):e.label;return null!=s&&s.toLowerCase().includes(t)}))}get isEmpty(){return this.isDepth?0===h(this.filteredOptions)&&0===this.filteredOptions.length:0===this.filteredOptions.length}getSelectedValues(){return null!=this.value&&Array.isArray(this.value)?this.emitValue?new Set(this.value):new Set(this.value.map((t=>t.value))):new Set}isOptionSelected(t){return this.isMulti?this.getSelectedValues().has(t.value):this.emitValue||null==this.value||"object"!=typeof this.value||Array.isArray(this.value)?this.value===t.value:this.value.value===t.value}getGroupSelectionState(t){if(!this.isMulti||!t.children)return!1;const e=this.getSelectedValues();if(0===e.size)return!1;const s=this.collectVisibleLeaves(t);if(0===s.length)return!1;const i=s.filter((t=>e.has(t.value))).length;return 0!==i&&(i===s.length||null)}getCountInfo(t){if(!this.isMulti||!t.children)return;const e=this.getSelectedValues(),s=this.collectVisibleLeaves(t);return{selected:s.filter((t=>e.has(t.value))).length,total:s.length}}findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}collectLeaves(t){return t.children?t.children.flatMap((t=>this.collectLeaves(t))):[t]}collectVisibleLeaves(t){if(t.disabled)return[];if(!t.children)return[t];if(0===t.children.length){const e=this.findOriginalOption(t.value,this.options);return e?this.collectLeaves(e).filter((t=>!t.disabled)):[]}return t.children.flatMap((t=>this.collectVisibleLeaves(t)))}get navigableOptions(){const t=[];this.showSelectAll&&t.push(x.SELECT_ALL_OPTION);const e=s=>{for(const i of s){const s=!!i.children;(!s||this.isMulti)&&!i.disabled&&t.push(i),s&&i.children&&i.children.length>0&&e(i.children)}};return e(this.filteredOptions),t}isSelectAllOption(t){return this.showSelectAll&&t.value===x.SELECT_ALL_OPTION.value}emitSelectAll(){if(!this.showSelectAll)return;const t=this.getAllNonDisabledLeaves();this.optionSelect.emit({option:{...x.SELECT_ALL_OPTION,children:t},leaves:t})}handleSelectAllClick=t=>{t.stopPropagation(),this.emitSelectAll()};isOptionFocused(t){if(this.focusedIndex<0)return!1;const e=this.navigableOptions[this.focusedIndex];return null!=e&&e.value===t.value}resetFocusOnFilter(){this.focusedIndex=this.navigableOptions.length>0?0:-1,this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}handleSearchFilter=t=>{this.searchKeyword=t.detail};handleScroll=t=>{this.isScrolled=t.target.scrollTop>0};emitOptionSelect(t){this.optionSelect.emit({option:t,leaves:this.collectVisibleLeaves(t)})}handleOptionClick=t=>{t.stopPropagation(),this.emitOptionSelect(t.detail)};handleOptionHover=t=>{if(this.suppressHover)return;const e=this.navigableOptions.findIndex((e=>e.value===t.value));e>=0&&(this.focusedIndex=e)};releaseHoverSuppress=()=>{this.suppressHover=!1,document.removeEventListener("mousemove",this.releaseHoverSuppress,!0)};handleKeyDown=t=>{const e=this.navigableOptions;if("ArrowDown"===t.key){if(0===e.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<0?0:(this.focusedIndex+1)%e.length,this.beginHoverSuppression()}else if("ArrowUp"===t.key){if(0===e.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<=0?e.length-1:this.focusedIndex-1,this.beginHoverSuppression()}else if("Enter"===t.key){if(this.focusedIndex<0||this.focusedIndex>=e.length)return;t.preventDefault(),t.stopPropagation();const s=e[this.focusedIndex];this.isSelectAllOption(s)?this.emitSelectAll():this.emitOptionSelect(s)}};beginHoverSuppression(){this.suppressHover||(this.suppressHover=!0,document.addEventListener("mousemove",this.releaseHoverSuppress,!0))}scrollFocusedIntoView(){const t=this.listEl,e=t?.querySelector(".sd-select-list-item--focused");if(!t||!e)return;const s=t.getBoundingClientRect(),i=e.getBoundingClientRect();i.top<s.top?t.scrollTop+=i.top-s.top:i.bottom>s.bottom&&(t.scrollTop+=i.bottom-s.bottom)}connectedCallback(){this.keydownAttached||(document.addEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!0)}disconnectedCallback(){this.keydownAttached&&(document.removeEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!1),this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}componentDidRender(){this.focusedIndex!==this.lastScrolledIndex&&(this.lastScrolledIndex=this.focusedIndex,this.focusedIndex>=0&&this.scrollFocusedIntoView())}renderOptions(t,e=1){return t.map((t=>{const s=!!t.children;return[i("sd-select-list-item",{option:t,depth:e,isSelected:s?this.getGroupSelectionState(t):this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,countInfo:this.getCountInfo(t),onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)}),s&&t.children?this.renderOptions(t.children,e+1):null]}))}render(){return i("div",{key:"df4d19f8807ce87384cad18ca981e0792da35682",class:"sd-select-listbox",style:{"--listbox-trigger-width":this.triggerWidth??"200px","--listbox-max-width":this.maxWidth??"640px","--listbox-max-height":this.maxHeight??"260px","--listbox-radius":`${a.radius}px`}},this.showSearch&&i("sd-select-list-item-search",{key:"b950890a9138fa5ab7f0df7c1d07bbea65140e67",isScrolled:this.isScrolled,onSdSearchFilter:this.handleSearchFilter}),i("div",{key:"1aeaf552893becedf8394c1e9af8ef7119e70fdb",class:"sd-select-listbox__list",onScroll:this.handleScroll,ref:t=>{this.listEl=t}},this.showSelectAll&&i("sd-select-list-item",{key:"83329f2d454d116d64155ef8a83c076e27cdc7b0",option:x.SELECT_ALL_OPTION,depth:1,isSelected:this.selectAllState,isFocused:this.isOptionFocused(x.SELECT_ALL_OPTION),useCheckbox:!0,onSdListItemClick:this.handleSelectAllClick,onMouseEnter:()=>this.handleOptionHover(x.SELECT_ALL_OPTION)}),this.isEmpty?i("div",{class:"sd-select-listbox__empty"},c):this.isDepth?this.renderOptions(this.filteredOptions):this.filteredOptions.map((t=>i("sd-select-list-item",{option:t,depth:1,isSelected:this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)})))))}static get watchers(){return{searchKeyword:[{resetFocusOnFilter:0}]}}};x.style=":host{display:block}:host .sd-select-listbox{display:flex;flex-direction:column;width:var(--listbox-trigger-width);max-width:var(--listbox-max-width);max-height:var(--listbox-max-height);border-radius:var(--listbox-radius);background:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);overflow:hidden;outline:none}:host .sd-select-listbox__list{flex:1;min-height:0;overflow-y:auto;padding-bottom:0}:host .sd-select-listbox__empty{padding:12px;text-align:center;font-size:12px;line-height:20px;color:#888888}";const m=class{constructor(s){t(this,s),this.triggerClick=e(this,"sdTriggerClick",7),this.triggerFocus=e(this,"sdTriggerFocus",7),this.triggerBlur=e(this,"sdTriggerBlur",7)}displayText="";placeholder="선택";disabled=!1;isOpen=!1;triggerClick;triggerFocus;triggerBlur;triggerEl;async sdFocus(){this.disabled||this.triggerEl?.focus()}handleClick=()=>{this.disabled||this.triggerClick.emit()};handleFocus=()=>{this.triggerFocus.emit()};handleBlur=()=>{this.triggerBlur.emit()};render(){const t=""!==this.displayText;return i("div",{key:"bd967efa32ed0692512e549db9f852c7c08d5dcd",ref:t=>{this.triggerEl=t},role:"button","aria-haspopup":"listbox","aria-expanded":this.isOpen?"true":"false",tabindex:this.disabled?-1:0,class:{"sd-select-trigger":!0,"sd-select-trigger--open":this.isOpen,"sd-select-trigger--disabled":this.disabled},style:{"--trigger-padding-x":`${p.paddingX}px`,"--trigger-gap":`${p.gap}px`,"--trigger-font-size":`${g.fontSize}px`,"--trigger-line-height":`${g.lineHeight}px`,"--trigger-font-weight":g.fontWeight,"--trigger-color":this.disabled?u.text.disabled:t?u.text.default:u.icon.default,"--trigger-icon-color":this.disabled?u.icon.disabled:u.icon.default},onClick:this.handleClick,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.handleClick())},onFocus:this.handleFocus,onBlur:this.handleBlur},i("div",{key:"04a8568ac5d109f0635d3474a394030d630f441e",class:"sd-select-trigger__content"},t&&n(this.displayText)?i("span",{class:"sd-select-trigger__text",ref:t=>t&&(t.innerHTML=f(this.displayText))}):i("span",{class:"sd-select-trigger__text"},t?this.displayText:this.placeholder??"선택"),i("sd-icon",{key:"ba256d1a780f7805c81330a6ba4e010c458be57e",name:"chevronDown",size:12,color:"var(--trigger-icon-color)",class:{"sd-select-trigger__icon":!0,"sd-select-trigger__icon--open":this.isOpen}})))}};m.style="sd-select-trigger{display:block;width:100%;height:100%}sd-select-trigger .sd-select-trigger{display:flex;width:100%;height:100%;cursor:pointer;user-select:none;overflow:hidden;border-radius:3px}sd-select-trigger .sd-select-trigger--disabled{cursor:not-allowed}sd-select-trigger .sd-select-trigger__content{display:flex;align-items:center;gap:var(--trigger-gap);flex:1;padding:0 var(--trigger-padding-x);min-width:0}sd-select-trigger .sd-select-trigger__text{flex:1;font-size:var(--trigger-font-size);line-height:var(--trigger-line-height);font-weight:var(--trigger-font-weight);color:var(--trigger-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-trigger .sd-select-trigger__icon{flex-shrink:0;transition:transform 0.2s ease}sd-select-trigger .sd-select-trigger__icon--open{transform:rotate(180deg)}";export{b as sd_select,x as sd_select_listbox,m as sd_select_trigger}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as o,h as e}from"./p-BZ5lcC25.js";var d={height:"24",paddingX:"8",typography:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",textDecoration:"none",lineHeight:"20"}},i={height:"28",paddingX:"12",typography:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",textDecoration:"none",lineHeight:"20"}},r="4",a={width:"1",default:"#CCCCCC",select:"#0075FF",disabled:"#CCCCCC"},n={default:"#FFFFFF",hover:"#0075FF",select:"#FFFFFF",disabled:"#E1E1E1"},s={default:"#555555",hover:"#FFFFFF",select:"#0075FF",disabled:"#888888"},b={gap:"-1"};const l={xs:{height:Number(d.height),paddingX:Number(d.paddingX),fontSize:Number(d.typography.fontSize),lineHeight:Number(d.typography.lineHeight),fontWeight:d.typography.fontWeight,fontFamily:d.typography.fontFamily,textDecoration:d.typography.textDecoration},sm:{height:Number(i.height),paddingX:Number(i.paddingX),fontSize:Number(i.typography.fontSize),lineHeight:Number(i.typography.lineHeight),fontWeight:i.typography.fontWeight,fontFamily:i.typography.fontFamily,textDecoration:i.typography.textDecoration}},u=Number(r),
|
|
1
|
+
import{r as t,c as o,h as e}from"./p-BZ5lcC25.js";var d={height:"24",paddingX:"8",typography:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",textDecoration:"none",lineHeight:"20"}},i={height:"28",paddingX:"12",typography:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",textDecoration:"none",lineHeight:"20"}},r="4",a={width:"1",default:"#CCCCCC",select:"#0075FF",disabled:"#CCCCCC"},n={default:"#FFFFFF",hover:"#0075FF",select:"#FFFFFF",disabled:"#E1E1E1"},s={default:"#555555",hover:"#FFFFFF",select:"#0075FF",disabled:"#888888"},b={gap:"-1"};const l={xs:{height:Number(d.height),paddingX:Number(d.paddingX),fontSize:Number(d.typography.fontSize),lineHeight:Number(d.typography.lineHeight),fontWeight:d.typography.fontWeight,fontFamily:d.typography.fontFamily,textDecoration:d.typography.textDecoration},sm:{height:Number(i.height),paddingX:Number(i.paddingX),fontSize:Number(i.typography.fontSize),lineHeight:Number(i.typography.lineHeight),fontWeight:i.typography.fontWeight,fontFamily:i.typography.fontFamily,textDecoration:i.typography.textDecoration}},u=Number(r),h=Number(a.width),c=Number(b.gap),p={border:{default:a.default,select:a.select,disabled:a.disabled},bg:{default:n.default,hover:n.hover,select:n.select,disabled:n.disabled},content:{default:s.default,hover:s.hover,select:s.select,disabled:s.disabled}},g=class{constructor(e){t(this,e),this.change=o(this,"sdUpdate",7)}value;options=[];size="sm";disabled=!1;name;change;componentWillLoad(){this.size??="sm",this.options??=[],this.disabled??=!1}handleRadioChange=(t,o)=>{this.disabled||o||(this.value=t,this.change.emit(t))};isOptionSelected(t){return this.value===t.value}isOptionDisabled(t){return this.disabled||!!t.disabled}getButtonClasses(t){const o=["sd-radio-button__option",this.isOptionSelected(t)?"sd-radio-button__option--selected":"sd-radio-button__option--unselected"];return this.isOptionDisabled(t)&&o.push("sd-radio-button__option--disabled"),o.join(" ")}getGroupClasses(){return["sd-radio-button",`sd-radio-button--${this.size??"sm"}`].join(" ")}_groupName;get groupName(){return null!=this._groupName&&""!==this._groupName||(this._groupName=null!=this.name&&""!==this.name?this.name:`sd-radio-button-${crypto.randomUUID()}`),this._groupName}render(){const t=l[this.size??"sm"]??l.sm,o={"--sd-radio-button-height":`${t.height}px`,"--sd-radio-button-padding-x":`${t.paddingX}px`,"--sd-radio-button-font-family":t.fontFamily,"--sd-radio-button-font-weight":t.fontWeight,"--sd-radio-button-font-size":`${t.fontSize}px`,"--sd-radio-button-line-height":`${t.lineHeight}px`,"--sd-radio-button-text-decoration":t.textDecoration,"--sd-radio-button-radius":`${u}px`,"--sd-radio-button-border-width":`${h}px`,"--sd-radio-button-group-gap":`${c}px`,"--sd-radio-button-border-default":p.border.default,"--sd-radio-button-border-select":p.border.select,"--sd-radio-button-border-disabled":p.border.disabled,"--sd-radio-button-bg-default":p.bg.default,"--sd-radio-button-bg-hover":p.bg.hover,"--sd-radio-button-bg-select":p.bg.select,"--sd-radio-button-bg-disabled":p.bg.disabled,"--sd-radio-button-content-default":p.content.default,"--sd-radio-button-content-hover":p.content.hover,"--sd-radio-button-content-select":p.content.select,"--sd-radio-button-content-disabled":p.content.disabled};return e("div",{key:"17355ebde09f652f5b94b4f70f09f68ef44cd29d",class:this.getGroupClasses(),style:o,role:"radiogroup","aria-disabled":this.disabled.toString()},this.options.map((t=>{const o=this.isOptionSelected(t),d=this.isOptionDisabled(t);return e("label",{key:`radio-${t.value}`,class:this.getButtonClasses(t),"aria-label":t.label||"radio option","data-label":t.label},e("input",{type:"radio",name:this.groupName,value:t.value.toString(),checked:o,disabled:d,onInput:()=>this.handleRadioChange(t.value,t.disabled)}),t.label&&e("span",{class:"sd-radio-button__label"},t.label))})))}};g.style="sd-radio-button{display:inline-flex;width:fit-content;height:fit-content}.sd-radio-button{display:inline-flex;flex-flow:row nowrap;gap:0}.sd-radio-button__option{display:flex;align-items:center;justify-content:center;position:relative;box-sizing:border-box;height:var(--sd-radio-button-height);padding:0 var(--sd-radio-button-padding-x);border:var(--sd-radio-button-border-width) solid var(--sd-radio-button-border-default);background-color:var(--sd-radio-button-bg-default);color:var(--sd-radio-button-content-default);font-family:var(--sd-radio-button-font-family);font-weight:var(--sd-radio-button-font-weight);font-size:var(--sd-radio-button-font-size);line-height:var(--sd-radio-button-line-height);text-decoration:var(--sd-radio-button-text-decoration);cursor:pointer;user-select:none;-webkit-user-select:none;transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease}.sd-radio-button__option input{display:none}.sd-radio-button__option:not(:first-child){margin-left:var(--sd-radio-button-group-gap)}.sd-radio-button__option:first-child{border-top-left-radius:var(--sd-radio-button-radius);border-bottom-left-radius:var(--sd-radio-button-radius)}.sd-radio-button__option:last-child{border-top-right-radius:var(--sd-radio-button-radius);border-bottom-right-radius:var(--sd-radio-button-radius)}.sd-radio-button__option:only-child{border-radius:var(--sd-radio-button-radius)}.sd-radio-button__option--selected{background-color:var(--sd-radio-button-bg-select);border-color:var(--sd-radio-button-border-select);color:var(--sd-radio-button-content-select);z-index:1}.sd-radio-button__option:hover:not(.sd-radio-button__option--disabled){background-color:var(--sd-radio-button-bg-hover);border-color:var(--sd-radio-button-border-select);color:var(--sd-radio-button-content-hover);z-index:2}.sd-radio-button__option--disabled{background-color:var(--sd-radio-button-bg-disabled);border-color:var(--sd-radio-button-border-disabled);color:var(--sd-radio-button-content-disabled);cursor:not-allowed}.sd-radio-button__label{user-select:none;-webkit-user-select:none}";export{g as sd_radio_button}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as
|
|
1
|
+
import{r as a,c as o,a as d,h as s,H as i}from"./p-BZ5lcC25.js";import{s as e}from"./p-BE4tnQ2Z.js";import{m as t}from"./p-DOXMJi-V.js";const l={positive:"primary_md",negative:"danger_md",default:"neutral_outline_md"},n={positive:"notificationOutline",negative:"warningOutline",default:null},m={positive:t.modal.confirm.positive.icon,negative:t.modal.confirm.negative.icon,default:""},r=Number(t.modal.confirm.title.icon),c=class{constructor(d){a(this,d),this.close=o(this,"sdClose",7),this.cancel=o(this,"sdCancel",7),this.ok=o(this,"sdOk",7)}get el(){return d(this)}hasSlottedContent=!1;customContentRef;slotObserver;type="positive";modalTitle="";titleClass="";topMessage=[];bottomMessage=[];mainButtonName;mainButtonLabel="확인";subButtonLabel="";tagPreset="square_sm_grey";tagLabel="";slotLabel="";tagContents;close;cancel;ok;componentWillLoad(){this.syncHasSlottedContent()}componentDidLoad(){"undefined"!=typeof MutationObserver&&(this.slotObserver=new MutationObserver((()=>this.syncHasSlottedContent())),this.slotObserver.observe(this.el,{childList:!0,characterData:!0}))}componentDidRender(){this.customContentRef&&this.tagContents instanceof HTMLElement&&("function"==typeof this.customContentRef.replaceChildren?this.customContentRef.replaceChildren(this.tagContents):(this.customContentRef.innerHTML="",this.customContentRef.appendChild(this.tagContents)))}disconnectedCallback(){this.slotObserver?.disconnect()}get resolvedType(){return this.type??"positive"}get resolvedMainButton(){return this.mainButtonName??l[this.resolvedType]}get hasTagContent(){return void 0!==this.tagLabel&&""!==this.tagLabel||void 0!==this.slotLabel&&""!==this.slotLabel}get showContentBox(){return null!=this.tagContents||this.hasTagContent||this.hasSlottedContent}syncHasSlottedContent(){const a=Array.from(this.el.childNodes).some((a=>!(a.nodeType===Node.ELEMENT_NODE&&a.classList.contains("sd-confirm-modal"))&&(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.TEXT_NODE&&a.textContent?.trim())));a!==this.hasSlottedContent&&(this.hasSlottedContent=a)}render(){const a=this.resolvedType,o=n[a],d=m[a];return s("div",{key:"e8fcb4879a5a9f2b3bf41753e4cc511e710db1f6",class:"sd-confirm-modal"},s("sd-ghost-button",{key:"a8595db97066963534d0ee5529f39481ed1e6c27",class:"sd-confirm-modal__close-button",icon:"close",ariaLabel:"close",onClick:()=>this.close.emit()}),o&&s("sd-icon",{key:"3b5cf4842176f6c039ecb64ec7942e7cb5a6f1ac",class:"sd-confirm-modal__icon",name:o,size:r,color:d}),s("h2",{key:"6f7032707292e71e0f8adc655ce88487c08e1b8d",class:`sd-confirm-modal__title ${this.titleClass??""}`},this.modalTitle),s("div",{key:"e21c66301b368ffd989063aaf9826e023de71925",class:"sd-confirm-modal__body"},(this.topMessage??[]).length>0&&s("div",{key:"3965561001b0520f491cac833bba3cfe92d7a200",class:"sd-confirm-modal__message"},(this.topMessage??[]).map((a=>s("p",{class:"sd-confirm-modal__message-text",innerHTML:e(a)})))),this.showContentBox&&s("div",{key:"dc2c38a945493e42d451e4fa3d3ebaa6dca75e4a",class:"sd-confirm-modal__content-box"},this.tagContents?s("div",{class:"sd-confirm-modal__custom-content",ref:a=>{this.customContentRef=a}}):s("slot",{onSlotchange:()=>this.syncHasSlottedContent()},this.tagLabel&&s("sd-tag",{name:this.tagPreset??"square_sm_grey",label:this.tagLabel}),this.slotLabel&&s("span",{class:"sd-confirm-modal__slot-label"},this.slotLabel))),(this.bottomMessage??[]).length>0&&s("div",{key:"ae35e60d69047547d159a452b838c8fc57a3e1a4",class:"sd-confirm-modal__message"},(this.bottomMessage??[]).map((a=>s("p",{class:"sd-confirm-modal__message-text",innerHTML:e(a)}))))),s("div",{key:"3bd41c58539faade80e61fac6a91a4ab318bbe88",class:"sd-confirm-modal__button"},this.subButtonLabel&&s("sd-button",{key:"177fba6b79a23c80b1037d3af4872c58a598aa33",name:"neutral_outline_md",label:this.subButtonLabel,onSdClick:()=>this.cancel.emit()}),s("sd-button",{key:"b332d980d9236c584ebca47f89fc2d9b217c0bfd",name:this.resolvedMainButton,label:this.mainButtonLabel??"확인",onSdClick:()=>this.ok.emit()})))}};c.style="sd-confirm-modal{display:block;width:fit-content;min-width:520px}sd-confirm-modal .sd-confirm-modal{position:relative;padding:var(--sd-modal-modal-confirm-padding-y) var(--sd-modal-modal-confirm-padding-x);border-radius:var(--sd-modal-modal-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);background:var(--sd-modal-modal-bg)}sd-confirm-modal .sd-confirm-modal__close-button{position:absolute;top:12px;right:12px}sd-confirm-modal .sd-confirm-modal__icon{display:block;width:var(--sd-modal-modal-confirm-title-icon);height:var(--sd-modal-modal-confirm-title-icon);margin:0 auto var(--sd-modal-modal-confirm-title-gap) auto}sd-confirm-modal .sd-confirm-modal__title{color:var(--sd-modal-modal-confirm-title-color);font-size:var(--sd-modal-modal-confirm-title-typography-font-size);font-weight:var(--sd-modal-modal-confirm-title-typography-font-weight);line-height:var(--sd-modal-modal-confirm-title-typography-line-height);text-align:center;margin:0 0 var(--sd-modal-modal-confirm-body-gap) 0}sd-confirm-modal .sd-confirm-modal__body{display:flex;flex-direction:column;gap:var(--sd-modal-modal-confirm-body-gap)}sd-confirm-modal .sd-confirm-modal__message-text{color:var(--sd-modal-modal-confirm-message-color);font-size:12px;font-weight:400;line-height:20px;text-align:center;margin:0}sd-confirm-modal .sd-confirm-modal__content-box{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border:1px solid #e1e1e1;border-radius:8px;background:white}sd-confirm-modal .sd-confirm-modal__slot-label{font-size:14px;font-weight:700;line-height:22px;color:var(--sd-modal-modal-confirm-message-color)}sd-confirm-modal .sd-confirm-modal__button{display:flex;justify-content:center;gap:var(--sd-modal-modal-confirm-button-gap);margin-top:40px}";const g={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)},h={bg:t.modal.bg,messageColor:t.modal.loading.message.color,errorIcon:t.modal.confirm.negative.icon},f=t.modal.loading.message.typography.fontFamily,b=Number(t.modal.loading.message.typography.fontSize),p=Number(t.modal.loading.message.typography.fontWeight),u=Number(t.modal.loading.message.typography.lineHeight),_={loading:"작업을 진행하고 있습니다. 잠시만 기다려 주세요.",error:"작업에 실패하였습니다. 다시 시도해 주세요."},v={loading:"작업 취소",error:"다시 시도"},y=class{constructor(d){a(this,d),this.click=o(this,"sdClick",7)}state="loading";message="";useButton=!1;buttonLabel="";width;height;progress;click;get resolvedState(){return this.state??"loading"}get resolvedMessage(){return this.message||_[this.resolvedState]}get resolvedButtonLabel(){return this.buttonLabel||v[this.resolvedState]}handleClick=()=>{this.click.emit()};toCssSize(a){if(null!=a&&""!==a)return"number"==typeof a?`${a}px`:a}render(){const a={"--sd-loading-modal-min-width":`${g.minWidth}px`,"--sd-loading-modal-min-height":`${g.minHeight}px`,"--sd-loading-modal-gap":`${g.gap}px`,"--sd-loading-modal-content-size":`${g.contentSize}px`,"--sd-loading-modal-radius":`${g.radius}px`,"--sd-loading-modal-bg":h.bg,"--sd-loading-modal-message-color":h.messageColor,"--sd-loading-modal-message-font-family":f,"--sd-loading-modal-message-font-size":`${b}px`,"--sd-loading-modal-message-font-weight":`${p}`,"--sd-loading-modal-message-line-height":`${u}px`,"--sd-loading-modal-error-color":h.errorIcon,"--sd-loading-modal-width":this.toCssSize(this.width)??`${g.minWidth}px`,"--sd-loading-modal-height":this.toCssSize(this.height)??`${g.minHeight}px`};return s(i,{key:"163783850461aff1255dbd0784db91ad28da3f16",style:a},s("div",{key:"1e09f93378b0813d03c444570d06ffb09b494b63",class:"sd-loading-modal"},s("div",{key:"97a4919967f5be295b57b4194295c919b13151a4",class:"sd-loading-modal__content"},"loading"===this.resolvedState?s("sd-circle-progress",void 0!==this.progress?{value:this.progress}:{indeterminate:!0}):s("sd-icon",{class:"sd-loading-modal__icon",name:"warningOutline",size:g.contentSize,color:h.errorIcon})),s("div",{key:"aea0e4b45a55f0907e073f125ba0195bfa128078",class:"sd-loading-modal__message-wrapper"},Array.isArray(this.resolvedMessage)?this.resolvedMessage.map((a=>s("p",{class:"sd-loading-modal__message"},a))):s("p",{class:"sd-loading-modal__message"},this.resolvedMessage)),this.useButton&&s("div",{key:"b64767c954b366f6414886f032c80dd1c8c0190b",class:"sd-loading-modal__button"},s("sd-button",{key:"8a99e885b5561656f4046698235537d461b41455",name:"neutral_outline_sm",label:this.resolvedButtonLabel,onSdClick:this.handleClick}))))}};y.style="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}";export{c as sd_confirm_modal,y as sd_loading_modal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,a as s,h as i}from"./p-BZ5lcC25.js";const n=4e3;let o=0;const r=class{constructor(s){t(this,s),this.toastShow=e(this,"sdToastShow",7),this.toastDismiss=e(this,"sdToastDismiss",7)}get el(){return s(this)}position="bottom-center";maxVisible=3;defaultDuration=n;zIndex=999;toasts=[];expanded=!1;toastRefs=new Map;toastShow;toastDismiss;async create(t){const e="toast-"+ ++o,s={id:e,options:t,state:"entering"},i=t.duration??this.defaultDuration??n;i>0&&(s.timerId=setTimeout((()=>this.startDismiss(e)),i));let r=[...this.toasts||[],s];const a=r.filter((t=>"exiting"!==t.state));if(a.length>(this.maxVisible??3)){const t=new Set(a.slice(0,a.length-(this.maxVisible??3)).map((t=>t.id)));r=r.map((e=>t.has(e.id)&&"exiting"!==e.state?(e.timerId&&clearTimeout(e.timerId),this.scheduleRemoval(e.id),{...e,state:"exiting",timerId:void 0}):e))}return this.toasts=r,this.toastShow.emit({id:e}),e}async dismiss(t){this.startDismiss(t)}async dismissAll(){(this.toasts||[]).forEach((t=>this.startDismiss(t.id)))}startDismiss(t){const e=(this.toasts||[]).find((e=>e.id===t));e&&"exiting"!==e.state&&(e.timerId&&clearTimeout(e.timerId),this.toasts=(this.toasts||[]).map((e=>e.id===t?{...e,state:"exiting",timerId:void 0}:e)),this.scheduleRemoval(t))}scheduleRemoval(t){setTimeout((()=>this.removeToast(t)),500)}removeToast(t){(this.toasts||[]).find((e=>e.id===t))&&(this.toasts=(this.toasts||[]).filter((e=>e.id!==t)),this.toastRefs.delete(t),this.toastDismiss.emit({id:t}))}handleTransitionEnd(t){const e=(this.toasts||[]).find((e=>e.id===t));"exiting"===e?.state&&this.removeToast(t)}measureHeights(){let t=!1;const e=(this.toasts||[]).map((e=>{const s=this.toastRefs.get(e.id);if(s){const i=s.offsetHeight;if(i>0&&i!==e.height)return t=!0,{...e,height:i}}return e}));t&&(this.toasts=e)}componentDidRender(){void 0!==this.toasts&&0!==this.toasts.length&&(this.toasts.some((t=>"entering"===t.state))&&requestAnimationFrame((()=>{this.toasts=(this.toasts||[]).map((t=>"entering"===t.state?{...t,state:"visible"}:t))})),this.measureHeights())}disconnectedCallback(){this.toasts?.forEach((t=>{t.timerId&&clearTimeout(t.timerId)})),this.toastRefs.clear()}pauseTimers(){this.toasts=(this.toasts||[]).map((t=>t.timerId?(clearTimeout(t.timerId),{...t,timerId:void 0}):t))}resumeTimers(){const t=this.defaultDuration??n;t<=0||(this.toasts=(this.toasts||[]).map((e=>{if("visible"===e.state&&!e.timerId&&(e.options.duration??t)>0){const s=setTimeout((()=>this.startDismiss(e.id)),e.options.duration??t);return{...e,timerId:s}}return e})))}getContainerStyles(){const t=this.position||"bottom-center";return{position:"fixed",zIndex:(this.zIndex??999).toString(),pointerEvents:"none",...{"top-left":{top:"20px",left:"20px"},"top-center":{top:"20px",left:"50%",transform:"translateX(-50%)"},"top-right":{top:"20px",right:"20px"},"bottom-left":{bottom:"20px",left:"20px"},"bottom-center":{bottom:"20px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"20px",right:"20px"}}[t]}}getToastItemStyle(t,e,s){const i=this.position||"bottom-center",n=i.startsWith("bottom"),o=i.split("-")[1],r=n?"bottom":"top",a=[];"center"===o&&a.push("translateX(-50%)");const c={position:"absolute",[r]:"0",..."center"===o?{left:"50%"}:"right"===o?{right:"0"}:{left:"0"}};if("entering"===t.state)return a.push(`translateY(${n?20:-20}px)`),{...c,opacity:"0",transform:a.join(" "),transition:"none"};if("exiting"===t.state)return a.push(`translateY(${n?20:-20}px)`),{...c,opacity:"0",transform:a.join(" "),pointerEvents:"none"};if(this.expanded){let t=0;for(let i=0;i<e;i++)t+=(s[i].height||0)+8;return a.push("translateY(0) scale(1)"),{...c,[r]:`${t}px`,opacity:"1",transform:a.join(" "),zIndex:""+(s.length-e)}}const h=8*e,l=[1,.8,.6],m=e<l.length?l[e]:0;return a.push(`translateY(${n?-h:h}px) scale(${1-.05*e})`),{...c,opacity:m.toString(),transform:a.join(" "),transformOrigin:n?"bottom center":"top center",zIndex:""+(s.length-e)}}render(){const t=this.toasts||[],e=t.filter((t=>"exiting"!==t.state)).reverse(),s=new Map;return e.forEach(((t,e)=>s.set(t.id,e))),i("div",{key:"
|
|
1
|
+
import{r as t,c as e,a as s,h as i}from"./p-BZ5lcC25.js";const n=4e3;let o=0;const r=class{constructor(s){t(this,s),this.toastShow=e(this,"sdToastShow",7),this.toastDismiss=e(this,"sdToastDismiss",7)}get el(){return s(this)}position="bottom-center";maxVisible=3;defaultDuration=n;zIndex=999;toasts=[];expanded=!1;toastRefs=new Map;toastShow;toastDismiss;async create(t){const e="toast-"+ ++o,s={id:e,options:t,state:"entering"},i=t.duration??this.defaultDuration??n;i>0&&(s.timerId=setTimeout((()=>this.startDismiss(e)),i));let r=[...this.toasts||[],s];const a=r.filter((t=>"exiting"!==t.state));if(a.length>(this.maxVisible??3)){const t=new Set(a.slice(0,a.length-(this.maxVisible??3)).map((t=>t.id)));r=r.map((e=>t.has(e.id)&&"exiting"!==e.state?(e.timerId&&clearTimeout(e.timerId),this.scheduleRemoval(e.id),{...e,state:"exiting",timerId:void 0}):e))}return this.toasts=r,this.toastShow.emit({id:e}),e}async dismiss(t){this.startDismiss(t)}async dismissAll(){(this.toasts||[]).forEach((t=>this.startDismiss(t.id)))}startDismiss(t){const e=(this.toasts||[]).find((e=>e.id===t));e&&"exiting"!==e.state&&(e.timerId&&clearTimeout(e.timerId),this.toasts=(this.toasts||[]).map((e=>e.id===t?{...e,state:"exiting",timerId:void 0}:e)),this.scheduleRemoval(t))}scheduleRemoval(t){setTimeout((()=>this.removeToast(t)),500)}removeToast(t){(this.toasts||[]).find((e=>e.id===t))&&(this.toasts=(this.toasts||[]).filter((e=>e.id!==t)),this.toastRefs.delete(t),this.toastDismiss.emit({id:t}))}handleTransitionEnd(t){const e=(this.toasts||[]).find((e=>e.id===t));"exiting"===e?.state&&this.removeToast(t)}measureHeights(){let t=!1;const e=(this.toasts||[]).map((e=>{const s=this.toastRefs.get(e.id);if(s){const i=s.offsetHeight;if(i>0&&i!==e.height)return t=!0,{...e,height:i}}return e}));t&&(this.toasts=e)}componentDidRender(){void 0!==this.toasts&&0!==this.toasts.length&&(this.toasts.some((t=>"entering"===t.state))&&requestAnimationFrame((()=>{this.toasts=(this.toasts||[]).map((t=>"entering"===t.state?{...t,state:"visible"}:t))})),this.measureHeights())}disconnectedCallback(){this.toasts?.forEach((t=>{t.timerId&&clearTimeout(t.timerId)})),this.toastRefs.clear()}pauseTimers(){this.toasts=(this.toasts||[]).map((t=>t.timerId?(clearTimeout(t.timerId),{...t,timerId:void 0}):t))}resumeTimers(){const t=this.defaultDuration??n;t<=0||(this.toasts=(this.toasts||[]).map((e=>{if("visible"===e.state&&!e.timerId&&(e.options.duration??t)>0){const s=setTimeout((()=>this.startDismiss(e.id)),e.options.duration??t);return{...e,timerId:s}}return e})))}getContainerStyles(){const t=this.position||"bottom-center";return{position:"fixed",zIndex:(this.zIndex??999).toString(),pointerEvents:"none",...{"top-left":{top:"20px",left:"20px"},"top-center":{top:"20px",left:"50%",transform:"translateX(-50%)"},"top-right":{top:"20px",right:"20px"},"bottom-left":{bottom:"20px",left:"20px"},"bottom-center":{bottom:"20px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"20px",right:"20px"}}[t]}}getToastItemStyle(t,e,s){const i=this.position||"bottom-center",n=i.startsWith("bottom"),o=i.split("-")[1],r=n?"bottom":"top",a=[];"center"===o&&a.push("translateX(-50%)");const c={position:"absolute",[r]:"0",..."center"===o?{left:"50%"}:"right"===o?{right:"0"}:{left:"0"}};if("entering"===t.state)return a.push(`translateY(${n?20:-20}px)`),{...c,opacity:"0",transform:a.join(" "),transition:"none"};if("exiting"===t.state)return a.push(`translateY(${n?20:-20}px)`),{...c,opacity:"0",transform:a.join(" "),pointerEvents:"none"};if(this.expanded){let t=0;for(let i=0;i<e;i++)t+=(s[i].height||0)+8;return a.push("translateY(0) scale(1)"),{...c,[r]:`${t}px`,opacity:"1",transform:a.join(" "),zIndex:""+(s.length-e)}}const h=8*e,l=[1,.8,.6],m=e<l.length?l[e]:0;return a.push(`translateY(${n?-h:h}px) scale(${1-.05*e})`),{...c,opacity:m.toString(),transform:a.join(" "),transformOrigin:n?"bottom center":"top center",zIndex:""+(s.length-e)}}render(){const t=this.toasts||[],e=t.filter((t=>"exiting"!==t.state)).reverse(),s=new Map;return e.forEach(((t,e)=>s.set(t.id,e))),i("div",{key:"6a6db296cca6ee2b3f1f5ba1b2014f3787fd6ee0",class:"sd-toast-container",style:this.getContainerStyles(),onMouseEnter:()=>{this.expanded=!0,this.pauseTimers()},onMouseLeave:()=>{this.expanded=!1,this.resumeTimers()}},t.map((t=>{const n=s.get(t.id)??0;return i("div",{key:t.id,class:{"sd-toast-container__item":!0,"sd-toast-container__item--entering":"entering"===t.state,"sd-toast-container__item--visible":"visible"===t.state,"sd-toast-container__item--exiting":"exiting"===t.state},style:this.getToastItemStyle(t,n,e),ref:e=>{e&&this.toastRefs.set(t.id,e)},onTransitionEnd:()=>this.handleTransitionEnd(t.id)},i("sd-toast",{message:t.options.message,type:t.options.type||"default",icon:t.options.icon,link:t.options.link,linkLabel:t.options.linkLabel,buttonLabel:t.options.buttonLabel,useClose:t.options.useClose,onSdClose:()=>this.startDismiss(t.id),onSdButtonClick:e=>t.options.onButtonClick?.(e.detail)}))})))}};r.style='sd-toast-container{display:block}sd-toast-container .sd-toast-container__item{pointer-events:auto;transition:transform 0.4s ease, opacity 0.4s ease, bottom 0.4s ease, top 0.4s ease}sd-toast-container .sd-toast-container__item::before{content:"";position:absolute;left:0;right:0;top:-8px;bottom:-8px}sd-toast-container .sd-toast-container__item--entering{transition:none}sd-toast-container .sd-toast-container__item--exiting{pointer-events:none}';export{r as sd_toast_container}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as s}from"./p-BZ5lcC25.js";import{g as i,i as l,h as c,j as d,k as
|
|
1
|
+
import{r as e,c as t,h as s}from"./p-BZ5lcC25.js";import{g as i,i as l,h as c,j as d,k as r}from"./p-CAFz8W8_.js";import{s as a}from"./p-BE4tnQ2Z.js";import"./p-U8VaRj9c.js";const o=class{constructor(s){e(this,s),this.listItemClick=t(this,"sdListItemClick",7)}option;depth=1;isSelected=!1;isFocused=!1;useCheckbox=!1;countInfo;listItemClick;get isGroup(){return!!this.option.children}get isSelectable(){return!this.isGroup||this.useCheckbox}get depthKey(){return this.depth<=1?"depth1":2===this.depth?"depth2":"depth3"}get paddingLeft(){return`${i.paddingLeft[this.depthKey]}px`}handleClick=e=>{e.stopPropagation(),!this.option.disabled&&this.isSelectable&&this.listItemClick.emit(this.option)};handleCheckboxClick=e=>{e.stopPropagation()};handleCheckboxUpdate=e=>{e.stopPropagation(),!this.option.disabled&&this.isSelectable&&this.listItemClick.emit(this.option)};render(){const e=this.isGroup,t=e&&1===this.depth,r=e&&2===this.depth,o={"--list-item-padding-y":`${i.paddingY}px`,"--list-item-padding-left":this.paddingLeft,"--list-item-padding-right":`${i.paddingRight}px`,"--list-item-gap":`${i.gap}px`,"--list-item-font-size":`${c.fontSize}px`,"--list-item-line-height":`${c.lineHeight}px`,"--list-item-font-weight":c.fontWeight,"--list-item-bg":t?d.depth1.bg:r?d.depth2.bg:d.bg.default,"--list-item-bg-hover":d.bg.hover,"--list-item-color":d.content.default,"--list-item-color-hover":d.content.hover,"--list-item-color-disabled":d.content.disabled,"--list-item-color-selected":d.content.selected,"--list-item-font-weight-selected":c.selectedFontWeight};return t&&(o["--list-item-border-top"]=`${d.depth1.borderWidth}px solid ${d.depth1.border}`),s("div",{key:"2bec32f64859ef0e39928d4288cba3c727e16cf1",role:"option",tabindex:-1,"aria-selected":!0===this.isSelected?"true":"false",class:{"sd-select-list-item":!0,"sd-select-list-item--group":e,"sd-select-list-item--depth1-group":t,"sd-select-list-item--depth2-group":r,"sd-select-list-item--selected":!0===this.isSelected,"sd-select-list-item--indeterminate":null===this.isSelected,"sd-select-list-item--focused":this.isFocused,"sd-select-list-item--selectable":this.isSelectable&&!this.option.disabled,"sd-select-list-item--disabled":!!this.option.disabled},style:o,onClick:this.handleClick},this.useCheckbox&&s("sd-checkbox",{key:"fb6d2ed50e6d24d0491200b5be2cb3ab97df1b04",value:null===this.isSelected?null:!!this.isSelected,disabled:this.option.disabled,inverse:this.isFocused&&!1!==this.isSelected,class:"sd-select-list-item__checkbox",onClick:this.handleCheckboxClick,onSdUpdate:this.handleCheckboxUpdate}),l(this.option.label)?s("span",{class:"sd-select-list-item__label",ref:e=>e&&(e.innerHTML=a(this.option.label))}):s("span",{class:"sd-select-list-item__label"},this.option.label),this.countInfo&&s("span",{key:"52162297e94d672128ea0a2343c6baf6e04ee78c",class:"sd-select-list-item__count"},"(",this.countInfo.selected,"/",this.countInfo.total,")"))}};o.style="sd-select-list-item{display:block}sd-select-list-item .sd-select-list-item{display:flex;align-items:center;gap:var(--list-item-gap);padding:var(--list-item-padding-y) var(--list-item-padding-right) var(--list-item-padding-y) var(--list-item-padding-left);font-size:var(--list-item-font-size);line-height:var(--list-item-line-height);font-weight:var(--list-item-font-weight);background:var(--list-item-bg);color:var(--list-item-color);cursor:default;user-select:none}sd-select-list-item .sd-select-list-item--selectable{cursor:pointer}sd-select-list-item .sd-select-list-item--depth1-group{border-top:var(--list-item-border-top);font-weight:700}sd-select-list-item .sd-select-list-item--depth2-group{font-weight:500}sd-select-list-item .sd-select-list-item--focused.sd-select-list-item--selectable:not(.sd-select-list-item--disabled){background:var(--list-item-bg-hover);color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--selected:not(.sd-select-list-item--group){font-weight:var(--list-item-font-weight-selected);color:var(--list-item-color-selected)}sd-select-list-item .sd-select-list-item--selected.sd-select-list-item--focused{color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--disabled{color:var(--list-item-color-disabled);cursor:not-allowed}sd-select-list-item .sd-select-list-item__label{flex:0 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-list-item .sd-select-list-item__count{flex-shrink:0;font-weight:500;color:var(--list-item-color-disabled)}sd-select-list-item .sd-select-list-item--group.sd-select-list-item--focused .sd-select-list-item__count{color:#ffffff}sd-select-list-item .sd-select-list-item__checkbox{flex-shrink:0}";const h=class{constructor(s){e(this,s),this.searchFilter=t(this,"sdSearchFilter",7),this.searchFocus=t(this,"sdSearchFocus",7)}isScrolled=!1;searchText="";searchFilter;searchFocus;inputEl;debounceTimer;focusRafId;componentDidLoad(){requestAnimationFrame((()=>{this.focusRafId=requestAnimationFrame((()=>{this.inputEl?.focus()}))}))}async sdFocus(){this.inputEl?.focus()}handleInput=e=>{this.searchText=e.target.value,this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>{this.searchFilter.emit(this.searchText)}),r)};handleClear=e=>{e.stopPropagation(),this.searchText="",this.debounceTimer&&clearTimeout(this.debounceTimer),this.searchFilter.emit(""),this.inputEl?.focus()};disconnectedCallback(){void 0!==this.focusRafId&&cancelAnimationFrame(this.focusRafId),void 0!==this.debounceTimer&&clearTimeout(this.debounceTimer)}render(){return s("div",{key:"4b0eefc35e86aa2f320ce9410185b64323d60e45",class:{"sd-select-list-item-search":!0,"sd-select-list-item-search--scrolled":this.isScrolled}},s("div",{key:"b724cb790c3f8d5eb2ecb899c28dbddf9acad631",class:"sd-select-list-item-search__inner"},s("sd-icon",{key:"18ba78adbc46e9cc0f3a4e355996dba25fc1c8e9",name:"search",size:16,color:"grey_70",class:"sd-select-list-item-search__icon"}),s("input",{key:"c2a2df9bc2dfe692b1f5732706ce1208a005aab4",ref:e=>{this.inputEl=e},type:"text",class:"sd-select-list-item-search__input",placeholder:"검색어 입력",value:this.searchText,onInput:this.handleInput,onFocus:()=>this.searchFocus.emit()}),s("button",{key:"7d9d3e924a24ddecbeb4bf5316c2c791913ac782",type:"button",class:{"sd-select-list-item-search__clear":!0,"sd-select-list-item-search__clear--hidden":""===this.searchText},onClick:this.handleClear,tabindex:""!==this.searchText?0:-1,"aria-hidden":""!==this.searchText?"false":"true"},s("sd-icon",{key:"80d52b79d989e51513653655adf6604f352c43b0",name:"close",size:12,color:"#888888"}))))}};h.style="sd-select-list-item-search{display:block}sd-select-list-item-search .sd-select-list-item-search{padding:4px 8px;position:sticky;top:0;z-index:1;background:white}sd-select-list-item-search .sd-select-list-item-search--scrolled{box-shadow:0 2px 4px rgba(0, 0, 0, 0.08)}sd-select-list-item-search .sd-select-list-item-search__inner{display:flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid #cccccc;border-radius:4px;background:white}sd-select-list-item-search .sd-select-list-item-search__inner:focus-within{border-color:#0075ff}sd-select-list-item-search .sd-select-list-item-search__icon{flex-shrink:0}sd-select-list-item-search .sd-select-list-item-search__input{flex:1;border:none;outline:none;font-size:12px;line-height:20px;color:#222222;background:transparent;min-width:0}sd-select-list-item-search .sd-select-list-item-search__input::placeholder{color:#aaaaaa}sd-select-list-item-search .sd-select-list-item-search__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:2px;border:none;background:transparent;cursor:pointer;border-radius:2px}sd-select-list-item-search .sd-select-list-item-search__clear:hover{background:#f0f0f0}sd-select-list-item-search .sd-select-list-item-search__clear--hidden{visibility:hidden;pointer-events:none}";export{o as sd_select_list_item,h as sd_select_list_item_search}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,h as e}from"./p-BZ5lcC25.js";const n=class{constructor(e){i(this,e)}visible=!1;message="";async show(i={}){this.message=i.message??"",this.visible=!0}async hide(){this.visible=!1}render(){return e("div",{key:"
|
|
1
|
+
import{r as i,h as e}from"./p-BZ5lcC25.js";const n=class{constructor(e){i(this,e)}visible=!1;message="";async show(i={}){this.message=i.message??"",this.visible=!0}async hide(){this.visible=!1}render(){return e("div",{key:"19729567b6041e3220c11c569be814f51b31c388",class:{"sd-loading-container":!0,"sd-loading-container--visible":this.visible},"aria-hidden":this.visible?"false":"true"},e("div",{key:"50e6ac53e4515dc305e7a840362f2beb30714674",class:"sd-loading-container__backdrop"}),e("div",{key:"2f0943599188cb0800139f5ab543bab679f3bfee",class:"sd-loading-container__content"},e("sd-circle-progress",{key:"a5977418272a167fe76073734be5a36ffa3136ab",indeterminate:!0,type:"inverse"}),this.message&&e("p",{key:"9285adc663909fafb762e84ad5dd108c6ba2c972",class:"sd-loading-container__message"},this.message)))}};n.style="sd-loading-container .sd-loading-container{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:var(--sd-loading-container-z-index, 999);opacity:0;visibility:hidden;transition:opacity 0.2s ease, visibility 0s linear 0.2s;pointer-events:none}sd-loading-container .sd-loading-container--visible{opacity:1;visibility:visible;transition:opacity 0.2s ease, visibility 0s linear 0s;pointer-events:auto}sd-loading-container .sd-loading-container__backdrop{position:absolute;inset:0;background:rgba(0, 0, 0, 0.4)}sd-loading-container .sd-loading-container__content{position:relative;display:flex;flex-direction:column;align-items:center;gap:16px}sd-loading-container .sd-loading-container__message{margin:0;color:#ffffff;font-size:14px;font-weight:500;line-height:22px;text-align:center;max-width:400px;word-break:keep-all}";export{n as sd_loading_container}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,a as i,h as s}from"./p-BZ5lcC25.js";var n={size:"16",icon:"12"},o={size:"24",icon:"16"},a={size:"28",icon:"20"},r={size:"36",icon:"24"},h={size:"62",icon:"32"},d={sm:"4",md:"6"},c={opacity:"5%"},l={disabled:"#BBBBBB"},g={content:"#888888",hover:{bg:"#222222"}},u={content:"#E30000",hover:{bg:"#E30000"}},b={content:"#025497",hover:{bg:"#0075FF"}},p={content:"#FFFFFF",disabled:"#E1E1E1",hover:{bg:"#FFFFFF"}};const f={xxs:{size:Number(n.size),icon:Number(n.icon)},xs:{size:Number(o.size),icon:Number(o.icon)},sm:{size:Number(a.size),icon:Number(a.icon)},md:{size:Number(r.size),icon:Number(r.icon)},lg:{size:Number(h.size),icon:Number(h.icon)}},m={xxs:Number(d.sm),xs:Number(d.sm),sm:Number(d.sm),md:Number(d.md),lg:Number(d.md)},x=c.opacity,v={default:g.content,danger:u.content,action:b.content,inverse:p.content},y={default:g.hover.bg,danger:u.hover.bg,action:b.hover.bg,inverse:p.hover.bg},F=l.disabled,z={default:F,danger:F,action:F,inverse:p.disabled},w=class{constructor(i){t(this,i),this.click=e(this,"sdClick",7)}icon;size="sm";intent="default";ariaLabel="";tooltipText;disabled=!1;get hostEl(){return i(this)}isTooltipOpen=!1;click;hasWarnedMissingAriaLabel=!1;componentWillLoad(){this.size??="sm",this.intent??="default",this.ariaLabel??=""}handleClick=t=>{this.disabled?t.preventDefault():this.click.emit(t)};handleMouseEnter=()=>{this.isTooltipOpen=!0};handleMouseLeave=()=>{this.isTooltipOpen=!1};handleFocus=()=>{this.isTooltipOpen=!0};handleBlur=()=>{this.isTooltipOpen=!1};componentWillRender(){this.warnIfMissingAriaLabel()}warnIfMissingAriaLabel(){""===(this.ariaLabel??"").trim()?this.hasWarnedMissingAriaLabel||(console.warn(`[sd-ghost-button] icon-only buttons require \`ariaLabel\`. Received icon="${this.icon}".`),this.hasWarnedMissingAriaLabel=!0):this.hasWarnedMissingAriaLabel=!1}render(){const t=this.size??"sm",e=this.intent??"default",i=f[t]??f.sm,n=this.disabled?z[e]:v[e],o=(this.ariaLabel??"").trim()||void 0,a=(this.tooltipText??"").trim();return s("button",{key:"9d2d352d36c7c34c67d8c57de6236d72727bd078",class:{"sd-ghost-button":!0,"sd-ghost-button--disabled":this.disabled},type:"button","aria-disabled":this.disabled?"true":void 0,tabIndex:this.disabled?-1:void 0,"aria-label":o,style:{"--sd-ghost-button-size":`${i.size}px`,"--sd-ghost-button-radius":`${m[t]}px`,"--sd-ghost-button-hover-bg":y[e],"--sd-ghost-button-hover-opacity":x,"--sd-ghost-button-accent":"#0075FF"},onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur},a.length>0&&this.isTooltipOpen&&s("sd-portal",{key:"1a73fb53be28a622d03e4f20be0b30e0e76bccd4",parentRef:this.hostEl,open:!0,offset:[i.size/2,4],placement:"top"},s("div",{key:"e4a349dbfbf2fd16eed9a46f5e2ed43935212cfe",class:"sd-ghost-button__tooltip-inner","aria-hidden":"true"},s("sd-tag",{key:"4aa1525a6da6ee72daf1815f1440d665bd1cf2c8",name:"square_xs_grey",label:a}))),s("sd-icon",{key:"4caac22d0d888c1998032697043e3a3761e012aa",name:this.icon,size:i.icon,color:n}))}};w.style='sd-ghost-button{display:inline-flex;width:fit-content;height:fit-content}.sd-ghost-button{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--sd-ghost-button-size);height:var(--sd-ghost-button-size);padding:0;border:none;border-radius:var(--sd-ghost-button-radius);background:transparent;cursor:pointer;box-sizing:border-box;transition:box-shadow 0.2s ease;-webkit-user-select:none;user-select:none}.sd-ghost-button::before{content:"";position:absolute;inset:0;border-radius:inherit;background:var(--sd-ghost-button-hover-bg);opacity:0;transition:opacity 0.2s ease;pointer-events:none}.sd-ghost-button:hover:not(.sd-ghost-button--disabled)::before{opacity:var(--sd-ghost-button-hover-opacity)}.sd-ghost-button:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-ghost-button-accent)}.sd-ghost-button--disabled{cursor:not-allowed}.sd-ghost-button__tooltip-inner{display:inline-flex;white-space:nowrap;transform:translateX(-50%)}[data-align=right] .sd-ghost-button__tooltip-inner{transform:none}';const k=class{constructor(i){t(this,i),this.close=e(this,"sdClose",3)}get hostEl(){return i(this)}to="body";parentRef=null;offset=[0,4];viewportPadding=0;zIndex=996;open=!1;placement="bottom";close;container;wrapper;rafId;isInsideClick=!1;closeTransitionTimer;handleObservedScroll=()=>this.updatePosition();resizeObserver;mutationObserver;scrollParents=[];isObserved=!1;handleOpenChange(){this.syncPortalState()}componentDidLoad(){this.container=this.resolveContainer(),this.syncPortalState()}componentDidRender(){this.syncPortalState()}disconnectedCallback(){if(this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.unobserveParent(),this.wrapper?.parentNode)try{this.wrapper.parentNode.removeChild(this.wrapper)}catch{}}resolveContainer(){const t="string"==typeof this.to?document.querySelector(this.to):this.to;return t instanceof HTMLElement?t:document.body}resolveZIndex(){const t=this.zIndex??996,e=this.parentRef?.closest(".sd-modal-container__layer");if(!e)return t;const i=e.closest(".sd-modal-container"),s=i instanceof HTMLElement?parseInt(getComputedStyle(i).zIndex,10):NaN,n=Number.isFinite(s)?s:997;return Math.max(t,n+1)}createWrapper(){this.wrapper=document.createElement("div"),Object.assign(this.wrapper.style,{position:"fixed",top:"0",left:"0",zIndex:this.resolveZIndex().toString(),opacity:"0",transition:"opacity 0.15s ease-out",boxSizing:"border-box",visibility:"hidden"}),this.container.appendChild(this.wrapper)}ensureWrapper(){this.wrapper||(this.container||=this.resolveContainer(),this.createWrapper(),this.moveSlotContent())}syncPortalState(){if(!this.open)return this.wrapper&&(this.wrapper.style.transition="opacity 0.15s ease-out",this.wrapper.style.opacity="0",this.wrapper.style.pointerEvents="none",this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.closeTransitionTimer=setTimeout((()=>{this.wrapper&&!this.open&&(this.wrapper.style.display="none")}),150)),void this.unobserveParent();this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.ensureWrapper(),this.wrapper&&(this.wrapper.style.display="block",this.wrapper.style.transition="opacity 0.25s ease-out",this.wrapper.style.opacity="0",this.wrapper.style.pointerEvents="",this.observeParent(),this.updatePosition())}moveSlotContent(){this.wrapper&&Array.from(this.hostEl.childNodes).filter((t=>t.nodeType!==Node.COMMENT_NODE)).forEach((t=>this.wrapper.appendChild(t)))}updatePosition(){void 0!==this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{if(!this.parentRef||!this.wrapper)return;const t=this.parentRef.getBoundingClientRect(),e=window.innerWidth,i=window.innerHeight,s=this.offset??[0,4],n=Math.max(0,this.viewportPadding??0),o=Math.max(e-2*n,0),a=Math.max(i-2*n,0);this.wrapper.style.maxWidth=`${o}px`,this.wrapper.style.maxHeight=`${a}px`;const r=this.wrapper.getBoundingClientRect(),h=i-t.bottom-s[1]-n,d=t.top-s[1]-n;let c,l=t.left+s[0];"top"===(this.placement??"bottom")?(c=t.top-r.height-s[1],d<r.height&&h>d&&(c=t.bottom+s[1])):(c=t.bottom+s[1],h<r.height&&d>h&&(c=t.top-r.height-s[1]));const g=i-n-r.height;c=g<n?n:Math.min(Math.max(c,n),g);const u=l+r.width>e-n,b=n,p=e-n-r.width;this.wrapper.style.top=`${c}px`,p<b?(this.wrapper.style.left=`${b}px`,this.wrapper.style.right="auto",delete this.wrapper.dataset.align):u?(this.wrapper.style.left="auto",this.wrapper.style.right=e-t.right+"px",this.wrapper.dataset.align="right"):(this.wrapper.style.right="auto",delete this.wrapper.dataset.align,l=Math.min(Math.max(l,b),p),this.wrapper.style.left=`${l}px`),this.wrapper.style.visibility="visible",this.wrapper.style.opacity="1"}))}observeParent(){this.parentRef&&!this.isObserved&&(this.observeScrollParents(this.parentRef),"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>this.updatePosition())),this.resizeObserver.observe(this.parentRef)),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((()=>this.updatePosition())),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0})),this.isObserved=!0)}unobserveParent(){this.isObserved&&(this.unobserveScrollParents(),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.mutationObserver?.disconnect(),this.mutationObserver=void 0,this.isObserved=!1)}observeScrollParents(t){const e=this.getScrollParents(t);e.forEach((t=>{t.addEventListener("scroll",this.handleObservedScroll,{passive:!0})})),this.scrollParents=e}unobserveScrollParents(){this.scrollParents.forEach((t=>{t.removeEventListener("scroll",this.handleObservedScroll)})),this.scrollParents=[]}getScrollParents(t){const e=[];let i=t.parentElement;for(;i;){const{overflow:t,overflowX:s,overflowY:n}=getComputedStyle(i);[t,s,n].some((t=>/(auto|scroll|overlay)/.test(t)))&&e.push(i),i=i.parentElement}return e}isInsideTarget(t){return!(!this.wrapper?.contains(t)&&!this.parentRef?.contains(t))}handleMouseDown(t){this.open&&(this.isInsideClick=this.isInsideTarget(t.target))}handleWindowClick(t){this.open&&(this.isInsideClick?this.isInsideClick=!1:this.isInsideTarget(t.target)||this.close.emit())}render(){return s("slot",{key:"0b01050e7c1ab2b648bf1118aec27140ff1aed4c"})}static get watchers(){return{open:[{handleOpenChange:0}]}}};k.style=":host { display: none !important; }";var $={height:"20",paddingX:"8",gap:"4",typography:{fontSize:"11",fontWeight:"500",lineHeight:"18"},radius:"6"},E={height:"24",paddingX:"8",gap:"4",typography:{fontSize:"12",fontWeight:"700",lineHeight:"20"},radius:"6"},_={height:"28",paddingX:"12",gap:"6",typography:{fontSize:"14",fontWeight:"700",lineHeight:"24"},radius:"8"},N={content:"#FB4444",bg:"#FCEFEF"},C={content:"#FF6B00",bg:"#FEF1EA"},M={content:"#916C0D",bg:"#FFF7DD"},S={content:"#00973C",bg:"#E8F9EF"},O={content:"#0075FF",bg:"#E6F1FF"},L={content:"#006AC1",bg:"#EAF5FE"},W={content:"#004290",bg:"#EFF6FF"},B={content:"#737373",bg:"#EEEEEE"};const I=["xs","sm","md"],T=["grey","red","orange","yellow","green","blue","darkblue","indigo"],P={grey:{background:B.bg,content:B.content,icon:B.content},red:{background:N.bg,content:N.content,icon:N.content},orange:{background:C.bg,content:C.content,icon:C.content},yellow:{background:M.bg,content:M.content,icon:M.content},green:{background:S.bg,content:S.content,icon:S.content},blue:{background:O.bg,content:O.content,icon:O.content},darkblue:{background:L.bg,content:L.content,icon:L.content},indigo:{background:W.bg,content:W.content,icon:W.content}},j={xs:{height:`${$.height}px`,paddingX:`${$.paddingX}px`,gap:`${$.gap}px`,fontSize:`${$.typography.fontSize}px`,fontWeight:$.typography.fontWeight,lineHeight:`${$.typography.lineHeight}px`,iconSize:12,radius:`${$.radius}px`},sm:{height:`${E.height}px`,paddingX:`${E.paddingX}px`,gap:`${E.gap}px`,fontSize:`${E.typography.fontSize}px`,fontWeight:E.typography.fontWeight,lineHeight:`${E.typography.lineHeight}px`,iconSize:16,radius:`${E.radius}px`},md:{height:`${_.height}px`,paddingX:`${_.paddingX}px`,gap:`${_.gap}px`,fontSize:`${_.typography.fontSize}px`,fontWeight:_.typography.fontWeight,lineHeight:`${_.typography.lineHeight}px`,iconSize:16,radius:`${_.radius}px`}},A={xs:{...j.xs,radius:"999px"},sm:{...j.sm,radius:"999px"},md:{...j.md,radius:"999px"}},H=Object.fromEntries(["square","pill"].flatMap((t=>I.flatMap((e=>T.map((i=>[`${t}_${e}_${i}`,{shape:t,size:e,color:i,..."square"===t?j[e]:A[e],...P[i]}]))))))),X=class{constructor(e){t(this,e)}name="square_sm_grey";label="";icon;isLeft=!0;componentWillLoad(){this.name=this.name??"square_sm_grey"}get resolvedName(){if(!Object.prototype.hasOwnProperty.call(H,this.name))throw new Error(`Invalid sd-tag name: "${this.name}"`);return this.name}get resolvedConfig(){return H[this.resolvedName]}renderIcon(t,e){return null==this.icon?null:s("sd-icon",{class:"sd-tag__icon",name:this.icon,size:e,color:t})}render(){const t=this.resolvedConfig,e=this.renderIcon(t.icon,t.iconSize);return s("span",{key:"6cbf6fb37f0e926e604b24d482c8d648079b41dd",class:"sd-tag",style:{"--sd-tag-background":t.background,"--sd-tag-content":t.content,"--sd-tag-height":t.height,"--sd-tag-padding-x":t.paddingX,"--sd-tag-gap":t.gap,"--sd-tag-font-size":t.fontSize,"--sd-tag-font-weight":t.fontWeight,"--sd-tag-line-height":t.lineHeight,"--sd-tag-radius":t.radius},"aria-label":this.label||"tag"},this.icon&&this.isLeft&&e,s("span",{key:"e0e9410afe716341dc7fb7891bb46c85cde9d51b",class:"sd-tag__label"},this.label),this.icon&&!this.isLeft&&e)}};X.style="sd-tag{display:inline-flex;width:fit-content;height:fit-content}.sd-tag{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-tag-gap, 5px);min-height:var(--sd-tag-height, 24px);padding:0 var(--sd-tag-padding-x, 8px);border-radius:var(--sd-tag-radius, 4px);background:var(--sd-tag-background, #f3f3f3);color:var(--sd-tag-content, #7a7a7a);box-sizing:border-box;white-space:nowrap;-webkit-user-select:none;user-select:none}.sd-tag__icon{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center}.sd-tag__label{display:inline-flex;align-items:center;justify-content:center;min-width:0;font-size:var(--sd-tag-font-size, 12px);font-weight:var(--sd-tag-font-weight, 700);line-height:var(--sd-tag-line-height, 20px)}";export{w as sd_ghost_button,k as sd_portal,X as sd_tag}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as e}from"./p-BZ5lcC25.js";var a={bg:"#07284A",content:"#FFFFFF"},o={bg:"#FB4444",content:"#FFFFFF"},n={bg:"#FFC700",content:"#222222"},i={bg:"#00973C",content:"#FFFFFF"},d={bg:"#005CC9",content:"#FFFFFF"},c={bg:"#E6F1FF",icon:"#0075FF",text:"#222222",textLink:"#555555"};const l={default:"secondary_sm",danger:"danger_outline_sm",caution:"neutral_outline_sm",complete:"neutral_outline_sm",accent:"neutral_outline_sm",info:"secondary_sm"},r={default:{bg:a.bg,content:a.content},danger:{bg:o.bg,content:o.content},caution:{bg:n.bg,content:n.content},complete:{bg:i.bg,content:i.content},accent:{bg:d.bg,content:d.content},info:{bg:c.bg,content:c.text,icon:c.icon,linkColor:c.textLink}},
|
|
1
|
+
import{r as t,c as s,h as e}from"./p-BZ5lcC25.js";var a={bg:"#07284A",content:"#FFFFFF"},o={bg:"#FB4444",content:"#FFFFFF"},n={bg:"#FFC700",content:"#222222"},i={bg:"#00973C",content:"#FFFFFF"},d={bg:"#005CC9",content:"#FFFFFF"},c={bg:"#E6F1FF",icon:"#0075FF",text:"#222222",textLink:"#555555"};const l={default:"secondary_sm",danger:"danger_outline_sm",caution:"neutral_outline_sm",complete:"neutral_outline_sm",accent:"neutral_outline_sm",info:"secondary_sm"},r={default:{bg:a.bg,content:a.content},danger:{bg:o.bg,content:o.content},caution:{bg:n.bg,content:n.content},complete:{bg:i.bg,content:i.content},accent:{bg:d.bg,content:d.content},info:{bg:c.bg,content:c.text,icon:c.icon,linkColor:c.textLink}},b={iconSize:"16"},f=class{constructor(e){t(this,e),this.close=s(this,"sdClose",7),this.buttonClick=s(this,"sdButtonClick",7)}icon;message;link;linkLabel;buttonLabel;useClose=!1;type="default";close;buttonClick;render(){const t=r[this.type]??r.default,s=Number(b.iconSize),a=t.icon??t.content,o=t.linkColor??t.content,n=["default","caution","info"].includes(this.type),i=l[this.type]??l.default;return e("div",{key:"240ed7553fa03d18bb4384b1192d16a821be5832",style:{"--sd-toast-bg":t.bg,"--sd-toast-text":t.content,"--sd-toast-icon":a,"--sd-toast-link":o}},e("div",{key:"bdb9a45473dcab86e2dd8bb6321e7b717f93b784",class:"sd-toast",role:"status","aria-live":"polite","aria-atomic":"true"},this.icon&&e("div",{key:"2a02e47336cd6a46c7cc3560f3f82d4f10a3d211",class:"sd-toast__icon"},e("sd-icon",{key:"872cfb213c3a080fc1e5458ce53efa04c1fa8840",name:this.icon,size:s,color:a})),e("div",{key:"3a22f7518f63676e22c4faeb76873c31d6cf6b11",class:"sd-toast__content"},e("span",{key:"dd6a533b60c07bdcbdc80090d61bdf29b8879609",class:"sd-toast__message"},this.message)),this.link&&e("a",{key:"45efddf62b906e8f0b2136ad3d1131204d0b9125",href:this.link,class:"sd-toast__link",target:"_blank",rel:"noopener noreferrer"},this.linkLabel||this.link),this.buttonLabel&&e("sd-button",{key:"3729f4f21ba7e59c2702137053de946e284b226a",class:"sd-toast__button",name:i,label:this.buttonLabel,onSdClick:t=>this.buttonClick.emit(t.detail)}),this.useClose&&e("sd-ghost-button",{key:"d7f0f670aef527be6253cd70bd2b19a900ccaddd",class:"sd-toast__close",icon:"close",intent:n?"default":"inverse",ariaLabel:"close",size:"xs",onClick:()=>this.close.emit()})))}};f.style="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}";export{f as sd_toast}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,a as i,h as n}from"./p-BZ5lcC25.js";var o={textLink:{sm:{gap:"4",icon:"16",typography:{default:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",textDecoration:"none",lineHeight:"20"},underline:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",textDecoration:"underline",lineHeight:"20"}}},md:{gap:"8",icon:"16",typography:{default:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"14",fontWeight:"500",textDecoration:"none",lineHeight:"24"},underline:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"14",fontWeight:"500",textDecoration:"underline",lineHeight:"24"}}},content:{disabled:"#888888"},icon:{default:"#006AC1",disabled:"#BBBBBB"},lg:{typography:{default:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"16",fontWeight:"500",textDecoration:"none",lineHeight:"26"},underline:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"16",fontWeight:"500",textDecoration:"underline",lineHeight:"26"}},gap:"8",icon:"20"}}};const s={sm:{gap:Number(o.textLink.sm.gap),iconSize:Number(o.textLink.sm.icon),typography:{default:o.textLink.sm.typography.default,underline:o.textLink.sm.typography.underline}},md:{gap:Number(o.textLink.md.gap),iconSize:Number(o.textLink.md.icon),typography:{default:o.textLink.md.typography.default,underline:o.textLink.md.typography.underline}},lg:{gap:Number(o.textLink.lg.gap),iconSize:Number(o.textLink.lg.icon),typography:{default:o.textLink.lg.typography.default,underline:o.textLink.lg.typography.underline}}},a={content:o.textLink.content,icon:o.textLink.icon},l=class{constructor(i){e(this,i),this.click=t(this,"sdClick",7)}label="";icon="";iconColor="";labelClass="";rightArrow="none";underline=!1;disabled=!1;size="sm";tooltipText;get hostEl(){return i(this)}isTooltipOpen=!1;click;handleClick=()=>{this.disabled||this.click.emit()};handleMouseEnter=()=>{this.isTooltipOpen=!0};handleMouseLeave=()=>{this.isTooltipOpen=!1};handleFocus=()=>{this.isTooltipOpen=!0};handleBlur=()=>{this.isTooltipOpen=!1};render(){const e=s[this.size]??s.sm,t=this.underline?e.typography.underline:e.typography.default,i=["sd-text-link__label",this.labelClass].filter(Boolean).join(" "),o=this.disabled?a.icon.disabled:this.iconColor||a.icon.default,l=this.disabled?a.icon.disabled:"#888888",r={"--sd-text-link-gap":`${e.gap}px`,"--sd-text-link-font-size":`${t.fontSize}px`,"--sd-text-link-line-height":`${t.lineHeight}px`,"--sd-text-link-text-decoration":t.textDecoration,...this.disabled?{"--sd-text-link-color":a.content.disabled}:{}},d=(this.tooltipText??"").trim();return n("span",{key:"d9653ed47a77fb5c00dc57f8f7cc2b4dc9035ca4",role:"button",tabindex:this.disabled?-1:0,class:{"sd-text-link":!0,"sd-text-link--disabled":this.disabled},style:r,onClick:this.handleClick,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())},onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur},d.length>0&&this.isTooltipOpen&&n("sd-portal",{key:"62b3cb48c5b5fa6eb0b2b2962ef6c78bac5ac545",parentRef:this.hostEl,open:!0,offset:[this.hostEl.offsetWidth/2,4],placement:"top"},n("div",{key:"5a428366f5bc2f8686a78fc73d91517ccca13eb9",class:"sd-text-link__tooltip-inner","aria-hidden":"true"},n("sd-tag",{key:"3416662595e9bfd164279e684e2ead9d1575a9d8",name:"square_xs_grey",label:d}))),this.icon&&n("sd-icon",{key:"5056f0c55ebe92963e856f2970cfd74143876cfb",name:this.icon,size:e.iconSize,color:o,class:"sd-text-link__icon"}),n("span",{key:"6cf8474ba642c9ec3dc5952c5530f9ba15046053",class:i},this.label),this.rightArrow&&"none"!==this.rightArrow&&n("span",{key:"17a74ec3a3e1a26f18b73f7d4816ea0aee0cb22c",class:"sd-text-link__arrow",style:{width:"16px",height:"16px",display:"inline-flex",alignItems:"center",justifyContent:"center"}},n("sd-icon",{key:"ed0a6bf8b678a93fa8a0da907efb0cbf60427738",name:"chevron"===this.rightArrow?"chevronRight":"caretRight",size:12,color:l})))}};l.style="sd-text-link{display:inline-flex}sd-text-link .sd-text-link{position:relative;display:inline-flex;align-items:center;gap:var(--sd-text-link-gap);cursor:pointer;user-select:none}sd-text-link .sd-text-link__label{font-size:var(--sd-text-link-font-size, 12px);line-height:var(--sd-text-link-line-height, 20px);text-decoration:var(--sd-text-link-text-decoration);color:var(--sd-text-link-color, inherit)}sd-text-link .sd-text-link:not(.sd-text-link--disabled):hover .sd-text-link__label{text-decoration:underline}sd-text-link .sd-text-link--disabled{cursor:not-allowed}sd-text-link .sd-text-link sd-portal{position:absolute;width:0;height:0;overflow:hidden}.sd-text-link__tooltip-inner{display:inline-flex;white-space:nowrap;transform:translateX(-50%)}[data-align=right] .sd-text-link__tooltip-inner{transform:none}";export{l as sd_text_link}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,F as s,a as o,H as a}from"./p-BZ5lcC25.js";import{T as n}from"./p-sZMi_32I.js";import{a as r,r as h,e as l,c as d,f as c,g as p,h as g,i as b,T as f,j as u,b as y}from"./p-Cmg10jpN.js";import"./p-D6GUzecR.js";import"./p-BJfiMC9H.js";var v={default:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",lineHeight:"20"},selected:{fontWeight:"700"}},x={bg:{hover:"#EEEEEE",selected:"#E6F1FF"},content:{default:"#555555",hover:"#004290",selected:"#004290"}};const _={height:`${"24"}px`,paddingX:`${"6"}px`,radius:`${"6"}px`,gap:`${"12"}px`,moveGap:`${{gap:"4"}.gap}px`,iconSize:Number("12")},w={fontFamily:v.default.fontFamily,fontSize:`${v.default.fontSize}px`,lineHeight:`${v.default.lineHeight}px`,fontWeightDefault:v.default.fontWeight,fontWeightSelected:v.selected.fontWeight},k={contentDefault:x.content.default,contentHover:x.content.hover,contentSelected:x.content.selected,bgHover:x.bg.hover,bgSelected:x.bg.selected,iconDefault:"#888888"},m=10,C={1:24,2:34,3:40,4:48,5:56},$=class{constructor(i){t(this,i),this.pageChange=e(this,"sdPageChange",7)}currentPage=1;lastPage=1;simple=!1;pageChange;get pageNumbers(){const t=Math.floor((this.currentPage-1)/m)*m+1,e=Math.min(t+m-1,this.lastPage);return Array.from({length:e-t+1},((e,i)=>t+i))}get buttonWidth(){const t=(this.pageNumbers.at(-1)??1).toString().length;return C[t]||C[1]}get isFirstGroup(){return this.currentPage<=m}get isLastGroup(){return Math.floor((this.currentPage-1)/m)*m+1+m-1>=this.lastPage}handlePageChange=t=>{t<1||t>this.lastPage||(this.currentPage=t,this.pageChange.emit(t))};handleGroupChange=t=>{const e=Math.min(Math.max(this.currentPage+("forward"===t?m:-10),1),this.lastPage);this.handlePageChange(e)};renderNavButton(t,e,s){return i("button",{type:"button",class:"sd-pagination__nav","aria-label":e,onClick:s},i("sd-icon",{name:t,size:_.iconSize,color:k.iconDefault}))}renderPrevButtons(){return this.simple?this.currentPage<=1?null:i(s,null,this.renderNavButton("chevronLeftEnd","Go to first page",(()=>this.handlePageChange(1))),this.renderNavButton("chevronLeft","Go to previous page",(()=>this.handlePageChange(this.currentPage-1)))):this.isFirstGroup?null:i(s,null,this.renderNavButton("chevronLeftEnd","Go to first page",(()=>this.handlePageChange(1))),this.renderNavButton("chevronLeft","Go to previous page group",(()=>this.handleGroupChange("backward"))))}renderNextButtons(){return this.simple?this.currentPage>=this.lastPage?null:i(s,null,this.renderNavButton("chevronRight","Go to next page",(()=>this.handlePageChange(this.currentPage+1))),this.renderNavButton("chevronRightEnd","Go to last page",(()=>this.handlePageChange(this.lastPage)))):this.isLastGroup?null:i(s,null,this.renderNavButton("chevronRight","Go to next page group",(()=>this.handleGroupChange("forward"))),this.renderNavButton("chevronRightEnd","Go to last page",(()=>this.handlePageChange(this.lastPage))))}render(){return i("div",{key:"5a1ebb6aeb6732cd3b6133cedba47aeedf620291",class:{"sd-pagination":!0,"sd-pagination--simple":this.simple},style:{"--sd-pagination-height":_.height,"--sd-pagination-padding-x":_.paddingX,"--sd-pagination-radius":_.radius,"--sd-pagination-gap":_.gap,"--sd-pagination-move-gap":_.moveGap,"--sd-pagination-font-family":w.fontFamily,"--sd-pagination-font-size":w.fontSize,"--sd-pagination-line-height":w.lineHeight,"--sd-pagination-font-weight-default":w.fontWeightDefault,"--sd-pagination-font-weight-selected":w.fontWeightSelected,"--sd-pagination-content":k.contentDefault,"--sd-pagination-content-hover":k.contentHover,"--sd-pagination-content-selected":k.contentSelected,"--sd-pagination-bg-hover":k.bgHover,"--sd-pagination-bg-selected":k.bgSelected,"--sd-pagination-item-width":`${this.buttonWidth}px`}},i("div",{key:"a4856d8ffde66402eae909ad9f636f3b13f1b5d7",class:"sd-pagination__group sd-pagination__group--prev"},this.renderPrevButtons()),this.simple?i("div",{class:"sd-pagination__info"},i("span",{class:"sd-pagination__current"},this.currentPage),i("span",{class:"sd-pagination__divider"},"/"),i("span",{class:"sd-pagination__last"},this.lastPage)):i("div",{class:"sd-pagination__numbers"},this.pageNumbers.map((t=>i("button",{type:"button","aria-current":this.currentPage===t?"page":void 0,class:{"sd-pagination__item":!0,"sd-pagination__item--selected":this.currentPage===t},onClick:()=>this.handlePageChange(t)},t)))),i("div",{key:"fd1d6d0ba1c143ca4f9692f1c604f0e0fc0730db",class:"sd-pagination__group sd-pagination__group--next"},this.renderNextButtons()))}};$.style="sd-pagination{display:inline-flex}.sd-pagination{display:inline-flex;align-items:center;gap:var(--sd-pagination-gap);font-family:var(--sd-pagination-font-family)}.sd-pagination__group{display:inline-flex;align-items:center;gap:var(--sd-pagination-move-gap);min-width:calc(var(--sd-pagination-height) * 2 + var(--sd-pagination-move-gap))}.sd-pagination__group--prev{justify-content:flex-end}.sd-pagination__group--next{justify-content:flex-start}.sd-pagination__numbers{display:inline-flex;align-items:center;gap:var(--sd-pagination-move-gap)}.sd-pagination__nav{display:inline-flex;align-items:center;justify-content:center;width:var(--sd-pagination-height);height:var(--sd-pagination-height);padding:0;background:transparent;border:0;border-radius:var(--sd-pagination-radius);cursor:pointer;outline:none}.sd-pagination__nav:hover{background-color:var(--sd-pagination-bg-hover)}.sd-pagination__item{display:inline-flex;align-items:center;justify-content:center;width:var(--sd-pagination-item-width);height:var(--sd-pagination-height);padding:0 var(--sd-pagination-padding-x);background:transparent;border:0;border-radius:var(--sd-pagination-radius);color:var(--sd-pagination-content);font-size:var(--sd-pagination-font-size);font-weight:var(--sd-pagination-font-weight-default);line-height:var(--sd-pagination-line-height);cursor:pointer;outline:none;box-sizing:border-box}.sd-pagination__item:hover{background-color:var(--sd-pagination-bg-hover);color:var(--sd-pagination-content-hover)}.sd-pagination__item--selected{background-color:var(--sd-pagination-bg-selected);color:var(--sd-pagination-content-selected);font-weight:var(--sd-pagination-font-weight-selected)}.sd-pagination__item--selected:hover{background-color:var(--sd-pagination-bg-selected);color:var(--sd-pagination-content-selected)}.sd-pagination__info{display:inline-flex;align-items:center;gap:var(--sd-pagination-move-gap);height:var(--sd-pagination-height);padding:0 var(--sd-pagination-padding-x);color:var(--sd-pagination-content);font-size:var(--sd-pagination-font-size);font-weight:var(--sd-pagination-font-weight-default);line-height:var(--sd-pagination-line-height)}.sd-pagination__current{color:var(--sd-pagination-content-selected);font-weight:var(--sd-pagination-font-weight-selected)}";const z=class{constructor(e){t(this,e)}get el(){return o(this)}rows=[];tableId="";topSpacerHeight=0;bottomSpacerHeight=0;tableEl=null;handleRowsChange(t){const e=t??[];this.tableEl?.setRowCountSync&&this.tableEl.setRowCountSync(e.length)}componentWillLoad(){this.syncTableContext(),this.rows=this.rows??[],this.tableEl?.setRowCountSync&&this.tableEl.setRowCountSync(this.rows.length),this.el.setSpacersSync=(t,e)=>{this.topSpacerHeight=t,this.bottomSpacerHeight=e}}componentDidLoad(){this.syncTableContext()}syncTableContext(){const t=this.el.closest("sd-table"),e=this.el.getRootNode(),i=e instanceof ShadowRoot?e.host:null,s=t??i;this.tableEl=s;const o=s?.getTableIdSync?.(),a=s?.getAttribute(n),r=(null!=o&&""!==o&&"undefined"!==o?o:null)??(null!=a&&""!==a&&"undefined"!==a?a:null)??"";""!==r&&r!==this.tableId&&(this.tableId=r)}render(){return i(a,{key:"af02c942fe83b515e2065840ff3b83ad22fd5542",slot:`${this.tableId}-body`},i("tbody",{key:"6f1b771c2a21ff087b5feb32b19e0fb4b0abed35",class:{tbody:!0}},[this.topSpacerHeight>0&&i("tr",{key:"spacer-top",class:"tbody__spacer",style:{height:`${this.topSpacerHeight}px`,display:"block"}}),i("slot",{key:"0c7c439b269527f9bfbb00bf60a1aec10646da56"}),this.bottomSpacerHeight>0&&i("tr",{key:"spacer-bottom",class:"tbody__spacer",style:{height:`${this.bottomSpacerHeight}px`,display:"block"}})]))}static get watchers(){return{rows:[{handleRowsChange:0}]}}};z.style=":host{display:contents}:host *{box-sizing:border-box}.tbody{display:table-row-group}";const S=class{constructor(i){t(this,i),this.sdColumnSort=e(this,"sdColumnSort",7)}get el(){return o(this)}columns;selectable;resizable;stickyColumn;stickyHeader;scrolledLeft;scrolledRight;rows=[];columnWidths=[];sdColumnSort;tableId="";_columns=[];_selectable=!1;_resizable=!1;_stickyColumn={left:0,right:0};_stickyHeader=!1;_scrolledLeft=!1;_scrolledRight=!1;dropdownOpenMap={};tableEl=null;dropdownRefs={};dropdownThRefs={};dropdownPortals={};handleColumnsChange(t){Array.isArray(t)&&0===(this.columnWidths??[]).length&&(this.columnWidths=t.map((t=>t.autoWidth?0:parseInt(t.width||"120",10))))}disconnectedCallback(){Object.values(this.dropdownPortals??{}).forEach((t=>{null!=t?.parentNode&&t.parentNode.removeChild(t)}))}componentWillLoad(){this.syncTableContext(),this.dropdownOpenMap=this.dropdownOpenMap??{},this.dropdownRefs=this.dropdownRefs??{},this.dropdownThRefs=this.dropdownThRefs??{},this.dropdownPortals=this.dropdownPortals??{},this.columnWidths=Array.isArray(this.columnWidths)?this.columnWidths:[],this.resolveConfig(),0===(this.columnWidths??[]).length&&(this.columnWidths=this._columns.map((t=>t.autoWidth?0:parseInt(t.width||"120",10))))}componentDidLoad(){this.syncTableContext(),this.resolveConfig(),this.initDropdownPortals()}initDropdownPortals(){const t=(this._columns??[]).filter((t=>!0===t.hasDropdown));if(0!==t.length)for(const e of t){const t=e.name;if(null!=(this.dropdownPortals??{})[t])continue;const i=this.el.querySelector(`[slot="dropdown-${t}"]`);if(null==i)continue;i.removeAttribute("slot");const s=document.createElement("sd-portal");s.parentRef=this.dropdownThRefs[t]??null,s.open=!1,s.style.display="none",s.addEventListener("sdClose",(()=>this.closeDropdown(t))),s.appendChild(i),document.body.appendChild(s),this.dropdownPortals[t]=s}}syncTableContext(){const t=this.el.closest("sd-table"),e=this.el.getRootNode(),i=e instanceof ShadowRoot?e.host:null,s=t??i;this.tableEl=s;const o=s?.getTableIdSync?.(),a=s?.getAttribute(n),r=(null!=o&&""!==o&&"undefined"!==o?o:null)??(null!=a&&""!==a&&"undefined"!==a?a:null)??"";""!==r&&r!==this.tableId&&(this.tableId=r)}resolveConfig(){const t=this.tableEl?.getConfigSync?.(),e=Array.isArray(this.columns)?this.columns:Array.isArray(t?.columns)?t.columns:[];this._columns=e,this._selectable=this.selectable??t?.selectable??!1,this._resizable=this.resizable??t?.resizable??!1,this._stickyColumn=this.stickyColumn??t?.stickyColumn??{left:0,right:0},this._stickyHeader=this.stickyHeader??t?.stickyHeader??!1,this._scrolledLeft=this.scrolledLeft??t?.scrolledLeft??!1,this._scrolledRight=this.scrolledRight??t?.scrolledRight??!1,Array.isArray(t?.columnWidths)&&0===(this.columnWidths??[]).length&&(this.columnWidths=[...t.columnWidths]),Array.isArray(this.columnWidths)||(this.columnWidths=[])}async refreshConfig(){this.resolveConfig(),this.initDropdownPortals()}async setColumnWidths(t){this.columnWidths=Array.isArray(t)?t:[]}async refreshSelection(){const t=this.el.querySelector("sd-checkbox");t&&(t.value=this.getIsAllChecked())}get visibleColumns(){return this._columns.filter((t=>!1!==t.visible))}getStickyStyle(t){if(this.tableEl?.getStickyStyleSync)return this.tableEl.getStickyStyleSync(t);const e=this.columnWidths.slice(0,t).reduce(((t,e)=>t+e),0)+(this._selectable?r:0),i=this.columnWidths.filter(((e,i)=>i>=this.visibleColumns.length-(this._stickyColumn.right||0)&&i>t)).reduce(((t,e)=>t+e),0),s=this.visibleColumns[t],o={"--sticky-left-offset":`${e}px`,"--sticky-right-offset":`${i}px`};return s?.autoWidth||(o.width=`${this.columnWidths[t]}px`,o.minWidth=`${this.columnWidths[t]}px`,o.maxWidth=`${this.columnWidths[t]}px`),o}handleResize(t,e,i=!1){this.tableEl?.handleResize&&this.tableEl.handleResize(t,e,i)}handleColumnSort=t=>{this.sdColumnSort.emit({column:t})};toggleDropdown(t){const e=!0!==this.dropdownOpenMap[t],i=this.dropdownPortals??{},s={...this.dropdownOpenMap};for(const o of(this._columns??[]).filter((t=>!0===t.hasDropdown))){const a=o.name===t&&e;s[o.name]=a;const n=i[o.name];null!=n&&(n.open=a)}this.dropdownOpenMap=s}closeDropdown(t){if(!0!==this.dropdownOpenMap[t])return;this.dropdownOpenMap={...this.dropdownOpenMap,[t]:!1};const e=(this.dropdownPortals??{})[t];null!=e&&(e.open=!1)}handleSelectAll(t){const e=!!t,i=Array.isArray(this.rows)?this.rows:[];this.tableEl?.toggleSelectAllSync&&this.tableEl.toggleSelectAllSync(e,i)}getIsAllChecked(){const t=Array.isArray(this.rows)?this.rows:[];return!!(this.tableEl?.getIsAllCheckedSync&&t.length>0)&&this.tableEl.getIsAllCheckedSync(t)}render(){const t=Array.isArray(this.rows)?this.rows:[],e=this.dropdownOpenMap??{},s=this.dropdownRefs??{},o=this._stickyColumn.left||0,n=this._stickyColumn.right||0,r=this.visibleColumns.slice(0,o),f=this.visibleColumns.slice(o,this.visibleColumns.length-n),u=this.visibleColumns.slice(this.visibleColumns.length-n),y=this.visibleColumns.length-1;return i(a,{key:"521fa63c751f74ba620aad7355127c7d7fe8217c",slot:`${this.tableId}-head`,style:{"--table-header-height":`${b.height}px`,"--table-header-padding-x":`${b.paddingX}px`,"--table-header-gap":`${b.gap}px`,"--table-header-bg":g.bg,"--table-header-font-family":p.fontFamily,"--table-header-font-weight":p.fontWeight,"--table-header-font-size":`${p.fontSize}px`,"--table-header-line-height":`${p.lineHeight}px`,"--table-header-text-decoration":p.textDecoration,"--table-header-resizer-color":c.color,"--table-header-resizer-height":`${c.height}px`,"--table-border-color":d.color,"--table-border-width":`${d.width}px`}},i("thead",{key:"226911deb4a0a0898e064875fbba7aa1d326634b",class:{thead:!0,"thead--sticky":this._stickyHeader}},i("tr",{key:"f60653ae5dc8b773b73ab05f9631358272e90df5",class:"tr"},this._selectable&&i("th",{key:"7826b9c1fa8ec84f83825f8380e7bcd014d3782a",class:{th:!0,"th--selected":!0,"sticky-left":!0,"sticky-left-edge":0===o,"is-scrolled-left":0===o&&this._scrolledLeft},style:{"--sticky-left-offset":"0px"}},i("sd-checkbox",{key:"412a9ee49954014dc45dd0a2444642a549782d8e",value:this.getIsAllChecked(),disabled:0===t.length,onSdUpdate:t=>this.handleSelectAll(t.detail)}),i("div",{key:"116b6c2a55cc7553090b39338e251101c1de057b",class:"th__bar"})),r.map(((t,a)=>i("th",{key:t.name,class:{th:!0,[`${t.thClass}`]:Boolean(t.thClass),"sticky-left":!0,"sticky-left-edge":a===o-1,"is-scrolled-left":a===o-1&&this._scrolledLeft,"th--has-dropdown":!0===t.hasDropdown},style:{...t.thStyle,...this.getStickyStyle(a)},ref:!0===t.hasDropdown?e=>{this.dropdownThRefs[t.name]=e}:void 0,onClick:!0===t.hasDropdown?()=>this.toggleDropdown(t.name):void 0},i("div",{class:`th__content th__content--${t.align||"left"}`},i("div",{class:"th__content--label"},t.label),t.icon&&i("sd-icon",{name:t.icon,size:"12",color:h(t.icon,t.iconColor)}),t.sort&&i("sd-icon",{name:l(t.sort),size:"12",color:h(l(t.sort),t.iconColor),onClick:e=>{e.stopPropagation(),this.handleColumnSort(t)},style:{cursor:"pointer"}}),t.tooltip&&i("sd-tooltip",{...t.tooltipOptions},i("div",{slot:"content"},t.tooltip.map((t=>i("p",null,t))))),!0===t.hasDropdown&&i("button",{class:{"th__dropdown-trigger":!0,"th__dropdown-trigger--open":!0===e[t.name]},ref:e=>{s[t.name]=e},"aria-haspopup":"listbox","aria-expanded":!0===e[t.name]?"true":"false"},i("sd-icon",{name:"caretDown",size:"12"}))),this._resizable&&a!==y&&i("div",{class:"th__resizer",onMouseDown:t=>this.handleResize(a,t)})))),f.map(((t,e)=>{const s=o+e;return i("th",{key:t.name,class:{th:!0,[`${t.thClass}`]:Boolean(t.thClass),"th--has-dropdown":!0===t.hasDropdown},style:{...t.thStyle,...this.getStickyStyle(s)},ref:!0===t.hasDropdown?e=>{this.dropdownThRefs[t.name]=e}:void 0,onClick:!0===t.hasDropdown?()=>this.toggleDropdown(t.name):void 0},i("div",{class:`th__content th__content--${t.align||"left"}`},i("div",{class:"th__content--label"},t.label),t.icon&&i("sd-icon",{name:t.icon,size:"12",color:h(t.icon,t.iconColor)}),t.sort&&i("sd-icon",{name:l(t.sort),size:"12",color:h(l(t.sort),t.iconColor),onClick:e=>{e.stopPropagation(),this.handleColumnSort(t)},style:{cursor:"pointer"}}),t.tooltip&&i("sd-tooltip",{...t.tooltipOptions},i("div",{slot:"content"},t.tooltip.map((t=>i("p",null,t))))),!0===t.hasDropdown&&i("button",{class:{"th__dropdown-trigger":!0,"th__dropdown-trigger--open":!0===this.dropdownOpenMap[t.name]},ref:e=>{this.dropdownRefs[t.name]=e},"aria-haspopup":"listbox","aria-expanded":!0===this.dropdownOpenMap[t.name]?"true":"false"},i("sd-icon",{name:"caretDown",size:"12"}))),this._resizable&&s!==y&&i("div",{class:"th__resizer",onMouseDown:t=>this.handleResize(s,t)}))})),u.map(((t,e)=>{const s=this.visibleColumns.length-n+e;return i("th",{key:t.name,class:{th:!0,[`${t.thClass}`]:Boolean(t.thClass),"sticky-right":!0,"sticky-right-edge":0===e,"is-scrolled-right":0===e&&this._scrolledRight,"th--has-dropdown":!0===t.hasDropdown},style:{...t.thStyle,...this.getStickyStyle(s)},ref:!0===t.hasDropdown?e=>{this.dropdownThRefs[t.name]=e}:void 0,onClick:!0===t.hasDropdown?()=>this.toggleDropdown(t.name):void 0},i("div",{class:`th__content th__content--${t.align||"left"}`},i("div",{class:"th__content--label"},t.label),t.icon&&i("sd-icon",{name:t.icon,size:"12",color:h(t.icon,t.iconColor)}),t.sort&&i("sd-icon",{name:l(t.sort),size:"12",color:h(l(t.sort),t.iconColor),onClick:e=>{e.stopPropagation(),this.handleColumnSort(t)},style:{cursor:"pointer"}}),t.tooltip&&i("sd-tooltip",{...t.tooltipOptions},i("div",{slot:"content"},t.tooltip.map((t=>i("p",null,t))))),!0===t.hasDropdown&&i("button",{class:{"th__dropdown-trigger":!0,"th__dropdown-trigger--open":!0===this.dropdownOpenMap[t.name]},ref:e=>{this.dropdownRefs[t.name]=e},"aria-haspopup":"listbox","aria-expanded":!0===this.dropdownOpenMap[t.name]?"true":"false"},i("sd-icon",{name:"caretDown",size:"12"}))),this._resizable&&i("div",{class:"th__resizer th__resizer--left",onMouseDown:t=>this.handleResize(s,t,!0)}))})))))}static get watchers(){return{columns:[{handleColumnsChange:0}]}}};S.style='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}';const F=class{constructor(e){t(this,e)}get el(){return o(this)}columns;selectable;stickyColumn;rowKey="";row={};separator=null;tableId="";columnWidths=[];isVisible=!0;spansVersion=0;_columns=[];_selectable=!1;_stickyColumn={left:0,right:0};_scrolledLeft=!1;_scrolledRight=!1;_dense=!1;tableEl=null;componentWillLoad(){this.row=this.row??{},this.syncTableContext(),this.columnWidths=this.columnWidths??[],this.resolveConfig(),this.columnWidths=this._columns.map((t=>t.autoWidth?0:parseInt(t.width||"120",10))),this.updateVisibilitySync()}componentDidLoad(){this.syncTableContext()}syncTableContext(){const t=this.el.closest("sd-table"),e=this.el.getRootNode(),i=e instanceof ShadowRoot?e.host:null,s=t??i;this.tableEl=s;const o=s?.getTableIdSync?.(),a=s?.getAttribute(n),r=(null!=o&&""!==o&&"undefined"!==o?o:null)??(null!=a&&""!==a&&"undefined"!==a?a:null)??"";""!==r&&r!==this.tableId&&(this.tableId=r)}resolveConfig(){const t=this.tableEl?.getConfigSync?.();this._columns=this.columns??t?.columns??[],this._selectable=this.selectable??t?.selectable??!1,this._stickyColumn=this.stickyColumn??t?.stickyColumn??{left:0,right:0},this._scrolledLeft=t?.scrolledLeft??!1,this._scrolledRight=t?.scrolledRight??!1,this._dense=t?.dense??!1,t?.columnWidths&&0===(this.columnWidths??[]).length&&(this.columnWidths=[...t.columnWidths])}async refreshConfig(){this.resolveConfig()}async bumpSpansVersion(){this.spansVersion=this.spansVersion+1}async updateVisibility(){this.updateVisibilitySync()}updateVisibilitySync(){const t=parseInt(this.rowKey,10),e=this.tableEl?.getPaginationInfoSync?.();this.isVisible=!e||t>=e.startIndex&&t<e.endIndex}async setColumnWidths(t){this.columnWidths=t}async refreshSelection(){const t=this.el.querySelector("sd-checkbox");t&&(t.value=this.isSelected())}get visibleColumns(){return this._columns.filter((t=>!1!==t.visible))}formatValue(t){return null==t?"":"number"==typeof t?t.toLocaleString():String(t)}getCellValue(t){const{field:e,format:i,name:s}=t,o="function"==typeof e?e(this.row):""!==e?this.row[e]:this.row[s];return i?i(o,this.row):this.formatValue(o)}getStickyStyle(t){if(this.tableEl?.getStickyStyleSync)return this.tableEl.getStickyStyleSync(t);const e=this.columnWidths.slice(0,t).reduce(((t,e)=>t+e),0)+(this._selectable?52:0),i=this.columnWidths.filter(((e,i)=>i>=this.visibleColumns.length-(this._stickyColumn.right||0)&&i>t)).reduce(((t,e)=>t+e),0),s=this.visibleColumns[t],o={"--sticky-left-offset":`${e}px`,"--sticky-right-offset":`${i}px`};return s?.autoWidth||(o.width=`${this.columnWidths[t]}px`,o.minWidth=`${this.columnWidths[t]}px`,o.maxWidth=`${this.columnWidths[t]}px`),o}isSelected(){return!!this.tableEl?.isRowSelectedSync&&this.tableEl.isRowSelectedSync(this.row)}handleSelect(){this.tableEl?.updateRowSelectSync&&this.tableEl.updateRowSelectSync(this.row)}getSpanFor(t){if(this.tableEl?.getSpanSync)return this.tableEl.getSpanSync(this.rowKey,"string"==typeof t.field?t.field:t.name)}isCovered(t){return!!this.tableEl?.isCoveredSync&&this.tableEl.isCoveredSync(this.rowKey,t,this._columns)}getCellClassFor(t){if(this.tableEl?.getCellClassSync)return this.tableEl.getCellClassSync(this.rowKey,"string"==typeof t.field?t.field:t.name)}getFramePaddingStyle(t){if(this.tableEl?.isCellUseFrameSync?.(this.rowKey,t))return{padding:`${f.framePadding}px`}}expandCellClass(t){return null==t||""===t?{}:Object.fromEntries(t.split(/\s+/).filter(Boolean).map((t=>[t,!0])))}render(){const t=this._stickyColumn.left||0,e=this._stickyColumn.right||0,s=this.visibleColumns.slice(0,t),o=this.visibleColumns.slice(t,this.visibleColumns.length-e),n=this.visibleColumns.slice(this.visibleColumns.length-e),r=this.tableEl?.hasRowspanSync?.()??!1,h=this.tableEl?.hasUseFrameInRowSync?.(this.rowKey)??!1,l=this._dense&&!h?f.dense:f.default,c={display:this.isVisible?"":"none","--table-body-height":`${l.height}px`,"--table-body-padding-y":`${l.paddingY}px`,"--table-body-padding-x":`${f.paddingX}px`,"--table-body-font-family":y.fontFamily,"--table-body-font-weight":y.fontWeight,"--table-body-font-size":`${y.fontSize}px`,"--table-body-line-height":`${y.lineHeight}px`,"--table-body-text-decoration":y.textDecoration,"--table-border-color":d.color,"--table-border-width":`${d.width}px`,"--table-separator-color":u.color,"--table-separator-width":`${u.width}px`,"--table-separator-dense-width":`${u.denseWidth}px`};return i(a,{style:c},null!=this.separator?i("tr",{class:{tr:!0,"tr--separator":!0,"tr--separator--dense":4===this.separator}},i("td",{colSpan:this.visibleColumns.length+(this._selectable?1:0),class:"td td--separator"})):i("tr",{class:{tr:!0,"tr--no-hover":r}},this._selectable&&i("td",{class:{td:!0,"td--selected":!0,"sticky-left":!0,"sticky-left-edge":0===t,"is-scrolled-left":0===t&&this._scrolledLeft},style:{"--sticky-left-offset":"0px"}},i("sd-checkbox",{value:this.isSelected(),onSdUpdate:()=>this.handleSelect()})),s.map(((e,s)=>{if(this.isCovered(s))return null;const o="string"==typeof e.field?e.field:e.name,a=this.getSpanFor(e),n=this.getCellClassFor(e);return i("td",{key:e.name,rowSpan:a?.rowspan,colSpan:a?.colspan,class:{td:!0,[`td--${e.align||"left"}`]:!0,"sticky-left":!0,"sticky-left-edge":s===t-1,"is-scrolled-left":s===t-1&&this._scrolledLeft,[`${e.tdClass}`]:Boolean(e.tdClass),...this.expandCellClass(n)},style:{...this.getStickyStyle(s),...this.getFramePaddingStyle(o)}},i("slot",{name:`${this.tableId}-${o}-${this.rowKey}`},i("span",null,this.getCellValue(e))))})),o.map(((e,s)=>{const o=t+s;if(this.isCovered(o))return null;const a="string"==typeof e.field?e.field:e.name,n=this.getSpanFor(e),r=this.getCellClassFor(e);return i("td",{key:e.name,rowSpan:n?.rowspan,colSpan:n?.colspan,class:{td:!0,[`td--${e.align||"left"}`]:!0,[`${e.tdClass}`]:Boolean(e.tdClass),...this.expandCellClass(r)},style:{...this.getStickyStyle(o),...this.getFramePaddingStyle(a)}},i("slot",{name:`${this.tableId}-${a}-${this.rowKey}`},i("span",null,this.getCellValue(e))))})),n.map(((t,s)=>{const o=this.visibleColumns.length-e+s;if(this.isCovered(o))return null;const a="string"==typeof t.field?t.field:t.name,n=this.getSpanFor(t),r=this.getCellClassFor(t);return i("td",{key:t.name,rowSpan:n?.rowspan,colSpan:n?.colspan,class:{td:!0,[`td--${t.align||"left"}`]:!0,"sticky-right":!0,"sticky-right-edge":0===s,"is-scrolled-right":0===s&&this._scrolledRight,[`${t.tdClass}`]:Boolean(t.tdClass),...this.expandCellClass(r)},style:{...this.getStickyStyle(o),...this.getFramePaddingStyle(a)}},i("slot",{name:`${this.tableId}-${a}-${this.rowKey}`},i("span",null,this.getCellValue(t))))}))))}};F.style='sd-tr{display:contents}sd-tr *{box-sizing:border-box}.tr{display:table-row}.tr:hover .td{background-color:#F9F9F9}.tr--no-hover:hover .td{background-color:white}.tr--separator:hover .td{background-color:var(--table-separator-color, #eeeeee)}.td{display:table-cell;height:var(--table-body-height, 44px);padding:var(--table-body-padding-y, 0) var(--table-body-padding-x, 16px);border-bottom:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);background:white;vertical-align:middle;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.td--left{text-align:left}.td--center{text-align:center}.td--right{text-align:right}.td--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}.td--selected sd-checkbox label{position:relative}.td--selected sd-checkbox label:before{content:"";position:absolute;inset:-6px}.td.sticky-left{position:sticky;background-color:white;z-index:100 !important;left:var(--sticky-left-offset, 0)}.td.sticky-right{position:sticky;background-color:white;z-index:100 !important;right:var(--sticky-right-offset, 0)}.td.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}.td.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}.td.sticky-left-edge.is-scrolled-left{overflow:visible}.td.sticky-left-edge.is-scrolled-left:after{opacity:1}.td.sticky-right-edge.is-scrolled-right{overflow:visible}.td.sticky-right-edge.is-scrolled-right:after{opacity:1}.tr:hover .td.sticky-left,.tr:hover .td.sticky-right{background-color:#F9F9F9}.tr--no-hover:hover .td.sticky-left,.tr--no-hover:hover .td.sticky-right{background-color:white}.tr--separator:hover .td.sticky-left,.tr--separator:hover .td.sticky-right{background-color:var(--table-separator-color, #eeeeee)}.tr--separator .td--separator{height:var(--table-separator-width, 6px);padding:0;background-color:var(--table-separator-color, #eeeeee);border-bottom:none}.tr--separator--dense .td--separator{height:var(--table-separator-dense-width, 4px)}.td--divider-left{border-left:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1)}.td--divider-right{border-right:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1)}';export{$ as sd_pagination,z as sd_tbody,S as sd_thead,F as sd_tr}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,h as e,H as s}from"./p-BZ5lcC25.js";import{p as c}from"./p-D1vaasIp.js";import{s as t}from"./p-BJfiMC9H.js";var a={track:"#EEEEEE",arc:"#2D8DFF"};const o=c.progress.color.label,i=t.color.fg.tertiary,l={primary:{arc:a.arc,track:a.track},inverse:{arc:"#FFFFFF",track:"transparent"},error:{arc:"#E30000",track:a.track},complete:{arc:"#01BB4B",track:a.track}},n=2*Math.PI*34,p=class{constructor(e){r(this,e)}indeterminate=!1;value=0;type="primary";label;get clampedValue(){return Number.isFinite(this.value)?Math.max(0,Math.min(100,this.value)):0}render(){const r=l[this.type]??l.primary,c={"--sd-circle-progress-track":r.track,"--sd-circle-progress-arc":r.arc,"--sd-circle-progress-label-color":o,"--sd-circle-progress-percent-color":0===this.clampedValue?i:r.arc},t={};this.indeterminate||(t.strokeDasharray=`${this.clampedValue/100*n} ${n}`,t.strokeDashoffset="0");const a=!this.indeterminate;return e(s,{key:"
|
|
1
|
+
import{r,h as e,H as s}from"./p-BZ5lcC25.js";import{p as c}from"./p-D1vaasIp.js";import{s as t}from"./p-BJfiMC9H.js";var a={track:"#EEEEEE",arc:"#2D8DFF"};const o=c.progress.color.label,i=t.color.fg.tertiary,l={primary:{arc:a.arc,track:a.track},inverse:{arc:"#FFFFFF",track:"transparent"},error:{arc:"#E30000",track:a.track},complete:{arc:"#01BB4B",track:a.track}},n=2*Math.PI*34,p=class{constructor(e){r(this,e)}indeterminate=!1;value=0;type="primary";label;get clampedValue(){return Number.isFinite(this.value)?Math.max(0,Math.min(100,this.value)):0}render(){const r=l[this.type]??l.primary,c={"--sd-circle-progress-track":r.track,"--sd-circle-progress-arc":r.arc,"--sd-circle-progress-label-color":o,"--sd-circle-progress-percent-color":0===this.clampedValue?i:r.arc},t={};this.indeterminate||(t.strokeDasharray=`${this.clampedValue/100*n} ${n}`,t.strokeDashoffset="0");const a=!this.indeterminate;return e(s,{key:"b5b95509acbc4ce797cb30163e9e732cb4497ccc",style:c},e("svg",{key:"dc0ad68b03996e71c5d60fbc98a5ee017dcf1442",class:"sd-circle-progress",viewBox:"0 0 80 80",xmlns:"http://www.w3.org/2000/svg"},e("circle",{key:"48f479dfe00730a41fc4020c2c4c42e14c54c42e",class:"sd-circle-progress__track",cx:40,cy:40,r:34,fill:"none","stroke-width":12}),e("circle",{key:"2d2a54ff75db11c87e21a7953d3580832e4511be",class:"sd-circle-progress__arc",cx:40,cy:40,r:34,fill:"none","stroke-width":12,"stroke-linecap":"round",style:t})),a&&e("span",{key:"8c393fe080a5d893bdbb90670bdba0cf76a285f6",class:"sd-circle-progress__percent"},Math.round(this.clampedValue),"%"),this.label&&e("span",{key:"2bbad3b1a3ab35696b62e97c9627a152ae8f7bf6",class:"sd-circle-progress__label"},this.label))}};p.style='@charset "UTF-8";sd-circle-progress{display:inline-flex;flex-direction:column;align-items:center;gap:8px}sd-circle-progress .sd-circle-progress{width:80px;height:80px}sd-circle-progress .sd-circle-progress__track{stroke:var(--sd-circle-progress-track)}sd-circle-progress .sd-circle-progress__arc{stroke:var(--sd-circle-progress-arc);transform:rotate(-90deg);transform-origin:center center;transition:stroke-dasharray 0.4s linear, stroke-dashoffset 0.4s linear}sd-circle-progress .sd-circle-progress__percent{text-align:center;color:var(--sd-circle-progress-percent-color);font-family:"Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;font-size:16px;font-weight:700;line-height:26px}sd-circle-progress .sd-circle-progress__label{text-align:center;color:var(--sd-circle-progress-label-color);font-family:"Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;font-size:12px;font-weight:400;line-height:20px}sd-circle-progress{}sd-circle-progress[indeterminate] .sd-circle-progress{animation:sd-circle-progress-spin 2s linear infinite;transform-origin:center center}sd-circle-progress[indeterminate] .sd-circle-progress__arc{transform:none;transition:none;animation:sd-circle-progress-spin-path 1.5s ease-in-out infinite}@keyframes sd-circle-progress-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes sd-circle-progress-spin-path{0%{stroke-dasharray:1, 340;stroke-dashoffset:0}50%{stroke-dasharray:151, 340;stroke-dashoffset:-60}100%{stroke-dasharray:151, 340;stroke-dashoffset:-211}}';export{p as sd_circle_progress}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as s,a as t,h as i,F as
|
|
1
|
+
import{r as e,c as s,a as t,h as i,F as a}from"./p-BZ5lcC25.js";import{T as o}from"./p-GXE2lEVj.js";var n={bg:"#07284A"};const l=class{constructor(t){e(this,t),this.showChange=s(this,"sdShowChange",7)}get el(){return t(this)}show=!1;placement="bottom";color="#01BB4B";icon="helpOutline";iconSize=12;label="";name="primary_sm";rightIcon;ariaLabel="";disabled=!1;type="button";menuTitle;leftLink;button;menuClass="";slotContentHTML="";showChange;buttonEl;setShow=e=>{this.show!==e&&(this.show=e,this.showChange.emit(e))};get popoverOffset(){switch(this.placement??"bottom"){case"top":return[0,-4];case"bottom":return[0,4];case"left":case"right":return[4,0]}}handleClose=()=>this.setShow(!1);componentWillLoad(){this.slotContentHTML=this.el.innerHTML,this.el.innerHTML=""}render(){const e=this.placement??"bottom",s=this.color??"#01BB4B",t=this.icon??"helpOutline",l=this.iconSize??12,c=this.menuClass??"",d=this.leftLink,r=this.button,b=!!d||!!r;return i(a,{key:"163802d6f0954b87902bbf957831f311829e63dc"},""!==this.label?i("sd-button",{ref:e=>this.buttonEl=e,name:this.name??"primary_sm",label:this.label,icon:t,rightIcon:this.rightIcon,ariaLabel:this.ariaLabel||this.label||t||"Open popover",disabled:this.disabled,type:this.type??"button",class:"sd-popover",onSdClick:()=>this.setShow(!this.show)}):i("sd-icon",{ref:e=>this.buttonEl=e,name:t,size:l,color:s,class:"sd-popover",onClick:()=>this.setShow(!this.show)}),this.show&&i("sd-floating-portal",{key:"1bd73048fd65916a400840c572d988c445dd662b",parentRef:this.buttonEl,onSdClose:this.handleClose,placement:e,offset:this.popoverOffset},i("div",{key:"f3791b078c7970174d9394ffcbb19beb450f12c5",class:{"sd-floating-menu":!0,"sd-floating-menu--popover":!0,[`sd-floating-menu--${e}`]:!0,[c]:""!==c},style:{"--sd-floating-bg":n.bg}},i("i",{key:"f9ab66a933669a057a1da5188cb82ca9e5f17ed6",class:`sd-floating-menu__arrow sd-floating-menu__arrow--${e}`},i(o,{key:"6ea9ca3bacd2c84c468e5f00fa33e93e61a6bf9d"})),i("div",{key:"91d094cd45973bcc5ea6e6016510006f41956546",class:"sd-floating-menu__content"},this.menuTitle&&i("div",{key:"ebe9a1e130792d7e60ca9abef9020dff6c0bd4c4",class:"sd-floating-menu__title"},this.menuTitle),this.slotContentHTML&&i("div",{key:"b898402e77f125099b29f6bd8eb5384a70aa671a",class:"sd-floating-menu__messages",innerHTML:this.slotContentHTML}),b&&i("div",{key:"e797202b27ff538d4148f3b6782b33f58fc6bc2f",class:{"sd-floating-menu__buttons":!0,"sd-floating-menu__buttons--with-link":!!d}},d&&i("sd-text-link",{key:"fdeacc2b97c997d0c7385bab5260e060a70292e6",class:"sd-floating-menu__left-link",label:d.label,icon:d.icon??"",iconColor:d.iconColor??"",rightArrow:d.rightArrow??"none",underline:!!d.underline,disabled:!!d.disabled,onSdClick:d.onClick}),r&&i("sd-button",{key:"4a56e7e714517edcbea075e7d4521f0a54388e9f",name:r.name??"secondary_xs",label:r.label,icon:r.icon,rightIcon:r.rightIcon,ariaLabel:r.ariaLabel||r.label||r.icon||"Open popover",disabled:r.disabled,type:r.type,onSdClick:r.onClick}))),i("sd-ghost-button",{key:"ca713f6a07637b014c58923db2ff7af1f3ae98a8",class:"sd-floating-menu__close-button",icon:"close",ariaLabel:"close",size:"xs",onClick:this.handleClose}))))}};l.style="sd-popover{position:relative;cursor:pointer;display:inline-flex}";export{l as sd_popover}
|