@atom63/ui-react 0.2.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/README.md +121 -0
- package/dist/button-sktq-nvV.d.ts +13 -0
- package/dist/chunk-7VSPECOH.js +73 -0
- package/dist/chunk-7VSPECOH.js.map +1 -0
- package/dist/chunk-AJLHJRK6.js +11 -0
- package/dist/chunk-AJLHJRK6.js.map +1 -0
- package/dist/chunk-MXNO63TC.js +2745 -0
- package/dist/chunk-MXNO63TC.js.map +1 -0
- package/dist/chunk-STCXERLM.js +354 -0
- package/dist/chunk-STCXERLM.js.map +1 -0
- package/dist/destination-link-C9NKeKLe.d.ts +34 -0
- package/dist/index.d.ts +1605 -0
- package/dist/index.js +7337 -0
- package/dist/index.js.map +1 -0
- package/dist/layout/index.d.ts +196 -0
- package/dist/layout/index.js +500 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/media/index.d.ts +208 -0
- package/dist/media/index.js +1498 -0
- package/dist/media/index.js.map +1 -0
- package/dist/media/media-lightbox/parts/index.d.ts +284 -0
- package/dist/media/media-lightbox/parts/index.js +5 -0
- package/dist/media/media-lightbox/parts/index.js.map +1 -0
- package/dist/theme/index.d.ts +350 -0
- package/dist/theme/index.js +1173 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/types-Dxe5IzjE.d.ts +145 -0
- package/package.json +188 -0
- package/src/components/accordion/accordion.css +196 -0
- package/src/components/alert/alert.css +189 -0
- package/src/components/alert-dialog/alert-dialog.css +205 -0
- package/src/components/autocomplete/autocomplete.css +240 -0
- package/src/components/avatar/avatar.css +147 -0
- package/src/components/badge/badge.css +223 -0
- package/src/components/breadcrumb/breadcrumb.css +99 -0
- package/src/components/button/button.css +594 -0
- package/src/components/button-group/button-group.css +412 -0
- package/src/components/calendar/calendar.css +271 -0
- package/src/components/card/card.css +421 -0
- package/src/components/carousel/carousel.css +163 -0
- package/src/components/checkbox/checkbox.css +113 -0
- package/src/components/collapsible/collapsible.css +59 -0
- package/src/components/command/command.css +226 -0
- package/src/components/connected-panel/connected-panel.css +437 -0
- package/src/components/copy-button/copy-button.css +57 -0
- package/src/components/dialog/dialog.css +221 -0
- package/src/components/drawer/drawer.css +265 -0
- package/src/components/empty/empty.css +145 -0
- package/src/components/feedback-state/feedback-state.css +141 -0
- package/src/components/field/field.css +260 -0
- package/src/components/form/form.css +32 -0
- package/src/components/frame/frame.css +115 -0
- package/src/components/hover-card/hover-card.css +80 -0
- package/src/components/input/input.css +291 -0
- package/src/components/input-otp/input-otp.css +145 -0
- package/src/components/item/item.css +216 -0
- package/src/components/kbd/kbd.css +72 -0
- package/src/components/label/label.css +37 -0
- package/src/components/load-more-trigger/load-more-trigger.css +109 -0
- package/src/components/marquee/marquee.css +79 -0
- package/src/components/menu/menu.css +216 -0
- package/src/components/menubar/menubar.css +67 -0
- package/src/components/navigation-menu/navigation-menu.css +275 -0
- package/src/components/pagination/pagination.css +86 -0
- package/src/components/panel-setting-button/panel-setting-button.css +76 -0
- package/src/components/popover/popover.css +89 -0
- package/src/components/preview-card/preview-card.css +69 -0
- package/src/components/progress/progress.css +70 -0
- package/src/components/radio/radio.css +115 -0
- package/src/components/resizable/resizable.css +99 -0
- package/src/components/scroll-area/scroll-area.css +130 -0
- package/src/components/scrollable-list/scrollable-list.css +144 -0
- package/src/components/segmented-control/segmented-control.css +235 -0
- package/src/components/select/select.css +261 -0
- package/src/components/separator/separator.css +43 -0
- package/src/components/sheet/sheet.css +209 -0
- package/src/components/sidebar/sidebar.css +728 -0
- package/src/components/sidebar-nav-tree/sidebar-nav-tree.css +179 -0
- package/src/components/skeleton/skeleton.css +42 -0
- package/src/components/slider/slider.css +124 -0
- package/src/components/switch/switch.css +149 -0
- package/src/components/table/table.css +183 -0
- package/src/components/tabs/tabs.css +416 -0
- package/src/components/text-ticker/text-ticker.css +139 -0
- package/src/components/textarea/textarea.css +122 -0
- package/src/components/toggle/toggle.css +185 -0
- package/src/components/toggle-group/toggle-group.css +102 -0
- package/src/components/tooltip/tooltip.css +133 -0
- package/src/media/media-lightbox/media-lightbox.css +171 -0
- package/src/styles/index.css +3 -0
- package/src/styles/recipes.css +70 -0
- package/src/styles/reset.css +22 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Kbd recipe — a quiet, recessed keyboard-key cap composed from existing
|
|
3
|
+
* semantics (muted surface + secondary text) — the MARKER archetype. Its keycap
|
|
4
|
+
* bevel comes from the one contract lever --a63-marker-shadow. Presentational.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
.a63-Kbd {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
gap: var(--a63-space-1);
|
|
13
|
+
height: 1.375rem;
|
|
14
|
+
min-width: 1.375rem;
|
|
15
|
+
padding-inline: var(--a63-space-1_5);
|
|
16
|
+
border: var(--a63-control-border-width) solid var(--a63-border-subtle);
|
|
17
|
+
/* rounded-sm (prod parity) — the full --a63-control-radius reads too round on a
|
|
18
|
+
small keycap (esp. Modern); --radius-sm keeps the corner tight + theme-aware. */
|
|
19
|
+
border-radius: var(--radius-sm);
|
|
20
|
+
background-color: var(--a63-surface-muted);
|
|
21
|
+
box-shadow: var(--a63-marker-shadow);
|
|
22
|
+
color: var(--a63-text-secondary);
|
|
23
|
+
font-family: var(--a63-control-font-family);
|
|
24
|
+
font-size: var(--a63-control-font-size-xs);
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
line-height: 1;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
user-select: none;
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.a63-Kbd[data-size='sm'] {
|
|
33
|
+
height: 1.125rem;
|
|
34
|
+
min-width: 1.125rem;
|
|
35
|
+
padding-inline: var(--a63-space-1);
|
|
36
|
+
font-size: var(--a63-control-font-size-xs);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.a63-Kbd svg {
|
|
40
|
+
width: 0.75em;
|
|
41
|
+
height: 0.75em;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
* Inside a Tooltip the keycap inverts to read on the overlay's darker surface:
|
|
46
|
+
* a translucent page-surface fill + page-surface text (mirrors prod's
|
|
47
|
+
* in-data-[slot=tooltip-content]:bg-background/20 / text-background, with the
|
|
48
|
+
* dark-mode fill dropping to /10). Border melts away so the cap reads as a chip.
|
|
49
|
+
*/
|
|
50
|
+
[data-slot='tooltip-popup'] .a63-Kbd {
|
|
51
|
+
border-color: transparent;
|
|
52
|
+
background-color: color-mix(in oklch, var(--a63-surface-page) 20%, transparent);
|
|
53
|
+
box-shadow: none;
|
|
54
|
+
color: var(--a63-surface-page);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/*
|
|
58
|
+
* Dark mode is not the light rule with a lighter fill. The tooltip's overlay
|
|
59
|
+
* surface sits *above* the page here, so page-surface text lands darker than
|
|
60
|
+
* the panel it prints on and the keycap disappears. It follows the tooltip's
|
|
61
|
+
* own foreground instead.
|
|
62
|
+
*/
|
|
63
|
+
:is(.dark, [data-a63-mode='dark']) [data-slot='tooltip-popup'] .a63-Kbd {
|
|
64
|
+
background-color: color-mix(in oklch, var(--a63-text-primary) 10%, transparent);
|
|
65
|
+
color: var(--a63-text-primary);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.a63-KbdGroup {
|
|
69
|
+
display: inline-flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: var(--a63-space-1);
|
|
72
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Label recipe — a form field label. Faithful to prod @atom63/ui label.tsx
|
|
3
|
+
* (flex row, gap, medium weight, non-selectable) but recolored/spaced with
|
|
4
|
+
* --a63-* semantic tokens. Dims itself when the adjacent peer control is
|
|
5
|
+
* disabled or when it sits inside a `[data-disabled="true"]` group.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.a63-Label {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: var(--a63-space-2, 0.5rem);
|
|
12
|
+
color: var(--a63-text-primary);
|
|
13
|
+
font-family: var(--a63-control-font-family);
|
|
14
|
+
font-size: var(--a63-control-font-size-md);
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
line-height: 1.2;
|
|
17
|
+
user-select: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Follow the associated control's disabled state (prod peer-disabled). */
|
|
21
|
+
.peer:disabled ~ .a63-Label,
|
|
22
|
+
.a63-Label:has(~ :disabled),
|
|
23
|
+
.a63-Label:has(~ [data-disabled]:not([data-disabled='false'])) {
|
|
24
|
+
cursor: not-allowed;
|
|
25
|
+
opacity: 0.5;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Dim + disable inside a disabled group (prod group-data-[disabled=true]). */
|
|
29
|
+
[data-disabled]:not([data-disabled='false']) .a63-Label {
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
opacity: 0.5;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Field owns semantic invalid color; Label must not mask that inheritance. */
|
|
35
|
+
[data-invalid]:not([data-invalid='false']) .a63-Label {
|
|
36
|
+
color: inherit;
|
|
37
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* LoadMoreTrigger recipe — the infinite-scroll sentinel row, ported from prod
|
|
3
|
+
* @atom63/ui. Colors resolve from --a63-* semantics at the use-site; the three
|
|
4
|
+
* message variants only change size/emphasis (minimal = smaller, prominent =
|
|
5
|
+
* a muted pill).
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.a63-LoadMoreTrigger {
|
|
9
|
+
--load-more-accent: var(--a63-text-secondary);
|
|
10
|
+
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
padding-block: calc(var(--a63-space-unit) * 8);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.a63-LoadMoreTrigger[data-tone='info'] {
|
|
17
|
+
--load-more-accent: var(--a63-status-info);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.a63-LoadMoreTrigger[data-tone='success'] {
|
|
21
|
+
--load-more-accent: var(--a63-status-success);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.a63-LoadMoreTrigger[data-tone='warning'] {
|
|
25
|
+
--load-more-accent: var(--a63-status-warning);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.a63-LoadMoreTrigger[data-tone='error'] {
|
|
29
|
+
--load-more-accent: var(--a63-action-danger);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* The message form reserves a minimum height so the observer target keeps a
|
|
33
|
+
stable hit area as it swaps between idle + loading copy. */
|
|
34
|
+
.a63-LoadMoreTrigger[data-has-message] {
|
|
35
|
+
min-height: calc(var(--a63-space-unit) * 16);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.a63-LoadMoreTrigger-message {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: var(--a63-space-2);
|
|
42
|
+
color: var(--a63-text-secondary);
|
|
43
|
+
font-family: var(--a63-control-font-family);
|
|
44
|
+
font-size: var(--a63-control-font-size-md);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.a63-LoadMoreTrigger-message[data-variant='minimal'] {
|
|
48
|
+
font-size: var(--a63-control-font-size-sm);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.a63-LoadMoreTrigger-message[data-variant='prominent'] {
|
|
52
|
+
padding: var(--a63-space-4);
|
|
53
|
+
border-radius: var(--radius-sm);
|
|
54
|
+
background-color: color-mix(in oklch, var(--a63-surface-muted) 50%, transparent);
|
|
55
|
+
font-weight: 500;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.a63-LoadMoreTrigger-spinner {
|
|
59
|
+
display: inline-flex;
|
|
60
|
+
flex-shrink: 0;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
width: 1rem;
|
|
64
|
+
height: 1rem;
|
|
65
|
+
transform-origin: center;
|
|
66
|
+
animation: a63-load-more-spin 0.8s linear infinite;
|
|
67
|
+
color: var(--load-more-accent);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.a63-LoadMoreTrigger-icon {
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
width: 1rem;
|
|
73
|
+
height: 1rem;
|
|
74
|
+
color: var(--load-more-accent);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.a63-LoadMoreTrigger-spinner svg {
|
|
78
|
+
display: block;
|
|
79
|
+
width: 100%;
|
|
80
|
+
height: 100%;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.a63-LoadMoreTrigger-action {
|
|
84
|
+
padding: 0;
|
|
85
|
+
border: 0;
|
|
86
|
+
background: transparent;
|
|
87
|
+
color: var(--load-more-accent);
|
|
88
|
+
font: inherit;
|
|
89
|
+
font-weight: 600;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.a63-LoadMoreTrigger-action:focus-visible {
|
|
94
|
+
border-radius: var(--radius-sm);
|
|
95
|
+
outline: 2px solid var(--load-more-accent);
|
|
96
|
+
outline-offset: 2px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@keyframes a63-load-more-spin {
|
|
100
|
+
to {
|
|
101
|
+
transform: rotate(360deg);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@media (prefers-reduced-motion: reduce) {
|
|
106
|
+
.a63-LoadMoreTrigger-spinner {
|
|
107
|
+
animation: none;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Marquee recipe — an infinitely scrolling strip. The container clips overflow
|
|
3
|
+
* and lays out `repeat` duplicate tracks; each track scrolls one --gap-adjusted
|
|
4
|
+
* span via the a63-marquee keyframes (prod's animate-marquee). data-orientation
|
|
5
|
+
* switches axis; reverse/paused/pauseOnHover drive the animation play-state.
|
|
6
|
+
* Animation is suppressed under prefers-reduced-motion.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
.a63-Marquee {
|
|
10
|
+
--gap: 1rem;
|
|
11
|
+
--duration: 40s;
|
|
12
|
+
|
|
13
|
+
display: flex;
|
|
14
|
+
gap: var(--gap);
|
|
15
|
+
padding: var(--a63-space-2);
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
}
|
|
18
|
+
.a63-Marquee[data-orientation='horizontal'] {
|
|
19
|
+
flex-direction: row;
|
|
20
|
+
}
|
|
21
|
+
.a63-Marquee[data-orientation='vertical'] {
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.a63-Marquee-track {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
justify-content: space-around;
|
|
29
|
+
gap: var(--gap);
|
|
30
|
+
}
|
|
31
|
+
.a63-Marquee-track[data-orientation='horizontal'] {
|
|
32
|
+
flex-direction: row;
|
|
33
|
+
animation: a63-marquee var(--duration) linear infinite;
|
|
34
|
+
}
|
|
35
|
+
.a63-Marquee-track[data-orientation='vertical'] {
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
animation: a63-marquee-vertical var(--duration) linear infinite;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.a63-Marquee-track[data-reverse] {
|
|
41
|
+
animation-direction: reverse;
|
|
42
|
+
}
|
|
43
|
+
.a63-Marquee-track[data-paused] {
|
|
44
|
+
animation-play-state: paused;
|
|
45
|
+
}
|
|
46
|
+
.a63-Marquee:hover .a63-Marquee-track[data-pause-on-hover],
|
|
47
|
+
.a63-Marquee:focus-within .a63-Marquee-track[data-pause-on-hover] {
|
|
48
|
+
animation-play-state: paused;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@keyframes a63-marquee {
|
|
52
|
+
0% {
|
|
53
|
+
transform: translateX(0);
|
|
54
|
+
}
|
|
55
|
+
100% {
|
|
56
|
+
transform: translateX(calc(-100% - var(--gap)));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@keyframes a63-marquee-vertical {
|
|
61
|
+
0% {
|
|
62
|
+
transform: translateY(0);
|
|
63
|
+
}
|
|
64
|
+
100% {
|
|
65
|
+
transform: translateY(calc(-100% - var(--gap)));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media (prefers-reduced-motion: reduce) {
|
|
70
|
+
.a63-Marquee {
|
|
71
|
+
overflow: auto;
|
|
72
|
+
}
|
|
73
|
+
.a63-Marquee-track {
|
|
74
|
+
animation: none;
|
|
75
|
+
}
|
|
76
|
+
.a63-Marquee-track:not(:first-child) {
|
|
77
|
+
display: none;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Menu recipe — SHARED actionable-menu chrome for DropdownMenu, ContextMenu,
|
|
3
|
+
* Menubar, Select, and Autocomplete (Select/Autocomplete mount `.a63-Menu-popup`
|
|
4
|
+
* on their surface and `.a63-Menu-item` on rows; they keep only structural
|
|
5
|
+
* deltas). One recipe so a menu fix/state lands in ONE place. Popup surface
|
|
6
|
+
* treatment reads the OVERLAY contract; item/chrome values read the MENU
|
|
7
|
+
* contract (contracts/menu.css).
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.a63-Menu-trigger {
|
|
11
|
+
touch-action: manipulation;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.a63-Menu-positioner {
|
|
15
|
+
z-index: var(--z-layer-menu, var(--z-layer-popover, 999));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.a63-Menu-popup {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
gap: var(--a63-menu-gap, 0.125rem);
|
|
23
|
+
max-height: var(--available-height);
|
|
24
|
+
min-width: 8rem;
|
|
25
|
+
padding: var(--a63-menu-popup-padding, 0.25rem);
|
|
26
|
+
overflow-x: hidden;
|
|
27
|
+
overflow-y: auto;
|
|
28
|
+
border: var(--a63-overlay-border-width) var(--a63-overlay-border-style) var(--a63-border-subtle);
|
|
29
|
+
border-radius: var(--a63-menu-popup-radius, var(--a63-overlay-radius, var(--radius-lg)));
|
|
30
|
+
background-color: var(--a63-menu-popup-background, var(--a63-surface-overlay));
|
|
31
|
+
background-clip: padding-box;
|
|
32
|
+
background-image:
|
|
33
|
+
var(--a63-menu-popup-gloss, var(--a63-overlay-gloss)), var(--a63-overlay-texture-image);
|
|
34
|
+
background-blend-mode: normal, var(--a63-overlay-texture-blend);
|
|
35
|
+
backdrop-filter: var(--a63-overlay-backdrop);
|
|
36
|
+
box-shadow: var(--a63-overlay-inner-shadow, none), var(--a63-overlay-shadow);
|
|
37
|
+
color: var(--a63-text-primary);
|
|
38
|
+
font-family: var(--a63-control-font-family);
|
|
39
|
+
outline: none;
|
|
40
|
+
transform-origin: var(--transform-origin);
|
|
41
|
+
transition:
|
|
42
|
+
opacity var(--a63-control-feedback-duration) var(--a63-control-feedback-ease),
|
|
43
|
+
transform var(--a63-control-feedback-duration) var(--a63-control-feedback-ease);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.a63-Menu-popup[data-starting-style],
|
|
47
|
+
.a63-Menu-popup[data-ending-style] {
|
|
48
|
+
opacity: 0;
|
|
49
|
+
transform: scale(0.96);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* ── Item ──────────────────────────────────────────────────────────────── */
|
|
53
|
+
|
|
54
|
+
.a63-Menu-item {
|
|
55
|
+
position: relative;
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: var(--a63-menu-item-gap, 0.5rem);
|
|
59
|
+
min-height: max(
|
|
60
|
+
calc(var(--a63-control-height-sm) * var(--a63-density-scale, 1)),
|
|
61
|
+
var(--a63-control-min-size)
|
|
62
|
+
);
|
|
63
|
+
padding: var(--a63-menu-item-padding-block, 0.375rem) var(--a63-menu-item-padding-inline, 0.5rem);
|
|
64
|
+
border-radius: var(
|
|
65
|
+
--a63-menu-item-radius,
|
|
66
|
+
max(
|
|
67
|
+
0px,
|
|
68
|
+
calc(
|
|
69
|
+
var(--a63-menu-popup-radius, var(--a63-overlay-radius, var(--radius-lg))) -
|
|
70
|
+
var(--a63-overlay-border-width) - var(--a63-menu-popup-padding, 0.25rem)
|
|
71
|
+
)
|
|
72
|
+
)
|
|
73
|
+
);
|
|
74
|
+
color: var(--a63-menu-item-foreground, var(--a63-text-primary));
|
|
75
|
+
font-size: var(--a63-menu-item-font-size, var(--a63-control-font-size-sm));
|
|
76
|
+
line-height: 1.2;
|
|
77
|
+
cursor: default;
|
|
78
|
+
user-select: none;
|
|
79
|
+
outline: none;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.a63-Menu-item[data-inset] {
|
|
83
|
+
padding-inline-start: var(--a63-menu-item-inset, 2rem);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.a63-Menu-item svg {
|
|
87
|
+
flex-shrink: 0;
|
|
88
|
+
width: 1rem;
|
|
89
|
+
height: 1rem;
|
|
90
|
+
color: var(--a63-menu-item-icon, var(--a63-text-secondary));
|
|
91
|
+
pointer-events: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Highlighted — NEUTRAL tone (default). The gloss/shadow handles let a theme add
|
|
95
|
+
an aqua gel / phosphor glow to the active row. */
|
|
96
|
+
.a63-Menu-item[data-highlighted] {
|
|
97
|
+
background-color: var(--a63-menu-highlight-background, var(--a63-surface-control-hover));
|
|
98
|
+
background-image: var(--a63-menu-highlight-gloss);
|
|
99
|
+
box-shadow: var(--a63-menu-highlight-shadow);
|
|
100
|
+
color: var(--a63-menu-highlight-foreground, var(--a63-text-primary));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Highlighted — PRIMARY tone (opt-in: [data-tone='primary'] on the popup) —
|
|
104
|
+
the classic macOS accent highlight. */
|
|
105
|
+
.a63-Menu-popup[data-tone='primary'] .a63-Menu-item[data-highlighted] {
|
|
106
|
+
background-color: var(--a63-menu-highlight-primary-background, var(--a63-action-primary));
|
|
107
|
+
color: var(--a63-menu-highlight-primary-foreground, var(--a63-action-primary-foreground));
|
|
108
|
+
}
|
|
109
|
+
.a63-Menu-popup[data-tone='primary'] .a63-Menu-item[data-highlighted] svg {
|
|
110
|
+
color: var(--a63-menu-highlight-primary-foreground, var(--a63-action-primary-foreground));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.a63-Menu-item[data-disabled] {
|
|
114
|
+
pointer-events: none;
|
|
115
|
+
opacity: var(--a63-menu-disabled-opacity);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.a63-Menu-item[data-variant='destructive'] {
|
|
119
|
+
color: var(--a63-menu-destructive-foreground, var(--a63-action-danger));
|
|
120
|
+
}
|
|
121
|
+
.a63-Menu-item[data-variant='destructive'] svg {
|
|
122
|
+
color: var(--a63-menu-destructive-foreground, var(--a63-action-danger));
|
|
123
|
+
}
|
|
124
|
+
.a63-Menu-item[data-variant='destructive'] .a63-Menu-shortcut {
|
|
125
|
+
color: currentColor;
|
|
126
|
+
}
|
|
127
|
+
.a63-Menu-item[data-variant='destructive'][data-highlighted] {
|
|
128
|
+
background-color: var(
|
|
129
|
+
--a63-menu-destructive-highlight-background,
|
|
130
|
+
color-mix(in oklch, var(--a63-action-danger) 10%, transparent)
|
|
131
|
+
);
|
|
132
|
+
color: var(--a63-menu-destructive-foreground, var(--a63-action-danger));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* ── Item indicator (checkbox / radio marker) ──────────────────────────── */
|
|
136
|
+
|
|
137
|
+
.a63-Menu-item--indicator {
|
|
138
|
+
padding-inline-start: var(--a63-menu-item-inset, 2rem);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.a63-Menu-item-indicator {
|
|
142
|
+
position: absolute;
|
|
143
|
+
inset-inline-start: 0.5rem;
|
|
144
|
+
display: inline-flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
justify-content: center;
|
|
147
|
+
width: 0.875rem;
|
|
148
|
+
height: 0.875rem;
|
|
149
|
+
color: var(--a63-menu-selected-indicator, var(--a63-action-primary));
|
|
150
|
+
pointer-events: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* ── Submenu trigger ───────────────────────────────────────────────────── */
|
|
154
|
+
|
|
155
|
+
.a63-Menu-sub-trigger[data-popup-open] {
|
|
156
|
+
background-color: var(--a63-menu-highlight-background, var(--a63-surface-control-hover));
|
|
157
|
+
background-image: var(--a63-menu-highlight-gloss);
|
|
158
|
+
box-shadow: var(--a63-menu-highlight-shadow);
|
|
159
|
+
color: var(--a63-menu-highlight-foreground, var(--a63-text-primary));
|
|
160
|
+
}
|
|
161
|
+
.a63-Menu-popup[data-tone='primary'] .a63-Menu-sub-trigger[data-popup-open] {
|
|
162
|
+
background-color: var(--a63-menu-highlight-primary-background, var(--a63-action-primary));
|
|
163
|
+
color: var(--a63-menu-highlight-primary-foreground, var(--a63-action-primary-foreground));
|
|
164
|
+
}
|
|
165
|
+
.a63-Menu-popup[data-tone='primary'] .a63-Menu-sub-trigger[data-popup-open] svg {
|
|
166
|
+
color: var(--a63-menu-highlight-primary-foreground, var(--a63-action-primary-foreground));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.a63-Menu-sub-icon {
|
|
170
|
+
display: inline-flex;
|
|
171
|
+
margin-inline-start: auto;
|
|
172
|
+
padding-inline-start: var(--a63-menu-item-gap, 0.5rem);
|
|
173
|
+
color: var(--a63-menu-item-icon, var(--a63-text-secondary));
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* ── Label ─────────────────────────────────────────────────────────────── */
|
|
177
|
+
|
|
178
|
+
.a63-Menu-label {
|
|
179
|
+
padding: var(--a63-menu-item-padding-block, 0.375rem) var(--a63-menu-item-padding-inline, 0.5rem);
|
|
180
|
+
color: var(--a63-menu-label-foreground, var(--a63-text-secondary));
|
|
181
|
+
font-size: var(--a63-control-font-size-xs);
|
|
182
|
+
font-weight: 600;
|
|
183
|
+
text-transform: uppercase;
|
|
184
|
+
letter-spacing: 0;
|
|
185
|
+
line-height: 1;
|
|
186
|
+
opacity: 0.75;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.a63-Menu-label[data-inset] {
|
|
190
|
+
padding-inline-start: var(--a63-menu-item-inset, 2rem);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* ── Separator ─────────────────────────────────────────────────────────── */
|
|
194
|
+
|
|
195
|
+
.a63-Menu-separator {
|
|
196
|
+
height: 1px;
|
|
197
|
+
margin-block: 0;
|
|
198
|
+
margin-inline: calc(-1 * var(--a63-menu-popup-padding, 0.25rem));
|
|
199
|
+
background-color: var(--a63-menu-separator, var(--a63-border-subtle));
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* ── Shortcut ──────────────────────────────────────────────────────────── */
|
|
203
|
+
|
|
204
|
+
.a63-Menu-shortcut {
|
|
205
|
+
margin-inline-start: auto;
|
|
206
|
+
padding-inline-start: var(--a63-space-4);
|
|
207
|
+
color: var(--a63-menu-shortcut-foreground, var(--a63-text-secondary));
|
|
208
|
+
font-size: var(--a63-control-font-size-xs);
|
|
209
|
+
letter-spacing: 0;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
@media (prefers-reduced-motion: reduce) {
|
|
213
|
+
.a63-Menu-popup {
|
|
214
|
+
transition: none;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Menubar recipe — a horizontal bar of menu buttons (Base UI Menubar). The bar
|
|
3
|
+
* is the page surface (prod bg-background → --a63-surface-page); each trigger is a
|
|
4
|
+
* compact button that highlights on hover/open with the muted fill (prod
|
|
5
|
+
* hover:bg-muted / data-open:bg-muted → --a63-surface-muted). The popup, item,
|
|
6
|
+
* sub-menu, separator, label and shortcut chrome is inherited from the
|
|
7
|
+
* DropdownMenu recipe (a63-DropdownMenu-*), so only the bar shell + trigger are
|
|
8
|
+
* declared here. No new --a63-* tokens.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
.a63-Menubar {
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
align-items: stretch;
|
|
15
|
+
gap: var(--a63-space-0_5);
|
|
16
|
+
width: fit-content;
|
|
17
|
+
max-width: 100%;
|
|
18
|
+
min-height: max(
|
|
19
|
+
calc(var(--a63-control-height-sm) * var(--a63-density-scale, 1)),
|
|
20
|
+
var(--a63-control-min-size)
|
|
21
|
+
);
|
|
22
|
+
padding: var(--a63-space-0_5);
|
|
23
|
+
border: var(--a63-control-border-width) solid var(--a63-border-subtle);
|
|
24
|
+
border-radius: var(--a63-surface-radius, var(--radius-lg));
|
|
25
|
+
background: var(--a63-surface-page);
|
|
26
|
+
font-family: var(--a63-control-font-family);
|
|
27
|
+
overflow-x: auto;
|
|
28
|
+
overscroll-behavior-inline: contain;
|
|
29
|
+
scrollbar-width: none;
|
|
30
|
+
touch-action: pan-x;
|
|
31
|
+
}
|
|
32
|
+
.a63-Menubar::-webkit-scrollbar {
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.a63-Menubar-trigger {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
padding: var(--a63-space-1) var(--a63-space-2);
|
|
40
|
+
border-radius: var(--a63-control-radius);
|
|
41
|
+
color: var(--a63-text-primary);
|
|
42
|
+
font-size: var(--a63-control-font-size-sm);
|
|
43
|
+
font-weight: var(--a63-control-font-weight);
|
|
44
|
+
line-height: 1.2;
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
appearance: none;
|
|
47
|
+
background: transparent;
|
|
48
|
+
border: 0;
|
|
49
|
+
cursor: default;
|
|
50
|
+
user-select: none;
|
|
51
|
+
outline: none;
|
|
52
|
+
transition: background-color var(--a63-control-feedback-duration) var(--a63-control-feedback-ease);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.a63-Menubar-trigger[data-popup-open] {
|
|
56
|
+
background: var(--a63-surface-muted);
|
|
57
|
+
}
|
|
58
|
+
@media (hover: hover) {
|
|
59
|
+
.a63-Menubar-trigger:hover {
|
|
60
|
+
background: var(--a63-surface-muted);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.a63-Menubar-trigger:focus-visible {
|
|
65
|
+
box-shadow: 0 0 0 var(--a63-control-focus-ring-width)
|
|
66
|
+
var(--a63-control-focus-ring-color, var(--a63-focus-ring));
|
|
67
|
+
}
|