@auriel/peppertino 0.1.1 → 0.3.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 (45) hide show
  1. package/CHANGELOG.txt +136 -0
  2. package/README.md +343 -30
  3. package/build.js +27 -12
  4. package/dist/carousel.js +152 -0
  5. package/dist/carousel.js.map +7 -0
  6. package/dist/header.js +69 -0
  7. package/dist/header.js.map +7 -0
  8. package/dist/main.css +2780 -0
  9. package/dist/main.css.map +1 -0
  10. package/dist/modal.js +112 -0
  11. package/dist/modal.js.map +7 -0
  12. package/dist/peppertino.js +637 -0
  13. package/dist/peppertino.js.map +7 -0
  14. package/dist/select.js +99 -0
  15. package/dist/select.js.map +7 -0
  16. package/dist/tabs.js +79 -0
  17. package/dist/tabs.js.map +7 -0
  18. package/dist/validation.js +130 -0
  19. package/dist/validation.js.map +7 -0
  20. package/index.html +1137 -22
  21. package/package.json +1 -1
  22. package/src/js/carousel.js +148 -0
  23. package/src/js/header.js +43 -4
  24. package/src/js/modal.js +134 -0
  25. package/src/js/peppertino.js +9 -0
  26. package/src/js/select.js +103 -0
  27. package/src/js/tabs.js +94 -0
  28. package/src/js/validation.js +132 -0
  29. package/src/scss/base.scss +26 -6
  30. package/src/scss/button.scss +87 -20
  31. package/src/scss/card.scss +121 -0
  32. package/src/scss/carousel.scss +313 -0
  33. package/src/scss/footer.scss +224 -0
  34. package/src/scss/forms/fieldset.scss +127 -0
  35. package/src/scss/forms/form-instructions.scss +133 -0
  36. package/src/scss/forms/label.scss +115 -0
  37. package/src/scss/forms/text-field.scss +240 -0
  38. package/src/scss/forms/validation.scss +215 -0
  39. package/src/scss/forms.scss +8 -0
  40. package/src/scss/header.scss +27 -6
  41. package/src/scss/main.scss +7 -0
  42. package/src/scss/modal.scss +188 -0
  43. package/src/scss/section.scss +1 -1
  44. package/src/scss/select.scss +210 -0
  45. package/src/scss/tabs.scss +156 -0
