@plexui/styles 0.1.33 → 0.1.35

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.
Files changed (80) hide show
  1. package/dist/es/components/Accordion/Accordion.module.css +26 -1
  2. package/dist/es/components/Alert/Alert.module.css +213 -1
  3. package/dist/es/components/Badge/Badge.module.css +37 -0
  4. package/dist/es/components/Breadcrumb/Breadcrumb.module.css +63 -0
  5. package/dist/es/components/Button/Button.module.css +123 -22
  6. package/dist/es/components/Button/NavigationButton.module.css +17 -0
  7. package/dist/es/components/ButtonGroup/ButtonGroup.module.css +227 -20
  8. package/dist/es/components/Card/Card.module.css +31 -6
  9. package/dist/es/components/Checkbox/Checkbox.module.css +26 -72
  10. package/dist/es/components/CodeBlock/CodeBlock.module.css +34 -1
  11. package/dist/es/components/ColorPicker/ColorPicker.module.css +414 -0
  12. package/dist/es/components/ContextMenu/ContextMenu.module.css +55 -0
  13. package/dist/es/components/DataTable/DataTable.module.css +4 -0
  14. package/dist/es/components/DatePicker/Calendar.module.css +279 -6
  15. package/dist/es/components/DatePicker/CalendarNavigationIcon.module.css +10 -0
  16. package/dist/es/components/DateRangePicker/Calendar.module.css +226 -4
  17. package/dist/es/components/DateRangePicker/Trigger.module.css +45 -2
  18. package/dist/es/components/Dialog/Dialog.module.css +871 -89
  19. package/dist/es/components/EmptyMessage/EmptyMessage.module.css +52 -0
  20. package/dist/es/components/Field/Field.module.css +574 -24
  21. package/dist/es/components/FieldGroup/FieldGroup.module.css +188 -3
  22. package/dist/es/components/FileUpload/FileUpload.module.css +74 -1
  23. package/dist/es/components/FloatingLabelInput/FloatingLabelInput.module.css +40 -1
  24. package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.module.css +28 -1
  25. package/dist/es/components/IndexBar/IndexBar.module.css +146 -0
  26. package/dist/es/components/Indicator/LoadingIndicator.module.css +14 -7
  27. package/dist/es/components/Input/Input.module.css +198 -1
  28. package/dist/es/components/InputGroup/InputGroup.module.css +4 -0
  29. package/dist/es/components/MarkdownEditor/MarkdownEditor.module.css +18 -0
  30. package/dist/es/components/Menu/Menu.module.css +544 -34
  31. package/dist/es/components/OTPInput/OTPInput.module.css +6 -1
  32. package/dist/es/components/Page/Page.module.css +391 -31
  33. package/dist/es/components/PageControl/PageControl.module.css +81 -0
  34. package/dist/es/components/PhoneLayout/PhoneLayout.module.css +10 -0
  35. package/dist/es/components/Popover/Popover.module.css +17 -1
  36. package/dist/es/components/Select/Select.module.css +201 -9
  37. package/dist/es/components/SelectControl/SelectControl.module.css +151 -4
  38. package/dist/es/components/Sidebar/Sidebar.module.css +624 -71
  39. package/dist/es/components/Slider/Slider.module.css +132 -45
  40. package/dist/es/components/Sortable/Sortable.module.css +7 -3
  41. package/dist/es/components/Stepper/Stepper.module.css +98 -0
  42. package/dist/es/components/SwipeActions/SwipeActions.module.css +166 -0
  43. package/dist/es/components/Switch/Switch.module.css +59 -4
  44. package/dist/es/components/TabBar/TabBar.module.css +478 -0
  45. package/dist/es/components/Tabs/Tabs.module.css +315 -3
  46. package/dist/es/components/TagInput/TagInput.module.css +50 -9
  47. package/dist/es/components/Textarea/Textarea.module.css +6 -0
  48. package/dist/es/components/Tip/Tip.module.css +456 -0
  49. package/dist/es/components/Toast/Toast.module.css +197 -9
  50. package/dist/es/components/Toolbar/Toolbar.module.css +850 -21
  51. package/dist/es/styles/katex-fonts/KaTeX_AMS-Regular.woff2 +0 -0
  52. package/dist/es/styles/katex-fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  53. package/dist/es/styles/katex-fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  54. package/dist/es/styles/katex-fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  55. package/dist/es/styles/katex-fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  56. package/dist/es/styles/katex-fonts/KaTeX_Main-Bold.woff2 +0 -0
  57. package/dist/es/styles/katex-fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  58. package/dist/es/styles/katex-fonts/KaTeX_Main-Italic.woff2 +0 -0
  59. package/dist/es/styles/katex-fonts/KaTeX_Main-Regular.woff2 +0 -0
  60. package/dist/es/styles/katex-fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  61. package/dist/es/styles/katex-fonts/KaTeX_Math-Italic.woff2 +0 -0
  62. package/dist/es/styles/katex-fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  63. package/dist/es/styles/katex-fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  64. package/dist/es/styles/katex-fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  65. package/dist/es/styles/katex-fonts/KaTeX_Script-Regular.woff2 +0 -0
  66. package/dist/es/styles/katex-fonts/KaTeX_Size1-Regular.woff2 +0 -0
  67. package/dist/es/styles/katex-fonts/KaTeX_Size2-Regular.woff2 +0 -0
  68. package/dist/es/styles/katex-fonts/KaTeX_Size3-Regular.woff2 +0 -0
  69. package/dist/es/styles/katex-fonts/KaTeX_Size4-Regular.woff2 +0 -0
  70. package/dist/es/styles/katex-fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  71. package/dist/es/styles/katex-fonts/LICENSE +21 -0
  72. package/dist/es/styles/katex.min.css +666 -730
  73. package/dist/es/styles/mobile-materials.css +145 -14
  74. package/dist/es/styles/mobile-surfaces.css +82 -32
  75. package/dist/es/styles/touch.css +940 -92
  76. package/dist/es/styles/variables-components.css +356 -17
  77. package/package.json +1 -1
  78. package/postcss/parseLightDark.mjs +20 -2
  79. package/postcss/phoneLayoutScope.mjs +134 -0
  80. package/postcss.config.mjs +3 -0
