@peasant-labs/fairtrade 0.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 (117) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +85 -0
  3. package/dist/lib/README.md +13 -0
  4. package/dist/lib/base.css +48 -0
  5. package/dist/lib/components.css +2 -0
  6. package/dist/lib/fonts.css +28 -0
  7. package/dist/lib/tokens.css +184 -0
  8. package/dist/lib/tokens.json +768 -0
  9. package/dist/lib/types/Accordion.d.ts +47 -0
  10. package/dist/lib/types/Accordion.stories.d.ts +91 -0
  11. package/dist/lib/types/Avatar.d.ts +94 -0
  12. package/dist/lib/types/Avatar.stories.d.ts +160 -0
  13. package/dist/lib/types/BrandMark.d.ts +25 -0
  14. package/dist/lib/types/BrandMark.stories.d.ts +75 -0
  15. package/dist/lib/types/Breadcrumb.d.ts +66 -0
  16. package/dist/lib/types/Breadcrumb.stories.d.ts +91 -0
  17. package/dist/lib/types/Button.d.ts +86 -0
  18. package/dist/lib/types/Button.stories.d.ts +129 -0
  19. package/dist/lib/types/Card.d.ts +145 -0
  20. package/dist/lib/types/Card.stories.d.ts +70 -0
  21. package/dist/lib/types/Chart.stories.d.ts +55 -0
  22. package/dist/lib/types/ChartBar.d.ts +51 -0
  23. package/dist/lib/types/ChartLine.d.ts +54 -0
  24. package/dist/lib/types/Checkbox.d.ts +132 -0
  25. package/dist/lib/types/Checkbox.stories.d.ts +75 -0
  26. package/dist/lib/types/Chip.d.ts +85 -0
  27. package/dist/lib/types/Chip.stories.d.ts +190 -0
  28. package/dist/lib/types/CliOnboard.d.ts +68 -0
  29. package/dist/lib/types/CliOnboard.stories.d.ts +24 -0
  30. package/dist/lib/types/CommandPalette.d.ts +6 -0
  31. package/dist/lib/types/CommandPalette.stories.d.ts +94 -0
  32. package/dist/lib/types/CommitGraph.d.ts +71 -0
  33. package/dist/lib/types/CommitGraph.stories.d.ts +17 -0
  34. package/dist/lib/types/ConnectionState.d.ts +82 -0
  35. package/dist/lib/types/ConnectionState.stories.d.ts +117 -0
  36. package/dist/lib/types/ConsentDialog.d.ts +97 -0
  37. package/dist/lib/types/ConsentDialog.stories.d.ts +61 -0
  38. package/dist/lib/types/DataTable.d.ts +116 -0
  39. package/dist/lib/types/DataTable.stories.d.ts +240 -0
  40. package/dist/lib/types/DateRange.d.ts +242 -0
  41. package/dist/lib/types/DateRange.stories.d.ts +272 -0
  42. package/dist/lib/types/Dialog.d.ts +9 -0
  43. package/dist/lib/types/Dialog.stories.d.ts +121 -0
  44. package/dist/lib/types/DiffView.d.ts +39 -0
  45. package/dist/lib/types/DiffView.stories.d.ts +118 -0
  46. package/dist/lib/types/EmptyState.d.ts +28 -0
  47. package/dist/lib/types/EmptyState.stories.d.ts +130 -0
  48. package/dist/lib/types/EvidenceCaption.d.ts +39 -0
  49. package/dist/lib/types/EvidenceCaption.stories.d.ts +43 -0
  50. package/dist/lib/types/Explainer.d.ts +82 -0
  51. package/dist/lib/types/Explainer.stories.d.ts +22 -0
  52. package/dist/lib/types/FacetRail.d.ts +13 -0
  53. package/dist/lib/types/FacetRail.stories.d.ts +28 -0
  54. package/dist/lib/types/Feedback.d.ts +222 -0
  55. package/dist/lib/types/Feedback.stories.d.ts +81 -0
  56. package/dist/lib/types/GroupedMultiSelect.d.ts +67 -0
  57. package/dist/lib/types/GroupedMultiSelect.stories.d.ts +59 -0
  58. package/dist/lib/types/Input.d.ts +158 -0
  59. package/dist/lib/types/Input.stories.d.ts +181 -0
  60. package/dist/lib/types/Intensity.d.ts +55 -0
  61. package/dist/lib/types/Intensity.stories.d.ts +108 -0
  62. package/dist/lib/types/MapCanvas.d.ts +89 -0
  63. package/dist/lib/types/MapCanvas.stories.d.ts +174 -0
  64. package/dist/lib/types/Menu.d.ts +62 -0
  65. package/dist/lib/types/Menu.stories.d.ts +173 -0
  66. package/dist/lib/types/ModerationQueue.d.ts +135 -0
  67. package/dist/lib/types/ModerationQueue.stories.d.ts +34 -0
  68. package/dist/lib/types/Pager.d.ts +47 -0
  69. package/dist/lib/types/Pager.stories.d.ts +100 -0
  70. package/dist/lib/types/Pagination.d.ts +50 -0
  71. package/dist/lib/types/Pagination.stories.d.ts +193 -0
  72. package/dist/lib/types/PolicySelect.d.ts +80 -0
  73. package/dist/lib/types/PolicySelect.stories.d.ts +130 -0
  74. package/dist/lib/types/ProviderIcon.d.ts +83 -0
  75. package/dist/lib/types/ProviderIcon.stories.d.ts +44 -0
  76. package/dist/lib/types/RailShell.d.ts +199 -0
  77. package/dist/lib/types/RailShell.stories.d.ts +32 -0
  78. package/dist/lib/types/Redaction.d.ts +53 -0
  79. package/dist/lib/types/Redaction.stories.d.ts +120 -0
  80. package/dist/lib/types/RoleRoster.d.ts +97 -0
  81. package/dist/lib/types/RoleRoster.stories.d.ts +23 -0
  82. package/dist/lib/types/SignIn.d.ts +78 -0
  83. package/dist/lib/types/SignIn.stories.d.ts +57 -0
  84. package/dist/lib/types/Sparkline.d.ts +19 -0
  85. package/dist/lib/types/StatTiles.d.ts +115 -0
  86. package/dist/lib/types/StatTiles.stories.d.ts +31 -0
  87. package/dist/lib/types/StepWizard.d.ts +92 -0
  88. package/dist/lib/types/StepWizard.stories.d.ts +18 -0
  89. package/dist/lib/types/StepsWaterfall.d.ts +67 -0
  90. package/dist/lib/types/StepsWaterfall.stories.d.ts +94 -0
  91. package/dist/lib/types/Switch.d.ts +63 -0
  92. package/dist/lib/types/Switch.stories.d.ts +134 -0
  93. package/dist/lib/types/Tabs.d.ts +48 -0
  94. package/dist/lib/types/Tabs.stories.d.ts +75 -0
  95. package/dist/lib/types/TimeStrip.d.ts +12 -0
  96. package/dist/lib/types/TimeStrip.stories.d.ts +30 -0
  97. package/dist/lib/types/Timeline.d.ts +192 -0
  98. package/dist/lib/types/Timeline.stories.d.ts +974 -0
  99. package/dist/lib/types/ToastHost.d.ts +70 -0
  100. package/dist/lib/types/ToastHost.stories.d.ts +115 -0
  101. package/dist/lib/types/ToolRenderers.d.ts +24 -0
  102. package/dist/lib/types/ToolRenderers.stories.d.ts +138 -0
  103. package/dist/lib/types/Tooltip.d.ts +80 -0
  104. package/dist/lib/types/Tooltip.stories.d.ts +116 -0
  105. package/dist/lib/types/Tour.d.ts +37 -0
  106. package/dist/lib/types/Tour.stories.d.ts +39 -0
  107. package/dist/lib/types/TranscriptMarkers.d.ts +50 -0
  108. package/dist/lib/types/TranscriptMarkers.stories.d.ts +48 -0
  109. package/dist/lib/types/Treemap.d.ts +77 -0
  110. package/dist/lib/types/Treemap.stories.d.ts +101 -0
  111. package/dist/lib/types/VisibilityControl.d.ts +54 -0
  112. package/dist/lib/types/VisibilityControl.stories.d.ts +126 -0
  113. package/dist/lib/types/chart-shared.d.ts +63 -0
  114. package/dist/lib/types/index.d.ts +53 -0
  115. package/dist/lib/types/story-frame.d.ts +12 -0
  116. package/dist/lib/ui.js +8707 -0
  117. package/package.json +67 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 peasant-labs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,85 @@
