@sellmate/design-system 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-chip.cjs.entry.js +3 -3
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +2 -1
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +52 -24
- package/dist/cjs/sd-divider.cjs.entry.js +1 -1
- package/dist/cjs/sd-field_3.cjs.entry.js +5 -4
- package/dist/cjs/sd-linear-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-loading-container.cjs.entry.js +2 -2
- package/dist/cjs/sd-modal-container.cjs.entry.js +3 -0
- package/dist/cjs/sd-pagination_4.cjs.entry.js +8 -8
- package/dist/cjs/sd-popover.cjs.entry.js +8 -5
- package/dist/cjs/sd-popup.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +6 -6
- package/dist/cjs/sd-select_3.cjs.entry.js +8 -8
- package/dist/cjs/sd-switch.cjs.entry.js +1 -1
- package/dist/cjs/sd-table.cjs.entry.js +6 -6
- package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
- package/dist/cjs/sd-td.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast.cjs.entry.js +2 -2
- package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
- package/dist/collection/components/sd-chip/sd-chip.js +3 -3
- package/dist/collection/components/sd-divider/sd-divider.js +1 -1
- package/dist/collection/components/sd-field/sd-field.js +2 -1
- package/dist/collection/components/sd-file-picker/sd-file-picker.css +15 -1
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +44 -16
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
- package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
- package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +21 -1
- package/dist/collection/components/sd-modal-container/sd-modal-container.js +3 -0
- package/dist/collection/components/sd-number-input/sd-number-input.js +4 -4
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-popover/sd-popover.js +13 -23
- package/dist/collection/components/sd-popup/sd-popup.js +1 -1
- package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +2 -2
- package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +4 -4
- package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +2 -2
- package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +2 -2
- package/dist/collection/components/sd-select/sd-select.js +4 -4
- package/dist/collection/components/sd-switch/sd-switch.js +1 -1
- package/dist/collection/components/sd-table/sd-table.js +6 -6
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +2 -2
- package/dist/collection/components/sd-table/sd-td/sd-td.js +1 -1
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +3 -3
- package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
- package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
- package/dist/collection/components/sd-toast/sd-toast.js +2 -2
- package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
- package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
- package/dist/components/{p-CwQTEZWO.js → p-5_BC8C6x.js} +1 -1
- package/dist/components/p-BFAQ4nY2.js +1 -0
- package/dist/components/{p-EcuI_UmK.js → p-BNXKU1BW.js} +1 -1
- package/dist/components/{p-DZ_3ZYMC.js → p-BVvVDIo0.js} +1 -1
- package/dist/components/{p-z564gmGG.js → p-C1Fk1556.js} +1 -1
- package/dist/components/{p-BCeq6-MU.js → p-CWGbMz0J.js} +1 -1
- package/dist/components/{p-BZRMoE3E.js → p-CnbeQ2DI.js} +1 -1
- package/dist/components/{p-BYU3wOaN.js → p-CtXad9by.js} +1 -1
- package/dist/components/{p-lOVBaLB7.js → p-D155awu4.js} +1 -1
- package/dist/components/{p-BqYASycS.js → p-DAAHX92J.js} +1 -1
- package/dist/components/p-DK4Jvax0.js +1 -0
- package/dist/components/p-DR1f1cS9.js +1 -0
- package/dist/components/p-DY1iQfib.js +1 -0
- package/dist/components/{p-BNUsawW7.js → p-DeHt0RYQ.js} +1 -1
- package/dist/components/{p-CARYLqH9.js → p-Dq38kgOY.js} +1 -1
- package/dist/components/{p-DP0Dp12H.js → p-DwKYjjIC.js} +1 -1
- package/dist/components/{p-uVZjhyvS.js → p-EbF6qsnG.js} +1 -1
- package/dist/components/{p-sRzhIrJR.js → p-F7yyGdIc.js} +1 -1
- package/dist/components/p-LZKaKr8O.js +1 -0
- package/dist/components/p-vZLoby4N.js +1 -0
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-chip.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-divider.js +1 -1
- package/dist/components/sd-field.js +1 -1
- package/dist/components/sd-file-picker.js +1 -1
- package/dist/components/sd-floating-portal.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-key-value-table.js +1 -1
- package/dist/components/sd-linear-progress.js +1 -1
- package/dist/components/sd-loading-container.js +1 -1
- package/dist/components/sd-loading-modal.js +1 -1
- package/dist/components/sd-modal-container.js +1 -1
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-popup.js +1 -1
- package/dist/components/sd-select-list-item-search.js +1 -1
- package/dist/components/sd-select-list-item.js +1 -1
- package/dist/components/sd-select-listbox.js +1 -1
- package/dist/components/sd-select-trigger.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-switch.js +1 -1
- package/dist/components/sd-table.js +1 -1
- package/dist/components/sd-tabs.js +1 -1
- package/dist/components/sd-tbody.js +1 -1
- package/dist/components/sd-td.js +1 -1
- package/dist/components/sd-textarea.js +1 -1
- package/dist/components/sd-thead.js +1 -1
- package/dist/components/sd-toast-container.js +1 -1
- package/dist/components/sd-toast.js +1 -1
- package/dist/components/sd-toggle.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-2c0a8333.entry.js → p-0060136e.entry.js} +1 -1
- package/dist/design-system/{p-18d3ae55.entry.js → p-08798232.entry.js} +1 -1
- package/dist/design-system/{p-20a2e0d2.entry.js → p-102c2153.entry.js} +1 -1
- package/dist/design-system/{p-95bbba4f.entry.js → p-10f579ba.entry.js} +1 -1
- package/dist/design-system/p-17ec576c.entry.js +1 -0
- package/dist/design-system/{p-ff33d019.entry.js → p-282b1260.entry.js} +1 -1
- package/dist/design-system/{p-e6bd8ab1.entry.js → p-2e4d1fe1.entry.js} +1 -1
- package/dist/design-system/{p-07b0d118.entry.js → p-32d96a70.entry.js} +1 -1
- package/dist/design-system/{p-17883b40.entry.js → p-4ef942a8.entry.js} +1 -1
- package/dist/design-system/{p-1aafbc7b.entry.js → p-643c004a.entry.js} +1 -1
- package/dist/design-system/p-69a208c0.entry.js +1 -0
- package/dist/design-system/{p-deec1ef0.entry.js → p-914d74c4.entry.js} +1 -1
- package/dist/design-system/p-9c74571a.entry.js +1 -0
- package/dist/design-system/{p-696764b0.entry.js → p-9e75a5dc.entry.js} +1 -1
- package/dist/design-system/{p-97b405aa.entry.js → p-adce8704.entry.js} +1 -1
- package/dist/design-system/{p-969665c0.entry.js → p-b5e9320f.entry.js} +1 -1
- package/dist/design-system/{p-a5930cbd.entry.js → p-d1da969d.entry.js} +1 -1
- package/dist/design-system/{p-1219699a.entry.js → p-e1350f4d.entry.js} +1 -1
- package/dist/design-system/p-e159f70d.entry.js +1 -0
- package/dist/design-system/{p-c73cadc7.entry.js → p-f172920e.entry.js} +1 -1
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-chip.entry.js +3 -3
- package/dist/esm/sd-confirm-modal_2.entry.js +2 -1
- package/dist/esm/sd-date-picker_7.entry.js +52 -24
- package/dist/esm/sd-divider.entry.js +1 -1
- package/dist/esm/sd-field_3.entry.js +5 -4
- package/dist/esm/sd-linear-progress.entry.js +1 -1
- package/dist/esm/sd-loading-container.entry.js +2 -2
- package/dist/esm/sd-modal-container.entry.js +3 -0
- package/dist/esm/sd-pagination_4.entry.js +8 -8
- package/dist/esm/sd-popover.entry.js +8 -5
- package/dist/esm/sd-popup.entry.js +1 -1
- package/dist/esm/sd-select-list-item_2.entry.js +6 -6
- package/dist/esm/sd-select_3.entry.js +8 -8
- package/dist/esm/sd-switch.entry.js +1 -1
- package/dist/esm/sd-table.entry.js +6 -6
- package/dist/esm/sd-tabs.entry.js +1 -1
- package/dist/esm/sd-td.entry.js +1 -1
- package/dist/esm/sd-toast-container.entry.js +1 -1
- package/dist/esm/sd-toast.entry.js +2 -2
- package/dist/esm/sd-toggle.entry.js +1 -1
- package/dist/types/components/sd-chip/sd-chip.d.ts +1 -1
- package/dist/types/components/sd-file-picker/sd-file-picker.d.ts +3 -0
- package/dist/types/components/sd-loading-modal/sd-loading-modal.d.ts +1 -0
- package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +1 -0
- package/dist/types/components/sd-popover/sd-popover.d.ts +2 -1
- package/dist/types/components.d.ts +3 -8
- package/hydrate/index.js +117 -80
- package/hydrate/index.mjs +117 -80
- package/package.json +1 -1
- package/dist/components/p-BE-21GLH.js +0 -1
- package/dist/components/p-BUW6I_d5.js +0 -1
- package/dist/components/p-DSIM5Mkt.js +0 -1
- package/dist/components/p-DoREs-rv.js +0 -1
- package/dist/components/p-Dwko_Bx3.js +0 -1
- package/dist/design-system/p-18057222.entry.js +0 -1
- package/dist/design-system/p-3a848c36.entry.js +0 -1
- package/dist/design-system/p-4bd9f005.entry.js +0 -1
- package/dist/design-system/p-c5c4a66b.entry.js +0 -1
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t,H as e,c as s,h as i,d as o,t as l}from"./p-pwNG5WaX.js";import{T as r}from"./p-sZMi_32I.js";import{a,r as h,e as n,c,f as d,g as p,h as b,i as f}from"./p-DGyTYauz.js";import{d as y}from"./p-CAP-9lnL.js";import{d as g}from"./p-Cye8r1MG.js";import{d as u}from"./p-CwQTEZWO.js";import{d as m}from"./p-DQj-S8AC.js";import{d as x}from"./p-BYU3wOaN.js";const k=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.sdColumnSort=s(this,"sdColumnSort",7)}get el(){return this}columns;selectable;resizable;stickyColumn;stickyHeader;scrolledLeft;scrolledRight;rows=[];columnWidths=[];sdColumnSort;tableId="";_columns=[];_selectable=!1;_resizable=!1;_stickyColumn={left:0,right:0};_stickyHeader=!1;_scrolledLeft=!1;_scrolledRight=!1;tableEl=null;handleColumnsChange(t){Array.isArray(t)&&0===(this.columnWidths??[]).length&&(this.columnWidths=t.map((t=>t.autoWidth?0:parseInt(t.width||"120",10))))}componentWillLoad(){this.syncTableContext(),this.columnWidths=Array.isArray(this.columnWidths)?this.columnWidths:[],this.resolveConfig(),0===(this.columnWidths??[]).length&&(this.columnWidths=this._columns.map((t=>t.autoWidth?0:parseInt(t.width||"120",10))))}componentDidLoad(){this.syncTableContext(),this.resolveConfig()}syncTableContext(){const t=this.el.closest("sd-table"),e=this.el.getRootNode(),s=e instanceof ShadowRoot?e.host:null,i=t??s;this.tableEl=i;const o=i?.getTableIdSync?.(),l=i?.getAttribute(r),a=(null!=o&&""!==o&&"undefined"!==o?o:null)??(null!=l&&""!==l&&"undefined"!==l?l:null)??"";""!==a&&a!==this.tableId&&(this.tableId=a)}resolveConfig(){const t=this.tableEl?.getConfigSync?.(),e=Array.isArray(this.columns)?this.columns:Array.isArray(t?.columns)?t.columns:[];this._columns=e,this._selectable=this.selectable??t?.selectable??!1,this._resizable=this.resizable??t?.resizable??!1,this._stickyColumn=this.stickyColumn??t?.stickyColumn??{left:0,right:0},this._stickyHeader=this.stickyHeader??t?.stickyHeader??!1,this._scrolledLeft=this.scrolledLeft??t?.scrolledLeft??!1,this._scrolledRight=this.scrolledRight??t?.scrolledRight??!1,Array.isArray(t?.columnWidths)&&0===(this.columnWidths??[]).length&&(this.columnWidths=[...t.columnWidths]),Array.isArray(this.columnWidths)||(this.columnWidths=[])}async refreshConfig(){this.resolveConfig()}async setColumnWidths(t){this.columnWidths=Array.isArray(t)?t:[]}async refreshSelection(){const t=this.el.querySelector("sd-checkbox");t&&(t.value=this.getIsAllChecked())}get visibleColumns(){return this._columns.filter((t=>!1!==t.visible))}getStickyStyle(t){if(this.tableEl?.getStickyStyleSync)return this.tableEl.getStickyStyleSync(t);const e=this.columnWidths.slice(0,t).reduce(((t,e)=>t+e),0)+(this._selectable?a:0),s=this.columnWidths.filter(((e,s)=>s>=this.visibleColumns.length-(this._stickyColumn.right||0)&&s>t)).reduce(((t,e)=>t+e),0),i=this.visibleColumns[t],o={"--sticky-left-offset":`${e}px`,"--sticky-right-offset":`${s}px`};return i?.autoWidth||(o.width=`${this.columnWidths[t]}px`,o.minWidth=`${this.columnWidths[t]}px`,o.maxWidth=`${this.columnWidths[t]}px`),o}handleResize(t,e,s=!1){this.tableEl?.handleResize&&this.tableEl.handleResize(t,e,s)}handleColumnSort=t=>{this.sdColumnSort.emit({column:t})};handleSelectAll(t){const e=!!t,s=Array.isArray(this.rows)?this.rows:[];this.tableEl?.toggleSelectAllSync&&this.tableEl.toggleSelectAllSync(e,s)}getIsAllChecked(){const t=Array.isArray(this.rows)?this.rows:[];return!!(this.tableEl?.getIsAllCheckedSync&&t.length>0)&&this.tableEl.getIsAllCheckedSync(t)}render(){const t=Array.isArray(this.rows)?this.rows:[],e=this._stickyColumn.left||0,s=this._stickyColumn.right||0,l=this.visibleColumns.slice(0,e),r=this.visibleColumns.slice(e,this.visibleColumns.length-s),a=this.visibleColumns.slice(this.visibleColumns.length-s),y=this.visibleColumns.length-1;return i(o,{key:"2b949f43561a2cd36b82de324d3d8c0d8a1d8431",slot:`${this.tableId}-head`,style:{"--table-header-height":`${f.height}px`,"--table-header-padding-x":`${f.paddingX}px`,"--table-header-gap":`${f.gap}px`,"--table-header-bg":b.bg,"--table-header-font-family":p.fontFamily,"--table-header-font-weight":p.fontWeight,"--table-header-font-size":`${p.fontSize}px`,"--table-header-line-height":`${p.lineHeight}px`,"--table-header-text-decoration":p.textDecoration,"--table-header-resizer-color":d.color,"--table-header-resizer-height":`${d.height}px`,"--table-border-color":c.color,"--table-border-width":`${c.width}px`}},i("thead",{key:"45918bfb1dc44bb0f45a0f1646bf2276b1ca74ec",class:{thead:!0,"thead--sticky":this._stickyHeader}},i("tr",{key:"3802f86a730041ca405071b243a99c28e04558d2",class:"tr"},this._selectable&&i("th",{key:"d60e1323fca90516f38cedfa6fc8bf17840fad5d",class:{th:!0,"th--selected":!0,"sticky-left":!0,"sticky-left-edge":0===e,"is-scrolled-left":0===e&&this._scrolledLeft},style:{"--sticky-left-offset":"0px"}},i("sd-checkbox",{key:"0c0b61405a8624cfc1d803f8ae8905d74d6c10f1",value:this.getIsAllChecked(),disabled:0===t.length,onSdUpdate:t=>this.handleSelectAll(t.detail)}),i("div",{key:"b808a627e740a9c3a9f6f03e32cf90e598fd506f",class:"th__bar"})),l.map(((t,s)=>i("th",{key:t.name,class:{th:!0,[`${t.thClass}`]:Boolean(t.thClass),"sticky-left":!0,"sticky-left-edge":s===e-1,"is-scrolled-left":s===e-1&&this._scrolledLeft},style:{...t.thStyle,...this.getStickyStyle(s)}},i("div",{class:`th__content th__content--${t.align||"left"}`},i("div",{class:"th__content--label"},t.label),t.icon&&i("sd-icon",{name:t.icon,size:"12",color:h(t.icon,t.iconColor)}),t.sort&&i("sd-icon",{name:n(t.sort),size:"12",color:h(n(t.sort),t.iconColor),onClick:()=>this.handleColumnSort(t),style:{cursor:"pointer"}}),t.tooltip&&i("sd-tooltip",{...t.tooltipOptions},i("div",{slot:"content"},t.tooltip.map((t=>i("p",null,t)))))),this._resizable&&s!==y&&i("div",{class:"th__resizer",onMouseDown:t=>this.handleResize(s,t)})))),r.map(((t,s)=>{const o=e+s;return i("th",{key:t.name,class:{th:!0,[`${t.thClass}`]:Boolean(t.thClass)},style:{...t.thStyle,...this.getStickyStyle(o)}},i("div",{class:`th__content th__content--${t.align||"left"}`},i("div",{class:"th__content--label"},t.label),t.icon&&i("sd-icon",{name:t.icon,size:"12",color:h(t.icon,t.iconColor)}),t.sort&&i("sd-icon",{name:n(t.sort),size:"12",color:h(n(t.sort),t.iconColor),onClick:()=>this.handleColumnSort(t),style:{cursor:"pointer"}}),t.tooltip&&i("sd-tooltip",{...t.tooltipOptions},i("div",{slot:"content"},t.tooltip.map((t=>i("p",null,t)))))),this._resizable&&o!==y&&i("div",{class:"th__resizer",onMouseDown:t=>this.handleResize(o,t)}))})),a.map(((t,e)=>{const o=this.visibleColumns.length-s+e;return i("th",{key:t.name,class:{th:!0,[`${t.thClass}`]:Boolean(t.thClass),"sticky-right":!0,"sticky-right-edge":0===e,"is-scrolled-right":0===e&&this._scrolledRight},style:{...t.thStyle,...this.getStickyStyle(o)}},i("div",{class:`th__content th__content--${t.align||"left"}`},i("div",{class:"th__content--label"},t.label),t.icon&&i("sd-icon",{name:t.icon,size:"12",color:h(t.icon,t.iconColor)}),t.sort&&i("sd-icon",{name:n(t.sort),size:"12",color:h(n(t.sort),t.iconColor),onClick:()=>this.handleColumnSort(t),style:{cursor:"pointer"}}),t.tooltip&&i("sd-tooltip",{...t.tooltipOptions},i("div",{slot:"content"},t.tooltip.map((t=>i("p",null,t)))))),this._resizable&&i("div",{class:"th__resizer th__resizer--left",onMouseDown:t=>this.handleResize(o,t,!0)}))})))))}static get watchers(){return{columns:[{handleColumnsChange:0}]}}static get style(){return'sd-thead{display:contents}sd-thead *{box-sizing:border-box}.thead{display:table-header-group;height:var(--table-header-height, 36px)}.thead--sticky{position:sticky;top:0;z-index:120}.tr{display:table-row;width:100%}.th{display:table-cell;background:var(--table-header-bg, #F5FAFF);height:var(--table-header-height, 36px);padding:0 var(--table-header-padding-x, 16px);font-family:var(--table-header-font-family, inherit);font-weight:var(--table-header-font-weight, 500);font-size:var(--table-header-font-size, 12px);line-height:var(--table-header-line-height, 20px);text-decoration:var(--table-header-text-decoration, none);vertical-align:middle;border-bottom:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);-webkit-user-select:none;user-select:none;position:relative;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.th--selected{position:relative;width:var(--table-selectable-width, 48px) !important;max-width:var(--table-selectable-width, 48px) !important;min-width:var(--table-selectable-width, 48px) !important;text-align:center}.th--selected sd-checkbox label{position:relative}.th--selected sd-checkbox label:before{content:"";position:absolute;inset:-6px}.th.sticky-left{position:sticky;background-color:var(--table-header-bg, #F5FAFF);z-index:110 !important;left:var(--sticky-left-offset, 0)}.th.sticky-right{position:sticky;background-color:var(--table-header-bg, #F5FAFF);z-index:110 !important;right:var(--sticky-right-offset, 0)}.th.sticky-left-edge:after{content:"";position:absolute;top:0;left:100%;right:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset 12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.th.sticky-right-edge:after{content:"";position:absolute;top:0;left:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset -12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.th.sticky-left-edge.is-scrolled-left{overflow:visible}.th.sticky-left-edge.is-scrolled-left:after{opacity:1}.th.sticky-right-edge.is-scrolled-right{overflow:visible}.th.sticky-right-edge.is-scrolled-right:after{opacity:1}.th__content{display:flex;flex-flow:row nowrap;align-items:center;gap:var(--table-header-gap, 4px)}.th__content--left{justify-content:flex-start}.th__content--center{justify-content:center}.th__content--right{justify-content:flex-end}.th__content--label{white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.th__bar{position:absolute;top:50%;right:0;transform:translateY(-50%);width:var(--table-border-width, 1px);height:var(--table-header-resizer-height, 16px);z-index:3;background-color:var(--table-header-resizer-color, #CCCCCC)}.th__resizer{position:absolute;top:50%;right:0;transform:translateY(-50%);width:4px;height:var(--table-header-resizer-height, 16px);cursor:col-resize;z-index:3;border-left:var(--table-border-width, 1px) solid var(--table-header-resizer-color, #CCCCCC);border-right:var(--table-border-width, 1px) solid var(--table-header-resizer-color, #CCCCCC)}.th__resizer--left{right:auto;left:0}'}},[512,"sd-thead",{columns:[16],selectable:[4],resizable:[4],stickyColumn:[16],stickyHeader:[4,"sticky-header"],scrolledLeft:[4,"scrolled-left"],scrolledRight:[4,"scrolled-right"],rows:[16],columnWidths:[1040],tableId:[32],_columns:[32],_selectable:[32],_resizable:[32],_stickyColumn:[32],_stickyHeader:[32],_scrolledLeft:[32],_scrolledRight:[32],refreshConfig:[64],setColumnWidths:[64],refreshSelection:[64]},void 0,{columns:[{handleColumnsChange:0}]}]);function _(){"undefined"!=typeof customElements&&["sd-thead","sd-button","sd-checkbox","sd-floating-portal","sd-icon","sd-tooltip"].forEach((t=>{switch(t){case"sd-thead":customElements.get(l(t))||customElements.define(l(t),k);break;case"sd-button":customElements.get(l(t))||y();break;case"sd-checkbox":customElements.get(l(t))||g();break;case"sd-floating-portal":customElements.get(l(t))||u();break;case"sd-icon":customElements.get(l(t))||m();break;case"sd-tooltip":customElements.get(l(t))||x()}}))}export{k as S,_ as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,H as i,c as t,h as s,t as l}from"./p-pwNG5WaX.js";import{n as r}from"./p-CCwNgVmC.js";import{d as o}from"./p-CAP-9lnL.js";import{d as a}from"./p-Dwko_Bx3.js";import{d}from"./p-CwQTEZWO.js";import{d as n}from"./p-DfKa36bs.js";import{d as c}from"./p-DQj-S8AC.js";import{d as p}from"./p-BYU3wOaN.js";var h={height:"28",paddingX:"12",gap:"8",radius:"4",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"},size:{icon:"16"},text:{default:"#222222",placeholder:"#AAAAAA",disabled:"#888888"},icon:{disabled:"#BBBBBB"}};const f={height:h.height,paddingX:h.paddingX,gap:h.gap,radius:h.radius,fontSize:h.typography.fontSize,lineHeight:h.typography.lineHeight,fontWeight:h.typography.fontWeight,iconSize:h.size.icon},u={text:h.text,icon:{default:"#888888",disabled:h.icon.disabled}},k=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=t(this,"sdUpdate",7),this.reject=t(this,"sdReject",7)}get el(){return this}value=null;placeholder="Click to upload";disabled=!1;inline=!1;multiple=!1;accept;maxFileSize;maxTotalSize;maxFiles;name=r();label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";width="";rules;error=!1;status;icon=void 0;labelTooltip="";labelTooltipProps=null;focused=!1;hovered=!1;internalValue=null;showTooltip=!1;fileInputRef;fileNamesRef;formField;update;reject;valueChanged(e){this.internalValue=e}componentDidLoad(){this.checkOverflow()}componentDidUpdate(){this.checkOverflow()}async sdValidate(){return this.formField?.sdValidate()??Promise.resolve(!0)}async sdReset(){const e=this.multiple?[]:null;this.value=e,this.internalValue=e,this.fileInputRef&&(this.fileInputRef.value=""),await(this.formField?.sdResetValidation())}async sdResetValidate(){await(this.formField?.sdResetValidation())}toBytes(e){if(null!=e)return"string"==typeof e?Number(e):e}validateFiles(e){const i=this.toBytes(this.maxFileSize),t=this.toBytes(this.maxTotalSize),s=null!=this.maxFiles?Number(this.maxFiles):void 0;if(null!=s&&e.length>s)return{accepted:[],rejected:e,reason:"max-files"};if(null!=i){const t=e.filter((e=>e.size>i));if(t.length>0)return{accepted:[],rejected:t,reason:"max-file-size"}}return null!=t&&e.reduce(((e,i)=>e+i.size),0)>t?{accepted:[],rejected:e,reason:"max-total-size"}:{accepted:e,rejected:[]}}handleFileChange=e=>{const i=e.target.files;if(!i||0===i.length)return;const t=Array.from(i),{accepted:s,rejected:l,reason:r}=this.validateFiles(t);if(null!=r)return this.reject?.emit({files:l,reason:r}),void(this.fileInputRef&&(this.fileInputRef.value=""));this.internalValue=this.multiple?s:s[0],this.value=this.internalValue,this.update?.emit(this.value)};handleClear=e=>{if(this.disabled)return;e.stopPropagation();const i=this.multiple?[]:null;this.value=i,this.internalValue=i,this.update?.emit(i),this.fileInputRef&&(this.fileInputRef.value="")};handleClick=()=>{this.disabled||this.fileInputRef?.click()};hasFiles(){return!!this.internalValue&&(!Array.isArray(this.internalValue)||this.internalValue.length>0)}getDisplayText(){return this.hasFiles()?Array.isArray(this.internalValue)?this.internalValue.map((e=>e.name)).join(", "):this.internalValue?.name||(this.placeholder??"Click to upload"):this.placeholder??"Click to upload"}checkOverflow(){this.fileNamesRef&&(this.showTooltip=this.fileNamesRef.scrollWidth>this.fileNamesRef.clientWidth)}getIconColor(){return this.disabled?u.icon.disabled:u.icon.default}render(){const e=this.hasFiles(),i=this.getDisplayText(),t={"--sd-file-picker-font-size":`${f.fontSize}px`,"--sd-file-picker-line-height":`${f.lineHeight}px`,"--sd-file-picker-font-weight":f.fontWeight,"--sd-file-picker-padding-x":`${f.paddingX}px`,"--sd-file-picker-gap":`${f.gap}px`,"--sd-file-picker-text-color":u.text.default,"--sd-file-picker-placeholder-color":u.text.placeholder,"--sd-file-picker-disabled-color":u.text.disabled,"--sd-system-size-field-sm-height":`${f.height}px`,"--sd-system-radius-field-sm":`${f.radius}px`},l=s("div",{role:"button",tabindex:this.disabled?-1:0,class:"sd-file-picker__content",onClick:this.handleClick,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())}},s("input",{ref:e=>this.fileInputRef=e,type:"file",class:"sd-file-picker__input",disabled:this.disabled,multiple:this.multiple,accept:this.accept,onInput:this.handleFileChange,"aria-label":this.placeholder??"Click to upload"}),s("sd-icon",{name:"attachFile",size:Number(f.iconSize),color:this.getIconColor(),class:"sd-file-picker__icon"}),s("div",{ref:e=>this.fileNamesRef=e,class:{"sd-file-picker__text":!0,"sd-file-picker__text--placeholder":!e,"sd-file-picker__text--active":e}},i),!this.disabled&&e&&s("sd-ghost-button",{icon:"close",size:"xxs",ariaLabel:"clear",disabled:this.disabled,class:"sd-file-picker__clear-icon",onClick:this.handleClear}),this.showTooltip&&e&&this.hovered&&s("div",{class:"sd-file-picker__tooltip"},i));return this.inline?s("div",{class:{"sd-file-picker--inline":!0,"sd-file-picker--inline-disabled":this.disabled},style:t,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1},l):s("sd-field",{name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,status:this.status,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:t},l)}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return"sd-file-picker{display:inline-flex;width:100%}.sd-file-picker__content{width:100%;height:100%;display:flex;align-items:center;padding:0 var(--sd-file-picker-padding-x);gap:var(--sd-file-picker-gap);cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;vertical-align:middle}.sd-file-picker__text{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:var(--sd-file-picker-font-weight);font-size:var(--sd-file-picker-font-size);line-height:var(--sd-file-picker-line-height);color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker__text--placeholder{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__icon{flex-shrink:0}.sd-file-picker__clear-icon{flex-shrink:0;cursor:pointer;transition:opacity 0.2s ease}.sd-file-picker__clear-icon:hover{opacity:0.7}.sd-file-picker__input{display:none}.sd-file-picker__tooltip{position:absolute;top:calc(100% - 4px);left:50%;transform:translate(-50%);z-index:998;white-space:nowrap;padding:8px 12px;background:rgba(0, 0, 0, 0.8);color:white;font-size:12px;line-height:18px;border-radius:4px;pointer-events:none}.sd-field--disabled .sd-file-picker__content{cursor:not-allowed}.sd-field--disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}.sd-file-picker--inline .sd-file-picker__content{border:none;background-color:transparent;padding:0;height:auto}.sd-file-picker--inline .sd-file-picker__text{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker--inline:hover:not(.sd-file-picker--inline-disabled) .sd-file-picker__text{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline .sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__content{cursor:not-allowed}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}"}},[512,"sd-file-picker",{value:[1040],placeholder:[513],disabled:[516],inline:[516],multiple:[516],accept:[1],maxFileSize:[8,"max-file-size"],maxTotalSize:[8,"max-total-size"],maxFiles:[8,"max-files"],name:[1],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],hint:[1],errorMessage:[1,"error-message"],width:[8],rules:[16],error:[1028],status:[1],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],focused:[1028],hovered:[1028],internalValue:[32],showTooltip:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64]},void 0,{value:[{valueChanged:0}]}]);function m(){"undefined"!=typeof customElements&&["sd-file-picker","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-tooltip"].forEach((e=>{switch(e){case"sd-file-picker":customElements.get(l(e))||customElements.define(l(e),k);break;case"sd-button":customElements.get(l(e))||o();break;case"sd-field":customElements.get(l(e))||a();break;case"sd-floating-portal":customElements.get(l(e))||d();break;case"sd-ghost-button":customElements.get(l(e))||n();break;case"sd-icon":customElements.get(l(e))||c();break;case"sd-tooltip":customElements.get(l(e))||p()}}))}export{k as S,m as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as d,H as a,c as s,h as e,d as o,t as i}from"./p-pwNG5WaX.js";import{m as t}from"./p-DOXMJi-V.js";import{d as l}from"./p-CAP-9lnL.js";import{d as n}from"./p-pTx5xpqU.js";import{d as m}from"./p-DQj-S8AC.js";const g={minWidth:Number(t.modal.loading.width),minHeight:Number(t.modal.loading.height),gap:Number(t.modal.loading.gap),contentSize:Number(t.modal.loading.content),radius:Number(t.modal.radius)},r={bg:t.modal.bg,messageColor:t.modal.loading.message.color,errorIcon:t.modal.confirm.negative.icon},c=t.modal.loading.message.typography.fontFamily,h=Number(t.modal.loading.message.typography.fontSize),u=Number(t.modal.loading.message.typography.fontWeight),p=Number(t.modal.loading.message.typography.lineHeight),b={loading:"작업을 진행하고 있습니다. 잠시만 기다려 주세요.",error:"작업에 실패하였습니다. 다시 시도해 주세요."},f={loading:"작업 취소",error:"다시 시도"},x=d(class extends a{constructor(d){super(),!1!==d&&this.__registerHost(),this.click=s(this,"sdClick",7)}state="loading";message="";useButton=!1;buttonLabel="";width;height;click;get resolvedState(){return this.state??"loading"}get resolvedMessage(){return this.message||b[this.resolvedState]}get resolvedButtonLabel(){return this.buttonLabel||f[this.resolvedState]}handleClick=()=>{this.click.emit()};toCssSize(d){if(null!=d&&""!==d)return"number"==typeof d?`${d}px`:d}render(){const d={"--sd-loading-modal-min-width":`${g.minWidth}px`,"--sd-loading-modal-min-height":`${g.minHeight}px`,"--sd-loading-modal-gap":`${g.gap}px`,"--sd-loading-modal-content-size":`${g.contentSize}px`,"--sd-loading-modal-radius":`${g.radius}px`,"--sd-loading-modal-bg":r.bg,"--sd-loading-modal-message-color":r.messageColor,"--sd-loading-modal-message-font-family":c,"--sd-loading-modal-message-font-size":`${h}px`,"--sd-loading-modal-message-font-weight":`${u}`,"--sd-loading-modal-message-line-height":`${p}px`,"--sd-loading-modal-error-color":r.errorIcon,"--sd-loading-modal-width":this.toCssSize(this.width)??`${g.minWidth}px`,"--sd-loading-modal-height":this.toCssSize(this.height)??`${g.minHeight}px`};return e(o,{key:"9276c9080c3f9bf2fdf31d1bb5e2b918a49b6a5a",style:d},e("div",{key:"6f8d55dd13a92f248e0f7ed50c268f9105975913",class:"sd-loading-modal"},e("div",{key:"f40f91f1d61c6ba1bb2049277c664d5abd4657e8",class:"sd-loading-modal__content"},"loading"===this.resolvedState?e("sd-circle-progress",{indeterminate:!0}):e("sd-icon",{class:"sd-loading-modal__icon",name:"warningOutline",size:g.contentSize,color:r.errorIcon})),e("div",{key:"1ecad303970f074b50dab0050872a95ddc99aad4",class:"sd-loading-modal__message-wrapper"},Array.isArray(this.resolvedMessage)?this.resolvedMessage.map((d=>e("p",{class:"sd-loading-modal__message"},d))):e("p",{class:"sd-loading-modal__message"},this.resolvedMessage)),this.useButton&&e("div",{key:"dd45d56a5475dc766487859e13e460bc2e27ec82",class:"sd-loading-modal__button"},e("sd-button",{key:"5d11fa174168c568fd71013ee5600e0884f28c50",name:"neutral_outline_sm",label:this.resolvedButtonLabel,onSdClick:this.handleClick}))))}static get style(){return"sd-loading-modal{display:inline-block}sd-loading-modal .sd-loading-modal{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sd-loading-modal-gap);min-width:var(--sd-loading-modal-min-width);min-height:var(--sd-loading-modal-min-height);width:var(--sd-loading-modal-width, auto);height:var(--sd-loading-modal-height, auto);border-radius:var(--sd-loading-modal-radius);background:var(--sd-loading-modal-bg);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2)}sd-loading-modal .sd-loading-modal__content{display:flex;align-items:center;justify-content:center;width:var(--sd-loading-modal-content-size);height:var(--sd-loading-modal-content-size)}sd-loading-modal .sd-loading-modal__message{margin:0;color:var(--sd-loading-modal-message-color);font-family:var(--sd-loading-modal-message-font-family);font-size:var(--sd-loading-modal-message-font-size);font-weight:var(--sd-loading-modal-message-font-weight);line-height:var(--sd-loading-modal-message-line-height);text-align:center}sd-loading-modal .sd-loading-modal__button{display:flex;justify-content:center}"}},[512,"sd-loading-modal",{state:[513],message:[1],useButton:[516,"use-button"],buttonLabel:[1,"button-label"],width:[8],height:[8]}]);function v(){"undefined"!=typeof customElements&&["sd-loading-modal","sd-button","sd-circle-progress","sd-icon"].forEach((d=>{switch(d){case"sd-loading-modal":customElements.get(i(d))||customElements.define(i(d),x);break;case"sd-button":customElements.get(i(d))||l();break;case"sd-circle-progress":customElements.get(i(d))||n();break;case"sd-icon":customElements.get(i(d))||m()}}))}export{x as S,v as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,H as t,c as s,h as r,t as i}from"./p-pwNG5WaX.js";import{g,h as o,i as c}from"./p-C4uWhzoG.js";import{d}from"./p-DQj-S8AC.js";const l=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.triggerClick=s(this,"sdTriggerClick",7),this.triggerFocus=s(this,"sdTriggerFocus",7),this.triggerBlur=s(this,"sdTriggerBlur",7)}displayText="";placeholder="선택";disabled=!1;isOpen=!1;triggerClick;triggerFocus;triggerBlur;triggerEl;async sdFocus(){this.disabled||this.triggerEl?.focus()}handleClick=()=>{this.disabled||this.triggerClick.emit()};handleFocus=()=>{this.triggerFocus.emit()};handleBlur=()=>{this.triggerBlur.emit()};render(){const e=""!==this.displayText;return r("div",{key:"3a97ed909e3088528714682050a3986081e19433",ref:e=>{this.triggerEl=e},role:"button","aria-haspopup":"listbox","aria-expanded":this.isOpen?"true":"false",tabindex:this.disabled?-1:0,class:{"sd-select-trigger":!0,"sd-select-trigger--open":this.isOpen,"sd-select-trigger--disabled":this.disabled},style:{"--trigger-padding-x":`${c.paddingX}px`,"--trigger-gap":`${c.gap}px`,"--trigger-font-size":`${o.fontSize}px`,"--trigger-line-height":`${o.lineHeight}px`,"--trigger-font-weight":o.fontWeight,"--trigger-color":this.disabled?g.text.disabled:e?g.text.default:g.icon.default,"--trigger-icon-color":this.disabled?g.icon.disabled:g.icon.default},onClick:this.handleClick,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())},onFocus:this.handleFocus,onBlur:this.handleBlur},r("div",{key:"986faba7d79980f0bcd10fff32495d2100e1805f",class:"sd-select-trigger__content"},r("span",{key:"c51b268186de7cdabcf06ac3d540ccb570c9e865",class:"sd-select-trigger__text"},e?this.displayText:this.placeholder??"선택"),r("sd-icon",{key:"8a03b400d5aef2e0ca9aeb4b1f6122db2932455a",name:"chevronDown",size:12,color:"var(--trigger-icon-color)",class:{"sd-select-trigger__icon":!0,"sd-select-trigger__icon--open":this.isOpen}})))}static get style(){return"sd-select-trigger{display:block;width:100%;height:100%}sd-select-trigger .sd-select-trigger{display:flex;width:100%;height:100%;cursor:pointer;user-select:none;overflow:hidden;border-radius:3px}sd-select-trigger .sd-select-trigger--disabled{cursor:not-allowed}sd-select-trigger .sd-select-trigger__content{display:flex;align-items:center;gap:var(--trigger-gap);flex:1;padding:0 var(--trigger-padding-x);min-width:0}sd-select-trigger .sd-select-trigger__text{flex:1;font-size:var(--trigger-font-size);line-height:var(--trigger-line-height);font-weight:var(--trigger-font-weight);color:var(--trigger-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-trigger .sd-select-trigger__icon{flex-shrink:0;transition:transform 0.2s ease}sd-select-trigger .sd-select-trigger__icon--open{transform:rotate(180deg)}"}},[512,"sd-select-trigger",{displayText:[1,"display-text"],placeholder:[1],disabled:[4],isOpen:[4,"is-open"],sdFocus:[64]}]);function a(){"undefined"!=typeof customElements&&["sd-select-trigger","sd-icon"].forEach((e=>{switch(e){case"sd-select-trigger":customElements.get(i(e))||customElements.define(i(e),l);break;case"sd-icon":customElements.get(i(e))||d()}}))}export{l as S,a as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,H as d,h as s,t as i}from"./p-pwNG5WaX.js";import{d as t}from"./p-CAP-9lnL.js";import{d as l}from"./p-CwQTEZWO.js";import{d as o}from"./p-DQj-S8AC.js";import{d as r}from"./p-BYU3wOaN.js";var a={sm:{height:"28",gap:"6",icon:"12",typography:{fontWeight:"700",fontSize:"12",lineHeight:"20"}},md:{height:"36",gap:"8",icon:"16",typography:{fontWeight:"700",fontSize:"14",lineHeight:"24"}}},n={gap:"6",paddingX:"12",typography:{fontWeight:"500",fontSize:"12",lineHeight:"20"},bg:"#F6F6F6",border:{default:"#AAAAAA",disabled:"#CCCCCC",width:"1"}};const f={start:"flex-start",center:"center",end:"flex-end"},h=a.sm,p=a.md,c={sm:{height:h.height,gap:h.gap,icon:h.icon,fontSize:h.typography.fontSize,lineHeight:h.typography.lineHeight,fontWeight:h.typography.fontWeight},md:{height:p.height,gap:p.gap,icon:p.icon,fontSize:p.typography.fontSize,lineHeight:p.typography.lineHeight,fontWeight:p.typography.fontWeight}},b=["sd-input","sd-barcode-input","sd-textarea","sd-number-input","sd-select","sd-file-picker","sd-date-picker","sd-date-range-picker"],g=e(class extends d{constructor(e){super(),!1!==e&&this.__registerHost()}get el(){return this}name="";rules=[];error=!1;disabled=!1;readonly=!1;hovered=!1;focused=!1;status;hint="";errorMessage="";width="";size="sm";label="";labelWidth="";addonLabel="";addonAlign="start";icon=void 0;labelTooltip="";labelTooltipProps=null;errorMsg="";hostElement=null;get value(){return this.hostElement?.value??null}get fieldStatus(){let e="";return this.disabled?(e="disabled",`sd-field--${e}`):this.readonly?(e="readonly",`sd-field--${e}`):this.focused?(e="focus",`sd-field--${e}`):(this.hovered&&(e="hover"),void 0!==this.status&&(e=this.status),this.error&&(e="error"),""!==e?`sd-field--${e}`:"")}componentDidLoad(){this.hostElement=this.findHostElement(),this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}findHostElement(){for(const e of b){const d=this.el.closest(e);if(d&&"value"in d)return d}return null}registerToForm(){const e=this.el.closest("sd-form");e&&"function"==typeof e.componentOnReady&&e.componentOnReady().then((e=>{e.sdRegisterField(this)}))}unregisterFromForm(){if(""===this.name)return;const e=this.el.closest("sd-form");e?.componentOnReady().then((e=>{e.sdUnregisterField(this)}))}async sdValidate(){if(!this.rules||0===this.rules.length)return!0;for(const e of this.rules){const d=e(this.value??"");if(!0!==d)return this.setError(!0,d),!1}return this.setError(!1,""),!0}async sdReset(){this.hostElement&&(this.hostElement.value=null),this.setError(!1,"")}async sdResetValidation(){this.setError(!1,"")}async sdFocus(){this.hostElement?.focus?.(),this.hostElement?.scrollIntoView({behavior:"smooth",block:"center"})}setError(e,d){this.errorMsg=d,this.hostElement&&(this.hostElement.error=e)}render(){const e=this.addonLabel,d=this.size in c?this.size:"sm",i=c[d],t={"--sd-field-wrapper-height":`var(--sd-system-size-field-${d}-height)`,"--sd-field-control-radius":`var(--sd-system-radius-field-${d})`,"--sd-field-label-margin-right":`var(--sd-system-space-field-${d}-gap)`},l=""!==this.label?{"--sd-field-label-height":`${i.height}px`,"--sd-field-label-gap":`${i.gap}px`,"--sd-field-label-font-size":`${i.fontSize}px`,"--sd-field-label-line-height":`${i.lineHeight}px`,"--sd-field-label-font-weight":i.fontWeight,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-label-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{},o=""!==e?{"--sd-field-addon-padding-x":`${n.paddingX}px`,"--sd-field-addon-font-size":`${n.typography.fontSize}px`,"--sd-field-addon-line-height":`${n.typography.lineHeight}px`,"--sd-field-addon-font-weight":n.typography.fontWeight,"--sd-field-addon-bg":n.bg,"--sd-field-addon-border-color":this.disabled?n.border.disabled:n.border.default,"--sd-field-addon-gap":`${n.gap}px`,"--sd-field-addon-border-width":`${n.border.width}px`,"--sd-field-addon-justify":f[this.addonAlign]??f.start,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-addon-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{};return s("div",{key:"1cc135c77708546f23b699bf337c018f6c4d315e",class:{"sd-field":!0,"sd-field--has-label":""!==this.label,"sd-field--has-addon":""!==e,[this.fieldStatus]:""!==this.fieldStatus},style:{...t,...l,...o}},s("div",{key:"506ace23aa27ad50a8ad60dcf6c71a0bdf04d7af",class:"sd-field__wrapper"},this.renderLabel(this.label),s("div",{key:"41b77a52c21eef8c38127362423378f1b9a6cb77",class:"sd-field__main",style:""!==this.width&&0!==this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},s("div",{key:"1f3c5f2009a0d96b8a3544c58b96f7ecc4ddee6b",class:{"sd-field__control":!0,"sd-field__control--has-addon":""!==e}},e&&s("div",{key:"39a28adaa959b89d3724672910157662e50b35ed",class:"sd-field__addon"},e),s("slot",{key:"0c9360e8644df658c389554c13a04bc22985e84d"})),""!==this.errorMsg||""!==this.errorMessage?s("div",{class:"sd-field__error-message"},""!==this.errorMsg?this.errorMsg:this.errorMessage):""!==this.hint&&s("div",{class:"sd-field__hint"},this.hint))))}renderLabel(e){return null==e||""===e?null:s("label",{class:"sd-field__label"},this.icon&&s("sd-icon",{name:this.icon.name,size:this.icon.size??Number(c[this.size in c?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate,class:"sd-field__label__icon"}),s("div",{class:"sd-field__label__text"},e),this.labelTooltip&&s("sd-tooltip",{class:"sd-field__label__tooltip",...this.labelTooltipProps},this.labelTooltip))}static get style(){return"sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#E1E1E1;border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--readonly .sd-field__wrapper .sd-field__control{background-color:var(--sd-system-color-field-bg-read-only);color:var(--sd-system-color-field-text-read-only)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;flex-shrink:0;width:var(--sd-field-label-width, auto);height:var(--sd-field-label-height);margin-right:var(--sd-field-label-margin-right)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__icon{margin-right:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:var(--sd-field-label-font-size);line-height:var(--sd-field-label-line-height);font-weight:var(--sd-field-label-font-weight);color:var(--sd-system-color-field-text-default);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-addon .sd-field__control .sd-field__addon{display:flex;gap:var(--sd-field-addon-gap);align-items:center;justify-content:var(--sd-field-addon-justify, flex-start);white-space:nowrap;box-sizing:border-box;flex-shrink:0;width:var(--sd-field-addon-width, auto);padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right:var(--sd-field-addon-border-width) solid var(--sd-field-addon-border-color);border-radius:calc(var(--sd-field-control-radius) - 1px) 0 0 calc(var(--sd-field-control-radius) - 1px)}sd-field .sd-field__wrapper{width:100%;display:flex;align-items:flex-start;flex-flow:row nowrap;position:relative;color:var(--sd-system-color-field-text-default);-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__main{flex:1;min-width:0;display:flex;flex-direction:column}sd-field .sd-field__wrapper .sd-field__control{position:relative;height:var(--sd-field-wrapper-height);display:flex;min-width:0;border:1px solid var(--sd-system-color-field-border-default);border-radius:var(--sd-field-control-radius);background:var(--sd-system-color-field-bg-default)}sd-field .sd-field--error .sd-field__wrapper .sd-field__control:not(:hover){border:1px solid var(--sd-system-color-field-border-danger) !important}sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-success) !important}sd-field .sd-field:not(.sd-field--disabled):not(.sd-field--readonly) .sd-field__wrapper .sd-field__control:hover{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--focus:not(.sd-field--readonly) .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field .sd-field__error-message{color:var(--sd-textinput-textinput-text-error-message);font-size:var(--sd-textinput-textinput-error-message-typography-font-size);line-height:var(--sd-textinput-textinput-error-message-typography-line-height);margin-top:var(--sd-textinput-textinput-contents-gap)}sd-field .sd-field .sd-field__hint{color:var(--sd-textinput-textinput-text-hint);font-size:var(--sd-textinput-textinput-hint-typography-font-size);line-height:var(--sd-textinput-textinput-hint-typography-line-height);margin-top:var(--sd-textinput-textinput-contents-gap)}"}},[772,"sd-field",{name:[1],rules:[16],error:[1028],disabled:[1028],readonly:[1028],hovered:[1028],focused:[1028],status:[1],hint:[1],errorMessage:[1,"error-message"],width:[8],size:[513],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],errorMsg:[32],sdValidate:[64],sdReset:[64],sdResetValidation:[64],sdFocus:[64]}]);function u(){"undefined"!=typeof customElements&&["sd-field","sd-button","sd-floating-portal","sd-icon","sd-tooltip"].forEach((e=>{switch(e){case"sd-field":customElements.get(i(e))||customElements.define(i(e),g);break;case"sd-button":customElements.get(i(e))||t();break;case"sd-floating-portal":customElements.get(i(e))||l();break;case"sd-icon":customElements.get(i(e))||o();break;case"sd-tooltip":customElements.get(i(e))||r()}}))}export{g as S,u as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as i,H as r}from"./p-DNWwGHho.js";import{s as d}from"./p-j2khhcHY.js";const a={default:d.color.divider.default},s=class{constructor(i){e(this,i)}vertical=!1;render(){return i(r,{key:"92e9f5ef8d6d382e1e2a62f3421feaf1bc27aab7",style:{"--sd-divider-color":a.default}},i("hr",{key:"40827e6308a258e6de4a438c53d4de9465a6d0a1","aria-orientation":this.vertical?"vertical":"horizontal"}))}};s.style="sd-divider{flex-shrink:0;line-height:0}:where(sd-divider:not([vertical])){display:block;width:100%;height:1px}:where(sd-divider[vertical]){display:inline-block;align-self:stretch;width:1px}sd-divider hr{display:block;width:100%;height:100%;margin:0;border:0;background-color:var(--sd-divider-color)}";export{s as sd_divider}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as s,a as t,h as i,F as a}from"./p-DNWwGHho.js";import{T as o}from"./p-LIf7YMBN.js";var n="#07284A";const l=class{constructor(t){e(this,t),this.showChange=s(this,"sdShowChange",7)}get el(){return t(this)}show=!1;placement="bottom";color="#01BB4B";icon="helpOutline";iconSize=12;label="";name="primary_sm";rightIcon;ariaLabel="";disabled=!1;type="button";menuTitle;messages=[];leftLink;button;menuClass="";showChange;buttonEl;setShow=e=>{this.show!==e&&(this.show=e,this.showChange.emit(e))};get popoverOffset(){switch(this.placement??"bottom"){case"top":return[0,-4];case"bottom":return[0,4];case"left":case"right":return[4,0]}}handleClose=()=>this.setShow(!1);render(){const e=this.placement??"bottom",s=this.color??"#01BB4B",t=this.icon??"helpOutline",l=this.iconSize??12,c=this.menuClass??"",d=Array.isArray(this.messages)?this.messages:[],f=this.leftLink,r=this.button,b=!!f||!!r;return i(a,{key:"7bf954f334ae12586a02b799139dc29421a86551"},""!==this.label?i("sd-button",{ref:e=>this.buttonEl=e,name:this.name??"primary_sm",label:this.label,icon:t,rightIcon:this.rightIcon,ariaLabel:this.ariaLabel,disabled:this.disabled,type:this.type??"button",class:"sd-popover",onSdClick:()=>this.setShow(!this.show)}):i("sd-icon",{ref:e=>this.buttonEl=e,name:t,size:l,color:s,class:"sd-popover",onClick:()=>this.setShow(!this.show)}),this.show&&i("sd-floating-portal",{key:"f785e5851cf126052d2c016220d9ff2376f2a9f3",parentRef:this.buttonEl,onSdClose:this.handleClose,placement:e,offset:this.popoverOffset},i("div",{key:"5eb30ad12f0f1cb3f23ae90e6b51e9c545dee8fd",class:{"sd-floating-menu":!0,"sd-floating-menu--popover":!0,[`sd-floating-menu--${e}`]:!0,[c]:""!==c},style:{"--sd-floating-bg":n}},i("i",{key:"632639d52731fe47baf2860464013a4d0fd3c3d8",class:`sd-floating-menu__arrow sd-floating-menu__arrow--${e}`},i(o,{key:"1f963e1a52b09803fd9f2d1f1ce7a07023951fc9"})),i("div",{key:"1c90735369085c465321e398775c4ce484190479",class:"sd-floating-menu__content"},this.menuTitle&&i("div",{key:"29584cd7bcb244c3fb6b0cb895a5c4b55093418a",class:"sd-floating-menu__title"},this.menuTitle),d.length>0&&i("div",{key:"2c7a9671cbec98f0fb393b1d049bfecc1e8b8013",class:"sd-floating-menu__messages"},d.map(((e,s)=>i("div",{key:`msg-${s}`},e)))),b&&i("div",{key:"18667a0a8eaf8f022513b048095c24487dd4ae98",class:{"sd-floating-menu__buttons":!0,"sd-floating-menu__buttons--with-link":!!f}},f&&i("sd-text-link",{key:"efbeb3047ea9eb62eba2f5940ec4f71f46d1c479",class:"sd-floating-menu__left-link",label:f.label,icon:f.icon??"",iconColor:f.iconColor??"",useArrow:!!f.useArrow,underline:!!f.underline,disabled:!!f.disabled,onSdClick:f.onClick}),r&&i("sd-button",{key:"9044ee54225a7b441c85d1acf3355e2d3688f942",name:r.name??"secondary_xs",label:r.label,icon:r.icon,rightIcon:r.rightIcon,ariaLabel:r.ariaLabel,disabled:r.disabled,type:r.type,onSdClick:r.onClick}))),i("sd-ghost-button",{key:"4f37394444b692ff5a2b736fe3514e51eb49b601",class:"sd-floating-menu__close-button",icon:"close",ariaLabel:"close",size:"xs",onClick:this.handleClose}))))}};l.style="sd-popover{position:relative;cursor:pointer;display:inline-flex}";export{l as sd_popover}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,a as e,h as i,c as s,F as o}from"./p-DNWwGHho.js";import{T as d}from"./p-LIf7YMBN.js";var n={sm:{height:"28",gap:"6",icon:"12",typography:{fontWeight:"700",fontSize:"12",lineHeight:"20"}},md:{height:"36",gap:"8",icon:"16",typography:{fontWeight:"700",fontSize:"14",lineHeight:"24"}}},a={gap:"6",paddingX:"12",typography:{fontWeight:"500",fontSize:"12",lineHeight:"20"},bg:"#F6F6F6",border:{default:"#AAAAAA",disabled:"#CCCCCC",width:"1"}};const l={start:"flex-start",center:"center",end:"flex-end"},r=n.sm,f=n.md,h={sm:{height:r.height,gap:r.gap,icon:r.icon,fontSize:r.typography.fontSize,lineHeight:r.typography.lineHeight,fontWeight:r.typography.fontWeight},md:{height:f.height,gap:f.gap,icon:f.icon,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight}},c=["sd-input","sd-barcode-input","sd-textarea","sd-number-input","sd-select","sd-file-picker","sd-date-picker","sd-date-range-picker"],p=class{constructor(e){t(this,e)}get el(){return e(this)}name="";rules=[];error=!1;disabled=!1;readonly=!1;hovered=!1;focused=!1;status;hint="";errorMessage="";width="";size="sm";label="";labelWidth="";addonLabel="";addonAlign="start";icon=void 0;labelTooltip="";labelTooltipProps=null;errorMsg="";hostElement=null;get value(){return this.hostElement?.value??null}get fieldStatus(){let t="";return this.disabled?(t="disabled",`sd-field--${t}`):this.readonly?(t="readonly",`sd-field--${t}`):this.focused?(t="focus",`sd-field--${t}`):(this.hovered&&(t="hover"),void 0!==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 c){const e=this.el.closest(t);if(e&&"value"in e)return e}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)}))}async sdValidate(){if(!this.rules||0===this.rules.length)return!0;for(const t of this.rules){const e=t(this.value??"");if(!0!==e)return this.setError(!0,e),!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,e){this.errorMsg=e,this.hostElement&&(this.hostElement.error=t)}render(){const t=this.addonLabel,e=this.size in h?this.size:"sm",s=h[e],o={"--sd-field-wrapper-height":`var(--sd-system-size-field-${e}-height)`,"--sd-field-control-radius":`var(--sd-system-radius-field-${e})`,"--sd-field-label-margin-right":`var(--sd-system-space-field-${e}-gap)`},d=""!==this.label?{"--sd-field-label-height":`${s.height}px`,"--sd-field-label-gap":`${s.gap}px`,"--sd-field-label-font-size":`${s.fontSize}px`,"--sd-field-label-line-height":`${s.lineHeight}px`,"--sd-field-label-font-weight":s.fontWeight,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-label-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{},n=""!==t?{"--sd-field-addon-padding-x":`${a.paddingX}px`,"--sd-field-addon-font-size":`${a.typography.fontSize}px`,"--sd-field-addon-line-height":`${a.typography.lineHeight}px`,"--sd-field-addon-font-weight":a.typography.fontWeight,"--sd-field-addon-bg":a.bg,"--sd-field-addon-border-color":this.disabled?a.border.disabled:a.border.default,"--sd-field-addon-gap":`${a.gap}px`,"--sd-field-addon-border-width":`${a.border.width}px`,"--sd-field-addon-justify":l[this.addonAlign]??l.start,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-addon-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{};return i("div",{key:"1cc135c77708546f23b699bf337c018f6c4d315e",class:{"sd-field":!0,"sd-field--has-label":""!==this.label,"sd-field--has-addon":""!==t,[this.fieldStatus]:""!==this.fieldStatus},style:{...o,...d,...n}},i("div",{key:"506ace23aa27ad50a8ad60dcf6c71a0bdf04d7af",class:"sd-field__wrapper"},this.renderLabel(this.label),i("div",{key:"41b77a52c21eef8c38127362423378f1b9a6cb77",class:"sd-field__main",style:""!==this.width&&0!==this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},i("div",{key:"1f3c5f2009a0d96b8a3544c58b96f7ecc4ddee6b",class:{"sd-field__control":!0,"sd-field__control--has-addon":""!==t}},t&&i("div",{key:"39a28adaa959b89d3724672910157662e50b35ed",class:"sd-field__addon"},t),i("slot",{key:"0c9360e8644df658c389554c13a04bc22985e84d"})),""!==this.errorMsg||""!==this.errorMessage?i("div",{class:"sd-field__error-message"},""!==this.errorMsg?this.errorMsg:this.errorMessage):""!==this.hint&&i("div",{class:"sd-field__hint"},this.hint))))}renderLabel(t){return null==t||""===t?null:i("label",{class:"sd-field__label"},this.icon&&i("sd-icon",{name:this.icon.name,size:this.icon.size??Number(h[this.size in h?this.size:"sm"].icon),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},this.labelTooltip))}};p.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.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#E1E1E1;border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--readonly .sd-field__wrapper .sd-field__control{background-color:var(--sd-system-color-field-bg-read-only);color:var(--sd-system-color-field-text-read-only)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;flex-shrink:0;width:var(--sd-field-label-width, auto);height:var(--sd-field-label-height);margin-right:var(--sd-field-label-margin-right)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__icon{margin-right:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:var(--sd-field-label-font-size);line-height:var(--sd-field-label-line-height);font-weight:var(--sd-field-label-font-weight);color:var(--sd-system-color-field-text-default);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-addon .sd-field__control .sd-field__addon{display:flex;gap:var(--sd-field-addon-gap);align-items:center;justify-content:var(--sd-field-addon-justify, flex-start);white-space:nowrap;box-sizing:border-box;flex-shrink:0;width:var(--sd-field-addon-width, auto);padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right:var(--sd-field-addon-border-width) solid var(--sd-field-addon-border-color);border-radius:calc(var(--sd-field-control-radius) - 1px) 0 0 calc(var(--sd-field-control-radius) - 1px)}sd-field .sd-field__wrapper{width:100%;display:flex;align-items:flex-start;flex-flow:row nowrap;position:relative;color:var(--sd-system-color-field-text-default);-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__main{flex:1;min-width:0;display:flex;flex-direction:column}sd-field .sd-field__wrapper .sd-field__control{position:relative;height:var(--sd-field-wrapper-height);display:flex;min-width:0;border:1px solid var(--sd-system-color-field-border-default);border-radius:var(--sd-field-control-radius);background:var(--sd-system-color-field-bg-default)}sd-field .sd-field--error .sd-field__wrapper .sd-field__control:not(:hover){border:1px solid var(--sd-system-color-field-border-danger) !important}sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-success) !important}sd-field .sd-field:not(.sd-field--disabled):not(.sd-field--readonly) .sd-field__wrapper .sd-field__control:hover{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--focus:not(.sd-field--readonly) .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field .sd-field__error-message{color:var(--sd-textinput-textinput-text-error-message);font-size:var(--sd-textinput-textinput-error-message-typography-font-size);line-height:var(--sd-textinput-textinput-error-message-typography-line-height);margin-top:var(--sd-textinput-textinput-contents-gap)}sd-field .sd-field .sd-field__hint{color:var(--sd-textinput-textinput-text-hint);font-size:var(--sd-textinput-textinput-hint-typography-font-size);line-height:var(--sd-textinput-textinput-hint-typography-line-height);margin-top:var(--sd-textinput-textinput-contents-gap)}";const g=class{constructor(e){t(this,e),this.close=s(this,"sdClose",7)}get el(){return e(this)}to="body";parentRef=null;offset=[0,0];zIndex=998;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(){void 0!==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??998).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(){void 0!==this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{if(!this.parentRef||!this.wrapper)return;const t=this.parentRef.getBoundingClientRect();if(0===t.width&&0===t.height)return;const[e,i]=this.offset??[0,0],s=g.ARROW_SIZE;let o=0,d=0;switch(this.placement??"bottom"){case"top":o=t.top+window.scrollY-this.wrapper.offsetHeight+i-s,d=t.left+window.scrollX+t.width/2-this.wrapper.offsetWidth/2+e;break;case"bottom":o=t.bottom+window.scrollY+i+s,d=t.left+window.scrollX+t.width/2-this.wrapper.offsetWidth/2+e;break;case"left":o=t.top+window.scrollY+t.height/2-this.wrapper.offsetHeight/2+i,d=t.left+window.scrollX-this.wrapper.offsetWidth-e-s;break;case"right":o=t.top+window.scrollY+t.height/2-this.wrapper.offsetHeight/2+i,d=t.right+window.scrollX+e+s}Object.assign(this.wrapper.style,{top:`${o}px`,left:`${d}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()}handleKeydown(t){"Escape"===t.key&&this.close.emit()}render(){return i("slot",{key:"df97046860db0225724f9768428063a3390c5f6e"})}};g.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;justify-content:flex-end}.sd-floating-menu__content .sd-floating-menu__buttons--with-link{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}@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 m={bg:"#07284A",content:"#FFFFFF"},u={bg:"#FCEFEF",content:"#FB4444"},b={bg:"#FEF1EA",content:"#FF6B00"},_={bg:"#E6F1FF",content:"#0075FF"};const x={default:{bg:m.bg,content:m.content},danger:{bg:u.bg,content:u.content},warning:{bg:b.bg,content:b.content},accent:{bg:_.bg,content:_.content}},v=class{constructor(e){t(this,e)}get el(){return e(this)}trigger="hover";placement="top";color="#01BB4B";tooltipType="default";icon="helpOutline";iconSize=12;label="";name="primary_sm";rightIcon;ariaLabel="";disabled=!1;type="button";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}),v.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",e=this.placement??"top",s=this.tooltipType??"default",n=this.icon??"helpOutline",a=this.color??"#01BB4B",l=x[s]??x.default,r=()=>this.showTooltip=!this.showTooltip,f=void 0!==this.label&&""!==this.label;return i(o,{key:"0ffbc5e61b4b5ab9bf1fda1c064de63c1467bb37"},i("div",{key:"c74bff7fde9c1f139435c2b37f69e7ee7492ec91",class:`sd-tooltip-trigger ${void 0!==this.sdClass&&""!==this.sdClass?this.sdClass:""}`,..."hover"===t?{onMouseEnter:()=>this.show(),onMouseLeave:()=>this.startHideTimer()}:f?{}:{onClick:r}},f?i("sd-button",{ref:t=>this.buttonEl=t,name:this.name??"primary_sm",label:this.label,icon:n,rightIcon:this.rightIcon,ariaLabel:this.ariaLabel,disabled:this.disabled,type:this.type??"button",class:"sd-tooltip",..."click"===t&&f?{onSdClick:r}:{}}):i("sd-icon",{ref:t=>this.buttonEl=t,name:n,size:this.iconSize??12,color:a,class:"sd-tooltip"})),this.showTooltip&&i("sd-floating-portal",{key:"3a83a7d7a33fbdd720a52149b2a156ecc72c087b",parentRef:this.buttonEl,onSdClose:this.handleClose,placement:e,offset:this.tooltipOffset},i("div",{key:"abb63e4db76edae3df1d16d756e20a61284db87f",ref:t=>this.menuEl=t,class:{"sd-floating-menu":!0,[`sd-floating-menu--${s}`]:!0,[`sd-floating-menu--${e}`]:!0},style:{"--sd-floating-bg":l.bg,"--sd-floating-content":l.content},onMouseEnter:()=>this.show(),onMouseLeave:()=>this.startHideTimer()},i("i",{key:"c29052cc7ed0e514ed27a7f576585d8865728cd4",class:`sd-floating-menu__arrow sd-floating-menu__arrow--${e}`},i(d,{key:"9602237020591571cd76d3afa9e1c6383f7f421f"})),i("div",{key:"29091435fa3008eaf352b831eb4345ed9d6a5d86",class:"sd-floating-menu__content",innerHTML:this.slotContentHTML}))))}};v.style="sd-tooltip{visibility:hidden !important;display:inline-flex}sd-tooltip.visible{visibility:visible !important}sd-tooltip .sd-tooltip-trigger{display:inline-flex;position:relative;cursor:pointer;align-items:center;justify-content:center}";export{p as sd_field,g as sd_floating_portal,v as sd_tooltip}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,a as i,h as s}from"./p-DNWwGHho.js";import{n as d}from"./p-CCwNgVmC.js";import{D as n,a}from"./p-TF8_Lyhq.js";import{i as r}from"./p-ByhWX2NK.js";import"./p-BQn6le_Y.js";const o=class{constructor(i){e(this,i),this.update=t(this,"sdUpdate",7),this.viewChange=t(this,"sdViewChange",7)}static CLOSE_ANIMATION_DURATION=150;get el(){return i(this)}value=null;size="sm";placeholder="YYYY-MM-DD";selectable;disabled=!1;width="";label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";rules=[];error=!1;icon=void 0;labelTooltip="";labelTooltipProps=null;isOpen=!1;isAnimatingOut=!1;focused=!1;hovered=!1;update;viewChange;triggerRef;formField;closeAnimationTimer;name=d();watchIsOpen(e){this.focused=e}async sdValidate(){return this.formField?.sdValidate()}async sdReset(){return this.formField?.sdReset()}async sdResetValidate(){return this.formField?.sdResetValidation()}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),o.CLOSE_ANIMATION_DURATION))}handleTriggerClick=()=>{this.disabled||(this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0))};handleSelect=e=>{e.stopPropagation(),this.closeDropdown(),this.value=e.detail;const t=this.value;requestAnimationFrame((()=>{this.update.emit(t)}))};handleViewChange=e=>{this.viewChange.emit(e.detail)};disconnectedCallback(){this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e=a[this.size]??a.sm;return s("sd-field",{key:"35d821e9a21a09e4b2dc0d47f9a95d895c4f9dc4",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-system-size-field-sm-height":`${e.height}px`,"--sd-system-radius-field-sm":`${e.radius}px`,"--sd-system-color-field-border-default":n.border.default,"--sd-system-color-field-border-focus":n.border.focus,"--sd-system-color-field-bg-default":n.bg.default}},s("div",{key:"21fe3c0ab5dff10265139111de741216fb06e4e4",class:"sd-date-picker",ref:e=>{this.triggerRef=e}},s("sd-date-picker-trigger",{key:"b9fd9b90afa512aefdd4b227c66d0b4660b69318",displayText:this.value??"",placeholder:this.placeholder,disabled:this.disabled,size:this.size,onSdTriggerClick:this.handleTriggerClick})),(this.isOpen||this.isAnimatingOut)&&s("sd-portal",{key:"b6e439d2b507922cc2e345fe1fba856d77441cbc",open:this.isOpen,parentRef:this.triggerRef,onSdClose:()=>this.closeDropdown()},s("sd-calendar",{key:"ae09060fec5542b9e30d051133f4bca3c772f5d9",elevated:!0,value:this.value,selectable:this.selectable,onSdUpdate:this.handleSelect,onSdViewChange:this.handleViewChange})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}};o.style="sd-date-picker{display:inline-flex}sd-date-picker sd-portal{display:none}sd-date-picker .sd-date-picker{position:relative;width:100%;height:100%}";const l=class{constructor(i){e(this,i),this.update=t(this,"sdUpdate",7),this.viewChange=t(this,"sdViewChange",7)}static CLOSE_ANIMATION_DURATION=150;get el(){return i(this)}value=null;size="sm";placeholder="YYYY-MM-DD ~ YYYY-MM-DD";selectable;maxRange;disabled=!1;width="";label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";rules=[];error=!1;icon=void 0;labelTooltip="";labelTooltipProps=null;isOpen=!1;isAnimatingOut=!1;focused=!1;hovered=!1;update;viewChange;triggerRef;formField;closeAnimationTimer;name=d();watchIsOpen(e){this.focused=e}async sdValidate(){return this.formField?.sdValidate()}async sdReset(){return this.formField?.sdReset()}async sdResetValidate(){return this.formField?.sdResetValidation()}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),l.CLOSE_ANIMATION_DURATION))}handleTriggerClick=()=>{this.disabled||(this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0))};handleSelect=e=>{this.closeDropdown(),this.value=e.detail;const t=this.value;requestAnimationFrame((()=>{this.update.emit(t)}))};handleViewChange=e=>{this.viewChange.emit(e.detail)};get displayText(){return null==this.value||""===this.value[0]||""===this.value[1]?"":`${this.value[0]} ~ ${this.value[1]}`}disconnectedCallback(){this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e=a[this.size]??a.sm;return s("sd-field",{key:"89eaeb8978796508650aec5f3ccdeb7df16fb6f4",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-system-size-field-sm-height":`${e.height}px`,"--sd-system-radius-field-sm":`${e.radius}px`,"--sd-system-color-field-border-default":n.border.default,"--sd-system-color-field-border-focus":n.border.focus,"--sd-system-color-field-bg-default":n.bg.default}},s("div",{key:"f3ce583e53edbc451ab6c0592c0ab2ed87e07a06",class:"sd-date-range-picker",ref:e=>{this.triggerRef=e}},s("sd-date-picker-trigger",{key:"53086fd3d15dc2c05364a66fdf767e09c6c19fac",displayText:this.displayText,placeholder:this.placeholder,disabled:this.disabled,size:this.size,onSdTriggerClick:this.handleTriggerClick})),(this.isOpen||this.isAnimatingOut)&&s("sd-portal",{key:"5ee1499ee9a224a9c653095e9914ed20cbaca2a1",open:this.isOpen,parentRef:this.triggerRef,onSdClose:()=>this.closeDropdown()},s("sd-date-range-picker-calendar",{key:"7c7479dacf57c996a708435857d2b5f7900509fd",value:this.value,selectable:this.selectable,maxRange:this.maxRange,onSdSelect:this.handleSelect,onSdViewChange:this.handleViewChange})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}};l.style="sd-date-range-picker{display:inline-flex}sd-date-range-picker sd-portal{display:none}sd-date-range-picker .sd-date-range-picker{position:relative;width:100%;height:100%}";var h={height:"28",paddingX:"12",gap:"8",radius:"4",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"},size:{icon:"16"},text:{default:"#222222",placeholder:"#AAAAAA",disabled:"#888888"},icon:{disabled:"#BBBBBB"}};const c={height:h.height,paddingX:h.paddingX,gap:h.gap,radius:h.radius,fontSize:h.typography.fontSize,lineHeight:h.typography.lineHeight,fontWeight:h.typography.fontWeight,iconSize:h.size.icon},u={text:h.text,icon:{default:"#888888",disabled:h.icon.disabled}},p=class{constructor(i){e(this,i),this.update=t(this,"sdUpdate",7),this.reject=t(this,"sdReject",7)}get el(){return i(this)}value=null;placeholder="Click to upload";disabled=!1;inline=!1;multiple=!1;accept;maxFileSize;maxTotalSize;maxFiles;name=d();label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";width="";rules;error=!1;status;icon=void 0;labelTooltip="";labelTooltipProps=null;focused=!1;hovered=!1;internalValue=null;showTooltip=!1;fileInputRef;fileNamesRef;formField;update;reject;valueChanged(e){this.internalValue=e}componentDidLoad(){this.checkOverflow()}componentDidUpdate(){this.checkOverflow()}async sdValidate(){return this.formField?.sdValidate()??Promise.resolve(!0)}async sdReset(){const e=this.multiple?[]:null;this.value=e,this.internalValue=e,this.fileInputRef&&(this.fileInputRef.value=""),await(this.formField?.sdResetValidation())}async sdResetValidate(){await(this.formField?.sdResetValidation())}toBytes(e){if(null!=e)return"string"==typeof e?Number(e):e}validateFiles(e){const t=this.toBytes(this.maxFileSize),i=this.toBytes(this.maxTotalSize),s=null!=this.maxFiles?Number(this.maxFiles):void 0;if(null!=s&&e.length>s)return{accepted:[],rejected:e,reason:"max-files"};if(null!=t){const i=e.filter((e=>e.size>t));if(i.length>0)return{accepted:[],rejected:i,reason:"max-file-size"}}return null!=i&&e.reduce(((e,t)=>e+t.size),0)>i?{accepted:[],rejected:e,reason:"max-total-size"}:{accepted:e,rejected:[]}}handleFileChange=e=>{const t=e.target.files;if(!t||0===t.length)return;const i=Array.from(t),{accepted:s,rejected:d,reason:n}=this.validateFiles(i);if(null!=n)return this.reject?.emit({files:d,reason:n}),void(this.fileInputRef&&(this.fileInputRef.value=""));this.internalValue=this.multiple?s:s[0],this.value=this.internalValue,this.update?.emit(this.value)};handleClear=e=>{if(this.disabled)return;e.stopPropagation();const t=this.multiple?[]:null;this.value=t,this.internalValue=t,this.update?.emit(t),this.fileInputRef&&(this.fileInputRef.value="")};handleClick=()=>{this.disabled||this.fileInputRef?.click()};hasFiles(){return!!this.internalValue&&(!Array.isArray(this.internalValue)||this.internalValue.length>0)}getDisplayText(){return this.hasFiles()?Array.isArray(this.internalValue)?this.internalValue.map((e=>e.name)).join(", "):this.internalValue?.name||(this.placeholder??"Click to upload"):this.placeholder??"Click to upload"}checkOverflow(){this.fileNamesRef&&(this.showTooltip=this.fileNamesRef.scrollWidth>this.fileNamesRef.clientWidth)}getIconColor(){return this.disabled?u.icon.disabled:u.icon.default}render(){const e=this.hasFiles(),t=this.getDisplayText(),i={"--sd-file-picker-font-size":`${c.fontSize}px`,"--sd-file-picker-line-height":`${c.lineHeight}px`,"--sd-file-picker-font-weight":c.fontWeight,"--sd-file-picker-padding-x":`${c.paddingX}px`,"--sd-file-picker-gap":`${c.gap}px`,"--sd-file-picker-text-color":u.text.default,"--sd-file-picker-placeholder-color":u.text.placeholder,"--sd-file-picker-disabled-color":u.text.disabled,"--sd-system-size-field-sm-height":`${c.height}px`,"--sd-system-radius-field-sm":`${c.radius}px`},d=s("div",{role:"button",tabindex:this.disabled?-1:0,class:"sd-file-picker__content",onClick:this.handleClick,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())}},s("input",{ref:e=>this.fileInputRef=e,type:"file",class:"sd-file-picker__input",disabled:this.disabled,multiple:this.multiple,accept:this.accept,onInput:this.handleFileChange,"aria-label":this.placeholder??"Click to upload"}),s("sd-icon",{name:"attachFile",size:Number(c.iconSize),color:this.getIconColor(),class:"sd-file-picker__icon"}),s("div",{ref:e=>this.fileNamesRef=e,class:{"sd-file-picker__text":!0,"sd-file-picker__text--placeholder":!e,"sd-file-picker__text--active":e}},t),!this.disabled&&e&&s("sd-ghost-button",{icon:"close",size:"xxs",ariaLabel:"clear",disabled:this.disabled,class:"sd-file-picker__clear-icon",onClick:this.handleClear}),this.showTooltip&&e&&this.hovered&&s("div",{class:"sd-file-picker__tooltip"},t));return this.inline?s("div",{class:{"sd-file-picker--inline":!0,"sd-file-picker--inline-disabled":this.disabled},style:i,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1},d):s("sd-field",{name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,status:this.status,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:i},d)}static get watchers(){return{value:[{valueChanged:0}]}}};p.style="sd-file-picker{display:inline-flex;width:100%}.sd-file-picker__content{width:100%;height:100%;display:flex;align-items:center;padding:0 var(--sd-file-picker-padding-x);gap:var(--sd-file-picker-gap);cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;vertical-align:middle}.sd-file-picker__text{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:var(--sd-file-picker-font-weight);font-size:var(--sd-file-picker-font-size);line-height:var(--sd-file-picker-line-height);color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker__text--placeholder{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__icon{flex-shrink:0}.sd-file-picker__clear-icon{flex-shrink:0;cursor:pointer;transition:opacity 0.2s ease}.sd-file-picker__clear-icon:hover{opacity:0.7}.sd-file-picker__input{display:none}.sd-file-picker__tooltip{position:absolute;top:calc(100% - 4px);left:50%;transform:translate(-50%);z-index:998;white-space:nowrap;padding:8px 12px;background:rgba(0, 0, 0, 0.8);color:white;font-size:12px;line-height:18px;border-radius:4px;pointer-events:none}.sd-field--disabled .sd-file-picker__content{cursor:not-allowed}.sd-field--disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}.sd-file-picker--inline .sd-file-picker__content{border:none;background-color:transparent;padding:0;height:auto}.sd-file-picker--inline .sd-file-picker__text{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker--inline:hover:not(.sd-file-picker--inline-disabled) .sd-file-picker__text{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline .sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__content{cursor:not-allowed}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}";const b=r.textinput.sm,f=r.textinput.md,g={sm:{height:b.height,paddingX:b.paddingX,gap:b.gap,radius:b.radius,fontSize:b.typography.fontSize,lineHeight:b.typography.lineHeight,fontWeight:b.typography.fontWeight},md:{height:f.height,paddingX:f.paddingX,gap:f.gap,radius:f.radius,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight}},m={text:r.textinput.text,icon:r.textinput.icon},x=class{constructor(i){e(this,i),this.input=t(this,"sdUpdate",7),this.focus=t(this,"sdFocus",7),this.blur=t(this,"sdBlur",7)}get host(){return i(this)}value=null;type="text";size="sm";addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;clearable=!1;width="";rules=[];autoFocus=!1;autocomplete="";maxlength;minlength;inputmode;enterkeyhint;spellcheck=!1;status;hint="";errorMessage="";inputClass="";readonly=!1;error=!1;focused=!1;hovered=!1;label="";labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;inputStyle={};internalValue=null;passwordVisible=!1;nativeEl=void 0;formField;name=d();input;focus;blur;valueChanged(e){this.internalValue=e}internalValueChanged(e){e!==this.value&&(this.value=e,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){null!=this.value&&""!==this.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=g[this.size]??g.sm;return s("sd-field",{key:"184bd0b614071b1c26d0ef3588db8eea1ac519cb",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,readonly:this.readonly,focused:this.focused,hovered:this.hovered,status:this.status,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref: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":m.text.default,"--sd-input-placeholder-color":m.text.placeholder,"--sd-input-disabled-color":m.text.disabled,"--sd-input-icon-color":m.icon.default,"--sd-system-size-field-sm-height":`${e.height}px`,"--sd-system-radius-field-sm":`${e.radius}px`}},s("label",{key:"599d757b62bd61be0ba5c2dde2e1030b4d6f2973",class:"sd-input__content"},s("slot",{key:"8b71b1449225e51cbab4204e34c077d83101e09e",name:"prefix"}),s("input",{key:"ed48cf8544adc9e3475229b03129ace0af0e6d4e",name:this.name,ref:e=>this.nativeEl=e,class:`sd-input__native ${this.inputClass}`,type:"password"===this.type&&this.passwordVisible?"text":this.type??"text",value:this.internalValue||"",placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,autocomplete:this.autocomplete||void 0,maxlength:this.maxlength,minlength:this.minlength,inputmode:this.inputmode,enterkeyhint:this.enterkeyhint,spellcheck:this.spellcheck,onInput:this.handleInput,onFocus:e=>this.handleFocus("focus",e),onBlur:e=>this.handleFocus("blur",e),style:this.inputStyle}),s("slot",{key:"f084df7c3174756111c6eeb824202e26273d369a",name:"suffix"}),this.clearable&&this.internalValue&&!this.disabled&&!this.readonly&&s("sd-ghost-button",{key:"62f87c780b971ef43ec9bd15ae47d1f773ec18ca",icon:"close",ariaLabel:"clear",size:"xxs",disabled:this.disabled,class:"sd-input__clear-icon",onClick:async()=>{this.disabled||this.readonly||(this.internalValue="",await(this.formField?.sdValidate()))}}),"password"===this.type&&s("sd-ghost-button",{key:"83f511acdc0db74f6d7745e4a47c731f9bcf9bb5",icon:this.passwordVisible?"visibilityOn":"visibilityOff",ariaLabel:"visibility",size:"xxs",disabled:this.disabled||this.readonly,class:"sd-input__password-icon",onClick:()=>{this.disabled||this.readonly||(this.passwordVisible=!this.passwordVisible)}})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}};x.style="sd-icon{display:inline-block;line-height:0}sd-icon .sd-icon--rotate-90{transform:rotate(90deg)}sd-icon .sd-icon--rotate-180{transform:rotate(180deg)}sd-icon .sd-icon--rotate-270{transform:rotate(270deg)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #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[readonly]{color:var(--sd-system-color-field-text-read-only)}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}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,sd-input .sd-input__content .sd-input__native[readonly]~.sd-input__clear-icon,sd-input .sd-input__content .sd-input__native[readonly]~.sd-input__password-icon{cursor:not-allowed;pointer-events:none}";var _={numberInput:{sm:{height:"28",paddingX:"6",radius:"4",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"}},md:{height:"36",paddingX:"8",radius:"6",typography:{fontWeight:"400",fontSize:"14",lineHeight:"24"}},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 v=_.numberInput.sm,y=_.numberInput.md,k={sm:{height:v.height,paddingX:v.paddingX,radius:v.radius,fontSize:v.typography.fontSize,lineHeight:v.typography.lineHeight,fontWeight:v.typography.fontWeight},md:{height:y.height,paddingX:y.paddingX,radius:y.radius,fontSize:y.typography.fontSize,lineHeight:y.typography.lineHeight,fontWeight:y.typography.fontWeight}},w={border:_.numberInput.border,bg:_.numberInput.bg,text:_.numberInput.text},z={sm:{size:_.numberInput.stepper.sm.size},md:{size:_.numberInput.stepper.md.size},radius:_.numberInput.stepper.radius,bg:_.numberInput.stepper.bg,icon:_.numberInput.stepper.icon},C=_.numberInput.hint,T=_.numberInput.errorMessage,A=_.numberInput.contents.gap,F=class{constructor(i){e(this,i),this.update=t(this,"sdUpdate",7),this.focus=t(this,"sdFocus",7),this.blur=t(this,"sdBlur",7)}get el(){return i(this)}size="sm";min=Number.NEGATIVE_INFINITY;max=Number.POSITIVE_INFINITY;step=1;useButton=!1;useDecimal=!1;value=null;label;labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;width;rules=[];autoFocus=!1;status;hint="";errorMessage="";inputPrefix="";inputSuffix="";inputClass="";readonly=!1;inputStyle={};error=!1;focused=!1;hovered=!1;internalValue=null;displayValue="";nativeEl=void 0;formField;name=d();update;focus;blur;toNumber(e){if(null==e||""===e)return null;if("number"==typeof e)return isNaN(e)?null:e;if("string"==typeof e)return this.parseInput(e);const t=Number(e);return isNaN(t)?null:t}formatWithCommas(e){if(null==e||isNaN(e))return"";const t=e<0,i=Math.abs(e),[s,d]=i.toString().split("."),n=(+s).toLocaleString(),a=t?"-"+n:n;return void 0!==d&&""!==d?a+"."+d:String(a)}parseInput(e){if(""===e.trim())return null;const t=e.replace(/,/g,"").trim();if(!/^-?(\d+\.?\d*|\d*\.\d+)$/.test(t))return null;const i=parseFloat(t);return isNaN(i)||!this.useDecimal&&t.includes(".")?null:i}clampMinMax(e){return isNaN(e)?0:Math.min(Math.max(e,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(e){const t=this.toNumber(e);this.internalValue=null!==t?this.clampMinMax(t):null,this.updateDisplay()}internalValueChanged(e){this.updateDisplay(),e!==this.value&&(this.value=e,this.update?.emit(e))}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 e=this.toNumber(this.value);null!==e&&(this.internalValue=this.clampMinMax(e)),this.updateDisplay()}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=e=>{const t=e.target,i=t.value;if(""===i)return this.internalValue=null,void(this.displayValue="");const s=i.replace(/,/g,""),d=(s.match(/\./g)||[]).length;if(d>1)return void(t.value=this.displayValue);if("-"===s||"."===s||"-."===s)return void(t.value=s);if(s.endsWith(".")&&1===d){const e=s.slice(0,-1),i=this.parseInput(e);if(null!==i){const e=this.formatWithCommas(i);return void(t.value=e+".")}}const n=this.parseInput(s);if(null!==n){if(n<this.min)return void(t.value=this.displayValue);if(n>this.max)return void(t.value=this.displayValue);this.internalValue=n,this.displayValue=this.formatWithCommas(n),t.value=this.displayValue}else t.value=this.displayValue};handleFocus=e=>{this.focused=!0,this.focus?.emit(e)};handleBlur=async e=>{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(e)};handleKeyDown=e=>{"ArrowUp"===e.key?(e.preventDefault(),this.handleIncrement()):"ArrowDown"===e.key&&(e.preventDefault(),this.handleDecrement())};handleIncrement=()=>{if(this.isIncrementDisabled())return;const e=this.internalValue??this.min??0;let t=e+this.step;t>this.max&&(t=this.max),t!==e&&(this.internalValue=t)};handleDecrement=()=>{if(this.isDecrementDisabled())return;const e=this.internalValue??this.min??0;let t=e-this.step;t<this.min&&(t=this.min),t!==e&&(this.internalValue=t)};render(){const e=k[this.size]??k.sm,t="md"===this.size?14:12;return s("sd-field",{key:"36525cd069e57fc9177e25065381f722d1afa66e",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,readonly:this.readonly,focused:this.focused,hovered:this.hovered,status:this.status,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-number-input-font-size":`${e.fontSize}px`,"--sd-number-input-line-height":`${e.lineHeight}px`,"--sd-number-input-font-weight":e.fontWeight,"--sd-number-input-padding-x":`${e.paddingX}px`,"--sd-number-input-text-color":w.text.default,"--sd-number-input-placeholder-color":w.text.placeholder,"--sd-number-input-disabled-color":w.text.disabled,"--sd-number-input-stepper-size":`${z[this.size]?.size??z.sm.size}px`,"--sd-number-input-stepper-radius":`${z.radius}px`,"--sd-number-input-stepper-bg":z.bg.default,"--sd-number-input-stepper-bg-disabled":z.bg.disabled,"--sd-number-input-stepper-icon-color":z.icon.default,"--sd-number-input-stepper-icon-disabled":z.icon.disabled,"--sd-system-size-field-sm-height":`${e.height}px`,"--sd-system-radius-field-sm":`${e.radius}px`,"--sd-system-color-field-border-default":w.border.default,"--sd-system-color-field-border-focus":w.border.focus,"--sd-system-color-field-border-danger":w.border.danger,"--sd-system-color-field-bg-default":w.bg.default,"--sd-textinput-input-text-error-message":T.color,"--sd-textinput-input-error-message-typography-font-size":`${T.typography.fontSize}px`,"--sd-textinput-input-error-message-typography-line-height":`${T.typography.lineHeight}px`,"--sd-textinput-input-text-hint":C.color,"--sd-textinput-input-hint-typography-font-size":`${C.typography.fontSize}px`,"--sd-textinput-input-hint-typography-line-height":`${C.typography.lineHeight}px`,"--sd-textinput-input-contents-gap":`${A}px`}},s("div",{key:"47e0981ffcd5dd5182fa5586fda0014be865da9e",class:{"sd-number-input__content":!0,"sd-number-input__content--no-stepper":!this.useButton}},this.useButton&&s("button",{key:"7f5afc1ded2c889ccf7d689f4ee058cb171571d9",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--decrement",disabled:this.isDecrementDisabled(),onClick:this.handleDecrement,tabindex:-1},s("sd-icon",{key:"fd980fd4e568feaaebb19621ca837201bea519dd",name:"minus",size:t,color:this.isDecrementDisabled()?z.icon.disabled:z.icon.default})),this.inputPrefix&&s("span",{key:"2af6450d437cc765697e0bb4c8a0fcb58a9abd2f",class:"sd-number-input__prefix"},this.inputPrefix),s("input",{key:"21396363bd0e08f1639cd5a56b0bb7d5c9acd6c1",name:this.name,ref:e=>this.nativeEl=e,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:"d3cd84cd41e0161cfe0b13ed44b412991e498a92",class:"sd-number-input__suffix"},this.inputSuffix),this.useButton&&s("button",{key:"0a1fdf262b953ce79515ab9771d3177560e11eed",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--increment",disabled:this.isIncrementDisabled(),onClick:this.handleIncrement,tabindex:-1},s("sd-icon",{key:"5ffd93512d528309a9051d01f59bb31f1b1f9bb8",name:"add",size:t,color:this.isIncrementDisabled()?z.icon.disabled:z.icon.default}))))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}};F.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;gap:var(--sd-number-input-padding-x);color:var(--sd-number-input-text-color);font-size:var(--sd-number-input-font-size);line-height:var(--sd-number-input-line-height);font-weight:var(--sd-number-input-font-weight);padding:0 var(--sd-number-input-padding-x)}sd-number-input .sd-number-input__content--no-stepper{padding:0 calc(var(--sd-number-input-padding-x) * 2)}sd-number-input .sd-number-input__content .sd-number-input__native{width:100%;height:100%;min-width:0;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;padding-block:0;padding-inline:0}sd-number-input .sd-number-input__content .sd-number-input__native[disabled]{cursor:not-allowed;color:var(--sd-number-input-disabled-color)}sd-number-input .sd-number-input__content .sd-number-input__native[readonly]{color:var(--sd-system-color-field-text-read-only)}sd-number-input .sd-number-input__content .sd-number-input__native::placeholder{color:var(--sd-number-input-placeholder-color)}sd-number-input .sd-number-input__content .sd-number-input__prefix,sd-number-input .sd-number-input__content .sd-number-input__suffix{flex-shrink:0;white-space:nowrap;color:var(--sd-number-input-placeholder-color);font-size:inherit;line-height:inherit}sd-number-input .sd-number-input__content .sd-number-input__stepper{flex-shrink:0;width:var(--sd-number-input-stepper-size);height:var(--sd-number-input-stepper-size);border:none;border-radius:var(--sd-number-input-stepper-radius);background-color:var(--sd-number-input-stepper-bg);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;margin:0;transition:background-color 0.15s ease}sd-number-input .sd-number-input__content .sd-number-input__stepper:hover:not(:disabled){filter:brightness(0.95)}sd-number-input .sd-number-input__content .sd-number-input__stepper:disabled{background-color:var(--sd-number-input-stepper-bg-disabled);cursor:not-allowed}";const $=class{constructor(i){e(this,i),this.change=t(this,"sdUpdate",7)}value;options=[];direction="vertical";disabled=!1;groupName;change;valueChanged(e){this.value=e}handleRadioChange=e=>{if(this.disabled)return;const t=this.options.find((t=>String(t.value)===String(e))),i=t?t.value:e;this.value=i,this.change?.emit(i)};getGroupClasses(){return["sd-radio-group",`sd-radio-group--${this.direction??"vertical"}`].join(" ")}render(){return s("div",{key:"3bb952a72d5bccd1ad4842d9554efe6c69829773",class:this.getGroupClasses(),role:"radiogroup"},this.options.map((e=>s("sd-radio",{key:`radio-${e.value}`,val:String(e.value),value:String(this.value),label:e.label,disabled:this.disabled||!!e.disabled,onSdUpdate:({detail:e})=>this.handleRadioChange(e)}))))}static get watchers(){return{value:[{valueChanged:0}]}}};$.style='sd-radio{display:inline-flex;width:fit-content;height:var(--sd-radio-line-height);line-height:0}sd-radio .sd-radio{cursor:pointer;display:inline-flex;align-items:center;gap:var(--sd-radio-gap);height:var(--sd-radio-line-height);max-height:var(--sd-radio-line-height)}sd-radio .sd-radio>input{position:absolute;width:0;height:0;opacity:0;pointer-events:none}sd-radio .sd-radio>input:focus-visible+.sd-radio__circle{box-shadow:0 0 0 2px white, 0 0 0 4px var(--sd-radio-checked-border);outline:none}sd-radio .sd-radio__circle{position:relative;width:var(--sd-radio-size);height:var(--sd-radio-size);border-radius:50%;border:var(--sd-radio-border-width) solid var(--sd-radio-unchecked-border);box-sizing:border-box;background:var(--sd-radio-unchecked-bg);display:inline-flex;flex-shrink:0}sd-radio .sd-radio__label{font-size:var(--sd-radio-font-size);font-weight:var(--sd-radio-font-weight);color:var(--sd-radio-label-color);line-height:var(--sd-radio-line-height)}sd-radio .sd-radio:hover:not(.sd-radio--disabled) .sd-radio__circle{background:var(--sd-radio-unchecked-bg-hover);border-color:var(--sd-radio-unchecked-border-hover)}sd-radio .sd-radio--checked .sd-radio__circle{border-color:var(--sd-radio-checked-border)}sd-radio .sd-radio--checked .sd-radio__circle::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:var(--sd-radio-dot-size);height:var(--sd-radio-dot-size);border-radius:50%;background:var(--sd-radio-checked-dot)}sd-radio .sd-radio--disabled{cursor:not-allowed}sd-radio .sd-radio--disabled .sd-radio__circle{background:var(--sd-radio-disabled-bg);border-color:var(--sd-radio-disabled-border)}sd-radio .sd-radio--disabled.sd-radio--checked .sd-radio__circle::after{background:var(--sd-radio-disabled-dot)}sd-radio-group{display:inline-block}sd-radio-group .sd-radio-group{display:flex}sd-radio-group .sd-radio-group--vertical{flex-direction:column;gap:8px}sd-radio-group .sd-radio-group--horizontal{flex-direction:row;align-items:center;gap:20px}';const M={paddingX:r.textinput.sm.paddingX,paddingY:r.textinput.sm.paddingY,radius:r.textinput.sm.radius,fontSize:r.textinput.sm.typography.fontSize,lineHeight:r.textinput.sm.typography.lineHeight,fontWeight:r.textinput.sm.typography.fontWeight},S={text:r.textinput.text,bg:r.textinput.bg,border:r.textinput.border,resizer:r.textinput.resizer},L=class{constructor(i){e(this,i),this.input=t(this,"sdUpdate",7),this.focus=t(this,"sdFocus",7),this.blur=t(this,"sdBlur",7)}get host(){return i(this)}value=null;placeholder="입력해 주세요.";disabled=!1;readonly=!1;autoFocus=!1;textareaClass="";textareaStyle={};maxLength;rows;spellcheck=!1;width="";label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;status;focused=!1;hovered=!1;internalValue=null;nativeEl=void 0;formField;name=d();input;focus;blur;valueChanged(e){this.internalValue=e}internalValueChanged(e){e!==this.value&&(this.value=e,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){null!=this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=e=>{this.internalValue=e.target.value};handleFocus=async(e,t)=>{this.focused="focus"===e,"blur"===e?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(t)):this.focus?.emit(t)};render(){return s("sd-field",{key:"1f1a6ed592df92b4aa0aacfbc1ba8926b93b7066",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,readonly:this.readonly,focused:this.focused,hovered:this.hovered,status:this.status,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-textarea-font-size":`${M.fontSize}px`,"--sd-textarea-line-height":`${M.lineHeight}px`,"--sd-textarea-font-weight":M.fontWeight,"--sd-textarea-padding-x":`${M.paddingX}px`,"--sd-textarea-padding-y":`${M.paddingY}px`,"--sd-textarea-radius":`${M.radius}px`,"--sd-textarea-text-color":S.text.default,"--sd-textarea-placeholder-color":S.text.placeholder,"--sd-textarea-disabled-color":S.text.disabled,"--sd-textarea-bg-color":S.bg.default,"--sd-textarea-disabled-bg-color":S.bg.disabled,"--sd-textarea-border-color":S.border.default,"--sd-textarea-resizer-color":S.resizer.color,"--sd-system-size-field-sm-height":"auto","--sd-system-radius-field-sm":`${M.radius}px`}},s("div",{key:"63b4847968e5a1ceb309b7d0950da33927e25244",class:"sd-textarea__content"},s("textarea",{key:"89d81a7792c3b5a4a1bcaa0f7bd73e0b3a0bd192",name:this.name,ref:e=>this.nativeEl=e,class:`sd-textarea__native ${this.textareaClass}`,value:this.internalValue||"",placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readOnly:this.readonly,autofocus:this.autoFocus,maxLength:this.maxLength,rows:this.rows,spellcheck:this.spellcheck,onInput:this.handleInput,onFocus:e=>this.handleFocus("focus",e),onBlur:e=>this.handleFocus("blur",e),style:this.textareaStyle})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}};L.style="sd-textarea{display:inline-flex}sd-textarea .sd-textarea__content{width:100%;display:flex}sd-textarea .sd-textarea__content .sd-textarea__native{width:100%;min-height:100px;border:none;outline:none;background:transparent;padding:var(--sd-textarea-padding-y) var(--sd-textarea-padding-x);font-family:inherit;font-size:var(--sd-textarea-font-size);line-height:var(--sd-textarea-line-height);font-weight:var(--sd-textarea-font-weight);color:var(--sd-textarea-text-color);resize:vertical}sd-textarea .sd-textarea__content .sd-textarea__native::placeholder{color:var(--sd-textarea-placeholder-color)}sd-textarea .sd-textarea__content .sd-textarea__native:disabled{cursor:not-allowed;color:var(--sd-textarea-disabled-color)}sd-textarea .sd-textarea__content .sd-textarea__native[readonly]{color:var(--sd-system-color-field-text-read-only)}";export{o as sd_date_picker,l as sd_date_range_picker,p as sd_file_picker,x as sd_input,F as sd_number_input,$ as sd_radio_group,L as sd_textarea}
|