atlas-react-kit 0.8.2 → 0.9.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/COMPONENTS.md +12 -0
- package/README.md +17 -4
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.js +2 -2
- package/package.json +31 -7
- package/skills/atlas-react-kit/SKILL.md +3 -1
package/COMPONENTS.md
CHANGED
|
@@ -5,6 +5,18 @@ underlying element or Radix props, including `className`, alongside their option
|
|
|
5
5
|
Form helpers and `TableBodySkeleton` accept only their documented props. There is
|
|
6
6
|
no root component barrel.
|
|
7
7
|
|
|
8
|
+
Core entries need only the kit. These feature entries need an extra install
|
|
9
|
+
(same version ranges as the kit's optional peers). `Toaster` also reads the
|
|
10
|
+
theme from `next-themes`, so toast consumers install that too.
|
|
11
|
+
|
|
12
|
+
| Entry points | Extra install |
|
|
13
|
+
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------ |
|
|
14
|
+
| `calendar`, `date-picker`, `date-time-picker`, `form/date-picker-field`, `form/date-time-picker-field` | `npm i react-day-picker@^10.0.1 date-fns@^4.4.0` |
|
|
15
|
+
| `markdown`, `form/markdown-field` | `npm i react-markdown@^10.1.0 remark-gfm@^4.0.1` |
|
|
16
|
+
| `theme-provider` | `npm i next-themes@^0.4.6` |
|
|
17
|
+
| `toast` | `npm i sonner@^2.0.7 next-themes@^0.4.6` |
|
|
18
|
+
| `next/tabs-nav-link` | `npm i next@^16.0.0` |
|
|
19
|
+
|
|
8
20
|
| Subpath | Main exports and options |
|
|
9
21
|
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
10
22
|
| `accordion` | `Accordion`, `AccordionItem`, `AccordionTrigger`, `AccordionContent`; Radix `type` `single` (with `collapsible`) or `multiple` |
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ keeping locally (`InfoTip`, `ColorLegend`, `SearchPicker`, `Markdown`,
|
|
|
7
7
|
React 19 and Tailwind 4 are required.
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
npm install --save-exact atlas-react-kit@0.
|
|
10
|
+
npm install --save-exact atlas-react-kit@0.9.0
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Import components by subpath:
|
|
@@ -27,6 +27,18 @@ export function Example() {
|
|
|
27
27
|
}
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
Core entries need only the kit. These feature entries need an extra install
|
|
31
|
+
(same version ranges as the kit's optional peers). `Toaster` also reads the
|
|
32
|
+
theme from `next-themes`, so toast consumers install that too.
|
|
33
|
+
|
|
34
|
+
| Entry points | Extra install |
|
|
35
|
+
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------ |
|
|
36
|
+
| `calendar`, `date-picker`, `date-time-picker`, `form/date-picker-field`, `form/date-time-picker-field` | `npm i react-day-picker@^10.0.1 date-fns@^4.4.0` |
|
|
37
|
+
| `markdown`, `form/markdown-field` | `npm i react-markdown@^10.1.0 remark-gfm@^4.0.1` |
|
|
38
|
+
| `theme-provider` | `npm i next-themes@^0.4.6` |
|
|
39
|
+
| `toast` | `npm i sonner@^2.0.7 next-themes@^0.4.6` |
|
|
40
|
+
| `next/tabs-nav-link` | `npm i next@^16.0.0` |
|
|
41
|
+
|
|
30
42
|
In your global stylesheet, import the theme after Tailwind and register the
|
|
31
43
|
installed JavaScript directory. Paths in `@source` are relative to that stylesheet;
|
|
32
44
|
this example assumes it is one directory below the project root.
|
|
@@ -90,8 +102,9 @@ The public site is Storybook in `site/`. `npm run build --prefix site`
|
|
|
90
102
|
typechecks the stories, builds Storybook into `site/dist`, then checks the
|
|
91
103
|
static output. Vercel serves that directory; `/playground` and `/storybook`
|
|
92
104
|
redirect to `/`. The site and Storybook dependencies are not part of the npm
|
|
93
|
-
package.
|
|
94
|
-
|
|
105
|
+
package. Optional feature libraries (markdown, dates, toasts, theme, Next) are
|
|
106
|
+
peer dependencies and are required only when those entry points are imported.
|
|
107
|
+
The package does not bundle React.
|
|
95
108
|
|
|
96
109
|
Run `npm run dev --prefix site` (or `npm run storybook --prefix site`) for the
|
|
97
110
|
playground on port 6006. Existing examples live in `stories/` and are imported
|
|
@@ -116,7 +129,7 @@ artifact with the package owner's npm login:
|
|
|
116
129
|
```sh
|
|
117
130
|
mkdir -p release-artifacts
|
|
118
131
|
npm pack --pack-destination release-artifacts
|
|
119
|
-
npm publish ./release-artifacts/atlas-react-kit-0.
|
|
132
|
+
npm publish ./release-artifacts/atlas-react-kit-0.9.0.tgz --access public
|
|
120
133
|
```
|
|
121
134
|
|
|
122
135
|
See [CONTRIBUTING.md](./CONTRIBUTING.md) for adding components, the browser
|
package/dist/markdown.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ export type MarkdownProps = {
|
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* GitHub-flavoured Markdown, token-styled and sanitized. No Next, no raw
|
|
12
|
-
* HTML, no typography plugin. `react-markdown` and `remark-gfm`
|
|
13
|
-
*
|
|
12
|
+
* HTML, no typography plugin. `react-markdown` and `remark-gfm` are optional
|
|
13
|
+
* peers imported only here so other subpaths do not pay for them.
|
|
14
14
|
*/
|
|
15
15
|
declare function Markdown({ content, className }: MarkdownProps): import("react").JSX.Element;
|
|
16
16
|
/** Alias used by apps that imported MarkdownContent. */
|
package/dist/markdown.js
CHANGED
|
@@ -51,8 +51,8 @@ const markdownComponents = {
|
|
|
51
51
|
};
|
|
52
52
|
/**
|
|
53
53
|
* GitHub-flavoured Markdown, token-styled and sanitized. No Next, no raw
|
|
54
|
-
* HTML, no typography plugin. `react-markdown` and `remark-gfm`
|
|
55
|
-
*
|
|
54
|
+
* HTML, no typography plugin. `react-markdown` and `remark-gfm` are optional
|
|
55
|
+
* peers imported only here so other subpaths do not pay for them.
|
|
56
56
|
*/
|
|
57
57
|
function Markdown({ content, className }) {
|
|
58
58
|
return (_jsx("article", { "data-slot": "markdown", className: cn("flex flex-col gap-3 text-foreground", className), children: _jsx(ReactMarkdown, { remarkPlugins: REMARK_PLUGINS, urlTransform: safeMarkdownUrl, components: markdownComponents, children: content }) }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "atlas-react-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Shared React components and Tailwind theme for Atlas",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -255,27 +255,45 @@
|
|
|
255
255
|
"access": "public"
|
|
256
256
|
},
|
|
257
257
|
"peerDependencies": {
|
|
258
|
+
"date-fns": "^4.4.0",
|
|
258
259
|
"next": "^16.0.0",
|
|
260
|
+
"next-themes": "^0.4.6",
|
|
259
261
|
"react": "^19.0.0",
|
|
262
|
+
"react-day-picker": "^10.0.1",
|
|
260
263
|
"react-dom": "^19.0.0",
|
|
264
|
+
"react-markdown": "^10.1.0",
|
|
265
|
+
"remark-gfm": "^4.0.1",
|
|
266
|
+
"sonner": "^2.0.7",
|
|
261
267
|
"tailwindcss": "^4.0.0"
|
|
262
268
|
},
|
|
263
269
|
"peerDependenciesMeta": {
|
|
270
|
+
"date-fns": {
|
|
271
|
+
"optional": true
|
|
272
|
+
},
|
|
264
273
|
"next": {
|
|
265
274
|
"optional": true
|
|
275
|
+
},
|
|
276
|
+
"next-themes": {
|
|
277
|
+
"optional": true
|
|
278
|
+
},
|
|
279
|
+
"react-day-picker": {
|
|
280
|
+
"optional": true
|
|
281
|
+
},
|
|
282
|
+
"react-markdown": {
|
|
283
|
+
"optional": true
|
|
284
|
+
},
|
|
285
|
+
"remark-gfm": {
|
|
286
|
+
"optional": true
|
|
287
|
+
},
|
|
288
|
+
"sonner": {
|
|
289
|
+
"optional": true
|
|
266
290
|
}
|
|
267
291
|
},
|
|
268
292
|
"dependencies": {
|
|
269
293
|
"class-variance-authority": "^0.7.1",
|
|
270
294
|
"clsx": "^2.1.1",
|
|
271
|
-
"date-fns": "^4.4.0",
|
|
272
295
|
"lucide-react": "^1.16.0",
|
|
273
|
-
"next-themes": "^0.4.6",
|
|
274
296
|
"radix-ui": "^1.4.3",
|
|
275
|
-
"react-day-picker": "^10.0.1",
|
|
276
|
-
"react-markdown": "^10.1.0",
|
|
277
|
-
"remark-gfm": "^4.0.1",
|
|
278
|
-
"sonner": "^2.0.7",
|
|
279
297
|
"tailwind-merge": "^3.6.0",
|
|
280
298
|
"tw-animate-css": "^1.4.0"
|
|
281
299
|
},
|
|
@@ -288,11 +306,17 @@
|
|
|
288
306
|
"@types/react": "^19.2.14",
|
|
289
307
|
"@types/react-dom": "^19.2.3",
|
|
290
308
|
"@vitest/coverage-v8": "4.1.11",
|
|
309
|
+
"date-fns": "^4.4.0",
|
|
291
310
|
"jsdom": "^29.1.1",
|
|
292
311
|
"next": "16.2.6",
|
|
312
|
+
"next-themes": "^0.4.6",
|
|
293
313
|
"prettier": "^3.8.1",
|
|
294
314
|
"react": "^19.2.4",
|
|
315
|
+
"react-day-picker": "^10.0.1",
|
|
295
316
|
"react-dom": "^19.2.4",
|
|
317
|
+
"react-markdown": "^10.1.0",
|
|
318
|
+
"remark-gfm": "^4.0.1",
|
|
319
|
+
"sonner": "^2.0.7",
|
|
296
320
|
"tailwindcss": "^4.2.1",
|
|
297
321
|
"typescript": "^6.0.3",
|
|
298
322
|
"vitest": "^4.1.9"
|
|
@@ -42,7 +42,9 @@ root (or a `dark` class on an ancestor). Toasts need one `<Toaster />` from
|
|
|
42
42
|
`atlas-react-kit/toast`; show them with `toast()` from the same module, using
|
|
43
43
|
only the options it declares. Never import a toast library such as `sonner`
|
|
44
44
|
directly: the kit owns the toast API, and a second copy never reaches its
|
|
45
|
-
toaster.
|
|
45
|
+
toaster. Markdown, dates, toasts, and `ThemeProvider` are optional peers —
|
|
46
|
+
install the extras listed in `COMPONENTS.md` when you import those entry
|
|
47
|
+
points. Fix missing setup rather than working
|
|
46
48
|
around unstyled components.
|
|
47
49
|
|
|
48
50
|
## 3. Pick the kit component for the job
|