@@ -90,7 +90,7 @@
90
90
  width: var(--slider-thumb-width, 14px);
91
91
  height: var(--slider-thumb-height, 14px);
92
92
  border-radius: var(--slider-thumb-radius, 50%);
93
- background: var(--gray-0);
93
+ background: var(--slider-thumb-background, var(--gray-0));
94
94
  box-shadow: var(--slider-thumb-shadow, inset 0 0 0 2px var(--slider-range-color));
95
95
  cursor: grab;
96
96
  outline: none;
@@ -114,9 +114,11 @@
114
114
  align-items: center;
115
115
  justify-content: space-between;
116
116
  gap: 4px;
117
- margin-bottom: 8px;
117
+ min-height: var(--slider-label-height, var(--control-size-2xs));
118
+ margin-bottom: var(--slider-label-gap, 8px);
118
119
  color: var(--color-text);
119
- font-size: 14px;
120
+ font-size: var(--slider-label-font-size, var(--font-text-sm-size));
121
+ line-height: var(--slider-label-line-height, var(--font-text-sm-line-height));
120
122
  }.Reset {
121
123
  /* Ensures cursor switches back immediately after clicking reset button. */
122
124
  cursor: default;
@@ -127,50 +129,50 @@
127
129
  visibility: hidden;
128
130
  }
129
131
 
130
- /* Custom overrides outside the design system. Using the data attribute to win the specificity war. */
132
+ /* The 2xs ghost button stands as high as the value field beside it; its glyph is the reset arrow alone.
133
+ The data attribute wins over the Button's own size rules. */
131
134
  .Reset[data-size="2xs"] {
132
- width: var(--slider-reset-size, 22px);
133
- height: var(--slider-reset-size, 22px);
135
+ width: var(--slider-reset-size, var(--control-size-2xs));
136
+ height: var(--slider-reset-size, var(--control-size-2xs));
134
137
  }
135
138
 
136
139
  .Reset[data-size="2xs"] svg {
137
- width: 14px;
138
- height: 14px;
139
- }.SliderValue {
140
+ width: var(--slider-reset-icon-size, 14px);
141
+ height: var(--slider-reset-icon-size, 14px);
142
+ }/* The value is an outline field of the 2xs size (24px, 6px gutter, the Input's outline borders) that shows
143
+ its border on hover and focus; the value and its unit are one line of the label's size, the unit in the
144
+ secondary text a space apart, and the text lines up with the end of the track. */.SliderValue {
140
145
  overflow: hidden;
141
146
  display: flex;
142
- align-items: baseline;
147
+ align-items: center;
143
148
  justify-content: flex-end;
144
- gap: 2px;
145
- height: 26px;
146
- padding: 0 4px;
147
- border: 0.5px solid transparent;
148
- border-radius: var(--radius-sm);
149
- margin-right: -4px;
149
+ gap: var(--slider-value-unit-gap, 0.25em);
150
+ height: var(--slider-value-height, var(--control-size-2xs));
151
+ padding: 0 var(--slider-value-gutter, var(--control-gutter-2xs));
152
+ border: 1px solid transparent;
153
+ border-radius: var(--slider-value-radius, var(--control-radius-sm));
154
+ margin-inline-end: calc(-1 * var(--slider-value-gutter, var(--control-gutter-2xs)) - 1px);
150
155
  -webkit-appearance: none;
151
156
  -moz-appearance: none;
152
157
  appearance: none;
153
158
  background: transparent;
159
+ color: var(--slider-value-color, var(--color-text));
154
160
  cursor: text;
161
+ font-size: var(--slider-value-font-size, var(--font-text-sm-size));
162
+ line-height: var(--slider-value-line-height, var(--font-text-sm-line-height));
155
163
  outline: none;
156
- text-align: center;
157
- transition: border-color 250ms ease;
164
+ transition: border-color var(--transition-duration-basic) var(--transition-ease-basic);
158
165
  }
