boreal-ui 0.0.888 → 0.0.890

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 (243) hide show
  1. package/README.md +107 -66
  2. package/README.npm.md +450 -0
  3. package/dist/core/{Footer-BzPTfew2.cjs → Footer-6H7E0aW5.cjs} +1 -1
  4. package/dist/core/{Footer-Cm-V5_2F.js → Footer-DC_LqIlJ.js} +1 -1
  5. package/dist/core/Footer.cjs.js +1 -1
  6. package/dist/core/Footer.js +1 -1
  7. package/dist/core/ThemeContext-BosEFe2d.cjs +1 -0
  8. package/dist/core/{ThemeContext-_fqD_6jM.js → ThemeContext-DFVNYGOV.js} +137 -136
  9. package/dist/core/ThemeProvider.cjs.js +1 -1
  10. package/dist/core/ThemeProvider.js +1 -1
  11. package/dist/core/index.cjs.js +1 -1
  12. package/dist/core/index.js +2 -2
  13. package/dist/next/{Footer-V-XnI_zl.js → Footer-znmCP-MT.js} +1 -1
  14. package/dist/next/Footer.js +1 -1
  15. package/dist/next/NextThemeProvider-A6VtyTUj.js +8 -0
  16. package/dist/next/{ThemeContext-CNR7tRqD.js → ThemeContext-BAYIo3D-.js} +137 -136
  17. package/dist/next/ThemeProvider.js +2 -2
  18. package/dist/next/index.js +3 -3
  19. package/dist/tsconfig.build.tsbuildinfo +1 -1
  20. package/dist/types/context/ThemeContext.d.ts.map +1 -1
  21. package/dist/types/context/ThemeContext.types.d.ts +3 -0
  22. package/dist/types/context/ThemeContext.types.d.ts.map +1 -1
  23. package/dist/types/core/Accordion.d.ts +4 -0
  24. package/dist/types/core/Accordion.d.ts.map +1 -0
  25. package/dist/types/core/Avatar.d.ts +4 -0
  26. package/dist/types/core/Avatar.d.ts.map +1 -0
  27. package/dist/types/core/Badge.d.ts +4 -0
  28. package/dist/types/core/Badge.d.ts.map +1 -0
  29. package/dist/types/core/Breadcrumbs.d.ts +4 -0
  30. package/dist/types/core/Breadcrumbs.d.ts.map +1 -0
  31. package/dist/types/core/Button.d.ts +4 -0
  32. package/dist/types/core/Button.d.ts.map +1 -0
  33. package/dist/types/core/Card.d.ts +4 -0
  34. package/dist/types/core/Card.d.ts.map +1 -0
  35. package/dist/types/core/CheckBox.d.ts +4 -0
  36. package/dist/types/core/CheckBox.d.ts.map +1 -0
  37. package/dist/types/core/Chip.d.ts +4 -0
  38. package/dist/types/core/Chip.d.ts.map +1 -0
  39. package/dist/types/core/CircularProgress.d.ts +4 -0
  40. package/dist/types/core/CircularProgress.d.ts.map +1 -0
  41. package/dist/types/core/ColorPicker.d.ts +4 -0
  42. package/dist/types/core/ColorPicker.d.ts.map +1 -0
  43. package/dist/types/core/CommandPalette.d.ts +4 -0
  44. package/dist/types/core/CommandPalette.d.ts.map +1 -0
  45. package/dist/types/core/DataTable.d.ts +4 -0
  46. package/dist/types/core/DataTable.d.ts.map +1 -0
  47. package/dist/types/core/DateTimePicker.d.ts +4 -0
  48. package/dist/types/core/DateTimePicker.d.ts.map +1 -0
  49. package/dist/types/core/Divider.d.ts +4 -0
  50. package/dist/types/core/Divider.d.ts.map +1 -0
  51. package/dist/types/core/Dropdown.d.ts +4 -0
  52. package/dist/types/core/Dropdown.d.ts.map +1 -0
  53. package/dist/types/core/EmptyState.d.ts +4 -0
  54. package/dist/types/core/EmptyState.d.ts.map +1 -0
  55. package/dist/types/core/FileUpload.d.ts +4 -0
  56. package/dist/types/core/FileUpload.d.ts.map +1 -0
  57. package/dist/types/core/Footer.d.ts +4 -0
  58. package/dist/types/core/Footer.d.ts.map +1 -0
  59. package/dist/types/core/FormGroup.d.ts +4 -0
  60. package/dist/types/core/FormGroup.d.ts.map +1 -0
  61. package/dist/types/core/IconButton.d.ts +4 -0
  62. package/dist/types/core/IconButton.d.ts.map +1 -0
  63. package/dist/types/core/MarkdownRenderer.d.ts +4 -0
  64. package/dist/types/core/MarkdownRenderer.d.ts.map +1 -0
  65. package/dist/types/core/MessagePopUp.d.ts +4 -0
  66. package/dist/types/core/MessagePopUp.d.ts.map +1 -0
  67. package/dist/types/core/MetricBox.d.ts +4 -0
  68. package/dist/types/core/MetricBox.d.ts.map +1 -0
  69. package/dist/types/core/Modal.d.ts +4 -0
  70. package/dist/types/core/Modal.d.ts.map +1 -0
  71. package/dist/types/core/NavBar.d.ts +4 -0
  72. package/dist/types/core/NavBar.d.ts.map +1 -0
  73. package/dist/types/core/NotificationCenter.d.ts +4 -0
  74. package/dist/types/core/NotificationCenter.d.ts.map +1 -0
  75. package/dist/types/core/Pager.d.ts +4 -0
  76. package/dist/types/core/Pager.d.ts.map +1 -0
  77. package/dist/types/core/PopOver.d.ts +4 -0
  78. package/dist/types/core/PopOver.d.ts.map +1 -0
  79. package/dist/types/core/ProgressBar.d.ts +4 -0
  80. package/dist/types/core/ProgressBar.d.ts.map +1 -0
  81. package/dist/types/core/RadioButton.d.ts +5 -0
  82. package/dist/types/core/RadioButton.d.ts.map +1 -0
  83. package/dist/types/core/RadioGroup.d.ts +4 -0
  84. package/dist/types/core/RadioGroup.d.ts.map +1 -0
  85. package/dist/types/core/Rating.d.ts +4 -0
  86. package/dist/types/core/Rating.d.ts.map +1 -0
  87. package/dist/types/core/ScrollToTop.d.ts +4 -0
  88. package/dist/types/core/ScrollToTop.d.ts.map +1 -0
  89. package/dist/types/core/Select.d.ts +4 -0
  90. package/dist/types/core/Select.d.ts.map +1 -0
  91. package/dist/types/core/Sidebar.d.ts +4 -0
  92. package/dist/types/core/Sidebar.d.ts.map +1 -0
  93. package/dist/types/core/Skeleton.d.ts +4 -0
  94. package/dist/types/core/Skeleton.d.ts.map +1 -0
  95. package/dist/types/core/Slider.d.ts +4 -0
  96. package/dist/types/core/Slider.d.ts.map +1 -0
  97. package/dist/types/core/Spinner.d.ts +4 -0
  98. package/dist/types/core/Spinner.d.ts.map +1 -0
  99. package/dist/types/core/Stepper.d.ts +4 -0
  100. package/dist/types/core/Stepper.d.ts.map +1 -0
  101. package/dist/types/core/Tabs.d.ts +4 -0
  102. package/dist/types/core/Tabs.d.ts.map +1 -0
  103. package/dist/types/core/TagInput.d.ts +4 -0
  104. package/dist/types/core/TagInput.d.ts.map +1 -0
  105. package/dist/types/core/TextArea.d.ts +4 -0
  106. package/dist/types/core/TextArea.d.ts.map +1 -0
  107. package/dist/types/core/TextInput.d.ts +4 -0
  108. package/dist/types/core/TextInput.d.ts.map +1 -0
  109. package/dist/types/core/ThemeProvider.d.ts +3 -0
  110. package/dist/types/core/ThemeProvider.d.ts.map +1 -0
  111. package/dist/types/core/Timeline.d.ts +4 -0
  112. package/dist/types/core/Timeline.d.ts.map +1 -0
  113. package/dist/types/core/Toggle.d.ts +4 -0
  114. package/dist/types/core/Toggle.d.ts.map +1 -0
  115. package/dist/types/core/Toolbar.d.ts +4 -0
  116. package/dist/types/core/Toolbar.d.ts.map +1 -0
  117. package/dist/types/core/Tooltip.d.ts +4 -0
  118. package/dist/types/core/Tooltip.d.ts.map +1 -0
  119. package/dist/types/core/Typography.d.ts +4 -0
  120. package/dist/types/core/Typography.d.ts.map +1 -0
  121. package/dist/types/core/colorSchemes.d.ts +2 -0
  122. package/dist/types/core/colorSchemes.d.ts.map +1 -0
  123. package/dist/types/core/globals.d.ts +2 -0
  124. package/dist/types/core/globals.d.ts.map +1 -0
  125. package/dist/types/core/registerColorScheme.d.ts +2 -0
  126. package/dist/types/core/registerColorScheme.d.ts.map +1 -0
  127. package/dist/types/core/registerColorSheme.d.ts +2 -0
  128. package/dist/types/core/registerColorSheme.d.ts.map +1 -0
  129. package/dist/types/next/Accordion.d.ts +4 -0
  130. package/dist/types/next/Accordion.d.ts.map +1 -0
  131. package/dist/types/next/Avatar.d.ts +4 -0
  132. package/dist/types/next/Avatar.d.ts.map +1 -0
  133. package/dist/types/next/Badge.d.ts +4 -0
  134. package/dist/types/next/Badge.d.ts.map +1 -0
  135. package/dist/types/next/Breadcrumbs.d.ts +4 -0
  136. package/dist/types/next/Breadcrumbs.d.ts.map +1 -0
  137. package/dist/types/next/Button.d.ts +4 -0
  138. package/dist/types/next/Button.d.ts.map +1 -0
  139. package/dist/types/next/Card.d.ts +4 -0
  140. package/dist/types/next/Card.d.ts.map +1 -0
  141. package/dist/types/next/CheckBox.d.ts +4 -0
  142. package/dist/types/next/CheckBox.d.ts.map +1 -0
  143. package/dist/types/next/Chip.d.ts +4 -0
  144. package/dist/types/next/Chip.d.ts.map +1 -0
  145. package/dist/types/next/CircularProgress.d.ts +4 -0
  146. package/dist/types/next/CircularProgress.d.ts.map +1 -0
  147. package/dist/types/next/ColorPicker.d.ts +4 -0
  148. package/dist/types/next/ColorPicker.d.ts.map +1 -0
  149. package/dist/types/next/CommandPalette.d.ts +4 -0
  150. package/dist/types/next/CommandPalette.d.ts.map +1 -0
  151. package/dist/types/next/DataTable.d.ts +4 -0
  152. package/dist/types/next/DataTable.d.ts.map +1 -0
  153. package/dist/types/next/DateTimePicker.d.ts +4 -0
  154. package/dist/types/next/DateTimePicker.d.ts.map +1 -0
  155. package/dist/types/next/Divider.d.ts +4 -0
  156. package/dist/types/next/Divider.d.ts.map +1 -0
  157. package/dist/types/next/Dropdown.d.ts +4 -0
  158. package/dist/types/next/Dropdown.d.ts.map +1 -0
  159. package/dist/types/next/EmptyState.d.ts +4 -0
  160. package/dist/types/next/EmptyState.d.ts.map +1 -0
  161. package/dist/types/next/FileUpload.d.ts +4 -0
  162. package/dist/types/next/FileUpload.d.ts.map +1 -0
  163. package/dist/types/next/Footer.d.ts +4 -0
  164. package/dist/types/next/Footer.d.ts.map +1 -0
  165. package/dist/types/next/FormGroup.d.ts +4 -0
  166. package/dist/types/next/FormGroup.d.ts.map +1 -0
  167. package/dist/types/next/IconButton.d.ts +4 -0
  168. package/dist/types/next/IconButton.d.ts.map +1 -0
  169. package/dist/types/next/MarkdownRenderer.d.ts +4 -0
  170. package/dist/types/next/MarkdownRenderer.d.ts.map +1 -0
  171. package/dist/types/next/MessagePopUp.d.ts +4 -0
  172. package/dist/types/next/MessagePopUp.d.ts.map +1 -0
  173. package/dist/types/next/MetricBox.d.ts +4 -0
  174. package/dist/types/next/MetricBox.d.ts.map +1 -0
  175. package/dist/types/next/Modal.d.ts +4 -0
  176. package/dist/types/next/Modal.d.ts.map +1 -0
  177. package/dist/types/next/NavBar.d.ts +4 -0
  178. package/dist/types/next/NavBar.d.ts.map +1 -0
  179. package/dist/types/next/NotificationCenter.d.ts +4 -0
  180. package/dist/types/next/NotificationCenter.d.ts.map +1 -0
  181. package/dist/types/next/Pager.d.ts +4 -0
  182. package/dist/types/next/Pager.d.ts.map +1 -0
  183. package/dist/types/next/PopOver.d.ts +4 -0
  184. package/dist/types/next/PopOver.d.ts.map +1 -0
  185. package/dist/types/next/ProgressBar.d.ts +4 -0
  186. package/dist/types/next/ProgressBar.d.ts.map +1 -0
  187. package/dist/types/next/RadioButton.d.ts +5 -0
  188. package/dist/types/next/RadioButton.d.ts.map +1 -0
  189. package/dist/types/next/RadioGroup.d.ts +4 -0
  190. package/dist/types/next/RadioGroup.d.ts.map +1 -0
  191. package/dist/types/next/Rating.d.ts +4 -0
  192. package/dist/types/next/Rating.d.ts.map +1 -0
  193. package/dist/types/next/ScrollToTop.d.ts +4 -0
  194. package/dist/types/next/ScrollToTop.d.ts.map +1 -0
  195. package/dist/types/next/Select.d.ts +4 -0
  196. package/dist/types/next/Select.d.ts.map +1 -0
  197. package/dist/types/next/Sidebar.d.ts +4 -0
  198. package/dist/types/next/Sidebar.d.ts.map +1 -0
  199. package/dist/types/next/Skeleton.d.ts +4 -0
  200. package/dist/types/next/Skeleton.d.ts.map +1 -0
  201. package/dist/types/next/Slider.d.ts +4 -0
  202. package/dist/types/next/Slider.d.ts.map +1 -0
  203. package/dist/types/next/Spinner.d.ts +4 -0
  204. package/dist/types/next/Spinner.d.ts.map +1 -0
  205. package/dist/types/next/Stepper.d.ts +4 -0
  206. package/dist/types/next/Stepper.d.ts.map +1 -0
  207. package/dist/types/next/Tabs.d.ts +4 -0
  208. package/dist/types/next/Tabs.d.ts.map +1 -0
  209. package/dist/types/next/TagInput.d.ts +4 -0
  210. package/dist/types/next/TagInput.d.ts.map +1 -0
  211. package/dist/types/next/TextArea.d.ts +4 -0
  212. package/dist/types/next/TextArea.d.ts.map +1 -0
  213. package/dist/types/next/TextInput.d.ts +4 -0
  214. package/dist/types/next/TextInput.d.ts.map +1 -0
  215. package/dist/types/next/ThemeProvider.d.ts +4 -0
  216. package/dist/types/next/ThemeProvider.d.ts.map +1 -0
  217. package/dist/types/next/Timeline.d.ts +4 -0
  218. package/dist/types/next/Timeline.d.ts.map +1 -0
  219. package/dist/types/next/Toggle.d.ts +4 -0
  220. package/dist/types/next/Toggle.d.ts.map +1 -0
  221. package/dist/types/next/Toolbar.d.ts +4 -0
  222. package/dist/types/next/Toolbar.d.ts.map +1 -0
  223. package/dist/types/next/Tooltip.d.ts +4 -0
  224. package/dist/types/next/Tooltip.d.ts.map +1 -0
  225. package/dist/types/next/Typography.d.ts +4 -0
  226. package/dist/types/next/Typography.d.ts.map +1 -0
  227. package/dist/types/next/colorSchemes.d.ts +2 -0
  228. package/dist/types/next/colorSchemes.d.ts.map +1 -0
  229. package/dist/types/next/globals.d.ts +2 -0
  230. package/dist/types/next/globals.d.ts.map +1 -0
  231. package/dist/types/next/registerColorScheme.d.ts +2 -0
  232. package/dist/types/next/registerColorScheme.d.ts.map +1 -0
  233. package/dist/types/next/registerColorSheme.d.ts +2 -0
  234. package/dist/types/next/registerColorSheme.d.ts.map +1 -0
  235. package/docs/installation-and-imports.md +48 -10
  236. package/docs/styling-and-theming.md +60 -15
  237. package/package.json +4 -1
  238. package/packages/cli/src/commands/init.js +209 -11
  239. package/packages/cli/src/utils/args.js +13 -4
  240. package/packages/cli/src/utils/constants.js +4 -4
  241. package/packages/cli/src/utils/help.js +2 -0
  242. package/dist/core/ThemeContext-4s7wgjA0.cjs +0 -1
  243. package/dist/next/NextThemeProvider-Dv0eJlsJ.js +0 -8