package/CHANGELOG.txt ADDED
@@ -0,0 +1,136 @@
1
+ PeppertinoCSS — Changelog
2
+ =========================
3
+
4
+ v0.3.0 — 2026-06-05
5
+ --------------------
6
+
7
+ New components
8
+
9
+ Carousel (carousel.scss + carousel.js)
10
+ - CSS scroll-snap driven, no JS required for motion
11
+ - Variants: default, --peek-2, --peek-3, --dark, --flush
12
+ - Prev/next controls, animated pill dots, gradient caption overlay
13
+ - Autoplay toggle button (UI state only)
14
+ - JS shim: ARIA region/slide/group roles, IntersectionObserver sync,
15
+ roving tabindex on dots, polite live region announcements
16
+ - ppCarousel.get(id) public API
17
+
18
+ Footer (footer.scss)
19
+ - CSS only, no JS
20
+ - Brand column + up to 4 nav columns, collapses to 2-col then 1-col
21
+ - Bottom bar: copyright + social icon links
22
+ - Variants: --dark, --accent (gradient top border)
23
+ - All links have :focus-visible outlines
24
+
25
+ Forms (forms.scss + src/scss/forms/)
26
+ - Fieldset & Legend (fieldset.scss)
27
+ - Variants: default, --ghost, --filled, --primary, --error
28
+ - disabled / aria-disabled support
29
+ - Legend modifiers: --sm, --lg, --inline (icon + text)
30
+ - Form Instructions (form-instructions.scss)
31
+ - Pre-form block (place before <form> for screen reader Forms Mode)
32
+ - Variants: default, --neutral, --warning, --error (role="alert")
33
+ - In-form hint (.pp-form-hint) and required-field note
34
+ - Label (label.scss)
35
+ - Four importance tiers: primary, secondary, tertiary, quaternary
36
+ - Apple Dynamic Type scale: headline, subheadline, body, callout,
37
+ footnote, caption
38
+ - --selectable, --truncate modifiers
39
+ - .pp-label-row for icon + label pairing
40
+ - Text Field (text-field.scss)
41
+ - .pp-field wrapper: label, input/textarea, hint, message
42
+ - Required <abbr aria-label="required"> marker
43
+ - Optional badge
44
+ - Validation states: --error, --success, --warning
45
+ - Sizes: --sm, --lg
46
+ - Icon wrap (.pp-field__input-wrap + .pp-field__icon)
47
+ - Character counter (.pp-field__count) with --warn / --over states
48
+ - Validation (validation.scss + validation.js)
49
+ - .pp-field--validate opt-in for :valid/:invalid pseudo-class styling
50
+ - aria-invalid attribute selectors (work without JS)
51
+ - .pp-field--validating spinner state for async checks
52
+ - .pp-validation-summary with role="alert", linked error items
53
+ - .pp-confirm confirmation checkbox, --destructive variant
54
+ - .pp-submit--gated: CSS :has() disables submit until confirmed
55
+ - JS shim: setError, clearError, setSuccess, setValidating, setSummary
56
+ - Auto-wires aria-describedby on init
57
+
58
+ Breakpoints
59
+ - Tailwind-compatible map: sm/md/lg/xl/2xl
60
+ - Apple device map: iphone-se through imac (12 named breakpoints)
61
+ - respond-to() mixin (min-width)
62
+ - respond-below() and respond-between() mixins
63
+
64
+ Icons
65
+ - Switched from Feather Icons to Lucide Icons (CDN + createIcons())
66
+ - Brand/logo icons in footer use inline SVG (Lucide has no brand icons)
67
+
68
+ Demo (index.html)
69
+ - Installation section with npm, CDN, SCSS import, clone instructions
70
+ - Carousel, Footer, and Forms sections added
71
+ - Nav dropdowns for Components and Forms
72
+ - Changelog section
73
+ - All external links use jsdelivr CDN
74
+
75
+
76
+ v0.2.0 — 2026-06-01
77
+ --------------------
78
+ Accessibility (ARIA) — full pass across all components.
79
+
80
+ Header
81
+ - role="menubar" on nav list
82
+ - role="menu" on dropdowns, role="menuitem" on all links
83
+ - role="none" on <li> wrappers
84
+ - aria-haspopup + aria-expanded on dropdown triggers
85
+ - aria-controls wired to dropdown IDs
86
+ - aria-hidden toggled on mobile nav drawer
87
+ - aria-label on <nav>
88
+
89
+ Modal
90
+ - role="dialog" + aria-modal="true" on backdrop
91
+ - aria-labelledby + aria-describedby auto-wired to title/description IDs
92
+ - aria-label="Close" on close button
93
+ - Focus trap: Tab/Shift+Tab stays inside open modal
94
+ - Focus restored to triggering element on close
95
+
96
+ Select
97
+ - role="combobox" on trigger
98
+ - role="listbox" on panel
99
+ - role="option" + aria-selected on every option
100
+ - aria-controls + aria-activedescendant kept in sync on selection
101
+ - aria-disabled CSS hook for disabled state
102
+
103
+ Tabs
104
+ - role="tablist" on container (enforced by JS if missing)
105
+ - role="tab" on items
106
+ - aria-controls wired to panel IDs
107
+ - role="tabpanel" + aria-labelledby on panels
108
+ - Home / End keyboard shortcuts added
109
+
110
+ CSS
111
+ - ARIA attribute selectors (aria-expanded, aria-hidden, aria-selected,
112
+ aria-disabled) are now first-class CSS hooks — visual state is driven
113
+ by ARIA, not just class names
114
+
115
+ HTML demo
116
+ - All modal backdrops updated with role, aria-modal, aria-labelledby,
117
+ aria-describedby, aria-hidden in markup
118
+ - Nav updated with full menubar / menu / menuitem semantics
119
+
120
+ Page structure
121
+ - Section order updated: Hero → Colors → Typography → Components (A→Z)
122
+
123
+
124
+ v0.1.1 — initial release
125
+ -------------------------
126
+ - Reset, base design tokens, button, card, gradient text
127
+ - Header: glassmorphism sticky, mobile hamburger drawer
128
+ - Modal: glassmorphic backdrop, native <dialog> support
129
+ - Section: full-viewport sections, custom gradient scrollbar
130
+ - Select: native <select> restyling + .pp-select custom dropdown
131
+ - Table: Apple-style clean tables
132
+ - Tabs: pill-style, icon + label, four variants, sm/lg sizes
133
+ - Typography: Inter + Kode Mono, weight/size/spacing utility classes
134
+ - Progressive enhancement: CSS-only baseline for all interactive components
135
+ - esbuild bundler: per-component files + peppertino.js aggregator
136
+ - MIT license
package/README.md CHANGED
@@ -10,7 +10,26 @@ PeppertinoCSS is an Apple-inspired CSS framework built with SCSS, featuring the
10
10
  npm install @auriel/peppertino