159
166
 
160
- @media (min-width: 768px) {
161
- .SliderValue {
162
- height: 22px;
163
- }
164
- }
165
-
166
167
  @media (hover: hover) and (pointer: fine) {
167
168
  .SliderWrap:hover:where(:not(:root[data-input="touch"] *)) .SliderValue:not(:focus-within) {
168
- border-color: var(--gray-200);
169
+ border-color: var(--slider-value-border-color-hover, var(--input-outline-border-color));
169
170
  }
170
171
  }
171
172
 
172
173
  .SliderValue:focus-within {
173
- border-color: var(--gray-500);
174
+ border-color: var(--slider-value-border-color-focus, var(--input-outline-border-color-focus));
175
+ color: var(--slider-value-color-focus, var(--color-text));
174
176
  }.ValueInput {
175
177
  height: 100%;
176
178
  padding: 0;
@@ -179,21 +181,14 @@
179
181
  -moz-appearance: none;
180
182
  appearance: none;
181
183
  background: transparent;
182
- color: var(--color-text);
183
- font-size: 16px;
184
+ color: inherit;
185
+ font: inherit;
184
186
  font-variant-numeric: tabular-nums;
185
187
  outline: none;
186
- text-align: left;
188
+ text-align: right;
187
189
  transition: width 100ms ease;
188
- }
189
-
190
- @media (min-width: 768px) {
191
- .ValueInput {
192
- font-size: 13px;
193
- }
194
- }.ValueUnit {
195
- color: var(--color-text-secondary);
196
- font-size: 12px;
190
+ }.ValueUnit {
191
+ color: var(--slider-unit-color, var(--color-text-secondary));
197
192
  -webkit-user-select: none;
198
193
  -moz-user-select: none;
199
194
  user-select: none;
@@ -204,6 +199,12 @@
204
199
  position: relative;
205
200
  width: 100%;
206
201
  margin-top: 4px;
202
+ /* The marks' size, so the line held for them below is one of their lines */
203
+ font-size: 12px;
204
+ }/* Until the slider knows its width (Slider sets data-measured) the marks hold one line and stay hidden: the server
205
+ cannot place them, and the page does not move when they appear. */.MarksContainer:not([data-measured]) {
206
+ min-height: 1lh;
207
+ visibility: hidden;
207
208
  }.Mark {
208
209
  position: absolute;
209
210
  color: var(--color-text);
@@ -217,28 +218,114 @@
217
218
  }/* =============================================
218
219
  Range display (read-only value for range mode)
219
220
  ============================================= */.RangeDisplay {
220
- color: var(--color-text);
221
- font-size: 13px;
221
+ color: var(--slider-value-color, var(--color-text));
222
+ font-size: var(--slider-value-font-size, var(--font-text-sm-size));
222
223
  font-variant-numeric: tabular-nums;
223
224
  white-space: nowrap;
224
- }/* Editable values and vertical rails are web adaptations, not native iOS controls.
225
- Their touch targets occupy normal flow without changing the painted track/thumb. */@media (max-width: 767px) {
225
+ }/* The label row is a web adaptation: iOS sliders have no label or editable value. On a phone it reads as the
226
+ label and value of an iOS list row (touch.css: 17px label, the value and unit in the secondary label), a
227
+ 44px line whose value and reset are touch targets. The value has no border, as the text fields of iOS
228
+ rows; while it is edited its text is the primary label. */@media (max-width: 767px) {
226
229
  .SliderValue {
227
- align-items: center;
228
230
  height: auto;
229
231
  min-height: 44px;
230
- margin-right: 0;
232
+ padding: 0;
233
+ border: 0;
234
+ margin-inline-end: 0;
231
235
  }
232
236
 
233
237
  .ValueInput {
234
238
  min-width: 44px;
235
239
  height: 44px;
236
- text-align: right;
237
240
  }
238
241
 
242
+ /* The reset is the row's accessory: its glyph alone on the 44px target in the secondary label, without the
243
+ button's face (three classes and the variant, over the Button's color rules in any sheet order). */
244
+ .SliderWrap .SliderLabel .Reset[data-variant="ghost"] {
245
+ color: var(--slider-reset-color, var(--color-text-secondary));
246
+ }
247
+
248
+ .SliderWrap .SliderLabel .Reset[data-variant="ghost"]::before {
249
+ visibility: hidden;
250
+ }
251
+
239
252
  .SliderWrap[data-orientation="vertical"] .Slider {
240
253
  width: max(44px, var(--slider-control-height, 44px));
241
254
  padding-right: 0;
242
255
  }
256
+
257
+ /* The knob being dragged turns into the lens of glass (mobile-materials.css), on its centre (kit iOS 27
258
+ Sliders 7:53847, State=Pressed); without touch.css it stays as it is. The slider is pressed from the first
259
+ touch, wherever on the track it lands; of a range, the nearest knob, which the press focuses. A vertical
260
+ slider is a web layout with no iOS knob, so it keeps its own. */
261
+ .Slider[data-orientation="horizontal"] .Thumb {
262
+ transition:
263
+ left var(--slider-duration) var(--cubic-move),
264
+ scale 200ms var(--cubic-enter),
265
+ background-color 200ms var(--cubic-enter),
266
+ box-shadow 200ms var(--cubic-enter);
267
+ }
268
+
269
+ .Slider[data-orientation="horizontal"][data-pressed]:not([data-range], [data-disabled]) .Thumb,
270
+ .Slider[data-orientation="horizontal"][data-pressed][data-range]:not([data-disabled]) .Thumb:focus {
271
+ scale: var(--mobile-knob-lens-scale, none);
272
+ background-color: var(--mobile-knob-lens-background, var(--slider-thumb-background, var(--gray-0)));
273
+ box-shadow: var(--mobile-knob-lens-shadow, var(--slider-thumb-shadow, inset 0 0 0 2px var(--slider-range-color)));
274
+ }
275
+
276
+ /* Disabled, the track, its fill and the knob show at half opacity (State=Disabled). */
277
+ .Slider[data-disabled] {
278
+ opacity: 0.5;
279
+ }
243
280
  }
