@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.
Files changed (64) hide show
  1. package/README.md +123 -0
  2. package/dist/pepper-ui.css +5024 -0
  3. package/package.json +38 -0
  4. package/src/base.css +96 -0
  5. package/src/components/alert-dialog.css +50 -0
  6. package/src/components/alert.css +75 -0
  7. package/src/components/avatar.css +47 -0
  8. package/src/components/badge.css +61 -0
  9. package/src/components/breadcrumb.css +40 -0
  10. package/src/components/bullet-list.css +58 -0
  11. package/src/components/button-group.css +51 -0
  12. package/src/components/button.css +165 -0
  13. package/src/components/calendar.css +118 -0
  14. package/src/components/card.css +114 -0
  15. package/src/components/chat.css +473 -0
  16. package/src/components/checkbox.css +105 -0
  17. package/src/components/collapsible.css +121 -0
  18. package/src/components/combobox.css +71 -0
  19. package/src/components/command.css +62 -0
  20. package/src/components/date-picker.css +45 -0
  21. package/src/components/dialog.css +105 -0
  22. package/src/components/dropdown-menu.css +93 -0
  23. package/src/components/empty.css +67 -0
  24. package/src/components/field.css +68 -0
  25. package/src/components/footer.css +122 -0
  26. package/src/components/heading-pair.css +57 -0
  27. package/src/components/icon-button.css +29 -0
  28. package/src/components/icon-list.css +65 -0
  29. package/src/components/input-group.css +92 -0
  30. package/src/components/input.css +84 -0
  31. package/src/components/insight-block.css +63 -0
  32. package/src/components/item.css +67 -0
  33. package/src/components/kbd.css +36 -0
  34. package/src/components/kpi-tile.css +104 -0
  35. package/src/components/label.css +22 -0
  36. package/src/components/layout-utilities.css +115 -0
  37. package/src/components/logo-grid.css +125 -0
  38. package/src/components/native-select.css +78 -0
  39. package/src/components/navigation-menu.css +123 -0
  40. package/src/components/pagination.css +35 -0
  41. package/src/components/popover.css +48 -0
  42. package/src/components/progress.css +42 -0
  43. package/src/components/questionnaire.css +51 -0
  44. package/src/components/radio.css +41 -0
  45. package/src/components/select.css +179 -0
  46. package/src/components/sheet.css +67 -0
  47. package/src/components/sidebar.css +108 -0
  48. package/src/components/skeleton.css +38 -0
  49. package/src/components/slider.css +117 -0
  50. package/src/components/spinner.css +32 -0
  51. package/src/components/states.css +54 -0
  52. package/src/components/stepper.css +76 -0
  53. package/src/components/switch.css +98 -0
  54. package/src/components/table.css +139 -0
  55. package/src/components/tabs.css +104 -0
  56. package/src/components/textarea.css +16 -0
  57. package/src/components/toast.css +78 -0
  58. package/src/components/toggle-group.css +22 -0
  59. package/src/components/toggle.css +86 -0
  60. package/src/components/tooltip.css +54 -0
  61. package/src/components/topbar.css +36 -0
  62. package/src/components/typography.css +83 -0
  63. package/src/ground.css +78 -0
  64. package/src/index.css +77 -0
