@plexui/styles 0.16.3 → 0.16.5
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/dist/es/components/Field/Field.module.css +10 -8
- package/dist/es/components/MarkdownEditor/MarkdownEditor.module.css +16 -0
- package/dist/es/components/NavigationRow/NavigationRow.module.css +57 -0
- package/dist/es/components/Progress/Progress.module.css +1 -1
- package/dist/es/components/StatsCard/StatsCard.module.css +7 -3
- package/dist/es/styles/variables-components.css +5 -0
- package/package.json +1 -1
|
@@ -417,13 +417,14 @@
|
|
|
417
417
|
color: var(--mobile-label-tertiary, var(--color-text-disabled));
|
|
418
418
|
}
|
|
419
419
|
|
|
420
|
-
/* A disabled text field in a row
|
|
421
|
-
|
|
422
|
-
|
|
420
|
+
/* A disabled text field in a row dims only its value, as iOS shows a value that cannot be changed: the label
|
|
421
|
+
keeps its color (owner 19.11). A row that is unavailable as a whole, as a gray row
|
|
422
|
+
of iOS Settings, opts in with data-disabled on the Field: its label and description dim too. */
|
|
423
|
+
.Field:where([data-row][data-disabled]) {
|
|
423
424
|
--field-description-color: var(--mobile-label-quaternary, var(--color-text-disabled));
|
|
424
425
|
}
|
|
425
426
|
|
|
426
|
-
.Field:where([data-row]
|
|
427
|
+
.Field:where([data-row][data-disabled]) > .LabelGroup .Label {
|
|
427
428
|
color: var(--mobile-label-tertiary, var(--color-text-disabled));
|
|
428
429
|
}
|
|
429
430
|
|
|
@@ -832,13 +833,14 @@
|
|
|
832
833
|
color: var(--mobile-label-tertiary, var(--color-text-disabled));
|
|
833
834
|
}
|
|
834
835
|
|
|
835
|
-
/* A disabled text field in a row
|
|
836
|
-
|
|
837
|
-
|
|
836
|
+
/* A disabled text field in a row dims only its value, as iOS shows a value that cannot be changed: the label
|
|
837
|
+
keeps its color (owner 19.11). A row that is unavailable as a whole, as a gray row
|
|
838
|
+
of iOS Settings, opts in with data-disabled on the Field: its label and description dim too. */
|
|
839
|
+
:where([data-plex-layout="phone"]) .Field:where([data-row][data-disabled]) {
|
|
838
840
|
--field-description-color: var(--mobile-label-quaternary, var(--color-text-disabled));
|
|
839
841
|
}
|
|
840
842
|
|
|
841
|
-
:where([data-plex-layout="phone"]) .Field:where([data-row]
|
|
843
|
+
:where([data-plex-layout="phone"]) .Field:where([data-row][data-disabled]) > .LabelGroup .Label {
|
|
842
844
|
color: var(--mobile-label-tertiary, var(--color-text-disabled));
|
|
843
845
|
}
|
|
844
846
|
|
|
@@ -167,6 +167,13 @@ background-color: rgba(255, 255, 255, 0.1);
|
|
|
167
167
|
flex-direction: column;
|
|
168
168
|
gap: 16px;
|
|
169
169
|
}@media (max-width: 767px) {
|
|
170
|
+
/* On a phone the editor is a card of the grouped form, with the corners of a FieldGroup (26), not a desktop
|
|
171
|
+
control's 8; its format buttons are round, as every button of the phone kit (--button-touch-radius), so a
|
|
172
|
+
pressed or active one lights a circle, not a small square (owner 19.11). */
|
|
173
|
+
.Container {
|
|
174
|
+
border-radius: var(--field-group-radius, 26px);
|
|
175
|
+
}
|
|
176
|
+
|
|
170
177
|
.ToolbarGroup {
|
|
171
178
|
overflow-x: auto;
|
|
172
179
|
overscroll-behavior-x: contain;
|
|
@@ -178,8 +185,16 @@ background-color: rgba(255, 255, 255, 0.1);
|
|
|
178
185
|
width: 44px;
|
|
179
186
|
height: 44px;
|
|
180
187
|
flex-shrink: 0;
|
|
188
|
+
border-radius: var(--button-touch-radius, var(--radius-full));
|
|
181
189
|
}
|
|
182
190
|
}
|
|
191
|
+
/* On a phone the editor is a card of the grouped form, with the corners of a FieldGroup (26), not a desktop
|
|
192
|
+
control's 8; its format buttons are round, as every button of the phone kit (--button-touch-radius), so a
|
|
193
|
+
pressed or active one lights a circle, not a small square (owner 19.11). */
|
|
194
|
+
:where([data-plex-layout="phone"]) .Container {
|
|
195
|
+
border-radius: var(--field-group-radius, 26px);
|
|
196
|
+
}
|
|
197
|
+
|
|
183
198
|
:where([data-plex-layout="phone"]) .ToolbarGroup {
|
|
184
199
|
overflow-x: auto;
|
|
185
200
|
overscroll-behavior-x: contain;
|
|
@@ -191,5 +206,6 @@ background-color: rgba(255, 255, 255, 0.1);
|
|
|
191
206
|
width: 44px;
|
|
192
207
|
height: 44px;
|
|
193
208
|
flex-shrink: 0;
|
|
209
|
+
border-radius: var(--button-touch-radius, var(--radius-full));
|
|
194
210
|
}
|
|
195
211
|
}
|
|
@@ -40,6 +40,30 @@
|
|
|
40
40
|
gap: var(--field-row-disclosure-gap, 8px);
|
|
41
41
|
width: 100%;
|
|
42
42
|
min-width: 0;
|
|
43
|
+
}/* What leads the row (an Avatar, a symbol, a picture), as iOS Find My's People list: a column of its own before the
|
|
44
|
+
text, 12 before the label; the line above the row starts where the text does. It stands on the label's first line,
|
|
45
|
+
not the row's centre, so a text of three lines keeps it beside the title (SwiftUI's Label in a List, Mail): a symbol
|
|
46
|
+
no taller than the line is centred on it, a taller avatar starts at its top. The text starts at the top too, at
|
|
47
|
+
least as tall as the column (--navigation-row-leading-size, the leading's own size: 28 for a symbol) and centred
|
|
48
|
+
in it, so a text shorter than an avatar stays centred beside it and a value taller than both moves neither. The
|
|
49
|
+
chevron stays centred, as a UIKit accessory. */.Leading {
|
|
50
|
+
display: flex;
|
|
51
|
+
flex: none;
|
|
52
|
+
align-self: start;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
min-width: var(--navigation-row-leading-size);
|
|
56
|
+
min-height: var(--field-row-label-line-height, var(--font-text-sm-line-height));
|
|
57
|
+
margin-inline-end: calc(var(--navigation-row-leading-gap) - var(--field-row-disclosure-gap, 8px));
|
|
58
|
+
}.NavigationRow[data-leading] .Text {
|
|
59
|
+
align-self: start;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
min-height: var(--navigation-row-leading-size);
|
|
62
|
+
}.NavigationRow[data-leading] {
|
|
63
|
+
--field-group-separator-inset-start: calc(
|
|
64
|
+
var(--field-row-padding-inline, var(--button-gutter)) + var(--navigation-row-leading-size) +
|
|
65
|
+
var(--navigation-row-leading-gap)
|
|
66
|
+
);
|
|
43
67
|
}.Text {
|
|
44
68
|
display: flex;
|
|
45
69
|
flex: 1 1 auto;
|
|
@@ -126,5 +150,38 @@
|
|
|
126
150
|
}.NavigationRow[data-measuring] :is(.Label, .Value) {
|
|
127
151
|
overflow: hidden;
|
|
128
152
|
white-space: nowrap;
|
|
153
|
+
}/* A leading column keeps its own column in the grids: before the label column with FieldGroup columns, and spanning
|
|
154
|
+
the lines when the value stands below the label *//* With FieldGroup columns the leading column comes out of the label column, so the values keep the group's control
|
|
155
|
+
column; the grid has no gap there, so the leading keeps its whole gap to the text */[data-field-columns] .NavigationRow[data-leading] .Content {
|
|
156
|
+
grid-template-columns:
|
|
157
|
+
auto
|
|
158
|
+
max(0px, calc(var(--field-row-column-width) - var(--navigation-row-leading-size) - var(--navigation-row-leading-gap)))
|
|
159
|
+
minmax(0, 1fr)
|
|
160
|
+
auto;
|
|
161
|
+
}[data-field-columns] .NavigationRow[data-leading]:not([data-value-below]) .Leading {
|
|
162
|
+
margin-inline-end: var(--navigation-row-leading-gap);
|
|
163
|
+
}[data-field-columns] .NavigationRow[data-leading]:not([data-value]) .Text {
|
|
164
|
+
grid-column: 2 / 4;
|
|
165
|
+
}.NavigationRow[data-value-below][data-leading] .Content {
|
|
166
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
167
|
+
}.NavigationRow[data-value-below][data-leading] .Leading {
|
|
168
|
+
grid-area: 1 / 1 / span 3 / 2;
|
|
169
|
+
}.NavigationRow[data-value-below][data-leading] .Label {
|
|
170
|
+
grid-area: 1 / 2;
|
|
171
|
+
}.NavigationRow[data-value-below][data-leading] .Value {
|
|
172
|
+
grid-area: 2 / 2;
|
|
173
|
+
}.NavigationRow[data-value-below][data-leading] .Description {
|
|
174
|
+
grid-area: 3 / 2;
|
|
175
|
+
}.NavigationRow[data-value-below][data-leading] .Disclosure {
|
|
176
|
+
grid-area: 1 / 3 / span 2 / 4;
|
|
177
|
+
}.NavigationRow[data-value-below][data-leading][data-description] .Disclosure {
|
|
178
|
+
grid-row: 1 / span 3;
|
|
179
|
+
}/* Without a chevron (`disclosure={false}`) the value ends at the row's inset: no gap is kept for the chevron */[data-field-columns] .NavigationRow[data-disclosure="none"] .Value {
|
|
180
|
+
margin-inline-end: 0;
|
|
181
|
+
}.NavigationRow[data-value-below][data-disclosure="none"] .Content {
|
|
182
|
+
-moz-column-gap: 0;
|
|
183
|
+
column-gap: 0;
|
|
184
|
+
}/* There the leading keeps its whole gap to the text, which no grid gap adds */.NavigationRow[data-value-below][data-disclosure="none"][data-leading] .Leading {
|
|
185
|
+
margin-inline-end: var(--navigation-row-leading-gap);
|
|
129
186
|
}
|
|
130
187
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
border-radius: var(--progress-radius);
|
|
8
8
|
/* Prevent accidental clipping of the translateX indicator */
|
|
9
9
|
transform: translateZ(0);
|
|
10
|
-
}.Indicator {
|
|
10
|
+
}/* Thickness: sm is iOS's 4pt progress view, md and lg a bar in a card (Apple Fitness) */.Root[data-size="md"] { --progress-height: var(--progress-height-md); }.Root[data-size="lg"] { --progress-height: var(--progress-height-lg); }/* The filled part's color; a segmented bar's parts set their own */.Root[data-color="secondary"] { --progress-indicator-color: var(--color-background-secondary-solid); }.Root[data-color="success"] { --progress-indicator-color: var(--color-background-success-solid); }.Root[data-color="warning"] { --progress-indicator-color: var(--color-background-warning-solid); }.Root[data-color="caution"] { --progress-indicator-color: var(--color-background-caution-solid); }.Root[data-color="danger"] { --progress-indicator-color: var(--color-background-danger-solid); }.Root[data-color="info"] { --progress-indicator-color: var(--color-background-info-solid); }.Root[data-color="discovery"] { --progress-indicator-color: var(--color-background-discovery-solid); }.Indicator {
|
|
11
11
|
width: 100%;
|
|
12
12
|
height: 100%;
|
|
13
13
|
background: var(--progress-indicator-color);
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.StatsCard:where([data-size="sm"]) .Value {
|
|
33
|
-
font-size: var(--stats-card-sm-value-font-size);
|
|
33
|
+
font-size: calc(var(--stats-card-sm-value-font-size) * var(--stats-card-value-scale, 1));
|
|
34
34
|
line-height: var(--font-heading-md-line-height);
|
|
35
35
|
letter-spacing: var(--font-heading-md-tracking);
|
|
36
36
|
}
|
|
@@ -193,10 +193,14 @@
|
|
|
193
193
|
margin-block-start: calc(var(--spacing) * 1);
|
|
194
194
|
font-size: var(--stats-card-description-font-size);
|
|
195
195
|
line-height: var(--font-text-sm-line-height);
|
|
196
|
-
}.
|
|
196
|
+
}/* One line: a value wider than the card scales down to fit (StatsCard writes --stats-card-value-scale, down to 0.5,
|
|
197
|
+
as iOS's minimumScaleFactor) and past that ends in an ellipsis; the line keeps its height, so cards a row line up */.Value {
|
|
197
198
|
min-width: 0;
|
|
199
|
+
overflow: hidden;
|
|
200
|
+
text-overflow: ellipsis;
|
|
201
|
+
white-space: nowrap;
|
|
198
202
|
color: var(--stats-card-value-color);
|
|
199
|
-
font-size: var(--stats-card-value-font-size);
|
|
203
|
+
font-size: calc(var(--stats-card-value-font-size) * var(--stats-card-value-scale, 1));
|
|
200
204
|
font-weight: var(--stats-card-value-font-weight);
|
|
201
205
|
line-height: var(--font-heading-xl-line-height);
|
|
202
206
|
letter-spacing: var(--font-heading-xl-tracking);
|
|
@@ -133,6 +133,8 @@
|
|
|
133
133
|
Progress
|
|
134
134
|
============================================= */
|
|
135
135
|
--progress-height: 4px;
|
|
136
|
+
--progress-height-md: 6px;
|
|
137
|
+
--progress-height-lg: 8px;
|
|
136
138
|
--progress-radius: var(--radius-full);
|
|
137
139
|
--progress-track-color: var(--color-background-secondary-soft);
|
|
138
140
|
--progress-indicator-color: var(--color-text);
|
|
@@ -301,6 +303,9 @@
|
|
|
301
303
|
--field-row-icon-size: 32px;
|
|
302
304
|
--field-row-icon-gap: 12px;
|
|
303
305
|
--field-row-icon-offset: 0px;
|
|
306
|
+
/* NavigationRow `leading` (an Avatar): its column and the gap to the text, as iOS Find My's People list */
|
|
307
|
+
--navigation-row-leading-size: 40px;
|
|
308
|
+
--navigation-row-leading-gap: 12px;
|
|
304
309
|
--field-row-picture-offset: 0px;
|
|
305
310
|
--field-row-picture-gap: 12px;
|
|
306
311
|
--field-row-icon-symbol-size: 20px;
|