11
11
  ```
12
12
 
13
- Or clone and build locally:
13
+ CDN — stylesheet only:
14
+
15
+ ```html
16
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@auriel/peppertino@latest/dist/main.min.css" />
17
+ ```
18
+
19
+ CDN — with JS components:
20
+
21
+ ```html
22
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@auriel/peppertino@latest/dist/main.min.css" />
23
+ <script src="https://cdn.jsdelivr.net/npm/@auriel/peppertino@latest/dist/peppertino.js" defer></script>
24
+ ```
25
+
26
+ SCSS import into your own build:
27
+
28
+ ```scss
29
+ @use '@auriel/peppertino/src/scss/main';
30
+ ```
31
+
32
+ Clone and build locally:
14
33
 
15
34
  ```bash
16
35
  git clone https://codeberg.org/debaditya/Peppertino
@@ -38,6 +57,58 @@ Then open `http://localhost:3000` in your browser.
38
57
 
39
58
  ---
40
59
 
60
+ ## Claude Code skill
61
+
62
+ The `agents/` directory ships a Claude Code skill that gives AI agents per-component reference documentation covering classes, variants, ARIA requirements, and JS APIs.
63
+
64
+ ### Install (project-level)
65
+
66
+ Copy the skill into your project's Claude skills directory:
67
+
68
+ ```bash
69
+ cp -r agents/peppertino .claude/skills/peppertino
70
+ ```
71
+
72
+ Then invoke it in Claude Code:
73
+
74
+ ```
75
+ /peppertino
76
+ ```
77
+
78
+ ### Install (user-level — available in all projects)
79
+
80
+ ```bash
81
+ cp -r agents/peppertino ~/.claude/skills/peppertino
82
+ ```
83
+
84
+ ### What the skill contains
85
+
86
+ | File | Covers |
87
+ |---|---|
88
+ | `skill.md` | Index, ARIA/WCAG requirements, conventions |
89
+ | `base.md` | Design tokens, spacing, breakpoints, mixins |
90
+ | `button.md` | All button variants |
91
+ | `card.md` | Card parts, variants, grid |
92
+ | `carousel.md` | Carousel markup, API, keyboard |
93
+ | `footer.md` | Footer columns, social links |
94
+ | `forms-fieldset.md` | Fieldset & legend |
95
+ | `forms-form-instructions.md` | Pre-form instructions, hints |
96
+ | `forms-label.md` | Label tiers, scale, icon row |
97
+ | `forms-text-field.md` | Field wrapper, input, hint, validation |
98
+ | `forms-validation.md` | Summary, confirmation checkbox, `ppValidation` API |
99
+ | `gradient.md` | Gradient text |
100
+ | `header.md` | Header, nav, dropdown, mobile drawer |
101
+ | `modal.md` | Modal, actions, `ppModal` API |
102
+ | `section.md` | Section variants, scrollbar |
103
+ | `select.md` | Native select, custom dropdown |
104
+ | `table.md` | Table, column helpers |
105
+ | `tabs.md` | Tabs, variants, keyboard nav |
106
+ | `typography.md` | All typography utility classes |
107
+
108
+ The skill's `skill.md` enforces ARIA and WCAG AA compliance rules and instructs the agent to fetch authoritative specs from w3.org when uncertain.
109
+
110
+ ---
111
+
41
112
  ## What's inside