281
+ :where([data-plex-layout="phone"]) .SliderValue {
282
+ height: auto;
283
+ min-height: 44px;
284
+ padding: 0;
285
+ border: 0;
286
+ margin-inline-end: 0;
287
+ }
288
+
289
+ :where([data-plex-layout="phone"]) .ValueInput {
290
+ min-width: 44px;
291
+ height: 44px;
292
+ }
293
+
294
+ /* The reset is the row's accessory: its glyph alone on the 44px target in the secondary label, without the
295
+ button's face (three classes and the variant, over the Button's color rules in any sheet order). */
296
+ :where([data-plex-layout="phone"]) .SliderWrap .SliderLabel .Reset[data-variant="ghost"] {
297
+ color: var(--slider-reset-color, var(--color-text-secondary));
298
+ }
299
+
300
+ :where([data-plex-layout="phone"]) .SliderWrap .SliderLabel .Reset[data-variant="ghost"]::before {
301
+ visibility: hidden;
302
+ }
303
+
304
+ :where([data-plex-layout="phone"]) .SliderWrap[data-orientation="vertical"] .Slider {
305
+ width: max(44px, var(--slider-control-height, 44px));
306
+ padding-right: 0;
307
+ }
308
+
309
+ /* The knob being dragged turns into the lens of glass (mobile-materials.css), on its centre (kit iOS 27
310
+ Sliders 7:53847, State=Pressed); without touch.css it stays as it is. The slider is pressed from the first
311
+ touch, wherever on the track it lands; of a range, the nearest knob, which the press focuses. A vertical
312
+ slider is a web layout with no iOS knob, so it keeps its own. */
313
+ :where([data-plex-layout="phone"]) .Slider[data-orientation="horizontal"] .Thumb {
314
+ transition:
315
+ left var(--slider-duration) var(--cubic-move),
316
+ scale 200ms var(--cubic-enter),
317
+ background-color 200ms var(--cubic-enter),
318
+ box-shadow 200ms var(--cubic-enter);
319
+ }
320
+
321
+ :where([data-plex-layout="phone"]) .Slider[data-orientation="horizontal"][data-pressed]:not([data-range], [data-disabled]) .Thumb, :where([data-plex-layout="phone"]) .Slider[data-orientation="horizontal"][data-pressed][data-range]:not([data-disabled]) .Thumb:focus {
322
+ scale: var(--mobile-knob-lens-scale, none);
323
+ background-color: var(--mobile-knob-lens-background, var(--slider-thumb-background, var(--gray-0)));
324
+ box-shadow: var(--mobile-knob-lens-shadow, var(--slider-thumb-shadow, inset 0 0 0 2px var(--slider-range-color)));
325
+ }
326
+
327
+ /* Disabled, the track, its fill and the knob show at half opacity (State=Disabled). */
328
+ :where([data-plex-layout="phone"]) .Slider[data-disabled] {
329
+ opacity: 0.5;
330
+ }
244
331
  }
@@ -12,15 +12,19 @@
12
12
  .Sortable[data-dragging] > * {
13
13
  transition: transform 200ms var(--cubic-enter);
14
14
  }