1
+ # fairtrade design system
2
+
3
+ **fairtrade** is an **open-source** design system for building agent products of every kind:
4
+ orchestration, analysis, transcripts, pr review, and more. it ships design tokens, a documented
5
+ component library, and the rules that keep every screen aligned, glanceable and readable, in a locked
6
+ identity (amber on near-black + warm paper, atkinson hyperlegible mono, lowercase chrome, square
7
+ corners). built with **vite 8 + react 19 + tailwind v4**, run with **pnpm**.
8
+
9
+ this repo is the single-page presentation site: a wise.design-style page that reads top to bottom, with
10
+ an ascii splash at the top, the documented system in the middle, and a live "in use" showcase at the end
11
+ across three example apps (an analytics dashboard, a commons, and a transcript viewer) that exercise the
12
+ system's range. it ships a component library (`src/ui/*`) with storybook, and is **neuroinclusive by
13
+ default** (the dyslexia / adhd / autism / low-vision rules are baked into the tokens, not a toggle).
14
+
15
+ ## run
16
+
17
+ ```bash
18
+ pnpm install
19
+ pnpm dev # the presentation (http://localhost:5180, or next free port)
20
+ pnpm build # contrast gate + static dist/
21
+ pnpm preview # serve dist/
22
+ pnpm storybook # the component library (http://localhost:6006)
23
+ pnpm build-storybook # compile every component + story
24
+ ```
25
+
26
+ - toggle dark/light top-right, or deep-link a theme with `?theme=light`.
27
+ - the in-page comment tool is **dev-only** (it posts to a dev-server endpoint); `?fb=off` hides it in dev.
28
+ `?cap` is a review-only capture mode that shrinks the full-screen sections so a whole tall section fits
29
+ one screenshot.
30
+
31
+ ## the page
32
+
33
+ 1. **hero** (`#top`) - an ascii wheat **video** (the crop). it seeds the next screen.
34
+ 2. **brand** (`#brand`) - a dim ascii **soil** field with **roots** fanning down (narrow at the top,
35
+ full width at the bottom) into a white **fairtrade** wordmark; soil, roots and wordmark each reveal
36
+ on scroll-in.
37
+ 3. **philosophy** (`#manifesto`) - one statement over a cursor-spotlight that reveals a tiled field of
38
+ ascii portraits behind the text.
39
+ 4. **documentation** - foundations, components and "using the system", in three groups, with a sticky
40
+ on-this-page rail and scroll-spy. the header is gated by zone (hidden over the splash, shown across
41
+ the docs).
42
+ 5. **in use** (`#inuse`) - a full-screen workspace whose sticky app-switcher flips between live demos of
43
+ the three apps (transcript viewer, village commons, peasant code-map + analytics).
44
+
45
+ ## at a glance
46
+
47
+ - **themes:** dark (default, deep near-black) + light (genuinely white, warm paper); token-driven; amber
48
+ is a scarce accent.
49
+ - **type:** atkinson hyperlegible mono (display + chrome + code) + atkinson hyperlegible (reading prose).
50
+ - **icons:** lucide-react for all functional ui; brand marks are inline `<symbol>`s. procedural + filtered
51
+ **ascii imagery** is an intentional centerpiece on a few low-traffic display surfaces only.
52
+ - **standardized:** one 4/8 spacing scale, one type scale (16px floor), one control height, one border
53
+ token, radius 0.
54
+
55
+ ## structure
56
+
57
+ - `src/App.jsx` - composition root: nav, the hero/brand splash, philosophy, the docs (sticky rail +
58
+ scroll-spy), and the in-use showcase.
59
+ - `src/sections-react/*.jsx`, `src/DocSections.jsx`, `src/ComponentSections.jsx` - the documented sections.
60
+ - `src/ui/*` - the typed component library; storybook is the source of truth (`pnpm storybook`). tables
61
+ are tanstack-table-backed (`DataTable`), charts are recharts-backed (`ChartBar` / `ChartLine` /
62
+ `Sparkline`), and provider logos use `BrandMark` - all wrapped so the engines match the system.
63
+ - `src/mockups/inuse/*` - the in-use app demos (hand-rolled svg visualizations).
64
+ - `src/index.css` - the single source of truth for design tokens and styling.
65
+ - `src/effects.jsx` - the ascii filters (wheat video, soil, roots, portrait thumbnails).
66
+ - `scripts/*` - the gate and qa scripts.
67
+ - machine-readable for agents: `AGENTS.md` (hard rules + commands), `llms.txt`, and generated
68
+ `public/tokens.json` (w3c dtcg) + `public/components.json` + `packages/tokens/*` (kept fresh by
69
+ `pnpm gen:check`).
70
+
71
+ ## gates / ci
72
+
73
+ `pnpm build` regenerates the machine-readable artifacts then runs a pure-js wcag contrast gate (both
74
+ themes) before building; `pnpm gen:check` fails if those artifacts or the token package drift from
75
+ their sources.
76
+ `scripts/validate.mjs` is a 20-check puppeteer interactive gate (icons, single h1, heading outline,
77
+ copy-token labels, decorative icons `aria-hidden`, scroll-spy, zone header gating, command palette, dialog
78
+ focus-trap, theme toggle, 0 overflow at 360/390/768/1024/1440, reduced-motion, no console errors).
79
+ `build-storybook` + `scripts/sbsmoke.mjs` load every story (incl. `play()`). all run in ci
80
+ ([`.github/workflows/ci.yml`](./.github/workflows/ci.yml)); `deploy.yml` publishes to github pages with
81
+ storybook nested under `dist/storybook/`.
82
+
83
+ ## license
84
+
85
+ open source under the [MIT license](./LICENSE).
@@ -0,0 +1,13 @@
1
+ # @peasant-labs/fairtrade
2
+
3
+ Generated package artifacts for the private fairtrade design-system library.
4
+
5
+ Import CSS explicitly:
6
+
7
+ ```css
8
+ @import "@peasant-labs/fairtrade/tokens.css";
9
+ @import "@peasant-labs/fairtrade/base.css";
10
+ @import "@peasant-labs/fairtrade/components.css";
11
+ ```
12
+
13
+ Import React UI from `@peasant-labs/fairtrade/ui`.
@@ -0,0 +1,48 @@
1
+ /* @peasant-labs/fairtrade — base styles.
2
+ GENERATED by scripts/gen-llm-artifacts.mjs. Import after tokens.css and before components.css.
3
+ This is the consumer-safe base subset from src/index.css with Tailwind @apply resolved to
4
+ token-backed CSS custom properties. */
5
+ html { scroll-padding-top: var(--nav-h); overscroll-behavior-y: none; }
6
+ body {
7
+ margin: 0;
8
+ background: var(--canvas);
9
+ color: var(--ink);
10
+ font-family: var(--font-body);
11
+ font-size: var(--fs-body);
12
+ line-height: var(--lh-body);
13
+ text-align: start;
14
+ -webkit-font-smoothing: antialiased;
15
+ }
16
+ *, *::before, *::after { box-sizing: border-box; }
17
+ h1, h2, h3 {
18
+ margin: 0;
19
+ color: var(--ink-strong);
20
+ font-family: var(--font-display);
21
+ font-weight: 700;
22
+ line-height: var(--lh-tight);
23
+ text-transform: lowercase;
24
+ }
25
+ p { margin: 0; }
26
+ p, .turn .body, .empty p, .prose {
27
+ letter-spacing: var(--tracking-prose);
28
+ word-spacing: var(--word-spacing-prose);
29
+ max-inline-size: var(--measure-prose);
30
+ }
31
+ .mono, code, pre, .tnum, .kbd, .bullets li, [data-tabular] {
32
+ letter-spacing: 0;
33
+ word-spacing: normal;
34
+ }
35
+ em, i { font-style: normal; font-weight: 600; }
36
+ :focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
37
+ a { color: var(--amber); text-decoration: none; }
38
+ a.link, .prose a { text-decoration: underline dotted; text-underline-offset: 3px; }
39
+ a.link:hover, a.link:focus-visible, .prose a:hover { text-decoration-style: solid; }
40
+ section { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
41
+ @media (prefers-reduced-motion: reduce) {
42
+ html { scroll-behavior: auto; }
43
+ *, *::before, *::after {
44
+ animation-duration: .01ms !important;
45
+ animation-iteration-count: 1 !important;
46
+ transition-duration: .01ms !important;
47
+ }
48
+ }