@plexui/styles 0.1.32 → 0.1.33
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 +16 -0
- package/dist/es/components/Badge/Badge.module.css +41 -8
- package/dist/es/components/Breadcrumb/Breadcrumb.module.css +1 -1
- package/dist/es/components/Button/Button.module.css +117 -64
- package/dist/es/components/Button/NavigationButton.module.css +27 -0
- package/dist/es/components/Card/Card.module.css +5 -3
- package/dist/es/components/Checkbox/Checkbox.module.css +80 -41
- package/dist/es/components/DataTable/DataTable.module.css +31 -5
- package/dist/es/components/DatePicker/Calendar.module.css +267 -3
- package/dist/es/components/DatePicker/CalendarNavigationIcon.module.css +20 -0
- package/dist/es/components/DateRangePicker/Calendar.module.css +205 -3
- package/dist/es/components/Dialog/Dialog.module.css +214 -49
- package/dist/es/components/EmptyMessage/EmptyMessage.module.css +58 -14
- package/dist/es/components/Field/Field.module.css +164 -2
- package/dist/es/components/FieldError/FieldError.module.css +13 -10
- package/dist/es/components/FieldGroup/FieldGroup.module.css +44 -4
- package/dist/es/components/FileUpload/FileUpload.module.css +103 -10
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.module.css +25 -14
- package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.module.css +20 -14
- package/dist/es/components/Indicator/LoadingIndicator.module.css +41 -6
- package/dist/es/components/Input/Input.module.css +126 -25
- package/dist/es/components/InputGroup/InputGroup.module.css +1 -1
- package/dist/es/components/MarkdownEditor/MarkdownEditor.module.css +27 -147
- package/dist/es/components/Menu/Menu.module.css +162 -20
- package/dist/es/components/OTPInput/OTPInput.module.css +11 -3
- package/dist/es/components/Page/Page.module.css +140 -11
- package/dist/es/components/RadioGroup/RadioGroup.module.css +10 -10
- package/dist/es/components/Select/Select.module.css +118 -13
- package/dist/es/components/SelectControl/SelectControl.module.css +83 -11
- package/dist/es/components/ShimmerText/ShimmerText.module.css +7 -0
- package/dist/es/components/Sidebar/Sidebar.module.css +74 -18
- package/dist/es/components/Skeleton/Skeleton.module.css +4 -0
- package/dist/es/components/Slider/Slider.module.css +53 -16
- package/dist/es/components/Sortable/Sortable.module.css +13 -4
- package/dist/es/components/Switch/Switch.module.css +16 -7
- package/dist/es/components/Table/Table.module.css +4 -2
- package/dist/es/components/Tabs/Tabs.module.css +39 -6
- package/dist/es/components/TagInput/TagInput.module.css +64 -19
- package/dist/es/components/TextLink/TextLink.module.css +4 -4
- package/dist/es/components/Textarea/Textarea.module.css +1 -1
- package/dist/es/components/Toast/Toast.module.css +72 -2
- package/dist/es/components/Toolbar/Toolbar.module.css +389 -0
- package/dist/es/components/Tooltip/Tooltip.module.css +1 -1
- package/dist/es/styles/base.css +1 -1
- package/dist/es/styles/mobile-materials.css +27 -0
- package/dist/es/styles/mobile-surfaces.css +39 -0
- package/dist/es/styles/touch.css +280 -57
- package/dist/es/styles/variables-components.css +60 -0
- package/package.json +1 -1
- package/postcss/mixins.mjs +1 -1
|
@@ -211,11 +211,11 @@
|
|
|
211
211
|
transition-timing-function: var(--cubic-enter);
|
|
212
212
|
will-change: opacity, transform;
|
|
213
213
|
}/* Hover state */@media (hover: hover) and (pointer: fine) {
|
|
214
|
-
.MenuButton:hover {
|
|
214
|
+
.MenuButton:hover:where(:not(:root[data-input="touch"] *)) {
|
|
215
215
|
color: var(--sidebar-menu-text-active);
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
.MenuButton:hover::before {
|
|
218
|
+
.MenuButton:hover:where(:not(:root[data-input="touch"] *))::before {
|
|
219
219
|
opacity: 0.5;
|
|
220
220
|
transform: scale(1);
|
|
221
221
|
}
|
|
@@ -372,8 +372,17 @@
|
|
|
372
372
|
margin-left: auto;
|
|
373
373
|
opacity: 0;
|
|
374
374
|
transition: opacity var(--transition-duration-basic) var(--cubic-enter);
|
|
375
|
-
}.MenuItem:
|
|
376
|
-
|
|
375
|
+
}.MenuItem:focus-within .MenuAction {
|
|
376
|
+
opacity: 1;
|
|
377
|
+
}@media (hover: hover) and (pointer: fine) {
|
|
378
|
+
.MenuItem:hover:where(:not(:root[data-input="touch"] *)) .MenuAction {
|
|
379
|
+
opacity: 1;
|
|
380
|
+
}
|
|
381
|
+
}/* Touch actions remain discoverable without a hover state. */@media (hover: none), (pointer: coarse) {
|
|
382
|
+
.MenuAction {
|
|
383
|
+
opacity: 1;
|
|
384
|
+
}
|
|
385
|
+
}:where(:root[data-input="touch"]) .MenuAction {
|
|
377
386
|
opacity: 1;
|
|
378
387
|
}/* =============================================
|
|
379
388
|
Submenu
|
|
@@ -432,11 +441,11 @@
|
|
|
432
441
|
transition-timing-function: var(--cubic-enter);
|
|
433
442
|
will-change: opacity, transform;
|
|
434
443
|
}@media (hover: hover) and (pointer: fine) {
|
|
435
|
-
.MenuSubButton:hover {
|
|
444
|
+
.MenuSubButton:hover:where(:not(:root[data-input="touch"] *)) {
|
|
436
445
|
color: var(--sidebar-menu-text-active);
|
|
437
446
|
}
|
|
438
447
|
|
|
439
|
-
.MenuSubButton:hover::before {
|
|
448
|
+
.MenuSubButton:hover:where(:not(:root[data-input="touch"] *))::before {
|
|
440
449
|
opacity: 0.5;
|
|
441
450
|
transform: scale(1);
|
|
442
451
|
}
|
|
@@ -552,8 +561,10 @@
|
|
|
552
561
|
padding 0.15s ease,
|
|
553
562
|
margin 0.15s ease,
|
|
554
563
|
opacity 0.5s ease 0.25s;
|
|
555
|
-
}
|
|
556
|
-
|
|
564
|
+
}@media (hover: hover) and (pointer: fine) {
|
|
565
|
+
.Card:hover:where(:not(:root[data-input="touch"] *)) {
|
|
566
|
+
border-color: var(--color-border-strong);
|
|
567
|
+
}
|
|
557
568
|
}.CardHeader {
|
|
558
569
|
display: flex;
|
|
559
570
|
align-items: center;
|
|
@@ -586,9 +597,11 @@
|
|
|
586
597
|
transition:
|
|
587
598
|
opacity 0.15s ease,
|
|
588
599
|
transform 0.15s ease;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
|
|
600
|
+
}@media (hover: hover) and (pointer: fine) {
|
|
601
|
+
.Card:hover:where(:not(:root[data-input="touch"] *)) .CardTitleChevron {
|
|
602
|
+
opacity: 1;
|
|
603
|
+
transform: translateX(0);
|
|
604
|
+
}
|
|
592
605
|
}/* Hide card when collapsed - fully collapse height */:global([data-sidebar="collapsed"]) .Card {
|
|
593
606
|
height: 0;
|
|
594
607
|
padding: 0;
|
|
@@ -646,7 +659,7 @@
|
|
|
646
659
|
transition-timing-function: var(--cubic-enter);
|
|
647
660
|
will-change: opacity, transform;
|
|
648
661
|
}@media (hover: hover) and (pointer: fine) {
|
|
649
|
-
.Trigger:hover::before {
|
|
662
|
+
.Trigger:hover:where(:not(:root[data-input="touch"] *))::before {
|
|
650
663
|
opacity: 0.5;
|
|
651
664
|
}
|
|
652
665
|
}.Trigger:focus-visible::before {
|
|
@@ -713,8 +726,10 @@
|
|
|
713
726
|
content: "";
|
|
714
727
|
opacity: 0;
|
|
715
728
|
transition: opacity 0.15s ease;
|
|
716
|
-
}
|
|
717
|
-
|
|
729
|
+
}@media (hover: hover) and (pointer: fine) {
|
|
730
|
+
.MobileMenuButton:hover:where(:not(:root[data-input="touch"] *))::before {
|
|
731
|
+
opacity: 0.65;
|
|
732
|
+
}
|
|
718
733
|
}.MobileMenuButton:active::before,
|
|
719
734
|
.MobileMenuButton[data-expanded]::before {
|
|
720
735
|
opacity: 1;
|
|
@@ -873,7 +888,7 @@
|
|
|
873
888
|
.MobileBackdrop {
|
|
874
889
|
display: none;
|
|
875
890
|
}
|
|
876
|
-
}/*
|
|
891
|
+
}/* Containment changes positioning; keep the token-based drawer/backdrop stacking. */.MobileBackdrop.contained {
|
|
877
892
|
position: absolute;
|
|
878
893
|
}.MobileSidebar.contained {
|
|
879
894
|
position: absolute;
|
|
@@ -890,7 +905,6 @@
|
|
|
890
905
|
right: 0;
|
|
891
906
|
width: auto;
|
|
892
907
|
background: var(--color-surface);
|
|
893
|
-
z-index: 10;
|
|
894
908
|
}/* =============================================
|
|
895
909
|
Footer Links (horizontal layout)
|
|
896
910
|
============================================= */.FooterLinks {
|
|
@@ -923,10 +937,13 @@
|
|
|
923
937
|
.Sidebar[data-variant="docs"] .MenuButtonInner {
|
|
924
938
|
padding: 6px 12px;
|
|
925
939
|
}
|
|
926
|
-
}
|
|
940
|
+
}@media (hover: hover) and (pointer: fine) {
|
|
941
|
+
.Sidebar[data-variant="docs"] .MenuButton:hover:where(:not(:root[data-input="touch"] *)):not([data-active="true"]), :where([data-theme="light"]) .Sidebar[data-variant="docs"] .MenuButton:hover:where(:not(:root[data-input="touch"] *)):not([data-active="true"]) {
|
|
927
942
|
background: var(--gray-150);
|
|
928
|
-
}
|
|
943
|
+
}
|
|
944
|
+
:where([data-theme="dark"]) .Sidebar[data-variant="docs"] .MenuButton:hover:where(:not(:root[data-input="touch"] *)):not([data-active="true"]) {
|
|
929
945
|
background: var(--gray-300);
|
|
946
|
+
}
|
|
930
947
|
}.Sidebar[data-variant="docs"] .MenuButton[data-active="true"] {
|
|
931
948
|
color: var(--color-text);
|
|
932
949
|
}.Sidebar[data-variant="docs"] .MenuButton[data-active="true"], :where([data-theme="light"]) .Sidebar[data-variant="docs"] .MenuButton[data-active="true"] {
|
|
@@ -1143,5 +1160,44 @@ background: var(--gray-300);
|
|
|
1143
1160
|
margin-right: 36px;
|
|
1144
1161
|
}.SidebarLayout[dir="rtl"] .DocsNavChild.indent3 {
|
|
1145
1162
|
margin-right: 48px;
|
|
1163
|
+
}/* Sidebar owns timings beyond the global motion tokens, including literal
|
|
1164
|
+
delays on staggered rows and visibility. End states remain unchanged. */@media (prefers-reduced-motion: reduce) {
|
|
1165
|
+
.Sidebar,
|
|
1166
|
+
.HeaderTitle,
|
|
1167
|
+
.GroupLabel,
|
|
1168
|
+
.MenuButton,
|
|
1169
|
+
.MenuButtonLabel,
|
|
1170
|
+
.MenuBadge,
|
|
1171
|
+
.MenuAction,
|
|
1172
|
+
.MenuSubButton,
|
|
1173
|
+
.MenuSub,
|
|
1174
|
+
.MenuChevron,
|
|
1175
|
+
.Separator,
|
|
1176
|
+
.Card,
|
|
1177
|
+
.CardTitleChevron,
|
|
1178
|
+
.MobileMenuButton,
|
|
1179
|
+
.MobileMenuLine,
|
|
1180
|
+
.MobileMenuMiddle,
|
|
1181
|
+
.MobileBackdrop,
|
|
1182
|
+
.MobileSidebar,
|
|
1183
|
+
.MobileSidebar > *,
|
|
1184
|
+
.FooterLinks,
|
|
1185
|
+
.DocsNavChevron,
|
|
1186
|
+
.App .Header,
|
|
1187
|
+
.App .Header span,
|
|
1188
|
+
.App .Inset,
|
|
1189
|
+
:is(.MenuButton, .MenuSubButton, .Trigger, .MobileMenuButton, .MobileMenuLine)::before,
|
|
1190
|
+
.MenuButtonIcon::after,
|
|
1191
|
+
.MobileSidebar::after {
|
|
1192
|
+
/* Preference overrides every state/variant's duration and delay, including
|
|
1193
|
+
nth-child stagger rules; it does not target arbitrary descendants. */
|
|
1194
|
+
transition-duration: 0s !important;
|
|
1195
|
+
transition-delay: 0s !important;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
.MenuSkeletonIcon,
|
|
1199
|
+
.MenuSkeletonLabel {
|
|
1200
|
+
animation: none;
|
|
1201
|
+
}
|
|
1146
1202
|
}
|
|
1147
1203
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
@media (hover: hover) and (pointer: fine) {
|
|
3
|
-
.SliderWrap:hover .Reset[data-hide="false"] {
|
|
3
|
+
.SliderWrap:hover:where(:not(:root[data-input="touch"] *)) .Reset[data-hide="false"] {
|
|
4
4
|
cursor: pointer;
|
|
5
5
|
opacity: 1;
|
|
6
6
|
transition:
|
|
@@ -11,23 +11,35 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
/* Without hover the reset could never appear */
|
|
14
|
-
@media (hover: none) {
|
|
14
|
+
@media (hover: none), (pointer: coarse) {
|
|
15
15
|
.SliderWrap .Reset[data-hide="false"] {
|
|
16
16
|
opacity: 1;
|
|
17
17
|
visibility: visible;
|
|
18
18
|
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:where(:root[data-input="touch"]) .SliderWrap .Reset[data-hide="false"] {
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
opacity: 1;
|
|
24
|
+
visibility: visible;
|
|
19
25
|
}.Slider {
|
|
20
26
|
position: relative;
|
|
21
27
|
display: flex;
|
|
22
28
|
align-items: center;
|
|
23
29
|
width: 100%;
|
|
24
|
-
|
|
30
|
+
min-height: var(--slider-control-height, auto);
|
|
31
|
+
padding-bottom: var(--slider-padding-bottom, 6px);
|
|
25
32
|
touch-action: none;
|
|
26
33
|
-webkit-user-select: none;
|
|
27
34
|
-moz-user-select: none;
|
|
28
35
|
user-select: none;
|
|
29
36
|
}
|
|
30
37
|
|
|
38
|
+
.Slider[data-disabled] {
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
touch-action: auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
31
43
|
/* Animate thumb position for single-mode programmatic changes */
|
|
32
44
|
.Slider .Thumb {
|
|
33
45
|
transition: left var(--slider-duration) var(--cubic-move);
|
|
@@ -50,34 +62,36 @@
|
|
|
50
62
|
padding-bottom: 0;
|
|
51
63
|
padding-right: 6px;
|
|
52
64
|
}.SliderWrap[data-orientation="vertical"] .Track {
|
|
53
|
-
width: 4px;
|
|
65
|
+
width: var(--slider-track-size, 4px);
|
|
54
66
|
height: 100%;
|
|
55
67
|
}.SliderWrap[data-orientation="vertical"] .Range {
|
|
56
68
|
width: 100%;
|
|
57
69
|
height: auto;
|
|
58
70
|
}.SliderWrap[data-orientation="vertical"] .Thumb {
|
|
71
|
+
width: var(--slider-thumb-height, 14px);
|
|
72
|
+
height: var(--slider-thumb-width, 14px);
|
|
59
73
|
transition: none;
|
|
60
74
|
}.Track {
|
|
61
75
|
position: relative;
|
|
62
76
|
flex-grow: 1;
|
|
63
77
|
width: 100%;
|
|
64
|
-
height: 4px;
|
|
65
|
-
border-radius: var(--radius-2xs);
|
|
78
|
+
height: var(--slider-track-size, 4px);
|
|
79
|
+
border-radius: var(--slider-track-radius, var(--radius-2xs));
|
|
66
80
|
background: var(--slider-track-color);
|
|
67
81
|
}.Range {
|
|
68
82
|
position: absolute;
|
|
69
83
|
height: 100%;
|
|
70
|
-
border-radius: var(--radius-2xs);
|
|
84
|
+
border-radius: var(--slider-track-radius, var(--radius-2xs));
|
|
71
85
|
background: var(--slider-range-color);
|
|
72
86
|
transition: right var(--slider-duration) var(--cubic-move);
|
|
73
87
|
}.Thumb {
|
|
74
88
|
position: relative;
|
|
75
89
|
display: block;
|
|
76
|
-
width: 14px;
|
|
77
|
-
height: 14px;
|
|
78
|
-
border-radius: 50
|
|
90
|
+
width: var(--slider-thumb-width, 14px);
|
|
91
|
+
height: var(--slider-thumb-height, 14px);
|
|
92
|
+
border-radius: var(--slider-thumb-radius, 50%);
|
|
79
93
|
background: var(--gray-0);
|
|
80
|
-
box-shadow: inset 0 0 0 2px var(--slider-range-color);
|
|
94
|
+
box-shadow: var(--slider-thumb-shadow, inset 0 0 0 2px var(--slider-range-color));
|
|
81
95
|
cursor: grab;
|
|
82
96
|
outline: none;
|
|
83
97
|
}
|
|
@@ -91,7 +105,9 @@
|
|
|
91
105
|
cursor: grabbing;
|
|
92
106
|
}
|
|
93
107
|
|
|
94
|
-
.Thumb:disabled
|
|
108
|
+
.Thumb:disabled,
|
|
109
|
+
.Thumb[data-disabled] {
|
|
110
|
+
cursor: default;
|
|
95
111
|
pointer-events: none;
|
|
96
112
|
}.SliderLabel {
|
|
97
113
|
display: flex;
|
|
@@ -113,8 +129,8 @@
|
|
|
113
129
|
|
|
114
130
|
/* Custom overrides outside the design system. Using the data attribute to win the specificity war. */
|
|
115
131
|
.Reset[data-size="2xs"] {
|
|
116
|
-
width: 22px;
|
|
117
|
-
height: 22px;
|
|
132
|
+
width: var(--slider-reset-size, 22px);
|
|
133
|
+
height: var(--slider-reset-size, 22px);
|
|
118
134
|
}
|
|
119
135
|
|
|
120
136
|
.Reset[data-size="2xs"] svg {
|
|
@@ -147,8 +163,10 @@
|
|
|
147
163
|
}
|
|
148
164
|
}
|
|
149
165
|
|
|
150
|
-
|
|
151
|
-
|
|
166
|
+
@media (hover: hover) and (pointer: fine) {
|
|
167
|
+
.SliderWrap:hover:where(:not(:root[data-input="touch"] *)) .SliderValue:not(:focus-within) {
|
|
168
|
+
border-color: var(--gray-200);
|
|
169
|
+
}
|
|
152
170
|
}
|
|
153
171
|
|
|
154
172
|
.SliderValue:focus-within {
|
|
@@ -203,5 +221,24 @@
|
|
|
203
221
|
font-size: 13px;
|
|
204
222
|
font-variant-numeric: tabular-nums;
|
|
205
223
|
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) {
|
|
226
|
+
.SliderValue {
|
|
227
|
+
align-items: center;
|
|
228
|
+
height: auto;
|
|
229
|
+
min-height: 44px;
|
|
230
|
+
margin-right: 0;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.ValueInput {
|
|
234
|
+
min-width: 44px;
|
|
235
|
+
height: 44px;
|
|
236
|
+
text-align: right;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.SliderWrap[data-orientation="vertical"] .Slider {
|
|
240
|
+
width: max(44px, var(--slider-control-height, 44px));
|
|
241
|
+
padding-right: 0;
|
|
242
|
+
}
|
|
206
243
|
}
|
|
207
244
|
}
|
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
}/* Without a grip in sight an item drags from anywhere but a control */.Sortable:not([data-disabled]):not(tbody):not([data-handles="true"]) > :not([data-sortable-static]),
|
|
9
9
|
.Sortable:not([data-disabled])[data-handles="false"] > :not([data-sortable-static]) {
|
|
10
10
|
cursor: grab;
|
|
11
|
-
}/* While a drag runs the neighbours of the gap slide apart
|
|
12
|
-
|
|
11
|
+
}/* While a drag runs the neighbours of the gap slide apart */@media (prefers-reduced-motion: no-preference) {
|
|
12
|
+
.Sortable[data-dragging] > * {
|
|
13
|
+
transition: transform 200ms var(--cubic-enter);
|
|
14
|
+
}
|
|
13
15
|
}/* A row with a handle: the handle, then the row */.Sortable > :has(> .Handle) {
|
|
14
16
|
display: flex;
|
|
15
17
|
align-items: center;
|
|
@@ -76,7 +78,7 @@
|
|
|
76
78
|
transition: color var(--transition-duration-basic);
|
|
77
79
|
}
|
|
78
80
|
|
|
79
|
-
@media (hover: hover) and (pointer: fine) {.Handle:hover {
|
|
81
|
+
@media (hover: hover) and (pointer: fine) {.Handle:hover:where(:not(:root[data-input="touch"] *)) {
|
|
80
82
|
color: var(--sortable-handle-color-hover);
|
|
81
83
|
}
|
|
82
84
|
}
|
|
@@ -89,7 +91,14 @@
|
|
|
89
91
|
.Handle > svg {
|
|
90
92
|
width: 1em;
|
|
91
93
|
height: 1em;
|
|
92
|
-
}/*
|
|
94
|
+
}/* Keep the desktop grip and the phone reorder symbol independent of the touch target. */.Handle > .DesktopGrip {
|
|
95
|
+
display: var(--sortable-desktop-grip-display, block);
|
|
96
|
+
}.Handle > .PhoneGrip {
|
|
97
|
+
display: var(--sortable-phone-grip-display, none);
|
|
98
|
+
/* Hamburger ink occupies x3…21 of its 24-unit viewBox. */
|
|
99
|
+
width: calc(var(--sortable-phone-grip-ink-width, 17px) * 24 / 18);
|
|
100
|
+
height: calc(var(--sortable-phone-grip-ink-width, 17px) * 24 / 18);
|
|
101
|
+
}/* Important: a page's own rule for every button stands outside the layer of this file */.Handle {
|
|
93
102
|
cursor: grab !important;
|
|
94
103
|
}.Sortable[data-disabled] .Handle {
|
|
95
104
|
cursor: not-allowed !important;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
@layer components {.Container {
|
|
2
2
|
display: flex;
|
|
3
|
-
font-size: var(--font-text-sm-size);
|
|
4
|
-
line-height: var(--font-text-sm-line-height);
|
|
3
|
+
font-size: var(--switch-label-font-size, var(--font-text-sm-size));
|
|
4
|
+
line-height: var(--switch-label-line-height, var(--font-text-sm-line-height));
|
|
5
5
|
-webkit-user-select: none;
|
|
6
6
|
-moz-user-select: none;
|
|
7
7
|
user-select: none;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
.Container[data-color="accent"] {
|
|
11
|
+
--switch-track-color-checked: var(--switch-accent-color, light-dark(#34c759, #30d158));
|
|
12
|
+
--switch-track-color-checked-disabled: color-mix(in srgb, var(--switch-track-color-checked) 50%, transparent);
|
|
13
|
+
--switch-thumb-color: var(--white);
|
|
14
|
+
}
|
|
15
|
+
|
|
10
16
|
.Container[data-has-label] {
|
|
11
17
|
align-items: flex-start;
|
|
12
18
|
}
|
|
@@ -25,7 +31,7 @@
|
|
|
25
31
|
cursor: pointer;
|
|
26
32
|
transition: background-color 200ms var(--cubic-enter);
|
|
27
33
|
}
|
|
28
|
-
@media (hover: hover) and (pointer: fine) {.Track:where(:not([data-disabled], [data-state="checked"])):hover {
|
|
34
|
+
@media (hover: hover) and (pointer: fine) {.Track:where(:not([data-disabled], [data-state="checked"])):hover:where(:not(:root[data-input="touch"] *)) {
|
|
29
35
|
background: var(--switch-track-color-hover);
|
|
30
36
|
}
|
|
31
37
|
}
|
|
@@ -75,7 +81,10 @@
|
|
|
75
81
|
.Thumb[data-disabled] {
|
|
76
82
|
background: var(--switch-thumb-color-disabled);
|
|
77
83
|
box-shadow: none;
|
|
78
|
-
}.
|
|
84
|
+
}/* Center the first text line on the track without moving the track outside its box. */.Container > .Label,
|
|
85
|
+
.LabelGroup {
|
|
86
|
+
padding-block-start: var(--switch-label-padding-top, 0px);
|
|
87
|
+
}.LabelGroup {
|
|
79
88
|
display: flex;
|
|
80
89
|
flex-direction: column;
|
|
81
90
|
gap: 0;
|
|
@@ -93,7 +102,7 @@
|
|
|
93
102
|
[data-disabled] .LabelGroup {
|
|
94
103
|
cursor: not-allowed;
|
|
95
104
|
}.Label {
|
|
96
|
-
font-weight: var(--field-label-font-weight);
|
|
105
|
+
font-weight: var(--switch-label-font-weight, var(--field-label-font-weight));
|
|
97
106
|
cursor: pointer;
|
|
98
107
|
}
|
|
99
108
|
|
|
@@ -110,8 +119,8 @@
|
|
|
110
119
|
cursor: not-allowed;
|
|
111
120
|
}.Description {
|
|
112
121
|
color: var(--color-text-secondary);
|
|
113
|
-
font-size: var(--font-text-xs-size);
|
|
114
|
-
line-height: var(--font-text-xs-line-height);
|
|
122
|
+
font-size: var(--switch-description-font-size, var(--font-text-xs-size));
|
|
123
|
+
line-height: var(--switch-description-line-height, var(--font-text-xs-line-height));
|
|
115
124
|
cursor: pointer;
|
|
116
125
|
}
|
|
117
126
|
|
|
@@ -33,8 +33,10 @@
|
|
|
33
33
|
border-bottom: none;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
@media (hover: hover) and (pointer: fine) {
|
|
37
|
+
.TableBody :where(.TableRow):hover:where(:not(:root[data-input="touch"] *)) {
|
|
38
|
+
background-color: var(--table-row-hover-background);
|
|
39
|
+
}
|
|
38
40
|
}.TableRow {}.TableCell {
|
|
39
41
|
padding: var(--table-cell-padding);
|
|
40
42
|
vertical-align: middle;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
@layer components {.Tabs {
|
|
2
2
|
position: relative;
|
|
3
3
|
display: inline-flex;
|
|
4
|
+
min-width: 0;
|
|
5
|
+
max-width: 100%;
|
|
4
6
|
flex-wrap: nowrap;
|
|
5
7
|
gap: var(--segmented-control-gap);
|
|
6
8
|
font-size: var(--segmented-control-font-size);
|
|
@@ -322,9 +324,10 @@
|
|
|
322
324
|
padding: 0 var(--segmented-control-option-gutter);
|
|
323
325
|
color: var(--color-text-secondary);
|
|
324
326
|
cursor: pointer;
|
|
325
|
-
line-height: 1;
|
|
327
|
+
line-height: var(--segmented-control-line-height, 1);
|
|
326
328
|
display: flex;
|
|
327
329
|
flex-shrink: 0;
|
|
330
|
+
min-width: var(--tabs-block-min-width, auto);
|
|
328
331
|
align-items: center;
|
|
329
332
|
justify-content: center;
|
|
330
333
|
transition-duration: var(--transition-duration-basic);
|
|
@@ -348,7 +351,7 @@
|
|
|
348
351
|
}
|
|
349
352
|
|
|
350
353
|
:where(.Tabs[data-variant="segmented"][data-pill]) .Tab {
|
|
351
|
-
min-width: calc(var(--segmented-control-size) - 2 * var(--segmented-control-gutter));
|
|
354
|
+
min-width: var(--tabs-block-min-width, calc(var(--segmented-control-size) - 2 * var(--segmented-control-gutter)));
|
|
352
355
|
padding: 0 calc(var(--segmented-control-option-gutter) * var(--control-gutter-pill-scaling));
|
|
353
356
|
}
|
|
354
357
|
|
|
@@ -371,11 +374,11 @@
|
|
|
371
374
|
:where(.Tabs[data-variant="segmented"]) .Tab:active::before {
|
|
372
375
|
transform: scale(var(--scale), 0.97);
|
|
373
376
|
}
|
|
374
|
-
@media (hover: hover) and (pointer: fine) {:where(.Tabs[data-variant="segmented"]) .Tab[data-state="off"]:where(:not([disabled])):hover {
|
|
377
|
+
@media (hover: hover) and (pointer: fine) {:where(.Tabs[data-variant="segmented"]) .Tab[data-state="off"]:where(:not([disabled])):hover:where(:not(:root[data-input="touch"] *)) {
|
|
375
378
|
color: var(--color-text);
|
|
376
379
|
}
|
|
377
380
|
|
|
378
|
-
:where(.Tabs[data-variant="segmented"]) .Tab[data-state="off"]:where(:not([disabled])):hover::before {
|
|
381
|
+
:where(.Tabs[data-variant="segmented"]) .Tab[data-state="off"]:where(:not([disabled])):hover:where(:not(:root[data-input="touch"] *))::before {
|
|
379
382
|
opacity: 0.5;
|
|
380
383
|
}
|
|
381
384
|
}
|
|
@@ -399,7 +402,7 @@
|
|
|
399
402
|
:where(.Tabs[data-variant="underline"][data-block]) .Tab {
|
|
400
403
|
flex: 1;
|
|
401
404
|
}
|
|
402
|
-
@media (hover: hover) and (pointer: fine) {:where(.Tabs[data-variant="underline"]) .Tab[data-state="off"]:where(:not([disabled])):hover {
|
|
405
|
+
@media (hover: hover) and (pointer: fine) {:where(.Tabs[data-variant="underline"]) .Tab[data-state="off"]:where(:not([disabled])):hover:where(:not(:root[data-input="touch"] *)) {
|
|
403
406
|
color: var(--color-text);
|
|
404
407
|
}
|
|
405
408
|
}
|
|
@@ -432,6 +435,7 @@
|
|
|
432
435
|
Shared states
|
|
433
436
|
============================================= */
|
|
434
437
|
.Tab[data-state="on"] {
|
|
438
|
+
font-weight: var(--segmented-control-active-font-weight, inherit);
|
|
435
439
|
color: var(--color-text);
|
|
436
440
|
}
|
|
437
441
|
|
|
@@ -439,6 +443,10 @@
|
|
|
439
443
|
outline: 2px solid var(--color-ring);
|
|
440
444
|
}
|
|
441
445
|
|
|
446
|
+
:where(.Tabs[data-variant="underline"]) .Tab[data-state="on"]:focus-visible {
|
|
447
|
+
outline-offset: -2px;
|
|
448
|
+
}
|
|
449
|
+
|
|
442
450
|
.Tab[data-disabled] {
|
|
443
451
|
cursor: not-allowed;
|
|
444
452
|
opacity: 0.5;
|
|
@@ -513,6 +521,8 @@
|
|
|
513
521
|
============================================= */.TabContent {
|
|
514
522
|
position: relative;
|
|
515
523
|
display: flex;
|
|
524
|
+
min-width: var(--tabs-block-min-width, auto);
|
|
525
|
+
max-width: var(--tabs-block-content-max-width, none);
|
|
516
526
|
align-items: center;
|
|
517
527
|
gap: var(--segmented-control-content-gap);
|
|
518
528
|
}
|
|
@@ -523,10 +533,20 @@
|
|
|
523
533
|
height: var(--segmented-control-icon-size);
|
|
524
534
|
}
|
|
525
535
|
|
|
536
|
+
.TabContent > svg,
|
|
537
|
+
.TabContent > .TabBadge {
|
|
538
|
+
flex-shrink: var(--tabs-block-accessory-shrink, 1);
|
|
539
|
+
}
|
|
540
|
+
|
|
526
541
|
/* Negative margin for icon when followed by text */
|
|
527
542
|
.TabContent svg:where(:first-child:not(:only-child)) {
|
|
528
543
|
margin-left: var(--segmented-control-icon-offset);
|
|
529
|
-
}
|
|
544
|
+
}.TabLabel {
|
|
545
|
+
min-width: var(--tabs-block-min-width, auto);
|
|
546
|
+
overflow: var(--tabs-block-label-overflow, visible);
|
|
547
|
+
white-space: var(--tabs-block-label-white-space, inherit);
|
|
548
|
+
text-overflow: ellipsis;
|
|
549
|
+
}/* =============================================
|
|
530
550
|
Tab Badge (CSS-only, no Badge component)
|
|
531
551
|
============================================= */.TabBadge {
|
|
532
552
|
display: inline-flex;
|
|
@@ -684,5 +704,18 @@
|
|
|
684
704
|
margin-inline-start: auto;
|
|
685
705
|
padding-inline-start: calc(var(--spacing) * 3);
|
|
686
706
|
color: var(--color-text-secondary);
|
|
707
|
+
}/* The native segment already includes its final gutter; pill scaling is desktop-only. */@media (max-width: 767px) {
|
|
708
|
+
.Tabs[data-variant="segmented"][data-orientation="horizontal"] .Tab {
|
|
709
|
+
padding-inline: var(--segmented-control-option-gutter);
|
|
710
|
+
}
|
|
711
|
+
}@media (prefers-reduced-motion: reduce) {
|
|
712
|
+
.Tabs {
|
|
713
|
+
--tabs-thumb-transition-duration: 0ms;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
.Tab,
|
|
717
|
+
.Tab::before {
|
|
718
|
+
transition-duration: 0ms;
|
|
719
|
+
}
|
|
687
720
|
}
|
|
688
721
|
}
|