15
- }/* A row with a handle: the handle, then the row */.Sortable > :has(> .Handle) {
15
+ }/* A row with a handle: the handle, then the row. With touch.css a phone moves the handle to the end of the
16
+ row, where iOS puts its reorder control (--sortable-handle-order and the two margins). */.Sortable > :has(> .Handle) {
16
17
  display: flex;
17
18
  align-items: center;
18
19
  }.Sortable > :has(> .Handle) > :not(.Handle) {
19
20
  flex: 1;
20
21
  min-width: 0;
21
22
  }.Sortable > :has(> .Handle) > .Handle {
22
- margin-inline-start: var(--sortable-handle-inset);
23
- margin-inline-end: calc(var(--sortable-handle-inset) * -1);
23
+ order: var(--sortable-handle-order, 0);
24
+ margin-inline-start: var(--sortable-handle-margin-start, var(--sortable-handle-inset));
25
+ margin-inline-end: var(--sortable-handle-margin-end, calc(var(--sortable-handle-inset) * -1));
26
+ }/* Before a Field row a shown handle may reach into the row's own inline padding (touch.css: the kit's 12px from the value) */.Sortable[data-handles="true"] > :has(> .Handle) > .Handle:has(+ [data-slot="field"][data-row]) {
27
+ margin-inline-start: var(--sortable-handle-field-margin-start, var(--sortable-handle-margin-start, var(--sortable-handle-inset)));
24
28
  }/* =============================================
25
29
  Slot (the place a dragged item left, until the drop)
26
30
  ============================================= */.Sortable > [data-sortable-source] {
@@ -0,0 +1,98 @@
1
+ @layer components {/* Two segments that decrease and increase a value: a minus and a plus, a short separator between them, a
2
+ segment at the end of the range in the tertiary label. On a desktop one fill lies under both segments and a
3
+ pressed one darkens; on a phone (touch.css) each segment has its own fill, as in the iOS 27 kit Stepper, and a
4
+ pressed one or one at the end of the range takes the lighter fill. Sizes and colors are tokens: the PlexUI
5
+ control size on a desktop, the kit's 92 x 32 capsule on a phone. */.Stepper {
6
+ position: relative;
7
+ display: inline-flex;
8
+ flex-shrink: 0;
9
+ align-items: stretch;
10
+ vertical-align: middle;
11
+ height: var(--stepper-height);
12
+ border-radius: var(--stepper-radius);
13
+ background: var(--stepper-background);
14
+ -moz-user-select: none;
15
+ user-select: none;
16
+ -webkit-user-select: none;
17
+ -webkit-touch-callout: none;
18
+ touch-action: manipulation;
19
+ -webkit-tap-highlight-color: transparent;
20
+ }
21
+
22
+ .Stepper[data-pill] {
23
+ border-radius: calc(var(--stepper-height) / 2);
24
+ }
25
+
26
+ .Stepper:focus {
27
+ outline: none;
28
+ }
29
+
30
+ .Stepper:focus-visible {
31
+ outline: 2px solid var(--color-ring);
32
+ outline-offset: 2px;
33
+ }.Segment {
34
+ position: relative;
35
+ display: grid;
36
+ place-items: center;
37
+ flex-shrink: 0;
38
+ width: var(--stepper-segment-width);
39
+ margin: 0;
40
+ padding: 0;
41
+ border: 0;
42
+ border-radius: inherit;
43
+ background: var(--stepper-segment-background, transparent);
44
+ color: var(--stepper-icon-color);
45
+ font: inherit;
46
+ cursor: pointer;
47
+ z-index: 1;
48
+ transition: background-color var(--stepper-transition-duration, 150ms) ease;
49
+ }
50
+
51
+ .Segment:first-child {
52
+ border-start-end-radius: 0;
53
+ border-end-end-radius: 0;
54
+ }
55
+
56
+ .Segment:last-of-type {
57
+ border-start-start-radius: 0;
58
+ border-end-start-radius: 0;
59
+ }
60
+ @media (hover: hover) and (pointer: fine) {
61
+ .Segment:hover:where(:not(:root[data-input="touch"] *)):not([data-disabled]):not([data-pressed]) {
62
+ background: var(--stepper-segment-background-hover);
63
+ }
64
+ }
65
+
66
+ /* Hover gives way to the pressed fill, which a pointer always presses over. */
67
+
68
+ .Segment[data-pressed] {
69
+ background: var(--stepper-segment-background-active);
70
+ transition-duration: 0ms;
71
+ }
72
+
73
+ .Segment[data-disabled] {
74
+ background: var(--stepper-segment-background-disabled, var(--stepper-segment-background, transparent));
75
+ color: var(--stepper-icon-disabled-color);
76
+ cursor: default;
77
+ }
78
+
79
+ /* The pressed fill stays on the visible segment; the target reaches 44px where the control is shorter. */
80
+ .Segment::after {
81
+ position: absolute;
82
+ inset: min(0px, calc((var(--stepper-height) - var(--stepper-target-size, 0px)) / 2)) 0;
83
+ content: "";
84
+ }/* As in the kit, the separator sits under the two segments at the center and adds no width: 46 + 46 = 92. */.Separator {
85
+ position: absolute;
86
+ top: var(--stepper-separator-inset);
87
+ left: 50%;
88
+ width: 1px;
89
+ height: calc(var(--stepper-height) - 2 * var(--stepper-separator-inset));
90
+ border-radius: 1px;
91
+ background: var(--stepper-separator-color);
92
+ transform: translateX(-50%);
93
+ pointer-events: none;
94
+ }.Icon {
95
+ width: var(--stepper-icon-size);
96
+ height: var(--stepper-icon-size);
97
+ }
98
+ }
@@ -0,0 +1,166 @@
1
+ @layer components {/* Actions behind a row of a list, after the iOS 27 kit Row with Swipe Actions (Lists 550:49969): the content slides
2
+ aside and the actions stand behind it as solid capsules, 10px apart, 16px from the edge and 10px from the content,
3
+ which turns into a capsule of the row's color on the background of the list. The colors are PlexUI's solid ones. */.SwipeActions {
4
+ position: relative;
5
+ overflow: hidden;
6
+ isolation: isolate;
7
+ }/* A revealed row shows the background of the list behind its content and actions: on a desktop the secondary surface
8
+ under the surface. The two backgrounds have no default of their own, so a nested theme does not reset them; set
9
+ `--swipe-actions-background` and `--swipe-actions-content-background` to override them. */.SwipeActions[data-revealed] {
10
+ background: var(--swipe-actions-background, var(--color-surface-secondary));
11
+ }.Content {
12
+ position: relative;
13
+ z-index: 1;
14
+ /* Where a swipe has moved it, set by the row (physical px). */
15
+ translate: var(--swipe-actions-offset, 0px);
16
+ /* A swipe across the row moves it; a swipe down scrolls the list. */
17
+ touch-action: pan-y;
18
+ transition: translate var(--swipe-actions-duration) var(--ease-cubic-move, ease);
19
+ }/* Moved aside, the content is a capsule of the row's color, round on the side of the actions. */.SwipeActions[data-revealed] > .Content {
20
+ background: var(--swipe-actions-content-background, var(--color-surface));
21
+ }/* On a phone the canvas of the Page (or Dialog) and the fill of its FieldGroups, as the kit's row (550:49969) on the
22
+ background of the list; outside them the plain surfaces. */@media (max-width: 767.98px) {
23
+ .SwipeActions[data-revealed] {
24
+ background: var(--swipe-actions-background, var(--mobile-surface-primary, var(--mobile-surface-plain-primary, var(--color-surface-secondary))));
25
+ }
26
+
27
+ .SwipeActions[data-revealed] > .Content {
28
+ background: var(--swipe-actions-content-background, var(--mobile-surface-secondary, var(--mobile-surface-plain-secondary, var(--color-surface))));
29
+ }
30
+ }
31
+ :where([data-plex-layout="phone"]) .SwipeActions[data-revealed] {
32
+ background: var(--swipe-actions-background, var(--mobile-surface-primary, var(--mobile-surface-plain-primary, var(--color-surface-secondary))));
33
+ }
34
+
35
+ :where([data-plex-layout="phone"]) .SwipeActions[data-revealed] > .Content {
36
+ background: var(--swipe-actions-content-background, var(--mobile-surface-secondary, var(--mobile-surface-plain-secondary, var(--color-surface))));
37
+ }.SwipeActions[data-revealed="leading"] > .Content {
38
+ border-start-start-radius: var(--swipe-actions-content-radius);
39
+ border-end-start-radius: var(--swipe-actions-content-radius);
40
+ }.SwipeActions[data-revealed="trailing"] > .Content {
41
+ border-start-end-radius: var(--swipe-actions-content-radius);
42
+ border-end-end-radius: var(--swipe-actions-content-radius);
43
+ }.SwipeActions[data-swiping] > .Content {
44
+ transition: none;
45
+ -moz-user-select: none;
46
+ user-select: none;
47
+ -webkit-user-select: none;
48
+ }.Actions {
49
+ position: absolute;
50
+ inset-block: 0;
51
+ display: flex;
52
+ align-items: center;
53
+ gap: var(--swipe-actions-gap);
54
+ }.Actions[data-side="leading"] {
55
+ inset-inline-start: 0;
56
+ padding-inline: var(--swipe-actions-edge-inset) var(--swipe-actions-content-gap);
57
+ }.Actions[data-side="trailing"] {
58
+ inset-inline-end: 0;
59
+ padding-inline: var(--swipe-actions-content-gap) var(--swipe-actions-edge-inset);
60
+ }/* The side that is not revealed stays out of sight, its actions still reachable by the keys: the focus on one
61
+ reveals its side. */.SwipeActions:not([data-revealed="leading"]) > .Actions[data-side="leading"],
62
+ .SwipeActions:not([data-revealed="trailing"]) > .Actions[data-side="trailing"] {
63
+ opacity: 0;
64
+ pointer-events: none;
65
+ }.Action {
66
+ display: flex;
67
+ flex-direction: column;
68
+ flex-shrink: 0;
69
+ align-items: stretch;
70
+ padding: 0;
71
+ border: 0;
72
+ background: none;
73
+ color: inherit;
74
+ font: inherit;
75
+ cursor: pointer;
76
+ -webkit-tap-highlight-color: transparent;
77
+ }
78
+
79
+ .Action:focus {
80
+ outline: none;
81
+ }
82
+
83
+ .Action:focus-visible > .Capsule {
84
+ outline: 2px solid var(--color-ring);
85
+ outline-offset: 2px;
86
+ }.Capsule {
87
+ display: flex;
88
+ align-items: center;
89
+ justify-content: center;
90
+ gap: var(--swipe-actions-label-gap);
91
+ min-width: var(--swipe-actions-action-min-width);
92
+ height: var(--swipe-actions-action-height);
93
+ padding-inline: var(--swipe-actions-action-padding-inline);
94
+ border-radius: 9999px;
95
+ background: var(--swipe-action-background);
96
+ color: var(--swipe-action-color);
97
+ transition: background-color var(--duration-basic, 120ms) var(--ease-basic, ease);
98
+ }.Action:active > .Capsule {
99
+ background: var(--swipe-action-background-active);
100
+ }.Icon {
101
+ flex-shrink: 0;
102
+ width: var(--swipe-actions-icon-size);
103
+ height: var(--swipe-actions-icon-size);
104
+ }.Label {
105
+ font-size: var(--swipe-actions-label-font-size);
106
+ line-height: var(--swipe-actions-label-line-height);
107
+ font-weight: var(--swipe-actions-label-font-weight);
108
+ white-space: nowrap;
109
+ }/* Symbol and Label: the label inside the capsule, after a smaller symbol. */.SwipeActions[data-label-placement="inside"] .Capsule {
110
+ --swipe-actions-action-min-width: var(--swipe-actions-labeled-min-width);
111
+ --swipe-actions-action-padding-inline: var(--swipe-actions-labeled-padding-inline);
112
+ --swipe-actions-icon-size: var(--swipe-actions-labeled-icon-size);
113
+ }/* Symbol and Label Tall: a lower capsule with the label under it, for a row of two lines. */.SwipeActions[data-label-placement="below"] .Action {
114
+ gap: var(--swipe-actions-caption-gap);
115
+ padding-block: var(--swipe-actions-tall-padding-top) var(--swipe-actions-tall-padding-bottom);
116
+ }.SwipeActions[data-label-placement="below"] .Capsule {
117
+ --swipe-actions-action-height: var(--swipe-actions-tall-action-height);
118
+ }/* The secondary label of the row (touch.css gives a row the native label roles). */.Caption {
119
+ color: var(--swipe-actions-caption-color, var(--color-text-secondary));
120
+ font-size: var(--swipe-actions-label-font-size);
121
+ line-height: var(--swipe-actions-label-line-height);
122
+ font-weight: var(--swipe-actions-caption-font-weight);
123
+ text-align: center;
124
+ white-space: nowrap;
125
+ }/* A full swipe: the first action takes the whole of the open side and the others give way to it. */.Actions[data-full] > .Action:not([data-first]) {
126
+ display: none;
127
+ }.Actions[data-full] > .Action[data-first] {
128
+ flex-grow: 1;
129
+ }.Action[data-color="primary"] {
130
+ --swipe-action-background: var(--color-background-primary-solid);
131
+ --swipe-action-background-active: var(--color-background-primary-solid-active);
132
+ --swipe-action-color: var(--color-text-primary-solid);
133
+ }.Action[data-color="secondary"] {
134
+ --swipe-action-background: var(--color-background-secondary-solid);
135
+ --swipe-action-background-active: var(--color-background-secondary-solid-active);
136
+ --swipe-action-color: var(--color-text-secondary-solid);
137
+ }.Action[data-color="danger"] {
138
+ --swipe-action-background: var(--color-background-danger-solid);
139
+ --swipe-action-background-active: var(--color-background-danger-solid-active);
140
+ --swipe-action-color: var(--color-text-danger-solid);
141
+ }.Action[data-color="success"] {
142
+ --swipe-action-background: var(--color-background-success-solid);
143
+ --swipe-action-background-active: var(--color-background-success-solid-active);
144
+ --swipe-action-color: var(--color-text-success-solid);
145
+ }.Action[data-color="info"] {
146
+ --swipe-action-background: var(--color-background-info-solid);
147
+ --swipe-action-background-active: var(--color-background-info-solid-active);
148
+ --swipe-action-color: var(--color-text-info-solid);
149
+ }.Action[data-color="discovery"] {
150
+ --swipe-action-background: var(--color-background-discovery-solid);
151
+ --swipe-action-background-active: var(--color-background-discovery-solid-active);
152
+ --swipe-action-color: var(--color-text-discovery-solid);
153
+ }.Action[data-color="caution"] {
154
+ --swipe-action-background: var(--color-background-caution-solid);
155
+ --swipe-action-background-active: var(--color-background-caution-solid-active);
156
+ --swipe-action-color: var(--color-text-caution-solid);
157
+ }.Action[data-color="warning"] {
158
+ --swipe-action-background: var(--color-background-warning-solid);
159
+ --swipe-action-background-active: var(--color-background-warning-solid-active);
160
+ --swipe-action-color: var(--color-text-warning-solid);
161
+ }@media (prefers-reduced-motion: reduce) {
162
+ .Content {
163
+ transition: none;
164
+ }
165
+ }
166
+ }
@@ -69,13 +69,13 @@
69
69
  border-radius: var(--radius-full);
70
70
  background: var(--switch-thumb-color);
71
71
  box-shadow: var(--switch-thumb-shadow);
72
- transition: transform 200ms var(--cubic-enter);
72
+ transition: translate 200ms var(--cubic-enter);
73
73
  }
