@sellmate/design-system 1.0.47 → 1.0.49
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/{component.button-BjTPq93d.js → component.button-BKa5OPya.js} +2 -2
- package/dist/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-action-modal.cjs.entry.js +2 -2
- package/dist/cjs/{sd-button-v2.config-DniiNqy_.js → sd-button-v2.config-CQoTThio.js} +1 -1
- package/dist/cjs/sd-button-v2_2.cjs.entry.js +4 -4
- package/dist/cjs/sd-button_4.cjs.entry.js +3 -3
- package/dist/cjs/sd-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +8 -8
- package/dist/cjs/sd-input_2.cjs.entry.js +12 -6
- package/dist/cjs/sd-loading-spinner_3.cjs.entry.js +2 -2
- package/dist/cjs/sd-number-input.cjs.entry.js +182 -50
- 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-dropdown_2.cjs.entry.js +3 -3
- package/dist/cjs/sd-select-group.cjs.entry.js +1 -1
- 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 +5 -5
- package/dist/cjs/sd-select-v2-listbox_2.cjs.entry.js +3 -3
- package/dist/cjs/sd-select-v2.cjs.entry.js +3 -3
- package/dist/cjs/sd-tag.cjs.entry.js +26 -26
- package/dist/cjs/sd-text-link.cjs.entry.js +3 -3
- package/dist/cjs/sd-textarea.cjs.entry.js +2 -2
- package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast.cjs.entry.js +2 -2
- package/dist/cjs/sd-toggle-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
- package/dist/collection/components/sd-action-modal/sd-action-modal.js +4 -4
- package/dist/collection/components/sd-button-v2/sd-button-v2.config.js +2 -1
- package/dist/collection/components/sd-button-v2/sd-button-v2.css +3 -1
- package/dist/collection/components/sd-button-v2/sd-button-v2.js +1 -1
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.config.js +2 -1
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.css +1 -1
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +5 -5
- package/dist/collection/components/sd-input/sd-input.css +5 -0
- package/dist/collection/components/sd-input/sd-input.js +8 -2
- package/dist/collection/components/sd-number-input/sd-number-input.config.js +39 -0
- package/dist/collection/components/sd-number-input/sd-number-input.css +41 -84
- package/dist/collection/components/sd-number-input/sd-number-input.js +142 -49
- 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-group/sd-select-group.js +1 -1
- 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.js +2 -2
- package/dist/collection/components/sd-select-v2/sd-select-v2.js +3 -3
- package/dist/collection/components/sd-tag/sd-tag.config.js +8 -8
- package/dist/collection/components/sd-tag/sd-tag.js +2 -2
- package/dist/collection/components/sd-text-link/sd-text-link.js +3 -3
- package/dist/collection/components/sd-textarea/sd-textarea.js +2 -2
- package/dist/collection/components/sd-toast/sd-toast.js +2 -2
- package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
- package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-toggle-button/sd-toggle-button.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
- package/dist/components/{p-VgEdINd9.js → p-7tPcjtqM.js} +1 -1
- package/dist/components/{p-BcZ3kfAq.js → p-B09D2cZD.js} +1 -1
- package/dist/components/{p-BdjLD8BG.js → p-B6NYLHOZ.js} +1 -1
- package/dist/components/{p-DeFPfiJf.js → p-BeZsmobQ.js} +1 -1
- package/dist/components/p-By4ufaS3.js +1 -0
- package/dist/components/p-C3XBhNH9.js +1 -0
- package/dist/components/{p-D1g7VL0r.js → p-CUy8ulXZ.js} +1 -1
- package/dist/components/{p-CCACqlGH.js → p-CdoxVzYC.js} +1 -1
- package/dist/components/{p-D9MEHQTt.js → p-DAWMGK_A.js} +1 -1
- package/dist/components/{p-ek1GaThy.js → p-DE3qbfEZ.js} +1 -1
- package/dist/components/{p-CDGHjR8K.js → p-DJScHgLW.js} +1 -1
- package/dist/components/p-DdjivpAF.js +1 -0
- package/dist/components/{p-Dn-uC69K.js → p-DeTDTmN7.js} +1 -1
- package/dist/components/{p-BgyCebrU.js → p-DhKZT8lW.js} +1 -1
- package/dist/components/{p-Cnu8Ol-v.js → p-Dl7yIIDW.js} +1 -1
- package/dist/components/{p-DET3nB7T.js → p-DqwiOEb3.js} +1 -1
- package/dist/components/p-Du3VqeNP.js +1 -0
- package/dist/components/p-DwYSoCyW.js +1 -0
- package/dist/components/{p-vFrxPNO8.js → p-ZoQO0p2E.js} +1 -1
- package/dist/components/{p-pByyQ_xa.js → p-poQ9yAeD.js} +1 -1
- package/dist/components/{p-BUl_ruQ7.js → p-uWsY9w9i.js} +1 -1
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-button-v2.js +1 -1
- package/dist/components/sd-button.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-guide.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-modal-container.js +1 -1
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-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-text-link.js +1 -1
- package/dist/components/sd-textarea.js +1 -1
- package/dist/components/sd-toast-container.js +1 -1
- package/dist/components/sd-toast.js +1 -1
- package/dist/components/sd-toggle-button.js +1 -1
- package/dist/components/sd-toggle.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/design-system/design-system.css +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/p-07a3c3fc.entry.js +1 -0
- package/dist/design-system/{p-f026f7f4.entry.js → p-0e0992bf.entry.js} +1 -1
- package/dist/design-system/{p-c4aea24e.entry.js → p-127445af.entry.js} +1 -1
- package/dist/design-system/{p-50bfaf92.entry.js → p-19b18e4c.entry.js} +1 -1
- package/dist/design-system/{p-49e0b0bf.entry.js → p-19e62a3d.entry.js} +1 -1
- package/dist/design-system/{p-dd67b2e0.entry.js → p-242c605c.entry.js} +1 -1
- package/dist/design-system/p-4d904e5a.entry.js +1 -0
- package/dist/design-system/{p-5f4b252c.entry.js → p-4e9abae8.entry.js} +1 -1
- package/dist/design-system/{p-3a772b47.entry.js → p-53326ad6.entry.js} +1 -1
- package/dist/design-system/{p-c3117559.entry.js → p-833f828d.entry.js} +1 -1
- package/dist/design-system/{p-136e8453.entry.js → p-83e46793.entry.js} +1 -1
- package/dist/design-system/p-DwYSoCyW.js +1 -0
- package/dist/design-system/{p-CdOU_SOg.js → p-DzagopqQ.js} +1 -1
- package/dist/design-system/{p-f93313da.entry.js → p-ade2ed02.entry.js} +1 -1
- package/dist/design-system/p-aeed9b29.entry.js +1 -0
- package/dist/design-system/p-b5d8e54d.entry.js +1 -0
- package/dist/design-system/p-bddf2246.entry.js +1 -0
- package/dist/design-system/{p-50a571f7.entry.js → p-cf641008.entry.js} +1 -1
- package/dist/design-system/{p-b113f1e2.entry.js → p-d4da5815.entry.js} +1 -1
- package/dist/design-system/p-d93c6ea8.entry.js +1 -0
- package/dist/design-system/{p-f2df591c.entry.js → p-e58e5fa2.entry.js} +1 -1
- package/dist/design-system/{p-71ea3e9e.entry.js → p-e8cb12b7.entry.js} +1 -1
- package/dist/design-system/{p-3f6de68e.entry.js → p-ee25a675.entry.js} +1 -1
- package/dist/design-system/{p-b136cc18.entry.js → p-ef654bbe.entry.js} +1 -1
- package/dist/design-system/{p-9805bf41.entry.js → p-fc235907.entry.js} +1 -1
- package/dist/design-system/p-fd2e0035.entry.js +1 -0
- package/dist/esm/{component.button-KOzU1j2w.js → component.button-DwYSoCyW.js} +2 -2
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-action-modal.entry.js +2 -2
- package/dist/esm/{sd-button-v2.config-CRtF2Br0.js → sd-button-v2.config-B4Fmn4Ju.js} +1 -1
- package/dist/esm/sd-button-v2_2.entry.js +4 -4
- package/dist/esm/sd-button_4.entry.js +3 -3
- package/dist/esm/sd-checkbox.entry.js +1 -1
- package/dist/esm/sd-dropdown-button.entry.js +8 -8
- package/dist/esm/sd-input_2.entry.js +12 -6
- package/dist/esm/sd-loading-spinner_3.entry.js +2 -2
- package/dist/esm/sd-number-input.entry.js +182 -50
- package/dist/esm/sd-popover.entry.js +2 -2
- package/dist/esm/sd-progress.entry.js +2 -2
- package/dist/esm/sd-select-dropdown_2.entry.js +3 -3
- package/dist/esm/sd-select-group.entry.js +1 -1
- 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 +5 -5
- package/dist/esm/sd-select-v2-listbox_2.entry.js +3 -3
- package/dist/esm/sd-select-v2.entry.js +3 -3
- package/dist/esm/sd-tag.entry.js +26 -26
- package/dist/esm/sd-text-link.entry.js +3 -3
- package/dist/esm/sd-textarea.entry.js +2 -2
- package/dist/esm/sd-toast-container.entry.js +1 -1
- package/dist/esm/sd-toast.entry.js +2 -2
- package/dist/esm/sd-toggle-button.entry.js +1 -1
- package/dist/esm/sd-toggle.entry.js +1 -1
- package/dist/types/components/sd-action-modal/sd-action-modal.d.ts +1 -1
- package/dist/types/components/sd-button-v2/sd-button-v2.config.d.ts +2 -1
- package/dist/types/components/sd-dropdown-button/sd-dropdown-button.config.d.ts +2 -1
- package/dist/types/components/sd-number-input/sd-number-input.config.d.ts +67 -0
- package/dist/types/components/sd-number-input/sd-number-input.d.ts +7 -2
- package/dist/types/components.d.ts +34 -5
- package/hydrate/index.js +307 -166
- package/hydrate/index.mjs +307 -166
- package/package.json +1 -1
- package/dist/components/p-B0DS3FC2.js +0 -1
- package/dist/components/p-B2GnuHlE.js +0 -1
- package/dist/components/p-BGW3nie7.js +0 -1
- package/dist/components/p-DM5hNBSY.js +0 -1
- package/dist/components/p-KOzU1j2w.js +0 -1
- package/dist/design-system/p-0c07a9be.entry.js +0 -1
- package/dist/design-system/p-3214d7c2.entry.js +0 -1
- package/dist/design-system/p-KOzU1j2w.js +0 -1
- package/dist/design-system/p-a443cbef.entry.js +0 -1
- package/dist/design-system/p-a44975fc.entry.js +0 -1
- package/dist/design-system/p-b6f4369d.entry.js +0 -1
- package/dist/design-system/p-bad64f8a.entry.js +0 -1
- package/dist/design-system/p-da57a2e6.entry.js +0 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { h, } from "@stencil/core";
|
|
2
2
|
import { nanoid } from "nanoid/non-secure";
|
|
3
|
+
import { NUMBER_INPUT_SIZE_MAP, NUMBER_INPUT_COLORS, NUMBER_INPUT_STEPPER, NUMBER_INPUT_HINT, NUMBER_INPUT_ERROR_MESSAGE, NUMBER_INPUT_CONTENTS_GAP, } from "./sd-number-input.config";
|
|
3
4
|
export class SdNumberInput {
|
|
4
5
|
el;
|
|
6
|
+
size = 'sm';
|
|
5
7
|
min = Number.NEGATIVE_INFINITY;
|
|
6
8
|
max = Number.POSITIVE_INFINITY;
|
|
7
9
|
step = 1;
|
|
@@ -18,6 +20,8 @@ export class SdNumberInput {
|
|
|
18
20
|
status;
|
|
19
21
|
hint = '';
|
|
20
22
|
errorMessage = '';
|
|
23
|
+
inputPrefix = '';
|
|
24
|
+
inputSuffix = '';
|
|
21
25
|
inputClass = '';
|
|
22
26
|
readonly = false;
|
|
23
27
|
inputStyle = {};
|
|
@@ -32,8 +36,18 @@ export class SdNumberInput {
|
|
|
32
36
|
update;
|
|
33
37
|
focus;
|
|
34
38
|
blur;
|
|
39
|
+
toNumber(val) {
|
|
40
|
+
if (val === null || val === undefined || val === '')
|
|
41
|
+
return null;
|
|
42
|
+
if (typeof val === 'number')
|
|
43
|
+
return isNaN(val) ? null : val;
|
|
44
|
+
if (typeof val === 'string')
|
|
45
|
+
return this.parseInput(val);
|
|
46
|
+
const num = Number(val);
|
|
47
|
+
return isNaN(num) ? null : num;
|
|
48
|
+
}
|
|
35
49
|
formatWithCommas(value) {
|
|
36
|
-
if (value === null || value === undefined)
|
|
50
|
+
if (value === null || value === undefined || isNaN(value))
|
|
37
51
|
return '';
|
|
38
52
|
const isNegative = value < 0;
|
|
39
53
|
const absValue = Math.abs(value);
|
|
@@ -46,20 +60,20 @@ export class SdNumberInput {
|
|
|
46
60
|
if (!input || input.trim() === '')
|
|
47
61
|
return null;
|
|
48
62
|
const cleaned = input.replace(/,/g, '').trim();
|
|
49
|
-
// -로 시작을 할 수 있을 수 있고, 소수점 0.n | .n
|
|
50
63
|
if (!/^-?(\d+\.?\d*|\d*\.\d+)$/.test(cleaned)) {
|
|
51
64
|
return null;
|
|
52
65
|
}
|
|
53
66
|
const parsed = parseFloat(cleaned);
|
|
54
67
|
if (isNaN(parsed))
|
|
55
68
|
return null;
|
|
56
|
-
// 소수점 사용 하지 않는데 . 이 있는 경우
|
|
57
69
|
if (!this.useDecimal && cleaned.includes('.')) {
|
|
58
70
|
return null;
|
|
59
71
|
}
|
|
60
72
|
return parsed;
|
|
61
73
|
}
|
|
62
74
|
clampMinMax(value) {
|
|
75
|
+
if (isNaN(value))
|
|
76
|
+
return 0;
|
|
63
77
|
return Math.min(Math.max(value, this.min), this.max);
|
|
64
78
|
}
|
|
65
79
|
updateDisplay() {
|
|
@@ -82,14 +96,12 @@ export class SdNumberInput {
|
|
|
82
96
|
return false;
|
|
83
97
|
}
|
|
84
98
|
valueChanged(newValue) {
|
|
85
|
-
|
|
86
|
-
|
|
99
|
+
const parsed = this.toNumber(newValue);
|
|
100
|
+
if (parsed !== null) {
|
|
101
|
+
this.internalValue = this.clampMinMax(parsed);
|
|
87
102
|
}
|
|
88
103
|
else {
|
|
89
|
-
|
|
90
|
-
if (parsed !== null) {
|
|
91
|
-
this.internalValue = this.clampMinMax(parsed);
|
|
92
|
-
}
|
|
104
|
+
this.internalValue = null;
|
|
93
105
|
}
|
|
94
106
|
this.updateDisplay();
|
|
95
107
|
}
|
|
@@ -112,15 +124,21 @@ export class SdNumberInput {
|
|
|
112
124
|
async sdFocus() {
|
|
113
125
|
this.formField?.sdFocus();
|
|
114
126
|
}
|
|
127
|
+
async sdGetNativeElement() {
|
|
128
|
+
return this.nativeEl || null;
|
|
129
|
+
}
|
|
115
130
|
componentWillLoad() {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
this.internalValue = this.clampMinMax(parsed);
|
|
120
|
-
}
|
|
131
|
+
const parsed = this.toNumber(this.value);
|
|
132
|
+
if (parsed !== null) {
|
|
133
|
+
this.internalValue = this.clampMinMax(parsed);
|
|
121
134
|
}
|
|
122
135
|
this.updateDisplay();
|
|
123
136
|
}
|
|
137
|
+
componentDidLoad() {
|
|
138
|
+
if (this.autoFocus) {
|
|
139
|
+
this.nativeEl?.focus();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
124
142
|
// TODO: 현재 숫자를 크게 넣어서 숫자e+21등의 형식으로 변환되면 값이 바뀌지않음 수정 필요
|
|
125
143
|
handleInput = (event) => {
|
|
126
144
|
const target = event.target;
|
|
@@ -131,18 +149,15 @@ export class SdNumberInput {
|
|
|
131
149
|
return;
|
|
132
150
|
}
|
|
133
151
|
const commasRemoved = inputValue.replace(/,/g, '');
|
|
134
|
-
// 만약에 소수점 (.) 이 여러개 일 경우
|
|
135
152
|
const decimalCount = (commasRemoved.match(/\./g) || []).length;
|
|
136
153
|
if (decimalCount > 1) {
|
|
137
154
|
target.value = this.displayValue;
|
|
138
155
|
return;
|
|
139
156
|
}
|
|
140
|
-
// 가능: "-", ".", "-." (단순 기호만 있는 경우)
|
|
141
157
|
if (commasRemoved === '-' || commasRemoved === '.' || commasRemoved === '-.') {
|
|
142
158
|
target.value = commasRemoved;
|
|
143
159
|
return;
|
|
144
160
|
}
|
|
145
|
-
// 숫자 뒤에 . 이 있는 경우 (예: "1000.") -> 콤마 포맷 적용 + . 유지
|
|
146
161
|
if (commasRemoved.endsWith('.') && decimalCount === 1) {
|
|
147
162
|
const numberPart = commasRemoved.slice(0, -1);
|
|
148
163
|
const parsed = this.parseInput(numberPart);
|
|
@@ -219,40 +234,51 @@ export class SdNumberInput {
|
|
|
219
234
|
return;
|
|
220
235
|
this.internalValue = nextVal;
|
|
221
236
|
};
|
|
222
|
-
async sdGetNativeElement() {
|
|
223
|
-
return this.nativeEl || null;
|
|
224
|
-
}
|
|
225
|
-
getInputStatus() {
|
|
226
|
-
if (this.disabled)
|
|
227
|
-
return 'sd-number-input--disabled';
|
|
228
|
-
if (this.hovered)
|
|
229
|
-
return 'sd-number-input--hovered';
|
|
230
|
-
if (this.status)
|
|
231
|
-
return `sd-number-input--${this.status}`;
|
|
232
|
-
if (this.error)
|
|
233
|
-
return 'sd-number-input--error';
|
|
234
|
-
return '';
|
|
235
|
-
}
|
|
236
237
|
render() {
|
|
237
|
-
const
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
238
|
+
const sizeTokens = NUMBER_INPUT_SIZE_MAP[this.size] ?? NUMBER_INPUT_SIZE_MAP.sm;
|
|
239
|
+
const stepperSize = NUMBER_INPUT_STEPPER[this.size]?.size ?? NUMBER_INPUT_STEPPER.sm.size;
|
|
240
|
+
const iconSize = this.size === 'md' ? 14 : 12;
|
|
241
|
+
const cssVars = {
|
|
242
|
+
// 컴포넌트 로컬 토큰
|
|
243
|
+
'--sd-number-input-font-size': `${sizeTokens.fontSize}px`,
|
|
244
|
+
'--sd-number-input-line-height': `${sizeTokens.lineHeight}px`,
|
|
245
|
+
'--sd-number-input-font-weight': sizeTokens.fontWeight,
|
|
246
|
+
'--sd-number-input-padding-x': `${sizeTokens.paddingX}px`,
|
|
247
|
+
'--sd-number-input-gap': `${sizeTokens.gap}px`,
|
|
248
|
+
'--sd-number-input-text-color': NUMBER_INPUT_COLORS.text.default,
|
|
249
|
+
'--sd-number-input-placeholder-color': NUMBER_INPUT_COLORS.text.placeholder,
|
|
250
|
+
'--sd-number-input-disabled-color': NUMBER_INPUT_COLORS.text.disabled,
|
|
251
|
+
// 스테퍼 토큰
|
|
252
|
+
'--sd-number-input-stepper-size': `${stepperSize}px`,
|
|
253
|
+
'--sd-number-input-stepper-radius': `${NUMBER_INPUT_STEPPER.radius}px`,
|
|
254
|
+
'--sd-number-input-stepper-bg': NUMBER_INPUT_STEPPER.bg.default,
|
|
255
|
+
'--sd-number-input-stepper-bg-disabled': NUMBER_INPUT_STEPPER.bg.disabled,
|
|
256
|
+
'--sd-number-input-stepper-icon-color': NUMBER_INPUT_STEPPER.icon.default,
|
|
257
|
+
'--sd-number-input-stepper-icon-disabled': NUMBER_INPUT_STEPPER.icon.disabled,
|
|
258
|
+
// sd-field 시스템 변수 오버라이드
|
|
259
|
+
'--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
|
|
260
|
+
'--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
|
|
261
|
+
'--sd-system-color-field-border-default': NUMBER_INPUT_COLORS.border.default,
|
|
262
|
+
'--sd-system-color-field-border-focus': NUMBER_INPUT_COLORS.border.focus,
|
|
263
|
+
'--sd-system-color-field-border-danger': NUMBER_INPUT_COLORS.border.danger,
|
|
264
|
+
'--sd-system-color-field-bg-default': NUMBER_INPUT_COLORS.bg.default,
|
|
265
|
+
// 힌트/에러 메시지 오버라이드
|
|
266
|
+
'--sd-textinput-input-text-error-message': NUMBER_INPUT_ERROR_MESSAGE.color,
|
|
267
|
+
'--sd-textinput-input-error-message-typography-font-size': `${NUMBER_INPUT_ERROR_MESSAGE.typography.fontSize}px`,
|
|
268
|
+
'--sd-textinput-input-error-message-typography-line-height': `${NUMBER_INPUT_ERROR_MESSAGE.typography.lineHeight}px`,
|
|
269
|
+
'--sd-textinput-input-text-hint': NUMBER_INPUT_HINT.color,
|
|
270
|
+
'--sd-textinput-input-hint-typography-font-size': `${NUMBER_INPUT_HINT.typography.fontSize}px`,
|
|
271
|
+
'--sd-textinput-input-hint-typography-line-height': `${NUMBER_INPUT_HINT.typography.lineHeight}px`,
|
|
272
|
+
'--sd-textinput-input-contents-gap': `${NUMBER_INPUT_CONTENTS_GAP}px`,
|
|
244
273
|
};
|
|
245
|
-
return (h("sd-field", { key: '
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
'sd-number-input__button': true,
|
|
254
|
-
'sd-number-input__button--increment': true,
|
|
255
|
-
}, disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, h("sd-icon", { key: '3b94c87f4596e18b77cc31f54e779160b422562f', name: "add", size: 12, color: this.isIncrementDisabled() ? 'grey_45' : 'brilliantblue_70' })))))));
|
|
274
|
+
return (h("sd-field", { key: '3c0c340cb1078a7f3763ee9f7339ef0cec63b020', 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, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: 'd2be35e6a7e1201436ad625f4d9678b023187666', class: "sd-number-input__content" }, this.useButton && (h("button", { key: 'd048a5c576601ff6ac61eda9613d5981b415cd53', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--decrement", disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, h("sd-icon", { key: 'e618f41dda4f8afcb52ec4dc20828adf0ddc77c3', name: "minus", size: iconSize, color: this.isDecrementDisabled()
|
|
275
|
+
? NUMBER_INPUT_STEPPER.icon.disabled
|
|
276
|
+
: NUMBER_INPUT_STEPPER.icon.default }))), this.inputPrefix && (h("span", { key: 'd293f7530b94c340af5495feaa3323f5f6d7e6bc', class: "sd-number-input__prefix" }, this.inputPrefix)), h("input", { key: '21d97799b6222f8c5f2145660d4cf25bf5fdeabe', 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: {
|
|
277
|
+
textAlign: this.useButton ? 'center' : 'right',
|
|
278
|
+
...this.inputStyle,
|
|
279
|
+
} }), this.inputSuffix && (h("span", { key: '2008a9aa47389bcac4df03de3e357df6f684f379', class: "sd-number-input__suffix" }, this.inputSuffix)), this.useButton && (h("button", { key: '5841af412ad228796debe31f7578fd332bf8883a', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--increment", disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, h("sd-icon", { key: 'ebc2f66dbb12664a976b36eb5b333ff7597d6d52', name: "add", size: iconSize, color: this.isIncrementDisabled()
|
|
280
|
+
? NUMBER_INPUT_STEPPER.icon.disabled
|
|
281
|
+
: NUMBER_INPUT_STEPPER.icon.default }))))));
|
|
256
282
|
}
|
|
257
283
|
static get is() { return "sd-number-input"; }
|
|
258
284
|
static get originalStyleUrls() {
|
|
@@ -267,6 +293,33 @@ export class SdNumberInput {
|
|
|
267
293
|
}
|
|
268
294
|
static get properties() {
|
|
269
295
|
return {
|
|
296
|
+
"size": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"mutable": false,
|
|
299
|
+
"complexType": {
|
|
300
|
+
"original": "NumberInputSize",
|
|
301
|
+
"resolved": "\"md\" | \"sm\"",
|
|
302
|
+
"references": {
|
|
303
|
+
"NumberInputSize": {
|
|
304
|
+
"location": "import",
|
|
305
|
+
"path": "./sd-number-input.config",
|
|
306
|
+
"id": "src/components/sd-number-input/sd-number-input.config.ts::NumberInputSize",
|
|
307
|
+
"referenceLocation": "NumberInputSize"
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
"required": false,
|
|
312
|
+
"optional": false,
|
|
313
|
+
"docs": {
|
|
314
|
+
"tags": [],
|
|
315
|
+
"text": ""
|
|
316
|
+
},
|
|
317
|
+
"getter": false,
|
|
318
|
+
"setter": false,
|
|
319
|
+
"reflect": false,
|
|
320
|
+
"attribute": "size",
|
|
321
|
+
"defaultValue": "'sm'"
|
|
322
|
+
},
|
|
270
323
|
"min": {
|
|
271
324
|
"type": "number",
|
|
272
325
|
"mutable": false,
|
|
@@ -589,6 +642,46 @@ export class SdNumberInput {
|
|
|
589
642
|
"attribute": "error-message",
|
|
590
643
|
"defaultValue": "''"
|
|
591
644
|
},
|
|
645
|
+
"inputPrefix": {
|
|
646
|
+
"type": "string",
|
|
647
|
+
"mutable": false,
|
|
648
|
+
"complexType": {
|
|
649
|
+
"original": "string",
|
|
650
|
+
"resolved": "string",
|
|
651
|
+
"references": {}
|
|
652
|
+
},
|
|
653
|
+
"required": false,
|
|
654
|
+
"optional": false,
|
|
655
|
+
"docs": {
|
|
656
|
+
"tags": [],
|
|
657
|
+
"text": ""
|
|
658
|
+
},
|
|
659
|
+
"getter": false,
|
|
660
|
+
"setter": false,
|
|
661
|
+
"reflect": false,
|
|
662
|
+
"attribute": "input-prefix",
|
|
663
|
+
"defaultValue": "''"
|
|
664
|
+
},
|
|
665
|
+
"inputSuffix": {
|
|
666
|
+
"type": "string",
|
|
667
|
+
"mutable": false,
|
|
668
|
+
"complexType": {
|
|
669
|
+
"original": "string",
|
|
670
|
+
"resolved": "string",
|
|
671
|
+
"references": {}
|
|
672
|
+
},
|
|
673
|
+
"required": false,
|
|
674
|
+
"optional": false,
|
|
675
|
+
"docs": {
|
|
676
|
+
"tags": [],
|
|
677
|
+
"text": ""
|
|
678
|
+
},
|
|
679
|
+
"getter": false,
|
|
680
|
+
"setter": false,
|
|
681
|
+
"reflect": false,
|
|
682
|
+
"attribute": "input-suffix",
|
|
683
|
+
"defaultValue": "''"
|
|
684
|
+
},
|
|
592
685
|
"inputClass": {
|
|
593
686
|
"type": "string",
|
|
594
687
|
"mutable": false,
|
|
@@ -68,12 +68,12 @@ export class SdPagination {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
render() {
|
|
71
|
-
return (h("div", { key: '
|
|
71
|
+
return (h("div", { key: 'c689cc21909b50a709487a409ecbd2ba48d3db3a', class: this.paginationClasses }, h("div", { key: 'a38cee49c5d225beea8acd35cb7b370319886bee', class: "prepend-btns" }, this.renderPrevButtons()), this.simple ? (h("div", { class: "pagination-info" }, h("span", { class: "current-page" }, this.currentPage), h("span", null, "/"), h("span", { class: "last-page" }, this.lastPage))) : (this.pageNumbers.map(n => (h("button", { type: "button", "aria-current": this.currentPage === n ? 'page' : undefined, class: {
|
|
72
72
|
'pagination-btn': true,
|
|
73
73
|
'pagination-btn--selected': this.currentPage === n,
|
|
74
74
|
}, disabled: this.currentPage === n, style: {
|
|
75
75
|
'--pagination-btn-width': `${this.buttonWidth}px`,
|
|
76
|
-
}, onClick: () => this.handlePageChange(n) }, n)))), h("div", { key: '
|
|
76
|
+
}, onClick: () => this.handlePageChange(n) }, n)))), h("div", { key: '40dcb43cd251c5cbdf18e502acd67962e87d4496', class: "append-btns" }, this.renderNextButtons())));
|
|
77
77
|
}
|
|
78
78
|
static get is() { return "sd-pagination"; }
|
|
79
79
|
static get originalStyleUrls() {
|
|
@@ -39,14 +39,14 @@ export class SdPopover {
|
|
|
39
39
|
this.showPopover = false;
|
|
40
40
|
};
|
|
41
41
|
render() {
|
|
42
|
-
return (h(Fragment, { key: '
|
|
42
|
+
return (h(Fragment, { key: '32543028f51799b838817a81d82c8fc4e16d34d9' }, this.label ? (h("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: this.icon, size: this.buttonSize, color: this.color, variant: this.buttonVariant, class: "sd-popover", onSdClick: () => (this.showPopover = !this.showPopover) })) : (h("sd-icon", { ref: el => (this.buttonEl = el), name: this.icon, size: this.iconSize, color: this.color, class: "sd-popover", onClick: () => (this.showPopover = !this.showPopover) })), this.showPopover && (h("sd-floating-portal", { key: '146f7b10c48d0e43d9daad84f2b0d73a53c1f083', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: this.placement, offset: this.popoverOffset }, h("div", { key: '020b1bc52cb001ef761aac5e88fdfe4a3cc1dbfc', class: {
|
|
43
43
|
'sd-floating-menu': true,
|
|
44
44
|
'sd-floating-menu--popover': true,
|
|
45
45
|
[`sd-floating-menu--${this.placement}`]: true,
|
|
46
46
|
[this.menuClass]: !!this.menuClass,
|
|
47
47
|
}, style: {
|
|
48
48
|
'--sd-floating-bg': popoverTokens.popover.bg,
|
|
49
|
-
} }, h("i", { key: '
|
|
49
|
+
} }, h("i", { key: '819af7776ce65a25c996262105b05e37d4d04652', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, h(TooltipArrow, { key: '053b299c5a41acb16042adfa2aba7c35eedb0602' })), h("div", { key: '109f2b1044827112922e40b04671785209b9d816', class: "sd-floating-menu__content" }, this.menuTitle && h("div", { key: '99f49b0165ce502ba30ecac3369ba6086cbabb6f', class: "sd-floating-menu__title" }, this.menuTitle), this.messages.length > 0 && (h("div", { key: '5ecd1eea5a83c3fcf71719b308b75734ba42f96d', class: "sd-floating-menu__messages" }, this.messages.map(message => (h("div", null, message))))), this.buttons.length > 0 && (h("div", { key: '9a3a3a38dd3fac46e370f45e65dd22dbcf49bce7', class: `sd-floating-menu__buttons sd-floating-menu__buttons--${this.buttons.length}` }, this.buttons.map(button => (h("sd-button", { ...button })))))), this.useClose && (h("button", { key: '6f231ddb997a45f23c258a092b45f3d6a5e49e60', title: "close", class: "sd-floating-menu__close-button", onClick: () => this.handleClose() }, h("sd-icon", { key: '738c152ec2435992ae21394bf2c164515cef7ed9', name: "close", size: popoverTokens.popover.close.icon, color: popoverTokens.popover.close.color }))))))));
|
|
50
50
|
}
|
|
51
51
|
static get is() { return "sd-popover"; }
|
|
52
52
|
static get originalStyleUrls() {
|
|
@@ -33,10 +33,10 @@ export class SdProgress {
|
|
|
33
33
|
return this.statusColor[this.progressStatus];
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
return (h("div", { key: '
|
|
36
|
+
return (h("div", { key: '483f8f0ec69bc7f4bd608332eb2f87b722bc947f', style: {
|
|
37
37
|
'--progress-color': this.progressColor,
|
|
38
38
|
'--progress-percentage': `${this.progressPercentage}%`,
|
|
39
|
-
} }, this.type === 'bar' ? this.renderBarProgress() : this.renderSpinnerProgress(), this.label && h("div", { key: '
|
|
39
|
+
} }, this.type === 'bar' ? this.renderBarProgress() : this.renderSpinnerProgress(), this.label && h("div", { key: 'b4d3f1f425cd4ae96ef02a6c56671a182ab7ca09', class: "sd-progress__label" }, this.label)));
|
|
40
40
|
}
|
|
41
41
|
renderBarProgress() {
|
|
42
42
|
return (h("div", { class: `sd-progress__bar sd-progress__bar--${this.progressStatus}` }, h("div", { class: ['sd-progress__bar__percent', this.progressPercentage < 100 ? 'proceed' : ''].join(' ') }), h("div", { class: "sd-progress__bar__indicator sd-progress__bar__indicator--left" }, this.progressPercentage, "%"), h("div", { class: "sd-progress__bar__indicator sd-progress__bar__indicator--right" }, this.progressPercentage, "%")));
|
|
@@ -144,10 +144,10 @@ export class SdSelectDropdown {
|
|
|
144
144
|
this.isScrolled = scrollTop > 0;
|
|
145
145
|
};
|
|
146
146
|
render() {
|
|
147
|
-
return (h("div", { key: '
|
|
147
|
+
return (h("div", { key: '0e45aa22a4566ec4a1a4f8dbecd2f60a024b0a34', class: {
|
|
148
148
|
'sd-select-dropdown': true,
|
|
149
149
|
'sd-select-dropdown--ready': this.isDropdownReady,
|
|
150
|
-
}, style: this.dropdownSize, onScroll: this.handleDropdownScroll, ref: el => (this.dropdownRef = el) }, this.searchable && (h("sd-select-search-input", { key: '
|
|
150
|
+
}, style: this.dropdownSize, onScroll: this.handleDropdownScroll, ref: el => (this.dropdownRef = el) }, this.searchable && (h("sd-select-search-input", { key: 'c8f63d17ec76fff2bbb36773baa2dc015396956a', ref: el => (this.searchRef = el), isScrolled: this.isScrolled, searchText: this.searchText, onSdSearchInput: (event) => (this.searchText = event.detail || ''), onSdSearchFocus: () => (this.itemIndex = -1) })), this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index) => (h("slot", { name: `option-${option.value}` }, h("sd-select-option", { option: option, index: index, isSelected: this.isOptionSelected(option.value), isFocused: index === this.itemIndex, onOptionClick: ({ detail }) => this.optionClick.emit(detail), useCheckbox: this.useCheckbox }))))) : (h("slot", { name: "option-placeholder" }, h("div", { class: 'sd-select-option-placeholder' }, this.optionPlaceholder)))));
|
|
151
151
|
}
|
|
152
152
|
static get is() { return "sd-select-dropdown"; }
|
|
153
153
|
static get originalStyleUrls() {
|
|
@@ -24,7 +24,7 @@ export class SdSelectOption {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
render() {
|
|
27
|
-
return (h("div", { key: '
|
|
27
|
+
return (h("div", { key: '1312407dd54318273dd5be025d20c992a5e8bd97', class: {
|
|
28
28
|
'sd-select__option': true,
|
|
29
29
|
'sd-select__option--selected': this.isSelected,
|
|
30
30
|
'sd-select__option--disabled': !!this.option.disabled,
|
package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.js
CHANGED
|
@@ -16,17 +16,17 @@ export class SdSelectSearchInput {
|
|
|
16
16
|
input?.focus({ preventScroll: true });
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (h("div", { key: '
|
|
19
|
+
return (h("div", { key: 'cfc997e9e3c418a2aa6eb33cb39a3928fba84f91', class: {
|
|
20
20
|
'sd-select-search-input': true,
|
|
21
21
|
'sd-select-search-input--scrolled': !!this.isScrolled,
|
|
22
|
-
}, onClick: event => event.stopPropagation() }, h("sd-input", { key: '
|
|
22
|
+
}, onClick: event => event.stopPropagation() }, h("sd-input", { key: '5d2528dfba7a392c31d47699f4afbcee41583754', ref: el => (this.searchRef = el), value: this.searchText, placeholder: "\uAC80\uC0C9", clearable: true, inputStyle: { 'padding-left': '8px' }, autofocus: true, onSdUpdate: event => {
|
|
23
23
|
this.searchInput.emit(String(event?.detail));
|
|
24
24
|
}, onSdFocus: () => {
|
|
25
25
|
this.searchFocus.emit();
|
|
26
26
|
}, onKeyDown: event => {
|
|
27
27
|
if (event.code === 'Enter')
|
|
28
28
|
event.stopPropagation();
|
|
29
|
-
} }, h("sd-icon", { key: '
|
|
29
|
+
} }, h("sd-icon", { key: 'a9161175dfd27e86fa5ac036ab592c33d5820040', name: "search", size: 16, color: "#737373", style: { marginRight: '4px' }, slot: "prefix" }))));
|
|
30
30
|
}
|
|
31
31
|
static get is() { return "sd-select-search-input"; }
|
|
32
32
|
static get originalStyleUrls() {
|
|
@@ -270,7 +270,7 @@ export class SdSelectGroup extends BaseDropdownEvent {
|
|
|
270
270
|
});
|
|
271
271
|
}
|
|
272
272
|
render() {
|
|
273
|
-
return (h("sd-field", { key: '
|
|
273
|
+
return (h("sd-field", { key: '7dc16e6167d57ea23971ddc60f6414c1894f4163', label: this.label, 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' } }, h("div", { key: '470501b3bd905154bb090c11237feea3c3566fd5', class: {
|
|
274
274
|
'sd-select-group': true,
|
|
275
275
|
'sd-select-group--open': this.isOpen,
|
|
276
276
|
'sd-select-group--disabled': this.disabled,
|
|
@@ -150,7 +150,7 @@ export class SdSelectMultiple extends BaseDropdownEvent {
|
|
|
150
150
|
this.handleOptionSelection(option);
|
|
151
151
|
};
|
|
152
152
|
render() {
|
|
153
|
-
return (h("sd-field", { key: '
|
|
153
|
+
return (h("sd-field", { key: '526a52f1fb3a8bd80a55d7094857901d7c933ca5', label: this.label, 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) }, h("div", { key: '1084a5740aca5ea9d27485807e7edfc276d78ba3', class: {
|
|
154
154
|
'sd-select-multiple': true,
|
|
155
155
|
'sd-select-multiple--open': this.isOpen,
|
|
156
156
|
'sd-select-multiple--disabled': this.disabled,
|
|
@@ -39,7 +39,7 @@ export class SdSelectOptionGroup {
|
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
render() {
|
|
42
|
-
return (h("div", { key: '
|
|
42
|
+
return (h("div", { key: 'a26c5527bd3ffcf56d9811f5bca91fd859a232ea', class: {
|
|
43
43
|
'sd-select__option-group': true,
|
|
44
44
|
'sd-select__option-group--selected': !!this.isSelected,
|
|
45
45
|
'sd-select__option-group--disabled': !!this.option.disabled,
|
|
@@ -48,10 +48,10 @@ export class SdSelectOptionGroup {
|
|
|
48
48
|
'sd-select__option-group--group': this.option.type === 'group',
|
|
49
49
|
'sd-select__option-group--subgroup': this.option.type === 'subgroup',
|
|
50
50
|
'sd-select__option-group--item': this.option.type === 'item',
|
|
51
|
-
}, 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: '
|
|
51
|
+
}, 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: '30ac15175f13b9cffe740052dbf18ca14753ab6d', class: "sd-select__option-group__label-wrapper" }, this.useCheckbox && (h("sd-checkbox", { key: '04a8a8a8bdc847c6c7cb757961f69e1e40161775', value: this.isSelected, disabled: this.option.disabled, onClick: e => {
|
|
52
52
|
e.preventDefault();
|
|
53
53
|
this.handleClick(this.option, this.isSelected, e);
|
|
54
|
-
} })), h("span", { key: '
|
|
54
|
+
} })), h("span", { key: 'eca4b0955a7988a1a293b709bf29dc23f9443def', class: "sd-select__option-group-label" }, this.option.label), this.useIndicator && this.option.type !== 'item' && (h("span", { key: '39e0a7a5444b9096da0d759cdb4cd0ee04bf2250', class: "sd-select__option-group__count-indicator" }, `(${this.countInfo?.selectedCount}/${this.countInfo?.totalCount})`)))));
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "sd-select-option-group"; }
|
|
57
57
|
static get originalStyleUrls() {
|
package/dist/collection/components/sd-select-v2/sd-select-v2-list-item/sd-select-v2-list-item.js
CHANGED
|
@@ -64,7 +64,7 @@ export class SdSelectV2ListItem {
|
|
|
64
64
|
if (isDepth1Group) {
|
|
65
65
|
cssVars['--list-item-border-top'] = `${LIST_ITEM_COLORS.depth1.borderWidth}px solid ${LIST_ITEM_COLORS.depth1.border}`;
|
|
66
66
|
}
|
|
67
|
-
return (h("div", { key: '
|
|
67
|
+
return (h("div", { key: 'c84ff08d801e2775edfb55e30e11b3ec37c3e0e1', class: {
|
|
68
68
|
'sd-select-v2-list-item': true,
|
|
69
69
|
'sd-select-v2-list-item--group': isGroup,
|
|
70
70
|
'sd-select-v2-list-item--depth1-group': isDepth1Group,
|
|
@@ -74,7 +74,7 @@ export class SdSelectV2ListItem {
|
|
|
74
74
|
'sd-select-v2-list-item--focused': this.isFocused,
|
|
75
75
|
'sd-select-v2-list-item--selectable': this.isSelectable && !this.option.disabled,
|
|
76
76
|
'sd-select-v2-list-item--disabled': !!this.option.disabled,
|
|
77
|
-
}, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (h("sd-checkbox", { key: '
|
|
77
|
+
}, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (h("sd-checkbox", { key: '96423d573fd7cbd158196d114ae6c81a371c2fd7', 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: '4745f1f61994b31b2b84fb651eb47974e9cb5f0e', class: "sd-select-v2-list-item__label" }, this.option.label), this.countInfo && (h("span", { key: '311244150b27e9aa50d4ab790bacca3552af43ae', class: "sd-select-v2-list-item__count" }, "(", this.countInfo.selected, "/", this.countInfo.total, ")"))));
|
|
78
78
|
}
|
|
79
79
|
static get is() { return "sd-select-v2-list-item"; }
|
|
80
80
|
static get originalStyleUrls() {
|
|
@@ -41,12 +41,12 @@ export class SdSelectV2ListItemSearch {
|
|
|
41
41
|
clearTimeout(this.debounceTimer);
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
|
-
return (h("div", { key: '
|
|
44
|
+
return (h("div", { key: 'c09115eed7c6fc796f80aa965b64dec18caf6c49', class: {
|
|
45
45
|
'sd-select-v2-list-item-search': true,
|
|
46
46
|
'sd-select-v2-list-item-search--scrolled': this.isScrolled,
|
|
47
|
-
} }, h("div", { key: '
|
|
47
|
+
} }, h("div", { key: 'd5d4132740768db4b1e9df4f7e4e7085f5fbe408', class: "sd-select-v2-list-item-search__inner" }, h("sd-icon", { key: '428d646550ed6d3488a493f1614ba4211611c945', name: "search", size: 16, color: "grey_70", class: "sd-select-v2-list-item-search__icon" }), h("input", { key: '5fb8aea3be8de6cf81cee48667d552b8a3bd47dd', ref: el => {
|
|
48
48
|
this.inputEl = el;
|
|
49
|
-
}, type: "text", class: "sd-select-v2-list-item-search__input", placeholder: "\uAC80\uC0C9\uC5B4 \uC785\uB825", value: this.searchText, onInput: this.handleInput, onFocus: () => this.searchFocus.emit() }), this.searchText && (h("button", { key: '
|
|
49
|
+
}, type: "text", class: "sd-select-v2-list-item-search__input", placeholder: "\uAC80\uC0C9\uC5B4 \uC785\uB825", value: this.searchText, onInput: this.handleInput, onFocus: () => this.searchFocus.emit() }), this.searchText && (h("button", { key: '64178df4690ea5736c554f13d7613f172fb7ff9a', type: "button", class: "sd-select-v2-list-item-search__clear", onClick: this.handleClear }, h("sd-icon", { key: '4143f22fbfd890a39ee7149dfbc4c46e07ba259b', name: "close", size: 12, color: "#888888" }))))));
|
|
50
50
|
}
|
|
51
51
|
static get is() { return "sd-select-v2-list-item-search"; }
|
|
52
52
|
static get originalStyleUrls() {
|
package/dist/collection/components/sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.js
CHANGED
|
@@ -283,7 +283,7 @@ export class SdSelectV2Listbox {
|
|
|
283
283
|
'--listbox-radius': `${LIST_BOX_LAYOUT.radius}px`,
|
|
284
284
|
'--listbox-padding-bottom': `${LIST_BOX_LAYOUT.paddingBottom}px`,
|
|
285
285
|
};
|
|
286
|
-
return (h("div", { key: '
|
|
286
|
+
return (h("div", { key: 'b6a2e5bdc338bceb6fff14fb4dd1dff7aa5ef8d4', class: "sd-select-v2-listbox", style: cssVars }, this.showSearch && (h("sd-select-v2-list-item-search", { key: '70698ce176c33401a5846a078e56b1f20332881c', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), h("div", { key: 'b8106d8003dde8476b119cdde89fe4ddcaab2611', class: "sd-select-v2-listbox__list", onScroll: this.handleScroll, ref: el => {
|
|
287
287
|
this.listEl = el;
|
|
288
288
|
} }, 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), isFocused: this.isOptionFocused(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick, onMouseEnter: () => this.handleOptionHover(option) })))))));
|
|
289
289
|
}
|
package/dist/collection/components/sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.js
CHANGED
|
@@ -28,11 +28,11 @@ export class SdSelectV2Trigger {
|
|
|
28
28
|
? SELECT_COLORS.icon.disabled
|
|
29
29
|
: SELECT_COLORS.icon.default,
|
|
30
30
|
};
|
|
31
|
-
return (h("div", { key: '
|
|
31
|
+
return (h("div", { key: 'bc824455fa516812712fe2c3f5858a7afe64340a', class: {
|
|
32
32
|
'sd-select-v2-trigger': true,
|
|
33
33
|
'sd-select-v2-trigger--open': this.isOpen,
|
|
34
34
|
'sd-select-v2-trigger--disabled': this.disabled,
|
|
35
|
-
}, style: cssVars, onClick: this.handleClick }, h("div", { key: '
|
|
35
|
+
}, style: cssVars, onClick: this.handleClick }, h("div", { key: 'bf7bae47cc19b07d76dcadf118f8490a40a7b635', class: "sd-select-v2-trigger__content" }, h("span", { key: '89799c367a752c6a7403ed20801e5dc87c9f3426', class: "sd-select-v2-trigger__text" }, hasValue ? this.displayText : this.placeholder), h("sd-icon", { key: 'dac0037a8c2f3d475795786b642f7cd725358fa4', name: "chevronDown", size: 12, color: "var(--trigger-icon-color)", class: {
|
|
36
36
|
'sd-select-v2-trigger__icon': true,
|
|
37
37
|
'sd-select-v2-trigger__icon--open': this.isOpen,
|
|
38
38
|
} }))));
|
|
@@ -206,13 +206,13 @@ export class SdSelectV2 {
|
|
|
206
206
|
this.closeDropdown();
|
|
207
207
|
},
|
|
208
208
|
};
|
|
209
|
-
return (h("sd-field", { key: '
|
|
209
|
+
return (h("sd-field", { key: '94a50bd86ecb1fdaab2e5edd816f123f985bb5e1', name: this.fieldName || this.internalName, 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, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, onMouseEnter: () => {
|
|
210
210
|
this.hovered = true;
|
|
211
211
|
}, onMouseLeave: () => {
|
|
212
212
|
this.hovered = false;
|
|
213
|
-
} }, h("div", { key: '
|
|
213
|
+
} }, h("div", { key: '6986034ffd38602b111724ea998199d88bbed270', class: "sd-select-v2", ref: el => {
|
|
214
214
|
this.triggerRef = el;
|
|
215
|
-
} }, h("sd-select-v2-trigger", { key: '
|
|
215
|
+
} }, h("sd-select-v2-trigger", { key: '3af08facaebc0ec5b99ced0bb93cf8daea3367cb', displayText: this.displayText, placeholder: this.placeholder, disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '6fa4284cdd6d69d02a93e2e18423a7029122e58f', ...portalProps }, h("sd-select-v2-listbox", { key: '323f811ace6ee59c1d7b15ae7fa497a49b1d2f17', 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) })))));
|
|
216
216
|
}
|
|
217
217
|
static get is() { return "sd-select-v2"; }
|
|
218
218
|
static get originalStyleUrls() {
|
|
@@ -12,14 +12,14 @@ export const TAG_COLORS = [
|
|
|
12
12
|
'indigo',
|
|
13
13
|
];
|
|
14
14
|
const TAG_COLOR_CONFIG = {
|
|
15
|
-
grey: { background: tagTokens.tag.grey.
|
|
16
|
-
red: { background: tagTokens.tag.red.
|
|
17
|
-
orange: { background: tagTokens.tag.orange.
|
|
18
|
-
yellow: { background: tagTokens.tag.yellow.
|
|
19
|
-
green: { background: tagTokens.tag.green.
|
|
20
|
-
blue: { background: tagTokens.tag.blue.
|
|
21
|
-
darkblue: { background: tagTokens.tag.darkblue.
|
|
22
|
-
indigo: { background: tagTokens.tag.indigo.
|
|
15
|
+
grey: { background: tagTokens.tag.grey.bg, content: tagTokens.tag.grey.content, icon: tagTokens.tag.grey.content },
|
|
16
|
+
red: { background: tagTokens.tag.red.bg, content: tagTokens.tag.red.content, icon: tagTokens.tag.red.content },
|
|
17
|
+
orange: { background: tagTokens.tag.orange.bg, content: tagTokens.tag.orange.content, icon: tagTokens.tag.orange.content },
|
|
18
|
+
yellow: { background: tagTokens.tag.yellow.bg, content: tagTokens.tag.yellow.content, icon: tagTokens.tag.yellow.content },
|
|
19
|
+
green: { background: tagTokens.tag.green.bg, content: tagTokens.tag.green.content, icon: tagTokens.tag.green.content },
|
|
20
|
+
blue: { background: tagTokens.tag.blue.bg, content: tagTokens.tag.blue.content, icon: tagTokens.tag.blue.content },
|
|
21
|
+
darkblue: { background: tagTokens.tag.darkblue.bg, content: tagTokens.tag.darkblue.content, icon: tagTokens.tag.darkblue.content },
|
|
22
|
+
indigo: { background: tagTokens.tag.indigo.bg, content: tagTokens.tag.indigo.content, icon: tagTokens.tag.indigo.content },
|
|
23
23
|
};
|
|
24
24
|
const SQUARE_SIZE_CONFIG = {
|
|
25
25
|
xs: {
|
|
@@ -19,7 +19,7 @@ export class SdTag {
|
|
|
19
19
|
render() {
|
|
20
20
|
const config = this.resolvedConfig;
|
|
21
21
|
const iconNode = this.renderIcon(config.icon, config.iconSize);
|
|
22
|
-
return (h("span", { key: '
|
|
22
|
+
return (h("span", { key: 'e2ea10f2795e7cb481108903609785d490046539', class: "sd-tag", style: {
|
|
23
23
|
'--sd-tag-background': config.background,
|
|
24
24
|
'--sd-tag-content': config.content,
|
|
25
25
|
'--sd-tag-height': config.height,
|
|
@@ -29,7 +29,7 @@ export class SdTag {
|
|
|
29
29
|
'--sd-tag-font-weight': config.fontWeight,
|
|
30
30
|
'--sd-tag-line-height': config.lineHeight,
|
|
31
31
|
'--sd-tag-radius': config.radius,
|
|
32
|
-
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '
|
|
32
|
+
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '129b9791f345e368de9d19afef62f740435dd07f', class: "sd-tag__label" }, this.label), this.icon && !this.isLeft && iconNode));
|
|
33
33
|
}
|
|
34
34
|
static get is() { return "sd-tag"; }
|
|
35
35
|
static get originalStyleUrls() {
|
|
@@ -30,16 +30,16 @@ export class SdTextLink {
|
|
|
30
30
|
'--sd-text-link-text-decoration': typo.textDecoration,
|
|
31
31
|
'--sd-text-link-color': contentColor,
|
|
32
32
|
};
|
|
33
|
-
return (h("span", { key: '
|
|
33
|
+
return (h("span", { key: 'e93a2744e49a267f4b775793e0e18f0c223a03dd', class: {
|
|
34
34
|
'sd-text-link': true,
|
|
35
35
|
'sd-text-link--disabled': this.disabled,
|
|
36
|
-
}, style: cssVars, onClick: this.handleClick }, this.icon && (h("sd-icon", { key: '
|
|
36
|
+
}, style: cssVars, onClick: this.handleClick }, this.icon && (h("sd-icon", { key: '3f39510caef0cec81ba23340e25f920389886b69', name: this.icon, size: TEXT_LINK_LAYOUT.iconSize, color: iconColor, class: "sd-text-link__icon" })), h("span", { key: 'ad0cac3fda5be82e5f0d2d9e7822b2bf82d2d4ee', class: "sd-text-link__label" }, this.label), this.useArrow && (h("span", { key: '2ecdfdb83f62468ff36f6da1b96caf53b2302bbf', class: "sd-text-link__arrow", style: {
|
|
37
37
|
width: `${TEXT_LINK_LAYOUT.arrowFrame}px`,
|
|
38
38
|
height: `${TEXT_LINK_LAYOUT.arrowFrame}px`,
|
|
39
39
|
display: 'inline-flex',
|
|
40
40
|
alignItems: 'center',
|
|
41
41
|
justifyContent: 'center',
|
|
42
|
-
} }, h("sd-icon", { key: '
|
|
42
|
+
} }, h("sd-icon", { key: '92140c5c4fffc70af27894cd4f1a6bab80e6f64c', name: "chevronRight", size: TEXT_LINK_LAYOUT.arrowIconSize, color: arrowColor })))));
|
|
43
43
|
}
|
|
44
44
|
static get is() { return "sd-text-link"; }
|
|
45
45
|
static get originalStyleUrls() {
|