@abuzareal/contour-ui 0.4.0 → 0.6.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/CHANGELOG.md +24 -0
- package/COMBOBOX.md +87 -0
- package/CONTRACTS.md +23 -17
- package/DOCS.md +80 -0
- package/FOUNDATION.md +35 -0
- package/GETTING-STARTED.md +63 -0
- package/NEXTJS.md +5 -1
- package/OVERLAYS.md +52 -0
- package/PUBLIC-API.md +189 -162
- package/README.md +44 -28
- package/RECIPES.md +43 -0
- package/RELEASING.md +2 -2
- package/SIZE.md +51 -0
- package/STYLING.md +68 -0
- package/dist/actions.css +7 -0
- package/dist/components/hero/Sculpture.js +2 -1
- package/dist/components/three/ObjectStudy.js +2 -1
- package/dist/components/ui/Alert.d.ts +2 -1
- package/dist/components/ui/Alert.js +3 -3
- package/dist/components/ui/Avatar.d.ts +3 -1
- package/dist/components/ui/Avatar.js +3 -3
- package/dist/components/ui/Badge.js +2 -2
- package/dist/components/ui/BrandMark.js +2 -1
- package/dist/components/ui/Breadcrumbs.d.ts +2 -1
- package/dist/components/ui/Breadcrumbs.js +3 -2
- package/dist/components/ui/Button.d.ts +2 -0
- package/dist/components/ui/Button.js +3 -2
- package/dist/components/ui/Card.js +2 -2
- package/dist/components/ui/Checkbox.js +3 -3
- package/dist/components/ui/Combobox.d.ts +325 -0
- package/dist/components/ui/Combobox.js +120 -0
- package/dist/components/ui/Combobox.types.d.ts +46 -0
- package/dist/components/ui/Combobox.types.js +1 -0
- package/dist/components/ui/CountUp.d.ts +2 -1
- package/dist/components/ui/CountUp.js +6 -3
- package/dist/components/ui/DataTable.d.ts +1 -0
- package/dist/components/ui/DataTable.js +15 -10
- package/dist/components/ui/DepthButton.js +2 -2
- package/dist/components/ui/Dialog.d.ts +5 -1
- package/dist/components/ui/Dialog.js +49 -18
- package/dist/components/ui/Disclosure.js +2 -1
- package/dist/components/ui/Divider.js +3 -2
- package/dist/components/ui/DropdownMenu.d.ts +11 -4
- package/dist/components/ui/DropdownMenu.js +109 -66
- package/dist/components/ui/EmptyState.js +2 -1
- package/dist/components/ui/Field.js +2 -2
- package/dist/components/ui/FlipCard.js +2 -2
- package/dist/components/ui/FloatingPortal.d.ts +10 -0
- package/dist/components/ui/FloatingPortal.js +13 -0
- package/dist/components/ui/FloatingScope.d.ts +9 -0
- package/dist/components/ui/FloatingScope.js +43 -0
- package/dist/components/ui/IconButton.js +2 -2
- package/dist/components/ui/Kbd.js +2 -1
- package/dist/components/ui/Magnetic.js +2 -1
- package/dist/components/ui/Marquee.js +3 -2
- package/dist/components/ui/OverlayTrigger.d.ts +11 -0
- package/dist/components/ui/OverlayTrigger.js +5 -0
- package/dist/components/ui/Pagination.d.ts +5 -1
- package/dist/components/ui/Pagination.js +3 -2
- package/dist/components/ui/Popover.d.ts +18 -8
- package/dist/components/ui/Popover.js +58 -17
- package/dist/components/ui/ProgressBar.js +2 -2
- package/dist/components/ui/RadioGroup.js +5 -5
- package/dist/components/ui/Reveal.d.ts +0 -1
- package/dist/components/ui/Reveal.js +4 -3
- package/dist/components/ui/RevealHeading.js +2 -1
- package/dist/components/ui/ScrollProgress.js +2 -1
- package/dist/components/ui/SectionLabel.js +2 -1
- package/dist/components/ui/SegmentedControl.js +6 -3
- package/dist/components/ui/SelectField.js +3 -2
- package/dist/components/ui/Skeleton.js +2 -2
- package/dist/components/ui/Slider.js +3 -3
- package/dist/components/ui/Spinner.js +2 -2
- package/dist/components/ui/Stat.js +2 -1
- package/dist/components/ui/Stepper.js +3 -3
- package/dist/components/ui/Switch.d.ts +2 -0
- package/dist/components/ui/Switch.js +6 -7
- package/dist/components/ui/Table.d.ts +20 -0
- package/dist/components/ui/Table.js +9 -0
- package/dist/components/ui/Tabs.js +7 -5
- package/dist/components/ui/Tag.d.ts +2 -1
- package/dist/components/ui/Tag.js +4 -3
- package/dist/components/ui/TextArea.js +2 -1
- package/dist/components/ui/TextField.js +3 -2
- package/dist/components/ui/ThemeScope.d.ts +13 -0
- package/dist/components/ui/ThemeScope.js +10 -0
- package/dist/components/ui/ThemeToggle.d.ts +3 -0
- package/dist/components/ui/ThemeToggle.js +4 -3
- package/dist/components/ui/TiltCard.js +3 -2
- package/dist/components/ui/Timeline.js +2 -2
- package/dist/components/ui/ToastProvider.d.ts +5 -2
- package/dist/components/ui/ToastProvider.js +5 -5
- package/dist/components/ui/Tooltip.d.ts +4 -4
- package/dist/components/ui/Tooltip.js +70 -10
- package/dist/data-display.css +5 -0
- package/dist/effects.css +6 -0
- package/dist/feedback.css +5 -0
- package/dist/fonts-latin.css +10 -4
- package/dist/fonts.css +8 -0
- package/dist/forms.css +5 -0
- package/dist/hooks/useComboboxAnchor.d.ts +17 -0
- package/dist/hooks/useComboboxAnchor.js +61 -0
- package/dist/hooks/useDismiss.d.ts +12 -3
- package/dist/hooks/useDismiss.js +5 -21
- package/dist/hooks/useFloatingPanel.d.ts +14 -0
- package/dist/hooks/useFloatingPanel.js +157 -0
- package/dist/hooks/useLayerDismiss.d.ts +4 -0
- package/dist/hooks/useLayerDismiss.js +48 -0
- package/dist/hooks/useMobileMenu.d.ts +0 -1
- package/dist/hooks/useMobileMenu.js +11 -16
- package/dist/hooks/usePanelFocus.d.ts +10 -0
- package/dist/hooks/usePanelFocus.js +60 -0
- package/dist/hooks/useTheme.d.ts +1 -0
- package/dist/hooks/useTheme.js +18 -5
- package/dist/index.d.ts +7 -0
- package/dist/index.js +3 -0
- package/dist/kit/data-display.css +6 -0
- package/dist/kit/forms.css +45 -2
- package/dist/kit/navigation.css +4 -0
- package/dist/kit/overlays.css +8 -4
- package/dist/lib/classNames.d.ts +2 -0
- package/dist/lib/classNames.js +16 -1
- package/dist/lib/componentClasses.d.ts +1 -0
- package/dist/lib/componentClasses.js +2 -0
- package/dist/lib/keyboard.d.ts +1 -1
- package/dist/lib/keyboard.js +5 -2
- package/dist/lib/layers.d.ts +18 -0
- package/dist/lib/layers.js +128 -0
- package/dist/lib/themeScope.d.ts +5 -0
- package/dist/lib/themeScope.js +3 -0
- package/dist/minimal-reset.css +6 -0
- package/dist/navigation.css +5 -0
- package/dist/overlays.css +5 -0
- package/dist/scoped/base.css +183 -0
- package/dist/scoped/kit/actions.css +209 -0
- package/dist/scoped/kit/data-display.css +498 -0
- package/dist/scoped/kit/effects.css +140 -0
- package/dist/scoped/kit/feedback.css +309 -0
- package/dist/scoped/kit/forms.css +404 -0
- package/dist/scoped/kit/navigation.css +266 -0
- package/dist/scoped/kit/overlays.css +299 -0
- package/dist/scoped/marquee.css +58 -0
- package/dist/scoped/spinner.css +20 -0
- package/dist/scoped/theme-toggle.css +38 -0
- package/dist/scoped/tokens.css +119 -0
- package/dist/scoped/ui.css +127 -0
- package/dist/scoped/utilities.css +17 -0
- package/dist/scoped-tokens.css +1 -0
- package/dist/scoped.css +12 -0
- package/dist/theme-toggle.css +2 -2
- package/dist/tokens.json +710 -0
- package/examples/optional/LazyScene.tsx +78 -0
- package/examples/optional/OptionalSmoothScroll.tsx +25 -0
- package/examples/optional/SmoothScrollOwner.tsx +7 -0
- package/examples/optional/optional.css +25 -0
- package/examples/recipes/AsyncProjectPicker.tsx +82 -0
- package/examples/recipes/DeleteProjectConfirmation.tsx +97 -0
- package/examples/recipes/InputCompositions.tsx +49 -0
- package/examples/recipes/RemoteRecordsTable.tsx +256 -0
- package/examples/recipes/useRemoteResource.ts +81 -0
- package/examples/reproduction/README.md +9 -0
- package/examples/reproduction/index.html +14 -0
- package/examples/reproduction/package.json +27 -0
- package/examples/reproduction/src/main.tsx +33 -0
- package/examples/reproduction/src/style.css +19 -0
- package/examples/reproduction/tsconfig.json +18 -0
- package/examples/reproduction/vite.config.ts +19 -0
- package/examples/starters/next/README.md +18 -0
- package/examples/starters/next/app/Demo.tsx +65 -0
- package/examples/starters/next/app/layout.tsx +25 -0
- package/examples/starters/next/app/next-page/page.tsx +9 -0
- package/examples/starters/next/app/page.tsx +11 -0
- package/examples/starters/next/app/style.css +19 -0
- package/examples/starters/next/next-env.d.ts +2 -0
- package/examples/starters/next/next.config.mjs +1 -0
- package/examples/starters/next/package.json +27 -0
- package/examples/starters/next/proxy.ts +16 -0
- package/examples/starters/next/tsconfig.json +30 -0
- package/examples/starters/vite/README.md +16 -0
- package/examples/starters/vite/index.html +14 -0
- package/examples/starters/vite/package.json +27 -0
- package/examples/starters/vite/src/main.tsx +81 -0
- package/examples/starters/vite/src/style.css +19 -0
- package/examples/starters/vite/tsconfig.json +18 -0
- package/examples/starters/vite/vite.config.ts +19 -0
- package/package.json +41 -5
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { defineConfig } from "vite";
|
|
3
|
+
import { themeBootstrapScript } from "@abuzareal/contour-ui/theme-bootstrap";
|
|
4
|
+
const hash = createHash("sha256").update(themeBootstrapScript).digest("base64");
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
plugins: [
|
|
7
|
+
{
|
|
8
|
+
name: "contour-theme-bootstrap",
|
|
9
|
+
transformIndexHtml(html) {
|
|
10
|
+
// Hash the exact bytes inserted here; no inline handler or unsafe-eval allowance.
|
|
11
|
+
const policy = `default-src 'self'; script-src 'self' 'sha256-${hash}'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src 'self' data:; connect-src 'self'; object-src 'none'; base-uri 'none'`;
|
|
12
|
+
return html.replace(
|
|
13
|
+
"<!-- theme-bootstrap -->",
|
|
14
|
+
`<meta http-equiv="Content-Security-Policy" content="${policy}"><script>${themeBootstrapScript}</script>`,
|
|
15
|
+
);
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abuzareal/contour-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Editorial React components, themes, restrained motion, and optional Three.js objects.",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,19 @@
|
|
|
18
18
|
"PUBLIC-API.md",
|
|
19
19
|
"COMPOSITION.md",
|
|
20
20
|
"FORMS.md",
|
|
21
|
-
"examples/forms"
|
|
21
|
+
"examples/forms",
|
|
22
|
+
"OVERLAYS.md",
|
|
23
|
+
"STYLING.md",
|
|
24
|
+
"SIZE.md",
|
|
25
|
+
"FOUNDATION.md",
|
|
26
|
+
"COMBOBOX.md",
|
|
27
|
+
"RECIPES.md",
|
|
28
|
+
"GETTING-STARTED.md",
|
|
29
|
+
"DOCS.md",
|
|
30
|
+
"examples/recipes",
|
|
31
|
+
"examples/starters",
|
|
32
|
+
"examples/reproduction",
|
|
33
|
+
"examples/optional"
|
|
22
34
|
],
|
|
23
35
|
"sideEffects": [
|
|
24
36
|
"**/*.css"
|
|
@@ -48,7 +60,18 @@
|
|
|
48
60
|
"./reset.css": "./dist/reset.css",
|
|
49
61
|
"./tokens.css": "./dist/tokens.css",
|
|
50
62
|
"./fonts.css": "./dist/fonts.css",
|
|
51
|
-
"./fonts-latin.css": "./dist/fonts-latin.css"
|
|
63
|
+
"./fonts-latin.css": "./dist/fonts-latin.css",
|
|
64
|
+
"./scoped.css": "./dist/scoped.css",
|
|
65
|
+
"./scoped-tokens.css": "./dist/scoped-tokens.css",
|
|
66
|
+
"./minimal-reset.css": "./dist/minimal-reset.css",
|
|
67
|
+
"./tokens.json": "./dist/tokens.json",
|
|
68
|
+
"./actions.css": "./dist/actions.css",
|
|
69
|
+
"./forms.css": "./dist/forms.css",
|
|
70
|
+
"./navigation.css": "./dist/navigation.css",
|
|
71
|
+
"./data-display.css": "./dist/data-display.css",
|
|
72
|
+
"./feedback.css": "./dist/feedback.css",
|
|
73
|
+
"./overlays.css": "./dist/overlays.css",
|
|
74
|
+
"./effects.css": "./dist/effects.css"
|
|
52
75
|
},
|
|
53
76
|
"scripts": {
|
|
54
77
|
"build": "node scripts/build.mjs",
|
|
@@ -57,16 +80,26 @@
|
|
|
57
80
|
"test": "node --test tests/*.test.mjs",
|
|
58
81
|
"test:browser": "node --test tests/*.browser.mjs",
|
|
59
82
|
"check:package": "node scripts/check-package.mjs",
|
|
60
|
-
"validate": "npm run typecheck && npm run lint && npm run build && npm test && npm run test:browser && npm run check:package",
|
|
83
|
+
"validate": "npm run check:styles && npm run typecheck && npm run lint && npm run build && npm run check:docs && npm test && npm run test:browser && npm run check:package",
|
|
61
84
|
"prepublishOnly": "node scripts/verify-release.mjs",
|
|
62
85
|
"test:consumer": "node scripts/test-consumer.mjs",
|
|
63
86
|
"test:compat": "node scripts/test-compat.mjs",
|
|
64
87
|
"test:optional": "node scripts/test-optional-consumer.mjs",
|
|
65
88
|
"test:next": "npm run build && node scripts/test-next.mjs",
|
|
66
89
|
"verify:release": "node scripts/verify-release.mjs",
|
|
67
|
-
"test:form-recipes": "node scripts/test-form-recipes.mjs"
|
|
90
|
+
"test:form-recipes": "node scripts/test-form-recipes.mjs",
|
|
91
|
+
"build:styles": "node scripts/build-styles.mjs",
|
|
92
|
+
"measure:size": "node scripts/measure-size.mjs",
|
|
93
|
+
"check:size": "node scripts/measure-size.mjs --check",
|
|
94
|
+
"check:api-docs": "node scripts/check-api-docs.mjs",
|
|
95
|
+
"check:styles": "node scripts/build-styles.mjs --check",
|
|
96
|
+
"test:adoption-recipes": "node scripts/test-adoption-recipes.mjs",
|
|
97
|
+
"test:starters": "node scripts/test-starters.mjs",
|
|
98
|
+
"check:docs": "node scripts/check-docs.mjs"
|
|
68
99
|
},
|
|
69
100
|
"dependencies": {
|
|
101
|
+
"@base-ui/react": "1.9.0",
|
|
102
|
+
"@floating-ui/dom": "1.8.0",
|
|
70
103
|
"@fontsource-variable/dm-sans": "^5.3.0",
|
|
71
104
|
"@fontsource-variable/space-grotesk": "^5.3.0",
|
|
72
105
|
"@fontsource/dm-mono": "^5.3.0",
|
|
@@ -88,6 +121,8 @@
|
|
|
88
121
|
},
|
|
89
122
|
"devDependencies": {
|
|
90
123
|
"@playwright/test": "1.63.0",
|
|
124
|
+
"@tanstack/react-store": "0.11.2",
|
|
125
|
+
"@tanstack/react-table": "9.3.1",
|
|
91
126
|
"@testing-library/react": "^16.3.3",
|
|
92
127
|
"@types/react": "^18.3.5",
|
|
93
128
|
"@types/react-dom": "^18.3.0",
|
|
@@ -95,6 +130,7 @@
|
|
|
95
130
|
"jsdom": "^30.1.2",
|
|
96
131
|
"lenis": "^1.3.26",
|
|
97
132
|
"oxlint": "^1.81.0",
|
|
133
|
+
"postcss": "8.5.29",
|
|
98
134
|
"react": "18.3.1",
|
|
99
135
|
"react-dom": "18.3.1",
|
|
100
136
|
"three": "^0.186.1",
|