@plexui/styles 0.11.1 → 0.12.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.
@@ -0,0 +1,96 @@
1
+ @layer components {/* =============================================
2
+ NavigationRow
3
+ A row of a FieldGroup that opens what it holds, as an iOS 27.2 Settings drill-in (General › Language & Region,
4
+ Mail › Accounts): the label where a row's label starts, its current value at the end in the secondary label, a
5
+ chevron after it in the tertiary one, and the whole row one press. It is a FieldGroup action row (FieldGroup.module.css
6
+ gives it the row's height, inset, type and hover), so it keeps the row's 52 as a minimum and grows with a second
7
+ line under the label, which spaces two lines over 70 on a phone as a subtitle cell does.
8
+ ============================================= */.NavigationRow {
9
+ min-width: 0;
10
+ }/* Twice the class, so the row's box beats the Button's own height and single line */.Pressable.Pressable {
11
+ display: block;
12
+ width: 100%;
13
+ min-width: 0;
14
+ height: auto;
15
+ min-height: var(--field-row-min-height, 52px);
16
+ padding-block: max(
17
+ var(--field-row-text-padding-block, 10px),
18
+ calc((var(--field-row-min-height, 52px) - var(--field-row-label-line-height, 20px)) / 2)
19
+ );
20
+ padding-inline: var(--field-row-padding-inline, var(--button-gutter));
21
+ font-size: var(--field-row-label-font-size, var(--font-text-sm-size));
22
+ font-weight: var(--field-row-label-font-weight, var(--font-weight-medium));
23
+ line-height: var(--field-row-label-line-height, var(--font-text-sm-line-height));
24
+ text-align: start;
25
+ white-space: normal;
26
+ }/* A label with a line under it centres the two lines in the subtitle cell's height */.NavigationRow[data-description] > .Pressable.Pressable {
27
+ padding-block: max(
28
+ var(--field-row-text-padding-block, 10px),
29
+ calc(
30
+ (
31
+ var(--field-row-description-min-height, var(--field-row-min-height, 52px)) -
32
+ var(--field-row-label-line-height, 20px) - var(--field-row-description-line-height, 20px)
33
+ ) /
34
+ 2
35
+ )
36
+ );
37
+ }.Content {
38
+ display: flex;
39
+ align-items: center;
40
+ gap: var(--field-row-disclosure-gap, 8px);
41
+ width: 100%;
42
+ min-width: 0;
43
+ }.Text {
44
+ display: flex;
45
+ flex: 1 1 auto;
46
+ flex-direction: column;
47
+ min-width: 0;
48
+ }/* The label's words break only when one is wider than the row */.Label,
49
+ .Description {
50
+ min-width: 0;
51
+ overflow-wrap: break-word;
52
+ }/* The label in the text color, as a Settings row's, not a secondary button's gray */.Label {
53
+ color: var(--navigation-row-label-color, var(--color-text));
54
+ }.Description {
55
+ color: var(--field-description-color, var(--mobile-label-secondary, var(--color-text-secondary)));
56
+ font-size: var(--field-row-description-font-size, var(--font-text-sm-size));
57
+ font-weight: var(--font-weight-normal);
58
+ line-height: var(--field-row-description-line-height, var(--font-text-sm-line-height));
59
+ }/* The value keeps the row's gap from the label, and the disclosure's gap from the chevron. A short value keeps its
60
+ width (it never breaks inside a word to make room); a long one stops at 60% of the row and wraps there, so the
61
+ label and the chevron keep their room (Codex 15.11). */.Value {
62
+ flex: 0 0 auto;
63
+ min-width: 0;
64
+ max-width: var(--navigation-row-value-max-width, 60%);
65
+ margin-inline-start: calc(var(--field-row-gap, 24px) - var(--field-row-disclosure-gap, 8px));
66
+ color: var(--navigation-row-value-color, var(--mobile-label-secondary, var(--color-text-secondary)));
67
+ font-weight: var(--font-weight-normal);
68
+ overflow-wrap: anywhere;
69
+ text-align: end;
70
+ }/* chevron.forward of a drill-in: a 20 glyph box whose drawn chevron ends at the row's inset, lighter than the value
71
+ (iOS IMG_5512: the value at 138 on white, its chevron at 197) */.Pressable .Disclosure {
72
+ display: block;
73
+ flex-shrink: 0;
74
+ width: 20px;
75
+ height: 20px;
76
+ margin-inline: -5px;
77
+ color: var(--navigation-row-disclosure-color, var(--mobile-label-tertiary, var(--color-text-tertiary)));
78
+ }/* chevron.forward points to the trailing edge, so it turns in a right-to-left row */.Pressable:dir(rtl) .Disclosure {
79
+ transform: scaleX(-1);
80
+ }/* A disabled row greys all of it, as the Button greys its label */.Pressable[data-disabled] :is(.Label, .Description, .Value, .Disclosure) {
81
+ color: inherit;
82
+ }/* With FieldGroup columns the value takes the control column, in the text color, as a Field's value does *//* The columns of a Field row: 16 between the label column and the value on every width (Field.module.css) */[data-field-columns] .NavigationRow {
83
+ --field-row-gap: 16px;
84
+ }[data-field-columns] .Content {
85
+ display: grid;
86
+ grid-template-columns: var(--field-row-column-width) minmax(0, 1fr) auto;
87
+ gap: 0;
88
+ }[data-field-columns] .Value {
89
+ max-width: none;
90
+ margin-inline: var(--field-row-gap, 24px) var(--field-row-disclosure-gap, 8px);
91
+ color: var(--navigation-row-value-color, var(--color-text));
92
+ text-align: start;
93
+ }[data-field-columns] .NavigationRow:not([data-value]) .Text {
94
+ grid-column: 1 / 3;
95
+ }
96
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexui/styles",
3
- "version": "0.11.1",
3
+ "version": "0.12.0",
4
4
  "description": "Framework-agnostic CSS for Plex UI: design tokens, globals and component styles",
5
5
  "type": "module",
6
6
  "license": "MIT",