@forgedevstack/bear 1.3.3 → 1.3.5

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 (169) hide show
  1. package/README.md +100 -290
  2. package/dist/components/Alert/Alert.cjs +1 -1
  3. package/dist/components/Alert/Alert.const.cjs +1 -1
  4. package/dist/components/Alert/Alert.const.d.ts +1 -6
  5. package/dist/components/Alert/Alert.const.js +10 -30
  6. package/dist/components/Alert/Alert.js +49 -54
  7. package/dist/components/AlertDialog/AlertDialog.cjs +1 -1
  8. package/dist/components/AlertDialog/AlertDialog.js +67 -84
  9. package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
  10. package/dist/components/BottomSheet/BottomSheet.js +72 -64
  11. package/dist/components/Calendar/Calendar.cjs +1 -1
  12. package/dist/components/Calendar/Calendar.js +122 -112
  13. package/dist/components/Chart/BarChart.cjs +1 -1
  14. package/dist/components/Chart/BarChart.js +37 -36
  15. package/dist/components/Chart/Chart.types.d.ts +2 -0
  16. package/dist/components/Chart/Chart.utils.cjs +1 -1
  17. package/dist/components/Chart/Chart.utils.d.ts +2 -0
  18. package/dist/components/Chart/Chart.utils.js +32 -31
  19. package/dist/components/Chart/FunnelChart.cjs +1 -1
  20. package/dist/components/Chart/FunnelChart.js +29 -28
  21. package/dist/components/Chart/LineChart.cjs +1 -1
  22. package/dist/components/Chart/LineChart.js +45 -44
  23. package/dist/components/Chart/PieChart.cjs +1 -1
  24. package/dist/components/Chart/PieChart.js +52 -51
  25. package/dist/components/Chart/RadarChart.cjs +1 -1
  26. package/dist/components/Chart/RadarChart.js +63 -62
  27. package/dist/components/Chart/index.d.ts +1 -1
  28. package/dist/components/ChipGroup/ChipGroup.cjs +1 -1
  29. package/dist/components/ChipGroup/ChipGroup.const.cjs +1 -1
  30. package/dist/components/ChipGroup/ChipGroup.const.d.ts +2 -0
  31. package/dist/components/ChipGroup/ChipGroup.const.js +6 -4
  32. package/dist/components/ChipGroup/ChipGroup.js +52 -48
  33. package/dist/components/CommandPalette/CommandItem.cjs +1 -0
  34. package/dist/components/CommandPalette/CommandItem.d.ts +6 -0
  35. package/dist/components/CommandPalette/CommandItem.js +39 -0
  36. package/dist/components/CommandPalette/CommandPalette.cjs +1 -1
  37. package/dist/components/CommandPalette/CommandPalette.js +129 -144
  38. package/dist/components/Drawer/Drawer.cjs +1 -1
  39. package/dist/components/Drawer/Drawer.js +72 -66
  40. package/dist/components/EmptyState/EmptyState.cjs +1 -1
  41. package/dist/components/EmptyState/EmptyState.const.cjs +1 -1
  42. package/dist/components/EmptyState/EmptyState.const.d.ts +5 -0
  43. package/dist/components/EmptyState/EmptyState.const.js +30 -15
  44. package/dist/components/EmptyState/EmptyState.js +35 -35
  45. package/dist/components/EmptyState/EmptyState.types.d.ts +2 -2
  46. package/dist/components/HoverCard/HoverCard.cjs +4 -3
  47. package/dist/components/HoverCard/HoverCard.const.cjs +1 -0
  48. package/dist/components/HoverCard/HoverCard.const.d.ts +1 -0
  49. package/dist/components/HoverCard/HoverCard.const.js +5 -0
  50. package/dist/components/HoverCard/HoverCard.js +62 -56
  51. package/dist/components/HoverCard/HoverCard.types.d.ts +7 -0
  52. package/dist/components/Menu/Menu.cjs +1 -1
  53. package/dist/components/Menu/Menu.const.cjs +1 -0
  54. package/dist/components/Menu/Menu.const.d.ts +2 -0
  55. package/dist/components/Menu/Menu.const.js +7 -0
  56. package/dist/components/Menu/Menu.d.ts +3 -9
  57. package/dist/components/Menu/Menu.js +57 -89
  58. package/dist/components/Menu/Menu.types.d.ts +8 -1
  59. package/dist/components/Menu/MenuDivider.cjs +1 -0
  60. package/dist/components/Menu/MenuDivider.d.ts +6 -0
  61. package/dist/components/Menu/MenuDivider.js +7 -0
  62. package/dist/components/Menu/MenuItem.cjs +1 -0
  63. package/dist/components/Menu/MenuItem.d.ts +6 -0
  64. package/dist/components/Menu/MenuItem.js +46 -0
  65. package/dist/components/Modal/Modal.cjs +1 -1
  66. package/dist/components/Modal/Modal.const.cjs +1 -1
  67. package/dist/components/Modal/Modal.const.d.ts +1 -0
  68. package/dist/components/Modal/Modal.const.js +15 -12
  69. package/dist/components/Modal/Modal.js +62 -59
  70. package/dist/components/Modal/Modal.types.d.ts +7 -0
  71. package/dist/components/ModalsProvider/components/StackedModal/StackedModal.cjs +1 -1
  72. package/dist/components/ModalsProvider/components/StackedModal/StackedModal.js +10 -9
  73. package/dist/components/OverlayPortal/OverlayPortal.cjs +1 -1
  74. package/dist/components/OverlayPortal/OverlayPortal.const.cjs +1 -1
  75. package/dist/components/OverlayPortal/OverlayPortal.const.d.ts +4 -0
  76. package/dist/components/OverlayPortal/OverlayPortal.const.js +21 -5
  77. package/dist/components/OverlayPortal/OverlayPortal.js +44 -38
  78. package/dist/components/Popover/Popover.cjs +1 -1
  79. package/dist/components/Popover/Popover.const.cjs +1 -0
  80. package/dist/components/Popover/Popover.const.d.ts +15 -1
  81. package/dist/components/Popover/Popover.const.js +24 -0
  82. package/dist/components/Popover/Popover.js +77 -73
  83. package/dist/components/Popover/Popover.types.d.ts +7 -0
  84. package/dist/components/Select/Select.cjs +1 -1
  85. package/dist/components/Select/Select.const.cjs +1 -1
  86. package/dist/components/Select/Select.const.d.ts +1 -0
  87. package/dist/components/Select/Select.const.js +7 -6
  88. package/dist/components/Select/Select.js +101 -96
  89. package/dist/components/Tabs/TabList.cjs +1 -1
  90. package/dist/components/Tabs/TabList.js +1 -1
  91. package/dist/components/Toast/Toast.cjs +1 -1
  92. package/dist/components/Toast/Toast.const.cjs +1 -1
  93. package/dist/components/Toast/Toast.const.d.ts +2 -0
  94. package/dist/components/Toast/Toast.const.js +11 -8
  95. package/dist/components/Toast/Toast.context.cjs +1 -0
  96. package/dist/components/Toast/Toast.context.d.ts +3 -0
  97. package/dist/components/Toast/Toast.context.js +11 -0
  98. package/dist/components/Toast/Toast.d.ts +4 -3
  99. package/dist/components/Toast/Toast.icons.cjs +1 -0
  100. package/dist/components/Toast/Toast.icons.d.ts +4 -0
  101. package/dist/components/Toast/Toast.icons.js +29 -0
  102. package/dist/components/Toast/Toast.js +32 -160
  103. package/dist/components/Toast/ToastContainer.cjs +1 -0
  104. package/dist/components/Toast/ToastContainer.d.ts +3 -0
  105. package/dist/components/Toast/ToastContainer.js +39 -0
  106. package/dist/components/Toast/ToastItem.cjs +1 -0
  107. package/dist/components/Toast/ToastItem.d.ts +5 -0
  108. package/dist/components/Toast/ToastItem.js +86 -0
  109. package/dist/components/ToggleGroup/ToggleGroup.cjs +1 -0
  110. package/dist/components/ToggleGroup/ToggleGroup.const.cjs +1 -0
  111. package/dist/components/ToggleGroup/ToggleGroup.const.d.ts +15 -0
  112. package/dist/components/ToggleGroup/ToggleGroup.const.js +33 -0
  113. package/dist/components/ToggleGroup/ToggleGroup.context.cjs +1 -0
  114. package/dist/components/ToggleGroup/ToggleGroup.context.d.ts +2 -0
  115. package/dist/components/ToggleGroup/ToggleGroup.context.js +5 -0
  116. package/dist/components/ToggleGroup/ToggleGroup.d.ts +2 -0
  117. package/dist/components/ToggleGroup/ToggleGroup.js +89 -0
  118. package/dist/components/ToggleGroup/ToggleGroup.types.d.ts +48 -0
  119. package/dist/components/ToggleGroup/ToggleGroupItem.cjs +1 -0
  120. package/dist/components/ToggleGroup/ToggleGroupItem.d.ts +2 -0
  121. package/dist/components/ToggleGroup/ToggleGroupItem.js +50 -0
  122. package/dist/components/ToggleGroup/hooks/useToggleGroupContext.cjs +1 -0
  123. package/dist/components/ToggleGroup/hooks/useToggleGroupContext.d.ts +1 -0
  124. package/dist/components/ToggleGroup/hooks/useToggleGroupContext.js +6 -0
  125. package/dist/components/ToggleGroup/index.d.ts +4 -0
  126. package/dist/components/Tooltip/Tooltip.cjs +1 -1
  127. package/dist/components/Tooltip/Tooltip.const.cjs +1 -0
  128. package/dist/components/Tooltip/Tooltip.const.d.ts +8 -0
  129. package/dist/components/Tooltip/Tooltip.const.js +13 -0
  130. package/dist/components/Tooltip/Tooltip.js +59 -61
  131. package/dist/components/Tooltip/Tooltip.types.d.ts +7 -0
  132. package/dist/components/Transition/Transition.cjs +1 -1
  133. package/dist/components/Transition/Transition.const.cjs +1 -1
  134. package/dist/components/Transition/Transition.const.js +26 -8
  135. package/dist/components/Transition/Transition.js +77 -74
  136. package/dist/components/Transition/Transition.types.d.ts +8 -2
  137. package/dist/components/Typography/Typography.const.cjs +1 -1
  138. package/dist/components/Typography/Typography.const.js +2 -1
  139. package/dist/components/index.cjs +1 -1
  140. package/dist/components/index.d.ts +3 -1
  141. package/dist/components/index.js +429 -419
  142. package/dist/constants/generals.const.cjs +1 -1
  143. package/dist/constants/generals.const.js +85 -86
  144. package/dist/constants/numbers.const.cjs +1 -1
  145. package/dist/constants/numbers.const.d.ts +3 -0
  146. package/dist/constants/numbers.const.js +37 -34
  147. package/dist/hooks/index.cjs +1 -1
  148. package/dist/hooks/index.d.ts +2 -0
  149. package/dist/hooks/index.js +6 -4
  150. package/dist/hooks/useFixedAnchorPosition/index.d.ts +1 -1
  151. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs +1 -1
  152. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.d.ts +3 -0
  153. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js +17 -14
  154. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.types.d.ts +1 -1
  155. package/dist/hooks/useFocusTrap/index.d.ts +2 -0
  156. package/dist/hooks/useFocusTrap/useFocusTrap.cjs +1 -0
  157. package/dist/hooks/useFocusTrap/useFocusTrap.d.ts +3 -0
  158. package/dist/hooks/useFocusTrap/useFocusTrap.js +41 -0
  159. package/dist/hooks/useFocusTrap/useFocusTrap.types.d.ts +8 -0
  160. package/dist/hooks/useFocusTrap/useFocusTrap.utils.cjs +1 -0
  161. package/dist/hooks/useFocusTrap/useFocusTrap.utils.d.ts +1 -0
  162. package/dist/hooks/useFocusTrap/useFocusTrap.utils.js +23 -0
  163. package/dist/index.cjs +1 -1
  164. package/dist/index.js +580 -568
  165. package/dist/styles/_alerts.css +85 -4
  166. package/dist/styles/_drawer.css +60 -0
  167. package/dist/styles/_effects.css +33 -0
  168. package/dist/styles.css +231 -4
  169. package/package.json +3 -5
