@sellmate/design-system 1.0.63 → 1.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-action-modal.cjs.entry.js +12 -2
- package/dist/cjs/sd-barcode-input.cjs.entry.js +2 -1
- package/dist/cjs/sd-button_4.cjs.entry.js +14 -8
- package/dist/cjs/sd-date-picker.cjs.entry.js +3 -2
- package/dist/cjs/sd-date-range-picker.cjs.entry.js +3 -2
- package/dist/cjs/sd-file-picker.cjs.entry.js +2 -1
- package/dist/cjs/sd-input_2.cjs.entry.js +3 -2
- package/dist/cjs/sd-number-input.cjs.entry.js +4 -3
- package/dist/cjs/sd-pagination_2.cjs.entry.js +4 -3
- package/dist/cjs/sd-portal.cjs.entry.js +3 -3
- package/dist/cjs/sd-select-group.cjs.entry.js +2 -1
- package/dist/cjs/sd-select-multiple-group.cjs.entry.js +2 -1
- package/dist/cjs/sd-select-multiple.cjs.entry.js +2 -1
- package/dist/cjs/sd-select.cjs.entry.js +2 -1
- package/dist/cjs/sd-textarea.cjs.entry.js +2 -1
- package/dist/collection/components/sd-action-modal/sd-action-modal.css +4 -2
- package/dist/collection/components/sd-action-modal/sd-action-modal.js +49 -1
- package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +22 -1
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +23 -2
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +23 -2
- package/dist/collection/components/sd-field/sd-field.css +7 -0
- package/dist/collection/components/sd-field/sd-field.js +30 -4
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +22 -1
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +4 -4
- package/dist/collection/components/sd-input/sd-input.js +23 -2
- package/dist/collection/components/sd-number-input/sd-number-input.js +24 -3
- package/dist/collection/components/sd-portal/sd-portal.js +4 -4
- package/dist/collection/components/sd-select/sd-select.js +22 -1
- package/dist/collection/components/sd-select-group/sd-select-group.js +22 -1
- package/dist/collection/components/sd-select-multiple/sd-select-multiple.js +22 -1
- package/dist/collection/components/sd-select-multiple-group/sd-select-multiple-group.js +22 -1
- package/dist/collection/components/sd-select-v2/sd-select-v2.js +24 -3
- package/dist/collection/components/sd-textarea/sd-textarea.js +22 -1
- package/dist/collection/utils/modal.js +2 -2
- package/dist/components/index.js +1 -1
- package/dist/components/{p-DUqX35W_.js → p-BH3z_vB9.js} +1 -1
- package/dist/components/{p-DgYBr7xb.js → p-CAeSM6Ov.js} +1 -1
- package/dist/components/{p-BZ7V5xV5.js → p-Cc7ZBscb.js} +1 -1
- package/dist/components/p-Cpg2hVm3.js +1 -0
- package/dist/components/p-DXtyg5eK.js +1 -0
- package/dist/components/p-HsTw_qYU.js +1 -0
- package/dist/components/p-fcZvjHk_.js +1 -0
- package/dist/components/p-h6zSUtA2.js +1 -0
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-date-picker.js +1 -1
- package/dist/components/sd-date-range-picker.js +1 -1
- package/dist/components/sd-dropdown-button.js +1 -1
- package/dist/components/sd-field.js +1 -1
- package/dist/components/sd-file-picker.js +1 -1
- package/dist/components/sd-floating-portal.js +1 -1
- package/dist/components/sd-guide.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-select-dropdown.js +1 -1
- package/dist/components/sd-select-group.js +1 -1
- package/dist/components/sd-select-multiple-group.js +1 -1
- package/dist/components/sd-select-multiple.js +1 -1
- package/dist/components/sd-select-search-input.js +1 -1
- package/dist/components/sd-select-v2.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-table.js +1 -1
- package/dist/components/sd-textarea.js +1 -1
- package/dist/components/sd-thead.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/index.esm.js +1 -1
- package/dist/design-system/p-010e4f47.entry.js +1 -0
- package/dist/design-system/p-05ce3449.entry.js +1 -0
- package/dist/design-system/p-2ae97b1c.entry.js +1 -0
- package/dist/design-system/p-6644c4a0.entry.js +1 -0
- package/dist/design-system/p-96b14db1.entry.js +1 -0
- package/dist/design-system/p-a983560d.entry.js +1 -0
- package/dist/design-system/p-b291a2f5.entry.js +1 -0
- package/dist/design-system/p-b3279f07.entry.js +1 -0
- package/dist/design-system/p-b81e0493.entry.js +1 -0
- package/dist/design-system/p-cf1156cb.entry.js +1 -0
- package/dist/design-system/p-d040ec6f.entry.js +1 -0
- package/dist/design-system/p-d8eb17a8.entry.js +1 -0
- package/dist/design-system/p-e5f71ec0.entry.js +1 -0
- package/dist/design-system/p-ed61fe19.entry.js +1 -0
- package/dist/design-system/p-f3d082c8.entry.js +1 -0
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-action-modal.entry.js +12 -2
- package/dist/esm/sd-barcode-input.entry.js +2 -1
- package/dist/esm/sd-button_4.entry.js +14 -8
- package/dist/esm/sd-date-picker.entry.js +3 -2
- package/dist/esm/sd-date-range-picker.entry.js +3 -2
- package/dist/esm/sd-file-picker.entry.js +2 -1
- package/dist/esm/sd-input_2.entry.js +3 -2
- package/dist/esm/sd-number-input.entry.js +4 -3
- package/dist/esm/sd-pagination_2.entry.js +4 -3
- package/dist/esm/sd-portal.entry.js +3 -3
- package/dist/esm/sd-select-group.entry.js +2 -1
- package/dist/esm/sd-select-multiple-group.entry.js +2 -1
- package/dist/esm/sd-select-multiple.entry.js +2 -1
- package/dist/esm/sd-select.entry.js +2 -1
- package/dist/esm/sd-textarea.entry.js +2 -1
- package/dist/types/components/sd-action-modal/sd-action-modal.d.ts +2 -0
- package/dist/types/components/sd-barcode-input/sd-barcode-input.d.ts +1 -0
- package/dist/types/components/sd-date-picker/sd-date-picker.d.ts +1 -0
- package/dist/types/components/sd-date-range-picker/sd-date-range-picker.d.ts +1 -0
- package/dist/types/components/sd-field/sd-field.d.ts +1 -0
- package/dist/types/components/sd-file-picker/sd-file-picker.d.ts +1 -0
- package/dist/types/components/sd-input/sd-input.d.ts +1 -0
- package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +1 -1
- package/dist/types/components/sd-number-input/sd-number-input.d.ts +1 -0
- package/dist/types/components/sd-select/sd-select.d.ts +1 -0
- package/dist/types/components/sd-select-group/sd-select-group.d.ts +1 -0
- package/dist/types/components/sd-select-multiple/sd-select-multiple.d.ts +1 -0
- package/dist/types/components/sd-select-multiple-group/sd-select-multiple-group.d.ts +1 -0
- package/dist/types/components/sd-select-v2/sd-select-v2.d.ts +1 -0
- package/dist/types/components/sd-textarea/sd-textarea.d.ts +1 -0
- package/dist/types/components.d.ts +127 -4
- package/hydrate/index.js +76 -33
- package/hydrate/index.mjs +76 -33
- package/package.json +1 -1
- package/dist/components/p-BgRPWxrz.js +0 -1
- package/dist/components/p-DxzgCf_d.js +0 -1
- package/dist/components/p-aC4HJHug.js +0 -1
- package/dist/components/p-e35Du7-7.js +0 -1
- package/dist/components/p-e8HA30H_.js +0 -1
- package/dist/design-system/p-0ca594a4.entry.js +0 -1
- package/dist/design-system/p-1b9e427e.entry.js +0 -1
- package/dist/design-system/p-1cbe4b22.entry.js +0 -1
- package/dist/design-system/p-1d310832.entry.js +0 -1
- package/dist/design-system/p-656acb07.entry.js +0 -1
- package/dist/design-system/p-748ece8e.entry.js +0 -1
- package/dist/design-system/p-9af7e19a.entry.js +0 -1
- package/dist/design-system/p-a24c3431.entry.js +0 -1
- package/dist/design-system/p-a9a91e69.entry.js +0 -1
- package/dist/design-system/p-c2f3470f.entry.js +0 -1
- package/dist/design-system/p-c98ed6ae.entry.js +0 -1
- package/dist/design-system/p-ca80379a.entry.js +0 -1
- package/dist/design-system/p-e9f24d23.entry.js +0 -1
- package/dist/design-system/p-ec79fefd.entry.js +0 -1
- package/dist/design-system/p-f3a60f61.entry.js +0 -1
package/hydrate/index.mjs
CHANGED
|
@@ -5400,7 +5400,7 @@ const ACTION_MODAL_TITLE = {
|
|
|
5400
5400
|
lineHeight: Number(action.title.typography.lineHeight),
|
|
5401
5401
|
};
|
|
5402
5402
|
|
|
5403
|
-
const sdActionModalCss = () => `sd-action-modal{display:block
|
|
5403
|
+
const sdActionModalCss = () => `sd-action-modal{display:block}sd-action-modal .sd-action-modal{position:relative;display:flex;flex-direction:column;width:fit-content;min-width:520px;border-radius:var(--sd-action-modal-radius);background:var(--sd-action-modal-bg);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);overflow:hidden}sd-action-modal .sd-action-modal__header{display:flex;align-items:center;flex-shrink:0;gap:var(--sd-action-modal-header-gap);padding:var(--sd-action-modal-header-padding-y) calc(var(--sd-action-modal-header-padding-x) + 20px) var(--sd-action-modal-header-padding-y) var(--sd-action-modal-header-padding-x)}sd-action-modal .sd-action-modal__title{margin:0;color:var(--sd-action-modal-title-color);font-family:var(--sd-action-modal-title-font-family);font-weight:var(--sd-action-modal-title-font-weight);font-size:var(--sd-action-modal-title-font-size);line-height:var(--sd-action-modal-title-line-height);white-space:nowrap}sd-action-modal .sd-action-modal__header-sub{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px}sd-action-modal .sd-action-modal__header-sub:empty{display:none}sd-action-modal .sd-action-modal__close{position:absolute;top:16px;right:16px;cursor:pointer}sd-action-modal .sd-action-modal__body{flex:1 1 auto;min-height:0;padding:0 var(--sd-action-modal-body-padding-x) var(--sd-action-modal-body-padding-bottom);overflow:auto}sd-action-modal .sd-action-modal__footer{display:flex;align-items:center;flex-shrink:0;gap:var(--sd-action-modal-footer-gap);padding:var(--sd-action-modal-footer-padding-y) var(--sd-action-modal-footer-padding-x);background:var(--sd-action-modal-footer-bg);border-top:1px solid var(--sd-action-modal-footer-border)}sd-action-modal .sd-action-modal__footer>sd-button-v2{margin-left:auto}sd-action-modal .sd-action-modal__footer-sub{display:flex;align-items:center;gap:8px;min-width:0}sd-action-modal .sd-action-modal__footer-sub:empty{display:none}`;
|
|
5404
5404
|
|
|
5405
5405
|
const DEFAULT_BUTTON_PROPS = {
|
|
5406
5406
|
name: 'primary_md',
|
|
@@ -5414,6 +5414,8 @@ class SdActionModal {
|
|
|
5414
5414
|
}
|
|
5415
5415
|
modalTitle = '';
|
|
5416
5416
|
buttonProps = {};
|
|
5417
|
+
width;
|
|
5418
|
+
height;
|
|
5417
5419
|
close;
|
|
5418
5420
|
ok;
|
|
5419
5421
|
render() {
|
|
@@ -5436,7 +5438,15 @@ class SdActionModal {
|
|
|
5436
5438
|
'--sd-action-modal-title-font-size': `${ACTION_MODAL_TITLE.fontSize}px`,
|
|
5437
5439
|
'--sd-action-modal-title-line-height': `${ACTION_MODAL_TITLE.lineHeight}px`,
|
|
5438
5440
|
};
|
|
5439
|
-
|
|
5441
|
+
const sizeStyle = {};
|
|
5442
|
+
if (this.width != null && this.width !== '') {
|
|
5443
|
+
sizeStyle.width = typeof this.width === 'number' ? `${this.width}px` : this.width;
|
|
5444
|
+
sizeStyle.minWidth = '0';
|
|
5445
|
+
}
|
|
5446
|
+
if (this.height != null && this.height !== '') {
|
|
5447
|
+
sizeStyle.height = typeof this.height === 'number' ? `${this.height}px` : this.height;
|
|
5448
|
+
}
|
|
5449
|
+
return (hAsync("div", { key: '566cba5061dbc13229ab2b51375cc4008f472343', class: "sd-action-modal", style: { ...cssVars, ...sizeStyle } }, hAsync("header", { key: 'fe396d5a90282deb3a9b42be4f451ee89648d20a', class: "sd-action-modal__header" }, hAsync("h2", { key: '7086fd3acf6be20d244f1c493d0f2669fb65dd01', class: "sd-action-modal__title" }, this.modalTitle), hAsync("div", { key: '90a7ae7d6a0a5c22921912e705ebfdee721e7e4a', class: "sd-action-modal__header-sub" }, hAsync("slot", { key: '74daa609d40f22dc825ea2a4a68e6d51d0db1f75', name: "header-sub-title" })), hAsync("sd-ghost-button", { key: '1d38b1374172f7a060ef3781079d301ae1fea84a', class: "sd-action-modal__close", icon: "close", ariaLabel: "close", onClick: () => this.close.emit() })), hAsync("div", { key: '657659d94d24581c6f33b8ab6d5dd74260cf22ad', class: "sd-action-modal__body" }, hAsync("slot", { key: '6f05c054e98537c43a78b72e14351092266933b2', name: "body" })), hAsync("footer", { key: 'dbd38be86c98e556039baa97ef2d84c48839e687', class: "sd-action-modal__footer" }, hAsync("div", { key: '268dfd29463453b9db4976145469f5045f2be16d', class: "sd-action-modal__footer-sub" }, hAsync("slot", { key: '38c76ecba8652c32807be076a898db75f87ea8f9', name: "bottom-sub-content" })), hAsync("sd-button-v2", { key: '5b4a651bbd35412b9b02bed7709d0bc27792811e', ...DEFAULT_BUTTON_PROPS, ...this.buttonProps, onSdClick: () => this.ok.emit() }))));
|
|
5440
5450
|
}
|
|
5441
5451
|
static get style() { return sdActionModalCss(); }
|
|
5442
5452
|
static get cmpMeta() { return {
|
|
@@ -5444,7 +5454,9 @@ class SdActionModal {
|
|
|
5444
5454
|
"$tagName$": "sd-action-modal",
|
|
5445
5455
|
"$members$": {
|
|
5446
5456
|
"modalTitle": [1, "modal-title"],
|
|
5447
|
-
"buttonProps": [16]
|
|
5457
|
+
"buttonProps": [16],
|
|
5458
|
+
"width": [8],
|
|
5459
|
+
"height": [8]
|
|
5448
5460
|
},
|
|
5449
5461
|
"$listeners$": undefined,
|
|
5450
5462
|
"$lazyBundleId$": "-",
|
|
@@ -5616,6 +5628,7 @@ class SdBarcodeInput {
|
|
|
5616
5628
|
hovered = false;
|
|
5617
5629
|
// props - label
|
|
5618
5630
|
label = '';
|
|
5631
|
+
labelWidth = '';
|
|
5619
5632
|
icon = undefined;
|
|
5620
5633
|
labelTooltip = '';
|
|
5621
5634
|
labelTooltipProps = null;
|
|
@@ -5694,7 +5707,7 @@ class SdBarcodeInput {
|
|
|
5694
5707
|
'--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
|
|
5695
5708
|
'--sd-system-color-field-bg-default': BARCODE_INPUT_COLORS.bg.barcode,
|
|
5696
5709
|
};
|
|
5697
|
-
return (hAsync("sd-field", { key: '
|
|
5710
|
+
return (hAsync("sd-field", { key: 'bba439856e0cbaedc7b54411dac904f9c845b50c', 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: '8553cfb4b5ef9535608abc1f2987ce08970c318a', class: "sd-barcode-input__content" }, hAsync("slot", { key: '93db2b38e8d674230f48e3b9496a7221d8477da6', name: "prefix" }), hAsync("input", { key: '30997bea593052322a2d29fc1e517b00cf19b1fb', 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: '690daa6c1daa6058713ee09b0efe976557cde3ab', name: "suffix" }), this.clearable && this.internalValue && (hAsync("sd-ghost-button", { key: '8ab4e45a23d1b06dc415d969e25ed5ea59540643', icon: "close", ariaLabel: "close", size: "xxs", disabled: this.disabled, class: "sd-barcode-input__clear-icon", onClick: async () => {
|
|
5698
5711
|
if (this.disabled)
|
|
5699
5712
|
return;
|
|
5700
5713
|
this.internalValue = '';
|
|
@@ -5732,6 +5745,7 @@ class SdBarcodeInput {
|
|
|
5732
5745
|
"focused": [1028],
|
|
5733
5746
|
"hovered": [1028],
|
|
5734
5747
|
"label": [1],
|
|
5748
|
+
"labelWidth": [8, "label-width"],
|
|
5735
5749
|
"icon": [16],
|
|
5736
5750
|
"labelTooltip": [1, "label-tooltip"],
|
|
5737
5751
|
"labelTooltipProps": [16],
|
|
@@ -7344,6 +7358,7 @@ class SdDatePicker {
|
|
|
7344
7358
|
width = '';
|
|
7345
7359
|
// sd-field 공통 props
|
|
7346
7360
|
label = '';
|
|
7361
|
+
labelWidth = '';
|
|
7347
7362
|
addonLabel = '';
|
|
7348
7363
|
hint = '';
|
|
7349
7364
|
errorMessage = '';
|
|
@@ -7423,9 +7438,9 @@ class SdDatePicker {
|
|
|
7423
7438
|
'--sd-system-color-field-border-focus': DATEPICKER_COLORS.border.focus,
|
|
7424
7439
|
'--sd-system-color-field-bg-default': DATEPICKER_COLORS.bg.default,
|
|
7425
7440
|
};
|
|
7426
|
-
return (hAsync("sd-field", { key: '
|
|
7441
|
+
return (hAsync("sd-field", { key: '693c0c75e6b0a9ee8323f4be7ec101592e586372', 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: 'ea7f506f0163119fac0c660ef1bef5781780a118', class: "sd-date-picker", ref: el => {
|
|
7427
7442
|
this.triggerRef = el;
|
|
7428
|
-
} }, hAsync("sd-date-picker-trigger", { key: '
|
|
7443
|
+
} }, hAsync("sd-date-picker-trigger", { key: '0109eb0326655018bc02cc373e766ffdada85ff0', displayText: this.value ?? '', placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (hAsync("sd-portal", { key: '65a628af43ae036a752f3511341fd8c9c82303a1', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, hAsync("sd-date-picker-calendar", { key: '21f574fc9551f9aaccfcb5d49a81952dbba72d7a', value: this.value, selectable: this.selectable, onSdSelect: this.handleSelect, onSdViewChange: this.handleViewChange })))));
|
|
7429
7444
|
}
|
|
7430
7445
|
static get watchers() { return {
|
|
7431
7446
|
"isOpen": [{
|
|
@@ -7444,6 +7459,7 @@ class SdDatePicker {
|
|
|
7444
7459
|
"disabled": [516],
|
|
7445
7460
|
"width": [8],
|
|
7446
7461
|
"label": [1],
|
|
7462
|
+
"labelWidth": [8, "label-width"],
|
|
7447
7463
|
"addonLabel": [1, "addon-label"],
|
|
7448
7464
|
"hint": [1],
|
|
7449
7465
|
"errorMessage": [1, "error-message"],
|
|
@@ -7723,6 +7739,7 @@ class SdDateRangePicker {
|
|
|
7723
7739
|
width = '';
|
|
7724
7740
|
// sd-field 공통 props
|
|
7725
7741
|
label = '';
|
|
7742
|
+
labelWidth = '';
|
|
7726
7743
|
addonLabel = '';
|
|
7727
7744
|
hint = '';
|
|
7728
7745
|
errorMessage = '';
|
|
@@ -7807,9 +7824,9 @@ class SdDateRangePicker {
|
|
|
7807
7824
|
'--sd-system-color-field-border-focus': DATEPICKER_COLORS.border.focus,
|
|
7808
7825
|
'--sd-system-color-field-bg-default': DATEPICKER_COLORS.bg.default,
|
|
7809
7826
|
};
|
|
7810
|
-
return (hAsync("sd-field", { key: '
|
|
7827
|
+
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 => {
|
|
7811
7828
|
this.triggerRef = el;
|
|
7812
|
-
} }, hAsync("sd-date-picker-trigger", { key: '
|
|
7829
|
+
} }, 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 })))));
|
|
7813
7830
|
}
|
|
7814
7831
|
static get watchers() { return {
|
|
7815
7832
|
"isOpen": [{
|
|
@@ -7829,6 +7846,7 @@ class SdDateRangePicker {
|
|
|
7829
7846
|
"disabled": [516],
|
|
7830
7847
|
"width": [8],
|
|
7831
7848
|
"label": [1],
|
|
7849
|
+
"labelWidth": [8, "label-width"],
|
|
7832
7850
|
"addonLabel": [1, "addon-label"],
|
|
7833
7851
|
"hint": [1],
|
|
7834
7852
|
"errorMessage": [1, "error-message"],
|
|
@@ -8567,7 +8585,7 @@ const FIELD_LABEL_SIZE_MAP = {
|
|
|
8567
8585
|
},
|
|
8568
8586
|
};
|
|
8569
8587
|
|
|
8570
|
-
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;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)}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}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:var(--sd-field-label-gap)}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)}`;
|
|
8588
|
+
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)}`;
|
|
8571
8589
|
|
|
8572
8590
|
const FORM_PARENT_TAGS = [
|
|
8573
8591
|
'sd-select',
|
|
@@ -8600,6 +8618,7 @@ class SdField {
|
|
|
8600
8618
|
size = 'sm';
|
|
8601
8619
|
// props - label
|
|
8602
8620
|
label = '';
|
|
8621
|
+
labelWidth = '';
|
|
8603
8622
|
addonLabel = '';
|
|
8604
8623
|
icon = undefined;
|
|
8605
8624
|
labelTooltip = '';
|
|
@@ -8712,6 +8731,11 @@ class SdField {
|
|
|
8712
8731
|
'--sd-field-label-font-size': `${labelTokens.fontSize}px`,
|
|
8713
8732
|
'--sd-field-label-line-height': `${labelTokens.lineHeight}px`,
|
|
8714
8733
|
'--sd-field-label-font-weight': labelTokens.fontWeight,
|
|
8734
|
+
...(this.labelWidth
|
|
8735
|
+
? {
|
|
8736
|
+
'--sd-field-label-width': typeof this.labelWidth === 'number' ? `${this.labelWidth}px` : this.labelWidth,
|
|
8737
|
+
}
|
|
8738
|
+
: {}),
|
|
8715
8739
|
}
|
|
8716
8740
|
: {};
|
|
8717
8741
|
const addonCssVars = addon
|
|
@@ -8728,20 +8752,20 @@ class SdField {
|
|
|
8728
8752
|
'--sd-field-addon-border-width': `${addonTokens.border.width}px`,
|
|
8729
8753
|
}
|
|
8730
8754
|
: {};
|
|
8731
|
-
return (hAsync("div", { key: '
|
|
8755
|
+
return (hAsync("div", { key: 'f12b2e13ac8152d1e688f903a60a8fa670e99065', class: {
|
|
8732
8756
|
'sd-field': true,
|
|
8733
8757
|
'sd-field--has-label': !!this.label,
|
|
8734
8758
|
'sd-field--has-addon': !!addon,
|
|
8735
8759
|
[this.fieldStatus]: !!this.fieldStatus,
|
|
8736
|
-
}, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars } }, hAsync("div", { key: '
|
|
8760
|
+
}, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars } }, hAsync("div", { key: '79f7a40b5e1ee95bb9075b0855e22261cd8adc6a', class: "sd-field__wrapper" }, this.renderLabel(this.label), hAsync("div", { key: '54b5bbfbe18df48c40cc30ec3d6761ccd8e446cc', class: "sd-field__main", style: this.width
|
|
8737
8761
|
? {
|
|
8738
8762
|
width: typeof this.width === 'number' ? `${this.width}px` : this.width,
|
|
8739
8763
|
flex: 'none',
|
|
8740
8764
|
}
|
|
8741
|
-
: {} }, hAsync("div", { key: '
|
|
8765
|
+
: {} }, hAsync("div", { key: '39542908287175ade4d6e0f1acd2cb1f03c9e2a1', class: {
|
|
8742
8766
|
'sd-field__control': true,
|
|
8743
8767
|
'sd-field__control--has-addon': !!addon,
|
|
8744
|
-
} }, addon && hAsync("div", { key: '
|
|
8768
|
+
} }, addon && hAsync("div", { key: '236650de53d1d1951f26586aa0d22f0f267fc411', class: "sd-field__addon" }, addon), hAsync("slot", { key: '41df3dca21aa68d3324617891f2555f1c488a61b' })), 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))))));
|
|
8745
8769
|
}
|
|
8746
8770
|
renderLabel(label) {
|
|
8747
8771
|
if (!label)
|
|
@@ -8765,6 +8789,7 @@ class SdField {
|
|
|
8765
8789
|
"width": [8],
|
|
8766
8790
|
"size": [513],
|
|
8767
8791
|
"label": [1],
|
|
8792
|
+
"labelWidth": [8, "label-width"],
|
|
8768
8793
|
"addonLabel": [1, "addon-label"],
|
|
8769
8794
|
"icon": [16],
|
|
8770
8795
|
"labelTooltip": [1, "label-tooltip"],
|
|
@@ -8845,6 +8870,7 @@ class SdFilePicker {
|
|
|
8845
8870
|
// sd-field 패스스루 props
|
|
8846
8871
|
name = '';
|
|
8847
8872
|
label = '';
|
|
8873
|
+
labelWidth = '';
|
|
8848
8874
|
addonLabel = '';
|
|
8849
8875
|
hint = '';
|
|
8850
8876
|
errorMessage = '';
|
|
@@ -9007,7 +9033,7 @@ class SdFilePicker {
|
|
|
9007
9033
|
'sd-file-picker--inline-disabled': this.disabled,
|
|
9008
9034
|
}, style: cssVars, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, content));
|
|
9009
9035
|
}
|
|
9010
|
-
return (hAsync("sd-field", { name: this.name, label: this.label, addonLabel: this.addonLabel, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, content));
|
|
9036
|
+
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));
|
|
9011
9037
|
}
|
|
9012
9038
|
static get watchers() { return {
|
|
9013
9039
|
"value": [{
|
|
@@ -9030,6 +9056,7 @@ class SdFilePicker {
|
|
|
9030
9056
|
"maxFiles": [8, "max-files"],
|
|
9031
9057
|
"name": [1],
|
|
9032
9058
|
"label": [1],
|
|
9059
|
+
"labelWidth": [8, "label-width"],
|
|
9033
9060
|
"addonLabel": [1, "addon-label"],
|
|
9034
9061
|
"hint": [1],
|
|
9035
9062
|
"errorMessage": [1, "error-message"],
|
|
@@ -9065,7 +9092,7 @@ class SdFloatingPopover {
|
|
|
9065
9092
|
to = 'body';
|
|
9066
9093
|
parentRef = null;
|
|
9067
9094
|
offset = [0, 0];
|
|
9068
|
-
zIndex =
|
|
9095
|
+
zIndex = 10000;
|
|
9069
9096
|
placement = 'bottom';
|
|
9070
9097
|
open = false;
|
|
9071
9098
|
close;
|
|
@@ -9123,7 +9150,7 @@ class SdFloatingPopover {
|
|
|
9123
9150
|
this.wrapper = document.createElement('div');
|
|
9124
9151
|
Object.assign(this.wrapper.style, {
|
|
9125
9152
|
position: 'absolute',
|
|
9126
|
-
zIndex: (this.zIndex ??
|
|
9153
|
+
zIndex: (this.zIndex ?? 10000).toString(),
|
|
9127
9154
|
transition: 'opacity 0.4s',
|
|
9128
9155
|
top: '-9999px',
|
|
9129
9156
|
left: '-9999px',
|
|
@@ -9205,7 +9232,7 @@ class SdFloatingPopover {
|
|
|
9205
9232
|
this.close.emit();
|
|
9206
9233
|
}
|
|
9207
9234
|
render() {
|
|
9208
|
-
return hAsync("slot", { key: '
|
|
9235
|
+
return hAsync("slot", { key: '4dafb853b2a82e541f59056d2fedf08a6fa040ba' });
|
|
9209
9236
|
}
|
|
9210
9237
|
static get style() { return sdFloatingPortalCss(); }
|
|
9211
9238
|
static get cmpMeta() { return {
|
|
@@ -10167,6 +10194,7 @@ class SdInput {
|
|
|
10167
10194
|
hovered = false;
|
|
10168
10195
|
// props - label
|
|
10169
10196
|
label = '';
|
|
10197
|
+
labelWidth = '';
|
|
10170
10198
|
icon = undefined;
|
|
10171
10199
|
labelTooltip = '';
|
|
10172
10200
|
labelTooltipProps = null;
|
|
@@ -10248,12 +10276,12 @@ class SdInput {
|
|
|
10248
10276
|
'--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
|
|
10249
10277
|
'--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
|
|
10250
10278
|
};
|
|
10251
|
-
return (hAsync("sd-field", { key: '
|
|
10279
|
+
return (hAsync("sd-field", { key: 'a72ce8674fb761de7cd188e99cc19d5f3731a899', 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: 'e5cbdbc2b233bda57488ead19401d277891301ae', class: "sd-input__content" }, hAsync("slot", { key: 'a327005770df94ef61f2e08071e77407a24b7b5c', name: "prefix" }), hAsync("input", { key: '36301cd586151b8c607e14715b26fca467f68c13', 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: '532e201860db0709572502aa4275fc9251e1aeb1', name: "suffix" }), this.clearable && this.internalValue && !this.disabled && (hAsync("sd-ghost-button", { key: 'cc6132852c65f0597cbe25751c7246b1cdad3096', icon: "close", ariaLabel: "close", size: "xxs", disabled: this.disabled, class: "sd-input__clear-icon", onClick: async () => {
|
|
10252
10280
|
if (this.disabled)
|
|
10253
10281
|
return;
|
|
10254
10282
|
this.internalValue = '';
|
|
10255
10283
|
await this.formField?.sdValidate();
|
|
10256
|
-
} })), this.type === 'password' && (hAsync("sd-ghost-button", { key: '
|
|
10284
|
+
} })), this.type === 'password' && (hAsync("sd-ghost-button", { key: 'fd3d567346cf5771ec28c73f15cdf0db15835766', icon: this.passwordVisible ? 'visibilityOn' : 'visibilityOff', ariaLabel: "visibility", size: "xxs", disabled: this.disabled, class: "sd-input__password-icon", onClick: () => {
|
|
10257
10285
|
if (this.disabled)
|
|
10258
10286
|
return;
|
|
10259
10287
|
this.passwordVisible = !this.passwordVisible;
|
|
@@ -10297,6 +10325,7 @@ class SdInput {
|
|
|
10297
10325
|
"focused": [1028],
|
|
10298
10326
|
"hovered": [1028],
|
|
10299
10327
|
"label": [1],
|
|
10328
|
+
"labelWidth": [8, "label-width"],
|
|
10300
10329
|
"icon": [16],
|
|
10301
10330
|
"labelTooltip": [1, "label-tooltip"],
|
|
10302
10331
|
"labelTooltipProps": [16],
|
|
@@ -10873,6 +10902,7 @@ class SdNumberInput {
|
|
|
10873
10902
|
useDecimal = false;
|
|
10874
10903
|
value = null;
|
|
10875
10904
|
label;
|
|
10905
|
+
labelWidth = '';
|
|
10876
10906
|
addonLabel = '';
|
|
10877
10907
|
placeholder = '입력해 주세요.';
|
|
10878
10908
|
disabled = false;
|
|
@@ -11132,12 +11162,12 @@ class SdNumberInput {
|
|
|
11132
11162
|
'--sd-textinput-input-hint-typography-line-height': `${NUMBER_INPUT_HINT.typography.lineHeight}px`,
|
|
11133
11163
|
'--sd-textinput-input-contents-gap': `${NUMBER_INPUT_CONTENTS_GAP}px`,
|
|
11134
11164
|
};
|
|
11135
|
-
return (hAsync("sd-field", { key: '
|
|
11165
|
+
return (hAsync("sd-field", { key: 'f81b01b27960130cbf6b37a29fc0ddc11750768e', 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: '0f9b5a0b966c7d51d5913c61a585ff789fa4973f', class: "sd-number-input__content" }, this.useButton && (hAsync("button", { key: 'b037ee3062253bf229f9639dd04c7475657fabb6', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--decrement", disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, hAsync("sd-icon", { key: '39a9f73a15008a481e758e663e027cd4f6454146', name: "minus", size: iconSize, color: this.isDecrementDisabled()
|
|
11136
11166
|
? NUMBER_INPUT_STEPPER.icon.disabled
|
|
11137
|
-
: NUMBER_INPUT_STEPPER.icon.default }))), this.inputPrefix && (hAsync("span", { key: '
|
|
11167
|
+
: NUMBER_INPUT_STEPPER.icon.default }))), this.inputPrefix && (hAsync("span", { key: '050334ce25bb767e7f11dca886d4aeecaa1ed3dc', class: "sd-number-input__prefix" }, this.inputPrefix)), hAsync("input", { key: 'a72697d136eeee52ef23fee6ee2017b6dd37e54c', 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: {
|
|
11138
11168
|
textAlign: this.useButton ? 'center' : 'right',
|
|
11139
11169
|
...this.inputStyle,
|
|
11140
|
-
} }), this.inputSuffix && (hAsync("span", { key: '
|
|
11170
|
+
} }), this.inputSuffix && (hAsync("span", { key: '845202622b3377add18782d96d0af0c49caf95ec', class: "sd-number-input__suffix" }, this.inputSuffix)), this.useButton && (hAsync("button", { key: '208c976c1b755bec0cd7efb5ceacb3e07dce3a7d', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--increment", disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, hAsync("sd-icon", { key: 'fe9848c8f044d01378dc183a80d3f81eb56a67f9', name: "add", size: iconSize, color: this.isIncrementDisabled()
|
|
11141
11171
|
? NUMBER_INPUT_STEPPER.icon.disabled
|
|
11142
11172
|
: NUMBER_INPUT_STEPPER.icon.default }))))));
|
|
11143
11173
|
}
|
|
@@ -11162,6 +11192,7 @@ class SdNumberInput {
|
|
|
11162
11192
|
"useDecimal": [4, "use-decimal"],
|
|
11163
11193
|
"value": [1032],
|
|
11164
11194
|
"label": [1],
|
|
11195
|
+
"labelWidth": [8, "label-width"],
|
|
11165
11196
|
"addonLabel": [1, "addon-label"],
|
|
11166
11197
|
"placeholder": [1],
|
|
11167
11198
|
"disabled": [4],
|
|
@@ -11397,7 +11428,7 @@ class SdPortal {
|
|
|
11397
11428
|
parentRef = null;
|
|
11398
11429
|
offset = [0, 4];
|
|
11399
11430
|
viewportPadding = 0;
|
|
11400
|
-
zIndex =
|
|
11431
|
+
zIndex = 10000;
|
|
11401
11432
|
open = false;
|
|
11402
11433
|
close;
|
|
11403
11434
|
container;
|
|
@@ -11443,7 +11474,7 @@ class SdPortal {
|
|
|
11443
11474
|
position: 'absolute',
|
|
11444
11475
|
top: '0',
|
|
11445
11476
|
left: '0',
|
|
11446
|
-
zIndex: (this.zIndex ??
|
|
11477
|
+
zIndex: (this.zIndex ?? 10000).toString(),
|
|
11447
11478
|
opacity: '0',
|
|
11448
11479
|
transition: 'opacity 0.15s ease-out',
|
|
11449
11480
|
boxSizing: 'border-box',
|
|
@@ -11612,7 +11643,7 @@ class SdPortal {
|
|
|
11612
11643
|
this.close.emit();
|
|
11613
11644
|
}
|
|
11614
11645
|
render() {
|
|
11615
|
-
return hAsync("slot", { key: '
|
|
11646
|
+
return hAsync("slot", { key: '7213237baa73430dbf3d01aeb6f7a3e5fe173ecb' });
|
|
11616
11647
|
}
|
|
11617
11648
|
static get watchers() { return {
|
|
11618
11649
|
"open": [{
|
|
@@ -12153,6 +12184,7 @@ class SdSelect extends BaseDropdownEvent {
|
|
|
12153
12184
|
searchable = false;
|
|
12154
12185
|
// props - label
|
|
12155
12186
|
label = '';
|
|
12187
|
+
labelWidth = '';
|
|
12156
12188
|
addonLabel = '';
|
|
12157
12189
|
icon = undefined;
|
|
12158
12190
|
labelTooltip = '';
|
|
@@ -12271,7 +12303,7 @@ class SdSelect extends BaseDropdownEvent {
|
|
|
12271
12303
|
}
|
|
12272
12304
|
};
|
|
12273
12305
|
render() {
|
|
12274
|
-
return (hAsync("sd-field", { key: '
|
|
12306
|
+
return (hAsync("sd-field", { key: 'd96961fe4c425c3f0fcb1c2f438c8b70c510b632', 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: '0113ffb76ea79cbe3b77dff85d8186a5b994e7b6', class: {
|
|
12275
12307
|
'sd-select': true,
|
|
12276
12308
|
'sd-select--disabled': this.disabled,
|
|
12277
12309
|
'sd-select--error': !!this.error,
|
|
@@ -12314,6 +12346,7 @@ class SdSelect extends BaseDropdownEvent {
|
|
|
12314
12346
|
"clearable": [4],
|
|
12315
12347
|
"searchable": [4],
|
|
12316
12348
|
"label": [1],
|
|
12349
|
+
"labelWidth": [8, "label-width"],
|
|
12317
12350
|
"addonLabel": [1, "addon-label"],
|
|
12318
12351
|
"icon": [16],
|
|
12319
12352
|
"labelTooltip": [1, "label-tooltip"],
|
|
@@ -12556,6 +12589,7 @@ class SdSelectGroup extends BaseDropdownEvent {
|
|
|
12556
12589
|
searchable = false;
|
|
12557
12590
|
// props - label
|
|
12558
12591
|
label = '';
|
|
12592
|
+
labelWidth = '';
|
|
12559
12593
|
addonLabel = '';
|
|
12560
12594
|
icon = undefined;
|
|
12561
12595
|
labelTooltip = '';
|
|
@@ -12803,7 +12837,7 @@ class SdSelectGroup extends BaseDropdownEvent {
|
|
|
12803
12837
|
});
|
|
12804
12838
|
}
|
|
12805
12839
|
render() {
|
|
12806
|
-
return (hAsync("sd-field", { key: '
|
|
12840
|
+
return (hAsync("sd-field", { key: '1e6a0f9947f5d137bb65844fe666c07b4eefb2f7', 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: '62dcd2f37c2eda0e51f2e77de36ece6ab592c4ce', class: {
|
|
12807
12841
|
'sd-select-group': true,
|
|
12808
12842
|
'sd-select-group--open': this.isOpen,
|
|
12809
12843
|
'sd-select-group--disabled': this.disabled,
|
|
@@ -12868,6 +12902,7 @@ class SdSelectGroup extends BaseDropdownEvent {
|
|
|
12868
12902
|
"clearable": [4],
|
|
12869
12903
|
"searchable": [4],
|
|
12870
12904
|
"label": [1],
|
|
12905
|
+
"labelWidth": [8, "label-width"],
|
|
12871
12906
|
"addonLabel": [1, "addon-label"],
|
|
12872
12907
|
"icon": [16],
|
|
12873
12908
|
"labelTooltip": [1, "label-tooltip"],
|
|
@@ -12927,6 +12962,7 @@ class SdSelectMultiple extends BaseDropdownEvent {
|
|
|
12927
12962
|
useCheckbox = false;
|
|
12928
12963
|
// props - label
|
|
12929
12964
|
label = '';
|
|
12965
|
+
labelWidth = '';
|
|
12930
12966
|
icon = undefined;
|
|
12931
12967
|
labelTooltip = '';
|
|
12932
12968
|
labelTooltipProps = null;
|
|
@@ -13051,7 +13087,7 @@ class SdSelectMultiple extends BaseDropdownEvent {
|
|
|
13051
13087
|
this.handleOptionSelection(option);
|
|
13052
13088
|
};
|
|
13053
13089
|
render() {
|
|
13054
|
-
return (hAsync("sd-field", { key: '
|
|
13090
|
+
return (hAsync("sd-field", { key: 'f5dda40563661955aa194d841ca89628afd496cb', label: this.label, labelWidth: this.labelWidth, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el) }, hAsync("div", { key: '81541d9adabfea7c3af1c22ed419036f56e1a353', class: {
|
|
13055
13091
|
'sd-select-multiple': true,
|
|
13056
13092
|
'sd-select-multiple--open': this.isOpen,
|
|
13057
13093
|
'sd-select-multiple--disabled': this.disabled,
|
|
@@ -13098,6 +13134,7 @@ class SdSelectMultiple extends BaseDropdownEvent {
|
|
|
13098
13134
|
"useAll": [4, "use-all"],
|
|
13099
13135
|
"useCheckbox": [4, "use-checkbox"],
|
|
13100
13136
|
"label": [1],
|
|
13137
|
+
"labelWidth": [8, "label-width"],
|
|
13101
13138
|
"icon": [16],
|
|
13102
13139
|
"labelTooltip": [1, "label-tooltip"],
|
|
13103
13140
|
"labelTooltipProps": [16],
|
|
@@ -13148,6 +13185,7 @@ class SdSelectMultipleGroup extends BaseDropdownEvent {
|
|
|
13148
13185
|
allCheckOptionLabel = '전체';
|
|
13149
13186
|
// props - label
|
|
13150
13187
|
label = '';
|
|
13188
|
+
labelWidth = '';
|
|
13151
13189
|
icon = undefined;
|
|
13152
13190
|
labelTooltip = '';
|
|
13153
13191
|
labelTooltipProps = null;
|
|
@@ -13514,7 +13552,7 @@ class SdSelectMultipleGroup extends BaseDropdownEvent {
|
|
|
13514
13552
|
});
|
|
13515
13553
|
}
|
|
13516
13554
|
render() {
|
|
13517
|
-
return (hAsync("sd-field", { key: '
|
|
13555
|
+
return (hAsync("sd-field", { key: 'e7d00571a19a83e8d243d0c4f7433d931d4a2304', label: this.label, labelWidth: this.labelWidth, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: { '--field-width': this.width || '200px' } }, hAsync("div", { key: '8c7288d853fed5bb829f1ef90af5e96a512c11b3', class: {
|
|
13518
13556
|
'sd-select-multiple-group': true,
|
|
13519
13557
|
'sd-select-multiple-group--open': this.isOpen,
|
|
13520
13558
|
'sd-select-multiple-group--disabled': this.disabled,
|
|
@@ -13587,6 +13625,7 @@ class SdSelectMultipleGroup extends BaseDropdownEvent {
|
|
|
13587
13625
|
"allCheckedLabel": [1, "all-checked-label"],
|
|
13588
13626
|
"allCheckOptionLabel": [1, "all-check-option-label"],
|
|
13589
13627
|
"label": [1],
|
|
13628
|
+
"labelWidth": [8, "label-width"],
|
|
13590
13629
|
"icon": [16],
|
|
13591
13630
|
"labelTooltip": [1, "label-tooltip"],
|
|
13592
13631
|
"labelTooltipProps": [16],
|
|
@@ -13842,6 +13881,7 @@ class SdSelectV2 {
|
|
|
13842
13881
|
dropdownHeight = '260px';
|
|
13843
13882
|
disabled = false;
|
|
13844
13883
|
label = '';
|
|
13884
|
+
labelWidth = '';
|
|
13845
13885
|
addonLabel = '';
|
|
13846
13886
|
error = false;
|
|
13847
13887
|
hint = '';
|
|
@@ -14035,13 +14075,13 @@ class SdSelectV2 {
|
|
|
14035
14075
|
this.closeDropdown();
|
|
14036
14076
|
},
|
|
14037
14077
|
};
|
|
14038
|
-
return (hAsync("sd-field", { key: '
|
|
14078
|
+
return (hAsync("sd-field", { key: 'c9f08598c8f9852ab4000f056621dfef238e16de', 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: () => {
|
|
14039
14079
|
this.hovered = true;
|
|
14040
14080
|
}, onMouseLeave: () => {
|
|
14041
14081
|
this.hovered = false;
|
|
14042
|
-
} }, hAsync("div", { key: '
|
|
14082
|
+
} }, hAsync("div", { key: '302103a425963e5d577b01ad179d5af82e6f30b1', class: "sd-select-v2", ref: el => {
|
|
14043
14083
|
this.triggerRef = el;
|
|
14044
|
-
} }, hAsync("sd-select-v2-trigger", { key: '
|
|
14084
|
+
} }, hAsync("sd-select-v2-trigger", { key: 'a22bca400e5d10ee29e569da04d36b9291a1dade', displayText: this.displayText, placeholder: this.placeholder, disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (hAsync("sd-portal", { key: '0df4ad35bb284298708a0c1e11ce0e3c28d16ed8', ...portalProps }, hAsync("sd-select-v2-listbox", { key: '90c18612d553342be091a30e05194bab91407c76', 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) })))));
|
|
14045
14085
|
}
|
|
14046
14086
|
static get watchers() { return {
|
|
14047
14087
|
"isOpen": [{
|
|
@@ -14061,6 +14101,7 @@ class SdSelectV2 {
|
|
|
14061
14101
|
"dropdownHeight": [1, "dropdown-height"],
|
|
14062
14102
|
"disabled": [4],
|
|
14063
14103
|
"label": [1],
|
|
14104
|
+
"labelWidth": [8, "label-width"],
|
|
14064
14105
|
"addonLabel": [1, "addon-label"],
|
|
14065
14106
|
"error": [1028],
|
|
14066
14107
|
"hint": [1],
|
|
@@ -16101,6 +16142,7 @@ class SdTextarea {
|
|
|
16101
16142
|
width = '';
|
|
16102
16143
|
// props - sd-field
|
|
16103
16144
|
label = '';
|
|
16145
|
+
labelWidth = '';
|
|
16104
16146
|
addonLabel = '';
|
|
16105
16147
|
hint = '';
|
|
16106
16148
|
errorMessage = '';
|
|
@@ -16188,7 +16230,7 @@ class SdTextarea {
|
|
|
16188
16230
|
'--sd-system-size-field-sm-height': 'auto',
|
|
16189
16231
|
'--sd-system-radius-field-sm': `${TEXTAREA_TOKENS.radius}px`,
|
|
16190
16232
|
};
|
|
16191
|
-
return (hAsync("sd-field", { key: '
|
|
16233
|
+
return (hAsync("sd-field", { key: '6b2360f01a356db14659e1ebc53d8c4d8c4f671f', 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: 'f43279ee861d3502c9130f1de0c47cba61ad0866', class: "sd-textarea__content" }, hAsync("textarea", { key: '0600b577417019ae36a0daba637168ebc5685220', 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 }))));
|
|
16192
16234
|
}
|
|
16193
16235
|
static get watchers() { return {
|
|
16194
16236
|
"value": [{
|
|
@@ -16215,6 +16257,7 @@ class SdTextarea {
|
|
|
16215
16257
|
"spellcheck": [4],
|
|
16216
16258
|
"width": [8],
|
|
16217
16259
|
"label": [1],
|
|
16260
|
+
"labelWidth": [8, "label-width"],
|
|
16218
16261
|
"addonLabel": [1, "addon-label"],
|
|
16219
16262
|
"hint": [1],
|
|
16220
16263
|
"errorMessage": [1, "error-message"],
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t,H as s,c as i,h as e,t as o}from"./p-DuYi4aqj.js";const n=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=i(this,"sdClose",3)}get hostEl(){return this}to="body";parentRef=null;offset=[0,4];viewportPadding=0;zIndex=9999;open=!1;close;container;wrapper;rafId;isInsideClick=!1;closeTransitionTimer;handleObservedScroll=()=>this.updatePosition();resizeObserver;mutationObserver;scrollParents=[];isObserved=!1;handleOpenChange(){this.syncPortalState()}componentDidLoad(){this.container=this.resolveContainer(),this.syncPortalState()}componentDidRender(){this.syncPortalState()}disconnectedCallback(){if(this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.unobserveParent(),this.wrapper?.parentNode)try{this.wrapper.parentNode.removeChild(this.wrapper)}catch{}}resolveContainer(){const t="string"==typeof this.to?document.querySelector(this.to):this.to;return t instanceof s?t:document.body}createWrapper(){this.wrapper=document.createElement("div"),Object.assign(this.wrapper.style,{position:"absolute",top:"0",left:"0",zIndex:(this.zIndex??9999).toString(),opacity:"0",transition:"opacity 0.15s ease-out",boxSizing:"border-box",visibility:"hidden"}),this.container.appendChild(this.wrapper)}ensureWrapper(){this.wrapper||(this.container||=this.resolveContainer(),this.createWrapper(),this.moveSlotContent())}syncPortalState(){if(!this.open)return this.wrapper&&(this.wrapper.style.transition="opacity 0.15s ease-out",this.wrapper.style.opacity="0",this.wrapper.style.pointerEvents="none",this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.closeTransitionTimer=setTimeout((()=>{this.wrapper&&!this.open&&(this.wrapper.style.display="none")}),150)),void this.unobserveParent();this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.ensureWrapper(),this.wrapper&&(this.wrapper.style.display="block",this.wrapper.style.transition="opacity 0.25s ease-out",this.wrapper.style.opacity="0",this.wrapper.style.pointerEvents="",this.observeParent(),this.updatePosition())}moveSlotContent(){this.wrapper&&Array.from(this.hostEl.childNodes).filter((t=>t.nodeType!==Node.COMMENT_NODE)).forEach((t=>this.wrapper.appendChild(t)))}updatePosition(){this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{if(!this.parentRef||!this.wrapper)return;const t=this.parentRef.getBoundingClientRect(),s=window.innerWidth,i=window.innerHeight,e=this.offset??[0,4],o=Math.max(0,this.viewportPadding??0),n=Math.max(s-2*o,0),h=Math.max(i-2*o,0);this.wrapper.style.maxWidth=`${n}px`,this.wrapper.style.maxHeight=`${h}px`;const r=this.wrapper.getBoundingClientRect(),a=i-t.bottom-e[1]-o;let d=t.bottom+window.scrollY+e[1],l=t.left+window.scrollX+e[0];a<r.height&&t.top-e[1]-o>a&&(d=t.top+window.scrollY-r.height-e[1]);const c=window.scrollY+o,p=window.scrollY+i-o-r.height;d=p<c?c:Math.min(Math.max(d,c),p),t.left+r.width+e[0]>s-o&&(l=t.right+window.scrollX-r.width-e[0]);const u=window.scrollX+o,w=window.scrollX+s-o-r.width;l=w<u?u:Math.min(Math.max(l,u),w),this.wrapper.style.top=`${d}px`,this.wrapper.style.left=`${l}px`,this.wrapper.style.visibility="visible",this.wrapper.style.opacity="1"}))}observeParent(){this.parentRef&&!this.isObserved&&(this.observeScrollParents(this.parentRef),"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>this.updatePosition())),this.resizeObserver.observe(this.parentRef)),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((()=>this.updatePosition())),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0})),this.isObserved=!0)}unobserveParent(){this.isObserved&&(this.unobserveScrollParents(),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.mutationObserver?.disconnect(),this.mutationObserver=void 0,this.isObserved=!1)}observeScrollParents(t){const s=this.getScrollParents(t);s.forEach((t=>{t.addEventListener("scroll",this.handleObservedScroll,{passive:!0})})),this.scrollParents=s}unobserveScrollParents(){this.scrollParents.forEach((t=>{t.removeEventListener("scroll",this.handleObservedScroll)})),this.scrollParents=[]}getScrollParents(t){const s=[];let i=t.parentElement;for(;i;){const{overflow:t,overflowX:e,overflowY:o}=getComputedStyle(i);[t,e,o].some((t=>/(auto|scroll|overlay)/.test(t)))&&s.push(i),i=i.parentElement}return s}handleMouseDown(t){this.isInsideClick=!(!this.wrapper||!this.wrapper.contains(t.target))}handleWindowClick(t){this.isInsideClick?this.isInsideClick=!1:this.wrapper?.contains(t.target)||this.close.emit()}render(){return e("slot",{key:"e9862350592ae8ea0741b4639a94e288f0b302f2"})}static get watchers(){return{open:[{handleOpenChange:0}]}}},[772,"sd-portal",{to:[1],parentRef:[16],offset:[16],viewportPadding:[2,"viewport-padding"],zIndex:[2,"z-index"],open:[4]},[[9,"scroll","updatePosition"],[9,"resize","updatePosition"],[9,"mousedown","handleMouseDown"],[8,"click","handleWindowClick"]],{open:[{handleOpenChange:0}]}]);function h(){"undefined"!=typeof customElements&&["sd-portal"].forEach((t=>{"sd-portal"===t&&(customElements.get(o(t))||customElements.define(o(t),n))}))}export{n as S,h as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t,H as n,c as o,h as i,t as e}from"./p-DuYi4aqj.js";const a=t(class t extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=o(this,"sdClose",7)}get el(){return this}to="body";parentRef=null;offset=[0,0];zIndex=9999;placement="bottom";open=!1;close;container;wrapper;rafId;isInsideClick=!1;resizeObserver;mutationObserver;static ARROW_SIZE=11.2;componentDidLoad(){this.container=this.resolveContainer(),this.createWrapper(),this.moveSlotContent(),requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")})),this.observeParent()}componentDidRender(){this.wrapper&&(this.open?(this.wrapper.style.display="block",requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")}))):(this.wrapper.style.display="none",this.wrapper.style.visibility="hidden"))}disconnectedCallback(){this.rafId&&cancelAnimationFrame(this.rafId),this.unobserveParent(),this.wrapper?.remove()}resolveContainer(){const t="string"==typeof this.to?document.querySelector(this.to):this.to;return t instanceof n?t:document.body}createWrapper(){this.wrapper=document.createElement("div"),Object.assign(this.wrapper.style,{position:"absolute",zIndex:(this.zIndex??9999).toString(),transition:"opacity 0.4s",top:"-9999px",left:"-9999px"}),this.container.appendChild(this.wrapper)}moveSlotContent(){this.wrapper&&Array.from(this.el.childNodes).filter((t=>t.nodeType!==Node.COMMENT_NODE)).forEach((t=>this.wrapper.appendChild(t)))}updatePosition(){this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{if(!this.parentRef||!this.wrapper)return;const n=this.parentRef.getBoundingClientRect();if(!n.width&&!n.height)return;const[o,i]=this.offset,e=t.ARROW_SIZE;let a=0,s=0;switch(this.placement){case"top":a=n.top+window.scrollY-this.wrapper.offsetHeight+i-e,s=n.left+window.scrollX+n.width/2-this.wrapper.offsetWidth/2+o;break;case"bottom":a=n.bottom+window.scrollY+i+e,s=n.left+window.scrollX+n.width/2-this.wrapper.offsetWidth/2+o;break;case"left":a=n.top+window.scrollY+n.height/2-this.wrapper.offsetHeight/2+i,s=n.left+window.scrollX-this.wrapper.offsetWidth-o-e;break;case"right":a=n.top+window.scrollY+n.height/2-this.wrapper.offsetHeight/2+i,s=n.right+window.scrollX+o+e}Object.assign(this.wrapper.style,{top:`${a}px`,left:`${s}px`})}))}observeParent(){this.parentRef&&(this.resizeObserver=new ResizeObserver((()=>this.updatePosition())),this.resizeObserver.observe(this.parentRef),this.mutationObserver=new MutationObserver((()=>this.updatePosition())),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0}))}unobserveParent(){this.resizeObserver?.disconnect(),this.mutationObserver?.disconnect()}handleMouseDown(t){this.isInsideClick=!!(this.wrapper&&this.wrapper.contains(t.target)||this.parentRef&&this.parentRef.contains(t.target))}handleWindowClick(t){this.isInsideClick?this.isInsideClick=!1:this.wrapper?.contains(t.target)||this.close.emit()}render(){return i("slot",{key:"4f7cf13fe78e7d4e906a2cda47de4258d9ceda74"})}static get style(){return".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)}}"}},[772,"sd-floating-portal",{to:[1],parentRef:[16],offset:[16],zIndex:[2,"z-index"],placement:[1],open:[4]},[[9,"scroll","updatePosition"],[9,"resize","updatePosition"],[9,"mousedown","handleMouseDown"],[8,"click","handleWindowClick"]]]);function s(){"undefined"!=typeof customElements&&["sd-floating-portal"].forEach((t=>{"sd-floating-portal"===t&&(customElements.get(e(t))||customElements.define(e(t),a))}))}export{a as S,s as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,H as d,h as s,t as i}from"./p-DuYi4aqj.js";import{d as t}from"./p-BLC3AWW8.js";import{d as l}from"./p-DxzgCf_d.js";import{d as r}from"./p-CGssy8eb.js";import{d as o}from"./p-BZ7V5xV5.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:"16",lineHeight:"26"}}},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="";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}:{},r=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:"72ffdb42c88b90eb60637b10c1330dc509ece812",class:{"sd-field":!0,"sd-field--has-label":!!this.label,"sd-field--has-addon":!!e,[this.fieldStatus]:!!this.fieldStatus},style:{...t,...l,...r}},s("div",{key:"fb5d90aea5a4988ec58984b4a85ed609f032549e",class:"sd-field__wrapper"},this.renderLabel(this.label),s("div",{key:"c0372be3a39ca1d6cebfe5e765d120751e39d03e",class:"sd-field__main",style:this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},s("div",{key:"d203154db0eef4e73908d78ba3667710c51b6595",class:{"sd-field__control":!0,"sd-field__control--has-addon":!!e}},e&&s("div",{key:"851b996010c4f0402df8b6bfe9ced0c8444bc591",class:"sd-field__addon"},e),s("slot",{key:"081b95a99090c3c1d2d28170500ac7be15452876"})),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;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)}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}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:var(--sd-field-label-gap)}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],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))||r();break;case"sd-tooltip":customElements.get(i(e))||o()}}))}export{b as S,g as d}
|