@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
package/README.md ADDED
@@ -0,0 +1,123 @@
1
+ # @pepperui/css
2
+
3
+ The Mobupps design system's components as plain, framework-free CSS — for Paggy, the site's Blade and prototype
4
+ pages, the quarter builder and any page that is not React (`DL-7`, milestone `M2.2`). Built on
5
+ [`@pepperui/tokens`](../tokens): every colour, size, radius, shadow and duration is a `var(--pui-*)`, and a literal
6
+ hex in this package fails the build (`npm test`).
7
+
8
+ ## Install
9
+
10
+ ```sh
11
+ npm install @pepperui/tokens @pepperui/css
12
+ ```
13
+
14
+ ```html
15
+ <link rel="stylesheet" href="node_modules/@pepperui/tokens/dist/tokens.css">
16
+ <link rel="stylesheet" href="node_modules/@pepperui/css/dist/pepper-ui.css">
17
+ ```
18
+
19
+ With a bundler:
20
+
21
+ ```css
22
+ @import "@pepperui/tokens/css";
23
+ @import "@pepperui/css";
24
+ ```
25
+
26
+ **On npm from 2.0.0** (item 1.2.3). The tokens are a peer dependency (`^1.2.0`): install them beside this package,
27
+ not under it, so a project has one copy of `--pui-*` and not two. A version on the registry is always a version this
28
+ repository tags — `css-v2.0.0` — and never one without (`RELEASING.md` §1).
29
+
30
+ ~~Before 2.0.0 a consumer installed a git tag~~ — and **a tag does not install this package** (corrected
31
+ 2026-09-11, 3.3.8): npm installs the `package.json` at the root of a git URL, and this repository's root is the
32
+ private workspace `pepper-ui`, so a `git+ssh://…#css-v1.1.0` line puts the *whole repository* at
33
+ `node_modules/pepper-ui`, tokens included at the same commit, and `@pepperui/css` does not resolve from it — and
34
+ every tag installs under that one name, so a second tag line replaced the first instead of adding a package beside
35
+ it. A consumer still pinned that way moves by replacing its one line with the two above.
36
+
37
+ ## Moving from 1.1.0 to 2.0.0
38
+
39
+ **Two class names were removed and not renamed, which is what makes this a major** (`RELEASING.md` §2). Both
40
+ belonged to the Echo AI chat as it was drawn before the design lead re-cut it, and neither has a replacement to
41
+ alias to — the parts they styled are gone from the component:
42
+
43
+ | Removed in 2.0.0 | What it was | What to do |
44
+ |---|---|---|
45
+ | `.pui-message__author` | the name line above an assistant's turn — *Echo* and an AI badge | delete the element; the avatar carries the mark, and a mark is said once |
46
+ | `.pui-composer__input` | the textarea of the multi-line composer | the composer is one line: `.pui-composer__bar` holds `.pui-input` |
47
+
48
+ Nothing else was removed. Everything added is listed on the site's Changelog, and the chat's own parts —
49
+ `.pui-chat`, `.pui-suggestions`, `.pui-projection` — are documented at `/components/chat/`.
50
+
51
+ The site's Changelog says what has changed since each tag.
52
+
53
+ ## Use
54
+
55
+ Load the tokens first, then the components. One file, no build step:
56
+
57
+ ```html
58
+ <link rel="stylesheet" href="node_modules/@pepperui/tokens/dist/tokens.css">
59
+ <link rel="stylesheet" href="node_modules/@pepperui/css/dist/pepper-ui.css">
60
+ ```
61
+
62
+ or, with a bundler:
63
+
64
+ ```css
65
+ @import "@pepperui/tokens/css";
66
+ @import "@pepperui/css";
67
+ ```
68
+
69
+ The face is Poppins (Onest for `lang="ru"`, D39). The package does not load the font: `packages/fonts/fonts.css`
70
+ carries the `@font-face` rules if the page has none.
71
+
72
+ ## The class grammar (D52)
73
+
74
+ `pui-` prefix + BEM, so the classes sit beside Bootstrap, CoreUI and a consumer's own CSS without a collision
75
+ (the same reason D6 prefixed the variables).
76
+
77
+ | | Form | Example | In Figma |
78
+ |---|---|---|---|
79
+ | Block | the registry item's name | `.pui-button`, `.pui-input-group` | the component set |
80
+ | Modifier | `--` + the variant option, verbatim | `.pui-button--secondary`, `.pui-input--small`, `.pui-badge--green` | `Variant=secondary`, `Size=small`, `Tone=green` |
81
+ | Part | `__` + the part | `.pui-button__icon`, `.pui-field__error` | the layer |
82
+ | State | the browser's, or the ARIA attribute the script sets | `:hover`, `:focus-visible`, `:disabled`, `[aria-pressed="true"]`, `[aria-invalid="true"]`, `[aria-selected="true"]`, `[aria-current]`, `[data-state="open"]` | `State=…` |
83
+ | Boolean | the part is present or not | a `__icon` inside the button | `Has icon` |
84
+
85
+ The default option needs no modifier (`.pui-button` is the primary, medium button). Every file in `src/components/`
86
+ opens with the component's provenance (which source file, which numbers, which Figma set), the markup to copy and
87
+ the modifier list — the file is the documentation until the docs site (M3.3).
88
+
89
+ ## What is in it
90
+
91
+ 59 parts in the queue's order (`docs/10_COMPONENTS.md`):
92
+
93
+ - **Actions** — button (primary · secondary · ghost · danger), icon-button, button-group, toggle (outline · filled), toggle-group
94
+ - **Forms** — input, textarea, field, label, input-group, select (+ menu, item), native-select, combobox (+ menu), checkbox, radio (+ group), switch, slider, calendar (+ day), date-picker, questionnaire
95
+ - **Feedback and status** — badge · chip, alert, alert-dialog, toast · toast-status (+ region), tooltip, popover · hover-card, spinner, skeleton, progress, empty, kbd
96
+ - **Navigation and overlay** — tabs (line · segment), dropdown-menu · menu-item (context menu is the same menu), navigation-menu · nav-link · navigation-panel, command, dialog · scrim, sheet · drawer, pagination, breadcrumb, stepper · step, collapsible · accordion, separator · scroll-area · resizable-handle · aspect-ratio
97
+ - **Content blocks** — card, item, kpi-tile (+ row), insight-block, icon-list, bullet-list, heading-pair, typography, logo-chip · logo-grid · carousel · review-card, avatar, table · data-table
98
+ - **Shells and patterns** — sidebar · nav-item · nav-section, topbar, footer, state-block
99
+ - **Chat** — message, bubble, attachment, marker, composer, message-scroller
100
+
101
+ Not here, by design: the chart theme (`@pepperui/charts`, DL-10), the slide-only Case study and Blob (2.5.3), and the
102
+ icons — Lucide SVGs go inline in a `.pui-icon` span (`packages/css/specimen/icons.svg` is the subset the specimen uses).
103
+
104
+ ## Accent and canvas
105
+
106
+ Paggy's `data-accent` and `data-canvas` are the tokens' modes and work here unchanged: `data-accent="red"` on a
107
+ card, a table or the page recolours everything that reads an accent role; `data-canvas="slide"` on a slide switches
108
+ the Typography roles the content blocks bind (D36).
109
+
110
+ ## The specimen, the tests, the rules
111
+
112
+ - `specimen/index.html` — every class, sizes across, states down, with the markup to copy. Open it in a browser.
113
+ - `npm run css:visual` — renders every block in headless Chromium and compares it with `specimen/goldens/`
114
+ (`--bless` accepts a reviewed render). Any pixel is a fail.
115
+ - `npm test` runs stylelint (`.stylelintrc.json`: no hex, no named colour, no `rgb()`), checks the built file is
116
+ current, and runs `scripts/css_rules_test.py` — the locked rules as tests (2.2.3): bullet gap 8, insight ≤ 1344,
117
+ pills vs squares, light tints, no decorative separators, the control scale (D41), the body line-height (D40), the
118
+ last table row (D46). `--render` adds the computed-style checks in a browser.
119
+
120
+ ## Source
121
+
122
+ `src/index.css` is the ordered list; `build/css.js` (inside `npm run build`) inlines it into `dist/pepper-ui.css`.
123
+ Edit `src/`, never `dist/` — CI diffs the built file against its source on every commit.