@plexui/styles 0.1.13 → 0.1.15

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.
@@ -1,7 +1,6 @@
1
1
  @layer components {.FieldError {
2
- display: flex;
3
- align-items: flex-start;
4
- gap: var(--field-error-gap);
2
+ display: grid;
3
+ grid-template-rows: 1fr;
5
4
  padding-inline-start: var(--field-error-padding-inline);
6
5
  color: var(--field-error-color);
7
6
  font-size: var(--field-error-font-size);
@@ -11,10 +10,16 @@
11
10
  margin-top: var(--field-error-margin-top);
12
11
  }.FieldError:last-of-type {
13
12
  margin-bottom: var(--field-error-margin-bottom);
13
+ }.Inner {
14
+ display: flex;
15
+ align-items: flex-start;
16
+ gap: var(--field-error-gap);
17
+ min-height: 0;
18
+ overflow: hidden;
14
19
  }/* The icon keeps its size and sits on the first line; the text wraps, also
15
- inside a long unbroken word, instead of pushing out of the field. */.FieldError > * {
20
+ inside a long unbroken word, instead of pushing out of the field. */.Inner > * {
16
21
  flex-shrink: 0;
17
- }.FieldError > span {
22
+ }.Inner > span {
18
23
  flex-shrink: 1;
19
24
  min-width: 0;
20
25
  overflow-wrap: anywhere;
@@ -24,5 +29,23 @@
24
29
  display: block;
25
30
  align-self: flex-start;
26
31
  margin-block-start: calc((var(--field-error-line-height) - var(--field-error-icon-size)) / 2);
32
+ }/* The room opens first, so what stands below slides down instead of dropping. */@media (prefers-reduced-motion: no-preference) {
33
+ .FieldError {
34
+ animation: open 200ms var(--cubic-enter);
35
+ }
36
+
37
+ .Inner {
38
+ animation: fade-in var(--transition-duration-basic) var(--cubic-enter);
39
+ }
40
+ }@keyframes open {
41
+ from {
42
+ grid-template-rows: 0fr;
43
+ margin-block: 0;
44
+ padding-block: 0;
45
+ }
46
+ }@keyframes fade-in {
47
+ from {
48
+ opacity: 0;
49
+ }
27
50
  }
28
51
  }
@@ -12,7 +12,7 @@
12
12
  border-radius: var(--floating-input-border-radius);
13
13
  line-height: 1.5rem;
14
14
  color: var(--color-text);
15
- font-size: 1rem;
15
+ font-size: var(--floating-input-font-size);
16
16
  width: 100%;
17
17
  border: 1px solid var(--input-state-color, var(--floating-input-border-color));
18
18
  padding: 0 var(--floating-input-gutter);
@@ -51,7 +51,7 @@
51
51
  padding: 1px var(--horizontal-padding);
52
52
  transition: var(--placeholder-transition);
53
53
  color: var(--input-state-color, var(--floating-input-label-color));
54
- font-size: 1rem;
54
+ font-size: var(--floating-input-font-size);
55
55
  line-height: 1;
56
56
  cursor: var(--cursor, text);
57
57
  transform: translate(calc(-1 * var(--horizontal-padding)));
@@ -210,6 +210,35 @@
210
210
  color: var(--color-text-tertiary);
211
211
  }.Textarea:disabled {
212
212
  cursor: not-allowed;
213
+ }/* =============================================
214
+ Shape: the rounded box of the other fields
215
+ ============================================= */.Root:not([data-pill]) {
216
+ --floating-input-border-radius: var(--floating-input-box-radius);
217
+ --floating-input-gutter: var(--floating-input-box-gutter);
218
+ }.Root:not([data-pill]) .FieldFootprint[data-multiline] {
219
+ border-radius: var(--floating-input-border-radius);
220
+ }/* =============================================
221
+ Label inside the box, the value under it
222
+ ============================================= */.Root[data-label-placement="inside"] {
223
+ --floating-input-height: var(--floating-input-inside-height);
224
+ --floating-input-label-scale: var(--floating-input-inside-label-scale);
225
+ --floating-input-label-color: var(--floating-input-inside-label-color);
226
+ --floating-input-label-color-focus: var(--floating-input-inside-label-color);
227
+ }.Root[data-label-placement="inside"] .LabelText {
228
+ --horizontal-padding: 0px;
229
+ background-color: transparent;
230
+ }.Root[data-label-placement="inside"] :is(.FieldFootprint[data-focused], .FieldFootprint[data-invalid], .HasValue) .LabelPositioner {
231
+ transform: translateY(var(--floating-input-inside-label-shift));
232
+ }.Root[data-label-placement="inside"] :is(.Input, .StartAdornment) {
233
+ align-self: stretch;
234
+ padding-top: var(--floating-input-inside-value-shift);
235
+ }/* One line sits as in the single-line field, and the label is one line step above it */.Root[data-label-placement="inside"] .Textarea {
236
+ --half-height: calc(var(--floating-input-height) / 2 - 1px - var(--floating-input-inside-line-height) / 2);
237
+
238
+ line-height: var(--floating-input-inside-line-height);
239
+ padding-block:
240
+ calc(var(--half-height) + var(--floating-input-inside-value-shift) / 2)
241
+ calc(var(--half-height) - var(--floating-input-inside-value-shift) / 2);
213
242
  }/* Reduced motion preference */@media (prefers-reduced-motion: reduce) {
214
243
  .FieldFootprint,
215
244
  .LabelPositioner,
@@ -14,7 +14,7 @@
14
14
  border-radius: var(--floating-input-border-radius);
15
15
  line-height: 1.5rem;
16
16
  color: var(--color-text);
17
- font-size: 1rem;
17
+ font-size: var(--floating-input-font-size);
18
18
  width: 100%;
19
19
  border: 1px solid var(--input-state-color, var(--floating-input-border-color));
20
20
  padding: 0 var(--floating-input-gutter);
@@ -62,7 +62,7 @@
62
62
  padding: 1px var(--horizontal-padding);
63
63
  transition: var(--placeholder-transition);
64
64
  color: var(--input-state-color, var(--floating-input-label-color));
65
- font-size: 1rem;
65
+ font-size: var(--floating-input-font-size);
66
66
  line-height: 1;
67
67
  cursor: var(--cursor, pointer);
68
68
  transform: translate(calc(-1 * var(--horizontal-padding)));
@@ -142,6 +142,25 @@
142
142
  padding-inline-start: var(--floating-input-gutter);
143
143
  }.ErrorMessage:last-child {
144
144
  margin-bottom: 0.5rem;
145
+ }/* =============================================
146
+ Shape: the rounded box of the other fields
147
+ ============================================= */.Root:not([data-pill]) {
148
+ --floating-input-border-radius: var(--floating-input-box-radius);
149
+ --floating-input-gutter: var(--floating-input-box-gutter);
150
+ }/* =============================================
151
+ Label inside the box, the value under it
152
+ ============================================= */.Root[data-label-placement="inside"] {
153
+ --floating-input-height: var(--floating-input-inside-height);
154
+ --floating-input-label-scale: var(--floating-input-inside-label-scale);
155
+ --floating-input-label-color: var(--floating-input-inside-label-color);
156
+ --floating-input-label-color-focus: var(--floating-input-inside-label-color);
157
+ }.Root[data-label-placement="inside"] .LabelText {
158
+ --horizontal-padding: 0px;
159
+ background-color: transparent;
160
+ }.Root[data-label-placement="inside"] :is(.FieldFootprint[data-open], .FieldFootprint[data-invalid], .HasValue) .LabelPositioner {
161
+ transform: translateY(var(--floating-input-inside-label-shift));
162
+ }.Root[data-label-placement="inside"] .Content {
163
+ padding-top: var(--floating-input-inside-value-shift);
145
164
  }/* Reduced motion preference */@media (prefers-reduced-motion: reduce) {
146
165
  .FieldFootprint,
147
166
  .LabelPositioner,
@@ -63,6 +63,12 @@
63
63
  --switch-thumb-width: 39px;
64
64
  --switch-thumb-offset: 2px;
65
65
 
66
+ --floating-input-font-size: 17px;
67
+ --floating-input-inside-height: 60px;
68
+ --floating-input-inside-label-shift: -13px;
69
+ --floating-input-inside-value-shift: 18px;
70
+ --floating-input-inside-line-height: 22px;
71
+
66
72
  --field-row-min-height: 60px;
67
73
  --field-row-padding-block: 8px;
68
74
  --field-row-text-padding-block: 12px;
@@ -235,8 +235,8 @@
235
235
  --field-group-title-line-height: var(--font-text-md-line-height);
236
236
  --field-group-title-font-weight: var(--font-weight-medium);
237
237
  --field-group-title-padding-inline: 0;
238
- --field-group-description-font-size: var(--font-text-xs-size);
239
- --field-group-description-line-height: var(--font-text-xs-line-height);
238
+ --field-group-description-font-size: var(--font-text-sm-size);
239
+ --field-group-description-line-height: var(--font-text-sm-line-height);
240
240
 
241
241
  /* =============================================
242
242
  FloatingLabelInput
@@ -244,6 +244,8 @@
244
244
  --floating-input-height: 3.25rem;
245
245
  --floating-input-gutter: 1.25rem;
246
246
  --floating-input-border-radius: var(--radius-full);
247
+ --floating-input-box-radius: var(--control-radius-xl);
248
+ --floating-input-box-gutter: var(--control-gutter-lg);
247
249
  --floating-input-background: var(--color-surface);
248
250
  --floating-input-border-color-focus: var(--alpha-50);
249
251
  --floating-input-border-color-invalid: var(--color-border-danger-outline);
@@ -251,7 +253,14 @@
251
253
  --floating-input-label-color-focus: var(--color-text);
252
254
  --floating-input-label-color-invalid: var(--color-text-danger-outline);
253
255
  --floating-input-transition-duration: 80ms;
256
+ --floating-input-font-size: 1rem;
254
257
  --floating-input-label-scale: 0.88;
258
+ --floating-input-inside-height: 3.5rem;
259
+ --floating-input-inside-label-scale: 0.75;
260
+ --floating-input-inside-label-color: var(--color-text-secondary);
261
+ --floating-input-inside-label-shift: -0.75rem;
262
+ --floating-input-inside-value-shift: 1rem;
263
+ --floating-input-inside-line-height: 1.25rem;
255
264
 
256
265
  /* =============================================
257
266
  FileUpload
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexui/styles",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Framework-agnostic CSS for Plex UI: design tokens, globals and component styles",
5
5
  "type": "module",
6
6
  "license": "MIT",