@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.
- package/dist/es/components/Accordion/Accordion.module.css +26 -1
- package/dist/es/components/Alert/Alert.module.css +213 -1
- package/dist/es/components/Badge/Badge.module.css +37 -0
- package/dist/es/components/Breadcrumb/Breadcrumb.module.css +63 -0
- package/dist/es/components/Button/Button.module.css +123 -22
- package/dist/es/components/Button/NavigationButton.module.css +17 -0
- package/dist/es/components/ButtonGroup/ButtonGroup.module.css +227 -20
- package/dist/es/components/Card/Card.module.css +31 -6
- package/dist/es/components/Checkbox/Checkbox.module.css +26 -72
- package/dist/es/components/CodeBlock/CodeBlock.module.css +34 -1
- package/dist/es/components/ColorPicker/ColorPicker.module.css +414 -0
- package/dist/es/components/ContextMenu/ContextMenu.module.css +55 -0
- package/dist/es/components/DataTable/DataTable.module.css +4 -0
- package/dist/es/components/DatePicker/Calendar.module.css +279 -6
- package/dist/es/components/DatePicker/CalendarNavigationIcon.module.css +10 -0
- package/dist/es/components/DateRangePicker/Calendar.module.css +226 -4
- package/dist/es/components/DateRangePicker/Trigger.module.css +45 -2
- package/dist/es/components/Dialog/Dialog.module.css +871 -89
- package/dist/es/components/EmptyMessage/EmptyMessage.module.css +52 -0
- package/dist/es/components/Field/Field.module.css +574 -24
- package/dist/es/components/FieldGroup/FieldGroup.module.css +188 -3
- package/dist/es/components/FileUpload/FileUpload.module.css +74 -1
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.module.css +40 -1
- package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.module.css +28 -1
- package/dist/es/components/IndexBar/IndexBar.module.css +146 -0
- package/dist/es/components/Indicator/LoadingIndicator.module.css +14 -7
- package/dist/es/components/Input/Input.module.css +198 -1
- package/dist/es/components/InputGroup/InputGroup.module.css +4 -0
- package/dist/es/components/MarkdownEditor/MarkdownEditor.module.css +18 -0
- package/dist/es/components/Menu/Menu.module.css +544 -34
- package/dist/es/components/OTPInput/OTPInput.module.css +6 -1
- package/dist/es/components/Page/Page.module.css +391 -31
- package/dist/es/components/PageControl/PageControl.module.css +81 -0
- package/dist/es/components/PhoneLayout/PhoneLayout.module.css +10 -0
- package/dist/es/components/Popover/Popover.module.css +17 -1
- package/dist/es/components/Select/Select.module.css +201 -9
- package/dist/es/components/SelectControl/SelectControl.module.css +151 -4
- package/dist/es/components/Sidebar/Sidebar.module.css +624 -71
- package/dist/es/components/Slider/Slider.module.css +132 -45
- package/dist/es/components/Sortable/Sortable.module.css +7 -3
- package/dist/es/components/Stepper/Stepper.module.css +98 -0
- package/dist/es/components/SwipeActions/SwipeActions.module.css +166 -0
- package/dist/es/components/Switch/Switch.module.css +59 -4
- package/dist/es/components/TabBar/TabBar.module.css +478 -0
- package/dist/es/components/Tabs/Tabs.module.css +315 -3
- package/dist/es/components/TagInput/TagInput.module.css +50 -9
- package/dist/es/components/Textarea/Textarea.module.css +6 -0
- package/dist/es/components/Tip/Tip.module.css +456 -0
- package/dist/es/components/Toast/Toast.module.css +197 -9
- package/dist/es/components/Toolbar/Toolbar.module.css +850 -21
- package/dist/es/styles/katex-fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/LICENSE +21 -0
- package/dist/es/styles/katex.min.css +666 -730
- package/dist/es/styles/mobile-materials.css +145 -14
- package/dist/es/styles/mobile-surfaces.css +82 -32
- package/dist/es/styles/touch.css +940 -92
- package/dist/es/styles/variables-components.css +356 -17
- package/package.json +1 -1
- package/postcss/parseLightDark.mjs +20 -2
- package/postcss/phoneLayoutScope.mjs +134 -0
- package/postcss.config.mjs +3 -0
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
value. Consumers can lower it via `--z-toast` if their app pushes something
|
|
3
3
|
legitimately higher (rare — toasts should sit above modals and headers). */.Toaster:where([data-sonner-toaster]) {
|
|
4
4
|
z-index: var(--z-toast, 100000) !important;
|
|
5
|
+
/* A modal Dialog turns pointer events off on the body; the region stays a
|
|
6
|
+
layer of its own above it, so its toasts take presses (the renderer also
|
|
7
|
+
keeps the Dialog from reading them as presses outside) */
|
|
8
|
+
pointer-events: auto;
|
|
5
9
|
}/* Sonner reads --normal-bg / --normal-text / --normal-border / --border-radius
|
|
6
10
|
from the Toaster element (wired up in Toaster.tsx). The rules below only
|
|
7
11
|
layer on things sonner's stylesheet doesn't cover on its own. */.Toast {
|
|
@@ -32,19 +36,31 @@
|
|
|
32
36
|
Same shadow + hairline combo as Menu / Popover for visual parity. */
|
|
33
37
|
box-shadow: var(--shadow), var(--shadow-hairline) !important;
|
|
34
38
|
}/* On a phone Sonner makes the toaster as wide as the screen and shifts it by
|
|
35
|
-
the inset, so part of it is off screen:
|
|
39
|
+
the inset, so part of it is off screen: the toast fills the rest, between the
|
|
40
|
+
side gutters, as a notification banner fills a phone's width (iOS 27 kit,
|
|
41
|
+
Notification - Collapsed - List 135:73247: 374 of 402, 14 each side, the
|
|
42
|
+
Toaster's default mobile gutters). A compact toast keeps its own width. */@media (width <= 600px) {
|
|
36
43
|
.Toast {
|
|
37
|
-
|
|
44
|
+
width: auto !important;
|
|
45
|
+
max-width: none !important;
|
|
46
|
+
right: calc(var(--mobile-offset-left, 14px) + var(--mobile-offset-right, 14px)) !important;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.Toast.Compact {
|
|
50
|
+
width: -moz-max-content !important;
|
|
51
|
+
width: max-content !important;
|
|
52
|
+
max-width: calc(100vw - var(--mobile-offset-left, 14px) - var(--mobile-offset-right, 14px)) !important;
|
|
38
53
|
}
|
|
39
54
|
|
|
40
55
|
.Toaster[dir="rtl"] .Toast {
|
|
41
|
-
left: calc(var(--mobile-offset-left,
|
|
56
|
+
left: calc(var(--mobile-offset-left, 14px) + var(--mobile-offset-right, 14px)) !important;
|
|
42
57
|
right: 0 !important;
|
|
43
58
|
}
|
|
44
59
|
}.Title {
|
|
45
60
|
color: var(--color-text);
|
|
46
61
|
font-size: var(--font-text-sm-size);
|
|
47
|
-
line-height:
|
|
62
|
+
/* Sonner's unlayered [data-title] sets line-height: 1.5 (21px at 14px) */
|
|
63
|
+
line-height: var(--font-text-sm-line-height) !important;
|
|
48
64
|
/* Sonner pins font-weight: 500; keep that for title-only toasts and only
|
|
49
65
|
lift to semibold when a description sits alongside (so the title is
|
|
50
66
|
visually anchored against the secondary text). */
|
|
@@ -53,10 +69,13 @@
|
|
|
53
69
|
}.Content:has(.Description) .Title {
|
|
54
70
|
font-weight: var(--font-weight-semibold) !important;
|
|
55
71
|
}.Description {
|
|
56
|
-
|
|
72
|
+
/* Sonner's unlayered [data-description] sets line-height: 1.4 and its own gray (below) */
|
|
57
73
|
font-size: var(--font-text-sm-size);
|
|
58
|
-
line-height: var(--font-text-sm-line-height);
|
|
74
|
+
line-height: var(--font-text-sm-line-height) !important;
|
|
59
75
|
text-wrap: pretty;
|
|
76
|
+
}/* Sonner's unlayered stylesheet paints the description #3f3f3f (91% in dark); a toast with rich
|
|
77
|
+
colors keeps Sonner's inherited color. */.Toast:not([data-rich-colors="true"]) .Description {
|
|
78
|
+
color: var(--color-text-secondary) !important;
|
|
60
79
|
}.Content {
|
|
61
80
|
gap: 0 !important;
|
|
62
81
|
}.Icon {
|
|
@@ -80,6 +99,24 @@
|
|
|
80
99
|
}.CancelButton {
|
|
81
100
|
color: var(--color-text-secondary) !important;
|
|
82
101
|
font-weight: var(--font-weight-medium);
|
|
102
|
+
}/* The close face: 20 across at the toast's corner, its X in the text color and a
|
|
103
|
+
ring an outline Button draws, which shows on the dark surface too (Sonner's
|
|
104
|
+
dark ring takes --normal-border, transparent here). An invisible 4px rim
|
|
105
|
+
around its 18px inner box makes the target 26, past the 24 of WCAG 2.5.8.
|
|
106
|
+
A toast with rich colors keeps Sonner's tinted face. */.Toast[data-styled="true"]:not([data-rich-colors="true"]) > [data-close-button] {
|
|
107
|
+
border-color: var(--color-border-secondary-outline) !important;
|
|
108
|
+
color: var(--color-text) !important;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@media (hover: hover) and (pointer: fine) {
|
|
112
|
+
.Toast[data-styled="true"]:not([data-rich-colors="true"]) > [data-close-button]:hover:where(:not(:root[data-input="touch"] *)) {
|
|
113
|
+
border-color: var(--color-border-secondary-outline-hover) !important;
|
|
114
|
+
}
|
|
115
|
+
}.Toast[data-styled="true"] > [data-close-button]::after {
|
|
116
|
+
position: absolute;
|
|
117
|
+
inset: -4px;
|
|
118
|
+
border-radius: 50%;
|
|
119
|
+
content: "";
|
|
83
120
|
}.Toast :is([data-button], [data-close-button]):disabled {
|
|
84
121
|
cursor: not-allowed;
|
|
85
122
|
opacity: 0.5;
|
|
@@ -107,8 +144,9 @@
|
|
|
107
144
|
outline-offset: 2px;
|
|
108
145
|
}.Toast :is([data-button], [data-close-button]):focus-visible {
|
|
109
146
|
box-shadow: none !important;
|
|
110
|
-
}/*
|
|
111
|
-
These targets and wrapping rules adapt Sonner's controls for
|
|
147
|
+
}/* A toast stays an in-app web message: it takes the look of an iOS notification banner on a phone
|
|
148
|
+
(below) but not its behavior. These targets and wrapping rules adapt Sonner's controls for touch:
|
|
149
|
+
an action stands under the message, which keeps the toast's width. */@media (max-width: 767px), (pointer: coarse) {
|
|
112
150
|
.Toast[data-styled="true"] {
|
|
113
151
|
flex-wrap: wrap;
|
|
114
152
|
}
|
|
@@ -154,16 +192,166 @@
|
|
|
154
192
|
z-index: -1;
|
|
155
193
|
inset: 12px;
|
|
156
194
|
box-sizing: border-box;
|
|
157
|
-
border: 1px solid var(--
|
|
195
|
+
border: 1px solid var(--color-border-secondary-outline);
|
|
158
196
|
border-radius: 50%;
|
|
159
197
|
background: var(--normal-bg);
|
|
160
198
|
content: "";
|
|
161
199
|
pointer-events: none;
|
|
162
200
|
}
|
|
163
201
|
|
|
202
|
+
/* The 44 target is the button itself */
|
|
203
|
+
.Toast[data-styled="true"] > [data-close-button]::after {
|
|
204
|
+
content: none;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* Only the face answers a hover: the whole target stays clear */
|
|
208
|
+
.Toast[data-styled="true"] > [data-close-button]:hover::before {
|
|
209
|
+
border-color: var(--color-border-secondary-outline-hover);
|
|
210
|
+
}
|
|
211
|
+
|
|
164
212
|
.Toaster[dir="rtl"] .Toast[data-styled="true"] > [data-close-button] {
|
|
165
213
|
left: auto !important;
|
|
166
214
|
right: 0 !important;
|
|
167
215
|
}
|
|
168
216
|
}
|
|
217
|
+
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] {
|
|
218
|
+
flex-wrap: wrap;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] > .Content {
|
|
222
|
+
flex: 1 1 calc(100% - 28px);
|
|
223
|
+
min-width: 0;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] > :is(.ActionButton, .CancelButton) {
|
|
227
|
+
box-sizing: border-box;
|
|
228
|
+
flex: 0 1 auto !important;
|
|
229
|
+
min-width: 44px;
|
|
230
|
+
max-width: 100%;
|
|
231
|
+
min-height: 44px;
|
|
232
|
+
height: auto !important;
|
|
233
|
+
padding: 8px 10px !important;
|
|
234
|
+
margin-inline: 0 !important;
|
|
235
|
+
line-height: var(--font-text-sm-line-height);
|
|
236
|
+
white-space: normal;
|
|
237
|
+
overflow-wrap: anywhere;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* The 20px close face stays compact inside a separate 44px target. Reserve
|
|
241
|
+
the leading space so neither its target nor its ring covers the message. */
|
|
242
|
+
:where([data-plex-layout="phone"]) .Toast[data-styled="true"]:has([data-close-button]) {
|
|
243
|
+
padding-inline-start: 56px !important;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] > [data-close-button] {
|
|
247
|
+
top: 0 !important;
|
|
248
|
+
left: 0 !important;
|
|
249
|
+
right: auto !important;
|
|
250
|
+
width: 44px !important;
|
|
251
|
+
height: 44px !important;
|
|
252
|
+
border: 0 !important;
|
|
253
|
+
background: transparent !important;
|
|
254
|
+
transform: none !important;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] > [data-close-button]::before {
|
|
258
|
+
position: absolute;
|
|
259
|
+
z-index: -1;
|
|
260
|
+
inset: 12px;
|
|
261
|
+
box-sizing: border-box;
|
|
262
|
+
border: 1px solid var(--color-border-secondary-outline);
|
|
263
|
+
border-radius: 50%;
|
|
264
|
+
background: var(--normal-bg);
|
|
265
|
+
content: "";
|
|
266
|
+
pointer-events: none;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/* The 44 target is the button itself */
|
|
270
|
+
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] > [data-close-button]::after {
|
|
271
|
+
content: none;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/* Only the face answers a hover: the whole target stays clear */
|
|
275
|
+
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] > [data-close-button]:hover::before {
|
|
276
|
+
border-color: var(--color-border-secondary-outline-hover);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
:where([data-plex-layout="phone"]) .Toaster[dir="rtl"] .Toast[data-styled="true"] > [data-close-button] {
|
|
280
|
+
left: auto !important;
|
|
281
|
+
right: 0 !important;
|
|
282
|
+
}/* On a phone a toast takes the corners, padding and text of the iOS notification banner, the
|
|
283
|
+
system's own message at the top of the screen (kit iOS 27, Notifications, Notification - Collapsed
|
|
284
|
+
Stack=1 0:11292): corners 24, padding 14, a 10px gap, the title at 15/17 semibold and the
|
|
285
|
+
description at 15/18. The kit's -0.23 tracking of 15pt text is left to the system font, which
|
|
286
|
+
tracks it itself. It keeps its own width and opaque surface, not the banner's glass and width. Its buttons are drawn as a medium phone Button (touch.css): a 34px capsule,
|
|
287
|
+
15/20 regular, gutter 14, centered in the 44px target above. */@media (max-width: 767px) {
|
|
288
|
+
.Toast[data-styled="true"] {
|
|
289
|
+
gap: 10px !important;
|
|
290
|
+
padding: 14px !important;
|
|
291
|
+
border-radius: 24px !important;
|
|
292
|
+
letter-spacing: normal;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.Toast[data-styled="true"] .Title,
|
|
296
|
+
.Toast[data-styled="true"] .Description {
|
|
297
|
+
font-size: 15px;
|
|
298
|
+
line-height: 18px !important;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.Toast[data-styled="true"] .Title {
|
|
302
|
+
line-height: 17px !important;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.Toast[data-styled="true"] > :is(.ActionButton, .CancelButton) {
|
|
306
|
+
position: relative;
|
|
307
|
+
min-height: 34px;
|
|
308
|
+
margin-block: 5px !important;
|
|
309
|
+
padding: 7px 14px !important;
|
|
310
|
+
border-radius: var(--radius-full) !important;
|
|
311
|
+
font-size: 15px !important;
|
|
312
|
+
font-weight: var(--font-weight-normal) !important;
|
|
313
|
+
line-height: 20px;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/* The 44px target reaches 5px past the capsule above and below */
|
|
317
|
+
.Toast[data-styled="true"] > :is(.ActionButton, .CancelButton)::after {
|
|
318
|
+
position: absolute;
|
|
319
|
+
inset: -5px 0;
|
|
320
|
+
content: "";
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] {
|
|
324
|
+
gap: 10px !important;
|
|
325
|
+
padding: 14px !important;
|
|
326
|
+
border-radius: 24px !important;
|
|
327
|
+
letter-spacing: normal;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] .Title,
|
|
331
|
+
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] .Description {
|
|
332
|
+
font-size: 15px;
|
|
333
|
+
line-height: 18px !important;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] .Title {
|
|
337
|
+
line-height: 17px !important;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] > :is(.ActionButton, .CancelButton) {
|
|
341
|
+
position: relative;
|
|
342
|
+
min-height: 34px;
|
|
343
|
+
margin-block: 5px !important;
|
|
344
|
+
padding: 7px 14px !important;
|
|
345
|
+
border-radius: var(--radius-full) !important;
|
|
346
|
+
font-size: 15px !important;
|
|
347
|
+
font-weight: var(--font-weight-normal) !important;
|
|
348
|
+
line-height: 20px;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/* The 44px target reaches 5px past the capsule above and below */
|
|
352
|
+
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] > :is(.ActionButton, .CancelButton)::after {
|
|
353
|
+
position: absolute;
|
|
354
|
+
inset: -5px 0;
|
|
355
|
+
content: "";
|
|
356
|
+
}
|
|
169
357
|
}
|