@antadesign/anta 0.2.0 → 0.2.1
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 +40 -1
- package/dist/components/Progress.module.css +0 -5
- package/dist/components/Text.module.css +0 -6
- package/dist/elements/a-button.css +1 -756
- package/dist/elements/a-icon.css +1 -43
- package/dist/elements/a-icon.shapes.css +1 -377
- package/dist/elements/a-progress.css +1 -68
- package/dist/elements/a-tag.css +1 -196
- package/dist/elements/a-text.css +1 -90
- package/dist/elements/a-title.css +1 -64
- package/dist/elements/a-tooltip.css +1 -62
- package/dist/index.d.ts +1 -0
- package/dist/jsx-runtime.d.ts +17 -15
- package/dist/reset.css +1 -209
- package/dist/tokens.css +1 -285
- package/package.json +6 -4
- package/dist/components/Button.module.css +0 -2
- package/dist/components/Menu.d.ts +0 -61
- package/dist/components/Menu.js +0 -34
- package/dist/components/MenuGroup.d.ts +0 -24
- package/dist/components/MenuGroup.js +0 -19
- package/dist/components/MenuItem.d.ts +0 -49
- package/dist/components/MenuItem.js +0 -40
- package/dist/components/MenuSeparator.d.ts +0 -14
- package/dist/components/MenuSeparator.js +0 -7
- package/dist/components/Sticker.d.ts +0 -31
- package/dist/components/Sticker.js +0 -17
- package/dist/components/StickerAnimated.d.ts +0 -23
- package/dist/components/StickerAnimated.js +0 -28
- package/dist/components/__generated__/stickers/angry-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/angry-animated.js +0 -7
- package/dist/components/__generated__/stickers/angry.d.ts +0 -3
- package/dist/components/__generated__/stickers/angry.js +0 -7
- package/dist/components/__generated__/stickers/ask-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/ask-animated.js +0 -7
- package/dist/components/__generated__/stickers/ask.d.ts +0 -3
- package/dist/components/__generated__/stickers/ask.js +0 -7
- package/dist/components/__generated__/stickers/balance-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/balance-animated.js +0 -7
- package/dist/components/__generated__/stickers/balance.d.ts +0 -3
- package/dist/components/__generated__/stickers/balance.js +0 -7
- package/dist/components/__generated__/stickers/butterfly-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/butterfly-animated.js +0 -7
- package/dist/components/__generated__/stickers/butterfly-snake-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/butterfly-snake-animated.js +0 -7
- package/dist/components/__generated__/stickers/butterfly-snake.d.ts +0 -3
- package/dist/components/__generated__/stickers/butterfly-snake.js +0 -7
- package/dist/components/__generated__/stickers/butterfly.d.ts +0 -3
- package/dist/components/__generated__/stickers/butterfly.js +0 -7
- package/dist/components/__generated__/stickers/catch-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/catch-animated.js +0 -7
- package/dist/components/__generated__/stickers/catch.d.ts +0 -3
- package/dist/components/__generated__/stickers/catch.js +0 -7
- package/dist/components/__generated__/stickers/clap-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/clap-animated.js +0 -7
- package/dist/components/__generated__/stickers/clap.d.ts +0 -3
- package/dist/components/__generated__/stickers/clap.js +0 -7
- package/dist/components/__generated__/stickers/coding-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/coding-animated.js +0 -7
- package/dist/components/__generated__/stickers/coding.d.ts +0 -3
- package/dist/components/__generated__/stickers/coding.js +0 -7
- package/dist/components/__generated__/stickers/cowboy-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/cowboy-animated.js +0 -7
- package/dist/components/__generated__/stickers/cowboy.d.ts +0 -3
- package/dist/components/__generated__/stickers/cowboy.js +0 -7
- package/dist/components/__generated__/stickers/dance-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/dance-animated.js +0 -7
- package/dist/components/__generated__/stickers/dance.d.ts +0 -3
- package/dist/components/__generated__/stickers/dance.js +0 -7
- package/dist/components/__generated__/stickers/detective-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/detective-animated.js +0 -7
- package/dist/components/__generated__/stickers/detective.d.ts +0 -3
- package/dist/components/__generated__/stickers/detective.js +0 -7
- package/dist/components/__generated__/stickers/disapprove-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/disapprove-animated.js +0 -7
- package/dist/components/__generated__/stickers/disapprove.d.ts +0 -3
- package/dist/components/__generated__/stickers/disapprove.js +0 -7
- package/dist/components/__generated__/stickers/distracted-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/distracted-animated.js +0 -7
- package/dist/components/__generated__/stickers/distracted.d.ts +0 -3
- package/dist/components/__generated__/stickers/distracted.js +0 -7
- package/dist/components/__generated__/stickers/dive-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/dive-animated.js +0 -7
- package/dist/components/__generated__/stickers/dive.d.ts +0 -3
- package/dist/components/__generated__/stickers/dive.js +0 -7
- package/dist/components/__generated__/stickers/eat-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/eat-animated.js +0 -7
- package/dist/components/__generated__/stickers/eat.d.ts +0 -3
- package/dist/components/__generated__/stickers/eat.js +0 -7
- package/dist/components/__generated__/stickers/facepalm-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/facepalm-animated.js +0 -7
- package/dist/components/__generated__/stickers/facepalm.d.ts +0 -3
- package/dist/components/__generated__/stickers/facepalm.js +0 -7
- package/dist/components/__generated__/stickers/failed-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/failed-animated.js +0 -7
- package/dist/components/__generated__/stickers/failed.d.ts +0 -3
- package/dist/components/__generated__/stickers/failed.js +0 -7
- package/dist/components/__generated__/stickers/found-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/found-animated.js +0 -7
- package/dist/components/__generated__/stickers/found.d.ts +0 -3
- package/dist/components/__generated__/stickers/found.js +0 -7
- package/dist/components/__generated__/stickers/grow-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/grow-animated.js +0 -7
- package/dist/components/__generated__/stickers/grow.d.ts +0 -3
- package/dist/components/__generated__/stickers/grow.js +0 -7
- package/dist/components/__generated__/stickers/handstand-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/handstand-animated.js +0 -7
- package/dist/components/__generated__/stickers/handstand.d.ts +0 -3
- package/dist/components/__generated__/stickers/handstand.js +0 -7
- package/dist/components/__generated__/stickers/heart-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/heart-animated.js +0 -7
- package/dist/components/__generated__/stickers/heart.d.ts +0 -3
- package/dist/components/__generated__/stickers/heart.js +0 -7
- package/dist/components/__generated__/stickers/hello-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/hello-animated.js +0 -7
- package/dist/components/__generated__/stickers/hello.d.ts +0 -3
- package/dist/components/__generated__/stickers/hello.js +0 -7
- package/dist/components/__generated__/stickers/idea-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/idea-animated.js +0 -7
- package/dist/components/__generated__/stickers/idea.d.ts +0 -3
- package/dist/components/__generated__/stickers/idea.js +0 -7
- package/dist/components/__generated__/stickers/index.d.ts +0 -99
- package/dist/components/__generated__/stickers/index.js +0 -198
- package/dist/components/__generated__/stickers/laugh-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/laugh-animated.js +0 -7
- package/dist/components/__generated__/stickers/laugh.d.ts +0 -3
- package/dist/components/__generated__/stickers/laugh.js +0 -7
- package/dist/components/__generated__/stickers/love-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/love-animated.js +0 -7
- package/dist/components/__generated__/stickers/love.d.ts +0 -3
- package/dist/components/__generated__/stickers/love.js +0 -7
- package/dist/components/__generated__/stickers/nap-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/nap-animated.js +0 -7
- package/dist/components/__generated__/stickers/nap.d.ts +0 -3
- package/dist/components/__generated__/stickers/nap.js +0 -7
- package/dist/components/__generated__/stickers/party-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/party-animated.js +0 -7
- package/dist/components/__generated__/stickers/party.d.ts +0 -3
- package/dist/components/__generated__/stickers/party.js +0 -7
- package/dist/components/__generated__/stickers/passed-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/passed-animated.js +0 -7
- package/dist/components/__generated__/stickers/passed.d.ts +0 -3
- package/dist/components/__generated__/stickers/passed.js +0 -7
- package/dist/components/__generated__/stickers/peekaboo-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/peekaboo-animated.js +0 -7
- package/dist/components/__generated__/stickers/peekaboo.d.ts +0 -3
- package/dist/components/__generated__/stickers/peekaboo.js +0 -7
- package/dist/components/__generated__/stickers/pizza-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/pizza-animated.js +0 -7
- package/dist/components/__generated__/stickers/pizza.d.ts +0 -3
- package/dist/components/__generated__/stickers/pizza.js +0 -7
- package/dist/components/__generated__/stickers/puzzle-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/puzzle-animated.js +0 -7
- package/dist/components/__generated__/stickers/puzzle.d.ts +0 -3
- package/dist/components/__generated__/stickers/puzzle.js +0 -7
- package/dist/components/__generated__/stickers/sad-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/sad-animated.js +0 -7
- package/dist/components/__generated__/stickers/sad.d.ts +0 -3
- package/dist/components/__generated__/stickers/sad.js +0 -7
- package/dist/components/__generated__/stickers/scared-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/scared-animated.js +0 -7
- package/dist/components/__generated__/stickers/scared.d.ts +0 -3
- package/dist/components/__generated__/stickers/scared.js +0 -7
- package/dist/components/__generated__/stickers/scroll-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/scroll-animated.js +0 -7
- package/dist/components/__generated__/stickers/scroll.d.ts +0 -3
- package/dist/components/__generated__/stickers/scroll.js +0 -7
- package/dist/components/__generated__/stickers/search-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/search-animated.js +0 -7
- package/dist/components/__generated__/stickers/search.d.ts +0 -3
- package/dist/components/__generated__/stickers/search.js +0 -7
- package/dist/components/__generated__/stickers/shield-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/shield-animated.js +0 -7
- package/dist/components/__generated__/stickers/shield.d.ts +0 -3
- package/dist/components/__generated__/stickers/shield.js +0 -7
- package/dist/components/__generated__/stickers/shocked-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/shocked-animated.js +0 -7
- package/dist/components/__generated__/stickers/shocked.d.ts +0 -3
- package/dist/components/__generated__/stickers/shocked.js +0 -7
- package/dist/components/__generated__/stickers/sleep-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/sleep-animated.js +0 -7
- package/dist/components/__generated__/stickers/sleep.d.ts +0 -3
- package/dist/components/__generated__/stickers/sleep.js +0 -7
- package/dist/components/__generated__/stickers/stressed-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/stressed-animated.js +0 -7
- package/dist/components/__generated__/stickers/stressed.d.ts +0 -3
- package/dist/components/__generated__/stickers/stressed.js +0 -7
- package/dist/components/__generated__/stickers/suspicious-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/suspicious-animated.js +0 -7
- package/dist/components/__generated__/stickers/suspicious.d.ts +0 -3
- package/dist/components/__generated__/stickers/suspicious.js +0 -7
- package/dist/components/__generated__/stickers/thanks-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/thanks-animated.js +0 -7
- package/dist/components/__generated__/stickers/thanks.d.ts +0 -3
- package/dist/components/__generated__/stickers/thanks.js +0 -7
- package/dist/components/__generated__/stickers/think-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/think-animated.js +0 -7
- package/dist/components/__generated__/stickers/think-of-you-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/think-of-you-animated.js +0 -7
- package/dist/components/__generated__/stickers/think-of-you.d.ts +0 -3
- package/dist/components/__generated__/stickers/think-of-you.js +0 -7
- package/dist/components/__generated__/stickers/think.d.ts +0 -3
- package/dist/components/__generated__/stickers/think.js +0 -7
- package/dist/components/__generated__/stickers/thumbs-up-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/thumbs-up-animated.js +0 -7
- package/dist/components/__generated__/stickers/thumbs-up.d.ts +0 -3
- package/dist/components/__generated__/stickers/thumbs-up.js +0 -7
- package/dist/components/__generated__/stickers/vacation-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/vacation-animated.js +0 -7
- package/dist/components/__generated__/stickers/vacation.d.ts +0 -3
- package/dist/components/__generated__/stickers/vacation.js +0 -7
- package/dist/components/__generated__/stickers/wait-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/wait-animated.js +0 -7
- package/dist/components/__generated__/stickers/wait.d.ts +0 -3
- package/dist/components/__generated__/stickers/wait.js +0 -7
- package/dist/components/__generated__/stickers/wink-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/wink-animated.js +0 -7
- package/dist/components/__generated__/stickers/wink.d.ts +0 -3
- package/dist/components/__generated__/stickers/wink.js +0 -7
- package/dist/components/__generated__/stickers/work-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/work-animated.js +0 -7
- package/dist/components/__generated__/stickers/work.d.ts +0 -3
- package/dist/components/__generated__/stickers/work.js +0 -7
- package/dist/components/__generated__/stickers/zen-animated.d.ts +0 -3
- package/dist/components/__generated__/stickers/zen-animated.js +0 -7
- package/dist/components/__generated__/stickers/zen.d.ts +0 -3
- package/dist/components/__generated__/stickers/zen.js +0 -7
- package/dist/elements/a-menu-group.css +0 -21
- package/dist/elements/a-menu-group.d.ts +0 -13
- package/dist/elements/a-menu-group.js +0 -15
- package/dist/elements/a-menu-item.css +0 -162
- package/dist/elements/a-menu-item.d.ts +0 -27
- package/dist/elements/a-menu-item.js +0 -29
- package/dist/elements/a-menu-separator.css +0 -15
- package/dist/elements/a-menu-separator.d.ts +0 -12
- package/dist/elements/a-menu-separator.js +0 -15
- package/dist/elements/a-menu.css +0 -34
- package/dist/elements/a-menu.d.ts +0 -120
- package/dist/elements/a-menu.js +0 -649
- package/dist/elements/a-sticker-animated.css +0 -9
- package/dist/elements/a-sticker-animated.d.ts +0 -39
- package/dist/elements/a-sticker-animated.js +0 -81
- package/dist/elements/a-sticker.css +0 -9
- package/dist/elements/a-sticker.d.ts +0 -19
- package/dist/elements/a-sticker.js +0 -32
- package/dist/generate-stickers.mjs +0 -293
|
@@ -1,756 +1 @@
|
|
|
1
|
-
@layer anta {
|
|
2
|
-
/* Shared constants + the neutral tone tokens — neutral is the
|
|
3
|
-
implicit default, so unset buttons inherit these directly. Named
|
|
4
|
-
tones (brand, critical, info, success, warning) override via
|
|
5
|
-
`[tone="X"]` selectors below.
|
|
6
|
-
Neutral chip uses a softer 5% rest alpha (other tones use 10%). */
|
|
7
|
-
a-button,
|
|
8
|
-
a[role="button"] {
|
|
9
|
-
--button-primary-fg: #ffffff;
|
|
10
|
-
|
|
11
|
-
--button-focus: #503cb4;
|
|
12
|
-
|
|
13
|
-
--bg-primary-disabled: #ece9ec;
|
|
14
|
-
--bg-secondary-disabled: #f6f4f6;
|
|
15
|
-
--fg-disabled-primary: #afa9b1;
|
|
16
|
-
--fg-disabled: #afa9b1;
|
|
17
|
-
|
|
18
|
-
--button-loading-stripe: 14px;
|
|
19
|
-
--button-loading-stripe-gap: 16px;
|
|
20
|
-
--button-loading-period: 30px;
|
|
21
|
-
--button-loading-angle: 125deg;
|
|
22
|
-
/* Project the diagonal period onto x so the slide loops seamlessly. */
|
|
23
|
-
--button-loading-x-period: calc(
|
|
24
|
-
var(--button-loading-period) / cos(var(--button-loading-angle) - 90deg)
|
|
25
|
-
);
|
|
26
|
-
--button-loading-opacity: 0.25;
|
|
27
|
-
--button-loading-blur: 2.5px;
|
|
28
|
-
|
|
29
|
-
--button-bg-primary-rest: #635b65;
|
|
30
|
-
--button-bg-primary-hover: #534c57;
|
|
31
|
-
--button-bg-primary-active: #49424c;
|
|
32
|
-
--button-fg-primary-rest: var(--button-primary-fg);
|
|
33
|
-
|
|
34
|
-
--button-bg-secondary-rest: #45374c12;
|
|
35
|
-
--button-bg-secondary-hover: #44374b1a;
|
|
36
|
-
--button-bg-secondary-active: #44374b26;
|
|
37
|
-
--button-fg-secondary-rest: #534c57;
|
|
38
|
-
--button-fg-secondary-hover: #49424c;
|
|
39
|
-
/* Darken the rest-state secondary label by this much oklch lightness so
|
|
40
|
-
it reads a touch stronger. Applied dynamically at the --button-fg
|
|
41
|
-
wiring (below), so it covers every tone — named and custom alike.
|
|
42
|
-
Light mode only; the .dark block zeroes it. */
|
|
43
|
-
--button-fg-secondary-l-shift: 0.05;
|
|
44
|
-
|
|
45
|
-
--button-fg-tertiary-rest: #635b65;
|
|
46
|
-
--button-fg-tertiary-hover: #534c57;
|
|
47
|
-
--button-bg-tertiary-hover: #44374b0d;
|
|
48
|
-
--button-bg-tertiary-active: #44374b1a;
|
|
49
|
-
|
|
50
|
-
--button-fg-quaternary-rest: #635b65;
|
|
51
|
-
--button-fg-quaternary-hover: #49424c;
|
|
52
|
-
|
|
53
|
-
/* Layout */
|
|
54
|
-
--button-padding-x: 9px;
|
|
55
|
-
--button-padding-y: 5px;
|
|
56
|
-
--button-max-width: 100%;
|
|
57
|
-
--button-max-height: 100%;
|
|
58
|
-
|
|
59
|
-
/* Transitions */
|
|
60
|
-
--button-timing-in: 75ms ease-in;
|
|
61
|
-
--button-timing-active: 50ms linear;
|
|
62
|
-
--button-timing-out: 150ms ease-out;
|
|
63
|
-
--button-loading-duration: 0.5s;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
a-button[tone="brand"],
|
|
67
|
-
a[role="button"][tone="brand"] {
|
|
68
|
-
--button-bg-primary-rest: #5f4bc3;
|
|
69
|
-
--button-bg-primary-hover: #503cb4;
|
|
70
|
-
--button-bg-primary-active: #483493;
|
|
71
|
-
--button-fg-primary-rest: var(--button-primary-fg);
|
|
72
|
-
|
|
73
|
-
--button-bg-secondary-rest: #7460d71a;
|
|
74
|
-
--button-bg-secondary-hover: #7460d726;
|
|
75
|
-
--button-bg-secondary-active: #7460d733;
|
|
76
|
-
--button-fg-secondary-rest: #5f4bc3;
|
|
77
|
-
--button-fg-secondary-hover: #503cb4;
|
|
78
|
-
|
|
79
|
-
--button-fg-tertiary-rest: #5f4bc3;
|
|
80
|
-
--button-fg-tertiary-hover: #503cb4;
|
|
81
|
-
--button-bg-tertiary-hover: #7460d71a;
|
|
82
|
-
--button-bg-tertiary-active: #7460d726;
|
|
83
|
-
|
|
84
|
-
--button-fg-quaternary-rest: #5f4bc3;
|
|
85
|
-
--button-fg-quaternary-hover: #483493;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/* Critical/warning tertiary active steps heavier (20% vs 15%). */
|
|
89
|
-
a-button[tone="critical"],
|
|
90
|
-
a[role="button"][tone="critical"] {
|
|
91
|
-
--button-bg-primary-rest: #c9302c;
|
|
92
|
-
--button-bg-primary-hover: #b02120;
|
|
93
|
-
--button-bg-primary-active: #a01c1c;
|
|
94
|
-
--button-fg-primary-rest: var(--button-primary-fg);
|
|
95
|
-
|
|
96
|
-
--button-bg-secondary-rest: #de45451a;
|
|
97
|
-
--button-bg-secondary-hover: #de454526;
|
|
98
|
-
--button-bg-secondary-active: #de454533;
|
|
99
|
-
--button-fg-secondary-rest: #c9302c;
|
|
100
|
-
--button-fg-secondary-hover: #b02120;
|
|
101
|
-
|
|
102
|
-
--button-fg-tertiary-rest: #c9302c;
|
|
103
|
-
--button-fg-tertiary-hover: #b02120;
|
|
104
|
-
--button-bg-tertiary-hover: #de45451a;
|
|
105
|
-
--button-bg-tertiary-active: #de454533;
|
|
106
|
-
|
|
107
|
-
--button-fg-quaternary-rest: #c9302c;
|
|
108
|
-
--button-fg-quaternary-hover: #a01c1c;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
a-button[tone="info"],
|
|
112
|
-
a[role="button"][tone="info"] {
|
|
113
|
-
--button-bg-primary-rest: #1f6eb2;
|
|
114
|
-
--button-bg-primary-hover: #1a5b93;
|
|
115
|
-
--button-bg-primary-active: #175082;
|
|
116
|
-
--button-fg-primary-rest: var(--button-primary-fg);
|
|
117
|
-
|
|
118
|
-
--button-bg-secondary-rest: #2686d91a;
|
|
119
|
-
--button-bg-secondary-hover: #2686d926;
|
|
120
|
-
--button-bg-secondary-active: #2686d933;
|
|
121
|
-
--button-fg-secondary-rest: #1f6eb2;
|
|
122
|
-
--button-fg-secondary-hover: #1a5b93;
|
|
123
|
-
|
|
124
|
-
--button-fg-tertiary-rest: #1f6eb2;
|
|
125
|
-
--button-fg-tertiary-hover: #1a5b93;
|
|
126
|
-
--button-bg-tertiary-hover: #2686d91a;
|
|
127
|
-
--button-bg-tertiary-active: #2686d926;
|
|
128
|
-
|
|
129
|
-
--button-fg-quaternary-rest: #1f6eb2;
|
|
130
|
-
--button-fg-quaternary-hover: #175082;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
a-button[tone="success"],
|
|
134
|
-
a[role="button"][tone="success"] {
|
|
135
|
-
--button-bg-primary-rest: #2a7e43;
|
|
136
|
-
--button-bg-primary-hover: #226737;
|
|
137
|
-
--button-bg-primary-active: #1f5c31;
|
|
138
|
-
--button-fg-primary-rest: var(--button-primary-fg);
|
|
139
|
-
|
|
140
|
-
--button-bg-secondary-rest: #3295501a;
|
|
141
|
-
--button-bg-secondary-hover: #32955026;
|
|
142
|
-
--button-bg-secondary-active: #32955033;
|
|
143
|
-
--button-fg-secondary-rest: #2a7e43;
|
|
144
|
-
--button-fg-secondary-hover: #226737;
|
|
145
|
-
|
|
146
|
-
--button-fg-tertiary-rest: #2a7e43;
|
|
147
|
-
--button-fg-tertiary-hover: #226737;
|
|
148
|
-
--button-bg-tertiary-hover: #3295501a;
|
|
149
|
-
--button-bg-tertiary-active: #32955026;
|
|
150
|
-
|
|
151
|
-
--button-fg-quaternary-rest: #2a7e43;
|
|
152
|
-
--button-fg-quaternary-hover: #1f5c31;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
a-button[tone="warning"],
|
|
156
|
-
a[role="button"][tone="warning"] {
|
|
157
|
-
--button-bg-primary-rest: #c37416;
|
|
158
|
-
--button-bg-primary-hover: #ae6613;
|
|
159
|
-
--button-bg-primary-active: #995200;
|
|
160
|
-
--button-fg-primary-rest: var(--button-primary-fg);
|
|
161
|
-
|
|
162
|
-
--button-bg-secondary-rest: #c374161a;
|
|
163
|
-
--button-bg-secondary-hover: #c3741626;
|
|
164
|
-
--button-bg-secondary-active: #c3741633;
|
|
165
|
-
--button-fg-secondary-rest: #c37416;
|
|
166
|
-
--button-fg-secondary-hover: #ae6613;
|
|
167
|
-
|
|
168
|
-
--button-fg-tertiary-rest: #c37416;
|
|
169
|
-
--button-fg-tertiary-hover: #ae6613;
|
|
170
|
-
--button-bg-tertiary-hover: #c374161a;
|
|
171
|
-
--button-bg-tertiary-active: #c3741633;
|
|
172
|
-
|
|
173
|
-
--button-fg-quaternary-rest: #c37416;
|
|
174
|
-
--button-fg-quaternary-hover: #995200;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/* Dark mode — heavier alphas (30/40% vs 10/15%) so chips stay legible
|
|
178
|
-
against a dark page bg. Neutral's anchor flips to a lilac (#e4d1ef);
|
|
179
|
-
mixing a dark gray into a dark bg yields no contrast. The constants
|
|
180
|
-
block also carries the neutral tone tokens since neutral is the
|
|
181
|
-
implicit default. */
|
|
182
|
-
.dark a-button,
|
|
183
|
-
.dark a[role="button"] {
|
|
184
|
-
--button-focus: #a897fc;
|
|
185
|
-
|
|
186
|
-
--bg-primary-disabled: #272329;
|
|
187
|
-
--bg-secondary-disabled: #1d1a1e;
|
|
188
|
-
--fg-disabled-primary: #776e77;
|
|
189
|
-
--fg-disabled: #635b65;
|
|
190
|
-
|
|
191
|
-
--button-bg-primary-rest: #534c57;
|
|
192
|
-
--button-bg-primary-hover: #635b65;
|
|
193
|
-
--button-bg-primary-active: #938d96;
|
|
194
|
-
|
|
195
|
-
--button-bg-secondary-rest: #e4d1ef1c;
|
|
196
|
-
--button-bg-secondary-hover: #e4d1ef24;
|
|
197
|
-
--button-bg-secondary-active: #e4d1ef2e;
|
|
198
|
-
--button-fg-secondary-rest: #c1b9c1;
|
|
199
|
-
--button-fg-secondary-hover: #d4ced4;
|
|
200
|
-
/* Dark-mode secondary labels are already tuned — no rest darkening. */
|
|
201
|
-
--button-fg-secondary-l-shift: 0;
|
|
202
|
-
|
|
203
|
-
--button-fg-tertiary-rest: #afa9b1;
|
|
204
|
-
--button-fg-tertiary-hover: #afa9b1;
|
|
205
|
-
--button-bg-tertiary-hover: #e4d1ef14;
|
|
206
|
-
--button-bg-tertiary-active: #e4d1ef21;
|
|
207
|
-
|
|
208
|
-
--button-fg-quaternary-rest: #afa9b1;
|
|
209
|
-
--button-fg-quaternary-hover: #cac4ca;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.dark a-button[tone="brand"],
|
|
213
|
-
.dark a[role="button"][tone="brand"] {
|
|
214
|
-
--button-bg-primary-rest: #503cb4;
|
|
215
|
-
--button-bg-primary-hover: #5f4bc3;
|
|
216
|
-
--button-bg-primary-active: #7460d7;
|
|
217
|
-
|
|
218
|
-
--button-bg-secondary-rest: #7460d73b;
|
|
219
|
-
--button-bg-secondary-hover: #7460d747;
|
|
220
|
-
--button-bg-secondary-active: #7460d754;
|
|
221
|
-
--button-fg-secondary-rest: #c5baff;
|
|
222
|
-
--button-fg-secondary-hover: #d2cbf6;
|
|
223
|
-
|
|
224
|
-
--button-fg-tertiary-rest: #ada0ee;
|
|
225
|
-
--button-fg-tertiary-hover: #bcb1f1;
|
|
226
|
-
--button-bg-tertiary-hover: #7460d73b;
|
|
227
|
-
--button-bg-tertiary-active: #7460d747;
|
|
228
|
-
|
|
229
|
-
--button-fg-quaternary-rest: #ada0ee;
|
|
230
|
-
--button-fg-quaternary-hover: #c7bef4;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.dark a-button[tone="critical"],
|
|
234
|
-
.dark a[role="button"][tone="critical"] {
|
|
235
|
-
--button-bg-primary-rest: #b02120;
|
|
236
|
-
--button-bg-primary-hover: #c9302c;
|
|
237
|
-
--button-bg-primary-active: #de4545;
|
|
238
|
-
|
|
239
|
-
--button-bg-secondary-rest: #de45453b;
|
|
240
|
-
--button-bg-secondary-hover: #de454547;
|
|
241
|
-
--button-bg-secondary-active: #de454554;
|
|
242
|
-
--button-fg-secondary-rest: #ffabac;
|
|
243
|
-
--button-fg-secondary-hover: #f4c2c2;
|
|
244
|
-
|
|
245
|
-
--button-fg-tertiary-rest: #e78e90;
|
|
246
|
-
--button-fg-tertiary-hover: #efa4a4;
|
|
247
|
-
--button-bg-tertiary-hover: #de45453b;
|
|
248
|
-
--button-bg-tertiary-active: #de454547;
|
|
249
|
-
|
|
250
|
-
--button-fg-quaternary-rest: #e78e90;
|
|
251
|
-
--button-fg-quaternary-hover: #ffabac;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.dark a-button[tone="info"],
|
|
255
|
-
.dark a[role="button"][tone="info"] {
|
|
256
|
-
--button-bg-primary-rest: #1a5b93;
|
|
257
|
-
--button-bg-primary-hover: #1f6eb2;
|
|
258
|
-
--button-bg-primary-active: #2686d9;
|
|
259
|
-
|
|
260
|
-
--button-bg-secondary-rest: #2686d93b;
|
|
261
|
-
--button-bg-secondary-hover: #2686d947;
|
|
262
|
-
--button-bg-secondary-active: #2686d954;
|
|
263
|
-
--button-fg-secondary-rest: #9ed2ff;
|
|
264
|
-
--button-fg-secondary-hover: #bad6f3;
|
|
265
|
-
|
|
266
|
-
--button-fg-tertiary-rest: #7db6e8;
|
|
267
|
-
--button-fg-tertiary-hover: #93c5ec;
|
|
268
|
-
--button-bg-tertiary-hover: #2686d93b;
|
|
269
|
-
--button-bg-tertiary-active: #2686d947;
|
|
270
|
-
|
|
271
|
-
--button-fg-quaternary-rest: #7db6e8;
|
|
272
|
-
--button-fg-quaternary-hover: #a6cdef;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
.dark a-button[tone="success"],
|
|
276
|
-
.dark a[role="button"][tone="success"] {
|
|
277
|
-
--button-bg-primary-rest: #226737;
|
|
278
|
-
--button-bg-primary-hover: #2a7e43;
|
|
279
|
-
--button-bg-primary-active: #329550;
|
|
280
|
-
|
|
281
|
-
--button-bg-secondary-rest: #3295503b;
|
|
282
|
-
--button-bg-secondary-hover: #32955047;
|
|
283
|
-
--button-bg-secondary-active: #32955054;
|
|
284
|
-
--button-fg-secondary-rest: #8ceca9;
|
|
285
|
-
--button-fg-secondary-hover: #b3e5c2;
|
|
286
|
-
|
|
287
|
-
--button-fg-tertiary-rest: #74cd8e;
|
|
288
|
-
--button-fg-tertiary-hover: #88d7a0;
|
|
289
|
-
--button-bg-tertiary-hover: #3295503b;
|
|
290
|
-
--button-bg-tertiary-active: #32955047;
|
|
291
|
-
|
|
292
|
-
--button-fg-quaternary-rest: #74cd8e;
|
|
293
|
-
--button-fg-quaternary-hover: #9ddeb1;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
.dark a-button[tone="warning"],
|
|
297
|
-
.dark a[role="button"][tone="warning"] {
|
|
298
|
-
--button-bg-primary-rest: #7f410b;
|
|
299
|
-
--button-bg-primary-hover: #995200;
|
|
300
|
-
--button-bg-primary-active: #ae6613;
|
|
301
|
-
|
|
302
|
-
--button-bg-secondary-rest: #c374163b;
|
|
303
|
-
--button-bg-secondary-hover: #c3741647;
|
|
304
|
-
--button-bg-secondary-active: #c3741654;
|
|
305
|
-
--button-fg-secondary-rest: #f7c06e;
|
|
306
|
-
--button-fg-secondary-hover: #f3cc91;
|
|
307
|
-
|
|
308
|
-
--button-fg-tertiary-rest: #e1a452;
|
|
309
|
-
--button-fg-tertiary-hover: #edb25a;
|
|
310
|
-
--button-bg-tertiary-hover: #c374163b;
|
|
311
|
-
--button-bg-tertiary-active: #c3741647;
|
|
312
|
-
|
|
313
|
-
--button-fg-quaternary-rest: #e1a452;
|
|
314
|
-
--button-fg-quaternary-hover: #f0bf75;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
a-button,
|
|
318
|
-
a[role="button"] {
|
|
319
|
-
user-select: none;
|
|
320
|
-
display: inline-flex;
|
|
321
|
-
align-items: center;
|
|
322
|
-
gap: 0.5ch;
|
|
323
|
-
overflow: hidden;
|
|
324
|
-
cursor: pointer;
|
|
325
|
-
/* Don't shrink in a flex parent — `overflow: hidden` would clip
|
|
326
|
-
the icon/label silently. Consumers can opt back in if needed. */
|
|
327
|
-
flex-shrink: 0;
|
|
328
|
-
|
|
329
|
-
color: var(--button-fg);
|
|
330
|
-
background-color: var(--button-bg);
|
|
331
|
-
border-radius: 4px;
|
|
332
|
-
text-decoration: none;
|
|
333
|
-
/* Secondary is the default priority — a 1px hairline in the current
|
|
334
|
-
fg tone (at 50% alpha) gives the chip a subtle edge. Primary,
|
|
335
|
-
tertiary, and quaternary cancel it in their own blocks below. */
|
|
336
|
-
box-shadow: 0 0 1px color-mix(in oklch, currentColor, transparent 50%);
|
|
337
|
-
|
|
338
|
-
font-size: 15px;
|
|
339
|
-
font-family: var(--sans-serif);
|
|
340
|
-
font-weight: 450;
|
|
341
|
-
/* All upstream axes must be re-stated here — `font-variation-settings`
|
|
342
|
-
replaces, it doesn't merge with inherited values. Dropping
|
|
343
|
-
"slnt"/"ital" would revert them to the font file's non-zero
|
|
344
|
-
defaults and Safari would render button labels italic. */
|
|
345
|
-
font-variation-settings: "wdth" 88, "slnt" 0, "ital" 0;
|
|
346
|
-
line-height: 18px;
|
|
347
|
-
letter-spacing: 0.05ch;
|
|
348
|
-
|
|
349
|
-
text-overflow: ellipsis;
|
|
350
|
-
text-wrap: nowrap;
|
|
351
|
-
white-space: nowrap;
|
|
352
|
-
|
|
353
|
-
max-width: var(--button-max-width);
|
|
354
|
-
max-height: var(--button-max-height);
|
|
355
|
-
padding-inline: var(--button-padding-x);
|
|
356
|
-
padding-block: var(--button-padding-y);
|
|
357
|
-
|
|
358
|
-
& > a-button-label {
|
|
359
|
-
display: inline-block;
|
|
360
|
-
text-overflow: ellipsis;
|
|
361
|
-
text-wrap: nowrap;
|
|
362
|
-
white-space: nowrap;
|
|
363
|
-
overflow: hidden;
|
|
364
|
-
min-width: 0;
|
|
365
|
-
/* Optical centering: a 17px line box + 1px bottom padding keeps the
|
|
366
|
-
label box at 18px (so button heights are unchanged) while nudging
|
|
367
|
-
the glyphs up ~0.5px, which reads as vertically centered for the
|
|
368
|
-
Antithesis-sans metrics. */
|
|
369
|
-
line-height: 17px;
|
|
370
|
-
padding-bottom: 1px;
|
|
371
|
-
/* Switch to flex when the label has inline children so they
|
|
372
|
-
align on a baseline with a small gap. */
|
|
373
|
-
&:has(> *) {
|
|
374
|
-
display: inline-flex;
|
|
375
|
-
gap: 0.25ch;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
& > * {
|
|
380
|
-
pointer-events: none;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
& a-icon {
|
|
384
|
-
transition: color var(--button-timing-out);
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
transition:
|
|
388
|
-
color var(--button-timing-out),
|
|
389
|
-
background-color var(--button-timing-out);
|
|
390
|
-
|
|
391
|
-
&:hover,
|
|
392
|
-
&:focus-visible {
|
|
393
|
-
transition:
|
|
394
|
-
color var(--button-timing-in),
|
|
395
|
-
background-color var(--button-timing-in);
|
|
396
|
-
& a-icon {
|
|
397
|
-
transition: color var(--button-timing-in);
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
&:active,
|
|
402
|
-
&[selected] {
|
|
403
|
-
transition:
|
|
404
|
-
color var(--button-timing-active),
|
|
405
|
-
background-color var(--button-timing-active);
|
|
406
|
-
& a-icon {
|
|
407
|
-
transition: color var(--button-timing-active);
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
&[disabled] {
|
|
412
|
-
pointer-events: none;
|
|
413
|
-
cursor: not-allowed;
|
|
414
|
-
/* Skip transitions on disabled — a `.dark` toggle would flash
|
|
415
|
-
the underlying tone hue mid-resolve. */
|
|
416
|
-
transition: none;
|
|
417
|
-
& a-icon {
|
|
418
|
-
transition: none;
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
&:focus-visible {
|
|
423
|
-
outline: 1px solid var(--button-focus);
|
|
424
|
-
outline-offset: 1px;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
/* Quaternary: instant in every direction — hover-in, press, and
|
|
428
|
-
return to rest all snap with no transition. */
|
|
429
|
-
&[priority="quaternary"] {
|
|
430
|
-
--button-timing-in: 0s;
|
|
431
|
-
--button-timing-active: 0s;
|
|
432
|
-
--button-timing-out: 0s;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
&[size="small"] {
|
|
436
|
-
--button-padding-y: 3px;
|
|
437
|
-
--button-padding-x: 7px;
|
|
438
|
-
}
|
|
439
|
-
&[size="large"] {
|
|
440
|
-
--button-padding-y: 7px;
|
|
441
|
-
--button-padding-x: 13px;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
/* Underline only on background-less priorities (tertiary, quaternary).
|
|
445
|
-
Rest: 0.5px hairline at 75% alpha. Hover (and sustained [selected]):
|
|
446
|
-
1px thickness at 100% alpha. Active returns to rest. Mirrors the
|
|
447
|
-
prose-link rule used by <Text>. */
|
|
448
|
-
&[priority="tertiary"],
|
|
449
|
-
&[priority="quaternary"] {
|
|
450
|
-
&[underline="solid"] {
|
|
451
|
-
text-decoration: underline solid;
|
|
452
|
-
}
|
|
453
|
-
&[underline="dashed"] {
|
|
454
|
-
text-decoration: underline dashed;
|
|
455
|
-
}
|
|
456
|
-
&[underline="dotted"] {
|
|
457
|
-
text-decoration: underline dotted;
|
|
458
|
-
}
|
|
459
|
-
&[underline] {
|
|
460
|
-
text-decoration-color: color-mix(in srgb, currentColor 75%, transparent);
|
|
461
|
-
text-decoration-thickness: 1px;
|
|
462
|
-
text-underline-offset: 3px;
|
|
463
|
-
&[selected] {
|
|
464
|
-
text-decoration-color: var(--button-fg);
|
|
465
|
-
text-decoration-thickness: 1px;
|
|
466
|
-
}
|
|
467
|
-
/* Hover only on real-pointer devices — gating avoids the sticky
|
|
468
|
-
hover-underline that lingers after a tap on touch screens. */
|
|
469
|
-
@media (hover: hover) and (pointer: fine) {
|
|
470
|
-
&:hover {
|
|
471
|
-
text-decoration-color: var(--button-fg);
|
|
472
|
-
text-decoration-thickness: 1px;
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
&[priority="quaternary"][paddingless] {
|
|
479
|
-
--button-padding-x: 0;
|
|
480
|
-
--button-padding-y: 0;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
/* Icon-only — square padding plus a min-size pin when the button
|
|
484
|
-
has exactly one child and it's an `a-icon`. Purely structural,
|
|
485
|
-
no opt-in attribute: consumers writing raw `<a-button>` get
|
|
486
|
-
icon-button styling just by passing a single `<a-icon>` inside. */
|
|
487
|
-
&:has(> a-icon:only-child) {
|
|
488
|
-
--button-padding-y: 5px;
|
|
489
|
-
--button-padding-x: 5px;
|
|
490
|
-
min-width: 28px;
|
|
491
|
-
min-height: 28px;
|
|
492
|
-
/* Centre the icon when the host is given an explicit width / height
|
|
493
|
-
larger than the natural square — without this the icon sits at the
|
|
494
|
-
padding-start edge. No-op when the button is at its intrinsic
|
|
495
|
-
square size. */
|
|
496
|
-
justify-content: center;
|
|
497
|
-
&[size="small"] {
|
|
498
|
-
--button-padding-y: 3px;
|
|
499
|
-
--button-padding-x: 3px;
|
|
500
|
-
min-width: 24px;
|
|
501
|
-
min-height: 24px;
|
|
502
|
-
}
|
|
503
|
-
&[size="large"] {
|
|
504
|
-
--button-padding-y: 7px;
|
|
505
|
-
--button-padding-x: 7px;
|
|
506
|
-
min-width: 32px;
|
|
507
|
-
min-height: 32px;
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
/* Optical side padding: an icon at an edge needs less breathing room
|
|
512
|
-
than a text edge, so tighten the padding on whichever side a
|
|
513
|
-
(non-only) icon occupies — leading icon trims the start, trailing
|
|
514
|
-
icon trims the end — to ~2px under the text-edge padding (8px → 6px
|
|
515
|
-
at medium). `max(0px, …)` keeps paddingless/quaternary at 0.
|
|
516
|
-
Icon-only buttons are handled by the rule above. */
|
|
517
|
-
&:has(> a-icon:first-child:not(:only-child)) {
|
|
518
|
-
padding-inline-start: max(0px, var(--button-padding-x) - 2px);
|
|
519
|
-
}
|
|
520
|
-
&:has(> a-icon:last-child:not(:only-child)) {
|
|
521
|
-
padding-inline-end: max(0px, var(--button-padding-x) - 2px);
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
&[loading] {
|
|
525
|
-
position: relative;
|
|
526
|
-
pointer-events: none;
|
|
527
|
-
cursor: wait;
|
|
528
|
-
&::before {
|
|
529
|
-
content: "";
|
|
530
|
-
position: absolute;
|
|
531
|
-
top: 0;
|
|
532
|
-
bottom: 0;
|
|
533
|
-
/* Overshoot left by one x-period so the loop seam lines up. */
|
|
534
|
-
left: calc(0px - var(--button-loading-x-period));
|
|
535
|
-
right: 0;
|
|
536
|
-
pointer-events: none;
|
|
537
|
-
background: repeating-linear-gradient(
|
|
538
|
-
var(--button-loading-angle),
|
|
539
|
-
transparent 0,
|
|
540
|
-
transparent var(--button-loading-stripe-gap),
|
|
541
|
-
currentColor var(--button-loading-stripe-gap),
|
|
542
|
-
currentColor
|
|
543
|
-
calc(
|
|
544
|
-
var(--button-loading-stripe-gap) + var(--button-loading-stripe)
|
|
545
|
-
)
|
|
546
|
-
);
|
|
547
|
-
opacity: var(--button-loading-opacity);
|
|
548
|
-
filter: blur(var(--button-loading-blur));
|
|
549
|
-
will-change: transform;
|
|
550
|
-
animation: btn-loading-slide var(--button-loading-duration) linear
|
|
551
|
-
infinite;
|
|
552
|
-
/* Desync instances so a row doesn't pulse in lockstep. */
|
|
553
|
-
animation-delay: -9999s;
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
/* Custom tone — any non-named `tone` value. Primary uses the literal
|
|
558
|
-
color as-is; the other priorities derive from the source HUE via
|
|
559
|
-
oklch relative color, with lightness/chroma/alpha pinned near Brand
|
|
560
|
-
so any hue reads like a sibling of the named tones. The `--_tone-*`
|
|
561
|
-
knobs below are the only numbers to tune; the dark block re-tunes
|
|
562
|
-
them and the formulas resolve against whichever value computes.
|
|
563
|
-
JSX wrapper writes `--button-tone-source` inline for SSR / older
|
|
564
|
-
engines; the typed attr() fallback picks up raw `<a-button tone="…">`
|
|
565
|
-
on Chrome 133+ / Safari 18.2+. (oklch relative color: Chrome 119+,
|
|
566
|
-
Safari 16.4+, Firefox 128+.) */
|
|
567
|
-
&[tone]:not(
|
|
568
|
-
[tone=""],
|
|
569
|
-
[tone="brand"],
|
|
570
|
-
[tone="neutral"],
|
|
571
|
-
[tone="critical"],
|
|
572
|
-
[tone="info"],
|
|
573
|
-
[tone="success"],
|
|
574
|
-
[tone="warning"]
|
|
575
|
-
) {
|
|
576
|
-
--button-tone-source: attr(tone type(<color>), transparent);
|
|
577
|
-
|
|
578
|
-
/* Tunable knobs (light mode). */
|
|
579
|
-
--_tone-fg-l: 0.46; /* fg rest lightness */
|
|
580
|
-
--_tone-fg-strong-l: 0.40; /* fg hover / active lightness */
|
|
581
|
-
--_tone-fg-c: 0.17; /* fg chroma */
|
|
582
|
-
--_tone-bg-l: 0.54; /* tinted-bg lightness */
|
|
583
|
-
--_tone-bg-c: 0.16; /* tinted-bg chroma */
|
|
584
|
-
--_tone-bg-a-rest: 0.10; /* tinted-bg alpha (rest) */
|
|
585
|
-
--_tone-bg-a-hover: 0.15; /* tinted-bg alpha (hover) */
|
|
586
|
-
--_tone-bg-a-active: 0.20; /* tinted-bg alpha (active) */
|
|
587
|
-
--_tone-primary-l-rest: 0.5; /* primary-fill lightness (rest) */
|
|
588
|
-
--_tone-primary-l-hover: 0.45; /* primary-fill lightness (hover) */
|
|
589
|
-
--_tone-primary-l-active: 0.4; /* primary-fill lightness (active) */
|
|
590
|
-
|
|
591
|
-
/* Primary — source hue & chroma, lightness pinned near Brand's
|
|
592
|
-
primary fill so any input lands at a Brand-like lightness instead
|
|
593
|
-
of using the raw color. Re-tunes for dark mode through the knobs
|
|
594
|
-
(the `.dark` block below), exactly like the Brand tone does. */
|
|
595
|
-
--button-bg-primary-rest: oklch(from var(--button-tone-source) var(--_tone-primary-l-rest) c h);
|
|
596
|
-
--button-bg-primary-hover: oklch(from var(--button-tone-source) var(--_tone-primary-l-hover) c h);
|
|
597
|
-
--button-bg-primary-active: oklch(from var(--button-tone-source) var(--_tone-primary-l-active) c h);
|
|
598
|
-
--button-fg-primary-rest: var(--button-primary-fg);
|
|
599
|
-
|
|
600
|
-
/* Secondary / tertiary / quaternary fg — source hue, pinned L/C. */
|
|
601
|
-
--button-fg-secondary-rest: oklch(from var(--button-tone-source) var(--_tone-fg-l) var(--_tone-fg-c) h);
|
|
602
|
-
--button-fg-secondary-hover: oklch(from var(--button-tone-source) var(--_tone-fg-strong-l) var(--_tone-fg-c) h);
|
|
603
|
-
--button-fg-tertiary-rest: oklch(from var(--button-tone-source) var(--_tone-fg-l) var(--_tone-fg-c) h);
|
|
604
|
-
--button-fg-tertiary-hover: oklch(from var(--button-tone-source) var(--_tone-fg-strong-l) var(--_tone-fg-c) h);
|
|
605
|
-
--button-fg-quaternary-rest: oklch(from var(--button-tone-source) var(--_tone-fg-l) var(--_tone-fg-c) h);
|
|
606
|
-
--button-fg-quaternary-hover: oklch(from var(--button-tone-source) var(--_tone-fg-strong-l) var(--_tone-fg-c) h);
|
|
607
|
-
|
|
608
|
-
/* Tinted backgrounds — source hue, pinned L, brand-like alphas. */
|
|
609
|
-
--button-bg-secondary-rest: oklch(from var(--button-tone-source) var(--_tone-bg-l) var(--_tone-bg-c) h / var(--_tone-bg-a-rest));
|
|
610
|
-
--button-bg-secondary-hover: oklch(from var(--button-tone-source) var(--_tone-bg-l) var(--_tone-bg-c) h / var(--_tone-bg-a-hover));
|
|
611
|
-
--button-bg-secondary-active: oklch(from var(--button-tone-source) var(--_tone-bg-l) var(--_tone-bg-c) h / var(--_tone-bg-a-active));
|
|
612
|
-
--button-bg-tertiary-hover: oklch(from var(--button-tone-source) var(--_tone-bg-l) var(--_tone-bg-c) h / var(--_tone-bg-a-rest));
|
|
613
|
-
--button-bg-tertiary-active: oklch(from var(--button-tone-source) var(--_tone-bg-l) var(--_tone-bg-c) h / var(--_tone-bg-a-hover));
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
/* Custom tone, dark mode — same formulas, re-tuned knobs: lighter fg
|
|
617
|
-
and heavier tint alphas to read against a dark page. */
|
|
618
|
-
.dark &[tone]:not(
|
|
619
|
-
[tone=""],
|
|
620
|
-
[tone="brand"],
|
|
621
|
-
[tone="neutral"],
|
|
622
|
-
[tone="critical"],
|
|
623
|
-
[tone="info"],
|
|
624
|
-
[tone="success"],
|
|
625
|
-
[tone="warning"]
|
|
626
|
-
) {
|
|
627
|
-
--_tone-fg-l: 0.78;
|
|
628
|
-
--_tone-fg-strong-l: 0.85;
|
|
629
|
-
--_tone-fg-c: 0.11;
|
|
630
|
-
--_tone-bg-l: 0.58;
|
|
631
|
-
--_tone-bg-a-rest: 0.23;
|
|
632
|
-
--_tone-bg-a-hover: 0.28;
|
|
633
|
-
--_tone-bg-a-active: 0.33;
|
|
634
|
-
/* Primary fill lightness, dark mode (Brand inverts rest/hover and
|
|
635
|
-
lifts active to read against a dark page). */
|
|
636
|
-
--_tone-primary-l-rest: 0.45;
|
|
637
|
-
--_tone-primary-l-hover: 0.5;
|
|
638
|
-
--_tone-primary-l-active: 0.57;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
/* Wire the per-tone vars into the final fg/bg colors. Secondary
|
|
642
|
-
is the default — declared unscoped so a bare `a-button` consumer
|
|
643
|
-
selector can override it without bumping specificity. Primary,
|
|
644
|
-
tertiary, and quaternary match an explicit `[priority="…"]` attr
|
|
645
|
-
and win on specificity (primary's constant fg beats the unscoped
|
|
646
|
-
:hover on source order). */
|
|
647
|
-
--button-fg: oklch(from var(--button-fg-secondary-rest) calc(l - var(--button-fg-secondary-l-shift)) c h);
|
|
648
|
-
--button-bg: var(--button-bg-secondary-rest);
|
|
649
|
-
/* Hover styling is gated to real-pointer devices so it doesn't stick
|
|
650
|
-
after a tap on touch screens (where :hover lingers until the next
|
|
651
|
-
tap elsewhere). :active / [selected] below stay ungated — they're
|
|
652
|
-
the correct press feedback on touch. */
|
|
653
|
-
@media (hover: hover) and (pointer: fine) {
|
|
654
|
-
&:hover {
|
|
655
|
-
--button-fg: var(--button-fg-secondary-hover);
|
|
656
|
-
--button-bg: var(--button-bg-secondary-hover);
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
&:active,
|
|
660
|
-
&[selected] {
|
|
661
|
-
--button-fg: var(--button-fg-secondary-hover);
|
|
662
|
-
--button-bg: var(--button-bg-secondary-active);
|
|
663
|
-
}
|
|
664
|
-
&[priority="primary"] {
|
|
665
|
-
--button-fg: var(--button-fg-primary-rest);
|
|
666
|
-
--button-bg: var(--button-bg-primary-rest);
|
|
667
|
-
/* Solid fill carries its own edge — drop the secondary hairline. */
|
|
668
|
-
box-shadow: none;
|
|
669
|
-
@media (hover: hover) and (pointer: fine) {
|
|
670
|
-
&:hover {
|
|
671
|
-
--button-bg: var(--button-bg-primary-hover);
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
&:active,
|
|
675
|
-
&[selected] {
|
|
676
|
-
--button-bg: var(--button-bg-primary-active);
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
&[priority="tertiary"] {
|
|
680
|
-
--button-fg: var(--button-fg-tertiary-rest);
|
|
681
|
-
--button-bg: transparent;
|
|
682
|
-
/* Background-less — no hairline. */
|
|
683
|
-
box-shadow: none;
|
|
684
|
-
@media (hover: hover) and (pointer: fine) {
|
|
685
|
-
&:hover {
|
|
686
|
-
--button-fg: var(--button-fg-tertiary-hover);
|
|
687
|
-
--button-bg: var(--button-bg-tertiary-hover);
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
&:active,
|
|
691
|
-
&[selected] {
|
|
692
|
-
--button-fg: var(--button-fg-tertiary-hover);
|
|
693
|
-
--button-bg: var(--button-bg-tertiary-active);
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
&[priority="quaternary"] {
|
|
697
|
-
/* Rest fg is the quaternary tone at 90% alpha — slightly faded, so a
|
|
698
|
-
quaternary button reads as quieter than a (full-opacity) tertiary
|
|
699
|
-
one. Hover / active restore full opacity. */
|
|
700
|
-
--button-fg: color-mix(in oklch, var(--button-fg-quaternary-rest) 90%, transparent);
|
|
701
|
-
--button-bg: transparent;
|
|
702
|
-
/* Background-less — no hairline. */
|
|
703
|
-
box-shadow: none;
|
|
704
|
-
font-weight: 415;
|
|
705
|
-
@media (hover: hover) and (pointer: fine) {
|
|
706
|
-
&:hover {
|
|
707
|
-
--button-fg: var(--button-fg-quaternary-hover);
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
&[selected] {
|
|
711
|
-
--button-fg: var(--button-fg-quaternary-hover);
|
|
712
|
-
}
|
|
713
|
-
/* Pressing lightens the rest color by 0.05 (oklch L) for a subtle
|
|
714
|
-
press feedback in light mode — declared after :hover so it wins
|
|
715
|
-
while the pointer is still over the button. Dark mode returns to
|
|
716
|
-
the rest color (lightening would brighten the already-light fg). */
|
|
717
|
-
&:active {
|
|
718
|
-
--button-fg: oklch(from var(--button-fg-quaternary-rest) calc(l + 0.05) c h);
|
|
719
|
-
}
|
|
720
|
-
.dark &:active {
|
|
721
|
-
--button-fg: var(--button-fg-quaternary-rest);
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
/* Selected gets a 1px inset ring in the current fg color. Declared
|
|
726
|
-
after the priority blocks so it overrides their `box-shadow: none`
|
|
727
|
-
cancels — every selected button keeps its ring regardless of
|
|
728
|
-
priority. */
|
|
729
|
-
&[selected] {
|
|
730
|
-
box-shadow: inset 0 0 0 1px currentColor;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
/* Set bg/color directly (not the vars) so inline-style
|
|
734
|
-
`--button-bg` overrides can't keep a disabled button alive.
|
|
735
|
-
Secondary disabled is the default; other priorities override below. */
|
|
736
|
-
&[disabled] {
|
|
737
|
-
background-color: var(--bg-secondary-disabled);
|
|
738
|
-
color: var(--fg-disabled);
|
|
739
|
-
&[priority="primary"] {
|
|
740
|
-
background-color: var(--bg-primary-disabled);
|
|
741
|
-
color: var(--fg-disabled-primary);
|
|
742
|
-
}
|
|
743
|
-
&[priority="tertiary"],
|
|
744
|
-
&[priority="quaternary"] {
|
|
745
|
-
background-color: transparent;
|
|
746
|
-
color: var(--fg-disabled);
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
@keyframes btn-loading-slide {
|
|
753
|
-
to {
|
|
754
|
-
transform: translateX(var(--button-loading-x-period));
|
|
755
|
-
}
|
|
756
|
-
}
|
|
1
|
+
@layer anta{a-button,a[role=button]{--button-primary-fg: #ffffff;--button-focus: #503cb4;--bg-primary-disabled: #ece9ec;--bg-secondary-disabled: #f6f4f6;--fg-disabled-primary: #afa9b1;--fg-disabled: #afa9b1;--button-loading-stripe: 14px;--button-loading-stripe-gap: 16px;--button-loading-period: 30px;--button-loading-angle: 125deg;--button-loading-x-period: calc( var(--button-loading-period) / cos(var(--button-loading-angle) - 90deg) );--button-loading-opacity: .15;--button-loading-blur: 2.5px;--button-bg-primary-rest: #635b65;--button-bg-primary-hover: #534c57;--button-bg-primary-active: #49424c;--button-fg-primary-rest: var(--button-primary-fg);--button-bg-secondary-rest: #45374c12;--button-bg-secondary-hover: #44374b1a;--button-bg-secondary-active: #44374b26;--button-fg-secondary-rest: #534c57;--button-fg-secondary-hover: #49424c;--button-fg-secondary-l-shift: .05;--button-fg-tertiary-rest: #635b65;--button-fg-tertiary-hover: #534c57;--button-bg-tertiary-hover: #44374b0d;--button-bg-tertiary-active: #44374b1a;--button-fg-quaternary-rest: #635b65;--button-fg-quaternary-hover: #49424c;--button-padding-x: 9px;--button-padding-y: 5px;--button-max-width: 100%;--button-max-height: 100%;--button-timing-in: 75ms ease-in;--button-timing-active: 50ms linear;--button-timing-out: .15s ease-out;--button-loading-duration: .5s}a-button[tone=brand],a[role=button][tone=brand]{--button-bg-primary-rest: #5f4bc3;--button-bg-primary-hover: #503cb4;--button-bg-primary-active: #483493;--button-fg-primary-rest: var(--button-primary-fg);--button-bg-secondary-rest: #7460d71a;--button-bg-secondary-hover: #7460d726;--button-bg-secondary-active: #7460d733;--button-fg-secondary-rest: #5f4bc3;--button-fg-secondary-hover: #503cb4;--button-fg-tertiary-rest: #5f4bc3;--button-fg-tertiary-hover: #503cb4;--button-bg-tertiary-hover: #7460d71a;--button-bg-tertiary-active: #7460d726;--button-fg-quaternary-rest: #5f4bc3;--button-fg-quaternary-hover: #483493}a-button[tone=critical],a[role=button][tone=critical]{--button-bg-primary-rest: #c9302c;--button-bg-primary-hover: #b02120;--button-bg-primary-active: #a01c1c;--button-fg-primary-rest: var(--button-primary-fg);--button-bg-secondary-rest: #de45451a;--button-bg-secondary-hover: #de454526;--button-bg-secondary-active: #de454533;--button-fg-secondary-rest: #c9302c;--button-fg-secondary-hover: #b02120;--button-fg-tertiary-rest: #c9302c;--button-fg-tertiary-hover: #b02120;--button-bg-tertiary-hover: #de45451a;--button-bg-tertiary-active: #de454533;--button-fg-quaternary-rest: #c9302c;--button-fg-quaternary-hover: #a01c1c}a-button[tone=info],a[role=button][tone=info]{--button-bg-primary-rest: #1f6eb2;--button-bg-primary-hover: #1a5b93;--button-bg-primary-active: #175082;--button-fg-primary-rest: var(--button-primary-fg);--button-bg-secondary-rest: #2686d91a;--button-bg-secondary-hover: #2686d926;--button-bg-secondary-active: #2686d933;--button-fg-secondary-rest: #1f6eb2;--button-fg-secondary-hover: #1a5b93;--button-fg-tertiary-rest: #1f6eb2;--button-fg-tertiary-hover: #1a5b93;--button-bg-tertiary-hover: #2686d91a;--button-bg-tertiary-active: #2686d926;--button-fg-quaternary-rest: #1f6eb2;--button-fg-quaternary-hover: #175082}a-button[tone=success],a[role=button][tone=success]{--button-bg-primary-rest: #2a7e43;--button-bg-primary-hover: #226737;--button-bg-primary-active: #1f5c31;--button-fg-primary-rest: var(--button-primary-fg);--button-bg-secondary-rest: #3295501a;--button-bg-secondary-hover: #32955026;--button-bg-secondary-active: #32955033;--button-fg-secondary-rest: #2a7e43;--button-fg-secondary-hover: #226737;--button-fg-tertiary-rest: #2a7e43;--button-fg-tertiary-hover: #226737;--button-bg-tertiary-hover: #3295501a;--button-bg-tertiary-active: #32955026;--button-fg-quaternary-rest: #2a7e43;--button-fg-quaternary-hover: #1f5c31}a-button[tone=warning],a[role=button][tone=warning]{--button-bg-primary-rest: #c37416;--button-bg-primary-hover: #ae6613;--button-bg-primary-active: #995200;--button-fg-primary-rest: var(--button-primary-fg);--button-bg-secondary-rest: #c374161a;--button-bg-secondary-hover: #c3741626;--button-bg-secondary-active: #c3741633;--button-fg-secondary-rest: #c37416;--button-fg-secondary-hover: #ae6613;--button-fg-tertiary-rest: #c37416;--button-fg-tertiary-hover: #ae6613;--button-bg-tertiary-hover: #c374161a;--button-bg-tertiary-active: #c3741633;--button-fg-quaternary-rest: #c37416;--button-fg-quaternary-hover: #995200}.dark a-button,.dark a[role=button]{--button-focus: #a897fc;--bg-primary-disabled: #272329;--bg-secondary-disabled: #1d1a1e;--fg-disabled-primary: #776e77;--fg-disabled: #635b65;--button-bg-primary-rest: #534c57;--button-bg-primary-hover: #635b65;--button-bg-primary-active: #938d96;--button-bg-secondary-rest: #e4d1ef1c;--button-bg-secondary-hover: #e4d1ef24;--button-bg-secondary-active: #e4d1ef2e;--button-fg-secondary-rest: #c1b9c1;--button-fg-secondary-hover: #d4ced4;--button-fg-secondary-l-shift: 0;--button-fg-tertiary-rest: #afa9b1;--button-fg-tertiary-hover: #afa9b1;--button-bg-tertiary-hover: #e4d1ef14;--button-bg-tertiary-active: #e4d1ef21;--button-fg-quaternary-rest: #afa9b1;--button-fg-quaternary-hover: #cac4ca}.dark a-button[tone=brand],.dark a[role=button][tone=brand]{--button-bg-primary-rest: #503cb4;--button-bg-primary-hover: #5f4bc3;--button-bg-primary-active: #7460d7;--button-bg-secondary-rest: #7460d73b;--button-bg-secondary-hover: #7460d747;--button-bg-secondary-active: #7460d754;--button-fg-secondary-rest: #c5baff;--button-fg-secondary-hover: #d2cbf6;--button-fg-tertiary-rest: #ada0ee;--button-fg-tertiary-hover: #bcb1f1;--button-bg-tertiary-hover: #7460d73b;--button-bg-tertiary-active: #7460d747;--button-fg-quaternary-rest: #ada0ee;--button-fg-quaternary-hover: #c7bef4}.dark a-button[tone=critical],.dark a[role=button][tone=critical]{--button-bg-primary-rest: #b02120;--button-bg-primary-hover: #c9302c;--button-bg-primary-active: #de4545;--button-bg-secondary-rest: #de45453b;--button-bg-secondary-hover: #de454547;--button-bg-secondary-active: #de454554;--button-fg-secondary-rest: #ffabac;--button-fg-secondary-hover: #f4c2c2;--button-fg-tertiary-rest: #e78e90;--button-fg-tertiary-hover: #efa4a4;--button-bg-tertiary-hover: #de45453b;--button-bg-tertiary-active: #de454547;--button-fg-quaternary-rest: #e78e90;--button-fg-quaternary-hover: #ffabac}.dark a-button[tone=info],.dark a[role=button][tone=info]{--button-bg-primary-rest: #1a5b93;--button-bg-primary-hover: #1f6eb2;--button-bg-primary-active: #2686d9;--button-bg-secondary-rest: #2686d93b;--button-bg-secondary-hover: #2686d947;--button-bg-secondary-active: #2686d954;--button-fg-secondary-rest: #9ed2ff;--button-fg-secondary-hover: #bad6f3;--button-fg-tertiary-rest: #7db6e8;--button-fg-tertiary-hover: #93c5ec;--button-bg-tertiary-hover: #2686d93b;--button-bg-tertiary-active: #2686d947;--button-fg-quaternary-rest: #7db6e8;--button-fg-quaternary-hover: #a6cdef}.dark a-button[tone=success],.dark a[role=button][tone=success]{--button-bg-primary-rest: #226737;--button-bg-primary-hover: #2a7e43;--button-bg-primary-active: #329550;--button-bg-secondary-rest: #3295503b;--button-bg-secondary-hover: #32955047;--button-bg-secondary-active: #32955054;--button-fg-secondary-rest: #8ceca9;--button-fg-secondary-hover: #b3e5c2;--button-fg-tertiary-rest: #74cd8e;--button-fg-tertiary-hover: #88d7a0;--button-bg-tertiary-hover: #3295503b;--button-bg-tertiary-active: #32955047;--button-fg-quaternary-rest: #74cd8e;--button-fg-quaternary-hover: #9ddeb1}.dark a-button[tone=warning],.dark a[role=button][tone=warning]{--button-bg-primary-rest: #7f410b;--button-bg-primary-hover: #995200;--button-bg-primary-active: #ae6613;--button-bg-secondary-rest: #c374163b;--button-bg-secondary-hover: #c3741647;--button-bg-secondary-active: #c3741654;--button-fg-secondary-rest: #f7c06e;--button-fg-secondary-hover: #f3cc91;--button-fg-tertiary-rest: #e1a452;--button-fg-tertiary-hover: #edb25a;--button-bg-tertiary-hover: #c374163b;--button-bg-tertiary-active: #c3741647;--button-fg-quaternary-rest: #e1a452;--button-fg-quaternary-hover: #f0bf75}a-button,a[role=button]{user-select:none;display:inline-flex;align-items:center;gap:.5ch;overflow:hidden;cursor:pointer;flex-shrink:0;color:var(--button-fg);background-color:var(--button-bg);border-radius:4px;text-decoration:none;box-shadow:inset 0 0 1px color-mix(in oklch,currentColor,transparent 70%);font-size:15px;font-family:var(--sans-serif);font-weight:450;font-variation-settings:"wdth" 88,"slnt" 0,"ital" 0;line-height:18px;letter-spacing:.05ch;text-overflow:ellipsis;text-wrap:nowrap;white-space:nowrap;max-width:var(--button-max-width);max-height:var(--button-max-height);padding-inline:var(--button-padding-x);padding-block:var(--button-padding-y);>a-button-label{display:inline-block;text-overflow:ellipsis;text-wrap:nowrap;white-space:nowrap;overflow:hidden;min-width:0;line-height:17px;padding-bottom:1px;&:has(>*){display:inline-flex;gap:.25ch}}>*{pointer-events:none}& a-icon{transition:color var(--button-timing-out)}transition:color var(--button-timing-out),background-color var(--button-timing-out);&:hover,&:focus-visible{transition:color var(--button-timing-in),background-color var(--button-timing-in);& a-icon{transition:color var(--button-timing-in)}}&:active,&[selected]{transition:color var(--button-timing-active),background-color var(--button-timing-active);& a-icon{transition:color var(--button-timing-active)}}&[disabled]{pointer-events:none;cursor:not-allowed;transition:none;& a-icon{transition:none}}&:focus-visible{outline:1px solid var(--button-focus);outline-offset:1px}&[priority=quaternary]{--button-timing-in: 0s;--button-timing-active: 0s;--button-timing-out: 0s}&[size=small]{--button-padding-y: 3px;--button-padding-x: 7px}&[size=large]{--button-padding-y: 7px;--button-padding-x: 13px}&[priority=tertiary],&[priority=quaternary]{&[underline=solid]{text-decoration:underline solid}&[underline=dashed]{text-decoration:underline dashed}&[underline=dotted]{text-decoration:underline dotted}&[underline]{text-decoration-color:color-mix(in srgb,currentColor 75%,transparent);text-decoration-thickness:1px;text-underline-offset:3px;&[selected]{text-decoration-color:var(--button-fg);text-decoration-thickness:1px}@media(hover:hover)and (pointer:fine){&:hover{text-decoration-color:var(--button-fg);text-decoration-thickness:1px}}}}&[priority=quaternary][paddingless]{--button-padding-x: 0;--button-padding-y: 0}&:has(>a-icon:only-child){--button-padding-y: 5px;--button-padding-x: 5px;min-width:28px;min-height:28px;justify-content:center;&[size=small]{--button-padding-y: 3px;--button-padding-x: 3px;min-width:24px;min-height:24px}&[size=large]{--button-padding-y: 7px;--button-padding-x: 7px;min-width:32px;min-height:32px}}&:has(>a-icon:first-child:not(:only-child)){padding-inline-start:max(0px,var(--button-padding-x) - 2px)}&:has(>a-icon:last-child:not(:only-child)){padding-inline-end:max(0px,var(--button-padding-x) - 2px)}&[loading]{position:relative;pointer-events:none;cursor:wait;&:before{content:"";position:absolute;top:0;bottom:0;left:calc(0px - var(--button-loading-x-period));right:0;pointer-events:none;background:repeating-linear-gradient(var(--button-loading-angle),transparent 0,transparent var(--button-loading-stripe-gap),currentColor var(--button-loading-stripe-gap),currentColor calc(var(--button-loading-stripe-gap) + var(--button-loading-stripe)));opacity:var(--button-loading-opacity);filter:blur(var(--button-loading-blur));will-change:transform;animation:btn-loading-slide var(--button-loading-duration) linear infinite;animation-delay:-9999s}}&[tone]:not([tone=""],[tone=brand],[tone=neutral],[tone=critical],[tone=info],[tone=success],[tone=warning]){--button-tone-source: attr(tone type(<color>), transparent);--_tone-fg-l: .46;--_tone-fg-strong-l: .4;--_tone-fg-c: .17;--_tone-bg-l: .54;--_tone-bg-c: .16;--_tone-bg-a-rest: .1;--_tone-bg-a-hover: .15;--_tone-bg-a-active: .2;--_tone-primary-l-rest: .5;--_tone-primary-l-hover: .45;--_tone-primary-l-active: .4;--button-bg-primary-rest: oklch(from var(--button-tone-source) var(--_tone-primary-l-rest) c h);--button-bg-primary-hover: oklch(from var(--button-tone-source) var(--_tone-primary-l-hover) c h);--button-bg-primary-active: oklch(from var(--button-tone-source) var(--_tone-primary-l-active) c h);--button-fg-primary-rest: var(--button-primary-fg);--button-fg-secondary-rest: oklch(from var(--button-tone-source) var(--_tone-fg-l) var(--_tone-fg-c) h);--button-fg-secondary-hover: oklch(from var(--button-tone-source) var(--_tone-fg-strong-l) var(--_tone-fg-c) h);--button-fg-tertiary-rest: oklch(from var(--button-tone-source) var(--_tone-fg-l) var(--_tone-fg-c) h);--button-fg-tertiary-hover: oklch(from var(--button-tone-source) var(--_tone-fg-strong-l) var(--_tone-fg-c) h);--button-fg-quaternary-rest: oklch(from var(--button-tone-source) var(--_tone-fg-l) var(--_tone-fg-c) h);--button-fg-quaternary-hover: oklch(from var(--button-tone-source) var(--_tone-fg-strong-l) var(--_tone-fg-c) h);--button-bg-secondary-rest: oklch(from var(--button-tone-source) var(--_tone-bg-l) var(--_tone-bg-c) h / var(--_tone-bg-a-rest));--button-bg-secondary-hover: oklch(from var(--button-tone-source) var(--_tone-bg-l) var(--_tone-bg-c) h / var(--_tone-bg-a-hover));--button-bg-secondary-active: oklch(from var(--button-tone-source) var(--_tone-bg-l) var(--_tone-bg-c) h / var(--_tone-bg-a-active));--button-bg-tertiary-hover: oklch(from var(--button-tone-source) var(--_tone-bg-l) var(--_tone-bg-c) h / var(--_tone-bg-a-rest));--button-bg-tertiary-active: oklch(from var(--button-tone-source) var(--_tone-bg-l) var(--_tone-bg-c) h / var(--_tone-bg-a-hover))}.dark &[tone]:not([tone=""],[tone=brand],[tone=neutral],[tone=critical],[tone=info],[tone=success],[tone=warning]){--_tone-fg-l: .78;--_tone-fg-strong-l: .85;--_tone-fg-c: .11;--_tone-bg-l: .58;--_tone-bg-a-rest: .23;--_tone-bg-a-hover: .28;--_tone-bg-a-active: .33;--_tone-primary-l-rest: .45;--_tone-primary-l-hover: .5;--_tone-primary-l-active: .57}--button-fg: oklch(from var(--button-fg-secondary-rest) calc(l - var(--button-fg-secondary-l-shift)) c h);--button-bg: var(--button-bg-secondary-rest);@media(hover:hover)and (pointer:fine){&:hover{--button-fg: var(--button-fg-secondary-hover);--button-bg: var(--button-bg-secondary-hover)}}&:active,&[selected]{--button-fg: var(--button-fg-secondary-hover);--button-bg: var(--button-bg-secondary-active)}&[priority=primary]{--button-fg: var(--button-fg-primary-rest);--button-bg: var(--button-bg-primary-rest);box-shadow:none;@media(hover:hover)and (pointer:fine){&:hover{--button-bg: var(--button-bg-primary-hover)}}&:active,&[selected]{--button-bg: var(--button-bg-primary-active)}}&[priority=tertiary]{--button-fg: var(--button-fg-tertiary-rest);--button-bg: transparent;box-shadow:none;@media(hover:hover)and (pointer:fine){&:hover{--button-fg: var(--button-fg-tertiary-hover);--button-bg: var(--button-bg-tertiary-hover)}}&:active,&[selected]{--button-fg: var(--button-fg-tertiary-hover);--button-bg: var(--button-bg-tertiary-active)}}&[priority=quaternary]{--button-fg: color-mix(in oklch, var(--button-fg-quaternary-rest) 90%, transparent);--button-bg: transparent;box-shadow:none;font-weight:415;@media(hover:hover)and (pointer:fine){&:hover{--button-fg: var(--button-fg-quaternary-hover)}}&[selected]{--button-fg: var(--button-fg-quaternary-hover)}&:active{--button-fg: oklch(from var(--button-fg-quaternary-rest) calc(l + .05) c h)}.dark &:active{--button-fg: var(--button-fg-quaternary-rest)}}&[selected]{box-shadow:inset 0 0 0 1px currentColor}&[disabled]{background-color:var(--bg-secondary-disabled);color:var(--fg-disabled);&[priority=primary]{background-color:var(--bg-primary-disabled);color:var(--fg-disabled-primary)}&[priority=tertiary],&[priority=quaternary]{background-color:transparent;color:var(--fg-disabled)}}}}@keyframes btn-loading-slide{to{transform:translate(var(--button-loading-x-period))}}
|