42
113
 
43
114
  ### SCSS modules (`src/scss/`)
@@ -46,22 +117,42 @@ Then open `http://localhost:3000` in your browser.
46
117
  |---|---|
47
118
  | `reset.scss` | Opinionated modern reset |
48
119
  | `base.scss` | Design tokens, helper functions, base element styles |
49
- | `button.scss` | `.button`, `.button-outline` |
120
+ | `button.scss` | `.button`, `.button-outline`, semantic variants |
121
+ | `card.scss` | `.pp-card` and variants |
122
+ | `carousel.scss` | `.pp-carousel` — CSS scroll-snap carousel |
123
+ | `footer.scss` | `.pp-footer` — multi-column footer |
124
+ | `forms.scss` | Aggregator for all form partials |
125
+ | `forms/fieldset.scss` | `.pp-fieldset` + `.pp-legend` |
126
+ | `forms/form-instructions.scss` | `.pp-form-instructions`, `.pp-form-hint` |
127
+ | `forms/label.scss` | `.pp-label` — Apple HIG four-tier label system |
128
+ | `forms/text-field.scss` | `.pp-field` — labelled input/textarea with validation states |
129
+ | `forms/validation.scss` | `.pp-validation-summary`, `.pp-confirm`, `.pp-field--validate` |
50
130
  | `gradient.scss` | `.gradient-txt` |
51
131
  | `header.scss` | `.pp-header` — glassmorphism sticky header |
132
+ | `modal.scss` | `.pp-modal-backdrop` + `.pp-modal` — glassmorphic modals |
52
133
  | `section.scss` | `.pp-section` — full-viewport sections + custom scrollbar |
134
+ | `select.scss` | Native `<select>` restyling + `.pp-select` custom dropdown |
53
135
  | `table.scss` | `.pp-table` — clean Apple-style data tables |
136
+ | `tabs.scss` | `.pp-tabs` — pill-style tabs with icon + label |
54
137
  | `typography.scss` | Utility classes for font, size, weight, spacing |
55
138
 
56
139
  ### JS components (`src/js/`)
57
140
 
58
141
  | File | Purpose |
59
142
  |---|---|
60
- | `header.js` | Mobile drawer toggle + dropdown handling for `.pp-header` |
143
+ | `carousel.js` | ARIA wiring, IntersectionObserver sync, `ppCarousel` API |
144
+ | `header.js` | Mobile drawer, dropdown ARIA wiring for `.pp-header` |
145
+ | `modal.js` | Open/close, focus trap, focus restore, ARIA for `.pp-modal` |
146
+ | `select.js` | Keyboard nav, ARIA listbox/option for `.pp-select` |
147
+ | `tabs.js` | Click + arrow key activation, ARIA tablist for `.pp-tabs` |
148
+ | `validation.js` | `aria-invalid` wiring, summary focus, `ppValidation` API |
149
+ | `peppertino.js` | Single-file bundle of all the above |
150
+
151
+ All JS follows progressive enhancement — CSS provides the full visual baseline without JS. JS adds keyboard navigation, focus management, and ARIA state.
61
152
 
62
153
  ---
63
154
 
64
- ## Design tokens (base.scss)
155
+ ## Design tokens (`base.scss`)
65
156
 
66
157
  ### Colors
67
158
 
@@ -94,15 +185,17 @@ radius('lg') // → 0.5rem
94
185
  z('modal') // → 200
95
186
  ```
96
187
 
97
- ### Responsive mixin
188
+ ### Responsive mixins
98
189
 
99
190
  ```scss
100
- @include respond-to('md') {
101
- // min-width: 768px
102
- }
191
+ @include respond-to('md') { /* min-width: 768px */ }
192
+ @include respond-below('md') { /* max-width: 767px */ }
193
+ @include respond-between('sm','lg') { /* 640px – 1023px */ }
103
194
  ```
104
195
 
105
- Breakpoints: `sm` 640px · `md` 768px · `lg` 1024px · `xl` 1280px · `2xl` 1536px
196
+ Tailwind breakpoints: `sm` 640px · `md` 768px · `lg` 1024px · `xl` 1280px · `2xl` 1536px
197
+
198
+ Apple device breakpoints: `iphone-se` · `iphone` · `iphone-plus` · `iphone-pro-max` · `ipad-mini` · `ipad-air` · `ipad-pro-11` · `ipad-pro-13` · `macbook-air-13` · `macbook-pro-14` · `macbook-pro-16` · `imac`
106
199
 
107
200
  ---
108
201
 
@@ -132,8 +225,168 @@ Breakpoints: `sm` 640px · `md` 768px · `lg` 1024px · `xl` 1280px · `2xl` 153
132
225
  ### Button
133
226
 
134
227
  ```html
