@abuzareal/contour-ui 0.6.2 → 0.6.3
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/CHANGELOG.md +4 -0
- package/COMBOBOX.md +1 -1
- package/COMPONENT-GUIDES.md +3534 -0
- package/COMPOSITION.md +1 -1
- package/CONTRIBUTING.md +4 -0
- package/DOCS.md +61 -61
- package/FORMS.md +1 -1
- package/GETTING-STARTED.md +3 -3
- package/HELPERS.md +1 -1
- package/HOOKS.md +1 -1
- package/MANUAL-QA.md +1 -1
- package/MIGRATION.md +1 -1
- package/MODELS.md +1 -1
- package/OVERLAYS.md +1 -1
- package/PROP-REFERENCE.md +4 -4
- package/PUBLIC-API.md +166 -166
- package/README.md +5 -3
- package/RECIPES.md +1 -1
- package/REFERENCE.md +55 -55
- package/STYLING.md +1 -1
- package/SUPPORT.md +1 -1
- package/THREE.md +1 -1
- package/docs/component-guides.json +2217 -0
- package/docs/prop-metadata.json +5734 -751
- package/examples/catalogue/buttons.tsx +27 -0
- package/examples/catalogue/choices.tsx +51 -0
- package/examples/catalogue/combobox.tsx +119 -0
- package/examples/catalogue/content.tsx +108 -0
- package/examples/catalogue/data-table.tsx +18 -0
- package/examples/catalogue/dialogs.tsx +20 -0
- package/examples/catalogue/feedback.tsx +24 -0
- package/examples/catalogue/field.tsx +18 -0
- package/examples/catalogue/floating.tsx +41 -0
- package/examples/catalogue/identity.tsx +35 -0
- package/examples/catalogue/metadata.tsx +17 -0
- package/examples/catalogue/motion.tsx +47 -0
- package/examples/catalogue/navigation.tsx +43 -0
- package/examples/catalogue/scene-boundary.tsx +37 -0
- package/examples/catalogue/text-inputs.tsx +60 -0
- package/examples/catalogue/theme-copy.tsx +32 -0
- package/examples/catalogue/toasts.tsx +21 -0
- package/examples/reproduction/package.json +1 -1
- package/examples/starters/next/package.json +1 -1
- package/examples/starters/vite/package.json +1 -1
- package/package.json +5 -2
|
@@ -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.3 --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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abuzareal/contour-ui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
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"
|