@abuzareal/contour-ui 0.6.2 → 0.6.4

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 (53) hide show
  1. package/CHANGELOG.md +14 -2
  2. package/COMBOBOX.md +1 -1
  3. package/COMPONENT-GUIDES.md +3534 -0
  4. package/COMPOSITION.md +1 -1
  5. package/CONTRACTS.md +1 -1
  6. package/CONTRIBUTING.md +4 -0
  7. package/DOCS.md +61 -61
  8. package/FORMS.md +1 -1
  9. package/GETTING-STARTED.md +4 -4
  10. package/HELPERS.md +1 -1
  11. package/HOOKS.md +2 -2
  12. package/MANUAL-QA.md +1 -1
  13. package/MIGRATION.md +1 -1
  14. package/MODELS.md +1 -1
  15. package/NEXTJS.md +2 -2
  16. package/OVERLAYS.md +1 -1
  17. package/PROP-REFERENCE.md +4 -4
  18. package/PUBLIC-API.md +166 -166
  19. package/README.md +6 -4
  20. package/RECIPES.md +1 -1
  21. package/REFERENCE.md +55 -55
  22. package/SIZE.md +2 -2
  23. package/STYLING.md +1 -1
  24. package/SUPPORT.md +1 -1
  25. package/THREE.md +1 -1
  26. package/dist/components/ui/Avatar.js +6 -2
  27. package/dist/components/ui/SegmentedControl.js +2 -1
  28. package/dist/components/ui/ToastProvider.js +14 -2
  29. package/docs/component-guides.json +2217 -0
  30. package/docs/prop-metadata.json +5734 -751
  31. package/examples/catalogue/buttons.tsx +27 -0
  32. package/examples/catalogue/choices.tsx +51 -0
  33. package/examples/catalogue/combobox.tsx +119 -0
  34. package/examples/catalogue/content.tsx +108 -0
  35. package/examples/catalogue/data-table.tsx +18 -0
  36. package/examples/catalogue/dialogs.tsx +20 -0
  37. package/examples/catalogue/feedback.tsx +24 -0
  38. package/examples/catalogue/field.tsx +18 -0
  39. package/examples/catalogue/floating.tsx +41 -0
  40. package/examples/catalogue/identity.tsx +35 -0
  41. package/examples/catalogue/metadata.tsx +17 -0
  42. package/examples/catalogue/motion.tsx +47 -0
  43. package/examples/catalogue/navigation.tsx +43 -0
  44. package/examples/catalogue/scene-boundary.tsx +37 -0
  45. package/examples/catalogue/text-inputs.tsx +60 -0
  46. package/examples/catalogue/theme-copy.tsx +32 -0
  47. package/examples/catalogue/toasts.tsx +21 -0
  48. package/examples/reproduction/package.json +2 -2
  49. package/examples/starters/next/README.md +1 -1
  50. package/examples/starters/next/package.json +2 -2
  51. package/examples/starters/vite/README.md +1 -1
  52. package/examples/starters/vite/package.json +2 -2
  53. package/package.json +6 -3
@@ -0,0 +1,32 @@
1
+ import {
2
+ Button,
3
+ ThemeToggle,
4
+ useMotionPreference,
5
+ useClipboardCopy,
6
+ } from "@abuzareal/contour-ui";
7
+
8
+ export default function PreferencesAndCopy({
9
+ animate = true,
10
+ command = "npm install @abuzareal/contour-ui@0.6.4 --save-exact",
11
+ }: {
12
+ animate?: boolean;
13
+ command?: string;
14
+ }) {
15
+ const reducedMotion = useMotionPreference();
16
+ const { status, copy } = useClipboardCopy(command);
17
+ return (
18
+ <>
19
+ <ThemeToggle animate={animate && !reducedMotion} />
20
+ <Button loading={status === "copying"} onClick={() => void copy()}>
21
+ Copy install command
22
+ </Button>
23
+ <p role="status">
24
+ {status === "copied"
25
+ ? "Copied."
26
+ : status === "error"
27
+ ? "Copy failed. Select the command manually."
28
+ : ""}
29
+ </p>
30
+ </>
31
+ );
32
+ }
@@ -0,0 +1,21 @@
1
+ import { Button, ToastProvider, useToast } from "@abuzareal/contour-ui";
2
+
3
+ function DemoNotice() {
4
+ const { show } = useToast();
5
+ return (
6
+ <Button
7
+ onClick={() =>
8
+ show({ title: "Example notification", message: "No data was saved." })
9
+ }
10
+ >
11
+ Show example
12
+ </Button>
13
+ );
14
+ }
15
+ export default function App() {
16
+ return (
17
+ <ToastProvider>
18
+ <DemoNotice />
19
+ </ToastProvider>
20
+ );
21
+ }
@@ -13,7 +13,7 @@
13
13
  "preview": "vite preview"
14
14
  },
15
15
  "dependencies": {
16
- "@abuzareal/contour-ui": "0.6.2",
16
+ "@abuzareal/contour-ui": "0.6.4",
17
17
  "react": "18.3.1",
18
18
  "react-dom": "18.3.1"
19
19
  },
