viewkitjs 0.21.0 → 0.22.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/MIGRATION.md +1 -1
  3. package/README.md +1 -1
  4. package/fields/dist/conventions.d.ts +15 -3
  5. package/fields/dist/conventions.js +25 -0
  6. package/fields/dist/design/category-colors.d.ts +12 -5
  7. package/fields/dist/design/category-colors.js +7 -7
  8. package/fields/dist/query/buckets.js +42 -35
  9. package/fields/dist/query/date.js +2 -13
  10. package/fields/docs/guides/conventions.md +1 -1
  11. package/fields/docs/guides/options.md +2 -1
  12. package/fields/docs/reference/design-category-colors.md +2 -2
  13. package/fields/docs/reference/fields.md +1 -1
  14. package/package.json +15 -1
  15. package/views/dist/atoms/tones.js +7 -7
  16. package/views/dist/contract.d.ts +288 -0
  17. package/views/dist/contract.js +96 -0
  18. package/views/dist/controls/button/button.d.ts +40 -0
  19. package/views/dist/controls/button/button.js +40 -0
  20. package/views/dist/controls/button/looks.d.ts +4 -0
  21. package/views/dist/controls/button/looks.js +20 -0
  22. package/views/dist/controls/button/map-button.d.ts +11 -0
  23. package/views/dist/controls/button/map-button.js +20 -0
  24. package/views/dist/controls/button/own-look.d.ts +59 -0
  25. package/views/dist/controls/button/own-look.js +33 -0
  26. package/views/dist/controls/button.css +530 -0
  27. package/views/dist/controls/controls.d.ts +5 -0
  28. package/views/dist/controls/controls.js +2 -0
  29. package/views/dist/controls/index.d.ts +11 -0
  30. package/views/dist/controls/index.js +6 -0
  31. package/views/dist/controls/smooth.css +101 -0
  32. package/views/dist/controls/spinner/looks.d.ts +4 -0
  33. package/views/dist/controls/spinner/looks.js +32 -0
  34. package/views/dist/controls/spinner/spinner.d.ts +23 -0
  35. package/views/dist/controls/spinner/spinner.js +16 -0
  36. package/views/dist/controls/spinner.css +147 -0
  37. package/views/dist/display/date.js +15 -2
  38. package/views/dist/looks/index.d.ts +2 -0
  39. package/views/dist/looks/index.js +2 -0
  40. package/views/dist/looks/looks.d.ts +2 -1
  41. package/views/dist/looks/pieces.js +3 -1
  42. package/views/dist/panels/react/views-row/FoldingViewRow.js +8 -8
  43. package/views/dist/styles.css +825 -56
  44. package/views/dist/styles.unlayered.css +842 -56
  45. package/views/docs/contract.md +131 -8
  46. package/views/docs/guides/the-provider.md +1 -1
  47. package/views/docs/index.md +1 -0
  48. package/views/docs/install.md +2 -0
  49. package/views/docs/reference/controls.md +36 -0
  50. package/views/docs/reference/looks.md +12 -2
  51. package/views/docs/reference/views.md +4 -1
