@sellmate/design-system 1.0.38 → 1.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-button_20.cjs.entry.js +143 -35
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +6 -6
- package/dist/cjs/sd-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +4 -15
- package/dist/cjs/sd-file-picker.cjs.entry.js +3 -3
- package/dist/cjs/sd-guide.cjs.entry.js +2 -2
- package/dist/cjs/sd-popover.cjs.entry.js +2 -2
- package/dist/cjs/sd-progress.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-group.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-multiple.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-option-group.cjs.entry.js +3 -3
- package/dist/cjs/sd-select-v2-list-item_2.cjs.entry.js +6 -6
- package/dist/cjs/sd-select-v2-listbox_2.cjs.entry.js +5 -10
- package/dist/cjs/sd-select-v2.cjs.entry.js +19 -8
- package/dist/cjs/{sd-select-v2.config-DedHbMz4.js → sd-select-v2.config-DZrPJ6OS.js} +0 -14
- package/dist/cjs/system-lN7yOMPF.js +20 -0
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +8 -7
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +1 -1
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +3 -3
- package/dist/collection/components/sd-field/sd-field.css +12 -15
- package/dist/collection/components/sd-field/sd-field.js +26 -13
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +3 -3
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-guide/sd-guide.js +2 -2
- package/dist/collection/components/sd-icon/sd-icon.js +1 -1
- package/dist/collection/components/sd-input/sd-input.config.js +34 -0
- package/dist/collection/components/sd-input/sd-input.css +16 -6
- package/dist/collection/components/sd-input/sd-input.js +61 -36
- package/dist/collection/components/sd-loading-spinner/sd-loading-spinner.js +1 -1
- package/dist/collection/components/sd-notice-modal/sd-notice-modal.js +2 -2
- package/dist/collection/components/sd-number-input/sd-number-input.js +11 -11
- package/dist/collection/components/sd-pagination/sd-pagination.js +2 -2
- package/dist/collection/components/sd-popover/sd-popover.js +2 -2
- package/dist/collection/components/sd-progress/sd-progress.js +2 -2
- package/dist/collection/components/sd-select/sd-select-dropdown/sd-select-dropdown.js +2 -2
- package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +1 -1
- package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.js +3 -3
- package/dist/collection/components/sd-select/sd-select.js +8 -8
- package/dist/collection/components/sd-select-group/sd-select-group.js +8 -8
- package/dist/collection/components/sd-select-multiple/sd-select-multiple.js +1 -1
- package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js +3 -3
- package/dist/collection/components/sd-select-v2/sd-select-v2-list-item/sd-select-v2-list-item.js +2 -2
- package/dist/collection/components/sd-select-v2/sd-select-v2-list-item-search/sd-select-v2-list-item-search.js +3 -3
- package/dist/collection/components/sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.js +1 -1
- package/dist/collection/components/sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.css +0 -12
- package/dist/collection/components/sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.js +2 -27
- package/dist/collection/components/sd-select-v2/sd-select-v2.config.js +0 -8
- package/dist/collection/components/sd-select-v2/sd-select-v2.js +21 -16
- package/dist/components/{p-eZ82xLZt.js → p-0gO8WB9o.js} +1 -1
- package/dist/components/p-5UN9Ry8A.js +1 -0
- package/dist/components/{p-iusjOpcc.js → p-9EyS2_Bp.js} +1 -1
- package/dist/components/p-BH_WRHMs.js +1 -0
- package/dist/components/{p-C_3U90D_.js → p-BL0JF-Wh.js} +1 -1
- package/dist/components/{p-BAghib4O.js → p-BMpVqedy.js} +1 -1
- package/dist/components/{p-DQhPxH3o.js → p-C7G_tiJw.js} +1 -1
- package/dist/components/{p-Di17TAvI.js → p-CBmWor54.js} +1 -1
- package/dist/components/p-CCGsaeed.js +1 -0
- package/dist/components/{p-B0wG418y.js → p-CGU_sdK0.js} +1 -1
- package/dist/components/p-CIwsurLw.js +1 -0
- package/dist/components/p-CS6ohqwt.js +1 -0
- package/dist/components/{p-CQfrNtCG.js → p-Cefcggep.js} +1 -1
- package/dist/components/{p-CKi7RueC.js → p-Cm4BQbyn.js} +1 -1
- package/dist/components/{p-DjOSobI6.js → p-CnGJ-zsX.js} +1 -1
- package/dist/components/{p-BcrOYmsG.js → p-CsS4T0El.js} +1 -1
- package/dist/components/{p-Dpi-ww3O.js → p-DBCQtIY4.js} +1 -1
- package/dist/components/{p-BHLuiIDM.js → p-DS5oSTUS.js} +1 -1
- package/dist/components/{p-BiCK6R-J.js → p-Dzg317Va.js} +1 -1
- package/dist/components/p-Trj68Yo5.js +1 -0
- package/dist/components/p-_Zc2887O.js +1 -0
- package/dist/components/{p-CNUx4rbY.js → p-cWdYmHLY.js} +1 -1
- package/dist/components/{p-BzS0YntY.js → p-dvfewOFM.js} +1 -1
- package/dist/components/{p-BCPAPvp8.js → p-l5p-E_Gh.js} +1 -1
- package/dist/components/{p-D23gFKrT.js → p-nLkkdmKA.js} +1 -1
- package/dist/components/{p-DNyoL0F-.js → p-vMfU_F7J.js} +1 -1
- package/dist/components/sd-button-v2.js +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-confirm-modal.js +1 -1
- package/dist/components/sd-date-picker.js +1 -1
- package/dist/components/sd-date-range-picker.js +1 -1
- package/dist/components/sd-dropdown-button.js +1 -1
- package/dist/components/sd-field.js +1 -1
- package/dist/components/sd-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-icon.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-loading-spinner.js +1 -1
- package/dist/components/sd-modal-container.js +1 -1
- package/dist/components/sd-notice-modal.js +1 -1
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-progress.js +1 -1
- package/dist/components/sd-select-dropdown.js +1 -1
- package/dist/components/sd-select-group.js +1 -1
- package/dist/components/sd-select-multiple-group.js +1 -1
- package/dist/components/sd-select-multiple.js +1 -1
- package/dist/components/sd-select-option-group.js +1 -1
- package/dist/components/sd-select-option.js +1 -1
- package/dist/components/sd-select-search-input.js +1 -1
- package/dist/components/sd-select-v2-list-item-search.js +1 -1
- package/dist/components/sd-select-v2-list-item.js +1 -1
- package/dist/components/sd-select-v2-listbox.js +1 -1
- package/dist/components/sd-select-v2-trigger.js +1 -1
- package/dist/components/sd-select-v2.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-table.js +1 -1
- package/dist/components/sd-tabs.js +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-toast-container.js +1 -1
- package/dist/components/sd-toast.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/design-system/design-system.css +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-9933475e.entry.js → p-0fdca641.entry.js} +1 -1
- package/dist/design-system/{p-29a60707.entry.js → p-10945e57.entry.js} +1 -1
- package/dist/design-system/{p-f5460c6e.entry.js → p-1e975178.entry.js} +1 -1
- package/dist/design-system/{p-1b80635f.entry.js → p-2408d1ab.entry.js} +1 -1
- package/dist/design-system/p-342f48ab.entry.js +1 -0
- package/dist/design-system/p-36ba5f33.entry.js +1 -0
- package/dist/design-system/{p-72b09ede.entry.js → p-4731457c.entry.js} +1 -1
- package/dist/design-system/{p-c7c66261.entry.js → p-63f997d7.entry.js} +1 -1
- package/dist/design-system/p-9c6fea35.entry.js +1 -0
- package/dist/design-system/{p-812d7c00.entry.js → p-9d431ea6.entry.js} +1 -1
- package/dist/design-system/p-BOmBg3kj.js +1 -0
- package/dist/design-system/p-CS6ohqwt.js +1 -0
- package/dist/design-system/{p-f7203145.entry.js → p-b71d0858.entry.js} +1 -1
- package/dist/design-system/p-e96c881f.entry.js +1 -0
- package/dist/design-system/p-f87b6a45.entry.js +1 -0
- package/dist/design-system/p-f9075737.entry.js +1 -0
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-button_20.entry.js +143 -35
- package/dist/esm/sd-confirm-modal_2.entry.js +6 -6
- package/dist/esm/sd-date-picker.entry.js +1 -1
- package/dist/esm/sd-dropdown-button.entry.js +1 -12
- package/dist/esm/sd-file-picker.entry.js +3 -3
- package/dist/esm/sd-guide.entry.js +2 -2
- package/dist/esm/sd-popover.entry.js +2 -2
- package/dist/esm/sd-progress.entry.js +2 -2
- package/dist/esm/sd-select-group.entry.js +2 -2
- package/dist/esm/sd-select-multiple.entry.js +1 -1
- package/dist/esm/sd-select-option-group.entry.js +3 -3
- package/dist/esm/sd-select-v2-list-item_2.entry.js +6 -6
- package/dist/esm/sd-select-v2-listbox_2.entry.js +5 -10
- package/dist/esm/{sd-select-v2.config-BXY0UBNx.js → sd-select-v2.config-BOmBg3kj.js} +0 -14
- package/dist/esm/sd-select-v2.entry.js +19 -8
- package/dist/esm/system-CS6ohqwt.js +18 -0
- package/dist/types/components/sd-confirm-modal/sd-confirm-modal.d.ts +1 -1
- package/dist/types/components/sd-field/sd-field.d.ts +1 -1
- package/dist/types/components/sd-input/sd-input.config.d.ts +38 -0
- package/dist/types/components/sd-input/sd-input.d.ts +4 -3
- package/dist/types/components/sd-number-input/sd-number-input.d.ts +1 -1
- package/dist/types/components/sd-select/sd-select.d.ts +1 -1
- package/dist/types/components/sd-select-group/sd-select-group.d.ts +1 -1
- package/dist/types/components/sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.d.ts +0 -1
- package/dist/types/components/sd-select-v2/sd-select-v2.config.d.ts +0 -8
- package/dist/types/components/sd-select-v2/sd-select-v2.d.ts +2 -2
- package/dist/types/components.d.ts +73 -68
- package/hydrate/index.js +208 -105
- package/hydrate/index.mjs +208 -105
- package/package.json +1 -1
- package/dist/components/p-BzUx5X3N.js +0 -1
- package/dist/components/p-CC6lx8di.js +0 -1
- package/dist/components/p-CXKpL2GZ.js +0 -1
- package/dist/components/p-CyJZik9T.js +0 -1
- package/dist/components/p-DASdfaPf.js +0 -1
- package/dist/components/p-DyFykTJN.js +0 -1
- package/dist/design-system/p-26fc1fc0.entry.js +0 -1
- package/dist/design-system/p-87a783a7.entry.js +0 -1
- package/dist/design-system/p-BXY0UBNx.js +0 -1
- package/dist/design-system/p-c549e2c0.entry.js +0 -1
- package/dist/design-system/p-cc837ebf.entry.js +0 -1
- package/dist/design-system/p-e641f41f.entry.js +0 -1
- package/dist/design-system/p-e8fbedcd.entry.js +0 -1
|
@@ -46,7 +46,7 @@ const SdSelectOptionGroup = class {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
render() {
|
|
49
|
-
return (h("div", { key: '
|
|
49
|
+
return (h("div", { key: '70ab9a558faf068cfc4eb0a5f6a29453ceedc6ec', class: {
|
|
50
50
|
'sd-select__option-group': true,
|
|
51
51
|
'sd-select__option-group--selected': !!this.isSelected,
|
|
52
52
|
'sd-select__option-group--disabled': !!this.option.disabled,
|
|
@@ -55,10 +55,10 @@ const SdSelectOptionGroup = class {
|
|
|
55
55
|
'sd-select__option-group--group': this.option.type === 'group',
|
|
56
56
|
'sd-select__option-group--subgroup': this.option.type === 'subgroup',
|
|
57
57
|
'sd-select__option-group--item': this.option.type === 'item',
|
|
58
|
-
}, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, h("div", { key: '
|
|
58
|
+
}, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, h("div", { key: 'ca5dc0033231ab204a8688f98453742cdbde7d26', class: "sd-select__option-group__label-wrapper" }, this.useCheckbox && (h("sd-checkbox", { key: 'bba6cb9fe649f6eda82ba287f73d0142e02c53c2', value: this.isSelected, disabled: this.option.disabled, onClick: e => {
|
|
59
59
|
e.preventDefault();
|
|
60
60
|
this.handleClick(this.option, this.isSelected, e);
|
|
61
|
-
} })), h("span", { key: '
|
|
61
|
+
} })), h("span", { key: '7d03c080b7f5b92881389bfec787015a6ac55fa1', class: "sd-select__option-group-label" }, this.option.label), this.useIndicator && this.option.type !== 'item' && (h("span", { key: '7066453f92eac7549569db6854e3dc32515d80b9', class: "sd-select__option-group__count-indicator" }, `(${this.countInfo?.selectedCount}/${this.countInfo?.totalCount})`)))));
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
SdSelectOptionGroup.style = sdSelectOptionGroupCss();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-B8tGP77V.js';
|
|
2
|
-
import { e as LIST_ITEM_LAYOUT, g as LIST_ITEM_COLORS, h as LIST_ITEM_TYPOGRAPHY, i as SEARCH_DEBOUNCE_MS } from './sd-select-v2.config-
|
|
2
|
+
import { e as LIST_ITEM_LAYOUT, g as LIST_ITEM_COLORS, h as LIST_ITEM_TYPOGRAPHY, i as SEARCH_DEBOUNCE_MS } from './sd-select-v2.config-BOmBg3kj.js';
|
|
3
3
|
|
|
4
4
|
const sdSelectV2ListItemCss = () => `sd-select-v2-list-item{display:block}sd-select-v2-list-item .sd-select-v2-list-item{display:flex;align-items:center;gap:var(--list-item-gap);padding:var(--list-item-padding-y) var(--list-item-padding-right) var(--list-item-padding-y) var(--list-item-padding-left);font-size:var(--list-item-font-size);line-height:var(--list-item-line-height);font-weight:var(--list-item-font-weight);background:var(--list-item-bg);color:var(--list-item-color);cursor:default;user-select:none}sd-select-v2-list-item .sd-select-v2-list-item--selectable{cursor:pointer}sd-select-v2-list-item .sd-select-v2-list-item--depth1-group{border-top:var(--list-item-border-top);font-weight:700}sd-select-v2-list-item .sd-select-v2-list-item--depth2-group{font-weight:500}sd-select-v2-list-item .sd-select-v2-list-item--selectable:not(.sd-select-v2-list-item--disabled):hover{background:var(--list-item-bg-hover);color:var(--list-item-color-hover)}sd-select-v2-list-item .sd-select-v2-list-item--focused.sd-select-v2-list-item--selectable:not(.sd-select-v2-list-item--disabled){background:var(--list-item-bg-hover);color:var(--list-item-color-hover)}sd-select-v2-list-item .sd-select-v2-list-item--selected:not(.sd-select-v2-list-item--group){font-weight:700;color:var(--list-item-bg-hover)}sd-select-v2-list-item .sd-select-v2-list-item--selected:hover,sd-select-v2-list-item .sd-select-v2-list-item--selected.sd-select-v2-list-item--focused{color:var(--list-item-color-hover)}sd-select-v2-list-item .sd-select-v2-list-item--disabled{color:var(--list-item-color-disabled);cursor:not-allowed}sd-select-v2-list-item .sd-select-v2-list-item__label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-v2-list-item .sd-select-v2-list-item__count{flex-shrink:0;font-weight:500;color:var(--list-item-color-disabled)}sd-select-v2-list-item .sd-select-v2-list-item__checkbox{flex-shrink:0}`;
|
|
5
5
|
|
|
@@ -71,7 +71,7 @@ const SdSelectV2ListItem = class {
|
|
|
71
71
|
if (isDepth1Group) {
|
|
72
72
|
cssVars['--list-item-border-top'] = `${LIST_ITEM_COLORS.depth1.borderWidth}px solid ${LIST_ITEM_COLORS.depth1.border}`;
|
|
73
73
|
}
|
|
74
|
-
return (h("div", { key: '
|
|
74
|
+
return (h("div", { key: '1e828b28202b9d22cc02dff0550e37e506167f90', class: {
|
|
75
75
|
'sd-select-v2-list-item': true,
|
|
76
76
|
'sd-select-v2-list-item--group': isGroup,
|
|
77
77
|
'sd-select-v2-list-item--depth1-group': isDepth1Group,
|
|
@@ -81,7 +81,7 @@ const SdSelectV2ListItem = class {
|
|
|
81
81
|
'sd-select-v2-list-item--focused': this.isFocused,
|
|
82
82
|
'sd-select-v2-list-item--selectable': this.isSelectable && !this.option.disabled,
|
|
83
83
|
'sd-select-v2-list-item--disabled': !!this.option.disabled,
|
|
84
|
-
}, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (h("sd-checkbox", { key: '
|
|
84
|
+
}, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (h("sd-checkbox", { key: '7f49b89aff1a269944551664bc8a51447b5b2f7e', value: this.isSelected === null ? null : !!this.isSelected, disabled: this.option.disabled, class: "sd-select-v2-list-item__checkbox", onClick: this.handleCheckboxClick, onSdUpdate: this.handleCheckboxUpdate })), h("span", { key: '51aad2d06ecdf11968f3f13c632081a663a3d200', class: "sd-select-v2-list-item__label" }, this.option.label), this.countInfo && (h("span", { key: '1c1f5cd51460863ce41c8980dcc65cd2bb7bfee5', class: "sd-select-v2-list-item__count" }, "(", this.countInfo.selected, "/", this.countInfo.total, ")"))));
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
87
|
SdSelectV2ListItem.style = sdSelectV2ListItemCss();
|
|
@@ -143,12 +143,12 @@ const SdSelectV2ListItemSearch = class {
|
|
|
143
143
|
clearTimeout(this.debounceTimer);
|
|
144
144
|
}
|
|
145
145
|
render() {
|
|
146
|
-
return (h("div", { key: '
|
|
146
|
+
return (h("div", { key: 'e7bd315d17d554aa63346f44eb8b2661994b49aa', class: {
|
|
147
147
|
'sd-select-v2-list-item-search': true,
|
|
148
148
|
'sd-select-v2-list-item-search--scrolled': this.isScrolled,
|
|
149
|
-
} }, h("div", { key: '
|
|
149
|
+
} }, h("div", { key: 'ee332050907bc7e9004ff27e3f79cf816e7a44e7', class: "sd-select-v2-list-item-search__inner" }, h("sd-icon", { key: 'ccd929d161ba92ef4e8b008cee8866815c21f430', name: "search", size: 16, color: "grey_70", class: "sd-select-v2-list-item-search__icon" }), h("input", { key: 'b10e1dcf4bee6df78e917c9e4c31563e0466f38e', ref: el => {
|
|
150
150
|
this.inputEl = el;
|
|
151
|
-
}, type: "text", class: "sd-select-v2-list-item-search__input", placeholder: "\uAC80\uC0C9\uC5B4 \uC785\uB825", value: this.searchText, onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: () => this.searchFocus.emit() }), this.searchText && (h("button", { key: '
|
|
151
|
+
}, type: "text", class: "sd-select-v2-list-item-search__input", placeholder: "\uAC80\uC0C9\uC5B4 \uC785\uB825", value: this.searchText, onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: () => this.searchFocus.emit() }), this.searchText && (h("button", { key: 'fa2ee3033cff6b707a409ada6982ed596492c81d', type: "button", class: "sd-select-v2-list-item-search__clear", onClick: this.handleClear }, h("sd-icon", { key: '0e2cab7ca1a11c1ce60e74ac435dc55fbc375438', name: "close", size: 12, color: "#888888" }))))));
|
|
152
152
|
}
|
|
153
153
|
};
|
|
154
154
|
SdSelectV2ListItemSearch.style = sdSelectV2ListItemSearchCss();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-B8tGP77V.js';
|
|
2
|
-
import { c as countLeaves, S as SEARCH_THRESHOLD, f as filterTree, E as EMPTY_MESSAGE, L as LIST_BOX_LAYOUT, a as SELECT_COLORS, b as SELECT_TYPOGRAPHY, d as SELECT_LAYOUT } from './sd-select-v2.config-
|
|
2
|
+
import { c as countLeaves, S as SEARCH_THRESHOLD, f as filterTree, E as EMPTY_MESSAGE, L as LIST_BOX_LAYOUT, a as SELECT_COLORS, b as SELECT_TYPOGRAPHY, d as SELECT_LAYOUT } from './sd-select-v2.config-BOmBg3kj.js';
|
|
3
3
|
|
|
4
4
|
const sdSelectV2ListboxCss = () => `sd-select-v2-listbox{display:block}sd-select-v2-listbox .sd-select-v2-listbox{display:flex;flex-direction:column;min-width:var(--listbox-trigger-width);max-width:var(--listbox-max-width);max-height:var(--listbox-max-height);width:fit-content;border-radius:var(--listbox-radius);background:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);overflow:hidden}sd-select-v2-listbox .sd-select-v2-listbox__list{flex:1;min-height:0;overflow-y:auto;padding-bottom:var(--listbox-padding-bottom)}sd-select-v2-listbox .sd-select-v2-listbox__empty{padding:12px;text-align:center;font-size:12px;line-height:20px;color:#888888}`;
|
|
5
5
|
|
|
@@ -130,12 +130,12 @@ const SdSelectV2Listbox = class {
|
|
|
130
130
|
'--listbox-radius': `${LIST_BOX_LAYOUT.radius}px`,
|
|
131
131
|
'--listbox-padding-bottom': `${LIST_BOX_LAYOUT.paddingBottom}px`,
|
|
132
132
|
};
|
|
133
|
-
return (h("div", { key: '
|
|
133
|
+
return (h("div", { key: 'b64bc66e7f9a356e3f0cf752cba3a3c9de1928c5', class: "sd-select-v2-listbox", style: cssVars }, this.showSearch && (h("sd-select-v2-list-item-search", { key: '2444bdda4e2a83008d175ba9867ecad01da5ed25', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), h("div", { key: '6307a0fd5480c006248dee44c4e1b54dd5749895', class: "sd-select-v2-listbox__list", onScroll: this.handleScroll }, this.isEmpty ? (h("div", { class: "sd-select-v2-listbox__empty" }, EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (h("sd-select-v2-list-item", { option: option, depth: 1, isSelected: this.isOptionSelected(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick })))))));
|
|
134
134
|
}
|
|
135
135
|
};
|
|
136
136
|
SdSelectV2Listbox.style = sdSelectV2ListboxCss();
|
|
137
137
|
|
|
138
|
-
const sdSelectV2TriggerCss = () => `sd-select-v2-trigger{display:block;width:100%;height:100%}sd-select-v2-trigger .sd-select-v2-trigger{display:flex;width:100%;height:100%;cursor:pointer;user-select:none;overflow:hidden;border-radius:3px}sd-select-v2-trigger .sd-select-v2-trigger--disabled{cursor:not-allowed}sd-select-v2-trigger .sd-select-v2-
|
|
138
|
+
const sdSelectV2TriggerCss = () => `sd-select-v2-trigger{display:block;width:100%;height:100%}sd-select-v2-trigger .sd-select-v2-trigger{display:flex;width:100%;height:100%;cursor:pointer;user-select:none;overflow:hidden;border-radius:3px}sd-select-v2-trigger .sd-select-v2-trigger--disabled{cursor:not-allowed}sd-select-v2-trigger .sd-select-v2-trigger__content{display:flex;align-items:center;gap:var(--trigger-gap);flex:1;padding:0 var(--trigger-padding-x);min-width:0}sd-select-v2-trigger .sd-select-v2-trigger__text{flex:1;font-size:var(--trigger-font-size);line-height:var(--trigger-line-height);font-weight:var(--trigger-font-weight);color:var(--trigger-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-v2-trigger .sd-select-v2-trigger__icon{flex-shrink:0;transition:transform 0.2s ease}sd-select-v2-trigger .sd-select-v2-trigger__icon--open{transform:rotate(180deg)}`;
|
|
139
139
|
|
|
140
140
|
const SdSelectV2Trigger = class {
|
|
141
141
|
constructor(hostRef) {
|
|
@@ -146,7 +146,6 @@ const SdSelectV2Trigger = class {
|
|
|
146
146
|
placeholder = '선택';
|
|
147
147
|
disabled = false;
|
|
148
148
|
isOpen = false;
|
|
149
|
-
addonLabel = '';
|
|
150
149
|
triggerClick;
|
|
151
150
|
handleClick = () => {
|
|
152
151
|
if (this.disabled)
|
|
@@ -167,16 +166,12 @@ const SdSelectV2Trigger = class {
|
|
|
167
166
|
? SELECT_COLORS.text.default
|
|
168
167
|
: SELECT_COLORS.icon.default,
|
|
169
168
|
'--trigger-icon-color': this.disabled ? SELECT_COLORS.icon.disabled : SELECT_COLORS.icon.default,
|
|
170
|
-
'--trigger-addon-bg': SELECT_COLORS.addonLabel.bg,
|
|
171
|
-
'--trigger-addon-border-color': this.disabled
|
|
172
|
-
? SELECT_COLORS.addonLabel.border.disabled
|
|
173
|
-
: SELECT_COLORS.addonLabel.border.default,
|
|
174
169
|
};
|
|
175
|
-
return (h("div", { key: '
|
|
170
|
+
return (h("div", { key: '4fe2634aee7071ed48348b19dc367b1af88fd6d9', class: {
|
|
176
171
|
'sd-select-v2-trigger': true,
|
|
177
172
|
'sd-select-v2-trigger--open': this.isOpen,
|
|
178
173
|
'sd-select-v2-trigger--disabled': this.disabled,
|
|
179
|
-
}, style: cssVars, onClick: this.handleClick },
|
|
174
|
+
}, style: cssVars, onClick: this.handleClick }, h("div", { key: 'e0f71cdd91c6e04ebe5543fb2bc87d7331735da6', class: "sd-select-v2-trigger__content" }, h("span", { key: '3abfbc0541569c68870addc16a7d3439d7189ab5', class: "sd-select-v2-trigger__text" }, hasValue ? this.displayText : this.placeholder), h("sd-icon", { key: '8fcb187f67be75cf03c0f0bde42121cba0b16a47', name: "arrowDown", size: 12, color: "var(--trigger-icon-color)", class: {
|
|
180
175
|
'sd-select-v2-trigger__icon': true,
|
|
181
176
|
'sd-select-v2-trigger__icon--open': this.isOpen,
|
|
182
177
|
} }))));
|
|
@@ -12,13 +12,6 @@ const select = {
|
|
|
12
12
|
text: {
|
|
13
13
|
"default": "#222222",
|
|
14
14
|
disabled: "#888888"
|
|
15
|
-
},
|
|
16
|
-
addonLabel: {
|
|
17
|
-
bg: "#F6F6F6",
|
|
18
|
-
border: {
|
|
19
|
-
"default": "#AAAAAA",
|
|
20
|
-
disabled: "#CCCCCC"
|
|
21
|
-
}
|
|
22
15
|
}};
|
|
23
16
|
var selectTokens = {
|
|
24
17
|
select: select
|
|
@@ -85,13 +78,6 @@ const SELECT_COLORS = {
|
|
|
85
78
|
default: selectTokens.select.text.default,
|
|
86
79
|
disabled: selectTokens.select.text.disabled,
|
|
87
80
|
},
|
|
88
|
-
addonLabel: {
|
|
89
|
-
bg: selectTokens.select.addonLabel.bg,
|
|
90
|
-
border: {
|
|
91
|
-
default: selectTokens.select.addonLabel.border.default,
|
|
92
|
-
disabled: selectTokens.select.addonLabel.border.disabled,
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
81
|
};
|
|
96
82
|
// ── ListItem Tokens ──
|
|
97
83
|
const LIST_ITEM_LAYOUT = {
|
|
@@ -75,7 +75,7 @@ const SdSelectV2 = class {
|
|
|
75
75
|
return found?.label ?? '';
|
|
76
76
|
}
|
|
77
77
|
flattenOptions(options) {
|
|
78
|
-
return options.flatMap(o => o.children ? this.flattenOptions(o.children) : [o]);
|
|
78
|
+
return options.flatMap(o => (o.children ? this.flattenOptions(o.children) : [o]));
|
|
79
79
|
}
|
|
80
80
|
collectLeaves(option) {
|
|
81
81
|
if (!option.children)
|
|
@@ -158,8 +158,8 @@ const SdSelectV2 = class {
|
|
|
158
158
|
this.isOpen = true;
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
|
-
emitUpdate(value
|
|
162
|
-
this.update.emit(
|
|
161
|
+
emitUpdate(value) {
|
|
162
|
+
this.update.emit(value);
|
|
163
163
|
}
|
|
164
164
|
handleOptionSelect = (option) => {
|
|
165
165
|
if (this.isMulti) {
|
|
@@ -167,7 +167,7 @@ const SdSelectV2 = class {
|
|
|
167
167
|
}
|
|
168
168
|
else {
|
|
169
169
|
this.value = this.emitValue ? option.value : option;
|
|
170
|
-
this.emitUpdate(this.value
|
|
170
|
+
this.emitUpdate(this.value);
|
|
171
171
|
this.closeDropdown();
|
|
172
172
|
}
|
|
173
173
|
};
|
|
@@ -189,7 +189,7 @@ const SdSelectV2 = class {
|
|
|
189
189
|
newSelected = [...selected, ...toAdd];
|
|
190
190
|
}
|
|
191
191
|
this.value = this.toMultiValue(newSelected);
|
|
192
|
-
this.emitUpdate(this.value
|
|
192
|
+
this.emitUpdate(this.value);
|
|
193
193
|
}
|
|
194
194
|
else {
|
|
195
195
|
const exists = selected.some(s => s.value === option.value);
|
|
@@ -197,7 +197,7 @@ const SdSelectV2 = class {
|
|
|
197
197
|
? selected.filter(s => s.value !== option.value)
|
|
198
198
|
: [...selected, option];
|
|
199
199
|
this.value = this.toMultiValue(newSelected);
|
|
200
|
-
this.emitUpdate(this.value
|
|
200
|
+
this.emitUpdate(this.value);
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
connectedCallback() {
|
|
@@ -213,9 +213,20 @@ const SdSelectV2 = class {
|
|
|
213
213
|
open: this.isOpen,
|
|
214
214
|
parentRef: this.triggerRef,
|
|
215
215
|
viewportPadding: SdSelectV2.VIEWPORT_PADDING,
|
|
216
|
-
onSdClose: () => {
|
|
216
|
+
onSdClose: () => {
|
|
217
|
+
this.closeDropdown();
|
|
218
|
+
},
|
|
217
219
|
};
|
|
218
|
-
return (h("sd-field", { key: '
|
|
220
|
+
return (h("sd-field", { key: '4e3e1aa95a4e566948bf63526763cf0125fc6564', name: this.fieldName || this.internalName, label: this.label, addonLabel: this.addonLabel, 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: () => {
|
|
221
|
+
this.hovered = true;
|
|
222
|
+
}, onMouseLeave: () => {
|
|
223
|
+
this.hovered = false;
|
|
224
|
+
}, style: {
|
|
225
|
+
width: /^\d+$/.test(this.width) ? `${this.width}px` : this.width,
|
|
226
|
+
minWidth: '80px',
|
|
227
|
+
} }, h("div", { key: '661fd9580419ef011386750aa1356b4ab1f19fed', class: "sd-select-v2", ref: el => {
|
|
228
|
+
this.triggerRef = el;
|
|
229
|
+
} }, h("sd-select-v2-trigger", { key: '5d267da7bc6c0b2cf0031416f541dad3cd1cf861', displayText: this.displayText, placeholder: this.placeholder, disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: 'd5a8edf2cc94d9271bc4369022ffe3801650dbd4', ...portalProps }, h("sd-select-v2-listbox", { key: 'c1051423145b1a9aaea420635b3ae596d5983011', 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) })))));
|
|
219
230
|
}
|
|
220
231
|
static get watchers() { return {
|
|
221
232
|
"isOpen": [{
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const size = {
|
|
2
|
+
field: {
|
|
3
|
+
icon: "12"}
|
|
4
|
+
};
|
|
5
|
+
const color = {
|
|
6
|
+
bg: {
|
|
7
|
+
accent: {
|
|
8
|
+
"default": "#0075FF"}},
|
|
9
|
+
content: {
|
|
10
|
+
secondary: "#555555",
|
|
11
|
+
inverse: "#FFFFFF"
|
|
12
|
+
}};
|
|
13
|
+
var systemTokens = {
|
|
14
|
+
size: size,
|
|
15
|
+
color: color
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { systemTokens as s };
|
|
@@ -11,7 +11,7 @@ export declare class SdField implements ValidatableField {
|
|
|
11
11
|
focused?: boolean;
|
|
12
12
|
status?: 'default' | 'pass' | 'error';
|
|
13
13
|
label: string;
|
|
14
|
-
|
|
14
|
+
addonLabel: string;
|
|
15
15
|
icon?: IconProps;
|
|
16
16
|
labelTooltip: string;
|
|
17
17
|
labelTooltipProps: SdTooltipProps | null;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type InputSize = 'sm' | 'md';
|
|
2
|
+
export declare const INPUT_SIZE_MAP: Record<InputSize, {
|
|
3
|
+
height: string;
|
|
4
|
+
paddingX: string;
|
|
5
|
+
gap: string;
|
|
6
|
+
radius: string;
|
|
7
|
+
fontSize: string;
|
|
8
|
+
lineHeight: string;
|
|
9
|
+
fontWeight: string;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const INPUT_COLORS: {
|
|
12
|
+
border: {
|
|
13
|
+
default: string;
|
|
14
|
+
focus: string;
|
|
15
|
+
danger: string;
|
|
16
|
+
success: string;
|
|
17
|
+
disabled: string;
|
|
18
|
+
};
|
|
19
|
+
bg: {
|
|
20
|
+
default: string;
|
|
21
|
+
disabled: string;
|
|
22
|
+
barcode: string;
|
|
23
|
+
};
|
|
24
|
+
text: {
|
|
25
|
+
default: string;
|
|
26
|
+
placeholder: string;
|
|
27
|
+
disabled: string;
|
|
28
|
+
hint: string;
|
|
29
|
+
errorMessage: string;
|
|
30
|
+
};
|
|
31
|
+
icon: {
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare const INPUT_ICON: {
|
|
36
|
+
frameSize: number;
|
|
37
|
+
iconSize: number;
|
|
38
|
+
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import { Rule } from '../../types/form';
|
|
3
3
|
import { SdTooltipProps } from '../sd-tooltip/sd-tooltip.config';
|
|
4
|
+
import { type InputSize } from './sd-input.config';
|
|
4
5
|
export declare class SdInput {
|
|
5
6
|
host: HTMLElement;
|
|
6
7
|
value?: string | number | null;
|
|
7
8
|
type: 'text' | 'password' | 'email';
|
|
8
|
-
|
|
9
|
+
size: InputSize;
|
|
10
|
+
addonLabel: string;
|
|
9
11
|
placeholder: string;
|
|
10
12
|
disabled: boolean;
|
|
11
13
|
clearable: boolean;
|
|
12
|
-
width
|
|
13
|
-
barcode?: boolean;
|
|
14
|
+
width: string;
|
|
14
15
|
rules?: Rule[];
|
|
15
16
|
autoFocus: boolean;
|
|
16
17
|
status?: 'default' | 'pass' | 'error';
|
|
@@ -57,7 +57,7 @@ export declare class SdSelect extends BaseDropdownEvent {
|
|
|
57
57
|
clearable: boolean;
|
|
58
58
|
searchable: boolean;
|
|
59
59
|
label: string;
|
|
60
|
-
|
|
60
|
+
addonLabel: string;
|
|
61
61
|
icon?: IconProps;
|
|
62
62
|
labelTooltip: string;
|
|
63
63
|
labelTooltipProps: SdTooltipProps | null;
|
|
@@ -19,7 +19,7 @@ export declare class SdSelectGroup extends BaseDropdownEvent {
|
|
|
19
19
|
clearable: boolean;
|
|
20
20
|
searchable: boolean;
|
|
21
21
|
label: string;
|
|
22
|
-
|
|
22
|
+
addonLabel: string;
|
|
23
23
|
icon?: IconProps;
|
|
24
24
|
labelTooltip: string;
|
|
25
25
|
labelTooltipProps: SdTooltipProps | null;
|
|
@@ -42,14 +42,6 @@ export declare const SELECT_COLORS: {
|
|
|
42
42
|
default: string;
|
|
43
43
|
disabled: string;
|
|
44
44
|
};
|
|
45
|
-
addonLabel: {
|
|
46
|
-
bg: string;
|
|
47
|
-
paddingX: string;
|
|
48
|
-
border: {
|
|
49
|
-
default: string;
|
|
50
|
-
disabled: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
45
|
};
|
|
54
46
|
export declare const LIST_ITEM_LAYOUT: {
|
|
55
47
|
paddingY: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import type { SelectV2Option, SelectV2Name, SelectV2Value
|
|
2
|
+
import type { SelectV2Option, SelectV2Name, SelectV2Value } from './sd-select-v2.config';
|
|
3
3
|
import type { Rule } from '../../types/form';
|
|
4
4
|
import type { SdTooltipProps } from '../sd-tooltip/sd-tooltip.config';
|
|
5
5
|
export declare class SdSelectV2 {
|
|
@@ -31,7 +31,7 @@ export declare class SdSelectV2 {
|
|
|
31
31
|
private resolvedMaxDropdownWidth;
|
|
32
32
|
private focused;
|
|
33
33
|
private hovered;
|
|
34
|
-
update: EventEmitter<
|
|
34
|
+
update: EventEmitter<SelectV2Value>;
|
|
35
35
|
dropDownShow: EventEmitter<{
|
|
36
36
|
isOpen: boolean;
|
|
37
37
|
}>;
|