@sellmate/design-system 1.0.47 → 1.0.49
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/{component.button-BjTPq93d.js → component.button-BKa5OPya.js} +2 -2
- 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 +2 -2
- package/dist/cjs/{sd-button-v2.config-DniiNqy_.js → sd-button-v2.config-CQoTThio.js} +1 -1
- package/dist/cjs/sd-button-v2_2.cjs.entry.js +4 -4
- package/dist/cjs/sd-button_4.cjs.entry.js +3 -3
- package/dist/cjs/sd-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +8 -8
- package/dist/cjs/sd-input_2.cjs.entry.js +12 -6
- package/dist/cjs/sd-loading-spinner_3.cjs.entry.js +2 -2
- package/dist/cjs/sd-number-input.cjs.entry.js +182 -50
- package/dist/cjs/sd-popover.cjs.entry.js +2 -2
- package/dist/cjs/sd-progress.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-dropdown_2.cjs.entry.js +3 -3
- package/dist/cjs/sd-select-group.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-multiple.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-option-group.cjs.entry.js +3 -3
- package/dist/cjs/sd-select-v2-list-item_2.cjs.entry.js +5 -5
- package/dist/cjs/sd-select-v2-listbox_2.cjs.entry.js +3 -3
- package/dist/cjs/sd-select-v2.cjs.entry.js +3 -3
- package/dist/cjs/sd-tag.cjs.entry.js +26 -26
- package/dist/cjs/sd-text-link.cjs.entry.js +3 -3
- package/dist/cjs/sd-textarea.cjs.entry.js +2 -2
- 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-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
- package/dist/collection/components/sd-action-modal/sd-action-modal.js +4 -4
- package/dist/collection/components/sd-button-v2/sd-button-v2.config.js +2 -1
- package/dist/collection/components/sd-button-v2/sd-button-v2.css +3 -1
- package/dist/collection/components/sd-button-v2/sd-button-v2.js +1 -1
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.config.js +2 -1
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.css +1 -1
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +5 -5
- package/dist/collection/components/sd-input/sd-input.css +5 -0
- package/dist/collection/components/sd-input/sd-input.js +8 -2
- package/dist/collection/components/sd-number-input/sd-number-input.config.js +39 -0
- package/dist/collection/components/sd-number-input/sd-number-input.css +41 -84
- package/dist/collection/components/sd-number-input/sd-number-input.js +142 -49
- package/dist/collection/components/sd-pagination/sd-pagination.js +2 -2
- package/dist/collection/components/sd-popover/sd-popover.js +2 -2
- package/dist/collection/components/sd-progress/sd-progress.js +2 -2
- package/dist/collection/components/sd-select/sd-select-dropdown/sd-select-dropdown.js +2 -2
- package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +1 -1
- package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.js +3 -3
- package/dist/collection/components/sd-select-group/sd-select-group.js +1 -1
- package/dist/collection/components/sd-select-multiple/sd-select-multiple.js +1 -1
- package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js +3 -3
- package/dist/collection/components/sd-select-v2/sd-select-v2-list-item/sd-select-v2-list-item.js +2 -2
- package/dist/collection/components/sd-select-v2/sd-select-v2-list-item-search/sd-select-v2-list-item-search.js +3 -3
- package/dist/collection/components/sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.js +1 -1
- package/dist/collection/components/sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.js +2 -2
- package/dist/collection/components/sd-select-v2/sd-select-v2.js +3 -3
- package/dist/collection/components/sd-tag/sd-tag.config.js +8 -8
- package/dist/collection/components/sd-tag/sd-tag.js +2 -2
- package/dist/collection/components/sd-text-link/sd-text-link.js +3 -3
- package/dist/collection/components/sd-textarea/sd-textarea.js +2 -2
- 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-toggle-button/sd-toggle-button.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
- package/dist/components/{p-VgEdINd9.js → p-7tPcjtqM.js} +1 -1
- package/dist/components/{p-BcZ3kfAq.js → p-B09D2cZD.js} +1 -1
- package/dist/components/{p-BdjLD8BG.js → p-B6NYLHOZ.js} +1 -1
- package/dist/components/{p-DeFPfiJf.js → p-BeZsmobQ.js} +1 -1
- package/dist/components/p-By4ufaS3.js +1 -0
- package/dist/components/p-C3XBhNH9.js +1 -0
- package/dist/components/{p-D1g7VL0r.js → p-CUy8ulXZ.js} +1 -1
- package/dist/components/{p-CCACqlGH.js → p-CdoxVzYC.js} +1 -1
- package/dist/components/{p-D9MEHQTt.js → p-DAWMGK_A.js} +1 -1
- package/dist/components/{p-ek1GaThy.js → p-DE3qbfEZ.js} +1 -1
- package/dist/components/{p-CDGHjR8K.js → p-DJScHgLW.js} +1 -1
- package/dist/components/p-DdjivpAF.js +1 -0
- package/dist/components/{p-Dn-uC69K.js → p-DeTDTmN7.js} +1 -1
- package/dist/components/{p-BgyCebrU.js → p-DhKZT8lW.js} +1 -1
- package/dist/components/{p-Cnu8Ol-v.js → p-Dl7yIIDW.js} +1 -1
- package/dist/components/{p-DET3nB7T.js → p-DqwiOEb3.js} +1 -1
- package/dist/components/p-Du3VqeNP.js +1 -0
- package/dist/components/p-DwYSoCyW.js +1 -0
- package/dist/components/{p-vFrxPNO8.js → p-ZoQO0p2E.js} +1 -1
- package/dist/components/{p-pByyQ_xa.js → p-poQ9yAeD.js} +1 -1
- package/dist/components/{p-BUl_ruQ7.js → p-uWsY9w9i.js} +1 -1
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-button-v2.js +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-confirm-modal.js +1 -1
- package/dist/components/sd-date-picker.js +1 -1
- package/dist/components/sd-date-range-picker.js +1 -1
- package/dist/components/sd-dropdown-button.js +1 -1
- package/dist/components/sd-field.js +1 -1
- package/dist/components/sd-guide.js +1 -1
- package/dist/components/sd-input.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-progress.js +1 -1
- package/dist/components/sd-select-dropdown.js +1 -1
- package/dist/components/sd-select-group.js +1 -1
- package/dist/components/sd-select-multiple-group.js +1 -1
- package/dist/components/sd-select-multiple.js +1 -1
- package/dist/components/sd-select-option-group.js +1 -1
- package/dist/components/sd-select-option.js +1 -1
- package/dist/components/sd-select-search-input.js +1 -1
- package/dist/components/sd-select-v2-list-item-search.js +1 -1
- package/dist/components/sd-select-v2-list-item.js +1 -1
- package/dist/components/sd-select-v2-listbox.js +1 -1
- package/dist/components/sd-select-v2-trigger.js +1 -1
- package/dist/components/sd-select-v2.js +1 -1
- package/dist/components/sd-select.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-text-link.js +1 -1
- package/dist/components/sd-textarea.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-button.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.css +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/p-07a3c3fc.entry.js +1 -0
- package/dist/design-system/{p-f026f7f4.entry.js → p-0e0992bf.entry.js} +1 -1
- package/dist/design-system/{p-c4aea24e.entry.js → p-127445af.entry.js} +1 -1
- package/dist/design-system/{p-50bfaf92.entry.js → p-19b18e4c.entry.js} +1 -1
- package/dist/design-system/{p-49e0b0bf.entry.js → p-19e62a3d.entry.js} +1 -1
- package/dist/design-system/{p-dd67b2e0.entry.js → p-242c605c.entry.js} +1 -1
- package/dist/design-system/p-4d904e5a.entry.js +1 -0
- package/dist/design-system/{p-5f4b252c.entry.js → p-4e9abae8.entry.js} +1 -1
- package/dist/design-system/{p-3a772b47.entry.js → p-53326ad6.entry.js} +1 -1
- package/dist/design-system/{p-c3117559.entry.js → p-833f828d.entry.js} +1 -1
- package/dist/design-system/{p-136e8453.entry.js → p-83e46793.entry.js} +1 -1
- package/dist/design-system/p-DwYSoCyW.js +1 -0
- package/dist/design-system/{p-CdOU_SOg.js → p-DzagopqQ.js} +1 -1
- package/dist/design-system/{p-f93313da.entry.js → p-ade2ed02.entry.js} +1 -1
- package/dist/design-system/p-aeed9b29.entry.js +1 -0
- package/dist/design-system/p-b5d8e54d.entry.js +1 -0
- package/dist/design-system/p-bddf2246.entry.js +1 -0
- package/dist/design-system/{p-50a571f7.entry.js → p-cf641008.entry.js} +1 -1
- package/dist/design-system/{p-b113f1e2.entry.js → p-d4da5815.entry.js} +1 -1
- package/dist/design-system/p-d93c6ea8.entry.js +1 -0
- package/dist/design-system/{p-f2df591c.entry.js → p-e58e5fa2.entry.js} +1 -1
- package/dist/design-system/{p-71ea3e9e.entry.js → p-e8cb12b7.entry.js} +1 -1
- package/dist/design-system/{p-3f6de68e.entry.js → p-ee25a675.entry.js} +1 -1
- package/dist/design-system/{p-b136cc18.entry.js → p-ef654bbe.entry.js} +1 -1
- package/dist/design-system/{p-9805bf41.entry.js → p-fc235907.entry.js} +1 -1
- package/dist/design-system/p-fd2e0035.entry.js +1 -0
- package/dist/esm/{component.button-KOzU1j2w.js → component.button-DwYSoCyW.js} +2 -2
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-action-modal.entry.js +2 -2
- package/dist/esm/{sd-button-v2.config-CRtF2Br0.js → sd-button-v2.config-B4Fmn4Ju.js} +1 -1
- package/dist/esm/sd-button-v2_2.entry.js +4 -4
- package/dist/esm/sd-button_4.entry.js +3 -3
- package/dist/esm/sd-checkbox.entry.js +1 -1
- package/dist/esm/sd-dropdown-button.entry.js +8 -8
- package/dist/esm/sd-input_2.entry.js +12 -6
- package/dist/esm/sd-loading-spinner_3.entry.js +2 -2
- package/dist/esm/sd-number-input.entry.js +182 -50
- package/dist/esm/sd-popover.entry.js +2 -2
- package/dist/esm/sd-progress.entry.js +2 -2
- package/dist/esm/sd-select-dropdown_2.entry.js +3 -3
- package/dist/esm/sd-select-group.entry.js +1 -1
- package/dist/esm/sd-select-multiple.entry.js +1 -1
- package/dist/esm/sd-select-option-group.entry.js +3 -3
- package/dist/esm/sd-select-v2-list-item_2.entry.js +5 -5
- package/dist/esm/sd-select-v2-listbox_2.entry.js +3 -3
- package/dist/esm/sd-select-v2.entry.js +3 -3
- package/dist/esm/sd-tag.entry.js +26 -26
- package/dist/esm/sd-text-link.entry.js +3 -3
- package/dist/esm/sd-textarea.entry.js +2 -2
- package/dist/esm/sd-toast-container.entry.js +1 -1
- package/dist/esm/sd-toast.entry.js +2 -2
- package/dist/esm/sd-toggle-button.entry.js +1 -1
- package/dist/esm/sd-toggle.entry.js +1 -1
- package/dist/types/components/sd-action-modal/sd-action-modal.d.ts +1 -1
- package/dist/types/components/sd-button-v2/sd-button-v2.config.d.ts +2 -1
- package/dist/types/components/sd-dropdown-button/sd-dropdown-button.config.d.ts +2 -1
- package/dist/types/components/sd-number-input/sd-number-input.config.d.ts +67 -0
- package/dist/types/components/sd-number-input/sd-number-input.d.ts +7 -2
- package/dist/types/components.d.ts +34 -5
- package/hydrate/index.js +307 -166
- package/hydrate/index.mjs +307 -166
- package/package.json +1 -1
- package/dist/components/p-B0DS3FC2.js +0 -1
- package/dist/components/p-B2GnuHlE.js +0 -1
- package/dist/components/p-BGW3nie7.js +0 -1
- package/dist/components/p-DM5hNBSY.js +0 -1
- package/dist/components/p-KOzU1j2w.js +0 -1
- package/dist/design-system/p-0c07a9be.entry.js +0 -1
- package/dist/design-system/p-3214d7c2.entry.js +0 -1
- package/dist/design-system/p-KOzU1j2w.js +0 -1
- package/dist/design-system/p-a443cbef.entry.js +0 -1
- package/dist/design-system/p-a44975fc.entry.js +0 -1
- package/dist/design-system/p-b6f4369d.entry.js +0 -1
- package/dist/design-system/p-bad64f8a.entry.js +0 -1
- package/dist/design-system/p-da57a2e6.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as o,g as i,h as e,F as s}from"./p-B8tGP77V.js";import{b as n}from"./p-KOzU1j2w.js";import{r as d}from"./p-CquSJNHV.js";import{T as a}from"./p-BeCHKP_I.js";const r={xs:Number(n.size.xs.icon),sm:Number(n.size.sm.icon),md:Number(n.size.md.icon),lg:Number(n.size.lg.icon)},l=class{constructor(i){t(this,i),this.click=o(this,"sdClick")}get el(){return i(this)}variant="primary";size="sm";color="#025497";label="";disabled=!1;type="button";icon;iconColor;iconSize;iconRight;noHover=!1;sdClass="";click;handleClick=t=>{this.disabled||this.click.emit(t)};getButtonClasses(){const t=["sd-button"];return t.push(`sd-button--${this.variant}`),t.push(`sd-button--${this.size}`),t.push(`sd-button--color-${this.color}`),this.disabled&&t.push("sd-button--disabled"),this.label&&t.push("sd-button--has-label"),this.label||!this.icon&&!this.iconRight||t.push("sd-button--icon-only"),this.noHover&&t.push("sd-button--no-hover"),t.join(" ")}render(){const t=this.getButtonClasses(),o=d(this.color);return e("button",{key:"b1436c0cdf0267446df9cd022df68a8a6c349ca5",class:`${t} ${this.sdClass}`,type:this.type,disabled:this.disabled,style:{"--button-color":o},onClick:this.handleClick},e("div",{key:"70f9450410dbc7b2603679cda397bc8f211928b1",class:"sd-button__content"},this.icon&&e("sd-icon",{key:"ab09632262d175e8dc9a31df4e673470d128b274",class:"sd-button__icon sd-button__icon--left",name:this.icon,size:this.iconSize??r[this.size],color:this.iconColor??("primary"===this.variant?"#fff":o)}),this.label&&e("div",{key:"c33e565c9108996ab4a3d84b5beaf1d8acbd5700",class:"sd-button__label"},this.label),this.iconRight&&e("sd-icon",{key:"112a9649b77e7eb67198d0bf7bf407e9f7f71cd5",class:"sd-button__icon sd-button__icon--right",name:this.iconRight,size:r[this.size],color:"primary"===this.variant?"#fff":o})))}};l.style='sd-button{display:inline-flex;width:fit-content;height:fit-content}.sd-button{--sd-button-height:34px;--sd-button-padding-x:20px;--sd-button-gap:8px;--sd-button-font-family:inherit;--sd-button-font-size:16px;--sd-button-font-weight:500;--sd-button-text-decoration:none;--sd-button-label-min-width:auto;--sd-button-icon-only-size:var(--sd-button-height);text-decoration:none;cursor:pointer;border-radius:var(--sd-button-radius-default, 4px);transition:all 0.2s ease-in-out;position:relative;overflow:hidden;white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;border:none;padding:0 var(--sd-button-padding-x);min-width:var(--sd-button-min-width, auto);min-height:var(--sd-button-height);font-family:var(--sd-button-font-family);font-size:var(--sd-button-font-size);font-weight:var(--sd-button-font-weight);text-decoration:var(--sd-button-text-decoration)}.sd-button--xs{--sd-button-height:var(--sd-button-xs-height, 24px);--sd-button-padding-x:var(--sd-button-xs-padding-x, 8px);--sd-button-gap:var(--sd-button-xs-gap, 4px);--sd-button-font-family:var(--sd-button-xs-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-xs-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-xs-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-xs-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-xs-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-xs-width, var(--sd-button-height));line-height:20px}.sd-button--sm{--sd-button-height:var(--sd-button-sm-height, 28px);--sd-button-padding-x:var(--sd-button-sm-padding-x, 12px);--sd-button-gap:var(--sd-button-sm-gap, 6px);--sd-button-font-family:var(--sd-button-sm-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-sm-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-sm-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-sm-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-sm-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-sm-width, var(--sd-button-height));line-height:20px}.sd-button--md{--sd-button-height:var(--sd-button-md-height, 34px);--sd-button-padding-x:var(--sd-button-md-padding-x, 20px);--sd-button-gap:var(--sd-button-md-gap, 8px);--sd-button-font-family:var(--sd-button-md-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-md-typography-font-size, 16px);--sd-button-font-weight:var(--sd-button-md-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-md-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-md-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-md-width, var(--sd-button-height));line-height:26px}.sd-button--lg{--sd-button-height:var(--sd-button-lg-height, 62px);--sd-button-padding-x:var(--sd-button-lg-padding-x, 28px);--sd-button-gap:var(--sd-button-lg-gap, 12px);--sd-button-font-family:var(--sd-button-lg-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-lg-typography-font-size, 18px);--sd-button-font-weight:var(--sd-button-lg-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-lg-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-lg-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-lg-width, var(--sd-button-height));line-height:30px}.sd-button--has-label{--sd-button-min-width:var(--sd-button-label-min-width, auto)}.sd-button--primary{background-color:var(--button-color);color:white;transition:filter 0.2s ease}.sd-button--primary::before{content:"";position:absolute;inset:0;background:#000000;opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--primary:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.25}.sd-button--outline{background:white;border:var(--sd-button-border-width-default, 1px) solid var(--button-color);color:var(--button-color)}.sd-button--outline::before{content:"";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--outline:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--outline .sd-button__content{position:relative;z-index:1}.sd-button--ghost{background-color:transparent;color:var(--button-color);border-color:transparent}.sd-button--ghost::before{content:"";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--ghost:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--ghost .sd-button__content{position:relative;z-index:1}.sd-button--disabled{border:var(--sd-button-border-width-default, 1px) solid var(--sd-button-border-disabled, #CCCCCC);background:var(--sd-button-bg-disabled, #E1E1E1);color:var(--sd-button-content-disabled, #888888);cursor:not-allowed !important}.sd-button--icon-only{padding:0;width:var(--sd-button-icon-only-size, var(--sd-button-height));min-width:var(--sd-button-icon-only-size, var(--sd-button-height));height:var(--sd-button-icon-only-size, var(--sd-button-height))}.sd-button--no-hover:hover::before{opacity:0 !important}.sd-button .sd-button__content{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-button-gap);z-index:1;font-weight:inherit}';var f={paddingX:"12",typography:{fontWeight:"500",fontSize:"12",lineHeight:"20"},bg:"#F6F6F6",border:{default:"#AAAAAA",disabled:"#CCCCCC"}};const h=["sd-select","sd-select-multiple","sd-select-multiple-group","sd-input","sd-barcode-input","sd-textarea","sd-number-input","sd-select-v2"],u=class{constructor(o){t(this,o)}get el(){return i(this)}name="";rules=[];error=!1;disabled=!1;hovered=!1;focused=!1;status;hint="";errorMessage="";width="";label="";addonLabel="";icon=void 0;labelTooltip="";labelTooltipProps=null;errorMsg="";hostElement=null;get value(){return this.hostElement?.value??null}get fieldStatus(){let t="";return this.disabled?(t="disabled",`sd-field--${t}`):this.focused?(t="focus",`sd-field--${t}`):(this.hovered&&(t="hover"),this.status&&(t=this.status),this.error&&(t="error"),t?`sd-field--${t}`:"")}componentDidLoad(){this.hostElement=this.findHostElement(),this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}findHostElement(){for(const t of h){const o=this.el.closest(t);if(o&&"value"in o)return o}return null}registerToForm(){const t=this.el.closest("sd-form");t&&"function"==typeof t.componentOnReady&&t.componentOnReady().then((t=>{t.sdRegisterField(this)}))}unregisterFromForm(){if(!this.name)return;const t=this.el.closest("sd-form");t?.componentOnReady().then((t=>{t.sdUnregisterField(this.name)}))}async sdValidate(){if(!this.rules||0===this.rules.length)return!0;for(const t of this.rules){const o=t(this.value??"");if(!0!==o)return this.setError(!0,o),!1}return this.setError(!1,""),!0}async sdReset(){this.hostElement&&(this.hostElement.value=null),this.setError(!1,"")}async sdResetValidation(){this.setError(!1,"")}async sdFocus(){this.hostElement?.focus?.(),this.hostElement?.scrollIntoView({behavior:"smooth",block:"center"})}setError(t,o){this.errorMsg=o,this.hostElement&&(this.hostElement.error=t)}render(){const t=this.addonLabel,o=t?{"--sd-field-addon-padding-x":`${f.paddingX}px`,"--sd-field-addon-font-size":`${f.typography.fontSize}px`,"--sd-field-addon-line-height":`${f.typography.lineHeight}px`,"--sd-field-addon-font-weight":f.typography.fontWeight,"--sd-field-addon-bg":f.bg,"--sd-field-addon-border-color":this.disabled?f.border.disabled:f.border.default}:{};return e("div",{key:"cb0844dfad82a3287253598ace0e70e761ca2cdd",class:{"sd-field":!0,"sd-field--has-label":!!this.label,"sd-field--has-addon":!!t,[this.fieldStatus]:!!this.fieldStatus},style:o},e("div",{key:"788b8352737f10eec26195931cd22a405607b2af",class:"sd-field__wrapper"},this.renderLabel(this.label),e("div",{key:"e3164e47bbeec19e7b150c3e2a7ef75a96896db4",class:{"sd-field__control":!0,"sd-field__control--has-addon":!!t},style:this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},t&&e("div",{key:"12baae30b329494312e8fe3160556717f1f8d979",class:"sd-field__addon"},t),e("slot",{key:"f231342560a5b45448ddc6ad370cce414ca68052"}))),this.errorMsg||this.errorMessage?e("div",{class:"sd-field__error-message"},this.errorMsg||this.errorMessage):this.hint&&e("div",{class:"sd-field__hint"},this.hint))}renderLabel(t){return t?e("label",{class:"sd-field__label"},this.icon&&e("sd-icon",{name:this.icon.name,size:this.icon.size??10,color:this.icon.color,rotate:this.icon.rotate,class:"sd-field__label__icon"}),e("div",{class:"sd-field__label__text"},t),this.labelTooltip&&e("sd-tooltip",{class:"sd-field__label__tooltip",...this.labelTooltipProps},e("div",{slot:"content"},this.labelTooltip))):null}};u.style="sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field:not(.sd-field--disabled):hover .sd-field__control{border:1px solid var(--sd-system-color-field-border-hover) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#E1E1E1;border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;margin-right:var(--sd-system-space-field-sm-gap)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__icon{margin-right:6px}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:12px;line-height:20px;color:var(--sd-system-color-field-text-default);white-space:nowrap}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:2px}sd-field .sd-field--has-addon .sd-field__control .sd-field__addon{display:flex;align-items:center;white-space:nowrap;padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right:1px solid var(--sd-field-addon-border-color);border-radius:calc(var(--sd-system-radius-field-sm) - 1px) 0 0 calc(var(--sd-system-radius-field-sm) - 1px)}sd-field .sd-field__wrapper{width:100%;height:var(--sd-system-size-field-sm-height);display:flex;align-items:center;flex-flow:row nowrap;position:relative;color:var(--sd-system-color-field-text-default);cursor:pointer;-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__control{position:relative;height:100%;display:flex;flex:1;min-width:0;border:1px solid var(--sd-system-color-field-border-default);border-radius:var(--sd-system-radius-field-sm);background:var(--sd-system-color-field-bg-default)}sd-field .sd-field--error:not(:hover) .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-danger) !important}sd-field .sd-field.sd-field--focus .sd-field__wrapper .sd-field__control,sd-field .sd-field.sd-field--hover .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control{border:1px solid #2BCE6C !important}sd-field .sd-field .sd-field__error-message{color:var(--sd-textinput-input-text-error-message);font-size:var(--sd-textinput-input-error-message-typography-font-size);line-height:var(--sd-textinput-input-error-message-typography-line-height);margin-top:var(--sd-textinput-input-contents-gap)}sd-field .sd-field .sd-field__hint{color:var(--sd-textinput-input-text-hint);font-size:var(--sd-textinput-input-hint-typography-font-size);line-height:var(--sd-textinput-input-hint-typography-line-height);margin-top:var(--sd-textinput-input-contents-gap)}";const c=class{constructor(i){t(this,i),this.close=o(this,"sdClose")}get el(){return i(this)}to="body";parentRef=null;offset=[0,0];zIndex=9999;placement="bottom";open=!1;close;container;wrapper;rafId;isInsideClick=!1;resizeObserver;mutationObserver;static ARROW_SIZE=11.2;componentDidLoad(){this.container=this.resolveContainer(),this.createWrapper(),this.moveSlotContent(),requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")})),this.observeParent()}componentDidRender(){this.wrapper&&(this.open?(this.wrapper.style.display="block",requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")}))):(this.wrapper.style.display="none",this.wrapper.style.visibility="hidden"))}disconnectedCallback(){this.rafId&&cancelAnimationFrame(this.rafId),this.unobserveParent(),this.wrapper?.remove()}resolveContainer(){const t="string"==typeof this.to?document.querySelector(this.to):this.to;return t instanceof HTMLElement?t:document.body}createWrapper(){this.wrapper=document.createElement("div"),Object.assign(this.wrapper.style,{position:"absolute",zIndex:(this.zIndex??9999).toString(),transition:"opacity 0.4s",top:"-9999px",left:"-9999px"}),this.container.appendChild(this.wrapper)}moveSlotContent(){this.wrapper&&Array.from(this.el.childNodes).filter((t=>t.nodeType!==Node.COMMENT_NODE)).forEach((t=>this.wrapper.appendChild(t)))}updatePosition(){this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{if(!this.parentRef||!this.wrapper)return;const t=this.parentRef.getBoundingClientRect();if(!t.width&&!t.height)return;const[o,i]=this.offset,e=c.ARROW_SIZE;let s=0,n=0;switch(this.placement){case"top":s=t.top+window.scrollY-this.wrapper.offsetHeight+i-e,n=t.left+window.scrollX+t.width/2-this.wrapper.offsetWidth/2+o;break;case"bottom":s=t.bottom+window.scrollY+i+e,n=t.left+window.scrollX+t.width/2-this.wrapper.offsetWidth/2+o;break;case"left":s=t.top+window.scrollY+t.height/2-this.wrapper.offsetHeight/2+i,n=t.left+window.scrollX-this.wrapper.offsetWidth-o-e;break;case"right":s=t.top+window.scrollY+t.height/2-this.wrapper.offsetHeight/2+i,n=t.right+window.scrollX+o+e}Object.assign(this.wrapper.style,{top:`${s}px`,left:`${n}px`})}))}observeParent(){this.parentRef&&(this.resizeObserver=new ResizeObserver((()=>this.updatePosition())),this.resizeObserver.observe(this.parentRef),this.mutationObserver=new MutationObserver((()=>this.updatePosition())),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0}))}unobserveParent(){this.resizeObserver?.disconnect(),this.mutationObserver?.disconnect()}handleMouseDown(t){this.isInsideClick=!!(this.wrapper&&this.wrapper.contains(t.target)||this.parentRef&&this.parentRef.contains(t.target))}handleWindowClick(t){this.isInsideClick?this.isInsideClick=!1:this.wrapper?.contains(t.target)||this.close.emit()}render(){return e("slot",{key:"4eecedc457f691ec888cd27da4f28aef73d14f73"})}};c.style=".sd-floating-menu{width:fit-content;padding:12px 16px;border-radius:6px;font-size:12px;font-weight:500;line-height:20px;position:relative;box-sizing:border-box;background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);animation:sd-floating-fade-in 0.35s ease-out}.sd-floating-menu--top{animation-name:sd-floating-slide-top}.sd-floating-menu--bottom{animation-name:sd-floating-slide-bottom}.sd-floating-menu--left{animation-name:sd-floating-slide-left}.sd-floating-menu--right{animation-name:sd-floating-slide-right}.sd-floating-menu .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--default{background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);font-weight:500}.sd-floating-menu--default .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--danger{background:var(--sd-floating-bg, #FCE6E6);color:var(--sd-floating-content, #FB4444);font-weight:700}.sd-floating-menu--danger .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FCE6E6)}.sd-floating-menu--warning{background:var(--sd-floating-bg, #FEF1EA);color:var(--sd-floating-content, #FF6B00);font-weight:700}.sd-floating-menu--warning .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FEF1EA)}.sd-floating-menu--accent{background:var(--sd-floating-bg, #E6F1FF);color:var(--sd-floating-content, #0075FF);font-weight:700}.sd-floating-menu--accent .sd-floating-menu__arrow{color:var(--sd-floating-bg, #E6F1FF)}.sd-floating-menu__arrow{position:absolute;display:flex;width:16px;height:12px}.sd-floating-menu__arrow svg{width:100%;height:100%}.sd-floating-menu__arrow--top{bottom:-12px;left:50%;transform:translateX(-50%)}.sd-floating-menu__arrow--bottom{top:-12px;left:50%;transform:translateX(-50%) rotate(180deg)}.sd-floating-menu__arrow--left{right:-12px;top:50%;transform:translateY(-50%) rotate(-90deg)}.sd-floating-menu__arrow--right{left:-12px;top:50%;transform:translateY(-50%) rotate(90deg)}.sd-floating-menu__content{font-size:12px;line-height:20px}.sd-floating-menu__content .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px;margin-bottom:4px}.sd-floating-menu__content .sd-floating-menu__messages{font-weight:500}.sd-floating-menu__content .sd-floating-menu__buttons{margin-top:12px;display:flex;gap:8px;align-items:center}.sd-floating-menu__content .sd-floating-menu__buttons--1{justify-content:flex-end}.sd-floating-menu__content .sd-floating-menu__buttons--2{justify-content:space-between}.sd-floating-menu--popover{padding:16px 20px}.sd-floating-menu--popover .sd-floating-menu__content{gap:4px}.sd-floating-menu--popover .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px}.sd-floating-menu--popover .sd-floating-menu__messages{font-size:12px;font-weight:500;line-height:20px}.sd-floating-menu--closing{animation:sd-floating-fade-out 0.15s ease-in forwards}.sd-floating-menu--closing.sd-floating-menu--top{animation-name:sd-floating-slide-out-top}.sd-floating-menu--closing.sd-floating-menu--bottom{animation-name:sd-floating-slide-out-bottom}.sd-floating-menu--closing.sd-floating-menu--left{animation-name:sd-floating-slide-out-left}.sd-floating-menu--closing.sd-floating-menu--right{animation-name:sd-floating-slide-out-right}.sd-floating-menu__close-button{position:absolute;top:12px;right:12px;padding:0;background:none;border:none;cursor:pointer}@keyframes sd-floating-fade-out{from{opacity:1}to{opacity:0}}@keyframes sd-floating-slide-out-top{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}@keyframes sd-floating-slide-out-bottom{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}@keyframes sd-floating-slide-out-left{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(4px)}}@keyframes sd-floating-slide-out-right{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-4px)}}@keyframes sd-floating-fade-in{from{opacity:0}to{opacity:1}}@keyframes sd-floating-slide-top{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes sd-floating-slide-bottom{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes sd-floating-slide-left{from{opacity:0;transform:translateX(4px)}to{opacity:1;transform:translateX(0)}}@keyframes sd-floating-slide-right{from{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:translateX(0)}}";var b={bg:"#07284A",content:"#FFFFFF"},p={bg:"#FCEFEF",content:"#FB4444"},g={bg:"#FEF1EA",content:"#FF6B00"},m={bg:"#E6F1FF",content:"#0075FF"};const v={default:{bg:b.bg,content:b.content},danger:{bg:p.bg,content:p.content},warning:{bg:g.bg,content:g.content},accent:{bg:m.bg,content:m.content}},y=class{constructor(o){t(this,o)}get el(){return i(this)}trigger="hover";placement="top";color="#01BB4B";tooltipType="default";icon="helpOutline";iconSize=12;label="";buttonSize="sm";buttonVariant="primary";noHover=!0;sdClass="";showTooltip=!1;slotContentHTML="";buttonEl;menuEl;hideTimeout;closeTimeout;static CLOSE_ANIM_MS=150;show=()=>{this.cancelHideTimer(),this.showTooltip=!0,this.menuEl&&this.menuEl.classList.remove("sd-floating-menu--closing")};hide=()=>{this.menuEl&&this.menuEl.classList.add("sd-floating-menu--closing"),this.closeTimeout=setTimeout((()=>{this.showTooltip=!1}),y.CLOSE_ANIM_MS)};startHideTimer=()=>{this.hideTimeout=setTimeout((()=>this.hide()),100)};cancelHideTimer=()=>{this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=void 0),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=void 0)};get tooltipOffset(){switch(this.placement??"top"){case"top":return[0,-4];case"bottom":return[0,4];case"left":case"right":return[4,0]}}handleClose=()=>this.hide();componentWillLoad(){this.slotContentHTML=this.el.innerHTML,this.el.replaceChildren(),this.el.classList.toggle("visible",!0)}render(){const t=this.trigger??"hover",o=this.placement??"top",i=this.tooltipType??"default",n=this.icon??"helpOutline",d=this.color??"#01BB4B",r=v[i]??v.default,l=()=>this.showTooltip=!this.showTooltip;return e(s,{key:"fbaaa9712e6e04e28d196f05891f6ea0cb261426"},e("div",{key:"793b08b8ba729dfb0e4769ff44ec93115566546e",class:this.sdClass,..."hover"===t?{onMouseEnter:()=>this.show(),onMouseLeave:()=>this.startHideTimer()}:this.label?{}:{onClick:l}},this.label?e("sd-button",{ref:t=>this.buttonEl=t,label:this.label,icon:n,size:this.buttonSize??"sm",color:d,variant:this.buttonVariant??"primary",class:"sd-tooltip",..."click"===t&&this.label?{onSdClick:l}:{}}):e("sd-icon",{ref:t=>this.buttonEl=t,name:n,size:this.iconSize??12,color:d,class:"sd-tooltip"})),this.showTooltip&&e("sd-floating-portal",{key:"c1f24c912b11ec6d096741aaa8e2d0b92694a2f1",parentRef:this.buttonEl,onSdClose:this.handleClose.bind(this),placement:o,offset:this.tooltipOffset},e("div",{key:"a63bdb92a4d91e208a748cc6313572f6b137346e",ref:t=>this.menuEl=t,class:{"sd-floating-menu":!0,[`sd-floating-menu--${i}`]:!0,[`sd-floating-menu--${o}`]:!0},style:{"--sd-floating-bg":r.bg,"--sd-floating-content":r.content},onMouseEnter:()=>this.show(),onMouseLeave:()=>this.startHideTimer()},e("i",{key:"b4b82dd27600f870ff65ac35044a1b7d364dc6f0",class:`sd-floating-menu__arrow sd-floating-menu__arrow--${o}`},e(a,{key:"99aa457d00d04e8f08b1648a3fd7ffc589b61629"})),e("div",{key:"cba1a4fa48d63c1a68cc2c46972eacc57eef5611",class:"sd-floating-menu__content",innerHTML:this.slotContentHTML}))))}};y.style="sd-tooltip{visibility:hidden !important;display:inline-flex}sd-tooltip.visible{visibility:visible !important}sd-tooltip .sd-tooltip{position:relative;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}";export{l as sd_button,u as sd_field,c as sd_floating_portal,y as sd_tooltip}
|
|
1
|
+
import{r as t,c as o,g as e,h as i,F as s}from"./p-B8tGP77V.js";import{b as n}from"./p-DwYSoCyW.js";import{r as d}from"./p-CquSJNHV.js";import{T as a}from"./p-BeCHKP_I.js";const r={xs:Number(n.size.xs.icon),sm:Number(n.size.sm.icon),md:Number(n.size.md.icon),lg:Number(n.size.lg.icon)},l=class{constructor(e){t(this,e),this.click=o(this,"sdClick")}get el(){return e(this)}variant="primary";size="sm";color="#025497";label="";disabled=!1;type="button";icon;iconColor;iconSize;iconRight;noHover=!1;sdClass="";click;handleClick=t=>{this.disabled||this.click.emit(t)};getButtonClasses(){const t=["sd-button"];return t.push(`sd-button--${this.variant}`),t.push(`sd-button--${this.size}`),t.push(`sd-button--color-${this.color}`),this.disabled&&t.push("sd-button--disabled"),this.label&&t.push("sd-button--has-label"),this.label||!this.icon&&!this.iconRight||t.push("sd-button--icon-only"),this.noHover&&t.push("sd-button--no-hover"),t.join(" ")}render(){const t=this.getButtonClasses(),o=d(this.color);return i("button",{key:"b1436c0cdf0267446df9cd022df68a8a6c349ca5",class:`${t} ${this.sdClass}`,type:this.type,disabled:this.disabled,style:{"--button-color":o},onClick:this.handleClick},i("div",{key:"70f9450410dbc7b2603679cda397bc8f211928b1",class:"sd-button__content"},this.icon&&i("sd-icon",{key:"ab09632262d175e8dc9a31df4e673470d128b274",class:"sd-button__icon sd-button__icon--left",name:this.icon,size:this.iconSize??r[this.size],color:this.iconColor??("primary"===this.variant?"#fff":o)}),this.label&&i("div",{key:"c33e565c9108996ab4a3d84b5beaf1d8acbd5700",class:"sd-button__label"},this.label),this.iconRight&&i("sd-icon",{key:"112a9649b77e7eb67198d0bf7bf407e9f7f71cd5",class:"sd-button__icon sd-button__icon--right",name:this.iconRight,size:r[this.size],color:"primary"===this.variant?"#fff":o})))}};l.style='sd-button{display:inline-flex;width:fit-content;height:fit-content}.sd-button{--sd-button-height:34px;--sd-button-padding-x:20px;--sd-button-gap:8px;--sd-button-font-family:inherit;--sd-button-font-size:16px;--sd-button-font-weight:500;--sd-button-text-decoration:none;--sd-button-label-min-width:auto;--sd-button-icon-only-size:var(--sd-button-height);text-decoration:none;cursor:pointer;border-radius:var(--sd-button-radius-default, 4px);transition:all 0.2s ease-in-out;position:relative;overflow:hidden;white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;border:none;padding:0 var(--sd-button-padding-x);min-width:var(--sd-button-min-width, auto);min-height:var(--sd-button-height);font-family:var(--sd-button-font-family);font-size:var(--sd-button-font-size);font-weight:var(--sd-button-font-weight);text-decoration:var(--sd-button-text-decoration)}.sd-button--xs{--sd-button-height:var(--sd-button-xs-height, 24px);--sd-button-padding-x:var(--sd-button-xs-padding-x, 8px);--sd-button-gap:var(--sd-button-xs-gap, 4px);--sd-button-font-family:var(--sd-button-xs-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-xs-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-xs-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-xs-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-xs-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-xs-width, var(--sd-button-height));line-height:20px}.sd-button--sm{--sd-button-height:var(--sd-button-sm-height, 28px);--sd-button-padding-x:var(--sd-button-sm-padding-x, 12px);--sd-button-gap:var(--sd-button-sm-gap, 6px);--sd-button-font-family:var(--sd-button-sm-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-sm-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-sm-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-sm-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-sm-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-sm-width, var(--sd-button-height));line-height:20px}.sd-button--md{--sd-button-height:var(--sd-button-md-height, 34px);--sd-button-padding-x:var(--sd-button-md-padding-x, 20px);--sd-button-gap:var(--sd-button-md-gap, 8px);--sd-button-font-family:var(--sd-button-md-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-md-typography-font-size, 16px);--sd-button-font-weight:var(--sd-button-md-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-md-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-md-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-md-width, var(--sd-button-height));line-height:26px}.sd-button--lg{--sd-button-height:var(--sd-button-lg-height, 62px);--sd-button-padding-x:var(--sd-button-lg-padding-x, 28px);--sd-button-gap:var(--sd-button-lg-gap, 12px);--sd-button-font-family:var(--sd-button-lg-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-lg-typography-font-size, 18px);--sd-button-font-weight:var(--sd-button-lg-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-lg-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-lg-min-width, auto);--sd-button-icon-only-size:var(--sd-button-icon-only-lg-width, var(--sd-button-height));line-height:30px}.sd-button--has-label{--sd-button-min-width:var(--sd-button-label-min-width, auto)}.sd-button--primary{background-color:var(--button-color);color:white;transition:filter 0.2s ease}.sd-button--primary::before{content:"";position:absolute;inset:0;background:#000000;opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--primary:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.25}.sd-button--outline{background:white;border:var(--sd-button-border-width-default, 1px) solid var(--button-color);color:var(--button-color)}.sd-button--outline::before{content:"";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--outline:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--outline .sd-button__content{position:relative;z-index:1}.sd-button--ghost{background-color:transparent;color:var(--button-color);border-color:transparent}.sd-button--ghost::before{content:"";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--ghost:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--ghost .sd-button__content{position:relative;z-index:1}.sd-button--disabled{border:var(--sd-button-border-width-default, 1px) solid var(--sd-button-border-disabled, #CCCCCC);background:var(--sd-button-bg-disabled, #E1E1E1);color:var(--sd-button-content-disabled, #888888);cursor:not-allowed !important}.sd-button--icon-only{padding:0;width:var(--sd-button-icon-only-size, var(--sd-button-height));min-width:var(--sd-button-icon-only-size, var(--sd-button-height));height:var(--sd-button-icon-only-size, var(--sd-button-height))}.sd-button--no-hover:hover::before{opacity:0 !important}.sd-button .sd-button__content{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-button-gap);z-index:1;font-weight:inherit}';var f={paddingX:"12",typography:{fontWeight:"500",fontSize:"12",lineHeight:"20"},bg:"#F6F6F6",border:{default:"#AAAAAA",disabled:"#CCCCCC"}};const h=["sd-select","sd-select-multiple","sd-select-multiple-group","sd-input","sd-barcode-input","sd-textarea","sd-number-input","sd-select-v2"],u=class{constructor(o){t(this,o)}get el(){return e(this)}name="";rules=[];error=!1;disabled=!1;hovered=!1;focused=!1;status;hint="";errorMessage="";width="";label="";addonLabel="";icon=void 0;labelTooltip="";labelTooltipProps=null;errorMsg="";hostElement=null;get value(){return this.hostElement?.value??null}get fieldStatus(){let t="";return this.disabled?(t="disabled",`sd-field--${t}`):this.focused?(t="focus",`sd-field--${t}`):(this.hovered&&(t="hover"),this.status&&(t=this.status),this.error&&(t="error"),t?`sd-field--${t}`:"")}componentDidLoad(){this.hostElement=this.findHostElement(),this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}findHostElement(){for(const t of h){const o=this.el.closest(t);if(o&&"value"in o)return o}return null}registerToForm(){const t=this.el.closest("sd-form");t&&"function"==typeof t.componentOnReady&&t.componentOnReady().then((t=>{t.sdRegisterField(this)}))}unregisterFromForm(){if(!this.name)return;const t=this.el.closest("sd-form");t?.componentOnReady().then((t=>{t.sdUnregisterField(this.name)}))}async sdValidate(){if(!this.rules||0===this.rules.length)return!0;for(const t of this.rules){const o=t(this.value??"");if(!0!==o)return this.setError(!0,o),!1}return this.setError(!1,""),!0}async sdReset(){this.hostElement&&(this.hostElement.value=null),this.setError(!1,"")}async sdResetValidation(){this.setError(!1,"")}async sdFocus(){this.hostElement?.focus?.(),this.hostElement?.scrollIntoView({behavior:"smooth",block:"center"})}setError(t,o){this.errorMsg=o,this.hostElement&&(this.hostElement.error=t)}render(){const t=this.addonLabel,o=t?{"--sd-field-addon-padding-x":`${f.paddingX}px`,"--sd-field-addon-font-size":`${f.typography.fontSize}px`,"--sd-field-addon-line-height":`${f.typography.lineHeight}px`,"--sd-field-addon-font-weight":f.typography.fontWeight,"--sd-field-addon-bg":f.bg,"--sd-field-addon-border-color":this.disabled?f.border.disabled:f.border.default}:{};return i("div",{key:"cb0844dfad82a3287253598ace0e70e761ca2cdd",class:{"sd-field":!0,"sd-field--has-label":!!this.label,"sd-field--has-addon":!!t,[this.fieldStatus]:!!this.fieldStatus},style:o},i("div",{key:"788b8352737f10eec26195931cd22a405607b2af",class:"sd-field__wrapper"},this.renderLabel(this.label),i("div",{key:"e3164e47bbeec19e7b150c3e2a7ef75a96896db4",class:{"sd-field__control":!0,"sd-field__control--has-addon":!!t},style:this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},t&&i("div",{key:"12baae30b329494312e8fe3160556717f1f8d979",class:"sd-field__addon"},t),i("slot",{key:"f231342560a5b45448ddc6ad370cce414ca68052"}))),this.errorMsg||this.errorMessage?i("div",{class:"sd-field__error-message"},this.errorMsg||this.errorMessage):this.hint&&i("div",{class:"sd-field__hint"},this.hint))}renderLabel(t){return t?i("label",{class:"sd-field__label"},this.icon&&i("sd-icon",{name:this.icon.name,size:this.icon.size??10,color:this.icon.color,rotate:this.icon.rotate,class:"sd-field__label__icon"}),i("div",{class:"sd-field__label__text"},t),this.labelTooltip&&i("sd-tooltip",{class:"sd-field__label__tooltip",...this.labelTooltipProps},i("div",{slot:"content"},this.labelTooltip))):null}};u.style="sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field:not(.sd-field--disabled):hover .sd-field__control{border:1px solid var(--sd-system-color-field-border-hover) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#E1E1E1;border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;margin-right:var(--sd-system-space-field-sm-gap)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__icon{margin-right:6px}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:12px;line-height:20px;color:var(--sd-system-color-field-text-default);white-space:nowrap}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:2px}sd-field .sd-field--has-addon .sd-field__control .sd-field__addon{display:flex;align-items:center;white-space:nowrap;padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right:1px solid var(--sd-field-addon-border-color);border-radius:calc(var(--sd-system-radius-field-sm) - 1px) 0 0 calc(var(--sd-system-radius-field-sm) - 1px)}sd-field .sd-field__wrapper{width:100%;height:var(--sd-system-size-field-sm-height);display:flex;align-items:center;flex-flow:row nowrap;position:relative;color:var(--sd-system-color-field-text-default);cursor:pointer;-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__control{position:relative;height:100%;display:flex;flex:1;min-width:0;border:1px solid var(--sd-system-color-field-border-default);border-radius:var(--sd-system-radius-field-sm);background:var(--sd-system-color-field-bg-default)}sd-field .sd-field--error:not(:hover) .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-danger) !important}sd-field .sd-field.sd-field--focus .sd-field__wrapper .sd-field__control,sd-field .sd-field.sd-field--hover .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control{border:1px solid #2BCE6C !important}sd-field .sd-field .sd-field__error-message{color:var(--sd-textinput-input-text-error-message);font-size:var(--sd-textinput-input-error-message-typography-font-size);line-height:var(--sd-textinput-input-error-message-typography-line-height);margin-top:var(--sd-textinput-input-contents-gap)}sd-field .sd-field .sd-field__hint{color:var(--sd-textinput-input-text-hint);font-size:var(--sd-textinput-input-hint-typography-font-size);line-height:var(--sd-textinput-input-hint-typography-line-height);margin-top:var(--sd-textinput-input-contents-gap)}";const c=class{constructor(e){t(this,e),this.close=o(this,"sdClose")}get el(){return e(this)}to="body";parentRef=null;offset=[0,0];zIndex=9999;placement="bottom";open=!1;close;container;wrapper;rafId;isInsideClick=!1;resizeObserver;mutationObserver;static ARROW_SIZE=11.2;componentDidLoad(){this.container=this.resolveContainer(),this.createWrapper(),this.moveSlotContent(),requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")})),this.observeParent()}componentDidRender(){this.wrapper&&(this.open?(this.wrapper.style.display="block",requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")}))):(this.wrapper.style.display="none",this.wrapper.style.visibility="hidden"))}disconnectedCallback(){this.rafId&&cancelAnimationFrame(this.rafId),this.unobserveParent(),this.wrapper?.remove()}resolveContainer(){const t="string"==typeof this.to?document.querySelector(this.to):this.to;return t instanceof HTMLElement?t:document.body}createWrapper(){this.wrapper=document.createElement("div"),Object.assign(this.wrapper.style,{position:"absolute",zIndex:(this.zIndex??9999).toString(),transition:"opacity 0.4s",top:"-9999px",left:"-9999px"}),this.container.appendChild(this.wrapper)}moveSlotContent(){this.wrapper&&Array.from(this.el.childNodes).filter((t=>t.nodeType!==Node.COMMENT_NODE)).forEach((t=>this.wrapper.appendChild(t)))}updatePosition(){this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{if(!this.parentRef||!this.wrapper)return;const t=this.parentRef.getBoundingClientRect();if(!t.width&&!t.height)return;const[o,e]=this.offset,i=c.ARROW_SIZE;let s=0,n=0;switch(this.placement){case"top":s=t.top+window.scrollY-this.wrapper.offsetHeight+e-i,n=t.left+window.scrollX+t.width/2-this.wrapper.offsetWidth/2+o;break;case"bottom":s=t.bottom+window.scrollY+e+i,n=t.left+window.scrollX+t.width/2-this.wrapper.offsetWidth/2+o;break;case"left":s=t.top+window.scrollY+t.height/2-this.wrapper.offsetHeight/2+e,n=t.left+window.scrollX-this.wrapper.offsetWidth-o-i;break;case"right":s=t.top+window.scrollY+t.height/2-this.wrapper.offsetHeight/2+e,n=t.right+window.scrollX+o+i}Object.assign(this.wrapper.style,{top:`${s}px`,left:`${n}px`})}))}observeParent(){this.parentRef&&(this.resizeObserver=new ResizeObserver((()=>this.updatePosition())),this.resizeObserver.observe(this.parentRef),this.mutationObserver=new MutationObserver((()=>this.updatePosition())),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0}))}unobserveParent(){this.resizeObserver?.disconnect(),this.mutationObserver?.disconnect()}handleMouseDown(t){this.isInsideClick=!!(this.wrapper&&this.wrapper.contains(t.target)||this.parentRef&&this.parentRef.contains(t.target))}handleWindowClick(t){this.isInsideClick?this.isInsideClick=!1:this.wrapper?.contains(t.target)||this.close.emit()}render(){return i("slot",{key:"4eecedc457f691ec888cd27da4f28aef73d14f73"})}};c.style=".sd-floating-menu{width:fit-content;padding:12px 16px;border-radius:6px;font-size:12px;font-weight:500;line-height:20px;position:relative;box-sizing:border-box;background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);animation:sd-floating-fade-in 0.35s ease-out}.sd-floating-menu--top{animation-name:sd-floating-slide-top}.sd-floating-menu--bottom{animation-name:sd-floating-slide-bottom}.sd-floating-menu--left{animation-name:sd-floating-slide-left}.sd-floating-menu--right{animation-name:sd-floating-slide-right}.sd-floating-menu .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--default{background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);font-weight:500}.sd-floating-menu--default .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--danger{background:var(--sd-floating-bg, #FCE6E6);color:var(--sd-floating-content, #FB4444);font-weight:700}.sd-floating-menu--danger .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FCE6E6)}.sd-floating-menu--warning{background:var(--sd-floating-bg, #FEF1EA);color:var(--sd-floating-content, #FF6B00);font-weight:700}.sd-floating-menu--warning .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FEF1EA)}.sd-floating-menu--accent{background:var(--sd-floating-bg, #E6F1FF);color:var(--sd-floating-content, #0075FF);font-weight:700}.sd-floating-menu--accent .sd-floating-menu__arrow{color:var(--sd-floating-bg, #E6F1FF)}.sd-floating-menu__arrow{position:absolute;display:flex;width:16px;height:12px}.sd-floating-menu__arrow svg{width:100%;height:100%}.sd-floating-menu__arrow--top{bottom:-12px;left:50%;transform:translateX(-50%)}.sd-floating-menu__arrow--bottom{top:-12px;left:50%;transform:translateX(-50%) rotate(180deg)}.sd-floating-menu__arrow--left{right:-12px;top:50%;transform:translateY(-50%) rotate(-90deg)}.sd-floating-menu__arrow--right{left:-12px;top:50%;transform:translateY(-50%) rotate(90deg)}.sd-floating-menu__content{font-size:12px;line-height:20px}.sd-floating-menu__content .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px;margin-bottom:4px}.sd-floating-menu__content .sd-floating-menu__messages{font-weight:500}.sd-floating-menu__content .sd-floating-menu__buttons{margin-top:12px;display:flex;gap:8px;align-items:center}.sd-floating-menu__content .sd-floating-menu__buttons--1{justify-content:flex-end}.sd-floating-menu__content .sd-floating-menu__buttons--2{justify-content:space-between}.sd-floating-menu--popover{padding:16px 20px}.sd-floating-menu--popover .sd-floating-menu__content{gap:4px}.sd-floating-menu--popover .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px}.sd-floating-menu--popover .sd-floating-menu__messages{font-size:12px;font-weight:500;line-height:20px}.sd-floating-menu--closing{animation:sd-floating-fade-out 0.15s ease-in forwards}.sd-floating-menu--closing.sd-floating-menu--top{animation-name:sd-floating-slide-out-top}.sd-floating-menu--closing.sd-floating-menu--bottom{animation-name:sd-floating-slide-out-bottom}.sd-floating-menu--closing.sd-floating-menu--left{animation-name:sd-floating-slide-out-left}.sd-floating-menu--closing.sd-floating-menu--right{animation-name:sd-floating-slide-out-right}.sd-floating-menu__close-button{position:absolute;top:12px;right:12px;padding:0;background:none;border:none;cursor:pointer}@keyframes sd-floating-fade-out{from{opacity:1}to{opacity:0}}@keyframes sd-floating-slide-out-top{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}@keyframes sd-floating-slide-out-bottom{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}@keyframes sd-floating-slide-out-left{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(4px)}}@keyframes sd-floating-slide-out-right{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-4px)}}@keyframes sd-floating-fade-in{from{opacity:0}to{opacity:1}}@keyframes sd-floating-slide-top{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes sd-floating-slide-bottom{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes sd-floating-slide-left{from{opacity:0;transform:translateX(4px)}to{opacity:1;transform:translateX(0)}}@keyframes sd-floating-slide-right{from{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:translateX(0)}}";var b={bg:"#07284A",content:"#FFFFFF"},p={bg:"#FCEFEF",content:"#FB4444"},g={bg:"#FEF1EA",content:"#FF6B00"},m={bg:"#E6F1FF",content:"#0075FF"};const v={default:{bg:b.bg,content:b.content},danger:{bg:p.bg,content:p.content},warning:{bg:g.bg,content:g.content},accent:{bg:m.bg,content:m.content}},y=class{constructor(o){t(this,o)}get el(){return e(this)}trigger="hover";placement="top";color="#01BB4B";tooltipType="default";icon="helpOutline";iconSize=12;label="";buttonSize="sm";buttonVariant="primary";noHover=!0;sdClass="";showTooltip=!1;slotContentHTML="";buttonEl;menuEl;hideTimeout;closeTimeout;static CLOSE_ANIM_MS=150;show=()=>{this.cancelHideTimer(),this.showTooltip=!0,this.menuEl&&this.menuEl.classList.remove("sd-floating-menu--closing")};hide=()=>{this.menuEl&&this.menuEl.classList.add("sd-floating-menu--closing"),this.closeTimeout=setTimeout((()=>{this.showTooltip=!1}),y.CLOSE_ANIM_MS)};startHideTimer=()=>{this.hideTimeout=setTimeout((()=>this.hide()),100)};cancelHideTimer=()=>{this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=void 0),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=void 0)};get tooltipOffset(){switch(this.placement??"top"){case"top":return[0,-4];case"bottom":return[0,4];case"left":case"right":return[4,0]}}handleClose=()=>this.hide();componentWillLoad(){this.slotContentHTML=this.el.innerHTML,this.el.replaceChildren(),this.el.classList.toggle("visible",!0)}render(){const t=this.trigger??"hover",o=this.placement??"top",e=this.tooltipType??"default",n=this.icon??"helpOutline",d=this.color??"#01BB4B",r=v[e]??v.default,l=()=>this.showTooltip=!this.showTooltip;return i(s,{key:"7e3dfc0d59b38a483e8384ed52d70e0f4f4f7131"},i("div",{key:"19b2b9ad1f936ea356baec15b0b3cb45c983cd47",class:this.sdClass,..."hover"===t?{onMouseEnter:()=>this.show(),onMouseLeave:()=>this.startHideTimer()}:this.label?{}:{onClick:l}},this.label?i("sd-button",{ref:t=>this.buttonEl=t,label:this.label,icon:n,size:this.buttonSize??"sm",color:d,variant:this.buttonVariant??"primary",class:"sd-tooltip",..."click"===t&&this.label?{onSdClick:l}:{}}):i("sd-icon",{ref:t=>this.buttonEl=t,name:n,size:this.iconSize??12,color:d,class:"sd-tooltip"})),this.showTooltip&&i("sd-floating-portal",{key:"4cfb1f9a16c962fd75bc8b419ea1b76495b32926",parentRef:this.buttonEl,onSdClose:this.handleClose.bind(this),placement:o,offset:this.tooltipOffset},i("div",{key:"81f043186ed76dc205c87facea044aecc92222ad",ref:t=>this.menuEl=t,class:{"sd-floating-menu":!0,[`sd-floating-menu--${e}`]:!0,[`sd-floating-menu--${o}`]:!0},style:{"--sd-floating-bg":r.bg,"--sd-floating-content":r.content},onMouseEnter:()=>this.show(),onMouseLeave:()=>this.startHideTimer()},i("i",{key:"6fa21e81b5de268176ea49c02c7712f8c916ba2e",class:`sd-floating-menu__arrow sd-floating-menu__arrow--${o}`},i(a,{key:"3592d2d2306257b778ecd2092a140c3926792c89"})),i("div",{key:"0439204e3e8ba3f05b48929ee1db0dadff5d586c",class:"sd-floating-menu__content",innerHTML:this.slotContentHTML}))))}};y.style="sd-tooltip{visibility:hidden !important;display:inline-flex}sd-tooltip.visible{visibility:visible !important}sd-tooltip .sd-tooltip{position:relative;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}";export{l as sd_button,u as sd_field,c as sd_floating_portal,y as sd_tooltip}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as s,g as i}from"./p-B8tGP77V.js";const o=class{constructor(s){t(this,s),this.optionClick=e(this,"sdOptionClick"),this.optionFiltered=e(this,"sdOptionFiltered"),this.scroll=e(this,"sdScroll")}itemIndex;value=null;options;width;dropdownHeight;searchable;optionPlaceholder;useCheckbox=!1;useAll=!1;filteredOptions=[];searchText=null;isScrolled=!1;isDropdownReady=!1;optionClick;optionFiltered;scroll;filteredOptionsChanged(t){this.optionFiltered.emit(t)}searchTextChanged(){this.filterOptions()}async itemIndexChanged(t,e){if(this.searchable){const t=await this.getNativeInputElement();if(-1===this.itemIndex)return void t?.focus({preventScroll:!0});t?.matches(":focus")&&t?.blur()}const s=this.dropdownRef?.querySelectorAll(".sd-select-dropdown sd-select-option")||[],i=s?.[this.itemIndex];i&&(this.optionRef=i,await this.optionRef.sdIsDisabled()?t>e?this.itemIndex++:this.itemIndex--:this.scrollToOption(i))}componentWillLoad(){this.filteredOptions=this.options,requestAnimationFrame((()=>{requestAnimationFrame((async()=>{const t=this.getSelectedOption();if(t){const e=Array.isArray(t)?this.options.indexOf(t[0]):this.options.indexOf(t),s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option")||[]),i=Math.min((this.useAll?e+1:e)+4,s.length-1),o=s?.[i];o&&this.scrollToOption(o,"instant")}if(this.isDropdownReady=!0,this.searchable){const t=await this.getNativeInputElement();t&&requestAnimationFrame((()=>{t.focus({preventScroll:!0})}))}}))}))}dropdownRef;searchRef;optionRef;get dropdownSize(){return{"--select-dropdown-width":this.width||"200px","--select-dropdown-height":this.dropdownHeight||"260px"}}filterOptions(){this.filteredOptions=this.searchText&&""!==this.searchText.trim()?this.options.filter((t=>t.label.toLowerCase().includes(this.searchText.toLowerCase()))):this.options}getSelectedOption(){return"object"!=typeof this.value?this.options.find((t=>t.value===this.value)):this.options.filter((t=>this.value?.includes(t)))}isOptionSelected(t){return Array.isArray(this.value)?this.value.some((e=>e.value===t)):t===this.value}async getNativeInputElement(){return this.searchRef?this.searchRef.sdGetNativeElement():null}scrollToOption(t,e="smooth"){if(!this.dropdownRef||!t)return;const s=this.dropdownRef,i=t.offsetTop,o=t.offsetHeight,n=s.scrollTop,d=s.clientHeight,l=s.querySelector(".sd-select-search-input"),c=l?l.offsetHeight:0,h=n+d;i<n+c?s.scrollTo({top:i-c,behavior:e}):i+o>h&&s.scrollTo({top:i+o-d+c,behavior:e})}handleDropdownScroll=t=>{this.isScrolled=t.target.scrollTop>0};render(){return s("div",{key:"
|
|
1
|
+
import{r as t,c as e,h as s,g as i}from"./p-B8tGP77V.js";const o=class{constructor(s){t(this,s),this.optionClick=e(this,"sdOptionClick"),this.optionFiltered=e(this,"sdOptionFiltered"),this.scroll=e(this,"sdScroll")}itemIndex;value=null;options;width;dropdownHeight;searchable;optionPlaceholder;useCheckbox=!1;useAll=!1;filteredOptions=[];searchText=null;isScrolled=!1;isDropdownReady=!1;optionClick;optionFiltered;scroll;filteredOptionsChanged(t){this.optionFiltered.emit(t)}searchTextChanged(){this.filterOptions()}async itemIndexChanged(t,e){if(this.searchable){const t=await this.getNativeInputElement();if(-1===this.itemIndex)return void t?.focus({preventScroll:!0});t?.matches(":focus")&&t?.blur()}const s=this.dropdownRef?.querySelectorAll(".sd-select-dropdown sd-select-option")||[],i=s?.[this.itemIndex];i&&(this.optionRef=i,await this.optionRef.sdIsDisabled()?t>e?this.itemIndex++:this.itemIndex--:this.scrollToOption(i))}componentWillLoad(){this.filteredOptions=this.options,requestAnimationFrame((()=>{requestAnimationFrame((async()=>{const t=this.getSelectedOption();if(t){const e=Array.isArray(t)?this.options.indexOf(t[0]):this.options.indexOf(t),s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option")||[]),i=Math.min((this.useAll?e+1:e)+4,s.length-1),o=s?.[i];o&&this.scrollToOption(o,"instant")}if(this.isDropdownReady=!0,this.searchable){const t=await this.getNativeInputElement();t&&requestAnimationFrame((()=>{t.focus({preventScroll:!0})}))}}))}))}dropdownRef;searchRef;optionRef;get dropdownSize(){return{"--select-dropdown-width":this.width||"200px","--select-dropdown-height":this.dropdownHeight||"260px"}}filterOptions(){this.filteredOptions=this.searchText&&""!==this.searchText.trim()?this.options.filter((t=>t.label.toLowerCase().includes(this.searchText.toLowerCase()))):this.options}getSelectedOption(){return"object"!=typeof this.value?this.options.find((t=>t.value===this.value)):this.options.filter((t=>this.value?.includes(t)))}isOptionSelected(t){return Array.isArray(this.value)?this.value.some((e=>e.value===t)):t===this.value}async getNativeInputElement(){return this.searchRef?this.searchRef.sdGetNativeElement():null}scrollToOption(t,e="smooth"){if(!this.dropdownRef||!t)return;const s=this.dropdownRef,i=t.offsetTop,o=t.offsetHeight,n=s.scrollTop,d=s.clientHeight,l=s.querySelector(".sd-select-search-input"),c=l?l.offsetHeight:0,h=n+d;i<n+c?s.scrollTo({top:i-c,behavior:e}):i+o>h&&s.scrollTo({top:i+o-d+c,behavior:e})}handleDropdownScroll=t=>{this.isScrolled=t.target.scrollTop>0};render(){return s("div",{key:"0e45aa22a4566ec4a1a4f8dbecd2f60a024b0a34",class:{"sd-select-dropdown":!0,"sd-select-dropdown--ready":this.isDropdownReady},style:this.dropdownSize,onScroll:this.handleDropdownScroll,ref:t=>this.dropdownRef=t},this.searchable&&s("sd-select-search-input",{key:"c8f63d17ec76fff2bbb36773baa2dc015396956a",ref:t=>this.searchRef=t,isScrolled:this.isScrolled,searchText:this.searchText,onSdSearchInput:t=>this.searchText=t.detail||"",onSdSearchFocus:()=>this.itemIndex=-1}),this.filteredOptions.length>0?this.filteredOptions.map(((t,e)=>s("slot",{name:`option-${t.value}`},s("sd-select-option",{option:t,index:e,isSelected:this.isOptionSelected(t.value),isFocused:e===this.itemIndex,onOptionClick:({detail:t})=>this.optionClick.emit(t),useCheckbox:this.useCheckbox})))):s("slot",{name:"option-placeholder"},s("div",{class:"sd-select-option-placeholder"},this.optionPlaceholder)))}static get watchers(){return{filteredOptions:[{filteredOptionsChanged:0}],searchText:[{searchTextChanged:0}],itemIndex:[{itemIndexChanged:0}]}}};o.style=".sd-select-dropdown .sd-select-option-placeholder{height:48px;display:flex;align-items:center;padding:8px 16px;font-size:12px;line-height:0;text-align:left;color:#888888}.sd-select-dropdown{overflow:auto;min-width:fit-content;width:var(--select-dropdown-width, 200px);max-height:var(--select-dropdown-height, 260px);padding-bottom:2px;background-color:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);border-radius:4px;overflow-y:auto;color:#333333;display:flex;flex-direction:column;opacity:0.5;transition:opacity 0.15s ease-in}.sd-select-dropdown--ready{opacity:1}";const n=class{constructor(s){t(this,s),this.optionClick=e(this,"optionClick")}get el(){return i(this)}option;index;isSelected=!1;isFocused=!1;optionStyle;disabled=!1;useCheckbox=!1;isHovered=!1;async sdIsDisabled(){return!!this.option.disabled}optionClick;handleClick=t=>{t.stopPropagation(),this.option.disabled||this.disabled||this.optionClick.emit({option:this.option,index:this.index,event:t})};render(){return s("div",{key:"1312407dd54318273dd5be025d20c992a5e8bd97",class:{"sd-select__option":!0,"sd-select__option--selected":this.isSelected,"sd-select__option--disabled":!!this.option.disabled,"sd-select__option--focused":this.isFocused,"sd-select__option--use-checkbox":this.useCheckbox},onMouseEnter:()=>this.isHovered=!0,onMouseLeave:()=>this.isHovered=!1,style:this.optionStyle,"data-index":this.index,onClick:this.handleClick},this.useCheckbox?s("div",{class:"sd-select__option__checkbox-wrapper"},s("sd-checkbox",{value:this.isSelected,disabled:this.option.disabled,onClick:t=>{t.preventDefault(),this.handleClick(t)}}),s("span",{class:"sd-select__option-label"},this.option.label)):this.option.label)}};n.style="sd-select-option{display:block;height:fit-content;line-height:0}sd-select-option .sd-select__option{display:flex;padding:4px 12px;font-size:12px;line-height:20px;cursor:pointer}sd-select-option .sd-select__option__checkbox-wrapper{display:flex;width:100%;column-gap:8px;align-items:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}sd-select-option .sd-select__option--focused{background-color:#E6F1FF}sd-select-option .sd-select__option--selected:not(:hover):not(.sd-select__option--use-checkbox),sd-select-option .sd-select__option--focused:not(:hover):not(.sd-select__option--use-checkbox){color:#0075FF;font-weight:700}sd-select-option .sd-select__option--disabled{color:#AAAAAA;cursor:not-allowed}sd-select-option .sd-select__option:hover:not(.sd-select__option--disabled){background-color:#0075FF;color:white}";export{o as sd_select_dropdown,n as sd_select_option}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,F as s,c as i,g as n}from"./p-B8tGP77V.js";import{r as o}from"./p-CquSJNHV.js";import{B as a}from"./p-CRdYeSBK.js";import{S as r}from"./p-Cy6HMEsK.js";import{n as l}from"./p-CCwNgVmC.js";const d=class{constructor(e){t(this,e)}color="#0075ff";get resolvedColor(){return o(this.color)}render(){return e(s,{key:"739d89956c75131c785c9037495509783fbcfe7a"},e("svg",{key:"3938cc3d2f2abbb51477f900222b4ba434411e6a",class:"sd-loading-spinner",width:"72px",height:"72px",viewBox:"25 25 50 50",style:{color:this.resolvedColor}},e("circle",{key:"4a21337e193f56c62da1268d3bf6d56651263771",class:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":"5","stroke-miterlimit":"10"})))}};d.style="sd-loading-spinner{display:inline-flex;width:fit-content;height:fit-content;align-items:center}sd-loading-spinner .sd-loading-spinner{animation:sd-loading-spin 2s linear infinite;transform-origin:center center}sd-loading-spinner .sd-loading-spinner .path{animation:sd-loading-spin-path 1.5s ease-in-out infinite}@keyframes sd-loading-spin{0%{transform:rotate3d(0, 0, 1, 0deg)}25%{transform:rotate3d(0, 0, 1, 90deg)}50%{transform:rotate3d(0, 0, 1, 180deg)}75%{transform:rotate3d(0, 0, 1, 270deg)}100%{transform:rotate3d(0, 0, 1, 359deg)}}@keyframes sd-loading-spin-path{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35px}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124px}}";const h={1:26,2:36,3:42,4:50,5:58},p=10,c=class{constructor(e){t(this,e),this.pageChange=i(this,"sdPageChange")}currentPage=1;lastPage=1;simple=!1;pageChange;get paginationClasses(){const t=["sd-pagination"];return this.simple&&t.push("sd-pagination--simple"),t.join(" ")}get pageNumbers(){const t=Math.floor((this.currentPage-1)/p)*p+1,e=Math.min(t+p-1,this.lastPage);return Array.from({length:e-t+1},((e,s)=>t+s))}get buttonWidth(){const t=(this.pageNumbers.at(-1)??1).toString().length;return h[t]||h[1]}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?p:-10),1),this.lastPage);this.handlePageChange(e)}get isFirstGroup(){return this.currentPage<=p}get isLastGroup(){return Math.floor((this.currentPage-1)/p)*p+1+p-1>=this.lastPage}renderPrevButtons(){return this.simple?this.currentPage<=1?null:e(s,null,e("button",{"aria-label":"Go to first page",onClick:()=>this.handlePageChange(1)},e("sd-icon",{name:"chevronLeftEnd",size:"12",color:"#222222"})),e("button",{"aria-label":"Go to previous page",onClick:()=>this.handlePageChange(this.currentPage-1)},e("sd-icon",{name:"arrowLeft",size:"12",color:"#222222"}))):this.isFirstGroup?void 0:e(s,null,e("button",{"aria-label":"Go to first page",onClick:()=>this.handlePageChange(1)},e("sd-icon",{name:"chevronLeftEnd",size:"12",color:"#222222"})),e("button",{"aria-label":"Go to previous page group",onClick:()=>this.handleGroupChange("backward")},e("sd-icon",{name:"arrowLeft",size:"12",color:"#222222"})))}renderNextButtons(){return this.simple?this.currentPage>=this.lastPage?null:e(s,null,e("button",{"aria-label":"Go to next page",onClick:()=>this.handlePageChange(this.currentPage+1)},e("sd-icon",{name:"arrowRight",size:"12",color:"#222222"})),e("button",{"aria-label":"Go to last page",onClick:()=>this.handlePageChange(this.lastPage)},e("sd-icon",{name:"chevronRightEnd",size:"12",color:"#222222"}))):this.isLastGroup?void 0:e(s,null,e("button",{"aria-label":"Go to next page group",onClick:()=>this.handleGroupChange("forward")},e("sd-icon",{name:"arrowRight",size:"12",color:"#222222"})),e("button",{"aria-label":"Go to last page",onClick:()=>this.handlePageChange(this.lastPage)},e("sd-icon",{name:"chevronRightEnd",size:"12",color:"#222222"})))}render(){return e("div",{key:"8d96b1969ca9aa7ec1bd722f2996874a295ed91c",class:this.paginationClasses},e("div",{key:"5dac4f45c9610e03fc8fcf0b63e0a00749981d43",class:"prepend-btns"},this.renderPrevButtons()),this.simple?e("div",{class:"pagination-info"},e("span",{class:"current-page"},this.currentPage),e("span",null,"/"),e("span",{class:"last-page"},this.lastPage)):this.pageNumbers.map((t=>e("button",{type:"button","aria-current":this.currentPage===t?"page":void 0,class:{"pagination-btn":!0,"pagination-btn--selected":this.currentPage===t},disabled:this.currentPage===t,style:{"--pagination-btn-width":`${this.buttonWidth}px`},onClick:()=>this.handlePageChange(t)},t))),e("div",{key:"93faf25a3b7938d1f21d418e27d123418f4fd885",class:"append-btns"},this.renderNextButtons()))}};c.style=".sd-pagination{display:flex;flex-flow:row nowrap;align-items:center;justify-content:center;gap:8px;color:#555555;width:100%;font-size:12px}.sd-pagination .prepend-btns{display:flex;flex-flow:row nowrap;align-items:center;gap:8px;width:60px}.sd-pagination .prepend-btns button{width:26px;height:26px;border:0;background:none}.sd-pagination .prepend-btns button:hover{border:1px solid #006AC1;border-radius:14px}.sd-pagination .append-btns{display:flex;flex-flow:row nowrap;align-items:center;gap:8px;width:60px}.sd-pagination .append-btns button{width:26px;height:26px;border:0;background:none}.sd-pagination .append-btns button:hover{border:1px solid #006AC1;border-radius:14px}.sd-pagination .pagination-btn{display:flex;align-items:center;justify-content:center;border-radius:14px;outline:none;border:none;cursor:pointer;height:26px;color:#555555;width:var(--pagination-btn-width, 26px)}.sd-pagination .pagination-btn--selected{background-color:#006AC1;color:white}.sd-pagination .pagination-btn:hover{border:1px solid #006AC1}.sd-pagination--simple .pagination-info{line-height:26px;display:flex;flex-flow:row nowrap;align-items:center;gap:8px}.sd-pagination--simple .pagination-info .current-page,.sd-pagination--simple .pagination-info .last-page{padding:0 2px}";const g=class extends a{constructor(e){super(),t(this,e),this.update=i(this,"sdUpdate"),this.dropDownShow=i(this,"sdDropDownShow")}get el(){return n(this)}value=null;options=[];placeholder="선택";optionPlaceholder="선택지가 없습니다.";width="200px";dropdownHeight="260px";autoFocus=!1;disabled=!1;clearable=!1;searchable=!1;label="";addonLabel="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;optionRenderer;isOpen=!1;itemIndex=-1;isScrolled=!1;update;dropDownShow;selectRef;triggerRef;formField;filteredOptions=[];dropDownWidth="200px";name=l();async sdOpen(){this.isOpen=!0}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async isOpenChanged(){this.onDropdownToggle(this.isOpen),this.dropDownShow?.emit({isOpen:this.isOpen}),!1===this.isOpen&&await(this.formField?.sdValidate())}componentWillLoad(){this.filteredOptions=this.options,this.dropDownWidth=this.width,this.initializeEvent()}componentDidLoad(){this.autoFocus&&this.selectRef?.focus()}componentDidRender(){const t=this.triggerRef,e=t?.getBoundingClientRect();this.dropDownWidth=e?.width?`${e.width}px`:this.width}disconnectedCallback(){this.cleanupEvent()}handleDocumentClick(t){this.selectRef?.contains(t.target)||(this.isOpen=!1)}handleDocumentKeydown(t){if(t.stopPropagation(),["ArrowDown","ArrowUp","Enter","Escape"].includes(t.key))switch(t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":const e=new r(this.searchable,this.filteredOptions).getNextIndex(this.itemIndex,t.key);this.itemIndex=e;break;case"Enter":const s=this.filteredOptions[this.itemIndex];s&&!s.disabled&&(this.value=s.value,this.isOpen=!1);break;case"Escape":this.isOpen=!1}}getSelectedOption(){return this.options.find((t=>t.value===this.value))}closeDropdown(){this.isOpen=!1}handleTriggerClick=t=>{t.stopPropagation(),this.disabled||(this.isOpen=!this.isOpen,this.dropDownShow?.emit({isOpen:this.isOpen}))};handleOptionClick=t=>{const{option:e,event:s}=t;if(s.stopPropagation(),!e.disabled){this.value=e.value,this.isOpen=!1;const t=this.getSelectedOption();this.update?.emit({value:t?.value||null,option:t||null})}};render(){return e("sd-field",{key:"f7cd0c34188712a30389d07bde7edc7875e9923b",label:this.label,name:this.name,rules:this.rules,error:this.error,disabled:this.disabled,icon:this.icon,addonLabel:this.addonLabel,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:t=>this.formField=t},e("div",{key:"460a8a23247e24a02bd25470105598914029e205",class:{"sd-select":!0,"sd-select--disabled":this.disabled,"sd-select--error":!!this.error,"sd-select--label":!!this.label},ref:t=>this.selectRef=t},this.renderTrigger(),this.renderDropdown()))}renderTrigger(){const t=this.getSelectedOption();return e("div",{class:"sd-select__trigger",tabindex:this.disabled?-1:0,onClick:this.handleTriggerClick,ref:t=>this.triggerRef=t},e("span",{class:"sd-select__value"},t?t.label:this.placeholder),this.clearable&&t&&!this.disabled&&e("sd-icon",{key:"clear-icon",name:"close",size:10,color:"#888",class:"sd-select__clear",onClick:async t=>{t.stopPropagation(),this.value=null,await(this.formField?.sdValidate())}}),e("sd-icon",{key:"arrow-icon",name:"arrowDown",color:"#888",class:{"sd-select__arrow":!0,"sd-select__arrow--open":this.isOpen}}))}renderDropdown(){if(!1===this.isOpen)return null;const t=this.selectRef?.querySelector(".sd-select__trigger")||this.selectRef;return e("sd-portal",{open:this.isOpen,parentRef:t,onSdClose:this.closeDropdown},e("sd-select-dropdown",{value:this.value,options:this.options,itemIndex:this.itemIndex,width:this.dropDownWidth,dropdownHeight:this.dropdownHeight,searchable:this.searchable,optionPlaceholder:this.optionPlaceholder,onSdOptionClick:({detail:t})=>this.handleOptionClick(t),onSdOptionFiltered:({detail:t})=>this.filteredOptions=t}))}static get watchers(){return{isOpen:[{isOpenChanged:0}]}}};g.style="sd-select{display:inline-flex;flex-flow:column nowrap;height:fit-content}sd-select *:focus,sd-select *:focus-visible,sd-select *:focus-within{outline:none !important}sd-select .sd-select{width:100%}sd-select .sd-select .sd-select__trigger{padding:4px 28px 4px 12px;display:flex;width:100%;height:100%;align-items:center}sd-select .sd-select .sd-select__trigger .sd-select__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400;text-align:left}sd-select .sd-select .sd-select__trigger .sd-select__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}sd-select .sd-select .sd-select__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease;margin-left:8px}sd-select .sd-select .sd-select__arrow--open{transform:rotate(180deg)}";export{d as sd_loading_spinner,c as sd_pagination,g as sd_select}
|
|
1
|
+
import{r as t,h as e,F as s,c as i,g as n}from"./p-B8tGP77V.js";import{r as o}from"./p-CquSJNHV.js";import{B as a}from"./p-CRdYeSBK.js";import{S as r}from"./p-Cy6HMEsK.js";import{n as l}from"./p-CCwNgVmC.js";const d=class{constructor(e){t(this,e)}color="#0075ff";get resolvedColor(){return o(this.color)}render(){return e(s,{key:"739d89956c75131c785c9037495509783fbcfe7a"},e("svg",{key:"3938cc3d2f2abbb51477f900222b4ba434411e6a",class:"sd-loading-spinner",width:"72px",height:"72px",viewBox:"25 25 50 50",style:{color:this.resolvedColor}},e("circle",{key:"4a21337e193f56c62da1268d3bf6d56651263771",class:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":"5","stroke-miterlimit":"10"})))}};d.style="sd-loading-spinner{display:inline-flex;width:fit-content;height:fit-content;align-items:center}sd-loading-spinner .sd-loading-spinner{animation:sd-loading-spin 2s linear infinite;transform-origin:center center}sd-loading-spinner .sd-loading-spinner .path{animation:sd-loading-spin-path 1.5s ease-in-out infinite}@keyframes sd-loading-spin{0%{transform:rotate3d(0, 0, 1, 0deg)}25%{transform:rotate3d(0, 0, 1, 90deg)}50%{transform:rotate3d(0, 0, 1, 180deg)}75%{transform:rotate3d(0, 0, 1, 270deg)}100%{transform:rotate3d(0, 0, 1, 359deg)}}@keyframes sd-loading-spin-path{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35px}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124px}}";const h={1:26,2:36,3:42,4:50,5:58},c=10,p=class{constructor(e){t(this,e),this.pageChange=i(this,"sdPageChange")}currentPage=1;lastPage=1;simple=!1;pageChange;get paginationClasses(){const t=["sd-pagination"];return this.simple&&t.push("sd-pagination--simple"),t.join(" ")}get pageNumbers(){const t=Math.floor((this.currentPage-1)/c)*c+1,e=Math.min(t+c-1,this.lastPage);return Array.from({length:e-t+1},((e,s)=>t+s))}get buttonWidth(){const t=(this.pageNumbers.at(-1)??1).toString().length;return h[t]||h[1]}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?c:-10),1),this.lastPage);this.handlePageChange(e)}get isFirstGroup(){return this.currentPage<=c}get isLastGroup(){return Math.floor((this.currentPage-1)/c)*c+1+c-1>=this.lastPage}renderPrevButtons(){return this.simple?this.currentPage<=1?null:e(s,null,e("button",{"aria-label":"Go to first page",onClick:()=>this.handlePageChange(1)},e("sd-icon",{name:"chevronLeftEnd",size:"12",color:"#222222"})),e("button",{"aria-label":"Go to previous page",onClick:()=>this.handlePageChange(this.currentPage-1)},e("sd-icon",{name:"arrowLeft",size:"12",color:"#222222"}))):this.isFirstGroup?void 0:e(s,null,e("button",{"aria-label":"Go to first page",onClick:()=>this.handlePageChange(1)},e("sd-icon",{name:"chevronLeftEnd",size:"12",color:"#222222"})),e("button",{"aria-label":"Go to previous page group",onClick:()=>this.handleGroupChange("backward")},e("sd-icon",{name:"arrowLeft",size:"12",color:"#222222"})))}renderNextButtons(){return this.simple?this.currentPage>=this.lastPage?null:e(s,null,e("button",{"aria-label":"Go to next page",onClick:()=>this.handlePageChange(this.currentPage+1)},e("sd-icon",{name:"arrowRight",size:"12",color:"#222222"})),e("button",{"aria-label":"Go to last page",onClick:()=>this.handlePageChange(this.lastPage)},e("sd-icon",{name:"chevronRightEnd",size:"12",color:"#222222"}))):this.isLastGroup?void 0:e(s,null,e("button",{"aria-label":"Go to next page group",onClick:()=>this.handleGroupChange("forward")},e("sd-icon",{name:"arrowRight",size:"12",color:"#222222"})),e("button",{"aria-label":"Go to last page",onClick:()=>this.handlePageChange(this.lastPage)},e("sd-icon",{name:"chevronRightEnd",size:"12",color:"#222222"})))}render(){return e("div",{key:"c689cc21909b50a709487a409ecbd2ba48d3db3a",class:this.paginationClasses},e("div",{key:"a38cee49c5d225beea8acd35cb7b370319886bee",class:"prepend-btns"},this.renderPrevButtons()),this.simple?e("div",{class:"pagination-info"},e("span",{class:"current-page"},this.currentPage),e("span",null,"/"),e("span",{class:"last-page"},this.lastPage)):this.pageNumbers.map((t=>e("button",{type:"button","aria-current":this.currentPage===t?"page":void 0,class:{"pagination-btn":!0,"pagination-btn--selected":this.currentPage===t},disabled:this.currentPage===t,style:{"--pagination-btn-width":`${this.buttonWidth}px`},onClick:()=>this.handlePageChange(t)},t))),e("div",{key:"40dcb43cd251c5cbdf18e502acd67962e87d4496",class:"append-btns"},this.renderNextButtons()))}};p.style=".sd-pagination{display:flex;flex-flow:row nowrap;align-items:center;justify-content:center;gap:8px;color:#555555;width:100%;font-size:12px}.sd-pagination .prepend-btns{display:flex;flex-flow:row nowrap;align-items:center;gap:8px;width:60px}.sd-pagination .prepend-btns button{width:26px;height:26px;border:0;background:none}.sd-pagination .prepend-btns button:hover{border:1px solid #006AC1;border-radius:14px}.sd-pagination .append-btns{display:flex;flex-flow:row nowrap;align-items:center;gap:8px;width:60px}.sd-pagination .append-btns button{width:26px;height:26px;border:0;background:none}.sd-pagination .append-btns button:hover{border:1px solid #006AC1;border-radius:14px}.sd-pagination .pagination-btn{display:flex;align-items:center;justify-content:center;border-radius:14px;outline:none;border:none;cursor:pointer;height:26px;color:#555555;width:var(--pagination-btn-width, 26px)}.sd-pagination .pagination-btn--selected{background-color:#006AC1;color:white}.sd-pagination .pagination-btn:hover{border:1px solid #006AC1}.sd-pagination--simple .pagination-info{line-height:26px;display:flex;flex-flow:row nowrap;align-items:center;gap:8px}.sd-pagination--simple .pagination-info .current-page,.sd-pagination--simple .pagination-info .last-page{padding:0 2px}";const g=class extends a{constructor(e){super(),t(this,e),this.update=i(this,"sdUpdate"),this.dropDownShow=i(this,"sdDropDownShow")}get el(){return n(this)}value=null;options=[];placeholder="선택";optionPlaceholder="선택지가 없습니다.";width="200px";dropdownHeight="260px";autoFocus=!1;disabled=!1;clearable=!1;searchable=!1;label="";addonLabel="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;optionRenderer;isOpen=!1;itemIndex=-1;isScrolled=!1;update;dropDownShow;selectRef;triggerRef;formField;filteredOptions=[];dropDownWidth="200px";name=l();async sdOpen(){this.isOpen=!0}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async isOpenChanged(){this.onDropdownToggle(this.isOpen),this.dropDownShow?.emit({isOpen:this.isOpen}),!1===this.isOpen&&await(this.formField?.sdValidate())}componentWillLoad(){this.filteredOptions=this.options,this.dropDownWidth=this.width,this.initializeEvent()}componentDidLoad(){this.autoFocus&&this.selectRef?.focus()}componentDidRender(){const t=this.triggerRef,e=t?.getBoundingClientRect();this.dropDownWidth=e?.width?`${e.width}px`:this.width}disconnectedCallback(){this.cleanupEvent()}handleDocumentClick(t){this.selectRef?.contains(t.target)||(this.isOpen=!1)}handleDocumentKeydown(t){if(t.stopPropagation(),["ArrowDown","ArrowUp","Enter","Escape"].includes(t.key))switch(t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":const e=new r(this.searchable,this.filteredOptions).getNextIndex(this.itemIndex,t.key);this.itemIndex=e;break;case"Enter":const s=this.filteredOptions[this.itemIndex];s&&!s.disabled&&(this.value=s.value,this.isOpen=!1);break;case"Escape":this.isOpen=!1}}getSelectedOption(){return this.options.find((t=>t.value===this.value))}closeDropdown(){this.isOpen=!1}handleTriggerClick=t=>{t.stopPropagation(),this.disabled||(this.isOpen=!this.isOpen,this.dropDownShow?.emit({isOpen:this.isOpen}))};handleOptionClick=t=>{const{option:e,event:s}=t;if(s.stopPropagation(),!e.disabled){this.value=e.value,this.isOpen=!1;const t=this.getSelectedOption();this.update?.emit({value:t?.value||null,option:t||null})}};render(){return e("sd-field",{key:"f7cd0c34188712a30389d07bde7edc7875e9923b",label:this.label,name:this.name,rules:this.rules,error:this.error,disabled:this.disabled,icon:this.icon,addonLabel:this.addonLabel,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:t=>this.formField=t},e("div",{key:"460a8a23247e24a02bd25470105598914029e205",class:{"sd-select":!0,"sd-select--disabled":this.disabled,"sd-select--error":!!this.error,"sd-select--label":!!this.label},ref:t=>this.selectRef=t},this.renderTrigger(),this.renderDropdown()))}renderTrigger(){const t=this.getSelectedOption();return e("div",{class:"sd-select__trigger",tabindex:this.disabled?-1:0,onClick:this.handleTriggerClick,ref:t=>this.triggerRef=t},e("span",{class:"sd-select__value"},t?t.label:this.placeholder),this.clearable&&t&&!this.disabled&&e("sd-icon",{key:"clear-icon",name:"close",size:10,color:"#888",class:"sd-select__clear",onClick:async t=>{t.stopPropagation(),this.value=null,await(this.formField?.sdValidate())}}),e("sd-icon",{key:"arrow-icon",name:"arrowDown",color:"#888",class:{"sd-select__arrow":!0,"sd-select__arrow--open":this.isOpen}}))}renderDropdown(){if(!1===this.isOpen)return null;const t=this.selectRef?.querySelector(".sd-select__trigger")||this.selectRef;return e("sd-portal",{open:this.isOpen,parentRef:t,onSdClose:this.closeDropdown},e("sd-select-dropdown",{value:this.value,options:this.options,itemIndex:this.itemIndex,width:this.dropDownWidth,dropdownHeight:this.dropdownHeight,searchable:this.searchable,optionPlaceholder:this.optionPlaceholder,onSdOptionClick:({detail:t})=>this.handleOptionClick(t),onSdOptionFiltered:({detail:t})=>this.filteredOptions=t}))}static get watchers(){return{isOpen:[{isOpenChanged:0}]}}};g.style="sd-select{display:inline-flex;flex-flow:column nowrap;height:fit-content}sd-select *:focus,sd-select *:focus-visible,sd-select *:focus-within{outline:none !important}sd-select .sd-select{width:100%}sd-select .sd-select .sd-select__trigger{padding:4px 28px 4px 12px;display:flex;width:100%;height:100%;align-items:center}sd-select .sd-select .sd-select__trigger .sd-select__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400;text-align:left}sd-select .sd-select .sd-select__trigger .sd-select__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}sd-select .sd-select .sd-select__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease;margin-left:8px}sd-select .sd-select .sd-select__arrow--open{transform:rotate(180deg)}";export{d as sd_loading_spinner,p as sd_pagination,g as sd_select}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,g as s,h as i,F as o}from"./p-B8tGP77V.js";import{n as r}from"./p-CCwNgVmC.js";import{B as n}from"./p-CRdYeSBK.js";import{S as l}from"./p-Cy6HMEsK.js";const h=class extends n{constructor(s){super(),t(this,s),this.update=e(this,"sdUpdate"),this.dropDownShow=e(this,"sdDropDownShow")}get el(){return s(this)}value=null;options=[];placeholder="선택";optionPlaceholder="선택지가 없습니다.";width="200px";dropdownHeight="260px";autoFocus=!1;disabled=!1;clearable=!1;searchable=!1;label="";addonLabel="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;containerStyle={};triggerStyle={};dropdownStyle={};optionStyle={};labelStyle={};optionRenderer;filteredOptions=[];isOpen=!1;searchText=null;itemIndex=-1;isScrolled=!1;isDropdownReady=!1;update;dropDownShow;selectRef;searchRef;triggerRef;optionRef;dropdownRef;formField;dropDownWidth="200px";name=r();async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.isOpen=!0}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}optionsChanged(){this.filteredOptions=this.options,this.filterOptions()}searchTextChanged(){this.filterOptions()}async itemIndexChanged(t,e){if(this.searchable){const t=await this.getNativeInputElement();if(-1===this.itemIndex)return void t?.focus({preventScroll:!0});t?.matches(":focus")&&t?.blur()}const s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option-group")||[]),i=s?.[this.itemIndex];i&&this.isOpen&&(this.optionRef=i,await this.optionRef.isDisabled()?t>e?this.itemIndex++:this.itemIndex--:this.scrollToOption(i))}async isOpenChanged(){this.onDropdownToggle(this.isOpen),this.dropDownShow?.emit({isOpen:this.isOpen}),this.isDropdownReady=!1,!1!==this.isOpen?requestAnimationFrame((()=>{requestAnimationFrame((async()=>{const t=this.getSelectedOption();if(t){const e=this.filteredOptions.indexOf(t),s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option-group")||[]),i=Math.min(e+4,s.length-1),o=s?.[i];o&&this.scrollToOption(o)}if(this.isDropdownReady=!0,this.searchable){const t=await this.getNativeInputElement();t&&requestAnimationFrame((()=>{t.focus({preventScroll:!0})}))}}))})):await(this.formField?.sdValidate())}componentWillLoad(){this.filteredOptions=this.options,this.dropDownWidth=this.width,this.initializeEvent()}componentDidLoad(){this.autoFocus&&this.selectRef?.focus()}componentDidRender(){const t=this.triggerRef,e=t?.getBoundingClientRect();this.dropDownWidth=e?.width?`${e.width}px`:this.width}disconnectedCallback(){this.cleanupEvent()}handleDocumentClick(t){this.selectRef?.contains(t.target)||(this.isOpen=!1)}handleDocumentKeydown(t){if(t.stopPropagation(),["ArrowDown","ArrowUp","Enter","Escape"].includes(t.key))switch(t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":const e=new l(this.searchable,this.filteredOptions).getNextIndex(this.itemIndex,t.key);this.itemIndex=e;break;case"Enter":const s=this.filteredOptions[this.itemIndex];s&&!s.disabled&&"item"===s.type&&this.handleOptionSelection(s);break;case"Escape":this.isOpen=!1}}handleTriggerClick=t=>{t.stopPropagation(),this.disabled||(this.isOpen=!this.isOpen,this.dropDownShow?.emit({isOpen:this.isOpen}))};handleOptionClick=t=>{const{option:e,event:s}=t;s.stopPropagation(),"item"===e.type&&this.handleOptionSelection(e)};filterOptions(){if(!this.searchText||""===this.searchText.trim())return void(this.filteredOptions=this.options);const t=this.searchText.toLowerCase(),e=new Set;this.options.forEach((s=>{s.label.toLowerCase().includes(t)&&(e.add(s),this.addParentGroups(s,e))})),this.filteredOptions=this.options.filter((t=>e.has(t)))}addParentGroups(t,e){if(!t.parent)return;const s=this.options.find((e=>e.value===t.parent));s&&!e.has(s)&&(e.add(s),this.addParentGroups(s,e))}getSelectedOption(){return this.options.find((t=>t.value===this.value))}handleDropdownScroll=t=>{this.isScrolled=t.target.scrollTop>0};async getNativeInputElement(){return this.searchRef?this.searchRef.sdGetNativeElement():null}handleOptionSelection=t=>{if(!t||t.disabled)return;this.value=t.value,this.isOpen=!1;const e=this.getSelectedOption();this.update?.emit({value:e?.value||null,option:e||null})};closeDropdown(){this.isOpen=!1}async scrollToOption(t){this.dropdownRef&&t&&requestAnimationFrame((()=>{const e=this.dropdownRef,s=t.offsetTop,i=t.offsetHeight,o=e.scrollTop,r=e.clientHeight,n=e.querySelector(".sd-select-group__search-container"),l=n?n.offsetHeight:0,h=r-l,
|
|
1
|
+
import{r as t,c as e,g as s,h as i,F as o}from"./p-B8tGP77V.js";import{n as r}from"./p-CCwNgVmC.js";import{B as n}from"./p-CRdYeSBK.js";import{S as l}from"./p-Cy6HMEsK.js";const h=class extends n{constructor(s){super(),t(this,s),this.update=e(this,"sdUpdate"),this.dropDownShow=e(this,"sdDropDownShow")}get el(){return s(this)}value=null;options=[];placeholder="선택";optionPlaceholder="선택지가 없습니다.";width="200px";dropdownHeight="260px";autoFocus=!1;disabled=!1;clearable=!1;searchable=!1;label="";addonLabel="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;containerStyle={};triggerStyle={};dropdownStyle={};optionStyle={};labelStyle={};optionRenderer;filteredOptions=[];isOpen=!1;searchText=null;itemIndex=-1;isScrolled=!1;isDropdownReady=!1;update;dropDownShow;selectRef;searchRef;triggerRef;optionRef;dropdownRef;formField;dropDownWidth="200px";name=r();async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.isOpen=!0}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}optionsChanged(){this.filteredOptions=this.options,this.filterOptions()}searchTextChanged(){this.filterOptions()}async itemIndexChanged(t,e){if(this.searchable){const t=await this.getNativeInputElement();if(-1===this.itemIndex)return void t?.focus({preventScroll:!0});t?.matches(":focus")&&t?.blur()}const s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option-group")||[]),i=s?.[this.itemIndex];i&&this.isOpen&&(this.optionRef=i,await this.optionRef.isDisabled()?t>e?this.itemIndex++:this.itemIndex--:this.scrollToOption(i))}async isOpenChanged(){this.onDropdownToggle(this.isOpen),this.dropDownShow?.emit({isOpen:this.isOpen}),this.isDropdownReady=!1,!1!==this.isOpen?requestAnimationFrame((()=>{requestAnimationFrame((async()=>{const t=this.getSelectedOption();if(t){const e=this.filteredOptions.indexOf(t),s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option-group")||[]),i=Math.min(e+4,s.length-1),o=s?.[i];o&&this.scrollToOption(o)}if(this.isDropdownReady=!0,this.searchable){const t=await this.getNativeInputElement();t&&requestAnimationFrame((()=>{t.focus({preventScroll:!0})}))}}))})):await(this.formField?.sdValidate())}componentWillLoad(){this.filteredOptions=this.options,this.dropDownWidth=this.width,this.initializeEvent()}componentDidLoad(){this.autoFocus&&this.selectRef?.focus()}componentDidRender(){const t=this.triggerRef,e=t?.getBoundingClientRect();this.dropDownWidth=e?.width?`${e.width}px`:this.width}disconnectedCallback(){this.cleanupEvent()}handleDocumentClick(t){this.selectRef?.contains(t.target)||(this.isOpen=!1)}handleDocumentKeydown(t){if(t.stopPropagation(),["ArrowDown","ArrowUp","Enter","Escape"].includes(t.key))switch(t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":const e=new l(this.searchable,this.filteredOptions).getNextIndex(this.itemIndex,t.key);this.itemIndex=e;break;case"Enter":const s=this.filteredOptions[this.itemIndex];s&&!s.disabled&&"item"===s.type&&this.handleOptionSelection(s);break;case"Escape":this.isOpen=!1}}handleTriggerClick=t=>{t.stopPropagation(),this.disabled||(this.isOpen=!this.isOpen,this.dropDownShow?.emit({isOpen:this.isOpen}))};handleOptionClick=t=>{const{option:e,event:s}=t;s.stopPropagation(),"item"===e.type&&this.handleOptionSelection(e)};filterOptions(){if(!this.searchText||""===this.searchText.trim())return void(this.filteredOptions=this.options);const t=this.searchText.toLowerCase(),e=new Set;this.options.forEach((s=>{s.label.toLowerCase().includes(t)&&(e.add(s),this.addParentGroups(s,e))})),this.filteredOptions=this.options.filter((t=>e.has(t)))}addParentGroups(t,e){if(!t.parent)return;const s=this.options.find((e=>e.value===t.parent));s&&!e.has(s)&&(e.add(s),this.addParentGroups(s,e))}getSelectedOption(){return this.options.find((t=>t.value===this.value))}handleDropdownScroll=t=>{this.isScrolled=t.target.scrollTop>0};async getNativeInputElement(){return this.searchRef?this.searchRef.sdGetNativeElement():null}handleOptionSelection=t=>{if(!t||t.disabled)return;this.value=t.value,this.isOpen=!1;const e=this.getSelectedOption();this.update?.emit({value:e?.value||null,option:e||null})};closeDropdown(){this.isOpen=!1}async scrollToOption(t){this.dropdownRef&&t&&requestAnimationFrame((()=>{const e=this.dropdownRef,s=t.offsetTop,i=t.offsetHeight,o=e.scrollTop,r=e.clientHeight,n=e.querySelector(".sd-select-group__search-container"),l=n?n.offsetHeight:0,h=r-l,d=o+r;s<o+l?e.scrollTo({top:s-l,behavior:"instant"}):s+i>d&&e.scrollTo({top:s+i-h-l,behavior:"instant"})}))}render(){return i("sd-field",{key:"7dc16e6167d57ea23971ddc60f6414c1894f4163",label:this.label,name:this.name,rules:this.rules,error:this.error,disabled:this.disabled,icon:this.icon,addonLabel:this.addonLabel,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:t=>this.formField=t,style:{"--field-width":this.width||"200px"}},i("div",{key:"470501b3bd905154bb090c11237feea3c3566fd5",class:{"sd-select-group":!0,"sd-select-group--open":this.isOpen,"sd-select-group--disabled":this.disabled,"sd-select-group--label":!!this.label},ref:t=>this.selectRef=t},this.renderTrigger(),this.renderDropdown()))}renderTrigger(){const t=this.getSelectedOption();return i("div",{class:"sd-select-group__trigger",tabindex:this.disabled?-1:0,onClick:this.handleTriggerClick,style:this.triggerStyle,ref:t=>this.triggerRef=t},i("span",{class:"sd-select-group__value"},t?t.label:this.placeholder),this.clearable&&t&&!this.disabled&&i("sd-icon",{key:"close-icon",name:"close",size:10,color:"grey_65",class:"sd-select-group__clear",onClick:async t=>{t.stopPropagation(),this.value=null,this.update?.emit({value:null,option:null}),await(this.formField?.sdValidate())}}),i("sd-icon",{key:"arrow-icon",name:"arrowDown",color:"grey_65",class:{"sd-select-group__arrow":!0,"sd-select-group__arrow--open":this.isOpen}}))}renderDropdown(){return!1===this.isOpen?null:i("sd-portal",{open:this.isOpen,parentRef:this.selectRef,onSdClose:this.closeDropdown},i("div",{style:{width:"0",height:"0",overflow:"visible"}},i("div",{class:{"sd-select-group__dropdown":!0,"sd-select-group__dropdown--ready":this.isDropdownReady},style:{"--select-width":this.dropDownWidth||"200px","--select-dropdown-height":this.dropdownHeight||"260px",...this.dropdownStyle},onScroll:this.handleDropdownScroll,ref:t=>this.dropdownRef=t},this.searchable&&i("sd-select-search-input",{ref:t=>this.searchRef=t,isScrolled:this.isScrolled,searchText:this.searchText,onSdSearchInput:t=>this.searchText=t.detail||"",onSdSearchFocus:()=>this.itemIndex=-1}),this.filteredOptions.length>0?i(o,null,this.filteredOptions.map(((t,e)=>i("slot",{name:`option-${t.value}`},i("sd-select-option-group",{option:t,index:e,isSelected:"item"===t.type&&t.value===this.value,isFocused:e===this.itemIndex,optionStyle:this.optionStyle,onOptionClick:({detail:e})=>{"item"===t.type&&this.handleOptionClick(e)},useCheckbox:!1,useIndicator:!1}))))):i("slot",{name:"option-placeholder"},i("div",{class:"sd-select-group__option-placeholder",style:this.optionStyle},this.optionPlaceholder)))))}static get watchers(){return{options:[{optionsChanged:0}],searchText:[{searchTextChanged:0}],itemIndex:[{itemIndexChanged:0}],isOpen:[{isOpenChanged:0}]}}};h.style=".sd-select-group__dropdown .sd-select-group__option-placeholder{height:48px;display:flex;align-items:center;padding:8px 16px;font-size:12px;line-height:0;text-align:left;color:#888888}sd-select-group{display:inline-flex;flex-flow:column nowrap;width:fit-content;height:fit-content}sd-select-group:focus,sd-select-group:focus-visible,sd-select-group:focus-within{outline:none !important}sd-select-group .sd-select-group{width:100%}sd-select-group .sd-select-group .sd-select-group__trigger{padding:4px 28px 4px 12px;display:flex;width:100%;height:100%;align-items:center}sd-select-group .sd-select-group .sd-select-group__trigger .sd-select-group__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400;text-align:left}sd-select-group .sd-select-group .sd-select-group__trigger .sd-select-group__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}sd-select-group .sd-select-group .sd-select-group__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease}sd-select-group .sd-select-group .sd-select-group__arrow--open{transform:rotate(180deg)}.sd-select-group__dropdown{overflow:auto;width:var(--select-width, 200px);max-height:var(--select-dropdown-height, 260px);padding-bottom:2px;background-color:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);border-radius:4px;overflow-y:auto;color:#333333;opacity:0.5;transition:opacity 0.15s ease-in}.sd-select-group__dropdown--ready{opacity:1}";export{h as sd_select_group}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,g as i,h as s}from"./p-B8tGP77V.js";import{n}from"./p-CCwNgVmC.js";var r={numberInput:{sm:{height:"28",paddingX:"6",gap:"8",radius:"4",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"}},md:{height:"36",paddingX:"8",gap:"12",radius:"6",typography:{fontWeight:"400",fontSize:"16",lineHeight:"26"}},contents:{gap:"4"},border:{default:"#AAAAAA",focus:"#0075FF",danger:"#FB4444"},bg:{default:"#FFFFFF"},text:{default:"#222222",placeholder:"#AAAAAA",disabled:"#888888"},hint:{color:"#555555",typography:{fontSize:"12",lineHeight:"20"}},errorMessage:{color:"#E30000",typography:{fontSize:"12",lineHeight:"20"}},stepper:{sm:{size:"20"},md:{size:"24"},radius:"4",bg:{default:"#EFF6FF",disabled:"#EEEEEE"},icon:{default:"#0075FF",disabled:"#BBBBBB"}}}};const d=r.numberInput.sm,u=r.numberInput.md,a={sm:{height:d.height,paddingX:d.paddingX,gap:d.gap,radius:d.radius,fontSize:d.typography.fontSize,lineHeight:d.typography.lineHeight,fontWeight:d.typography.fontWeight},md:{height:u.height,paddingX:u.paddingX,gap:u.gap,radius:u.radius,fontSize:u.typography.fontSize,lineHeight:u.typography.lineHeight,fontWeight:u.typography.fontWeight}},h={border:r.numberInput.border,bg:r.numberInput.bg,text:r.numberInput.text},o={sm:{size:r.numberInput.stepper.sm.size},md:{size:r.numberInput.stepper.md.size},radius:r.numberInput.stepper.radius,bg:r.numberInput.stepper.bg,icon:r.numberInput.stepper.icon},p=r.numberInput.hint,l=r.numberInput.errorMessage,b=r.numberInput.contents.gap,c=class{constructor(i){t(this,i),this.update=e(this,"sdUpdate"),this.focus=e(this,"sdFocus"),this.blur=e(this,"sdBlur")}get el(){return i(this)}size="sm";min=Number.NEGATIVE_INFINITY;max=Number.POSITIVE_INFINITY;step=1;useButton=!1;useDecimal=!1;value=null;label;addonLabel="";placeholder="입력해 주세요.";disabled=!1;width;rules=[];autoFocus=!1;status;hint="";errorMessage="";inputPrefix="";inputSuffix="";inputClass="";readonly=!1;inputStyle={};error=!1;focused=!1;hovered=!1;internalValue=null;displayValue="";nativeEl=void 0;formField;name=n();update;focus;blur;toNumber(t){if(null==t||""===t)return null;if("number"==typeof t)return isNaN(t)?null:t;if("string"==typeof t)return this.parseInput(t);const e=Number(t);return isNaN(e)?null:e}formatWithCommas(t){if(null==t||isNaN(t))return"";const e=t<0,i=Math.abs(t),[s,n]=i.toString().split("."),r=(+s).toLocaleString(),d=e?"-"+r:r;return n?d+"."+n:String(d)}parseInput(t){if(!t||""===t.trim())return null;const e=t.replace(/,/g,"").trim();if(!/^-?(\d+\.?\d*|\d*\.\d+)$/.test(e))return null;const i=parseFloat(e);return isNaN(i)||!this.useDecimal&&e.includes(".")?null:i}clampMinMax(t){return isNaN(t)?0:Math.min(Math.max(t,this.min),this.max)}updateDisplay(){this.displayValue=this.formatWithCommas(this.internalValue)}isIncrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue>=this.max}isDecrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue<=this.min}valueChanged(t){const e=this.toNumber(t);this.internalValue=null!==e?this.clampMinMax(e):null,this.updateDisplay()}internalValueChanged(t){this.updateDisplay(),t!==this.value&&(this.value=t,this.update?.emit(t))}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async sdGetNativeElement(){return this.nativeEl||null}componentWillLoad(){const t=this.toNumber(this.value);null!==t&&(this.internalValue=this.clampMinMax(t)),this.updateDisplay()}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{const e=t.target,i=e.value;if(""===i)return this.internalValue=null,void(this.displayValue="");const s=i.replace(/,/g,""),n=(s.match(/\./g)||[]).length;if(n>1)return void(e.value=this.displayValue);if("-"===s||"."===s||"-."===s)return void(e.value=s);if(s.endsWith(".")&&1===n){const t=s.slice(0,-1),i=this.parseInput(t);if(null!==i){const t=this.formatWithCommas(i);return void(e.value=t+".")}}const r=this.parseInput(s);if(null!==r){if(r<this.min)return void(e.value=this.displayValue);if(r>this.max)return void(e.value=this.displayValue);this.internalValue=r,this.displayValue=this.formatWithCommas(r),e.value=this.displayValue}else e.value=this.displayValue};handleFocus=t=>{this.focused=!0,this.focus?.emit(t)};handleBlur=async t=>{this.updateDisplay(),this.nativeEl&&(this.nativeEl.value=this.displayValue),this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.focused=!1,this.blur?.emit(t)};handleKeyDown=t=>{"ArrowUp"===t.key?(t.preventDefault(),this.handleIncrement()):"ArrowDown"===t.key&&(t.preventDefault(),this.handleDecrement())};handleIncrement=()=>{if(this.isIncrementDisabled())return;const t=this.internalValue??this.min??0;let e=t+this.step;e>this.max&&(e=this.max),e!==t&&(this.internalValue=e)};handleDecrement=()=>{if(this.isDecrementDisabled())return;const t=this.internalValue??this.min??0;let e=t-this.step;e<this.min&&(e=this.min),e!==t&&(this.internalValue=e)};render(){const t=a[this.size]??a.sm,e="md"===this.size?14:12;return s("sd-field",{key:"3c0c340cb1078a7f3763ee9f7339ef0cec63b020",name:this.name,label:this.label,addonLabel:this.addonLabel,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,ref:t=>this.formField=t,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-number-input-font-size":`${t.fontSize}px`,"--sd-number-input-line-height":`${t.lineHeight}px`,"--sd-number-input-font-weight":t.fontWeight,"--sd-number-input-padding-x":`${t.paddingX}px`,"--sd-number-input-gap":`${t.gap}px`,"--sd-number-input-text-color":h.text.default,"--sd-number-input-placeholder-color":h.text.placeholder,"--sd-number-input-disabled-color":h.text.disabled,"--sd-number-input-stepper-size":`${o[this.size]?.size??o.sm.size}px`,"--sd-number-input-stepper-radius":`${o.radius}px`,"--sd-number-input-stepper-bg":o.bg.default,"--sd-number-input-stepper-bg-disabled":o.bg.disabled,"--sd-number-input-stepper-icon-color":o.icon.default,"--sd-number-input-stepper-icon-disabled":o.icon.disabled,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`,"--sd-system-color-field-border-default":h.border.default,"--sd-system-color-field-border-focus":h.border.focus,"--sd-system-color-field-border-danger":h.border.danger,"--sd-system-color-field-bg-default":h.bg.default,"--sd-textinput-input-text-error-message":l.color,"--sd-textinput-input-error-message-typography-font-size":`${l.typography.fontSize}px`,"--sd-textinput-input-error-message-typography-line-height":`${l.typography.lineHeight}px`,"--sd-textinput-input-text-hint":p.color,"--sd-textinput-input-hint-typography-font-size":`${p.typography.fontSize}px`,"--sd-textinput-input-hint-typography-line-height":`${p.typography.lineHeight}px`,"--sd-textinput-input-contents-gap":`${b}px`}},s("div",{key:"d2be35e6a7e1201436ad625f4d9678b023187666",class:"sd-number-input__content"},this.useButton&&s("button",{key:"d048a5c576601ff6ac61eda9613d5981b415cd53",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--decrement",disabled:this.isDecrementDisabled(),onClick:this.handleDecrement,tabindex:-1},s("sd-icon",{key:"e618f41dda4f8afcb52ec4dc20828adf0ddc77c3",name:"minus",size:e,color:this.isDecrementDisabled()?o.icon.disabled:o.icon.default})),this.inputPrefix&&s("span",{key:"d293f7530b94c340af5495feaa3323f5f6d7e6bc",class:"sd-number-input__prefix"},this.inputPrefix),s("input",{key:"21d97799b6222f8c5f2145660d4cf25bf5fdeabe",name:this.name,ref:t=>this.nativeEl=t,class:`sd-number-input__native ${this.inputClass}`,type:"text",inputMode:"numeric",value:this.displayValue,placeholder:this.placeholder,disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,style:{textAlign:this.useButton?"center":"right",...this.inputStyle}}),this.inputSuffix&&s("span",{key:"2008a9aa47389bcac4df03de3e357df6f684f379",class:"sd-number-input__suffix"},this.inputSuffix),this.useButton&&s("button",{key:"5841af412ad228796debe31f7578fd332bf8883a",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--increment",disabled:this.isIncrementDisabled(),onClick:this.handleIncrement,tabindex:-1},s("sd-icon",{key:"ebc2f66dbb12664a976b36eb5b333ff7597d6d52",name:"add",size:e,color:this.isIncrementDisabled()?o.icon.disabled:o.icon.default}))))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}};c.style="sd-number-input{display:inline-flex}sd-number-input .sd-number-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;color:var(--sd-number-input-text-color);font-size:var(--sd-number-input-font-size);line-height:var(--sd-number-input-line-height);font-weight:var(--sd-number-input-font-weight);padding:0 var(--sd-number-input-padding-x);gap:var(--sd-number-input-gap)}sd-number-input .sd-number-input__content .sd-number-input__native{width:100%;height:100%;min-width:0;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;padding-block:0;padding-inline:0}sd-number-input .sd-number-input__content .sd-number-input__native[disabled]{cursor:not-allowed;color:var(--sd-number-input-disabled-color)}sd-number-input .sd-number-input__content .sd-number-input__native::placeholder{color:var(--sd-number-input-placeholder-color)}sd-number-input .sd-number-input__content .sd-number-input__prefix,sd-number-input .sd-number-input__content .sd-number-input__suffix{flex-shrink:0;white-space:nowrap;color:var(--sd-number-input-placeholder-color);font-size:inherit;line-height:inherit}sd-number-input .sd-number-input__content .sd-number-input__stepper{flex-shrink:0;width:var(--sd-number-input-stepper-size);height:var(--sd-number-input-stepper-size);border:none;border-radius:var(--sd-number-input-stepper-radius);background-color:var(--sd-number-input-stepper-bg);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;margin:0;transition:background-color 0.15s ease}sd-number-input .sd-number-input__content .sd-number-input__stepper:hover:not(:disabled){filter:brightness(0.95)}sd-number-input .sd-number-input__content .sd-number-input__stepper:disabled{background-color:var(--sd-number-input-stepper-bg-disabled);cursor:not-allowed}";export{c as sd_number_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as s}from"./p-B8tGP77V.js";import{c as i,S as r,f as o,E as h,L as n,a as l,b as c,d}from"./p-o9Ugc4Ua.js";const a=class{constructor(s){t(this,s),this.optionSelect=e(this,"sdOptionSelect")}name="default";options=[];value=null;emitValue=!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.name||"multi_depth"===this.name}get isMulti(){return"multi"===this.name||"multi_depth"===this.name}get showSearch(){return(this.isDepth?i(this.options):this.options.length)>=r}get filteredOptions(){if(!this.searchKeyword)return this.options;if(this.isDepth)return o(this.options,this.searchKeyword);const t=this.searchKeyword.toLowerCase();return this.options.filter((e=>e.label.toLowerCase().includes(t)))}get isEmpty(){return this.isDepth?0===i(this.filteredOptions)&&0===this.filteredOptions.length:0===this.filteredOptions.length}getSelectedValues(){return 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.children)return[t];if(0===t.children.length){const e=this.findOriginalOption(t.value,this.options);return e?this.collectLeaves(e):[]}return t.children.flatMap((t=>this.collectVisibleLeaves(t)))}get navigableOptions(){const t=[],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}isOptionFocused(t){if(this.focusedIndex<0)return!1;const e=this.navigableOptions[this.focusedIndex];return!!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(),this.emitOptionSelect(e[this.focusedIndex])}};beginHoverSuppression(){this.suppressHover||(this.suppressHover=!0,document.addEventListener("mousemove",this.releaseHoverSuppress,!0))}scrollFocusedIntoView(){const t=this.listEl,e=t?.querySelector(".sd-select-v2-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 i=!!t.children;return[s("sd-select-v2-list-item",{option:t,depth:e,isSelected:i?this.getGroupSelectionState(t):this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,countInfo:this.getCountInfo(t),onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)}),i&&t.children?this.renderOptions(t.children,e+1):null]}))}render(){return s("div",{key:"
|
|
1
|
+
import{r as t,c as e,h as s}from"./p-B8tGP77V.js";import{c as i,S as r,f as o,E as h,L as n,a as l,b as c,d}from"./p-o9Ugc4Ua.js";const a=class{constructor(s){t(this,s),this.optionSelect=e(this,"sdOptionSelect")}name="default";options=[];value=null;emitValue=!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.name||"multi_depth"===this.name}get isMulti(){return"multi"===this.name||"multi_depth"===this.name}get showSearch(){return(this.isDepth?i(this.options):this.options.length)>=r}get filteredOptions(){if(!this.searchKeyword)return this.options;if(this.isDepth)return o(this.options,this.searchKeyword);const t=this.searchKeyword.toLowerCase();return this.options.filter((e=>e.label.toLowerCase().includes(t)))}get isEmpty(){return this.isDepth?0===i(this.filteredOptions)&&0===this.filteredOptions.length:0===this.filteredOptions.length}getSelectedValues(){return 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.children)return[t];if(0===t.children.length){const e=this.findOriginalOption(t.value,this.options);return e?this.collectLeaves(e):[]}return t.children.flatMap((t=>this.collectVisibleLeaves(t)))}get navigableOptions(){const t=[],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}isOptionFocused(t){if(this.focusedIndex<0)return!1;const e=this.navigableOptions[this.focusedIndex];return!!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(),this.emitOptionSelect(e[this.focusedIndex])}};beginHoverSuppression(){this.suppressHover||(this.suppressHover=!0,document.addEventListener("mousemove",this.releaseHoverSuppress,!0))}scrollFocusedIntoView(){const t=this.listEl,e=t?.querySelector(".sd-select-v2-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 i=!!t.children;return[s("sd-select-v2-list-item",{option:t,depth:e,isSelected:i?this.getGroupSelectionState(t):this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,countInfo:this.getCountInfo(t),onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)}),i&&t.children?this.renderOptions(t.children,e+1):null]}))}render(){return s("div",{key:"b6a2e5bdc338bceb6fff14fb4dd1dff7aa5ef8d4",class:"sd-select-v2-listbox",style:{"--listbox-trigger-width":this.triggerWidth,"--listbox-max-width":this.maxWidth,"--listbox-max-height":this.maxHeight,"--listbox-radius":`${n.radius}px`,"--listbox-padding-bottom":`${n.paddingBottom}px`}},this.showSearch&&s("sd-select-v2-list-item-search",{key:"70698ce176c33401a5846a078e56b1f20332881c",isScrolled:this.isScrolled,onSdSearchFilter:this.handleSearchFilter}),s("div",{key:"b8106d8003dde8476b119cdde89fe4ddcaab2611",class:"sd-select-v2-listbox__list",onScroll:this.handleScroll,ref:t=>{this.listEl=t}},this.isEmpty?s("div",{class:"sd-select-v2-listbox__empty"},h):this.isDepth?this.renderOptions(this.filteredOptions):this.filteredOptions.map((t=>s("sd-select-v2-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}]}}};a.style="sd-select-v2-listbox{display:block}sd-select-v2-listbox .sd-select-v2-listbox{display:flex;flex-direction:column;min-width:var(--listbox-trigger-width);max-width:var(--listbox-max-width);max-height:var(--listbox-max-height);width:fit-content;border-radius:var(--listbox-radius);background:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);overflow:hidden;outline:none}sd-select-v2-listbox .sd-select-v2-listbox__list{flex:1;min-height:0;overflow-y:auto;padding-bottom:var(--listbox-padding-bottom)}sd-select-v2-listbox .sd-select-v2-listbox__empty{padding:12px;text-align:center;font-size:12px;line-height:20px;color:#888888}";const g=class{constructor(s){t(this,s),this.triggerClick=e(this,"sdTriggerClick")}displayText="";placeholder="선택";disabled=!1;isOpen=!1;triggerClick;handleClick=()=>{this.disabled||this.triggerClick.emit()};render(){const t=!!this.displayText;return s("div",{key:"bc824455fa516812712fe2c3f5858a7afe64340a",class:{"sd-select-v2-trigger":!0,"sd-select-v2-trigger--open":this.isOpen,"sd-select-v2-trigger--disabled":this.disabled},style:{"--trigger-padding-x":`${d.paddingX}px`,"--trigger-gap":`${d.gap}px`,"--trigger-font-size":`${c.fontSize}px`,"--trigger-line-height":`${c.lineHeight}px`,"--trigger-font-weight":c.fontWeight,"--trigger-color":this.disabled?l.text.disabled:t?l.text.default:l.icon.default,"--trigger-icon-color":this.disabled?l.icon.disabled:l.icon.default},onClick:this.handleClick},s("div",{key:"bf7bae47cc19b07d76dcadf118f8490a40a7b635",class:"sd-select-v2-trigger__content"},s("span",{key:"89799c367a752c6a7403ed20801e5dc87c9f3426",class:"sd-select-v2-trigger__text"},t?this.displayText:this.placeholder),s("sd-icon",{key:"dac0037a8c2f3d475795786b642f7cd725358fa4",name:"chevronDown",size:12,color:"var(--trigger-icon-color)",class:{"sd-select-v2-trigger__icon":!0,"sd-select-v2-trigger__icon--open":this.isOpen}})))}};g.style="sd-select-v2-trigger{display:block;width:100%;height:100%}sd-select-v2-trigger .sd-select-v2-trigger{display:flex;width:100%;height:100%;cursor:pointer;user-select:none;overflow:hidden;border-radius:3px}sd-select-v2-trigger .sd-select-v2-trigger--disabled{cursor:not-allowed}sd-select-v2-trigger .sd-select-v2-trigger__content{display:flex;align-items:center;gap:var(--trigger-gap);flex:1;padding:0 var(--trigger-padding-x);min-width:0}sd-select-v2-trigger .sd-select-v2-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-v2-trigger .sd-select-v2-trigger__icon{flex-shrink:0;transition:transform 0.2s ease}sd-select-v2-trigger .sd-select-v2-trigger__icon--open{transform:rotate(180deg)}";export{a as sd_select_v2_listbox,g as sd_select_v2_trigger}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,h as s}from"./p-B8tGP77V.js";const e=class{constructor(s){r(this,s)}type="bar";error=!1;percentage=0;size=80;strokeWidth=12;label;statusColor={default:"#aaaaaa",progress:"#0075ff",complete:"#12B553",error:"#FB4444"};get progressPercentage(){return this.error?100:this.percentage}get progressStatus(){if(this.error)return"error";switch(this.percentage){case 100:return"complete";case 0:return"default";default:return"progress"}}get progressColor(){return this.statusColor[this.progressStatus]}render(){return s("div",{key:"
|
|
1
|
+
import{r,h as s}from"./p-B8tGP77V.js";const e=class{constructor(s){r(this,s)}type="bar";error=!1;percentage=0;size=80;strokeWidth=12;label;statusColor={default:"#aaaaaa",progress:"#0075ff",complete:"#12B553",error:"#FB4444"};get progressPercentage(){return this.error?100:this.percentage}get progressStatus(){if(this.error)return"error";switch(this.percentage){case 100:return"complete";case 0:return"default";default:return"progress"}}get progressColor(){return this.statusColor[this.progressStatus]}render(){return s("div",{key:"483f8f0ec69bc7f4bd608332eb2f87b722bc947f",style:{"--progress-color":this.progressColor,"--progress-percentage":`${this.progressPercentage}%`}},"bar"===this.type?this.renderBarProgress():this.renderSpinnerProgress(),this.label&&s("div",{key:"b4d3f1f425cd4ae96ef02a6c56671a182ab7ca09",class:"sd-progress__label"},this.label))}renderBarProgress(){return s("div",{class:`sd-progress__bar sd-progress__bar--${this.progressStatus}`},s("div",{class:["sd-progress__bar__percent",this.progressPercentage<100?"proceed":""].join(" ")}),s("div",{class:"sd-progress__bar__indicator sd-progress__bar__indicator--left"},this.progressPercentage,"%"),s("div",{class:"sd-progress__bar__indicator sd-progress__bar__indicator--right"},this.progressPercentage,"%"))}renderSpinnerProgress(){const r=(this.size-this.strokeWidth)/2,e=2*Math.PI*r,t=e-this.progressPercentage/100*e,o=`${this.size}px`,i=this.size/2+"px";return s("div",{class:`sd-progress__spinner sd-progress__spinner--${this.progressStatus}`},s("svg",{width:o,height:o},s("circle",{cx:i,cy:i,r,stroke:"#EEEEEE","stroke-width":this.strokeWidth,fill:"transparent"}),s("circle",{cx:i,cy:i,r,stroke:this.progressColor,"stroke-width":this.strokeWidth,fill:"transparent","stroke-dasharray":e,"stroke-dashoffset":t,"stroke-linecap":"round",class:"transition-all duration-500"})),s("strong",{class:"sd-progress__spinner__label"},this.progressPercentage," %"))}};e.style="sd-progress{display:block}sd-progress .sd-progress__bar{position:relative;width:100%;height:20px;overflow:hidden;border-radius:4px;background-color:#EEEEEE;text-align:center}sd-progress .sd-progress__bar__percent{width:var(--progress-percentage);height:100%;border-radius:4px;background-color:var(--progress-color, #0075FF);transition:all 0.5s}sd-progress .sd-progress__bar__percent.proceed{border-top-right-radius:50%}sd-progress .sd-progress__bar__indicator{position:absolute;left:0;top:0;height:20px;width:100%;background-color:#EEEEEE;font-size:12px;font-weight:700;line-height:20px;z-index:1}sd-progress .sd-progress__bar__indicator--left{color:var(--progress-color, #0075FF);clip-path:inset(0 0 0 var(--progress-percentage))}sd-progress .sd-progress__bar__indicator--right{color:white;background-color:var(--progress-color, #0075FF);clip-path:inset(0 calc(100% - var(--progress-percentage)) 0 0)}sd-progress .sd-progress__spinner{display:flex;flex-direction:column;align-items:center;justify-content:center}sd-progress .sd-progress__spinner svg{transform:rotate(-90deg)}sd-progress .sd-progress__spinner__label{margin-top:8px;font-size:16px;color:var(--progress-color, #0075FF)}sd-progress .sd-progress__label{margin-top:4px;font-size:12px;color:#222222;text-align:center}";export{e as sd_progress}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,g as s,h as i}from"./p-B8tGP77V.js";const n=4e3;let o=0;const r=class{constructor(s){t(this,s),this.toastShow=e(this,"sdToastShow"),this.toastDismiss=e(this,"sdToastDismiss")}get el(){return s(this)}position="bottom-center";maxVisible=3;defaultDuration=n;zIndex=1e4;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(){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??1e4).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 h={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)`),{...h,opacity:"0",transform:a.join(" "),transition:"none"};if("exiting"===t.state)return a.push(`translateY(${n?20:-20}px)`),{...h,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)"),{...h,[r]:`${t}px`,opacity:"1",transform:a.join(" "),zIndex:""+(s.length-e)}}const c=8*e,m=[1,.8,.6],l=e<m.length?m[e]:0;return a.push(`translateY(${n?-c:c}px) scale(${1-.05*e})`),{...h,opacity:l.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,g as s,h as i}from"./p-B8tGP77V.js";const n=4e3;let o=0;const r=class{constructor(s){t(this,s),this.toastShow=e(this,"sdToastShow"),this.toastDismiss=e(this,"sdToastDismiss")}get el(){return s(this)}position="bottom-center";maxVisible=3;defaultDuration=n;zIndex=1e4;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(){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??1e4).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 h={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)`),{...h,opacity:"0",transform:a.join(" "),transition:"none"};if("exiting"===t.state)return a.push(`translateY(${n?20:-20}px)`),{...h,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)"),{...h,[r]:`${t}px`,opacity:"1",transform:a.join(" "),zIndex:""+(s.length-e)}}const c=8*e,m=[1,.8,.6],l=e<m.length?m[e]:0;return a.push(`translateY(${n?-c:c}px) scale(${1-.05*e})`),{...h,opacity:l.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:"5de5a655a8077dea7b691eaafb47a2fd9ebad6f0",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,useClose:t.options.useClose,onSdClose:()=>this.startDismiss(t.id)}))})))}};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-B8tGP77V.js";const d=class{constructor(s){e(this,s),this.change=t(this,"sdUpdate")}value=!1;label="";disabled=!1;change;componentWillLoad(){this.updateCheckedState(this.value)}componentWillRender(){this.updateCheckedState(this.value)}updateCheckedState(e){this.value=e}get toggleClasses(){const e=["sd-toggle",this.value?"sd-toggle--checked":"sd-toggle--unchecked"];return this.disabled&&e.push("sd-toggle--disabled"),e.join(" ")}handleChange=()=>{if(this.disabled)return;const e=!this.value;this.value=e,this.change.emit(e)};render(){return s("label",{key:"
|
|
1
|
+
import{r as e,c as t,h as s}from"./p-B8tGP77V.js";const d=class{constructor(s){e(this,s),this.change=t(this,"sdUpdate")}value=!1;label="";disabled=!1;change;componentWillLoad(){this.updateCheckedState(this.value)}componentWillRender(){this.updateCheckedState(this.value)}updateCheckedState(e){this.value=e}get toggleClasses(){const e=["sd-toggle",this.value?"sd-toggle--checked":"sd-toggle--unchecked"];return this.disabled&&e.push("sd-toggle--disabled"),e.join(" ")}handleChange=()=>{if(this.disabled)return;const e=!this.value;this.value=e,this.change.emit(e)};render(){return s("label",{key:"698daae860db5fbc4771e135ddc2bcb6b7401d3f","aria-label":this.label||"toggle",class:this.toggleClasses},s("input",{key:"fe54c7e2ae289fc24dca6c33b7ceb16780bf249f",type:"checkbox",checked:this.value,disabled:this.disabled,onInput:this.handleChange}),this.label&&s("span",{key:"5063162161ebaa9d1d2773aac3fdf3d482f4219a",class:"sd-toggle__label"},this.label),s("div",{key:"f320af2c5a89fab80e5cc90cbbd0dd88dee93cea",class:"sd-toggle__track"},s("div",{key:"a96f3f836d11e3a24e78a580797dc03e92e335b6",class:"sd-toggle__thumb"})))}};d.style="sd-toggle{display:inline-block;height:20px;line-height:0}sd-toggle .sd-toggle{cursor:pointer;display:inline-flex;align-items:center;gap:8px;height:20px}sd-toggle .sd-toggle>input{display:none}sd-toggle .sd-toggle__label{font-size:12px;color:#333333;line-height:20px}sd-toggle .sd-toggle__track{width:36px;height:20px;border-radius:12px;background:#CCCCCC;position:relative;transition:background-color 0.2s ease}sd-toggle .sd-toggle__thumb{width:16px;height:16px;border-radius:50%;background:white;position:absolute;top:2px;left:2px;transition:transform 0.2s ease}sd-toggle .sd-toggle--checked .sd-toggle__track{background:#0075FF}sd-toggle .sd-toggle--checked .sd-toggle__thumb{transform:translateX(16px)}sd-toggle .sd-toggle--disabled{cursor:not-allowed}sd-toggle .sd-toggle--disabled.sd-toggle--checked .sd-toggle__track{background:#BBDAFF}sd-toggle .sd-toggle--disabled.sd-toggle--unchecked .sd-toggle__track{background:#EEEEEE}sd-toggle .sd-toggle:hover:not(.sd-toggle--disabled).sd-toggle--checked .sd-toggle__track{background:#005CC9}sd-toggle .sd-toggle:hover:not(.sd-toggle--disabled).sd-toggle--unchecked .sd-toggle__track{background:#BBBBBB}";export{d as sd_toggle}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var F={size:{xs:{icon:"12"},sm:{icon:"16"},md:{icon:"20"},lg:{icon:"24"}},border:{disabled:"#CCCCCC"},dropdown:{xs:{minWidth:"60"},sm:{minWidth:"76"},md:{minWidth:"106"}},bg:{disabled:"#E1E1E1"},text:{disabled:"#888888"},brand:{strong:{bg:{default:"#025497",hover:"#004177"},content:"#FFFFFF",dropdown:{divider:"#006AC1"}},subtle:{bg:{default:"#1F8AE1",hover:"#006AC1"},content:"#FFFFFF",dropdown:{divider:"#5CB0F3"}},outline:{bg:{default:"#FFFFFF",hover:"#EAF5FE"},border:"#025497",content:"#025497"}},neutral:{outline:{bg:{default:"#FFFFFF",hover:"#EEEEEE"},border:"#888888",content:"#222222"}},danger:{strong:{bg:{default:"#E30000",hover:"#AD0000"},content:"#FFFFFF",dropdown:{divider:"#FF7C7C"}},outline:{bg:{default:"#FFFFFF",hover:"#FCEFEF"},border:"#E30000",content:"#E30000"}}};export{F as b}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as r}from"./p-
|
|
1
|
+
import{b as r}from"./p-DwYSoCyW.js";const a="#0075FF",i={primary:r.brand.strong.bg.default,secondary:r.brand.subtle.bg.default,primary_outline:r.brand.outline.bg.default,neutral_outline:r.neutral.outline.bg.default,danger:r.danger.strong.bg.default,danger_outline:r.danger.outline.bg.default},e={primary_xs:{variant:"primary",size:"xs",color:i.primary},secondary_xs:{variant:"primary",size:"xs",color:i.secondary},primary_outline_xs:{variant:"outline",size:"xs",color:i.primary_outline},neutral_outline_xs:{variant:"outline",size:"xs",color:i.neutral_outline},danger_xs:{variant:"primary",size:"xs",color:i.danger},danger_outline_xs:{variant:"outline",size:"xs",color:i.danger_outline},primary_sm:{variant:"primary",size:"sm",color:i.primary},secondary_sm:{variant:"primary",size:"sm",color:i.secondary},primary_outline_sm:{variant:"outline",size:"sm",color:i.primary_outline},neutral_outline_sm:{variant:"outline",size:"sm",color:i.neutral_outline},danger_sm:{variant:"primary",size:"sm",color:i.danger},danger_outline_sm:{variant:"outline",size:"sm",color:i.danger_outline},primary_md:{variant:"primary",size:"md",color:i.primary},secondary_md:{variant:"primary",size:"md",color:i.secondary},primary_outline_md:{variant:"outline",size:"md",color:i.primary_outline},neutral_outline_md:{variant:"outline",size:"md",color:i.neutral_outline},danger_md:{variant:"primary",size:"md",color:i.danger},danger_outline_md:{variant:"outline",size:"md",color:i.danger_outline},primary_lg:{variant:"primary",size:"lg",color:i.primary},secondary_lg:{variant:"primary",size:"lg",color:i.secondary},primary_outline_lg:{variant:"outline",size:"lg",color:i.primary_outline},neutral_outline_lg:{variant:"outline",size:"lg",color:i.neutral_outline},danger_lg:{variant:"primary",size:"lg",color:i.danger},danger_outline_lg:{variant:"outline",size:"lg",color:i.danger_outline}},n={xs:Number(r.size.xs.icon),sm:Number(r.size.sm.icon),md:Number(r.size.md.icon),lg:Number(r.size.lg.icon)},o={primary:r.brand.strong.bg.hover,secondary:r.brand.subtle.bg.hover,primary_outline:r.brand.outline.bg.hover,neutral_outline:r.neutral.outline.bg.hover,danger:r.danger.strong.bg.hover,danger_outline:r.danger.outline.bg.hover},l={primary:r.brand.strong.content,secondary:r.brand.subtle.content,primary_outline:r.brand.outline.content,neutral_outline:r.neutral.outline.content,danger:r.danger.strong.content,danger_outline:r.danger.outline.content},t={primary:"transparent",secondary:"transparent",primary_outline:r.brand.outline.border,neutral_outline:r.neutral.outline.border,danger:"transparent",danger_outline:r.danger.outline.border},s=/_(xs|sm|md|lg)$/,m=r=>r in e,_=r=>r.replace(s,"");export{e as B,l as P,n as a,a as b,t as c,o as d,_ as g,m as i}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as e}from"./p-B8tGP77V.js";var a={bg:"#07284A",content:"#FFFFFF"},o={bg:"#FB4444",content:"#FFFFFF"},n={bg:"#FFC700",content:"#222222"},d={bg:"#00973C",content:"#FFFFFF"},i={bg:"#005CC9",content:"#FFFFFF"};const c={default:{bg:a.bg,content:a.content},danger:{bg:o.bg,content:o.content},caution:{bg:n.bg,content:n.content},complete:{bg:d.bg,content:d.content},accent:{bg:i.bg,content:i.content}},r={iconSize:"16"},l=class{constructor(e){t(this,e),this.close=s(this,"sdClose")}icon;message;link;linkLabel;useClose=!1;type="default";close;render(){const t=c[this.type]??c.default,s=Number(r.iconSize);return e("div",{key:"
|
|
1
|
+
import{r as t,c as s,h as e}from"./p-B8tGP77V.js";var a={bg:"#07284A",content:"#FFFFFF"},o={bg:"#FB4444",content:"#FFFFFF"},n={bg:"#FFC700",content:"#222222"},d={bg:"#00973C",content:"#FFFFFF"},i={bg:"#005CC9",content:"#FFFFFF"};const c={default:{bg:a.bg,content:a.content},danger:{bg:o.bg,content:o.content},caution:{bg:n.bg,content:n.content},complete:{bg:d.bg,content:d.content},accent:{bg:i.bg,content:i.content}},r={iconSize:"16"},l=class{constructor(e){t(this,e),this.close=s(this,"sdClose")}icon;message;link;linkLabel;useClose=!1;type="default";close;render(){const t=c[this.type]??c.default,s=Number(r.iconSize);return e("div",{key:"02f7aaf208dabe0d4ed07816038379c865073296",style:{"--sd-toast-bg":t.bg,"--sd-toast-text":t.content}},e("div",{key:"b6273da0052dc663dc97c71705b8378ce9f73922",class:"sd-toast",role:"status","aria-live":"polite","aria-atomic":"true"},this.icon&&e("div",{key:"569b0afaeade5d5ec41218e1927a247df6beffc1",class:"sd-toast__icon"},e("sd-icon",{key:"b7e2113a36f3af91adaadbe1f87c39cef37c01fd",name:this.icon,size:s,color:t.content})),e("div",{key:"af6e8c9e5db30cbf5a1be3f0958470101935dde2",class:"sd-toast__content"},e("span",{key:"f6459b3d086f7675b37e922f9f4bc8ae6a257197",class:"sd-toast__message"},this.message)),this.link&&e("a",{key:"d3c000b69d039850b65c35836c0246d91290c111",href:this.link,class:"sd-toast__link",target:"_blank",rel:"noopener noreferrer"},this.linkLabel||this.link),this.useClose&&e("button",{key:"c9d75b733730fe6af6aa49b3780d1c9a894b7408",type:"button",class:"sd-toast__close",onClick:()=>this.close.emit(),"aria-label":"Close",title:"Close"},e("sd-icon",{key:"170643bc8fecd2f275202d28f2873ddb71918bbc",name:"close",size:s,color:t.content}))))}};l.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:700;white-space:nowrap}sd-toast .sd-toast__link{font-size:14px;line-height:24px;font-weight:700;color:var(--sd-toast-text);text-decoration:underline;cursor:pointer;transition:opacity 0.2s ease;margin-left:4px}sd-toast .sd-toast__link:hover{opacity:0.8}sd-toast .sd-toast__button{flex-shrink:0}sd-toast .sd-toast__button button{color:var(--button-text-color, inherit) !important}sd-toast .sd-toast__close{display:flex;align-items:center;justify-content:center;padding:4px;background-color:transparent;border:none;cursor:pointer;transition:opacity 0.2s ease;flex-shrink:0}sd-toast .sd-toast__close:hover{opacity:0.7}sd-toast .sd-toast__close:active{opacity:0.5}";export{l as sd_toast}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,g as i,h as s}from"./p-B8tGP77V.js";import{n as a}from"./p-CCwNgVmC.js";import{i as n}from"./p-CbjDAdZ_.js";import{s as d}from"./p-CS6ohqwt.js";const r=n.input.sm,o=n.input.md,c={sm:{height:r.height,paddingX:r.paddingX,gap:r.gap,radius:r.radius,fontSize:r.typography.fontSize,lineHeight:r.typography.lineHeight,fontWeight:r.typography.fontWeight},md:{height:o.height,paddingX:o.paddingX,gap:o.gap,radius:o.radius,fontSize:o.typography.fontSize,lineHeight:o.typography.lineHeight,fontWeight:o.typography.fontWeight}},l={text:n.input.text,icon:n.input.icon},p={frameSize:Number(n.input.size.icon),iconSize:Number(d.size.field.icon)},h=class{constructor(i){e(this,i),this.input=t(this,"sdUpdate"),this.focus=t(this,"sdFocus"),this.blur=t(this,"sdBlur")}get host(){return i(this)}value=null;type="text";size="sm";addonLabel="";placeholder="입력해 주세요.";disabled=!1;clearable=!1;width="";rules=[];autoFocus=!1;status;hint="";errorMessage="";inputClass="";readonly=!1;error=!1;focused=!1;hovered=!1;label="";icon=void 0;labelTooltip="";labelTooltipProps=null;inputStyle={};internalValue=null;passwordVisible=!1;nativeEl=void 0;formField;name=a();input;focus;blur;valueChanged(e){this.internalValue=e}internalValueChanged(e){e!==this.value&&(this.value=e,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=e=>{this.internalValue=e.target.value};handleFocus=async(e,t)=>{this.focused="focus"===e,"blur"===e?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(t)):this.focus?.emit(t)};render(){const e=c[this.size]??c.sm;return s("sd-field",{key:"6d88c272fc66a04f95140cddac8f4d343b7b0175",name:this.name,label:this.label,addonLabel:this.addonLabel,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,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-input-font-size":`${e.fontSize}px`,"--sd-input-line-height":`${e.lineHeight}px`,"--sd-input-font-weight":e.fontWeight,"--sd-input-padding-x":`${e.paddingX}px`,"--sd-input-gap":`${e.gap}px`,"--sd-input-text-color":l.text.default,"--sd-input-placeholder-color":l.text.placeholder,"--sd-input-disabled-color":l.text.disabled,"--sd-input-icon-color":l.icon.default,"--sd-system-size-field-sm-height":`${e.height}px`,"--sd-system-radius-field-sm":`${e.radius}px`}},s("label",{key:"76ab84d0c97d400d17e34838d7ad527d8d472c98",class:"sd-input__content"},s("slot",{key:"db463a1ff0c3a2d793aea57454dc49b04e919aa3",name:"prefix"}),s("input",{key:"ebabcd0fdd55a44637c532e3eccacd3ff4e71f54",name:this.name,ref:e=>this.nativeEl=e,class:`sd-input__native ${this.inputClass}`,type:"password"===this.type&&this.passwordVisible?"text":this.type,value:this.internalValue||"",placeholder:this.placeholder,disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onFocus:e=>this.handleFocus("focus",e),onBlur:e=>this.handleFocus("blur",e),style:this.inputStyle}),s("slot",{key:"40b09f7d1acb3287142efec65b1c3a8a8b1e9302",name:"suffix"}),this.clearable&&this.internalValue&&!this.disabled&&s("sd-icon",{key:"b403de0832762dc025bfc9add1835547acfd477a",name:"close",color:l.icon.default,size:p.iconSize,class:"sd-input__clear-icon",onClick:async()=>{this.disabled||(this.internalValue="",await(this.formField?.sdValidate()))}}),"password"===this.type&&s("sd-icon",{key:"edf2773fc424a4f9197ab1157781648e2dd3f0b6",name:this.passwordVisible?"visibilityOn":"visibilityOff",color:l.icon.default,size:p.frameSize,class:"sd-input__password-icon",onClick:()=>{this.disabled||(this.passwordVisible=!this.passwordVisible)}})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}};h.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)}.sd-date-picker{width:100%;display:inline-block}.sd-date-picker .sd-date-picker--disabled .date-icon{cursor:not-allowed !important;color:#888888 !important}.sd-date-picker .sd-date-picker__input{text-align:center !important}.sd-date-picker__menu{border-radius:8px;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2)}sd-date-range-picker{width:fit-content;display:inline-flex}sd-date-range-picker .sd-date-range-picker--disabled .date-icon{cursor:not-allowed !important;color:#888888 !important}sd-date-range-picker .sd-date-range-picker--disabled .sd-input__native{color:#888888 !important}sd-date-range-picker .sd-field .sd-field__control{min-width:210px}sd-date-range-picker .sd-field .sd-input__native{margin-left:17px !important}.sd-date-range-picker__menu{width:609px;box-sizing:border-box;border-radius:8px;padding:24px 19px;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2);background:white}.sd-date-range-picker__menu .sd-date-range-picker__header{margin-bottom:16px;display:flex;flex-flow:row nowrap;align-items:center;justify-content:center}.sd-date-range-picker__menu .sd-date-range-picker__header .header-label{margin:0 12px;width:40px;text-align:center;font-size:14px;line-height:24px}.sd-date-range-picker__menu .sd-date-range-picker__body{display:flex;flex-flow:row nowrap;align-items:stretch;gap:19px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container{width:266px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-header{width:100%;height:24px;line-height:24px;font-size:14px;text-align:center;position:relative;padding:0 5px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-header button{position:absolute;top:50%;transform:translateY(-50%)}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-header button.header-button-prev{left:5px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-header button.header-button-next{right:5px;left:auto}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-days{padding:0 5px;margin-top:8px;display:grid;grid-template-columns:repeat(7, minmax(0, 1fr));column-gap:10px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-days .day{width:28px;height:20px;font-size:12px;line-height:20px;text-align:center;color:#888888}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-body{margin-top:12px;display:grid;grid-template-columns:repeat(7, minmax(0, 1fr))}.sd-date-range-picker__menu .sd-date-range-picker__body .separator{width:1px;background-color:#D8D8D8}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 #fff inset;box-shadow:0 0 0px 1000px #fff 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 #fff inset;box-shadow:0 0 0px 1000px #fff inset;transition:background-color 5000s ease-in-out 0s}sd-input{display:inline-flex}sd-input .sd-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;color:var(--sd-input-text-color);font-size:var(--sd-input-font-size);line-height:var(--sd-input-line-height);font-weight:var(--sd-input-font-weight);padding:0 var(--sd-input-padding-x);gap:var(--sd-input-gap)}sd-input .sd-input__content .sd-input__native{width:100%;height:100%;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}sd-input .sd-input__content .sd-input__native[disabled]{cursor:not-allowed;color:var(--sd-input-disabled-color)}sd-input .sd-input__content .sd-input__native::placeholder{color:var(--sd-input-placeholder-color)}sd-input .sd-input__content .sd-input__clear-icon,sd-input .sd-input__content .sd-input__password-icon{flex-shrink:0;cursor:pointer}sd-input .sd-input__content .sd-input__native[disabled]~.sd-input__clear-icon,sd-input .sd-input__content .sd-input__native[disabled]~.sd-input__password-icon{cursor:not-allowed;pointer-events:none}";const u=class{constructor(i){e(this,i),this.searchInput=t(this,"sdSearchInput"),this.searchFocus=t(this,"sdSearchFocus")}isScrolled=!1;searchText="";searchInput;searchFocus;searchRef;async sdGetNativeElement(){return this.searchRef?this.searchRef.sdGetNativeElement():null}async sdSearchInputFocus(){const e=await this.sdGetNativeElement();e?.focus({preventScroll:!0})}render(){return s("div",{key:"cfc997e9e3c418a2aa6eb33cb39a3928fba84f91",class:{"sd-select-search-input":!0,"sd-select-search-input--scrolled":!!this.isScrolled},onClick:e=>e.stopPropagation()},s("sd-input",{key:"5d2528dfba7a392c31d47699f4afbcee41583754",ref:e=>this.searchRef=e,value:this.searchText,placeholder:"검색",clearable:!0,inputStyle:{"padding-left":"8px"},autofocus:!0,onSdUpdate:e=>{this.searchInput.emit(String(e?.detail))},onSdFocus:()=>{this.searchFocus.emit()},onKeyDown:e=>{"Enter"===e.code&&e.stopPropagation()}},s("sd-icon",{key:"a9161175dfd27e86fa5ac036ab592c33d5820040",name:"search",size:16,color:"#737373",style:{marginRight:"4px"},slot:"prefix"})))}};u.style="sd-select-search-input{position:sticky;top:0;display:flex;width:100%;background-color:white;align-items:center}sd-select-search-input .sd-select-search-input{position:sticky;top:0;display:flex;width:100%;background-color:white;align-items:center;padding:4px 8px}sd-select-search-input .sd-select-search-input sd-input{width:100%}sd-select-search-input .sd-select-search-input--scrolled{box-shadow:2px 2px 8px 2px rgba(0, 0, 0, 0.2)}";export{h as sd_input,u as sd_select_search_input}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as o,g as d,h as n}from"./p-B8tGP77V.js";import{B as r}from"./p-CRdYeSBK.js";import{B as e,g as s,c as i,P as a,d as p,b as u}from"./p-DzagopqQ.js";import{b}from"./p-DwYSoCyW.js";import{s as c}from"./p-CS6ohqwt.js";const w=Object.keys(e).filter((t=>!t.endsWith("_lg"))),h=Object.fromEntries(w.map((t=>[t,e[t]]))),g={xs:b.dropdown.xs.minWidth,sm:b.dropdown.sm.minWidth,md:b.dropdown.md.minWidth},l=p,m=a,f=i,x={primary:b.brand.strong.dropdown.divider,secondary:b.brand.subtle.dropdown.divider,primary_outline:f.primary_outline,neutral_outline:f.neutral_outline,danger:b.danger.strong.dropdown.divider,danger_outline:f.danger_outline},_=c.color.content.secondary,v=c.color.bg.accent.default,y=c.color.content.inverse,k={primary:_,secondary:_,primary_outline:_,neutral_outline:_,danger:_,danger_outline:_},z={primary:v,secondary:v,primary_outline:v,neutral_outline:v,danger:v,danger_outline:v},C={primary:y,secondary:y,primary_outline:y,neutral_outline:y,danger:y,danger_outline:y},D=b.bg.disabled,O=b.text.disabled,j=b.border.disabled,A=class extends r{constructor(d){super(),t(this,d),this.click=o(this,"sdClick"),this.dropDownShow=o(this,"sdDropDownShow")}get el(){return d(this)}name="primary_sm";label="";items=[];disabled=!1;static CLOSE_ANIMATION_DURATION=150;isOpen=!1;isAnimatingOut=!1;itemIndex=-1;triggerRef;menuRef;closeAnimationTimer;click;dropDownShow;handleOpenChange(t){this.onDropdownToggle(t),this.dropDownShow.emit({isOpen:t}),t||(this.itemIndex=-1)}componentWillLoad(){this.initializeEvent()}disconnectedCallback(){this.cleanupEvent(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}async sdOpen(){this.disabled||0===this.items.length||(this.isOpen=!0)}async sdClose(){this.closeDropdown()}closeDropdown=()=>{this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),A.CLOSE_ANIMATION_DURATION))};handleDocumentClick(t){const o=t.target;o&&(this.el.contains(o)||this.menuRef?.contains(o)||this.closeDropdown())}handleDocumentKeydown(t){if(this.isOpen&&["ArrowDown","ArrowUp","Enter","Escape"].includes(t.key))switch(t.preventDefault(),t.stopPropagation(),t.key){case"ArrowDown":this.itemIndex=this.getNextEnabledIndex(1);break;case"ArrowUp":this.itemIndex=this.getNextEnabledIndex(-1);break;case"Enter":if(this.itemIndex<0)return;this.selectItem(this.items[this.itemIndex]);break;case"Escape":this.closeDropdown()}}get resolvedConfig(){if(!(this.name in h))throw new Error(`Invalid sd-dropdown-button name: ${this.name}`);return{config:h[this.name],preset:(()=>s(this.name))()}}getNextEnabledIndex(t){const o=this.items.reduce(((t,o,d)=>(o.disabled||t.push(d),t)),[]);if(0===o.length)return-1;const d=o.indexOf(this.itemIndex);return-1===d?1===t?o[0]:o[o.length-1]:o[(d+t+o.length)%o.length]}toggleDropdown=t=>{t.stopPropagation(),this.disabled||0===this.items.length||(this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0))};selectItem(t,o){o?.stopPropagation(),t&&!t.disabled&&(this.click.emit(t.value),this.closeDropdown())}getTriggerClasses(t,o,d,n){const r=["sd-dropdown-button__trigger",`sd-dropdown-button__trigger--${t}`,`sd-dropdown-button__trigger--${o}`];return d&&r.push("sd-dropdown-button__trigger--disabled"),n&&r.push("sd-dropdown-button__trigger--open"),r.join(" ")}getMenuItemClasses(t,o){const d=["sd-dropdown-button__menu-item"];return t&&d.push("sd-dropdown-button__menu-item--active"),o&&d.push("sd-dropdown-button__menu-item--disabled"),d.join(" ")}renderDropdown(t){return(this.isOpen||this.isAnimatingOut)&&this.triggerRef?n("sd-portal",{open:this.isOpen,parentRef:this.triggerRef,onSdClose:this.closeDropdown},n("div",{style:{position:"absolute",width:"0px",height:"0px"}},n("div",{class:"sd-dropdown-button__menu",role:"menu",ref:t=>this.menuRef=t,style:{"--sd-dropdown-button-menu-min-width":`${this.triggerRef.offsetWidth}px`,"--sd-dropdown-button-menu-item-color":k[t],"--sd-dropdown-button-menu-item-active-bg":z[t],"--sd-dropdown-button-menu-item-active-color":C[t],"--sd-dropdown-button-menu-border":"transparent"===f[t]?x[t]:f[t]}},this.items.map(((t,o)=>n("button",{type:"button",role:"menuitem",class:this.getMenuItemClasses(this.itemIndex===o&&!t.disabled,Boolean(t.disabled)),disabled:t.disabled,onClick:o=>this.selectItem(t,o),onMouseEnter:()=>{t.disabled||(this.itemIndex=o)}},t.icon&&n("sd-icon",{class:"sd-dropdown-button__menu-item-icon",name:t.icon,size:12,color:"var(--sd-dropdown-button-menu-item-current-color)"}),n("span",{class:"sd-dropdown-button__menu-item-label",innerHTML:t.label}))))))):null}render(){const{config:t,preset:o}=this.resolvedConfig;return n("div",{key:"ec3cf7d184cbf49cc60a633b4a5de719a5903098",class:"sd-dropdown-button"},n("button",{key:"02a7208bc16fbd89af72d4dbc885951949507e11",type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen),disabled:this.disabled,"aria-haspopup":"menu","aria-expanded":String(this.isOpen),onClick:this.toggleDropdown,ref:t=>this.triggerRef=t,style:{"--sd-dropdown-button-min-width":`${g[t.size]}px`,"--sd-dropdown-button-bg":t.color,"--sd-dropdown-button-bg-hover":l[o],"--sd-dropdown-button-border":f[o],"--sd-dropdown-button-content":m[o],"--sd-dropdown-button-divider":x[o],"--sd-dropdown-button-accent":u,"--sd-dropdown-button-disabled-bg":D,"--sd-dropdown-button-disabled-content":O,"--sd-dropdown-button-disabled-border":j}},n("span",{key:"04f3d92100e85b3aad59541a19002dc395c783fc",class:"sd-dropdown-button__trigger-label"},this.label),n("span",{key:"72a49942403856fecfc2415d7318ef549f80905c",class:"sd-dropdown-button__trigger-divider","aria-hidden":"true"}),n("span",{key:"cc7926fb8b3eec86dfcbb3c0aec5d193fd202cca",class:{"sd-dropdown-button__trigger-icon":!0,"sd-dropdown-button__trigger-icon--open":this.isOpen},"aria-hidden":"true"},n("sd-icon",{key:"4540ee571613668bae9157221ff8550a07cd35fa",name:"chevronDown",size:12,color:"var(--sd-dropdown-button-current-content)"}))),this.renderDropdown(o))}static get watchers(){return{isOpen:[{handleOpenChange:0}]}}};A.style="sd-dropdown-button{display:inline-flex;width:fit-content;height:fit-content}.sd-dropdown-button{display:inline-flex;position:relative}.sd-dropdown-button__trigger{--sd-dropdown-button-height:var(--sd-button-md-height, 34px);--sd-dropdown-button-padding-x:var(--sd-button-md-padding-x, 20px);--sd-dropdown-button-gap:var(--sd-button-md-gap, 8px);--sd-dropdown-button-font-family:var(--sd-button-md-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-md-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-md-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var(--sd-button-md-typography-text-decoration, none);--sd-dropdown-button-bg:#025497;--sd-dropdown-button-bg-hover:#004177;--sd-dropdown-button-border:transparent;--sd-dropdown-button-content:#ffffff;--sd-dropdown-button-current-content:var(--sd-dropdown-button-content);--sd-dropdown-button-divider:#006ac1;--sd-dropdown-button-accent:#006ac1;--sd-dropdown-button-min-width:106px;--sd-dropdown-button-disabled-bg:var(--sd-button-bg-disabled, $grey_30);--sd-dropdown-button-disabled-content:var(--sd-button-text-disabled, $grey_65);--sd-dropdown-button-disabled-border:var(--sd-button-border-disabled, $grey_45);display:inline-flex;align-items:stretch;justify-content:space-between;min-width:var(--sd-dropdown-button-min-width);min-height:var(--sd-dropdown-button-height);padding:0;border:var(--sd-button-border-width-default, 1px) solid var(--sd-dropdown-button-border);border-radius:var(--sd-button-radius-default, 4px);background:var(--sd-dropdown-button-bg);color:var(--sd-dropdown-button-current-content);cursor:pointer;box-sizing:border-box;font-family:var(--sd-dropdown-button-font-family);font-size:var(--sd-dropdown-button-font-size);font-weight:var(--sd-dropdown-button-font-weight);line-height:1;text-decoration:var(--sd-dropdown-button-text-decoration);transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;white-space:nowrap}.sd-dropdown-button__trigger:hover:not(.sd-dropdown-button__trigger--disabled){background:var(--sd-dropdown-button-bg-hover)}.sd-dropdown-button__trigger:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-dropdown-button-accent)}.sd-dropdown-button__trigger--xs{--sd-dropdown-button-height:var(--sd-button-xs-height, 24px);--sd-dropdown-button-padding-x:var(--sd-button-xs-padding-x, 8px);--sd-dropdown-button-gap:var(--sd-button-xs-gap, 4px);--sd-dropdown-button-font-family:var(--sd-button-xs-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-xs-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-xs-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var(--sd-button-xs-typography-text-decoration, none)}.sd-dropdown-button__trigger--sm{--sd-dropdown-button-height:var(--sd-button-sm-height, 28px);--sd-dropdown-button-padding-x:var(--sd-button-sm-padding-x, 12px);--sd-dropdown-button-gap:var(--sd-button-sm-gap, 6px);--sd-dropdown-button-font-family:var(--sd-button-sm-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-sm-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-sm-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var(--sd-button-sm-typography-text-decoration, none)}.sd-dropdown-button__trigger--md{--sd-dropdown-button-height:var(--sd-button-md-height, 34px);--sd-dropdown-button-padding-x:var(--sd-button-md-padding-x, 20px);--sd-dropdown-button-gap:var(--sd-button-md-gap, 8px);--sd-dropdown-button-font-family:var(--sd-button-md-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-md-typography-font-size, 16px);--sd-dropdown-button-font-weight:var(--sd-button-md-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var(--sd-button-md-typography-text-decoration, none)}.sd-dropdown-button__trigger--disabled{border-color:var(--sd-dropdown-button-disabled-border);background:var(--sd-dropdown-button-disabled-bg);--sd-dropdown-button-current-content:var(--sd-dropdown-button-disabled-content);cursor:not-allowed}.sd-dropdown-button__trigger--disabled .sd-dropdown-button__trigger-divider{background:var(--sd-dropdown-button-disabled-border)}.sd-dropdown-button__trigger-label,.sd-dropdown-button__trigger-icon{display:inline-flex;align-items:center;justify-content:center}.sd-dropdown-button__trigger-label{flex:1 1 auto;min-width:0;padding:0 var(--sd-dropdown-button-padding-x)}.sd-dropdown-button__trigger-divider{align-self:stretch;width:1px;height:auto;background:var(--sd-dropdown-button-divider);opacity:0.9}.sd-dropdown-button__trigger-icon{flex:0 0 auto;min-width:calc(var(--sd-dropdown-button-height) - 2px);padding:0 calc(var(--sd-dropdown-button-gap) + 2px);transition:transform 0.2s ease}.sd-dropdown-button__trigger-icon--open{transform:rotate(180deg)}.sd-dropdown-button__menu{position:relative;display:grid;width:max-content;min-width:var(--sd-dropdown-button-menu-min-width, max-content);max-width:calc(100vw - 24px);padding:4px 0;border:0;border-radius:4px;background:#FFFFFF;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1019607843);box-sizing:border-box;overflow:hidden}.sd-dropdown-button__menu-item{--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-menu-item-color);display:inline-flex;align-items:center;gap:8px;min-height:28px;width:100%;padding:0 12px;border:0;border-radius:0;background:transparent;color:var(--sd-dropdown-button-menu-item-current-color);cursor:pointer;box-sizing:border-box;font:inherit;text-align:left;transition:background-color 0.15s ease, color 0.15s ease}.sd-dropdown-button__menu-item--active{background:var(--sd-dropdown-button-menu-item-active-bg);--sd-dropdown-button-menu-item-current-color:var( --sd-dropdown-button-menu-item-active-color )}.sd-dropdown-button__menu-item--disabled{--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-disabled-content);cursor:not-allowed}.sd-dropdown-button__menu-item-icon{flex:0 0 auto}.sd-dropdown-button__menu-item-label{display:inline-flex;align-items:center;min-width:0;white-space:nowrap;font-size:12px}";export{A as sd_dropdown_button}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,g as t,h as e,F as o}from"./p-B8tGP77V.js";import{T as i}from"./p-BeCHKP_I.js";var a={icon:"12",color:"#888888"},n="#07284A";const c=class{constructor(t){s(this,t)}get el(){return t(this)}show=!1;placement="bottom";color="#01BB4B";icon="helpOutline";iconSize=12;label="";buttonSize="sm";buttonVariant="primary";menuTitle;messages=[];buttons=[];menuClass="";noHover=!0;useClose=!1;showPopover=!1;slotContent="";watchShowHandler(s){this.showPopover=s}componentWillLoad(){this.showPopover=this.show,this.slotContent=this.el.innerHTML}buttonEl;get popoverOffset(){switch(this.placement){case"top":return[0,-4];case"bottom":return[0,4];case"left":case"right":return[4,0]}}handleClose=()=>{this.showPopover=!1};render(){return e(o,{key:"32543028f51799b838817a81d82c8fc4e16d34d9"},this.label?e("sd-button",{ref:s=>this.buttonEl=s,label:this.label,icon:this.icon,size:this.buttonSize,color:this.color,variant:this.buttonVariant,class:"sd-popover",onSdClick:()=>this.showPopover=!this.showPopover}):e("sd-icon",{ref:s=>this.buttonEl=s,name:this.icon,size:this.iconSize,color:this.color,class:"sd-popover",onClick:()=>this.showPopover=!this.showPopover}),this.showPopover&&e("sd-floating-portal",{key:"146f7b10c48d0e43d9daad84f2b0d73a53c1f083",parentRef:this.buttonEl,onSdClose:this.handleClose,placement:this.placement,offset:this.popoverOffset},e("div",{key:"020b1bc52cb001ef761aac5e88fdfe4a3cc1dbfc",class:{"sd-floating-menu":!0,"sd-floating-menu--popover":!0,[`sd-floating-menu--${this.placement}`]:!0,[this.menuClass]:!!this.menuClass},style:{"--sd-floating-bg":n}},e("i",{key:"819af7776ce65a25c996262105b05e37d4d04652",class:`sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}`},e(i,{key:"053b299c5a41acb16042adfa2aba7c35eedb0602"})),e("div",{key:"109f2b1044827112922e40b04671785209b9d816",class:"sd-floating-menu__content"},this.menuTitle&&e("div",{key:"99f49b0165ce502ba30ecac3369ba6086cbabb6f",class:"sd-floating-menu__title"},this.menuTitle),this.messages.length>0&&e("div",{key:"5ecd1eea5a83c3fcf71719b308b75734ba42f96d",class:"sd-floating-menu__messages"},this.messages.map((s=>e("div",null,s)))),this.buttons.length>0&&e("div",{key:"9a3a3a38dd3fac46e370f45e65dd22dbcf49bce7",class:`sd-floating-menu__buttons sd-floating-menu__buttons--${this.buttons.length}`},this.buttons.map((s=>e("sd-button",{...s}))))),this.useClose&&e("button",{key:"6f231ddb997a45f23c258a092b45f3d6a5e49e60",title:"close",class:"sd-floating-menu__close-button",onClick:()=>this.handleClose()},e("sd-icon",{key:"738c152ec2435992ae21394bf2c164515cef7ed9",name:"close",size:a.icon,color:a.color})))))}static get watchers(){return{show:[{watchShowHandler:0}]}}};c.style="sd-popover{position:relative;cursor:pointer;display:inline-flex}";export{c as sd_popover}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as o,h as e}from"./p-B8tGP77V.js";const s=class{constructor(e){t(this,e),this.change=o(this,"sdUpdate")}value=!1;label="";disabled=!1;isActive=!1;change;componentWillLoad(){this.updateActiveState(this.value)}componentWillRender(){this.updateActiveState(this.value)}updateActiveState(t){this.isActive=t}get buttonClasses(){const t=["sd-toggle-button"];return this.isActive&&t.push("sd-toggle-button--active"),this.disabled&&t.push("sd-toggle-button--disabled"),t.join(" ")}handleChange=()=>{if(this.disabled)return;const t=!this.value;this.value=t,this.change.emit(t)};render(){return e("label",{key:"
|
|
1
|
+
import{r as t,c as o,h as e}from"./p-B8tGP77V.js";const s=class{constructor(e){t(this,e),this.change=o(this,"sdUpdate")}value=!1;label="";disabled=!1;isActive=!1;change;componentWillLoad(){this.updateActiveState(this.value)}componentWillRender(){this.updateActiveState(this.value)}updateActiveState(t){this.isActive=t}get buttonClasses(){const t=["sd-toggle-button"];return this.isActive&&t.push("sd-toggle-button--active"),this.disabled&&t.push("sd-toggle-button--disabled"),t.join(" ")}handleChange=()=>{if(this.disabled)return;const t=!this.value;this.value=t,this.change.emit(t)};render(){return e("label",{key:"3f5747da955bf4838f95a11c52677c269e627513",class:this.buttonClasses,"aria-label":this.label||"toggle button"},this.label,e("input",{key:"3fcf184d64abec88674a999982aee09f8670c311",style:{display:"none"},type:"checkbox",onInput:this.handleChange}))}};s.style="sd-toggle-button{display:inline-block;line-height:0}.sd-toggle-button{display:inline-flex;align-items:center;justify-content:center;height:28px;padding:4px 12px;gap:6px;border-radius:14px;border:1px solid #888888;background-color:#FFFFFF;color:#737373;font-size:12px;line-height:20px;font-weight:400;cursor:pointer;transition:border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;white-space:nowrap;user-select:none;box-sizing:border-box}.sd-toggle-button--active{border-color:#0075FF;color:#0075FF}.sd-toggle-button--disabled{background-color:#EEEEEE;border-color:#CCCCCC;color:#888888;cursor:not-allowed}.sd-toggle-button--disabled.sd-toggle-button--active{background-color:#EEEEEE;border-color:#CCCCCC;color:#888888}.sd-toggle-button:hover:not(.sd-toggle-button--disabled):not(.sd-toggle-button--active){border-color:#737373}.sd-toggle-button:hover:not(.sd-toggle-button--disabled).sd-toggle-button--active{border-color:#005CC9;color:#005CC9}";export{s as sd_toggle_button}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as i}from"./p-B8tGP77V.js";var n={textLink:{gap:"4",size:{icon:"16"},typography:{default:{fontSize:"12",fontWeight:"500",textDecoration:"none",lineHeight:"20"},underline:{fontSize:"12",fontWeight:"500",textDecoration:"underline",lineHeight:"22"}},content:{default:"#222222",disabled:"#888888"},icon:{default:"#006AC1",disabled:"#BBBBBB"}}};const s={gap:n.textLink.gap,iconSize:Number(n.textLink.size.icon),arrowFrame:16,arrowIconSize:12,arrowColor:"#888888"},l={default:n.textLink.typography.default,underline:n.textLink.typography.underline},d={content:n.textLink.content,icon:n.textLink.icon},o=class{constructor(i){e(this,i),this.click=t(this,"sdClick")}label="";icon="";iconColor="";useArrow=!1;underline=!1;disabled=!1;click;handleClick=()=>{this.disabled||this.click.emit()};render(){const e=this.underline?l.underline:l.default,t=this.disabled?d.icon.disabled:s.arrowColor;return i("span",{key:"
|
|
1
|
+
import{r as e,c as t,h as i}from"./p-B8tGP77V.js";var n={textLink:{gap:"4",size:{icon:"16"},typography:{default:{fontSize:"12",fontWeight:"500",textDecoration:"none",lineHeight:"20"},underline:{fontSize:"12",fontWeight:"500",textDecoration:"underline",lineHeight:"22"}},content:{default:"#222222",disabled:"#888888"},icon:{default:"#006AC1",disabled:"#BBBBBB"}}};const s={gap:n.textLink.gap,iconSize:Number(n.textLink.size.icon),arrowFrame:16,arrowIconSize:12,arrowColor:"#888888"},l={default:n.textLink.typography.default,underline:n.textLink.typography.underline},d={content:n.textLink.content,icon:n.textLink.icon},o=class{constructor(i){e(this,i),this.click=t(this,"sdClick")}label="";icon="";iconColor="";useArrow=!1;underline=!1;disabled=!1;click;handleClick=()=>{this.disabled||this.click.emit()};render(){const e=this.underline?l.underline:l.default,t=this.disabled?d.icon.disabled:s.arrowColor;return i("span",{key:"e93a2744e49a267f4b775793e0e18f0c223a03dd",class:{"sd-text-link":!0,"sd-text-link--disabled":this.disabled},style:{"--sd-text-link-gap":`${s.gap}px`,"--sd-text-link-font-size":`${e.fontSize}px`,"--sd-text-link-font-weight":e.fontWeight,"--sd-text-link-line-height":`${e.lineHeight}px`,"--sd-text-link-text-decoration":e.textDecoration,"--sd-text-link-color":this.disabled?d.content.disabled:d.content.default},onClick:this.handleClick},this.icon&&i("sd-icon",{key:"3f39510caef0cec81ba23340e25f920389886b69",name:this.icon,size:s.iconSize,color:this.disabled?d.icon.disabled:this.iconColor||d.icon.default,class:"sd-text-link__icon"}),i("span",{key:"ad0cac3fda5be82e5f0d2d9e7822b2bf82d2d4ee",class:"sd-text-link__label"},this.label),this.useArrow&&i("span",{key:"2ecdfdb83f62468ff36f6da1b96caf53b2302bbf",class:"sd-text-link__arrow",style:{width:`${s.arrowFrame}px`,height:`${s.arrowFrame}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"}},i("sd-icon",{key:"92140c5c4fffc70af27894cd4f1a6bab80e6f64c",name:"chevronRight",size:s.arrowIconSize,color:t})))}};o.style="sd-text-link{display:inline-flex}sd-text-link .sd-text-link{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);font-weight:var(--sd-text-link-font-weight);line-height:var(--sd-text-link-line-height);text-decoration:var(--sd-text-link-text-decoration);color:var(--sd-text-link-color)}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}";export{o as sd_text_link}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,c as o,h as d}from"./p-B8tGP77V.js";import{m as e}from"./p-rGbM8XR_.js";const{modal:t}=e,i=t.action,n={radius:Number(t.radius),bg:t.bg,headerPaddingX:Number(i.header.paddingX),headerPaddingY:Number(i.header.paddingY),headerGap:Number(i.header.gap),bodyPaddingX:Number(i.body.paddingX),bodyPaddingBottom:Number(i.body.paddingBottom),footerPaddingX:Number(i.footer.paddingX),footerPaddingY:Number(i.footer.paddingY),footerGap:Number(i.footer.gap),footerBg:i.footer.bg,footerBorder:i.footer.border},s={color:i.title.color,fontFamily:i.title.typography.fontFamily,fontWeight:i.title.typography.fontWeight,fontSize:Number(i.title.typography.fontSize),lineHeight:Number(i.title.typography.lineHeight)},l=Number(t.close.size),c=t.close.color,r=class{constructor(d){a(this,d),this.close=o(this,"sdClose"),this.ok=o(this,"sdOk")}modalTitle="";buttonLabel="확인";close;ok;render(){return d("div",{key:"15fc49f34b906f21a0939a1fab37270132392f24",class:"sd-action-modal",style:{"--sd-action-modal-radius":`${n.radius}px`,"--sd-action-modal-bg":n.bg,"--sd-action-modal-header-padding-x":`${n.headerPaddingX}px`,"--sd-action-modal-header-padding-y":`${n.headerPaddingY}px`,"--sd-action-modal-header-gap":`${n.headerGap}px`,"--sd-action-modal-body-padding-x":`${n.bodyPaddingX}px`,"--sd-action-modal-body-padding-bottom":`${n.bodyPaddingBottom}px`,"--sd-action-modal-footer-padding-x":`${n.footerPaddingX}px`,"--sd-action-modal-footer-padding-y":`${n.footerPaddingY}px`,"--sd-action-modal-footer-gap":`${n.footerGap}px`,"--sd-action-modal-footer-bg":n.footerBg,"--sd-action-modal-footer-border":n.footerBorder,"--sd-action-modal-title-color":s.color,"--sd-action-modal-title-font-family":s.fontFamily,"--sd-action-modal-title-font-weight":s.fontWeight,"--sd-action-modal-title-font-size":`${s.fontSize}px`,"--sd-action-modal-title-line-height":`${s.lineHeight}px`}},d("header",{key:"7c9f30b1a021cee5ec72b8aa034baa2c84dd43e0",class:"sd-action-modal__header"},d("h2",{key:"413fc21c9b3ff23ecb90a7b4f7897a1fc80656bc",class:"sd-action-modal__title"},this.modalTitle),d("div",{key:"4a1edc0dffd575bb6e9e438174c492b5d86ec94e",class:"sd-action-modal__header-sub"},d("slot",{key:"633669925cf29bf0e3a189e5afb321e19310a2b1",name:"header-sub-title"})),d("sd-icon",{key:"c4a59612d10ee42adb62148935ebdfb7fa6ac9cd",class:"sd-action-modal__close",name:"close",size:l,color:c,onClick:()=>this.close.emit()})),d("div",{key:"ddeaf5f1945f3aff28a3a0e2c9d26daf019dc60e",class:"sd-action-modal__body"},d("slot",{key:"2ea7b49a2368744372ab92ff6539920eb4894654",name:"body"})),d("footer",{key:"4804e5b8137fe99abb4aaae06a427d1aaed0e50f",class:"sd-action-modal__footer"},d("div",{key:"affd8bd4bf14e9b50ea59fd632d07b494c7888c4",class:"sd-action-modal__footer-sub"},d("slot",{key:"59458e4be9131e3e4fb200e4688fe2a46f8874c8",name:"bottom-sub-content"})),d("sd-button-v2",{key:"fde6ccdeef52199d4b657ec9dea3fa193315961c",name:"primary_md",label:this.buttonLabel,onSdClick:()=>this.ok.emit()})))}};r.style="sd-action-modal{display:block;width:fit-content;min-width:520px}sd-action-modal .sd-action-modal{position:relative;display:flex;flex-direction:column;border-radius:var(--sd-action-modal-radius);background:var(--sd-action-modal-bg);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);overflow:hidden}sd-action-modal .sd-action-modal__header{display:flex;align-items:center;gap:var(--sd-action-modal-header-gap);padding:var(--sd-action-modal-header-padding-y) calc(var(--sd-action-modal-header-padding-x) + 20px) var(--sd-action-modal-header-padding-y) var(--sd-action-modal-header-padding-x)}sd-action-modal .sd-action-modal__title{margin:0;color:var(--sd-action-modal-title-color);font-family:var(--sd-action-modal-title-font-family);font-weight:var(--sd-action-modal-title-font-weight);font-size:var(--sd-action-modal-title-font-size);line-height:var(--sd-action-modal-title-line-height);white-space:nowrap}sd-action-modal .sd-action-modal__header-sub{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px}sd-action-modal .sd-action-modal__header-sub:empty{display:none}sd-action-modal .sd-action-modal__close{position:absolute;top:16px;right:16px;cursor:pointer}sd-action-modal .sd-action-modal__body{flex:1 1 auto;min-height:0;padding:0 var(--sd-action-modal-body-padding-x) var(--sd-action-modal-body-padding-bottom);overflow:auto}sd-action-modal .sd-action-modal__footer{display:flex;align-items:center;gap:var(--sd-action-modal-footer-gap);padding:var(--sd-action-modal-footer-padding-y) var(--sd-action-modal-footer-padding-x);background:var(--sd-action-modal-footer-bg);border-top:1px solid var(--sd-action-modal-footer-border)}sd-action-modal .sd-action-modal__footer>sd-button-v2{margin-left:auto}sd-action-modal .sd-action-modal__footer-sub{display:flex;align-items:center;gap:8px;min-width:0}sd-action-modal .sd-action-modal__footer-sub:empty{display:none}";export{r as sd_action_modal}
|