@duskmoon-dev/core 0.1.0 → 0.2.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/README.md +366 -78
- package/dist/components/accordion.css +244 -0
- package/dist/components/alert.css +199 -0
- package/dist/components/appbar.css +493 -0
- package/dist/components/autocomplete.css +269 -0
- package/dist/components/avatar.css +167 -0
- package/dist/components/badge.css +178 -0
- package/dist/components/bottom-navigation.css +263 -0
- package/dist/components/bottomsheet.css +334 -0
- package/dist/components/button.css +475 -0
- package/dist/components/card.css +220 -0
- package/dist/components/cascader.css +418 -0
- package/dist/components/checkbox.css +231 -0
- package/dist/components/chip.css +211 -0
- package/dist/components/collapse.css +454 -0
- package/dist/components/datepicker.css +741 -0
- package/dist/components/dialog.css +173 -0
- package/dist/components/divider.css +284 -0
- package/dist/components/drawer.css +371 -0
- package/dist/components/file-upload.css +321 -0
- package/dist/components/form-group.css +308 -0
- package/dist/components/form.css +441 -0
- package/dist/components/index.css +14951 -0
- package/dist/components/input.css +240 -0
- package/dist/components/list.css +188 -0
- package/dist/components/markdown-body.css +405 -0
- package/dist/components/modal.css +291 -0
- package/dist/components/multi-select.css +491 -0
- package/dist/components/navigation.css +736 -0
- package/dist/components/otp-input.css +195 -0
- package/dist/components/pin-input.css +184 -0
- package/dist/components/popover.css +392 -0
- package/dist/components/progress.css +238 -0
- package/dist/components/radio.css +183 -0
- package/dist/components/rating.css +230 -0
- package/dist/components/segment-control.css +186 -0
- package/dist/components/select.css +205 -0
- package/dist/components/skeleton.css +216 -0
- package/dist/components/slider.css +327 -0
- package/dist/components/snackbar.css +311 -0
- package/dist/components/stepper.css +313 -0
- package/dist/components/switch.css +234 -0
- package/dist/components/table.css +199 -0
- package/dist/components/textarea.css +398 -0
- package/dist/components/time-input.css +252 -0
- package/dist/components/timeline.css +353 -0
- package/dist/components/toast.css +251 -0
- package/dist/components/tooltip.css +284 -0
- package/dist/components/tree-select.css +472 -0
- package/dist/esm/components/accordion.js +251 -0
- package/dist/esm/components/alert.js +206 -0
- package/dist/esm/components/appbar.js +500 -0
- package/dist/esm/components/autocomplete.js +276 -0
- package/dist/esm/components/avatar.js +174 -0
- package/dist/esm/components/badge.js +185 -0
- package/dist/esm/components/bottom-navigation.js +270 -0
- package/dist/esm/components/bottomsheet.js +341 -0
- package/dist/esm/components/button.js +482 -0
- package/dist/esm/components/card.js +227 -0
- package/dist/esm/components/cascader.js +425 -0
- package/dist/esm/components/checkbox.js +238 -0
- package/dist/esm/components/chip.js +218 -0
- package/dist/esm/components/collapse.js +461 -0
- package/dist/esm/components/datepicker.js +748 -0
- package/dist/esm/components/dialog.js +180 -0
- package/dist/esm/components/divider.js +291 -0
- package/dist/esm/components/drawer.js +378 -0
- package/dist/esm/components/file-upload.js +328 -0
- package/dist/esm/components/form-group.js +315 -0
- package/dist/esm/components/form.js +448 -0
- package/dist/esm/components/input.js +247 -0
- package/dist/esm/components/list.js +195 -0
- package/dist/esm/components/markdown-body.js +412 -0
- package/dist/esm/components/modal.js +298 -0
- package/dist/esm/components/multi-select.js +498 -0
- package/dist/esm/components/navigation.js +743 -0
- package/dist/esm/components/otp-input.js +202 -0
- package/dist/esm/components/pin-input.js +191 -0
- package/dist/esm/components/popover.js +399 -0
- package/dist/esm/components/progress.js +245 -0
- package/dist/esm/components/radio.js +190 -0
- package/dist/esm/components/rating.js +237 -0
- package/dist/esm/components/segment-control.js +193 -0
- package/dist/esm/components/select.js +212 -0
- package/dist/esm/components/skeleton.js +223 -0
- package/dist/esm/components/slider.js +334 -0
- package/dist/esm/components/snackbar.js +318 -0
- package/dist/esm/components/stepper.js +320 -0
- package/dist/esm/components/switch.js +241 -0
- package/dist/esm/components/table.js +206 -0
- package/dist/esm/components/textarea.js +405 -0
- package/dist/esm/components/time-input.js +259 -0
- package/dist/esm/components/timeline.js +360 -0
- package/dist/esm/components/toast.js +258 -0
- package/dist/esm/components/tooltip.js +291 -0
- package/dist/esm/components/tree-select.js +479 -0
- package/dist/index.css +15866 -0
- package/dist/themes/moonlight.css +253 -0
- package/dist/themes/sunshine.css +250 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/plugin.d.ts +69 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/theme.d.ts +202 -0
- package/dist/types/theme.d.ts.map +1 -0
- package/package.json +262 -18
- package/dist/index.cjs +0 -243
- package/dist/index.cjs.map +0 -15
- package/dist/index.js +0 -211
- package/dist/index.js.map +0 -15
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Table Component Styles
|
|
3
|
+
* DuskMoonUI - Material Design 3 inspired table system
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@layer components {
|
|
7
|
+
/* Base Table */
|
|
8
|
+
.table {
|
|
9
|
+
width: 100%;
|
|
10
|
+
border-collapse: collapse;
|
|
11
|
+
border-spacing: 0;
|
|
12
|
+
font-size: 0.875rem;
|
|
13
|
+
color: var(--color-on-surface);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Table Head */
|
|
17
|
+
.table thead,
|
|
18
|
+
.table-header {
|
|
19
|
+
background-color: var(--color-surface-container);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.table th,
|
|
23
|
+
.table-header-cell {
|
|
24
|
+
padding: 0.75rem 1rem;
|
|
25
|
+
font-weight: 600;
|
|
26
|
+
text-align: left;
|
|
27
|
+
color: var(--color-on-surface);
|
|
28
|
+
border-bottom: 2px solid var(--color-outline);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Table Body */
|
|
32
|
+
.table tbody,
|
|
33
|
+
.table-body {
|
|
34
|
+
background-color: var(--color-surface);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.table td,
|
|
38
|
+
.table-cell {
|
|
39
|
+
padding: 0.75rem 1rem;
|
|
40
|
+
border-bottom: 1px solid var(--color-outline-variant);
|
|
41
|
+
vertical-align: middle;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.table tr:last-child td,
|
|
45
|
+
.table-row:last-child .table-cell {
|
|
46
|
+
border-bottom: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Table Footer */
|
|
50
|
+
.table tfoot,
|
|
51
|
+
.table-footer {
|
|
52
|
+
background-color: var(--color-surface-container);
|
|
53
|
+
font-weight: 500;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.table tfoot td {
|
|
57
|
+
border-top: 2px solid var(--color-outline);
|
|
58
|
+
border-bottom: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Zebra Striping */
|
|
62
|
+
.table-zebra tbody tr:nth-child(even),
|
|
63
|
+
.table-zebra .table-row:nth-child(even) {
|
|
64
|
+
background-color: var(--color-surface-container-low);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Hover Effect */
|
|
68
|
+
.table-hover tbody tr:hover,
|
|
69
|
+
.table-hover .table-row:hover {
|
|
70
|
+
background-color: var(--color-surface-container);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Bordered Table */
|
|
74
|
+
.table-bordered {
|
|
75
|
+
border: 1px solid var(--color-outline);
|
|
76
|
+
border-radius: 0.5rem;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.table-bordered th,
|
|
81
|
+
.table-bordered td {
|
|
82
|
+
border: 1px solid var(--color-outline-variant);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Compact Table */
|
|
86
|
+
.table-compact th,
|
|
87
|
+
.table-compact td {
|
|
88
|
+
padding: 0.5rem 0.75rem;
|
|
89
|
+
font-size: 0.8125rem;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Comfortable Table */
|
|
93
|
+
.table-comfortable th,
|
|
94
|
+
.table-comfortable td {
|
|
95
|
+
padding: 1rem 1.25rem;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Fixed Layout */
|
|
99
|
+
.table-fixed {
|
|
100
|
+
table-layout: fixed;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Sortable Header */
|
|
104
|
+
.table-sortable th {
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
user-select: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.table-sortable th:hover {
|
|
110
|
+
background-color: var(--color-surface-container-high);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.table-sort-asc::after {
|
|
114
|
+
content: ' ↑';
|
|
115
|
+
opacity: 0.7;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.table-sort-desc::after {
|
|
119
|
+
content: ' ↓';
|
|
120
|
+
opacity: 0.7;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* Selected Row */
|
|
124
|
+
.table-row-selected,
|
|
125
|
+
.table tr.selected {
|
|
126
|
+
background-color: var(--color-primary-container);
|
|
127
|
+
color: var(--color-on-primary-container);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Clickable Row */
|
|
131
|
+
.table-row-clickable,
|
|
132
|
+
.table tbody tr[data-href] {
|
|
133
|
+
cursor: pointer;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Responsive Table */
|
|
137
|
+
.table-responsive {
|
|
138
|
+
display: block;
|
|
139
|
+
width: 100%;
|
|
140
|
+
overflow-x: auto;
|
|
141
|
+
-webkit-overflow-scrolling: touch;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.table-responsive .table {
|
|
145
|
+
min-width: 100%;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* Table Caption */
|
|
149
|
+
.table caption,
|
|
150
|
+
.table-caption {
|
|
151
|
+
padding: 0.75rem;
|
|
152
|
+
font-size: 0.875rem;
|
|
153
|
+
color: var(--color-on-surface-variant);
|
|
154
|
+
text-align: left;
|
|
155
|
+
caption-side: bottom;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* Empty State */
|
|
159
|
+
.table-empty {
|
|
160
|
+
text-align: center;
|
|
161
|
+
padding: 2rem;
|
|
162
|
+
color: var(--color-on-surface-variant);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Loading State */
|
|
166
|
+
.table-loading {
|
|
167
|
+
position: relative;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.table-loading::after {
|
|
171
|
+
content: '';
|
|
172
|
+
position: absolute;
|
|
173
|
+
inset: 0;
|
|
174
|
+
background-color: var(--color-surface);
|
|
175
|
+
opacity: 0.7;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* Pinned Columns */
|
|
179
|
+
.table-pin-left {
|
|
180
|
+
position: sticky;
|
|
181
|
+
left: 0;
|
|
182
|
+
background-color: inherit;
|
|
183
|
+
z-index: 1;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.table-pin-right {
|
|
187
|
+
position: sticky;
|
|
188
|
+
right: 0;
|
|
189
|
+
background-color: inherit;
|
|
190
|
+
z-index: 1;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* Focus State for Interactive Tables */
|
|
194
|
+
.table tr:focus-visible,
|
|
195
|
+
.table-row:focus-visible {
|
|
196
|
+
outline: 2px solid var(--color-primary);
|
|
197
|
+
outline-offset: -2px;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Textarea Component Styles
|
|
3
|
+
* DuskMoonUI - Material Design 3 inspired multi-line text input
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@layer components {
|
|
7
|
+
/* ============================================
|
|
8
|
+
* TEXTAREA CONTAINER
|
|
9
|
+
* ============================================ */
|
|
10
|
+
|
|
11
|
+
.textarea-container {
|
|
12
|
+
position: relative;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
gap: 0.25rem;
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* ============================================
|
|
20
|
+
* TEXTAREA LABEL
|
|
21
|
+
* ============================================ */
|
|
22
|
+
|
|
23
|
+
.textarea-label {
|
|
24
|
+
display: block;
|
|
25
|
+
font-size: 0.875rem;
|
|
26
|
+
font-weight: 500;
|
|
27
|
+
line-height: 1.25rem;
|
|
28
|
+
color: var(--color-on-surface);
|
|
29
|
+
margin-bottom: 0.25rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Floating Label */
|
|
33
|
+
.textarea-label-floating {
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: 0.75rem;
|
|
36
|
+
left: 1rem;
|
|
37
|
+
font-size: 1rem;
|
|
38
|
+
font-weight: 400;
|
|
39
|
+
color: var(--color-on-surface-variant);
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
transition: all 150ms ease-in-out;
|
|
42
|
+
transform-origin: left top;
|
|
43
|
+
z-index: 1;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Floating label active state - when textarea has content or focus */
|
|
47
|
+
.textarea:focus ~ .textarea-label-floating,
|
|
48
|
+
.textarea:not(:placeholder-shown) ~ .textarea-label-floating {
|
|
49
|
+
top: -0.5rem;
|
|
50
|
+
left: 0.75rem;
|
|
51
|
+
font-size: 0.75rem;
|
|
52
|
+
font-weight: 500;
|
|
53
|
+
color: var(--color-primary);
|
|
54
|
+
background-color: var(--color-surface);
|
|
55
|
+
padding: 0 0.25rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Floating label for filled variant */
|
|
59
|
+
.textarea-filled ~ .textarea-label-floating {
|
|
60
|
+
background-color: transparent;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.textarea-filled:focus ~ .textarea-label-floating,
|
|
64
|
+
.textarea-filled:not(:placeholder-shown) ~ .textarea-label-floating {
|
|
65
|
+
top: 0.25rem;
|
|
66
|
+
left: 0.75rem;
|
|
67
|
+
background-color: transparent;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* ============================================
|
|
71
|
+
* HELPER TEXT
|
|
72
|
+
* ============================================ */
|
|
73
|
+
|
|
74
|
+
.textarea-helper {
|
|
75
|
+
font-size: 0.75rem;
|
|
76
|
+
line-height: 1rem;
|
|
77
|
+
color: var(--color-on-surface-variant);
|
|
78
|
+
margin-top: 0.25rem;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* ============================================
|
|
82
|
+
* BASE TEXTAREA
|
|
83
|
+
* ============================================ */
|
|
84
|
+
|
|
85
|
+
.textarea {
|
|
86
|
+
display: block;
|
|
87
|
+
width: 100%;
|
|
88
|
+
min-height: 6rem;
|
|
89
|
+
padding: 0.75rem 1rem;
|
|
90
|
+
font-size: 1rem;
|
|
91
|
+
line-height: 1.5rem;
|
|
92
|
+
font-family: inherit;
|
|
93
|
+
color: var(--color-on-surface);
|
|
94
|
+
background-color: var(--color-surface);
|
|
95
|
+
border: 1px solid var(--color-outline);
|
|
96
|
+
border-radius: 0.5rem;
|
|
97
|
+
outline: none;
|
|
98
|
+
resize: vertical;
|
|
99
|
+
transition: border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.textarea::placeholder {
|
|
103
|
+
color: var(--color-on-surface-variant);
|
|
104
|
+
opacity: 0.7;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.textarea:hover:not(:disabled) {
|
|
108
|
+
border-color: var(--color-on-surface-variant);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.textarea:focus {
|
|
112
|
+
outline: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.textarea:focus-visible {
|
|
116
|
+
border-color: var(--color-primary);
|
|
117
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 10%, transparent);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.textarea:disabled {
|
|
121
|
+
cursor: not-allowed;
|
|
122
|
+
opacity: 0.5;
|
|
123
|
+
background-color: var(--color-surface-container);
|
|
124
|
+
resize: none;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.textarea[readonly] {
|
|
128
|
+
background-color: var(--color-surface-container);
|
|
129
|
+
cursor: default;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* Full Width */
|
|
133
|
+
.textarea-full {
|
|
134
|
+
width: 100%;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* ============================================
|
|
138
|
+
* VARIANTS
|
|
139
|
+
* ============================================ */
|
|
140
|
+
|
|
141
|
+
/* Filled Variant */
|
|
142
|
+
.textarea-filled {
|
|
143
|
+
background-color: var(--color-surface-container);
|
|
144
|
+
border: none;
|
|
145
|
+
border-bottom: 2px solid var(--color-outline);
|
|
146
|
+
border-radius: 0.5rem 0.5rem 0 0;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.textarea-filled:hover:not(:disabled) {
|
|
150
|
+
background-color: var(--color-surface-container-high);
|
|
151
|
+
border-bottom-color: var(--color-on-surface);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.textarea-filled:focus-visible {
|
|
155
|
+
border-bottom-color: var(--color-primary);
|
|
156
|
+
box-shadow: none;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Outlined Variant (default) */
|
|
160
|
+
.textarea-outlined {
|
|
161
|
+
background-color: transparent;
|
|
162
|
+
border: 1px solid var(--color-outline);
|
|
163
|
+
border-radius: 0.5rem;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* Ghost Variant */
|
|
167
|
+
.textarea-ghost {
|
|
168
|
+
background-color: transparent;
|
|
169
|
+
border-color: transparent;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.textarea-ghost:hover:not(:disabled) {
|
|
173
|
+
background-color: var(--color-surface-container);
|
|
174
|
+
border-color: transparent;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.textarea-ghost:focus-visible {
|
|
178
|
+
background-color: var(--color-surface-container);
|
|
179
|
+
border-color: transparent;
|
|
180
|
+
box-shadow: none;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* ============================================
|
|
184
|
+
* COLOR VARIANTS
|
|
185
|
+
* ============================================ */
|
|
186
|
+
|
|
187
|
+
/* Primary */
|
|
188
|
+
.textarea-primary {
|
|
189
|
+
border-color: var(--color-primary);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.textarea-primary:focus-visible {
|
|
193
|
+
border-color: var(--color-primary);
|
|
194
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 10%, transparent);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.textarea-filled.textarea-primary {
|
|
198
|
+
border-bottom-color: var(--color-primary);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.textarea-filled.textarea-primary:focus-visible {
|
|
202
|
+
border-bottom-color: var(--color-primary);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* Secondary */
|
|
206
|
+
.textarea-secondary {
|
|
207
|
+
border-color: var(--color-secondary);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.textarea-secondary:focus-visible {
|
|
211
|
+
border-color: var(--color-secondary);
|
|
212
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-secondary) 10%, transparent);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.textarea-filled.textarea-secondary {
|
|
216
|
+
border-bottom-color: var(--color-secondary);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.textarea-filled.textarea-secondary:focus-visible {
|
|
220
|
+
border-bottom-color: var(--color-secondary);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* Tertiary */
|
|
224
|
+
.textarea-tertiary {
|
|
225
|
+
border-color: var(--color-tertiary);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.textarea-tertiary:focus-visible {
|
|
229
|
+
border-color: var(--color-tertiary);
|
|
230
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-tertiary) 10%, transparent);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.textarea-filled.textarea-tertiary {
|
|
234
|
+
border-bottom-color: var(--color-tertiary);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.textarea-filled.textarea-tertiary:focus-visible {
|
|
238
|
+
border-bottom-color: var(--color-tertiary);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/* ============================================
|
|
242
|
+
* SEMANTIC COLORS
|
|
243
|
+
* ============================================ */
|
|
244
|
+
|
|
245
|
+
.textarea-error {
|
|
246
|
+
border-color: var(--color-error);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.textarea-error:focus-visible {
|
|
250
|
+
border-color: var(--color-error);
|
|
251
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-error) 10%, transparent);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.textarea-filled.textarea-error {
|
|
255
|
+
border-bottom-color: var(--color-error);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.textarea-success {
|
|
259
|
+
border-color: var(--color-success);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.textarea-success:focus-visible {
|
|
263
|
+
border-color: var(--color-success);
|
|
264
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-success) 10%, transparent);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.textarea-filled.textarea-success {
|
|
268
|
+
border-bottom-color: var(--color-success);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.textarea-warning {
|
|
272
|
+
border-color: var(--color-warning);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.textarea-warning:focus-visible {
|
|
276
|
+
border-color: var(--color-warning);
|
|
277
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-warning) 10%, transparent);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.textarea-filled.textarea-warning {
|
|
281
|
+
border-bottom-color: var(--color-warning);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/* ============================================
|
|
285
|
+
* SIZE VARIANTS
|
|
286
|
+
* ============================================ */
|
|
287
|
+
|
|
288
|
+
.textarea-sm {
|
|
289
|
+
min-height: 4rem;
|
|
290
|
+
padding: 0.5rem 0.75rem;
|
|
291
|
+
font-size: 0.875rem;
|
|
292
|
+
line-height: 1.25rem;
|
|
293
|
+
border-radius: 0.375rem;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.textarea-lg {
|
|
297
|
+
min-height: 8rem;
|
|
298
|
+
padding: 1rem 1.25rem;
|
|
299
|
+
font-size: 1.125rem;
|
|
300
|
+
line-height: 1.75rem;
|
|
301
|
+
border-radius: 0.625rem;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/* ============================================
|
|
305
|
+
* RESIZE OPTIONS
|
|
306
|
+
* ============================================ */
|
|
307
|
+
|
|
308
|
+
.textarea-resize-none {
|
|
309
|
+
resize: none;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.textarea-resize-vertical {
|
|
313
|
+
resize: vertical;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.textarea-resize-horizontal {
|
|
317
|
+
resize: horizontal;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.textarea-resize-both {
|
|
321
|
+
resize: both;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/* ============================================
|
|
325
|
+
* AUTO-RESIZE (requires JS)
|
|
326
|
+
* ============================================ */
|
|
327
|
+
|
|
328
|
+
.textarea-auto-resize,
|
|
329
|
+
.textarea-autosize {
|
|
330
|
+
resize: none;
|
|
331
|
+
overflow: hidden;
|
|
332
|
+
min-height: 3rem;
|
|
333
|
+
field-sizing: content; /* Modern CSS - auto-grows without JS in supported browsers */
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/* ============================================
|
|
337
|
+
* CHARACTER COUNTER
|
|
338
|
+
* ============================================ */
|
|
339
|
+
|
|
340
|
+
.textarea-counter {
|
|
341
|
+
font-size: 0.75rem;
|
|
342
|
+
line-height: 1rem;
|
|
343
|
+
color: var(--color-on-surface-variant);
|
|
344
|
+
text-align: right;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.textarea-counter-error,
|
|
348
|
+
.textarea-counter-exceeded {
|
|
349
|
+
color: var(--color-error);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/* ============================================
|
|
353
|
+
* CONTAINER STATES
|
|
354
|
+
* ============================================ */
|
|
355
|
+
|
|
356
|
+
.textarea-container-error .textarea-label {
|
|
357
|
+
color: var(--color-error);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.textarea-container-error .textarea-helper {
|
|
361
|
+
color: var(--color-error);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.textarea-container-error .textarea-label-floating {
|
|
365
|
+
color: var(--color-error);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.textarea-container-error .textarea:focus ~ .textarea-label-floating {
|
|
369
|
+
color: var(--color-error);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.textarea-container-success .textarea-label {
|
|
373
|
+
color: var(--color-success);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.textarea-container-success .textarea-helper {
|
|
377
|
+
color: var(--color-success);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.textarea-container-success .textarea-label-floating {
|
|
381
|
+
color: var(--color-success);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.textarea-container-success .textarea:focus ~ .textarea-label-floating {
|
|
385
|
+
color: var(--color-success);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/* ============================================
|
|
389
|
+
* REDUCE MOTION
|
|
390
|
+
* ============================================ */
|
|
391
|
+
|
|
392
|
+
@media (prefers-reduced-motion: reduce) {
|
|
393
|
+
.textarea,
|
|
394
|
+
.textarea-label-floating {
|
|
395
|
+
transition: none;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|