@auriel/peppertino 0.2.0 → 0.4.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 (46) hide show
  1. package/CHANGELOG.txt +122 -56
  2. package/README.md +333 -38
  3. package/dist/accordion.js +51 -0
  4. package/dist/accordion.js.map +7 -0
  5. package/dist/carousel.js +152 -0
  6. package/dist/carousel.js.map +7 -0
  7. package/dist/header.js +30 -3
  8. package/dist/header.js.map +2 -2
  9. package/dist/main.css +4660 -710
  10. package/dist/main.css.map +1 -1
  11. package/dist/modal.js +61 -2
  12. package/dist/modal.js.map +2 -2
  13. package/dist/peppertino.js +477 -17
  14. package/dist/peppertino.js.map +4 -4
  15. package/dist/select.js +25 -8
  16. package/dist/select.js.map +3 -3
  17. package/dist/tabs.js +31 -4
  18. package/dist/tabs.js.map +2 -2
  19. package/dist/validation.js +130 -0
  20. package/dist/validation.js.map +7 -0
  21. package/index.html +1493 -42
  22. package/package.json +1 -1
  23. package/src/js/accordion.js +61 -0
  24. package/src/js/carousel.js +148 -0
  25. package/src/js/peppertino.js +4 -0
  26. package/src/js/validation.js +132 -0
  27. package/src/scss/accordion.scss +156 -0
  28. package/src/scss/alert.scss +204 -0
  29. package/src/scss/base.scss +130 -16
  30. package/src/scss/card.scss +4 -4
  31. package/src/scss/carousel.scss +313 -0
  32. package/src/scss/dark-mode.scss +474 -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 +8 -8
  41. package/src/scss/main.scss +7 -0
  42. package/src/scss/section.scss +1 -1
  43. package/src/scss/select.scss +5 -5
  44. package/src/scss/table.scss +5 -5
  45. package/src/scss/utilities.scss +243 -0
  46. package/.claude/settings.local.json +0 -8
package/CHANGELOG.txt CHANGED
@@ -1,70 +1,136 @@
1
1
  PeppertinoCSS — Changelog
2
2
  =========================
3
3
 
4
- v0.2.0 — 2026-06-01
5
- --------------------
6
- Accessibility (ARIA) — full pass across all components.
4
+ All notable changes are documented here in reverse chronological order.
5
+ Versioning follows semver. Dates are YYYY-MM-DD.
6
+
7
+ ─────────────────────────────────────────────────────────────────────────────
8
+ v0.4.0 — 2026-06-11
9
+ ─────────────────────────────────────────────────────────────────────────────
10
+
11
+ New components
12
+ - Accordion CSS max-height transition; variants: --flush, --dark, --primary.
13
+ JS shim adds aria-expanded, aria-hidden, keyboard navigation
14
+ (↑ ↓ Home End), and data-allow-multiple for multi-open mode.
15
+ - Alert Inline feedback messages; variants: --info, --success,
16
+ --warning, --error, --primary, --neutral; modifier: --filled.
17
+ .is-dismissible + .pp-alert__dismiss button; .is-dismissing
18
+ triggers slide-out animation before DOM removal.
7
19
 
8
- Header
9
- - role="menubar" on nav list
10
- - role="menu" on dropdowns, role="menuitem" on all links
11
- - role="none" on <li> wrappers
12
- - aria-haspopup + aria-expanded on dropdown triggers
13
- - aria-controls wired to dropdown IDs
14
- - aria-hidden toggled on mobile nav drawer
15
- - aria-label on <nav>
20
+ Utilities
21
+ - New utilities layer (utilities.scss) — single-purpose classes with no JS:
22
+ Display .d-{block|inline|inline-block|flex|inline-flex|
23
+ grid|inline-grid|none|contents}
24
+ Visibility .visible .invisible .sr-only .not-sr-only
25
+ Opacity .opacity-{0|25|50|75|100}
26
+ Margin .m-* .mt-* .mb-* .ml-* .mr-* .mx-* .my-* (keys 0-32, auto)
27
+ Padding .p-* .pt-* .pb-* .pl-* .pr-* .px-* .py-* (keys 0-32)
28
+ Gap .gap-* .gap-x-* .gap-y-* (keys 0-32)
29
+ Flex direction, wrap, grow/shrink, justify-content, align-items,
30
+ align-self
31
+ Grid .grid-cols-{1-6,12}, .grid-rows-{1-4}, .col-span-*,
32
+ .row-span-*
33
+ Width .w-full .w-screen .w-auto .w-fit .w-min .w-max .w-half
34
+ Height .h-full .h-screen .h-auto .h-fit
35
+ Overflow .overflow-{auto|hidden|visible|scroll}, x/y variants
36
+ Position .static .relative .absolute .fixed .sticky
37
+ Z-index .z-{below|base|raised|overlay|modal|toast|tooltip}
38
+ Border-radius .rounded-{none|sm|base|md|lg|xl|2xl|full}
39
+ Shadow .shadow-{none|sm|md|lg|xl}
40
+ Cursor .cursor-{default|pointer|not-allowed|grab|text}
41
+ Pointer .pointer-events-{none|auto}
42
+ User-select .select-{none|text|all|auto}
43
+ Responsive .sm-d-* .md-d-* .lg-d-* .xl-d-* .w2xl-d-* (display only)
16
44
 
