marclayui 0.0.0-stage → 0.3.1
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/README.md +50 -3
- package/dist/index.cjs +1510 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +379 -0
- package/dist/index.d.ts +379 -0
- package/dist/index.js +1443 -0
- package/dist/index.js.map +1 -0
- package/dist/theme-init.cjs +31 -0
- package/dist/theme-init.cjs.map +1 -0
- package/dist/theme-init.d.mts +8 -0
- package/dist/theme-init.d.ts +8 -0
- package/dist/theme-init.js +6 -0
- package/dist/theme-init.js.map +1 -0
- package/package.json +71 -4
- package/src/components/accordion/accordion.css +66 -0
- package/src/components/accordion/accordion.tsx +86 -0
- package/src/components/alert/alert.css +86 -0
- package/src/components/alert/alert.tsx +45 -0
- package/src/components/avatar/avatar.css +75 -0
- package/src/components/avatar/avatar.tsx +59 -0
- package/src/components/badge/badge.css +106 -0
- package/src/components/badge/badge.tsx +26 -0
- package/src/components/button/button.css +118 -0
- package/src/components/button/button.tsx +86 -0
- package/src/components/card/card.css +41 -0
- package/src/components/card/card.tsx +26 -0
- package/src/components/checks/checks.css +157 -0
- package/src/components/checks/checks.tsx +167 -0
- package/src/components/divider/divider.css +41 -0
- package/src/components/divider/divider.tsx +24 -0
- package/src/components/dropdown/dropdown.css +182 -0
- package/src/components/dropdown/dropdown.tsx +268 -0
- package/src/components/input/input.css +73 -0
- package/src/components/input/input.tsx +85 -0
- package/src/components/kbd/kbd.css +66 -0
- package/src/components/kbd/kbd.tsx +14 -0
- package/src/components/modal/modal.css +93 -0
- package/src/components/modal/modal.tsx +114 -0
- package/src/components/navbar/navbar.css +127 -0
- package/src/components/navbar/navbar.tsx +64 -0
- package/src/components/progress/progress.css +62 -0
- package/src/components/progress/progress.tsx +50 -0
- package/src/components/range/range.css +68 -0
- package/src/components/range/range.tsx +60 -0
- package/src/components/skeleton/skeleton.css +43 -0
- package/src/components/skeleton/skeleton.tsx +35 -0
- package/src/components/spinner/spinner.css +21 -0
- package/src/components/spinner/spinner.tsx +10 -0
- package/src/components/stack/stack.css +60 -0
- package/src/components/stack/stack.tsx +34 -0
- package/src/components/stat/stat.css +54 -0
- package/src/components/stat/stat.tsx +19 -0
- package/src/components/tabs/tabs.css +58 -0
- package/src/components/tabs/tabs.tsx +84 -0
- package/src/components/toast/toast.css +94 -0
- package/src/components/toast/toast.tsx +100 -0
- package/src/components/tooltip/tooltip.css +100 -0
- package/src/components/tooltip/tooltip.tsx +19 -0
- package/src/index.ts +112 -0
- package/src/styles/base.css +78 -0
- package/src/styles/index.css +26 -0
- package/src/styles/theme.css +246 -0
- package/src/theme-init.ts +6 -0
- package/src/theming/ThemeMenu.tsx +158 -0
- package/src/theming/ThemeProvider.tsx +234 -0
- package/src/theming/ThemeToggle.tsx +27 -0
- package/src/theming/presets.ts +33 -0
- package/src/theming/theming.css +155 -0
- package/src/utils/color.ts +58 -0
package/README.md
CHANGED
|
@@ -1,4 +1,51 @@
|
|
|
1
|
-
#
|
|
1
|
+
# marclayui
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Claymorphism + neumorphism React components with light/dark theming and runtime color control. This folder is the **publishable npm package**; the docs site lives one level up.
|
|
4
|
+
|
|
5
|
+
## Install (for consumers)
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install marclayui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { MarclayProvider, Button } from "marclayui";
|
|
13
|
+
import { themeInitScript } from "marclayui/theme-init";
|
|
14
|
+
import "marclayui/styles.css";
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
- `"marclayui"` — all components + `MarclayProvider` / `useTheme` / `ThemeToggle`. Ships as ESM + CJS with type definitions; the bundle is marked `"use client"` for Next.js App Router.
|
|
18
|
+
- `"marclayui/theme-init"` — tiny Server-Component-safe module with the no-flash theme script.
|
|
19
|
+
- `"marclayui/styles.css"` — the full stylesheet (tokens + all components).
|
|
20
|
+
|
|
21
|
+
## Peer dependencies
|
|
22
|
+
|
|
23
|
+
React ≥ 18 (works with React 19 / Next 15/16). Nothing else — zero runtime dependencies.
|
|
24
|
+
|
|
25
|
+
## Development
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm run build # tsup → dist/ (ESM, CJS, d.ts) for both entries
|
|
29
|
+
npm run dev # watch mode
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Source layout:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
src/
|
|
36
|
+
index.ts # public barrel
|
|
37
|
+
theme-init.ts # server-safe theme script (separate entry)
|
|
38
|
+
styles/ # theme.css (tokens) + base.css + index.css (@imports)
|
|
39
|
+
theming/ # MarclayProvider, useTheme, ThemeToggle
|
|
40
|
+
components/ # one folder per component (tsx + css)
|
|
41
|
+
utils/color.ts # shade/glow derivation for runtime colors
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Publishing
|
|
45
|
+
|
|
46
|
+
1. Bump `version` in `package.json`.
|
|
47
|
+
2. `npm run build` (inside this folder) — or `npm run build:ui` at the repo root.
|
|
48
|
+
3. Dry run: `npm publish --dry-run` (check that `dist/` + `src/` + README + LICENSE are included).
|
|
49
|
+
4. `npm publish` (add `--access public` for a scoped release; `marclayui` is unscoped so not needed).
|
|
50
|
+
|
|
51
|
+
The `files` field ships `dist/` and `src/` — `src/` is included because `marclayui/styles.css` resolves directly to the source stylesheet. Bundle size for JS is ~31 KB ESM before gzip; the stylesheet is separate and tree-shakeable by simply not importing unused component CSS isn't supported yet (single stylesheet by design).
|