@plexui/styles 0.1.0 → 0.1.2
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/Checkbox/Checkbox.module.css +2 -2
- package/dist/es/components/Dialog/Dialog.module.css +11 -6
- package/dist/es/components/Menu/Menu.module.css +8 -6
- package/dist/es/components/Select/Select.module.css +6 -4
- package/dist/es/components/Sidebar/Sidebar.module.css +3 -3
- package/dist/es/components/Slider/Slider.module.css +8 -0
- package/dist/es/styles/touch.css +88 -0
- package/package.json +1 -1
|
@@ -157,8 +157,8 @@ background-color: var(--gray-800);
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
/* Ghost variant — checkmark uses text color instead of white */
|
|
160
|
-
[data-variant="ghost"] .CheckMark::before,
|
|
161
|
-
[data-variant="ghost"] .CheckMark::after {
|
|
160
|
+
.Checkbox[data-variant="ghost"] .CheckMark::before,
|
|
161
|
+
.Checkbox[data-variant="ghost"] .CheckMark::after {
|
|
162
162
|
background: var(--gray-900);
|
|
163
163
|
}
|
|
164
164
|
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
--dialog-panel-width: var(--dialog-width, 480px);
|
|
34
34
|
--dialog-panel-height: auto;
|
|
35
35
|
--dialog-panel-max-height: calc(100dvh - 2rem);
|
|
36
|
-
--dialog-panel-
|
|
36
|
+
--dialog-panel-corner: var(--radius-xl);
|
|
37
|
+
--dialog-panel-radius: var(--dialog-panel-corner);
|
|
37
38
|
--dialog-panel-padding-bottom: 1.25rem;
|
|
38
39
|
--dialog-panel-hidden-transform: scale(0.95) translateY(8px);
|
|
39
40
|
|
|
@@ -52,7 +53,9 @@
|
|
|
52
53
|
|
|
53
54
|
.Content:focus {
|
|
54
55
|
outline: none;
|
|
55
|
-
}.
|
|
56
|
+
}.Content[data-pill] {
|
|
57
|
+
--dialog-panel-corner: var(--dialog-radius-pill, 24px);
|
|
58
|
+
}.Panel {
|
|
56
59
|
position: relative;
|
|
57
60
|
display: flex;
|
|
58
61
|
flex-direction: column;
|
|
@@ -107,7 +110,7 @@
|
|
|
107
110
|
--dialog-content-align: flex-end;
|
|
108
111
|
--dialog-content-padding: 0;
|
|
109
112
|
--dialog-panel-width: 100%;
|
|
110
|
-
--dialog-panel-radius: var(--
|
|
113
|
+
--dialog-panel-radius: var(--dialog-panel-corner) var(--dialog-panel-corner) 0 0;
|
|
111
114
|
--dialog-panel-padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
|
|
112
115
|
--dialog-panel-hidden-transform: translateY(100%);
|
|
113
116
|
}.Content:where([data-placement="start"], [data-placement="end"]) {
|
|
@@ -143,7 +146,7 @@
|
|
|
143
146
|
--dialog-panel-width: var(--dialog-width, 480px);
|
|
144
147
|
--dialog-panel-height: auto;
|
|
145
148
|
--dialog-panel-max-height: calc(100dvh - 2rem);
|
|
146
|
-
--dialog-panel-radius: var(--
|
|
149
|
+
--dialog-panel-radius: var(--dialog-panel-corner);
|
|
147
150
|
--dialog-panel-padding-bottom: 1.25rem;
|
|
148
151
|
--dialog-panel-hidden-transform: scale(0.95) translateY(8px);
|
|
149
152
|
}
|
|
@@ -155,7 +158,7 @@
|
|
|
155
158
|
--dialog-panel-width: 100%;
|
|
156
159
|
--dialog-panel-height: auto;
|
|
157
160
|
--dialog-panel-max-height: calc(100dvh - 2rem);
|
|
158
|
-
--dialog-panel-radius: var(--
|
|
161
|
+
--dialog-panel-radius: var(--dialog-panel-corner) var(--dialog-panel-corner) 0 0;
|
|
159
162
|
--dialog-panel-padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
|
|
160
163
|
--dialog-panel-hidden-transform: translateY(100%);
|
|
161
164
|
}
|
|
@@ -196,7 +199,9 @@
|
|
|
196
199
|
.CloseButton:focus-visible {
|
|
197
200
|
outline: 2px solid var(--color-text);
|
|
198
201
|
outline-offset: 2px;
|
|
199
|
-
}.
|
|
202
|
+
}.Content[data-pill] .CloseButton {
|
|
203
|
+
border-radius: var(--radius-full);
|
|
204
|
+
}.CloseIcon {
|
|
200
205
|
display: block;
|
|
201
206
|
}.Header {
|
|
202
207
|
display: flex;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
@layer components {.Menu {
|
|
2
2
|
/* Top-level selector needs to exist */
|
|
3
|
+
}.MenuList[data-pill] {
|
|
4
|
+
--menu-radius: var(--menu-radius-pill, 22px);
|
|
3
5
|
}.MenuList {
|
|
4
6
|
z-index: 50;
|
|
5
7
|
overflow: auto;
|
|
@@ -93,7 +95,7 @@
|
|
|
93
95
|
position: absolute;
|
|
94
96
|
inset: 0;
|
|
95
97
|
display: block;
|
|
96
|
-
border-radius: calc(var(--menu-radius) - var(--menu-gutter));
|
|
98
|
+
border-radius: var(--menu-item-radius, calc(var(--menu-radius) - var(--menu-gutter)));
|
|
97
99
|
background: var(--menu-item-background-color);
|
|
98
100
|
content: "";
|
|
99
101
|
opacity: 0;
|
|
@@ -168,12 +170,12 @@
|
|
|
168
170
|
margin: var(--menu-separator-gutter);
|
|
169
171
|
background: var(--menu-separator-background-color);
|
|
170
172
|
}.MenuLabel {
|
|
171
|
-
padding: var(--menu-item-padding);
|
|
172
|
-
padding-bottom: calc(var(--spacing) * 0.5);
|
|
173
|
+
padding: var(--menu-label-padding, var(--menu-item-padding));
|
|
174
|
+
padding-bottom: var(--menu-label-padding-bottom, calc(var(--spacing) * 0.5));
|
|
173
175
|
color: var(--color-text-tertiary);
|
|
174
|
-
font-size: var(--font-text-xs-size);
|
|
175
|
-
font-weight: var(--font-weight-semibold);
|
|
176
|
-
line-height: var(--font-text-xs-line-height);
|
|
176
|
+
font-size: var(--menu-label-font-size, var(--font-text-xs-size));
|
|
177
|
+
font-weight: var(--menu-label-font-weight, var(--font-weight-semibold));
|
|
178
|
+
line-height: var(--menu-label-line-height, var(--font-text-xs-line-height));
|
|
177
179
|
-webkit-user-select: none;
|
|
178
180
|
-moz-user-select: none;
|
|
179
181
|
user-select: none;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Custom Select
|
|
3
3
|
============================================= */.Menu {
|
|
4
4
|
/* Top-level selector needs to exist */
|
|
5
|
+
}.MenuList[data-pill] {
|
|
6
|
+
--menu-radius: var(--menu-radius-pill, 22px);
|
|
5
7
|
}.MenuList {
|
|
6
8
|
z-index: 50;
|
|
7
9
|
/* Default to the width of the trigger */
|
|
@@ -84,7 +86,7 @@
|
|
|
84
86
|
position: absolute;
|
|
85
87
|
inset: 0;
|
|
86
88
|
display: block;
|
|
87
|
-
border-radius: calc(var(--menu-radius) - var(--menu-gutter));
|
|
89
|
+
border-radius: var(--menu-item-radius, calc(var(--menu-radius) - var(--menu-gutter)));
|
|
88
90
|
background: var(--menu-item-background-color);
|
|
89
91
|
content: "";
|
|
90
92
|
opacity: 0;
|
|
@@ -211,7 +213,7 @@
|
|
|
211
213
|
============================================= */.Action {
|
|
212
214
|
position: relative;
|
|
213
215
|
padding: var(--menu-item-padding);
|
|
214
|
-
border-radius: calc(var(--menu-radius) - var(--menu-gutter));
|
|
216
|
+
border-radius: var(--menu-item-radius, calc(var(--menu-radius) - var(--menu-gutter)));
|
|
215
217
|
cursor: pointer;
|
|
216
218
|
transition: background-color 0.15s ease;
|
|
217
219
|
}
|
|
@@ -221,7 +223,7 @@
|
|
|
221
223
|
position: absolute;
|
|
222
224
|
inset: 0;
|
|
223
225
|
display: block;
|
|
224
|
-
border-radius: calc(var(--menu-radius) - var(--menu-gutter));
|
|
226
|
+
border-radius: var(--menu-item-radius, calc(var(--menu-radius) - var(--menu-gutter)));
|
|
225
227
|
content: "";
|
|
226
228
|
opacity: 0;
|
|
227
229
|
transform: scale(var(--scale, 0.98));
|
|
@@ -242,7 +244,7 @@ background: var(--gray-25);
|
|
|
242
244
|
position: absolute;
|
|
243
245
|
inset: 0;
|
|
244
246
|
display: block;
|
|
245
|
-
border-radius: calc(var(--menu-radius) - var(--menu-gutter));
|
|
247
|
+
border-radius: var(--menu-item-radius, calc(var(--menu-radius) - var(--menu-gutter)));
|
|
246
248
|
content: "";
|
|
247
249
|
pointer-events: none;
|
|
248
250
|
transition-duration: 0.15s;
|
|
@@ -328,14 +328,14 @@
|
|
|
328
328
|
display: flex;
|
|
329
329
|
align-items: center;
|
|
330
330
|
width: 100%;
|
|
331
|
-
padding: 8px 12px;
|
|
331
|
+
padding: var(--sidebar-menu-sub-item-padding-y, 8px) 12px;
|
|
332
332
|
margin: var(--sidebar-menu-item-margin);
|
|
333
333
|
border: none;
|
|
334
334
|
border-radius: 0;
|
|
335
335
|
background: transparent;
|
|
336
336
|
color: var(--sidebar-menu-text);
|
|
337
|
-
font-size: 14px;
|
|
338
|
-
line-height: 20px;
|
|
337
|
+
font-size: var(--sidebar-menu-sub-item-font-size, 14px);
|
|
338
|
+
line-height: var(--sidebar-menu-sub-item-line-height, 20px);
|
|
339
339
|
text-decoration: none;
|
|
340
340
|
cursor: pointer;
|
|
341
341
|
-webkit-user-select: none;
|
|
@@ -8,6 +8,14 @@
|
|
|
8
8
|
opacity 250ms ease;
|
|
9
9
|
visibility: visible;
|
|
10
10
|
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Without hover the reset could never appear */
|
|
14
|
+
@media (hover: none) {
|
|
15
|
+
.SliderWrap .Reset[data-hide="false"] {
|
|
16
|
+
opacity: 1;
|
|
17
|
+
visibility: visible;
|
|
18
|
+
}
|
|
11
19
|
}.Slider {
|
|
12
20
|
position: relative;
|
|
13
21
|
display: flex;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Optional touch sizes for phones, from Apple's iOS and iPadOS 26 design
|
|
3
|
+
* resources. Below 768px every control takes one height, 44px, with text at
|
|
4
|
+
* 17px; menus and the mobile sidebar follow the iOS measures. Nothing changes
|
|
5
|
+
* unless this file is imported, after the main stylesheet:
|
|
6
|
+
*
|
|
7
|
+
* @import "@plexui/styles/styles/touch.css";
|
|
8
|
+
*
|
|
9
|
+
* Tokens only, so a size prop still picks the same token as on desktop. `3xl`
|
|
10
|
+
* stays large at 50px for the main action of a sign-in or checkout screen.
|
|
11
|
+
*/
|
|
12
|
+
@media (max-width: 767px) {
|
|
13
|
+
html:root {
|
|
14
|
+
--control-size-sm: 44px;
|
|
15
|
+
--control-size-md: 44px;
|
|
16
|
+
--control-size-lg: 44px;
|
|
17
|
+
--control-size-xl: 44px;
|
|
18
|
+
--control-size-3xl: 50px;
|
|
19
|
+
--control-gutter-sm: 14px;
|
|
20
|
+
--control-gutter-md: 14px;
|
|
21
|
+
--control-gutter-lg: 14px;
|
|
22
|
+
--control-gutter-xl: 20px;
|
|
23
|
+
--control-gutter-pill-scaling: 1;
|
|
24
|
+
--control-font-size-md: 17px;
|
|
25
|
+
--control-font-size-lg: 17px;
|
|
26
|
+
--button-gap-lg: 4px;
|
|
27
|
+
|
|
28
|
+
--segmented-control-gutter: 4px;
|
|
29
|
+
|
|
30
|
+
--menu-gutter: 10px;
|
|
31
|
+
--menu-radius: 32px;
|
|
32
|
+
--menu-radius-pill: 32px;
|
|
33
|
+
--menu-font-size: 17px;
|
|
34
|
+
--menu-line-height: 20px;
|
|
35
|
+
--menu-item-padding: 10px 14px 10px 12px;
|
|
36
|
+
--menu-item-gap: 6px;
|
|
37
|
+
--menu-separator-gutter: 10px 14px;
|
|
38
|
+
--menu-checkbox-indicator-size: 24px;
|
|
39
|
+
--menu-label-padding: 4px 14px 10px;
|
|
40
|
+
--menu-label-padding-bottom: 10px;
|
|
41
|
+
--menu-label-font-size: 13px;
|
|
42
|
+
--menu-label-font-weight: var(--font-weight-medium);
|
|
43
|
+
--menu-label-line-height: 15px;
|
|
44
|
+
|
|
45
|
+
--sidebar-menu-item-height: 44px;
|
|
46
|
+
--sidebar-menu-item-font-size: 17px;
|
|
47
|
+
--sidebar-menu-item-line-height: 22px;
|
|
48
|
+
--sidebar-menu-item-margin: 0;
|
|
49
|
+
--sidebar-menu-sub-item-padding-y: 11px;
|
|
50
|
+
--sidebar-menu-sub-item-font-size: 17px;
|
|
51
|
+
--sidebar-menu-sub-item-line-height: 22px;
|
|
52
|
+
--sidebar-icon-size: 20px;
|
|
53
|
+
|
|
54
|
+
--table-cell-font-size: 15px;
|
|
55
|
+
--table-cell-line-height: 20px;
|
|
56
|
+
|
|
57
|
+
--switch-track-width: 64px;
|
|
58
|
+
--switch-track-height: 28px;
|
|
59
|
+
--switch-thumb-offset: 2px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
html [data-mobile-placement="bottom"] {
|
|
63
|
+
--dialog-panel-radius: 38px 38px 0 0;
|
|
64
|
+
--dialog-panel-max-height: calc(100dvh - 10px);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
html [data-mobile-placement="center"] {
|
|
68
|
+
--dialog-panel-width: 300px;
|
|
69
|
+
--dialog-panel-radius: 34px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
html [role="radiogroup"] {
|
|
73
|
+
--segmented-control-font-size: 15px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
html [data-slot="input"] {
|
|
77
|
+
--input-font-size: 17px;
|
|
78
|
+
--input-gutter: 14px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
html [data-slot="input"][data-has-start-adornment] {
|
|
82
|
+
--input-gutter: 11px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
html [role="menu"] {
|
|
86
|
+
--menu-min-width: 238px !important;
|
|
87
|
+
}
|
|
88
|
+
}
|