17
- Modal
18
- - role="dialog" + aria-modal="true" on backdrop
19
- - aria-labelledby + aria-describedby auto-wired to title/description IDs
20
- - aria-label="Close" on close button
21
- - Focus trap: Tab/Shift+Tab stays inside open modal
22
- - Focus restored to triggering element on close
45
+ Dark mode
46
+ - Class-based dark mode via .dark on <html> or any ancestor.
47
+ Never prefers-color-scheme. JS toggle persists preference to localStorage.
48
+ - All design tokens in base.scss now exposed as CSS custom properties on :root
49
+ (--pp-neutral-*, --pp-surface, --pp-on-surface, --pp-border,
50
+ --pp-bg-card, --pp-bg-input, --pp-bg-select*, --pp-bg-header*,
51
+ --pp-bg-footer, --pp-bg-dropdown, --pp-glass-border, --pp-glass-hover,
52
+ --pp-shadow-*, --pp-label-*, --pp-section-muted-bg, etc.).
53
+ - dark-mode.scss overrides all tokens under .dark: neutral scale fully
54
+ inverted (50 <-> 900), surface/on-surface swapped, shadows strengthened,
55
+ glass values darkened.
56
+ - Component SCSS updated to consume CSS vars instead of hardcoded literals:
57
+ card, accordion, table, header, footer, section, select, forms/fieldset,
58
+ forms/text-field, forms/validation.
59
+ - Demo page: moon/sun toggle added to header. Every component section now
60
+ shows a .dark-wrapped preview pane alongside the light demo.
23
61
 