135
- <button class="button">Filled</button>
136
- <button class="button-outline">Outline</button>
228
+ <button class="button">Primary</button>
229
+ <button class="button-success">Success</button>
230
+ <button class="button-warning">Warning</button>
231
+ <button class="button-error">Error</button>
232
+ <button class="button-dark">Dark</button>
233
+ <button class="button-gradient">Gradient</button>
234
+ <button class="button-ghost">Ghost</button>
235
+
236
+ <button class="button-outline">Primary</button>
237
+ <button class="button-outline-success">Success</button>
238
+ <button class="button-outline-warning">Warning</button>
239
+ <button class="button-outline-error">Error</button>
240
+ <button class="button-outline-dark">Dark</button>
241
+ ```
242
+
243
+ ### Card
244
+
245
+ ```html
246
+ <div class="pp-card">...</div>
247
+ <div class="pp-card pp-card--dark">...</div>
248
+ <div class="pp-card pp-card--gradient">...</div>
249
+ <div class="pp-card pp-card--primary">...</div>
250
+ <div class="pp-card pp-card--ghost">...</div>
251
+ ```
252
+
253
+ Grid helpers: `.pp-card-grid--2` · `.pp-card-grid--3` · `.pp-card-grid--4`
254
+
255
+ ### Carousel
256
+
257
+ ```html
258
+ <div class="pp-carousel" id="my-carousel" data-label="Featured">
259
+ <div class="pp-carousel__track">
260
+ <div class="pp-carousel__slide" id="my-carousel-slide-0">...</div>
261
+ <div class="pp-carousel__slide" id="my-carousel-slide-1">...</div>
262
+ </div>
263
+ <button class="pp-carousel__prev" type="button" aria-label="Previous slide">
264
+ <svg viewBox="0 0 24 24" aria-hidden="true"><polyline points="15 18 9 12 15 6"/></svg>
265
+ </button>
266
+ <button class="pp-carousel__next" type="button" aria-label="Next slide">
267
+ <svg viewBox="0 0 24 24" aria-hidden="true"><polyline points="9 6 15 12 9 18"/></svg>
268
+ </button>
269
+ <div class="pp-carousel__dots" aria-label="Slide navigation">
270
+ <button class="pp-carousel__dot" type="button" aria-label="Go to slide 1" aria-controls="my-carousel-slide-0"></button>
271
+ <button class="pp-carousel__dot" type="button" aria-label="Go to slide 2" aria-controls="my-carousel-slide-1"></button>
272
+ </div>
273
+ <div class="pp-carousel__announcer" aria-live="polite" aria-atomic="true"></div>
274
+ </div>
275
+ <script src="dist/carousel.js" defer></script>
276
+ ```
277
+
278
+ Variants: `--peek-2` · `--peek-3` · `--dark` · `--flush`
279
+ API: `ppCarousel.get(id).goTo(n)`
280
+
281
+ ### Footer
282
+
283
+ ```html
284
+ <footer class="pp-footer" role="contentinfo">
285
+ <div class="pp-footer__top">
286
+ <div class="pp-footer__brand">
287
+ <a href="#" class="pp-footer__logo">Brand</a>
288
+ <p class="pp-footer__tagline">Tagline</p>
289
+ </div>
290
+ <div class="pp-footer__col">
291
+ <p class="pp-footer__col-title">Column</p>
292
+ <ul class="pp-footer__nav" aria-label="Column links">
293
+ <li><a href="#" class="pp-footer__nav-link">Link</a></li>
294
+ </ul>
295
+ </div>
296
+ </div>
297
+ <div class="pp-footer__bottom">
298
+ <p class="pp-footer__legal">&copy; 2026 Brand.</p>
299
+ <ul class="pp-footer__social" aria-label="Social links">
300
+ <li><a href="#" class="pp-footer__social-link" aria-label="GitHub"><i data-lucide="github"></i></a></li>
301
+ </ul>
302
+ </div>
303
+ </footer>
304
+ ```
305
+
306
+ Variants: `--dark` · `--accent`
307
+
308
+ ### Forms
309
+
310
+ #### Label
311
+
312
+ ```html
313
+ <span class="pp-label pp-label--primary">Primary</span>
314
+ <span class="pp-label pp-label--secondary pp-label--callout">Secondary callout</span>
315
+ <span class="pp-label pp-label--selectable">Selectable text</span>
316
+ <span class="pp-label-row pp-label"><i data-lucide="wifi" aria-hidden="true"></i> Wi-Fi</span>
317
+ ```
318
+
319
+ Tiers: `--primary` · `--secondary` · `--tertiary` · `--quaternary`
320
+ Scale: `--headline` · `--subheadline` · `--body` · `--callout` · `--footnote` · `--caption`
321
+
322
+ #### Fieldset
323
+
324
+ ```html
325
+ <fieldset class="pp-fieldset">
326
+ <legend>Group name</legend>
327
+ <!-- controls -->
328
+ </fieldset>
329
+ ```
330
+
331
+ Variants: `--ghost` · `--filled` · `--primary` · `--error`
332
+ Legend modifiers: `--sm` · `--lg` · `--inline`
333
+
334
+ #### Form Instructions
335
+
336
+ ```html
337
+ <!-- Place BEFORE <form> -->
338
+ <div class="pp-form-instructions" role="note" aria-label="Form instructions">
339
+ <p class="pp-form-instructions__title">Before you begin</p>
340
+ <ul class="pp-form-instructions__list">
341
+ <li class="pp-form-instructions__item">Fields marked * are required.</li>
342
+ </ul>
343
+ </div>
344
+ ```
345
+
346
+ Variants: `--neutral` · `--warning` · `--error` (use `role="alert"` for errors)
347
+
348
+ #### Text Field
349
+
350
+ ```html
351
+ <div class="pp-field">
352
+ <label class="pp-field__label" for="name">
353
+ Name
354
+ <abbr class="pp-field__required" aria-label="required" title="required"></abbr>
355
+ </label>
356
+ <input class="pp-field__input" type="text" id="name" name="name"
357
+ required aria-required="true" aria-describedby="name-hint" />
358
+ <span class="pp-field__hint" id="name-hint">Your full legal name.</span>
359
+ </div>
360
+ ```
361
+
362
+ States: `--error` · `--success` · `--warning` · `--validating`
363
+ Sizes: `--sm` · `--lg`
364
+
365
+ #### Validation
366
+
367
+ ```html
368
+ <!-- Summary (place before or at top of form) -->
369
+ <div class="pp-validation-summary" role="alert" aria-label="Form errors">
370
+ <p class="pp-validation-summary__title">Errors prevented submission</p>
371
+ <ul class="pp-validation-summary__list"></ul>
372
+ </div>
373
+
374
+ <!-- Confirmation checkbox -->
375
+ <label class="pp-confirm">
376
+ <input class="pp-confirm__input" type="checkbox" />
377
+ <span class="pp-confirm__label">I confirm this action.</span>
378
+ </label>
379
+ <button class="button pp-submit--gated" type="submit">Submit</button>
380
+ ```
381
+
382
+ JS API (optional — CSS works without it):
383
+
384
+ ```js
385
+ ppValidation.setError(input, 'Message')
386
+ ppValidation.clearError(input)
387
+ ppValidation.setSuccess(input, 'Message')
388
+ ppValidation.setValidating(input)
389
+ ppValidation.setSummary([{ input, message }], summaryEl)
137
390
  ```
138
391
 
139
392
  ### Gradient text
@@ -142,22 +395,20 @@ Breakpoints: `sm` 640px · `md` 768px · `lg` 1024px · `xl` 1280px · `2xl` 153
142
395
  <h1 class="gradient-txt">PeppertinoCSS</h1>
143
396
  ```