@@ -22,6 +22,6 @@
22
22
  "@types/react-dom": "18.3.7",
23
23
  "@types/node": "26.6.5",
24
24
  "typescript": "5.9.3",
25
- "vite": "8.3.2"
25
+ "vite": "8.3.5"
26
26
  }
27
27
  }
@@ -9,7 +9,7 @@ npm run build
9
9
  npm start
10
10
  ```
11
11
 
12
- Direct versions: Contour 0.6.1, Next 16.4.0, React/React DOM 19.3.0, TypeScript 7.0.2; webpack explicitly selected. Commit the generated application lockfile and use npm ci afterward. There are no workspace aliases, optional Three/Lenis peers, fonts or required providers. To opt into branded fonts, import `@abuzareal/contour-ui/fonts-latin.css` in app/layout.tsx. Root CSS and route composition belong to the application.
12
+ Direct versions: Contour 0.6.4, Next 16.4.3, React/React DOM 19.3.0, TypeScript 7.0.2; webpack explicitly selected. Commit the generated application lockfile and use npm ci afterward. There are no workspace aliases, optional Three/Lenis peers, fonts or required providers. To opt into branded fonts, import `@abuzareal/contour-ui/fonts-latin.css` in app/layout.tsx. Root CSS and route composition belong to the application.
13
13
 
14
14
  layout.tsx and the page are server components. Demo.tsx owns client state, refs and handlers. The pure theme-bootstrap subpath is server-safe; before-paint script changes only the root theme attribute and theme-color. The root's suppressHydrationWarning is narrowly for this attribute, not a workaround for arbitrary mismatches.
15
15
 
@@ -13,10 +13,10 @@
13
13
  "start": "next start"
14
14
  },
15
15
  "dependencies": {
16
- "@abuzareal/contour-ui": "0.6.2",
16
+ "@abuzareal/contour-ui": "0.6.4",
17
17
  "react": "19.3.0",
18
18
  "react-dom": "19.3.0",
19
- "next": "16.4.0"
19
+ "next": "16.4.3"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/react": "19.3.0",
@@ -9,7 +9,7 @@ npm run build
9
9
  npm run preview
10
10
  ```
11
11
 
12
- Uses Contour 0.6.1, React/React DOM 18.3.1, TypeScript 5.9.3 and Vite 8.3.2. No aliases, workspace links, optional peers, font download, private catalogue or provider are required. Scoped CSS includes tokens and component families without the legacy global reset. The application owns the small body/layout stylesheet. Optional branded fonts: import `@abuzareal/contour-ui/fonts-latin.css` once.
12
+ Uses Contour 0.6.4, React/React DOM 18.3.1, TypeScript 5.9.3 and Vite 8.3.5. No aliases, workspace links, optional peers, font download, private catalogue or provider are required. Scoped CSS includes tokens and component families without the legacy global reset. The application owns the small body/layout stylesheet. Optional branded fonts: import `@abuzareal/contour-ui/fonts-latin.css` once.
13
13
 
14
14
  The Vite config inserts the exact released theme bootstrap before the application, with a calculated CSP script hash. Keep the placeholder in index.html; recalculate through the build after upgrades. Script execution is restricted; style attributes are allowed because popup positioning and some components use inline styles. Extend connect-src intentionally for your service/development socket. An HTTP CSP header may replace this meta policy if it contains the same hash. See the package GETTING-STARTED.md for embedded themes and optional features.
15
15
 
@@ -13,7 +13,7 @@
13
13
  "preview": "vite preview"
14
14
  },
15
15
  "dependencies": {
16
- "@abuzareal/contour-ui": "0.6.2",
16
+ "@abuzareal/contour-ui": "0.6.4",
17
17
  "react": "18.3.1",
18
18
  "react-dom": "18.3.1"
19
19
  },
@@ -22,6 +22,6 @@
22
22
  "@types/react-dom": "18.3.7",
23
23
  "@types/node": "26.6.5",
24
24
  "typescript": "5.9.3",
25
- "vite": "8.3.2"
25
+ "vite": "8.3.5"
26
26
  }
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abuzareal/contour-ui",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "private": false,
5
5
  "description": "Editorial React components, themes, restrained motion, and optional Three.js objects.",
6
6
  "type": "module",
@@ -42,7 +42,10 @@
42
42
  "MANUAL-QA.md",
43
43
  "docs/prop-metadata.json",
44
44
  "examples/onboarding",
45
- "examples/reference"
45
+ "examples/reference",
46
+ "docs/component-guides.json",
47
+ "COMPONENT-GUIDES.md",
48
+ "examples/catalogue"
46
49
  ],
47
50
  "sideEffects": [
48
51
  "**/*.css"
@@ -153,7 +156,7 @@
153
156
  "react-dom": "18.3.1",
154
157
  "three": "^0.186.1",
155
158
  "typescript": "^5.5.3",
156
- "vite": "^8.3.2"
159
+ "vite": "^8.3.5"
157
160
  },
158
161
  "engines": {
159
162
  "node": ">=22"