24
- Select
25
- - role="combobox" on trigger
26
- - role="listbox" on panel
27
- - role="option" + aria-selected on every option
28
- - aria-controls + aria-activedescendant kept in sync on selection
29
- - aria-disabled CSS hook for disabled state
62
+ Bug fixes / polish
63
+ - Table row borders: were using static $color-neutral-200 SCSS var (light
64
+ only); replaced with var(--pp-border) so they flip correctly in dark mode.
65
+ - Utilities demo: inline code chips and container backgrounds were hardcoded
66
+ #f4f4f5; replaced with var(--pp-neutral-100) / var(--pp-neutral-200).
67
+ - Changelog section: hardcoded text colors replaced with CSS vars.
68
+ - dark-mode.scss: attribute selector overrides for inline-style colors
69
+ (#71717a, #52525b, #18181b) used on section labels in the demo page.
30
70
 
31
- Tabs
32
- - role="tablist" on container (enforced by JS if missing)
33
- - role="tab" on items
34
- - aria-controls wired to panel IDs
35
- - role="tabpanel" + aria-labelledby on panels
36
- - Home / End keyboard shortcuts added
71
+ ─────────────────────────────────────────────────────────────────────────────
72
+ v0.3.0 — 2026-06-05
73
+ ─────────────────────────────────────────────────────────────────────────────
37
74
 
38
- CSS
39
- - ARIA attribute selectors (aria-expanded, aria-hidden, aria-selected,
40
- aria-disabled) are now first-class CSS hooks in header.scss, modal.scss,
41
- and select.scss — visual state is driven by ARIA, not just class names
75
+ New components
76
+ - Carousel CSS scroll-snap driven; variants: --peek-2, --peek-3,
77
+ --dark, --flush; ppCarousel JS API (goTo, prev, next).
78
+ - Footer Multi-column layout; variants: --dark, --accent; CSS only.
79
+ - Forms Five new form partials:
80
+ Fieldset .pp-fieldset + .pp-legend; variants: --ghost, --filled,
81
+ --primary, --error; legend modifiers: --sm, --lg, --inline.
82
+ Form Instr. .pp-form-instructions -- pre-form block for screen reader
83
+ Forms Mode; variants: --neutral, --warning, --error.
84
+ .pp-form-hint and .pp-form-required-note helpers.
85
+ Label .pp-label -- four-tier importance system (primary to
86
+ quaternary); Apple Dynamic Type scale (headline to caption);
87
+ --selectable, --truncate, icon row.
88
+ Text Field .pp-field -- label + input/textarea + hint + required abbr +
89
+ validation states (--error, --success, --warning,
90
+ --validating); sizes --sm / --lg; icon wrap; char counter.
91
+ Validation :valid/:invalid opt-in, aria-invalid selectors, async
92
+ spinner, .pp-validation-summary with role="alert",
93
+ .pp-confirm CSS :has() gated submit; ppValidation JS API.
42
94
 
43
- HTML demo
44
- - All modal backdrops updated with role, aria-modal, aria-labelledby,
45
- aria-describedby, aria-hidden in markup
46
- - Nav updated with full menubar / menu / menuitem semantics
95
+ Breakpoints
96
+ - Added respond-below() and respond-between() mixins.
97
+ - Apple device breakpoint map: 12 named entries from iphone-se to imac.
47
98
 
48
- Page structure
49
- - Section order updated: Hero → Colors → Typography → Components (A→Z)
99
+ Icons
100
+ - Switched from Feather Icons to Lucide Icons (lucide.createIcons()).
50
101
 
51
- Package
52
- - Version bumped to 2.0.0
102
+ Demo
103
+ - Installation, Carousel, Footer, and Forms sections added to index.html.
104
+ - Header nav: Components and Forms dropdowns; A-to-Z component ordering.
105
+ - Changelog section added to demo page.
53
106
 
107
+ ─────────────────────────────────────────────────────────────────────────────
108
+ v0.2.0 — 2026-06-01
109
+ ─────────────────────────────────────────────────────────────────────────────
110
+
111
+ Accessibility -- full ARIA pass across all components
112
+ - Header role="menubar" / "menu" / "menuitem"; aria-haspopup +
113
+ aria-expanded on dropdown triggers; aria-hidden on mobile drawer.
114
+ - Modal role="dialog" + aria-modal; aria-labelledby + aria-describedby
115
+ auto-wired by JS; focus trap on open; focus restored on close.
116
+ - Select role="combobox" / "listbox" / "option" + aria-selected;
117
+ aria-activedescendant kept in sync with keyboard focus.
118
+ - Tabs role="tablist"; aria-controls to panel ids; Home / End keyboard
119
+ shortcuts.
120
+ - CSS ARIA attribute states are first-class selectors -- visual state
121
+ driven by aria-expanded / aria-selected / aria-hidden rather
122
+ than class names alone.
123
+ - Demo Section order updated: Hero -> Colors -> Typography ->
124
+ Components (A-to-Z).
54
125
 
126
+ ─────────────────────────────────────────────────────────────────────────────
55
127
  v0.1.1 — initial release
56
- -------------------------
57
- - Reset, base design tokens, button, card, gradient text
58
- - Header: glassmorphism sticky, mobile hamburger drawer
59
- - Modal: glassmorphic backdrop, native <dialog> support
60
- - Section: full-viewport sections, custom gradient scrollbar
61
- - Select: native <select> restyling + .pp-select custom dropdown
62
- - Table: Apple-style clean tables
63
- - Tabs: pill-style, icon + label, four variants (normal, outline,
64
- gradient, gradient-outline), sm/lg sizes
65
- - Typography: Inter + Kode Mono, weight/size/spacing utility classes
66
- - Progressive enhancement: CSS-only baseline for all interactive
67
- components; JS adds keyboard nav, animations, outside-click close
68
- - Single Google Fonts request for Inter + Kode Mono
69
- - esbuild bundler: per-component files + peppertino.js aggregator
70
- - MIT license
128
+ ─────────────────────────────────────────────────────────────────────────────
129
+
130
+ - Reset, base tokens, button, card, gradient text, header, modal, section,
131
+ select, table, tabs, typography.
132
+ - Progressive enhancement -- CSS-only baseline; JS adds keyboard navigation,
133
+ animations, and outside-click close.
134
+ - Inter + Kode Mono via Google Fonts.
135
+ - esbuild bundler with per-component JS files + peppertino.js aggregator.
136
+ - Tailwind-compatible breakpoint map (sm / md / lg / xl / 2xl).