@plexui/styles 0.16.7 → 0.17.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/dist/es/components/Accordion/Accordion.module.css +74 -12
- package/dist/es/components/Alert/Alert.module.css +196 -0
- package/dist/es/components/Breadcrumb/Breadcrumb.module.css +32 -1
- package/dist/es/components/Button/Button.module.css +483 -5
- package/dist/es/components/Button/NavigationButton.module.css +195 -0
- package/dist/es/components/Checkbox/Checkbox.module.css +246 -0
- package/dist/es/components/CodeBlock/CodeBlock.module.css +15 -1
- package/dist/es/components/DatePicker/Calendar.module.css +216 -0
- package/dist/es/components/DatePicker/CalendarNavigationIcon.module.css +19 -0
- package/dist/es/components/DateRangePicker/Calendar.module.css +200 -0
- package/dist/es/components/DateRangePicker/Trigger.module.css +15 -1
- package/dist/es/components/Dialog/Dialog.module.css +456 -0
- package/dist/es/components/Field/Field.module.css +713 -0
- package/dist/es/components/FieldGroup/FieldGroup.module.css +272 -0
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.module.css +49 -0
- package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.module.css +81 -0
- package/dist/es/components/Input/Input.module.css +184 -0
- package/dist/es/components/InputGroup/InputGroup.module.css +17 -0
- package/dist/es/components/MarkdownEditor/MarkdownEditor.module.css +60 -0
- package/dist/es/components/Menu/Menu.module.css +244 -0
- package/dist/es/components/NavigationRow/NavigationRow.module.css +82 -0
- package/dist/es/components/Page/Page.module.css +278 -0
- package/dist/es/components/PageControl/PageControl.module.css +35 -0
- package/dist/es/components/Popover/Popover.module.css +20 -0
- package/dist/es/components/RadioGroup/RadioGroup.module.css +151 -0
- package/dist/es/components/Select/Select.module.css +315 -0
- package/dist/es/components/SelectControl/SelectControl.module.css +104 -0
- package/dist/es/components/Sidebar/Sidebar.module.css +169 -0
- package/dist/es/components/Skeleton/Skeleton.module.css +50 -0
- package/dist/es/components/Slider/Slider.module.css +12 -1
- package/dist/es/components/Switch/Switch.module.css +143 -0
- package/dist/es/components/TabBar/TabBar.module.css +354 -0
- package/dist/es/components/Tabs/Tabs.module.css +162 -0
- package/dist/es/components/Tip/Tip.module.css +225 -0
- package/dist/es/components/Toast/Toast.module.css +207 -0
- package/dist/es/components/Toolbar/Toolbar.module.css +1542 -0
- package/dist/es/components/Tooltip/Tooltip.module.css +44 -0
- package/dist/es/styles/android.css +882 -0
- package/dist/es/styles/touch.css +672 -0
- package/dist/es/styles/variables-components.css +4 -0
- package/dist/es/styles/variables-semantic.css +28 -0
- package/dist/es/tokens/resolve.js +2 -0
- package/dist/es/tokens/resolve.js.map +1 -1
- package/dist/es/tokens/tokens.generated.js +64 -10
- package/dist/es/tokens/tokens.generated.js.map +1 -1
- package/dist/types/tokens/resolve.d.ts +2 -0
- package/package.json +1 -1
|
@@ -40,5 +40,200 @@
|
|
|
40
40
|
|
|
41
41
|
:where([data-plex-layout="phone"]) .NavigationButton[data-navigation-action="confirm"] {
|
|
42
42
|
--navigation-button-icon-size: var(--navigation-button-confirm-icon-size);
|
|
43
|
+
}/* The Plex Android look (`data-platform="android"`, android.css): Material's glyphs at 24px, as @plexui/react-native
|
|
44
|
+
draws them on Android: `arrow_back` (mirrored right to left, above), `close` and `check`. The path data replaces
|
|
45
|
+
each glyph's own in its viewBox: back and confirm on a 24 grid, close on the 20 grid of its box. */@media (max-width: 767px) {
|
|
46
|
+
[data-platform="android"] .NavigationGlyph {
|
|
47
|
+
width: 24px;
|
|
48
|
+
height: 24px;
|
|
43
49
|
}
|
|
50
|
+
|
|
51
|
+
[data-platform="android"] .NavigationGlyph[data-navigation-glyph="back"] path {
|
|
52
|
+
d: path("M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z");
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
[data-platform="android"] .NavigationGlyph[data-navigation-glyph="close"] path {
|
|
56
|
+
d: path("M5.333 15.833l-1.167-1.167 4.667-4.666-4.667-4.667 1.167-1.166 4.667 4.666 4.666-4.666 1.167 1.166-4.667 4.667 4.667 4.666-1.167 1.167-4.666-4.667z");
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[data-platform="android"] .NavigationGlyph[data-navigation-glyph="confirm"] path {
|
|
60
|
+
d: path("M9.55 18l-5.7-5.7 1.425-1.425 4.275 4.275 9.175-9.175 1.425 1.425z");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .NavigationGlyph {
|
|
64
|
+
width: 24px;
|
|
65
|
+
height: 24px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .NavigationGlyph[data-navigation-glyph="back"] path {
|
|
69
|
+
d: path("M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z");
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .NavigationGlyph[data-navigation-glyph="close"] path {
|
|
73
|
+
d: path("M5.333 15.833l-1.167-1.167 4.667-4.666-4.667-4.667 1.167-1.166 4.667 4.666 4.666-4.666 1.167 1.166-4.667 4.667 4.667 4.666-1.167 1.167-4.666-4.667z");
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .NavigationGlyph[data-navigation-glyph="confirm"] path {
|
|
77
|
+
d: path("M9.55 18l-5.7-5.7 1.425-1.425 4.275 4.275 9.175-9.175 1.425 1.425z");
|
|
78
|
+
}/* The Plex Android look: confirm in a top bar (a page's, a Toolbar's, a sheet's) is the bar's glass text pill, not a
|
|
79
|
+
check: 46 tall, 16 at its sides, at least 46 wide, its label 15/20 medium (the reference's "bold" face) in the text
|
|
80
|
+
color, cut short with an ellipsis past 160px (a safety net: the label is one short word); disabled, the label at
|
|
81
|
+
38%. It needs no markup of its own: the label is drawn from `data-navigation-label` (the button's `label`, "Done"
|
|
82
|
+
by default; never the accessible name, which can be long), and the focus ring moves onto the button. A confirm in
|
|
83
|
+
a bottom bar keeps its circle. */@media (max-width: 767px) {
|
|
84
|
+
[data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *) {
|
|
85
|
+
--button-size: var(--navigation-button-size, 46px);
|
|
86
|
+
--button-gutter: 16px;
|
|
87
|
+
--button-background-color: var(--android-bar-glass);
|
|
88
|
+
--button-background-color-hover: var(--android-bar-glass);
|
|
89
|
+
--button-background-color-active: var(--android-bar-glass);
|
|
90
|
+
--button-text-color: var(--color-text);
|
|
91
|
+
--button-text-color-hover: var(--color-text);
|
|
92
|
+
--button-mobile-material-backdrop-filter: var(--mobile-glass-backdrop-filter);
|
|
93
|
+
display: inline-flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
width: auto;
|
|
97
|
+
min-width: var(--button-size);
|
|
98
|
+
height: var(--button-size);
|
|
99
|
+
padding-inline: var(--button-gutter);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
[data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *)::before {
|
|
103
|
+
background-image: none;
|
|
104
|
+
box-shadow: var(--android-bar-shadow);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
[data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *) > span:has(> .NavigationGlyph) {
|
|
108
|
+
display: none;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
[data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *)::after {
|
|
112
|
+
position: relative;
|
|
113
|
+
inset: auto;
|
|
114
|
+
display: block;
|
|
115
|
+
max-width: 160px;
|
|
116
|
+
overflow: hidden;
|
|
117
|
+
content: attr(data-navigation-label);
|
|
118
|
+
font-size: 15px;
|
|
119
|
+
/* The reference's "bold" is its medium face (weight 500), as its titles are */
|
|
120
|
+
font-weight: var(--font-weight-medium);
|
|
121
|
+
line-height: 20px;
|
|
122
|
+
text-overflow: ellipsis;
|
|
123
|
+
white-space: nowrap;
|
|
124
|
+
transform: none;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
[data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *):focus-visible:not([data-menu-pointer-focus]) {
|
|
128
|
+
outline: 2px solid var(--button-ring-color, var(--color-ring));
|
|
129
|
+
outline-offset: 2px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
[data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *):focus-visible:not([data-menu-pointer-focus])::after {
|
|
133
|
+
outline: none;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
[data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *)[data-disabled] {
|
|
137
|
+
--button-background-color: var(--android-bar-glass);
|
|
138
|
+
--button-text-color: var(--android-bar-disabled);
|
|
139
|
+
opacity: 1;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *) {
|
|
143
|
+
--button-size: var(--navigation-button-size, 46px);
|
|
144
|
+
--button-gutter: 16px;
|
|
145
|
+
--button-background-color: var(--android-bar-glass);
|
|
146
|
+
--button-background-color-hover: var(--android-bar-glass);
|
|
147
|
+
--button-background-color-active: var(--android-bar-glass);
|
|
148
|
+
--button-text-color: var(--color-text);
|
|
149
|
+
--button-text-color-hover: var(--color-text);
|
|
150
|
+
--button-mobile-material-backdrop-filter: var(--mobile-glass-backdrop-filter);
|
|
151
|
+
display: inline-flex;
|
|
152
|
+
align-items: center;
|
|
153
|
+
justify-content: center;
|
|
154
|
+
width: auto;
|
|
155
|
+
min-width: var(--button-size);
|
|
156
|
+
height: var(--button-size);
|
|
157
|
+
padding-inline: var(--button-gutter);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *)::before {
|
|
161
|
+
background-image: none;
|
|
162
|
+
box-shadow: var(--android-bar-shadow);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *) > span:has(> .NavigationGlyph) {
|
|
166
|
+
display: none;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *)::after {
|
|
170
|
+
position: relative;
|
|
171
|
+
inset: auto;
|
|
172
|
+
display: block;
|
|
173
|
+
max-width: 160px;
|
|
174
|
+
overflow: hidden;
|
|
175
|
+
content: attr(data-navigation-label);
|
|
176
|
+
font-size: 15px;
|
|
177
|
+
/* The reference's "bold" is its medium face (weight 500), as its titles are */
|
|
178
|
+
font-weight: var(--font-weight-medium);
|
|
179
|
+
line-height: 20px;
|
|
180
|
+
text-overflow: ellipsis;
|
|
181
|
+
white-space: nowrap;
|
|
182
|
+
transform: none;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *):focus-visible:not([data-menu-pointer-focus]) {
|
|
186
|
+
outline: 2px solid var(--button-ring-color, var(--color-ring));
|
|
187
|
+
outline-offset: 2px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *):focus-visible:not([data-menu-pointer-focus])::after {
|
|
191
|
+
outline: none;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *)[data-disabled] {
|
|
195
|
+
--button-background-color: var(--android-bar-glass);
|
|
196
|
+
--button-text-color: var(--android-bar-disabled);
|
|
197
|
+
opacity: 1;
|
|
198
|
+
}/* Android press ripple. Back, close and a bottom bar's confirm ripple in their glass circle as the reference's
|
|
199
|
+
BackButtonView, in the list selector (android.css, Android press ripple): a circle round the center 4 inside the
|
|
200
|
+
glass (19 in a 46 circle; the reference's 20 is a point wider), as a capsule's symbols do in their slots (Toolbar),
|
|
201
|
+
so every glass control of a bar shows its ink the same way. The confirm pill of a top bar ripples over its glass
|
|
202
|
+
(::before) in a pill 4 inside it, as the circles (its ::after is its label), with no flat fill: the ripple is its
|
|
203
|
+
whole press. */@media (max-width: 767px) {
|
|
204
|
+
[data-platform="android"] .NavigationButton[data-navigation-action][data-uniform] {
|
|
205
|
+
--android-ripple-radius: 19px;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* The pill is no circle: its ripple fills the pill (the reference's rad selector), not 20px round its center */
|
|
209
|
+
[data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *) {
|
|
210
|
+
--android-ripple-radius: initial;
|
|
211
|
+
}
|
|
212
|
+
[data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *):not([data-disabled])[data-ripple]::before {
|
|
213
|
+
border: 4px solid transparent;
|
|
214
|
+
background-image: var(--android-ripple-image), none;
|
|
215
|
+
background-clip: padding-box, border-box;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
[data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *):not([data-disabled])[data-ripple]::after {
|
|
219
|
+
background-image: none;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .NavigationButton[data-navigation-action][data-uniform] {
|
|
223
|
+
--android-ripple-radius: 19px;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* The pill is no circle: its ripple fills the pill (the reference's rad selector), not 20px round its center */
|
|
227
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *) {
|
|
228
|
+
--android-ripple-radius: initial;
|
|
229
|
+
}
|
|
230
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *):not([data-disabled])[data-ripple]::before {
|
|
231
|
+
border: 4px solid transparent;
|
|
232
|
+
background-image: var(--android-ripple-image), none;
|
|
233
|
+
background-clip: padding-box, border-box;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .NavigationButton[data-navigation-action="confirm"]:not([data-toolbar][data-placement="bottom"] *):not([data-disabled])[data-ripple]::after {
|
|
237
|
+
background-image: none;
|
|
238
|
+
}
|
|
44
239
|
}
|
|
@@ -210,5 +210,251 @@
|
|
|
210
210
|
|
|
211
211
|
[data-disabled] .Description {
|
|
212
212
|
cursor: not-allowed;
|
|
213
|
+
}/* The Plex Android checkbox: a 20 circle in a 48 target, a 1.5 outline of a light gray, filled when checked with
|
|
214
|
+
the selection color (--checkbox-checked-background, the accent solid unless a page sets it, as Android draws
|
|
215
|
+
every chosen control in its accent; the error when invalid), the mark a 2px check with round ends in the fill's
|
|
216
|
+
own text color (a dash when indeterminate). A ghost checkbox is the same circle, as Android has no checkmark
|
|
217
|
+
alone: filled with the tint its page gave the checkmark (--checkbox-ghost-check-color), else as a solid one. The
|
|
218
|
+
target reaches past the circle without taking room: the circle keeps the edge of its line and the label starts 11
|
|
219
|
+
after it, its first line centered on the circle. The label is 16/24, a description 14/20; disabled, both fade to
|
|
220
|
+
half. (A row's checkbox leads its row: Field.) */@media (max-width: 767px) {
|
|
221
|
+
[data-platform="android"] .Container {
|
|
222
|
+
--android-checkbox-ease: cubic-bezier(0.37, 0, 0.63, 1);
|
|
223
|
+
--checkbox-target-size: 48px;
|
|
224
|
+
--checkbox-target-offset: 0px;
|
|
225
|
+
--checkbox-indicator-size: 20px;
|
|
226
|
+
--checkbox-border-width: 1.5px;
|
|
227
|
+
--checkbox-radius: var(--radius-full);
|
|
228
|
+
--checkbox-label-inset: 12px;
|
|
229
|
+
--checkbox-label-gap: 0px;
|
|
230
|
+
--checkbox-label-font-size: 16px;
|
|
231
|
+
--checkbox-label-line-height: 24px;
|
|
232
|
+
--checkbox-description-font-size: 14px;
|
|
233
|
+
--checkbox-description-line-height: 20px;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
[data-platform="android"] .Checkbox {
|
|
237
|
+
--android-checkbox-fill: var(--checkbox-checked-background, var(--color-background-accent-solid));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
[data-platform="android"] .Checkbox[data-variant="ghost"] {
|
|
241
|
+
--android-checkbox-fill: var(--checkbox-ghost-check-color, var(--checkbox-checked-background, var(--color-background-accent-solid)));
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
[data-platform="android"] .Checkbox[aria-invalid="true"] {
|
|
245
|
+
--android-checkbox-fill: var(--input-border-color-invalid);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
[data-platform="android"] .Checkbox:not([data-state="checked"], [data-state="indeterminate"], [aria-invalid="true"]) {
|
|
249
|
+
--checkbox-paint-border-color: var(--android-checkbox-ring);
|
|
250
|
+
--checkbox-paint-background: transparent;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
[data-platform="android"] .Checkbox[data-variant="ghost"][aria-invalid="true"] {
|
|
254
|
+
--checkbox-paint-border-color: var(--input-border-color-invalid);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
[data-platform="android"] .Checkbox:is([data-state="checked"], [data-state="indeterminate"]):is(*, [data-variant][aria-invalid]) {
|
|
258
|
+
--checkbox-paint-border-color: var(--android-checkbox-fill);
|
|
259
|
+
--checkbox-paint-background: var(--android-checkbox-fill);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* In a list row an error is the line under the row (Field): the checkbox keeps its ring and its fill */
|
|
263
|
+
[data-platform="android"] :where([data-row]) .Checkbox[aria-invalid="true"] {
|
|
264
|
+
--android-checkbox-fill: var(--checkbox-checked-background, var(--color-background-accent-solid));
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
[data-platform="android"] :where([data-row]) .Checkbox[aria-invalid="true"][data-variant="ghost"] {
|
|
268
|
+
--android-checkbox-fill: var(--checkbox-ghost-check-color, var(--checkbox-checked-background, var(--color-background-accent-solid)));
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
[data-platform="android"] :where([data-row]) .Checkbox[aria-invalid="true"]:not([data-state="checked"], [data-state="indeterminate"]) {
|
|
272
|
+
--checkbox-paint-border-color: var(--android-checkbox-ring);
|
|
273
|
+
--checkbox-paint-background: transparent;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
[data-platform="android"] .IndicatorBox {
|
|
277
|
+
transition:
|
|
278
|
+
border-color 150ms var(--android-checkbox-ease),
|
|
279
|
+
background-color 150ms var(--android-checkbox-ease);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
[data-platform="android"] :is(.CheckMark, .GhostMark) {
|
|
283
|
+
inset: calc(-1 * var(--checkbox-border-width));
|
|
284
|
+
color: var(--checkbox-checkmark-color, var(--color-text-accent-solid));
|
|
285
|
+
clip-path: inset(0);
|
|
286
|
+
transition:
|
|
287
|
+
opacity 150ms var(--android-checkbox-ease),
|
|
288
|
+
clip-path 150ms var(--android-checkbox-ease) 150ms;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
[data-platform="android"] :is(.CheckMark, .GhostMark) > svg {
|
|
292
|
+
display: none;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
[data-platform="android"] :is(.CheckMark, .GhostMark)::before {
|
|
296
|
+
width: 20px;
|
|
297
|
+
height: 20px;
|
|
298
|
+
background-color: currentcolor;
|
|
299
|
+
content: "";
|
|
300
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.2 11l3 3 6.6-6.6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
|
|
301
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.2 11l3 3 6.6-6.6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
[data-platform="android"] .Checkbox[aria-invalid="true"]:not(:where([data-row] *)) :is(.CheckMark, .GhostMark) {
|
|
305
|
+
color: var(--color-text-danger-solid, var(--white));
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
[data-platform="android"] .Checkbox[data-state="indeterminate"] :is(.CheckMark, .GhostMark)::before {
|
|
309
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10h8' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
310
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10h8' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
[data-platform="android"] .Checkbox[data-state="unchecked"] :is(.CheckMark, .GhostMark) {
|
|
314
|
+
opacity: 0;
|
|
315
|
+
clip-path: inset(0 100% 0 0);
|
|
316
|
+
transition:
|
|
317
|
+
opacity 150ms var(--android-checkbox-ease),
|
|
318
|
+
clip-path 0s 150ms;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
[data-platform="android"] .Container[data-has-label]:not([data-orientation="right"]) > .Checkbox {
|
|
322
|
+
margin-inline: -14px -3px;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
[data-platform="android"] .Container[data-has-label][data-orientation="right"] > .Checkbox {
|
|
326
|
+
margin-inline: -3px -14px;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
[data-platform="android"] .Container[data-orientation="right"] :is(.Label, .LabelGroup) {
|
|
330
|
+
padding-right: 0;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Container {
|
|
334
|
+
--android-checkbox-ease: cubic-bezier(0.37, 0, 0.63, 1);
|
|
335
|
+
--checkbox-target-size: 48px;
|
|
336
|
+
--checkbox-target-offset: 0px;
|
|
337
|
+
--checkbox-indicator-size: 20px;
|
|
338
|
+
--checkbox-border-width: 1.5px;
|
|
339
|
+
--checkbox-radius: var(--radius-full);
|
|
340
|
+
--checkbox-label-inset: 12px;
|
|
341
|
+
--checkbox-label-gap: 0px;
|
|
342
|
+
--checkbox-label-font-size: 16px;
|
|
343
|
+
--checkbox-label-line-height: 24px;
|
|
344
|
+
--checkbox-description-font-size: 14px;
|
|
345
|
+
--checkbox-description-line-height: 20px;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Checkbox {
|
|
349
|
+
--android-checkbox-fill: var(--checkbox-checked-background, var(--color-background-accent-solid));
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Checkbox[data-variant="ghost"] {
|
|
353
|
+
--android-checkbox-fill: var(--checkbox-ghost-check-color, var(--checkbox-checked-background, var(--color-background-accent-solid)));
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Checkbox[aria-invalid="true"] {
|
|
357
|
+
--android-checkbox-fill: var(--input-border-color-invalid);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Checkbox:not([data-state="checked"], [data-state="indeterminate"], [aria-invalid="true"]) {
|
|
361
|
+
--checkbox-paint-border-color: var(--android-checkbox-ring);
|
|
362
|
+
--checkbox-paint-background: transparent;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Checkbox[data-variant="ghost"][aria-invalid="true"] {
|
|
366
|
+
--checkbox-paint-border-color: var(--input-border-color-invalid);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Checkbox:is([data-state="checked"], [data-state="indeterminate"]):is(*, [data-variant][aria-invalid]) {
|
|
370
|
+
--checkbox-paint-border-color: var(--android-checkbox-fill);
|
|
371
|
+
--checkbox-paint-background: var(--android-checkbox-fill);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/* In a list row an error is the line under the row (Field): the checkbox keeps its ring and its fill */
|
|
375
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] :where([data-row]) .Checkbox[aria-invalid="true"] {
|
|
376
|
+
--android-checkbox-fill: var(--checkbox-checked-background, var(--color-background-accent-solid));
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] :where([data-row]) .Checkbox[aria-invalid="true"][data-variant="ghost"] {
|
|
380
|
+
--android-checkbox-fill: var(--checkbox-ghost-check-color, var(--checkbox-checked-background, var(--color-background-accent-solid)));
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] :where([data-row]) .Checkbox[aria-invalid="true"]:not([data-state="checked"], [data-state="indeterminate"]) {
|
|
384
|
+
--checkbox-paint-border-color: var(--android-checkbox-ring);
|
|
385
|
+
--checkbox-paint-background: transparent;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .IndicatorBox {
|
|
389
|
+
transition:
|
|
390
|
+
border-color 150ms var(--android-checkbox-ease),
|
|
391
|
+
background-color 150ms var(--android-checkbox-ease);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] :is(.CheckMark, .GhostMark) {
|
|
395
|
+
inset: calc(-1 * var(--checkbox-border-width));
|
|
396
|
+
color: var(--checkbox-checkmark-color, var(--color-text-accent-solid));
|
|
397
|
+
clip-path: inset(0);
|
|
398
|
+
transition:
|
|
399
|
+
opacity 150ms var(--android-checkbox-ease),
|
|
400
|
+
clip-path 150ms var(--android-checkbox-ease) 150ms;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] :is(.CheckMark, .GhostMark) > svg {
|
|
404
|
+
display: none;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] :is(.CheckMark, .GhostMark)::before {
|
|
408
|
+
width: 20px;
|
|
409
|
+
height: 20px;
|
|
410
|
+
background-color: currentcolor;
|
|
411
|
+
content: "";
|
|
412
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.2 11l3 3 6.6-6.6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
|
|
413
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.2 11l3 3 6.6-6.6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Checkbox[aria-invalid="true"]:not(:where([data-row] *)) :is(.CheckMark, .GhostMark) {
|
|
417
|
+
color: var(--color-text-danger-solid, var(--white));
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Checkbox[data-state="indeterminate"] :is(.CheckMark, .GhostMark)::before {
|
|
421
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10h8' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
422
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10h8' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Checkbox[data-state="unchecked"] :is(.CheckMark, .GhostMark) {
|
|
426
|
+
opacity: 0;
|
|
427
|
+
clip-path: inset(0 100% 0 0);
|
|
428
|
+
transition:
|
|
429
|
+
opacity 150ms var(--android-checkbox-ease),
|
|
430
|
+
clip-path 0s 150ms;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Container[data-has-label]:not([data-orientation="right"]) > .Checkbox {
|
|
434
|
+
margin-inline: -14px -3px;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Container[data-has-label][data-orientation="right"] > .Checkbox {
|
|
438
|
+
margin-inline: -3px -14px;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Container[data-orientation="right"] :is(.Label, .LabelGroup) {
|
|
442
|
+
padding-right: 0;
|
|
443
|
+
}/* On a phone the label of a check, a switch or a radio is part of the control it presses: a long press or a double tap
|
|
444
|
+
does not select it nor call up the text menu. */@media (max-width: 767px) {
|
|
445
|
+
.Label,
|
|
446
|
+
.LabelGroup {
|
|
447
|
+
-webkit-touch-callout: none;
|
|
448
|
+
-webkit-user-select: none;
|
|
449
|
+
-moz-user-select: none;
|
|
450
|
+
user-select: none;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
:where([data-plex-layout="phone"]) .Label,
|
|
454
|
+
:where([data-plex-layout="phone"]) .LabelGroup {
|
|
455
|
+
-webkit-touch-callout: none;
|
|
456
|
+
-webkit-user-select: none;
|
|
457
|
+
-moz-user-select: none;
|
|
458
|
+
user-select: none;
|
|
213
459
|
}
|
|
214
460
|
}
|
|
@@ -51,6 +51,13 @@
|
|
|
51
51
|
height: var(--button-size);
|
|
52
52
|
margin: auto;
|
|
53
53
|
}
|
|
54
|
+
|
|
55
|
+
/* The Plex Android look (`data-platform="android"`, android.css): Android's 48px target around the 32px box */
|
|
56
|
+
[data-platform="android"] .CopyButtonContainer button {
|
|
57
|
+
min-width: 48px;
|
|
58
|
+
min-height: 48px;
|
|
59
|
+
margin: calc((32px - 48px) / 2);
|
|
60
|
+
}
|
|
54
61
|
}
|
|
55
62
|
:where([data-plex-layout="phone"]) .CopyButtonContainer button {
|
|
56
63
|
min-width: 44px;
|
|
@@ -64,7 +71,14 @@
|
|
|
64
71
|
width: var(--button-size);
|
|
65
72
|
height: var(--button-size);
|
|
66
73
|
margin: auto;
|
|
67
|
-
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* The Plex Android look (`data-platform="android"`, android.css): Android's 48px target around the 32px box */
|
|
77
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .CopyButtonContainer button {
|
|
78
|
+
min-width: 48px;
|
|
79
|
+
min-height: 48px;
|
|
80
|
+
margin: calc((32px - 48px) / 2);
|
|
81
|
+
}/* The button's own outline stays off; keyboard focus shows Button's
|
|
68
82
|
::after ring */.CopyButtonContainer button:focus,
|
|
69
83
|
.CopyButtonContainer button:focus-visible {
|
|
70
84
|
outline: none !important;
|