@@ -0,0 +1,121 @@
1
+ /* collapsible.css — Collapsible · Accordion · Accordion item (10_COMPONENTS.md § Navigation and overlay).
2
+ *
3
+ * Collapsible is one row that opens to show more — shadcn's collapsible.tsx on Base UI (D17): a trigger row, padding
4
+ * 8 / 0, the label at 14 Medium, a chevron-down in text/muted that turns when open; no border of its own. Accordion
5
+ * is the site's FAQ (echoai.css:1083–1146) as a component: Style site — padding 32 all round with a 32 gap, the
6
+ * question at 18 Medium, a 24 px plus that turns 45° into a cross when open, the answer 16 Regular text/muted at
7
+ * line-height 1.7 with padding 0 / 32 / 24, a 2 px border/default under the item; Style compact — shadcn's
8
+ * accordion.tsx: padding 16 / 0, 14 Medium, a 16 px chevron, the answer 14 text/muted with 16 under it, a 1 px rule.
9
+ * One open at a time is the code side's. The lines here are structural (a rule under each item) — the Separator test
10
+ * allows them by name. Figma: 254:2128 · 254:2173 · 254:2166. Contracts: registry/collapsible/registry.json,
11
+ * registry/accordion/registry.json.
12
+ *
13
+ * <details class="pui-collapsible"><summary class="pui-collapsible__trigger">Advanced settings
14
+ * <span class="pui-icon pui-collapsible__chevron">…chevron-down…</span></summary>
15
+ * <div class="pui-collapsible__content">…</div></details>
16
+ * <div class="pui-accordion">
17
+ * <details class="pui-accordion-item" open><summary class="pui-accordion-item__question">How does billing work?
18
+ * <span class="pui-accordion-item__marker" aria-hidden="true"></span></summary>
19
+ * <div class="pui-accordion-item__answer">…</div></details> …</div>
20
+ * <div class="pui-accordion pui-accordion--compact"> …the same items with a chevron in __marker… </div>
21
+ *
22
+ * A native <details> carries the open state ([open]); a scripted one uses [data-state="open"] on the item.
23
+ * Style (none) site · --compact (on the accordion)
24
+ */
25
+
26
+ .pui-collapsible { font-family: var(--pui-font-family); color: var(--pui-text-default); }
27
+ .pui-collapsible__trigger {
28
+ display: flex;
29
+ align-items: center;
30
+ justify-content: space-between;
31
+ gap: var(--pui-space-8);
32
+ padding: var(--pui-space-8) 0;
33
+ border-radius: var(--pui-radius-4);
34
+ font-size: var(--pui-font-size-14);
35
+ font-weight: var(--pui-font-weight-500);
36
+ line-height: var(--pui-font-line-height-normal);
37
+ list-style: none;
38
+ cursor: pointer;
39
+ user-select: none;
40
+ outline: none;
41
+ }
42
+ .pui-collapsible__trigger::-webkit-details-marker { display: none; }
43
+ .pui-collapsible__trigger:focus-visible { box-shadow: var(--pui-ring); }
44
+ .pui-collapsible__chevron {
45
+ flex: none;
46
+ width: var(--pui-size-icon-16);
47
+ height: var(--pui-size-icon-16);
48
+ color: var(--pui-text-muted);
49
+ transition: transform var(--pui-motion-state) var(--pui-motion-easing);
50
+ }
51
+ .pui-collapsible[open] .pui-collapsible__chevron,
52
+ .pui-collapsible[data-state="open"] .pui-collapsible__chevron { transform: rotate(180deg); }
53
+ .pui-collapsible__content { padding-bottom: var(--pui-space-8); font-size: var(--pui-font-size-14); line-height: var(--pui-font-line-height-normal); }
54
+
55
+ /* ── Accordion ───────────────────────────────────────────────────────────────────────────────── */
56
+ .pui-accordion { display: flex; flex-direction: column; width: 100%; font-family: var(--pui-font-family); color: var(--pui-text-default); }
57
+ .pui-accordion-item { border-bottom: 2px solid var(--pui-border-default); }
58
+ .pui-accordion-item__question {
59
+ display: flex;
60
+ align-items: center;
61
+ justify-content: space-between;
62
+ gap: var(--pui-space-32);
63
+ padding: var(--pui-space-32);
64
+ font-size: var(--pui-font-size-18);
65
+ font-weight: var(--pui-font-weight-500);
66
+ line-height: var(--pui-font-line-height-normal);
67
+ list-style: none;
68
+ cursor: pointer;
69
+ user-select: none;
70
+ outline: none;
71
+ }
72
+ .pui-accordion-item__question::-webkit-details-marker { display: none; }
73
+ .pui-accordion-item__question:focus-visible { box-shadow: var(--pui-ring); border-radius: var(--pui-radius-4); }
74
+ /* The site's plus: two 2 px bars of the ink in a 24 box, turned 45° into a cross when open. */
75
+ .pui-accordion-item__marker {
76
+ position: relative;
77
+ flex: none;
78
+ width: var(--pui-space-24);
79
+ height: var(--pui-space-24);
80
+ transition: transform var(--pui-motion-move) var(--pui-motion-easing);
81
+ }
82
+ .pui-accordion-item__marker::before,
83
+ .pui-accordion-item__marker::after {
84
+ content: "";
85
+ position: absolute;
86
+ top: 50%;
87
+ left: 50%;
88
+ width: var(--pui-space-16);
89
+ height: var(--pui-space-2);
90
+ background: currentColor;
91
+ transform: translate(-50%, -50%);
92
+ }
93
+ .pui-accordion-item__marker::after { transform: translate(-50%, -50%) rotate(90deg); }
94
+ .pui-accordion-item[open] .pui-accordion-item__marker,
95
+ .pui-accordion-item[data-state="open"] .pui-accordion-item__marker { transform: rotate(45deg); }
96
+ .pui-accordion-item__answer {
97
+ padding: 0 var(--pui-space-32) var(--pui-space-24);
98
+ color: var(--pui-text-muted);
99
+ font-size: var(--pui-font-size-16);
100
+ font-weight: var(--pui-font-weight-400);
101
+ line-height: var(--pui-font-line-height-loose);
102
+ }
103
+ .pui-accordion-item__answer > p { margin: 0; }
104
+
105
+ .pui-accordion--compact .pui-accordion-item { border-bottom-width: 1px; }
106
+ .pui-accordion--compact .pui-accordion-item__question {
107
+ gap: var(--pui-space-16);
108
+ padding: var(--pui-space-16) 0;
109
+ font-size: var(--pui-font-size-14);
110
+ }
111
+ .pui-accordion--compact .pui-accordion-item__marker { width: var(--pui-size-icon-16); height: var(--pui-size-icon-16); color: var(--pui-text-muted); }
112
+ .pui-accordion--compact .pui-accordion-item__marker::before,
113
+ .pui-accordion--compact .pui-accordion-item__marker::after { display: none; }
114
+ .pui-accordion--compact .pui-accordion-item__marker > .pui-icon { display: block; width: 100%; height: 100%; }
115
+ .pui-accordion--compact .pui-accordion-item[open] .pui-accordion-item__marker,
116
+ .pui-accordion--compact .pui-accordion-item[data-state="open"] .pui-accordion-item__marker { transform: rotate(180deg); }
117
+ .pui-accordion--compact .pui-accordion-item__answer {
118
+ padding: 0 0 var(--pui-space-16);
119
+ font-size: var(--pui-font-size-14);
120
+ line-height: var(--pui-font-line-height-normal);
121
+ }
@@ -0,0 +1,71 @@
1
+ /* combobox.css — Combobox · Combobox menu (10_COMPONENTS.md § Forms).
2
+ *
3
+ * A Select you can type into. The trigger is Select's (select.css pairs every selector with `.pui-combobox`) with
4
+ * chevrons-up-down in place of chevron-down — shadcn's cue that this one is typed into; Paggy's share-modal people
5
+ * search (app.css:1413) is the house precedent, the Cabinet's react-select what it replaces. The menu is Select
6
+ * menu's surface with shadcn's CommandInput on top: a search row (padding 8, gap 8, the glyph 16 in text/subtle, the
7
+ * query at 14, borderless) over a 1 px border/default line, the rows padded 4 above, an empty row ('No results.',
8
+ * padding 8, centred). Figma: 221:9 · 222:49. Contracts: registry/combobox/registry.json.
9
+ *
10
+ * <div class="pui-combobox">
11
+ * <input class="pui-combobox__value" role="combobox" aria-expanded="false" aria-controls="menu-id" aria-autocomplete="list" aria-label="Account" placeholder="Pick an account">
12
+ * (ARIA 1.2: the role, the expanded state and the name sit on the input, not on the box — axe, M2.3.5)
13
+ * <span class="pui-icon pui-combobox__chevron">…chevrons-up-down…</span></div>
14
+ * <div class="pui-combobox-menu">
15
+ * <div class="pui-combobox-menu__search"><span class="pui-icon">…search…</span><input aria-label="Search accounts" placeholder="Search…"></div>
16
+ * <div class="pui-combobox-menu__items" role="listbox"> …pui-select-item… </div>
17
+ * <div class="pui-combobox-menu__empty">No results.</div></div>
18
+ *
19
+ * Rule one row highlighted at a time — the first visible one when the list opens (data-highlighted).
20
+ * Keyboard the input holds the tab stop and carries aria-expanded, aria-controls and, while open,
21
+ * aria-activedescendant; every option in the popup takes tabindex="-1" (3.5.3). The script owes Down to
22
+ * open and move, Up / Down inside, Enter to select, Escape to close then clear.
23
+ */
24
+
25
+ .pui-combobox > input.pui-combobox__value {
26
+ margin: 0;
27
+ padding: 0;
28
+ border: 0;
29
+ background: transparent;
30
+ color: inherit;
31
+ font: inherit;
32
+ outline: none;
33
+ -webkit-appearance: none;
34
+ appearance: none;
35
+ }
36
+ .pui-combobox > input.pui-combobox__value::placeholder { color: var(--pui-text-caption); opacity: 1; }
37
+
38
+ .pui-combobox-menu { overflow: hidden; }
39
+ .pui-combobox-menu__search {
40
+ display: flex;
41
+ align-items: center;
42
+ gap: var(--pui-space-8);
43
+ padding: var(--pui-space-8);
44
+ border-bottom: 1px solid var(--pui-border-default);
45
+ color: var(--pui-text-subtle);
46
+ }
47
+ .pui-combobox-menu__search > .pui-icon { flex: none; }
48
+ .pui-combobox-menu__search > input {
49
+ flex: 1 1 auto;
50
+ min-width: 0;
51
+ margin: 0;
52
+ padding: 0;
53
+ border: 0;
54
+ background: transparent;
55
+ color: var(--pui-text-default);
56
+ font: inherit;
57
+ outline: none;
58
+ -webkit-appearance: none;
59
+ appearance: none;
60
+ }
61
+ .pui-combobox-menu__search > input::placeholder { color: var(--pui-text-caption); opacity: 1; }
62
+ /* 3.5.2 — the search input clears its own outline and had nothing in its place: focus was invisible.
63
+ The ring goes on the row (as Input group's does on its wrapper) and is the inset one, because the
64
+ menu clips (`.pui-combobox-menu { overflow: hidden }`). */
65
+ .pui-combobox-menu__search:focus-within { box-shadow: var(--pui-ring-inset); }
66
+ .pui-combobox-menu__items { padding-top: var(--pui-space-4); }
67
+ .pui-combobox-menu__empty {
68
+ padding: var(--pui-space-8);
69
+ color: var(--pui-text-muted);
70
+ text-align: center;
71
+ }
@@ -0,0 +1,62 @@
1
+ /* command.css — Command (10_COMPONENTS.md § Navigation and overlay).
2
+ *
3
+ * The ⌘K palette. shadcn's command.tsx on cmdk (D17 — MAFO's global search is the use): Dialog's surface
4
+ * (surface/page, radius/16, elevation/modal) at 512 over the Scrim, a 44 px search row (padding 12 / 16, the glyph in
5
+ * text/subtle, the query at 14, an Esc Kbd), a 1 px line, then groups of Menu items under 12 px group labels, a
6
+ * separator, an empty row ('No results found.'). At most eight rows before the list scrolls (cmdk's 300).
7
+ * Figma 250:1499. Contract: registry/command/registry.json.
8
+ *
9
+ * <div class="pui-command" role="dialog" aria-label="Command palette">
10
+ * <div class="pui-command__search"><span class="pui-icon">…search…</span><input placeholder="Type a command…"><kbd class="pui-kbd">Esc</kbd></div>
11
+ * <div class="pui-command__list">
12
+ * <div class="pui-dropdown-menu__group-label">Offers</div> …pui-menu-item…
13
+ * <div class="pui-dropdown-menu__separator"></div>
14
+ * <div class="pui-empty pui-empty--inline">No results found.</div></div></div>
15
+ * Keyboard the search input holds the tab stop; every row takes tabindex="-1" (3.5.3). The script owes Up / Down
16
+ * over the rows, Enter to run, Escape to close and return focus to whatever opened the palette.
17
+ */
18
+
19
+ .pui-command {
20
+ display: flex;
21
+ flex-direction: column;
22
+ box-sizing: border-box;
23
+ width: 512px;
24
+ max-width: calc(100vw - var(--pui-space-32));
25
+ overflow: hidden;
26
+ border-radius: var(--pui-radius-16);
27
+ background: var(--pui-surface-page);
28
+ box-shadow: var(--pui-elevation-modal);
29
+ color: var(--pui-text-default);
30
+ font-family: var(--pui-font-family);
31
+ font-size: var(--pui-font-size-14);
32
+ line-height: var(--pui-font-line-height-normal);
33
+ }
34
+ .pui-command__search {
35
+ display: flex;
36
+ align-items: center;
37
+ gap: var(--pui-space-8);
38
+ padding: var(--pui-space-12) var(--pui-space-16);
39
+ border-bottom: 1px solid var(--pui-border-default);
40
+ color: var(--pui-text-subtle);
41
+ }
42
+ .pui-command__search > .pui-icon { flex: none; }
43
+ .pui-command__search > input {
44
+ flex: 1 1 auto;
45
+ min-width: 0;
46
+ margin: 0;
47
+ padding: 0;
48
+ border: 0;
49
+ background: transparent;
50
+ color: var(--pui-text-default);
51
+ font: inherit;
52
+ outline: none;
53
+ -webkit-appearance: none;
54
+ appearance: none;
55
+ }
56
+ .pui-command__search > input::placeholder { color: var(--pui-text-caption); opacity: 1; }
57
+ .pui-command__search:focus-within { box-shadow: var(--pui-ring-inset); } /* 3.5.2, as the combobox menu's */
58
+ .pui-command__list {
59
+ max-height: 300px; /* cmdk's */
60
+ overflow-y: auto;
61
+ padding: var(--pui-space-8);
62
+ }
@@ -0,0 +1,45 @@
1
+ /* date-picker.css — Date picker (10_COMPONENTS.md § Forms).
2
+ *
3
+ * A date chosen on a Calendar that opens under a field. Paggy's Pepper date picker (app.css:1572, datepicker.js): the
4
+ * field stays a native date input (ISO value, dd/mm/yyyy typing) with the browser's indicator hidden and a Lucide
5
+ * calendar glyph in its place; the Calendar opens 4 px under it; a range is two Calendars side by side under one
6
+ * field. MAFO's react-datepicker and react-date-range are what it replaces; shadcn's Popover + Calendar is the code
7
+ * side. Figma 227:134. Contract: registry/date-picker/registry.json.
8
+ *
9
+ * <div class="pui-date-picker">
10
+ * <input class="pui-input pui-date-picker__field" type="date" aria-label="Start date" placeholder="dd/mm/yyyy">
11
+ * <span class="pui-icon pui-date-picker__icon">…calendar…</span>
12
+ * <div class="pui-date-picker__popup" hidden> …pui-calendar… </div></div>
13
+ *
14
+ * State open = the popup without [hidden] (Has calendar); the field's own states are Input's
15
+ * Rule mm/dd/yyyy nowhere in the house; the browser's own popup never.
16
+ */
17
+
18
+ .pui-date-picker {
19
+ position: relative;
20
+ display: inline-block;
21
+ width: 100%;
22
+ max-width: 280px;
23
+ }
24
+ .pui-date-picker__field { padding-inline-end: var(--pui-space-40); }
25
+ .pui-date-picker__field::-webkit-calendar-picker-indicator { display: none; -webkit-appearance: none; appearance: none; }
26
+ .pui-date-picker__field::-webkit-inner-spin-button { display: none; }
27
+ .pui-date-picker__icon {
28
+ position: absolute;
29
+ top: 50%;
30
+ right: var(--pui-space-12);
31
+ width: var(--pui-size-icon-16);
32
+ height: var(--pui-size-icon-16);
33
+ transform: translateY(-50%);
34
+ color: var(--pui-text-muted);
35
+ pointer-events: none;
36
+ }
37
+ .pui-date-picker__popup {
38
+ position: absolute;
39
+ top: calc(100% + var(--pui-space-4));
40
+ left: 0;
41
+ z-index: 30;
42
+ display: flex;
43
+ gap: var(--pui-space-8);
44
+ }
45
+ .pui-date-picker__popup[hidden] { display: none; }
@@ -0,0 +1,105 @@
1
+ /* dialog.css — Dialog · Scrim (10_COMPONENTS.md § Navigation and overlay).
2
+ *
3
+ * A card that interrupts: one question, one decision, on a scrim over the page. Paggy's `.modal` geometry (radius 16,
4
+ * padding 24, elevation/modal, surface/card), the site's close row and widths, shadcn's parts (Header / Footer /
5
+ * Title / Description). Three widths: small 400 (confirms — Paggy's own confirm is 440, Alert dialog's; the Dialog
6
+ * should follow at its next touch, queue note), medium 480 (shadcn; the site's one popup is 474 — stated), large 680 (Paggy's editor modals);
7
+ * a header at a 16 gap with a ghost close, the content as a white slot (surface/slot, radius 8), a right-aligned
8
+ * footer of two buttons at space/8. The Scrim is overlay/scrim over the whole viewport. Figma: 86:109 · 87:37.
9
+ * Contract: registry/dialog/registry.json.
10
+ *
11
+ * <div class="pui-scrim" data-state="open">
12
+ * <div class="pui-dialog pui-dialog--medium" role="dialog" aria-modal="true" aria-labelledby="t">
13
+ * <div class="pui-dialog__header"><div class="pui-dialog__texts"><h2 class="pui-dialog__title" id="t">Rename deck</h2>
14
+ * <p class="pui-dialog__description">…</p></div>
15
+ * <button class="pui-icon-button pui-icon-button--ghost pui-icon-button--small pui-dialog__close" aria-label="Close">…x…</button></div>
16
+ * <div class="pui-dialog__content"> …a Field… </div>
17
+ * <div class="pui-dialog__footer"><button class="pui-button pui-button--secondary">Cancel</button><button class="pui-button">Save</button></div></div></div>
18
+ *
19
+ * Size (none) small 400 · --medium 480 · --large 680
20
+ * Scrim .pui-scrim — fixed, the viewport, centred content; [hidden] when closed
21
+ * Keyboard focus moves into the dialog on open and stays inside while it is open — legal under WCAG 2.1.2
22
+ * ONLY because Escape gets out; Escape closes and focus returns to whatever opened it (3.5.3).
23
+ */
24
+
25
+ .pui-scrim {
26
+ position: fixed;
27
+ inset: 0;
28
+ z-index: 50;
29
+ display: flex;
30
+ align-items: center;
31
+ justify-content: center;
32
+ padding: var(--pui-space-16);
33
+ background: var(--pui-overlay-scrim);
34
+ animation: pui-fade-in var(--pui-motion-state) var(--pui-motion-easing);
35
+ }
36
+ .pui-scrim[hidden] { display: none; }
37
+ .pui-scrim--static { position: static; inset: auto; min-height: 320px; }
38
+
39
+ .pui-dialog,
40
+ .pui-sheet,
41
+ .pui-drawer {
42
+ display: flex;
43
+ flex-direction: column;
44
+ gap: var(--pui-space-16);
45
+ box-sizing: border-box;
46
+ color: var(--pui-text-default);
47
+ font-family: var(--pui-font-family);
48
+ font-size: var(--pui-font-size-14);
49
+ line-height: var(--pui-font-line-height-normal);
50
+ }
51
+ .pui-dialog {
52
+ width: 400px;
53
+ max-width: 100%;
54
+ max-height: calc(100vh - var(--pui-space-32));
55
+ padding: var(--pui-space-24);
56
+ border-radius: var(--pui-radius-16);
57
+ background: var(--pui-surface-card);
58
+ box-shadow: var(--pui-elevation-modal);
59
+ }
60
+ .pui-dialog--medium { width: 480px; }
61
+ .pui-dialog--large { width: 680px; }
62
+
63
+ .pui-dialog__header,
64
+ .pui-sheet__header,
65
+ .pui-drawer__header {
66
+ display: flex;
67
+ align-items: flex-start;
68
+ gap: var(--pui-space-16);
69
+ }
70
+ .pui-dialog__texts,
71
+ .pui-sheet__texts,
72
+ .pui-drawer__texts { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: var(--pui-space-8); }
73
+ .pui-dialog__title,
74
+ .pui-sheet__title,
75
+ .pui-drawer__title {
76
+ margin: 0;
77
+ font-size: var(--pui-font-size-18);
78
+ font-weight: var(--pui-font-weight-500);
79
+ line-height: var(--pui-font-line-height-normal);
80
+ }
81
+ .pui-dialog__description,
82
+ .pui-sheet__description,
83
+ .pui-drawer__description { margin: 0; color: var(--pui-text-muted); }
84
+ .pui-dialog__close,
85
+ .pui-sheet__close,
86
+ .pui-drawer__close { flex: none; margin: calc(var(--pui-space-4) * -1) calc(var(--pui-space-4) * -1) 0 0; }
87
+ .pui-dialog__content {
88
+ flex: 1 1 auto;
89
+ min-height: 0;
90
+ overflow: auto;
91
+ padding: var(--pui-space-16);
92
+ border-radius: var(--pui-radius-8);
93
+ background: var(--pui-surface-slot);
94
+ }
95
+ .pui-dialog__footer,
96
+ .pui-sheet__footer {
97
+ display: flex;
98
+ justify-content: flex-end;
99
+ gap: var(--pui-space-8);
100
+ }
101
+
102
+ @keyframes pui-fade-in { from { opacity: 0; } }
103
+ @media (prefers-reduced-motion: reduce) {
104
+ .pui-scrim { animation: none; }
105
+ }
@@ -0,0 +1,93 @@
1
+ /* dropdown-menu.css — Dropdown menu · Menu item · Context menu (10_COMPONENTS.md § Navigation and overlay).
2
+ *
3
+ * A list of actions that opens from a button, a pill or a right-click. Paggy's user menu (app.css:1368 .user-menu):
4
+ * min-width 220, surface/page, radius/16, elevation/card, padding space/8, no border; a head with the name in Medium
5
+ * 14 and the role in 12 text/subtle over a 1 px border/default line; rows of Menu items; a separator with 4 above and
6
+ * below. A row (app.css:1379, :836): 14 Medium text/default, radius/8, hover surface/sunken, a 16 px icon in
7
+ * text/muted, padding space/8 / space/12, gap space/8, 36 tall; Type submenu adds a right chevron in text/subtle,
8
+ * check the picker's check in text/default, destructive text/error. A shortcut is Kbd, light, at the right. Context
9
+ * menu is the same menu at the pointer, no header. The surface rules are paired in select.css (`.pui-dropdown-menu`).
10
+ * Figma: 245:16 · 244:1714. Contracts: registry/dropdown-menu/registry.json, registry/context-menu/registry.json.
11
+ *
12
+ * <div class="pui-dropdown-menu" role="menu">
13
+ * <div class="pui-dropdown-menu__header"><p class="pui-dropdown-menu__name">Fedor</p><p class="pui-dropdown-menu__role">Owner</p></div>
14
+ * <div class="pui-dropdown-menu__group-label">Deck</div>
15
+ * <button class="pui-menu-item" role="menuitem"><span class="pui-icon pui-menu-item__icon">…</span>Duplicate
16
+ * <kbd class="pui-kbd pui-menu-item__shortcut">⌘D</kbd></button>
17
+ * <button class="pui-menu-item pui-menu-item--submenu" role="menuitem">Export<span class="pui-icon pui-menu-item__chevron">…</span></button>
18
+ * <div class="pui-dropdown-menu__separator" role="separator"></div>
19
+ * <button class="pui-menu-item pui-menu-item--destructive" role="menuitem">Delete</button></div>
20
+ *
21
+ * Item Type (none) default · --submenu · --check · --destructive
22
+ * Item State :hover, :focus, [data-highlighted] share the surface (Paggy's), and KEYBOARD focus adds the inset ring
23
+ * on top of it — the shared surface alone is 1.12 against the menu and WCAG 2.4.13 asks 3:1 (3.5.2)
24
+ * · [aria-disabled="true"]
25
+ * Parts __icon · __label · __shortcut · __chevron · __check (shown on [aria-checked="true"])
26
+ * Keyboard NO tab stop at rest — the trigger holds it. Every item takes tabindex="-1" and the script moves
27
+ * focus to the first on open (3.5.3). It owes Up / Down, Home / End, Enter / Space, Escape (which closes
28
+ * and returns focus to the trigger), Right / Left for a submenu, and typeahead by first letter.
29
+ */
30
+
31
+ .pui-dropdown-menu {
32
+ min-width: 220px;
33
+ padding: var(--pui-space-8);
34
+ border: 0;
35
+ border-radius: var(--pui-radius-16);
36
+ box-shadow: var(--pui-elevation-card);
37
+ }
38
+ .pui-dropdown-menu__header {
39
+ display: flex;
40
+ flex-direction: column;
41
+ gap: var(--pui-space-2);
42
+ padding: var(--pui-space-8) var(--pui-space-12) var(--pui-space-12);
43
+ border-bottom: 1px solid var(--pui-border-default);
44
+ }
45
+ .pui-dropdown-menu__name { margin: 0; font-weight: var(--pui-font-weight-500); }
46
+ .pui-dropdown-menu__role { margin: 0; color: var(--pui-text-caption); font-size: var(--pui-font-size-12); }
47
+ .pui-dropdown-menu__group-label { padding: var(--pui-space-8) var(--pui-space-12) var(--pui-space-4); }
48
+
49
+ .pui-menu-item {
50
+ display: flex;
51
+ align-items: center;
52
+ gap: var(--pui-space-8);
53
+ box-sizing: border-box;
54
+ width: 100%;
55
+ min-height: var(--pui-size-control-medium);
56
+ margin: 0;
57
+ padding: var(--pui-space-8) var(--pui-space-12);
58
+ border: 0;
59
+ border-radius: var(--pui-radius-8);
60
+ background: transparent;
61
+ color: var(--pui-text-default);
62
+ font-family: var(--pui-font-family);
63
+ font-size: var(--pui-font-size-14);
64
+ font-weight: var(--pui-font-weight-500);
65
+ line-height: var(--pui-font-line-height-normal);
66
+ text-align: start;
67
+ text-decoration: none;
68
+ white-space: nowrap;
69
+ cursor: pointer;
70
+ outline: none;
71
+ user-select: none;
72
+ transition: background-color var(--pui-motion-state) var(--pui-motion-easing);
73
+ }
74
+ .pui-menu-item:hover,
75
+ .pui-menu-item:focus,
76
+ .pui-menu-item:focus-visible,
77
+ .pui-menu-item[data-highlighted] { background: var(--pui-surface-sunken); }
78
+ /* 3.5.2 — keyboard focus is NOT the hover look here. The shared surface/sunken reads 1.12 against
79
+ the menu's surface/page, and WCAG 2.4.13 asks 3:1 between the focused and unfocused pixels; a row
80
+ is full-bleed in a menu that clips, so the ring is the inset one. Pointer highlight is unchanged. */
81
+ .pui-menu-item:focus-visible { box-shadow: var(--pui-ring-inset); }
82
+ .pui-menu-item[aria-disabled="true"],
83
+ .pui-menu-item:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
84
+ .pui-menu-item--destructive { color: var(--pui-text-error); }
85
+ .pui-menu-item__icon { flex: none; width: var(--pui-size-icon-16); height: var(--pui-size-icon-16); color: var(--pui-text-muted); }
86
+ .pui-menu-item--destructive .pui-menu-item__icon { color: inherit; }
87
+ .pui-menu-item__label { flex: 1 1 auto; min-width: 0; }
88
+ .pui-menu-item__shortcut,
89
+ .pui-menu-item__chevron,
90
+ .pui-menu-item__check { flex: none; margin-inline-start: auto; }
91
+ .pui-menu-item__chevron { width: var(--pui-size-icon-16); height: var(--pui-size-icon-16); color: var(--pui-text-subtle); }
92
+ .pui-menu-item__check { width: var(--pui-size-icon-16); height: var(--pui-size-icon-16); visibility: hidden; }
93
+ .pui-menu-item[aria-checked="true"] .pui-menu-item__check { visibility: visible; }
@@ -0,0 +1,67 @@
1
+ /* empty.css — Empty (10_COMPONENTS.md § Feedback and status).
2
+ *
3
+ * What a screen says when there is nothing to show, and what to do about it. Block is shadcn's empty.tsx (D17 —
4
+ * Paggy's empty states are one-liners, MAFO's tables say 'No data'): a 40 px surface/sunken box with a 24 px icon in
5
+ * text/muted, a title at 18 Medium, a description at 14 text/muted centred to 320, a small Button group, padding 32;
6
+ * --border draws a dashed border/default at radius/16 for a drop zone or an empty table body. Inline is Paggy's
7
+ * `.share-empty` line (app.css:1430): 14 in the muted ink (the Figma binds neutral-600; 13 — stated), padding 8,
8
+ * centred — for a menu, a list, a cell. Figma 242:1582. Contract: registry/empty/registry.json.
9
+ *
10
+ * <div class="pui-empty pui-empty--border">
11
+ * <span class="pui-empty__media"><span class="pui-icon pui-icon--24">…folder…</span></span>
12
+ * <div class="pui-empty__text"><p class="pui-empty__title">No campaigns yet</p>
13
+ * <p class="pui-empty__description">Create one, or import from a CSV.</p></div>
14
+ * <div class="pui-button-group pui-empty__actions">…</div></div>
15
+ * <div class="pui-empty pui-empty--inline">No results.</div>
16
+ *
17
+ * Style (none) block · --inline
18
+ * Extra --border — the dashed border
19
+ */
20
+
21
+ .pui-empty {
22
+ display: flex;
23
+ flex-direction: column;
24
+ align-items: center;
25
+ justify-content: center;
26
+ gap: var(--pui-space-16);
27
+ box-sizing: border-box;
28
+ width: 100%;
29
+ padding: var(--pui-space-32);
30
+ border-radius: var(--pui-radius-16);
31
+ color: var(--pui-text-default);
32
+ font-family: var(--pui-font-family);
33
+ text-align: center;
34
+ }
35
+ .pui-empty--border { border: 1px dashed var(--pui-border-default); }
36
+ .pui-empty__media {
37
+ display: inline-flex;
38
+ align-items: center;
39
+ justify-content: center;
40
+ width: var(--pui-space-40);
41
+ height: var(--pui-space-40);
42
+ border-radius: var(--pui-radius-8);
43
+ background: var(--pui-surface-sunken);
44
+ color: var(--pui-text-muted);
45
+ }
46
+ .pui-empty__text { display: flex; flex-direction: column; gap: var(--pui-space-4); max-width: 320px; }
47
+ .pui-empty__title {
48
+ margin: 0;
49
+ font-size: var(--pui-font-size-18);
50
+ font-weight: var(--pui-font-weight-500);
51
+ line-height: var(--pui-font-line-height-normal);
52
+ }
53
+ .pui-empty__description {
54
+ margin: 0;
55
+ color: var(--pui-text-muted);
56
+ font-size: var(--pui-font-size-14);
57
+ line-height: var(--pui-font-line-height-normal);
58
+ }
59
+ .pui-empty--inline {
60
+ display: block;
61
+ padding: var(--pui-space-8);
62
+ border: 0;
63
+ border-radius: 0;
64
+ color: var(--pui-text-muted);
65
+ font-size: var(--pui-font-size-14);
66
+ line-height: var(--pui-font-line-height-normal);
67
+ }
@@ -0,0 +1,68 @@
1
+ /* field.css — Field (10_COMPONENTS.md § Forms).
2
+ *
3
+ * The wrapper a control lives in: label above, helper or error below. Quoted from the site's `.field` (styles.css:619
4
+ * — a column with a 4 px gap), `.field__label` (:620 — 14 Medium 500, line-height 20) and `.field__error` (:732 — 14
5
+ * Regular, line-height 1.3, red-400 → text/error); markup from career-detail.html. Description is shadcn's
6
+ * FieldDescription (the site has no helper text, D17). Figma 40:38: Size × default / error / disabled.
7
+ * Contract: registry/field/registry.json.
8
+ *
9
+ * <div class="pui-field">
10
+ * <label class="pui-field__label" for="email">Email <span class="pui-field__hint">(optional)</span></label>
11
+ * <input class="pui-input" id="email" type="email">
12
+ * <p class="pui-field__description">We reply within a day.</p>
13
+ * <p class="pui-field__error">Enter an email address.</p>
14
+ * </div>
15
+ *
16
+ * State --error shows __error and puts the control in its error state · --disabled dims the texts with the
17
+ * control (or :has(:disabled))
18
+ * Size lives on the control (pui-input--small …); the label stays 14 at every size, as on the site
19
+ * Rule "(optional)" in the label, never an asterisk; error text says what to do, not what the label says.
20
+ */
21
+
22
+ .pui-field {
23
+ display: flex;
24
+ flex-direction: column;
25
+ gap: var(--pui-space-4);
26
+ min-width: 0;
27
+ }
28
+ .pui-field__label {
29
+ display: inline-flex;
30
+ align-items: center;
31
+ gap: var(--pui-space-4);
32
+ color: var(--pui-text-default);
33
+ font-family: var(--pui-font-family);
34
+ font-size: var(--pui-font-size-14);
35
+ font-weight: var(--pui-font-weight-500);
36
+ line-height: var(--pui-font-line-height-normal);
37
+ }
38
+ .pui-field__hint { color: var(--pui-text-muted); font-weight: var(--pui-font-weight-400); }
39
+ .pui-field__description {
40
+ margin: 0;
41
+ color: var(--pui-text-muted);
42
+ font-family: var(--pui-font-family);
43
+ font-size: var(--pui-font-size-14);
44
+ font-weight: var(--pui-font-weight-400);
45
+ line-height: var(--pui-font-line-height-normal);
46
+ }
47
+ .pui-field__error {
48
+ display: none;
49
+ margin: 0;
50
+ color: var(--pui-text-error);
51
+ font-family: var(--pui-font-family);
52
+ font-size: var(--pui-font-size-14);
53
+ font-weight: var(--pui-font-weight-400);
54
+ line-height: 1.3; /* the site's .field__error (styles.css:737); not a token step */
55
+ }
56
+ .pui-field--error .pui-field__error,
57
+ .pui-field:has([aria-invalid="true"]) .pui-field__error { display: block; }
58
+ .pui-field--error .pui-input,
59
+ .pui-field--error .pui-textarea,
60
+ .pui-field--error .pui-select,
61
+ .pui-field--error .pui-native-select > select,
62
+ .pui-field--error .pui-combobox,
63
+ .pui-field--error .pui-input-group { border-color: var(--pui-border-error); box-shadow: var(--pui-ring-error); }
64
+ .pui-field--error .pui-input-group:focus-within { box-shadow: var(--pui-ring-error-focus); } /* 3.5.2 */
65
+ .pui-field--disabled .pui-field__label,
66
+ .pui-field--disabled .pui-field__description,
67
+ .pui-field:has(:disabled) .pui-field__label,
68
+ .pui-field:has(:disabled) .pui-field__description { opacity: 0.5; }