@pepperui/css 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +123 -0
- package/dist/pepper-ui.css +5024 -0
- package/package.json +38 -0
- package/src/base.css +96 -0
- package/src/components/alert-dialog.css +50 -0
- package/src/components/alert.css +75 -0
- package/src/components/avatar.css +47 -0
- package/src/components/badge.css +61 -0
- package/src/components/breadcrumb.css +40 -0
- package/src/components/bullet-list.css +58 -0
- package/src/components/button-group.css +51 -0
- package/src/components/button.css +165 -0
- package/src/components/calendar.css +118 -0
- package/src/components/card.css +114 -0
- package/src/components/chat.css +473 -0
- package/src/components/checkbox.css +105 -0
- package/src/components/collapsible.css +121 -0
- package/src/components/combobox.css +71 -0
- package/src/components/command.css +62 -0
- package/src/components/date-picker.css +45 -0
- package/src/components/dialog.css +105 -0
- package/src/components/dropdown-menu.css +93 -0
- package/src/components/empty.css +67 -0
- package/src/components/field.css +68 -0
- package/src/components/footer.css +122 -0
- package/src/components/heading-pair.css +57 -0
- package/src/components/icon-button.css +29 -0
- package/src/components/icon-list.css +65 -0
- package/src/components/input-group.css +92 -0
- package/src/components/input.css +84 -0
- package/src/components/insight-block.css +63 -0
- package/src/components/item.css +67 -0
- package/src/components/kbd.css +36 -0
- package/src/components/kpi-tile.css +104 -0
- package/src/components/label.css +22 -0
- package/src/components/layout-utilities.css +115 -0
- package/src/components/logo-grid.css +125 -0
- package/src/components/native-select.css +78 -0
- package/src/components/navigation-menu.css +123 -0
- package/src/components/pagination.css +35 -0
- package/src/components/popover.css +48 -0
- package/src/components/progress.css +42 -0
- package/src/components/questionnaire.css +51 -0
- package/src/components/radio.css +41 -0
- package/src/components/select.css +179 -0
- package/src/components/sheet.css +67 -0
- package/src/components/sidebar.css +108 -0
- package/src/components/skeleton.css +38 -0
- package/src/components/slider.css +117 -0
- package/src/components/spinner.css +32 -0
- package/src/components/states.css +54 -0
- package/src/components/stepper.css +76 -0
- package/src/components/switch.css +98 -0
- package/src/components/table.css +139 -0
- package/src/components/tabs.css +104 -0
- package/src/components/textarea.css +16 -0
- package/src/components/toast.css +78 -0
- package/src/components/toggle-group.css +22 -0
- package/src/components/toggle.css +86 -0
- package/src/components/tooltip.css +54 -0
- package/src/components/topbar.css +36 -0
- package/src/components/typography.css +83 -0
- package/src/ground.css +78 -0
- package/src/index.css +77 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* spinner.css — Spinner (10_COMPONENTS.md § Feedback and status).
|
|
2
|
+
*
|
|
3
|
+
* The wait when the shape of what is coming is unknown. shadcn's spinner.tsx (D17; the Cabinet's CSpinner is CoreUI
|
|
4
|
+
* stock): Lucide loader-circle, animate-spin, role="status", aria-label "Loading". One rotation per second, linear;
|
|
5
|
+
* with prefers-reduced-motion it slows, it does not stop. Figma 61:38: Size 16 / 24 / 32 × Tone.
|
|
6
|
+
* Contract: registry/spinner/registry.json.
|
|
7
|
+
*
|
|
8
|
+
* <span class="pui-spinner pui-spinner--24" role="status" aria-label="Loading">…loader-circle svg…</span>
|
|
9
|
+
*
|
|
10
|
+
* Size (none) 16 · --24 · --32
|
|
11
|
+
* Tone (none) muted · --default · --brand · --on-accent (inside a primary button)
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
.pui-spinner {
|
|
15
|
+
display: inline-block;
|
|
16
|
+
flex: none;
|
|
17
|
+
width: var(--pui-size-icon-16);
|
|
18
|
+
height: var(--pui-size-icon-16);
|
|
19
|
+
color: var(--pui-text-muted);
|
|
20
|
+
animation: pui-spin 1s linear infinite;
|
|
21
|
+
}
|
|
22
|
+
.pui-spinner > svg { display: block; width: 100%; height: 100%; }
|
|
23
|
+
.pui-spinner--24 { width: var(--pui-size-icon-24); height: var(--pui-size-icon-24); }
|
|
24
|
+
.pui-spinner--32 { width: var(--pui-size-icon-32); height: var(--pui-size-icon-32); }
|
|
25
|
+
.pui-spinner--default { color: var(--pui-text-default); }
|
|
26
|
+
.pui-spinner--brand { color: var(--pui-text-link); }
|
|
27
|
+
.pui-spinner--on-accent { color: var(--pui-text-on-accent); }
|
|
28
|
+
|
|
29
|
+
@keyframes pui-spin { to { transform: rotate(360deg); } }
|
|
30
|
+
@media (prefers-reduced-motion: reduce) {
|
|
31
|
+
.pui-spinner { animation-duration: 3s; }
|
|
32
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* states.css — State block: empty, loading, error (10_COMPONENTS.md § Shells and patterns).
|
|
2
|
+
*
|
|
3
|
+
* What a data container shows before its data, while it comes, and when it fails — Empty, Skeleton and Alert composed
|
|
4
|
+
* as one block, the trio M3.2 asks every pilot container to have. A white card (surface/page, border/default,
|
|
5
|
+
* radius/16, padding 24, gap 16): table context — Empty's block with its dashed border, five Skeleton rows (a small
|
|
6
|
+
* circle, a medium and a small line, a long line filling the rest), Alert in the danger outline with a Retry beside
|
|
7
|
+
* it; card context (368) — Empty's inline line, three Skeleton lines, the soft danger Alert. Never a Spinner for a
|
|
8
|
+
* container. Figma 270:217. Contract: registry/states/registry.json.
|
|
9
|
+
*
|
|
10
|
+
* <div class="pui-state-block"> …a .pui-empty… </div>
|
|
11
|
+
* <div class="pui-state-block"><div class="pui-state-block__skeleton-row"><span class="pui-skeleton pui-skeleton--circle pui-skeleton--24"></span>
|
|
12
|
+
* <span class="pui-skeleton pui-skeleton--line" style="width: 160px"></span><span class="pui-skeleton pui-skeleton--line" style="width: 80px"></span>
|
|
13
|
+
* <span class="pui-skeleton pui-skeleton--line"></span></div> ×5 </div>
|
|
14
|
+
* <div class="pui-state-block"><div class="pui-state-block__error"><div class="pui-alert pui-alert--danger pui-alert--outline">…</div>
|
|
15
|
+
* <button class="pui-button pui-button--secondary pui-button--small">Retry</button></div></div>
|
|
16
|
+
*
|
|
17
|
+
* Context (none) table · --card (368, the error stacks)
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
.pui-state-block {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
gap: var(--pui-space-16);
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
width: 100%;
|
|
28
|
+
padding: var(--pui-space-24);
|
|
29
|
+
border: 1px solid var(--pui-border-default);
|
|
30
|
+
border-radius: var(--pui-radius-16);
|
|
31
|
+
background: var(--pui-surface-page);
|
|
32
|
+
color: var(--pui-text-default);
|
|
33
|
+
font-family: var(--pui-font-family);
|
|
34
|
+
}
|
|
35
|
+
.pui-state-block > .pui-empty { width: 100%; }
|
|
36
|
+
.pui-state-block__skeleton-row {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: var(--pui-space-12);
|
|
40
|
+
width: 100%;
|
|
41
|
+
}
|
|
42
|
+
.pui-state-block__skeleton-row > .pui-skeleton--line { flex: 0 0 auto; }
|
|
43
|
+
.pui-state-block__skeleton-row > .pui-skeleton--line:last-child { flex: 1 1 auto; width: auto; }
|
|
44
|
+
.pui-state-block__error {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
gap: var(--pui-space-12);
|
|
48
|
+
width: 100%;
|
|
49
|
+
}
|
|
50
|
+
.pui-state-block__error > .pui-alert { flex: 1 1 auto; }
|
|
51
|
+
.pui-state-block__error > .pui-button { flex: none; }
|
|
52
|
+
.pui-state-block--card { max-width: 368px; }
|
|
53
|
+
.pui-state-block--card .pui-state-block__error { flex-direction: column; align-items: stretch; }
|
|
54
|
+
.pui-state-block--card .pui-state-block__error > .pui-button { align-self: flex-start; }
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/* stepper.css — Stepper · Step (10_COMPONENTS.md § Navigation and overlay).
|
|
2
|
+
*
|
|
3
|
+
* Where the user is in a flow with named steps. A step is a 24 px circle with the step's number beside its name —
|
|
4
|
+
* the shape every desktop system shares (MUI's Stepper; shadcn has none): filled action/primary/bg with the number in
|
|
5
|
+
* action/primary/fg when current, a check in its place when complete, border/default with the number in text/muted
|
|
6
|
+
* when upcoming; the label 14 Medium in text/default, text/muted when upcoming. Steps are joined by 1 px connectors
|
|
7
|
+
* (border/default; border/strong behind a completed step) at a space/12 rhythm, the row filling its column.
|
|
8
|
+
* Figma: 253:2094 · 253:2088. Contract: registry/stepper/registry.json.
|
|
9
|
+
*
|
|
10
|
+
* <ol class="pui-stepper">
|
|
11
|
+
* <li class="pui-step pui-step--complete"><span class="pui-step__circle"><span class="pui-icon">…check…</span></span><span class="pui-step__label">Details</span></li>
|
|
12
|
+
* <li class="pui-step pui-step--current" aria-current="step"><span class="pui-step__circle">2</span><span class="pui-step__label">Budget</span></li>
|
|
13
|
+
* <li class="pui-step"><span class="pui-step__circle">3</span><span class="pui-step__label">Creatives</span></li></ol>
|
|
14
|
+
*
|
|
15
|
+
* State (none) upcoming · --current / [aria-current="step"] · --complete
|
|
16
|
+
* Rule a step is a place, not a button — Back and Next move between them.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
.pui-stepper {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: var(--pui-space-12);
|
|
23
|
+
width: 100%;
|
|
24
|
+
margin: 0;
|
|
25
|
+
padding: 0;
|
|
26
|
+
list-style: none;
|
|
27
|
+
font-family: var(--pui-font-family);
|
|
28
|
+
}
|
|
29
|
+
.pui-step {
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: var(--pui-space-8);
|
|
33
|
+
flex: none;
|
|
34
|
+
color: var(--pui-text-muted);
|
|
35
|
+
font-size: var(--pui-font-size-14);
|
|
36
|
+
font-weight: var(--pui-font-weight-500);
|
|
37
|
+
line-height: var(--pui-font-line-height-normal);
|
|
38
|
+
white-space: nowrap;
|
|
39
|
+
}
|
|
40
|
+
/* The connector: every step but the last grows a line after it. */
|
|
41
|
+
.pui-step:not(:last-child) { flex: 1 1 auto; }
|
|
42
|
+
.pui-step:not(:last-child)::after {
|
|
43
|
+
content: "";
|
|
44
|
+
flex: 1 1 auto;
|
|
45
|
+
height: 1px;
|
|
46
|
+
margin-inline-start: var(--pui-space-4);
|
|
47
|
+
background: var(--pui-border-default);
|
|
48
|
+
}
|
|
49
|
+
.pui-step--complete:not(:last-child)::after { background: var(--pui-border-strong); }
|
|
50
|
+
.pui-step__circle {
|
|
51
|
+
display: inline-flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
flex: none;
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
width: var(--pui-space-24);
|
|
57
|
+
height: var(--pui-space-24);
|
|
58
|
+
border: 1px solid var(--pui-border-default);
|
|
59
|
+
border-radius: var(--pui-radius-full);
|
|
60
|
+
background: transparent;
|
|
61
|
+
color: var(--pui-text-muted);
|
|
62
|
+
font-size: var(--pui-font-size-12);
|
|
63
|
+
font-weight: var(--pui-font-weight-500);
|
|
64
|
+
line-height: 1;
|
|
65
|
+
}
|
|
66
|
+
.pui-step__circle > .pui-icon { width: var(--pui-size-icon-16); height: var(--pui-size-icon-16); }
|
|
67
|
+
.pui-step--current,
|
|
68
|
+
.pui-step[aria-current="step"],
|
|
69
|
+
.pui-step--complete { color: var(--pui-text-default); }
|
|
70
|
+
.pui-step--current .pui-step__circle,
|
|
71
|
+
.pui-step[aria-current="step"] .pui-step__circle,
|
|
72
|
+
.pui-step--complete .pui-step__circle {
|
|
73
|
+
border-color: var(--pui-action-primary-bg);
|
|
74
|
+
background: var(--pui-action-primary-bg);
|
|
75
|
+
color: var(--pui-action-primary-fg);
|
|
76
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/* switch.css — Switch (10_COMPONENTS.md § Forms).
|
|
2
|
+
*
|
|
3
|
+
* A setting that takes effect at once. shadcn's switch.tsx — there is no Mobupps source; the Cabinet's CFormSwitch
|
|
4
|
+
* is CoreUI stock (D17): a 32 × 18 track (shadcn's w-8 × h-[1.15rem]; Figma draws 18), radius full, a 16 px white
|
|
5
|
+
* thumb that travels to the far edge; small is 24 × 14 with a 12 px thumb. On = action/primary/bg, off =
|
|
6
|
+
* border/default (the input-border grey); hover darkens (border/strong off, bg-hover on); focus is the ring;
|
|
7
|
+
* disabled .5. Four states by design — no pressed, no error. Figma 47:2. Contract: registry/switch/registry.json.
|
|
8
|
+
*
|
|
9
|
+
* <label class="pui-switch">
|
|
10
|
+
* <input class="pui-switch__input pui-sr-only" type="checkbox" role="switch">
|
|
11
|
+
* <span class="pui-switch__track"></span>
|
|
12
|
+
* <span class="pui-switch__label">Email me a weekly report</span></label>
|
|
13
|
+
*
|
|
14
|
+
* Size (none) medium 32 × 18 · --small 24 × 14
|
|
15
|
+
* Button a switch that is one <button role="switch" aria-checked> (shadcn's, Base UI's, Paggy's .tumbler — 2.4.5):
|
|
16
|
+
* the button carries __track itself and shows its state by aria-checked / data-state="checked".
|
|
17
|
+
* Rule the label names the setting; the switch shows its state — never "Enabled" / "Disabled".
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
.pui-switch {
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: var(--pui-space-8);
|
|
24
|
+
position: relative;
|
|
25
|
+
color: var(--pui-text-default);
|
|
26
|
+
font-family: var(--pui-font-family);
|
|
27
|
+
font-size: var(--pui-font-size-14);
|
|
28
|
+
font-weight: var(--pui-font-weight-400);
|
|
29
|
+
line-height: var(--pui-font-line-height-normal);
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
user-select: none;
|
|
32
|
+
}
|
|
33
|
+
.pui-switch__track {
|
|
34
|
+
--pui-switch-w: 32px; /* shadcn w-8 */
|
|
35
|
+
--pui-switch-h: 18px; /* shadcn h-[1.15rem] = 18.4 at 16; the library draws 18 */
|
|
36
|
+
--pui-switch-thumb: var(--pui-size-icon-16);
|
|
37
|
+
position: relative;
|
|
38
|
+
flex: none;
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
width: var(--pui-switch-w);
|
|
41
|
+
height: var(--pui-switch-h);
|
|
42
|
+
border-radius: var(--pui-radius-full);
|
|
43
|
+
background: var(--pui-border-default);
|
|
44
|
+
box-shadow: var(--pui-elevation-flat);
|
|
45
|
+
transition:
|
|
46
|
+
background-color var(--pui-motion-state) var(--pui-motion-easing),
|
|
47
|
+
box-shadow var(--pui-motion-state) var(--pui-motion-easing);
|
|
48
|
+
}
|
|
49
|
+
.pui-switch__track::before {
|
|
50
|
+
content: "";
|
|
51
|
+
position: absolute;
|
|
52
|
+
top: 50%;
|
|
53
|
+
left: 1px;
|
|
54
|
+
width: var(--pui-switch-thumb);
|
|
55
|
+
height: var(--pui-switch-thumb);
|
|
56
|
+
border-radius: var(--pui-radius-full);
|
|
57
|
+
background: var(--pui-surface-page);
|
|
58
|
+
transform: translateY(-50%);
|
|
59
|
+
transition: transform var(--pui-motion-state) var(--pui-motion-easing);
|
|
60
|
+
}
|
|
61
|
+
.pui-switch:hover .pui-switch__track { background: var(--pui-border-strong); }
|
|
62
|
+
.pui-switch__input:focus-visible + .pui-switch__track { box-shadow: var(--pui-ring), inset 0 0 0 1px var(--pui-border-focus); }
|
|
63
|
+
.pui-switch__input:checked + .pui-switch__track { background: var(--pui-action-primary-bg); }
|
|
64
|
+
.pui-switch:hover .pui-switch__input:checked + .pui-switch__track { background: var(--pui-action-primary-bg-hover); }
|
|
65
|
+
.pui-switch__input:checked + .pui-switch__track::before {
|
|
66
|
+
transform: translate(calc(var(--pui-switch-w) - var(--pui-switch-thumb) - 2px), -50%);
|
|
67
|
+
}
|
|
68
|
+
/* The label is the row's text. Its type is stated on .pui-switch, which is where D61 wants it — one
|
|
69
|
+
place, not two — so the only thing this class owns is its behaviour IN the row: it takes the space
|
|
70
|
+
that is left and wraps, instead of shrink-proofing itself and squeezing the track. It was in the
|
|
71
|
+
markup block above, in the specimen and in the workshop with no rule anywhere behind it, which the
|
|
72
|
+
documentation site's class gate found on 2026-09-10: a class a component's own markup tells you to
|
|
73
|
+
write, and nothing to change when its behaviour has to change. */
|
|
74
|
+
.pui-switch__label { min-width: 0; }
|
|
75
|
+
|
|
76
|
+
.pui-switch:has(.pui-switch__input:disabled),
|
|
77
|
+
.pui-switch--disabled { opacity: 0.5; cursor: not-allowed; }
|
|
78
|
+
|
|
79
|
+
.pui-switch--small .pui-switch__track {
|
|
80
|
+
--pui-switch-w: 24px; /* shadcn w-6 */
|
|
81
|
+
--pui-switch-h: 14px; /* shadcn h-3.5 */
|
|
82
|
+
--pui-switch-thumb: var(--pui-space-12);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* 2.4.5 — the one-element switch: <button class="pui-switch__track" role="switch" aria-checked="…"> — the ARIA switch
|
|
86
|
+
pattern (shadcn, Base UI render a button; Paggy's admin .tumbler is one). The same five states as the input form. */
|
|
87
|
+
button.pui-switch__track { display: inline-block; padding: 0; border: 0; cursor: pointer; outline: none; }
|
|
88
|
+
button.pui-switch__track:hover { background: var(--pui-border-strong); }
|
|
89
|
+
button.pui-switch__track:focus-visible { box-shadow: var(--pui-ring), inset 0 0 0 1px var(--pui-border-focus); }
|
|
90
|
+
.pui-switch__track[aria-checked="true"],
|
|
91
|
+
.pui-switch__track[data-state="checked"] { background: var(--pui-action-primary-bg); }
|
|
92
|
+
button.pui-switch__track[aria-checked="true"]:hover,
|
|
93
|
+
button.pui-switch__track[data-state="checked"]:hover { background: var(--pui-action-primary-bg-hover); }
|
|
94
|
+
.pui-switch__track[aria-checked="true"]::before,
|
|
95
|
+
.pui-switch__track[data-state="checked"]::before {
|
|
96
|
+
transform: translate(calc(var(--pui-switch-w) - var(--pui-switch-thumb) - 2px), -50%);
|
|
97
|
+
}
|
|
98
|
+
button.pui-switch__track:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/* table.css — Table · Table row · Table cell · Data table (10_COMPONENTS.md § Content blocks).
|
|
2
|
+
*
|
|
3
|
+
* Fedor's stylised table (D45) — the deck's .comp-table (slide.css:702–737; his four Quarter-Presentation tables),
|
|
4
|
+
* one anatomy in two sizes: a card on surface/card at radius/16 with elevation/card, padding space/8 (Paggy's 10 —
|
|
5
|
+
* stated), rows FLUSH (D104 — below), an accent-dark header bar (table/header/bg, radius/8, painted once by the row — neutral-800
|
|
6
|
+
* in multicolor), row-header pills on table/header/pill-tint, dividers on table/divider (2 px slide / 1 px product)
|
|
7
|
+
* under every body cell — none under the last row (D46) — and no vertical lines; hover surface/slot (the inversion
|
|
8
|
+
* rule), selected the Accent bg. A WASH FILLS THE WHOLE ROW (D104, Fedor 2026-09-17, on the Data table: "fill color
|
|
9
|
+
* should fill the whole row, not … stop at some point before the line … this gap does nothing actually for us"): rows
|
|
10
|
+
* sit flush — no border-spacing, none under the bar — and a body row is square, so a hover or selection wash runs from
|
|
11
|
+
* the divider above to the row's own with no strip of card above it and no notch at its corners; radius/8 stays on the
|
|
12
|
+
* bar and the pill. The space a row needs is inside the row: the product row is his 46 / 43 (padding space/12), the
|
|
13
|
+
* slide cell's padding is space/16 for the deck's 12 — the 12 plus half its old row gap on each side, so the slide
|
|
14
|
+
* pitch is kept — and a row-header cell is inset space/4 so stacked pills stay 8 apart (the product pill's own padding
|
|
15
|
+
* is space/8 so it fits its row). The 2026-09-08 form spaced rows space/8 apart and rounded every body row — kept
|
|
16
|
+
* here, dated. The divider is a straight line (D59, 2026-09-09: Fedor vetoed a line that curves with a rounded end,
|
|
17
|
+
* on the MAFO Click Cap page): the cell keeps a transparent bottom border for its height and paints the line with
|
|
18
|
+
* ::after — a square row no longer needs that, and it stays because the last-row rule (D46) and the React part's
|
|
19
|
+
* divider span are built on it and no pixel moves. Product = Paggy's table.admin anatomy (body 13 Regular, pill 13 Bold, pill gap 8; header 14 Medium for
|
|
20
|
+
* its 12 SemiBold and padding 12 × 16 for its 10 × 14 — stated, D45) — the web's default; slide = his numbers (header 24
|
|
21
|
+
* Medium at 24 × 40 for Paggy's 28 × 40 — stated; body 18 Regular at 16 × 40 — 12 before D104 — pill 20 Bold at 12 × 40, pill gap 16). Numbers right, words left; status lives in
|
|
22
|
+
* a Badge, never in a cell's colour; columns fill the width — no void at the right end (Fedor 2026-08-17). Data
|
|
23
|
+
* table: a toolbar, the table, a footer with the range and Pagination at space/16 (MAFO's react-table screens).
|
|
24
|
+
* Figma: 165:556 · 163:311 · 162:36 · 171:7. Contracts: registry/table, registry/data-table.
|
|
25
|
+
*
|
|
26
|
+
* <div class="pui-table"><table class="pui-table__table">
|
|
27
|
+
* <thead><tr class="pui-table__row"><th class="pui-table__cell pui-table__cell--header">Publisher<span class="pui-icon pui-table__sort">…</span></th>
|
|
28
|
+
* <th class="pui-table__cell pui-table__cell--header pui-table__cell--right">Revenue</th></tr></thead>
|
|
29
|
+
* <tbody><tr class="pui-table__row"><td class="pui-table__cell pui-table__cell--row-header"><span class="pui-table__pill">Q1</span></td>
|
|
30
|
+
* <td class="pui-table__cell pui-table__cell--right">$ 8 969 916</td></tr>
|
|
31
|
+
* <tr class="pui-table__row" aria-selected="true"> … </tr></tbody></table></div>
|
|
32
|
+
* <div class="pui-data-table"><div class="pui-data-table__toolbar">…</div><div class="pui-table">…</div>
|
|
33
|
+
* <div class="pui-data-table__footer"><span class="pui-data-table__range">1–5 of 118 publishers</span><nav class="pui-pagination">…</nav></div></div>
|
|
34
|
+
*
|
|
35
|
+
* Size (none) product · --slide (on .pui-table)
|
|
36
|
+
* Cell __cell (body) · __cell--header · __cell--row-header (holds a __pill) · __cell--right
|
|
37
|
+
* Row :hover · selected = [aria-selected="true"] or --selected
|
|
38
|
+
* Accent data-accent on the table or a parent drives the bar and the pills — table/header/bg and table/header/pill-tint
|
|
39
|
+
* re-resolve per mode (blue navy · red · yellow · multicolor = a neutral-800 bar on neutral-200 pills, the black
|
|
40
|
+
* one); a product dashboard's table is the neutral one (data-accent="multicolor" on .pui-table — D59)
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
.pui-table {
|
|
44
|
+
box-sizing: border-box;
|
|
45
|
+
width: 100%;
|
|
46
|
+
padding: var(--pui-space-8);
|
|
47
|
+
border-radius: var(--pui-radius-16);
|
|
48
|
+
background: var(--pui-surface-card);
|
|
49
|
+
box-shadow: var(--pui-elevation-card);
|
|
50
|
+
color: var(--pui-text-default);
|
|
51
|
+
font-family: var(--pui-font-family);
|
|
52
|
+
--pui-table-divider-width: 1px;
|
|
53
|
+
}
|
|
54
|
+
.pui-table__table {
|
|
55
|
+
width: 100%;
|
|
56
|
+
border-collapse: separate;
|
|
57
|
+
border-spacing: 0; /* D104: rows sit flush — a wash fills the row, divider to divider */
|
|
58
|
+
table-layout: auto;
|
|
59
|
+
}
|
|
60
|
+
.pui-table__cell {
|
|
61
|
+
position: relative;
|
|
62
|
+
box-sizing: border-box;
|
|
63
|
+
padding: var(--pui-space-12) var(--pui-space-16);
|
|
64
|
+
border: 0;
|
|
65
|
+
border-bottom: var(--pui-table-divider-width) solid transparent; /* the height; the line is ::after (D59) */
|
|
66
|
+
background: transparent;
|
|
67
|
+
color: var(--pui-text-default);
|
|
68
|
+
font-size: var(--pui-font-size-13);
|
|
69
|
+
font-weight: var(--pui-font-weight-400);
|
|
70
|
+
line-height: var(--pui-font-line-height-normal);
|
|
71
|
+
text-align: start;
|
|
72
|
+
vertical-align: middle;
|
|
73
|
+
}
|
|
74
|
+
.pui-table__cell--right { text-align: end; }
|
|
75
|
+
/* The divider (table/divider), straight from end to end: an absolutely placed line over the transparent border. */
|
|
76
|
+
.pui-table__cell::after {
|
|
77
|
+
content: "";
|
|
78
|
+
position: absolute;
|
|
79
|
+
left: 0;
|
|
80
|
+
right: 0;
|
|
81
|
+
bottom: calc(var(--pui-table-divider-width) * -1);
|
|
82
|
+
height: var(--pui-table-divider-width);
|
|
83
|
+
background: var(--pui-table-divider);
|
|
84
|
+
pointer-events: none;
|
|
85
|
+
}
|
|
86
|
+
.pui-table__cell--header {
|
|
87
|
+
background: var(--pui-table-header-bg);
|
|
88
|
+
color: var(--pui-text-on-accent);
|
|
89
|
+
font-size: var(--pui-font-size-14);
|
|
90
|
+
font-weight: var(--pui-font-weight-500);
|
|
91
|
+
border-bottom: 0;
|
|
92
|
+
}
|
|
93
|
+
.pui-table__cell--header::after { content: none; }
|
|
94
|
+
.pui-table__cell--header:first-child { border-start-start-radius: var(--pui-radius-8); border-end-start-radius: var(--pui-radius-8); }
|
|
95
|
+
.pui-table__cell--header:last-child { border-start-end-radius: var(--pui-radius-8); border-end-end-radius: var(--pui-radius-8); }
|
|
96
|
+
.pui-table__sort { width: var(--pui-size-icon-16); height: var(--pui-size-icon-16); margin-inline-start: var(--pui-space-4); vertical-align: middle; }
|
|
97
|
+
/* D104: the pill is inset space/4 above and below, so stacked pills stay 8 apart in flush rows; its own padding is the
|
|
98
|
+
cell's less the inset. The pill's cell carries no divider and the pill fills its column — the deck's macro gives the
|
|
99
|
+
header column neither (macros.html:611 — `--hcol` or `--div`, never both; the cell IS the pill), and the library's
|
|
100
|
+
Table cell has no Divider under a pill; until 2026-09-17 this part drew the line and let each pill hug its own text. */
|
|
101
|
+
.pui-table__cell--row-header { padding: var(--pui-space-4) var(--pui-space-8) var(--pui-space-4) 0; }
|
|
102
|
+
.pui-table__cell--row-header::after { content: none; }
|
|
103
|
+
.pui-table__pill {
|
|
104
|
+
display: block;
|
|
105
|
+
padding: var(--pui-space-8) var(--pui-space-16);
|
|
106
|
+
border-radius: var(--pui-radius-8);
|
|
107
|
+
background: var(--pui-table-header-pill-tint);
|
|
108
|
+
color: var(--pui-text-default);
|
|
109
|
+
font-size: var(--pui-font-size-13);
|
|
110
|
+
font-weight: var(--pui-font-weight-700);
|
|
111
|
+
line-height: var(--pui-font-line-height-normal);
|
|
112
|
+
}
|
|
113
|
+
/* D46: the last row has no divider — the card's edge is the end. */
|
|
114
|
+
.pui-table__table > tbody > tr:last-child > .pui-table__cell::after { display: none; }
|
|
115
|
+
/* Hover and selection paint the whole row, square, from the divider above to its own (D104) — no radius on a body cell. */
|
|
116
|
+
.pui-table__table > tbody > tr:hover > .pui-table__cell { background: var(--pui-surface-slot); }
|
|
117
|
+
.pui-table__table > tbody > tr[aria-selected="true"] > .pui-table__cell,
|
|
118
|
+
.pui-table__table > tbody > tr.pui-table__row--selected > .pui-table__cell { background: var(--pui-table-row-selected-bg); }
|
|
119
|
+
/* D110 (2026-09-17): the selected wash is its own token, not accent/bg. In blue, red and yellow it is the same palest
|
|
120
|
+
tint; in multicolor accent/bg is red/100 and a selected row on a dashboard read pink, so there it is a neutral one
|
|
121
|
+
step darker than the ground the Table paints (neutral/200 on surface/card — D107's rule). Hover stays the white slot. */
|
|
122
|
+
|
|
123
|
+
.pui-table--slide { --pui-table-divider-width: 2px; }
|
|
124
|
+
.pui-table--slide .pui-table__cell { padding: var(--pui-space-16) var(--pui-space-40); font-size: var(--pui-font-size-18); }
|
|
125
|
+
.pui-table--slide .pui-table__cell--header { padding: var(--pui-space-24) var(--pui-space-40); font-size: var(--pui-font-size-24); }
|
|
126
|
+
.pui-table--slide .pui-table__cell--row-header { padding: var(--pui-space-4) var(--pui-space-16) var(--pui-space-4) 0; }
|
|
127
|
+
.pui-table--slide .pui-table__pill { padding: var(--pui-space-12) var(--pui-space-40); font-size: var(--pui-font-size-20); }
|
|
128
|
+
|
|
129
|
+
.pui-data-table { display: flex; flex-direction: column; gap: var(--pui-space-16); font-family: var(--pui-font-family); }
|
|
130
|
+
.pui-data-table__toolbar,
|
|
131
|
+
.pui-data-table__footer { display: flex; align-items: center; justify-content: space-between; gap: var(--pui-space-16); }
|
|
132
|
+
.pui-data-table__toolbar > .pui-input-group,
|
|
133
|
+
.pui-data-table__toolbar > .pui-input { flex: 1 1 auto; max-width: 320px; }
|
|
134
|
+
.pui-data-table__tools { display: flex; align-items: center; gap: var(--pui-space-8); }
|
|
135
|
+
/* 3.3.5 — a page-size Select in the footer's tools is its content's width, not the row's: select.css makes a
|
|
136
|
+
trigger fill its Field (width 100 %), and in a flex row that filled basis squeezed the range text beside it
|
|
137
|
+
on to two lines. Pagination's contract asks for the Select AND the range text, so the row has to hold both. */
|
|
138
|
+
.pui-data-table__tools > .pui-select { width: auto; }
|
|
139
|
+
.pui-data-table__range { color: var(--pui-text-muted); font-size: var(--pui-font-size-14); line-height: var(--pui-font-line-height-normal); }
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/* tabs.css — Tabs list · Tabs trigger - line · Tabs trigger - segment (10_COMPONENTS.md § Navigation and overlay).
|
|
2
|
+
*
|
|
3
|
+
* Line is Paggy's strip: triggers 4 px apart over a 1 px border/default rule, a 2 px action/primary/bg indicator
|
|
4
|
+
* hugging the open label (the concept rule), padding 8 / 12 / 0, radius 4 for the ring. Segment is the site's
|
|
5
|
+
* `.tabs-bar`: triggers 2 px apart inside a box at radius 8 — the site's is surface/card with 8 px padding, drawn here on
|
|
6
|
+
* surface/sunken at 4 (D47's nested inset, stated) — each at radius 4 (the nested-radius rule), the chosen one surface/inverse with text/on-inverse, padding 4 / 12. The box fills
|
|
7
|
+
* tabs/track, which FOLLOWS THE GROUND (ground.css; D106, D107): neutral/100 on a white ground, and on a surface/card ground — a product screen, a tinted Card, a Table — WHITE, where
|
|
8
|
+
* every other grey surface goes one step darker; neutral/100 there was 1.00 : 1 and the box disappeared. Two sizes (12 / 14
|
|
9
|
+
* Medium); active · hover · focus · disabled. Same API as shadcn (Tabs / TabsList / TabsTrigger; TabsContent is not
|
|
10
|
+
* a component). Figma: 82:82 · 80:62 · 81:22. Contract: registry/tabs/registry.json.
|
|
11
|
+
*
|
|
12
|
+
* <div class="pui-tabs" role="tablist">
|
|
13
|
+
* <button class="pui-tabs__trigger" role="tab" aria-selected="true">Charts</button>
|
|
14
|
+
* <button class="pui-tabs__trigger" role="tab">Images</button></div>
|
|
15
|
+
* <div class="pui-tabs pui-tabs--segment" role="tablist"> …the same triggers… </div>
|
|
16
|
+
*
|
|
17
|
+
* Variant (none) line · --segment
|
|
18
|
+
* Size --small (12 px) · (none) medium (14 px)
|
|
19
|
+
* On card automatic: under [data-ground="card"] and inside every part that paints surface/card (ground.css) the box is
|
|
20
|
+
* white; in a white Card it is neutral/100, as on any white ground. --on-card is the explicit switch, for a
|
|
21
|
+
* consumer who paints the product ground without setting data-ground. Segment only; line has no box to fill
|
|
22
|
+
* State active = [aria-selected="true"] or [data-state="active"] · :hover · :focus-visible · :disabled
|
|
23
|
+
* Parts __trigger · __icon (line only — a 16 px leading glyph)
|
|
24
|
+
* Keyboard ONE tab stop: the selected trigger takes tabindex="0", every other trigger tabindex="-1" (3.5.3).
|
|
25
|
+
* The script owes Left / Right to move and select, Home / End for first / last; Tab leaves for the panel.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
.pui-tabs {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: flex-end;
|
|
31
|
+
gap: var(--pui-space-4);
|
|
32
|
+
box-shadow: inset 0 -1px 0 var(--pui-border-default);
|
|
33
|
+
font-family: var(--pui-font-family);
|
|
34
|
+
}
|
|
35
|
+
.pui-tabs__trigger {
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
gap: var(--pui-space-8);
|
|
39
|
+
position: relative;
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
margin: 0;
|
|
42
|
+
padding: var(--pui-space-8) var(--pui-space-12) 0;
|
|
43
|
+
border: 0;
|
|
44
|
+
border-radius: var(--pui-radius-4);
|
|
45
|
+
background: transparent;
|
|
46
|
+
color: var(--pui-text-muted);
|
|
47
|
+
font-family: inherit;
|
|
48
|
+
font-size: var(--pui-font-size-14);
|
|
49
|
+
font-weight: var(--pui-font-weight-500);
|
|
50
|
+
line-height: var(--pui-font-line-height-normal);
|
|
51
|
+
white-space: nowrap;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
outline: none;
|
|
54
|
+
transition: color var(--pui-motion-state) var(--pui-motion-easing);
|
|
55
|
+
}
|
|
56
|
+
/* The indicator: 2 px, 2 px under the label, there on every trigger and shown by opacity so the row never jumps. */
|
|
57
|
+
.pui-tabs__trigger::after {
|
|
58
|
+
content: "";
|
|
59
|
+
display: block;
|
|
60
|
+
height: var(--pui-space-2);
|
|
61
|
+
margin-top: var(--pui-space-2);
|
|
62
|
+
border-radius: var(--pui-radius-full);
|
|
63
|
+
background: var(--pui-action-primary-bg);
|
|
64
|
+
opacity: 0;
|
|
65
|
+
transition: opacity var(--pui-motion-state) var(--pui-motion-easing);
|
|
66
|
+
}
|
|
67
|
+
.pui-tabs__trigger { flex-direction: column; align-items: stretch; gap: 0; }
|
|
68
|
+
.pui-tabs__trigger > .pui-tabs__label { display: inline-flex; align-items: center; gap: var(--pui-space-8); }
|
|
69
|
+
.pui-tabs__trigger:hover { color: var(--pui-text-default); }
|
|
70
|
+
.pui-tabs__trigger:focus-visible { box-shadow: var(--pui-ring); }
|
|
71
|
+
.pui-tabs__trigger[aria-selected="true"],
|
|
72
|
+
.pui-tabs__trigger[data-state="active"] { color: var(--pui-text-default); }
|
|
73
|
+
.pui-tabs__trigger[aria-selected="true"]::after,
|
|
74
|
+
.pui-tabs__trigger[data-state="active"]::after { opacity: 1; }
|
|
75
|
+
.pui-tabs__trigger:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
|
|
76
|
+
.pui-tabs__icon { flex: none; width: var(--pui-size-icon-16); height: var(--pui-size-icon-16); }
|
|
77
|
+
.pui-tabs--small .pui-tabs__trigger { font-size: var(--pui-font-size-12); }
|
|
78
|
+
|
|
79
|
+
/* ── Segment ─────────────────────────────────────────────────────────────────────────────────── */
|
|
80
|
+
.pui-tabs--segment {
|
|
81
|
+
display: inline-flex;
|
|
82
|
+
align-items: stretch;
|
|
83
|
+
gap: var(--pui-space-2);
|
|
84
|
+
padding: var(--pui-space-4);
|
|
85
|
+
border-radius: var(--pui-radius-8);
|
|
86
|
+
background: var(--pui-tabs-track);
|
|
87
|
+
box-shadow: none;
|
|
88
|
+
}
|
|
89
|
+
.pui-tabs--segment.pui-tabs--on-card { background: var(--pui-surface-slot); }
|
|
90
|
+
.pui-tabs--segment .pui-tabs__trigger {
|
|
91
|
+
flex-direction: row;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
padding: var(--pui-space-4) var(--pui-space-12);
|
|
95
|
+
border-radius: var(--pui-radius-4);
|
|
96
|
+
transition: background-color var(--pui-motion-state) var(--pui-motion-easing), color var(--pui-motion-state) var(--pui-motion-easing);
|
|
97
|
+
}
|
|
98
|
+
.pui-tabs--segment .pui-tabs__trigger::after { display: none; }
|
|
99
|
+
.pui-tabs--segment .pui-tabs__trigger:hover { background: var(--pui-tint-neutral-bg); }
|
|
100
|
+
.pui-tabs--segment .pui-tabs__trigger[aria-selected="true"],
|
|
101
|
+
.pui-tabs--segment .pui-tabs__trigger[data-state="active"] {
|
|
102
|
+
background: var(--pui-surface-inverse);
|
|
103
|
+
color: var(--pui-text-on-inverse);
|
|
104
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* textarea.css — Textarea (10_COMPONENTS.md § Forms).
|
|
2
|
+
*
|
|
3
|
+
* Input's chrome on shadcn's textarea.tsx — the site has no textarea (D17): min-height 64, padding 8 / 12, radius 8,
|
|
4
|
+
* 14 Regular, the same five states. One size, no icons; the box grows with what is typed. Figma 48:59.
|
|
5
|
+
* Contract: registry/textarea/registry.json. The shared rules live in input.css (every `.pui-input` selector is
|
|
6
|
+
* paired with `.pui-textarea`); this file holds what differs.
|
|
7
|
+
*
|
|
8
|
+
* <textarea class="pui-textarea" rows="3" aria-label="Notes" placeholder="Notes"></textarea>
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
.pui-textarea {
|
|
12
|
+
min-height: calc(var(--pui-space-64));
|
|
13
|
+
padding: calc(var(--pui-space-8) - 1px) calc(var(--pui-space-12) - 1px);
|
|
14
|
+
resize: vertical;
|
|
15
|
+
field-sizing: content;
|
|
16
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* toast.css — Toast (the house snackbar) · Toast - status (10_COMPONENTS.md § Feedback and status).
|
|
2
|
+
*
|
|
3
|
+
* Toast is Paggy's `.toast` (app.css:1001, editor.js:208 — 'Slide duplicated', 'Copied', 'Saved'): a dark bar at the
|
|
4
|
+
* bottom-centre, 24 up, white text, an underlined action, a key cap for the shortcut, gone after 3.2 s (6.5 with an
|
|
5
|
+
* action). surface/inverse, text/on-inverse at 14, padding space/8 / space/16, radius/8, a row at space/12,
|
|
6
|
+
* elevation/floating; the action underlined in Medium 14 (Paggy's #FFD23F yellow is not carried — U12, vetoable);
|
|
7
|
+
* the cap is Kbd on-inverse. Toast - status is Alert's outline box set floating — shadcn's Sonner (D17; MAFO's
|
|
8
|
+
* react-toastify is what it replaces): 356 wide, elevation/floating, the close on, a small secondary Action; stacked
|
|
9
|
+
* at space/12, newest at the bottom, bottom-right. Figma: Toast 241:99 · Toast - status 234:9.
|
|
10
|
+
* Contract: registry/toast/registry.json. The status toast's box rules are paired in alert.css.
|
|
11
|
+
*
|
|
12
|
+
* <div class="pui-toast-region"><div class="pui-toast" role="status">Slide duplicated
|
|
13
|
+
* <button class="pui-toast__action">Undo</button><kbd class="pui-kbd pui-kbd--on-inverse">⌘Z</kbd></div></div>
|
|
14
|
+
* <div class="pui-toast-region pui-toast-region--bottom-right">
|
|
15
|
+
* <div class="pui-toast-status pui-toast-status--danger" role="alert"> …alert's parts, __action, __close… </div></div>
|
|
16
|
+
*
|
|
17
|
+
* Region .pui-toast-region — fixed, bottom-centre, 24 up (Paggy's); --bottom-right for the status stack
|
|
18
|
+
* Rules one line, one verb; how long it stays is the code side's, never drawn.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
.pui-toast-region {
|
|
22
|
+
position: fixed;
|
|
23
|
+
left: 50%;
|
|
24
|
+
bottom: var(--pui-space-24);
|
|
25
|
+
z-index: 60;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: var(--pui-space-12);
|
|
30
|
+
transform: translateX(-50%);
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
}
|
|
33
|
+
.pui-toast-region > * { pointer-events: auto; }
|
|
34
|
+
.pui-toast-region--bottom-right {
|
|
35
|
+
left: auto;
|
|
36
|
+
right: var(--pui-space-24);
|
|
37
|
+
align-items: flex-end;
|
|
38
|
+
transform: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.pui-toast {
|
|
42
|
+
display: inline-flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: var(--pui-space-12);
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
max-width: calc(100vw - var(--pui-space-48));
|
|
47
|
+
padding: var(--pui-space-8) var(--pui-space-16);
|
|
48
|
+
border-radius: var(--pui-radius-8);
|
|
49
|
+
background: var(--pui-surface-inverse);
|
|
50
|
+
box-shadow: var(--pui-elevation-floating);
|
|
51
|
+
color: var(--pui-text-on-inverse);
|
|
52
|
+
font-family: var(--pui-font-family);
|
|
53
|
+
font-size: var(--pui-font-size-14);
|
|
54
|
+
font-weight: var(--pui-font-weight-400);
|
|
55
|
+
line-height: var(--pui-font-line-height-normal);
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
}
|
|
58
|
+
.pui-toast__action {
|
|
59
|
+
margin: 0;
|
|
60
|
+
padding: 0;
|
|
61
|
+
border: 0;
|
|
62
|
+
background: none;
|
|
63
|
+
color: inherit;
|
|
64
|
+
font: inherit;
|
|
65
|
+
font-weight: var(--pui-font-weight-500);
|
|
66
|
+
text-decoration: underline;
|
|
67
|
+
text-underline-offset: var(--pui-space-2);
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
outline: none;
|
|
70
|
+
}
|
|
71
|
+
.pui-toast__action:focus-visible { border-radius: var(--pui-radius-4); box-shadow: var(--pui-ring); }
|
|
72
|
+
|
|
73
|
+
.pui-toast-status {
|
|
74
|
+
width: 356px; /* Sonner's width */
|
|
75
|
+
max-width: calc(100vw - var(--pui-space-48));
|
|
76
|
+
box-shadow: var(--pui-elevation-floating);
|
|
77
|
+
}
|
|
78
|
+
.pui-toast-status__action { flex: none; align-self: center; }
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* toggle-group.css — Toggle group (10_COMPONENTS.md § Actions).
|
|
2
|
+
*
|
|
3
|
+
* A row of toggles space/8 apart — Paggy's library filters (All · Covers · Sections · Content · Charts · Case
|
|
4
|
+
* studies) at 8; its chart-type pills (6) and the site's blog categories (10) take space/8 here — stated. One on (type single) or any number (type multiple)
|
|
5
|
+
* is behaviour; the gap is never 0 — a connected row is Button group. Figma 96:118: Variant outline / filled × Size,
|
|
6
|
+
* five exposed Toggles. Contract: registry/toggle-group/registry.json.
|
|
7
|
+
*
|
|
8
|
+
* <div class="pui-toggle-group" role="group" aria-label="Library filters">
|
|
9
|
+
* <button class="pui-toggle" aria-pressed="true">All</button> …</div>
|
|
10
|
+
*
|
|
11
|
+
* Variant / Size live on the toggles themselves (outline · --filled; --small); the group only spaces and wraps.
|
|
12
|
+
* Rule two to seven items; past seven it is a Select or a Combobox.
|
|
13
|
+
* Keyboard as Button group: role="group" takes none of its children's keys, so every toggle keeps its own
|
|
14
|
+
* tab stop and its own Space. Nothing to write (3.5.3).
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
.pui-toggle-group {
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
flex-wrap: wrap;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: var(--pui-space-8);
|
|
22
|
+
}
|