144
397
 
145
- Gradient colors are driven by `$gradient-start` and `$gradient-end` in `base.scss`.
146
-
147
398
  ### Header
148
399
 
149
400
  ```html
150
401
  <header class="pp-header">
151
402
  <a href="#" class="pp-header__brand">Brand</a>
152
- <nav>
153
- <ul class="pp-header__nav">
154
- <li class="pp-header__nav-item">
155
- <a href="#" class="pp-header__nav-link">Link</a>
403
+ <nav aria-label="Main navigation">
404
+ <ul class="pp-header__nav" role="menubar">
405
+ <li class="pp-header__nav-item" role="none">
406
+ <a href="#" class="pp-header__nav-link" role="menuitem">Link</a>
156
407
  </li>
157
- <li class="pp-header__nav-item">
158
- <a href="#" class="pp-header__nav-link">Dropdown</a>
159
- <ul class="pp-header__dropdown">
160
- <li><a href="#" class="pp-header__dropdown-link">Item</a></li>
408
+ <li class="pp-header__nav-item" role="none">
409
+ <a href="#" class="pp-header__nav-link" role="menuitem" aria-haspopup="true" aria-expanded="false">Dropdown</a>
410
+ <ul class="pp-header__dropdown" role="menu">
411
+ <li role="none"><a href="#" class="pp-header__dropdown-link" role="menuitem">Item</a></li>
161
412
  </ul>
162
413
  </li>
163
414
  </ul>
@@ -169,19 +420,64 @@ Gradient colors are driven by `$gradient-start` and `$gradient-end` in `base.scs
169
420
  <script src="dist/header.js" defer></script>
