@peerbots/core 0.2.6 → 1.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.
- package/.changeset/config.json +1 -1
- package/.github/workflows/storybook.yml +9 -1
- package/CHANGELOG.md +94 -0
- package/dist/index.d.mts +643 -131
- package/dist/index.d.ts +643 -131
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -3
- package/src/charts/DistributionBarChart.tsx +10 -4
- package/src/charts/DistributionHistogram.tsx +13 -5
- package/src/charts/LineGraph.stories.tsx +60 -0
- package/src/charts/LineGraph.tsx +216 -0
- package/src/charts/index.ts +2 -0
- package/src/docs/DesignSystem.mdx +241 -25
- package/src/styles/theme.css +8 -0
- package/src/ui/feedback/Alert.stories.tsx +56 -0
- package/src/ui/feedback/Alert.tsx +168 -0
- package/src/ui/{Dialog.stories.tsx → feedback/Dialog.stories.tsx} +2 -2
- package/src/ui/{Dialog.tsx → feedback/Dialog.tsx} +2 -2
- package/src/ui/feedback/EmptyState.stories.tsx +57 -0
- package/src/ui/feedback/EmptyState.tsx +123 -0
- package/src/ui/feedback/Popover.stories.tsx +130 -0
- package/src/ui/feedback/Popover.tsx +135 -0
- package/src/ui/feedback/Skeleton.stories.tsx +88 -0
- package/src/ui/{Skeleton.tsx → feedback/Skeleton.tsx} +2 -2
- package/src/ui/feedback/Spinner.stories.tsx +77 -0
- package/src/ui/feedback/Spinner.tsx +62 -0
- package/src/ui/{Tooltip.stories.tsx → feedback/Tooltip.stories.tsx} +3 -3
- package/src/ui/{Tooltip.tsx → feedback/Tooltip.tsx} +2 -2
- package/src/ui/feedback/index.ts +7 -0
- package/src/ui/forms/Button.stories.tsx +181 -0
- package/src/ui/forms/Button.tsx +323 -0
- package/src/ui/{Checkbox.stories.tsx → forms/Checkbox.stories.tsx} +2 -2
- package/src/ui/{Checkbox.tsx → forms/Checkbox.tsx} +2 -2
- package/src/ui/forms/ChipGroup.stories.tsx +118 -0
- package/src/ui/forms/ChipGroup.tsx +239 -0
- package/src/ui/{Dropdown.tsx → forms/Dropdown.tsx} +1 -1
- package/src/ui/{Field.stories.tsx → forms/Field.stories.tsx} +3 -3
- package/src/ui/{Field.tsx → forms/Field.tsx} +1 -1
- package/src/ui/{Input.stories.tsx → forms/Input.stories.tsx} +6 -6
- package/src/ui/{Input.tsx → forms/Input.tsx} +1 -1
- package/src/ui/{Label.stories.tsx → forms/Label.stories.tsx} +2 -2
- package/src/ui/{Label.tsx → forms/Label.tsx} +2 -2
- package/src/ui/{NumberField.stories.tsx → forms/NumberField.stories.tsx} +2 -2
- package/src/ui/{NumberField.tsx → forms/NumberField.tsx} +8 -9
- package/src/ui/forms/PeerbotsColorSelector.stories.tsx +49 -0
- package/src/ui/forms/PeerbotsColorSelector.tsx +100 -0
- package/src/ui/{Select.stories.tsx → forms/Select.stories.tsx} +2 -2
- package/src/ui/{Select.tsx → forms/Select.tsx} +5 -3
- package/src/ui/{Slider.stories.tsx → forms/Slider.stories.tsx} +6 -4
- package/src/ui/{Slider.tsx → forms/Slider.tsx} +7 -3
- package/src/ui/forms/SliderWithNumberField.stories.tsx +136 -0
- package/src/ui/{SliderWithNumberField.tsx → forms/SliderWithNumberField.tsx} +19 -7
- package/src/ui/{Switch.stories.tsx → forms/Switch.stories.tsx} +2 -2
- package/src/ui/{Switch.tsx → forms/Switch.tsx} +1 -1
- package/src/ui/{TabRadio.stories.tsx → forms/TabRadio.stories.tsx} +3 -3
- package/src/ui/{TabRadio.tsx → forms/TabRadio.tsx} +1 -1
- package/src/ui/{TextArea.stories.tsx → forms/TextArea.stories.tsx} +5 -3
- package/src/ui/{TextArea.tsx → forms/TextArea.tsx} +1 -1
- package/src/ui/forms/index.ts +15 -0
- package/src/ui/foundations/Anchor.stories.tsx +39 -0
- package/src/ui/foundations/Anchor.tsx +96 -0
- package/src/ui/foundations/CodeBlock.stories.tsx +86 -0
- package/src/ui/foundations/CodeBlock.tsx +148 -0
- package/src/ui/foundations/Colors.stories.tsx +80 -0
- package/src/ui/{Icon.stories.tsx → foundations/Icon.stories.tsx} +1 -1
- package/src/ui/{Icon.tsx → foundations/Icon.tsx} +1 -1
- package/src/ui/{IconRegistry.tsx → foundations/IconRegistry.tsx} +261 -57
- package/src/ui/foundations/SocialLinks.stories.tsx +38 -0
- package/src/ui/foundations/SocialLinks.tsx +117 -0
- package/src/ui/foundations/Typography.stories.tsx +58 -0
- package/src/ui/foundations/Typography.tsx +163 -0
- package/src/ui/foundations/index.ts +6 -0
- package/src/ui/index.ts +7 -27
- package/src/ui/layout/Accordion.stories.tsx +86 -0
- package/src/ui/layout/Accordion.tsx +205 -0
- package/src/ui/layout/Card.stories.tsx +151 -0
- package/src/ui/layout/Card.tsx +124 -0
- package/src/ui/layout/Collapsible.stories.tsx +54 -0
- package/src/ui/layout/Collapsible.tsx +54 -0
- package/src/ui/{Separator.stories.tsx → layout/Separator.stories.tsx} +2 -2
- package/src/ui/{Separator.tsx → layout/Separator.tsx} +1 -1
- package/src/ui/{SettingsPanel.stories.tsx → layout/SettingsPanel.stories.tsx} +5 -5
- package/src/ui/{SettingsPanel.tsx → layout/SettingsPanel.tsx} +33 -29
- package/src/ui/layout/index.ts +5 -0
- package/src/ui/media/Avatar.stories.tsx +89 -0
- package/src/ui/media/Avatar.tsx +122 -0
- package/src/ui/media/Dropzone.stories.tsx +95 -0
- package/src/ui/media/Dropzone.tsx +328 -0
- package/src/ui/media/FileUpload.stories.tsx +62 -0
- package/src/ui/media/FileUpload.tsx +175 -0
- package/src/ui/media/index.ts +3 -0
- package/src/ui/{AuthFormUI.stories.tsx → patterns/AuthFormUI.stories.tsx} +1 -1
- package/src/ui/{AuthFormUI.tsx → patterns/AuthFormUI.tsx} +24 -23
- package/src/ui/patterns/CopyButton.stories.tsx +77 -0
- package/src/ui/patterns/CopyButton.tsx +93 -0
- package/src/ui/patterns/SearchInput.stories.tsx +51 -0
- package/src/ui/patterns/SearchInput.tsx +93 -0
- package/src/ui/patterns/Stepper.stories.tsx +129 -0
- package/src/ui/patterns/Stepper.tsx +295 -0
- package/src/ui/{TabSelection.stories.tsx → patterns/TabSelection.stories.tsx} +1 -1
- package/src/ui/{TabSelection.tsx → patterns/TabSelection.tsx} +2 -2
- package/src/ui/patterns/index.ts +6 -0
- package/src/ui/patterns/useClipboard.ts +75 -0
- package/src/ui/types.ts +48 -0
- package/src/ui/Alert.stories.tsx +0 -41
- package/src/ui/Alert.tsx +0 -72
- package/src/ui/Anchor.stories.tsx +0 -25
- package/src/ui/Anchor.tsx +0 -32
- package/src/ui/Button.stories.tsx +0 -108
- package/src/ui/Button.tsx +0 -121
- package/src/ui/Collapsible.stories.tsx +0 -91
- package/src/ui/Collapsible.tsx +0 -52
- package/src/ui/Colors.stories.tsx +0 -67
- package/src/ui/Popover.tsx +0 -42
- package/src/ui/Skeleton.stories.tsx +0 -43
- package/src/ui/SliderWithNumberField.stories.tsx +0 -101
- package/src/ui/Typography.stories.tsx +0 -87
- package/src/ui/Typography.tsx +0 -80
package/.changeset/config.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://unpkg.com/@changesets/config@3.1.3/schema.json",
|
|
3
|
-
"changelog": ["@changesets/changelog-github", { "repo": "
|
|
3
|
+
"changelog": ["@changesets/changelog-github", { "repo": "PEERbots/peerbots-core" }],
|
|
4
4
|
"commit": false,
|
|
5
5
|
"fixed": [],
|
|
6
6
|
"linked": [],
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
name: "Storybook Preview & Publishing"
|
|
2
2
|
|
|
3
|
-
on:
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
4
12
|
|
|
5
13
|
permissions:
|
|
6
14
|
pull-requests: write
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,99 @@
|
|
|
1
1
|
# @peerbots/core
|
|
2
2
|
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#14](https://github.com/PEERbots/peerbots-core/pull/14) [`299e477`](https://github.com/PEERbots/peerbots-core/commit/299e477310db89648919427e918610d1384cac29) Thanks [@sbeleidy](https://github.com/sbeleidy)! - # Major Release: Design System Primitives, Orthogonal Architecture, & Component Taxonomy
|
|
8
|
+
|
|
9
|
+
This major release introduces the centralized **Orthogonal Prop Architecture**, 10+ new UI primitives upstreamed from the ecosystem, hardware-accelerated animations, and a reorganized 7-category Storybook hierarchy.
|
|
10
|
+
|
|
11
|
+
***
|
|
12
|
+
|
|
13
|
+
## 1. New Primitives & Components
|
|
14
|
+
|
|
15
|
+
- **`ChipGroup` (`Forms/ChipGroup`)**: Selectable pill chips for single/multi-selection, filtering, status badges (`Soon`, `New`), custom icons, and optional horizontal scrollable rail.
|
|
16
|
+
- **`Stepper` (`Patterns/Stepper`)**: Workflow sequence progress tracker with `horizontal` (connected line rail), `vertical` (timeline), and `chips` (jump pills) orientations.
|
|
17
|
+
- **`Popover` (`Feedback/Popover`)**: Floating contextual card overlay built on Base UI with placement controls, header title, close button, pointing arrow, and backdrop dismissal.
|
|
18
|
+
- **`Spinner` (`Feedback/Spinner`)**: Standalone animated circular loader supporting `size` and `color` props.
|
|
19
|
+
- **`Card` (`Layout/Card`)**: Structural surface container supporting `surface` (elevated), `glass` (translucent backdrop-blur), `outline`, and `flat` variants, plus subtle brand tinting.
|
|
20
|
+
- **`Accordion` & `Collapsible` (`Layout/`)**: Unified expandable disclosure components with smooth hardware-accelerated CSS Grid height/opacity transitions.
|
|
21
|
+
- **`CodeBlock` (`Foundations/CodeBlock`)**: Clean frameless code block by default with floating top-right copy button; macOS-style file/terminal box opt-in via `variant="window"`.
|
|
22
|
+
- **`CopyButton` (`Patterns/CopyButton`)**: Accessible click-to-copy button with clipboard hook integration, timeout, and copied feedback state.
|
|
23
|
+
- **`SearchInput` (`Patterns/SearchInput`)**: Search input with built-in search icon, loading indicator, and clear button.
|
|
24
|
+
- **`EmptyState` (`Feedback/EmptyState`)**: Dash-bordered empty state placeholder with icon, title, description, and primary/secondary action buttons.
|
|
25
|
+
- **`FileUpload` & `Dropzone` (`Media & Files/`)**: Drag-and-drop file upload with live image/video preview, file validation, and replacement controls.
|
|
26
|
+
- **`Avatar` (`Media & Files/`)**: Polymorphic user and robot avatar with image fallback initials and status indicator.
|
|
27
|
+
- **`LineGraph` (`Charts/LineGraph`)**: Victory-based responsive SVG line graph with min/max bounds and data point markers.
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
## 2. Orthogonal Prop Architecture (`src/ui/types.ts`)
|
|
32
|
+
|
|
33
|
+
Untangled overloaded `variant` props into dedicated, composable dimensions:
|
|
34
|
+
|
|
35
|
+
- **`variant` (Fill Treatment)**: `"solid" | "soft" | "outline" | "ghost" | "link"`
|
|
36
|
+
- **`color` (Palette & Intent)**: `"primary" | "neutral" | "teal" | "pink" | "darkblue" | "danger" | "success" | "warning"`
|
|
37
|
+
- **`size` (Scale)**: `"xs" | "sm" | "md" | "lg" | "xl"`
|
|
38
|
+
- **`radius` (Geometry)**: `"none" | "sm" | "md" | "lg" | "2xl" | "pill"`
|
|
39
|
+
|
|
40
|
+
### Component Updates:
|
|
41
|
+
|
|
42
|
+
- **`Button`**: Fully supports the orthogonal matrix. E.g., `<Button color="neutral">` for calm secondary buttons, `<Button color="teal" radius="pill">` for hero CTAs, and `<Button color="danger" variant="ghost">` for low-friction delete actions.
|
|
43
|
+
- **`Typography` (`Heading`, `Text`)**: Separates `size`, `color`, `weight`, and `level`.
|
|
44
|
+
- **`Anchor`**: Separates `color`, `underline` (`"hover" | "always" | "none"`), and `variant`.
|
|
45
|
+
- **`Alert`**: Standardized on `color`, `variant` (`"soft" | "outline" | "solid"`), and `pb:rounded-2xl` corners.
|
|
46
|
+
- **`Dialog`**: Standardized on `pb:rounded-2xl` and `pb:shadow-2xl`.
|
|
47
|
+
|
|
48
|
+
***
|
|
49
|
+
|
|
50
|
+
## 3. Storybook Hierarchy & Living Documentation
|
|
51
|
+
|
|
52
|
+
- Reorganized 41 components into 7 clean categories:
|
|
53
|
+
1. `Foundations/`: `Typography`, `Colors`, `Icon`, `SocialLinks`, `CodeBlock`, `Anchor`
|
|
54
|
+
2. `Forms/`: `Button`, `ChipGroup`, `Input`, `NumberField`, `TextArea`, `Select`, `Switch`, `Checkbox`, `Slider`, `SliderWithNumberField`, `TabRadio`, `PeerbotsColorSelector`, `Field`, `Label`
|
|
55
|
+
3. `Layout/`: `Card`, `Accordion`, `Collapsible`, `Separator`, `SettingsPanel`
|
|
56
|
+
4. `Media & Files/`: `Avatar`, `Dropzone`, `FileUpload`
|
|
57
|
+
5. `Feedback/`: `Alert`, `Dialog`, `Popover`, `Tooltip`, `Skeleton`, `EmptyState`, `Spinner`
|
|
58
|
+
6. `Charts/`: `LineGraph`, `DistributionBarChart`, `DistributionHistogram`
|
|
59
|
+
7. `Patterns/`: `Stepper`, `CopyButton`, `SearchInput`, `AuthFormUI`, `TabSelection`
|
|
60
|
+
- Rewrote `DesignSystem.mdx` with responsive JSX cards, standard recipes, Do's & Don'ts, and Glassmorphism guidelines.
|
|
61
|
+
|
|
62
|
+
***
|
|
63
|
+
|
|
64
|
+
## 4. Migration & Deprecations
|
|
65
|
+
|
|
66
|
+
- **`Button`**:
|
|
67
|
+
- Deprecated `variant="marketing-teal"` / `variant="marketing-pink"`. Use `color="teal" radius="pill"` / `color="pink" radius="pill"`.
|
|
68
|
+
- Deprecated `variant="secondary"`. Use `color="neutral"` (or `variant="soft"`).
|
|
69
|
+
- Deprecated `variant="ghostly-danger"`. Use `variant="ghost" color="danger"`.
|
|
70
|
+
_(Backward-compatibility adapters remain in place to prevent breaking existing code)._
|
|
71
|
+
- **`Typography`**:
|
|
72
|
+
- `Text`: Prefer `color="muted"` over `variant="muted"`, and `size="sm"` over `variant="small"`.
|
|
73
|
+
- `Heading`: Prefer `color="teal"`, `color="pink"`, `color="gradient"` over `variant="marketing-*"`.
|
|
74
|
+
|
|
75
|
+
### Minor Changes
|
|
76
|
+
|
|
77
|
+
- [#14](https://github.com/PEERbots/peerbots-core/pull/14) [`aa2bfb7`](https://github.com/PEERbots/peerbots-core/commit/aa2bfb700c1e76424c44d48efa6177d9f518735c) Thanks [@sbeleidy](https://github.com/sbeleidy)! - Add general-purpose UI components:
|
|
78
|
+
|
|
79
|
+
- `CopyButton` and `useClipboard` hook for accessible clipboard copying with animated feedback
|
|
80
|
+
- `FileUpload` for standard accessible file input selection
|
|
81
|
+
- `Dropzone` for drag-and-drop file upload with visual preview support
|
|
82
|
+
- `Avatar` for user, maker, and robot profile display with initials and icon fallback
|
|
83
|
+
|
|
84
|
+
- [#14](https://github.com/PEERbots/peerbots-core/pull/14) [`121f94c`](https://github.com/PEERbots/peerbots-core/commit/121f94c7f531f64210b24707680599187e81e05b) Thanks [@sbeleidy](https://github.com/sbeleidy)! - Add new reusable UI primitives: PeerbotsColorSelector, EmptyState, SearchInput, and LineGraph
|
|
85
|
+
|
|
86
|
+
- [#14](https://github.com/PEERbots/peerbots-core/pull/14) [`7e9c4ce`](https://github.com/PEERbots/peerbots-core/commit/7e9c4ce461c552d48a36072f3773293df714f365) Thanks [@sbeleidy](https://github.com/sbeleidy)! - Upstream core primitives, design tokens, and domain icons:
|
|
87
|
+
- **Design Tokens**: Add canonical Peerbots brand colors (`--color-peerbots-*`) to `theme.css`.
|
|
88
|
+
- **Card**: Add new general `Card` primitive with elevation, tint variants, hover effects, and polymorphic `as`/`href` support.
|
|
89
|
+
- **Accordion**: Add new accessible multi-item `Accordion` component with single/multiple expansion modes.
|
|
90
|
+
- **CodeBlock**: Add standalone `CodeBlock` component with clipboard copy, line numbers, and language/filename badges.
|
|
91
|
+
- **SocialLinks**: Add standardized `SocialLinks` component with Peerbots social media icons and variant styling.
|
|
92
|
+
- **Anchor / Link**: Decouple from `react-router-dom`, making it framework-agnostic with variant styles (`default`, `teal`, `pink`, `underline`, `underline-pink`, `muted`).
|
|
93
|
+
- **Button**: Support polymorphic `href` rendering and add marketing variants (`marketing-teal`, `marketing-pink`, `outline`).
|
|
94
|
+
- **Typography**: Support marketing color variants on `Heading` and `Text`.
|
|
95
|
+
- **IconRegistry & Icon**: Add 30+ domain icons (robotics, authoring, marketplace, audio, motion) and brand social icons with alias lookup.
|
|
96
|
+
|
|
3
97
|
## 0.2.6
|
|
4
98
|
|
|
5
99
|
### Patch Changes
|