@plexui/styles 0.0.0-stage → 0.1.1
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/README.md +28 -2
- package/dist/es/components/Accordion/Accordion.module.css +89 -0
- package/dist/es/components/Alert/Alert.module.css +210 -0
- package/dist/es/components/Avatar/Avatar.module.css +168 -0
- package/dist/es/components/Avatar/AvatarGroup.module.css +26 -0
- package/dist/es/components/Badge/Badge.module.css +196 -0
- package/dist/es/components/Breadcrumb/Breadcrumb.module.css +59 -0
- package/dist/es/components/Button/Button.module.css +863 -0
- package/dist/es/components/ButtonGroup/ButtonGroup.module.css +158 -0
- package/dist/es/components/Card/Card.module.css +125 -0
- package/dist/es/components/Checkbox/Checkbox.module.css +225 -0
- package/dist/es/components/CodeBlock/CodeBlock.module.css +139 -0
- package/dist/es/components/DataTable/DataTable.module.css +117 -0
- package/dist/es/components/DatePicker/Calendar.module.css +271 -0
- package/dist/es/components/DateRangePicker/Calendar.module.css +295 -0
- package/dist/es/components/DateRangePicker/Trigger.module.css +25 -0
- package/dist/es/components/Dialog/Dialog.module.css +240 -0
- package/dist/es/components/EmptyMessage/EmptyMessage.module.css +116 -0
- package/dist/es/components/Field/Field.module.css +152 -0
- package/dist/es/components/FieldError/FieldError.module.css +28 -0
- package/dist/es/components/FileUpload/FileUpload.module.css +133 -0
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.module.css +220 -0
- package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.module.css +152 -0
- package/dist/es/components/Image/Image.module.css +9 -0
- package/dist/es/components/Indicator/CircularProgress.module.css +28 -0
- package/dist/es/components/Indicator/LoadingDots.module.css +35 -0
- package/dist/es/components/Indicator/LoadingIndicator.module.css +41 -0
- package/dist/es/components/Input/Input.module.css +519 -0
- package/dist/es/components/InputGroup/InputGroup.module.css +309 -0
- package/dist/es/components/Kbd/Kbd.module.css +47 -0
- package/dist/es/components/Label/Label.module.css +16 -0
- package/dist/es/components/Markdown/Markdown.module.css +233 -0
- package/dist/es/components/MarkdownEditor/MarkdownEditor.module.css +297 -0
- package/dist/es/components/Menu/Menu.module.css +389 -0
- package/dist/es/components/OTPInput/OTPInput.module.css +70 -0
- package/dist/es/components/Popover/Popover.module.css +82 -0
- package/dist/es/components/Progress/Progress.module.css +34 -0
- package/dist/es/components/ProgressSteps/ProgressSteps.module.css +246 -0
- package/dist/es/components/RadioGroup/RadioGroup.module.css +159 -0
- package/dist/es/components/Select/Select.module.css +341 -0
- package/dist/es/components/SelectControl/SelectControl.module.css +558 -0
- package/dist/es/components/Separator/Separator.module.css +16 -0
- package/dist/es/components/ShimmerText/ShimmerText.module.css +43 -0
- package/dist/es/components/Sidebar/Sidebar.module.css +913 -0
- package/dist/es/components/Skeleton/Skeleton.module.css +17 -0
- package/dist/es/components/Slider/Slider.module.css +199 -0
- package/dist/es/components/StatCard/StatCard.module.css +234 -0
- package/dist/es/components/Switch/Switch.module.css +121 -0
- package/dist/es/components/Table/Table.module.css +56 -0
- package/dist/es/components/Tabs/Tabs.module.css +688 -0
- package/dist/es/components/TagInput/TagInput.module.css +320 -0
- package/dist/es/components/TextLink/TextLink.module.css +50 -0
- package/dist/es/components/Textarea/Textarea.module.css +272 -0
- package/dist/es/components/Toast/Toast.module.css +99 -0
- package/dist/es/components/Tooltip/Tooltip.module.css +91 -0
- package/dist/es/components/Transition/Animate.module.css +54 -0
- package/dist/es/components/Transition/AnimateLayout.module.css +101 -0
- package/dist/es/components/Transition/AnimateLayoutGroup.module.css +88 -0
- package/dist/es/components/Transition/TransitionGroup.module.css +4 -0
- package/dist/es/styles/base.css +102 -0
- package/dist/es/styles/globals.css +50 -0
- package/dist/es/styles/index.css +22 -0
- package/dist/es/styles/katex.min.css +1296 -0
- package/dist/es/styles/tailwind-utilities.css +1316 -0
- package/dist/es/styles/touch.css +71 -0
- package/dist/es/styles/variables-components.css +626 -0
- package/dist/es/styles/variables-primitive.css +327 -0
- package/dist/es/styles/variables-semantic.css +629 -0
- package/dist/es/styles/variables-tailwind-theme.css +34 -0
- package/dist/es/styles/variables-tokens-root.css +40 -0
- package/dist/es/types.js +4 -0
- package/dist/es/types.js.map +1 -0
- package/dist/es/vite/index.js +54 -0
- package/dist/es/vite/index.js.map +1 -0
- package/dist/types/types.d.ts +15 -0
- package/dist/types/vite/index.d.ts +55 -0
- package/package.json +109 -4
- package/postcss/functions.mjs +23 -0
- package/postcss/injectBreakpoints.mjs +47 -0
- package/postcss/mixins.mjs +100 -0
- package/postcss/parseLightDark.mjs +174 -0
- package/postcss/wrapModulesInLayer.mjs +21 -0
- package/postcss.config.mjs +52 -0
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
@layer components {.Container {
|
|
2
|
+
position: relative;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
|
|
5
|
+
/* The height is the sum of all rows plus spacing, which is N+1 to account for the top spacing for the first row */
|
|
6
|
+
|
|
7
|
+
/* prettier-ignore */
|
|
8
|
+
min-height: calc(
|
|
9
|
+
(var(--min-rows) * var(--tag-input-height)) + ((var(--min-rows) + 1) * var(--tag-input-tag-spacing))
|
|
10
|
+
);
|
|
11
|
+
padding: var(--tag-input-tag-spacing);
|
|
12
|
+
border-radius: var(--tag-input-radius, var(--radius-md));
|
|
13
|
+
box-shadow: 0 0 0 1px var(--input-outline-border-color) inset;
|
|
14
|
+
color: var(--input-text-color);
|
|
15
|
+
cursor: text;
|
|
16
|
+
outline: 0;
|
|
17
|
+
transition: box-shadow 0.15s ease;
|
|
18
|
+
|
|
19
|
+
/* =============================================
|
|
20
|
+
Sizes
|
|
21
|
+
-----------------------------------------------
|
|
22
|
+
Each size sets the inner input height + the
|
|
23
|
+
container padding/gap (`--tag-input-tag-spacing`).
|
|
24
|
+
The sum `(rows × tag-input-height) + ((rows + 1) × tag-input-tag-spacing)`
|
|
25
|
+
equals the matching Input size when rows=1, so a
|
|
26
|
+
TagInput[size=md] sits flush next to an Input[size=md]
|
|
27
|
+
in a horizontal layout.
|
|
28
|
+
|
|
29
|
+
Sizes also re-tune the chip itself via
|
|
30
|
+
`--tag-input-tag-{height,gutter,font-size}` so the
|
|
31
|
+
inner pills stay proportional to the container.
|
|
32
|
+
============================================= */
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.Container[data-disabled] {
|
|
36
|
+
pointer-events: none;
|
|
37
|
+
}
|
|
38
|
+
@media (hover: hover) and (pointer: fine) {.Container:not([data-disabled]):hover, :where([data-theme="light"]) .Container:not([data-disabled]):hover {
|
|
39
|
+
box-shadow: 0 0 0 1px var(--gray-300) inset;
|
|
40
|
+
}:where([data-theme="dark"]) .Container:not([data-disabled]):hover {
|
|
41
|
+
box-shadow: 0 0 0 1px var(--gray-500) inset;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.Container:not([data-disabled])[data-focused] {
|
|
46
|
+
box-shadow: 0 0 0 1px var(--input-outline-border-color-focus) inset;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.Container[data-empty] {
|
|
50
|
+
padding: var(--tag-input-tag-spacing) 12px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* =============================================
|
|
54
|
+
Pill — fully-rounded for the single-row state.
|
|
55
|
+
----------------------------------------------
|
|
56
|
+
The radius is locked to half of a single-row
|
|
57
|
+
container height (= half of `--control-size-*`).
|
|
58
|
+
With `radius-full` the container would stay an
|
|
59
|
+
ellipse when the chip list wraps to a second/third
|
|
60
|
+
row, which looks bad. Computing it from the
|
|
61
|
+
single-row height keeps the corners visually pill
|
|
62
|
+
on row 1 and stays sane on multi-row.
|
|
63
|
+
============================================= */
|
|
64
|
+
.Container[data-pill] {
|
|
65
|
+
border-radius: calc(
|
|
66
|
+
(var(--tag-input-height) + 2 * var(--tag-input-tag-spacing)) / 2
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.Container[data-pill][data-empty] {
|
|
71
|
+
padding: var(--tag-input-tag-spacing) 16px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* 20 + 4 + 4 = 28 */
|
|
75
|
+
.Container:where([data-size="sm"]) {
|
|
76
|
+
--tag-input-font-size: var(--control-font-size-md);
|
|
77
|
+
--tag-input-height: 20px;
|
|
78
|
+
--tag-input-tag-spacing: 4px;
|
|
79
|
+
--tag-input-tag-gutter: var(--control-gutter-2xs);
|
|
80
|
+
--tag-input-radius: var(--control-radius-sm);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* 20 + 6 + 6 = 32 */
|
|
84
|
+
.Container:where([data-size="md"]) {
|
|
85
|
+
--tag-input-font-size: var(--control-font-size-md);
|
|
86
|
+
--tag-input-height: 20px;
|
|
87
|
+
--tag-input-tag-spacing: 6px;
|
|
88
|
+
--tag-input-radius: var(--control-radius-md);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* 24 + 6 + 6 = 36 */
|
|
92
|
+
.Container:where([data-size="lg"]) {
|
|
93
|
+
--tag-input-font-size: var(--control-font-size-md);
|
|
94
|
+
--tag-input-height: 24px;
|
|
95
|
+
--tag-input-tag-spacing: 6px;
|
|
96
|
+
--tag-input-radius: var(--control-radius-lg);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* 24 + 8 + 8 = 40 */
|
|
100
|
+
.Container:where([data-size="xl"]) {
|
|
101
|
+
/* SelectControl xl uses control-font-size-md (not -lg), so the chip + input
|
|
102
|
+
text inside TagInput xl matches Select xl. */
|
|
103
|
+
--tag-input-font-size: var(--control-font-size-md);
|
|
104
|
+
--tag-input-height: 24px;
|
|
105
|
+
--tag-input-tag-spacing: 8px;
|
|
106
|
+
--tag-input-radius: var(--control-radius-xl);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* 28 + 8 + 8 = 44 */
|
|
110
|
+
.Container:where([data-size="2xl"]) {
|
|
111
|
+
--tag-input-font-size: var(--control-font-size-lg);
|
|
112
|
+
--tag-input-height: 28px;
|
|
113
|
+
--tag-input-tag-spacing: 8px;
|
|
114
|
+
--tag-input-radius: var(--control-radius-xl);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* 32 + 8 + 8 = 48 */
|
|
118
|
+
.Container:where([data-size="3xl"]) {
|
|
119
|
+
--tag-input-font-size: var(--control-font-size-lg);
|
|
120
|
+
--tag-input-height: 32px;
|
|
121
|
+
--tag-input-tag-spacing: 8px;
|
|
122
|
+
--tag-input-radius: var(--control-radius-xl);
|
|
123
|
+
}.TagInput {
|
|
124
|
+
display: flex;
|
|
125
|
+
flex-wrap: wrap;
|
|
126
|
+
gap: var(--tag-input-tag-spacing);
|
|
127
|
+
}.Tag {
|
|
128
|
+
overflow: hidden;
|
|
129
|
+
display: inline-flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
gap: calc(var(--spacing) * 1);
|
|
132
|
+
/* Match the inner input height so a chip-filled container is exactly
|
|
133
|
+
the same height as an empty one (= matching Input[size] of the same size).
|
|
134
|
+
Override per-size via `--tag-input-tag-height` if a non-square chip is needed. */
|
|
135
|
+
height: var(--tag-input-tag-height, var(--tag-input-height));
|
|
136
|
+
/* Right padding equals the chip's vertical padding so the close button
|
|
137
|
+
sits with equal whitespace on top, bottom, and right. */
|
|
138
|
+
padding: 0 calc((var(--tag-input-tag-height, var(--tag-input-height)) - var(--control-icon-size-sm)) / 2) 0
|
|
139
|
+
var(--tag-input-tag-gutter, var(--control-gutter-xs));
|
|
140
|
+
/* Concentric with the container: chip radius = container radius − inner padding.
|
|
141
|
+
Falls through every size automatically because both vars are set per-size. */
|
|
142
|
+
border-radius: var(--tag-input-tag-radius, calc(var(--tag-input-radius) - var(--tag-input-tag-spacing)));
|
|
143
|
+
/* Match SelectControl text-size for the same `size` (md/lg=14, xl/2xl/3xl=16);
|
|
144
|
+
`--tag-input-font-size` is set per-size to the same token Select uses. */
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.Container[data-pill] .Tag {
|
|
148
|
+
/* Chip height is fixed (single row) so half of it gives a true pill,
|
|
149
|
+
same idea as the container's pill rule above. */
|
|
150
|
+
border-radius: calc(var(--tag-input-tag-height, var(--tag-input-height)) / 2);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.Tag {
|
|
154
|
+
background-color: var(--color-background-secondary-soft-alpha);
|
|
155
|
+
color: var(--color-text-secondary-soft);
|
|
156
|
+
font-size: var(--tag-input-tag-font-size, var(--tag-input-font-size));
|
|
157
|
+
font-weight: var(--button-font-weight);
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
white-space: nowrap;
|
|
160
|
+
outline: none;
|
|
161
|
+
transition: background-color 0.15s ease;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@media (hover: hover) and (pointer: fine) {.Tag:hover {
|
|
165
|
+
background-color: var(--color-background-secondary-soft-alpha-hover);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.Tag:focus {
|
|
170
|
+
background-color: var(--color-background-secondary-soft-alpha-hover);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.Tag:active {
|
|
174
|
+
background-color: var(--color-background-secondary-soft-alpha-active);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.Container[data-disabled] .Tag {
|
|
178
|
+
color: var(--color-text-tertiary);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.Tag[data-invalid] {
|
|
182
|
+
background-color: var(--color-background-danger-soft-alpha);
|
|
183
|
+
color: var(--color-text-danger-soft);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@media (hover: hover) and (pointer: fine) {.Tag[data-invalid]:hover {
|
|
187
|
+
background-color: var(--color-background-danger-soft-alpha-hover);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.Tag[data-invalid]:focus {
|
|
192
|
+
background-color: var(--color-background-danger-soft-alpha-hover);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.Tag[data-invalid]:active {
|
|
196
|
+
background-color: var(--color-background-danger-soft-alpha-active);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.Tag[data-duplicate] {
|
|
200
|
+
animation: shake 0.5s ease;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.Tag svg {
|
|
204
|
+
font-size: var(--control-icon-size-sm);
|
|
205
|
+
}.TagRemove {
|
|
206
|
+
display: flex;
|
|
207
|
+
align-items: center;
|
|
208
|
+
color: inherit;
|
|
209
|
+
opacity: 0.5;
|
|
210
|
+
transition: opacity 0.15s ease;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
@media (hover: hover) and (pointer: fine) {.TagRemove:hover {
|
|
214
|
+
opacity: 1;
|
|
215
|
+
}
|
|
216
|
+
}.TagValue {
|
|
217
|
+
white-space: nowrap;
|
|
218
|
+
}.InputContainer {
|
|
219
|
+
display: flex;
|
|
220
|
+
align-items: center;
|
|
221
|
+
flex-grow: 1;
|
|
222
|
+
max-width: 100%;
|
|
223
|
+
}.InputWrapper {
|
|
224
|
+
overflow: hidden;
|
|
225
|
+
width: 100%;
|
|
226
|
+
}.InputMeasure {
|
|
227
|
+
position: absolute;
|
|
228
|
+
font-size: var(--tag-input-font-size);
|
|
229
|
+
visibility: hidden;
|
|
230
|
+
white-space: nowrap;
|
|
231
|
+
}.Input {
|
|
232
|
+
display: block;
|
|
233
|
+
min-width: 20px;
|
|
234
|
+
height: var(--tag-input-height);
|
|
235
|
+
padding: 0;
|
|
236
|
+
border: 0;
|
|
237
|
+
border-radius: 0;
|
|
238
|
+
background: none;
|
|
239
|
+
box-shadow: none;
|
|
240
|
+
color: var(--color-text);
|
|
241
|
+
font-size: var(--tag-input-font-size);
|
|
242
|
+
line-height: 1.4;
|
|
243
|
+
white-space: nowrap;
|
|
244
|
+
|
|
245
|
+
/* Prevent auto-fill coloring */
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.Input:focus {
|
|
249
|
+
outline: 0;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.Input::-moz-placeholder {
|
|
253
|
+
color: var(--color-text-tertiary);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.Input::placeholder {
|
|
257
|
+
color: var(--color-text-tertiary);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.Input:disabled {
|
|
261
|
+
color: var(--color-text-tertiary);
|
|
262
|
+
}
|
|
263
|
+
.Input:-webkit-autofill, .Input:-webkit-autofill:focus, .Input:-webkit-autofill:hover {
|
|
264
|
+
/*
|
|
265
|
+
* Prevent all color changes by delaying their effect for a very long time
|
|
266
|
+
* We cannot beat the specificity of user-agent stylesheet declarations, so we must delay them.
|
|
267
|
+
*/
|
|
268
|
+
color: var(--color-text) !important;
|
|
269
|
+
-webkit-text-fill-color: var(--color-text) !important;
|
|
270
|
+
-webkit-transition:
|
|
271
|
+
background-color 0s 50000s,
|
|
272
|
+
box-shadow 0s 50000s,
|
|
273
|
+
filter 0s 50000s !important;
|
|
274
|
+
transition:
|
|
275
|
+
background-color 0s 50000s,
|
|
276
|
+
box-shadow 0s 50000s,
|
|
277
|
+
filter 0s 50000s !important;
|
|
278
|
+
}
|
|
279
|
+
.Input:-webkit-autofill-and-obscured, .Input:-webkit-autofill-strong-password, .Input:-webkit-autofill-strong-password-viewable {
|
|
280
|
+
/*
|
|
281
|
+
* Prevent all color changes by delaying their effect for a very long time
|
|
282
|
+
* We cannot beat the specificity of user-agent stylesheet declarations, so we must delay them.
|
|
283
|
+
*/
|
|
284
|
+
color: var(--color-text) !important;
|
|
285
|
+
-webkit-text-fill-color: var(--color-text) !important;
|
|
286
|
+
-webkit-transition:
|
|
287
|
+
background-color 0s 50000s,
|
|
288
|
+
box-shadow 0s 50000s,
|
|
289
|
+
filter 0s 50000s !important;
|
|
290
|
+
transition:
|
|
291
|
+
background-color 0s 50000s,
|
|
292
|
+
box-shadow 0s 50000s,
|
|
293
|
+
filter 0s 50000s !important;
|
|
294
|
+
}.Limit {
|
|
295
|
+
width: 100%;
|
|
296
|
+
margin-top: 2px;
|
|
297
|
+
color: var(--color-text);
|
|
298
|
+
font-size: var(--font-text-xs-size);
|
|
299
|
+
font-variant-numeric: tabular-nums;
|
|
300
|
+
text-align: right;
|
|
301
|
+
}@keyframes shake {
|
|
302
|
+
0% {
|
|
303
|
+
transform: translateX(0);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
20%,
|
|
307
|
+
60% {
|
|
308
|
+
transform: translateX(-5px);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
40%,
|
|
312
|
+
80% {
|
|
313
|
+
transform: translateX(5px);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
100% {
|
|
317
|
+
transform: translateX(0);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@layer components {.TextLink {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: var(--link-gap);
|
|
5
|
+
/* Used to round the focus ring */
|
|
6
|
+
border-radius: var(--link-radius);
|
|
7
|
+
color: currentcolor;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
font-weight: var(--link-font-weight);
|
|
10
|
+
overflow-wrap: anywhere;
|
|
11
|
+
transition-duration: var(--transition-duration-basic);
|
|
12
|
+
transition-property: opacity, color, box-shadow, text-decoration-color;
|
|
13
|
+
transition-timing-function: var(--transition-ease-basic);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@media (hover: hover) and (pointer: fine) {.TextLink:hover {
|
|
17
|
+
color: color-mix(in oklab, currentcolor 80%, transparent);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* stylelint-disable-next-line */
|
|
21
|
+
:global(.text-secondary) .TextLink:hover {
|
|
22
|
+
color: var(--color-text);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* stylelint-disable-next-line */
|
|
26
|
+
:global(.text-tertiary) .TextLink:hover {
|
|
27
|
+
color: var(--color-text-secondary);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.TextLink:focus-visible {
|
|
32
|
+
outline: 2px solid var(--color-ring);
|
|
33
|
+
outline-offset: 1px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.TextLink[data-underline] {
|
|
37
|
+
text-decoration: underline;
|
|
38
|
+
text-decoration-color: color-mix(in oklab, currentcolor 70%, transparent);
|
|
39
|
+
text-underline-offset: var(--link-underline-decoration-offset);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.TextLink[data-primary] {
|
|
43
|
+
color: var(--link-primary-text-color);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@media (hover: hover) and (pointer: fine) {.TextLink[data-primary]:hover {
|
|
47
|
+
color: var(--link-primary-text-color-hover);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
@layer components {.Container {
|
|
2
|
+
--textarea-line-height: 20px;
|
|
3
|
+
--textarea-font-weight: var(--font-weight-normal);
|
|
4
|
+
--textarea-color: var(--color-text);
|
|
5
|
+
--textarea-gutter-y: calc(0.5 * calc(var(--textarea-base-height) - var(--textarea-line-height)));
|
|
6
|
+
--textarea-min-height: calc(
|
|
7
|
+
(var(--textarea-gutter-y) * 2) + (var(--textarea-line-height) * var(--textarea-min-rows))
|
|
8
|
+
);
|
|
9
|
+
--textarea-max-height: calc(
|
|
10
|
+
(var(--textarea-gutter-y) * 2) + (var(--textarea-line-height) * var(--textarea-max-rows))
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
/* ============================================ */
|
|
14
|
+
.Container:where([data-size="3xs"]) {
|
|
15
|
+
--textarea-base-height: var(--control-size-3xs);
|
|
16
|
+
--textarea-font-size: var(--control-font-size-sm);
|
|
17
|
+
--textarea-radius: var(--control-radius-sm);
|
|
18
|
+
--textarea-gutter-x: var(--control-gutter-xs);
|
|
19
|
+
}
|
|
20
|
+
/* Sizes */
|
|
21
|
+
|
|
22
|
+
.Container:where([data-size="2xs"]) {
|
|
23
|
+
--textarea-base-height: var(--control-size-2xs);
|
|
24
|
+
--textarea-font-size: var(--control-font-size-sm);
|
|
25
|
+
--textarea-radius: var(--control-radius-sm);
|
|
26
|
+
--textarea-gutter-x: var(--control-gutter-xs);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* ============================================ */
|
|
30
|
+
|
|
31
|
+
.Container:where([data-size="xs"]) {
|
|
32
|
+
--textarea-base-height: var(--control-size-xs);
|
|
33
|
+
--textarea-font-size: var(--control-font-size-md);
|
|
34
|
+
--textarea-radius: var(--control-radius-sm);
|
|
35
|
+
--textarea-gutter-x: var(--control-gutter-xs);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.Container:where([data-size="sm"]) {
|
|
39
|
+
--textarea-base-height: var(--control-size-sm);
|
|
40
|
+
--textarea-font-size: var(--control-font-size-md);
|
|
41
|
+
--textarea-radius: var(--control-radius-sm);
|
|
42
|
+
--textarea-gutter-x: var(--control-gutter-sm);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* ("md" is applied by default, set above) */
|
|
46
|
+
.Container:where([data-size="md"]) {
|
|
47
|
+
--textarea-base-height: var(--control-size-md);
|
|
48
|
+
--textarea-font-size: var(--control-font-size-md);
|
|
49
|
+
--textarea-radius: var(--control-radius-md);
|
|
50
|
+
--textarea-gutter-x: var(--control-gutter-md);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.Container:where([data-size="lg"]) {
|
|
54
|
+
--textarea-base-height: var(--control-size-lg);
|
|
55
|
+
--textarea-font-size: var(--control-font-size-md);
|
|
56
|
+
--textarea-radius: var(--control-radius-lg);
|
|
57
|
+
--textarea-gutter-x: var(--control-gutter-md);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.Container:where([data-size="xl"]) {
|
|
61
|
+
--textarea-base-height: var(--control-size-xl);
|
|
62
|
+
--textarea-font-size: var(--control-font-size-lg);
|
|
63
|
+
--textarea-radius: var(--control-radius-xl);
|
|
64
|
+
--textarea-gutter-x: var(--control-gutter-lg);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.Container:where([data-size="2xl"]) {
|
|
68
|
+
--textarea-base-height: var(--control-size-2xl);
|
|
69
|
+
--textarea-font-size: var(--control-font-size-lg);
|
|
70
|
+
--textarea-radius: var(--control-radius-xl);
|
|
71
|
+
--textarea-gutter-x: var(--control-gutter-xl);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.Container:where([data-size="3xl"]) {
|
|
75
|
+
--textarea-base-height: var(--control-size-3xl);
|
|
76
|
+
--textarea-font-size: var(--control-font-size-lg);
|
|
77
|
+
--textarea-radius: var(--control-radius-xl);
|
|
78
|
+
--textarea-gutter-x: var(--control-gutter-xl);
|
|
79
|
+
}
|
|
80
|
+
/* ============================================ */
|
|
81
|
+
.Container:where([data-gutter-size="2xs"]) {
|
|
82
|
+
--textarea-gutter-x: var(--control-gutter-2xs);
|
|
83
|
+
}
|
|
84
|
+
/* Gutter sizes */
|
|
85
|
+
|
|
86
|
+
.Container:where([data-gutter-size="xs"]) {
|
|
87
|
+
--textarea-gutter-x: var(--control-gutter-xs);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* ============================================ */
|
|
91
|
+
|
|
92
|
+
.Container:where([data-gutter-size="sm"]) {
|
|
93
|
+
--textarea-gutter-x: var(--control-gutter-sm);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.Container:where([data-gutter-size="md"]) {
|
|
97
|
+
--textarea-gutter-x: var(--control-gutter-md);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.Container:where([data-gutter-size="lg"]) {
|
|
101
|
+
--textarea-gutter-x: var(--control-gutter-lg);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.Container:where([data-gutter-size="xl"]) {
|
|
105
|
+
--textarea-gutter-x: var(--control-gutter-xl);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.Container {
|
|
109
|
+
|
|
110
|
+
position: relative;
|
|
111
|
+
overflow: hidden;
|
|
112
|
+
display: flex;
|
|
113
|
+
width: 100%;
|
|
114
|
+
border-radius: var(--textarea-radius);
|
|
115
|
+
color: var(--textarea-color);
|
|
116
|
+
cursor: text;
|
|
117
|
+
font-size: var(--textarea-font-size);
|
|
118
|
+
font-weight: var(--textarea-font-weight);
|
|
119
|
+
transition-duration: var(--transition-duration-basic);
|
|
120
|
+
transition-property: color, box-shadow, background-color;
|
|
121
|
+
transition-timing-function: var(--transition-ease-basic);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* =============================================
|
|
125
|
+
Outline variant
|
|
126
|
+
============================================= */
|
|
127
|
+
.Container:where([data-variant="outline"]) {
|
|
128
|
+
/* NOTE: Don't add box-model size here, as the <textarea> defines all height sizing */
|
|
129
|
+
box-shadow: 0 0 0 1px var(--input-outline-border-color) inset;
|
|
130
|
+
}
|
|
131
|
+
@media (hover: hover) and (pointer: fine) {.Container:where([data-variant="outline"]):not([data-disabled]):hover {
|
|
132
|
+
box-shadow: 0 0 0 1px var(--input-outline-border-color-hover) inset;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.Container:where([data-variant="outline"]):not([data-disabled])[data-focused="true"] {
|
|
137
|
+
box-shadow: 0 0 0 1px var(--input-outline-border-color-focus) inset;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.Container:where([data-variant="outline"]):not([data-disabled])[data-invalid] {
|
|
141
|
+
box-shadow: 0 0 0 1px var(--input-border-color-invalid) inset;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* =============================================
|
|
145
|
+
Soft variant
|
|
146
|
+
============================================= */
|
|
147
|
+
.Container:where([data-variant="soft"]) {
|
|
148
|
+
background-color: var(--input-soft-background-color);
|
|
149
|
+
}
|
|
150
|
+
.Container:where([data-variant="soft"]):not([data-disabled])[data-focused="true"] {
|
|
151
|
+
box-shadow: 0 0 0 1px var(--input-soft-border-color-focus) inset;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.Container:where([data-variant="soft"]):not([data-disabled])[data-invalid] {
|
|
155
|
+
box-shadow: 0 0 0 1px var(--input-border-color-invalid) inset;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* =============================================
|
|
159
|
+
Invalid
|
|
160
|
+
============================================= */
|
|
161
|
+
.Container[data-invalid] ::-moz-selection {
|
|
162
|
+
background-color: var(--red-a50);
|
|
163
|
+
}
|
|
164
|
+
.Container[data-invalid] ::selection {
|
|
165
|
+
background-color: var(--red-a50);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* =============================================
|
|
169
|
+
Disabled
|
|
170
|
+
============================================= */
|
|
171
|
+
.Container[data-disabled] {
|
|
172
|
+
cursor: not-allowed;
|
|
173
|
+
opacity: 0.5;
|
|
174
|
+
}.Textarea {
|
|
175
|
+
display: block;
|
|
176
|
+
width: 100%;
|
|
177
|
+
max-width: 100%;
|
|
178
|
+
min-height: var(--textarea-min-height);
|
|
179
|
+
max-height: var(--textarea-max-height);
|
|
180
|
+
padding: var(--textarea-gutter-y) var(--textarea-gutter-x);
|
|
181
|
+
border: 0;
|
|
182
|
+
border-radius: 0;
|
|
183
|
+
-webkit-appearance: none;
|
|
184
|
+
-moz-appearance: none;
|
|
185
|
+
appearance: none;
|
|
186
|
+
background: none;
|
|
187
|
+
box-shadow: none;
|
|
188
|
+
color: inherit;
|
|
189
|
+
/* Prevent Firefox autofill coloring (preview and confirmed modes) */
|
|
190
|
+
filter: none;
|
|
191
|
+
font-size: inherit;
|
|
192
|
+
font-weight: inherit;
|
|
193
|
+
line-height: var(--textarea-line-height);
|
|
194
|
+
resize: none;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.Textarea:focus {
|
|
198
|
+
outline: 0;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.Textarea:disabled {
|
|
202
|
+
cursor: not-allowed;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.Textarea::-moz-placeholder {
|
|
206
|
+
color: var(--input-placeholder-text-color);
|
|
207
|
+
/* Normalize placeholder coloring across browsers. Firefox specifically uses `opacity` instead of a different `color`. */
|
|
208
|
+
opacity: 1;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.Textarea::placeholder {
|
|
212
|
+
color: var(--input-placeholder-text-color);
|
|
213
|
+
/* Normalize placeholder coloring across browsers. Firefox specifically uses `opacity` instead of a different `color`. */
|
|
214
|
+
opacity: 1;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* Applying an animation on autofill allows us to listen for the event in JS */
|
|
218
|
+
.Textarea:-webkit-autofill {
|
|
219
|
+
animation: native-autofill-in 1ms;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/* Prevent auto-fill coloring */
|
|
223
|
+
.Textarea:-webkit-autofill,
|
|
224
|
+
.Textarea:-webkit-autofill:focus,
|
|
225
|
+
.Textarea:-webkit-autofill:hover {
|
|
226
|
+
color: var(--color-text) !important;
|
|
227
|
+
-webkit-text-fill-color: var(--color-text) !important;
|
|
228
|
+
/* Prevent all color changes by delaying their effect for a very long time */
|
|
229
|
+
/* We cannot beat the specificity of user-agent stylesheet declarations, so we must delay them. */
|
|
230
|
+
-webkit-transition:
|
|
231
|
+
background-color 0s 50000s,
|
|
232
|
+
box-shadow 0s 50000s,
|
|
233
|
+
filter 0s 50000s !important;
|
|
234
|
+
transition:
|
|
235
|
+
background-color 0s 50000s,
|
|
236
|
+
box-shadow 0s 50000s,
|
|
237
|
+
filter 0s 50000s !important;
|
|
238
|
+
}
|
|
239
|
+
/* Identical to block above, but must keep separate for browsers to recognize their own selector */
|
|
240
|
+
.Textarea:-webkit-autofill-and-obscured,
|
|
241
|
+
.Textarea:-webkit-autofill-strong-password,
|
|
242
|
+
.Textarea:-webkit-autofill-strong-password-viewable {
|
|
243
|
+
color: var(--color-text) !important;
|
|
244
|
+
-webkit-text-fill-color: var(--color-text) !important;
|
|
245
|
+
-webkit-transition:
|
|
246
|
+
background-color 0s 50000s,
|
|
247
|
+
box-shadow 0s 50000s,
|
|
248
|
+
filter 0s 50000s !important;
|
|
249
|
+
transition:
|
|
250
|
+
background-color 0s 50000s,
|
|
251
|
+
box-shadow 0s 50000s,
|
|
252
|
+
filter 0s 50000s !important;
|
|
253
|
+
}
|
|
254
|
+
/* Prevent strange autofill size adjustments */
|
|
255
|
+
.Textarea:-webkit-autofill::first-line {
|
|
256
|
+
font-size: 16px !important;
|
|
257
|
+
-webkit-transition: font-size 0s 50000s !important;
|
|
258
|
+
transition: font-size 0s 50000s !important;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.Textarea::-webkit-resizer {
|
|
262
|
+
visibility: hidden;
|
|
263
|
+
}@keyframes native-autofill-in {
|
|
264
|
+
0% {
|
|
265
|
+
opacity: 1;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
100% {
|
|
269
|
+
opacity: 1;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|