package/README.md CHANGED
@@ -1,357 +1,167 @@
1
1
  # @forgedevstack/bear
2
2
 
3
- Strong, reliable React UI components. AeroCraft-powered, zero config required. The protective force of ForgeStack.
3
+ React components, a theme provider, and AeroCraft tokens. Version 1.3.5 in this repository. The published npm release is still 1.3.4 until 1.3.5 is published.
4
4
 
5
- [![Support ForgeStack on Ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/forgestack)
5
+ Author: John Yaghobieh. Docs: [bearui.com](https://bearui.com). Package: [@forgedevstack/bear](https://www.npmjs.com/package/@forgedevstack/bear).
6
6
 
7
- Sponsor Bear on [Ko-fi](https://ko-fi.com/forgestack).
8
-
9
- ## Portal
10
-
11
- Visit the [Bear UI Portal](https://bearui.com/) to explore all components, view live examples, and browse the documentation.
12
-
13
- ## Sanity / Playwright
14
-
15
- ```bash
16
- # Install browsers once (required — missing Chromium yields 0 passes)
17
- cd portal && npx playwright install chromium
18
-
19
- # Critical-path smoke (recommended before release)
20
- cd portal && npm run test:e2e:smoke
21
-
22
- # Full portal suite
23
- cd portal && npm run test:e2e
24
- ```
25
-
26
- `BEAR_E2E_SMOKE=1` runs `e2e/specs/smoke.spec.ts` only (includes RTL direction + Toast aria-live checks). The e2e webServer builds Bear, then starts the portal on port `5174`.
27
-
28
- ### Auto DOM ids
29
-
30
- Public components generate root `id` values as `Bear-{Component}-{alphanumeric}` (e.g. `Bear-Button-a48293100123`). Pass `id` to override; keep `testId` on `data-testid`.
31
-
32
- ## Features
33
-
34
- - **Tailwind-Powered**: Built with Tailwind CSS, zero config required
35
- - **React 18+**: Works with React 18 and above
36
- - **TypeScript**: Full type safety with comprehensive TypeScript definitions
37
- - **Comprehensive Component Library**: 50+ production-ready components
38
- - **Accessible**: ARIA attributes and keyboard navigation support
39
- - **Customizable**: Flexible theming and styling options
40
- - **Tree-Shakeable**: Import only what you need
41
- - **Zero Config**: Works out of the box with minimal setup
42
-
43
- ## Installation
44
-
45
- Bear installs `@forgedevstack/bear-icons` as an **optional dependency**. The default install includes components, theme, and icons.
7
+ ## Install
46
8
 
47
9
  ```bash
48
10
  npm install @forgedevstack/bear
49
- # or
50
- pnpm add @forgedevstack/bear
51
- # or
52
- yarn add @forgedevstack/bear
53
11
  ```
54
12
 
55
- ### Install without icons
56
-
57
- npm has no `--no-icons` flag. Skip the icon package with `--omit=optional`:
13
+ That install is the component set and the theme. Icons are a separate package. Charts still ship inside the core build today, and they also have a dedicated package entry so you can import them on their own.
58
14
 
59
15
  ```bash
60
- npm install @forgedevstack/bear --omit=optional
61
- # yarn
62
- yarn add @forgedevstack/bear --ignore-optional
63
- # pnpm
64
- pnpm add @forgedevstack/bear --no-optional
16
+ npm install @forgedevstack/bear-icons
17
+ npm install @forgedevstack/bear-x-charts
18
+ npm install @forgedevstack/bear-x-ai
19
+ npm install @forgedevstack/bear-x-code
20
+ npm install @forgedevstack/bear-map
21
+ npm install @forgedevstack/kanban
22
+ npm install @forgedevstack/calendar
65
23
  ```
66
24
 
67
- Do not import icons from `@forgedevstack/bear` after a no-icons install.
25
+ `@forgedevstack/bear-icons` and `@forgedevstack/calendar` are on npm (`calendar` is 1.0.1 there; 1.0.2 with the event calendar is in this repo). Charts, AI, code, map, and kanban are not on npm yet.
68
26
 
69
- ### Icons only
27
+ Media playback stays [Torch](https://www.npmjs.com/package/@forgedevstack/torch). The rich text editor stays [Ink](https://www.npmjs.com/package/@forgedevstack/ink).
70
28
 
71
- ```bash
72
- npm install @forgedevstack/bear-icons
73
- ```
29
+ ## Bundle size
74
30
 
75
- ```tsx
76
- import { SearchIcon, BearIcons } from '@forgedevstack/bear-icons';
77
- ```
31
+ Sizes change with each publish. Open Bundlephobia for the package you are about to add:
78
32
 
79
- ### Import CSS (Required)
33
+ - [Core](https://bundlephobia.com/package/@forgedevstack/bear)
34
+ - [Icons](https://bundlephobia.com/package/@forgedevstack/bear-icons)
35
+ - [Charts](https://bundlephobia.com/package/@forgedevstack/bear-x-charts)
36
+ - [AI](https://bundlephobia.com/package/@forgedevstack/bear-x-ai)
37
+ - [Code](https://bundlephobia.com/package/@forgedevstack/bear-x-code)
38
+ - [Map](https://bundlephobia.com/package/@forgedevstack/bear-map)
39
+ - [Kanban](https://bundlephobia.com/package/@forgedevstack/kanban)
40
+ - [Calendar](https://bundlephobia.com/package/@forgedevstack/calendar)
80
41
 
81
- Import the compiled CSS file once in your app:
42
+ The portal product pages and the libraries page have the same link as a button.
82
43
 
83
- ```tsx
84
- // In your main entry file (e.g., main.tsx, App.tsx, or index.css)
85
- import '@forgedevstack/bear/styles.css';
86
- ```
44
+ ## Provider
87
45
 
88
- ## Quick Start
46
+ Import the stylesheet once, then wrap the tree.
89
47
 
90
48
  ```tsx
91
- import { Button, Card, CardHeader, CardBody } from '@forgedevstack/bear';
49
+ import '@forgedevstack/bear/styles.css';
50
+ import { BearProvider, Button, Card, CardBody, Typography } from '@forgedevstack/bear';
92
51
 
93
- function App() {
52
+ export function App() {
94
53
  return (
95
- <Card>
96
- <CardHeader>
97
- <h2>Welcome to Bear</h2>
98
- </CardHeader>
99
- <CardBody>
100
- <Button variant="primary">Get Started</Button>
101
- </CardBody>
102
- </Card>
54
+ <BearProvider
55
+ colorScheme="system"
56
+ theme={{ colors: { primary: '#ec4899' } }}
57
+ >
58
+ <Card>
59
+ <CardBody>
60
+ <Typography variant="h4">Bear</Typography>
61
+ <Button variant="primary">Save</Button>
62
+ </CardBody>
63
+ </Card>
64
+ </BearProvider>
103
65
  );
104
66
  }
105
67
  ```
106
68
 
107
- ## Component Categories
108
-
109
- ### Layout Components
110
-
111
- - `Container` - Responsive container with max-width constraints
112
- - `Flex` - Flexible box layout component
113
- - `Grid` / `GridItem` - CSS Grid layout system
114
- - `ResizablePanel` - Two-pane resizable layout with draggable divider (horizontal/vertical)
115
-
116
- ### UI Components
117
-
118
- - `Button` / `ButtonGroup` - Interactive button components
119
- - `Card` - Container for content with header, body, and footer
120
- - `Badge` - Status indicators and labels
121
- - `Paper` - Elevated surface component
122
- - `Divider` - Visual separator
123
- - `Typography` - Text styling with gradient text and typewriter effect
124
- - `Link` - Styled link component
125
-
126
- ### Form Components
127
-
128
- - `Input` / `TextField` - Text input with optional `InputProps.startAdornment` / `endAdornment` for start/end slots
129
- - `Select` / `MultiSelect` - Dropdown selection components
130
- - `Checkbox` - Checkbox input
131
- - `Radio` / `RadioGroup` - Radio button inputs
132
- - `Switch` - Toggle switch
133
- - `Autocomplete` - Autocomplete input
134
- - `TransferList` - Transfer items between lists
135
- - `FileUpload` - File upload component
136
- - `NumberInput` - Numeric input with controls
137
- - `OTPInput` - One-time password input
138
- - `ColorPicker` - Color selection component
139
- - `DatePicker` - Date selection component
140
- - `TimePicker` - Time selection component
141
- - `Slider` - Range slider input
142
-
143
- ### Feedback Components
144
-
145
- - `Alert` - Alert messages
146
- - `Spinner` - Loading spinner
147
- - `Rating` - Star rating component
148
- - `Progress` - Progress indicator
149
- - `Skeleton` - Loading skeleton states
150
- - `Toast` / `useToast` - Toast notifications
151
- - `BearLoader` - Custom bear-themed loader
152
-
153
- ### Overlay Components
154
-
155
- - `Modal` - Modal dialog
156
- - `Drawer` - Slide-out drawer
157
- - `Tooltip` - Tooltip component
158
- - `Popover` - Popover component
159
- - `Menu` / `MenuItem` - Context menu
160
- - `Dropdown` - Dropdown menu
161
- - `SpeedDial` - Floating action speed dial
162
-
163
- ### Data Display
164
-
165
- - `DataTable` - Advanced data table with sorting, filtering, and pagination
166
- - `Carousel` - Image/content carousel
167
- - `Accordion` - Collapsible content sections
168
- - `Tabs` / `TabList` / `Tab` / `TabPanel` - Tabbed interface; `TabList` supports `maxVisibleTabs` (overflow dropdown) and `wrap` (auto-break)
169
- - `List` - List component with various item types
170
- - `Avatar` / `AvatarGroup` - User avatar display
171
- - `Chip` - Compact element for input, attribute, or action
172
- - `TreeView` - Hierarchical tree structure
173
- - `FileTree` - File/folder tree with selection and expand/collapse
174
- - `Timeline` - Timeline component
175
- - `Statistic` - Statistical display
176
- - `EmptyState` - Empty state placeholder
177
- - `Image` - Enhanced image component
178
-
179
- ### Navigation Components
180
-
181
- - `Breadcrumbs` - Navigation breadcrumbs
182
- - `Stepper` - Step-by-step navigation
183
- - `BottomNavigation` - Bottom navigation bar
184
- - `AppBar` - Application bar/header
185
- - `Pagination` - Page navigation
186
-
187
- ### Utility Components
188
-
189
- - `ScrollArea` - Custom scrollable area
190
- - `Collapsible` - Collapsible content wrapper
191
- - `Kbd` - Keyboard key display
192
- - `CopyButton` - Copy to clipboard button
193
- - `Icon` / `BearIcons` - Icon component library
194
- - `BearLogo` - Bear logo component
195
-
196
- ## Examples
197
-
198
- ### Button
199
-
200
- ```tsx
201
- import { Button } from '@forgedevstack/bear';
69
+ `colorScheme` is `light`, `dark`, or `system`. Dark mode follows the `.dark` class from the provider.
202
70
 
203
- <Button variant="primary">Primary</Button>
204
- <Button variant="secondary">Secondary</Button>
205
- <Button variant="outline">Outline</Button>
206
- <Button variant="ghost">Ghost</Button>
71
+ ## Charts
207
72
 
208
- // With icon (icon size matches text)
209
- <Button variant="primary" leftIcon={<PlayIcon />}>View Demos</Button>
73
+ ```tsx
74
+ import { BarChart } from '@forgedevstack/bear-x-charts';
75
+ import '@forgedevstack/bear/styles.css';
210
76
 
211
- // Button label using Typography variant (h1, h2, body1, etc.)
212
- <Button variant="primary" textVariant="subtitle1">Heading-style label</Button>
77
+ <BarChart
78
+ data={[
79
+ { label: 'Jan', value: 30 },
80
+ { label: 'Feb', value: 45 },
81
+ ]}
82
+ showLabels
83
+ />
213
84
  ```
214
85
 
215
- **Custom variants** (via `BearProvider`): pass `customVariants={{ myBrand: { bg: '#...', text: '#fff' } }}` and use `<Button variant="myBrand">`. Use `customTypography` for custom text styles and set `textVariant` on Button to use them.
86
+ Chart views in this repo: `bar`, `line`, `area`, `pie`, `donut`, `radar`, `funnel`, `stacked`. Pie also has `full`, `half`, and `rose`. Sparkline, Gauge, RingProgress, Heatmap, and TimelineChart sit next to those. Motion is `grow`, `fade`, `scale`, or `none`, and `animated` is a boolean. These are zero-dependency SVG charts. They are not Chart.js plugins.
216
87
 
217
- ### Card
88
+ ## Icons
218
89
 
219
90
  ```tsx
220
- import { Card, CardHeader, CardBody, CardFooter } from '@forgedevstack/bear';
91
+ import { SearchIcon } from '@forgedevstack/bear-icons';
221
92
 
222
- <Card>
223
- <CardHeader>Title</CardHeader>
224
- <CardBody>Content goes here</CardBody>
225
- <CardFooter>Footer content</CardFooter>
226
- </Card>
93
+ <SearchIcon size={24} />
227
94
  ```
228
95
 
229
- ### Form
96
+ ## Calendar
97
+
98
+ Peer of Bear. 1.0.2 adds the event month and the resource timeline. Popups and filters use Bear.
230
99
 
231
100
  ```tsx
232
- import { Input, Select, Checkbox, Button } from '@forgedevstack/bear';
101
+ import { EventCalendar, EventTimeline } from '@forgedevstack/calendar';
102
+ import '@forgedevstack/calendar/styles.css';
103
+ import '@forgedevstack/bear/styles.css';
233
104
 
234
- function LoginForm() {
235
- return (
236
- <form>
237
- <Input label="Email" type="email" required />
238
- <Input label="Password" type="password" required />
239
- <Select
240
- label="Country"
241
- options={[
242
- { value: 'us', label: 'United States' },
243
- { value: 'uk', label: 'United Kingdom' },
244
- ]}
245
- />
246
- <Checkbox label="Remember me" />
247
- <Button type="submit">Submit</Button>
248
- </form>
249
- );
250
- }
105
+ <EventCalendar events={events} mode="dark" />
106
+ <EventTimeline events={events} />
251
107
  ```
252
108
 
253
- ### DataTable
109
+ ## Map and kanban
254
110
 
255
111
  ```tsx
256
- import { DataTable, createColumns } from '@forgedevstack/bear';
257
-
258
- interface User {
259
- id: number;
260
- name: string;
261
- email: string;
262
- role: string;
263
- }
264
-
265
- const columns = createColumns<User>([
266
- { key: 'name', header: 'Name' },
267
- { key: 'email', header: 'Email' },
268
- { key: 'role', header: 'Role' },
269
- ]);
270
-
271
- const data: User[] = [
272
- { id: 1, name: 'John Doe', email: 'john@example.com', role: 'admin' },
273
- { id: 2, name: 'Jane Smith', email: 'jane@example.com', role: 'user' },
274
- ];
275
-
276
- <DataTable data={data} columns={columns} />
112
+ import { Map } from '@forgedevstack/bear-map';
113
+ import { Kanban } from '@forgedevstack/kanban';
277
114
  ```
278
115
 
279
- ### Toast Notifications
116
+ Hooks stay on core. Date pickers stay on core.
280
117
 
281
- ```tsx
282
- import { ToastProvider, useToast, Button } from '@forgedevstack/bear';
118
+ ## CLI
283
119
 
284
- function App() {
285
- return (
286
- <ToastProvider>
287
- <MyComponent />
288
- </ToastProvider>
289
- );
290
- }
120
+ Forge CLI is the installer that exists today.
291
121
 
292
- function MyComponent() {
293
- const toast = useToast();
294
-
295
- return (
296
- <Button onClick={() => toast.success('Operation successful!')}>
297
- Show Toast
298
- </Button>
299
- );
300
- }
122
+ ```bash
123
+ npx create-forge my-app
301
124
  ```
302
125
 
303
- ## Theming
126
+ When you select Bear, the CLI prints the Lotso mascot and asks which libraries to include: icons, charts, AI, code, map, kanban, and calendar. It then asks for the primary color. `--yes` selects Bear and those libraries.
304
127
 
305
- Bear components support customization through Tailwind CSS. You can override default styles by configuring your Tailwind theme:
128
+ Add one package to an existing app:
306
129
 
307
- ```js
308
- // tailwind.config.js
309
- module.exports = {
310
- theme: {
311
- extend: {
312
- colors: {
313
- // Your custom colors
314
- },
315
- },
316
- },
317
- }
130
+ ```bash
131
+ forge add bear
132
+ forge add bear-icons
133
+ forge add calendar
318
134
  ```
319
135
 
320
- ## TypeScript Support
321
-
322
- All components are fully typed with TypeScript:
136
+ `forge add bear` asks the same library question. Icons and calendar install from npm. Charts, AI, code, map, and kanban are recorded in a comment in `src/main.tsx` until those packages are published, so the install does not fail on a missing package.
323
137
 
324
- ```tsx
325
- import { Button, ButtonProps } from '@forgedevstack/bear';
138
+ `npx @forgedevstack/bear-cli` is the name reserved for a Bear-only binary. That binary is not published, so those commands do not run yet.
326
139
 
327
- const buttonProps: ButtonProps = {
328
- variant: 'primary',
329
- size: 'md',
330
- children: 'Click me',
331
- };
140
+ ## What 1.3.5 adds
332
141
 
333
- <Button {...buttonProps} />
334
- ```
142
+ - Optional packages: `@forgedevstack/bear-x-charts`, `@forgedevstack/bear-x-ai`, `@forgedevstack/bear-x-code`, `@forgedevstack/bear-map`, `@forgedevstack/kanban`.
143
+ - Overlay open and close motion on the panel: `none`, `fade`, `slide-down`, `scale`, `fold`, `elastic`, `reveal`, `expand`. The default is `fold`.
144
+ - Portal product pages for each library, with a Bundlephobia button.
145
+ - `@forgedevstack/calendar` 1.0.2: event calendar, resource filter, side editor, and timeline.
335
146
 
336
- ## How Bear Compares
147
+ ## Components
337
148
 
338
- | Feature | Bear UI | Material UI | Ant Design | Chakra UI |
339
- |---------|---------|-----|------------|-----------|
340
- | **Tailwind CSS native** | Yes | No | No | Partial (v3) |
341
- | **Bundle (tree-shaken)** | ~18 kB | ~80 kB | ~120 kB | ~45 kB |
342
- | **Dark mode** | `dark:` variants, zero JS | Runtime theme swap | CSS vars + config | ColorMode context |
343
- | **TypeScript** | 100 % | 100 % | 100 % | 100 % |
344
- | **Components** | 60+ | 50+ | 60+ | 30+ |
345
- | **Theming** | BearProvider + Tailwind | Emotion/styled | Less/CSS vars | Styled System |
346
- | **Modular CSS** | `@BearInclude` PostCSS | N/A | N/A | N/A |
347
- | **React 18 / 19** | Yes | Yes | Yes | Yes |
348
- | **Zero runtime CSS-in-JS** | Yes | No (Emotion) | No (Less) | No (Emotion) |
349
- | **Built-in i18n** | Portal (en/es) | X (add-on) | ConfigProvider | N/A |
149
+ | Area | Examples |
150
+ |---|---|
151
+ | Actions | Button, ButtonGroup, ToggleGroup, FAB, SplitButton |
152
+ | Forms | Input, Select, Checkbox, Radio, Switch, Slider, DatePicker, TimePicker |
153
+ | Overlays | Modal, Drawer, AlertDialog, Popover, Tooltip, Menu, CommandPalette |
154
+ | Feedback | Alert, Toast, Spinner, Progress, Skeleton, Badge |
155
+ | Layout | Container, Flex, Grid, Paper, Divider, ScrollArea |
156
+ | Data | DataTable, Chart, Calendar, Timeline |
350
157
 
351
- ## Contributing
158
+ ## Scripts
352
159
 
353
- See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines on adding components, coding rules, and the portal development workflow.
160
+ ```bash
161
+ npm run build
162
+ cd portal && npm run test:e2e:smoke
163
+ ```
354
164
 
355
165
  ## License
356
166
 
357
- MIT
167
+ MIT. John Yaghobieh and the ForgeStack team.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),h=require("react"),e=require("../../constants/generals.const.cjs"),R=require("../../utils/cn.cjs"),i=require("../Box/Box.cjs"),g=require("../Button/Button.cjs"),j=require("../Flex/Flex.cjs"),t=require("@forgedevstack/bear-icons"),b=require("../Typography/Typography.cjs"),x=require("./Alert.const.cjs"),S=I=>{const{severity:s=e.INFO,variant:o=e.VARIANT_STANDARD,title:A,icon:a=e.BOOLEAN_TRUE,action:u,closable:B=e.BOOLEAN_FALSE,onClose:c,children:_,className:E,testId:N,...L}=I,[O,T]=h.useState(e.BOOLEAN_TRUE);if(!O)return null;const l=o===e.VARIANT_FILLED,n=x.ALERT_SEVERITY_COLORS[s],m=()=>{T(e.BOOLEAN_FALSE),c==null||c()},d=a===e.BOOLEAN_FALSE?null:a!==e.BOOLEAN_TRUE?a:s===e.INFO?r.jsx(t.InfoIcon,{}):s==="success"?r.jsx(t.BearIcons.CheckCircleIcon,{}):s==="warning"?r.jsx(t.BearIcons.WarningIcon,{}):r.jsx(t.BearIcons.ErrorIcon,{});return r.jsxs(j.Flex,{role:"alert","aria-live":"polite",className:R.cn("Bear-Alert bear-items-start bear-gap-3 bear-p-4 bear-rounded-lg",x.ALERT_VARIANT_CLASSES[o](s),E),style:{backgroundColor:l?void 0:n.bg,borderColor:o===e.VARIANT_OUTLINED?n.border:void 0,color:l?void 0:n.text},"data-testid":N,...L,children:[d&&r.jsx(i.Box,{as:"span",className:"Bear-Alert__icon bear-flex-shrink-0 bear-mt-0.5",style:{color:l?"currentColor":n.icon},children:d}),r.jsxs(i.Box,{className:"Bear-Alert__content bear-flex-1 bear-min-w-0",children:[A&&r.jsx(b.Typography,{weight:"semibold",className:"Bear-Alert__title bear-mb-1",children:A}),_&&r.jsx(b.Typography,{className:"Bear-Alert__message bear-text-sm",children:_})]}),u&&r.jsx(i.Box,{className:"Bear-Alert__action bear-flex-shrink-0",children:u}),B&&r.jsx(g.Button,{variant:e.VARIANT_GHOST,onClick:m,className:"Bear-Alert__close bear-flex-shrink-0 bear-p-1","aria-label":e.LABEL_CLOSE_ALERT,children:r.jsx(t.CloseIcon,{})})]})};exports.Alert=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),O=require("react"),r=require("../../constants/generals.const.cjs"),m=require("../../utils/cn.cjs"),c=require("../Box/Box.cjs"),T=require("../Button/Button.cjs"),S=require("../Flex/Flex.cjs"),s=require("@forgedevstack/bear-icons"),u=require("../Typography/Typography.cjs"),_=require("./Alert.const.cjs"),j=b=>{const{severity:n=r.INFO,variant:x=r.VARIANT_STANDARD,title:i,icon:t=r.BOOLEAN_TRUE,action:o,closable:B=r.BOOLEAN_FALSE,onClose:a,children:l,className:d,testId:E,...I}=b,[N,h]=O.useState(r.BOOLEAN_TRUE);if(!N)return null;const L=()=>{h(r.BOOLEAN_FALSE),a==null||a()},A=t===r.BOOLEAN_FALSE?null:t!==r.BOOLEAN_TRUE?t:n===r.INFO?e.jsx(s.InfoIcon,{}):n==="success"?e.jsx(s.BearIcons.CheckCircleIcon,{}):n==="warning"?e.jsx(s.BearIcons.WarningIcon,{}):e.jsx(s.BearIcons.ErrorIcon,{});return e.jsxs(S.Flex,{role:"alert","aria-live":"polite",className:m.cn("Bear-Alert bear-items-start bear-gap-3 bear-p-4 bear-rounded-lg",_.ALERT_SEVERITY_CLASS[n],_.ALERT_VARIANT_CLASSES[x](n),d),"data-testid":E,...I,children:[A&&e.jsx(c.Box,{as:"span",className:"Bear-Alert__icon bear-flex-shrink-0 bear-mt-0.5",children:A}),e.jsxs(c.Box,{className:"Bear-Alert__content bear-flex-1 bear-min-w-0",children:[i&&e.jsx(u.Typography,{variant:"subtitle2",weight:"semibold",color:"inherit",className:"Bear-Alert__title bear-mb-1",children:i}),l&&e.jsx(u.Typography,{variant:"body2",color:"inherit",className:"Bear-Alert__message",children:l})]}),o&&e.jsx(c.Box,{className:"Bear-Alert__action bear-flex-shrink-0",children:o}),B&&e.jsx(T.Button,{variant:r.VARIANT_GHOST,onClick:L,className:"Bear-Alert__close bear-flex-shrink-0 bear-p-1","aria-label":r.LABEL_CLOSE_ALERT,children:e.jsx(s.CloseIcon,{})})]})};exports.Alert=j;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../utils/cn.cjs");require("react");const a={success:{bg:"var(--bear-success-50)",border:"var(--bear-success-500)",text:"var(--bear-success-800)",icon:"var(--bear-success-600)"},info:{bg:"var(--bear-info-50)",border:"var(--bear-info-500)",text:"var(--bear-info-800)",icon:"var(--bear-info-600)"},warning:{bg:"var(--bear-warning-50)",border:"var(--bear-warning-500)",text:"var(--bear-warning-800)",icon:"var(--bear-warning-600)"},error:{bg:"var(--bear-danger-50)",border:"var(--bear-danger-500)",text:"var(--bear-danger-800)",icon:"var(--bear-danger-600)"}},n={filled:r=>e.cn("bear-text-white bear-alert-filled",r==="success"&&"bear-alert-filled-success",r==="info"&&"bear-alert-filled-info",r==="warning"&&"bear-alert-filled-warning",r==="error"&&"bear-alert-filled-error"),outlined:()=>"bear-bg-transparent bear-border",standard:()=>""};exports.ALERT_SEVERITY_COLORS=a;exports.ALERT_VARIANT_CLASSES=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../utils/cn.cjs");require("react");const l={success:"Bear-Alert--success",info:"Bear-Alert--info",warning:"Bear-Alert--warning",error:"Bear-Alert--error"},a={filled:r=>e.cn("bear-alert-filled",r==="success"&&"bear-alert-filled-success",r==="info"&&"bear-alert-filled-info",r==="warning"&&"bear-alert-filled-warning",r==="error"&&"bear-alert-filled-error"),outlined:()=>"Bear-Alert--outlined",standard:()=>""};exports.ALERT_SEVERITY_CLASS=l;exports.ALERT_VARIANT_CLASSES=a;
@@ -1,8 +1,3 @@
1
1
  import { AlertSeverity, AlertVariant } from './Alert.types';
2
- export declare const ALERT_SEVERITY_COLORS: Record<AlertSeverity, {
3
- bg: string;
4
- border: string;
5
- text: string;
6
- icon: string;
7
- }>;
2
+ export declare const ALERT_SEVERITY_CLASS: Record<AlertSeverity, string>;
8
3
  export declare const ALERT_VARIANT_CLASSES: Record<AlertVariant, (severity: AlertSeverity) => string>;
@@ -1,42 +1,22 @@
1
- import { cn as a } from "../../utils/cn.js";
1
+ import { cn as e } from "../../utils/cn.js";
2
2
  import "react";
3
- const b = {
4
- success: {
5
- bg: "var(--bear-success-50)",
6
- border: "var(--bear-success-500)",
7
- text: "var(--bear-success-800)",
8
- icon: "var(--bear-success-600)"
9
- },
10
- info: {
11
- bg: "var(--bear-info-50)",
12
- border: "var(--bear-info-500)",
13
- text: "var(--bear-info-800)",
14
- icon: "var(--bear-info-600)"
15
- },
16
- warning: {
17
- bg: "var(--bear-warning-50)",
18
- border: "var(--bear-warning-500)",
19
- text: "var(--bear-warning-800)",
20
- icon: "var(--bear-warning-600)"
21
- },
22
- error: {
23
- bg: "var(--bear-danger-50)",
24
- border: "var(--bear-danger-500)",
25
- text: "var(--bear-danger-800)",
26
- icon: "var(--bear-danger-600)"
27
- }
3
+ const n = {
4
+ success: "Bear-Alert--success",
5
+ info: "Bear-Alert--info",
6
+ warning: "Bear-Alert--warning",
7
+ error: "Bear-Alert--error"
28
8
  }, o = {
29
- filled: (r) => a(
30
- "bear-text-white bear-alert-filled",
9
+ filled: (r) => e(
10
+ "bear-alert-filled",
31
11
  r === "success" && "bear-alert-filled-success",
32
12
  r === "info" && "bear-alert-filled-info",
33
13
  r === "warning" && "bear-alert-filled-warning",
34
14
  r === "error" && "bear-alert-filled-error"
35
15
  ),
36
- outlined: () => "bear-bg-transparent bear-border",
16
+ outlined: () => "Bear-Alert--outlined",
37
17
  standard: () => ""
38
18
  };
39
19
  export {
40
- b as ALERT_SEVERITY_COLORS,
20
+ n as ALERT_SEVERITY_CLASS,
41
21
  o as ALERT_VARIANT_CLASSES
42
22
  };