@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
package/hydrate/index.mjs CHANGED
@@ -5613,6 +5613,7 @@ class SdBarcodeInput {
5613
5613
  value = null;
5614
5614
  size = 'sm';
5615
5615
  addonLabel = '';
5616
+ addonAlign = 'start';
5616
5617
  placeholder = '입력해 주세요.';
5617
5618
  disabled = false;
5618
5619
  clearable = false;
@@ -5708,7 +5709,7 @@ class SdBarcodeInput {
5708
5709
  '--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
5709
5710
  '--sd-system-color-field-bg-default': BARCODE_INPUT_COLORS.bg.barcode,
5710
5711
  };
5711
- return (hAsync("sd-field", { key: '11079233784a85ec20bae4653155a9820d878681', 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: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, hAsync("label", { key: '592fcb675607d57d7372abac967eb1c1a1e27212', class: "sd-barcode-input__content" }, hAsync("slot", { key: 'a035ed3825360f81e669c3ef9099a479bbb69fd0', name: "prefix" }), hAsync("input", { key: '7ffffa2b085050d05d1439cac1c90901144da410', name: this.name, ref: el => (this.nativeEl = el), class: `sd-barcode-input__native ${this.inputClass}`, type: "text", value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.inputStyle }), hAsync("slot", { key: 'cc9a0e5b0b367c5c443bfe132408d834d74c16b3', name: "suffix" }), this.clearable && this.internalValue && (hAsync("sd-ghost-button", { key: 'a5a06ef58a7f38ffbafb56038ff8321e66184da5', icon: "close", ariaLabel: "clear", size: "xxs", disabled: this.disabled, class: "sd-barcode-input__clear-icon", onClick: async () => {
5712
+ return (hAsync("sd-field", { key: '876c4e2cd41e62cd5486b7dec5ca1b34d10704b9', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, hAsync("label", { key: 'e01920c2565e1f4487ccd516f864b9f68fa0cfd8', class: "sd-barcode-input__content" }, hAsync("slot", { key: 'd7be8745d6b0f510a11c88e1ca629f78fbc77348', name: "prefix" }), hAsync("input", { key: 'f214f2930fc54a0466a10ce295e46885352e0e88', name: this.name, ref: el => (this.nativeEl = el), class: `sd-barcode-input__native ${this.inputClass}`, type: "text", value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.inputStyle }), hAsync("slot", { key: 'a226a2c7ec43951ab9f048f8da25542784233e65', name: "suffix" }), this.clearable && this.internalValue && (hAsync("sd-ghost-button", { key: 'ff7f8853b43401f3bf4be051e69d8c459ca418aa', icon: "close", ariaLabel: "clear", size: "xxs", disabled: this.disabled, class: "sd-barcode-input__clear-icon", onClick: async () => {
5712
5713
  if (this.disabled)
5713
5714
  return;
5714
5715
  this.internalValue = '';
@@ -5731,6 +5732,7 @@ class SdBarcodeInput {
5731
5732
  "value": [1032],
5732
5733
  "size": [1],
5733
5734
  "addonLabel": [1, "addon-label"],
5735
+ "addonAlign": [1, "addon-align"],
5734
5736
  "placeholder": [1],
5735
5737
  "disabled": [4],
5736
5738
  "clearable": [4],
@@ -7691,6 +7693,7 @@ class SdDatePicker {
7691
7693
  label = '';
7692
7694
  labelWidth = '';
7693
7695
  addonLabel = '';
7696
+ addonAlign = 'start';
7694
7697
  hint = '';
7695
7698
  errorMessage = '';
7696
7699
  fieldName = '';
@@ -7769,9 +7772,9 @@ class SdDatePicker {
7769
7772
  '--sd-system-color-field-border-focus': DATEPICKER_COLORS.border.focus,
7770
7773
  '--sd-system-color-field-bg-default': DATEPICKER_COLORS.bg.default,
7771
7774
  };
7772
- return (hAsync("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: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, hAsync("div", { key: 'e4d8e05b04ac7bd4f2f96809b33d67125fe7c6d8', class: "sd-date-picker", ref: el => {
7775
+ return (hAsync("sd-field", { key: '1e0bdacf53850916778544e63ce11d5aab06eafc', name: this.fieldName || this.internalName, 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: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, hAsync("div", { key: '63795f75a1b3723c2af166343dce5fd33afd5be2', class: "sd-date-picker", ref: el => {
7773
7776
  this.triggerRef = el;
7774
- } }, hAsync("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) && (hAsync("sd-portal", { key: 'f3d882d3450f629b6ed501b984d89ffd9633531f', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, hAsync("sd-date-picker-calendar", { key: 'a0f47851a27dd777f77da40f3258638a0fbc37a5', value: this.value, selectable: this.selectable, onSdSelect: this.handleSelect, onSdViewChange: this.handleViewChange })))));
7777
+ } }, hAsync("sd-date-picker-trigger", { key: 'adea2cbad36285f546d3c29b66f2c74044427736', displayText: this.value ?? '', placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (hAsync("sd-portal", { key: '4da6ec2a3644201b6579fc2e9838d03ef22b7e57', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, hAsync("sd-date-picker-calendar", { key: '4b7e3757b7232110ec9865346fcd68868ac68081', value: this.value, selectable: this.selectable, onSdSelect: this.handleSelect, onSdViewChange: this.handleViewChange })))));
7775
7778
  }
7776
7779
  static get watchers() { return {
7777
7780
  "isOpen": [{
@@ -7792,6 +7795,7 @@ class SdDatePicker {
7792
7795
  "label": [1],
7793
7796
  "labelWidth": [8, "label-width"],
7794
7797
  "addonLabel": [1, "addon-label"],
7798
+ "addonAlign": [1, "addon-align"],
7795
7799
  "hint": [1],
7796
7800
  "errorMessage": [1, "error-message"],
7797
7801
  "fieldName": [1, "field-name"],
@@ -8072,6 +8076,7 @@ class SdDateRangePicker {
8072
8076
  label = '';
8073
8077
  labelWidth = '';
8074
8078
  addonLabel = '';
8079
+ addonAlign = 'start';
8075
8080
  hint = '';
8076
8081
  errorMessage = '';
8077
8082
  fieldName = '';
@@ -8155,9 +8160,9 @@ class SdDateRangePicker {
8155
8160
  '--sd-system-color-field-border-focus': DATEPICKER_COLORS.border.focus,
8156
8161
  '--sd-system-color-field-bg-default': DATEPICKER_COLORS.bg.default,
8157
8162
  };
8158
- return (hAsync("sd-field", { key: '95ec666c91635d6b6b749d660b4495b7ebe48e6a', 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: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, hAsync("div", { key: '3051fda66e94d51208347ae2053173570d5f1ca9', class: "sd-date-range-picker", ref: el => {
8163
+ return (hAsync("sd-field", { key: '34c4d9ef2ba50f951fc6b6b09215e750ac61cd87', name: this.fieldName || this.internalName, 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: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, hAsync("div", { key: 'c92ab61d144c893077a9c81922ac24eff93314dd', class: "sd-date-range-picker", ref: el => {
8159
8164
  this.triggerRef = el;
8160
- } }, hAsync("sd-date-picker-trigger", { key: '71693b5a4cec562169d9427a4e19aed4d8b19a45', displayText: this.displayText, placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (hAsync("sd-portal", { key: '75b9f1c1ebdabcd1c1a33cad51189ba132274bb1', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, hAsync("sd-date-range-picker-calendar", { key: 'f158eead4f44bc452bf102b3324721df84fc3b0c', value: this.value, selectable: this.selectable, maxRange: this.maxRange, onSdSelect: this.handleSelect, onSdViewChange: this.handleViewChange })))));
8165
+ } }, hAsync("sd-date-picker-trigger", { key: '487b8a1af6e8dee063d70ffc030c314037741d74', displayText: this.displayText, placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (hAsync("sd-portal", { key: 'f22c979943cebcc82e8d4d9f86037621e8c3983a', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, hAsync("sd-date-range-picker-calendar", { key: 'c19548d0074556f90c740b6ba35338ea4d41dd18', value: this.value, selectable: this.selectable, maxRange: this.maxRange, onSdSelect: this.handleSelect, onSdViewChange: this.handleViewChange })))));
8161
8166
  }
8162
8167
  static get watchers() { return {
8163
8168
  "isOpen": [{
@@ -8179,6 +8184,7 @@ class SdDateRangePicker {
8179
8184
  "label": [1],
8180
8185
  "labelWidth": [8, "label-width"],
8181
8186
  "addonLabel": [1, "addon-label"],
8187
+ "addonAlign": [1, "addon-align"],
8182
8188
  "hint": [1],
8183
8189
  "errorMessage": [1, "error-message"],
8184
8190
  "fieldName": [1, "field-name"],
@@ -8897,6 +8903,11 @@ var fieldTokens = {
8897
8903
  field: field
8898
8904
  };
8899
8905
 
8906
+ const FIELD_ADDON_ALIGN_MAP = {
8907
+ start: 'flex-start',
8908
+ center: 'center',
8909
+ end: 'flex-end',
8910
+ };
8900
8911
  const sm$2 = fieldTokens.field.label.sm;
8901
8912
  const md$2 = fieldTokens.field.label.md;
8902
8913
  const FIELD_LABEL_SIZE_MAP = {
@@ -8918,7 +8929,7 @@ const FIELD_LABEL_SIZE_MAP = {
8918
8929
  },
8919
8930
  };
8920
8931
 
8921
- const sdFieldCss = () => `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--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;white-space:nowrap;padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right: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) .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 .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)}`;
8932
+ const sdFieldCss = () => `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--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) .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 .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)}`;
8922
8933
 
8923
8934
  const FORM_PARENT_TAGS = [
8924
8935
  'sd-select',
@@ -8953,6 +8964,7 @@ class SdField {
8953
8964
  label = '';
8954
8965
  labelWidth = '';
8955
8966
  addonLabel = '';
8967
+ addonAlign = 'start';
8956
8968
  icon = undefined;
8957
8969
  labelTooltip = '';
8958
8970
  labelTooltipProps = null;
@@ -9083,22 +9095,28 @@ class SdField {
9083
9095
  : addonTokens.border.default,
9084
9096
  '--sd-field-addon-gap': `${addonTokens.gap}px`,
9085
9097
  '--sd-field-addon-border-width': `${addonTokens.border.width}px`,
9098
+ '--sd-field-addon-justify': FIELD_ADDON_ALIGN_MAP[this.addonAlign] ?? FIELD_ADDON_ALIGN_MAP.start,
9099
+ ...(this.labelWidth
9100
+ ? {
9101
+ '--sd-field-addon-width': typeof this.labelWidth === 'number' ? `${this.labelWidth}px` : this.labelWidth,
9102
+ }
9103
+ : {}),
9086
9104
  }
9087
9105
  : {};
9088
- return (hAsync("div", { key: 'af5531a8bad5b8685f56748ce55044927f061903', class: {
9106
+ return (hAsync("div", { key: '967c6e44e514001350f0ca7eedf97e12ec8bac89', class: {
9089
9107
  'sd-field': true,
9090
9108
  'sd-field--has-label': !!this.label,
9091
9109
  'sd-field--has-addon': !!addon,
9092
9110
  [this.fieldStatus]: !!this.fieldStatus,
9093
- }, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars } }, hAsync("div", { key: '82f2472c0ccc778a982bbf6164edfdc1629a9eb1', class: "sd-field__wrapper" }, this.renderLabel(this.label), hAsync("div", { key: '42dd86d80718b245402b42376d28810745cf2154', class: "sd-field__main", style: this.width
9111
+ }, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars } }, hAsync("div", { key: '238c06bb4ea963c5e7b1ee31dfc7f4b7f4b88af1', class: "sd-field__wrapper" }, this.renderLabel(this.label), hAsync("div", { key: '2144211ec7096b3a36dab1bd494b633604fe942b', class: "sd-field__main", style: this.width
9094
9112
  ? {
9095
9113
  width: typeof this.width === 'number' ? `${this.width}px` : this.width,
9096
9114
  flex: 'none',
9097
9115
  }
9098
- : {} }, hAsync("div", { key: '0c80a69019f7b14c5f19eeb21f751c885df4c82b', class: {
9116
+ : {} }, hAsync("div", { key: '8f5e0e010b5fe4ec60c6cae29a9a4510ba0f34a5', class: {
9099
9117
  'sd-field__control': true,
9100
9118
  'sd-field__control--has-addon': !!addon,
9101
- } }, addon && hAsync("div", { key: 'c3b9fac0b4586ba5697af8a7cfe7a6aec01b0e52', class: "sd-field__addon" }, addon), hAsync("slot", { key: 'f7e087e3b3927708fd28919dba9e6edf4e1d317b' })), this.errorMsg || this.errorMessage ? (hAsync("div", { class: "sd-field__error-message" }, this.errorMsg || this.errorMessage)) : (this.hint && hAsync("div", { class: "sd-field__hint" }, this.hint))))));
9119
+ } }, addon && hAsync("div", { key: '853c73197999da0f753335a06e38aa850d0e9230', class: "sd-field__addon" }, addon), hAsync("slot", { key: '7e6d1d965d83df16e6294d259d1e25b2fab864cd' })), this.errorMsg || this.errorMessage ? (hAsync("div", { class: "sd-field__error-message" }, this.errorMsg || this.errorMessage)) : (this.hint && hAsync("div", { class: "sd-field__hint" }, this.hint))))));
9102
9120
  }
9103
9121
  renderLabel(label) {
9104
9122
  if (!label)
@@ -9124,6 +9142,7 @@ class SdField {
9124
9142
  "label": [1],
9125
9143
  "labelWidth": [8, "label-width"],
9126
9144
  "addonLabel": [1, "addon-label"],
9145
+ "addonAlign": [1, "addon-align"],
9127
9146
  "icon": [16],
9128
9147
  "labelTooltip": [1, "label-tooltip"],
9129
9148
  "labelTooltipProps": [16],
@@ -9205,6 +9224,7 @@ class SdFilePicker {
9205
9224
  label = '';
9206
9225
  labelWidth = '';
9207
9226
  addonLabel = '';
9227
+ addonAlign = 'start';
9208
9228
  hint = '';
9209
9229
  errorMessage = '';
9210
9230
  width = '';
@@ -9366,7 +9386,7 @@ class SdFilePicker {
9366
9386
  'sd-file-picker--inline-disabled': this.disabled,
9367
9387
  }, style: cssVars, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, content));
9368
9388
  }
9369
- return (hAsync("sd-field", { 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: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, content));
9389
+ return (hAsync("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: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, content));
9370
9390
  }
9371
9391
  static get watchers() { return {
9372
9392
  "value": [{
@@ -9391,6 +9411,7 @@ class SdFilePicker {
9391
9411
  "label": [1],
9392
9412
  "labelWidth": [8, "label-width"],
9393
9413
  "addonLabel": [1, "addon-label"],
9414
+ "addonAlign": [1, "addon-align"],
9394
9415
  "hint": [1],
9395
9416
  "errorMessage": [1, "error-message"],
9396
9417
  "width": [8],
@@ -10641,6 +10662,7 @@ class SdInput {
10641
10662
  type = 'text';
10642
10663
  size = 'sm';
10643
10664
  addonLabel = '';
10665
+ addonAlign = 'start';
10644
10666
  placeholder = '입력해 주세요.';
10645
10667
  disabled = false;
10646
10668
  clearable = false;
@@ -10745,12 +10767,12 @@ class SdInput {
10745
10767
  '--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
10746
10768
  '--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
10747
10769
  };
10748
- return (hAsync("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: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, hAsync("label", { key: 'c8297e261baee31b8508e0912004edd7fe85f115', class: "sd-input__content" }, hAsync("slot", { key: '615b28bb1f239a1ead1cad888edde9b59358837b', name: "prefix" }), hAsync("input", { key: 'd1231386b264dbb8b38bf920c48c59474417a492', name: this.name, ref: el => (this.nativeEl = el), class: `sd-input__native ${this.inputClass}`, type: this.type === 'password' && this.passwordVisible ? 'text' : this.type, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, autocomplete: this.autocomplete || undefined, maxlength: this.maxlength, minlength: this.minlength, inputmode: this.inputmode, enterkeyhint: this.enterkeyhint, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.inputStyle }), hAsync("slot", { key: '97f7c084a17674d52c43255b334ddeb61cf743ad', name: "suffix" }), this.clearable && this.internalValue && !this.disabled && (hAsync("sd-ghost-button", { key: 'f35a0872ac6f44e41716b0bf9f93f7a000445bf6', icon: "close", ariaLabel: "clear", size: "xxs", disabled: this.disabled, class: "sd-input__clear-icon", onClick: async () => {
10770
+ return (hAsync("sd-field", { key: '3b607f0075786647d48ce470d40745e4d5fdcdc1', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, hAsync("label", { key: '02902d50bbc3275860e814a5d354e83eeed72373', class: "sd-input__content" }, hAsync("slot", { key: '4fb6e53a98853c67e847cdd38b8ddbb606e3f0a1', name: "prefix" }), hAsync("input", { key: '291841a908b8502790f09833f1a30dc56f24ff52', name: this.name, ref: el => (this.nativeEl = el), class: `sd-input__native ${this.inputClass}`, type: this.type === 'password' && this.passwordVisible ? 'text' : this.type, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, autocomplete: this.autocomplete || undefined, maxlength: this.maxlength, minlength: this.minlength, inputmode: this.inputmode, enterkeyhint: this.enterkeyhint, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.inputStyle }), hAsync("slot", { key: '13e21f184a9dcee81a1b6d3c11b9137a0ac7203e', name: "suffix" }), this.clearable && this.internalValue && !this.disabled && (hAsync("sd-ghost-button", { key: '4e708928b8465d6e8d5c1b6f4a983a9d8c1c8784', icon: "close", ariaLabel: "clear", size: "xxs", disabled: this.disabled, class: "sd-input__clear-icon", onClick: async () => {
10749
10771
  if (this.disabled)
10750
10772
  return;
10751
10773
  this.internalValue = '';
10752
10774
  await this.formField?.sdValidate();
10753
- } })), this.type === 'password' && (hAsync("sd-ghost-button", { key: '0fdf74595057997c7d2f5f0f3ba6b75c340c2965', icon: this.passwordVisible ? 'visibilityOn' : 'visibilityOff', ariaLabel: "visibility", size: "xxs", disabled: this.disabled, class: "sd-input__password-icon", onClick: () => {
10775
+ } })), this.type === 'password' && (hAsync("sd-ghost-button", { key: 'cc87104d0c9ef69659041fe233b3e432b62ed0b8', icon: this.passwordVisible ? 'visibilityOn' : 'visibilityOff', ariaLabel: "visibility", size: "xxs", disabled: this.disabled, class: "sd-input__password-icon", onClick: () => {
10754
10776
  if (this.disabled)
10755
10777
  return;
10756
10778
  this.passwordVisible = !this.passwordVisible;
@@ -10773,6 +10795,7 @@ class SdInput {
10773
10795
  "type": [1],
10774
10796
  "size": [1],
10775
10797
  "addonLabel": [1, "addon-label"],
10798
+ "addonAlign": [1, "addon-align"],
10776
10799
  "placeholder": [1],
10777
10800
  "disabled": [4],
10778
10801
  "clearable": [4],
@@ -11452,6 +11475,7 @@ class SdNumberInput {
11452
11475
  label;
11453
11476
  labelWidth = '';
11454
11477
  addonLabel = '';
11478
+ addonAlign = 'start';
11455
11479
  placeholder = '입력해 주세요.';
11456
11480
  disabled = false;
11457
11481
  width;
@@ -11710,12 +11734,12 @@ class SdNumberInput {
11710
11734
  '--sd-textinput-input-hint-typography-line-height': `${NUMBER_INPUT_HINT.typography.lineHeight}px`,
11711
11735
  '--sd-textinput-input-contents-gap': `${NUMBER_INPUT_CONTENTS_GAP}px`,
11712
11736
  };
11713
- return (hAsync("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: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, hAsync("div", { key: '408b984ca5c7f3edaf0afe4c56fab2901824b2de', class: "sd-number-input__content" }, this.useButton && (hAsync("button", { key: 'da29f621914cbb7cac4c83f55056f52ef918f7c7', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--decrement", disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, hAsync("sd-icon", { key: 'a60c99bd949c2791608d269bc478b490dd4335e0', name: "minus", size: iconSize, color: this.isDecrementDisabled()
11737
+ return (hAsync("sd-field", { key: 'a9512622774c930c8b70b3d739a405e2434f22a7', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, size: this.size, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, hAsync("div", { key: 'f068ab7a042a97dfac7aaf160508757306dddc14', class: "sd-number-input__content" }, this.useButton && (hAsync("button", { key: '37341e813e7902f07c2731c708e1aadc53411653', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--decrement", disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, hAsync("sd-icon", { key: '740b2715518534b0ece5aa3b3f6dfd0dfafd6368', name: "minus", size: iconSize, color: this.isDecrementDisabled()
11714
11738
  ? NUMBER_INPUT_STEPPER.icon.disabled
11715
- : NUMBER_INPUT_STEPPER.icon.default }))), this.inputPrefix && (hAsync("span", { key: '3eae6cb2d277f3f830f7cb122b72cdcdedf57e10', class: "sd-number-input__prefix" }, this.inputPrefix)), hAsync("input", { key: '19e42ab159a9df7721ca6ea5505d3a0aca2517c4', name: this.name, ref: el => (this.nativeEl = el), 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: {
11739
+ : NUMBER_INPUT_STEPPER.icon.default }))), this.inputPrefix && (hAsync("span", { key: '9b16f311a1408dfc84124ec938a98b13635f6dc6', class: "sd-number-input__prefix" }, this.inputPrefix)), hAsync("input", { key: '572e2a8a1d7283e3568a85ba6c1bd506c3ec4453', name: this.name, ref: el => (this.nativeEl = el), 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: {
11716
11740
  textAlign: this.useButton ? 'center' : 'right',
11717
11741
  ...this.inputStyle,
11718
- } }), this.inputSuffix && (hAsync("span", { key: '5f9dc1e294a081cede120d9466d70910a9b1d6bb', class: "sd-number-input__suffix" }, this.inputSuffix)), this.useButton && (hAsync("button", { key: '50d96dd2556071480b17210b8db307ab4082c92b', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--increment", disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, hAsync("sd-icon", { key: '1821a77886ac9dc169c8e2697282e813a334df35', name: "add", size: iconSize, color: this.isIncrementDisabled()
11742
+ } }), this.inputSuffix && (hAsync("span", { key: '13a07217ee34c793669b061c240062805a40db60', class: "sd-number-input__suffix" }, this.inputSuffix)), this.useButton && (hAsync("button", { key: 'c3557737be6cc5dc6c5ab171bcc078cf564fb2b0', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--increment", disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, hAsync("sd-icon", { key: '530cf50331768df5be16639e46ce3f7f438ffe02', name: "add", size: iconSize, color: this.isIncrementDisabled()
11719
11743
  ? NUMBER_INPUT_STEPPER.icon.disabled
11720
11744
  : NUMBER_INPUT_STEPPER.icon.default }))))));
11721
11745
  }
@@ -11742,6 +11766,7 @@ class SdNumberInput {
11742
11766
  "label": [1],
11743
11767
  "labelWidth": [8, "label-width"],
11744
11768
  "addonLabel": [1, "addon-label"],
11769
+ "addonAlign": [1, "addon-align"],
11745
11770
  "placeholder": [1],
11746
11771
  "disabled": [4],
11747
11772
  "width": [8],
@@ -12799,6 +12824,7 @@ class SdSelect extends BaseDropdownEvent {
12799
12824
  label = '';
12800
12825
  labelWidth = '';
12801
12826
  addonLabel = '';
12827
+ addonAlign = 'start';
12802
12828
  icon = undefined;
12803
12829
  labelTooltip = '';
12804
12830
  labelTooltipProps = null;
@@ -12916,7 +12942,7 @@ class SdSelect extends BaseDropdownEvent {
12916
12942
  }
12917
12943
  };
12918
12944
  render() {
12919
- return (hAsync("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: el => (this.formField = el) }, hAsync("div", { key: 'a200ea9e7409ed3f63e6ffa967c3171712598521', class: {
12945
+ return (hAsync("sd-field", { key: 'bef5ef042c37b3abb97f8f5eafaee24d232132b7', label: this.label, labelWidth: this.labelWidth, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, addonLabel: this.addonLabel, addonAlign: this.addonAlign, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el) }, hAsync("div", { key: '9046ecdd771380312e7be3797ccac28d2315cfbe', class: {
12920
12946
  'sd-select': true,
12921
12947
  'sd-select--disabled': this.disabled,
12922
12948
  'sd-select--error': !!this.error,
@@ -12961,6 +12987,7 @@ class SdSelect extends BaseDropdownEvent {
12961
12987
  "label": [1],
12962
12988
  "labelWidth": [8, "label-width"],
12963
12989
  "addonLabel": [1, "addon-label"],
12990
+ "addonAlign": [1, "addon-align"],
12964
12991
  "icon": [16],
12965
12992
  "labelTooltip": [1, "label-tooltip"],
12966
12993
  "labelTooltipProps": [16],
@@ -13204,6 +13231,7 @@ class SdSelectGroup extends BaseDropdownEvent {
13204
13231
  label = '';
13205
13232
  labelWidth = '';
13206
13233
  addonLabel = '';
13234
+ addonAlign = 'start';
13207
13235
  icon = undefined;
13208
13236
  labelTooltip = '';
13209
13237
  labelTooltipProps = null;
@@ -13450,7 +13478,7 @@ class SdSelectGroup extends BaseDropdownEvent {
13450
13478
  });
13451
13479
  }
13452
13480
  render() {
13453
- return (hAsync("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: el => (this.formField = el), style: { '--field-width': this.width || '200px' } }, hAsync("div", { key: 'b527250fecc69b8f5d4c88aa3f6090c2b291efc9', class: {
13481
+ return (hAsync("sd-field", { key: '698b76ed0785f475a099fac99e3564b20c252c01', label: this.label, labelWidth: this.labelWidth, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, addonLabel: this.addonLabel, addonAlign: this.addonAlign, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: { '--field-width': this.width || '200px' } }, hAsync("div", { key: 'aa449fda5e32d0519792dc2e713d3c59658c86fa', class: {
13454
13482
  'sd-select-group': true,
13455
13483
  'sd-select-group--open': this.isOpen,
13456
13484
  'sd-select-group--disabled': this.disabled,
@@ -13517,6 +13545,7 @@ class SdSelectGroup extends BaseDropdownEvent {
13517
13545
  "label": [1],
13518
13546
  "labelWidth": [8, "label-width"],
13519
13547
  "addonLabel": [1, "addon-label"],
13548
+ "addonAlign": [1, "addon-align"],
13520
13549
  "icon": [16],
13521
13550
  "labelTooltip": [1, "label-tooltip"],
13522
13551
  "labelTooltipProps": [16],
@@ -14496,6 +14525,7 @@ class SdSelectV2 {
14496
14525
  label = '';
14497
14526
  labelWidth = '';
14498
14527
  addonLabel = '';
14528
+ addonAlign = 'start';
14499
14529
  error = false;
14500
14530
  hint = '';
14501
14531
  errorMessage = '';
@@ -14688,13 +14718,13 @@ class SdSelectV2 {
14688
14718
  this.closeDropdown();
14689
14719
  },
14690
14720
  };
14691
- return (hAsync("sd-field", { key: 'ffca1287cefaeedf867a6b86a752942a1c8d1703', 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, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, onMouseEnter: () => {
14721
+ return (hAsync("sd-field", { key: '6074cfea700e1f3ea03aaedb0146d7dffdaa7101', name: this.fieldName || this.internalName, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, onMouseEnter: () => {
14692
14722
  this.hovered = true;
14693
14723
  }, onMouseLeave: () => {
14694
14724
  this.hovered = false;
14695
- } }, hAsync("div", { key: 'f53f38543b165040eb48236e2a25e43b78444350', class: "sd-select-v2", ref: el => {
14725
+ } }, hAsync("div", { key: '4840cfcf19e262903110245f88b73f3f03713624', class: "sd-select-v2", ref: el => {
14696
14726
  this.triggerRef = el;
14697
- } }, hAsync("sd-select-v2-trigger", { key: 'afd60ef0b492d9179318a5187565b45a58ef1ed5', displayText: this.displayText, placeholder: this.placeholder, disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (hAsync("sd-portal", { key: 'e482c1fffc24e893fe1c04f136a116bac6c1b2e9', ...portalProps }, hAsync("sd-select-v2-listbox", { key: 'c864fdef604eee7cea7c946de970e78b59e8b0da', name: this.name, options: this.options, value: this.value, emitValue: this.emitValue, triggerWidth: this.triggerWidth, maxWidth: this.resolvedMaxDropdownWidth, maxHeight: this.resolvedDropdownHeight, onSdOptionSelect: event => this.handleOptionSelect(event.detail) })))));
14727
+ } }, hAsync("sd-select-v2-trigger", { key: '4b34dd8007864623d17c80b4e5cea02aa4db954a', displayText: this.displayText, placeholder: this.placeholder, disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (hAsync("sd-portal", { key: '7ec2c4ca8e32f877a894f9f766d3558c10d66596', ...portalProps }, hAsync("sd-select-v2-listbox", { key: 'c804a19a142d2978d8fb4eaa33ad2a6a7028e7d3', name: this.name, options: this.options, value: this.value, emitValue: this.emitValue, triggerWidth: this.triggerWidth, maxWidth: this.resolvedMaxDropdownWidth, maxHeight: this.resolvedDropdownHeight, onSdOptionSelect: event => this.handleOptionSelect(event.detail) })))));
14698
14728
  }
14699
14729
  static get watchers() { return {
14700
14730
  "isOpen": [{
@@ -14716,6 +14746,7 @@ class SdSelectV2 {
14716
14746
  "label": [1],
14717
14747
  "labelWidth": [8, "label-width"],
14718
14748
  "addonLabel": [1, "addon-label"],
14749
+ "addonAlign": [1, "addon-align"],
14719
14750
  "error": [1028],
14720
14751
  "hint": [1],
14721
14752
  "errorMessage": [1, "error-message"],
@@ -16762,6 +16793,7 @@ class SdTextarea {
16762
16793
  label = '';
16763
16794
  labelWidth = '';
16764
16795
  addonLabel = '';
16796
+ addonAlign = 'start';
16765
16797
  hint = '';
16766
16798
  errorMessage = '';
16767
16799
  icon = undefined;
@@ -16848,7 +16880,7 @@ class SdTextarea {
16848
16880
  '--sd-system-size-field-sm-height': 'auto',
16849
16881
  '--sd-system-radius-field-sm': `${TEXTAREA_TOKENS.radius}px`,
16850
16882
  };
16851
- return (hAsync("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: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, hAsync("div", { key: 'b64aa1b2f02c1f68db57e5e36e0a7146257629e1', class: "sd-textarea__content" }, hAsync("textarea", { key: 'b2baff1d99b9c2347f0b0bb751fc51268d2c48c7', name: this.name, ref: el => (this.nativeEl = el), class: `sd-textarea__native ${this.textareaClass}`, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, autofocus: this.autoFocus, maxLength: this.maxLength, rows: this.rows, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.textareaStyle }))));
16883
+ return (hAsync("sd-field", { key: '9f456eb1b18d0d83fb40f0b6b66125d587bcb4c6', 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: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, hAsync("div", { key: 'f201962ed64908c97d24923b62e97c33b356170a', class: "sd-textarea__content" }, hAsync("textarea", { key: '826e4b3c4743dbf16387b68317bd09ca7c75746d', name: this.name, ref: el => (this.nativeEl = el), class: `sd-textarea__native ${this.textareaClass}`, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, autofocus: this.autoFocus, maxLength: this.maxLength, rows: this.rows, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.textareaStyle }))));
16852
16884
  }
16853
16885
  static get watchers() { return {
16854
16886
  "value": [{
@@ -16877,6 +16909,7 @@ class SdTextarea {
16877
16909
  "label": [1],
16878
16910
  "labelWidth": [8, "label-width"],
16879
16911
  "addonLabel": [1, "addon-label"],
16912
+ "addonAlign": [1, "addon-align"],
16880
16913
  "hint": [1],
16881
16914
  "errorMessage": [1, "error-message"],
16882
16915
  "icon": [16],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellmate/design-system",
3
- "version": "1.0.68",
3
+ "version": "1.0.69",
4
4
  "description": "Sellmate Design System - Web Components Library built with Stencil",
5
5
  "keywords": [
6
6
  "web-components",
@@ -1 +0,0 @@
1
- import{p as t,H as e,c as s,h as i,t as o}from"./p-C0VkfKIA.js";import{n as r}from"./p-CCwNgVmC.js";import{d as a}from"./p-Csfk-CtX.js";import{d as l}from"./p-D6C4-apu.js";import{d as h}from"./p-DWW5xr6r.js";import{d}from"./p-Diis5oCN.js";import{d as n}from"./p-YgnF5oje.js";import{d as c}from"./p-DIro-Wat.js";import{d as p}from"./p-BBluw-CU.js";import{d as m}from"./p-COM91Bya.js";import{d as u}from"./p-D_lyw4rN.js";import{d as f}from"./p-CsPyZohK.js";import{d as b}from"./p-z9MoRjYX.js";const g=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.dropDownShow=s(this,"sdDropDownShow",7)}static VIEWPORT_PADDING=20;static PORTAL_OFFSET_Y=4;static CLOSE_ANIMATION_DURATION=150;get el(){return this}name="default";value=null;options=[];placeholder="선택";maxDropdownWidth="640px";dropdownHeight="260px";disabled=!1;label="";labelWidth="";addonLabel="";error=!1;hint="";errorMessage="";fieldName="";rules=[];icon=void 0;labelTooltip="";labelTooltipProps=null;emitValue=!1;width="";isOpen=!1;isAnimatingOut=!1;triggerWidth="200px";resolvedDropdownHeight="260px";resolvedMaxDropdownWidth="640px";focused=!1;hovered=!1;update;dropDownShow;triggerRef;closeAnimationTimer;internalName=r();watchIsOpen(t){this.focused=t,this.dropDownShow.emit({isOpen:t})}get isMulti(){return"multi"===this.name||"multi_depth"===this.name}get displayText(){if(this.isMulti){if(!this.value||!Array.isArray(this.value))return"";if(this.emitValue){const t=this.flattenOptions(this.options);return this.value.map((e=>t.find((t=>t.value===e))?.label??"")).filter(Boolean).join(", ")}const t=this.value;return 0===t.length?"":t.map((t=>t.label)).join(", ")}if(null==this.value)return"";if(!this.emitValue&&"object"==typeof this.value&&!Array.isArray(this.value))return this.value.label??"";const t=this.flattenOptions(this.options).find((t=>t.value===this.value));return t?.label??""}flattenOptions(t){return t.flatMap((t=>t.children?this.flattenOptions(t.children):[t]))}getSelectedOptions(){const t=this.value;return t&&Array.isArray(t)?this.emitValue?t.map((t=>this.findOriginalOption(t,this.options))).filter((t=>!!t)):t:[]}toMultiValue(t){return this.emitValue?t.map((t=>t.value)):t}parsePixelValue(t,e){const s=Number.parseFloat(t);return Number.isFinite(s)?s:e}updateDropdownViewportConstraints(){if(!this.triggerRef)return;const e=this.triggerRef.getBoundingClientRect(),s=t.VIEWPORT_PADDING,i=t.PORTAL_OFFSET_Y,o=this.parsePixelValue(this.dropdownHeight,260),r=this.parsePixelValue(this.maxDropdownWidth,640),a=Math.max(window.innerHeight-e.bottom-s-i,0),l=Math.max(e.top-s-i,0),h=Math.max(a,l),d=Math.max(window.innerWidth-2*s,0);this.resolvedDropdownHeight=`${Math.min(o,h)}px`,this.resolvedMaxDropdownWidth=`${Math.min(r,d)}px`}handleViewportResize=()=>{this.isOpen&&this.updateDropdownViewportConstraints()};findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),t.CLOSE_ANIMATION_DURATION))}handleTriggerClick=()=>{this.triggerRef&&(this.triggerWidth=`${this.triggerRef.offsetWidth}px`),this.updateDropdownViewportConstraints(),this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)};emitUpdate(t){this.update.emit(t)}handleOptionSelect=t=>{const{option:e,leaves:s}=t;if(this.isMulti)this.handleMultiSelect(e,s);else{this.closeDropdown(),this.value=this.emitValue?e.value:e;const t=this.value;requestAnimationFrame((()=>{this.emitUpdate(t)}))}};handleMultiSelect(t,e){const s=this.getSelectedOptions();let i;if(t.children)if(e.every((t=>s.some((e=>e.value===t.value))))){const t=new Set(e.map((t=>t.value)));i=s.filter((e=>!t.has(e.value)))}else{const t=new Set(s.map((t=>t.value))),o=e.filter((e=>!t.has(e.value)));i=[...s,...o]}else i=s.some((e=>e.value===t.value))?s.filter((e=>e.value!==t.value)):[...s,t];this.value=this.toMultiValue(i),this.emitUpdate(this.value)}connectedCallback(){window.addEventListener("resize",this.handleViewportResize)}disconnectedCallback(){window.removeEventListener("resize",this.handleViewportResize),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e={open:this.isOpen,parentRef:this.triggerRef,viewportPadding:t.VIEWPORT_PADDING,onSdClose:()=>{this.closeDropdown()}};return i("sd-field",{key:"ffca1287cefaeedf867a6b86a752942a1c8d1703",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,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,onMouseEnter:()=>{this.hovered=!0},onMouseLeave:()=>{this.hovered=!1}},i("div",{key:"f53f38543b165040eb48236e2a25e43b78444350",class:"sd-select-v2",ref:t=>{this.triggerRef=t}},i("sd-select-v2-trigger",{key:"afd60ef0b492d9179318a5187565b45a58ef1ed5",displayText:this.displayText,placeholder:this.placeholder,disabled:this.disabled,isOpen:this.isOpen,onSdTriggerClick:this.handleTriggerClick})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"e482c1fffc24e893fe1c04f136a116bac6c1b2e9",...e},i("sd-select-v2-listbox",{key:"c864fdef604eee7cea7c946de970e78b59e8b0da",name:this.name,options:this.options,value:this.value,emitValue:this.emitValue,triggerWidth:this.triggerWidth,maxWidth:this.resolvedMaxDropdownWidth,maxHeight:this.resolvedDropdownHeight,onSdOptionSelect:t=>this.handleOptionSelect(t.detail)})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-select-v2{display:inline-flex}sd-select-v2 sd-portal{display:none}sd-select-v2 .sd-select-v2{position:relative;width:100%;height:100%}"}},[512,"sd-select-v2",{name:[1],value:[1032],options:[16],placeholder:[1],maxDropdownWidth:[1,"max-dropdown-width"],dropdownHeight:[1,"dropdown-height"],disabled:[4],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],error:[1028],hint:[1],errorMessage:[1,"error-message"],fieldName:[1,"field-name"],rules:[16],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],emitValue:[4,"emit-value"],width:[8],isOpen:[32],isAnimatingOut:[32],triggerWidth:[32],resolvedDropdownHeight:[32],resolvedMaxDropdownWidth:[32],focused:[32],hovered:[32]},void 0,{isOpen:[{watchIsOpen:0}]}]);function w(){"undefined"!=typeof customElements&&["sd-select-v2","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-icon","sd-portal","sd-select-v2-list-item","sd-select-v2-list-item-search","sd-select-v2-listbox","sd-select-v2-trigger","sd-tooltip"].forEach((t=>{switch(t){case"sd-select-v2":customElements.get(o(t))||customElements.define(o(t),g);break;case"sd-button":customElements.get(o(t))||a();break;case"sd-checkbox":customElements.get(o(t))||l();break;case"sd-field":customElements.get(o(t))||h();break;case"sd-floating-portal":customElements.get(o(t))||d();break;case"sd-icon":customElements.get(o(t))||n();break;case"sd-portal":customElements.get(o(t))||c();break;case"sd-select-v2-list-item":customElements.get(o(t))||p();break;case"sd-select-v2-list-item-search":customElements.get(o(t))||m();break;case"sd-select-v2-listbox":customElements.get(o(t))||u();break;case"sd-select-v2-trigger":customElements.get(o(t))||f();break;case"sd-tooltip":customElements.get(o(t))||b()}}))}export{g as S,w as d}
@@ -1 +0,0 @@
1
- import{p as e,H as d,h as s,t as i}from"./p-C0VkfKIA.js";import{d as t}from"./p-Csfk-CtX.js";import{d as l}from"./p-Diis5oCN.js";import{d as o}from"./p-YgnF5oje.js";import{d as r}from"./p-z9MoRjYX.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=a.sm,h=a.md,p={sm:{height:f.height,gap:f.gap,icon:f.icon,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight},md:{height:h.height,gap:h.gap,icon:h.icon,fontSize:h.typography.fontSize,lineHeight:h.typography.lineHeight,fontWeight:h.typography.fontWeight}},c=["sd-select","sd-select-multiple","sd-select-multiple-group","sd-input","sd-barcode-input","sd-textarea","sd-number-input","sd-select-v2","sd-file-picker","sd-date-picker","sd-date-range-picker"],b=e(class extends d{constructor(e){super(),!1!==e&&this.__registerHost()}get el(){return this}name="";rules=[];error=!1;disabled=!1;hovered=!1;focused=!1;status;hint="";errorMessage="";width="";size="sm";label="";labelWidth="";addonLabel="";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.focused?(e="focus",`sd-field--${e}`):(this.hovered&&(e="hover"),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 c){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.name)}))}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 p?this.size:"sm",i=p[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?{"--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`}:{};return s("div",{key:"af5531a8bad5b8685f56748ce55044927f061903",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:"82f2472c0ccc778a982bbf6164edfdc1629a9eb1",class:"sd-field__wrapper"},this.renderLabel(this.label),s("div",{key:"42dd86d80718b245402b42376d28810745cf2154",class:"sd-field__main",style:this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},s("div",{key:"0c80a69019f7b14c5f19eeb21f751c885df4c82b",class:{"sd-field__control":!0,"sd-field__control--has-addon":!!e}},e&&s("div",{key:"c3b9fac0b4586ba5697af8a7cfe7a6aec01b0e52",class:"sd-field__addon"},e),s("slot",{key:"f7e087e3b3927708fd28919dba9e6edf4e1d317b"})),this.errorMsg||this.errorMessage?s("div",{class:"sd-field__error-message"},this.errorMsg||this.errorMessage):this.hint&&s("div",{class:"sd-field__hint"},this.hint))))}renderLabel(e){return e?s("label",{class:"sd-field__label"},this.icon&&s("sd-icon",{name:this.icon.name,size:this.icon.size??Number(p[this.size in p?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)):null}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--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;white-space:nowrap;padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right: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) .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 .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],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"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],errorMsg:[32],sdValidate:[64],sdReset:[64],sdResetValidation:[64],sdFocus:[64]}]);function g(){"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),b);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{b as S,g as d}
@@ -1 +0,0 @@
1
- import{p as t,H as s,c as i,h as e,t as n}from"./p-C0VkfKIA.js";import{n as o}from"./p-CCwNgVmC.js";import{i as a}from"./p-ByhWX2NK.js";import{d as l}from"./p-Csfk-CtX.js";import{d}from"./p-DWW5xr6r.js";import{d as r}from"./p-Diis5oCN.js";import{d as u}from"./p-D21iKAp7.js";import{d as h}from"./p-YgnF5oje.js";import{d as p}from"./p-z9MoRjYX.js";const c=a.textinput.sm,f=a.textinput.md,b={sm:{height:c.height,paddingX:c.paddingX,gap:c.gap,radius:c.radius,fontSize:c.typography.fontSize,lineHeight:c.typography.lineHeight,fontWeight:c.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:a.textinput.text,icon:a.textinput.icon},g=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.input=i(this,"sdUpdate",7),this.focus=i(this,"sdFocus",7),this.blur=i(this,"sdBlur",7)}get host(){return 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=o();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,s)=>{this.focused="focus"===t,"blur"===t?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(s)):this.focus?.emit(s)};render(){const t=b[this.size]??b.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":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":`${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}]}}static get style(){return"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}"}},[772,"sd-input",{value:[1032],type:[1],size:[1],addonLabel:[1,"addon-label"],placeholder:[1],disabled:[4],clearable:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],autocomplete:[1],maxlength:[2],minlength:[2],inputmode:[1],enterkeyhint:[1],spellcheck:[4],status:[1],hint:[1],errorMessage:[1,"error-message"],inputClass:[1,"input-class"],readonly:[4],error:[1028],focused:[1028],hovered:[1028],label:[1],labelWidth:[8,"label-width"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],inputStyle:[16],internalValue:[32],passwordVisible:[32],sdGetNativeElement:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function _(){"undefined"!=typeof customElements&&["sd-input","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-tooltip"].forEach((t=>{switch(t){case"sd-input":customElements.get(n(t))||customElements.define(n(t),g);break;case"sd-button":customElements.get(n(t))||l();break;case"sd-field":customElements.get(n(t))||d();break;case"sd-floating-portal":customElements.get(n(t))||r();break;case"sd-ghost-button":customElements.get(n(t))||u();break;case"sd-icon":customElements.get(n(t))||h();break;case"sd-tooltip":customElements.get(n(t))||p()}}))}export{g as S,_ as d}
@@ -1 +0,0 @@
1
- import{r as t,c as e,a as i,h as s}from"./p-BGyJgVXm.js";import{n as a}from"./p-CCwNgVmC.js";import{i as o}from"./p-ByhWX2NK.js";const n=o.textinput.sm,d=o.textinput.md,r={sm:{height:n.height,paddingX:n.paddingX,gap:n.gap,radius:n.radius,fontSize:n.typography.fontSize,lineHeight:n.typography.lineHeight,fontWeight:n.typography.fontWeight},md:{height:d.height,paddingX:d.paddingX,gap:d.gap,radius:d.radius,fontSize:d.typography.fontSize,lineHeight:d.typography.lineHeight,fontWeight:d.typography.fontWeight}},l={bg:o.textinput.bg,text:o.textinput.text,icon:o.textinput.icon},c=class{constructor(i){t(this,i),this.input=e(this,"sdUpdate",7),this.focus=e(this,"sdFocus",7),this.blur=e(this,"sdBlur",7)}get host(){return i(this)}value=null;size="sm";addonLabel="";placeholder="입력해 주세요.";disabled=!1;clearable=!1;width="";rules=[];autoFocus=!1;status;hint="";errorMessage="";inputClass="";readonly=!1;error=!1;focused=!1;hovered=!1;label="";labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;inputStyle={};internalValue=null;nativeEl=void 0;formField;name=a();input;focus;blur;valueChanged(t){this.internalValue=t}internalValueChanged(t){t!==this.value&&(this.value=t,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{this.internalValue=t.target.value};handleFocus=async(t,e)=>{this.focused="focus"===t,"blur"===t?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(e)):this.focus?.emit(e)};render(){const t=r[this.size]??r.sm;return s("sd-field",{key:"11079233784a85ec20bae4653155a9820d878681",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-barcode-input-font-size":`${t.fontSize}px`,"--sd-barcode-input-line-height":`${t.lineHeight}px`,"--sd-barcode-input-font-weight":t.fontWeight,"--sd-barcode-input-padding-x":`${t.paddingX}px`,"--sd-barcode-input-gap":`${t.gap}px`,"--sd-barcode-input-text-color":l.text.default,"--sd-barcode-input-placeholder-color":l.text.placeholder,"--sd-barcode-input-disabled-color":l.text.disabled,"--sd-barcode-input-icon-color":l.icon.default,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`,"--sd-system-color-field-bg-default":l.bg.barcode}},s("label",{key:"592fcb675607d57d7372abac967eb1c1a1e27212",class:"sd-barcode-input__content"},s("slot",{key:"a035ed3825360f81e669c3ef9099a479bbb69fd0",name:"prefix"}),s("input",{key:"7ffffa2b085050d05d1439cac1c90901144da410",name:this.name,ref:t=>this.nativeEl=t,class:`sd-barcode-input__native ${this.inputClass}`,type:"text",value:this.internalValue||"",placeholder:this.placeholder,disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onFocus:t=>this.handleFocus("focus",t),onBlur:t=>this.handleFocus("blur",t),style:this.inputStyle}),s("slot",{key:"cc9a0e5b0b367c5c443bfe132408d834d74c16b3",name:"suffix"}),this.clearable&&this.internalValue&&s("sd-ghost-button",{key:"a5a06ef58a7f38ffbafb56038ff8321e66184da5",icon:"close",ariaLabel:"clear",size:"xxs",disabled:this.disabled,class:"sd-barcode-input__clear-icon",onClick:async()=>{this.disabled||(this.internalValue="",await(this.formField?.sdValidate()))}})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}};c.style="sd-icon{display:inline-block;line-height:0}sd-icon .sd-icon--rotate-90{transform:rotate(90deg)}sd-icon .sd-icon--rotate-180{transform:rotate(180deg)}sd-icon .sd-icon--rotate-270{transform:rotate(270deg)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fafaa1 inset;box-shadow:0 0 0px 1000px #fafaa1 inset;transition:background-color 5000s ease-in-out 0s}input:autofill,input:autofill:hover,input:autofill:focus,input:autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fafaa1 inset;box-shadow:0 0 0px 1000px #fafaa1 inset;transition:background-color 5000s ease-in-out 0s}sd-barcode-input{display:inline-flex}sd-barcode-input .sd-barcode-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;color:var(--sd-barcode-input-text-color);font-size:var(--sd-barcode-input-font-size);line-height:var(--sd-barcode-input-line-height);font-weight:var(--sd-barcode-input-font-weight);padding:0 var(--sd-barcode-input-padding-x);gap:var(--sd-barcode-input-gap)}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__native{width:100%;height:100%;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__native[disabled]{cursor:not-allowed;color:var(--sd-barcode-input-disabled-color)}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__native[readonly]{color:var(--sd-barcode-input-disabled-color)}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__native::placeholder{color:var(--sd-barcode-input-placeholder-color)}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__clear-icon{flex-shrink:0}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__native[disabled]~.sd-barcode-input__clear-icon{cursor:not-allowed;pointer-events:none}";export{c as sd_barcode_input}
@@ -1 +0,0 @@
1
- import{r as t,c as e,a as i,h as o,F as s}from"./p-BGyJgVXm.js";import{b as n}from"./p-B1XBwjCW.js";import{r as d}from"./p-BxPyZJaz.js";import{T as a}from"./p-C4tHYnB4.js";const r={xs:Number(n.button.xs.icon),sm:Number(n.button.sm.icon),md:Number(n.button.md.icon),lg:Number(n.button.lg.icon)},l=class{constructor(i){t(this,i),this.click=e(this,"sdClick",7)}get el(){return i(this)}variant="primary";size="sm";color="#025497";label="";disabled=!1;type="button";icon;iconColor;iconSize;iconRight;noHover=!1;sdClass="";click;handleClick=t=>{this.disabled||this.click.emit(t)};getButtonClasses(){const t=["sd-button"];return t.push(`sd-button--${this.variant}`),t.push(`sd-button--${this.size}`),t.push(`sd-button--color-${this.color}`),this.disabled&&t.push("sd-button--disabled"),this.label&&t.push("sd-button--has-label"),this.label||!this.icon&&!this.iconRight||t.push("sd-button--icon-only"),this.noHover&&t.push("sd-button--no-hover"),t.join(" ")}render(){const t=this.getButtonClasses(),e=d(this.color);return o("button",{key:"b18b0e46ec5a26e35fd0c782c975c1e3f94c7bea",class:`${t} ${this.sdClass}`,type:this.type,disabled:this.disabled,style:{"--button-color":e},onClick:this.handleClick},o("div",{key:"3364b81ca9323e88b56ccde7783417416ecec4a0",class:"sd-button__content"},this.icon&&o("sd-icon",{key:"dbe12d21483f50cab4e7284fc340e5b02ec6578d",class:"sd-button__icon sd-button__icon--left",name:this.icon,size:this.iconSize??r[this.size],color:this.iconColor??("primary"===this.variant?"#fff":e)}),this.label&&o("div",{key:"793b3ef70ff8fbe7a043baf3b00097ab0c3bb59b",class:"sd-button__label"},this.label),this.iconRight&&o("sd-icon",{key:"9b35739d4c18c38f9487c806d4becc312146bed4",class:"sd-button__icon sd-button__icon--right",name:this.iconRight,size:r[this.size],color:"primary"===this.variant?"#fff":e})))}};l.style='sd-button{display:inline-flex;width:fit-content;height:fit-content}.sd-button{--sd-button-height:34px;--sd-button-padding-x:20px;--sd-button-gap:8px;--sd-button-font-family:inherit;--sd-button-font-size:16px;--sd-button-font-weight:500;--sd-button-text-decoration:none;--sd-button-label-min-width:auto;--sd-button-icon-only-size:var(--sd-button-height);text-decoration:none;cursor:pointer;border-radius:var(--sd-button-button-radius-sm, 4px);transition:all 0.2s ease-in-out;position:relative;overflow:hidden;white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;border:none;padding:0 var(--sd-button-padding-x);min-width:var(--sd-button-min-width, auto);min-height:var(--sd-button-height);font-family:var(--sd-button-font-family);font-size:var(--sd-button-font-size);font-weight:var(--sd-button-font-weight);text-decoration:var(--sd-button-text-decoration)}.sd-button--xs{--sd-button-height:var(--sd-button-button-xs-height, 24px);--sd-button-padding-x:var(--sd-button-button-xs-padding-x, 8px);--sd-button-gap:var(--sd-button-button-xs-gap, 4px);--sd-button-font-family:var(--sd-button-button-xs-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-xs-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-button-xs-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-xs-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-xs-min-width, auto);--sd-button-icon-only-size:var(--sd-button-button-icon-only-xs-width, var(--sd-button-height));line-height:20px}.sd-button--sm{--sd-button-height:var(--sd-button-button-sm-height, 28px);--sd-button-padding-x:var(--sd-button-button-sm-padding-x, 12px);--sd-button-gap:var(--sd-button-button-sm-gap, 6px);--sd-button-font-family:var(--sd-button-button-sm-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-sm-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-button-sm-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-sm-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-sm-min-width, auto);--sd-button-icon-only-size:var(--sd-button-button-icon-only-sm-width, var(--sd-button-height));line-height:20px}.sd-button--md{--sd-button-height:var(--sd-button-button-md-height, 34px);--sd-button-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-button-gap:var(--sd-button-button-md-gap, 8px);--sd-button-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-md-typography-font-size, 16px);--sd-button-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-md-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-md-min-width, auto);--sd-button-icon-only-size:var(--sd-button-button-icon-only-md-width, var(--sd-button-height));line-height:26px}.sd-button--lg{--sd-button-height:var(--sd-button-button-lg-height, 62px);--sd-button-padding-x:var(--sd-button-button-lg-padding-x, 28px);--sd-button-gap:var(--sd-button-button-lg-gap, 12px);--sd-button-font-family:var(--sd-button-button-lg-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-lg-typography-font-size, 18px);--sd-button-font-weight:var(--sd-button-button-lg-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-lg-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-lg-min-width, auto);--sd-button-icon-only-size:var(--sd-button-button-icon-only-lg-width, var(--sd-button-height));line-height:30px}.sd-button--has-label{--sd-button-min-width:var(--sd-button-label-min-width, auto)}.sd-button--primary{background-color:var(--button-color);color:white;transition:filter 0.2s ease}.sd-button--primary::before{content:"";position:absolute;inset:0;background:#000000;opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--primary:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.25}.sd-button--outline{background:white;border:var(--sd-button-button-border-width-default, 1px) solid var(--button-color);color:var(--button-color)}.sd-button--outline::before{content:"";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--outline:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--outline .sd-button__content{position:relative;z-index:1}.sd-button--ghost{background-color:transparent;color:var(--button-color);border-color:transparent}.sd-button--ghost::before{content:"";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--ghost:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--ghost .sd-button__content{position:relative;z-index:1}.sd-button--disabled{border:var(--sd-button-button-border-width-default, 1px) solid var(--sd-button-button-border-disabled, #CCCCCC);background:var(--sd-button-button-bg-disabled, #E1E1E1);color:var(--sd-button-button-text-disabled, #888888);cursor:not-allowed !important}.sd-button--icon-only{padding:0;width:var(--sd-button-icon-only-size, var(--sd-button-height));min-width:var(--sd-button-icon-only-size, var(--sd-button-height));height:var(--sd-button-icon-only-size, var(--sd-button-height))}.sd-button--no-hover:hover::before{opacity:0 !important}.sd-button .sd-button__content{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-button-gap);z-index:1;font-weight:inherit}';var f={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"}}},h={gap:"6",paddingX:"12",typography:{fontWeight:"500",fontSize:"12",lineHeight:"20"},bg:"#F6F6F6",border:{default:"#AAAAAA",disabled:"#CCCCCC",width:"1"}};const b=f.sm,u=f.md,c={sm:{height:b.height,gap:b.gap,icon:b.icon,fontSize:b.typography.fontSize,lineHeight:b.typography.lineHeight,fontWeight:b.typography.fontWeight},md:{height:u.height,gap:u.gap,icon:u.icon,fontSize:u.typography.fontSize,lineHeight:u.typography.lineHeight,fontWeight:u.typography.fontWeight}},p=["sd-select","sd-select-multiple","sd-select-multiple-group","sd-input","sd-barcode-input","sd-textarea","sd-number-input","sd-select-v2","sd-file-picker","sd-date-picker","sd-date-range-picker"],g=class{constructor(e){t(this,e)}get el(){return i(this)}name="";rules=[];error=!1;disabled=!1;hovered=!1;focused=!1;status;hint="";errorMessage="";width="";size="sm";label="";labelWidth="";addonLabel="";icon=void 0;labelTooltip="";labelTooltipProps=null;errorMsg="";hostElement=null;get value(){return this.hostElement?.value??null}get fieldStatus(){let t="";return this.disabled?(t="disabled",`sd-field--${t}`):this.focused?(t="focus",`sd-field--${t}`):(this.hovered&&(t="hover"),this.status&&(t=this.status),this.error&&(t="error"),t?`sd-field--${t}`:"")}componentDidLoad(){this.hostElement=this.findHostElement(),this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}findHostElement(){for(const t of p){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.name)}))}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 c?this.size:"sm",i=c[e],s={"--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)`},n=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?{"--sd-field-label-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{},d=t?{"--sd-field-addon-padding-x":`${h.paddingX}px`,"--sd-field-addon-font-size":`${h.typography.fontSize}px`,"--sd-field-addon-line-height":`${h.typography.lineHeight}px`,"--sd-field-addon-font-weight":h.typography.fontWeight,"--sd-field-addon-bg":h.bg,"--sd-field-addon-border-color":this.disabled?h.border.disabled:h.border.default,"--sd-field-addon-gap":`${h.gap}px`,"--sd-field-addon-border-width":`${h.border.width}px`}:{};return o("div",{key:"af5531a8bad5b8685f56748ce55044927f061903",class:{"sd-field":!0,"sd-field--has-label":!!this.label,"sd-field--has-addon":!!t,[this.fieldStatus]:!!this.fieldStatus},style:{...s,...n,...d}},o("div",{key:"82f2472c0ccc778a982bbf6164edfdc1629a9eb1",class:"sd-field__wrapper"},this.renderLabel(this.label),o("div",{key:"42dd86d80718b245402b42376d28810745cf2154",class:"sd-field__main",style:this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},o("div",{key:"0c80a69019f7b14c5f19eeb21f751c885df4c82b",class:{"sd-field__control":!0,"sd-field__control--has-addon":!!t}},t&&o("div",{key:"c3b9fac0b4586ba5697af8a7cfe7a6aec01b0e52",class:"sd-field__addon"},t),o("slot",{key:"f7e087e3b3927708fd28919dba9e6edf4e1d317b"})),this.errorMsg||this.errorMessage?o("div",{class:"sd-field__error-message"},this.errorMsg||this.errorMessage):this.hint&&o("div",{class:"sd-field__hint"},this.hint))))}renderLabel(t){return t?o("label",{class:"sd-field__label"},this.icon&&o("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"}),o("div",{class:"sd-field__label__text"},t),this.labelTooltip&&o("sd-tooltip",{class:"sd-field__label__tooltip",...this.labelTooltipProps},this.labelTooltip)):null}};g.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--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;white-space:nowrap;padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right: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) .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 .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 m=class{constructor(i){t(this,i),this.close=e(this,"sdClose",7)}get el(){return i(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(){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(){this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{if(!this.parentRef||!this.wrapper)return;const t=this.parentRef.getBoundingClientRect();if(!t.width&&!t.height)return;const[e,i]=this.offset,o=m.ARROW_SIZE;let s=0,n=0;switch(this.placement){case"top":s=t.top+window.scrollY-this.wrapper.offsetHeight+i-o,n=t.left+window.scrollX+t.width/2-this.wrapper.offsetWidth/2+e;break;case"bottom":s=t.bottom+window.scrollY+i+o,n=t.left+window.scrollX+t.width/2-this.wrapper.offsetWidth/2+e;break;case"left":s=t.top+window.scrollY+t.height/2-this.wrapper.offsetHeight/2+i,n=t.left+window.scrollX-this.wrapper.offsetWidth-e-o;break;case"right":s=t.top+window.scrollY+t.height/2-this.wrapper.offsetHeight/2+i,n=t.right+window.scrollX+e+o}Object.assign(this.wrapper.style,{top:`${s}px`,left:`${n}px`})}))}observeParent(){this.parentRef&&(this.resizeObserver=new ResizeObserver((()=>this.updatePosition())),this.resizeObserver.observe(this.parentRef),this.mutationObserver=new MutationObserver((()=>this.updatePosition())),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0}))}unobserveParent(){this.resizeObserver?.disconnect(),this.mutationObserver?.disconnect()}handleMouseDown(t){this.isInsideClick=!!(this.wrapper&&this.wrapper.contains(t.target)||this.parentRef&&this.parentRef.contains(t.target))}handleWindowClick(t){this.isInsideClick?this.isInsideClick=!1:this.wrapper?.contains(t.target)||this.close.emit()}render(){return o("slot",{key:"f463fadca5060ebc995d8115575404611b94fb11"})}};m.style=".sd-floating-menu{width:fit-content;padding:12px 16px;border-radius:6px;font-size:12px;font-weight:500;line-height:20px;position:relative;box-sizing:border-box;background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);animation:sd-floating-fade-in 0.35s ease-out}.sd-floating-menu--top{animation-name:sd-floating-slide-top}.sd-floating-menu--bottom{animation-name:sd-floating-slide-bottom}.sd-floating-menu--left{animation-name:sd-floating-slide-left}.sd-floating-menu--right{animation-name:sd-floating-slide-right}.sd-floating-menu .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--default{background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);font-weight:500}.sd-floating-menu--default .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--danger{background:var(--sd-floating-bg, #FCE6E6);color:var(--sd-floating-content, #FB4444);font-weight:700}.sd-floating-menu--danger .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FCE6E6)}.sd-floating-menu--warning{background:var(--sd-floating-bg, #FEF1EA);color:var(--sd-floating-content, #FF6B00);font-weight:700}.sd-floating-menu--warning .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FEF1EA)}.sd-floating-menu--accent{background:var(--sd-floating-bg, #E6F1FF);color:var(--sd-floating-content, #0075FF);font-weight:700}.sd-floating-menu--accent .sd-floating-menu__arrow{color:var(--sd-floating-bg, #E6F1FF)}.sd-floating-menu__arrow{position:absolute;display:flex;width:16px;height:12px}.sd-floating-menu__arrow svg{width:100%;height:100%}.sd-floating-menu__arrow--top{bottom:-12px;left:50%;transform:translateX(-50%)}.sd-floating-menu__arrow--bottom{top:-12px;left:50%;transform:translateX(-50%) rotate(180deg)}.sd-floating-menu__arrow--left{right:-12px;top:50%;transform:translateY(-50%) rotate(-90deg)}.sd-floating-menu__arrow--right{left:-12px;top:50%;transform:translateY(-50%) rotate(90deg)}.sd-floating-menu__content{font-size:12px;line-height:20px}.sd-floating-menu__content .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px;margin-bottom:4px}.sd-floating-menu__content .sd-floating-menu__messages{font-weight:500}.sd-floating-menu__content .sd-floating-menu__buttons{margin-top:12px;display:flex;gap:8px;align-items:center}.sd-floating-menu__content .sd-floating-menu__buttons--1{justify-content:flex-end}.sd-floating-menu__content .sd-floating-menu__buttons--2{justify-content:space-between}.sd-floating-menu--popover{padding:16px 20px}.sd-floating-menu--popover .sd-floating-menu__content{gap:4px}.sd-floating-menu--popover .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px}.sd-floating-menu--popover .sd-floating-menu__messages{font-size:12px;font-weight:500;line-height:20px}.sd-floating-menu--closing{animation:sd-floating-fade-out 0.15s ease-in forwards}.sd-floating-menu--closing.sd-floating-menu--top{animation-name:sd-floating-slide-out-top}.sd-floating-menu--closing.sd-floating-menu--bottom{animation-name:sd-floating-slide-out-bottom}.sd-floating-menu--closing.sd-floating-menu--left{animation-name:sd-floating-slide-out-left}.sd-floating-menu--closing.sd-floating-menu--right{animation-name:sd-floating-slide-out-right}.sd-floating-menu__close-button{position:absolute;top:12px;right:12px}@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 v={bg:"#07284A",content:"#FFFFFF"},x={bg:"#FCEFEF",content:"#FB4444"},y={bg:"#FEF1EA",content:"#FF6B00"},_={bg:"#E6F1FF",content:"#0075FF"};const w={default:{bg:v.bg,content:v.content},danger:{bg:x.bg,content:x.content},warning:{bg:y.bg,content:y.content},accent:{bg:_.bg,content:_.content}},k=class{constructor(e){t(this,e)}get el(){return i(this)}trigger="hover";placement="top";color="#01BB4B";tooltipType="default";icon="helpOutline";iconSize=12;label="";buttonSize="sm";buttonVariant="primary";noHover=!0;sdClass="";showTooltip=!1;slotContentHTML="";buttonEl;menuEl;hideTimeout;closeTimeout;static CLOSE_ANIM_MS=150;show=()=>{this.cancelHideTimer(),this.showTooltip=!0,this.menuEl&&this.menuEl.classList.remove("sd-floating-menu--closing")};hide=()=>{this.menuEl&&this.menuEl.classList.add("sd-floating-menu--closing"),this.closeTimeout=setTimeout((()=>{this.showTooltip=!1}),k.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",i=this.tooltipType??"default",n=this.icon??"helpOutline",d=this.color??"#01BB4B",r=w[i]??w.default,l=()=>this.showTooltip=!this.showTooltip;return o(s,{key:"aade7a4be8e9955ca4dc437845ee8de9d212fd61"},o("div",{key:"332c4872541bea334c1f0b6f06de8a1789dc10b8",class:`sd-tooltip-trigger ${this.sdClass||""}`,..."hover"===t?{onMouseEnter:()=>this.show(),onMouseLeave:()=>this.startHideTimer()}:this.label?{}:{onClick:l}},this.label?o("sd-button",{ref:t=>this.buttonEl=t,label:this.label,icon:n,size:this.buttonSize??"sm",color:d,variant:this.buttonVariant??"primary",class:"sd-tooltip",..."click"===t&&this.label?{onSdClick:l}:{}}):o("sd-icon",{ref:t=>this.buttonEl=t,name:n,size:this.iconSize??12,color:d,class:"sd-tooltip"})),this.showTooltip&&o("sd-floating-portal",{key:"96f19d91f765020ae5663f216011e2000617c9d1",parentRef:this.buttonEl,onSdClose:this.handleClose.bind(this),placement:e,offset:this.tooltipOffset},o("div",{key:"12c2f1fbf59dc1a790016da071805164b0426419",ref:t=>this.menuEl=t,class:{"sd-floating-menu":!0,[`sd-floating-menu--${i}`]:!0,[`sd-floating-menu--${e}`]:!0},style:{"--sd-floating-bg":r.bg,"--sd-floating-content":r.content},onMouseEnter:()=>this.show(),onMouseLeave:()=>this.startHideTimer()},o("i",{key:"f69c0cb66d5be975f60bfa7cdbd46e0283d4af2b",class:`sd-floating-menu__arrow sd-floating-menu__arrow--${e}`},o(a,{key:"3fbc2c3baa903e80d525225ab1f1aa4b3ec6ad4b"})),o("div",{key:"a2286ef4e9f5d6c1b1a26ea044ddf1051900c5a2",class:"sd-floating-menu__content",innerHTML:this.slotContentHTML}))))}};k.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{l as sd_button,g as sd_field,m as sd_floating_portal,k as sd_tooltip}
@@ -1 +0,0 @@
1
- import{r as e,c as i,a as t,h as s}from"./p-BGyJgVXm.js";var l={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 r={height:l.height,paddingX:l.paddingX,gap:l.gap,radius:l.radius,fontSize:l.typography.fontSize,lineHeight:l.typography.lineHeight,fontWeight:l.typography.fontWeight,iconSize:l.size.icon},o={text:l.text,icon:{default:"#888888",disabled:l.icon.disabled}},d=class{constructor(t){e(this,t),this.update=i(this,"sdUpdate",7),this.reject=i(this,"sdReject",7)}get el(){return t(this)}value=null;placeholder="Click to upload";disabled=!1;inline=!1;multiple=!1;accept;maxFileSize;maxTotalSize;maxFiles;name="";label="";labelWidth="";addonLabel="";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?.sdReset())}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(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:this.placeholder}checkOverflow(){this.fileNamesRef&&(this.showTooltip=this.fileNamesRef.scrollWidth>this.fileNamesRef.clientWidth)}getIconColor(){return this.disabled?o.icon.disabled:o.icon.default}render(){const e=this.hasFiles(),i=this.getDisplayText(),t={"--sd-file-picker-font-size":`${r.fontSize}px`,"--sd-file-picker-line-height":`${r.lineHeight}px`,"--sd-file-picker-font-weight":r.fontWeight,"--sd-file-picker-padding-x":`${r.paddingX}px`,"--sd-file-picker-gap":`${r.gap}px`,"--sd-file-picker-text-color":o.text.default,"--sd-file-picker-placeholder-color":o.text.placeholder,"--sd-file-picker-disabled-color":o.text.disabled,"--sd-system-size-field-sm-height":`${r.height}px`,"--sd-system-radius-field-sm":`${r.radius}px`},l=s("div",{class:"sd-file-picker__content",onClick: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}),s("sd-icon",{name:"attachFile",size:Number(r.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,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}]}}};d.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)}";export{d as sd_file_picker}
@@ -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 h,a as d}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 ~ YYYY-MM-DD";selectable;maxRange;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)};get displayText(){return this.value&&this.value[0]&&this.value[1]?`${this.value[0]} ~ ${this.value[1]}`:""}disconnectedCallback(){this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e=d[this.size]??d.md;return i("sd-field",{key:"95ec666c91635d6b6b749d660b4495b7ebe48e6a",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":h.border.default,"--sd-system-color-field-border-focus":h.border.focus,"--sd-system-color-field-bg-default":h.bg.default}},i("div",{key:"3051fda66e94d51208347ae2053173570d5f1ca9",class:"sd-date-range-picker",ref:e=>{this.triggerRef=e}},i("sd-date-picker-trigger",{key:"71693b5a4cec562169d9427a4e19aed4d8b19a45",displayText:this.displayText,placeholder:this.placeholder,disabled:this.disabled,size:this.size,onSdTriggerClick:this.handleTriggerClick})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"75b9f1c1ebdabcd1c1a33cad51189ba132274bb1",open:this.isOpen,parentRef:this.triggerRef,onSdClose:()=>this.closeDropdown()},i("sd-date-range-picker-calendar",{key:"f158eead4f44bc452bf102b3324721df84fc3b0c",value:this.value,selectable:this.selectable,maxRange:this.maxRange,onSdSelect:this.handleSelect,onSdViewChange:this.handleViewChange})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}};r.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%}";export{r as sd_date_range_picker}