@sellmate/design-system 1.0.54 → 1.0.55
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.textinput-DIDZPtYE.js → component.textinput-BWW8c3OY.js} +10 -1
- package/dist/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-barcode-input.cjs.entry.js +1 -1
- package/dist/cjs/{sd-button_5.cjs.entry.js → sd-button_4.cjs.entry.js} +2 -146
- package/dist/cjs/sd-ghost-button.cjs.entry.js +148 -0
- package/dist/cjs/sd-input_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-textarea.cjs.entry.js +76 -37
- 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-textarea/sd-textarea.config.js +16 -0
- package/dist/collection/components/sd-textarea/sd-textarea.css +13 -53
- package/dist/collection/components/sd-textarea/sd-textarea.js +445 -60
- 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-hWm-Llzv.js → p-BM4qDFZj.js} +1 -1
- package/dist/components/{p-Bbl5852O.js → p-BR0LWoJL.js} +1 -1
- package/dist/components/p-C8kA64_1.js +1 -0
- package/dist/components/{p-DJdigrkS.js → p-Cbtpfl9F.js} +1 -1
- package/dist/components/{p-CYppNuFU.js → p-CmXAKr-2.js} +1 -1
- package/dist/components/p-DSNs8RRn.js +1 -0
- package/dist/components/{p-CpGiSLY_.js → p-DxzIjbQJ.js} +1 -1
- package/dist/components/{p-CSrbKcYv.js → p-w3CsjVGg.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-field.js +1 -1
- package/dist/components/sd-file-picker.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-number-input.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-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.esm.js +1 -1
- package/dist/design-system/{p-47931c26.entry.js → p-184649a9.entry.js} +1 -1
- package/dist/design-system/{p-64f2a188.entry.js → p-266ff86b.entry.js} +1 -1
- package/dist/design-system/{p-cebaca7c.entry.js → p-391cf704.entry.js} +1 -1
- package/dist/design-system/{p-a59c0cab.entry.js → p-4e9413c0.entry.js} +1 -1
- package/dist/design-system/p-5213773b.entry.js +1 -0
- package/dist/design-system/{p-4487b2ec.entry.js → p-99b6157f.entry.js} +1 -1
- package/dist/design-system/p-DSNs8RRn.js +1 -0
- package/dist/design-system/p-c2a0f10d.entry.js +1 -0
- package/dist/design-system/{p-c9af0fc9.entry.js → p-efe684e6.entry.js} +1 -1
- package/dist/design-system/{p-ea768c2e.entry.js → p-fdf7ed87.entry.js} +1 -1
- package/dist/esm/{component.textinput-BGovA1BG.js → component.textinput-DSNs8RRn.js} +10 -1
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-barcode-input.entry.js +1 -1
- package/dist/esm/{sd-button_5.entry.js → sd-button_4.entry.js} +3 -146
- package/dist/esm/sd-ghost-button.entry.js +146 -0
- package/dist/esm/sd-input_2.entry.js +1 -1
- package/dist/esm/sd-textarea.entry.js +76 -37
- 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-textarea/sd-textarea.config.d.ts +34 -0
- package/dist/types/components/sd-textarea/sd-textarea.d.ts +28 -9
- package/dist/types/components.d.ts +142 -8
- package/hydrate/index.js +114 -52
- package/hydrate/index.mjs +114 -52
- package/package.json +1 -1
- package/dist/components/p-BGovA1BG.js +0 -1
- package/dist/components/p-Ck-2jtzb.js +0 -1
- package/dist/design-system/p-52d6d7b5.entry.js +0 -1
- package/dist/design-system/p-BGovA1BG.js +0 -1
|
@@ -1,18 +1,36 @@
|
|
|
1
1
|
import { h, } from "@stencil/core";
|
|
2
|
+
import { nanoid } from "nanoid/non-secure";
|
|
3
|
+
import { TEXTAREA_TOKENS, TEXTAREA_COLORS } from "./sd-textarea.config";
|
|
2
4
|
export class SdTextarea {
|
|
3
5
|
host;
|
|
4
6
|
value = null;
|
|
5
|
-
|
|
7
|
+
placeholder = '입력해 주세요.';
|
|
6
8
|
disabled = false;
|
|
9
|
+
readonly = false;
|
|
7
10
|
autoFocus = false;
|
|
8
11
|
textareaClass = '';
|
|
9
|
-
|
|
12
|
+
textareaStyle = {};
|
|
10
13
|
maxLength;
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
rows;
|
|
15
|
+
spellcheck = false;
|
|
16
|
+
width = '';
|
|
17
|
+
// props - sd-field
|
|
18
|
+
label = '';
|
|
19
|
+
addonLabel = '';
|
|
20
|
+
hint = '';
|
|
21
|
+
errorMessage = '';
|
|
22
|
+
icon = undefined;
|
|
23
|
+
labelTooltip = '';
|
|
24
|
+
labelTooltipProps = null;
|
|
25
|
+
rules = [];
|
|
26
|
+
error = false;
|
|
27
|
+
status;
|
|
13
28
|
focused = false;
|
|
14
29
|
hovered = false;
|
|
30
|
+
internalValue = null;
|
|
15
31
|
nativeEl = undefined;
|
|
32
|
+
formField;
|
|
33
|
+
name = nanoid();
|
|
16
34
|
input;
|
|
17
35
|
focus;
|
|
18
36
|
blur;
|
|
@@ -25,12 +43,21 @@ export class SdTextarea {
|
|
|
25
43
|
this.input?.emit(this.value);
|
|
26
44
|
}
|
|
27
45
|
}
|
|
28
|
-
async
|
|
29
|
-
this.nativeEl?.focus();
|
|
30
|
-
}
|
|
31
|
-
async getNativeElement() {
|
|
46
|
+
async sdGetNativeElement() {
|
|
32
47
|
return this.nativeEl || null;
|
|
33
48
|
}
|
|
49
|
+
async sdValidate() {
|
|
50
|
+
this.formField?.sdValidate();
|
|
51
|
+
}
|
|
52
|
+
async sdReset() {
|
|
53
|
+
this.formField?.sdReset();
|
|
54
|
+
}
|
|
55
|
+
async sdResetValidate() {
|
|
56
|
+
this.formField?.sdResetValidation();
|
|
57
|
+
}
|
|
58
|
+
async sdFocus() {
|
|
59
|
+
this.formField?.sdFocus();
|
|
60
|
+
}
|
|
34
61
|
componentWillLoad() {
|
|
35
62
|
if (this.value !== null && this.value !== undefined) {
|
|
36
63
|
this.internalValue = this.value;
|
|
@@ -41,44 +68,42 @@ export class SdTextarea {
|
|
|
41
68
|
this.nativeEl?.focus();
|
|
42
69
|
}
|
|
43
70
|
}
|
|
44
|
-
handleInput(event) {
|
|
71
|
+
handleInput = (event) => {
|
|
45
72
|
const target = event.target;
|
|
46
73
|
this.internalValue = target.value;
|
|
47
|
-
}
|
|
48
|
-
handleFocus(type, event) {
|
|
74
|
+
};
|
|
75
|
+
handleFocus = async (type, event) => {
|
|
49
76
|
this.focused = type === 'focus';
|
|
50
77
|
if (type === 'blur') {
|
|
78
|
+
if (this.rules && this.rules.length > 0) {
|
|
79
|
+
await this.formField?.sdValidate();
|
|
80
|
+
}
|
|
51
81
|
this.blur?.emit(event);
|
|
52
82
|
}
|
|
53
83
|
else {
|
|
54
84
|
this.focus?.emit(event);
|
|
55
85
|
}
|
|
56
|
-
}
|
|
57
|
-
getTextareaStatus() {
|
|
58
|
-
if (this.disabled)
|
|
59
|
-
return 'sd-textarea--disabled';
|
|
60
|
-
if (this.hovered)
|
|
61
|
-
return 'sd-textarea--hovered';
|
|
62
|
-
if (this.focused)
|
|
63
|
-
return 'sd-textarea--focused';
|
|
64
|
-
return '';
|
|
65
|
-
}
|
|
66
|
-
getMaxLengthCounter() {
|
|
67
|
-
if (this.maxLength === undefined) {
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
const currentLength = (this.internalValue || '').length;
|
|
71
|
-
return `${currentLength}/${this.maxLength}`;
|
|
72
|
-
}
|
|
73
|
-
hasFooter() {
|
|
74
|
-
return this.helpText !== undefined || this.maxLength !== undefined;
|
|
75
|
-
}
|
|
86
|
+
};
|
|
76
87
|
render() {
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
88
|
+
const cssVars = {
|
|
89
|
+
'--sd-textarea-font-size': `${TEXTAREA_TOKENS.fontSize}px`,
|
|
90
|
+
'--sd-textarea-line-height': `${TEXTAREA_TOKENS.lineHeight}px`,
|
|
91
|
+
'--sd-textarea-font-weight': TEXTAREA_TOKENS.fontWeight,
|
|
92
|
+
'--sd-textarea-padding-x': `${TEXTAREA_TOKENS.paddingX}px`,
|
|
93
|
+
'--sd-textarea-padding-y': `${TEXTAREA_TOKENS.paddingY}px`,
|
|
94
|
+
'--sd-textarea-radius': `${TEXTAREA_TOKENS.radius}px`,
|
|
95
|
+
'--sd-textarea-text-color': TEXTAREA_COLORS.text.default,
|
|
96
|
+
'--sd-textarea-placeholder-color': TEXTAREA_COLORS.text.placeholder,
|
|
97
|
+
'--sd-textarea-disabled-color': TEXTAREA_COLORS.text.disabled,
|
|
98
|
+
'--sd-textarea-bg-color': TEXTAREA_COLORS.bg.default,
|
|
99
|
+
'--sd-textarea-disabled-bg-color': TEXTAREA_COLORS.bg.disabled,
|
|
100
|
+
'--sd-textarea-border-color': TEXTAREA_COLORS.border.default,
|
|
101
|
+
'--sd-textarea-resizer-color': TEXTAREA_COLORS.resizer.color,
|
|
102
|
+
// sd-field 시스템 변수 override (textarea는 고정 높이가 아닌 auto)
|
|
103
|
+
'--sd-system-size-field-sm-height': 'auto',
|
|
104
|
+
'--sd-system-radius-field-sm': `${TEXTAREA_TOKENS.radius}px`,
|
|
105
|
+
};
|
|
106
|
+
return (h("sd-field", { key: '390028112d84c22766c6e00fa3625312b8096629', 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 }, h("div", { key: '026ec0293049da167e7dbab5d3a28593d5e6b291', class: "sd-textarea__content" }, h("textarea", { key: 'd30b5e1bc61535c1c350f09bf2ea289f0b09001b', 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 }))));
|
|
82
107
|
}
|
|
83
108
|
static get is() { return "sd-textarea"; }
|
|
84
109
|
static get originalStyleUrls() {
|
|
@@ -113,16 +138,16 @@ export class SdTextarea {
|
|
|
113
138
|
"attribute": "value",
|
|
114
139
|
"defaultValue": "null"
|
|
115
140
|
},
|
|
116
|
-
"
|
|
141
|
+
"placeholder": {
|
|
117
142
|
"type": "string",
|
|
118
143
|
"mutable": false,
|
|
119
144
|
"complexType": {
|
|
120
145
|
"original": "string",
|
|
121
|
-
"resolved": "string
|
|
146
|
+
"resolved": "string",
|
|
122
147
|
"references": {}
|
|
123
148
|
},
|
|
124
149
|
"required": false,
|
|
125
|
-
"optional":
|
|
150
|
+
"optional": false,
|
|
126
151
|
"docs": {
|
|
127
152
|
"tags": [],
|
|
128
153
|
"text": ""
|
|
@@ -130,7 +155,8 @@ export class SdTextarea {
|
|
|
130
155
|
"getter": false,
|
|
131
156
|
"setter": false,
|
|
132
157
|
"reflect": false,
|
|
133
|
-
"attribute": "
|
|
158
|
+
"attribute": "placeholder",
|
|
159
|
+
"defaultValue": "'\uC785\uB825\uD574 \uC8FC\uC138\uC694.'"
|
|
134
160
|
},
|
|
135
161
|
"disabled": {
|
|
136
162
|
"type": "boolean",
|
|
@@ -152,6 +178,26 @@ export class SdTextarea {
|
|
|
152
178
|
"attribute": "disabled",
|
|
153
179
|
"defaultValue": "false"
|
|
154
180
|
},
|
|
181
|
+
"readonly": {
|
|
182
|
+
"type": "boolean",
|
|
183
|
+
"mutable": false,
|
|
184
|
+
"complexType": {
|
|
185
|
+
"original": "boolean",
|
|
186
|
+
"resolved": "boolean",
|
|
187
|
+
"references": {}
|
|
188
|
+
},
|
|
189
|
+
"required": false,
|
|
190
|
+
"optional": false,
|
|
191
|
+
"docs": {
|
|
192
|
+
"tags": [],
|
|
193
|
+
"text": ""
|
|
194
|
+
},
|
|
195
|
+
"getter": false,
|
|
196
|
+
"setter": false,
|
|
197
|
+
"reflect": false,
|
|
198
|
+
"attribute": "readonly",
|
|
199
|
+
"defaultValue": "false"
|
|
200
|
+
},
|
|
155
201
|
"autoFocus": {
|
|
156
202
|
"type": "boolean",
|
|
157
203
|
"mutable": false,
|
|
@@ -192,24 +238,23 @@ export class SdTextarea {
|
|
|
192
238
|
"attribute": "textarea-class",
|
|
193
239
|
"defaultValue": "''"
|
|
194
240
|
},
|
|
195
|
-
"
|
|
196
|
-
"type": "
|
|
241
|
+
"textareaStyle": {
|
|
242
|
+
"type": "unknown",
|
|
197
243
|
"mutable": false,
|
|
198
244
|
"complexType": {
|
|
199
|
-
"original": "string",
|
|
200
|
-
"resolved": "string
|
|
245
|
+
"original": "{ [key: string]: string }",
|
|
246
|
+
"resolved": "{ [key: string]: string; }",
|
|
201
247
|
"references": {}
|
|
202
248
|
},
|
|
203
249
|
"required": false,
|
|
204
|
-
"optional":
|
|
250
|
+
"optional": false,
|
|
205
251
|
"docs": {
|
|
206
252
|
"tags": [],
|
|
207
253
|
"text": ""
|
|
208
254
|
},
|
|
209
255
|
"getter": false,
|
|
210
256
|
"setter": false,
|
|
211
|
-
"
|
|
212
|
-
"attribute": "help-text"
|
|
257
|
+
"defaultValue": "{}"
|
|
213
258
|
},
|
|
214
259
|
"maxLength": {
|
|
215
260
|
"type": "number",
|
|
@@ -230,7 +275,86 @@ export class SdTextarea {
|
|
|
230
275
|
"reflect": false,
|
|
231
276
|
"attribute": "max-length"
|
|
232
277
|
},
|
|
233
|
-
"
|
|
278
|
+
"rows": {
|
|
279
|
+
"type": "number",
|
|
280
|
+
"mutable": false,
|
|
281
|
+
"complexType": {
|
|
282
|
+
"original": "number",
|
|
283
|
+
"resolved": "number | undefined",
|
|
284
|
+
"references": {}
|
|
285
|
+
},
|
|
286
|
+
"required": false,
|
|
287
|
+
"optional": true,
|
|
288
|
+
"docs": {
|
|
289
|
+
"tags": [],
|
|
290
|
+
"text": ""
|
|
291
|
+
},
|
|
292
|
+
"getter": false,
|
|
293
|
+
"setter": false,
|
|
294
|
+
"reflect": false,
|
|
295
|
+
"attribute": "rows"
|
|
296
|
+
},
|
|
297
|
+
"spellcheck": {
|
|
298
|
+
"type": "boolean",
|
|
299
|
+
"mutable": false,
|
|
300
|
+
"complexType": {
|
|
301
|
+
"original": "boolean",
|
|
302
|
+
"resolved": "boolean",
|
|
303
|
+
"references": {}
|
|
304
|
+
},
|
|
305
|
+
"required": false,
|
|
306
|
+
"optional": false,
|
|
307
|
+
"docs": {
|
|
308
|
+
"tags": [],
|
|
309
|
+
"text": ""
|
|
310
|
+
},
|
|
311
|
+
"getter": false,
|
|
312
|
+
"setter": false,
|
|
313
|
+
"reflect": false,
|
|
314
|
+
"attribute": "spellcheck",
|
|
315
|
+
"defaultValue": "false"
|
|
316
|
+
},
|
|
317
|
+
"width": {
|
|
318
|
+
"type": "any",
|
|
319
|
+
"mutable": false,
|
|
320
|
+
"complexType": {
|
|
321
|
+
"original": "string | number",
|
|
322
|
+
"resolved": "number | string",
|
|
323
|
+
"references": {}
|
|
324
|
+
},
|
|
325
|
+
"required": false,
|
|
326
|
+
"optional": false,
|
|
327
|
+
"docs": {
|
|
328
|
+
"tags": [],
|
|
329
|
+
"text": ""
|
|
330
|
+
},
|
|
331
|
+
"getter": false,
|
|
332
|
+
"setter": false,
|
|
333
|
+
"reflect": false,
|
|
334
|
+
"attribute": "width",
|
|
335
|
+
"defaultValue": "''"
|
|
336
|
+
},
|
|
337
|
+
"label": {
|
|
338
|
+
"type": "string",
|
|
339
|
+
"mutable": false,
|
|
340
|
+
"complexType": {
|
|
341
|
+
"original": "string",
|
|
342
|
+
"resolved": "string | undefined",
|
|
343
|
+
"references": {}
|
|
344
|
+
},
|
|
345
|
+
"required": false,
|
|
346
|
+
"optional": true,
|
|
347
|
+
"docs": {
|
|
348
|
+
"tags": [],
|
|
349
|
+
"text": ""
|
|
350
|
+
},
|
|
351
|
+
"getter": false,
|
|
352
|
+
"setter": false,
|
|
353
|
+
"reflect": false,
|
|
354
|
+
"attribute": "label",
|
|
355
|
+
"defaultValue": "''"
|
|
356
|
+
},
|
|
357
|
+
"addonLabel": {
|
|
234
358
|
"type": "string",
|
|
235
359
|
"mutable": false,
|
|
236
360
|
"complexType": {
|
|
@@ -247,16 +371,226 @@ export class SdTextarea {
|
|
|
247
371
|
"getter": false,
|
|
248
372
|
"setter": false,
|
|
249
373
|
"reflect": false,
|
|
250
|
-
"attribute": "
|
|
251
|
-
"defaultValue": "'
|
|
374
|
+
"attribute": "addon-label",
|
|
375
|
+
"defaultValue": "''"
|
|
376
|
+
},
|
|
377
|
+
"hint": {
|
|
378
|
+
"type": "string",
|
|
379
|
+
"mutable": false,
|
|
380
|
+
"complexType": {
|
|
381
|
+
"original": "string",
|
|
382
|
+
"resolved": "string",
|
|
383
|
+
"references": {}
|
|
384
|
+
},
|
|
385
|
+
"required": false,
|
|
386
|
+
"optional": false,
|
|
387
|
+
"docs": {
|
|
388
|
+
"tags": [],
|
|
389
|
+
"text": ""
|
|
390
|
+
},
|
|
391
|
+
"getter": false,
|
|
392
|
+
"setter": false,
|
|
393
|
+
"reflect": false,
|
|
394
|
+
"attribute": "hint",
|
|
395
|
+
"defaultValue": "''"
|
|
396
|
+
},
|
|
397
|
+
"errorMessage": {
|
|
398
|
+
"type": "string",
|
|
399
|
+
"mutable": false,
|
|
400
|
+
"complexType": {
|
|
401
|
+
"original": "string",
|
|
402
|
+
"resolved": "string",
|
|
403
|
+
"references": {}
|
|
404
|
+
},
|
|
405
|
+
"required": false,
|
|
406
|
+
"optional": false,
|
|
407
|
+
"docs": {
|
|
408
|
+
"tags": [],
|
|
409
|
+
"text": ""
|
|
410
|
+
},
|
|
411
|
+
"getter": false,
|
|
412
|
+
"setter": false,
|
|
413
|
+
"reflect": false,
|
|
414
|
+
"attribute": "error-message",
|
|
415
|
+
"defaultValue": "''"
|
|
416
|
+
},
|
|
417
|
+
"icon": {
|
|
418
|
+
"type": "unknown",
|
|
419
|
+
"mutable": false,
|
|
420
|
+
"complexType": {
|
|
421
|
+
"original": "IconProps",
|
|
422
|
+
"resolved": "IconProps | undefined",
|
|
423
|
+
"references": {
|
|
424
|
+
"IconProps": {
|
|
425
|
+
"location": "global",
|
|
426
|
+
"id": "global::IconProps"
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
"required": false,
|
|
431
|
+
"optional": true,
|
|
432
|
+
"docs": {
|
|
433
|
+
"tags": [],
|
|
434
|
+
"text": ""
|
|
435
|
+
},
|
|
436
|
+
"getter": false,
|
|
437
|
+
"setter": false,
|
|
438
|
+
"defaultValue": "undefined"
|
|
439
|
+
},
|
|
440
|
+
"labelTooltip": {
|
|
441
|
+
"type": "string",
|
|
442
|
+
"mutable": false,
|
|
443
|
+
"complexType": {
|
|
444
|
+
"original": "string",
|
|
445
|
+
"resolved": "string",
|
|
446
|
+
"references": {}
|
|
447
|
+
},
|
|
448
|
+
"required": false,
|
|
449
|
+
"optional": false,
|
|
450
|
+
"docs": {
|
|
451
|
+
"tags": [],
|
|
452
|
+
"text": ""
|
|
453
|
+
},
|
|
454
|
+
"getter": false,
|
|
455
|
+
"setter": false,
|
|
456
|
+
"reflect": false,
|
|
457
|
+
"attribute": "label-tooltip",
|
|
458
|
+
"defaultValue": "''"
|
|
459
|
+
},
|
|
460
|
+
"labelTooltipProps": {
|
|
461
|
+
"type": "unknown",
|
|
462
|
+
"mutable": false,
|
|
463
|
+
"complexType": {
|
|
464
|
+
"original": "SdTooltipProps | null",
|
|
465
|
+
"resolved": "SdTooltipProps | null",
|
|
466
|
+
"references": {
|
|
467
|
+
"SdTooltipProps": {
|
|
468
|
+
"location": "import",
|
|
469
|
+
"path": "../sd-tooltip/sd-tooltip.config",
|
|
470
|
+
"id": "src/components/sd-tooltip/sd-tooltip.config.ts::SdTooltipProps",
|
|
471
|
+
"referenceLocation": "SdTooltipProps"
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
"required": false,
|
|
476
|
+
"optional": false,
|
|
477
|
+
"docs": {
|
|
478
|
+
"tags": [],
|
|
479
|
+
"text": ""
|
|
480
|
+
},
|
|
481
|
+
"getter": false,
|
|
482
|
+
"setter": false,
|
|
483
|
+
"defaultValue": "null"
|
|
484
|
+
},
|
|
485
|
+
"rules": {
|
|
486
|
+
"type": "unknown",
|
|
487
|
+
"mutable": false,
|
|
488
|
+
"complexType": {
|
|
489
|
+
"original": "Rule[]",
|
|
490
|
+
"resolved": "Rule[] | undefined",
|
|
491
|
+
"references": {
|
|
492
|
+
"Rule": {
|
|
493
|
+
"location": "import",
|
|
494
|
+
"path": "../../types/form",
|
|
495
|
+
"id": "src/types/form.d.ts::Rule",
|
|
496
|
+
"referenceLocation": "Rule"
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
"required": false,
|
|
501
|
+
"optional": true,
|
|
502
|
+
"docs": {
|
|
503
|
+
"tags": [],
|
|
504
|
+
"text": ""
|
|
505
|
+
},
|
|
506
|
+
"getter": false,
|
|
507
|
+
"setter": false,
|
|
508
|
+
"defaultValue": "[]"
|
|
509
|
+
},
|
|
510
|
+
"error": {
|
|
511
|
+
"type": "boolean",
|
|
512
|
+
"mutable": true,
|
|
513
|
+
"complexType": {
|
|
514
|
+
"original": "boolean",
|
|
515
|
+
"resolved": "boolean",
|
|
516
|
+
"references": {}
|
|
517
|
+
},
|
|
518
|
+
"required": false,
|
|
519
|
+
"optional": false,
|
|
520
|
+
"docs": {
|
|
521
|
+
"tags": [],
|
|
522
|
+
"text": ""
|
|
523
|
+
},
|
|
524
|
+
"getter": false,
|
|
525
|
+
"setter": false,
|
|
526
|
+
"reflect": false,
|
|
527
|
+
"attribute": "error",
|
|
528
|
+
"defaultValue": "false"
|
|
529
|
+
},
|
|
530
|
+
"status": {
|
|
531
|
+
"type": "string",
|
|
532
|
+
"mutable": false,
|
|
533
|
+
"complexType": {
|
|
534
|
+
"original": "'default' | 'pass' | 'error'",
|
|
535
|
+
"resolved": "\"default\" | \"error\" | \"pass\" | undefined",
|
|
536
|
+
"references": {}
|
|
537
|
+
},
|
|
538
|
+
"required": false,
|
|
539
|
+
"optional": true,
|
|
540
|
+
"docs": {
|
|
541
|
+
"tags": [],
|
|
542
|
+
"text": ""
|
|
543
|
+
},
|
|
544
|
+
"getter": false,
|
|
545
|
+
"setter": false,
|
|
546
|
+
"reflect": false,
|
|
547
|
+
"attribute": "status"
|
|
548
|
+
},
|
|
549
|
+
"focused": {
|
|
550
|
+
"type": "boolean",
|
|
551
|
+
"mutable": true,
|
|
552
|
+
"complexType": {
|
|
553
|
+
"original": "boolean",
|
|
554
|
+
"resolved": "boolean",
|
|
555
|
+
"references": {}
|
|
556
|
+
},
|
|
557
|
+
"required": false,
|
|
558
|
+
"optional": false,
|
|
559
|
+
"docs": {
|
|
560
|
+
"tags": [],
|
|
561
|
+
"text": ""
|
|
562
|
+
},
|
|
563
|
+
"getter": false,
|
|
564
|
+
"setter": false,
|
|
565
|
+
"reflect": false,
|
|
566
|
+
"attribute": "focused",
|
|
567
|
+
"defaultValue": "false"
|
|
568
|
+
},
|
|
569
|
+
"hovered": {
|
|
570
|
+
"type": "boolean",
|
|
571
|
+
"mutable": true,
|
|
572
|
+
"complexType": {
|
|
573
|
+
"original": "boolean",
|
|
574
|
+
"resolved": "boolean",
|
|
575
|
+
"references": {}
|
|
576
|
+
},
|
|
577
|
+
"required": false,
|
|
578
|
+
"optional": false,
|
|
579
|
+
"docs": {
|
|
580
|
+
"tags": [],
|
|
581
|
+
"text": ""
|
|
582
|
+
},
|
|
583
|
+
"getter": false,
|
|
584
|
+
"setter": false,
|
|
585
|
+
"reflect": false,
|
|
586
|
+
"attribute": "hovered",
|
|
587
|
+
"defaultValue": "false"
|
|
252
588
|
}
|
|
253
589
|
};
|
|
254
590
|
}
|
|
255
591
|
static get states() {
|
|
256
592
|
return {
|
|
257
|
-
"internalValue": {}
|
|
258
|
-
"focused": {},
|
|
259
|
-
"hovered": {}
|
|
593
|
+
"internalValue": {}
|
|
260
594
|
};
|
|
261
595
|
}
|
|
262
596
|
static get events() {
|
|
@@ -323,7 +657,28 @@ export class SdTextarea {
|
|
|
323
657
|
}
|
|
324
658
|
static get methods() {
|
|
325
659
|
return {
|
|
326
|
-
"
|
|
660
|
+
"sdGetNativeElement": {
|
|
661
|
+
"complexType": {
|
|
662
|
+
"signature": "() => Promise<HTMLTextAreaElement | null>",
|
|
663
|
+
"parameters": [],
|
|
664
|
+
"references": {
|
|
665
|
+
"Promise": {
|
|
666
|
+
"location": "global",
|
|
667
|
+
"id": "global::Promise"
|
|
668
|
+
},
|
|
669
|
+
"HTMLTextAreaElement": {
|
|
670
|
+
"location": "global",
|
|
671
|
+
"id": "global::HTMLTextAreaElement"
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
"return": "Promise<HTMLTextAreaElement | null>"
|
|
675
|
+
},
|
|
676
|
+
"docs": {
|
|
677
|
+
"text": "",
|
|
678
|
+
"tags": []
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
"sdValidate": {
|
|
327
682
|
"complexType": {
|
|
328
683
|
"signature": "() => Promise<void>",
|
|
329
684
|
"parameters": [],
|
|
@@ -340,21 +695,51 @@ export class SdTextarea {
|
|
|
340
695
|
"tags": []
|
|
341
696
|
}
|
|
342
697
|
},
|
|
343
|
-
"
|
|
698
|
+
"sdReset": {
|
|
344
699
|
"complexType": {
|
|
345
|
-
"signature": "() => Promise<
|
|
700
|
+
"signature": "() => Promise<void>",
|
|
346
701
|
"parameters": [],
|
|
347
702
|
"references": {
|
|
348
703
|
"Promise": {
|
|
349
704
|
"location": "global",
|
|
350
705
|
"id": "global::Promise"
|
|
351
|
-
}
|
|
352
|
-
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
"return": "Promise<void>"
|
|
709
|
+
},
|
|
710
|
+
"docs": {
|
|
711
|
+
"text": "",
|
|
712
|
+
"tags": []
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
"sdResetValidate": {
|
|
716
|
+
"complexType": {
|
|
717
|
+
"signature": "() => Promise<void>",
|
|
718
|
+
"parameters": [],
|
|
719
|
+
"references": {
|
|
720
|
+
"Promise": {
|
|
353
721
|
"location": "global",
|
|
354
|
-
"id": "global::
|
|
722
|
+
"id": "global::Promise"
|
|
355
723
|
}
|
|
356
724
|
},
|
|
357
|
-
"return": "Promise<
|
|
725
|
+
"return": "Promise<void>"
|
|
726
|
+
},
|
|
727
|
+
"docs": {
|
|
728
|
+
"text": "",
|
|
729
|
+
"tags": []
|
|
730
|
+
}
|
|
731
|
+
},
|
|
732
|
+
"sdFocus": {
|
|
733
|
+
"complexType": {
|
|
734
|
+
"signature": "() => Promise<void>",
|
|
735
|
+
"parameters": [],
|
|
736
|
+
"references": {
|
|
737
|
+
"Promise": {
|
|
738
|
+
"location": "global",
|
|
739
|
+
"id": "global::Promise"
|
|
740
|
+
}
|
|
741
|
+
},
|
|
742
|
+
"return": "Promise<void>"
|
|
358
743
|
},
|
|
359
744
|
"docs": {
|
|
360
745
|
"text": "",
|
|
@@ -11,10 +11,10 @@ export class SdToast {
|
|
|
11
11
|
render() {
|
|
12
12
|
const typeConfig = TOAST_TYPE_CONFIG[this.type] ?? TOAST_TYPE_CONFIG.default;
|
|
13
13
|
const iconSize = Number(TOAST_LAYOUT.iconSize);
|
|
14
|
-
return (h("div", { key: '
|
|
14
|
+
return (h("div", { key: 'cb42937774233de10872edb8414db88f03868eb3', style: {
|
|
15
15
|
'--sd-toast-bg': typeConfig.bg,
|
|
16
16
|
'--sd-toast-text': typeConfig.content,
|
|
17
|
-
} }, h("div", { key: '
|
|
17
|
+
} }, h("div", { key: 'e58b3335c4d7c450ef3686c53138636502c4e0f3', class: "sd-toast", role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (h("div", { key: '62e42c814ab2f15d563b3f75c4e9dd3e559318a0', class: "sd-toast__icon" }, h("sd-icon", { key: '3e346baecd3207ee817ba843427ed2076fd7cc7c', name: this.icon, size: iconSize, color: typeConfig.content }))), h("div", { key: '700c7127a1d59409103b5ceb917e584020078736', class: "sd-toast__content" }, h("span", { key: 'd4165f0e324048edcb2492f3050795d26ce1fc86', class: "sd-toast__message" }, this.message)), this.link && (h("a", { key: 'f87089865b4e4fd5b488185478c453641920ac92', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.useClose && (h("sd-ghost-button", { key: '33de3a35d1532cd15215751996827a462a7b8cad', class: "sd-toast__close", icon: "close", ariaLabel: "close", size: "xs", onClick: () => this.close.emit() })))));
|
|
18
18
|
}
|
|
19
19
|
static get is() { return "sd-toast"; }
|
|
20
20
|
static get originalStyleUrls() {
|
|
@@ -216,7 +216,7 @@ export class SdToastContainer {
|
|
|
216
216
|
const activeToasts = toasts.filter(t => t.state !== 'exiting').reverse();
|
|
217
217
|
const indexMap = new Map();
|
|
218
218
|
activeToasts.forEach((t, i) => indexMap.set(t.id, i));
|
|
219
|
-
return (h("div", { key: '
|
|
219
|
+
return (h("div", { key: '7d2c4a095a0762710024c4c102ce49c7c7163368', class: "sd-toast-container", style: this.getContainerStyles(), onMouseEnter: () => {
|
|
220
220
|
this.expanded = true;
|
|
221
221
|
this.pauseTimers();
|
|
222
222
|
}, onMouseLeave: () => {
|
|
@@ -28,7 +28,7 @@ export class SdToggle {
|
|
|
28
28
|
this.change.emit(newValue);
|
|
29
29
|
};
|
|
30
30
|
render() {
|
|
31
|
-
return (h("label", { key: '
|
|
31
|
+
return (h("label", { key: '9f4cf71a2aab588deb68d8e6908f0988ddbacb90', "aria-label": this.label || 'toggle', class: this.toggleClasses }, h("input", { key: '6d1279761ea384a233bff234c549030709fd4ea3', type: "checkbox", checked: this.value, disabled: this.disabled, onInput: this.handleChange }), this.label && h("span", { key: '7ecd96f5e2c48fda17ed0086ab3cc8bc1caab458', class: "sd-toggle__label" }, this.label), h("div", { key: '26f4d468e4ff0c4473e2ce00b7e69a855a249a96', class: "sd-toggle__track" }, h("div", { key: '3a7f4019197cfa23dc268ee95308e60d7159ba28', class: "sd-toggle__thumb" }))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "sd-toggle"; }
|
|
34
34
|
static get originalStyleUrls() {
|