@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
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pepperui/css",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Pepper UI components as framework-free CSS \u2014 the Mobupps design system for Paggy, the site's Blade and prototype pages and the quarter builder (DL-7). Every class is built on @pepperui/tokens; no literal colour anywhere (item 2.2.4, stylelint).",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"private": false,
|
|
7
|
+
"type": "module",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"src",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"style": "./dist/pepper-ui.css",
|
|
14
|
+
"main": "./dist/pepper-ui.css",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": "./dist/pepper-ui.css",
|
|
17
|
+
"./src": "./src/index.css",
|
|
18
|
+
"./src/*": "./src/*"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"@pepperui/tokens": "^1.2.0"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+ssh://git@bitbucket.org/rashidmobupps/pepper-ui.git",
|
|
29
|
+
"directory": "packages/css"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"css",
|
|
33
|
+
"design-system",
|
|
34
|
+
"components",
|
|
35
|
+
"mobupps",
|
|
36
|
+
"pepper-ui"
|
|
37
|
+
]
|
|
38
|
+
}
|
package/src/base.css
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/* base.css — what every Pepper UI class shares. Loaded first.
|
|
2
|
+
*
|
|
3
|
+
* Nothing here resets the page: this file lives beside Bootstrap, CoreUI and a consumer's own
|
|
4
|
+
* CSS (Paggy's app.css, the site's styles.css), so it touches only its own classes and a few
|
|
5
|
+
* inherited custom properties. Every value is a token from @pepperui/tokens (tokens.css must
|
|
6
|
+
* be loaded before this file).
|
|
7
|
+
*
|
|
8
|
+
* The class grammar (D52, 2026-09-08): `pui-` prefix + BEM. Block = the registry item's name
|
|
9
|
+
* (`.pui-button`), element = `__part`, modifier = `--value` where the value is the Figma
|
|
10
|
+
* variant option verbatim (`.pui-button--secondary`, `.pui-input--small`). States are the
|
|
11
|
+
* browser's (:hover, :focus-visible, :active, :disabled) and, for scripted states, the ARIA
|
|
12
|
+
* attribute the JavaScript already sets (`[aria-pressed="true"]`, `[aria-invalid="true"]`,
|
|
13
|
+
* `[aria-current]`, `[data-state="open"]`). Booleans (`Has icon`) are the presence of the part.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
:root {
|
|
17
|
+
/* The face. Onest is the Cyrillic companion (D39): a page or a block marked lang="ru"
|
|
18
|
+
switches every Pepper UI class to it through inheritance. */
|
|
19
|
+
--pui-font-family: var(--pui-font-family-poppins);
|
|
20
|
+
|
|
21
|
+
/* The focus ring — a SOLID 2 px line in border/focus, with the site's soft halo behind it (3.5.2,
|
|
22
|
+
2026-09-09). One place, so every control agrees.
|
|
23
|
+
Until this unit the ring was the site's `0 0 0 3px rgba(106,102,228,.15)` (styles.css:646) alone
|
|
24
|
+
— border/focus at 15 %. Composited that paints #e9e8fb, which reads **1.21 against surface/page,
|
|
25
|
+
1.19 on a card and 1.12 against the primary button's fill it hugs**, where Pajamas (adopted at
|
|
26
|
+
07_PRINCIPLES §Stop 2) and WCAG 1.4.11 ask 3:1 of a focus indicator against its adjacent colours,
|
|
27
|
+
and WCAG 2.4.13 asks for a 2 CSS px perimeter. §Stop 1 had already named this as the one thing we
|
|
28
|
+
must override in the base we chose, where it arrives as shadcn's `ring-1 ring-ring/50`; the
|
|
29
|
+
library had inherited the site's version of the same mistake.
|
|
30
|
+
The solid line is `border/focus` #6a66e4 — **4.53 on the page, 4.06 on a card, 4.05 on a sunken
|
|
31
|
+
well, 3.72 on the dark surface, and 3.22 against border/default**, the control edge it hugs. The
|
|
32
|
+
halo is the site's own colour and value, moved outside the line, so the ring still reads as the
|
|
33
|
+
site's; `scripts/focus_ring.py` measures every number above and every primitive that uses it. */
|
|
34
|
+
--pui-ring-color: color-mix(in srgb, var(--pui-border-focus) 15%, transparent);
|
|
35
|
+
--pui-ring-error-color: color-mix(in srgb, var(--pui-border-error) 10%, transparent);
|
|
36
|
+
--pui-ring: 0 0 0 2px var(--pui-border-focus), 0 0 0 5px var(--pui-ring-color);
|
|
37
|
+
/* An invalid control carries `--pui-ring-error` AT REST — the site's soft red glow (styles.css:650)
|
|
38
|
+
is how a field says it is wrong, and it is decoration, not a focus indicator. So it stays a halo:
|
|
39
|
+
giving it a solid line would leave a focused error field with nothing new to show, which is what
|
|
40
|
+
3.5.2 measured on 2026-09-09 (the error rules sit after the focus rules in every one of the six
|
|
41
|
+
form files, so they won, and Tabbing into an invalid input changed 1.5 worth of pixels).
|
|
42
|
+
`--pui-ring-error-focus` is what such a control takes WHEN IT HAS FOCUS: the same solid 2 px line
|
|
43
|
+
as the focus ring but in border/error, so focus is visible and the error signal is not overruled
|
|
44
|
+
by a violet ring. 4.58 against surface/page, 3.9 against the halo it replaces. */
|
|
45
|
+
--pui-ring-error: 0 0 0 3px var(--pui-ring-error-color);
|
|
46
|
+
--pui-ring-error-focus: 0 0 0 2px var(--pui-border-error), 0 0 0 5px var(--pui-ring-error-color);
|
|
47
|
+
/* The same ring for a control whose own box is full-bleed in its container — a menu row, a list
|
|
48
|
+
item — where an outset shadow is clipped by the container it fills. Same colour, same 2 px. */
|
|
49
|
+
--pui-ring-inset: inset 0 0 0 2px var(--pui-border-focus);
|
|
50
|
+
|
|
51
|
+
/* Ghost hover — Paggy's `rgba(0,0,0,.05)` (app.css .btn--ghost:hover) is surface/sunken in the
|
|
52
|
+
library; the library's value wins so a ghost on a card reads the same as a ghost on the page. */
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:lang(ru) {
|
|
56
|
+
--pui-font-family: var(--pui-font-family-cyrillic);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* An icon slot. Lucide SVGs use stroke="currentColor", so a glyph takes the text colour of
|
|
60
|
+
whatever it sits in. Sizes are size/icon/* (16 · 24 · 32 · 48); 16 is the default because
|
|
61
|
+
every control slot in the library is 16. */
|
|
62
|
+
.pui-icon {
|
|
63
|
+
display: inline-block;
|
|
64
|
+
flex: none;
|
|
65
|
+
width: var(--pui-size-icon-16);
|
|
66
|
+
height: var(--pui-size-icon-16);
|
|
67
|
+
vertical-align: middle;
|
|
68
|
+
}
|
|
69
|
+
.pui-icon--24 { width: var(--pui-size-icon-24); height: var(--pui-size-icon-24); }
|
|
70
|
+
.pui-icon--32 { width: var(--pui-size-icon-32); height: var(--pui-size-icon-32); }
|
|
71
|
+
.pui-icon--48 { width: var(--pui-size-icon-48); height: var(--pui-size-icon-48); }
|
|
72
|
+
.pui-icon > svg {
|
|
73
|
+
display: block;
|
|
74
|
+
width: 100%;
|
|
75
|
+
height: 100%;
|
|
76
|
+
/* Lucide's own attributes, so a <use> from a sprite draws the same as an inline glyph. */
|
|
77
|
+
fill: none;
|
|
78
|
+
stroke: currentColor;
|
|
79
|
+
stroke-width: 2;
|
|
80
|
+
stroke-linecap: round;
|
|
81
|
+
stroke-linejoin: round;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Visually hidden, still read — for the native input inside Checkbox, Radio and Switch, and
|
|
85
|
+
for an icon button's name when there is no tooltip. */
|
|
86
|
+
.pui-sr-only {
|
|
87
|
+
position: absolute;
|
|
88
|
+
width: 1px;
|
|
89
|
+
height: 1px;
|
|
90
|
+
padding: 0;
|
|
91
|
+
margin: -1px;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
clip: rect(0, 0, 0, 0);
|
|
94
|
+
white-space: nowrap;
|
|
95
|
+
border: 0;
|
|
96
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* alert-dialog.css — Alert dialog (10_COMPONENTS.md § Feedback and status).
|
|
2
|
+
*
|
|
3
|
+
* A dialog that demands an answer: one question, Cancel and one confirming verb, over the Scrim (dialog.css); no
|
|
4
|
+
* close, no click-away. Paggy's confirm (me.html:244–252, app.css:515–530 — 440 wide), MAFO's Attention modals,
|
|
5
|
+
* shadcn's AlertDialog. surface/card, radius/16, padding 24, gap 16, elevation/modal; the title Medium 18, the
|
|
6
|
+
* description 14 text/subtle; the footer a Button group aligned right. Figma 126:69: Size small 440 / medium 480.
|
|
7
|
+
* Contract: registry/alert-dialog/registry.json.
|
|
8
|
+
*
|
|
9
|
+
* <div class="pui-scrim"><div class="pui-alert-dialog" role="alertdialog" aria-modal="true" aria-labelledby="t">
|
|
10
|
+
* <div class="pui-alert-dialog__texts"><h2 class="pui-alert-dialog__title" id="t">Delete “Q3 results”?</h2>
|
|
11
|
+
* <p class="pui-alert-dialog__description">This cannot be undone.</p></div>
|
|
12
|
+
* <div class="pui-button-group pui-alert-dialog__actions">
|
|
13
|
+
* <button class="pui-button pui-button--secondary">Cancel</button>
|
|
14
|
+
* <button class="pui-button pui-button--danger">Delete</button></div></div></div>
|
|
15
|
+
*
|
|
16
|
+
* Size (none) small 440 · --medium 480
|
|
17
|
+
* Rule the confirming button carries the verb, never OK; a destructive verb is Button - danger.
|
|
18
|
+
* Keyboard as Dialog: focus in on open, held while open, Escape closes and returns it to the opener (3.5.3).
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
.pui-alert-dialog {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
gap: var(--pui-space-16);
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
width: 440px;
|
|
27
|
+
max-width: calc(100vw - var(--pui-space-32));
|
|
28
|
+
padding: var(--pui-space-24);
|
|
29
|
+
border-radius: var(--pui-radius-16);
|
|
30
|
+
background: var(--pui-surface-card);
|
|
31
|
+
box-shadow: var(--pui-elevation-modal);
|
|
32
|
+
color: var(--pui-text-default);
|
|
33
|
+
font-family: var(--pui-font-family);
|
|
34
|
+
}
|
|
35
|
+
.pui-alert-dialog--medium { width: 480px; }
|
|
36
|
+
.pui-alert-dialog__texts { display: flex; flex-direction: column; gap: var(--pui-space-8); }
|
|
37
|
+
.pui-alert-dialog__title {
|
|
38
|
+
margin: 0;
|
|
39
|
+
font-size: var(--pui-font-size-18);
|
|
40
|
+
font-weight: var(--pui-font-weight-500);
|
|
41
|
+
line-height: var(--pui-font-line-height-normal);
|
|
42
|
+
}
|
|
43
|
+
.pui-alert-dialog__description {
|
|
44
|
+
margin: 0;
|
|
45
|
+
color: var(--pui-text-caption);
|
|
46
|
+
font-size: var(--pui-font-size-14);
|
|
47
|
+
font-weight: var(--pui-font-weight-400);
|
|
48
|
+
line-height: var(--pui-font-line-height-normal);
|
|
49
|
+
}
|
|
50
|
+
.pui-alert-dialog__actions { align-self: flex-end; }
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* alert.css — Alert (10_COMPONENTS.md § Feedback and status).
|
|
2
|
+
*
|
|
3
|
+
* A message that stays on the page. Colour is status/{tone} bg, fg and solid (M1.1, from slide.css:287 and the site's
|
|
4
|
+
* status greens and red); the box is shadcn's alert.tsx: radius 8, padding 12 / 16, a 16 px icon column, a 12 gap, a
|
|
5
|
+
* Medium title over a Regular description. Soft = the status bg with icon, title and description in its fg; outline
|
|
6
|
+
* = surface/page, border/default, the status solid on the icon. Neutral soft is surface/sunken. No states.
|
|
7
|
+
* Figma 59:2: Tone × Style. Contract: registry/alert/registry.json. Toast - status (toast.css) is this box, floating.
|
|
8
|
+
*
|
|
9
|
+
* <div class="pui-alert pui-alert--success" role="status">
|
|
10
|
+
* <span class="pui-icon pui-alert__icon">…circle-check…</span>
|
|
11
|
+
* <div class="pui-alert__body"><p class="pui-alert__title">Deck published</p>
|
|
12
|
+
* <p class="pui-alert__description">Anyone with the link can open it.</p></div>
|
|
13
|
+
* <button class="pui-icon-button pui-icon-button--ghost pui-icon-button--small pui-alert__close" aria-label="Dismiss">…x…</button></div>
|
|
14
|
+
*
|
|
15
|
+
* Tone (none) neutral · --info · --success · --warning · --danger ← the tone picks the glyph
|
|
16
|
+
* Style (none) soft · --outline
|
|
17
|
+
* Parts __icon (16) · __body · __title (14 Medium) · __description (14 Regular) · __close (a ghost icon button)
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
.pui-alert,
|
|
21
|
+
.pui-toast-status {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: flex-start;
|
|
24
|
+
gap: var(--pui-space-12);
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
width: 100%;
|
|
27
|
+
padding: var(--pui-space-12) var(--pui-space-16);
|
|
28
|
+
border: 1px solid transparent;
|
|
29
|
+
border-radius: var(--pui-radius-8);
|
|
30
|
+
background: var(--pui-surface-sunken);
|
|
31
|
+
color: var(--pui-text-default);
|
|
32
|
+
font-family: var(--pui-font-family);
|
|
33
|
+
font-size: var(--pui-font-size-14);
|
|
34
|
+
line-height: var(--pui-font-line-height-normal);
|
|
35
|
+
}
|
|
36
|
+
.pui-alert__icon,
|
|
37
|
+
.pui-toast-status__icon {
|
|
38
|
+
flex: none;
|
|
39
|
+
width: var(--pui-size-icon-16);
|
|
40
|
+
height: var(--pui-size-icon-16);
|
|
41
|
+
margin-top: var(--pui-space-2);
|
|
42
|
+
color: var(--pui-text-muted);
|
|
43
|
+
}
|
|
44
|
+
.pui-alert__body,
|
|
45
|
+
.pui-toast-status__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: var(--pui-space-4); }
|
|
46
|
+
.pui-alert__title,
|
|
47
|
+
.pui-toast-status__title { margin: 0; font-weight: var(--pui-font-weight-500); }
|
|
48
|
+
.pui-alert__description,
|
|
49
|
+
.pui-toast-status__description { margin: 0; font-weight: var(--pui-font-weight-400); }
|
|
50
|
+
.pui-alert__close,
|
|
51
|
+
.pui-toast-status__close { flex: none; margin: calc(var(--pui-space-4) * -1) calc(var(--pui-space-8) * -1) calc(var(--pui-space-4) * -1) 0; }
|
|
52
|
+
|
|
53
|
+
/* Soft: the status ground, everything in its ink. */
|
|
54
|
+
.pui-alert--info { background: var(--pui-status-info-bg); color: var(--pui-status-info-fg); }
|
|
55
|
+
.pui-alert--success { background: var(--pui-status-success-bg); color: var(--pui-status-success-fg); }
|
|
56
|
+
.pui-alert--warning { background: var(--pui-status-warning-bg); color: var(--pui-status-warning-fg); }
|
|
57
|
+
.pui-alert--danger { background: var(--pui-status-danger-bg); color: var(--pui-status-danger-fg); }
|
|
58
|
+
.pui-alert--info .pui-alert__icon,
|
|
59
|
+
.pui-alert--success .pui-alert__icon,
|
|
60
|
+
.pui-alert--warning .pui-alert__icon,
|
|
61
|
+
.pui-alert--danger .pui-alert__icon { color: inherit; }
|
|
62
|
+
|
|
63
|
+
/* Outline: the page's surface, the solid on the glyph only — the concept rows' look; the description muted. */
|
|
64
|
+
.pui-alert--outline,
|
|
65
|
+
.pui-toast-status {
|
|
66
|
+
background: var(--pui-surface-page);
|
|
67
|
+
border-color: var(--pui-border-default);
|
|
68
|
+
color: var(--pui-text-default);
|
|
69
|
+
}
|
|
70
|
+
.pui-alert--outline .pui-alert__description,
|
|
71
|
+
.pui-toast-status__description { color: var(--pui-text-muted); }
|
|
72
|
+
.pui-alert--outline.pui-alert--info .pui-alert__icon, .pui-toast-status--info .pui-toast-status__icon { color: var(--pui-status-info-solid); }
|
|
73
|
+
.pui-alert--outline.pui-alert--success .pui-alert__icon, .pui-toast-status--success .pui-toast-status__icon { color: var(--pui-status-success-solid); }
|
|
74
|
+
.pui-alert--outline.pui-alert--warning .pui-alert__icon, .pui-toast-status--warning .pui-toast-status__icon { color: var(--pui-status-warning-solid); }
|
|
75
|
+
.pui-alert--outline.pui-alert--danger .pui-alert__icon, .pui-toast-status--danger .pui-toast-status__icon { color: var(--pui-status-danger-solid); }
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* avatar.css — Avatar · Avatar - square (10_COMPONENTS.md § Content blocks).
|
|
2
|
+
*
|
|
3
|
+
* A person, as a photo or two initials. Paggy's .avatar (app.css:1345–1356: 28 / 40 / 96, 600 initials, 'photo when
|
|
4
|
+
* uploaded, otherwise initials on the secondary palette — visible but calm'), the concept file's Avatar/User master
|
|
5
|
+
* (36 in the shell) and shadcn's avatar.tsx. Sizes 24 · 28 · 36 · 40 · 96; initials 12 / 12 / 15 / 15 / 36 SemiBold;
|
|
6
|
+
* Content photo (a user glyph on surface/sunken until an image replaces it) or initials in blue / red / yellow —
|
|
7
|
+
* avatar/{tone}, hue 200 on hue 600. Square (radius/8) is the chat's, matching Echo's icon chip. No states.
|
|
8
|
+
* Figma: 64:108 · 65:102. Contract: registry/avatar/registry.json.
|
|
9
|
+
*
|
|
10
|
+
* <span class="pui-avatar pui-avatar--blue">FK</span>
|
|
11
|
+
* <span class="pui-avatar pui-avatar--40"><img src="…" alt="Fedor"></span>
|
|
12
|
+
* <span class="pui-avatar pui-avatar--square pui-avatar--yellow pui-avatar--24">AI</span>
|
|
13
|
+
*
|
|
14
|
+
* Size --24 · --28 · (none) 36 · --40 · --96
|
|
15
|
+
* Content (none) photo / glyph on sunken · --blue · --red · --yellow
|
|
16
|
+
* Shape (none) round · --square
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
.pui-avatar {
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
flex: none;
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
width: var(--pui-size-control-medium);
|
|
26
|
+
height: var(--pui-size-control-medium);
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
border-radius: var(--pui-radius-full);
|
|
29
|
+
background: var(--pui-surface-sunken);
|
|
30
|
+
color: var(--pui-text-muted);
|
|
31
|
+
font-family: var(--pui-font-family);
|
|
32
|
+
font-size: var(--pui-font-size-15);
|
|
33
|
+
font-weight: var(--pui-font-weight-600);
|
|
34
|
+
line-height: 1;
|
|
35
|
+
text-transform: uppercase;
|
|
36
|
+
user-select: none;
|
|
37
|
+
}
|
|
38
|
+
.pui-avatar > img { display: block; width: 100%; height: 100%; object-fit: cover; }
|
|
39
|
+
.pui-avatar > .pui-icon { width: 50%; height: 50%; }
|
|
40
|
+
.pui-avatar--square { border-radius: var(--pui-radius-8); }
|
|
41
|
+
.pui-avatar--blue { background: var(--pui-avatar-blue-bg); color: var(--pui-avatar-blue-fg); }
|
|
42
|
+
.pui-avatar--red { background: var(--pui-avatar-red-bg); color: var(--pui-avatar-red-fg); }
|
|
43
|
+
.pui-avatar--yellow { background: var(--pui-avatar-yellow-bg); color: var(--pui-avatar-yellow-fg); }
|
|
44
|
+
.pui-avatar--24 { width: var(--pui-space-24); height: var(--pui-space-24); font-size: var(--pui-font-size-12); }
|
|
45
|
+
.pui-avatar--28 { width: var(--pui-size-control-small); height: var(--pui-size-control-small); font-size: var(--pui-font-size-12); }
|
|
46
|
+
.pui-avatar--40 { width: var(--pui-space-40); height: var(--pui-space-40); }
|
|
47
|
+
.pui-avatar--96 { width: 96px; height: 96px; font-size: var(--pui-font-size-36); }
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* badge.css — Badge · Chip (10_COMPONENTS.md § Feedback and status).
|
|
2
|
+
*
|
|
3
|
+
* Badge is the small square label: the site's tag (styles.css:1182–1197 — padding 2 / 4, radius 4, 12 Regular) and
|
|
4
|
+
* the deck's slide badge (slide.css:273–288 — 18 Medium, padding 8 / 12; `.badge--xs` 14 Regular, 4 / 8). Chip is the
|
|
5
|
+
* pill: Paggy's app badge (app.css:88–96 — 14 Medium for its 13, padding 4 / 12 for its 4 / 10, radius 999 — chip/radius, 'labels
|
|
6
|
+
* are pills, actions are squares'); shadcn's Badge is the same pill. Tint and ink are tint/{tone} (hue 200 on 300 for
|
|
7
|
+
* blue and red, yellow-300 on yellow-600, neutral-200 on neutral-600, green-100 on green-600); dark is
|
|
8
|
+
* surface/inverse on text/on-inverse. No states — a label is not interactive. Figma: Badge 56:2 · Chip 56:130.
|
|
9
|
+
* Contract: registry/badge/registry.json.
|
|
10
|
+
*
|
|
11
|
+
* <span class="pui-badge pui-badge--green">Done</span>
|
|
12
|
+
* <span class="pui-chip pui-chip--blue pui-chip--small"><span class="pui-icon pui-chip__icon">…</span>Beta</span>
|
|
13
|
+
*
|
|
14
|
+
* Tone (none) neutral · --blue · --red · --yellow · --green · --dark ← fixed; never follows the accent
|
|
15
|
+
* Badge --small 12 Regular 2 / 4 · (none) medium 14 Regular 4 / 8 · --large 18 Medium 8 / 12
|
|
16
|
+
* Chip --small 12 Regular 2 / 8 · (none) medium 14 Medium 4 / 12
|
|
17
|
+
* Parts __icon — a 16 px leading glyph at a space/4 gap (Q4). It takes the label's ink, because it
|
|
18
|
+
* inherits currentColor and nothing here overrides it; in Figma the same rule costs a recolour
|
|
19
|
+
* on every swapped Icon, which is why it is written in both contracts (D92, Fedor 2026-09-16).
|
|
20
|
+
* Rule the pills-vs-squares test (2.2.3) reads these two radii.
|
|
21
|
+
* Rule NO BORDER, on any tone, in any size — a label is flush. The library's one ring is not the
|
|
22
|
+
* Badge's: a KPI tile rings its DELTA with kpi/delta/ring because the delta sits on the tile's
|
|
23
|
+
* tint (kpi-tile.css, D92). css_rules_test.py fails on a border or a ring declared here.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
.pui-badge,
|
|
27
|
+
.pui-chip {
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: var(--pui-space-4);
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
padding: var(--pui-space-4) var(--pui-space-8);
|
|
33
|
+
border-radius: var(--pui-radius-4);
|
|
34
|
+
background: var(--pui-tint-neutral-bg);
|
|
35
|
+
color: var(--pui-tint-neutral-fg);
|
|
36
|
+
font-family: var(--pui-font-family);
|
|
37
|
+
font-size: var(--pui-font-size-14);
|
|
38
|
+
font-weight: var(--pui-font-weight-400);
|
|
39
|
+
line-height: var(--pui-font-line-height-normal);
|
|
40
|
+
letter-spacing: var(--pui-font-letter-spacing-normal);
|
|
41
|
+
white-space: nowrap;
|
|
42
|
+
vertical-align: middle;
|
|
43
|
+
}
|
|
44
|
+
.pui-chip {
|
|
45
|
+
padding: var(--pui-space-4) var(--pui-space-12);
|
|
46
|
+
border-radius: var(--pui-chip-radius);
|
|
47
|
+
font-weight: var(--pui-font-weight-500);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.pui-badge--blue, .pui-chip--blue { background: var(--pui-tint-blue-bg); color: var(--pui-tint-blue-fg); }
|
|
51
|
+
.pui-badge--red, .pui-chip--red { background: var(--pui-tint-red-bg); color: var(--pui-tint-red-fg); }
|
|
52
|
+
.pui-badge--yellow, .pui-chip--yellow { background: var(--pui-tint-yellow-bg); color: var(--pui-tint-yellow-fg); }
|
|
53
|
+
.pui-badge--green, .pui-chip--green { background: var(--pui-tint-green-bg); color: var(--pui-tint-green-fg); }
|
|
54
|
+
.pui-badge--dark, .pui-chip--dark { background: var(--pui-surface-inverse); color: var(--pui-text-on-inverse); }
|
|
55
|
+
|
|
56
|
+
.pui-badge--small { padding: var(--pui-space-2) var(--pui-space-4); font-size: var(--pui-font-size-12); }
|
|
57
|
+
.pui-badge--large { padding: var(--pui-space-8) var(--pui-space-12); font-size: var(--pui-font-size-18); font-weight: var(--pui-font-weight-500); }
|
|
58
|
+
.pui-chip--small { padding: var(--pui-space-2) var(--pui-space-8); font-size: var(--pui-font-size-12); font-weight: var(--pui-font-weight-400); }
|
|
59
|
+
|
|
60
|
+
.pui-badge__icon,
|
|
61
|
+
.pui-chip__icon { flex: none; width: var(--pui-size-icon-16); height: var(--pui-size-icon-16); }
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* breadcrumb.css — Breadcrumb · Breadcrumb item (10_COMPONENTS.md § Navigation and overlay).
|
|
2
|
+
*
|
|
3
|
+
* Where you are, as the path that got you here — Home › Optimisations › Postback control: MAFO's CBreadcrumb from the
|
|
4
|
+
* route names (AppBreadcrumb.js), the concepts' Topbar, shadcn's Breadcrumb. A link in text/subtle (the Figma binds
|
|
5
|
+
* the muted step) that turns to ink on hover, the current page in ink; 14 (body/x-small), padding 2, radius 4 for the
|
|
6
|
+
* ring; chevron-right 16 in text/subtle between items at a space/8 gap. Figma: 181:16 · 181:15.
|
|
7
|
+
* Contract: registry/breadcrumb/registry.json.
|
|
8
|
+
*
|
|
9
|
+
* <nav class="pui-breadcrumb" aria-label="Breadcrumb"><ol class="pui-breadcrumb__list">
|
|
10
|
+
* <li><a class="pui-breadcrumb__item" href="/">Home</a></li>
|
|
11
|
+
* <li><span class="pui-icon pui-breadcrumb__separator">…chevron-right…</span></li>
|
|
12
|
+
* <li><span class="pui-breadcrumb__item" aria-current="page">Postback control</span></li></ol></nav>
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
.pui-breadcrumb { font-family: var(--pui-font-family); }
|
|
16
|
+
.pui-breadcrumb__list {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-wrap: wrap;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: var(--pui-space-8);
|
|
21
|
+
margin: 0;
|
|
22
|
+
padding: 0;
|
|
23
|
+
list-style: none;
|
|
24
|
+
}
|
|
25
|
+
.pui-breadcrumb__list > li { display: inline-flex; align-items: center; }
|
|
26
|
+
.pui-breadcrumb__item {
|
|
27
|
+
display: inline-block;
|
|
28
|
+
padding: var(--pui-space-2);
|
|
29
|
+
border-radius: var(--pui-radius-4);
|
|
30
|
+
color: var(--pui-text-muted);
|
|
31
|
+
font-size: var(--pui-font-size-14);
|
|
32
|
+
font-weight: var(--pui-font-weight-400);
|
|
33
|
+
line-height: var(--pui-font-line-height-normal);
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
transition: color var(--pui-motion-state) var(--pui-motion-easing);
|
|
36
|
+
}
|
|
37
|
+
a.pui-breadcrumb__item:hover { color: var(--pui-text-default); }
|
|
38
|
+
a.pui-breadcrumb__item:focus-visible { outline: none; box-shadow: var(--pui-ring); }
|
|
39
|
+
.pui-breadcrumb__item[aria-current] { color: var(--pui-text-default); }
|
|
40
|
+
.pui-breadcrumb__separator { width: var(--pui-size-icon-16); height: var(--pui-size-icon-16); color: var(--pui-text-subtle); }
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/* bullet-list.css — Bullet list · Bullet list item (10_COMPONENTS.md § Content blocks).
|
|
2
|
+
*
|
|
3
|
+
* Points in a column — Paggy's .l17-bullets, the Deck kit's bull_list rows, the site's .bullet-list — with the one
|
|
4
|
+
* rule that gives the component its reason: the rows are 8 px apart, on every slide and every layout, and no layout
|
|
5
|
+
* may override it (Fedor 2026-08-12, locked; bullet-list/gap is the list's gap and the rules test reads it). A row:
|
|
6
|
+
* padding space/12, gap space/12, radius 8 (the sources' 9 — stated); Style check (circle-check in ink — the check
|
|
7
|
+
* stays black, Fedor 2026-07-09) or dot (Paggy's 9 px accent/main circle); Size regular (body/large) or small
|
|
8
|
+
* (body/medium); the check sits 2 px down on regular and flush on small. Figma: 154:144 · 154:29.
|
|
9
|
+
* Contract: registry/bullet-list/registry.json.
|
|
10
|
+
*
|
|
11
|
+
* <ul class="pui-bullet-list">
|
|
12
|
+
* <li class="pui-bullet-list__item"><span class="pui-icon pui-icon--24 pui-bullet-list__glyph">…circle-check…</span>A/B testing and creative experiments</li></ul>
|
|
13
|
+
* <ul class="pui-bullet-list pui-bullet-list--dot pui-bullet-list--small"><li class="pui-bullet-list__item"><span class="pui-bullet-list__glyph"></span>…</li></ul>
|
|
14
|
+
*
|
|
15
|
+
* Style (none) check · --dot
|
|
16
|
+
* Size (none) regular · --small
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
.pui-bullet-list {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
gap: var(--pui-bullet-list-gap);
|
|
23
|
+
margin: 0;
|
|
24
|
+
padding: 0;
|
|
25
|
+
list-style: none;
|
|
26
|
+
color: var(--pui-text-default);
|
|
27
|
+
font-family: var(--pui-font-family);
|
|
28
|
+
}
|
|
29
|
+
.pui-bullet-list__item {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: flex-start;
|
|
32
|
+
gap: var(--pui-space-12);
|
|
33
|
+
padding: var(--pui-space-12);
|
|
34
|
+
border-radius: var(--pui-radius-8);
|
|
35
|
+
font-size: var(--pui-type-body-large-font-size);
|
|
36
|
+
font-weight: var(--pui-font-weight-400);
|
|
37
|
+
line-height: var(--pui-font-line-height-normal);
|
|
38
|
+
}
|
|
39
|
+
.pui-bullet-list__glyph {
|
|
40
|
+
display: inline-flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
flex: none;
|
|
44
|
+
width: var(--pui-size-icon-24);
|
|
45
|
+
height: var(--pui-size-icon-24);
|
|
46
|
+
margin-top: var(--pui-space-2);
|
|
47
|
+
color: var(--pui-text-default);
|
|
48
|
+
}
|
|
49
|
+
.pui-bullet-list--dot .pui-bullet-list__glyph { margin-top: var(--pui-space-2); }
|
|
50
|
+
.pui-bullet-list--dot .pui-bullet-list__glyph::before {
|
|
51
|
+
content: "";
|
|
52
|
+
width: 9px; /* Paggy's .bullets dot */
|
|
53
|
+
height: 9px;
|
|
54
|
+
border-radius: var(--pui-radius-full);
|
|
55
|
+
background: var(--pui-accent-main);
|
|
56
|
+
}
|
|
57
|
+
.pui-bullet-list--small .pui-bullet-list__item { font-size: var(--pui-type-body-medium-font-size); }
|
|
58
|
+
.pui-bullet-list--small .pui-bullet-list__glyph { margin-top: 0; }
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* button-group.css — Button group (10_COMPONENTS.md § Actions).
|
|
2
|
+
*
|
|
3
|
+
* A row or column of buttons that belong together. Standard keeps them space/8 apart (Dialog's footer; Paggy's 10
|
|
4
|
+
* and the site's 12 stated); connected joins them into one control — gap 0, inner corners 0, one shared border —
|
|
5
|
+
* Bootstrap's / shadcn's button group. Figma 116:182: Variant standard / connected × Orientation × Size (the size
|
|
6
|
+
* is the buttons' own). Sources: MAFO OrganisationChart.js:155, Paggy .modal .row, the site's .cookie-consent__actions,
|
|
7
|
+
* shadcn button-group.tsx. Contract: registry/button-group/registry.json.
|
|
8
|
+
*
|
|
9
|
+
* <div class="pui-button-group" role="group">
|
|
10
|
+
* <button class="pui-button pui-button--secondary">Export</button> …</div>
|
|
11
|
+
* <div class="pui-button-group pui-button-group--connected pui-button-group--vertical" role="group">…</div>
|
|
12
|
+
*
|
|
13
|
+
* Variant (none) standard · --connected
|
|
14
|
+
* Orientation (none) horizontal · --vertical
|
|
15
|
+
* Rules two to five buttons, one size; the primary — if any — is one and last; connected is for outlined
|
|
16
|
+
* buttons (flush primaries have no seams).
|
|
17
|
+
* Keyboard role="group" is a LABELLING role, not a composite: every button keeps its own tab stop and its
|
|
18
|
+
* own Enter / Space, which is what a person expects of adjacent buttons. Nothing to write (3.5.3).
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
.pui-button-group {
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: var(--pui-space-8);
|
|
25
|
+
}
|
|
26
|
+
.pui-button-group--vertical {
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
align-items: stretch;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.pui-button-group--connected { gap: 0; }
|
|
32
|
+
.pui-button-group--connected > * { position: relative; }
|
|
33
|
+
.pui-button-group--connected > :focus-visible { z-index: 1; }
|
|
34
|
+
.pui-button-group--connected:not(.pui-button-group--vertical) > :not(:first-child) {
|
|
35
|
+
margin-inline-start: -1px;
|
|
36
|
+
border-start-start-radius: 0;
|
|
37
|
+
border-end-start-radius: 0;
|
|
38
|
+
}
|
|
39
|
+
.pui-button-group--connected:not(.pui-button-group--vertical) > :not(:last-child) {
|
|
40
|
+
border-start-end-radius: 0;
|
|
41
|
+
border-end-end-radius: 0;
|
|
42
|
+
}
|
|
43
|
+
.pui-button-group--connected.pui-button-group--vertical > :not(:first-child) {
|
|
44
|
+
margin-top: -1px;
|
|
45
|
+
border-top-left-radius: 0;
|
|
46
|
+
border-top-right-radius: 0;
|
|
47
|
+
}
|
|
48
|
+
.pui-button-group--connected.pui-button-group--vertical > :not(:last-child) {
|
|
49
|
+
border-bottom-left-radius: 0;
|
|
50
|
+
border-bottom-right-radius: 0;
|
|
51
|
+
}
|