@plexui/styles 0.1.32 → 0.1.34
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 +30 -0
- package/dist/es/components/Alert/Alert.module.css +112 -1
- package/dist/es/components/Badge/Badge.module.css +41 -8
- package/dist/es/components/Breadcrumb/Breadcrumb.module.css +35 -1
- package/dist/es/components/Button/Button.module.css +178 -77
- package/dist/es/components/Button/NavigationButton.module.css +27 -0
- package/dist/es/components/Card/Card.module.css +27 -9
- package/dist/es/components/Checkbox/Checkbox.module.css +83 -90
- package/dist/es/components/CodeBlock/CodeBlock.module.css +20 -0
- package/dist/es/components/ColorPicker/ColorPicker.module.css +396 -0
- package/dist/es/components/ContextMenu/ContextMenu.module.css +55 -0
- package/dist/es/components/DataTable/DataTable.module.css +35 -5
- package/dist/es/components/DatePicker/Calendar.module.css +280 -3
- package/dist/es/components/DatePicker/CalendarNavigationIcon.module.css +20 -0
- package/dist/es/components/DateRangePicker/Calendar.module.css +223 -3
- package/dist/es/components/DateRangePicker/Trigger.module.css +29 -1
- package/dist/es/components/Dialog/Dialog.module.css +386 -86
- package/dist/es/components/EmptyMessage/EmptyMessage.module.css +89 -14
- package/dist/es/components/Field/Field.module.css +346 -19
- package/dist/es/components/FieldError/FieldError.module.css +13 -10
- package/dist/es/components/FieldGroup/FieldGroup.module.css +103 -4
- package/dist/es/components/FileUpload/FileUpload.module.css +103 -10
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.module.css +46 -14
- package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.module.css +36 -14
- package/dist/es/components/Indicator/LoadingIndicator.module.css +48 -6
- package/dist/es/components/Input/Input.module.css +195 -25
- package/dist/es/components/InputGroup/InputGroup.module.css +5 -1
- package/dist/es/components/MarkdownEditor/MarkdownEditor.module.css +27 -147
- package/dist/es/components/Menu/Menu.module.css +425 -33
- package/dist/es/components/OTPInput/OTPInput.module.css +11 -3
- package/dist/es/components/Page/Page.module.css +217 -20
- package/dist/es/components/PageControl/PageControl.module.css +81 -0
- package/dist/es/components/Popover/Popover.module.css +10 -1
- package/dist/es/components/RadioGroup/RadioGroup.module.css +10 -10
- package/dist/es/components/Select/Select.module.css +162 -13
- package/dist/es/components/SelectControl/SelectControl.module.css +118 -11
- package/dist/es/components/ShimmerText/ShimmerText.module.css +7 -0
- package/dist/es/components/Sidebar/Sidebar.module.css +347 -72
- package/dist/es/components/Skeleton/Skeleton.module.css +4 -0
- package/dist/es/components/Slider/Slider.module.css +96 -52
- package/dist/es/components/Sortable/Sortable.module.css +20 -7
- package/dist/es/components/Stepper/Stepper.module.css +98 -0
- package/dist/es/components/Switch/Switch.module.css +16 -7
- package/dist/es/components/TabBar/TabBar.module.css +233 -0
- package/dist/es/components/Table/Table.module.css +4 -2
- package/dist/es/components/Tabs/Tabs.module.css +186 -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 +120 -5
- package/dist/es/components/Toolbar/Toolbar.module.css +579 -0
- package/dist/es/components/Tooltip/Tooltip.module.css +1 -1
- package/dist/es/styles/base.css +1 -1
- 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 +69 -0
- package/dist/es/styles/mobile-surfaces.css +46 -0
- package/dist/es/styles/touch.css +524 -63
- package/dist/es/styles/variables-components.css +286 -7
- package/package.json +1 -1
- package/postcss/mixins.mjs +1 -1
|
@@ -25,34 +25,34 @@
|
|
|
25
25
|
height: 1px !important;
|
|
26
26
|
transform: none !important;
|
|
27
27
|
}.Checkbox {
|
|
28
|
+
--checkbox-paint-border-color: var(--alpha-16);
|
|
29
|
+
--checkbox-paint-background: transparent;
|
|
30
|
+
|
|
28
31
|
position: relative;
|
|
29
32
|
display: inline-flex;
|
|
30
33
|
align-items: center;
|
|
31
34
|
justify-content: center;
|
|
32
35
|
flex-shrink: 0;
|
|
33
|
-
width: var(--checkbox-indicator-size);
|
|
34
|
-
max-width: var(--checkbox-indicator-size);
|
|
35
|
-
height: var(--checkbox-indicator-size);
|
|
36
|
+
width: var(--checkbox-target-size, var(--checkbox-indicator-size));
|
|
37
|
+
max-width: var(--checkbox-target-size, var(--checkbox-indicator-size));
|
|
38
|
+
height: var(--checkbox-target-size, var(--checkbox-indicator-size));
|
|
36
39
|
/* Center indicator with first line of label text (mirrors RadioGroup's RadioIndicatorWrapper approach) */
|
|
37
|
-
margin-top: calc((var(--checkbox-label-line-height) - var(--checkbox-indicator-size)) / 2);
|
|
40
|
+
margin-top: var(--checkbox-target-offset, calc((var(--checkbox-label-line-height) - var(--checkbox-indicator-size)) / 2));
|
|
38
41
|
padding: 0;
|
|
39
|
-
border:
|
|
40
|
-
border-radius: var(--radius-xs);
|
|
42
|
+
border: 0;
|
|
43
|
+
border-radius: var(--checkbox-radius, var(--radius-xs));
|
|
41
44
|
background-color: transparent;
|
|
42
45
|
cursor: pointer;
|
|
43
|
-
transition:
|
|
44
|
-
border-color 150ms ease,
|
|
45
|
-
background-color 150ms ease;
|
|
46
46
|
}
|
|
47
|
-
@media (hover: hover) and (pointer: fine) {.Checkbox:where(:not([data-disabled], [data-state="checked"])):hover {
|
|
48
|
-
border-color: var(--alpha-20);
|
|
47
|
+
@media (hover: hover) and (pointer: fine) {.Checkbox:where(:not([data-disabled], [data-state="checked"])):hover:where(:not(:root[data-input="touch"] *)) {
|
|
48
|
+
--checkbox-paint-border-color: var(--alpha-20);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.Checkbox[data-state="indeterminate"],
|
|
53
53
|
.Checkbox[data-state="checked"] {
|
|
54
|
-
border-color: var(--gray-900);
|
|
55
|
-
background
|
|
54
|
+
--checkbox-paint-border-color: var(--checkbox-checked-background, var(--gray-900));
|
|
55
|
+
--checkbox-paint-background: var(--checkbox-checked-background, var(--gray-900));
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.Checkbox:focus {
|
|
@@ -68,13 +68,13 @@
|
|
|
68
68
|
Invalid
|
|
69
69
|
============================================= */
|
|
70
70
|
.Checkbox[aria-invalid="true"] {
|
|
71
|
-
border-color: var(--input-border-color-invalid);
|
|
71
|
+
--checkbox-paint-border-color: var(--input-border-color-invalid);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
.Checkbox[aria-invalid="true"][data-state="indeterminate"],
|
|
75
75
|
.Checkbox[aria-invalid="true"][data-state="checked"] {
|
|
76
|
-
border-color: var(--input-border-color-invalid);
|
|
77
|
-
background
|
|
76
|
+
--checkbox-paint-border-color: var(--input-border-color-invalid);
|
|
77
|
+
--checkbox-paint-background: var(--input-border-color-invalid);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
.Checkbox[data-disabled] {
|
|
@@ -92,99 +92,91 @@
|
|
|
92
92
|
Ghost variant
|
|
93
93
|
============================================= */
|
|
94
94
|
.Checkbox[data-variant="ghost"] {
|
|
95
|
-
border-color: transparent;
|
|
96
|
-
background
|
|
95
|
+
--checkbox-paint-border-color: transparent;
|
|
96
|
+
--checkbox-paint-background: transparent;
|
|
97
97
|
|
|
98
98
|
}
|
|
99
|
-
@media (hover: hover) and (pointer: fine) {.Checkbox[data-variant="ghost"]:where(:not([data-disabled], [data-state="checked"])):hover {
|
|
100
|
-
border-color: transparent;
|
|
101
|
-
}.Checkbox[data-variant="ghost"]:where(:not([data-disabled], [data-state="checked"])):hover, :where([data-theme="light"]) .Checkbox[data-variant="ghost"]:where(:not([data-disabled], [data-state="checked"])):hover {
|
|
102
|
-
background
|
|
103
|
-
}:where([data-theme="dark"]) .Checkbox[data-variant="ghost"]:where(:not([data-disabled], [data-state="checked"])):hover {
|
|
104
|
-
background
|
|
99
|
+
@media (hover: hover) and (pointer: fine) {.Checkbox[data-variant="ghost"]:where(:not([data-disabled], [data-state="checked"])):hover:where(:not(:root[data-input="touch"] *)) {
|
|
100
|
+
--checkbox-paint-border-color: transparent;
|
|
101
|
+
}.Checkbox[data-variant="ghost"]:where(:not([data-disabled], [data-state="checked"])):hover:where(:not(:root[data-input="touch"] *)), :where([data-theme="light"]) .Checkbox[data-variant="ghost"]:where(:not([data-disabled], [data-state="checked"])):hover:where(:not(:root[data-input="touch"] *)) {
|
|
102
|
+
--checkbox-paint-background: var(--gray-50);
|
|
103
|
+
}:where([data-theme="dark"]) .Checkbox[data-variant="ghost"]:where(:not([data-disabled], [data-state="checked"])):hover:where(:not(:root[data-input="touch"] *)) {
|
|
104
|
+
--checkbox-paint-background: var(--gray-800);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
.Checkbox[data-variant="ghost"][data-state="indeterminate"],
|
|
109
109
|
.Checkbox[data-variant="ghost"][data-state="checked"] {
|
|
110
|
-
border-color: transparent;
|
|
111
|
-
background
|
|
112
|
-
}.
|
|
110
|
+
--checkbox-paint-border-color: transparent;
|
|
111
|
+
--checkbox-paint-background: transparent;
|
|
112
|
+
}/* The interaction slot can grow independently of the indicator's paint. */.IndicatorBox {
|
|
113
|
+
position: relative;
|
|
114
|
+
box-sizing: border-box;
|
|
115
|
+
flex-shrink: 0;
|
|
116
|
+
width: var(--checkbox-indicator-size);
|
|
117
|
+
height: var(--checkbox-indicator-size);
|
|
118
|
+
border: var(--checkbox-border-width, 1px) solid var(--checkbox-paint-border-color);
|
|
119
|
+
border-radius: inherit;
|
|
120
|
+
background-color: var(--checkbox-paint-background);
|
|
121
|
+
pointer-events: none;
|
|
122
|
+
transition:
|
|
123
|
+
border-color 150ms ease,
|
|
124
|
+
background-color 150ms ease;
|
|
125
|
+
}/* Solid: the PlexUI Check icon, and Minus when indeterminate, on the filled box. The mark stays
|
|
126
|
+
mounted, so a long list of boxes cleared at once costs no style pass per box and first render
|
|
127
|
+
plays no animation. A new mark is revealed from the left; a cleared one fades out. */.CheckMark {
|
|
113
128
|
position: absolute;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
129
|
+
inset: 0;
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
justify-content: center;
|
|
133
|
+
color: var(--checkbox-checkmark-color, var(--gray-0));
|
|
134
|
+
clip-path: inset(0);
|
|
120
135
|
transition:
|
|
121
136
|
opacity 150ms ease,
|
|
122
|
-
|
|
137
|
+
clip-path 200ms ease;
|
|
123
138
|
}
|
|
124
139
|
|
|
125
|
-
|
|
126
|
-
no style pass per box and first render plays no animation. */
|
|
127
|
-
[data-state="unchecked"] > .CheckMark {
|
|
140
|
+
.Checkbox[data-state="unchecked"] .CheckMark {
|
|
128
141
|
opacity: 0;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
[data-state="indeterminate"] .CheckMark {
|
|
132
|
-
transform: translate(30%, 80%);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
[data-state="indeterminate"] .CheckMark::before {
|
|
136
|
-
opacity: 0;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/* CheckMark arms */
|
|
140
|
-
.CheckMark::before,
|
|
141
|
-
.CheckMark::after {
|
|
142
|
-
position: absolute;
|
|
143
|
-
display: block;
|
|
144
|
-
background: var(--gray-0);
|
|
145
|
-
content: "";
|
|
146
|
-
will-change: transform;
|
|
147
|
-
}
|
|
148
|
-
@starting-style {
|
|
149
|
-
|
|
150
|
-
.Container:is(:hover, :focus-within) .CheckMark::before, .Container:is(:hover, :focus-within) .CheckMark::after {
|
|
151
|
-
transform: scale(0)
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/* Ghost variant — checkmark uses text color instead of white */
|
|
156
|
-
.Checkbox[data-variant="ghost"] .CheckMark::before,
|
|
157
|
-
.Checkbox[data-variant="ghost"] .CheckMark::after {
|
|
158
|
-
background: var(--gray-900);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.CheckMark::before {
|
|
162
|
-
top: 0;
|
|
163
|
-
bottom: 0;
|
|
164
|
-
left: 0;
|
|
165
|
-
width: 2px;
|
|
166
|
-
transform-origin: 0 0;
|
|
142
|
+
clip-path: inset(0 100% 0 0);
|
|
167
143
|
transition:
|
|
168
|
-
|
|
169
|
-
|
|
144
|
+
opacity 150ms ease,
|
|
145
|
+
clip-path 0s 150ms;
|
|
170
146
|
}
|
|
171
147
|
|
|
172
|
-
.CheckMark
|
|
148
|
+
.CheckMark > svg {
|
|
149
|
+
width: var(--checkbox-check-icon-size, var(--checkbox-indicator-size));
|
|
150
|
+
height: var(--checkbox-check-icon-size, var(--checkbox-indicator-size));
|
|
151
|
+
}/* Ghost: the same icons in the text color, without a box. */.GhostMark {
|
|
152
|
+
position: absolute;
|
|
153
|
+
inset: 0;
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
justify-content: center;
|
|
157
|
+
color: var(--checkbox-ghost-check-color, var(--gray-900));
|
|
158
|
+
transition: opacity 150ms ease;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.Checkbox[data-state="unchecked"] .GhostMark {
|
|
173
162
|
opacity: 0;
|
|
174
163
|
}
|
|
175
164
|
|
|
176
|
-
.
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
165
|
+
.GhostMark > svg {
|
|
166
|
+
width: var(--checkbox-ghost-icon-size, var(--checkbox-indicator-size));
|
|
167
|
+
height: var(--checkbox-ghost-icon-size, var(--checkbox-indicator-size));
|
|
168
|
+
}.MarkCheck,
|
|
169
|
+
.MarkDash {
|
|
170
|
+
flex-shrink: 0;
|
|
171
|
+
}.Checkbox[data-state="indeterminate"] .MarkCheck,
|
|
172
|
+
.Checkbox:not([data-state="indeterminate"]) .MarkDash {
|
|
173
|
+
display: none;
|
|
174
|
+
}.Label {
|
|
184
175
|
display: block;
|
|
176
|
+
padding-block: var(--checkbox-label-inset, 0px);
|
|
185
177
|
min-height: var(--checkbox-label-line-height);
|
|
186
178
|
cursor: pointer;
|
|
187
|
-
font-size: 14px;
|
|
179
|
+
font-size: var(--checkbox-label-font-size, 14px);
|
|
188
180
|
line-height: var(--checkbox-label-line-height);
|
|
189
181
|
}
|
|
190
182
|
|
|
@@ -196,6 +188,7 @@ background-color: var(--gray-800);
|
|
|
196
188
|
padding-right: calc(var(--spacing) * 3);
|
|
197
189
|
}/* Label with a second line: the group carries the gap, the label inside it does not */.LabelGroup {
|
|
198
190
|
display: flex;
|
|
191
|
+
padding-block: var(--checkbox-label-inset, 0px);
|
|
199
192
|
flex-direction: column;
|
|
200
193
|
}
|
|
201
194
|
|
|
@@ -208,11 +201,11 @@ background-color: var(--gray-800);
|
|
|
208
201
|
}
|
|
209
202
|
|
|
210
203
|
.LabelGroup > .Label {
|
|
211
|
-
padding
|
|
204
|
+
padding: 0;
|
|
212
205
|
}.Description {
|
|
213
206
|
color: var(--color-text-secondary);
|
|
214
|
-
font-size: var(--font-text-xs-size);
|
|
215
|
-
line-height: var(--font-text-xs-line-height);
|
|
207
|
+
font-size: var(--checkbox-description-font-size, var(--font-text-xs-size));
|
|
208
|
+
line-height: var(--checkbox-description-line-height, var(--font-text-xs-line-height));
|
|
216
209
|
}
|
|
217
210
|
|
|
218
211
|
[data-disabled] .Description {
|
|
@@ -31,6 +31,26 @@
|
|
|
31
31
|
color: inherit !important;
|
|
32
32
|
padding: 0 !important;
|
|
33
33
|
-webkit-tap-highlight-color: transparent;
|
|
34
|
+
}/* With touch.css a uniform 2xs button is the kit's 28px circle on a phone; the copy button keeps its 24px face and
|
|
35
|
+
glyph inside the 32px box, and its target takes the 44px of iOS around the box, as the clear
|
|
36
|
+
button of SelectControl does. */.CopyButtonContainer {
|
|
37
|
+
--button-uniform-size-2xs: var(--control-size-2xs);
|
|
38
|
+
--button-icon-size-2xs: var(--control-icon-size-sm);
|
|
39
|
+
--button-indicator-size-2xs: 12px;
|
|
40
|
+
}@media (max-width: 767px) {
|
|
41
|
+
.CopyButtonContainer button {
|
|
42
|
+
min-width: 44px;
|
|
43
|
+
min-height: 44px;
|
|
44
|
+
/* The target overhangs the 32px box evenly, so the glyph stays at its centre. */
|
|
45
|
+
margin: calc((32px - 44px) / 2);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.CopyButtonContainer button::before,
|
|
49
|
+
.CopyButtonContainer button::after {
|
|
50
|
+
width: var(--button-size);
|
|
51
|
+
height: var(--button-size);
|
|
52
|
+
margin: auto;
|
|
53
|
+
}
|
|
34
54
|
}/* The button's own outline stays off; keyboard focus shows Button's
|
|
35
55
|
::after ring */.CopyButtonContainer button:focus,
|
|
36
56
|
.CopyButtonContainer button:focus-visible {
|
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
@layer components {/* The system color picker, after the iOS 26 kit Color Picker - iPhone (0:5275): a segmented control over the
|
|
2
|
+
grid, spectrum or sliders, the Opacity slider, a separator, then the current color and the saved colors. On a
|
|
3
|
+
phone the sizes are the kit's (touch.css); on a desktop the same layout in PlexUI sizes. */.ColorPicker {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
width: var(--color-picker-width);
|
|
7
|
+
max-width: 100%;
|
|
8
|
+
color: var(--color-text);
|
|
9
|
+
}.Modes {
|
|
10
|
+
margin-bottom: var(--color-picker-modes-gap);
|
|
11
|
+
}/* On a phone the Mode control stays the plain segmented control of the kit's picker (iOS 27 kit Color Picker -
|
|
12
|
+
iPhone 0:5275: Segmented Control Size=Small), not the glass one of other phone tabs (touch.css): a 32px
|
|
13
|
+
Fills/Tertiary track, a white thumb 2px inside it, options 4px apart and 13.333px labels, Semibold when
|
|
14
|
+
selected and Medium otherwise. The class with both attributes outranks the touch.css tokens on the same
|
|
15
|
+
element (both in the kit's layer). */@media (max-width: 767px) {
|
|
16
|
+
.Modes[data-variant="segmented"][data-orientation="horizontal"] {
|
|
17
|
+
--segmented-control-size: 32px;
|
|
18
|
+
--segmented-control-gutter: 2px;
|
|
19
|
+
--segmented-control-gap: 4px;
|
|
20
|
+
--segmented-control-thumb-outset: 0px;
|
|
21
|
+
--segmented-control-option-gutter: 6px;
|
|
22
|
+
--segmented-control-font-size: 13.333px;
|
|
23
|
+
--segmented-control-line-height: 18px;
|
|
24
|
+
--segmented-control-font-weight: 510;
|
|
25
|
+
--segmented-control-active-font-weight: 590;
|
|
26
|
+
--segmented-control-background: var(--color-picker-mobile-mode-background);
|
|
27
|
+
--segmented-control-sheen: none;
|
|
28
|
+
--segmented-control-shadow: none;
|
|
29
|
+
--segmented-control-backdrop-filter: none;
|
|
30
|
+
--segmented-control-thumb-background: var(--color-picker-mobile-mode-thumb-background);
|
|
31
|
+
/* Every label of the plain control is primary; the weight marks the selection. */
|
|
32
|
+
--color-text-secondary: var(--color-text);
|
|
33
|
+
}
|
|
34
|
+
}.Body {
|
|
35
|
+
position: relative;
|
|
36
|
+
aspect-ratio: var(--color-picker-body-aspect-ratio);
|
|
37
|
+
}/* ===== Grid ===== */.Grid {
|
|
38
|
+
display: grid;
|
|
39
|
+
grid-template-columns: repeat(12, 1fr);
|
|
40
|
+
grid-template-rows: repeat(10, 1fr);
|
|
41
|
+
height: 100%;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
border-radius: var(--color-picker-body-radius);
|
|
44
|
+
}.Cell {
|
|
45
|
+
position: relative;
|
|
46
|
+
margin: 0;
|
|
47
|
+
padding: 0;
|
|
48
|
+
border: 0;
|
|
49
|
+
border-radius: 0;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
-webkit-tap-highlight-color: transparent;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.Cell[aria-checked="true"] {
|
|
55
|
+
box-shadow: inset 0 0 0 var(--color-picker-selection-width) var(--color-picker-selection-color);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.Cell:focus {
|
|
59
|
+
outline: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.Cell:focus-visible {
|
|
63
|
+
z-index: 1;
|
|
64
|
+
outline: 2px solid var(--color-ring);
|
|
65
|
+
outline-offset: 0;
|
|
66
|
+
}/* ===== Spectrum ===== *//* The hue runs from top to bottom; across, white fades to the full hue at the middle, then the hue to black. */.Spectrum {
|
|
67
|
+
position: absolute;
|
|
68
|
+
inset: 0;
|
|
69
|
+
border-radius: var(--color-picker-body-radius);
|
|
70
|
+
background:
|
|
71
|
+
linear-gradient(to right, #fff, rgb(255 255 255 / 0%) 50%, rgb(0 0 0 / 0%) 50%, #000),
|
|
72
|
+
linear-gradient(to bottom, #f00, #ff0 16.667%, #0f0 33.333%, #0ff 50%, #00f 66.667%, #f0f 83.333%, #f00);
|
|
73
|
+
cursor: crosshair;
|
|
74
|
+
touch-action: none;
|
|
75
|
+
-webkit-tap-highlight-color: transparent;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.Spectrum:focus {
|
|
79
|
+
outline: none;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.Spectrum:focus-visible {
|
|
83
|
+
outline: 2px solid var(--color-ring);
|
|
84
|
+
outline-offset: 2px;
|
|
85
|
+
}.Loupe {
|
|
86
|
+
position: absolute;
|
|
87
|
+
width: var(--color-picker-loupe-size);
|
|
88
|
+
height: var(--color-picker-loupe-size);
|
|
89
|
+
box-sizing: border-box;
|
|
90
|
+
border: var(--color-picker-knob-border) solid var(--color-picker-selection-color);
|
|
91
|
+
border-radius: var(--radius-full);
|
|
92
|
+
box-shadow: var(--color-picker-knob-shadow);
|
|
93
|
+
transform: translate(-50%, -50%);
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
}/* ===== Sliders ===== */.Sliders {
|
|
96
|
+
display: flex;
|
|
97
|
+
flex-direction: column;
|
|
98
|
+
justify-content: space-between;
|
|
99
|
+
height: 100%;
|
|
100
|
+
}.Channel {
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
gap: var(--color-picker-row-gap);
|
|
104
|
+
}.Hex {
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
justify-content: space-between;
|
|
108
|
+
gap: var(--color-picker-field-gap);
|
|
109
|
+
}/* ===== Opacity ===== */.Opacity {
|
|
110
|
+
display: flex;
|
|
111
|
+
flex-direction: column;
|
|
112
|
+
gap: var(--color-picker-row-gap);
|
|
113
|
+
padding-top: var(--color-picker-section-gap);
|
|
114
|
+
padding-bottom: var(--color-picker-opacity-padding-bottom);
|
|
115
|
+
border-bottom: 1px solid var(--color-picker-separator-color);
|
|
116
|
+
}.Label {
|
|
117
|
+
font-size: var(--color-picker-label-font-size);
|
|
118
|
+
font-weight: var(--font-weight-semibold);
|
|
119
|
+
line-height: var(--color-picker-label-line-height);
|
|
120
|
+
}.Row {
|
|
121
|
+
display: flex;
|
|
122
|
+
align-items: center;
|
|
123
|
+
gap: var(--color-picker-field-gap);
|
|
124
|
+
}/* The track: the color over a checkerboard, so a clear color shows as clear. */.Track {
|
|
125
|
+
flex: 1;
|
|
126
|
+
min-width: 0;
|
|
127
|
+
height: var(--color-picker-track-height);
|
|
128
|
+
padding: var(--color-picker-track-inset);
|
|
129
|
+
box-sizing: border-box;
|
|
130
|
+
border-radius: var(--radius-full);
|
|
131
|
+
background:
|
|
132
|
+
var(--color-picker-track),
|
|
133
|
+
repeating-conic-gradient(#fff 0 25%, #000 0 50%) 0 0 / calc(2 * var(--color-picker-checker-size)) calc(2 * var(--color-picker-checker-size));
|
|
134
|
+
}.SliderRoot {
|
|
135
|
+
position: relative;
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
height: 100%;
|
|
139
|
+
touch-action: none;
|
|
140
|
+
-moz-user-select: none;
|
|
141
|
+
user-select: none;
|
|
142
|
+
-webkit-user-select: none;
|
|
143
|
+
-webkit-tap-highlight-color: transparent;
|
|
144
|
+
}.SliderTrack {
|
|
145
|
+
position: relative;
|
|
146
|
+
flex-grow: 1;
|
|
147
|
+
height: 100%;
|
|
148
|
+
}.Knob {
|
|
149
|
+
display: block;
|
|
150
|
+
width: var(--color-picker-knob-size);
|
|
151
|
+
height: var(--color-picker-knob-size);
|
|
152
|
+
box-sizing: border-box;
|
|
153
|
+
border: var(--color-picker-knob-border) solid var(--color-picker-selection-color);
|
|
154
|
+
border-radius: var(--radius-full);
|
|
155
|
+
box-shadow: var(--color-picker-knob-shadow);
|
|
156
|
+
cursor: grab;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.Knob:focus {
|
|
160
|
+
outline: none;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.Knob:focus-visible {
|
|
164
|
+
outline: 2px solid var(--color-ring);
|
|
165
|
+
outline-offset: 2px;
|
|
166
|
+
}.Field {
|
|
167
|
+
flex-shrink: 0;
|
|
168
|
+
width: var(--color-picker-field-width);
|
|
169
|
+
height: var(--color-picker-field-height);
|
|
170
|
+
margin: 0;
|
|
171
|
+
padding: 0 4px;
|
|
172
|
+
box-sizing: border-box;
|
|
173
|
+
border: 0;
|
|
174
|
+
border-radius: var(--color-picker-field-radius);
|
|
175
|
+
background: var(--color-picker-field-background);
|
|
176
|
+
color: var(--color-text);
|
|
177
|
+
font: inherit;
|
|
178
|
+
font-size: var(--color-picker-field-font-size);
|
|
179
|
+
font-weight: var(--font-weight-semibold);
|
|
180
|
+
line-height: var(--color-picker-field-line-height);
|
|
181
|
+
font-variant-numeric: tabular-nums;
|
|
182
|
+
text-align: center;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.Field[data-wide] {
|
|
186
|
+
width: var(--color-picker-field-wide-width);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.Field:focus {
|
|
190
|
+
outline: none;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.Field:focus-visible {
|
|
194
|
+
outline: 2px solid var(--color-ring);
|
|
195
|
+
outline-offset: 0;
|
|
196
|
+
}/* ===== Swatches ===== */.Swatches {
|
|
197
|
+
display: flex;
|
|
198
|
+
align-items: flex-start;
|
|
199
|
+
gap: var(--color-picker-current-gap);
|
|
200
|
+
padding-top: var(--color-picker-section-gap);
|
|
201
|
+
}/* The current color, over a checkerboard when it is not opaque. */.Current {
|
|
202
|
+
position: relative;
|
|
203
|
+
flex-shrink: 0;
|
|
204
|
+
width: var(--color-picker-current-size);
|
|
205
|
+
height: var(--color-picker-current-size);
|
|
206
|
+
overflow: hidden;
|
|
207
|
+
border-radius: var(--color-picker-current-radius);
|
|
208
|
+
background: repeating-conic-gradient(#fff 0 25%, #000 0 50%) 0 0 / calc(2 * var(--color-picker-checker-size)) calc(2 * var(--color-picker-checker-size));
|
|
209
|
+
}.CurrentFill,
|
|
210
|
+
.SwatchFill {
|
|
211
|
+
position: absolute;
|
|
212
|
+
inset: 0;
|
|
213
|
+
border-radius: inherit;
|
|
214
|
+
}.Saved {
|
|
215
|
+
display: flex;
|
|
216
|
+
flex: 1;
|
|
217
|
+
flex-direction: column;
|
|
218
|
+
gap: var(--color-picker-swatch-row-gap);
|
|
219
|
+
min-width: 0;
|
|
220
|
+
}/* Pages of ten that scroll sideways, a page at a time. */.Pages {
|
|
221
|
+
display: flex;
|
|
222
|
+
overflow-x: auto;
|
|
223
|
+
overscroll-behavior-x: contain;
|
|
224
|
+
scroll-snap-type: x mandatory;
|
|
225
|
+
scrollbar-width: none;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.Pages::-webkit-scrollbar {
|
|
229
|
+
display: none;
|
|
230
|
+
}.Page {
|
|
231
|
+
display: grid;
|
|
232
|
+
flex: 0 0 100%;
|
|
233
|
+
grid-template-columns: repeat(5, var(--color-picker-swatch-size));
|
|
234
|
+
grid-auto-rows: var(--color-picker-swatch-size);
|
|
235
|
+
align-content: start;
|
|
236
|
+
justify-content: space-between;
|
|
237
|
+
row-gap: var(--color-picker-swatch-row-gap);
|
|
238
|
+
height: calc(2 * var(--color-picker-swatch-size) + var(--color-picker-swatch-row-gap));
|
|
239
|
+
scroll-snap-align: start;
|
|
240
|
+
}.Swatch,
|
|
241
|
+
.Add {
|
|
242
|
+
position: relative;
|
|
243
|
+
width: var(--color-picker-swatch-size);
|
|
244
|
+
height: var(--color-picker-swatch-size);
|
|
245
|
+
margin: 0;
|
|
246
|
+
padding: 0;
|
|
247
|
+
border: 0;
|
|
248
|
+
border-radius: var(--radius-full);
|
|
249
|
+
cursor: pointer;
|
|
250
|
+
-webkit-tap-highlight-color: transparent;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.Swatch:focus, .Add:focus {
|
|
254
|
+
outline: none;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.Swatch:focus-visible, .Add:focus-visible {
|
|
258
|
+
outline: 2px solid var(--color-ring);
|
|
259
|
+
outline-offset: 2px;
|
|
260
|
+
}.Swatch {
|
|
261
|
+
overflow: hidden;
|
|
262
|
+
background: repeating-conic-gradient(#fff 0 25%, #000 0 50%) 0 0 / calc(var(--color-picker-swatch-size) / 3) calc(var(--color-picker-swatch-size) / 3);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.Swatch[aria-checked="true"]::after {
|
|
266
|
+
position: absolute;
|
|
267
|
+
inset: var(--color-picker-swatch-ring-inset);
|
|
268
|
+
border: var(--color-picker-swatch-ring-width) solid var(--color-picker-selection-color);
|
|
269
|
+
border-radius: inherit;
|
|
270
|
+
content: "";
|
|
271
|
+
}.Add {
|
|
272
|
+
display: grid;
|
|
273
|
+
place-items: center;
|
|
274
|
+
background: var(--color-picker-field-background);
|
|
275
|
+
color: var(--color-text);
|
|
276
|
+
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.Add > svg {
|
|
280
|
+
width: var(--color-picker-add-icon-size);
|
|
281
|
+
height: var(--color-picker-add-icon-size);
|
|
282
|
+
}.PageControlRow {
|
|
283
|
+
display: flex;
|
|
284
|
+
align-items: center;
|
|
285
|
+
justify-content: center;
|
|
286
|
+
height: var(--color-picker-page-control-row-height);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/* With one page the row is left out on a desktop; a phone keeps it, so the sheet keeps the kit's height. */
|
|
290
|
+
.PageControlRow:empty {
|
|
291
|
+
display: var(--color-picker-page-control-empty-display);
|
|
292
|
+
}/* ===== Color well ===== *//* The kit's Picker Button: a 3px rainbow ring (angular, from yellow at the top), and inside it, 2px apart, the
|
|
293
|
+
chosen color; with no color, the full rainbow with a light wash toward the middle. */.Well {
|
|
294
|
+
position: relative;
|
|
295
|
+
flex-shrink: 0;
|
|
296
|
+
width: var(--color-well-size);
|
|
297
|
+
height: var(--color-well-size);
|
|
298
|
+
margin: 0;
|
|
299
|
+
padding: 0;
|
|
300
|
+
border: 0;
|
|
301
|
+
border-radius: var(--radius-full);
|
|
302
|
+
background: transparent;
|
|
303
|
+
vertical-align: middle;
|
|
304
|
+
cursor: pointer;
|
|
305
|
+
-webkit-tap-highlight-color: transparent;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.Well[data-size="sm"] {
|
|
309
|
+
--color-well-size: var(--color-well-size-sm);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.Well[data-size="lg"] {
|
|
313
|
+
--color-well-size: var(--color-well-size-lg);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/* The rainbow is drawn under the button, so the focus ring is not cut by the ring's mask. */
|
|
317
|
+
.Well::before {
|
|
318
|
+
position: absolute;
|
|
319
|
+
inset: 0;
|
|
320
|
+
border-radius: inherit;
|
|
321
|
+
background:
|
|
322
|
+
radial-gradient(closest-side, rgb(228 228 228), rgb(228 228 228 / 0%) 88%),
|
|
323
|
+
var(--color-well-rainbow);
|
|
324
|
+
content: "";
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.Well[data-selected]::before {
|
|
328
|
+
background: var(--color-well-rainbow);
|
|
329
|
+
-webkit-mask: radial-gradient(closest-side, transparent calc(100% - var(--color-well-ring-width) - 0.5px), #000 calc(100% - var(--color-well-ring-width) + 0.5px));
|
|
330
|
+
mask: radial-gradient(closest-side, transparent calc(100% - var(--color-well-ring-width) - 0.5px), #000 calc(100% - var(--color-well-ring-width) + 0.5px));
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.Well:disabled {
|
|
334
|
+
opacity: 0.4;
|
|
335
|
+
cursor: default;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.Well:focus {
|
|
339
|
+
outline: none;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.Well:focus-visible {
|
|
343
|
+
outline: 2px solid var(--color-ring);
|
|
344
|
+
outline-offset: 2px;
|
|
345
|
+
}.WellColor {
|
|
346
|
+
position: absolute;
|
|
347
|
+
inset: calc(var(--color-well-ring-width) + var(--color-well-ring-gap));
|
|
348
|
+
border-radius: inherit;
|
|
349
|
+
background:
|
|
350
|
+
linear-gradient(var(--color-well-color), var(--color-well-color)),
|
|
351
|
+
repeating-conic-gradient(#fff 0 25%, #000 0 50%) 0 0 / 50% 50%;
|
|
352
|
+
}/* ===== Presentation ===== */.Popover {
|
|
353
|
+
padding: var(--color-picker-popover-padding);
|
|
354
|
+
}.PopoverHeader {
|
|
355
|
+
display: grid;
|
|
356
|
+
grid-template-columns: 1fr auto 1fr;
|
|
357
|
+
align-items: center;
|
|
358
|
+
margin-bottom: var(--color-picker-popover-header-gap);
|
|
359
|
+
}.PopoverLeading {
|
|
360
|
+
display: flex;
|
|
361
|
+
justify-content: flex-start;
|
|
362
|
+
}.PopoverTrailing {
|
|
363
|
+
display: flex;
|
|
364
|
+
justify-content: flex-end;
|
|
365
|
+
}.PopoverTitle {
|
|
366
|
+
font-size: var(--font-text-sm-size);
|
|
367
|
+
font-weight: var(--font-weight-semibold);
|
|
368
|
+
line-height: var(--font-text-sm-line-height);
|
|
369
|
+
}/* The kit's Sheet - Inspector - iPhone: a glass panel 6px from the sides and the bottom, its corners 34px at the
|
|
370
|
+
top and 58px at the bottom, concentric with the display. */.Sheet {
|
|
371
|
+
--dialog-panel-width: calc(100% - 12px);
|
|
372
|
+
--dialog-panel-radius: var(--color-picker-sheet-radius);
|
|
373
|
+
--dialog-panel-hidden-transform: translateY(calc(100% + 6px));
|
|
374
|
+
--dialog-panel-background: var(--mobile-glass-background);
|
|
375
|
+
margin: 0 6px 6px;
|
|
376
|
+
box-shadow: var(--mobile-glass-shadow);
|
|
377
|
+
backdrop-filter: var(--mobile-glass-backdrop-filter);
|
|
378
|
+
}/* One glass surface: the bar is clear (it is solid, so no scroll edge blurs the segmented control), and the picker
|
|
379
|
+
starts right under it, as the kit's 70px Toolbar keeps its own 10px bottom padding. The body does not run under
|
|
380
|
+
the bar, so on a short screen the picker scrolls below it. This outranks the Dialog's
|
|
381
|
+
`.Content[data-mobile-variant="sheet"] .Panel > .Body`. */.Sheet > [data-toolbar] {
|
|
382
|
+
--dialog-panel-background: transparent;
|
|
383
|
+
}[data-mobile-variant="sheet"] .Sheet.Sheet > .SheetBody.SheetBody {
|
|
384
|
+
margin-top: 0;
|
|
385
|
+
padding-top: 0;
|
|
386
|
+
padding-inline: var(--mobile-layout-margin, 16px);
|
|
387
|
+
padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
|
|
388
|
+
scroll-padding-top: 0;
|
|
389
|
+
}.SheetBody > .ColorPicker {
|
|
390
|
+
width: 100%;
|
|
391
|
+
}@media (prefers-reduced-motion: reduce) {
|
|
392
|
+
.Pages {
|
|
393
|
+
scroll-behavior: auto;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|