@plexui/styles 0.1.7 → 0.1.9
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/Button/Button.module.css +1 -1
- package/dist/es/components/DateRangePicker/Calendar.module.css +9 -6
- package/dist/es/components/Dialog/Dialog.module.css +28 -6
- package/dist/es/components/Menu/Menu.module.css +3 -3
- package/dist/es/components/Popover/Popover.module.css +3 -3
- package/dist/es/components/Select/Select.module.css +10 -3
- package/dist/es/styles/touch.css +9 -0
- package/dist/es/styles/variables-components.css +8 -0
- package/dist/es/styles/variables-semantic.css +20 -3
- package/package.json +1 -1
|
@@ -604,7 +604,7 @@
|
|
|
604
604
|
}
|
|
605
605
|
|
|
606
606
|
.Button[data-variant="outline"]::before {
|
|
607
|
-
background-color:
|
|
607
|
+
background-color: var(--button-outline-background);
|
|
608
608
|
box-shadow:
|
|
609
609
|
0 0 0 1px var(--button-border-color) inset,
|
|
610
610
|
var(--button-shadow-custom, 0 0 #00000000);
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
@layer components {.CalendarContainer {
|
|
2
|
+
--cell-size: var(--date-range-cell-size);
|
|
3
|
+
--cell-vertical-gutter: 2px;
|
|
4
|
+
--calendar-width: calc(var(--cell-size) * 7);
|
|
5
|
+
/* From one calendar to the next, with the gap between them */
|
|
6
|
+
--calendar-step: calc(var(--calendar-width) + 32px);
|
|
7
|
+
|
|
2
8
|
position: relative;
|
|
3
|
-
width:
|
|
9
|
+
width: var(--calendar-width);
|
|
4
10
|
/* Default size of the calendar is assumed to be 224px */
|
|
5
11
|
/* and then is dynamically set via JS measuring */
|
|
6
12
|
height: 224px;
|
|
7
13
|
}
|
|
8
14
|
|
|
9
15
|
@media (min-width: 576px) {.CalendarContainer {
|
|
10
|
-
width:
|
|
16
|
+
width: calc(var(--calendar-width) * 2 + 32px);
|
|
11
17
|
}
|
|
12
18
|
}.Previous {
|
|
13
19
|
position: absolute;
|
|
@@ -93,12 +99,9 @@
|
|
|
93
99
|
[data-active] .ButtonText {
|
|
94
100
|
font-weight: var(--font-weight-semibold);
|
|
95
101
|
}.Calendar {
|
|
96
|
-
--cell-size: 30px;
|
|
97
|
-
--cell-vertical-gutter: 2px;
|
|
98
|
-
|
|
99
102
|
position: absolute;
|
|
100
103
|
top: 0;
|
|
101
|
-
width:
|
|
104
|
+
width: var(--calendar-width);
|
|
102
105
|
font-size: 14px;
|
|
103
106
|
}.Week {
|
|
104
107
|
display: flex;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
.Transition[data-entering-active] .Overlay,
|
|
15
15
|
.Transition[data-entering][data-interrupted] .Overlay {
|
|
16
16
|
opacity: 1;
|
|
17
|
-
transition: opacity
|
|
17
|
+
transition: opacity var(--motion-enter) var(--cubic-enter);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.Transition[data-exiting] .Overlay {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
.Transition[data-exiting-active] .Overlay,
|
|
25
25
|
.Transition[data-exiting][data-interrupted] .Overlay {
|
|
26
26
|
opacity: 0;
|
|
27
|
-
transition: opacity
|
|
27
|
+
transition: opacity var(--motion-exit) var(--cubic-exit-snappy);
|
|
28
28
|
}.Content {
|
|
29
29
|
/* Placement presets set these; the panel and this layer read them */
|
|
30
30
|
--dialog-content-align: center;
|
|
@@ -37,6 +37,9 @@
|
|
|
37
37
|
--dialog-panel-radius: var(--dialog-panel-corner);
|
|
38
38
|
--dialog-panel-padding-bottom: 1.25rem;
|
|
39
39
|
--dialog-panel-hidden-transform: scale(0.95) translateY(8px);
|
|
40
|
+
--dialog-enter-duration: var(--motion-enter);
|
|
41
|
+
--dialog-exit-duration: var(--motion-exit);
|
|
42
|
+
--dialog-exit-easing: var(--cubic-exit-snappy);
|
|
40
43
|
|
|
41
44
|
position: fixed;
|
|
42
45
|
inset: 0;
|
|
@@ -86,7 +89,9 @@
|
|
|
86
89
|
.Transition[data-entering][data-interrupted] .Panel {
|
|
87
90
|
opacity: 1;
|
|
88
91
|
transform: scale(1) translateY(0);
|
|
89
|
-
transition:
|
|
92
|
+
transition:
|
|
93
|
+
opacity var(--dialog-enter-duration) var(--cubic-enter),
|
|
94
|
+
transform var(--dialog-enter-duration) var(--cubic-enter);
|
|
90
95
|
}
|
|
91
96
|
|
|
92
97
|
.Transition[data-exiting] .Panel {
|
|
@@ -98,7 +103,9 @@
|
|
|
98
103
|
.Transition[data-exiting][data-interrupted] .Panel {
|
|
99
104
|
opacity: 0;
|
|
100
105
|
transform: var(--dialog-panel-hidden-transform);
|
|
101
|
-
transition:
|
|
106
|
+
transition:
|
|
107
|
+
opacity var(--dialog-exit-duration) var(--dialog-exit-easing),
|
|
108
|
+
transform var(--dialog-exit-duration) var(--dialog-exit-easing);
|
|
102
109
|
}/* =============================================
|
|
103
110
|
Placement: `placement` everywhere, `mobilePlacement` at 640px and below
|
|
104
111
|
============================================= */.Content:where([data-placement="top"]) {
|
|
@@ -113,6 +120,9 @@
|
|
|
113
120
|
--dialog-panel-radius: var(--dialog-panel-corner) var(--dialog-panel-corner) 0 0;
|
|
114
121
|
--dialog-panel-padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
|
|
115
122
|
--dialog-panel-hidden-transform: translateY(100%);
|
|
123
|
+
--dialog-enter-duration: var(--motion-enter-large);
|
|
124
|
+
--dialog-exit-duration: var(--motion-exit-large);
|
|
125
|
+
--dialog-exit-easing: var(--cubic-exit);
|
|
116
126
|
}.Content:where([data-placement="start"], [data-placement="end"]) {
|
|
117
127
|
--dialog-content-align: stretch;
|
|
118
128
|
--dialog-content-padding: 0;
|
|
@@ -120,6 +130,9 @@
|
|
|
120
130
|
--dialog-panel-max-height: none;
|
|
121
131
|
--dialog-panel-radius: 0;
|
|
122
132
|
--dialog-panel-padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
|
|
133
|
+
--dialog-enter-duration: var(--motion-enter-large);
|
|
134
|
+
--dialog-exit-duration: var(--motion-exit-large);
|
|
135
|
+
--dialog-exit-easing: var(--cubic-exit);
|
|
123
136
|
}.Content:where([data-placement="start"]) {
|
|
124
137
|
--dialog-content-justify: flex-start;
|
|
125
138
|
--dialog-panel-hidden-transform: translateX(-100%);
|
|
@@ -149,6 +162,9 @@
|
|
|
149
162
|
--dialog-panel-radius: var(--dialog-panel-corner);
|
|
150
163
|
--dialog-panel-padding-bottom: 1.25rem;
|
|
151
164
|
--dialog-panel-hidden-transform: scale(0.95) translateY(8px);
|
|
165
|
+
--dialog-enter-duration: var(--motion-enter);
|
|
166
|
+
--dialog-exit-duration: var(--motion-exit);
|
|
167
|
+
--dialog-exit-easing: var(--cubic-exit-snappy);
|
|
152
168
|
}
|
|
153
169
|
|
|
154
170
|
.Content:where([data-mobile-placement="bottom"]) {
|
|
@@ -161,6 +177,9 @@
|
|
|
161
177
|
--dialog-panel-radius: var(--dialog-panel-corner) var(--dialog-panel-corner) 0 0;
|
|
162
178
|
--dialog-panel-padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
|
|
163
179
|
--dialog-panel-hidden-transform: translateY(100%);
|
|
180
|
+
--dialog-enter-duration: var(--motion-enter-large);
|
|
181
|
+
--dialog-exit-duration: var(--motion-exit-large);
|
|
182
|
+
--dialog-exit-easing: var(--cubic-exit);
|
|
164
183
|
}
|
|
165
184
|
|
|
166
185
|
.Content:where([data-mobile-placement="fullscreen"]) {
|
|
@@ -173,6 +192,9 @@
|
|
|
173
192
|
--dialog-panel-radius: 0;
|
|
174
193
|
--dialog-panel-padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
|
|
175
194
|
--dialog-panel-hidden-transform: translateY(8px);
|
|
195
|
+
--dialog-enter-duration: var(--motion-enter);
|
|
196
|
+
--dialog-exit-duration: var(--motion-exit);
|
|
197
|
+
--dialog-exit-easing: var(--cubic-exit-snappy);
|
|
176
198
|
}
|
|
177
199
|
}.CloseButton {
|
|
178
200
|
position: absolute;
|
|
@@ -185,14 +207,14 @@
|
|
|
185
207
|
height: 2rem;
|
|
186
208
|
border: 0;
|
|
187
209
|
border-radius: 0.5rem;
|
|
188
|
-
background:
|
|
210
|
+
background: var(--dialog-close-background);
|
|
189
211
|
color: var(--color-text-tertiary);
|
|
190
212
|
cursor: pointer;
|
|
191
213
|
transition: background-color 0.2s var(--cubic-enter), color 0.2s var(--cubic-enter);
|
|
192
214
|
}
|
|
193
215
|
|
|
194
216
|
.CloseButton:hover {
|
|
195
|
-
background:
|
|
217
|
+
background: var(--dialog-close-background-hover);
|
|
196
218
|
color: var(--color-text);
|
|
197
219
|
}
|
|
198
220
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
.Menu[data-entering][data-interrupted] .MenuList {
|
|
40
40
|
opacity: 1;
|
|
41
41
|
transform: scale(1);
|
|
42
|
-
transition-duration:
|
|
42
|
+
transition-duration: var(--motion-enter);
|
|
43
43
|
transition-property: opacity, transform;
|
|
44
44
|
transition-timing-function: var(--cubic-enter);
|
|
45
45
|
}
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
.Menu[data-exiting][data-interrupted] .MenuList {
|
|
54
54
|
opacity: 0;
|
|
55
55
|
transform: scale(0.95);
|
|
56
|
-
transition-duration:
|
|
56
|
+
transition-duration: var(--motion-exit);
|
|
57
57
|
transition-property: opacity, transform;
|
|
58
|
-
transition-timing-function: var(--cubic-exit);
|
|
58
|
+
transition-timing-function: var(--cubic-exit-snappy);
|
|
59
59
|
}.MenuItemContent {
|
|
60
60
|
padding: var(--menu-item-padding);
|
|
61
61
|
}
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
.Transition[data-entering][data-interrupted] .Popover {
|
|
44
44
|
opacity: 1;
|
|
45
45
|
transform: scale(1);
|
|
46
|
-
transition-duration:
|
|
46
|
+
transition-duration: var(--motion-enter);
|
|
47
47
|
transition-property: opacity, transform;
|
|
48
48
|
transition-timing-function: var(--cubic-enter);
|
|
49
49
|
}
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
.Transition[data-exiting][data-interrupted] .Popover {
|
|
58
58
|
opacity: 0;
|
|
59
59
|
transform: scale(0.95);
|
|
60
|
-
transition-duration:
|
|
60
|
+
transition-duration: var(--motion-exit);
|
|
61
61
|
transition-property: opacity, transform;
|
|
62
|
-
transition-timing-function: var(--cubic-exit);
|
|
62
|
+
transition-timing-function: var(--cubic-exit-snappy);
|
|
63
63
|
}@keyframes shake {
|
|
64
64
|
0% {
|
|
65
65
|
transform: translateX(0);
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
--menu-gutter: var(--menu-pill-gutter);
|
|
8
8
|
--menu-item-padding: var(--menu-pill-item-padding);
|
|
9
9
|
--menu-separator-gutter: var(--menu-pill-separator-gutter);
|
|
10
|
+
--menu-search-gutter: 12px;
|
|
10
11
|
}.MenuList {
|
|
11
12
|
z-index: 50;
|
|
12
13
|
/* Default to the width of the trigger */
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
.Menu[data-entering][data-interrupted] .MenuList {
|
|
37
38
|
opacity: 1;
|
|
38
39
|
transform: scale(1);
|
|
39
|
-
transition-duration:
|
|
40
|
+
transition-duration: var(--motion-enter);
|
|
40
41
|
transition-property: opacity, transform;
|
|
41
42
|
transition-timing-function: var(--cubic-enter);
|
|
42
43
|
}
|
|
@@ -50,9 +51,9 @@
|
|
|
50
51
|
.Menu[data-exiting][data-interrupted] .MenuList {
|
|
51
52
|
opacity: 0;
|
|
52
53
|
transform: scale(0.95);
|
|
53
|
-
transition-duration:
|
|
54
|
+
transition-duration: var(--motion-exit);
|
|
54
55
|
transition-property: opacity, transform;
|
|
55
|
-
transition-timing-function: var(--cubic-exit);
|
|
56
|
+
transition-timing-function: var(--cubic-exit-snappy);
|
|
56
57
|
}.MenuInner {
|
|
57
58
|
display: flex;
|
|
58
59
|
flex-direction: column;
|
|
@@ -306,6 +307,12 @@ background: var(--gray-25);
|
|
|
306
307
|
}/* =============================================
|
|
307
308
|
Search
|
|
308
309
|
============================================= */.Search {
|
|
310
|
+
/* The search icon starts on the left edge of the option text, at any size */
|
|
311
|
+
--control-gutter-pill-scaling: 1;
|
|
312
|
+
--control-gutter-xs: var(--menu-search-gutter, 8px);
|
|
313
|
+
--control-gutter-sm: var(--menu-search-gutter, 8px);
|
|
314
|
+
--control-gutter-md: var(--menu-search-gutter, 8px);
|
|
315
|
+
--control-gutter-lg: var(--menu-search-gutter, 8px);
|
|
309
316
|
position: relative;
|
|
310
317
|
padding: var(--menu-gutter) var(--menu-gutter) 0;
|
|
311
318
|
}/* Override fill for Search icon to apply fill-secondary class correctly *//* Need !important to override fill="currentColor" attribute in SVG path *//* Target SVG with fill prop and its path children */.Search svg[fill],
|
package/dist/es/styles/touch.css
CHANGED
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
--menu-separator-gutter: 10px 14px;
|
|
38
38
|
--menu-pill-gutter: 10px;
|
|
39
39
|
--menu-pill-item-padding: 10px 14px 10px 12px;
|
|
40
|
+
--menu-search-gutter: 12px;
|
|
40
41
|
--menu-pill-separator-gutter: 10px 14px;
|
|
41
42
|
--menu-checkbox-indicator-size: 24px;
|
|
42
43
|
--menu-label-padding: 4px 14px 10px;
|
|
@@ -89,3 +90,11 @@
|
|
|
89
90
|
--menu-min-width: 238px !important;
|
|
90
91
|
}
|
|
91
92
|
}
|
|
93
|
+
|
|
94
|
+
/* One calendar on a phone: a whole cell to the finger, narrower only where
|
|
95
|
+
seven of them would not fit between the popover's edges */
|
|
96
|
+
@media (max-width: 575px) {
|
|
97
|
+
html:root {
|
|
98
|
+
--date-range-cell-size: min(44px, calc((100vw - 64px) / 7));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
--button-gap-md: 4px;
|
|
86
86
|
--button-gap-lg: 6px;
|
|
87
87
|
--button-font-weight: var(--font-weight-medium);
|
|
88
|
+
--button-outline-background: transparent;
|
|
88
89
|
|
|
89
90
|
/* =============================================
|
|
90
91
|
Card
|
|
@@ -161,6 +162,11 @@
|
|
|
161
162
|
--accordion-transition-duration: var(--transition-duration-basic);
|
|
162
163
|
--accordion-transition-ease: var(--transition-ease-basic);
|
|
163
164
|
|
|
165
|
+
/* =============================================
|
|
166
|
+
DateRangePicker
|
|
167
|
+
============================================= */
|
|
168
|
+
--date-range-cell-size: 30px;
|
|
169
|
+
|
|
164
170
|
/* =============================================
|
|
165
171
|
Checkbox
|
|
166
172
|
============================================= */
|
|
@@ -269,6 +275,8 @@
|
|
|
269
275
|
--dialog-max-width: 450px;
|
|
270
276
|
--dialog-container-inner-padding: calc(var(--spacing) * 5);
|
|
271
277
|
--dialog-backdrop-fade-background: color-mix(in oklab, var(--color-surface-elevated) 60%, transparent);
|
|
278
|
+
--dialog-close-background: transparent;
|
|
279
|
+
--dialog-close-background-hover: color-mix(in srgb, var(--color-text-tertiary) 12%, transparent);
|
|
272
280
|
|
|
273
281
|
/* =============================================
|
|
274
282
|
Menu
|
|
@@ -377,6 +377,13 @@
|
|
|
377
377
|
--cubic-move: cubic-bezier(0.65, 0, 0.35, 1);
|
|
378
378
|
--transition-duration-basic: 150ms;
|
|
379
379
|
--transition-ease-basic: ease;
|
|
380
|
+
/* Overlays: enter slower than they leave. `large` is a panel that crosses
|
|
381
|
+
the screen (sheet, side panel). The timers that unmount an overlay match
|
|
382
|
+
these: overlayTiming in components/Transition/shared. */
|
|
383
|
+
--motion-enter: 250ms;
|
|
384
|
+
--motion-enter-large: 300ms;
|
|
385
|
+
--motion-exit: 150ms;
|
|
386
|
+
--motion-exit-large: 200ms;
|
|
380
387
|
|
|
381
388
|
/* =============================================
|
|
382
389
|
Scrollbar
|
|
@@ -519,7 +526,7 @@
|
|
|
519
526
|
--color-surface-secondary: var(--gray-50);
|
|
520
527
|
--color-surface-tertiary: var(--gray-75);
|
|
521
528
|
--color-surface-elevated: var(--gray-0);
|
|
522
|
-
--color-surface-elevated-secondary: var(--gray-50)
|
|
529
|
+
--color-surface-elevated-secondary: var(--gray-50);
|
|
523
530
|
}
|
|
524
531
|
:where([data-theme="dark"]) {
|
|
525
532
|
--color-text-secondary: var(--gray-700);
|
|
@@ -587,7 +594,7 @@
|
|
|
587
594
|
--color-background-danger-soft: color-mix(in oklab, var(--red-400) 25%, var(--gray-100));
|
|
588
595
|
--color-background-danger-soft-hover: color-mix(in oklab, var(--red-400) 40%, var(--gray-100));
|
|
589
596
|
--color-background-danger-soft-active: color-mix(in oklab, var(--red-400) 40%, var(--gray-100));
|
|
590
|
-
--color-text-danger-soft: var(--red-
|
|
597
|
+
--color-text-danger-soft: var(--red-200);
|
|
591
598
|
--color-background-danger-surface: var(--red-a50);
|
|
592
599
|
--color-border-danger-surface: var(--red-a50);
|
|
593
600
|
--color-text-danger-surface: var(--red-400);
|
|
@@ -624,6 +631,16 @@
|
|
|
624
631
|
--color-surface-secondary: var(--gray-100);
|
|
625
632
|
--color-surface-tertiary: var(--gray-50);
|
|
626
633
|
--color-surface-elevated: var(--gray-300);
|
|
627
|
-
--color-surface-elevated-secondary: var(--gray-400)
|
|
634
|
+
--color-surface-elevated-secondary: var(--gray-400);
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
@media (prefers-reduced-motion: reduce) {
|
|
638
|
+
:root,
|
|
639
|
+
:where([data-theme]) {
|
|
640
|
+
--motion-enter: 0ms;
|
|
641
|
+
--motion-enter-large: 0ms;
|
|
642
|
+
--motion-exit: 0ms;
|
|
643
|
+
--motion-exit-large: 0ms;
|
|
644
|
+
}
|
|
628
645
|
}
|
|
629
646
|
}
|