170
421
  ```
171
422
 
172
- Sticky, glassmorphism background. Dropdowns appear on hover (desktop) or tap (mobile). The hamburger toggle animates to × when open.
173
-
174
- ### Section
423
+ ### Modal
175
424
 
176
425
  ```html
177
- <section class="pp-section">
178
- <div class="pp-section__inner">
179
- <!-- content -->
426
+ <button data-modal-open="my-modal">Open</button>
427
+
428
+ <div id="my-modal" class="pp-modal-backdrop"
429
+ role="dialog" aria-modal="true"
430
+ aria-labelledby="my-modal-title"
431
+ aria-describedby="my-modal-desc"
432
+ aria-hidden="true">
433
+ <div class="pp-modal">
434
+ <button class="pp-modal__close" data-modal-close="my-modal" aria-label="Close">✕</button>
435
+ <p class="pp-modal__title" id="my-modal-title">Title</p>
436
+ <p class="pp-modal__description" id="my-modal-desc">Description text.</p>
437
+ <ul class="pp-modal__actions">
438
+ <li><button class="pp-modal__action">Action</button></li>
439
+ <li><button class="pp-modal__action pp-modal__action--cancel" data-modal-close="my-modal">Cancel</button></li>
440
+ </ul>
180
441
  </div>
181
- </section>
442
+ </div>
443
+ <script src="dist/modal.js" defer></script>
182
444
  ```
183
445
 
184
- Variants: `pp-section--primary` · `pp-section--dark` · `pp-section--muted` · `pp-section--gradient`
446
+ `window.ppModal.open(id)` / `.close(id)` / `.closeAll()`
447
+
448
+ ### Select
449
+
450
+ ```html
451
+ <div class="pp-select">
452
+ <button class="pp-select__trigger" type="button" aria-label="Choose option">
453
+ <span class="pp-select__value">Choose…</span>
454
+ <span class="pp-select__chevron"></span>
455
+ </button>
456
+ <ul class="pp-select__panel" role="listbox">
457
+ <li role="option"><button class="pp-select__option" data-value="a">Option A</button></li>
458
+ <li role="option"><button class="pp-select__option" data-value="b">Option B</button></li>
459
+ </ul>
460
+ </div>
461
+ <script src="dist/select.js" defer></script>
462
+ ```
463
+
464
+ Sizes: `.pp-select--sm` · `.pp-select--lg`
465
+
466
+ ### Tabs
467
+
468
+ ```html
469
+ <div class="pp-tabs" role="tablist">
470
+ <button class="pp-tabs__item is-active" role="tab" aria-selected="true">Tab 1</button>
471
+ <button class="pp-tabs__item" role="tab" aria-selected="false">Tab 2</button>
472
+ </div>
473
+ <div data-tab-panel="tab1" role="tabpanel">Panel 1</div>
474
+ <div data-tab-panel="tab2" role="tabpanel" hidden>Panel 2</div>
475
+ <script src="dist/tabs.js" defer></script>
476
+ ```
477
+
478
+ Variants: default · `--outline` · `--gradient` · `--gradient-outline`
479
+ Sizes: `--sm` · `--lg`
480
+ Keyboard: `←` / `→` arrows, `Home`, `End`
185
481
 
186
482
  ### Table
187
483
 
@@ -194,7 +490,24 @@ Variants: `pp-section--primary` · `pp-section--dark` · `pp-section--muted` ·
194
490
  ```
