@slotted/styles 0.1.0-beta.4 → 0.1.0-beta.40
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/package.json +21 -1
- package/src/accordion/accordion.css +31 -13
- package/src/accordion/accordion.tokens.json +2 -0
- package/src/action-bar/action-bar.css +47 -44
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +39 -39
- package/src/alert/alert.css +97 -97
- package/src/alert/alert.tokens.json +6 -1
- package/src/app-shell/app-shell.css +472 -342
- package/src/app-shell/app-shell.tokens.json +6 -3
- package/src/aspect-ratio/aspect-ratio.css +24 -23
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +97 -67
- package/src/avatar/avatar.tokens.json +8 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +58 -47
- package/src/badge/badge.tokens.json +6 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +408 -93
- package/src/button/button.tokens.json +13 -0
- package/src/button-group/button-group.css +80 -79
- package/src/button-group/button-group.tokens.json +1 -0
- package/src/calendar/calendar.css +594 -267
- package/src/calendar/calendar.tokens.json +35 -3
- package/src/card/card.css +133 -70
- package/src/card/card.tokens.json +1 -0
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +174 -159
- package/src/cascader/cascader.tokens.json +2 -0
- package/src/chart/chart.css +300 -271
- package/src/chart/chart.tokens.json +5 -0
- package/src/checkbox/checkbox.css +190 -148
- package/src/checkbox/checkbox.tokens.json +4 -0
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/clock/clock.css +246 -0
- package/src/clock/clock.tokens.json +44 -0
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +273 -85
- package/src/collapsible/collapsible.tokens.json +6 -0
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +219 -132
- package/src/combobox/combobox.tokens.json +4 -0
- package/src/command-palette/command-palette.css +214 -102
- package/src/command-palette/command-palette.tokens.json +4 -0
- package/src/container/container.css +27 -27
- package/src/context-menu/context-menu.css +9 -9
- package/src/currency-field/currency-field.css +119 -119
- package/src/currency-field/currency-field.tokens.json +1 -0
- package/src/dashboard-grid/dashboard-grid.css +231 -115
- package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
- package/src/data-grid/data-grid.css +637 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +93 -76
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +62 -57
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +31 -269
- package/src/date-picker/date-picker.tokens.json +1 -21
- package/src/date-range-picker/date-range-picker.css +72 -528
- package/src/date-range-picker/date-range-picker.tokens.json +1 -37
- package/src/datetime-field/datetime-field.css +90 -90
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +49 -711
- package/src/datetime-picker/datetime-picker.tokens.json +1 -50
- package/src/datetime-range-picker/datetime-range-picker.css +60 -985
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -67
- package/src/description-list/description-list.css +120 -76
- package/src/description-list/description-list.tokens.json +1 -0
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +462 -199
- package/src/dialog/dialog.tokens.json +10 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +736 -237
- package/src/drawer/drawer.tokens.json +15 -0
- package/src/entity-picker/entity-picker.css +402 -272
- package/src/entity-picker/entity-picker.tokens.json +6 -0
- package/src/event-calendar/event-calendar.css +357 -399
- package/src/field/field.css +106 -93
- package/src/field/field.tokens.json +2 -0
- package/src/field-group/field-group.css +58 -38
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +224 -216
- package/src/floating-panel/floating-panel.css +147 -0
- package/src/floating-panel/floating-panel.tokens.json +32 -0
- package/src/form/form.css +103 -26
- package/src/form/form.tokens.json +6 -1
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +32 -31
- package/src/highlight/highlight.css +11 -11
- package/src/hover-card/hover-card.css +9 -9
- package/src/icon/icon.css +67 -20
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +42 -42
- package/src/import-export-center/import-export-center.css +147 -168
- package/src/import-export-center/import-export-center.tokens.json +1 -0
- package/src/inline/inline.css +29 -29
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +5 -0
- package/src/kbd/kbd.css +63 -51
- package/src/kbd/kbd.tokens.json +4 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +55 -24
- package/src/list/list.tokens.json +2 -0
- package/src/list-item/list-item.css +195 -80
- package/src/list-item/list-item.tokens.json +10 -0
- package/src/listbox/listbox.css +121 -72
- package/src/listbox/listbox.tokens.json +6 -1
- package/src/loading-overlay/loading-overlay.css +86 -103
- package/src/markdown/markdown.css +20 -20
- package/src/media-viewer/media-viewer.css +790 -0
- package/src/media-viewer/media-viewer.tokens.json +53 -0
- package/src/menu/menu.css +166 -83
- package/src/menu/menu.tokens.json +3 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1296 -1243
- package/src/message/message.tokens.json +14 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/meter/meter.css +136 -0
- package/src/meter/meter.tokens.json +23 -0
- package/src/multi-select/multi-select.css +246 -174
- package/src/multi-select/multi-select.tokens.json +3 -0
- package/src/navigation-menu/navigation-menu.css +170 -191
- package/src/navigation-menu/navigation-menu.tokens.json +1 -0
- package/src/notification-center/notification-center.css +155 -163
- package/src/notification-center/notification-center.tokens.json +4 -0
- package/src/number-field/number-field.css +93 -93
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +74 -64
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +109 -31
- package/src/page/page.tokens.json +8 -0
- package/src/page-header/page-header.css +342 -287
- package/src/page-header/page-header.tokens.json +6 -1
- package/src/pagination/pagination.css +75 -79
- package/src/picker-panel/picker-panel.css +1074 -0
- package/src/picker-panel/picker-panel.tokens.json +77 -0
- package/src/popover/popover.css +85 -65
- package/src/popover/popover.tokens.json +2 -0
- package/src/progress-indicator/progress-indicator.css +194 -137
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +274 -116
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +77 -82
- package/src/radio-group/radio-group.css +107 -112
- package/src/rating/rating.css +147 -143
- package/src/rating/rating.tokens.json +2 -0
- package/src/result-state/result-state.css +95 -102
- package/src/result-state/result-state.tokens.json +1 -0
- package/src/runtime-properties.mjs +44 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +50 -37
- package/src/section/section.css +311 -46
- package/src/section/section.tokens.json +13 -1
- package/src/segmented-control/segmented-control.css +221 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +226 -149
- package/src/select/select.tokens.json +4 -0
- package/src/side-navigation/side-navigation.css +204 -201
- package/src/side-navigation/side-navigation.tokens.json +2 -0
- package/src/skeleton/skeleton.css +76 -58
- package/src/slider/slider.css +108 -104
- package/src/slider/slider.tokens.json +1 -0
- package/src/sparkline/sparkline.css +75 -53
- package/src/sparkline/sparkline.tokens.json +2 -0
- package/src/spinner/spinner.css +83 -180
- package/src/spinner/spinner.tokens.json +0 -1
- package/src/split-button/split-button.css +34 -35
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +47 -48
- package/src/stack/stack.css +26 -26
- package/src/stat-card/stat-card.css +420 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +126 -101
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +143 -125
- package/src/switch/switch.tokens.json +4 -0
- package/src/table/table.css +653 -222
- package/src/table/table.tokens.json +10 -0
- package/src/table-of-contents/table-of-contents.css +60 -59
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +327 -294
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +113 -89
- package/src/tag/tag.tokens.json +11 -0
- package/src/tags-input/tags-input.css +152 -87
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +146 -148
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +38 -33
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +82 -77
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +30 -519
- package/src/time-picker/time-picker.tokens.json +1 -38
- package/src/time-range-picker/time-range-picker.css +53 -895
- package/src/time-range-picker/time-range-picker.tokens.json +1 -66
- package/src/timeline/timeline.css +280 -292
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +139 -122
- package/src/toast/toast.tokens.json +7 -0
- package/src/toggle/toggle.css +34 -38
- package/src/toggle-group/toggle-group.css +73 -77
- package/src/toolbar/toolbar.css +49 -40
- package/src/toolbar/toolbar.tokens.json +2 -1
- package/src/tooltip/tooltip.css +95 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +253 -269
- package/src/top-navigation/top-navigation.tokens.json +1 -0
- package/src/tour/tour.css +68 -74
- package/src/tour/tour.tokens.json +1 -0
- package/src/transfer/transfer.css +164 -168
- package/src/tree/tree.css +118 -122
- package/src/typography/typography.css +67 -38
- package/src/typography/typography.tokens.json +2 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
@layer slotted.components {
|
|
2
|
+
/**
|
|
3
|
+
* A static value within a known range, drawn as a length.
|
|
4
|
+
*
|
|
5
|
+
* ┌─ root ─ role="meter" ─ the whole inline size it is given ───────┐
|
|
6
|
+
* │ ┌─ track ─ one continuous ground ─────────────────────────────┐ │
|
|
7
|
+
* │ │ ┌─ indicator ─ the share, from the inline start ─┐ │ │
|
|
8
|
+
* │ │ └────────────────────────────────────────────────┘ │ │
|
|
9
|
+
* │ └─────────────────────────────────────────────────────────────┘ │
|
|
10
|
+
* └──────────────────────────────────────────────────────────────────┘
|
|
11
|
+
*
|
|
12
|
+
* ── Why it is not a progress bar ────────────────────────────────────
|
|
13
|
+
*
|
|
14
|
+
* A progress bar is a wait: its track keeps a gap before the indicator and
|
|
15
|
+
* an end mark at its far end, which read as how far there is still to go.
|
|
16
|
+
* A share of a whole goes nowhere, so the track is one continuous ground
|
|
17
|
+
* and carries neither. The ink and the ground are `progress-indicator`'s
|
|
18
|
+
* own formula, and its tokens are the fallback, so a theme that retuned the
|
|
19
|
+
* progress bar retunes the meter beside it.
|
|
20
|
+
*
|
|
21
|
+
* ── Why it fills the cell ───────────────────────────────────────────
|
|
22
|
+
*
|
|
23
|
+
* A meter is read beside its exact value, most often in a table column. A
|
|
24
|
+
* box with no inline size of its own shrinks to nothing in an auto-layout
|
|
25
|
+
* cell, so the root takes the whole inline size it is given and keeps a
|
|
26
|
+
* least size that a column of shares still reads at.
|
|
27
|
+
*/
|
|
28
|
+
[data-ui-meter][data-part-root] {
|
|
29
|
+
--_ink: var(
|
|
30
|
+
--slotted-meter-indicator-color,
|
|
31
|
+
var(--slotted-progress-indicator-indicator-color, var(--slotted-tone-accent-text))
|
|
32
|
+
);
|
|
33
|
+
--_track-color: var(
|
|
34
|
+
--slotted-meter-track-color,
|
|
35
|
+
var(
|
|
36
|
+
--slotted-progress-indicator-track-color,
|
|
37
|
+
color-mix(in oklab, var(--_ink) 24%, var(--slotted-surface))
|
|
38
|
+
)
|
|
39
|
+
);
|
|
40
|
+
--_thickness: var(--slotted-meter-thickness, var(--slotted-space-3, 0.375rem));
|
|
41
|
+
--_radius: var(--slotted-meter-radius, var(--slotted-radius-full, 9999px));
|
|
42
|
+
--_ratio: var(--slotted-meter-ratio, 0);
|
|
43
|
+
|
|
44
|
+
box-sizing: border-box;
|
|
45
|
+
display: block;
|
|
46
|
+
inline-size: 100%;
|
|
47
|
+
min-inline-size: var(--slotted-meter-min-inline-size, 4rem);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
[data-ui-meter][data-part-root][data-size='sm'] {
|
|
51
|
+
--_thickness: var(--slotted-meter-thickness, var(--slotted-space-2, 0.25rem));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
[data-ui-meter][data-part-root][data-size='lg'] {
|
|
55
|
+
--_thickness: var(--slotted-meter-thickness, var(--slotted-space-4, 0.5rem));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* A tone is the ink of the indicator. `secondary` and `neutral` take the
|
|
60
|
+
* strong border step, because the secondary tone's text color is the page's
|
|
61
|
+
* own ink in two schemes and a bar painted from it reads as text.
|
|
62
|
+
*/
|
|
63
|
+
[data-ui-meter][data-part-root][data-tone='secondary'],
|
|
64
|
+
[data-ui-meter][data-part-root][data-tone='neutral'] {
|
|
65
|
+
--_ink: var(--slotted-meter-indicator-color, var(--slotted-border-strong));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-ui-meter][data-part-root][data-tone='info'] {
|
|
69
|
+
--_ink: var(--slotted-meter-indicator-color, var(--slotted-tone-info-text));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
[data-ui-meter][data-part-root][data-tone='success'] {
|
|
73
|
+
--_ink: var(--slotted-meter-indicator-color, var(--slotted-tone-success-text));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
[data-ui-meter][data-part-root][data-tone='warning'] {
|
|
77
|
+
--_ink: var(--slotted-meter-indicator-color, var(--slotted-tone-warning-text));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[data-ui-meter][data-part-root][data-tone='danger'] {
|
|
81
|
+
--_ink: var(--slotted-meter-indicator-color, var(--slotted-tone-danger-text));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
[data-ui-meter] [data-part-track] {
|
|
85
|
+
background-color: var(--_track-color);
|
|
86
|
+
block-size: var(--_thickness);
|
|
87
|
+
border-radius: var(--_radius);
|
|
88
|
+
display: block;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The indicator is the whole track clipped from its inline end, so a value
|
|
94
|
+
* that changes moves without a layout and the rounded end stays round at
|
|
95
|
+
* every share: a scaled box squashes its own radius.
|
|
96
|
+
*/
|
|
97
|
+
[data-ui-meter] [data-part-indicator] {
|
|
98
|
+
--_clip: calc((1 - var(--_ratio)) * 100%);
|
|
99
|
+
|
|
100
|
+
background-color: var(--_ink);
|
|
101
|
+
block-size: 100%;
|
|
102
|
+
clip-path: inset(0 var(--_clip) 0 0 round var(--_radius));
|
|
103
|
+
display: block;
|
|
104
|
+
inline-size: 100%;
|
|
105
|
+
transition: clip-path var(--slotted-duration-medium) var(--slotted-easing-standard);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
[data-ui-meter] [data-part-indicator]:dir(rtl) {
|
|
109
|
+
clip-path: inset(0 0 0 var(--_clip) round var(--_radius));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@media (prefers-reduced-motion: reduce) {
|
|
113
|
+
[data-ui-meter] [data-part-indicator] {
|
|
114
|
+
transition: none;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* ── Forced colors ───────────────────────────────────────────────────
|
|
120
|
+
*
|
|
121
|
+
* The palette flattens the ink and the ground into the same system color,
|
|
122
|
+
* so the track keeps an outline and the indicator takes the highlight.
|
|
123
|
+
*/
|
|
124
|
+
@media (forced-colors: active) {
|
|
125
|
+
[data-ui-meter] [data-part-track] {
|
|
126
|
+
background-color: Canvas;
|
|
127
|
+
outline: var(--slotted-border-width-thin, 1px) solid CanvasText;
|
|
128
|
+
outline-offset: calc(-1 * var(--slotted-border-width-thin, 1px));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
[data-ui-meter] [data-part-indicator] {
|
|
132
|
+
background-color: Highlight;
|
|
133
|
+
forced-color-adjust: none;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[
|
|
2
|
+
"--slotted-border-strong",
|
|
3
|
+
"--slotted-border-width-thin",
|
|
4
|
+
"--slotted-duration-medium",
|
|
5
|
+
"--slotted-easing-standard",
|
|
6
|
+
"--slotted-meter-indicator-color",
|
|
7
|
+
"--slotted-meter-min-inline-size",
|
|
8
|
+
"--slotted-meter-radius",
|
|
9
|
+
"--slotted-meter-thickness",
|
|
10
|
+
"--slotted-meter-track-color",
|
|
11
|
+
"--slotted-progress-indicator-indicator-color",
|
|
12
|
+
"--slotted-progress-indicator-track-color",
|
|
13
|
+
"--slotted-radius-full",
|
|
14
|
+
"--slotted-space-2",
|
|
15
|
+
"--slotted-space-3",
|
|
16
|
+
"--slotted-space-4",
|
|
17
|
+
"--slotted-surface",
|
|
18
|
+
"--slotted-tone-accent-text",
|
|
19
|
+
"--slotted-tone-danger-text",
|
|
20
|
+
"--slotted-tone-info-text",
|
|
21
|
+
"--slotted-tone-success-text",
|
|
22
|
+
"--slotted-tone-warning-text"
|
|
23
|
+
]
|