74
74
 
75
+ /* The translate property, not a transform: the pressed lens of a phone scales the knob on its own centre,
76
+ and a scale would multiply a translation inside the transform. */
75
77
  [data-state="checked"] .Thumb {
76
- transform: translateX(
77
- calc(var(--switch-track-width) - var(--switch-thumb-width) - var(--switch-thumb-offset) * 2)
78
- );
78
+ translate: calc(var(--switch-track-width) - var(--switch-thumb-width) - var(--switch-thumb-offset) * 2) 0;
79
79
  }
80
80
 
81
81
  .Thumb[data-disabled] {
@@ -126,5 +126,60 @@
126
126
 
127
127
  [data-disabled] .Description {
128
128
  cursor: not-allowed;
129
+ }/* A phone switch after the iOS 27 kit (Toggles 29:56814). Held down, the knob turns into the lens of glass
130
+ (mobile-materials.css) over the track, on the knob's centre; without touch.css the knob stays as it is.
131
+ Disabled, the switch keeps its colors and shows at half opacity (Is Enabled=False). */@media (max-width: 767px) {
132
+ .Thumb {
133
+ transition:
134
+ translate 200ms var(--cubic-enter),
135
+ scale 200ms var(--cubic-enter),
136
+ background-color 200ms var(--cubic-enter),
137
+ box-shadow 200ms var(--cubic-enter);
138
+ }
139
+
140
+ .Track:active:not([data-disabled]) > .Thumb {
141
+ scale: var(--mobile-knob-lens-scale, none);
142
+ background-color: var(--mobile-knob-lens-background, var(--switch-thumb-color));
143
+ box-shadow: var(--mobile-knob-lens-shadow, var(--switch-thumb-shadow));
144
+ }
145
+
146
+ .Track[data-disabled] {
147
+ background: var(--switch-track-color);
148
+ opacity: 0.5;
149
+ }
150
+
151
+ .Track[data-disabled][data-state="checked"] {
152
+ background: var(--switch-track-color-checked);
153
+ }
154
+
155
+ .Thumb[data-disabled] {
156
+ background: var(--switch-thumb-color);
157
+ }
158
+ }
159
+ :where([data-plex-layout="phone"]) .Thumb {
160
+ transition:
161
+ translate 200ms var(--cubic-enter),
162
+ scale 200ms var(--cubic-enter),
163
+ background-color 200ms var(--cubic-enter),
164
+ box-shadow 200ms var(--cubic-enter);
165
+ }
166
+
167
+ :where([data-plex-layout="phone"]) .Track:active:not([data-disabled]) > .Thumb {
168
+ scale: var(--mobile-knob-lens-scale, none);
169
+ background-color: var(--mobile-knob-lens-background, var(--switch-thumb-color));
170
+ box-shadow: var(--mobile-knob-lens-shadow, var(--switch-thumb-shadow));
171
+ }
172
+
173
+ :where([data-plex-layout="phone"]) .Track[data-disabled] {
174
+ background: var(--switch-track-color);
175
+ opacity: 0.5;
176
+ }
177
+
178
+ :where([data-plex-layout="phone"]) .Track[data-disabled][data-state="checked"] {
179
+ background: var(--switch-track-color-checked);
180
+ }
181
+
182
+ :where([data-plex-layout="phone"]) .Thumb[data-disabled] {
183
+ background: var(--switch-thumb-color);
129
184
  }
130
185
  }