@dropi/ui 0.1.0
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/LICENSE +21 -0
- package/dist/cjs/dropi-badge.cjs.entry.js +37 -0
- package/dist/cjs/dropi-button.cjs.entry.js +81 -0
- package/dist/cjs/dropi-checkbox.cjs.entry.js +36 -0
- package/dist/cjs/dropi-icon.cjs.entry.js +50 -0
- package/dist/cjs/dropi-input.cjs.entry.js +210 -0
- package/dist/cjs/dropi-radio-button.cjs.entry.js +47 -0
- package/dist/cjs/dropi-select.cjs.entry.js +335 -0
- package/dist/cjs/dropi-switch.cjs.entry.js +30 -0
- package/dist/cjs/dropi-tag.cjs.entry.js +68 -0
- package/dist/cjs/dropi-text-area.cjs.entry.js +103 -0
- package/dist/cjs/dropi-ui.cjs.js +24 -0
- package/dist/cjs/index-CuGLZVqo.js +1743 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/collection/assets/icons/symbol/svg/sprite.css.svg +1 -0
- package/dist/collection/collection-manifest.json +22 -0
- package/dist/collection/components/dropi-badge/dropi-badge.css +41 -0
- package/dist/collection/components/dropi-badge/dropi-badge.js +72 -0
- package/dist/collection/components/dropi-button/dropi-button.css +169 -0
- package/dist/collection/components/dropi-button/dropi-button.js +277 -0
- package/dist/collection/components/dropi-checkbox/dropi-checkbox.css +47 -0
- package/dist/collection/components/dropi-checkbox/dropi-checkbox.js +103 -0
- package/dist/collection/components/dropi-icon/dropi-icon.css +19 -0
- package/dist/collection/components/dropi-icon/dropi-icon.js +142 -0
- package/dist/collection/components/dropi-input/dropi-input.css +168 -0
- package/dist/collection/components/dropi-input/dropi-input.js +735 -0
- package/dist/collection/components/dropi-radio-button/dropi-radio-button.css +59 -0
- package/dist/collection/components/dropi-radio-button/dropi-radio-button.js +181 -0
- package/dist/collection/components/dropi-select/dropi-select.css +364 -0
- package/dist/collection/components/dropi-select/dropi-select.js +932 -0
- package/dist/collection/components/dropi-select/select.types.js +1 -0
- package/dist/collection/components/dropi-switch/dropi-switch.css +57 -0
- package/dist/collection/components/dropi-switch/dropi-switch.js +96 -0
- package/dist/collection/components/dropi-tag/dropi-tag.css +40 -0
- package/dist/collection/components/dropi-tag/dropi-tag.js +190 -0
- package/dist/collection/components/dropi-text-area/dropi-text-area.css +97 -0
- package/dist/collection/components/dropi-text-area/dropi-text-area.js +457 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/collection/utils/utils.unit.test.js +16 -0
- package/dist/components/dropi-badge.d.ts +11 -0
- package/dist/components/dropi-badge.js +1 -0
- package/dist/components/dropi-button.d.ts +11 -0
- package/dist/components/dropi-button.js +1 -0
- package/dist/components/dropi-checkbox.d.ts +11 -0
- package/dist/components/dropi-checkbox.js +1 -0
- package/dist/components/dropi-icon.d.ts +11 -0
- package/dist/components/dropi-icon.js +1 -0
- package/dist/components/dropi-input.d.ts +11 -0
- package/dist/components/dropi-input.js +1 -0
- package/dist/components/dropi-radio-button.d.ts +11 -0
- package/dist/components/dropi-radio-button.js +1 -0
- package/dist/components/dropi-select.d.ts +11 -0
- package/dist/components/dropi-select.js +1 -0
- package/dist/components/dropi-switch.d.ts +11 -0
- package/dist/components/dropi-switch.js +1 -0
- package/dist/components/dropi-tag.d.ts +11 -0
- package/dist/components/dropi-tag.js +1 -0
- package/dist/components/dropi-text-area.d.ts +11 -0
- package/dist/components/dropi-text-area.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-MNma8N1x.js +1 -0
- package/dist/dropi-ui/dropi-ui.css +1 -0
- package/dist/dropi-ui/dropi-ui.esm.js +1 -0
- package/dist/dropi-ui/index.esm.js +0 -0
- package/dist/dropi-ui/p-1a28b8f5.entry.js +1 -0
- package/dist/dropi-ui/p-21abf91a.entry.js +1 -0
- package/dist/dropi-ui/p-52291024.entry.js +1 -0
- package/dist/dropi-ui/p-54502c46.entry.js +1 -0
- package/dist/dropi-ui/p-6f0aa619.entry.js +1 -0
- package/dist/dropi-ui/p-9c7076d3.entry.js +1 -0
- package/dist/dropi-ui/p-DFz-gwFP.js +2 -0
- package/dist/dropi-ui/p-a1944f3d.entry.js +1 -0
- package/dist/dropi-ui/p-c7b9cbda.entry.js +1 -0
- package/dist/dropi-ui/p-dd089a60.entry.js +1 -0
- package/dist/dropi-ui/p-f785011f.entry.js +1 -0
- package/dist/esm/dropi-badge.entry.js +35 -0
- package/dist/esm/dropi-button.entry.js +79 -0
- package/dist/esm/dropi-checkbox.entry.js +34 -0
- package/dist/esm/dropi-icon.entry.js +48 -0
- package/dist/esm/dropi-input.entry.js +208 -0
- package/dist/esm/dropi-radio-button.entry.js +45 -0
- package/dist/esm/dropi-select.entry.js +333 -0
- package/dist/esm/dropi-switch.entry.js +28 -0
- package/dist/esm/dropi-tag.entry.js +66 -0
- package/dist/esm/dropi-text-area.entry.js +101 -0
- package/dist/esm/dropi-ui.js +20 -0
- package/dist/esm/index-DFz-gwFP.js +1734 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +10 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/dropi-badge/dropi-badge.d.ts +12 -0
- package/dist/types/components/dropi-button/dropi-button.d.ts +35 -0
- package/dist/types/components/dropi-checkbox/dropi-checkbox.d.ts +16 -0
- package/dist/types/components/dropi-icon/dropi-icon.d.ts +25 -0
- package/dist/types/components/dropi-input/dropi-input.d.ts +92 -0
- package/dist/types/components/dropi-radio-button/dropi-radio-button.d.ts +25 -0
- package/dist/types/components/dropi-select/dropi-select.d.ts +103 -0
- package/dist/types/components/dropi-select/select.types.d.ts +23 -0
- package/dist/types/components/dropi-switch/dropi-switch.d.ts +15 -0
- package/dist/types/components/dropi-tag/dropi-tag.d.ts +25 -0
- package/dist/types/components/dropi-text-area/dropi-text-area.d.ts +53 -0
- package/dist/types/components.d.ts +1549 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/types/utils/utils.unit.test.d.ts +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +50 -0
- package/readme.md +89 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
6
|
+
|
|
7
|
+
.toggle-switch {
|
|
8
|
+
position: relative;
|
|
9
|
+
display: inline-block;
|
|
10
|
+
width: 40px;
|
|
11
|
+
height: 21px;
|
|
12
|
+
margin-bottom: 0;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.toggle-switch input {
|
|
17
|
+
opacity: 0;
|
|
18
|
+
width: 0;
|
|
19
|
+
height: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.slider {
|
|
23
|
+
position: absolute;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
top: 0;
|
|
26
|
+
left: 0;
|
|
27
|
+
right: 0;
|
|
28
|
+
bottom: 0;
|
|
29
|
+
background-color: var(--Gray-Gray-200, #c3c9d9);
|
|
30
|
+
transition: 0.4s;
|
|
31
|
+
border-radius: 34px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.slider::before {
|
|
35
|
+
position: absolute;
|
|
36
|
+
content: '';
|
|
37
|
+
height: 17px;
|
|
38
|
+
width: 17px;
|
|
39
|
+
left: 3px;
|
|
40
|
+
bottom: 2px;
|
|
41
|
+
background-color: var(--Neutral-White, #ffffff);
|
|
42
|
+
transition: 0.4s;
|
|
43
|
+
border-radius: 50%;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
input:checked + .slider {
|
|
47
|
+
background-color: var(--Primary-Primary-500, #f49a3d);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
input:checked + .slider::before {
|
|
51
|
+
transform: translateX(17px);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([disabled]) .toggle-switch {
|
|
55
|
+
cursor: not-allowed;
|
|
56
|
+
opacity: 0.5;
|
|
57
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* @component dropi-switch
|
|
4
|
+
* Toggle switch component. Emits dropiChange on toggle.
|
|
5
|
+
*/
|
|
6
|
+
export class DropiSwitch {
|
|
7
|
+
/** Whether the switch is on */
|
|
8
|
+
isChecked = false;
|
|
9
|
+
/** Whether the switch is disabled */
|
|
10
|
+
disabled = false;
|
|
11
|
+
/** Emitted when the toggle state changes */
|
|
12
|
+
dropiChange;
|
|
13
|
+
onToggleChange(event) {
|
|
14
|
+
const input = event.target;
|
|
15
|
+
this.isChecked = input.checked;
|
|
16
|
+
this.dropiChange.emit(this.isChecked);
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return (h("label", { key: '336fa18042e7b128d2e6e0b680ddd67e30ce917e', class: "toggle-switch" }, h("input", { key: '57e2fa77fa9b49341b03f6ff041ce4987a6b277b', type: "checkbox", checked: this.isChecked, disabled: this.disabled, onChange: (e) => this.onToggleChange(e) }), h("span", { key: 'e7617599947289a6e21b9db573dd7bec80dbeb43', class: "slider" })));
|
|
20
|
+
}
|
|
21
|
+
static get is() { return "dropi-switch"; }
|
|
22
|
+
static get encapsulation() { return "shadow"; }
|
|
23
|
+
static get formAssociated() { return true; }
|
|
24
|
+
static get originalStyleUrls() {
|
|
25
|
+
return {
|
|
26
|
+
"$": ["dropi-switch.css"]
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
static get styleUrls() {
|
|
30
|
+
return {
|
|
31
|
+
"$": ["dropi-switch.css"]
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
static get properties() {
|
|
35
|
+
return {
|
|
36
|
+
"isChecked": {
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"mutable": true,
|
|
39
|
+
"complexType": {
|
|
40
|
+
"original": "boolean",
|
|
41
|
+
"resolved": "boolean",
|
|
42
|
+
"references": {}
|
|
43
|
+
},
|
|
44
|
+
"required": false,
|
|
45
|
+
"optional": false,
|
|
46
|
+
"docs": {
|
|
47
|
+
"tags": [],
|
|
48
|
+
"text": "Whether the switch is on"
|
|
49
|
+
},
|
|
50
|
+
"getter": false,
|
|
51
|
+
"setter": false,
|
|
52
|
+
"reflect": true,
|
|
53
|
+
"attribute": "is-checked",
|
|
54
|
+
"defaultValue": "false"
|
|
55
|
+
},
|
|
56
|
+
"disabled": {
|
|
57
|
+
"type": "boolean",
|
|
58
|
+
"mutable": false,
|
|
59
|
+
"complexType": {
|
|
60
|
+
"original": "boolean",
|
|
61
|
+
"resolved": "boolean",
|
|
62
|
+
"references": {}
|
|
63
|
+
},
|
|
64
|
+
"required": false,
|
|
65
|
+
"optional": false,
|
|
66
|
+
"docs": {
|
|
67
|
+
"tags": [],
|
|
68
|
+
"text": "Whether the switch is disabled"
|
|
69
|
+
},
|
|
70
|
+
"getter": false,
|
|
71
|
+
"setter": false,
|
|
72
|
+
"reflect": true,
|
|
73
|
+
"attribute": "disabled",
|
|
74
|
+
"defaultValue": "false"
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
static get events() {
|
|
79
|
+
return [{
|
|
80
|
+
"method": "dropiChange",
|
|
81
|
+
"name": "dropiChange",
|
|
82
|
+
"bubbles": true,
|
|
83
|
+
"cancelable": true,
|
|
84
|
+
"composed": true,
|
|
85
|
+
"docs": {
|
|
86
|
+
"tags": [],
|
|
87
|
+
"text": "Emitted when the toggle state changes"
|
|
88
|
+
},
|
|
89
|
+
"complexType": {
|
|
90
|
+
"original": "boolean",
|
|
91
|
+
"resolved": "boolean",
|
|
92
|
+
"references": {}
|
|
93
|
+
}
|
|
94
|
+
}];
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
6
|
+
|
|
7
|
+
.container-chips {
|
|
8
|
+
display: inline-block;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.tags {
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
padding: 4px 8px;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
align-items: center;
|
|
16
|
+
gap: 4px;
|
|
17
|
+
border-radius: var(--Border-5, 9999px);
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
text-align: center;
|
|
20
|
+
text-overflow: ellipsis;
|
|
21
|
+
font-size: var(--font-size-s, 12px);
|
|
22
|
+
font-weight: var(--font-weight-medium, 500);
|
|
23
|
+
line-height: var(--Size-5, 24px);
|
|
24
|
+
/* Animation */
|
|
25
|
+
animation: fade-in 200ms ease-out;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.tags.icon-only {
|
|
29
|
+
gap: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.file-icon {
|
|
33
|
+
display: flex;
|
|
34
|
+
margin-right: 4px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@keyframes fade-in {
|
|
38
|
+
from { opacity: 0; transform: scale(0.8); }
|
|
39
|
+
to { opacity: 1; transform: scale(1); }
|
|
40
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* @component dropi-tag
|
|
4
|
+
* Colored tag/chip for statuses, categories, and labels.
|
|
5
|
+
*/
|
|
6
|
+
export class DropiTag {
|
|
7
|
+
/** primary (filled) | secondary (soft) */
|
|
8
|
+
type = 'primary';
|
|
9
|
+
/** Color state of the tag */
|
|
10
|
+
state = 'default';
|
|
11
|
+
/** Whether to show the icon */
|
|
12
|
+
showIcon = false;
|
|
13
|
+
/** Icon name from the sprite */
|
|
14
|
+
icon = '';
|
|
15
|
+
/** Label text */
|
|
16
|
+
text = '';
|
|
17
|
+
colorMap = {
|
|
18
|
+
default: 'Primary-Primary',
|
|
19
|
+
success: 'Success-Success',
|
|
20
|
+
info: 'Info-Info',
|
|
21
|
+
warning: 'Warning-Warning',
|
|
22
|
+
error: 'Error-Error',
|
|
23
|
+
legacy: 'Gray-Gray',
|
|
24
|
+
};
|
|
25
|
+
propsChanged() { }
|
|
26
|
+
get bgColor() {
|
|
27
|
+
const base = this.colorMap[this.state];
|
|
28
|
+
if (this.type === 'primary')
|
|
29
|
+
return `var(--${base}-500)`;
|
|
30
|
+
const shade = this.state === 'default' || this.state === 'legacy' ? '-100' : '-50';
|
|
31
|
+
return `var(--${base}${shade})`;
|
|
32
|
+
}
|
|
33
|
+
get textColor() {
|
|
34
|
+
const base = this.colorMap[this.state];
|
|
35
|
+
if (this.type === 'primary')
|
|
36
|
+
return `var(--Neutral-White)`;
|
|
37
|
+
const shade = this.state === 'default' ? '-500' : '-700';
|
|
38
|
+
return `var(--${base}${shade})`;
|
|
39
|
+
}
|
|
40
|
+
get iconColor() {
|
|
41
|
+
if (this.type === 'primary')
|
|
42
|
+
return 'Neutral-White';
|
|
43
|
+
const base = this.colorMap[this.state];
|
|
44
|
+
const shade = this.state === 'default' ? '-500' : '-700';
|
|
45
|
+
return `${base}${shade}`;
|
|
46
|
+
}
|
|
47
|
+
get hasContent() {
|
|
48
|
+
return typeof this.text === 'string' && this.text.trim().length > 0;
|
|
49
|
+
}
|
|
50
|
+
render() {
|
|
51
|
+
return (h("div", { key: '7044b9b910b9216c8674f5aa21afc8ec79310af2', class: "container-chips" }, h("div", { key: '1097981d0e3709a57a95e4a7c87937a24930e416', class: { tags: true, 'icon-only': this.showIcon && !this.hasContent }, style: { backgroundColor: this.bgColor, color: this.textColor } }, this.showIcon && this.icon && (h("dropi-icon", { key: 'ba69aac6bb39a5cdc27d3d0ff2cc949cff1fb1a1', class: "file-icon", name: this.icon, width: "16px", height: "16px", color: this.iconColor })), this.hasContent && h("span", { key: '94aa2c494391b45341f14167bed97fa73f389b69' }, this.text))));
|
|
52
|
+
}
|
|
53
|
+
static get is() { return "dropi-tag"; }
|
|
54
|
+
static get encapsulation() { return "shadow"; }
|
|
55
|
+
static get originalStyleUrls() {
|
|
56
|
+
return {
|
|
57
|
+
"$": ["dropi-tag.css"]
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
static get styleUrls() {
|
|
61
|
+
return {
|
|
62
|
+
"$": ["dropi-tag.css"]
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
static get properties() {
|
|
66
|
+
return {
|
|
67
|
+
"type": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"mutable": false,
|
|
70
|
+
"complexType": {
|
|
71
|
+
"original": "TagType",
|
|
72
|
+
"resolved": "\"primary\" | \"secondary\"",
|
|
73
|
+
"references": {
|
|
74
|
+
"TagType": {
|
|
75
|
+
"location": "local",
|
|
76
|
+
"path": "/Users/mac-ti/Documents/dropi/dropi-ui/src/components/dropi-tag/dropi-tag.tsx",
|
|
77
|
+
"id": "src/components/dropi-tag/dropi-tag.tsx::TagType"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"required": false,
|
|
82
|
+
"optional": false,
|
|
83
|
+
"docs": {
|
|
84
|
+
"tags": [],
|
|
85
|
+
"text": "primary (filled) | secondary (soft)"
|
|
86
|
+
},
|
|
87
|
+
"getter": false,
|
|
88
|
+
"setter": false,
|
|
89
|
+
"reflect": false,
|
|
90
|
+
"attribute": "type",
|
|
91
|
+
"defaultValue": "'primary'"
|
|
92
|
+
},
|
|
93
|
+
"state": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"mutable": false,
|
|
96
|
+
"complexType": {
|
|
97
|
+
"original": "TagState",
|
|
98
|
+
"resolved": "\"default\" | \"error\" | \"info\" | \"legacy\" | \"success\" | \"warning\"",
|
|
99
|
+
"references": {
|
|
100
|
+
"TagState": {
|
|
101
|
+
"location": "local",
|
|
102
|
+
"path": "/Users/mac-ti/Documents/dropi/dropi-ui/src/components/dropi-tag/dropi-tag.tsx",
|
|
103
|
+
"id": "src/components/dropi-tag/dropi-tag.tsx::TagState"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": false,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": "Color state of the tag"
|
|
112
|
+
},
|
|
113
|
+
"getter": false,
|
|
114
|
+
"setter": false,
|
|
115
|
+
"reflect": false,
|
|
116
|
+
"attribute": "state",
|
|
117
|
+
"defaultValue": "'default'"
|
|
118
|
+
},
|
|
119
|
+
"showIcon": {
|
|
120
|
+
"type": "boolean",
|
|
121
|
+
"mutable": false,
|
|
122
|
+
"complexType": {
|
|
123
|
+
"original": "boolean",
|
|
124
|
+
"resolved": "boolean",
|
|
125
|
+
"references": {}
|
|
126
|
+
},
|
|
127
|
+
"required": false,
|
|
128
|
+
"optional": false,
|
|
129
|
+
"docs": {
|
|
130
|
+
"tags": [],
|
|
131
|
+
"text": "Whether to show the icon"
|
|
132
|
+
},
|
|
133
|
+
"getter": false,
|
|
134
|
+
"setter": false,
|
|
135
|
+
"reflect": false,
|
|
136
|
+
"attribute": "show-icon",
|
|
137
|
+
"defaultValue": "false"
|
|
138
|
+
},
|
|
139
|
+
"icon": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"mutable": false,
|
|
142
|
+
"complexType": {
|
|
143
|
+
"original": "string",
|
|
144
|
+
"resolved": "string",
|
|
145
|
+
"references": {}
|
|
146
|
+
},
|
|
147
|
+
"required": false,
|
|
148
|
+
"optional": false,
|
|
149
|
+
"docs": {
|
|
150
|
+
"tags": [],
|
|
151
|
+
"text": "Icon name from the sprite"
|
|
152
|
+
},
|
|
153
|
+
"getter": false,
|
|
154
|
+
"setter": false,
|
|
155
|
+
"reflect": false,
|
|
156
|
+
"attribute": "icon",
|
|
157
|
+
"defaultValue": "''"
|
|
158
|
+
},
|
|
159
|
+
"text": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"mutable": false,
|
|
162
|
+
"complexType": {
|
|
163
|
+
"original": "string",
|
|
164
|
+
"resolved": "string",
|
|
165
|
+
"references": {}
|
|
166
|
+
},
|
|
167
|
+
"required": false,
|
|
168
|
+
"optional": false,
|
|
169
|
+
"docs": {
|
|
170
|
+
"tags": [],
|
|
171
|
+
"text": "Label text"
|
|
172
|
+
},
|
|
173
|
+
"getter": false,
|
|
174
|
+
"setter": false,
|
|
175
|
+
"reflect": false,
|
|
176
|
+
"attribute": "text",
|
|
177
|
+
"defaultValue": "''"
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
static get watchers() {
|
|
182
|
+
return [{
|
|
183
|
+
"propName": "type",
|
|
184
|
+
"methodName": "propsChanged"
|
|
185
|
+
}, {
|
|
186
|
+
"propName": "state",
|
|
187
|
+
"methodName": "propsChanged"
|
|
188
|
+
}];
|
|
189
|
+
}
|
|
190
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
7
|
+
|
|
8
|
+
.textarea-wrapper {
|
|
9
|
+
position: relative;
|
|
10
|
+
width: 100%;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: 4px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.textarea-wrapper label {
|
|
17
|
+
font-size: var(--font-size-xs, 10px);
|
|
18
|
+
font-weight: var(--font-weight-regular, 400);
|
|
19
|
+
color: var(--Gray-Gray-600, #475066);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.asterisk {
|
|
23
|
+
color: var(--Error-Error-500, #f46a6b);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.textarea-container {
|
|
27
|
+
position: relative;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
textarea.form-control {
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
width: 100%;
|
|
33
|
+
overflow: auto;
|
|
34
|
+
padding: var(--Size-3, 12px);
|
|
35
|
+
border: 1px solid var(--Gray-Gray-200, #c3c9d9);
|
|
36
|
+
border-radius: var(--Border-2, 8px);
|
|
37
|
+
font-size: var(--font-size-s, 12px);
|
|
38
|
+
font-family: inherit;
|
|
39
|
+
color: var(--Gray-Gray-700, #32394d);
|
|
40
|
+
background: var(--Neutral-White, #fff);
|
|
41
|
+
transition: border-color 0.3s ease-in-out;
|
|
42
|
+
outline: none;
|
|
43
|
+
appearance: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
textarea.form-control:focus {
|
|
47
|
+
border-color: var(--Info-Info-500, #50a5f1);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
textarea.form-control:focus::placeholder {
|
|
51
|
+
color: var(--Gray-Gray-400, #858ea6);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
textarea.form-control-valid {
|
|
55
|
+
border-color: var(--Gray-Gray-400, #858ea6) !important;
|
|
56
|
+
color: var(--Gray-Gray-600, #475066);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
textarea.form-control-invalid {
|
|
60
|
+
border-color: var(--Error-Error-500, #f46a6b) !important;
|
|
61
|
+
color: var(--Gray-Gray-600, #475066);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
textarea.form-control:disabled {
|
|
65
|
+
border-color: var(--Gray-Gray-200, #c3c9d9) !important;
|
|
66
|
+
color: var(--Gray-Gray-400, #858ea6);
|
|
67
|
+
background-color: var(--Gray-Gray-50, #f7f8fa);
|
|
68
|
+
cursor: not-allowed;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* ── Char counter ───────────────────────────────────────────── */
|
|
72
|
+
.char-counter {
|
|
73
|
+
position: absolute;
|
|
74
|
+
bottom: 10px;
|
|
75
|
+
right: 16px;
|
|
76
|
+
font-size: var(--font-size-xs, 10px);
|
|
77
|
+
color: var(--Gray-Gray-500, #69738c);
|
|
78
|
+
pointer-events: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* ── Helper ─────────────────────────────────────────────────── */
|
|
82
|
+
.form-control-helper {
|
|
83
|
+
display: flex;
|
|
84
|
+
gap: 4px;
|
|
85
|
+
align-items: center;
|
|
86
|
+
margin-top: 4px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.form-control-helper span {
|
|
90
|
+
display: block;
|
|
91
|
+
color: var(--Gray-Gray-600, #475066);
|
|
92
|
+
font-size: var(--font-size-xs, 10px);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.invalid-color {
|
|
96
|
+
color: var(--Error-Error-500, #f46a6b) !important;
|
|
97
|
+
}
|