@agent-native/design-system 0.0.0-stage → 0.229.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 +78 -2
- package/THIRD_PARTY_NOTICES.md +58 -0
- package/css/appearances.css +91 -0
- package/css/main.css +174 -0
- package/css/parts/accordion.css +104 -0
- package/css/parts/alert-dialog.css +159 -0
- package/css/parts/app-shell.css +45 -0
- package/css/parts/aspect-ratio.css +20 -0
- package/css/parts/autocomplete.css +366 -0
- package/css/parts/avatar.css +108 -0
- package/css/parts/badge.css +100 -0
- package/css/parts/blockquote.css +23 -0
- package/css/parts/button.css +238 -0
- package/css/parts/callout.css +108 -0
- package/css/parts/card.css +144 -0
- package/css/parts/checkbox-cards.css +59 -0
- package/css/parts/checkbox-group.css +20 -0
- package/css/parts/checkbox.css +127 -0
- package/css/parts/code.css +194 -0
- package/css/parts/collapsible.css +40 -0
- package/css/parts/combobox.css +171 -0
- package/css/parts/context-menu.css +18 -0
- package/css/parts/data-list.css +130 -0
- package/css/parts/dialog.css +251 -0
- package/css/parts/drawer.css +289 -0
- package/css/parts/em.css +16 -0
- package/css/parts/field.css +55 -0
- package/css/parts/fieldset.css +34 -0
- package/css/parts/form.css +18 -0
- package/css/parts/heading.css +25 -0
- package/css/parts/icon-button.css +30 -0
- package/css/parts/input.css +206 -0
- package/css/parts/inset.css +90 -0
- package/css/parts/item.css +208 -0
- package/css/parts/kbd.css +126 -0
- package/css/parts/link.css +99 -0
- package/css/parts/menu.css +342 -0
- package/css/parts/menubar.css +71 -0
- package/css/parts/meter.css +112 -0
- package/css/parts/navigation-menu.css +199 -0
- package/css/parts/number-field.css +124 -0
- package/css/parts/otp-field.css +137 -0
- package/css/parts/page-header.css +45 -0
- package/css/parts/popover.css +149 -0
- package/css/parts/preview-card.css +116 -0
- package/css/parts/progress.css +159 -0
- package/css/parts/quote.css +18 -0
- package/css/parts/radio-cards.css +188 -0
- package/css/parts/radio-group.css +124 -0
- package/css/parts/scroll-area.css +95 -0
- package/css/parts/segmented-control.css +191 -0
- package/css/parts/select.css +378 -0
- package/css/parts/separator.css +48 -0
- package/css/parts/sidebar.css +211 -0
- package/css/parts/skeleton.css +65 -0
- package/css/parts/slider.css +156 -0
- package/css/parts/spinner.css +52 -0
- package/css/parts/strong.css +15 -0
- package/css/parts/switch.css +138 -0
- package/css/parts/tab-nav.css +48 -0
- package/css/parts/table.css +177 -0
- package/css/parts/tabs.css +214 -0
- package/css/parts/text-area.css +140 -0
- package/css/parts/text.css +245 -0
- package/css/parts/toast.css +302 -0
- package/css/parts/toggle-group.css +25 -0
- package/css/parts/toggle.css +181 -0
- package/css/parts/toolbar.css +133 -0
- package/css/parts/tooltip.css +61 -0
- package/css/parts/visually-hidden.css +21 -0
- package/css/styles.css +73 -0
- package/css/themes/agent-native.css +2321 -0
- package/css/themes/analytics.css +1159 -0
- package/css/themes/assets.css +1159 -0
- package/css/themes/baseline.css +1107 -0
- package/css/themes/brain.css +1159 -0
- package/css/themes/calendar.css +1159 -0
- package/css/themes/chat.css +1159 -0
- package/css/themes/clips.css +1159 -0
- package/css/themes/content.css +1159 -0
- package/css/themes/crm.css +1159 -0
- package/css/themes/design.css +1159 -0
- package/css/themes/desktop.css +1159 -0
- package/css/themes/dispatch.css +1159 -0
- package/css/themes/docs.css +1159 -0
- package/css/themes/factory.css +1159 -0
- package/css/themes/forms.css +1159 -0
- package/css/themes/mail.css +1159 -0
- package/css/themes/plan.css +1159 -0
- package/css/themes/slides.css +1159 -0
- package/css/themes/tasks.css +1159 -0
- package/css/tokens.css +1249 -0
- package/package.json +67 -4
- package/src/catalog/components/alert-dialog.ts +9 -0
- package/src/catalog/components/aspect-ratio.ts +6 -0
- package/src/catalog/components/autocomplete.ts +23 -0
- package/src/catalog/components/avatar.ts +16 -0
- package/src/catalog/components/badge.ts +19 -0
- package/src/catalog/components/blockquote.ts +10 -0
- package/src/catalog/components/button.ts +24 -0
- package/src/catalog/components/callout.ts +17 -0
- package/src/catalog/components/card.ts +10 -0
- package/src/catalog/components/checkbox-cards.ts +14 -0
- package/src/catalog/components/checkbox-group.ts +13 -0
- package/src/catalog/components/checkbox.ts +13 -0
- package/src/catalog/components/code.ts +22 -0
- package/src/catalog/components/combobox.ts +23 -0
- package/src/catalog/components/context-menu.ts +20 -0
- package/src/catalog/components/data-list.ts +14 -0
- package/src/catalog/components/dialog.ts +9 -0
- package/src/catalog/components/drawer.ts +9 -0
- package/src/catalog/components/em.ts +7 -0
- package/src/catalog/components/heading.ts +11 -0
- package/src/catalog/components/index.ts +54 -0
- package/src/catalog/components/input.ts +23 -0
- package/src/catalog/components/inset.ts +15 -0
- package/src/catalog/components/item.ts +21 -0
- package/src/catalog/components/kbd.ts +9 -0
- package/src/catalog/components/link.ts +19 -0
- package/src/catalog/components/menu.ts +20 -0
- package/src/catalog/components/menubar.ts +20 -0
- package/src/catalog/components/meter.ts +19 -0
- package/src/catalog/components/number-field.ts +10 -0
- package/src/catalog/components/otp-field.ts +9 -0
- package/src/catalog/components/popover.ts +9 -0
- package/src/catalog/components/preview-card.ts +9 -0
- package/src/catalog/components/progress.ts +24 -0
- package/src/catalog/components/quote.ts +7 -0
- package/src/catalog/components/radio-cards.ts +14 -0
- package/src/catalog/components/radio-group.ts +13 -0
- package/src/catalog/components/scroll-area.ts +15 -0
- package/src/catalog/components/segmented-control.ts +8 -0
- package/src/catalog/components/select.ts +26 -0
- package/src/catalog/components/separator.ts +14 -0
- package/src/catalog/components/skeleton.ts +8 -0
- package/src/catalog/components/slider.ts +19 -0
- package/src/catalog/components/spinner.ts +15 -0
- package/src/catalog/components/strong.ts +7 -0
- package/src/catalog/components/switch.ts +19 -0
- package/src/catalog/components/tab-nav.ts +18 -0
- package/src/catalog/components/table.ts +34 -0
- package/src/catalog/components/tabs.ts +18 -0
- package/src/catalog/components/text-area.ts +24 -0
- package/src/catalog/components/text.ts +11 -0
- package/src/catalog/components/toast.ts +12 -0
- package/src/catalog/components/toggle-group.ts +17 -0
- package/src/catalog/components/toggle.ts +17 -0
- package/src/catalog/components/toolbar.ts +6 -0
- package/src/catalog/index.ts +4 -0
- package/src/catalog/parts.ts +915 -0
- package/src/catalog/prop-types-source.ts +93 -0
- package/src/catalog/prop-types.generated.ts +1402 -0
- package/src/catalog/props.ts +225 -0
- package/src/css.ts +318 -0
- package/src/generated-css.ts +21 -0
- package/src/index.ts +8 -0
- package/src/model/compare.ts +127 -0
- package/src/model/dom.ts +253 -0
- package/src/model/ids.ts +25 -0
- package/src/model/index.ts +6 -0
- package/src/model/styles.ts +254 -0
- package/src/model/types.ts +97 -0
- package/src/model/validate.ts +133 -0
- package/src/themes/appearances.ts +105 -0
- package/src/themes/baseline.ts +27 -0
- package/src/themes/index.ts +85 -0
- package/src/themes/reference.ts +9 -0
- package/src/themes/shadcn.ts +239 -0
- package/src/themes/types.ts +53 -0
- package/src/tokens/at.ts +13 -0
- package/src/tokens/base.ts +48 -0
- package/src/tokens/color/bezier.ts +111 -0
- package/src/tokens/color/index.ts +2 -0
- package/src/tokens/color/radix-generator.ts +516 -0
- package/src/tokens/dtcg.ts +298 -0
- package/src/tokens/files/foundations.tokens.json +318 -0
- package/src/tokens/files/palette.tokens.json +58 -0
- package/src/tokens/files/themes/agent-native.dark.tokens.json +405 -0
- package/src/tokens/files/themes/agent-native.light.tokens.json +405 -0
- package/src/tokens/files/themes/analytics.dark.tokens.json +391 -0
- package/src/tokens/files/themes/analytics.light.tokens.json +391 -0
- package/src/tokens/files/themes/assets.dark.tokens.json +391 -0
- package/src/tokens/files/themes/assets.light.tokens.json +391 -0
- package/src/tokens/files/themes/brain.dark.tokens.json +391 -0
- package/src/tokens/files/themes/brain.light.tokens.json +391 -0
- package/src/tokens/files/themes/calendar.dark.tokens.json +391 -0
- package/src/tokens/files/themes/calendar.light.tokens.json +391 -0
- package/src/tokens/files/themes/chat.dark.tokens.json +391 -0
- package/src/tokens/files/themes/chat.light.tokens.json +391 -0
- package/src/tokens/files/themes/clips.dark.tokens.json +391 -0
- package/src/tokens/files/themes/clips.light.tokens.json +391 -0
- package/src/tokens/files/themes/content.dark.tokens.json +391 -0
- package/src/tokens/files/themes/content.light.tokens.json +391 -0
- package/src/tokens/files/themes/crm.dark.tokens.json +391 -0
- package/src/tokens/files/themes/crm.light.tokens.json +391 -0
- package/src/tokens/files/themes/design.dark.tokens.json +391 -0
- package/src/tokens/files/themes/design.light.tokens.json +391 -0
- package/src/tokens/files/themes/desktop.dark.tokens.json +391 -0
- package/src/tokens/files/themes/desktop.light.tokens.json +391 -0
- package/src/tokens/files/themes/dispatch.dark.tokens.json +391 -0
- package/src/tokens/files/themes/dispatch.light.tokens.json +391 -0
- package/src/tokens/files/themes/docs.dark.tokens.json +391 -0
- package/src/tokens/files/themes/docs.light.tokens.json +391 -0
- package/src/tokens/files/themes/factory.dark.tokens.json +391 -0
- package/src/tokens/files/themes/factory.light.tokens.json +391 -0
- package/src/tokens/files/themes/forms.dark.tokens.json +391 -0
- package/src/tokens/files/themes/forms.light.tokens.json +391 -0
- package/src/tokens/files/themes/mail.dark.tokens.json +391 -0
- package/src/tokens/files/themes/mail.light.tokens.json +391 -0
- package/src/tokens/files/themes/plan.dark.tokens.json +391 -0
- package/src/tokens/files/themes/plan.light.tokens.json +391 -0
- package/src/tokens/files/themes/slides.dark.tokens.json +391 -0
- package/src/tokens/files/themes/slides.light.tokens.json +391 -0
- package/src/tokens/files/themes/tasks.dark.tokens.json +391 -0
- package/src/tokens/files/themes/tasks.light.tokens.json +391 -0
- package/src/tokens/palette.ts +354 -0
- package/src/tokens/primitives.ts +84 -0
- package/src/tokens/roles.ts +269 -0
- package/src/tokens/round-trip.ts +277 -0
- package/src/tokens/source.ts +302 -0
- package/tsconfig.json +26 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Part: app-shell
|
|
3
|
+
*
|
|
4
|
+
* <div class="app-shell" [data-sidebar-collapsed] [data-mobile]>
|
|
5
|
+
* <nav class="sidebar"> the navigation column (sidebar.css)
|
|
6
|
+
* <main class="app-shell-canvas"> the page
|
|
7
|
+
* <aside class="app-shell-agent"> the agent panel
|
|
8
|
+
*
|
|
9
|
+
* A full-height row: navigation at the start, the canvas taking the rest,
|
|
10
|
+
* the agent panel at the end. Panel widths sit on the 8px grid.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
@layer components {
|
|
14
|
+
.app-shell {
|
|
15
|
+
display: flex;
|
|
16
|
+
height: 100%;
|
|
17
|
+
min-height: 0;
|
|
18
|
+
background-color: var(--surface-app);
|
|
19
|
+
color: var(--fg-default);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.app-shell-canvas {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex: 1;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
min-width: 0;
|
|
27
|
+
min-height: 0;
|
|
28
|
+
overflow: auto;
|
|
29
|
+
background-color: var(--surface-canvas);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.app-shell-agent {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
flex-shrink: 0;
|
|
36
|
+
width: 360px;
|
|
37
|
+
min-height: 0;
|
|
38
|
+
border-inline-start: 1px solid var(--line-subtle);
|
|
39
|
+
background-color: var(--surface-app);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.app-shell[data-mobile] .app-shell-agent {
|
|
43
|
+
display: none;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Part: aspect-ratio
|
|
3
|
+
*
|
|
4
|
+
* <div class="aspect-ratio" style="--aspect-ratio: 1.7778">
|
|
5
|
+
* <img> sized by the box, such as with
|
|
6
|
+
* width and height at 100%
|
|
7
|
+
*
|
|
8
|
+
* Radix Themes' aspect ratio: a box as wide as its container and as tall as
|
|
9
|
+
* `ratio` makes it. Content taller than that overflows instead of
|
|
10
|
+
* stretching the box, as Radix's does.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
@layer components {
|
|
14
|
+
.aspect-ratio {
|
|
15
|
+
position: relative;
|
|
16
|
+
width: 100%;
|
|
17
|
+
min-height: 0;
|
|
18
|
+
aspect-ratio: var(--aspect-ratio, 1);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Part: autocomplete (and the combobox's popup and rows, which are these)
|
|
3
|
+
*
|
|
4
|
+
* <div class="input" Base UI Autocomplete.InputGroup, drawn by input.css
|
|
5
|
+
* data-size="1|2|3|4" data-variant="surface|soft"
|
|
6
|
+
* [data-color] [data-radius] [data-popup-open] [data-disabled]>
|
|
7
|
+
* <input class="input-control"> Autocomplete.Input
|
|
8
|
+
* <div class="input-slot"> an icon, or the buttons below
|
|
9
|
+
* <button class="autocomplete-clear"> Autocomplete.Clear, while there is text
|
|
10
|
+
* <button class="autocomplete-trigger"> Autocomplete.Trigger [data-popup-open]
|
|
11
|
+
*
|
|
12
|
+
* <div class="autocomplete-positioner"> Autocomplete.Positioner
|
|
13
|
+
* <div class="autocomplete-popup" Autocomplete.Popup
|
|
14
|
+
* data-size="1|2|3|4" data-variant="solid|soft"
|
|
15
|
+
* data-color="gray|accent|danger|warning|success|info" [data-high-contrast]
|
|
16
|
+
* [data-open] [data-side] [data-empty] [data-starting-style] [data-ending-style]>
|
|
17
|
+
* <div class="autocomplete-status"> Autocomplete.Status, a live region
|
|
18
|
+
* <div class="autocomplete-empty"> Autocomplete.Empty, a live region
|
|
19
|
+
* <div class="autocomplete-list" role="listbox"> Autocomplete.List
|
|
20
|
+
* <div class="autocomplete-group">
|
|
21
|
+
* <div class="autocomplete-group-label">
|
|
22
|
+
* <div class="autocomplete-item" [data-highlighted] [data-disabled]
|
|
23
|
+
* an icon, the label, a shortcut the row's children
|
|
24
|
+
* <div class="autocomplete-separator">
|
|
25
|
+
*
|
|
26
|
+
* The field is the input part: the frame is Base UI's input group, so it
|
|
27
|
+
* anchors the popup and focuses the input when pressed. The popup and rows
|
|
28
|
+
* are Radix Themes' select and dropdown menu content on the system's scale,
|
|
29
|
+
* and are the combobox's too: every rule below names both parts' classes, and
|
|
30
|
+
* combobox.css adds only the check column and the chips. The popup's size is
|
|
31
|
+
* the input's, so rows are never shorter than 20px, with sizes 2 and 3
|
|
32
|
+
* sharing a row height as in Select. The variant decides how the highlighted
|
|
33
|
+
* row fills: soft (the default, in gray) with the scale's a3 tint, solid
|
|
34
|
+
* with its solid fill.
|
|
35
|
+
*
|
|
36
|
+
* The popup is as wide as the field (`--anchor-width`) and as tall as the
|
|
37
|
+
* viewport allows; the list scrolls under the status and empty messages. A
|
|
38
|
+
* popup with no rows and no message to show is hidden. Inline (the root's
|
|
39
|
+
* `inline`, as in a command palette), the list has no popup and carries the
|
|
40
|
+
* popup's attributes itself.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
@layer components {
|
|
44
|
+
/* ---- trigger and clear ---- */
|
|
45
|
+
|
|
46
|
+
/* Only in the field's slots: a trigger outside the field (an input inside
|
|
47
|
+
the popup) is a button the caller renders, and keeps that button's look. */
|
|
48
|
+
.input-slot
|
|
49
|
+
:is(
|
|
50
|
+
.autocomplete-trigger,
|
|
51
|
+
.autocomplete-clear,
|
|
52
|
+
.combobox-trigger,
|
|
53
|
+
.combobox-clear
|
|
54
|
+
) {
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
flex-shrink: 0;
|
|
57
|
+
align-items: center;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
width: var(--_icon);
|
|
61
|
+
height: var(--_icon);
|
|
62
|
+
margin: 0;
|
|
63
|
+
padding: 0;
|
|
64
|
+
border: 0;
|
|
65
|
+
border-radius: var(--radius-1);
|
|
66
|
+
background-color: transparent;
|
|
67
|
+
color: inherit;
|
|
68
|
+
cursor: default;
|
|
69
|
+
transition-property: color;
|
|
70
|
+
transition-duration: var(--duration-2);
|
|
71
|
+
transition-timing-function: var(--ease-standard);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.input-slot
|
|
75
|
+
:is(
|
|
76
|
+
.autocomplete-trigger,
|
|
77
|
+
.autocomplete-clear,
|
|
78
|
+
.combobox-trigger,
|
|
79
|
+
.combobox-clear
|
|
80
|
+
)
|
|
81
|
+
svg {
|
|
82
|
+
width: var(--_icon);
|
|
83
|
+
height: var(--_icon);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media (hover: hover) {
|
|
87
|
+
.input[data-variant="surface"]
|
|
88
|
+
.input-slot
|
|
89
|
+
:is(
|
|
90
|
+
.autocomplete-trigger,
|
|
91
|
+
.autocomplete-clear,
|
|
92
|
+
.combobox-trigger,
|
|
93
|
+
.combobox-clear
|
|
94
|
+
):not([data-disabled]):hover {
|
|
95
|
+
color: var(--fg-default);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.input[data-variant="soft"]
|
|
99
|
+
.input-slot
|
|
100
|
+
:is(
|
|
101
|
+
.autocomplete-trigger,
|
|
102
|
+
.autocomplete-clear,
|
|
103
|
+
.combobox-trigger,
|
|
104
|
+
.combobox-clear
|
|
105
|
+
):not([data-disabled]):hover {
|
|
106
|
+
color: var(--accent-12);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.input-slot
|
|
111
|
+
:is(
|
|
112
|
+
.autocomplete-trigger,
|
|
113
|
+
.autocomplete-clear,
|
|
114
|
+
.combobox-trigger,
|
|
115
|
+
.combobox-clear
|
|
116
|
+
):focus-visible {
|
|
117
|
+
outline: var(--focus-ring-width) solid var(--line-focus);
|
|
118
|
+
outline-offset: var(--focus-ring-offset);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.input-slot
|
|
122
|
+
:is(
|
|
123
|
+
.autocomplete-trigger,
|
|
124
|
+
.autocomplete-clear,
|
|
125
|
+
.combobox-trigger,
|
|
126
|
+
.combobox-clear
|
|
127
|
+
)[data-disabled] {
|
|
128
|
+
cursor: not-allowed;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* ---- popup ---- */
|
|
132
|
+
|
|
133
|
+
:is(.autocomplete-positioner, .combobox-positioner) {
|
|
134
|
+
/* A modal still open underneath sets the body to pointer-events: none
|
|
135
|
+
and re-enables only its own layers. */
|
|
136
|
+
pointer-events: auto;
|
|
137
|
+
z-index: var(--layer-popup);
|
|
138
|
+
outline: none;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
:is(.autocomplete-popup, .combobox-popup) {
|
|
142
|
+
--_slide-x: 0px;
|
|
143
|
+
--_slide-y: 0px;
|
|
144
|
+
|
|
145
|
+
display: flex;
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
box-sizing: border-box;
|
|
148
|
+
min-width: max(128px, var(--anchor-width, 0px));
|
|
149
|
+
max-height: min(24rem, var(--available-height, 24rem));
|
|
150
|
+
border: 1px solid var(--line-default);
|
|
151
|
+
border-radius: calc(var(--shape-popup) * var(--corner-scale, 1));
|
|
152
|
+
corner-shape: var(--corner-shape, round);
|
|
153
|
+
background-color: var(--surface-raised);
|
|
154
|
+
color: var(--fg-default);
|
|
155
|
+
box-shadow: var(--shadow-3);
|
|
156
|
+
outline-style: none;
|
|
157
|
+
transform-origin: var(--transform-origin);
|
|
158
|
+
transition-property: opacity, scale, translate;
|
|
159
|
+
transition-duration: var(--duration-2);
|
|
160
|
+
transition-timing-function: var(--ease-enter);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
:is(.autocomplete-popup, .combobox-popup)[data-empty]:not(
|
|
164
|
+
:has(
|
|
165
|
+
:is(
|
|
166
|
+
.autocomplete-empty,
|
|
167
|
+
.combobox-empty,
|
|
168
|
+
.autocomplete-status,
|
|
169
|
+
.combobox-status
|
|
170
|
+
):not(:empty)
|
|
171
|
+
)
|
|
172
|
+
) {
|
|
173
|
+
display: none;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
:is(.autocomplete-popup, .combobox-popup)[data-side="bottom"] {
|
|
177
|
+
--_slide-y: calc(var(--space-2) * -1);
|
|
178
|
+
}
|
|
179
|
+
:is(.autocomplete-popup, .combobox-popup)[data-side="top"] {
|
|
180
|
+
--_slide-y: var(--space-2);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
:is(.autocomplete-popup, .combobox-popup)[data-starting-style] {
|
|
184
|
+
opacity: 0;
|
|
185
|
+
scale: 0.95;
|
|
186
|
+
translate: var(--_slide-x) var(--_slide-y);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
:is(.autocomplete-popup, .combobox-popup)[data-ending-style] {
|
|
190
|
+
opacity: 0;
|
|
191
|
+
scale: 0.95;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
@media (prefers-reduced-motion: reduce) {
|
|
195
|
+
:is(.autocomplete-popup, .combobox-popup) {
|
|
196
|
+
transition-property: none;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* ---- sizes: the popup's, or an inline list's ---- */
|
|
201
|
+
|
|
202
|
+
:is(
|
|
203
|
+
.autocomplete-popup,
|
|
204
|
+
.combobox-popup,
|
|
205
|
+
.autocomplete-list,
|
|
206
|
+
.combobox-list
|
|
207
|
+
) {
|
|
208
|
+
--control-font-size: var(--control-font-size-3);
|
|
209
|
+
--control-line-height: var(--control-line-height-3);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
:is(
|
|
213
|
+
.autocomplete-popup,
|
|
214
|
+
.combobox-popup,
|
|
215
|
+
.autocomplete-list,
|
|
216
|
+
.combobox-list
|
|
217
|
+
)[data-size="1"] {
|
|
218
|
+
--control-font-size: var(--control-font-size-1);
|
|
219
|
+
--control-line-height: var(--control-line-height-1);
|
|
220
|
+
--_row-height: var(--control-height-2);
|
|
221
|
+
--_row-icon: var(--control-icon-size-2);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
:is(
|
|
225
|
+
.autocomplete-popup,
|
|
226
|
+
.combobox-popup,
|
|
227
|
+
.autocomplete-list,
|
|
228
|
+
.combobox-list
|
|
229
|
+
)[data-size="4"] {
|
|
230
|
+
--control-font-size: var(--control-font-size-4);
|
|
231
|
+
--control-line-height: var(--control-line-height-4);
|
|
232
|
+
--_row-height: var(--control-height-4);
|
|
233
|
+
--_row-icon: var(--control-icon-size-4);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* ---- list ---- */
|
|
237
|
+
|
|
238
|
+
:is(.autocomplete-list, .combobox-list) {
|
|
239
|
+
flex: 1 1 auto;
|
|
240
|
+
min-height: 0;
|
|
241
|
+
overflow-y: auto;
|
|
242
|
+
padding: var(--space-1);
|
|
243
|
+
scroll-padding-block: var(--space-1);
|
|
244
|
+
outline-style: none;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
:is(.autocomplete-list, .combobox-list):empty {
|
|
248
|
+
padding: 0;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
:is(
|
|
252
|
+
.autocomplete-empty,
|
|
253
|
+
.combobox-empty,
|
|
254
|
+
.autocomplete-status,
|
|
255
|
+
.combobox-status
|
|
256
|
+
):not(:empty) {
|
|
257
|
+
padding: var(--space-2);
|
|
258
|
+
font-size: var(--control-font-size);
|
|
259
|
+
line-height: var(--control-line-height);
|
|
260
|
+
color: var(--fg-muted);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
:is(.autocomplete-empty, .combobox-empty):not(:empty) {
|
|
264
|
+
padding-block: var(--space-4);
|
|
265
|
+
text-align: center;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/* ---- rows ---- */
|
|
269
|
+
|
|
270
|
+
:is(.autocomplete-item, .combobox-item) {
|
|
271
|
+
position: relative;
|
|
272
|
+
display: flex;
|
|
273
|
+
align-items: center;
|
|
274
|
+
gap: var(--control-gap);
|
|
275
|
+
box-sizing: border-box;
|
|
276
|
+
min-height: var(--_row-height, var(--control-height-3));
|
|
277
|
+
padding: 0 var(--space-2);
|
|
278
|
+
/* Concentric with the popup: its radius less the list's padding. */
|
|
279
|
+
border-radius: max(0px, calc(var(--shape-popup) - var(--space-1)));
|
|
280
|
+
corner-shape: var(--corner-shape, round);
|
|
281
|
+
font-size: var(--control-font-size);
|
|
282
|
+
line-height: var(--control-line-height);
|
|
283
|
+
cursor: default;
|
|
284
|
+
-webkit-user-select: none;
|
|
285
|
+
user-select: none;
|
|
286
|
+
outline-style: none;
|
|
287
|
+
transition-property: color, background-color;
|
|
288
|
+
transition-duration: var(--duration-2);
|
|
289
|
+
transition-timing-function: var(--ease-standard);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
:is(.autocomplete-item, .combobox-item) svg {
|
|
293
|
+
flex-shrink: 0;
|
|
294
|
+
width: var(--_row-icon, var(--control-icon-size-3));
|
|
295
|
+
height: var(--_row-icon, var(--control-icon-size-3));
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
:is(
|
|
299
|
+
.autocomplete-popup,
|
|
300
|
+
.combobox-popup,
|
|
301
|
+
.autocomplete-list,
|
|
302
|
+
.combobox-list
|
|
303
|
+
)[data-variant="solid"]
|
|
304
|
+
:is(.autocomplete-item, .combobox-item)[data-highlighted]:not(
|
|
305
|
+
[data-disabled]
|
|
306
|
+
) {
|
|
307
|
+
background-color: var(--accent-solid);
|
|
308
|
+
color: var(--accent-contrast);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
:is(
|
|
312
|
+
.autocomplete-popup,
|
|
313
|
+
.combobox-popup,
|
|
314
|
+
.autocomplete-list,
|
|
315
|
+
.combobox-list
|
|
316
|
+
)[data-variant="solid"][data-high-contrast]
|
|
317
|
+
:is(.autocomplete-item, .combobox-item)[data-highlighted]:not(
|
|
318
|
+
[data-disabled]
|
|
319
|
+
) {
|
|
320
|
+
background-color: var(--accent-12);
|
|
321
|
+
color: var(--accent-1);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
:is(
|
|
325
|
+
.autocomplete-popup,
|
|
326
|
+
.combobox-popup,
|
|
327
|
+
.autocomplete-list,
|
|
328
|
+
.combobox-list
|
|
329
|
+
)[data-variant="soft"]
|
|
330
|
+
:is(.autocomplete-item, .combobox-item)[data-highlighted]:not(
|
|
331
|
+
[data-disabled]
|
|
332
|
+
) {
|
|
333
|
+
background-color: var(--accent-a3);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
:is(
|
|
337
|
+
.autocomplete-popup,
|
|
338
|
+
.combobox-popup,
|
|
339
|
+
.autocomplete-list,
|
|
340
|
+
.combobox-list
|
|
341
|
+
)[data-variant="soft"][data-high-contrast]
|
|
342
|
+
:is(.autocomplete-item, .combobox-item)[data-highlighted]:not(
|
|
343
|
+
[data-disabled]
|
|
344
|
+
) {
|
|
345
|
+
color: var(--accent-12);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
:is(.autocomplete-item, .combobox-item)[data-disabled] {
|
|
349
|
+
pointer-events: none;
|
|
350
|
+
color: var(--gray-a8);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
:is(.autocomplete-group-label, .combobox-group-label) {
|
|
354
|
+
padding: var(--space-1) var(--space-2);
|
|
355
|
+
font-size: var(--font-size-1);
|
|
356
|
+
line-height: var(--line-height-1);
|
|
357
|
+
font-weight: var(--font-weight-medium);
|
|
358
|
+
color: var(--fg-muted);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
:is(.autocomplete-separator, .combobox-separator) {
|
|
362
|
+
height: 1px;
|
|
363
|
+
margin: var(--space-1) calc(var(--space-1) * -1);
|
|
364
|
+
background-color: var(--line-subtle);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Part: avatar
|
|
3
|
+
*
|
|
4
|
+
* <span class="avatar" data-size="1|2|3|4" data-variant="solid|soft"
|
|
5
|
+
* [data-color="accent|gray|danger|warning|success|info"]
|
|
6
|
+
* [data-high-contrast] [data-radius]> Base UI Avatar.Root
|
|
7
|
+
* <img class="avatar-image"> Avatar.Image, once loaded
|
|
8
|
+
* <span class="avatar-fallback"> Avatar.Fallback, until then
|
|
9
|
+
*
|
|
10
|
+
* Radix Themes' avatar on the system's scale: sizes 1 to 4 are 16, 20, 24
|
|
11
|
+
* and 32px boxes, round unless `radius` says otherwise. The fallback fills
|
|
12
|
+
* the box in the variant's way with the nearest `data-color`, and its text
|
|
13
|
+
* scales with the box.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
@layer components {
|
|
17
|
+
.avatar {
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
flex-shrink: 0;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
width: var(--size-3);
|
|
23
|
+
height: var(--size-3);
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
border-radius: var(--radius-full);
|
|
26
|
+
corner-shape: var(--corner-shape, round);
|
|
27
|
+
vertical-align: middle;
|
|
28
|
+
-webkit-user-select: none;
|
|
29
|
+
user-select: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.avatar[data-size="1"] {
|
|
33
|
+
width: var(--size-1);
|
|
34
|
+
height: var(--size-1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.avatar[data-size="2"] {
|
|
38
|
+
width: var(--size-2);
|
|
39
|
+
height: var(--size-2);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.avatar[data-size="4"] {
|
|
43
|
+
width: var(--size-4);
|
|
44
|
+
height: var(--size-4);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.avatar[data-radius]:not([data-radius="full"]) {
|
|
48
|
+
border-radius: calc(var(--shape-control) * var(--corner-scale, 1));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.avatar-image {
|
|
52
|
+
width: 100%;
|
|
53
|
+
height: 100%;
|
|
54
|
+
object-fit: cover;
|
|
55
|
+
border-radius: inherit;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.avatar-fallback {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
width: 100%;
|
|
63
|
+
height: 100%;
|
|
64
|
+
border-radius: inherit;
|
|
65
|
+
font-size: var(--font-size-1);
|
|
66
|
+
line-height: 1;
|
|
67
|
+
font-weight: var(--font-weight-medium);
|
|
68
|
+
text-transform: uppercase;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.avatar[data-size="1"] .avatar-fallback {
|
|
72
|
+
font-size: 8px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.avatar[data-size="2"] .avatar-fallback {
|
|
76
|
+
font-size: 10px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.avatar[data-size="4"] .avatar-fallback {
|
|
80
|
+
font-size: var(--font-size-2);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.avatar-fallback svg {
|
|
84
|
+
width: 62.5%;
|
|
85
|
+
height: 62.5%;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* ---- variants ---- */
|
|
89
|
+
|
|
90
|
+
.avatar[data-variant="soft"] .avatar-fallback {
|
|
91
|
+
background-color: var(--accent-a3);
|
|
92
|
+
color: var(--accent-text);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.avatar[data-variant="soft"][data-high-contrast] .avatar-fallback {
|
|
96
|
+
color: var(--accent-12);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.avatar[data-variant="solid"] .avatar-fallback {
|
|
100
|
+
background-color: var(--accent-solid);
|
|
101
|
+
color: var(--accent-contrast);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.avatar[data-variant="solid"][data-high-contrast] .avatar-fallback {
|
|
105
|
+
background-color: var(--accent-12);
|
|
106
|
+
color: var(--accent-1);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Part: badge
|
|
3
|
+
*
|
|
4
|
+
* <span class="badge" data-size="1|2|3"
|
|
5
|
+
* data-variant="solid|soft|surface|outline"
|
|
6
|
+
* [data-color="accent|gray|danger|warning|success|info"]
|
|
7
|
+
* [data-high-contrast] [data-radius] [data-dot]>
|
|
8
|
+
*
|
|
9
|
+
* Radix Themes' badge on the system's scale: sizes 1 to 3 are 16, 20 and
|
|
10
|
+
* 24px tall. Like Button, a variant decides how the nearest `data-color`
|
|
11
|
+
* applies. A dot is a 6px circle in the solid color, its label kept for
|
|
12
|
+
* assistive technology.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
@layer components {
|
|
16
|
+
.badge {
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
flex-shrink: 0;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: var(--space-1);
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
height: var(--control-height-2);
|
|
23
|
+
padding: 0 var(--space-2);
|
|
24
|
+
border-radius: var(--radius-full);
|
|
25
|
+
font-size: var(--font-size-1);
|
|
26
|
+
line-height: var(--line-height-1);
|
|
27
|
+
font-weight: var(--font-weight-medium);
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.badge svg {
|
|
32
|
+
flex-shrink: 0;
|
|
33
|
+
width: var(--control-icon-size-1);
|
|
34
|
+
height: var(--control-icon-size-1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.badge[data-size="1"] {
|
|
38
|
+
height: var(--control-height-1);
|
|
39
|
+
padding: 0 6px;
|
|
40
|
+
font-size: 11px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.badge[data-size="3"] {
|
|
44
|
+
height: var(--control-height-3);
|
|
45
|
+
padding: 0 var(--space-3);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.badge[data-size="3"] svg {
|
|
49
|
+
width: var(--control-icon-size-2);
|
|
50
|
+
height: var(--control-icon-size-2);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.badge[data-radius]:not([data-radius="full"]) {
|
|
54
|
+
border-radius: calc(var(--shape-control) * var(--corner-scale, 1));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* ---- variants ---- */
|
|
58
|
+
|
|
59
|
+
.badge[data-variant="solid"] {
|
|
60
|
+
background-color: var(--accent-solid);
|
|
61
|
+
color: var(--accent-contrast);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.badge[data-variant="soft"] {
|
|
65
|
+
background-color: var(--accent-a3);
|
|
66
|
+
color: var(--accent-text);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.badge[data-variant="surface"] {
|
|
70
|
+
background-color: var(--accent-surface);
|
|
71
|
+
box-shadow: inset 0 0 0 1px var(--accent-a6);
|
|
72
|
+
color: var(--accent-text);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.badge[data-variant="outline"] {
|
|
76
|
+
box-shadow: inset 0 0 0 1px var(--accent-a8);
|
|
77
|
+
color: var(--accent-text);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.badge[data-high-contrast]:not([data-variant="solid"]) {
|
|
81
|
+
color: var(--accent-12);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.badge[data-variant="solid"][data-high-contrast] {
|
|
85
|
+
background-color: var(--accent-12);
|
|
86
|
+
color: var(--accent-1);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* The label is still read, at no size and no color. */
|
|
90
|
+
.badge[data-dot] {
|
|
91
|
+
width: 6px;
|
|
92
|
+
height: 6px;
|
|
93
|
+
padding: 0;
|
|
94
|
+
overflow: hidden;
|
|
95
|
+
box-shadow: none;
|
|
96
|
+
background-color: var(--accent-solid);
|
|
97
|
+
color: transparent;
|
|
98
|
+
font-size: 0;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Part: blockquote
|
|
3
|
+
*
|
|
4
|
+
* <blockquote class="blockquote" [data-size="0–9"]
|
|
5
|
+
* [data-weight="light|regular|medium|semibold|bold"]
|
|
6
|
+
* [data-truncate]
|
|
7
|
+
* [data-wrap="wrap|nowrap|pretty|balance"]
|
|
8
|
+
* [data-color="accent|gray|danger|warning|success|info"]
|
|
9
|
+
* [data-high-contrast]>
|
|
10
|
+
*
|
|
11
|
+
* Radix Themes' blockquote: a quoted block set as text, with a rule down
|
|
12
|
+
* its start edge in the scale's a6 step that grows with the text. Its size,
|
|
13
|
+
* weight, truncation, wrapping and color are in text.css.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
@layer components {
|
|
17
|
+
.blockquote {
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
margin: 0;
|
|
20
|
+
border-inline-start: max(var(--space-1), 0.25em) solid var(--accent-a6);
|
|
21
|
+
padding-inline-start: min(var(--space-5), max(var(--space-3), 0.5em));
|
|
22
|
+
}
|
|
23
|
+
}
|