@@ -0,0 +1,530 @@
1
+ /* The Button. Every value it draws with is a token (the contract's controls' tokens); this file only says which token each
2
+ kind, size and state takes. The options a design picks (looks.ts) are data attributes on the
3
+ frame or the app around the Button, and each one only chooses other tokens:
4
+
5
+ data-button-radius xs · sm · md · lg · xl · 2xl · full which radius step its corners take
6
+ data-button-depth flat · edged · lifted which shadows give it depth
7
+ data-button-hover tone · brighter · rises what the pointer does
8
+ data-button-press settles · sinks · springs · lands what a press does
9
+ data-button-soft grey · tint which fill the soft kind takes
10
+ data-button-weight medium · semibold its label's weight
11
+
12
+ Nothing set is Classic, the approved card: lg corners, flat, a tone, settles, grey, medium. A Button
13
+ that is disabled or working ignores the pointer and the press, and so does one that is read-only
14
+ (data-readonly: a Toggle shown on and never pressed), which keeps its resting look. Set the options on one element (the
15
+ frame, the app's root): set again inside it, an option does not replace the outer one.
16
+
17
+ A Button's own look (own-look.ts; its start, semibold, turn, dot, cut and end room) is the one exception:
18
+ options set on the Button itself beside data-button-own
19
+ (data-button-radius, -hover and -press among them, with values the frame's don't take: none, words, card). What it names it
20
+ keeps over the frame's for now; what it doesn't name, the frame sets. Its rules, and the measured sizes, are the last
21
+ section below.
22
+
23
+ On a popup's ground (a Popover, a Sheet, a Modal, a Drawer, an Alert Dialog, a Pane) a quiet Button hovers and presses in
24
+ the overlay's own steps, not the page's, with nothing set; at rest it is
25
+ the same everywhere.
26
+
27
+ The rules sit in the components layer, so a utility class on a Button (rounded-none, h-10) still wins. */
28
+ @layer components {
29
+
30
+ /* ── At rest ──────────────────────────────────────────────────────────────────────────────────────── */
31
+ :where(.o-button) {
32
+ height: calc(var(--vk-spacing) * 9);
33
+ padding: 0 calc(var(--vk-spacing) * 3.5);
34
+ font-size: var(--vk-font-size-sm);
35
+ --button-r: var(--vk-radius-lg);
36
+ --button-edge: transparent; --button-edge-foot: transparent;
37
+ --button-ground: transparent; --button-light: none; --button-depth: none; --button-line: var(--vk-border-width);
38
+ color: var(--vk-fg);
39
+ /* Drawn as a link (an <a>), it drops the browser's underline at rest; every kind's own underline still wins. */
40
+ text-decoration: none;
41
+ }
42
+ .o-button {
43
+ position: relative; display: inline-flex; align-items: center; justify-content: center; gap: calc(var(--vk-spacing) * 1.5);
44
+ box-sizing: border-box; margin: 0;
45
+ border-width: var(--button-line); border-style: solid;
46
+ /* Its paint, from its variables: every kind, look and state below sets them, never the paint itself, so its cut can
47
+ draw them under Smooth (Corner smoothing, the last section) and it paints them itself under Round. */
48
+ border-radius: var(--button-r); background-color: var(--button-ground); background-image: var(--button-light);
49
+ border-color: var(--button-edge); border-bottom-color: var(--button-edge-foot); box-shadow: var(--button-depth);
50
+ font-family: inherit; line-height: 1; font-weight: var(--vk-font-weight-medium); white-space: nowrap;
51
+ cursor: pointer; user-select: none; outline: none; -webkit-tap-highlight-color: transparent;
52
+ transition-property: background-color, border-color, color, box-shadow, translate, scale;
53
+ transition-duration: var(--vk-duration-fast);
54
+ transition-timing-function: var(--vk-ease-out);
55
+ }
56
+ .o-button > [data-slot="vk-button-icon"] { display: inline-flex; flex: none; transition: color var(--vk-duration-fast) var(--vk-ease-out); }
57
+ .o-button > [data-slot="vk-button-icon"] > svg { width: calc(var(--vk-spacing) * 3.75); height: calc(var(--vk-spacing) * 3.75); }
58
+
59
+ /* ── Sizes and forms: 24 and 28px in dense places (a header beside a 24px face, a chip's row), 32 in
60
+ toolbars and rows, 36 beside fields, 44 on the phone (lg, the next step's words and icons; or 44, md's words and icons
61
+ at 44 high); the smaller two carry smaller words and icons ── */
62
+ .o-button-2xs { height: calc(var(--vk-spacing) * 6); padding: 0 calc(var(--vk-spacing) * 2); gap: calc(var(--vk-spacing) * 1); font-size: var(--vk-font-size-xs); }
63
+ .o-button-xs { height: calc(var(--vk-spacing) * 7); padding: 0 calc(var(--vk-spacing) * 2.5); gap: calc(var(--vk-spacing) * 1); }
64
+ .o-button-sm { height: calc(var(--vk-spacing) * 8); padding: 0 calc(var(--vk-spacing) * 3); }
65
+ .o-button-lg { height: calc(var(--vk-spacing) * 11); padding: 0 calc(var(--vk-spacing) * 5); font-size: var(--vk-font-size-base); }
66
+ .o-button-2xs > [data-slot="vk-button-icon"] > svg { width: calc(var(--vk-spacing) * 3); height: calc(var(--vk-spacing) * 3); }
67
+ .o-button-xs > [data-slot="vk-button-icon"] > svg { width: calc(var(--vk-spacing) * 3.5); height: calc(var(--vk-spacing) * 3.5); }
68
+ /* Icon only: a square of its height, at every size. */
69
+ .o-button.o-button-icon { aspect-ratio: 1; min-width: 0; padding: 0; }
70
+ /* Round: a circle of its height, at every size; the card's close is the 32px one. */
71
+ .o-button.o-button-round { aspect-ratio: 1; min-width: 0; padding: 0; --button-r: var(--vk-radius-full); }
72
+ /* An icon-only or round button's icon is in proportion to it, a little over half its height: 14px at 24,
73
+ 16 at 28, 18 at 32, 20 at 36, 24 at 44. A button with words keeps its icon beside them, 15px. */
74
+ .o-button:is(.o-button-icon, .o-button-round) > [data-slot="vk-button-icon"] > svg { width: calc(var(--vk-spacing) * 5); height: calc(var(--vk-spacing) * 5); }
75
+ .o-button-2xs:is(.o-button-icon, .o-button-round) > [data-slot="vk-button-icon"] > svg { width: calc(var(--vk-spacing) * 3.5); height: calc(var(--vk-spacing) * 3.5); }
76
+ .o-button-xs:is(.o-button-icon, .o-button-round) > [data-slot="vk-button-icon"] > svg { width: calc(var(--vk-spacing) * 4); height: calc(var(--vk-spacing) * 4); }
77
+ .o-button-sm:is(.o-button-icon, .o-button-round) > [data-slot="vk-button-icon"] > svg { width: calc(var(--vk-spacing) * 4.5); height: calc(var(--vk-spacing) * 4.5); }
78
+ .o-button-lg:is(.o-button-icon, .o-button-round) > [data-slot="vk-button-icon"] > svg { width: calc(var(--vk-spacing) * 6); height: calc(var(--vk-spacing) * 6); }
79
+
80
+ /* ── Under the pointer, only on a screen that has one: iOS keeps :hover on what was last tapped,
81
+ so on a phone a hover fill would stay after the tap. Every kind's and every look's hover is here, in the
82
+ order the kinds and the looks below give them; where each rule stands below, only the sheets' forced state
83
+ ([data-force="hover"]) stays, drawn on any screen. A press (:active) stays below too, a fill only while
84
+ pressed, and after this block, so a press under the pointer still wins over the hover ────────────── */
85
+ @media (hover: hover) {
86
+ .o-button-primary:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-brand-hovered); }
87
+ .o-button-danger:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly], :where([data-button-own][data-button-hover="none"], [data-button-own][data-button-hover="words"])) { --button-ground: var(--vk-danger-bold-hovered); }
88
+ .o-button-information:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-info-bold-hovered); }
89
+ .o-button-success:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-success-bold-hovered); }
90
+ .o-button-warning:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-warning-bold-hovered); }
91
+ .o-button-outline:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-hovered); --button-edge: var(--vk-border-input-hovered); --button-edge-foot: var(--vk-border-input-hovered); }
92
+ .o-button-soft:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-neutral-hovered); }
93
+ .o-button-quiet:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly], :where([data-button-own][data-button-hover="none"], [data-button-own][data-button-hover="words"])) { --button-ground: var(--vk-hovered); color: var(--vk-fg); }
94
+ .o-button-link:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { text-decoration: underline; }
95
+ .o-button-text:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { text-decoration-color: currentColor; }
96
+ [data-button-depth="edged"] .o-button-outline:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-depth: var(--vk-shadow-key-subtle-raised); --button-edge-foot: var(--vk-border-bold); }
97
+ [data-button-depth="edged"] .o-button-quiet:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-depth: var(--vk-shadow-key-shallow); }
98
+ [data-button-hover="brighter"] .o-button:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-light: linear-gradient(var(--vk-brighten), var(--vk-brighten)); }
99
+ [data-button-hover="brighter"] .o-button-primary:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-brand); }
100
+ [data-button-hover="brighter"] .o-button-danger:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-danger-bold); }
101
+ [data-button-hover="brighter"] .o-button-information:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-info-bold); }
102
+ [data-button-hover="brighter"] .o-button-success:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-success-bold); }
103
+ [data-button-hover="brighter"] .o-button-warning:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-warning-bold); }
104
+ [data-button-hover="brighter"] .o-button-outline:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-ground); }
105
+ [data-button-hover="brighter"] .o-button-soft:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-neutral); }
106
+ [data-button-hover="brighter"] .o-button-quiet:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-light: none; }
107
+ [data-button-hover="rises"] .o-button:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { translate: 0 calc(var(--vk-hover-lift) * -1); --button-depth: var(--vk-shadow-lift-raised); }
108
+ [data-button-hover="rises"] .o-button-primary:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-brand); --button-edge: var(--vk-brand-hovered); --button-edge-foot: var(--vk-brand-hovered); --button-depth: var(--vk-shadow-rim-bold-raised), var(--vk-shadow-lift-raised); }
109
+ [data-button-hover="rises"] .o-button-danger:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-danger-bold); --button-edge: var(--vk-danger-bold-hovered); --button-edge-foot: var(--vk-danger-bold-hovered); --button-depth: var(--vk-shadow-rim-bold-raised), var(--vk-shadow-lift-raised); }
110
+ [data-button-hover="rises"] .o-button-information:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-info-bold); --button-edge: var(--vk-info-bold-hovered); --button-edge-foot: var(--vk-info-bold-hovered); --button-depth: var(--vk-shadow-rim-bold-raised), var(--vk-shadow-lift-raised); }
111
+ [data-button-hover="rises"] .o-button-success:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-success-bold); --button-edge: var(--vk-success-bold-hovered); --button-edge-foot: var(--vk-success-bold-hovered); --button-depth: var(--vk-shadow-rim-bold-raised), var(--vk-shadow-lift-raised); }
112
+ [data-button-hover="rises"] .o-button-warning:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-warning-bold); --button-edge: var(--vk-warning-bold-hovered); --button-edge-foot: var(--vk-warning-bold-hovered); --button-depth: var(--vk-shadow-rim-bold-raised), var(--vk-shadow-lift-raised); }
113
+ [data-button-hover="rises"] .o-button-outline:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-raised-hovered); --button-depth: var(--vk-shadow-rim-raised), var(--vk-shadow-lift-raised); }
114
+ [data-button-hover="rises"] .o-button-soft:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-raised-hovered); --button-edge: var(--vk-border); --button-edge-foot: var(--vk-border); --button-depth: var(--vk-shadow-rim-raised), var(--vk-shadow-lift-raised); }
115
+ [data-button-hover="rises"] .o-button-quiet:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-raised); --button-edge: var(--vk-border-subtle); --button-edge-foot: var(--vk-border-subtle); --button-depth: var(--vk-shadow-rim), var(--vk-shadow-lift); }
116
+ [data-button-hover] :is(.o-button-link, .o-button-text):hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-light: none; translate: none; --button-depth: none; }
117
+ [data-button-soft="tint"] .o-button-soft:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-brand-subtler-hovered); }
118
+ [data-button-soft="tint"] .o-button-soft:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) > [data-slot="vk-button-icon"] { color: var(--vk-fg-accent); }
119
+ }
120
+
121
+ /* ── The kinds, as the approved card draws them ─────────────────────────────────────────────────────── */
122
+ /* Primary: the one main action, in the brand. */
123
+ .o-button-primary { --button-ground: var(--vk-brand); color: var(--vk-fg-on-brand); }
124
+ .o-button-primary[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]),
125
+ .o-button-primary:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-brand-hovered); }
126
+ /* Danger: primary's form in the danger colours. */
127
+ .o-button-danger { --button-ground: var(--vk-danger-bold); color: var(--vk-fg-inverse); }
128
+ .o-button-danger[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]),
129
+ .o-button-danger:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-danger-bold-hovered); }
130
+ /* Information, Success and Warning: primary's form in the Notice's meanings' colours, for an action that says which it is. Warning
131
+ takes the same white words as the rest. */
132
+ .o-button-information { --button-ground: var(--vk-info-bold); color: var(--vk-fg-on-brand); }
133
+ .o-button-information[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]),
134
+ .o-button-information:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-info-bold-hovered); }
135
+ .o-button-success { --button-ground: var(--vk-success-bold); color: var(--vk-fg-inverse); }
136
+ .o-button-success[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]),
137
+ .o-button-success:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-success-bold-hovered); }
138
+ .o-button-warning { --button-ground: var(--vk-warning-bold); color: var(--vk-fg-inverse); }
139
+ .o-button-warning[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]),
140
+ .o-button-warning:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-warning-bold-hovered); }
141
+ /* Outline: every other action, the surface with an edge. */
142
+ .o-button-outline { --button-ground: var(--vk-ground); --button-edge: var(--vk-border-input); --button-edge-foot: var(--vk-border-input); }
143
+ .o-button-outline[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-hovered); --button-edge: var(--vk-border-input-hovered); --button-edge-foot: var(--vk-border-input-hovered); }
144
+ .o-button-outline:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-pressed); --button-edge: var(--vk-border-input-hovered); --button-edge-foot: var(--vk-border-input-hovered); }
145
+ /* Soft: beside a field or in a toolbar. */
146
+ .o-button-soft { --button-ground: var(--vk-neutral); }
147
+ .o-button-soft[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]),
148
+ .o-button-soft:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-neutral-hovered); }
149
+ /* Quiet: the way out, only its words until the pointer finds it, on the step of the ground it stands on: the
150
+ page's, or a popup's own. */
151
+ .o-button-quiet { color: var(--vk-fg-subtle); }
152
+ .o-button-quiet[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-hovered); color: var(--vk-fg); }
153
+ .o-button-quiet:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-pressed); color: var(--vk-fg); }
154
+ /* On a popup's ground, the overlay's hover: as specific as the page's, so a look's own hover (rises) and a
155
+ component's own over a Button (the Menu's dots) still win. Its press follows the looks' press, below. */
156
+ :where(.o-popover, .o-sheet, .o-modal, .o-drawer, .o-alert-dialog, .o-pane) .o-button-quiet[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-overlay-hovered); }
157
+ @media (hover: hover) { :where(.o-popover, .o-sheet, .o-modal, .o-drawer, .o-alert-dialog, .o-pane) .o-button-quiet:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly], :where([data-button-own][data-button-hover="none"], [data-button-own][data-button-hover="words"])) { --button-ground: var(--vk-overlay-hovered); } }
158
+ /* Link: words in the brand's text colour, no fill and no edge; underlined under the pointer. */
159
+ .o-button-link { color: var(--vk-fg-accent); text-underline-offset: calc(var(--vk-spacing) * 3 / 4); }
160
+ .o-button-link[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { text-decoration: underline; }
161
+ /* Text: an action in what it acts on (a Notice's Retry, a Toast's Undo, a list's Clear all): words in the text
162
+ colour, no fill and no edge, the underline easing in under the pointer. While it works without a spinner
163
+ ("Retrying…"), its words stay, quieter. */
164
+ .o-button-text {
165
+ color: var(--vk-fg); text-decoration: underline transparent; text-underline-offset: calc(var(--vk-spacing) * 3 / 4);
166
+ transition-property: background-color, border-color, color, box-shadow, translate, scale, text-decoration-color;
167
+ }
168
+ .o-button-text[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { text-decoration-color: currentColor; }
169
+ .o-button-text[aria-busy="true"]:not(:has(> [data-slot="vk-button-spinner"])) { color: var(--vk-fg-subtle); }
170
+ .o-button.o-button-text[aria-busy="true"]:not(:has(> [data-slot="vk-button-spinner"])) > * { visibility: visible; }
171
+ /* Pressed, it settles. */
172
+ .o-button:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { scale: var(--vk-press-scale); }
173
+
174
+ /* ── Corners: a step of the radius ────────────────────────────────────────────────────────────────── */
175
+ /* For now, a Button whose own look names its radius (or its words, below) keeps them: the frame's Corners, Pill's padding
176
+ and Label weight skip it; Pill's padding skips its pad and the measured sizes with words too, and Pill's padding at an
177
+ end icon skips its end room. */
178
+ [data-button-radius="xs"] .o-button:not(.o-button-round, :where([data-button-own][data-button-radius])) { --button-r: var(--vk-radius-xs); }
179
+ [data-button-radius="sm"] .o-button:not(.o-button-round, :where([data-button-own][data-button-radius])) { --button-r: var(--vk-radius-sm); }
180
+ [data-button-radius="md"] .o-button:not(.o-button-round, :where([data-button-own][data-button-radius])) { --button-r: var(--vk-radius-md); }
181
+ [data-button-radius="lg"] .o-button:not(.o-button-round, :where([data-button-own][data-button-radius])) { --button-r: var(--vk-radius-lg); }
182
+ [data-button-radius="xl"] .o-button:not(.o-button-round, :where([data-button-own][data-button-radius])) { --button-r: var(--vk-radius-xl); }
183
+ [data-button-radius="2xl"] .o-button:not(.o-button-round, :where([data-button-own][data-button-radius])) { --button-r: var(--vk-radius-2xl); }
184
+ /* Full: a pill, an icon button a circle. Its round ends leave room, so it takes a step more padding, and
185
+ a step less on the side an icon sits. */
186
+ [data-button-radius="full"] .o-button:not(.o-button-round, :where([data-button-own][data-button-radius])) { --button-r: var(--vk-radius-full); }
187
+ [data-button-radius="full"] .o-button:not(.o-button-icon, .o-button-round, :where([data-button-own][data-button-radius], [data-button-own][data-button-pad], .o-button-20, .o-button-22, .o-button-26, .o-button-line)) { padding: 0 calc(var(--vk-spacing) * 4.5); }
188
+ [data-button-radius="full"] .o-button-2xs:not(.o-button-icon, .o-button-round, :where([data-button-own][data-button-radius], [data-button-own][data-button-pad], .o-button-20, .o-button-22, .o-button-26, .o-button-line)) { padding: 0 calc(var(--vk-spacing) * 2.5); }
189
+ [data-button-radius="full"] .o-button-xs:not(.o-button-icon, .o-button-round, :where([data-button-own][data-button-radius], [data-button-own][data-button-pad], .o-button-20, .o-button-22, .o-button-26, .o-button-line)) { padding: 0 calc(var(--vk-spacing) * 3); }
190
+ [data-button-radius="full"] .o-button-sm:not(.o-button-icon, .o-button-round, :where([data-button-own][data-button-radius], [data-button-own][data-button-pad], .o-button-20, .o-button-22, .o-button-26, .o-button-line)) { padding: 0 calc(var(--vk-spacing) * 3.5); }
191
+ [data-button-radius="full"] .o-button-lg:not(.o-button-icon, .o-button-round, :where([data-button-own][data-button-radius], [data-button-own][data-button-pad], .o-button-20, .o-button-22, .o-button-26, .o-button-line)) { padding: 0 calc(var(--vk-spacing) * 5.5); }
192
+ [data-button-radius="full"] .o-button:not(.o-button-icon, .o-button-round, :where([data-button-own][data-button-radius], [data-button-own][data-button-pad], .o-button-20, .o-button-22, .o-button-26, .o-button-line)):has(> [data-slot="vk-button-icon"]:first-child) { padding-left: calc(var(--vk-spacing) * 3.5); }
193
+ [data-button-radius="full"] .o-button:not(.o-button-icon, .o-button-round, :where([data-button-own][data-button-radius], [data-button-own][data-button-pad], .o-button-20, .o-button-22, .o-button-26, .o-button-line, [data-button-own][data-button-end-room])):has(> [data-slot="vk-button-label"] + [data-slot="vk-button-icon"]) { padding-right: calc(var(--vk-spacing) * 3.5); }
194
+ [data-button-radius="full"] .o-button-2xs:not(.o-button-icon, .o-button-round, :where([data-button-own][data-button-radius], [data-button-own][data-button-pad], .o-button-20, .o-button-22, .o-button-26, .o-button-line)):has(> [data-slot="vk-button-icon"]:first-child) { padding-left: calc(var(--vk-spacing) * 1.5); }
195
+ [data-button-radius="full"] .o-button-2xs:not(.o-button-icon, .o-button-round, :where([data-button-own][data-button-radius], [data-button-own][data-button-pad], .o-button-20, .o-button-22, .o-button-26, .o-button-line, [data-button-own][data-button-end-room])):has(> [data-slot="vk-button-label"] + [data-slot="vk-button-icon"]) { padding-right: calc(var(--vk-spacing) * 1.5); }
196
+ [data-button-radius="full"] .o-button-xs:not(.o-button-icon, .o-button-round, :where([data-button-own][data-button-radius], [data-button-own][data-button-pad], .o-button-20, .o-button-22, .o-button-26, .o-button-line)):has(> [data-slot="vk-button-icon"]:first-child) { padding-left: calc(var(--vk-spacing) * 2); }
197
+ [data-button-radius="full"] .o-button-xs:not(.o-button-icon, .o-button-round, :where([data-button-own][data-button-radius], [data-button-own][data-button-pad], .o-button-20, .o-button-22, .o-button-26, .o-button-line, [data-button-own][data-button-end-room])):has(> [data-slot="vk-button-label"] + [data-slot="vk-button-icon"]) { padding-right: calc(var(--vk-spacing) * 2); }
198
+ [data-button-radius="full"] .o-button-sm:not(.o-button-icon, .o-button-round, :where([data-button-own][data-button-radius], [data-button-own][data-button-pad], .o-button-20, .o-button-22, .o-button-26, .o-button-line)):has(> [data-slot="vk-button-icon"]:first-child) { padding-left: calc(var(--vk-spacing) * 2.5); }
199
+ [data-button-radius="full"] .o-button-sm:not(.o-button-icon, .o-button-round, :where([data-button-own][data-button-radius], [data-button-own][data-button-pad], .o-button-20, .o-button-22, .o-button-26, .o-button-line, [data-button-own][data-button-end-room])):has(> [data-slot="vk-button-label"] + [data-slot="vk-button-icon"]) { padding-right: calc(var(--vk-spacing) * 2.5); }
200
+ [data-button-radius="full"] .o-button-lg:not(.o-button-icon, .o-button-round, :where([data-button-own][data-button-radius], [data-button-own][data-button-pad], .o-button-20, .o-button-22, .o-button-26, .o-button-line)):has(> [data-slot="vk-button-icon"]:first-child) { padding-left: calc(var(--vk-spacing) * 4.5); }
201
+ [data-button-radius="full"] .o-button-lg:not(.o-button-icon, .o-button-round, :where([data-button-own][data-button-radius], [data-button-own][data-button-pad], .o-button-20, .o-button-22, .o-button-26, .o-button-line, [data-button-own][data-button-end-room])):has(> [data-slot="vk-button-label"] + [data-slot="vk-button-icon"]) { padding-right: calc(var(--vk-spacing) * 4.5); }
202
+
203
+ /* ── Label weight ─────────────────────────────────────────────────────────────────────────────────── */
204
+ [data-button-weight="semibold"] .o-button:not(:where([data-button-own][data-button-words])) { font-weight: var(--vk-font-weight-semibold); }
205
+
206
+ /* ── Depth: edged, a key; lifted, floating on the page ────────────────────────────────────────────── */
207
+ [data-button-depth="edged"] .o-button-primary, [data-button-depth="edged"] .o-button-danger, [data-button-depth="edged"] .o-button-information, [data-button-depth="edged"] .o-button-success, [data-button-depth="edged"] .o-button-warning { --button-depth: var(--vk-shadow-key); }
208
+ [data-button-depth="edged"] .o-button-outline { --button-depth: var(--vk-shadow-key-subtle); --button-edge-foot: var(--vk-border-input-hovered); }
209
+ [data-button-depth="edged"] .o-button-outline[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-depth: var(--vk-shadow-key-subtle-raised); --button-edge-foot: var(--vk-border-bold); }
210
+ [data-button-depth="edged"] .o-button-soft { --button-depth: var(--vk-shadow-key-soft); }
211
+ [data-button-depth="edged"] .o-button-quiet[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-depth: var(--vk-shadow-key-shallow); }
212
+
213
+ [data-button-depth="lifted"] .o-button-primary { --button-depth: var(--vk-shadow-rim-bold), var(--vk-shadow-lift); --button-edge: var(--vk-brand-hovered); --button-edge-foot: var(--vk-brand-hovered); }
214
+ [data-button-depth="lifted"] .o-button-danger { --button-depth: var(--vk-shadow-rim-bold), var(--vk-shadow-lift); --button-edge: var(--vk-danger-bold-hovered); --button-edge-foot: var(--vk-danger-bold-hovered); }
215
+ [data-button-depth="lifted"] .o-button-information { --button-depth: var(--vk-shadow-rim-bold), var(--vk-shadow-lift); --button-edge: var(--vk-info-bold-hovered); --button-edge-foot: var(--vk-info-bold-hovered); }
216
+ [data-button-depth="lifted"] .o-button-success { --button-depth: var(--vk-shadow-rim-bold), var(--vk-shadow-lift); --button-edge: var(--vk-success-bold-hovered); --button-edge-foot: var(--vk-success-bold-hovered); }
217
+ [data-button-depth="lifted"] .o-button-warning { --button-depth: var(--vk-shadow-rim-bold), var(--vk-shadow-lift); --button-edge: var(--vk-warning-bold-hovered); --button-edge-foot: var(--vk-warning-bold-hovered); }
218
+ [data-button-depth="lifted"] .o-button-outline { --button-depth: var(--vk-shadow-rim), var(--vk-shadow-lift); }
219
+
220
+ /* ── Under the pointer: brighter, a thin light over the fill; rises, a pixel up on a deeper shadow ── */
221
+ [data-button-hover="brighter"] .o-button[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-light: linear-gradient(var(--vk-brighten), var(--vk-brighten)); }
222
+ [data-button-hover="brighter"] .o-button-primary[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-brand); }
223
+ [data-button-hover="brighter"] .o-button-danger[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-danger-bold); }
224
+ [data-button-hover="brighter"] .o-button-information[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-info-bold); }
225
+ [data-button-hover="brighter"] .o-button-success[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-success-bold); }
226
+ [data-button-hover="brighter"] .o-button-warning[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-warning-bold); }
227
+ [data-button-hover="brighter"] .o-button-outline[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-ground); }
228
+ [data-button-hover="brighter"] .o-button-soft[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-neutral); }
229
+ [data-button-hover="brighter"] .o-button-quiet[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-light: none; }
230
+
231
+ [data-button-hover="rises"] .o-button { transition-duration: var(--vk-duration-base); }
232
+ [data-button-hover="rises"] .o-button[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { translate: 0 calc(var(--vk-hover-lift) * -1); --button-depth: var(--vk-shadow-lift-raised); }
233
+ [data-button-hover="rises"] .o-button-primary[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-brand); --button-edge: var(--vk-brand-hovered); --button-edge-foot: var(--vk-brand-hovered); --button-depth: var(--vk-shadow-rim-bold-raised), var(--vk-shadow-lift-raised); }
234
+ [data-button-hover="rises"] .o-button-danger[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-danger-bold); --button-edge: var(--vk-danger-bold-hovered); --button-edge-foot: var(--vk-danger-bold-hovered); --button-depth: var(--vk-shadow-rim-bold-raised), var(--vk-shadow-lift-raised); }
235
+ [data-button-hover="rises"] .o-button-information[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-info-bold); --button-edge: var(--vk-info-bold-hovered); --button-edge-foot: var(--vk-info-bold-hovered); --button-depth: var(--vk-shadow-rim-bold-raised), var(--vk-shadow-lift-raised); }
236
+ [data-button-hover="rises"] .o-button-success[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-success-bold); --button-edge: var(--vk-success-bold-hovered); --button-edge-foot: var(--vk-success-bold-hovered); --button-depth: var(--vk-shadow-rim-bold-raised), var(--vk-shadow-lift-raised); }
237
+ [data-button-hover="rises"] .o-button-warning[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-warning-bold); --button-edge: var(--vk-warning-bold-hovered); --button-edge-foot: var(--vk-warning-bold-hovered); --button-depth: var(--vk-shadow-rim-bold-raised), var(--vk-shadow-lift-raised); }
238
+ [data-button-hover="rises"] .o-button-outline[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-raised-hovered); --button-depth: var(--vk-shadow-rim-raised), var(--vk-shadow-lift-raised); }
239
+ [data-button-hover="rises"] .o-button-soft[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-raised-hovered); --button-edge: var(--vk-border); --button-edge-foot: var(--vk-border); --button-depth: var(--vk-shadow-rim-raised), var(--vk-shadow-lift-raised); }
240
+ [data-button-hover="rises"] .o-button-quiet[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-raised); --button-edge: var(--vk-border-subtle); --button-edge-foot: var(--vk-border-subtle); --button-depth: var(--vk-shadow-rim), var(--vk-shadow-lift); }
241
+
242
+ /* A link, and text, stay words in every look: no light laid over them, no rise. */
243
+ [data-button-hover] :is(.o-button-link, .o-button-text)[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-light: none; translate: none; --button-depth: none; }
244
+
245
+ /* A press under the pointer: the kind's pressed fill comes back over what a look's hover set. */
246
+ [data-button-hover] .o-button:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-light: none; }
247
+ [data-button-hover] .o-button-primary:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-brand-hovered); }
248
+ [data-button-hover] .o-button-danger:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-danger-bold-hovered); }
249
+ [data-button-hover] .o-button-information:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-info-bold-hovered); }
250
+ [data-button-hover] .o-button-success:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-success-bold-hovered); }
251
+ [data-button-hover] .o-button-warning:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-warning-bold-hovered); }
252
+ [data-button-hover] .o-button-outline:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-pressed); --button-edge: var(--vk-border-input-hovered); --button-edge-foot: var(--vk-border-input-hovered); }
253
+ [data-button-hover] .o-button-soft:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-neutral-hovered); }
254
+ [data-button-hover] .o-button-quiet:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-pressed); color: var(--vk-fg); }
255
+ /* On a popup's ground, the overlay's press, in every look. */
256
+ :is(.o-popover, .o-sheet, .o-modal, .o-drawer, .o-alert-dialog, .o-pane) .o-button-quiet:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-overlay-pressed); }
257
+
258
+ /* ── Press: sinks into the page, springs back from a squash, or lands flat ────────────────────────── */
259
+ [data-button-press="sinks"] .o-button:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) {
260
+ scale: none; translate: 0 var(--vk-press-travel); --button-depth: var(--vk-shadow-key-pressed);
261
+ --button-light: linear-gradient(var(--vk-darken), var(--vk-darken)); transition-duration: var(--vk-duration-instant);
262
+ }
263
+ [data-button-press="sinks"] .o-button-lg:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { translate: 0 var(--vk-press-travel-lg); }
264
+ [data-button-press="sinks"] .o-button-primary:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-brand); --button-depth: var(--vk-shadow-key-pressed-bold); }
265
+ [data-button-press="sinks"] .o-button-danger:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-danger-bold); --button-depth: var(--vk-shadow-key-pressed-bold); }
266
+ [data-button-press="sinks"] .o-button-information:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-info-bold); --button-depth: var(--vk-shadow-key-pressed-bold); }
267
+ [data-button-press="sinks"] .o-button-success:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-success-bold); --button-depth: var(--vk-shadow-key-pressed-bold); }
268
+ [data-button-press="sinks"] .o-button-warning:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-warning-bold); --button-depth: var(--vk-shadow-key-pressed-bold); }
269
+ [data-button-press="sinks"] .o-button-soft:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-neutral); }
270
+ [data-button-press="sinks"] .o-button-outline:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]),
271
+ [data-button-press="sinks"] .o-button-quiet:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-light: none; }
272
+
273
+ [data-button-press="springs"] .o-button {
274
+ transition-duration: var(--vk-duration-fast), var(--vk-duration-fast), var(--vk-duration-fast), var(--vk-duration-fast), var(--vk-duration-fast), var(--vk-duration-slow);
275
+ transition-timing-function: var(--vk-ease-out), var(--vk-ease-out), var(--vk-ease-out), var(--vk-ease-out), var(--vk-ease-out), var(--vk-ease-spring);
276
+ }
277
+ /* Every Button squashes the same, its icon alone and a round one too: one press, whatever it shows. */
278
+ [data-button-press="springs"] .o-button:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { scale: var(--vk-press-squash); transition-duration: var(--vk-duration-instant); }
279
+ [data-button-press="springs"] .o-button-primary:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-brand-pressed); }
280
+ [data-button-press="springs"] .o-button-danger:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-danger-bold-pressed); }
281
+ [data-button-press="springs"] .o-button-information:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-info-bold-pressed); }
282
+ [data-button-press="springs"] .o-button-success:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-success-bold-pressed); }
283
+ [data-button-press="springs"] .o-button-warning:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-warning-bold-pressed); }
284
+
285
+ [data-button-press] :is(.o-button-link, .o-button-text):is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-light: none; --button-depth: none; }
286
+
287
+ [data-button-press="lands"] .o-button:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { scale: none; translate: none; --button-depth: none; transition-duration: var(--vk-duration-instant); }
288
+ [data-button-press="lands"] .o-button-primary:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-edge: var(--vk-brand-hovered); --button-edge-foot: var(--vk-brand-hovered); }
289
+ [data-button-press="lands"] .o-button-danger:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-edge: var(--vk-danger-bold-hovered); --button-edge-foot: var(--vk-danger-bold-hovered); }
290
+ [data-button-press="lands"] .o-button-information:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-edge: var(--vk-info-bold-hovered); --button-edge-foot: var(--vk-info-bold-hovered); }
291
+ [data-button-press="lands"] .o-button-success:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-edge: var(--vk-success-bold-hovered); --button-edge-foot: var(--vk-success-bold-hovered); }
292
+ [data-button-press="lands"] .o-button-warning:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-edge: var(--vk-warning-bold-hovered); --button-edge-foot: var(--vk-warning-bold-hovered); }
293
+
294
+ /* ── The soft kind in the brand's tint, its icon taking the brand under the pointer ───────────────── */
295
+ [data-button-soft="tint"] .o-button-soft { --button-ground: var(--vk-brand-subtler); }
296
+ [data-button-soft="tint"] .o-button-soft > [data-slot="vk-button-icon"] { color: var(--vk-fg-subtle); }
297
+ [data-button-soft="tint"] .o-button-soft[data-force="hover"]:not(:disabled, [data-disabled], [aria-busy="true"]) { --button-ground: var(--vk-brand-subtler-hovered); }
298
+ [data-button-soft="tint"] .o-button-soft:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-brand-subtler-pressed); }
299
+ [data-button-soft="tint"] .o-button-soft:is([data-force="hover"], :active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) > [data-slot="vk-button-icon"] { color: var(--vk-fg-accent); }
300
+
301
+ /* ── Focus, disabled, working: the same in every look ─────────────────────────────────────────────── */
302
+ .o-button:is(:focus-visible, [data-force="focus"]) { outline: var(--vk-focus-width) solid var(--vk-border-brand); outline-offset: var(--vk-focus-offset); }
303
+ /* Disabled: on the page, grey, no depth; a quiet button keeps no fill. */
304
+ .o-button:is(:disabled, [data-disabled]) {
305
+ --button-ground: var(--vk-neutral); --button-light: none; --button-edge: transparent; --button-edge-foot: transparent; --button-depth: none;
306
+ color: var(--vk-fg-disabled); cursor: not-allowed;
307
+ }
308
+ .o-button:is(.o-button-quiet, .o-button-link, .o-button-text):is(:disabled, [data-disabled]) { --button-ground: transparent; }
309
+ /* Text's ring hugs its words, as it sits inside what it acts on. */
310
+ .o-button.o-button-text:is(:focus-visible, [data-force="focus"]) { outline-offset: 0; }
311
+ .o-button:is(:disabled, [data-disabled]) > [data-slot="vk-button-icon"] { color: inherit; }
312
+ /* Working: it keeps its place and its width; the label waits under the spinner. */
313
+ .o-button[aria-busy="true"] { cursor: progress; }
314
+ .o-button[aria-busy="true"] > :not([data-slot="vk-button-spinner"], .o-button-cut) { visibility: hidden; }
315
+ .o-button > [data-slot="vk-button-spinner"] { position: absolute; inset: 0; display: grid; place-items: center; }
316
+
317
+ /* ── A group: buttons joined in a row or a column, the corners between them square and the edge between
318
+ them shared; whatever the corners and the looks, only the group's outer corners are rounded. Focus lifts
319
+ a button above its neighbours, so its ring shows whole; groups inside a group stand 8px apart ──────── */
320
+ .o-button-group { display: inline-flex; align-items: stretch; width: fit-content; isolation: isolate; }
321
+ .o-button-group[data-orientation="vertical"] { flex-direction: column; }
322
+ .o-button-group:has(> .o-button-group) { gap: calc(var(--vk-spacing) * 2); }
323
+ .o-button-group > :is(:focus-visible, [data-force="focus"]), .o-button.o-toolbar-button[data-joined]:is(:focus-visible, [data-force="focus"]) { position: relative; z-index: 1; }
324
+ .o-button-group[data-orientation="horizontal"] > :not(:last-child):not(.o-button-group) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
325
+ .o-button-group[data-orientation="horizontal"] > :not(:first-child):not(.o-button-group) { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-width: 0; }
326
+ .o-button-group[data-orientation="vertical"] > :not(:last-child):not(.o-button-group) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
327
+ .o-button-group[data-orientation="vertical"] > :not(:first-child):not(.o-button-group) { border-top-left-radius: 0; border-top-right-radius: 0; border-top-width: 0; }
328
+ /* Words in a group: on the neutral ground, inside the group's edge. */
329
+ .o-button-group-text {
330
+ display: inline-flex; align-items: center; gap: calc(var(--vk-spacing) * 2); box-sizing: border-box; padding: 0 calc(var(--vk-spacing) * 2.5);
331
+ border: var(--vk-border-width) solid var(--vk-border-input); border-radius: var(--vk-radius-lg);
332
+ background-color: var(--vk-neutral); color: var(--vk-fg-subtle); font-size: var(--vk-font-size-sm); font-weight: var(--vk-font-weight-medium); font-variant-numeric: tabular-nums; white-space: nowrap;
333
+ }
334
+ .o-button-group-text svg { flex: none; width: calc(var(--vk-spacing) * 4); height: calc(var(--vk-spacing) * 4); }
335
+ /* The line between two buttons with no edge of their own. */
336
+ .o-button-group-sep { flex: none; align-self: stretch; width: var(--vk-border-width); background-color: var(--vk-border-input); }
337
+ .o-button-group[data-orientation="vertical"] > .o-button-group-sep { width: auto; height: var(--vk-border-width); }
338
+
339
+ /* ── Measured sizes, and a Button's own look ─────────────────────────────────────────────────
340
+ The sizes the looks drew, named by their measures (Attio's captures and the look's sketches): 20 and 22 square as icons, 26 high,
341
+ 20 × 24, 32 × 44 and 40 × 44 boxes, and line, its words' own line with no room round them. A Button's own look (own-look.ts) is
342
+ set on the Button itself, beside data-button-own: each option it names, it keeps; what it doesn't name, the frame sets. */
343
+ .o-button-20 { height: calc(var(--vk-spacing) * 5); padding: 0 calc(var(--vk-spacing) * 2); gap: var(--vk-spacing); font-size: var(--vk-font-size-xs); }
344
+ .o-button-22 { height: calc(var(--vk-spacing) * 5.5); padding: 0 calc(var(--vk-spacing) * 2); gap: var(--vk-spacing); font-size: var(--vk-font-size-xs); }
345
+ .o-button-26 { height: calc(var(--vk-spacing) * 6.5); padding: 0 calc(var(--vk-spacing) * 1.5); gap: var(--vk-spacing); font-size: var(--vk-font-size-xs); }
346
+ .o-button-26:has(> [data-slot="vk-button-icon"]:first-child) { padding-left: var(--vk-spacing); }
347
+ .o-button.o-button-20x24 { width: calc(var(--vk-spacing) * 5); height: calc(var(--vk-spacing) * 6); aspect-ratio: auto; min-width: 0; padding: 0; }
348
+ .o-button.o-button-32x44 { width: calc(var(--vk-spacing) * 8); height: calc(var(--vk-spacing) * 11); aspect-ratio: auto; min-width: 0; padding: 0; font-size: var(--vk-font-size-base); }
349
+ /* 44: the md Button 44 high, square when icon-only or round; not a look's measure, so Pill pads it as md. */
350
+ .o-button-44 { height: calc(var(--vk-spacing) * 11); }
351
+ .o-button.o-button-40x44 { width: calc(var(--vk-spacing) * 10); height: calc(var(--vk-spacing) * 11); aspect-ratio: auto; min-width: 0; padding: 0; font-size: var(--vk-font-size-base); }
352
+ .o-button.o-button-line { height: auto; padding: 0; gap: calc(var(--vk-spacing) / 2); font-size: var(--vk-font-size-xs); line-height: inherit; }
353
+ .o-button.o-button-line.o-button-icon { width: auto; aspect-ratio: auto; }
354
+ .o-button:is(.o-button-20, .o-button-22, .o-button-26, .o-button-line) > [data-slot="vk-button-icon"] > svg { width: calc(var(--vk-spacing) * 3); height: calc(var(--vk-spacing) * 3); }
355
+ .o-button:is(.o-button-20, .o-button-22, .o-button-26, .o-button-line):is(.o-button-icon, .o-button-round) > [data-slot="vk-button-icon"] > svg,
356
+ .o-button.o-button-20x24 > [data-slot="vk-button-icon"] > svg { width: calc(var(--vk-spacing) * 3.5); height: calc(var(--vk-spacing) * 3.5); }
357
+ .o-button:is(.o-button-32x44, .o-button-40x44) > [data-slot="vk-button-icon"] > svg { width: calc(var(--vk-spacing) * 6); height: calc(var(--vk-spacing) * 6); }
358
+
359
+ /* Its radius and its corner, its edge, its words. */
360
+ .o-button[data-button-own][data-button-radius="none"] { --button-r: 0px; }
361
+ .o-button[data-button-own][data-button-radius="xs"] { --button-r: var(--vk-radius-xs); }
362
+ .o-button[data-button-own][data-button-radius="sm"] { --button-r: var(--vk-radius-sm); }
363
+ .o-button[data-button-own][data-button-radius="md"] { --button-r: var(--vk-radius-md); }
364
+ .o-button[data-button-own][data-button-corner="round"] { }
365
+ .o-button[data-button-own][data-button-edge="none"] { --button-line: 0px; }
366
+ .o-button[data-button-own][data-button-words], .o-button[data-button-own][data-button-words="inherit"] { font: inherit; }
367
+ .o-button[data-button-own][data-button-words="xs"] { font-size: var(--vk-font-size-xs); }
368
+ .o-button[data-button-own][data-button-words="sm"] { font-size: var(--vk-font-size-sm); }
369
+ .o-button[data-button-own][data-button-words="xs-medium"] { font-size: var(--vk-font-size-xs); font-weight: var(--vk-font-weight-medium); }
370
+ /* Its colour, kept in every state but disabled (a press's and the pointer's colour among them), unless disabled plain. */
371
+ .o-button[data-button-own][data-button-colour="faint"]:is(:not(:disabled, [data-disabled]), [data-button-disabled="plain"]) { color: var(--vk-fg-subtlest); }
372
+ .o-button[data-button-own][data-button-colour="link"]:is(:not(:disabled, [data-disabled]), [data-button-disabled="plain"]) { color: var(--vk-fg-brand); }
373
+ .o-button[data-button-own][data-button-colour="text"]:is(:not(:disabled, [data-disabled]), [data-button-disabled="plain"]) { color: var(--vk-fg); }
374
+ .o-button[data-button-own][data-button-colour="inherit"]:is(:not(:disabled, [data-disabled]), [data-button-disabled="plain"]) { color: inherit; }
375
+ .o-button[data-button-own][data-button-disabled="plain"]:is(:disabled, [data-disabled]) { cursor: default; }
376
+ /* Its icons: their size, and their colour apart from its words. */
377
+ .o-button[data-button-own][data-button-icon="12"] > [data-slot="vk-button-icon"] > svg { width: calc(var(--vk-spacing) * 3); height: calc(var(--vk-spacing) * 3); }
378
+ .o-button[data-button-own][data-button-icon="14"] > [data-slot="vk-button-icon"] > svg { width: calc(var(--vk-spacing) * 3.5); height: calc(var(--vk-spacing) * 3.5); }
379
+ .o-button[data-button-own][data-button-icon="15"] > [data-slot="vk-button-icon"] > svg { width: calc(var(--vk-spacing) * 3.75); height: calc(var(--vk-spacing) * 3.75); }
380
+ .o-button[data-button-own][data-button-icon="16"] > [data-slot="vk-button-icon"] > svg { width: calc(var(--vk-spacing) * 4); height: calc(var(--vk-spacing) * 4); }
381
+ .o-button[data-button-own][data-button-icon="20"] > [data-slot="vk-button-icon"] > svg { width: calc(var(--vk-spacing) * 5); height: calc(var(--vk-spacing) * 5); }
382
+ .o-button[data-button-own][data-button-icon-colour="faint"] > [data-slot="vk-button-icon"] > svg { color: var(--vk-fg-subtlest); }
383
+ /* Its room left and right, and between its words and its icons. */
384
+ .o-button[data-button-own][data-button-pad="4"] { padding: 0 var(--vk-spacing); }
385
+ .o-button[data-button-own][data-button-pad="6"] { padding: 0 calc(var(--vk-spacing) * 1.5); }
386
+ .o-button[data-button-own][data-button-pad="8"] { padding: 0 calc(var(--vk-spacing) * 2); }
387
+ .o-button[data-button-own][data-button-gap="4"] { gap: var(--vk-spacing); }
388
+ /* Under the pointer: with hover none the kit's own hovers skip it (above); with hover words, its words alone take the text's
389
+ colour. Open, the ground it has under the pointer, on a popup's the overlay's. */
390
+ @media (hover: hover) { .o-button-quiet[data-button-own][data-button-hover="words"]:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { color: var(--vk-fg); } }
391
+ .o-button[data-button-own][data-button-open="hovered"][aria-expanded="true"]:not(:disabled, [data-disabled]) { --button-ground: var(--vk-hovered); color: var(--vk-fg); }
392
+ :where(.o-popover, .o-sheet, .o-modal, .o-drawer, .o-alert-dialog, .o-pane) .o-button[data-button-own][data-button-open="hovered"][aria-expanded="true"]:not(:disabled, [data-disabled]) { --button-ground: var(--vk-overlay-hovered); }
393
+ .o-button[data-button-own][data-button-cursor="grab"]:not(:disabled, [data-disabled]) { cursor: grab; }
394
+ /* Pressed on a card in a popup: the card's pressed step, over the popup's own press. */
395
+ .o-button[data-button-own][data-button-press="card"]:is(:active, [data-force="press"]):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-overlay-card-pressed); }
396
+ /* its words at its start, its label growing so an end icon stands at its end; its words semibold, over its words' own. */
397
+ .o-button[data-button-own][data-button-align="start"] { justify-content: flex-start; text-align: start; }
398
+ .o-button[data-button-own][data-button-align="start"] > [data-slot="vk-button-label"] { flex-grow: 1; }
399
+ .o-button[data-button-own][data-button-weight="semibold"] { font-weight: var(--vk-font-weight-semibold); }
400
+ /* Its last icon (its end icon, or its one icon) turns a quarter clockwise while what it opens is open, or a quarter back while shut. */
401
+ .o-button[data-button-own]:is([data-button-turn="quarter"], [data-button-turn="back"]) > [data-slot="vk-button-icon"]:not(:has(~ [data-slot="vk-button-icon"])) > svg { transition: rotate var(--vk-duration-fast) var(--vk-ease-out); }
402
+ .o-button[data-button-own][data-button-turn="quarter"][aria-expanded="true"] > [data-slot="vk-button-icon"]:not(:has(~ [data-slot="vk-button-icon"])) > svg { rotate: 90deg; }
403
+ .o-button[data-button-own][data-button-turn="back"][aria-expanded="false"] > [data-slot="vk-button-icon"]:not(:has(~ [data-slot="vk-button-icon"])) > svg { rotate: -90deg; }
404
+ /* A dot at its top end corner, saying something is on. */
405
+ .o-button[data-button-own][data-button-dot="brand"]::after {
406
+ content: ""; position: absolute; top: var(--vk-spacing); right: var(--vk-spacing); width: var(--vk-dot-size); height: var(--vk-dot-size);
407
+ border-radius: 50%; background-color: var(--vk-brand); pointer-events: none;
408
+ }
409
+ /* Its words cut with … where its place is narrower than they are. Its line is as tall as its words (line-height 1), and their
410
+ ascent and descent reach past it, so the hidden overflow would shave the tails of g, p and y: the label's clip reaches a step
411
+ past its line above and below, taken back by its margin, so the Button's height and its words' place stay. */
412
+ .o-button[data-button-own][data-button-cut="end"] > [data-slot="vk-button-label"] {
413
+ min-width: 0; overflow: hidden; text-overflow: ellipsis;
414
+ padding-block: var(--vk-spacing); margin-block: calc(var(--vk-spacing) * -1);
415
+ }
416
+ /* Room at its end for something laid over it: it wins over Pill's padding by standing after it, as specific (0,3,0). */
417
+ .o-button[data-button-own][data-button-end-room="30"] { padding-right: calc(var(--vk-spacing) * 7.5); }
418
+ /* Its icons subtle, kept while its words take the text's colour under the pointer. */
419
+ .o-button[data-button-own][data-button-icon-colour="subtle"]:not(:disabled, [data-disabled]) > [data-slot="vk-button-icon"] > svg { color: var(--vk-fg-subtle); }
420
+ /* The values the Date and Text editors' looks need, each as measured from Attio's captures or the look's sketches. The
421
+ radius lg; no sides, or 6 at the start and 4 at the end; gaps of 3 to 10; 18px words; medium, after the words (which set the
422
+ place's font); digits one width each; the icon in the brand's colour. */
423
+ .o-button[data-button-own][data-button-radius="lg"] { --button-r: var(--vk-radius-lg); }
424
+ .o-button[data-button-own][data-button-pad="0"] { padding: 0; }
425
+ .o-button[data-button-own][data-button-pad="6-4"] { padding: 0 var(--vk-spacing) 0 calc(var(--vk-spacing) * 1.5); }
426
+ .o-button[data-button-own][data-button-gap="3"] { gap: calc(var(--vk-spacing) * 3 / 4); }
427
+ .o-button[data-button-own][data-button-gap="6"] { gap: calc(var(--vk-spacing) * 1.5); }
428
+ .o-button[data-button-own][data-button-gap="8"] { gap: calc(var(--vk-spacing) * 2); }
429
+ .o-button[data-button-own][data-button-gap="10"] { gap: calc(var(--vk-spacing) * 2.5); }
430
+ .o-button[data-button-own][data-button-words="lg"] { font-size: var(--vk-font-size-lg); }
431
+ .o-button[data-button-own][data-button-weight="medium"] { font-weight: var(--vk-font-weight-medium); }
432
+ .o-button[data-button-own][data-button-digits="tabular"] { font-variant-numeric: tabular-nums; }
433
+ .o-button[data-button-own][data-button-icon-colour="brand"]:not(:disabled, [data-disabled]) > [data-slot="vk-button-icon"] > svg { color: var(--vk-fg-accent); }
434
+ /* Under the pointer, a ground of its own: the popup's hover, or the neutral ground (pressed too). (0,5,0), over the kit's press and
435
+ its popup hover. */
436
+ @media (hover: hover) {
437
+ .o-button[data-button-own][data-button-hover="overlay"]:hover:not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-overlay-hovered); }
438
+ .o-button[data-button-own][data-button-hover="neutral"]:is(:hover, :active):not(:disabled, [data-disabled], [aria-busy="true"], [data-readonly]) { --button-ground: var(--vk-neutral); }
439
+ }
440
+ /* Open: its words and icons in the brand's colour, over its own colour; or the neutral ground. */
441
+ .o-button[data-button-own][data-button-open="brand"][aria-expanded="true"]:not(:disabled, [data-disabled]) { color: var(--vk-fg-accent); }
442
+ .o-button[data-button-own][data-button-open="brand"][aria-expanded="true"]:not(:disabled, [data-disabled]) > [data-slot="vk-button-icon"] > svg { color: var(--vk-fg-accent); }
443
+ .o-button[data-button-own][data-button-open="neutral"][aria-expanded="true"]:not(:disabled, [data-disabled]) { --button-ground: var(--vk-neutral); }
444
+ /* Standing pressed (aria-pressed="true"): the popup's hover as its ground, its words the text's. */
445
+ .o-button[data-button-own][data-button-pressed="hovered"][aria-pressed="true"]:not(:disabled, [data-disabled]) { --button-ground: var(--vk-overlay-hovered); color: var(--vk-fg); }
446
+
447
+ /* ── Corner smoothing: the Button's own (data-button-smoothing, looks.ts), The app's, with nothing set, following the
448
+ token corner-smoothing (Round is the token at 0), Smooth and Round setting it apart; the Toggle, the Toolbar
449
+ button and the Menubar's triggers are Buttons, so they follow it (the Toolbar button's own Smooth or Round, data-smoothing, wins).
450
+ Drawn with the smooth outline (smooth.css, beside the controls) in every browser that knows shape(); one that doesn't keeps the corners
451
+ above, and so do Round, a Button whose own corner is round, a dashed edge (the Toolbar's empty place, the Avatar's add) and a
452
+ Button joined in a group or a Toolbar button joined to its neighbours (data-joined) (the outline has no corners apart left
453
+ and right: in Chromium its squircle, as before), which paint
454
+ themselves from their variables as before. The Button itself is never clipped: its depth, its press, its focus ring and a phone's
455
+ pressing area (an app's own, its ::after) stand outside it, whole. Its ground and edge are handed to its cut (.o-button-cut, its
456
+ last child, over its border box): the ground (::before) clipped by the outline, with the depth's inset light again inside it,
457
+ the edge (::after) a ring along it, its foot from a corner's height up. The cut is a size container, so its layers read the
458
+ Button's own side (100cqmin) whatever height a place gives it: the corner its radius fitted to that side as a control's is,
459
+ side / (2 + 2 × amount), and a pill's (a radius of Full's size: round, Full, a pill) half the side, a stadium, smoothing none. ──────── */
460
+ .o-button-cut { display: none; }
461
+ .o-button-group > :is(.o-button, .o-button-group-text):not([data-button-smoothing="round"] *, [data-button-radius="full"] *, .o-button-round, [data-button-own][data-button-corner="round"]), .o-button.o-toolbar-button[data-joined]:not([data-button-smoothing="round"] *, [data-button-radius="full"] *, .o-button-round, [data-button-own][data-button-corner="round"], [data-smoothing="round"], [data-corners="full"]) { corner-shape: squircle; }
462
+ @supports (clip-path: shape(evenodd from 0 0, curve by 1px 1px with 1px 0 / 1px 0, close, move to 0 0, hline to 1px, close)) and (width: calc(tan(atan2(1px, 1px)) * 1px)) and (container-type: size) {
463
+ /* Its side: the shorter of its sides as each size gives its height (its width where it is the narrower), which its own
464
+ corner, below, is fitted to, as it can't measure it (its cut does, for its ground). Each rule names the Button its height's rule
465
+ names, in the same order, so the same one wins; a place that gives a Button a height of its own says its side there. */
466
+ :where(.o-button) { --button-side: calc(var(--vk-spacing) * 9); }
467
+ .o-button-2xs { --button-side: calc(var(--vk-spacing) * 6); }
468
+ .o-button-xs { --button-side: calc(var(--vk-spacing) * 7); }
469
+ .o-button-sm { --button-side: calc(var(--vk-spacing) * 8); }
470
+ .o-button-lg { --button-side: calc(var(--vk-spacing) * 11); }
471
+ .o-button-20 { --button-side: calc(var(--vk-spacing) * 5); }
472
+ .o-button-22 { --button-side: calc(var(--vk-spacing) * 5.5); }
473
+ .o-button-26 { --button-side: calc(var(--vk-spacing) * 6.5); }
474
+ .o-button.o-button-20x24 { --button-side: calc(var(--vk-spacing) * 5); }
475
+ .o-button.o-button-32x44 { --button-side: calc(var(--vk-spacing) * 8); }
476
+ .o-button-44 { --button-side: calc(var(--vk-spacing) * 11); }
477
+ .o-button.o-button-40x44 { --button-side: calc(var(--vk-spacing) * 10); }
478
+ .o-button.o-button-line { --button-side: calc(1lh + var(--button-line) * 2); }
479
+ .o-button.o-button-line.o-button-icon { --button-side: calc(var(--vk-spacing) * 3.5 + var(--button-line) * 2); }
480
+ /* Its own corner is its ground's, so the focus ring and the depth it paints itself, a place's ring with them (an
481
+ offset, an inset ring, the browser's own), stand on the fitted corner: the cut's sum, from the side its size declares
482
+ (--button-side, above), as it can't measure its own. Where it takes no smoothing (a pill, or the token at Round) its corner is
483
+ its radius, as on main, which the browser holds to half its real side: so a pill's side is never told too short. */
484
+ :is(.o-button:not([data-button-smoothing="round"] *), .o-button.o-toolbar-button[data-smoothing="smooth"]):not(.o-toolbar-button[data-smoothing="round"], [data-button-own][data-button-corner="round"], .o-button-group > *, .o-toolbar-button[data-joined], .o-toolbar-button[data-empty], .o-avatar-add):has(> .o-button-cut) {
485
+ isolation: isolate; background-color: transparent; background-image: none; border-color: transparent;
486
+ --button-own-amount: calc(var(--vk-corner-smoothing) * (1 - clamp(0, tan(atan2(var(--button-r) - 500px, 1px)), 1)));
487
+ border-radius: min(var(--button-r), var(--button-side) / (2 + 2 * var(--button-own-amount)) + (1 - clamp(0, var(--button-own-amount) * 1000, 1)) * 100000px);
488
+ }
489
+ :is(.o-button:not([data-button-smoothing="round"] *), .o-button.o-toolbar-button[data-smoothing="smooth"]):not(.o-toolbar-button[data-smoothing="round"], [data-button-own][data-button-corner="round"], .o-button-group > *, .o-toolbar-button[data-joined], .o-toolbar-button[data-empty], .o-avatar-add):has(> .o-button-cut):is([data-button-smoothing="smooth"] *, .o-toolbar-button[data-smoothing="smooth"]) {
490
+ --button-own-amount: calc(0.7 * (1 - clamp(0, tan(atan2(var(--button-r) - 500px, 1px)), 1)));
491
+ }
492
+ :is(.o-button:not([data-button-smoothing="round"] *), .o-button.o-toolbar-button[data-smoothing="smooth"]):not(.o-toolbar-button[data-smoothing="round"], [data-button-own][data-button-corner="round"], .o-button-group > *, .o-toolbar-button[data-joined], .o-toolbar-button[data-empty], .o-avatar-add) > .o-button-cut {
493
+ display: block; position: absolute; inset: calc(var(--button-line) * -1); z-index: -1; pointer-events: none; container-type: size;
494
+ transition-property: none; transition-duration: inherit; transition-timing-function: inherit;
495
+ }
496
+ /* What draws, inside the cut, which reads the cut's side (100cqmin). A pill (a radius of Full's size: round, Full, the pill places)
497
+ takes no smoothing, so its corner, fitted to its side, is half of it: a stadium. Each worked out from the radius alone; the outline
498
+ itself stays small as smooth.css registers its radius, side and numbers. The outline's other inputs inherit, so none of a holder's (a
499
+ Sheet's bottom corners, a Menubar's inset, a list's row) reaches it. */
500
+ .o-button > .o-button-cut > .o-smooth {
501
+ --button-pill: clamp(0, tan(atan2(var(--button-r) - 500px, 1px)), 1); --button-side: 100cqmin; --smooth-side: var(--button-side);
502
+ --smooth-amount: calc(var(--vk-corner-smoothing) * (1 - var(--button-pill)));
503
+ --button-fit: min(var(--button-r), var(--button-side) / (2 + 2 * var(--smooth-amount, 0.7)));
504
+ --smooth-t: var(--button-fit); --smooth-b: initial; --smooth-foot: initial; --smooth-in: initial;
505
+ position: absolute; inset: 0; transition-property: none; transition-duration: inherit; transition-timing-function: inherit;
506
+ }
507
+ [data-button-smoothing="smooth"] .o-button > .o-button-cut > .o-smooth.o-smooth, .o-button.o-toolbar-button[data-smoothing="smooth"] > .o-button-cut > .o-smooth.o-smooth { --smooth-amount: calc(0.7 * (1 - var(--button-pill))); }
508
+ .o-button > .o-button-cut > .o-smooth::before, .o-button > .o-button-cut > .o-smooth::after {
509
+ content: ""; position: absolute; inset: 0; box-sizing: border-box;
510
+ transition-property: background-color, box-shadow; transition-duration: inherit; transition-timing-function: inherit;
511
+ }
512
+ /* The ground over the border box, under a clear edge as wide as the Button's, so the depth's inset light stands where it stood. */
513
+ .o-button > .o-button-cut > .o-smooth::before {
514
+ border: var(--button-line) solid transparent; border-radius: var(--button-fit);
515
+ background-color: var(--button-ground); background-image: var(--button-light); box-shadow: var(--button-depth); clip-path: shape(var(--smooth-outline));
516
+ }
517
+ .o-button > .o-button-cut > .o-smooth::after {
518
+ --smooth-t: max(0px, var(--button-fit) - var(--button-line)); --smooth-in: var(--button-line);
519
+ background-image: linear-gradient(var(--button-edge) calc(100% - var(--button-fit)), var(--button-edge-foot) 0); clip-path: shape(var(--smooth-ring));
520
+ }
521
+ }
522
+
523
+ /* Under reduced motion nothing moves; the colours still change. */
524
+ @media (prefers-reduced-motion: reduce) {
525
+ .o-button { transition-property: background-color, border-color, color, box-shadow; }
526
+ .o-button, .o-button:is(:active, [data-force]) { translate: none !important; scale: none !important; }
527
+ .o-button[data-button-own]:is([data-button-turn="quarter"], [data-button-turn="back"]) > [data-slot="vk-button-icon"]:not(:has(~ [data-slot="vk-button-icon"])) > svg { transition: none; }
528
+ }
529
+ }
530
+
@@ -0,0 +1,5 @@
1
+ import type { ComponentType } from "react";
2
+ import type { ViewsButtonProps } from "../provider/components.js";
3
+ export declare const CONTROLS: {
4
+ readonly Button: ComponentType<ViewsButtonProps>;
5
+ };
@@ -0,0 +1,2 @@
1
+ import { MapButton } from "./button/map-button.js";
2
+ export const CONTROLS = { Button: MapButton };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * VIEWKIT'S DEFAULT CONTROLS, on Base UI (`@base-ui/react`, an optional peer): the one part of the package that imports
3
+ * it. An app takes the defaults by spreading `CONTROLS` into its components map, its own controls after it, and draws them
4
+ * with the ready stylesheet (or this part's CSS doors). An app that hands every control never imports this door and never
5
+ * needs Base UI. Each control's options and looks are on `viewkitjs/views/looks`.
6
+ */
7
+ export { CONTROLS } from "./controls.js";
8
+ export { Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonClass, type ButtonKind, type ButtonProps, type ButtonShape, type ButtonSize, } from "./button/button.js";
9
+ export { leadingGlyph } from "./button/map-button.js";
10
+ export { buttonOwnAttrs, buttonOwnOptions, type ButtonOwnLook } from "./button/own-look.js";
11
+ export { LoadingBar, Spinner, type LoadingBarProps, type SpinnerProps } from "./spinner/spinner.js";