package/README.md CHANGED
@@ -4,12 +4,14 @@ Boreal UI is a customizable, accessible React and Next.js component library with
4
4
 
5
5
  Use it when you want production-ready UI primitives that can be themed globally, customized per component, tested predictably, and imported in either standard React apps or Next.js app-router projects.
6
6
 
7
+ [View the Boreal UI docs](https://www.borealui.ca)
8
+
7
9
  ## Highlights
8
10
 
9
11
  - **React and Next.js builds:** import from `boreal-ui/core` for React apps or `boreal-ui/next` for Next.js apps.
10
12
  - **Deep component set:** buttons, forms, navigation, data display, feedback, overlays, layout primitives, and utility components.
11
13
  - **Theme system:** curated color schemes, custom schemes, runtime theme selection, CSS variables, and `ThemeSelect`.
12
- - **Global defaults:** configure default theme, size, rounding, shadow, border width, glass, outline, and color scheme once with `borealConfig` or `setBorealStyleConfig`.
14
+ - **Global defaults:** configure default theme, size, rounding, shadow, border width, glass, outline, and color scheme once with `borealConfig` or `setBorealStyleConfig`.
13
15
  - **Accessible by default:** semantic markup, ARIA support, keyboard behavior, visible focus states, disabled states, live announcements where useful, and predictable test IDs.
14
16
  - **Styling flexibility:** theme, state, size, rounding, shadow, outline, glass, custom class names, SCSS variables, and consumer CSS overrides.
15
17
  - **Typed public API:** TypeScript component props, shared type exports, and generated prop documentation objects for docs tooling.
@@ -17,30 +19,31 @@ Use it when you want production-ready UI primitives that can be themed globally,
17
19
 
18
20
  ## Installation
19
21
 
20
- ```bash
21
- npm install boreal-ui
22
- ```
23
-
24
- Boreal UI expects React and React DOM in the consuming app. Next.js users should also have Next installed. `marked` and `uuid` are peer dependencies because some components and utilities rely on them.
25
-
26
- ## CLI Setup
27
-
28
- Use the CLI inside an existing React or Next.js project to add only the file changes Boreal UI needs: the package dependency, the global stylesheet import, `ThemeProvider`, and default style config.
29
-
30
- ```bash
31
- npx boreal-ui@latest init
32
- ```
33
-
34
- You can preview changes or run non-interactively:
35
-
36
- ```bash
37
- npx boreal-ui init --dry-run
38
- npx boreal-ui init --framework next --yes
39
- ```
40
-
41
- ## Setup
42
-
43
- Import the global stylesheet once near the top of your application.
22
+ ```bash
23
+ npm install boreal-ui
24
+ ```
25
+
26
+ Boreal UI expects React and React DOM in the consuming app. Next.js users should also have Next installed. `marked` and `uuid` are peer dependencies because some components and utilities rely on them.
27
+
28
+ ## CLI Setup
29
+
30
+ Use the CLI inside an existing React or Next.js project to add only the file changes Boreal UI needs: the package dependency, the global stylesheet import, `ThemeProvider`, and default style config.
31
+
32
+ ```bash
33
+ npx boreal-ui@latest init
34
+ ```
35
+
36
+ You can preview changes or run non-interactively:
37
+
38
+ ```bash
39
+ npx boreal-ui init --dry-run
40
+ npx boreal-ui init --framework next --yes
41
+ npx boreal-ui init --framework next --recommended-globals
42
+ ```
43
+
44
+ ## Setup
45
+
46
+ Import the global stylesheet once near the top of your application.
44
47
 
45
48
  ### React
46
49
 
@@ -73,6 +76,42 @@ Import the Next stylesheet once from `app/layout.tsx`, `pages/_app.tsx`, or your
73
76
  import "boreal-ui/next/globals.css";
74
77
  ```
75
78
 
79
+ If your Next.js app still has the starter `globals.css` reset below, avoid loading it after Boreal styles:
80
+
81
+ ```css
82
+ * {
83
+ box-sizing: border-box;
84
+ padding: 0;
85
+ margin: 0;
86
+ }
87
+ ```
88
+
89
+ The universal `padding` and `margin` reset can override spacing that Boreal components and nested content rely on. Prefer a narrower baseline:
90
+
91
+ ```css
92
+ html {
93
+ box-sizing: border-box;
94
+ }
95
+
96
+ *,
97
+ *::before,
98
+ *::after {
99
+ box-sizing: inherit;
100
+ }
101
+
102
+ body {
103
+ margin: 0;
104
+ }
105
+ ```
106
+
107
+ The CLI can create or repair that safer baseline for Next.js apps:
108
+
109
+ ```bash
110
+ npx boreal-ui init --framework next --recommended-globals
111
+ ```
112
+
113
+ Interactive Next.js setup prompts for this by default. Use `--recommended-globals` to apply it without the prompt, or `--no-recommended-globals` to skip it.
114
+
76
115
  Then import components from the Next build:
77
116
 
78
117
  ```tsx
@@ -101,7 +140,7 @@ import Card from "boreal-ui/next/Card";
101
140
 
102
141
  ## Components
103
142
 
104
- For deeper consumer API examples, see the [Boreal UI consumer API guides](./docs/README.md). They cover import paths, styling and theming, common component patterns, generated prop docs, public TypeScript types, and contributor workflow.
143
+ For deeper consumer API examples, see the [Boreal UI consumer API guides](./docs/README.md). They cover import paths, styling and theming, common component patterns, generated prop docs, public TypeScript types, and contributor workflow.
105
144
 
106
145
  ### Actions
107
146
 
@@ -113,7 +152,7 @@ For deeper consumer API examples, see the [Boreal UI consumer API guides](./docs
113
152
 
114
153
  - `TextInput` and `TextArea` support labels, helper/error text, validation state, disabled state, sizing, theming, and accessible descriptions.
115
154
  - `Select` and `ThemeSelect` cover option selection and color-scheme switching.
116
- - `Checkbox`, `RadioButton`, `RadioGroup`, `Toggle`, and `Slider` provide common controlled input patterns.
155
+ - `Checkbox`, `RadioButton`, `RadioGroup`, `Toggle`, and `Slider` provide common controlled input patterns.
117
156
  - `ColorPicker` supports color selection flows.
118
157
  - `DateTimePicker` handles date and time input.
119
158
  - `FileUpload` supports file selection UI.
@@ -161,28 +200,28 @@ Exact props vary by component. TypeScript and the generated prop docs are the so
161
200
 
162
201
  ## Global Style Defaults
163
202
 
164
- Call `borealConfig` once before rendering your app to set project-wide defaults. `setBorealStyleConfig` remains available as the explicit API name.
165
-
166
- ```tsx
167
- import { borealConfig } from "boreal-ui/core";
168
-
169
- borealConfig({
170
- defaultTheme: "secondary",
171
- defaultSize: "medium",
172
- defaultRounding: "medium",
173
- defaultShadow: "light",
174
- defaultBorderWidth: "none",
175
- defaultGlass: false,
176
- defaultOutline: false,
177
- defaultColorSchemeName: "Forest Dusk",
178
- });
179
- ```
180
-
181
- For Next.js, import the same API from `boreal-ui/next`:
182
-
183
- ```tsx
184
- import { borealConfig } from "boreal-ui/next";
185
- ```
203
+ Call `borealConfig` once before rendering your app to set project-wide defaults. `setBorealStyleConfig` remains available as the explicit API name.
204
+
205
+ ```tsx
206
+ import { borealConfig } from "boreal-ui/core";
207
+
208
+ borealConfig({
209
+ defaultTheme: "secondary",
210
+ defaultSize: "medium",
211
+ defaultRounding: "medium",
212
+ defaultShadow: "light",
213
+ defaultBorderWidth: "none",
214
+ defaultGlass: false,
215
+ defaultOutline: false,
216
+ defaultColorSchemeName: "Forest Dusk",
217
+ });
218
+ ```
219
+
220
+ For Next.js, import the same API from `boreal-ui/next`:
221
+
222
+ ```tsx
223
+ import { borealConfig } from "boreal-ui/next";
224
+ ```
186
225
 
187
226
  Component props still win over global defaults:
188
227
 
@@ -217,6 +256,7 @@ export function Providers({ children }: { children: React.ReactNode }) {
217
256
  return (
218
257
  <ThemeProvider
219
258
  customSchemes={customSchemes}
259
+ enableThemeScript={false}
220
260
  initialSchemeName="Cyberpunk Pulse"
221
261
  >
222
262
  {children}
@@ -227,11 +267,12 @@ export function Providers({ children }: { children: React.ReactNode }) {
227
267
 
228
268
  `ThemeProvider` props:
229
269
 
230
- | Prop | Description |
231
- | ---------------------- | ----------------------------------------------------- |
232
- | `customSchemes` | Register additional color schemes at runtime. |
233
- | `initialSchemeName` | Select an initial scheme by name. |
234
- | `useOnlyCustomSchemes` | Use only custom schemes instead of the built-in list. |
270
+ | Prop | Description |
271
+ | ---------------------- | ---------------------------------------------------------------------------------------- |
272
+ | `customSchemes` | Register additional color schemes at runtime. |
273
+ | `enableThemeScript` | Render the pre-hydration theme script. Defaults to `true` for core and `false` for Next. |
274
+ | `initialSchemeName` | Select an initial scheme by name. |
275
+ | `useOnlyCustomSchemes` | Use only custom schemes instead of the built-in list. |
235
276
 
236
277
  Color scheme shape:
237
278
 
@@ -269,20 +310,20 @@ registerColorScheme({
269
310
  console.log(defaultColorSchemes.map((scheme) => scheme.name));
270
311
  ```
271
312
 
272
- ## Generated Prop Docs
273
-
274
- Boreal UI exports generated prop metadata for documentation sites, playgrounds, or prop tables.
313
+ ## Generated Prop Docs
314
+
315
+ Boreal UI exports generated prop metadata for documentation sites, playgrounds, or prop tables.
275
316
 
276
317
  ```tsx
277
318
  import { buttonPropDocs, dataTablePropDocs } from "boreal-ui/core";
278
319
 
279
320
  console.log(buttonPropDocs.name);
280
- console.log(dataTablePropDocs.props);
281
- ```
282
-
283
- The docs export includes `GeneratedComponentDoc` and `GeneratedPropDoc` types, plus one prop-doc object per documented component. Prop docs include `defaultValue` when the component implementation sets a readable default.
284
-
285
- For the complete generated prop-doc export list, see [Public API Reference](./docs/public-api-reference.md).
321
+ console.log(dataTablePropDocs.props);
322
+ ```
323
+
324
+ The docs export includes `GeneratedComponentDoc` and `GeneratedPropDoc` types, plus one prop-doc object per documented component. Prop docs include `defaultValue` when the component implementation sets a readable default.
325
+
326
+ For the complete generated prop-doc export list, see [Public API Reference](./docs/public-api-reference.md).
286
327
 
287
328
  ## Type Exports
288
329
 
@@ -372,9 +413,9 @@ Useful scripts:
372
413
  | `npm run audit` | Run type, lint, style, test, build, and package checks. |
373
414
  | `npm run generate:docs` | Regenerate component prop docs. |
374
415
  | `npm run generate:entrypoints` | Regenerate component entry points. |
375
- | `npm run generate:exports` | Regenerate package exports. |
376
-
377
- Contributor documentation for component structure, generated docs, package output, and release checks lives in [Development Workflow](./docs/development-workflow.md).
416
+ | `npm run generate:exports` | Regenerate package exports. |
417
+
418
+ Contributor documentation for component structure, generated docs, package output, and release checks lives in [Development Workflow](./docs/development-workflow.md).
378
419
 
379
420
  ## Package Entry Points
380
421
 
package/README.npm.md ADDED
@@ -0,0 +1,450 @@
1
+ # Boreal UI
2
+
3
+ Boreal UI is a customizable, accessible React and Next.js component library with SCSS-powered theming, TypeScript types, generated prop metadata, and parallel `core` and `next` package outputs.
4
+
5
+ Use it when you want production-ready UI primitives that can be themed globally, customized per component, tested predictably, and imported in either standard React apps or Next.js app-router projects.
6
+
7
+ ## Highlights
8
+
9
+ - **React and Next.js builds:** import from `boreal-ui/core` for React apps or `boreal-ui/next` for Next.js apps.
10
+ - **Deep component set:** buttons, forms, navigation, data display, feedback, overlays, layout primitives, and utility components.
11
+ - **Theme system:** curated color schemes, custom schemes, runtime theme selection, CSS variables, and `ThemeSelect`.
12
+ - **Global defaults:** configure default theme, size, rounding, shadow, border width, glass, outline, and color scheme once with `borealConfig`.
13
+ - **Accessible by default:** semantic markup, ARIA support, keyboard behavior, visible focus states, disabled states, live announcements where useful, and predictable test IDs.
14
+ - **Styling flexibility:** theme, state, size, rounding, shadow, outline, glass, custom class names, SCSS variables, and consumer CSS overrides.
15
+ - **Typed public API:** TypeScript component props, shared type exports, and generated prop documentation objects for docs tooling.
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ npm install boreal-ui
21
+ ```
22
+
23
+ Boreal UI expects React and React DOM in the consuming app. Next.js users should also have Next installed.
24
+
25
+ Some components and utilities rely on `marked` and `uuid`, so make sure they are available if your package manager does not install peer dependencies automatically.
26
+
27
+ ## CLI Setup
28
+
29
+ Use the CLI inside an existing React or Next.js project to add the package dependency, global stylesheet import, `ThemeProvider`, and default style config.
30
+
31
+ ```bash
32
+ npx boreal-ui@latest init
33
+ ```
34
+
35
+ Preview changes before writing files:
36
+
37
+ ```bash
38
+ npx boreal-ui init --dry-run
39
+ ```
40
+
41
+ Run non-interactively:
42
+
43
+ ```bash
44
+ npx boreal-ui init --framework next --yes
45
+ ```
46
+
47
+ For Next.js projects, you can also apply Boreal’s recommended global CSS baseline:
48
+
49
+ ```bash
50
+ npx boreal-ui init --framework next --recommended-globals
51
+ ```
52
+
53
+ ## Setup
54
+
55
+ Import the global stylesheet once near the top of your application.
56
+
57
+ ## React
58
+
59
+ ```tsx
60
+ import "boreal-ui/core/globals.css";
61
+ ```
62
+
63
+ Then import components from the core build:
64
+
65
+ ```tsx
66
+ import { Button, Card, TextInput } from "boreal-ui/core";
67
+
68
+ export function Example() {
69
+ return (
70
+ <Card title="Welcome" theme="primary" shadow="medium">
71
+ <TextInput label="Project name" placeholder="Aurora dashboard" />
72
+ <Button theme="secondary" size="large">
73
+ Continue
74
+ </Button>
75
+ </Card>
76
+ );
77
+ }
78
+ ```
79
+
80
+ ## Next.js
81
+
82
+ Import the Next stylesheet once from `app/layout.tsx`, `pages/_app.tsx`, or your global stylesheet.
83
+
84
+ ```tsx
85
+ import "boreal-ui/next/globals.css";
86
+ ```
87
+
88
+ Then import components from the Next build:
89
+
90
+ ```tsx
91
+ "use client";
92
+
93
+ import { Button, Card, TextInput } from "boreal-ui/next";
94
+
95
+ export default function Example() {
96
+ return (
97
+ <Card title="Welcome" theme="primary" shadow="medium">
98
+ <TextInput label="Project name" placeholder="Aurora dashboard" />
99
+ <Button theme="secondary" size="large">
100
+ Continue
101
+ </Button>
102
+ </Card>
103
+ );
104
+ }
105
+ ```
106
+
107
+ ### Next.js Global CSS Note
108
+
109
+ If your Next.js app still has the default starter reset below, avoid loading it after Boreal styles:
110
+
111
+ ```css
112
+ * {
113
+ box-sizing: border-box;
114
+ padding: 0;
115
+ margin: 0;
116
+ }
117
+ ```
118
+
119
+ The universal `padding` and `margin` reset can override spacing that Boreal components and nested content rely on.
120
+
121
+ Prefer this safer baseline:
122
+
123
+ ```css
124
+ html {
125
+ box-sizing: border-box;
126
+ }
127
+
128
+ *,
129
+ *::before,
130
+ *::after {
131
+ box-sizing: inherit;
132
+ }
133
+
134
+ body {
135
+ margin: 0;
136
+ }
137
+ ```
138
+
139
+ ## Standalone Component Imports
140
+
141
+ You can import individual components directly:
142
+
143
+ ```tsx
144
+ import Button from "boreal-ui/core/Button";
145
+ import Card from "boreal-ui/next/Card";
146
+ ```
147
+
148
+ ## Package Entry Points
149
+
150
+ ```tsx
151
+ import { Button } from "boreal-ui/core";
152
+ import Button from "boreal-ui/core/Button";
153
+ import "boreal-ui/core/globals.css";
154
+
155
+ import { Button as NextButton } from "boreal-ui/next";
156
+ import NextCard from "boreal-ui/next/Card";
157
+ import "boreal-ui/next/globals.css";
158
+ ```
159
+
160
+ The root `boreal-ui` entry currently points to the core build. For Next.js apps, prefer `boreal-ui/next` so the Next wrappers and client directives are used.
161
+
162
+ ## Components
163
+
164
+ ### Actions
165
+
166
+ - `Button`
167
+ - `IconButton`
168
+ - `ScrollToTop`
169
+
170
+ ### Forms and Inputs
171
+
172
+ - `TextInput`
173
+ - `TextArea`
174
+ - `Select`
175
+ - `ThemeSelect`
176
+ - `Checkbox`
177
+ - `RadioButton`
178
+ - `RadioGroup`
179
+ - `Toggle`
180
+ - `Slider`
181
+ - `ColorPicker`
182
+ - `DateTimePicker`
183
+ - `FileUpload`
184
+ - `TagInput`
185
+ - `FormGroup`
186
+
187
+ ### Data and Content
188
+
189
+ - `DataTable`
190
+ - `MarkdownRenderer`
191
+ - `Typography`
192
+ - `MetricBox`
193
+
194
+ ### Feedback and Status
195
+
196
+ - `Badge`
197
+ - `Chip`
198
+ - `ChipGroup`
199
+ - `Progressbar`
200
+ - `CircularProgress`
201
+ - `Spinner`
202
+ - `Skeleton`
203
+ - `Rating`
204
+ - `Tooltip`
205
+ - `MessagePopup`
206
+ - `PopOver`
207
+ - `Modal`
208
+ - `NotificationCenter`
209
+ - `EmptyState`
210
+
211
+ ### Navigation and Layout
212
+
213
+ - `Navbar`
214
+ - `Sidebar`
215
+ - `Footer`
216
+ - `Breadcrumbs`
217
+ - `Tabs`
218
+ - `Stepper`
219
+ - `Timeline`
220
+ - `Accordion`
221
+ - `Pager`
222
+ - `Toolbar`
223
+ - `Dropdown`
224
+ - `Divider`
225
+ - `Card`
226
+ - `Avatar`
227
+
228
+ ## Common Styling Props
229
+
230
+ Many components share the same styling vocabulary:
231
+
232
+ | Prop | Values |
233
+ | ------------- | --------------------------------------------------------- |
234
+ | `theme` | `primary`, `secondary`, `tertiary`, `quaternary`, `clear` |
235
+ | `state` | `success`, `error`, `warning`, `disabled`, empty string |
236
+ | `size` | `xs`, `small`, `medium`, `large`, `xl` |
237
+ | `rounding` | `none`, `small`, `medium`, `large`, `full` |
238
+ | `shadow` | `none`, `light`, `medium`, `strong`, `intense` |
239
+ | `borderWidth` | `none`, `xs`, `small`, `medium`, `large`, `xl` |
240
+ | `outline` | outline treatment where supported |
241
+ | `glass` | translucent theme-aware surface where supported |
242
+ | `className` | consumer styling hook |
243
+ | `data-testid` | stable test selector |
244
+
245
+ Exact props vary by component. TypeScript and the generated prop docs are the source of truth for each component.
246
+
247
+ ## Global Style Defaults
248
+
249
+ Call `borealConfig` once before rendering your app to set project-wide defaults.
250
+
251
+ ```tsx
252
+ import { borealConfig } from "boreal-ui/core";
253
+
254
+ borealConfig({
255
+ defaultTheme: "secondary",
256
+ defaultSize: "medium",
257
+ defaultRounding: "medium",
258
+ defaultShadow: "light",
259
+ defaultBorderWidth: "none",
260
+ defaultGlass: false,
261
+ defaultOutline: false,
262
+ defaultColorSchemeName: "Forest Dusk",
263
+ });
264
+ ```
265
+
266
+ For Next.js, import the same API from `boreal-ui/next`:
267
+
268
+ ```tsx
269
+ import { borealConfig } from "boreal-ui/next";
270
+ ```
271
+
272
+ Component props still win over global defaults:
273
+
274
+ ```tsx
275
+ <Button theme="primary" size="large" shadow="strong">
276
+ Save changes
277
+ </Button>
278
+ ```
279
+
280
+ ## Theme Provider and Color Schemes
281
+
282
+ `ThemeProvider` manages the active color scheme and writes the scheme into CSS variables used by Boreal UI components.
283
+
284
+ ```tsx
285
+ "use client";
286
+
287
+ import { ThemeProvider } from "boreal-ui/next";
288
+
289
+ const customSchemes = [
290
+ {
291
+ name: "Cyberpunk Pulse",
292
+ primaryColor: "#ff006e",
293
+ secondaryColor: "#8338ec",
294
+ tertiaryColor: "#3a0ca3",
295
+ quaternaryColor: "#fb5607",
296
+ backgroundColor: "#0f0f0f",
297
+ forceTextColor: "#ffffff",
298
+ },
299
+ ];
300
+
301
+ export function Providers({ children }: { children: React.ReactNode }) {
302
+ return (
303
+ <ThemeProvider
304
+ customSchemes={customSchemes}
305
+ enableThemeScript={false}
306
+ initialSchemeName="Cyberpunk Pulse"
307
+ >
308
+ {children}
309
+ </ThemeProvider>
310
+ );
311
+ }
312
+ ```
313
+
314
+ ### ThemeProvider Props
315
+
316
+ | Prop | Description |
317
+ | ---------------------- | ---------------------------------------------------------------------------------------- |
318
+ | `customSchemes` | Register additional color schemes at runtime. |
319
+ | `enableThemeScript` | Render the pre-hydration theme script. Defaults to `true` for core and `false` for Next. |
320
+ | `initialSchemeName` | Select an initial scheme by name. |
321
+ | `useOnlyCustomSchemes` | Use only custom schemes instead of the built-in list. |
322
+
323
+ ### Color Scheme Shape
324
+
325
+ ```ts
326
+ type ColorScheme = {
327
+ name: string;
328
+ primaryColor: string;
329
+ secondaryColor: string;
330
+ tertiaryColor: string;
331
+ quaternaryColor: string;
332
+ backgroundColor: string;
333
+ forceTextColor?: string;
334
+ };
335
+ ```
336
+
337
+ You can also register schemes manually:
338
+
339
+ ```tsx
340
+ import {
341
+ defaultColorSchemes,
342
+ registerColorScheme,
343
+ ThemeSelect,
344
+ } from "boreal-ui/core";
345
+
346
+ registerColorScheme({
347
+ name: "Brand Night",
348
+ primaryColor: "#4f46e5",
349
+ secondaryColor: "#06b6d4",
350
+ tertiaryColor: "#a855f7",
351
+ quaternaryColor: "#22c55e",
352
+ backgroundColor: "#0f172a",
353
+ forceTextColor: "#ffffff",
354
+ });
355
+
356
+ console.log(defaultColorSchemes.map((scheme) => scheme.name));
357
+ ```
358
+
359
+ ## Type Exports
360
+
361
+ Shared public types are exported from both builds:
362
+
363
+ ```ts
364
+ import type {
365
+ BorderType,
366
+ ColorScheme,
367
+ RoundingType,
368
+ ShadowType,
369
+ SizeType,
370
+ ThemeType,
371
+ } from "boreal-ui/core";
372
+ ```
373
+
374
+ Standalone type entry points are also available:
375
+
376
+ ```ts
377
+ import type { ThemeType } from "boreal-ui/core/types";
378
+ import type { SizeType } from "boreal-ui/next/types";
379
+ ```
380
+
381
+ ## Generated Prop Docs
382
+
383
+ Boreal UI exports generated prop metadata for documentation sites, playgrounds, and prop tables.
384
+
385
+ ```tsx
386
+ import { buttonPropDocs, dataTablePropDocs } from "boreal-ui/core";
387
+
388
+ console.log(buttonPropDocs.name);
389
+ console.log(dataTablePropDocs.props);
390
+ ```
391
+
392
+ The docs export includes `GeneratedComponentDoc` and `GeneratedPropDoc` types, plus one prop-doc object per documented component.
393
+
394
+ ## CSS Customization
395
+
396
+ Boreal UI styles are built on CSS variables and SCSS. You can override variables globally or scope them to a subtree:
397
+
398
+ ```css
399
+ :root {
400
+ --font-family-ui: Inter, system-ui, sans-serif;
401
+ --border-radius-md: 0.5rem;
402
+ --transition-default: 160ms ease;
403
+ --focus-outline-color: #2563eb;
404
+ }
405
+
406
+ .admin-shell {
407
+ --background-color: #0f172a;
408
+ --text-color: #f8fafc;
409
+ }
410
+ ```
411
+
412
+ Most components also accept `className`, and larger components expose section-level class props such as:
413
+
414
+ ```tsx
415
+ <Card
416
+ title="Custom Card"
417
+ className="dashboard-card"
418
+ headerClassName="dashboard-card__header"
419
+ contentClassName="dashboard-card__content"
420
+ footerClassName="dashboard-card__footer"
421
+ />
422
+ ```
423
+
424
+ ## Accessibility and Testing
425
+
426
+ Boreal UI is designed for Testing Library, Jest, jest-axe, Cypress, and Storybook workflows.
427
+
428
+ - Prefer roles and accessible names in tests.
429
+ - Use `data-testid` when a stable selector is needed.
430
+ - Icon-only controls should receive an accessible label.
431
+ - Helper and error text are connected with ARIA where components support those states.
432
+ - Interactive components are built with keyboard behavior and visible focus states in mind.
433
+
434
+ ```tsx
435
+ import { render, screen } from "@testing-library/react";
436
+ import { Button } from "boreal-ui/core";
437
+
438
+ it("renders an accessible button", () => {
439
+ render(<Button>Submit</Button>);
440
+ expect(screen.getByRole("button", { name: /submit/i })).toBeInTheDocument();
441
+ });
442
+ ```
443
+
444
+ ## Documentation
445
+
446
+ For full documentation, examples, and API guides, [View the Boreal UI docs](https://www.borealui.ca)
447
+
448
+ ## License
449
+
450
+ MIT © Davin Chiupka