@sellmate/design-system 1.0.68 → 1.0.69

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.
Files changed (101) hide show
  1. package/dist/cjs/design-system.cjs.js +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/sd-barcode-input.cjs.entry.js +2 -1
  4. package/dist/cjs/sd-button_4.cjs.entry.js +17 -5
  5. package/dist/cjs/sd-date-picker.cjs.entry.js +3 -2
  6. package/dist/cjs/sd-date-range-picker.cjs.entry.js +3 -2
  7. package/dist/cjs/sd-file-picker.cjs.entry.js +2 -1
  8. package/dist/cjs/sd-input_2.cjs.entry.js +3 -2
  9. package/dist/cjs/sd-number-input.cjs.entry.js +4 -3
  10. package/dist/cjs/sd-pagination_2.cjs.entry.js +4 -3
  11. package/dist/cjs/sd-select-group.cjs.entry.js +2 -1
  12. package/dist/cjs/sd-select.cjs.entry.js +2 -1
  13. package/dist/cjs/sd-textarea.cjs.entry.js +2 -1
  14. package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +29 -1
  15. package/dist/collection/components/sd-date-picker/sd-date-picker.js +30 -2
  16. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +30 -2
  17. package/dist/collection/components/sd-field/sd-field.config.js +5 -0
  18. package/dist/collection/components/sd-field/sd-field.css +4 -0
  19. package/dist/collection/components/sd-field/sd-field.js +39 -5
  20. package/dist/collection/components/sd-file-picker/sd-file-picker.js +29 -1
  21. package/dist/collection/components/sd-input/sd-input.js +30 -2
  22. package/dist/collection/components/sd-number-input/sd-number-input.js +31 -3
  23. package/dist/collection/components/sd-select/sd-select.js +29 -1
  24. package/dist/collection/components/sd-select-group/sd-select-group.js +29 -1
  25. package/dist/collection/components/sd-select-v2/sd-select-v2.js +31 -3
  26. package/dist/collection/components/sd-textarea/sd-textarea.js +29 -1
  27. package/dist/components/{p-BPXQ6DXz.js → p-BJshZele.js} +1 -1
  28. package/dist/components/p-CEnwrYaY.js +1 -0
  29. package/dist/components/p-D99-lhhk.js +1 -0
  30. package/dist/components/{p-CEeNVTzW.js → p-DoSEK0_q.js} +1 -1
  31. package/dist/components/p-DukibDDA.js +1 -0
  32. package/dist/components/sd-barcode-input.js +1 -1
  33. package/dist/components/sd-date-picker.js +1 -1
  34. package/dist/components/sd-date-range-picker.js +1 -1
  35. package/dist/components/sd-field.js +1 -1
  36. package/dist/components/sd-file-picker.js +1 -1
  37. package/dist/components/sd-input.js +1 -1
  38. package/dist/components/sd-number-input.js +1 -1
  39. package/dist/components/sd-select-dropdown.js +1 -1
  40. package/dist/components/sd-select-group.js +1 -1
  41. package/dist/components/sd-select-multiple-group.js +1 -1
  42. package/dist/components/sd-select-multiple.js +1 -1
  43. package/dist/components/sd-select-search-input.js +1 -1
  44. package/dist/components/sd-select-v2.js +1 -1
  45. package/dist/components/sd-select.js +1 -1
  46. package/dist/components/sd-table.js +1 -1
  47. package/dist/components/sd-textarea.js +1 -1
  48. package/dist/design-system/design-system.esm.js +1 -1
  49. package/dist/design-system/p-06080355.entry.js +1 -0
  50. package/dist/design-system/p-1389a68e.entry.js +1 -0
  51. package/dist/design-system/p-5442b4b4.entry.js +1 -0
  52. package/dist/design-system/p-609b3748.entry.js +1 -0
  53. package/dist/design-system/p-71897864.entry.js +1 -0
  54. package/dist/design-system/p-731429da.entry.js +1 -0
  55. package/dist/design-system/p-9dd7befe.entry.js +1 -0
  56. package/dist/design-system/{p-ebc72b3f.entry.js → p-a7ef7465.entry.js} +1 -1
  57. package/dist/design-system/p-ac9f7551.entry.js +1 -0
  58. package/dist/design-system/p-b3d959b0.entry.js +1 -0
  59. package/dist/design-system/p-d668fd71.entry.js +1 -0
  60. package/dist/esm/design-system.js +1 -1
  61. package/dist/esm/loader.js +1 -1
  62. package/dist/esm/sd-barcode-input.entry.js +2 -1
  63. package/dist/esm/sd-button_4.entry.js +17 -5
  64. package/dist/esm/sd-date-picker.entry.js +3 -2
  65. package/dist/esm/sd-date-range-picker.entry.js +3 -2
  66. package/dist/esm/sd-file-picker.entry.js +2 -1
  67. package/dist/esm/sd-input_2.entry.js +3 -2
  68. package/dist/esm/sd-number-input.entry.js +4 -3
  69. package/dist/esm/sd-pagination_2.entry.js +4 -3
  70. package/dist/esm/sd-select-group.entry.js +2 -1
  71. package/dist/esm/sd-select.entry.js +2 -1
  72. package/dist/esm/sd-textarea.entry.js +2 -1
  73. package/dist/types/components/sd-barcode-input/sd-barcode-input.d.ts +2 -0
  74. package/dist/types/components/sd-date-picker/sd-date-picker.d.ts +2 -0
  75. package/dist/types/components/sd-date-range-picker/sd-date-range-picker.d.ts +2 -0
  76. package/dist/types/components/sd-field/sd-field.config.d.ts +2 -0
  77. package/dist/types/components/sd-field/sd-field.d.ts +2 -1
  78. package/dist/types/components/sd-file-picker/sd-file-picker.d.ts +2 -0
  79. package/dist/types/components/sd-input/sd-input.d.ts +2 -0
  80. package/dist/types/components/sd-number-input/sd-number-input.d.ts +2 -0
  81. package/dist/types/components/sd-select/sd-select.d.ts +2 -0
  82. package/dist/types/components/sd-select-group/sd-select-group.d.ts +2 -0
  83. package/dist/types/components/sd-select-v2/sd-select-v2.d.ts +2 -0
  84. package/dist/types/components/sd-textarea/sd-textarea.d.ts +2 -0
  85. package/dist/types/components.d.ts +101 -2
  86. package/hydrate/index.js +55 -22
  87. package/hydrate/index.mjs +55 -22
  88. package/package.json +1 -1
  89. package/dist/components/p-DQLyH3dr.js +0 -1
  90. package/dist/components/p-DWW5xr6r.js +0 -1
  91. package/dist/components/p-N_EbEY8s.js +0 -1
  92. package/dist/design-system/p-07736d67.entry.js +0 -1
  93. package/dist/design-system/p-0c98676e.entry.js +0 -1
  94. package/dist/design-system/p-16eae7ae.entry.js +0 -1
  95. package/dist/design-system/p-23ff6bee.entry.js +0 -1
  96. package/dist/design-system/p-2a663b3b.entry.js +0 -1
  97. package/dist/design-system/p-33713805.entry.js +0 -1
  98. package/dist/design-system/p-6ca6dfaf.entry.js +0 -1
  99. package/dist/design-system/p-8281dc36.entry.js +0 -1
  100. package/dist/design-system/p-ca6b4d4a.entry.js +0 -1
  101. package/dist/design-system/p-e1b307ee.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{r as t,c as i,a as s,h as e}from"./p-BGyJgVXm.js";import{n}from"./p-CCwNgVmC.js";import{i as o}from"./p-ByhWX2NK.js";const a=o.textinput.sm,d=o.textinput.md,l={sm:{height:a.height,paddingX:a.paddingX,gap:a.gap,radius:a.radius,fontSize:a.typography.fontSize,lineHeight:a.typography.lineHeight,fontWeight:a.typography.fontWeight},md:{height:d.height,paddingX:d.paddingX,gap:d.gap,radius:d.radius,fontSize:d.typography.fontSize,lineHeight:d.typography.lineHeight,fontWeight:d.typography.fontWeight}},h={text:o.textinput.text,icon:o.textinput.icon},c=class{constructor(s){t(this,s),this.input=i(this,"sdUpdate",7),this.focus=i(this,"sdFocus",7),this.blur=i(this,"sdBlur",7)}get host(){return s(this)}value=null;type="text";size="sm";addonLabel="";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=n();input;focus;blur;valueChanged(t){this.internalValue=t}internalValueChanged(t){t!==this.value&&(this.value=t,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{this.internalValue=t.target.value};handleFocus=async(t,i)=>{this.focused="focus"===t,"blur"===t?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(i)):this.focus?.emit(i)};render(){const t=l[this.size]??l.sm;return e("sd-field",{key:"ed32da716dabccac9c67061086a3eb821f49afd5",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,status:this.status,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:t=>this.formField=t,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-input-font-size":`${t.fontSize}px`,"--sd-input-line-height":`${t.lineHeight}px`,"--sd-input-font-weight":t.fontWeight,"--sd-input-padding-x":`${t.paddingX}px`,"--sd-input-gap":`${t.gap}px`,"--sd-input-text-color":h.text.default,"--sd-input-placeholder-color":h.text.placeholder,"--sd-input-disabled-color":h.text.disabled,"--sd-input-icon-color":h.icon.default,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`}},e("label",{key:"c8297e261baee31b8508e0912004edd7fe85f115",class:"sd-input__content"},e("slot",{key:"615b28bb1f239a1ead1cad888edde9b59358837b",name:"prefix"}),e("input",{key:"d1231386b264dbb8b38bf920c48c59474417a492",name:this.name,ref:t=>this.nativeEl=t,class:`sd-input__native ${this.inputClass}`,type:"password"===this.type&&this.passwordVisible?"text":this.type,value:this.internalValue||"",placeholder:this.placeholder,disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,autocomplete:this.autocomplete||void 0,maxlength:this.maxlength,minlength:this.minlength,inputmode:this.inputmode,enterkeyhint:this.enterkeyhint,spellcheck:this.spellcheck,onInput:this.handleInput,onFocus:t=>this.handleFocus("focus",t),onBlur:t=>this.handleFocus("blur",t),style:this.inputStyle}),e("slot",{key:"97f7c084a17674d52c43255b334ddeb61cf743ad",name:"suffix"}),this.clearable&&this.internalValue&&!this.disabled&&e("sd-ghost-button",{key:"f35a0872ac6f44e41716b0bf9f93f7a000445bf6",icon:"close",ariaLabel:"clear",size:"xxs",disabled:this.disabled,class:"sd-input__clear-icon",onClick:async()=>{this.disabled||(this.internalValue="",await(this.formField?.sdValidate()))}}),"password"===this.type&&e("sd-ghost-button",{key:"0fdf74595057997c7d2f5f0f3ba6b75c340c2965",icon:this.passwordVisible?"visibilityOn":"visibilityOff",ariaLabel:"visibility",size:"xxs",disabled:this.disabled,class:"sd-input__password-icon",onClick:()=>{this.disabled||(this.passwordVisible=!this.passwordVisible)}})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}};c.style="sd-icon{display:inline-block;line-height:0}sd-icon .sd-icon--rotate-90{transform:rotate(90deg)}sd-icon .sd-icon--rotate-180{transform:rotate(180deg)}sd-icon .sd-icon--rotate-270{transform:rotate(270deg)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #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-input-disabled-color)}sd-input .sd-input__content .sd-input__native::placeholder{color:var(--sd-input-placeholder-color)}sd-input .sd-input__content .sd-input__clear-icon,sd-input .sd-input__content .sd-input__password-icon{flex-shrink:0}sd-input .sd-input__content .sd-input__native[disabled]~.sd-input__clear-icon,sd-input .sd-input__content .sd-input__native[disabled]~.sd-input__password-icon{cursor:not-allowed;pointer-events:none}";const r=class{constructor(s){t(this,s),this.searchInput=i(this,"sdSearchInput",7),this.searchFocus=i(this,"sdSearchFocus",7)}isScrolled=!1;searchText="";searchInput;searchFocus;searchRef;async sdGetNativeElement(){return this.searchRef?this.searchRef.sdGetNativeElement():null}async sdSearchInputFocus(){const t=await this.sdGetNativeElement();t?.focus({preventScroll:!0})}render(){return e("div",{key:"2629fd8c13f67bc89c3b66f5f8aa14f2fb2e5fcd",class:{"sd-select-search-input":!0,"sd-select-search-input--scrolled":!!this.isScrolled},onClick:t=>t.stopPropagation()},e("sd-input",{key:"f49cccdb49d0b2b861b0836dd654b7ab353b48ce",ref:t=>this.searchRef=t,value:this.searchText,placeholder:"검색",clearable:!0,inputStyle:{"padding-left":"8px"},autofocus:!0,onSdUpdate:t=>{this.searchInput.emit(String(t?.detail))},onSdFocus:()=>{this.searchFocus.emit()},onKeyDown:t=>{"Enter"===t.code&&t.stopPropagation()}},e("sd-icon",{key:"773f5638821c73c20435f747c3dea5b6684b89eb",name:"search",size:16,color:"#737373",style:{marginRight:"4px"},slot:"prefix"})))}};r.style="sd-select-search-input{position:sticky;top:0;display:flex;width:100%;background-color:white;align-items:center}sd-select-search-input .sd-select-search-input{position:sticky;top:0;display:flex;width:100%;background-color:white;align-items:center;padding:4px 8px}sd-select-search-input .sd-select-search-input sd-input{width:100%}sd-select-search-input .sd-select-search-input--scrolled{box-shadow:2px 2px 8px 2px rgba(0, 0, 0, 0.2)}";export{c as sd_input,r as sd_select_search_input}
@@ -1 +0,0 @@
1
- import{r as e,c as s,a as t,h as i}from"./p-BGyJgVXm.js";import{n as a}from"./p-CCwNgVmC.js";import{D as d,a as h}from"./p-bYCOh35g.js";const r=class{constructor(t){e(this,t),this.update=s(this,"sdUpdate",7),this.viewChange=s(this,"sdViewChange",7)}static CLOSE_ANIMATION_DURATION=150;get el(){return t(this)}value=null;size="sm";placeholder="YYYY-MM-DD";selectable;disabled=!1;width="";label="";labelWidth="";addonLabel="";hint="";errorMessage="";fieldName="";rules=[];error=!1;icon=void 0;labelTooltip="";labelTooltipProps=null;isOpen=!1;isAnimatingOut=!1;focused=!1;hovered=!1;update;viewChange;triggerRef;formField;closeAnimationTimer;internalName=a();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}),r.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 s=this.value;requestAnimationFrame((()=>{this.update.emit(s)}))};handleViewChange=e=>{this.viewChange.emit(e.detail)};disconnectedCallback(){this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e=h[this.size]??h.md;return i("sd-field",{key:"1a84754cdc67bd6603e1fb48479f9d3ac6424d6a",name:this.fieldName||this.internalName,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,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":d.border.default,"--sd-system-color-field-border-focus":d.border.focus,"--sd-system-color-field-bg-default":d.bg.default}},i("div",{key:"e4d8e05b04ac7bd4f2f96809b33d67125fe7c6d8",class:"sd-date-picker",ref:e=>{this.triggerRef=e}},i("sd-date-picker-trigger",{key:"244924af2c3ea207b2a90c5aef5064755da3ae52",displayText:this.value??"",placeholder:this.placeholder,disabled:this.disabled,size:this.size,onSdTriggerClick:this.handleTriggerClick})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"f3d882d3450f629b6ed501b984d89ffd9633531f",open:this.isOpen,parentRef:this.triggerRef,onSdClose:()=>this.closeDropdown()},i("sd-date-picker-calendar",{key:"a0f47851a27dd777f77da40f3258638a0fbc37a5",value:this.value,selectable:this.selectable,onSdSelect:this.handleSelect,onSdViewChange:this.handleViewChange})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}};r.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%}";export{r as sd_date_picker}
@@ -1 +0,0 @@
1
- import{r as e,c as s,a as t,h as i}from"./p-BGyJgVXm.js";import{B as o}from"./p-CRdYeSBK.js";import{S as l}from"./p-Cy6HMEsK.js";import{n}from"./p-CCwNgVmC.js";const r=class extends o{constructor(t){super(),e(this,t),this.update=s(this,"sdUpdate",7),this.dropDownShow=s(this,"sdDropDownShow",7)}get el(){return t(this)}value=null;options=[];placeholder="선택";optionPlaceholder="선택지가 없습니다.";width="200px";dropdownHeight="260px";autoFocus=!1;disabled=!1;clearable=!1;searchable=!1;label="";labelWidth="";addonLabel="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;optionRenderer;isOpen=!1;itemIndex=-1;isScrolled=!1;update;dropDownShow;selectRef;triggerRef;formField;filteredOptions=[];dropDownWidth="200px";name=n();async sdOpen(){this.isOpen=!0}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async isOpenChanged(){this.onDropdownToggle(this.isOpen),this.dropDownShow?.emit({isOpen:this.isOpen}),!1===this.isOpen&&await(this.formField?.sdValidate())}componentWillLoad(){this.filteredOptions=this.options,this.dropDownWidth=this.width,this.initializeEvent()}componentDidLoad(){this.autoFocus&&this.selectRef?.focus()}componentDidRender(){const e=this.triggerRef,s=e?.getBoundingClientRect();this.dropDownWidth=s?.width?`${s.width}px`:this.width}disconnectedCallback(){this.cleanupEvent()}handleDocumentClick(e){this.selectRef?.contains(e.target)||(this.isOpen=!1)}handleDocumentKeydown(e){if(e.stopPropagation(),["ArrowDown","ArrowUp","Enter","Escape"].includes(e.key))switch(e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":const s=new l(this.searchable,this.filteredOptions).getNextIndex(this.itemIndex,e.key);this.itemIndex=s;break;case"Enter":const t=this.filteredOptions[this.itemIndex];t&&!t.disabled&&(this.value=t.value,this.isOpen=!1);break;case"Escape":this.isOpen=!1}}getSelectedOption(){return this.options.find((e=>e.value===this.value))}closeDropdown(){this.isOpen=!1}handleTriggerClick=e=>{e.stopPropagation(),this.disabled||(this.isOpen=!this.isOpen,this.dropDownShow?.emit({isOpen:this.isOpen}))};handleOptionClick=e=>{const{option:s,event:t}=e;if(t.stopPropagation(),!s.disabled){this.value=s.value,this.isOpen=!1;const e=this.getSelectedOption();this.update?.emit({value:e?.value||null,option:e||null})}};render(){return i("sd-field",{key:"106b7af5473549884afba275dfa86f6b354e9983",label:this.label,labelWidth:this.labelWidth,name:this.name,rules:this.rules,error:this.error,disabled:this.disabled,icon:this.icon,addonLabel:this.addonLabel,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e},i("div",{key:"a200ea9e7409ed3f63e6ffa967c3171712598521",class:{"sd-select":!0,"sd-select--disabled":this.disabled,"sd-select--error":!!this.error,"sd-select--label":!!this.label},ref:e=>this.selectRef=e},this.renderTrigger(),this.renderDropdown()))}renderTrigger(){const e=this.getSelectedOption();return i("div",{class:"sd-select__trigger",tabindex:this.disabled?-1:0,onClick:this.handleTriggerClick,ref:e=>this.triggerRef=e},i("span",{class:"sd-select__value"},e?e.label:this.placeholder),this.clearable&&e&&!this.disabled&&i("sd-icon",{key:"clear-icon",name:"close",size:10,color:"#888",class:"sd-select__clear",onClick:async e=>{e.stopPropagation(),this.value=null,await(this.formField?.sdValidate())}}),i("sd-icon",{key:"arrow-icon",name:"arrowDown",color:"#888",class:{"sd-select__arrow":!0,"sd-select__arrow--open":this.isOpen}}))}renderDropdown(){if(!1===this.isOpen)return null;const e=this.selectRef?.querySelector(".sd-select__trigger")||this.selectRef;return i("sd-portal",{open:this.isOpen,parentRef:e,onSdClose:this.closeDropdown},i("sd-select-dropdown",{value:this.value,options:this.options,itemIndex:this.itemIndex,width:this.dropDownWidth,dropdownHeight:this.dropdownHeight,searchable:this.searchable,optionPlaceholder:this.optionPlaceholder,onSdOptionClick:({detail:e})=>this.handleOptionClick(e),onSdOptionFiltered:({detail:e})=>this.filteredOptions=e}))}static get watchers(){return{isOpen:[{isOpenChanged:0}]}}};r.style="sd-select{display:inline-flex;flex-flow:column nowrap;height:fit-content}sd-select *:focus,sd-select *:focus-visible,sd-select *:focus-within{outline:none !important}sd-select .sd-select{width:100%}sd-select .sd-select .sd-select__trigger{padding:4px 28px 4px 12px;display:flex;width:100%;height:100%;align-items:center;cursor:pointer}.sd-field--disabled sd-select .sd-select .sd-select__trigger{cursor:not-allowed}sd-select .sd-select .sd-select__trigger .sd-select__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400;text-align:left}sd-select .sd-select .sd-select__trigger .sd-select__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}sd-select .sd-select .sd-select__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease;margin-left:8px}sd-select .sd-select .sd-select__arrow--open{transform:rotate(180deg)}";export{r as sd_select}
@@ -1 +0,0 @@
1
- import{r as e,c as t,a,h as s}from"./p-BGyJgVXm.js";import{n as i}from"./p-CCwNgVmC.js";import{i as r}from"./p-ByhWX2NK.js";const d={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},l={text:r.textinput.text,bg:r.textinput.bg,border:r.textinput.border,resizer:r.textinput.resizer},o=class{constructor(a){e(this,a),this.input=t(this,"sdUpdate",7),this.focus=t(this,"sdFocus",7),this.blur=t(this,"sdBlur",7)}get host(){return a(this)}value=null;placeholder="입력해 주세요.";disabled=!1;readonly=!1;autoFocus=!1;textareaClass="";textareaStyle={};maxLength;rows;spellcheck=!1;width="";label="";labelWidth="";addonLabel="";hint="";errorMessage="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;status;focused=!1;hovered=!1;internalValue=null;nativeEl=void 0;formField;name=i();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:"4c93d887429d6790d2d49c951be64e4be1496fd4",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,status:this.status,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-textarea-font-size":`${d.fontSize}px`,"--sd-textarea-line-height":`${d.lineHeight}px`,"--sd-textarea-font-weight":d.fontWeight,"--sd-textarea-padding-x":`${d.paddingX}px`,"--sd-textarea-padding-y":`${d.paddingY}px`,"--sd-textarea-radius":`${d.radius}px`,"--sd-textarea-text-color":l.text.default,"--sd-textarea-placeholder-color":l.text.placeholder,"--sd-textarea-disabled-color":l.text.disabled,"--sd-textarea-bg-color":l.bg.default,"--sd-textarea-disabled-bg-color":l.bg.disabled,"--sd-textarea-border-color":l.border.default,"--sd-textarea-resizer-color":l.resizer.color,"--sd-system-size-field-sm-height":"auto","--sd-system-radius-field-sm":`${d.radius}px`}},s("div",{key:"b64aa1b2f02c1f68db57e5e36e0a7146257629e1",class:"sd-textarea__content"},s("textarea",{key:"b2baff1d99b9c2347f0b0bb751fc51268d2c48c7",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}]}}};o.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)}";export{o as sd_textarea}
@@ -1 +0,0 @@
1
- import{r as t,c as e,a as s,h as i,F as o}from"./p-BGyJgVXm.js";import{n as r}from"./p-CCwNgVmC.js";import{B as n}from"./p-CRdYeSBK.js";import{S as l}from"./p-Cy6HMEsK.js";const h=class extends n{constructor(s){super(),t(this,s),this.update=e(this,"sdUpdate",7),this.dropDownShow=e(this,"sdDropDownShow",7)}get el(){return s(this)}value=null;options=[];placeholder="선택";optionPlaceholder="선택지가 없습니다.";width="200px";dropdownHeight="260px";autoFocus=!1;disabled=!1;clearable=!1;searchable=!1;label="";labelWidth="";addonLabel="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;containerStyle={};triggerStyle={};dropdownStyle={};optionStyle={};labelStyle={};optionRenderer;filteredOptions=[];isOpen=!1;searchText=null;itemIndex=-1;isScrolled=!1;isDropdownReady=!1;update;dropDownShow;selectRef;searchRef;triggerRef;optionRef;dropdownRef;formField;dropDownWidth="200px";name=r();async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.isOpen=!0}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}optionsChanged(){this.filteredOptions=this.options,this.filterOptions()}searchTextChanged(){this.filterOptions()}async itemIndexChanged(t,e){if(this.searchable){const t=await this.getNativeInputElement();if(-1===this.itemIndex)return void t?.focus({preventScroll:!0});t?.matches(":focus")&&t?.blur()}const s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option-group")||[]),i=s?.[this.itemIndex];i&&this.isOpen&&(this.optionRef=i,await this.optionRef.isDisabled()?t>e?this.itemIndex++:this.itemIndex--:this.scrollToOption(i))}async isOpenChanged(){this.onDropdownToggle(this.isOpen),this.dropDownShow?.emit({isOpen:this.isOpen}),this.isDropdownReady=!1,!1!==this.isOpen?requestAnimationFrame((()=>{requestAnimationFrame((async()=>{const t=this.getSelectedOption();if(t){const e=this.filteredOptions.indexOf(t),s=Array.from(this.dropdownRef?.querySelectorAll("sd-select-option-group")||[]),i=Math.min(e+4,s.length-1),o=s?.[i];o&&this.scrollToOption(o)}if(this.isDropdownReady=!0,this.searchable){const t=await this.getNativeInputElement();t&&requestAnimationFrame((()=>{t.focus({preventScroll:!0})}))}}))})):await(this.formField?.sdValidate())}componentWillLoad(){this.filteredOptions=this.options,this.dropDownWidth=this.width,this.initializeEvent()}componentDidLoad(){this.autoFocus&&this.selectRef?.focus()}componentDidRender(){const t=this.triggerRef,e=t?.getBoundingClientRect();this.dropDownWidth=e?.width?`${e.width}px`:this.width}disconnectedCallback(){this.cleanupEvent()}handleDocumentClick(t){this.selectRef?.contains(t.target)||(this.isOpen=!1)}handleDocumentKeydown(t){if(t.stopPropagation(),["ArrowDown","ArrowUp","Enter","Escape"].includes(t.key))switch(t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":const e=new l(this.searchable,this.filteredOptions).getNextIndex(this.itemIndex,t.key);this.itemIndex=e;break;case"Enter":const s=this.filteredOptions[this.itemIndex];s&&!s.disabled&&"item"===s.type&&this.handleOptionSelection(s);break;case"Escape":this.isOpen=!1}}handleTriggerClick=t=>{t.stopPropagation(),this.disabled||(this.isOpen=!this.isOpen,this.dropDownShow?.emit({isOpen:this.isOpen}))};handleOptionClick=t=>{const{option:e,event:s}=t;s.stopPropagation(),"item"===e.type&&this.handleOptionSelection(e)};filterOptions(){if(!this.searchText||""===this.searchText.trim())return void(this.filteredOptions=this.options);const t=this.searchText.toLowerCase(),e=new Set;this.options.forEach((s=>{s.label.toLowerCase().includes(t)&&(e.add(s),this.addParentGroups(s,e))})),this.filteredOptions=this.options.filter((t=>e.has(t)))}addParentGroups(t,e){if(!t.parent)return;const s=this.options.find((e=>e.value===t.parent));s&&!e.has(s)&&(e.add(s),this.addParentGroups(s,e))}getSelectedOption(){return this.options.find((t=>t.value===this.value))}handleDropdownScroll=t=>{this.isScrolled=t.target.scrollTop>0};async getNativeInputElement(){return this.searchRef?this.searchRef.sdGetNativeElement():null}handleOptionSelection=t=>{if(!t||t.disabled)return;this.value=t.value,this.isOpen=!1;const e=this.getSelectedOption();this.update?.emit({value:e?.value||null,option:e||null})};closeDropdown(){this.isOpen=!1}async scrollToOption(t){this.dropdownRef&&t&&requestAnimationFrame((()=>{const e=this.dropdownRef,s=t.offsetTop,i=t.offsetHeight,o=e.scrollTop,r=e.clientHeight,n=e.querySelector(".sd-select-group__search-container"),l=n?n.offsetHeight:0,h=r-l,d=o+r;s<o+l?e.scrollTo({top:s-l,behavior:"instant"}):s+i>d&&e.scrollTo({top:s+i-h-l,behavior:"instant"})}))}render(){return i("sd-field",{key:"c3d2a4365ba2594d3e0dca138ff63a335171125c",label:this.label,labelWidth:this.labelWidth,name:this.name,rules:this.rules,error:this.error,disabled:this.disabled,icon:this.icon,addonLabel:this.addonLabel,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:t=>this.formField=t,style:{"--field-width":this.width||"200px"}},i("div",{key:"b527250fecc69b8f5d4c88aa3f6090c2b291efc9",class:{"sd-select-group":!0,"sd-select-group--open":this.isOpen,"sd-select-group--disabled":this.disabled,"sd-select-group--label":!!this.label},ref:t=>this.selectRef=t},this.renderTrigger(),this.renderDropdown()))}renderTrigger(){const t=this.getSelectedOption();return i("div",{class:"sd-select-group__trigger",tabindex:this.disabled?-1:0,onClick:this.handleTriggerClick,style:this.triggerStyle,ref:t=>this.triggerRef=t},i("span",{class:"sd-select-group__value"},t?t.label:this.placeholder),this.clearable&&t&&!this.disabled&&i("sd-icon",{key:"close-icon",name:"close",size:10,color:"grey_65",class:"sd-select-group__clear",onClick:async t=>{t.stopPropagation(),this.value=null,this.update?.emit({value:null,option:null}),await(this.formField?.sdValidate())}}),i("sd-icon",{key:"arrow-icon",name:"arrowDown",color:"grey_65",class:{"sd-select-group__arrow":!0,"sd-select-group__arrow--open":this.isOpen}}))}renderDropdown(){return!1===this.isOpen?null:i("sd-portal",{open:this.isOpen,parentRef:this.selectRef,onSdClose:this.closeDropdown},i("div",{style:{width:"0",height:"0",overflow:"visible"}},i("div",{class:{"sd-select-group__dropdown":!0,"sd-select-group__dropdown--ready":this.isDropdownReady},style:{"--select-width":this.dropDownWidth||"200px","--select-dropdown-height":this.dropdownHeight||"260px",...this.dropdownStyle},onScroll:this.handleDropdownScroll,ref:t=>this.dropdownRef=t},this.searchable&&i("sd-select-search-input",{ref:t=>this.searchRef=t,isScrolled:this.isScrolled,searchText:this.searchText,onSdSearchInput:t=>this.searchText=t.detail||"",onSdSearchFocus:()=>this.itemIndex=-1}),this.filteredOptions.length>0?i(o,null,this.filteredOptions.map(((t,e)=>i("slot",{name:`option-${t.value}`},i("sd-select-option-group",{option:t,index:e,isSelected:"item"===t.type&&t.value===this.value,isFocused:e===this.itemIndex,optionStyle:this.optionStyle,onOptionClick:({detail:e})=>{"item"===t.type&&this.handleOptionClick(e)},useCheckbox:!1,useIndicator:!1}))))):i("slot",{name:"option-placeholder"},i("div",{class:"sd-select-group__option-placeholder",style:this.optionStyle},this.optionPlaceholder)))))}static get watchers(){return{options:[{optionsChanged:0}],searchText:[{searchTextChanged:0}],itemIndex:[{itemIndexChanged:0}],isOpen:[{isOpenChanged:0}]}}};h.style=".sd-select-group__dropdown .sd-select-group__option-placeholder{height:48px;display:flex;align-items:center;padding:8px 16px;font-size:12px;line-height:0;text-align:left;color:#888888}sd-select-group{display:inline-flex;flex-flow:column nowrap;width:fit-content;height:fit-content}sd-select-group:focus,sd-select-group:focus-visible,sd-select-group:focus-within{outline:none !important}sd-select-group .sd-select-group{width:100%}sd-select-group .sd-select-group .sd-select-group__trigger{padding:4px 28px 4px 12px;display:flex;width:100%;height:100%;align-items:center;cursor:pointer}.sd-field--disabled sd-select-group .sd-select-group .sd-select-group__trigger{cursor:not-allowed}sd-select-group .sd-select-group .sd-select-group__trigger .sd-select-group__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400;text-align:left}sd-select-group .sd-select-group .sd-select-group__trigger .sd-select-group__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}sd-select-group .sd-select-group .sd-select-group__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease}sd-select-group .sd-select-group .sd-select-group__arrow--open{transform:rotate(180deg)}.sd-select-group__dropdown{overflow:auto;width:var(--select-width, 200px);max-height:var(--select-dropdown-height, 260px);padding-bottom:2px;background-color:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);border-radius:4px;overflow-y:auto;color:#333333;opacity:0.5;transition:opacity 0.15s ease-in}.sd-select-group__dropdown--ready{opacity:1}";export{h as sd_select_group}
@@ -1 +0,0 @@
1
- import{r as t,c as e,a as i,h as s}from"./p-BGyJgVXm.js";import{n}from"./p-CCwNgVmC.js";var r={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:"16",lineHeight:"26"}},contents:{gap:"4"},border:{default:"#AAAAAA",focus:"#0075FF",danger:"#FB4444"},bg:{default:"#FFFFFF"},text:{default:"#222222",placeholder:"#AAAAAA",disabled:"#888888"},hint:{color:"#555555",typography:{fontSize:"12",lineHeight:"20"}},errorMessage:{color:"#E30000",typography:{fontSize:"12",lineHeight:"20"}},stepper:{sm:{size:"20"},md:{size:"24"},radius:"4",bg:{default:"#EFF6FF",disabled:"#EEEEEE"},icon:{default:"#0075FF",disabled:"#BBBBBB"}}}};const d=r.numberInput.sm,u=r.numberInput.md,a={sm:{height:d.height,paddingX:d.paddingX,radius:d.radius,fontSize:d.typography.fontSize,lineHeight:d.typography.lineHeight,fontWeight:d.typography.fontWeight},md:{height:u.height,paddingX:u.paddingX,radius:u.radius,fontSize:u.typography.fontSize,lineHeight:u.typography.lineHeight,fontWeight:u.typography.fontWeight}},h={border:r.numberInput.border,bg:r.numberInput.bg,text:r.numberInput.text},o={sm:{size:r.numberInput.stepper.sm.size},md:{size:r.numberInput.stepper.md.size},radius:r.numberInput.stepper.radius,bg:r.numberInput.stepper.bg,icon:r.numberInput.stepper.icon},l=r.numberInput.hint,p=r.numberInput.errorMessage,b=r.numberInput.contents.gap,c=class{constructor(i){t(this,i),this.update=e(this,"sdUpdate",7),this.focus=e(this,"sdFocus",7),this.blur=e(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="";addonLabel="";placeholder="입력해 주세요.";disabled=!1;width;rules=[];autoFocus=!1;status;hint="";errorMessage="";inputPrefix="";inputSuffix="";inputClass="";readonly=!1;inputStyle={};error=!1;focused=!1;hovered=!1;internalValue=null;displayValue="";nativeEl=void 0;formField;name=n();update;focus;blur;toNumber(t){if(null==t||""===t)return null;if("number"==typeof t)return isNaN(t)?null:t;if("string"==typeof t)return this.parseInput(t);const e=Number(t);return isNaN(e)?null:e}formatWithCommas(t){if(null==t||isNaN(t))return"";const e=t<0,i=Math.abs(t),[s,n]=i.toString().split("."),r=(+s).toLocaleString(),d=e?"-"+r:r;return n?d+"."+n:String(d)}parseInput(t){if(!t||""===t.trim())return null;const e=t.replace(/,/g,"").trim();if(!/^-?(\d+\.?\d*|\d*\.\d+)$/.test(e))return null;const i=parseFloat(e);return isNaN(i)||!this.useDecimal&&e.includes(".")?null:i}clampMinMax(t){return isNaN(t)?0:Math.min(Math.max(t,this.min),this.max)}updateDisplay(){this.displayValue=this.formatWithCommas(this.internalValue)}isIncrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue>=this.max}isDecrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue<=this.min}valueChanged(t){const e=this.toNumber(t);this.internalValue=null!==e?this.clampMinMax(e):null,this.updateDisplay()}internalValueChanged(t){this.updateDisplay(),t!==this.value&&(this.value=t,this.update?.emit(t))}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async sdGetNativeElement(){return this.nativeEl||null}componentWillLoad(){const t=this.toNumber(this.value);null!==t&&(this.internalValue=this.clampMinMax(t)),this.updateDisplay()}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{const e=t.target,i=e.value;if(""===i)return this.internalValue=null,void(this.displayValue="");const s=i.replace(/,/g,""),n=(s.match(/\./g)||[]).length;if(n>1)return void(e.value=this.displayValue);if("-"===s||"."===s||"-."===s)return void(e.value=s);if(s.endsWith(".")&&1===n){const t=s.slice(0,-1),i=this.parseInput(t);if(null!==i){const t=this.formatWithCommas(i);return void(e.value=t+".")}}const r=this.parseInput(s);if(null!==r){if(r<this.min)return void(e.value=this.displayValue);if(r>this.max)return void(e.value=this.displayValue);this.internalValue=r,this.displayValue=this.formatWithCommas(r),e.value=this.displayValue}else e.value=this.displayValue};handleFocus=t=>{this.focused=!0,this.focus?.emit(t)};handleBlur=async t=>{this.updateDisplay(),this.nativeEl&&(this.nativeEl.value=this.displayValue),this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.focused=!1,this.blur?.emit(t)};handleKeyDown=t=>{"ArrowUp"===t.key?(t.preventDefault(),this.handleIncrement()):"ArrowDown"===t.key&&(t.preventDefault(),this.handleDecrement())};handleIncrement=()=>{if(this.isIncrementDisabled())return;const t=this.internalValue??this.min??0;let e=t+this.step;e>this.max&&(e=this.max),e!==t&&(this.internalValue=e)};handleDecrement=()=>{if(this.isDecrementDisabled())return;const t=this.internalValue??this.min??0;let e=t-this.step;e<this.min&&(e=this.min),e!==t&&(this.internalValue=e)};render(){const t=a[this.size]??a.sm,e="md"===this.size?14:12;return s("sd-field",{key:"edb2eaf473ba53fa340e39a350624e0a9e8b566e",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,status:this.status,size:this.size,ref:t=>this.formField=t,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-number-input-font-size":`${t.fontSize}px`,"--sd-number-input-line-height":`${t.lineHeight}px`,"--sd-number-input-font-weight":t.fontWeight,"--sd-number-input-padding-x":`${t.paddingX}px`,"--sd-number-input-text-color":h.text.default,"--sd-number-input-placeholder-color":h.text.placeholder,"--sd-number-input-disabled-color":h.text.disabled,"--sd-number-input-stepper-size":`${o[this.size]?.size??o.sm.size}px`,"--sd-number-input-stepper-radius":`${o.radius}px`,"--sd-number-input-stepper-bg":o.bg.default,"--sd-number-input-stepper-bg-disabled":o.bg.disabled,"--sd-number-input-stepper-icon-color":o.icon.default,"--sd-number-input-stepper-icon-disabled":o.icon.disabled,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`,"--sd-system-color-field-border-default":h.border.default,"--sd-system-color-field-border-focus":h.border.focus,"--sd-system-color-field-border-danger":h.border.danger,"--sd-system-color-field-bg-default":h.bg.default,"--sd-textinput-input-text-error-message":p.color,"--sd-textinput-input-error-message-typography-font-size":`${p.typography.fontSize}px`,"--sd-textinput-input-error-message-typography-line-height":`${p.typography.lineHeight}px`,"--sd-textinput-input-text-hint":l.color,"--sd-textinput-input-hint-typography-font-size":`${l.typography.fontSize}px`,"--sd-textinput-input-hint-typography-line-height":`${l.typography.lineHeight}px`,"--sd-textinput-input-contents-gap":`${b}px`}},s("div",{key:"408b984ca5c7f3edaf0afe4c56fab2901824b2de",class:"sd-number-input__content"},this.useButton&&s("button",{key:"da29f621914cbb7cac4c83f55056f52ef918f7c7",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--decrement",disabled:this.isDecrementDisabled(),onClick:this.handleDecrement,tabindex:-1},s("sd-icon",{key:"a60c99bd949c2791608d269bc478b490dd4335e0",name:"minus",size:e,color:this.isDecrementDisabled()?o.icon.disabled:o.icon.default})),this.inputPrefix&&s("span",{key:"3eae6cb2d277f3f830f7cb122b72cdcdedf57e10",class:"sd-number-input__prefix"},this.inputPrefix),s("input",{key:"19e42ab159a9df7721ca6ea5505d3a0aca2517c4",name:this.name,ref:t=>this.nativeEl=t,class:`sd-number-input__native ${this.inputClass}`,type:"text",inputMode:"numeric",value:this.displayValue,placeholder:this.placeholder,disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,style:{textAlign:this.useButton?"center":"right",...this.inputStyle}}),this.inputSuffix&&s("span",{key:"5f9dc1e294a081cede120d9466d70910a9b1d6bb",class:"sd-number-input__suffix"},this.inputSuffix),this.useButton&&s("button",{key:"50d96dd2556071480b17210b8db307ab4082c92b",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--increment",disabled:this.isIncrementDisabled(),onClick:this.handleIncrement,tabindex:-1},s("sd-icon",{key:"1821a77886ac9dc169c8e2697282e813a334df35",name:"add",size:e,color:this.isIncrementDisabled()?o.icon.disabled:o.icon.default}))))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}};c.style="sd-number-input{display:inline-flex}sd-number-input .sd-number-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;color:var(--sd-number-input-text-color);font-size:var(--sd-number-input-font-size);line-height:var(--sd-number-input-line-height);font-weight:var(--sd-number-input-font-weight);padding:0 var(--sd-number-input-padding-x)}sd-number-input .sd-number-input__content .sd-number-input__native{width:100%;height:100%;min-width:0;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;padding-block:0;padding-inline:0}sd-number-input .sd-number-input__content .sd-number-input__native[disabled]{cursor:not-allowed;color:var(--sd-number-input-disabled-color)}sd-number-input .sd-number-input__content .sd-number-input__native::placeholder{color:var(--sd-number-input-placeholder-color)}sd-number-input .sd-number-input__content .sd-number-input__prefix,sd-number-input .sd-number-input__content .sd-number-input__suffix{flex-shrink:0;white-space:nowrap;color:var(--sd-number-input-placeholder-color);font-size:inherit;line-height:inherit}sd-number-input .sd-number-input__content .sd-number-input__stepper{flex-shrink:0;width:var(--sd-number-input-stepper-size);height:var(--sd-number-input-stepper-size);border:none;border-radius:var(--sd-number-input-stepper-radius);background-color:var(--sd-number-input-stepper-bg);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;margin:0;transition:background-color 0.15s ease}sd-number-input .sd-number-input__content .sd-number-input__stepper:hover:not(:disabled){filter:brightness(0.95)}sd-number-input .sd-number-input__content .sd-number-input__stepper:disabled{background-color:var(--sd-number-input-stepper-bg-disabled);cursor:not-allowed}";export{c as sd_number_input}