@slotted/styles 0.0.0-stage → 0.1.0-beta.0
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/LICENSE +21 -0
- package/README.md +10 -2
- package/package.json +276 -3
- package/src/accordion/accordion.css +96 -0
- package/src/accordion/accordion.tokens.json +14 -0
- package/src/action-bar/action-bar.css +455 -0
- package/src/action-bar/action-bar.tokens.json +50 -0
- package/src/action-sheet/action-sheet.css +462 -0
- package/src/action-sheet/action-sheet.tokens.json +59 -0
- package/src/alert/alert.css +764 -0
- package/src/alert/alert.tokens.json +77 -0
- package/src/app-shell/app-shell.css +1899 -0
- package/src/app-shell/app-shell.tokens.json +88 -0
- package/src/aspect-ratio/aspect-ratio.css +131 -0
- package/src/aspect-ratio/aspect-ratio.tokens.json +1 -0
- package/src/attachment/attachment.css +906 -0
- package/src/attachment/attachment.tokens.json +85 -0
- package/src/avatar/avatar.css +598 -0
- package/src/avatar/avatar.tokens.json +64 -0
- package/src/avatar-group/avatar-group.css +268 -0
- package/src/avatar-group/avatar-group.tokens.json +16 -0
- package/src/badge/badge.css +462 -0
- package/src/badge/badge.tokens.json +58 -0
- package/src/breadcrumb/breadcrumb.css +441 -0
- package/src/breadcrumb/breadcrumb.tokens.json +50 -0
- package/src/button/button.css +754 -0
- package/src/button/button.tokens.json +72 -0
- package/src/button-group/button-group.css +455 -0
- package/src/button-group/button-group.tokens.json +11 -0
- package/src/calendar/calendar.css +846 -0
- package/src/calendar/calendar.tokens.json +67 -0
- package/src/card/card.css +602 -0
- package/src/card/card.tokens.json +68 -0
- package/src/carousel/carousel.css +860 -0
- package/src/carousel/carousel.tokens.json +62 -0
- package/src/cascader/cascader.css +1320 -0
- package/src/cascader/cascader.tokens.json +103 -0
- package/src/chart/chart.css +1473 -0
- package/src/chart/chart.tokens.json +107 -0
- package/src/checkbox/checkbox.css +1011 -0
- package/src/checkbox/checkbox.tokens.json +102 -0
- package/src/checkbox-group/checkbox-group.css +70 -0
- package/src/checkbox-group/checkbox-group.tokens.json +6 -0
- package/src/code-block/code-block.css +555 -0
- package/src/code-block/code-block.tokens.json +69 -0
- package/src/collapsible/collapsible.css +546 -0
- package/src/collapsible/collapsible.tokens.json +55 -0
- package/src/color-picker/color-picker.css +607 -0
- package/src/color-picker/color-picker.tokens.json +58 -0
- package/src/column-manager/column-manager.css +452 -0
- package/src/column-manager/column-manager.tokens.json +43 -0
- package/src/combobox/combobox.css +1048 -0
- package/src/combobox/combobox.tokens.json +112 -0
- package/src/command-palette/command-palette.css +1000 -0
- package/src/command-palette/command-palette.tokens.json +75 -0
- package/src/container/container.css +198 -0
- package/src/container/container.tokens.json +18 -0
- package/src/context-menu/context-menu.css +104 -0
- package/src/context-menu/context-menu.tokens.json +11 -0
- package/src/currency-field/currency-field.css +787 -0
- package/src/currency-field/currency-field.tokens.json +80 -0
- package/src/dashboard-grid/dashboard-grid.css +748 -0
- package/src/dashboard-grid/dashboard-grid.tokens.json +67 -0
- package/src/data-grid/data-grid.css +2484 -0
- package/src/data-grid/data-grid.tokens.json +100 -0
- package/src/data-list/data-list.css +455 -0
- package/src/data-list/data-list.tokens.json +35 -0
- package/src/date-field/date-field.css +560 -0
- package/src/date-field/date-field.tokens.json +80 -0
- package/src/date-picker/date-picker.css +420 -0
- package/src/date-picker/date-picker.tokens.json +49 -0
- package/src/date-range-picker/date-range-picker.css +983 -0
- package/src/date-range-picker/date-range-picker.tokens.json +109 -0
- package/src/datetime-field/datetime-field.css +850 -0
- package/src/datetime-field/datetime-field.tokens.json +91 -0
- package/src/datetime-picker/datetime-picker.css +843 -0
- package/src/datetime-picker/datetime-picker.tokens.json +78 -0
- package/src/datetime-range-picker/datetime-range-picker.css +1375 -0
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +135 -0
- package/src/description-list/description-list.css +675 -0
- package/src/description-list/description-list.tokens.json +66 -0
- package/src/detail-panel/detail-panel.css +329 -0
- package/src/detail-panel/detail-panel.tokens.json +33 -0
- package/src/dialog/dialog.css +968 -0
- package/src/dialog/dialog.tokens.json +66 -0
- package/src/divider/divider.css +131 -0
- package/src/divider/divider.tokens.json +18 -0
- package/src/drawer/drawer.css +1303 -0
- package/src/drawer/drawer.tokens.json +75 -0
- package/src/entity-picker/entity-picker.css +1367 -0
- package/src/entity-picker/entity-picker.tokens.json +118 -0
- package/src/event-calendar/event-calendar.css +2148 -0
- package/src/event-calendar/event-calendar.tokens.json +87 -0
- package/src/field/field.css +707 -0
- package/src/field/field.tokens.json +58 -0
- package/src/field-group/field-group.css +226 -0
- package/src/field-group/field-group.tokens.json +33 -0
- package/src/filter-bar/filter-bar.css +1306 -0
- package/src/filter-bar/filter-bar.tokens.json +78 -0
- package/src/form/form.css +218 -0
- package/src/form/form.tokens.json +32 -0
- package/src/fullscreen/fullscreen.css +376 -0
- package/src/fullscreen/fullscreen.tokens.json +50 -0
- package/src/grid/grid.css +173 -0
- package/src/grid/grid.tokens.json +20 -0
- package/src/highlight/highlight.css +135 -0
- package/src/highlight/highlight.tokens.json +16 -0
- package/src/hover-card/hover-card.css +93 -0
- package/src/hover-card/hover-card.tokens.json +17 -0
- package/src/icon/icon.css +136 -0
- package/src/icon/icon.tokens.json +14 -0
- package/src/image/image.css +449 -0
- package/src/image/image.tokens.json +27 -0
- package/src/import-export-center/import-export-center.css +1175 -0
- package/src/import-export-center/import-export-center.tokens.json +84 -0
- package/src/inline/inline.css +149 -0
- package/src/inline/inline.tokens.json +14 -0
- package/src/inline-message/inline-message.css +396 -0
- package/src/inline-message/inline-message.tokens.json +19 -0
- package/src/kbd/kbd.css +490 -0
- package/src/kbd/kbd.tokens.json +40 -0
- package/src/link/link.css +237 -0
- package/src/link/link.tokens.json +25 -0
- package/src/list/list.css +240 -0
- package/src/list/list.tokens.json +42 -0
- package/src/list-item/list-item.css +937 -0
- package/src/list-item/list-item.tokens.json +114 -0
- package/src/listbox/listbox.css +674 -0
- package/src/listbox/listbox.tokens.json +72 -0
- package/src/loading-overlay/loading-overlay.css +730 -0
- package/src/loading-overlay/loading-overlay.tokens.json +48 -0
- package/src/markdown/markdown.css +168 -0
- package/src/markdown/markdown.tokens.json +18 -0
- package/src/menu/menu.css +817 -0
- package/src/menu/menu.tokens.json +78 -0
- package/src/menubar/menubar.css +170 -0
- package/src/menubar/menubar.tokens.json +32 -0
- package/src/message/message.css +1453 -0
- package/src/message/message.tokens.json +85 -0
- package/src/message-scroller/message-scroller.css +371 -0
- package/src/message-scroller/message-scroller.tokens.json +47 -0
- package/src/multi-select/multi-select.css +1427 -0
- package/src/multi-select/multi-select.tokens.json +114 -0
- package/src/navigation-menu/navigation-menu.css +1029 -0
- package/src/navigation-menu/navigation-menu.tokens.json +70 -0
- package/src/notification-center/notification-center.css +856 -0
- package/src/notification-center/notification-center.tokens.json +84 -0
- package/src/number-field/number-field.css +794 -0
- package/src/number-field/number-field.tokens.json +80 -0
- package/src/otp-input/otp-input.css +525 -0
- package/src/otp-input/otp-input.tokens.json +69 -0
- package/src/page/page.css +179 -0
- package/src/page/page.tokens.json +20 -0
- package/src/page-header/page-header.css +1181 -0
- package/src/page-header/page-header.tokens.json +71 -0
- package/src/pagination/pagination.css +500 -0
- package/src/pagination/pagination.tokens.json +56 -0
- package/src/popover/popover.css +526 -0
- package/src/popover/popover.tokens.json +60 -0
- package/src/progress-indicator/progress-indicator.css +1584 -0
- package/src/progress-indicator/progress-indicator.tokens.json +50 -0
- package/src/prompt-composer/prompt-composer.css +680 -0
- package/src/prompt-composer/prompt-composer.tokens.json +99 -0
- package/src/prose/prose.css +733 -0
- package/src/prose/prose.tokens.json +79 -0
- package/src/radio-group/radio-group.css +778 -0
- package/src/radio-group/radio-group.tokens.json +103 -0
- package/src/rating/rating.css +1071 -0
- package/src/rating/rating.tokens.json +88 -0
- package/src/result-state/result-state.css +980 -0
- package/src/result-state/result-state.tokens.json +63 -0
- package/src/runtime-properties.mjs +321 -0
- package/src/saved-views/saved-views.css +394 -0
- package/src/saved-views/saved-views.tokens.json +41 -0
- package/src/scroll-area/scroll-area.css +481 -0
- package/src/scroll-area/scroll-area.tokens.json +15 -0
- package/src/section/section.css +177 -0
- package/src/section/section.tokens.json +39 -0
- package/src/segmented-control/segmented-control.css +564 -0
- package/src/segmented-control/segmented-control.tokens.json +67 -0
- package/src/select/select.css +1593 -0
- package/src/select/select.tokens.json +110 -0
- package/src/side-navigation/side-navigation.css +1096 -0
- package/src/side-navigation/side-navigation.tokens.json +87 -0
- package/src/skeleton/skeleton.css +431 -0
- package/src/skeleton/skeleton.tokens.json +29 -0
- package/src/slider/slider.css +792 -0
- package/src/slider/slider.tokens.json +75 -0
- package/src/sparkline/sparkline.css +282 -0
- package/src/sparkline/sparkline.tokens.json +45 -0
- package/src/spinner/spinner.css +224 -0
- package/src/spinner/spinner.tokens.json +8 -0
- package/src/split-button/split-button.css +253 -0
- package/src/split-button/split-button.tokens.json +12 -0
- package/src/splitter/splitter.css +336 -0
- package/src/splitter/splitter.tokens.json +24 -0
- package/src/stack/stack.css +128 -0
- package/src/stack/stack.tokens.json +14 -0
- package/src/stat-card/stat-card.css +641 -0
- package/src/stat-card/stat-card.tokens.json +95 -0
- package/src/status-indicator/status-indicator.css +481 -0
- package/src/status-indicator/status-indicator.tokens.json +38 -0
- package/src/stepper/stepper.css +629 -0
- package/src/stepper/stepper.tokens.json +72 -0
- package/src/switch/switch.css +703 -0
- package/src/switch/switch.tokens.json +75 -0
- package/src/table/table.css +1482 -0
- package/src/table/table.tokens.json +69 -0
- package/src/table-of-contents/table-of-contents.css +533 -0
- package/src/table-of-contents/table-of-contents.tokens.json +53 -0
- package/src/tabs/tabs.css +998 -0
- package/src/tabs/tabs.tokens.json +82 -0
- package/src/tag/tag.css +768 -0
- package/src/tag/tag.tokens.json +85 -0
- package/src/tags-input/tags-input.css +757 -0
- package/src/tags-input/tags-input.tokens.json +84 -0
- package/src/text-field/text-field.css +900 -0
- package/src/text-field/text-field.tokens.json +87 -0
- package/src/textarea/textarea.css +365 -0
- package/src/textarea/textarea.tokens.json +59 -0
- package/src/time-field/time-field.css +719 -0
- package/src/time-field/time-field.tokens.json +86 -0
- package/src/time-picker/time-picker.css +665 -0
- package/src/time-picker/time-picker.tokens.json +66 -0
- package/src/time-range-picker/time-range-picker.css +1287 -0
- package/src/time-range-picker/time-range-picker.tokens.json +134 -0
- package/src/timeline/timeline.css +1596 -0
- package/src/timeline/timeline.tokens.json +96 -0
- package/src/toast/toast.css +943 -0
- package/src/toast/toast.tokens.json +90 -0
- package/src/toggle/toggle.css +290 -0
- package/src/toggle/toggle.tokens.json +54 -0
- package/src/toggle-group/toggle-group.css +463 -0
- package/src/toggle-group/toggle-group.tokens.json +54 -0
- package/src/toolbar/toolbar.css +434 -0
- package/src/toolbar/toolbar.tokens.json +49 -0
- package/src/tooltip/tooltip.css +368 -0
- package/src/tooltip/tooltip.tokens.json +39 -0
- package/src/top-navigation/top-navigation.css +1287 -0
- package/src/top-navigation/top-navigation.tokens.json +91 -0
- package/src/tour/tour.css +680 -0
- package/src/tour/tour.tokens.json +67 -0
- package/src/transfer/transfer.css +571 -0
- package/src/transfer/transfer.tokens.json +49 -0
- package/src/tree/tree.css +1000 -0
- package/src/tree/tree.tokens.json +80 -0
- package/src/typography/typography.css +211 -0
- package/src/typography/typography.tokens.json +31 -0
- package/src/upload/upload.css +1706 -0
- package/src/upload/upload.tokens.json +123 -0
- package/src/visually-hidden/visually-hidden.css +52 -0
- package/src/visually-hidden/visually-hidden.tokens.json +1 -0
- package/src/wizard/wizard.css +740 -0
- package/src/wizard/wizard.tokens.json +63 -0
|
@@ -0,0 +1,607 @@
|
|
|
1
|
+
@layer slotted.components {
|
|
2
|
+
/**
|
|
3
|
+
* ── Choosing a colour ──────────────────────────────────────────────────
|
|
4
|
+
*
|
|
5
|
+
* A panel: an area for saturation and brightness, a hue channel, an alpha
|
|
6
|
+
* channel, a preview of the colour now beside the colour it opened with,
|
|
7
|
+
* the value as text in its notation, the eyedropper, the presets and the
|
|
8
|
+
* contrast against a background the consumer names. It stands inline, or
|
|
9
|
+
* inside a popover opened from the field's swatch
|
|
10
|
+
* (docs/history/designs/2026-10-01-color-picker-design.md).
|
|
11
|
+
*
|
|
12
|
+
* Every colour on this page is the reader's colour, written by the binding
|
|
13
|
+
* as a runtime property (`runtime-properties.mjs`); the panel's own chrome
|
|
14
|
+
* reads the theme like any other family.
|
|
15
|
+
*/
|
|
16
|
+
[data-ui='color-picker'][data-part='root'] {
|
|
17
|
+
--_thumb: var(--slotted-color-picker-thumb-size, var(--slotted-space-6, 1rem));
|
|
18
|
+
--_channel: var(--slotted-color-picker-channel-size, var(--slotted-space-5, 0.75rem));
|
|
19
|
+
--_gap: var(--slotted-space-5, 0.75rem);
|
|
20
|
+
--_radius: var(--slotted-radius-md, 6px);
|
|
21
|
+
--_inner-size: var(--slotted-control-inner-size-md, 24px);
|
|
22
|
+
--_icon-size: var(--slotted-control-icon-size-md, 16px);
|
|
23
|
+
--_color: var(--slotted-color-picker-color, transparent);
|
|
24
|
+
--_opaque: var(--slotted-color-picker-opaque, transparent);
|
|
25
|
+
--_hue: var(--slotted-color-picker-hue, 0);
|
|
26
|
+
/**
|
|
27
|
+
* The transparency grid: two squares of the theme's own surfaces, so an
|
|
28
|
+
* alpha colour reads against the page it will sit on rather than against
|
|
29
|
+
* a grey nobody chose. The square is half the channel's height.
|
|
30
|
+
*/
|
|
31
|
+
--_checker: repeating-conic-gradient(
|
|
32
|
+
var(--slotted-surface-sunken, Canvas) 0 25%,
|
|
33
|
+
var(--slotted-surface, Canvas) 0 50%
|
|
34
|
+
)
|
|
35
|
+
0 0 / var(--_channel) var(--_channel);
|
|
36
|
+
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
color: var(--slotted-text, CanvasText);
|
|
39
|
+
display: grid;
|
|
40
|
+
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
41
|
+
font-size: var(--slotted-control-font-size-md, 13px);
|
|
42
|
+
gap: var(--_gap);
|
|
43
|
+
inline-size: var(--slotted-color-picker-width, calc(var(--slotted-space-12, 4rem) * 4));
|
|
44
|
+
max-inline-size: 100%;
|
|
45
|
+
min-inline-size: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
[data-ui='color-picker'][data-part='root'][data-size='sm'] {
|
|
49
|
+
--_gap: var(--slotted-space-4, 0.5rem);
|
|
50
|
+
--_inner-size: var(--slotted-control-inner-size-sm, 22px);
|
|
51
|
+
--_icon-size: var(--slotted-control-icon-size-sm, 14px);
|
|
52
|
+
|
|
53
|
+
font-size: var(--slotted-control-font-size-sm, 12px);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
[data-ui='color-picker'][data-part='root'][data-size='lg'] {
|
|
57
|
+
--_gap: var(--slotted-space-6, 1rem);
|
|
58
|
+
--_inner-size: var(--slotted-control-inner-size-lg, 28px);
|
|
59
|
+
--_icon-size: var(--slotted-control-icon-size-lg, 18px);
|
|
60
|
+
|
|
61
|
+
font-size: var(--slotted-control-font-size-lg, 14px);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* ── The area: saturation across, brightness up ─────────────────────────
|
|
65
|
+
*
|
|
66
|
+
* The pure hue at full strength, washed to white along the inline axis and
|
|
67
|
+
* to black along the block axis — the HSV square. White and black are the
|
|
68
|
+
* model, not a choice of the theme, which is why they are literals here
|
|
69
|
+
* and nowhere else. The edge is drawn inside, a hairline of the theme's
|
|
70
|
+
* subtle border, so a pale colour still has a boundary on a pale page.
|
|
71
|
+
*/
|
|
72
|
+
[data-ui='color-picker'] [data-part='area'] {
|
|
73
|
+
aspect-ratio: 3 / 2;
|
|
74
|
+
background:
|
|
75
|
+
linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent),
|
|
76
|
+
hsl(calc(var(--_hue) * 1deg) 100% 50%);
|
|
77
|
+
border-radius: var(--_radius);
|
|
78
|
+
box-shadow: inset 0 0 0 var(--slotted-border-width-thin, 1px)
|
|
79
|
+
var(--slotted-border-subtle, transparent);
|
|
80
|
+
cursor: crosshair;
|
|
81
|
+
position: relative;
|
|
82
|
+
/* A finger dragging the thumb must not scroll the page under it. */
|
|
83
|
+
touch-action: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* The area mirrors in a right-to-left document: saturation grows along the
|
|
87
|
+
reading direction, the way the hue channel does. */
|
|
88
|
+
[data-ui='color-picker'] [data-part='area']:dir(rtl) {
|
|
89
|
+
background:
|
|
90
|
+
linear-gradient(to top, #000, transparent), linear-gradient(to left, #fff, transparent),
|
|
91
|
+
hsl(calc(var(--_hue) * 1deg) 100% 50%);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* ── The thumbs ─────────────────────────────────────────────────────────
|
|
95
|
+
*
|
|
96
|
+
* A disc of the colour it stands on, inside a white ring and a hairline of
|
|
97
|
+
* shadow, so it reads on the black corner and on the white one alike. The
|
|
98
|
+
* ring is the model's white for the reason the area's is. Held, it grows a
|
|
99
|
+
* step, so the reader sees what the pointer has taken.
|
|
100
|
+
*/
|
|
101
|
+
[data-ui='color-picker'] :is([data-part='area-thumb'], [data-part='channel-thumb']) {
|
|
102
|
+
background: var(--_opaque);
|
|
103
|
+
block-size: var(--_thumb);
|
|
104
|
+
border: var(--slotted-border-width-medium, 2px) solid #fff;
|
|
105
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
106
|
+
box-shadow:
|
|
107
|
+
0 0 0 var(--slotted-border-width-thin, 1px) rgb(0 0 0 / 0.24),
|
|
108
|
+
var(--slotted-shadow-sm, none);
|
|
109
|
+
box-sizing: border-box;
|
|
110
|
+
cursor: grab;
|
|
111
|
+
inline-size: var(--_thumb);
|
|
112
|
+
position: absolute;
|
|
113
|
+
transition:
|
|
114
|
+
scale var(--slotted-duration-short) var(--slotted-easing-standard),
|
|
115
|
+
box-shadow var(--slotted-duration-short) var(--slotted-easing-standard);
|
|
116
|
+
translate: -50% -50%;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
[data-ui='color-picker'] [data-part='area-thumb'] {
|
|
120
|
+
inset-block-start: calc((1 - var(--slotted-color-picker-y, 1)) * 100%);
|
|
121
|
+
inset-inline-start: calc(var(--slotted-color-picker-x, 1) * 100%);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
[data-ui='color-picker'] [data-part='area-thumb']:dir(rtl) {
|
|
125
|
+
translate: 50% -50%;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
[data-ui='color-picker']
|
|
129
|
+
:is([data-part='area'], [data-part='channel'])[data-dragging]
|
|
130
|
+
> :is([data-part='area-thumb'], [data-part='channel-thumb']) {
|
|
131
|
+
cursor: grabbing;
|
|
132
|
+
scale: 1.15;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
[data-ui='color-picker']
|
|
136
|
+
:is([data-part='area-thumb'], [data-part='channel-thumb']):focus-visible {
|
|
137
|
+
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
138
|
+
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* ── The channels ───────────────────────────────────────────────────────
|
|
142
|
+
*
|
|
143
|
+
* Hue is one gradient interpolated the long way round the hue circle, so
|
|
144
|
+
* the browser draws the rainbow rather than seven stops written by hand.
|
|
145
|
+
* Alpha is the colour fading to nothing over the transparency grid.
|
|
146
|
+
*/
|
|
147
|
+
[data-ui='color-picker'] [data-part='channel'] {
|
|
148
|
+
block-size: var(--_channel);
|
|
149
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
150
|
+
box-shadow: inset 0 0 0 var(--slotted-border-width-thin, 1px)
|
|
151
|
+
var(--slotted-border-subtle, transparent);
|
|
152
|
+
cursor: pointer;
|
|
153
|
+
position: relative;
|
|
154
|
+
touch-action: none;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
[data-ui='color-picker'] [data-part='channel'][data-channel='hue'] {
|
|
158
|
+
background: linear-gradient(to right in hsl longer hue, hsl(0 100% 50%), hsl(0 100% 50%));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
[data-ui='color-picker'] [data-part='channel'][data-channel='alpha'] {
|
|
162
|
+
background: linear-gradient(to right, transparent, var(--_opaque)), var(--_checker);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
[data-ui='color-picker'] [data-part='channel'][data-channel='hue']:dir(rtl) {
|
|
166
|
+
background: linear-gradient(to left in hsl longer hue, hsl(0 100% 50%), hsl(0 100% 50%));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
[data-ui='color-picker'] [data-part='channel'][data-channel='alpha']:dir(rtl) {
|
|
170
|
+
background: linear-gradient(to left, transparent, var(--_opaque)), var(--_checker);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
[data-ui='color-picker'] [data-part='channel-thumb'] {
|
|
174
|
+
inset-block-start: 50%;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* A channel's thumb travels inside the track, its centre a half thumb in
|
|
178
|
+
from each end, so at 0 and at the maximum it still sits on the colour it
|
|
179
|
+
names rather than hanging past the rounded end. */
|
|
180
|
+
[data-ui='color-picker'] [data-part='channel-thumb'][data-channel='hue'] {
|
|
181
|
+
background: hsl(calc(var(--_hue) * 1deg) 100% 50%);
|
|
182
|
+
inset-inline-start: calc(var(--_thumb) / 2 + var(--_hue) / 360 * (100% - var(--_thumb)));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
[data-ui='color-picker'] [data-part='channel-thumb'][data-channel='alpha'] {
|
|
186
|
+
background: linear-gradient(var(--_color), var(--_color)), var(--_checker);
|
|
187
|
+
inset-inline-start: calc(
|
|
188
|
+
var(--_thumb) / 2 + var(--slotted-color-picker-alpha, 1) * (100% - var(--_thumb))
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
[data-ui='color-picker'] [data-part='channel-thumb']:dir(rtl) {
|
|
193
|
+
translate: 50% -50%;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* ── The row under the channels ─────────────────────────────────────────
|
|
197
|
+
*
|
|
198
|
+
* The preview on the start, then the text of the value, its notation and
|
|
199
|
+
* the eyedropper. The row is the control height, so the text input inside
|
|
200
|
+
* it lines up with any field beside the panel.
|
|
201
|
+
*/
|
|
202
|
+
[data-ui='color-picker'] [data-part='row'] {
|
|
203
|
+
align-items: center;
|
|
204
|
+
display: flex;
|
|
205
|
+
gap: var(--slotted-space-3, 0.375rem);
|
|
206
|
+
min-inline-size: 0;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Now and before, side by side in one rounded box: the colour being made on
|
|
211
|
+
* the start, the colour the panel opened with on the end. Each half is the
|
|
212
|
+
* colour over the transparency grid. Pressing the old half restores it.
|
|
213
|
+
*/
|
|
214
|
+
[data-ui='color-picker'] [data-part='swatch'],
|
|
215
|
+
[data-ui='color-picker'] [data-part='previous'] {
|
|
216
|
+
appearance: none;
|
|
217
|
+
block-size: var(--slotted-control-height-md, 34px);
|
|
218
|
+
border: 0;
|
|
219
|
+
box-sizing: border-box;
|
|
220
|
+
flex: 0 0 auto;
|
|
221
|
+
inline-size: calc(var(--slotted-control-height-md, 34px) * 3 / 4);
|
|
222
|
+
margin: 0;
|
|
223
|
+
padding: 0;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
[data-ui='color-picker'] [data-part='swatch'] {
|
|
227
|
+
background: linear-gradient(var(--_color), var(--_color)), var(--_checker);
|
|
228
|
+
border-end-start-radius: var(--_radius);
|
|
229
|
+
border-start-start-radius: var(--_radius);
|
|
230
|
+
box-shadow: inset 0 0 0 var(--slotted-border-width-thin, 1px)
|
|
231
|
+
var(--slotted-border-subtle, transparent);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
[data-ui='color-picker'] [data-part='swatch']:only-child,
|
|
235
|
+
[data-ui='color-picker'] [data-part='swatch']:not(:has(+ [data-part='previous'])) {
|
|
236
|
+
border-radius: var(--_radius);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
[data-ui='color-picker'] [data-part='previous'] {
|
|
240
|
+
background:
|
|
241
|
+
linear-gradient(
|
|
242
|
+
var(--slotted-color-picker-previous, transparent),
|
|
243
|
+
var(--slotted-color-picker-previous, transparent)
|
|
244
|
+
),
|
|
245
|
+
var(--_checker);
|
|
246
|
+
border-end-end-radius: var(--_radius);
|
|
247
|
+
border-start-end-radius: var(--_radius);
|
|
248
|
+
box-shadow: inset 0 0 0 var(--slotted-border-width-thin, 1px)
|
|
249
|
+
var(--slotted-border-subtle, transparent);
|
|
250
|
+
cursor: pointer;
|
|
251
|
+
margin-inline-start: calc(var(--slotted-space-3, 0.375rem) * -1);
|
|
252
|
+
position: relative;
|
|
253
|
+
transition: opacity var(--slotted-duration-short) var(--slotted-easing-standard);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/* The old colour answers the pointer with the revert mark over it. */
|
|
257
|
+
[data-ui='color-picker'] [data-part='previous'] > [data-ui='icon'] {
|
|
258
|
+
--slotted-icon-size: var(--_icon-size);
|
|
259
|
+
|
|
260
|
+
color: #fff;
|
|
261
|
+
filter: drop-shadow(0 0 1px rgb(0 0 0 / 0.6));
|
|
262
|
+
inset: 0;
|
|
263
|
+
margin: auto;
|
|
264
|
+
opacity: 0;
|
|
265
|
+
position: absolute;
|
|
266
|
+
transition: opacity var(--slotted-duration-short) var(--slotted-easing-standard);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
[data-ui='color-picker']
|
|
270
|
+
[data-part='previous']:is(:hover, :focus-visible):not(:disabled)
|
|
271
|
+
> [data-ui='icon'] {
|
|
272
|
+
opacity: 1;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
[data-ui='color-picker'] [data-part='previous']:focus-visible {
|
|
276
|
+
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
277
|
+
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/* The value as text sits in a `text-field` the binding renders; it takes
|
|
281
|
+
the width the row leaves. */
|
|
282
|
+
[data-ui='color-picker'] [data-part='row'] > [data-ui='text-field'] {
|
|
283
|
+
flex: 1 1 0;
|
|
284
|
+
inline-size: auto;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/* ── Format and eyedropper ──────────────────────────────────────────────
|
|
288
|
+
*
|
|
289
|
+
* Both are inner controls of the row (R2): no frame and no ground at rest,
|
|
290
|
+
* one step of ground for hover and one for press.
|
|
291
|
+
*/
|
|
292
|
+
[data-ui='color-picker'] :is([data-part='format'], [data-part='eyedropper']) {
|
|
293
|
+
--slotted-icon-size: var(--_icon-size);
|
|
294
|
+
|
|
295
|
+
align-items: center;
|
|
296
|
+
appearance: none;
|
|
297
|
+
background-color: transparent;
|
|
298
|
+
block-size: var(--_inner-size);
|
|
299
|
+
border: 0;
|
|
300
|
+
border-radius: var(--slotted-control-radius, 4px);
|
|
301
|
+
color: var(--slotted-text-muted, GrayText);
|
|
302
|
+
cursor: pointer;
|
|
303
|
+
display: inline-flex;
|
|
304
|
+
flex: 0 0 auto;
|
|
305
|
+
font: inherit;
|
|
306
|
+
font-variant-numeric: tabular-nums;
|
|
307
|
+
gap: var(--slotted-space-2, 0.25rem);
|
|
308
|
+
justify-content: center;
|
|
309
|
+
min-inline-size: var(--_inner-size);
|
|
310
|
+
padding: 0;
|
|
311
|
+
position: relative;
|
|
312
|
+
transition: background-color var(--slotted-control-transition-duration)
|
|
313
|
+
var(--slotted-control-transition-easing);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
[data-ui='color-picker'] [data-part='format'] {
|
|
317
|
+
color: var(--slotted-text, CanvasText);
|
|
318
|
+
font-weight: var(--slotted-font-weight-medium, 500);
|
|
319
|
+
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
320
|
+
text-transform: uppercase;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Words and a mark in one button — a country code over its chevron, a model
|
|
325
|
+
* name, a notation. The mark is centred on the band the letters occupy, not
|
|
326
|
+
* on the line box: the line box keeps room under the baseline for
|
|
327
|
+
* descenders, so a box centred in it sits low beside the letters — every
|
|
328
|
+
* chevron in these buttons did. The rule is the briefing's (_A mark beside a
|
|
329
|
+
* line of text is aligned to the text_), here in a grid: items share the
|
|
330
|
+
* baseline, the mark's synthesized baseline is its bottom edge, a negative
|
|
331
|
+
* start margin takes back the height it would add above the letters, and a
|
|
332
|
+
* translate puts its centre at `(1cap + 1ex) / 4` above the baseline — the
|
|
333
|
+
* midpoint of the capitals' and the lowercase letters' own centres.
|
|
334
|
+
*/
|
|
335
|
+
[data-ui='color-picker'] [data-part='format'] {
|
|
336
|
+
align-content: center;
|
|
337
|
+
align-items: baseline;
|
|
338
|
+
display: inline-grid;
|
|
339
|
+
grid-auto-flow: column;
|
|
340
|
+
justify-content: center;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
[data-ui='color-picker'] [data-part='format'] > [data-ui='icon'] {
|
|
344
|
+
margin-block-start: calc((1cap + 1ex) / 4 - var(--_icon-size) / 2);
|
|
345
|
+
translate: 0 calc(var(--_icon-size) / 2 - (1cap + 1ex) / 4);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
[data-ui='color-picker'] :is([data-part='format'], [data-part='eyedropper'])::after {
|
|
349
|
+
content: '';
|
|
350
|
+
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
351
|
+
position: absolute;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
@media (pointer: coarse) {
|
|
355
|
+
[data-ui='color-picker'] :is([data-part='format'], [data-part='eyedropper'])::after {
|
|
356
|
+
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
[data-ui='color-picker']
|
|
361
|
+
:is([data-part='format'], [data-part='eyedropper']):hover:not(
|
|
362
|
+
:disabled,
|
|
363
|
+
[aria-expanded='true']
|
|
364
|
+
) {
|
|
365
|
+
background-color: var(--slotted-tone-secondary-subtle-hover);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
[data-ui='color-picker']
|
|
369
|
+
:is([data-part='format'], [data-part='eyedropper']):is(:active, [aria-expanded='true']):not(
|
|
370
|
+
:disabled
|
|
371
|
+
) {
|
|
372
|
+
background-color: var(--slotted-tone-secondary-subtle-active);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
[data-ui='color-picker'] :is([data-part='format'], [data-part='eyedropper']):focus-visible {
|
|
376
|
+
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
377
|
+
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/* ── Presets ────────────────────────────────────────────────────────────
|
|
381
|
+
*
|
|
382
|
+
* A radio group of swatches on a grid that fills the panel's width. The
|
|
383
|
+
* chosen one is ringed in the theme's ring colour at a gap of the panel's
|
|
384
|
+
* ground, so the ring never touches the colour it marks.
|
|
385
|
+
*/
|
|
386
|
+
[data-ui='color-picker'] [data-part='presets'] {
|
|
387
|
+
display: grid;
|
|
388
|
+
gap: var(--slotted-space-3, 0.375rem);
|
|
389
|
+
/* A step under the control's inner size, so the ten swatches of a
|
|
390
|
+
palette sit on one line across the panel's default width. */
|
|
391
|
+
grid-template-columns: repeat(
|
|
392
|
+
auto-fill,
|
|
393
|
+
minmax(calc(var(--_inner-size) - var(--slotted-space-2, 4px)), 1fr)
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
[data-ui='color-picker'] [data-part='preset'] {
|
|
398
|
+
appearance: none;
|
|
399
|
+
aspect-ratio: 1;
|
|
400
|
+
background:
|
|
401
|
+
linear-gradient(
|
|
402
|
+
var(--slotted-color-picker-preset, transparent),
|
|
403
|
+
var(--slotted-color-picker-preset, transparent)
|
|
404
|
+
),
|
|
405
|
+
var(--_checker);
|
|
406
|
+
border: 0;
|
|
407
|
+
border-radius: var(--slotted-radius-sm, 4px);
|
|
408
|
+
box-shadow: inset 0 0 0 var(--slotted-border-width-thin, 1px)
|
|
409
|
+
var(--slotted-border-subtle, transparent);
|
|
410
|
+
cursor: pointer;
|
|
411
|
+
margin: 0;
|
|
412
|
+
min-inline-size: 0;
|
|
413
|
+
padding: 0;
|
|
414
|
+
position: relative;
|
|
415
|
+
transition:
|
|
416
|
+
scale var(--slotted-duration-short) var(--slotted-easing-standard),
|
|
417
|
+
box-shadow var(--slotted-duration-short) var(--slotted-easing-standard);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
[data-ui='color-picker'] [data-part='preset']:hover:not(:disabled) {
|
|
421
|
+
scale: 1.08;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
[data-ui='color-picker'] [data-part='preset']:active:not(:disabled) {
|
|
425
|
+
scale: 0.94;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
[data-ui='color-picker'] [data-part='preset'][data-selected] {
|
|
429
|
+
box-shadow:
|
|
430
|
+
0 0 0 var(--slotted-border-width-medium, 2px) var(--slotted-surface-raised, Canvas),
|
|
431
|
+
0 0 0 calc(var(--slotted-border-width-medium, 2px) * 2) var(--slotted-text, CanvasText);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
[data-ui='color-picker'] [data-part='preset']:focus-visible {
|
|
435
|
+
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
436
|
+
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/* ── Contrast and gamut ─────────────────────────────────────────────────
|
|
440
|
+
*
|
|
441
|
+
* `Aa` set in the colour on the background the consumer named, beside the
|
|
442
|
+
* WCAG ratio and the level it reaches. The level is a word in a badge
|
|
443
|
+
* coloured by its tone, never colour alone.
|
|
444
|
+
*/
|
|
445
|
+
[data-ui='color-picker'] [data-part='contrast'] {
|
|
446
|
+
align-items: center;
|
|
447
|
+
display: flex;
|
|
448
|
+
font-variant-numeric: tabular-nums;
|
|
449
|
+
gap: var(--slotted-space-4, 0.5rem);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
[data-ui='color-picker'] [data-part='contrast-sample'] {
|
|
453
|
+
background: var(--slotted-color-picker-contrast-with, var(--slotted-surface, Canvas));
|
|
454
|
+
block-size: var(--_inner-size);
|
|
455
|
+
border-radius: var(--slotted-radius-sm, 4px);
|
|
456
|
+
box-shadow: inset 0 0 0 var(--slotted-border-width-thin, 1px)
|
|
457
|
+
var(--slotted-border-subtle, transparent);
|
|
458
|
+
color: var(--_color);
|
|
459
|
+
display: inline-grid;
|
|
460
|
+
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
461
|
+
inline-size: calc(var(--_inner-size) * 3 / 2);
|
|
462
|
+
place-items: center;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
[data-ui='color-picker'] [data-part='contrast-ratio'] {
|
|
466
|
+
color: var(--slotted-text, CanvasText);
|
|
467
|
+
font-weight: var(--slotted-font-weight-medium, 500);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
[data-ui='color-picker'] [data-part='contrast-level'] {
|
|
471
|
+
border-radius: var(--slotted-radius-sm, 4px);
|
|
472
|
+
font-size: var(--slotted-font-size-xs, 12px);
|
|
473
|
+
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
474
|
+
margin-inline-start: auto;
|
|
475
|
+
padding: var(--slotted-space-1, 2px) var(--slotted-space-3, 0.375rem);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
[data-ui='color-picker'] [data-part='contrast'][data-level^='AA'] [data-part='contrast-level'] {
|
|
479
|
+
background: var(--slotted-tone-success-surface, Canvas);
|
|
480
|
+
color: var(--slotted-tone-success-text, CanvasText);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
[data-ui='color-picker']
|
|
484
|
+
[data-part='contrast'][data-level='AA-large']
|
|
485
|
+
[data-part='contrast-level'] {
|
|
486
|
+
background: var(--slotted-tone-warning-surface, Canvas);
|
|
487
|
+
color: var(--slotted-tone-warning-text, CanvasText);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
[data-ui='color-picker'] [data-part='contrast'][data-level='fail'] [data-part='contrast-level'] {
|
|
491
|
+
background: var(--slotted-tone-danger-surface, Canvas);
|
|
492
|
+
color: var(--slotted-tone-danger-text, CanvasText);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
[data-ui='color-picker'] [data-part='gamut'] {
|
|
496
|
+
--slotted-icon-size: var(--_icon-size);
|
|
497
|
+
|
|
498
|
+
align-items: center;
|
|
499
|
+
color: var(--slotted-tone-warning-text, CanvasText);
|
|
500
|
+
display: flex;
|
|
501
|
+
font-size: var(--slotted-font-size-xs, 12px);
|
|
502
|
+
gap: var(--slotted-space-2, 0.25rem);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/* ── The field's swatch ─────────────────────────────────────────────────
|
|
506
|
+
*
|
|
507
|
+
* In a `text-field`'s start: a rounded square of the colour over the grid,
|
|
508
|
+
* at the inner size of the control, concentric with the field's corner.
|
|
509
|
+
* It is the trigger, and it answers the press like the field's other inner
|
|
510
|
+
* buttons, by its ground — here the ring around it.
|
|
511
|
+
*/
|
|
512
|
+
[data-ui='text-field'] [data-ui='color-picker'][data-part='trigger'] {
|
|
513
|
+
appearance: none;
|
|
514
|
+
background:
|
|
515
|
+
linear-gradient(var(--_color, transparent), var(--_color, transparent)),
|
|
516
|
+
repeating-conic-gradient(
|
|
517
|
+
var(--slotted-surface-sunken, Canvas) 0 25%,
|
|
518
|
+
var(--slotted-surface, Canvas) 0 50%
|
|
519
|
+
)
|
|
520
|
+
0 0 / 8px 8px;
|
|
521
|
+
block-size: calc(var(--slotted-control-inner-size, 24px) - var(--slotted-space-2, 4px));
|
|
522
|
+
border: 0;
|
|
523
|
+
border-radius: var(--slotted-radius-sm, 4px);
|
|
524
|
+
box-shadow: inset 0 0 0 var(--slotted-border-width-thin, 1px)
|
|
525
|
+
var(--slotted-border-subtle, transparent);
|
|
526
|
+
cursor: pointer;
|
|
527
|
+
flex: 0 0 auto;
|
|
528
|
+
inline-size: calc(var(--slotted-control-inner-size, 24px) - var(--slotted-space-2, 4px));
|
|
529
|
+
padding: 0;
|
|
530
|
+
position: relative;
|
|
531
|
+
transition: box-shadow var(--slotted-control-transition-duration)
|
|
532
|
+
var(--slotted-control-transition-easing);
|
|
533
|
+
--_color: var(--slotted-color-picker-color, transparent);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
[data-ui='text-field'] [data-ui='color-picker'][data-part='trigger']::after {
|
|
537
|
+
content: '';
|
|
538
|
+
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
539
|
+
position: absolute;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
[data-ui='text-field'] [data-ui='color-picker'][data-part='trigger']:hover:not(:disabled) {
|
|
543
|
+
box-shadow:
|
|
544
|
+
inset 0 0 0 var(--slotted-border-width-thin, 1px) var(--slotted-border-subtle, transparent),
|
|
545
|
+
0 0 0 var(--slotted-border-width-medium, 2px) var(--slotted-tone-secondary-subtle-hover);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
[data-ui='text-field']
|
|
549
|
+
[data-ui='color-picker'][data-part='trigger']:is(:active, [aria-expanded='true']):not(
|
|
550
|
+
:disabled
|
|
551
|
+
) {
|
|
552
|
+
box-shadow:
|
|
553
|
+
inset 0 0 0 var(--slotted-border-width-thin, 1px) var(--slotted-border-subtle, transparent),
|
|
554
|
+
0 0 0 var(--slotted-border-width-medium, 2px) var(--slotted-tone-secondary-subtle-active);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
[data-ui='text-field'] [data-ui='color-picker'][data-part='trigger']:focus-visible {
|
|
558
|
+
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
559
|
+
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
/* ── States ───────────────────────────────────────────────────────────── */
|
|
563
|
+
|
|
564
|
+
[data-ui='color-picker'][data-part='root'][data-disabled] {
|
|
565
|
+
color: var(--slotted-disabled-foreground);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
[data-ui='color-picker'][data-part='root'][data-disabled]
|
|
569
|
+
:is([data-part='area'], [data-part='channel'], [data-part='presets']) {
|
|
570
|
+
filter: grayscale(1);
|
|
571
|
+
pointer-events: none;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
[data-ui='color-picker'][data-part='root'][data-disabled]
|
|
575
|
+
:is([data-part='area-thumb'], [data-part='channel-thumb']) {
|
|
576
|
+
cursor: not-allowed;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
[data-ui='color-picker'][data-part='root'][data-readonly]
|
|
580
|
+
:is(
|
|
581
|
+
[data-part='area'],
|
|
582
|
+
[data-part='channel'],
|
|
583
|
+
[data-part='preset'],
|
|
584
|
+
[data-part='area-thumb'],
|
|
585
|
+
[data-part='channel-thumb']
|
|
586
|
+
) {
|
|
587
|
+
cursor: default;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
@media (forced-colors: active) {
|
|
591
|
+
[data-ui='color-picker'] :is([data-part='area-thumb'], [data-part='channel-thumb']) {
|
|
592
|
+
border-color: CanvasText;
|
|
593
|
+
forced-color-adjust: none;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
[data-ui='color-picker']
|
|
597
|
+
:is(
|
|
598
|
+
[data-part='area'],
|
|
599
|
+
[data-part='channel'],
|
|
600
|
+
[data-part='swatch'],
|
|
601
|
+
[data-part='previous'],
|
|
602
|
+
[data-part='preset']
|
|
603
|
+
) {
|
|
604
|
+
forced-color-adjust: none;
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
[
|
|
2
|
+
"--slotted-border-subtle",
|
|
3
|
+
"--slotted-border-width-medium",
|
|
4
|
+
"--slotted-border-width-thin",
|
|
5
|
+
"--slotted-color-picker-channel-size",
|
|
6
|
+
"--slotted-color-picker-thumb-size",
|
|
7
|
+
"--slotted-color-picker-width",
|
|
8
|
+
"--slotted-control-font-family",
|
|
9
|
+
"--slotted-control-font-size-lg",
|
|
10
|
+
"--slotted-control-font-size-md",
|
|
11
|
+
"--slotted-control-font-size-sm",
|
|
12
|
+
"--slotted-control-height-md",
|
|
13
|
+
"--slotted-control-icon-size-lg",
|
|
14
|
+
"--slotted-control-icon-size-md",
|
|
15
|
+
"--slotted-control-icon-size-sm",
|
|
16
|
+
"--slotted-control-inner-size",
|
|
17
|
+
"--slotted-control-inner-size-lg",
|
|
18
|
+
"--slotted-control-inner-size-md",
|
|
19
|
+
"--slotted-control-inner-size-sm",
|
|
20
|
+
"--slotted-control-radius",
|
|
21
|
+
"--slotted-control-transition-duration",
|
|
22
|
+
"--slotted-control-transition-easing",
|
|
23
|
+
"--slotted-disabled-foreground",
|
|
24
|
+
"--slotted-duration-short",
|
|
25
|
+
"--slotted-easing-standard",
|
|
26
|
+
"--slotted-focus-ring-color",
|
|
27
|
+
"--slotted-focus-ring-offset",
|
|
28
|
+
"--slotted-focus-ring-width",
|
|
29
|
+
"--slotted-font-size-xs",
|
|
30
|
+
"--slotted-font-weight-medium",
|
|
31
|
+
"--slotted-font-weight-semibold",
|
|
32
|
+
"--slotted-radius-full",
|
|
33
|
+
"--slotted-radius-md",
|
|
34
|
+
"--slotted-radius-sm",
|
|
35
|
+
"--slotted-shadow-sm",
|
|
36
|
+
"--slotted-space-1",
|
|
37
|
+
"--slotted-space-12",
|
|
38
|
+
"--slotted-space-2",
|
|
39
|
+
"--slotted-space-3",
|
|
40
|
+
"--slotted-space-4",
|
|
41
|
+
"--slotted-space-5",
|
|
42
|
+
"--slotted-space-6",
|
|
43
|
+
"--slotted-surface",
|
|
44
|
+
"--slotted-surface-raised",
|
|
45
|
+
"--slotted-surface-sunken",
|
|
46
|
+
"--slotted-target-comfortable",
|
|
47
|
+
"--slotted-target-min",
|
|
48
|
+
"--slotted-text",
|
|
49
|
+
"--slotted-text-muted",
|
|
50
|
+
"--slotted-tone-danger-surface",
|
|
51
|
+
"--slotted-tone-danger-text",
|
|
52
|
+
"--slotted-tone-secondary-subtle-active",
|
|
53
|
+
"--slotted-tone-secondary-subtle-hover",
|
|
54
|
+
"--slotted-tone-success-surface",
|
|
55
|
+
"--slotted-tone-success-text",
|
|
56
|
+
"--slotted-tone-warning-surface",
|
|
57
|
+
"--slotted-tone-warning-text"
|
|
58
|
+
]
|