195
491
 
196
492
  Column helpers: `.pp-table--cols-1` → `.pp-table--cols-4`
197
- Variants: `.pp-table--striped` · `.pp-table--bordered` · `.pp-table--compact` · `.pp-table--flush`
493
+
494
+ ### Section
495
+
496
+ ```html
497
+ <section class="pp-section">
498
+ <div class="pp-section__inner">
499
+ <!-- content -->
500
+ </div>
501
+ </section>
502
+ ```
503
+
504
+ Variants: `--primary` · `--dark` · `--muted` · `--gradient`
505
+
506
+ ---
507
+
508
+ ## Changelog
509
+
510
+ See [CHANGELOG.txt](CHANGELOG.txt)
198
511
 
199
512
  ---
200
513
 
package/build.js CHANGED
@@ -1,23 +1,33 @@
1
- // PeppertinoCSS — esbuild bundler (per-component JS output)
1
+ // PeppertinoCSS — esbuild bundler (per-component + aggregator)
2
2
  const esbuild = require('esbuild');
3
3
  const path = require('path');
4
4
  const fs = require('fs');
5
5
 
6
6
  const isWatch = process.argv.includes('--watch');
7
7
 
8
+ const AGGREGATOR = 'src/js/peppertino.js';
9
+
10
+ // Per-component entries (everything except the aggregator)
8
11
  const components = fs
9
12
  .readdirSync('src/js')
10
- .filter((f) => f.endsWith('.js'))
13
+ .filter((f) => f.endsWith('.js') && f !== 'peppertino.js')
11
14
  .map((f) => path.join('src/js', f));
12
15
 
13
- if (components.length === 0) {
14
- console.log('[esbuild] No JS components found in src/js/ — skipping.');
15
- process.exit(0);
16
- }
17
-
18
- const buildOptions = {
16
+ const componentOptions = {
19
17
  entryPoints: components,
20
18
  outdir: 'dist',
19
+ bundle: false,
20
+ format: 'iife',
21
+ platform: 'browser',
22
+ target: ['es2018'],
23
+ sourcemap: true,
24
+ minify: false,
25
+ };
26
+
27
+ // Aggregator — bundled single file
28
+ const aggregatorOptions = {
29
+ entryPoints: [AGGREGATOR],
30
+ outfile: 'dist/peppertino.js',
21
31
  bundle: true,
22
32
  format: 'iife',
23
33
  platform: 'browser',
@@ -27,12 +37,17 @@ const buildOptions = {
27
37
  };
28
38
 
29
39
  if (isWatch) {
30
- esbuild.context(buildOptions).then((ctx) => {
31
- ctx.watch();
40
+ Promise.all([
41
+ esbuild.context(componentOptions).then((ctx) => ctx.watch()),
42
+ esbuild.context(aggregatorOptions).then((ctx) => ctx.watch()),
43
+ ]).then(() => {
32
44
  console.log('[esbuild] Watching src/js/ for changes...');
33
45
  });
34
46
  } else {
35
- esbuild.build(buildOptions).then(() => {
36
- console.log(`[esbuild] Built ${components.length} component(s) → dist/`);
47
+ Promise.all([
48
+ esbuild.build(componentOptions),
49
+ esbuild.build(aggregatorOptions),
50
+ ]).then(() => {
51
+ console.log(`[esbuild] Built ${components.length} component(s) + peppertino.js → dist/`);
37
52
  });
38
53
  }