diff --git a/.gitignore b/.gitignore index 0cf35acfd8..d6ba78d043 100644 --- a/.gitignore +++ b/.gitignore @@ -144,3 +144,5 @@ lodashReplacer.js muiReplacer.js ajvReplacer.js +# Need this due to shadcn default utils folder is lib +!packages/shadcn/src/lib diff --git a/package-lock.json b/package-lock.json index 45c01cf1ce..a63373df0e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,8 @@ "packages/semantic-ui", "packages/utils", "packages/validator-ajv8", - "packages/snapshot-tests" + "packages/snapshot-tests", + "packages/shadcn" ], "devDependencies": { "@babel/eslint-parser": "^7.23.10", @@ -214,6 +215,19 @@ "@algolia/requester-common": "4.22.1" } }, + "node_modules/@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@ampproject/remapping": { "version": "2.2.1", "license": "Apache-2.0", @@ -3831,6 +3845,19 @@ "@floating-ui/utils": "^0.2.1" } }, + "node_modules/@floating-ui/react-dom": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.2.tgz", + "integrity": "sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A==", + "license": "MIT", + "dependencies": { + "@floating-ui/dom": "^1.0.0" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, "node_modules/@floating-ui/utils": { "version": "0.2.1", "license": "MIT" @@ -7768,202 +7795,1032 @@ "url": "https://opencollective.com/popperjs" } }, - "node_modules/@rc-component/color-picker": { - "version": "1.5.1", - "dev": true, + "node_modules/@radix-ui/number": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.1.0.tgz", + "integrity": "sha512-V3gRzhVNU1ldS5XhAPTom1fOIo4ccrjjJgmE+LI2h/WaFpHmx0MQApT+KZHnx8abG6Avtfcz4WoEciMnpFT3HQ==", + "license": "MIT" + }, + "node_modules/@radix-ui/primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.1.tgz", + "integrity": "sha512-SJ31y+Q/zAyShtXJc8x83i9TYdbAfHZ++tUZnvjJJqFjzsdUnKsxPL6IEtBlxKkU7yzer//GQtZSV4GbldL3YA==", + "license": "MIT" + }, + "node_modules/@radix-ui/react-arrow": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.2.tgz", + "integrity": "sha512-G+KcpzXHq24iH0uGG/pF8LyzpFJYGD4RfLjCIBfGdSLXvjLHST31RUiRVrupIBMvIppMgSzQ6l66iAxl03tdlg==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.23.6", - "@ctrl/tinycolor": "^3.6.1", - "classnames": "^2.2.6", - "rc-util": "^5.38.1" + "@radix-ui/react-primitive": "2.0.2" }, "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } } }, - "node_modules/@rc-component/context": { - "version": "1.4.0", - "dev": true, + "node_modules/@radix-ui/react-checkbox": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.1.4.tgz", + "integrity": "sha512-wP0CPAHq+P5I4INKe3hJrIa1WoNqqrejzW+zoU0rOvo1b9gDEJJFl2rYfO1PYJUQCc2H1WZxIJmyv9BS8i5fLw==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.10.1", - "rc-util": "^5.27.0" + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-presence": "1.1.2", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-use-controllable-state": "1.1.0", + "@radix-ui/react-use-previous": "1.1.0", + "@radix-ui/react-use-size": "1.1.0" }, "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/@rc-component/mini-decimal": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.18.0" + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, - "engines": { - "node": ">=8.x" + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } } }, - "node_modules/@rc-component/mutate-observer": { - "version": "1.1.0", - "dev": true, + "node_modules/@radix-ui/react-collection": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.2.tgz", + "integrity": "sha512-9z54IEKRxIa9VityapoEYMuByaG42iSy1ZXlY2KcuLSEtq8x4987/N6m15ppoMffgZX72gER2uHe1D9Y6Unlcw==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.18.0", - "classnames": "^2.3.2", - "rc-util": "^5.24.4" - }, - "engines": { - "node": ">=8.x" + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-slot": "1.1.2" }, "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } } }, - "node_modules/@rc-component/portal": { - "version": "1.1.2", + "node_modules/@radix-ui/react-compose-refs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.1.tgz", + "integrity": "sha512-Y9VzoRDSJtgFMUCoiZBDVo084VQ5hfpXxVE+NgkdNsjiDBByiImMZKKhxMwCbdHvhlENG6a833CbFkOQvTricw==", "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.18.0", - "classnames": "^2.3.2", - "rc-util": "^5.24.4" - }, - "engines": { - "node": ">=8.x" - }, "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } } }, - "node_modules/@rc-component/tour": { - "version": "1.12.3", - "dev": true, + "node_modules/@radix-ui/react-context": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.1.tgz", + "integrity": "sha512-UASk9zi+crv9WteK/NU4PLvOoL3OuE6BWVKNF6hPRBtYBDXQ2u5iu3O59zUlJiTVvkyuycnqrztsHVJwcK9K+Q==", "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.18.0", - "@rc-component/portal": "^1.0.0-9", - "@rc-component/trigger": "^1.3.6", - "classnames": "^2.3.2", - "rc-util": "^5.24.4" + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, - "engines": { - "node": ">=8.x" + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.6.tgz", + "integrity": "sha512-/IVhJV5AceX620DUJ4uYVMymzsipdKBzo3edo+omeskCKGm9FRHM0ebIdbPnlQVJqyuHbuBltQUOG2mOTq2IYw==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-dismissable-layer": "1.1.5", + "@radix-ui/react-focus-guards": "1.1.1", + "@radix-ui/react-focus-scope": "1.1.2", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-portal": "1.1.4", + "@radix-ui/react-presence": "1.1.2", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-slot": "1.1.2", + "@radix-ui/react-use-controllable-state": "1.1.0", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.6.3" }, "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } } }, - "node_modules/@rc-component/trigger": { - "version": "1.18.3", - "dev": true, + "node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.6.3.tgz", + "integrity": "sha512-pnAi91oOk8g8ABQKGF5/M9qxmmOPxaAnopyTHYfqYEwJhyFrbbBtHuSgtKEoH0jpcxx5o3hXqH1mNd9/Oi+8iQ==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.23.2", - "@rc-component/portal": "^1.1.0", - "classnames": "^2.3.2", - "rc-motion": "^2.0.0", - "rc-resize-observer": "^1.3.1", - "rc-util": "^5.38.0" + "react-remove-scroll-bar": "^2.3.7", + "react-style-singleton": "^2.2.3", + "tslib": "^2.1.0", + "use-callback-ref": "^1.3.3", + "use-sidecar": "^1.1.3" }, "engines": { - "node": ">=8.x" + "node": ">=10" }, "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } } }, - "node_modules/@reach/alert": { - "version": "0.13.2", + "node_modules/@radix-ui/react-direction": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.0.tgz", + "integrity": "sha512-BUuBvgThEiAXh2DWu93XsT+a3aWrGqolGlqqw5VU1kG7p/ZH2cuDlM1sRLNnY3QcBS69UIz2mcKhMxDsdewhjg==", "license": "MIT", - "dependencies": { - "@reach/utils": "0.13.2", - "@reach/visually-hidden": "0.13.2", - "prop-types": "^15.7.2", - "tslib": "^2.1.0" - }, "peerDependencies": { - "react": "^16.8.0 || 17.x", - "react-dom": "^16.8.0 || 17.x" + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } } }, - "node_modules/@reach/utils": { - "version": "0.13.2", + "node_modules/@radix-ui/react-dismissable-layer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.5.tgz", + "integrity": "sha512-E4TywXY6UsXNRhFrECa5HAvE5/4BFcGyfTyK36gP+pAW1ed7UTK4vKwdr53gAJYwqbfCWC6ATvJa3J3R/9+Qrg==", "license": "MIT", "dependencies": { - "@types/warning": "^3.0.0", - "tslib": "^2.1.0", - "warning": "^4.0.3" + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-escape-keydown": "1.1.0" }, "peerDependencies": { - "react": "^16.8.0 || 17.x", - "react-dom": "^16.8.0 || 17.x" + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } } }, - "node_modules/@reach/visually-hidden": { - "version": "0.13.2", + "node_modules/@radix-ui/react-focus-guards": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.1.tgz", + "integrity": "sha512-pSIwfrT1a6sIoDASCSpFwOasEwKTZWDw/iBdtnqKO7v6FeOzYJ7U53cPzYFVR3geGGXgVHaH+CdngrrAzqUGxg==", "license": "MIT", - "dependencies": { - "prop-types": "^15.7.2", - "tslib": "^2.1.0" - }, "peerDependencies": { - "react": "^16.8.0 || 17.x", - "react-dom": "^16.8.0 || 17.x" + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } } }, - "node_modules/@react-aria/ssr": { - "version": "3.9.5", - "license": "Apache-2.0", + "node_modules/@radix-ui/react-focus-scope": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.2.tgz", + "integrity": "sha512-zxwE80FCU7lcXUGWkdt6XpTTCKPitG1XKOwViTxHVKIJhZl9MvIl2dVHeZENCWD9+EdWv05wlaEkRXUykU27RA==", + "license": "MIT", "dependencies": { - "@swc/helpers": "^0.5.0" - }, - "engines": { - "node": ">= 12" + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-use-callback-ref": "1.1.0" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } } }, - "node_modules/@react-icons/all-files": { - "version": "4.1.0", + "node_modules/@radix-ui/react-icons": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-icons/-/react-icons-1.3.2.tgz", + "integrity": "sha512-fyQIhGDhzfc9pK2kH6Pl9c4BDJGfMkPqkyIgYDthyNYoNg3wVhoJMMh19WS4Up/1KMPFVpNsT2q3WmXn2N1m6g==", "license": "MIT", "peerDependencies": { - "react": "*" + "react": "^16.x || ^17.x || ^18.x || ^19.0.0 || ^19.0.0-rc" } }, - "node_modules/@restart/hooks": { - "version": "0.4.15", + "node_modules/@radix-ui/react-id": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.0.tgz", + "integrity": "sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==", "license": "MIT", "dependencies": { - "dequal": "^2.0.3" + "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { - "react": ">=16.8.0" + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } } }, - "node_modules/@restart/ui": { - "version": "1.8.0", + "node_modules/@radix-ui/react-label": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-label/-/react-label-2.1.2.tgz", + "integrity": "sha512-zo1uGMTaNlHehDyFQcDZXRJhUPDuukcnHz0/jnrup0JA6qL+AFpAnty+7VKa9esuU5xTblAZzTGYJKSKaBxBhw==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.21.0", - "@popperjs/core": "^2.11.6", - "@react-aria/ssr": "^3.5.0", - "@restart/hooks": "^0.4.9", - "@types/warning": "^3.0.0", - "dequal": "^2.0.3", - "dom-helpers": "^5.2.0", - "uncontrollable": "^8.0.1", - "warning": "^4.0.3" + "@radix-ui/react-primitive": "2.0.2" }, "peerDependencies": { - "react": ">=16.14.0", + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-popover": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.6.tgz", + "integrity": "sha512-NQouW0x4/GnkFJ/pRqsIS3rM/k97VzKnVb2jB7Gq7VEGPy5g7uNV1ykySFt7eWSp3i2uSGFwaJcvIRJBAHmmFg==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-dismissable-layer": "1.1.5", + "@radix-ui/react-focus-guards": "1.1.1", + "@radix-ui/react-focus-scope": "1.1.2", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-popper": "1.2.2", + "@radix-ui/react-portal": "1.1.4", + "@radix-ui/react-presence": "1.1.2", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-slot": "1.1.2", + "@radix-ui/react-use-controllable-state": "1.1.0", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.6.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.6.3.tgz", + "integrity": "sha512-pnAi91oOk8g8ABQKGF5/M9qxmmOPxaAnopyTHYfqYEwJhyFrbbBtHuSgtKEoH0jpcxx5o3hXqH1mNd9/Oi+8iQ==", + "license": "MIT", + "dependencies": { + "react-remove-scroll-bar": "^2.3.7", + "react-style-singleton": "^2.2.3", + "tslib": "^2.1.0", + "use-callback-ref": "^1.3.3", + "use-sidecar": "^1.1.3" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-popper": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.2.tgz", + "integrity": "sha512-Rvqc3nOpwseCyj/rgjlJDYAgyfw7OC1tTkKn2ivhaMGcYt8FSBlahHOZak2i3QwkRXUXgGgzeEe2RuqeEHuHgA==", + "license": "MIT", + "dependencies": { + "@floating-ui/react-dom": "^2.0.0", + "@radix-ui/react-arrow": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0", + "@radix-ui/react-use-rect": "1.1.0", + "@radix-ui/react-use-size": "1.1.0", + "@radix-ui/rect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-portal": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.4.tgz", + "integrity": "sha512-sn2O9k1rPFYVyKd5LAJfo96JlSGVFpa1fS6UuBJfrZadudiw5tAmru+n1x7aMRQ84qDM71Zh1+SzK5QwU0tJfA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-use-layout-effect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-presence": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.2.tgz", + "integrity": "sha512-18TFr80t5EVgL9x1SwF/YGtfG+l0BS0PRAlCWBDoBEiDQjeKgnNZRVJp/oVBl24sr3Gbfwc/Qpj4OcWTQMsAEg==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-use-layout-effect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-primitive": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz", + "integrity": "sha512-Ec/0d38EIuvDF+GZjcMU/Ze6MxntVJYO/fRlCPhCaVUyPY9WTalHJw54tp9sXeJo3tlShWpy41vQRgLRGOuz+w==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-slot": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-radio-group": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-radio-group/-/react-radio-group-1.2.3.tgz", + "integrity": "sha512-xtCsqt8Rp09FK50ItqEqTJ7Sxanz8EM8dnkVIhJrc/wkMMomSmXHvYbhv3E7Zx4oXh98aaLt9W679SUYXg4IDA==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-presence": "1.1.2", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-roving-focus": "1.1.2", + "@radix-ui/react-use-controllable-state": "1.1.0", + "@radix-ui/react-use-previous": "1.1.0", + "@radix-ui/react-use-size": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-roving-focus": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.2.tgz", + "integrity": "sha512-zgMQWkNO169GtGqRvYrzb0Zf8NhMHS2DuEB/TiEmVnpr5OqPU3i8lfbxaAmC2J/KYuIQxyoQQ6DxepyXp61/xw==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-collection": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-select": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.1.6.tgz", + "integrity": "sha512-T6ajELxRvTuAMWH0YmRJ1qez+x4/7Nq7QIx7zJ0VK3qaEWdnWpNbEDnmWldG1zBDwqrLy5aLMUWcoGirVj5kMg==", + "license": "MIT", + "dependencies": { + "@radix-ui/number": "1.1.0", + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-collection": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-dismissable-layer": "1.1.5", + "@radix-ui/react-focus-guards": "1.1.1", + "@radix-ui/react-focus-scope": "1.1.2", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-popper": "1.2.2", + "@radix-ui/react-portal": "1.1.4", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-slot": "1.1.2", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0", + "@radix-ui/react-use-previous": "1.1.0", + "@radix-ui/react-visually-hidden": "1.1.2", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.6.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-select/node_modules/react-remove-scroll": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.6.3.tgz", + "integrity": "sha512-pnAi91oOk8g8ABQKGF5/M9qxmmOPxaAnopyTHYfqYEwJhyFrbbBtHuSgtKEoH0jpcxx5o3hXqH1mNd9/Oi+8iQ==", + "license": "MIT", + "dependencies": { + "react-remove-scroll-bar": "^2.3.7", + "react-style-singleton": "^2.2.3", + "tslib": "^2.1.0", + "use-callback-ref": "^1.3.3", + "use-sidecar": "^1.1.3" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-separator": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.2.tgz", + "integrity": "sha512-oZfHcaAp2Y6KFBX6I5P1u7CQoy4lheCGiYj+pGFrHy8E/VNRb5E39TkTr3JrV520csPBTZjkuKFdEsjS5EUNKQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-primitive": "2.0.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-slider": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slider/-/react-slider-1.2.3.tgz", + "integrity": "sha512-nNrLAWLjGESnhqBqcCNW4w2nn7LxudyMzeB6VgdyAnFLC6kfQgnAjSL2v6UkQTnDctJBlxrmxfplWS4iYjdUTw==", + "license": "MIT", + "dependencies": { + "@radix-ui/number": "1.1.0", + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-collection": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-use-controllable-state": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0", + "@radix-ui/react-use-previous": "1.1.0", + "@radix-ui/react-use-size": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-slot": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz", + "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-callback-ref": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz", + "integrity": "sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-controllable-state": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.1.0.tgz", + "integrity": "sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-callback-ref": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-escape-keydown": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.0.tgz", + "integrity": "sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-callback-ref": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-layout-effect": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz", + "integrity": "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-previous": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.0.tgz", + "integrity": "sha512-Z/e78qg2YFnnXcW88A4JmTtm4ADckLno6F7OXotmkQfeuCVaKuYzqAATPhVzl3delXE7CxIV8shofPn3jPc5Og==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-rect": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.0.tgz", + "integrity": "sha512-0Fmkebhr6PiseyZlYAOtLS+nb7jLmpqTrJyv61Pe68MKYW6OWdRE2kI70TaYY27u7H0lajqM3hSMMLFq18Z7nQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/rect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-size": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz", + "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-visually-hidden": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.1.2.tgz", + "integrity": "sha512-1SzA4ns2M1aRlvxErqhLHsBHoS5eI5UUcI2awAMgGUp4LoaoWOKYmvqDY2s/tltuPkh3Yk77YF/r3IRj+Amx4Q==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-primitive": "2.0.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/rect": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.0.tgz", + "integrity": "sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg==", + "license": "MIT" + }, + "node_modules/@rc-component/color-picker": { + "version": "1.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.6", + "@ctrl/tinycolor": "^3.6.1", + "classnames": "^2.2.6", + "rc-util": "^5.38.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/context": { + "version": "1.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.1", + "rc-util": "^5.27.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/mini-decimal": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.0" + }, + "engines": { + "node": ">=8.x" + } + }, + "node_modules/@rc-component/mutate-observer": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.0", + "classnames": "^2.3.2", + "rc-util": "^5.24.4" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/portal": { + "version": "1.1.2", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.0", + "classnames": "^2.3.2", + "rc-util": "^5.24.4" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/tour": { + "version": "1.12.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.0", + "@rc-component/portal": "^1.0.0-9", + "@rc-component/trigger": "^1.3.6", + "classnames": "^2.3.2", + "rc-util": "^5.24.4" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/trigger": { + "version": "1.18.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@rc-component/portal": "^1.1.0", + "classnames": "^2.3.2", + "rc-motion": "^2.0.0", + "rc-resize-observer": "^1.3.1", + "rc-util": "^5.38.0" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@reach/alert": { + "version": "0.13.2", + "license": "MIT", + "dependencies": { + "@reach/utils": "0.13.2", + "@reach/visually-hidden": "0.13.2", + "prop-types": "^15.7.2", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "react": "^16.8.0 || 17.x", + "react-dom": "^16.8.0 || 17.x" + } + }, + "node_modules/@reach/utils": { + "version": "0.13.2", + "license": "MIT", + "dependencies": { + "@types/warning": "^3.0.0", + "tslib": "^2.1.0", + "warning": "^4.0.3" + }, + "peerDependencies": { + "react": "^16.8.0 || 17.x", + "react-dom": "^16.8.0 || 17.x" + } + }, + "node_modules/@reach/visually-hidden": { + "version": "0.13.2", + "license": "MIT", + "dependencies": { + "prop-types": "^15.7.2", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "react": "^16.8.0 || 17.x", + "react-dom": "^16.8.0 || 17.x" + } + }, + "node_modules/@react-aria/ssr": { + "version": "3.9.5", + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0" + }, + "engines": { + "node": ">= 12" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/@react-icons/all-files": { + "version": "4.1.0", + "license": "MIT", + "peerDependencies": { + "react": "*" + } + }, + "node_modules/@restart/hooks": { + "version": "0.4.15", + "license": "MIT", + "dependencies": { + "dequal": "^2.0.3" + }, + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@restart/ui": { + "version": "1.8.0", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.21.0", + "@popperjs/core": "^2.11.6", + "@react-aria/ssr": "^3.5.0", + "@restart/hooks": "^0.4.9", + "@types/warning": "^3.0.0", + "dequal": "^2.0.3", + "dom-helpers": "^5.2.0", + "uncontrollable": "^8.0.1", + "warning": "^4.0.3" + }, + "peerDependencies": { + "react": ">=16.14.0", "react-dom": ">=16.14.0" } }, @@ -8010,6 +8867,10 @@ "resolved": "packages/semantic-ui", "link": true }, + "node_modules/@rjsf/shadcn": { + "resolved": "packages/shadcn", + "link": true + }, "node_modules/@rjsf/snapshot-tests": { "resolved": "packages/snapshot-tests", "link": true @@ -8063,6 +8924,272 @@ } } }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.36.0.tgz", + "integrity": "sha512-jgrXjjcEwN6XpZXL0HUeOVGfjXhPyxAbbhD0BlXUB+abTOpbPiN5Wb3kOT7yb+uEtATNYF5x5gIfwutmuBA26w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.36.0.tgz", + "integrity": "sha512-NyfuLvdPdNUfUNeYKUwPwKsE5SXa2J6bCt2LdB/N+AxShnkpiczi3tcLJrm5mA+eqpy0HmaIY9F6XCa32N5yzg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.36.0.tgz", + "integrity": "sha512-JQ1Jk5G4bGrD4pWJQzWsD8I1n1mgPXq33+/vP4sk8j/z/C2siRuxZtaUA7yMTf71TCZTZl/4e1bfzwUmFb3+rw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.36.0.tgz", + "integrity": "sha512-6c6wMZa1lrtiRsbDziCmjE53YbTkxMYhhnWnSW8R/yqsM7a6mSJ3uAVT0t8Y/DGt7gxUWYuFM4bwWk9XCJrFKA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.36.0.tgz", + "integrity": "sha512-KXVsijKeJXOl8QzXTsA+sHVDsFOmMCdBRgFmBb+mfEb/7geR7+C8ypAml4fquUt14ZyVXaw2o1FWhqAfOvA4sg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.36.0.tgz", + "integrity": "sha512-dVeWq1ebbvByI+ndz4IJcD4a09RJgRYmLccwlQ8bPd4olz3Y213uf1iwvc7ZaxNn2ab7bjc08PrtBgMu6nb4pQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.36.0.tgz", + "integrity": "sha512-bvXVU42mOVcF4le6XSjscdXjqx8okv4n5vmwgzcmtvFdifQ5U4dXFYaCB87namDRKlUL9ybVtLQ9ztnawaSzvg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.36.0.tgz", + "integrity": "sha512-JFIQrDJYrxOnyDQGYkqnNBtjDwTgbasdbUiQvcU8JmGDfValfH1lNpng+4FWlhaVIR4KPkeddYjsVVbmJYvDcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.36.0.tgz", + "integrity": "sha512-KqjYVh3oM1bj//5X7k79PSCZ6CvaVzb7Qs7VMWS+SlWB5M8p3FqufLP9VNp4CazJ0CsPDLwVD9r3vX7Ci4J56A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.36.0.tgz", + "integrity": "sha512-QiGnhScND+mAAtfHqeT+cB1S9yFnNQ/EwCg5yE3MzoaZZnIV0RV9O5alJAoJKX/sBONVKeZdMfO8QSaWEygMhw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.36.0.tgz", + "integrity": "sha512-1ZPyEDWF8phd4FQtTzMh8FQwqzvIjLsl6/84gzUxnMNFBtExBtpL51H67mV9xipuxl1AEAerRBgBwFNpkw8+Lg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.36.0.tgz", + "integrity": "sha512-VMPMEIUpPFKpPI9GZMhJrtu8rxnp6mJR3ZzQPykq4xc2GmdHj3Q4cA+7avMyegXy4n1v+Qynr9fR88BmyO74tg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.36.0.tgz", + "integrity": "sha512-ttE6ayb/kHwNRJGYLpuAvB7SMtOeQnVXEIpMtAvx3kepFQeowVED0n1K9nAdraHUPJ5hydEMxBpIR7o4nrm8uA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.36.0.tgz", + "integrity": "sha512-4a5gf2jpS0AIe7uBjxDeUMNcFmaRTbNv7NxI5xOCs4lhzsVyGR/0qBXduPnoWf6dGC365saTiwag8hP1imTgag==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.36.0.tgz", + "integrity": "sha512-5KtoW8UWmwFKQ96aQL3LlRXX16IMwyzMq/jSSVIIyAANiE1doaQsx/KRyhAvpHlPjPiSU/AYX/8m+lQ9VToxFQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.36.0.tgz", + "integrity": "sha512-sycrYZPrv2ag4OCvaN5js+f01eoZ2U+RmT5as8vhxiFz+kxwlHrsxOwKPSA8WyS+Wc6Epid9QeI/IkQ9NkgYyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.36.0.tgz", + "integrity": "sha512-qbqt4N7tokFwwSVlWDsjfoHgviS3n/vZ8LK0h1uLG9TYIRuUTJC88E1xb3LM2iqZ/WTqNQjYrtmtGmrmmawB6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.36.0.tgz", + "integrity": "sha512-t+RY0JuRamIocMuQcfwYSOkmdX9dtkr1PbhKW42AMvaDQa+jOdpUYysroTF/nuPpAaQMWp7ye+ndlmmthieJrQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.36.0.tgz", + "integrity": "sha512-aRXd7tRZkWLqGbChgcMMDEHjOKudo1kChb1Jt1IfR8cY/KIpgNviLeJy5FUb9IpSuQj8dU2fAYNMPW/hLKOSTw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@semantic-ui-react/event-stack": { "version": "3.1.3", "license": "MIT", @@ -8849,7 +9976,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.5", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "license": "MIT" }, "node_modules/@types/express": { @@ -10024,6 +11153,13 @@ "react-dom": ">=16.9.0" } }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, "node_modules/anymatch": { "version": "3.1.3", "license": "ISC", @@ -10074,7 +11210,9 @@ "license": "Python-2.0" }, "node_modules/aria-hidden": { - "version": "1.2.3", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.4.tgz", + "integrity": "sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==", "license": "MIT", "dependencies": { "tslib": "^2.0.0" @@ -11485,6 +12623,27 @@ "dev": true, "license": "MIT" }, + "node_modules/class-variance-authority": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.1.tgz", + "integrity": "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==", + "license": "Apache-2.0", + "dependencies": { + "clsx": "^2.1.1" + }, + "funding": { + "url": "https://polar.sh/cva" + } + }, + "node_modules/class-variance-authority/node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/classnames": { "version": "2.5.1", "license": "MIT" @@ -11704,6 +12863,22 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/cmdk": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cmdk/-/cmdk-1.1.1.tgz", + "integrity": "sha512-Vsv7kFaXm+ptHDMZ7izaRsP70GgrW9NBNGswt9OZaVBLlE0SNpDq8eu/VGXyF9r7M0azK3Wy7OlYXsuyYLFzHg==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "^1.1.1", + "@radix-ui/react-dialog": "^1.1.6", + "@radix-ui/react-id": "^1.1.0", + "@radix-ui/react-primitive": "^2.0.2" + }, + "peerDependencies": { + "react": "^18 || ^19 || ^19.0.0-rc", + "react-dom": "^18 || ^19 || ^19.0.0-rc" + } + }, "node_modules/co": { "version": "4.6.0", "dev": true, @@ -13198,6 +14373,13 @@ "version": "2.0.0", "license": "MIT" }, + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/diff": { "version": "5.0.0", "dev": true, @@ -13224,6 +14406,13 @@ "node": ">=8" } }, + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true, + "license": "MIT" + }, "node_modules/dns-packet": { "version": "5.6.1", "license": "MIT", @@ -18341,7 +19530,9 @@ } }, "node_modules/jiti": { - "version": "1.21.0", + "version": "1.21.7", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz", + "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==", "license": "MIT", "bin": { "jiti": "bin/jiti.js" @@ -19685,6 +20876,15 @@ "yallist": "^3.0.2" } }, + "node_modules/lucide-react": { + "version": "0.378.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.378.0.tgz", + "integrity": "sha512-u6EPU8juLUk9ytRcyapkWI18epAv3RU+6+TC23ivjR0e+glWKBobFeSgRwOIJihzktILQuy6E0E80P2jVTDR5g==", + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/lz-string": { "version": "1.5.0", "dev": true, @@ -20492,7 +21692,9 @@ } }, "node_modules/minipass": { - "version": "7.0.4", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, "license": "ISC", "engines": { @@ -20967,8 +22169,6 @@ }, "node_modules/mylas": { "version": "2.1.13", - "resolved": "https://registry.npmjs.org/mylas/-/mylas-2.1.13.tgz", - "integrity": "sha512-+MrqnJRtxdF+xngFfUUkIMQrUUL0KsxbADUkn23Z/4ibGg192Q+z+CQyiYwvWTsYjJygmMR8+w3ZDa98Zh6ESg==", "dev": true, "license": "MIT", "engines": { @@ -20979,8 +22179,22 @@ "url": "https://github.com/sponsors/raouldeheer" } }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/nanoid": { - "version": "3.3.7", + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.10.tgz", + "integrity": "sha512-vSJJTG+t/dIKAUhUDw/dLdZ9s//5OxcHqLaDWWrW4Cdq7o6tdLIczUkMXt2MBNmk6sJRZBZRXVixs7URY1CmIg==", "funding": [ { "type": "github", @@ -21998,7 +23212,17 @@ "version": "4.1.1", "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" } }, "node_modules/object-inspect": { @@ -22387,6 +23611,13 @@ "node": ">=8" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/pacote": { "version": "15.1.1", "dev": true, @@ -22773,15 +24004,17 @@ "license": "MIT" }, "node_modules/path-scurry": { - "version": "1.10.1", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", + "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -22810,7 +24043,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "license": "ISC" }, "node_modules/picomatch": { @@ -23002,8 +24237,6 @@ }, "node_modules/plimit-lit": { "version": "1.6.1", - "resolved": "https://registry.npmjs.org/plimit-lit/-/plimit-lit-1.6.1.tgz", - "integrity": "sha512-B7+VDyb8Tl6oMJT9oSO2CW8XC/T4UcJGrwOVoNGwOQsQYhlpfajmrMj5xeejqaASq3V/EqThyOeATEOMuSEXiA==", "dev": true, "license": "MIT", "dependencies": { @@ -23031,7 +24264,9 @@ } }, "node_modules/postcss": { - "version": "8.4.33", + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", + "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", "funding": [ { "type": "opencollective", @@ -23048,9 +24283,9 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -23150,6 +24385,106 @@ "postcss": "^8.2.15" } }, + "node_modules/postcss-import": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", + "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-js": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", + "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase-css": "^2.0.1" + }, + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.4.21" + } + }, + "node_modules/postcss-load-config": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", + "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "lilconfig": "^3.0.0", + "yaml": "^2.3.4" + }, + "engines": { + "node": ">= 14" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/postcss-load-config/node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/postcss-load-config/node_modules/yaml": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", + "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/postcss-loader": { "version": "7.3.4", "license": "MIT", @@ -23372,6 +24707,32 @@ "postcss": "^8.1.0" } }, + "node_modules/postcss-nested": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", + "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "postcss-selector-parser": "^6.1.1" + }, + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, "node_modules/postcss-normalize-charset": { "version": "5.1.0", "license": "MIT", @@ -23543,7 +24904,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.15", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "license": "MIT", "dependencies": { "cssesc": "^3.0.0", @@ -23941,8 +25304,6 @@ }, "node_modules/queue-lit": { "version": "1.5.2", - "resolved": "https://registry.npmjs.org/queue-lit/-/queue-lit-1.5.2.tgz", - "integrity": "sha512-tLc36IOPeMAubu8BkW8YDBV+WyIgKlYU7zUNs0J5Vk9skSZ4JfGlPOqplP0aHdfv7HL0B2Pg6nwiq60Qc6M2Hw==", "dev": true, "license": "MIT", "engines": { @@ -24842,18 +26203,20 @@ } }, "node_modules/react-remove-scroll-bar": { - "version": "2.3.4", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.8.tgz", + "integrity": "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==", "license": "MIT", "dependencies": { - "react-style-singleton": "^2.2.1", + "react-style-singleton": "^2.2.2", "tslib": "^2.0.0" }, "engines": { "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -24946,19 +26309,20 @@ } }, "node_modules/react-style-singleton": { - "version": "2.2.1", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.3.tgz", + "integrity": "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==", "license": "MIT", "dependencies": { "get-nonce": "^1.0.0", - "invariant": "^2.2.4", "tslib": "^2.0.0" }, "engines": { "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -25044,6 +26408,26 @@ "node": ">=0.8" } }, + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pify": "^2.3.0" + } + }, + "node_modules/read-cache/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/read-cmd-shim": { "version": "3.0.0", "dev": true, @@ -26765,7 +28149,9 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -27328,6 +28714,99 @@ "version": "4.2.0", "license": "MIT" }, + "node_modules/sucrase": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "^10.3.10", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sucrase/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/sucrase/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sucrase/node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/sucrase/node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/sucrase/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/supports-color": { "version": "7.2.0", "license": "MIT", @@ -27445,8 +28924,130 @@ "version": "6.0.0", "license": "MIT", "dependencies": { - "keyborg": "2.5.0", - "tslib": "^2.3.1" + "keyborg": "2.5.0", + "tslib": "^2.3.1" + } + }, + "node_modules/tailwind-merge": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.6.0.tgz", + "integrity": "sha512-P+Vu1qXfzediirmHOC3xKGAYeZtPcV9g76X+xg2FD4tYgR71ewMA35Y3sCz3zhiN/dwefRpJX0yBcgwi1fXNQA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, + "node_modules/tailwindcss": { + "version": "3.4.17", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz", + "integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "arg": "^5.0.2", + "chokidar": "^3.6.0", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.3.2", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "jiti": "^1.21.6", + "lilconfig": "^3.1.3", + "micromatch": "^4.0.8", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.1.1", + "postcss": "^8.4.47", + "postcss-import": "^15.1.0", + "postcss-js": "^4.0.1", + "postcss-load-config": "^4.0.2", + "postcss-nested": "^6.2.0", + "postcss-selector-parser": "^6.1.2", + "resolve": "^1.22.8", + "sucrase": "^3.35.0" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tailwindcss-animate": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/tailwindcss-animate/-/tailwindcss-animate-1.0.7.tgz", + "integrity": "sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==", + "license": "MIT", + "peerDependencies": { + "tailwindcss": ">=3.0.0 || insiders" + } + }, + "node_modules/tailwindcss/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/tailwindcss/node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/tailwindcss/node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/tailwindcss/node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" } }, "node_modules/tapable": { @@ -27690,6 +29291,29 @@ "version": "0.2.0", "license": "MIT" }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/throttle-debounce": { "version": "5.0.0", "license": "MIT", @@ -27903,6 +29527,13 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/ts-jest": { "version": "29.1.2", "dev": true, @@ -27977,8 +29608,6 @@ }, "node_modules/tsc-alias": { "version": "1.8.11", - "resolved": "https://registry.npmjs.org/tsc-alias/-/tsc-alias-1.8.11.tgz", - "integrity": "sha512-2DuEQ58A9Rj2NE2c1+/qaGKlshni9MCK95MJzRGhQG0CYLw0bE/ACgbhhTSf/p1svLelwqafOd8stQate2bYbg==", "dev": true, "license": "MIT", "dependencies": { @@ -27995,8 +29624,6 @@ }, "node_modules/tsc-alias/node_modules/commander": { "version": "9.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", "dev": true, "license": "MIT", "engines": { @@ -28815,7 +30442,9 @@ } }, "node_modules/use-callback-ref": { - "version": "1.3.1", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.3.tgz", + "integrity": "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==", "license": "MIT", "dependencies": { "tslib": "^2.0.0" @@ -28824,8 +30453,8 @@ "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -28878,7 +30507,9 @@ } }, "node_modules/use-sidecar": { - "version": "1.1.2", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.3.tgz", + "integrity": "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==", "license": "MIT", "dependencies": { "detect-node-es": "^1.1.0", @@ -28888,8 +30519,8 @@ "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.9.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -31358,6 +32989,360 @@ "semantic-ui-react": "^1.3.1 || ^2.1.3" } }, + "packages/shadcn": { + "name": "@rjsf/shadcn", + "version": "6.0.0-alpha.0", + "license": "MIT", + "dependencies": { + "@radix-ui/react-checkbox": "^1.0.4", + "@radix-ui/react-dialog": "^1.0.5", + "@radix-ui/react-icons": "^1.3.0", + "@radix-ui/react-label": "^2.0.2", + "@radix-ui/react-popover": "^1.0.7", + "@radix-ui/react-radio-group": "^1.1.3", + "@radix-ui/react-select": "^2.0.0", + "@radix-ui/react-separator": "^1.0.3", + "@radix-ui/react-slider": "^1.1.2", + "@radix-ui/react-slot": "^1.0.2", + "@react-icons/all-files": "^4.1.0", + "class-variance-authority": "^0.7.0", + "clsx": "^2.1.1", + "cmdk": "^1.0.0", + "lodash": "^4.17.21", + "lodash-es": "^4.17.21", + "lucide-react": "^0.378.0", + "tailwind-merge": "^2.3.0", + "tailwindcss-animate": "^1.0.7", + "uuid": "^9.0.1" + }, + "devDependencies": { + "@babel/core": "^7.23.9", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.21.0", + "@babel/preset-env": "^7.23.9", + "@babel/preset-react": "^7.23.3", + "@babel/preset-typescript": "^7.23.3", + "@rjsf/core": "^6.0.0-alpha.0", + "@rjsf/snapshot-tests": "^6.0.0-alpha.0", + "@rjsf/utils": "^6.0.0-alpha.0", + "@rjsf/validator-ajv8": "^6.0.0-alpha.0", + "@types/jest": "^29.5.12", + "@types/lodash": "^4.14.202", + "@types/react": "^18.2.58", + "@types/react-dom": "^18.2.19", + "@types/react-test-renderer": "^18.0.7", + "babel-jest": "^29.7.0", + "eslint": "^8.56.0", + "jest": "^29.7.0", + "jest-environment-jsdom": "^29.7.0", + "jsdom": "^20.0.3", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-test-renderer": "^18.2.0", + "rimraf": "^5.0.5", + "rollup": "^4.34.8", + "tailwindcss": "^3.0.0", + "typescript": "^4.9.5" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@rjsf/core": "^6.x", + "@rjsf/utils": "^6.x", + "react": "^16.14.0 || >=17" + } + }, + "packages/shadcn/node_modules/agent-base": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "packages/shadcn/node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "packages/shadcn/node_modules/cssstyle": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.3.0.tgz", + "integrity": "sha512-6r0NiY0xizYqfBvWp1G7WXJ06/bZyrk7Dc6PHql82C/pKGUTKu4yAX4Y8JPamb1ob9nBKuxWzCGTRuGwU3yxJQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@asamuzakjp/css-color": "^3.1.1", + "rrweb-cssom": "^0.8.0" + }, + "engines": { + "node": ">=18" + } + }, + "packages/shadcn/node_modules/data-urls": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", + "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "packages/shadcn/node_modules/html-encoding-sniffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", + "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-encoding": "^3.1.1" + }, + "engines": { + "node": ">=18" + } + }, + "packages/shadcn/node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "packages/shadcn/node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "packages/shadcn/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "packages/shadcn/node_modules/jsdom": { + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-26.0.0.tgz", + "integrity": "sha512-BZYDGVAIriBWTpIxYzrXjv3E/4u8+/pSG5bQdIYCbNCGOvsPkDQfTVLAIXAf9ETdCpduCVTkDe2NNZ8NIwUVzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssstyle": "^4.2.1", + "data-urls": "^5.0.0", + "decimal.js": "^10.4.3", + "form-data": "^4.0.1", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.6", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.16", + "parse5": "^7.2.1", + "rrweb-cssom": "^0.8.0", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^5.0.0", + "w3c-xmlserializer": "^5.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.1.0", + "ws": "^8.18.0", + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "canvas": "^3.0.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "packages/shadcn/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "packages/shadcn/node_modules/rollup": { + "version": "4.36.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.36.0.tgz", + "integrity": "sha512-zwATAXNQxUcd40zgtQG0ZafcRK4g004WtEl7kbuhTWPvf07PsfohXl39jVUvPF7jvNAIkKPQ2XrsDlWuxBd++Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.6" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.36.0", + "@rollup/rollup-android-arm64": "4.36.0", + "@rollup/rollup-darwin-arm64": "4.36.0", + "@rollup/rollup-darwin-x64": "4.36.0", + "@rollup/rollup-freebsd-arm64": "4.36.0", + "@rollup/rollup-freebsd-x64": "4.36.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.36.0", + "@rollup/rollup-linux-arm-musleabihf": "4.36.0", + "@rollup/rollup-linux-arm64-gnu": "4.36.0", + "@rollup/rollup-linux-arm64-musl": "4.36.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.36.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.36.0", + "@rollup/rollup-linux-riscv64-gnu": "4.36.0", + "@rollup/rollup-linux-s390x-gnu": "4.36.0", + "@rollup/rollup-linux-x64-gnu": "4.36.0", + "@rollup/rollup-linux-x64-musl": "4.36.0", + "@rollup/rollup-win32-arm64-msvc": "4.36.0", + "@rollup/rollup-win32-ia32-msvc": "4.36.0", + "@rollup/rollup-win32-x64-msvc": "4.36.0", + "fsevents": "~2.3.2" + } + }, + "packages/shadcn/node_modules/tough-cookie": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.2.tgz", + "integrity": "sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tldts": "^6.1.32" + }, + "engines": { + "node": ">=16" + } + }, + "packages/shadcn/node_modules/tr46": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.0.tgz", + "integrity": "sha512-IUWnUK7ADYR5Sl1fZlO1INDUhVhatWl7BtJWsIhwJ0UAK7ilzzIa8uIqOO/aYVWHZPJkKbEL+362wrzoeRF7bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=18" + } + }, + "packages/shadcn/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "packages/shadcn/node_modules/w3c-xmlserializer": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "packages/shadcn/node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } + }, + "packages/shadcn/node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "packages/shadcn/node_modules/whatwg-url": { + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz", + "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tr46": "^5.1.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "packages/shadcn/node_modules/xml-name-validator": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, "packages/snapshot-tests": { "name": "@rjsf/snapshot-tests", "version": "6.0.0-alpha.0", diff --git a/package.json b/package.json index 9db620f74b..e5f25e3285 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,7 @@ "packages/semantic-ui", "packages/utils", "packages/validator-ajv8", - "packages/snapshot-tests" + "packages/snapshot-tests", + "packages/shadcn" ] } diff --git a/packages/docs/docs/usage/themes.md b/packages/docs/docs/usage/themes.md index 187b86fdc0..d34942999b 100644 --- a/packages/docs/docs/usage/themes.md +++ b/packages/docs/docs/usage/themes.md @@ -14,6 +14,7 @@ meaning that you must load the Bootstrap stylesheet on the page to view the form | fluentui-rc | Published | `@rjsf/fluentui-rc` | | material-ui | Published | `@rjsf/mui` | | Semantic UI | Published | `@rjsf/semantic-ui` | +| shadcn | Published | `@rjsf/shadcn` | ## Using themes diff --git a/packages/playground/src/app.tsx b/packages/playground/src/app.tsx index 3828c043c6..8786434964 100644 --- a/packages/playground/src/app.tsx +++ b/packages/playground/src/app.tsx @@ -4,6 +4,7 @@ import { Theme as SuiTheme } from '@rjsf/semantic-ui'; import { Theme as AntdTheme } from '@rjsf/antd'; import { Theme as BootstrapTheme } from '@rjsf/react-bootstrap'; import { Theme as ChakraUITheme } from '@rjsf/chakra-ui'; +import { Theme as shadcnTheme } from '@rjsf/shadcn'; import v8Validator, { customizeValidator } from '@rjsf/validator-ajv8'; import localize_es from 'ajv-i18n/localize/es'; import Ajv2019 from 'ajv/dist/2019.js'; @@ -113,6 +114,39 @@ const themes: PlaygroundProps['themes'] = { stylesheet: '//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css', theme: SuiTheme, }, + shadcn: { + stylesheet: 'https://cdn.jsdelivr.net/gh/tuanphung2308/rjsf-shadcn-css@main/public/default.css', + theme: shadcnTheme, + subthemes: { + default: { + stylesheet: 'https://cdn.jsdelivr.net/gh/tuanphung2308/rjsf-shadcn-css@main/public/default.css', + }, + blue: { + stylesheet: 'https://cdn.jsdelivr.net/gh/tuanphung2308/rjsf-shadcn-css@main/public/blue.css', + }, + green: { + stylesheet: 'https://cdn.jsdelivr.net/gh/tuanphung2308/rjsf-shadcn-css@main/public/green.css', + }, + orange: { + stylesheet: 'https://cdn.jsdelivr.net/gh/tuanphung2308/rjsf-shadcn-css@main/public/orange.css', + }, + red: { + stylesheet: 'https://cdn.jsdelivr.net/gh/tuanphung2308/rjsf-shadcn-css@main/public/red.css', + }, + rose: { + stylesheet: 'https://cdn.jsdelivr.net/gh/tuanphung2308/rjsf-shadcn-css@main/public/rose.css', + }, + violet: { + stylesheet: 'https://cdn.jsdelivr.net/gh/tuanphung2308/rjsf-shadcn-css@main/public/violet.css', + }, + yellow: { + stylesheet: 'https://cdn.jsdelivr.net/gh/tuanphung2308/rjsf-shadcn-css@main/public/yellow.css', + }, + zinc: { + stylesheet: 'https://cdn.jsdelivr.net/gh/tuanphung2308/rjsf-shadcn-css@main/public/zinc.css', + }, + }, + }, }; export default function App() { diff --git a/packages/playground/src/samples/layoutGrid.tsx b/packages/playground/src/samples/layoutGrid.tsx index 67e7907e80..5b1aa29474 100644 --- a/packages/playground/src/samples/layoutGrid.tsx +++ b/packages/playground/src/samples/layoutGrid.tsx @@ -1370,21 +1370,30 @@ const layoutGrid: Sample = { { 'ui:columns': { width: 16, - style: { paddingBottom: 0, paddingTop: 0 }, + style: { + paddingBottom: 0, + paddingTop: 0, + }, children: ['employment.business', 'employment.title'], }, }, { 'ui:col': { width: 10, - style: { paddingBottom: 0, paddingTop: 0 }, + style: { + paddingBottom: 0, + paddingTop: 0, + }, children: ['employment.location.city'], }, }, { 'ui:col': { width: 6, - style: { paddingBottom: 0, paddingTop: 0 }, + style: { + paddingBottom: 0, + paddingTop: 0, + }, children: ['employment.location.state'], }, }, @@ -1400,21 +1409,30 @@ const layoutGrid: Sample = { { 'ui:columns': { width: 16, - style: { paddingBottom: 0, paddingTop: 0 }, + style: { + paddingBottom: 0, + paddingTop: 0, + }, children: ['employment.district', 'employment.school', 'employment.title'], }, }, { 'ui:col': { width: 10, - style: { paddingBottom: 0, paddingTop: 0 }, + style: { + paddingBottom: 0, + paddingTop: 0, + }, children: ['employment.location.city'], }, }, { 'ui:col': { width: 6, - style: { paddingBottom: 0, paddingTop: 0 }, + style: { + paddingBottom: 0, + paddingTop: 0, + }, children: ['employment.location.state'], }, }, @@ -1430,7 +1448,10 @@ const layoutGrid: Sample = { { 'ui:columns': { width: 16, - style: { paddingBottom: 0, paddingTop: 0 }, + style: { + paddingBottom: 0, + paddingTop: 0, + }, children: [ { name: 'employment.description', @@ -1501,6 +1522,187 @@ const layoutGrid: Sample = { }, }, }; + case 'shadcn': + return { + 'ui:field': 'LayoutGridField', + 'ui:layoutGrid': { + 'ui:row': [ + { + 'ui:row': { + className: 'grid grid-cols-12 gap-4 col-span-12', + children: [ + { + 'ui:columns': { + className: 'col-span-4', + children: ['person.name.first', 'person.name.middle', 'person.name.last'], + }, + }, + ], + }, + }, + { + 'ui:row': { + className: 'grid grid-cols-12 gap-4 col-span-12', + children: [ + { + 'ui:col': { + className: 'col-span-3', + children: [ + { + name: 'person.birth_date', + placeholder: '$lookup=PlaceholderText', + }, + ], + }, + }, + { + 'ui:col': { + className: 'col-span-6', + children: ['person.race'], + }, + }, + ], + }, + }, + { + 'ui:row': { + className: 'grid grid-cols-12 gap-4 col-span-12 grid-rows-4', + children: [ + { + 'ui:col': { + className: 'col-span-6 row-span-4', + children: ['person.address'], + }, + }, + { + 'ui:col': { + className: 'col-span-6 row-span-1 flex items-center', + children: ['employment'], + }, + }, + { + 'ui:condition': { + field: 'employment.job_type', + value: 'company', + operator: 'all', + children: [ + { + 'ui:columns': { + className: 'col-span-6 row-span-1', + children: ['employment.business', 'employment.title'], + }, + }, + { + 'ui:col': { + className: 'col-span-4 row-span-1', + children: ['employment.location.city'], + }, + }, + { + 'ui:col': { + className: 'col-span-2 row-span-1', + children: ['employment.location.state'], + }, + }, + ], + }, + }, + { + 'ui:condition': { + field: 'employment.job_type', + value: 'education', + operator: 'all', + children: [ + { + 'ui:columns': { + className: 'col-span-6 row-span-1', + children: ['employment.district', 'employment.school', 'employment.title'], + }, + }, + { + 'ui:col': { + className: 'col-span-4 row-span-1', + children: ['employment.location.city'], + }, + }, + { + 'ui:col': { + className: 'col-span-2 row-span-1', + children: ['employment.location.state'], + }, + }, + ], + }, + }, + { + 'ui:condition': { + field: 'employment.job_type', + value: 'other', + operator: 'all', + children: [ + { + 'ui:columns': { + className: 'col-span-6 row-span-3', + children: [ + { + name: 'employment.description', + rows: 6, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + person: { + race: { + 'ui:options': { + widget: 'checkboxes', + }, + }, + address: { + 'ui:field': 'LayoutGridField', + 'ui:layoutGrid': { + 'ui:row': { + className: 'grid grid-cols-12 gap-4', + children: [ + { + 'ui:columns': { + className: 'col-span-12', + children: ['line_1', 'line_2', 'city'], + }, + }, + { + 'ui:row': { + children: [ + { + 'ui:columns': { + className: 'col-span-6', + children: ['state', 'postal_code'], + }, + }, + ], + }, + }, + ], + }, + }, + }, + }, + employment: { + 'ui:options': { + inline: true, + }, + description: { + 'ui:widget': 'textarea', + }, + }, + }; default: return { 'ui:field': 'LayoutGridField', diff --git a/packages/playground/tsconfig.json b/packages/playground/tsconfig.json index 32d1966633..4cfebb9043 100644 --- a/packages/playground/tsconfig.json +++ b/packages/playground/tsconfig.json @@ -29,6 +29,7 @@ { "path": "../mui" }, { "path": "../react-bootstrap"}, { "path": "../semantic-ui" }, + { "path": "../shadcn" }, { "path": "../utils" }, { "path": "../validator-ajv8" } ] diff --git a/packages/playground/vite.config.ts b/packages/playground/vite.config.ts index 952a0e0750..1af7de4aba 100644 --- a/packages/playground/vite.config.ts +++ b/packages/playground/vite.config.ts @@ -22,6 +22,7 @@ export default defineConfig({ '@rjsf/mui': path.resolve(__dirname, '../mui/src'), '@rjsf/react-bootstrap': path.resolve(__dirname, '../react-bootstrap/src'), '@rjsf/semantic-ui': path.resolve(__dirname, '../semantic-ui/src'), + '@rjsf/shadcn': path.resolve(__dirname, '../shadcn/src'), // We want to pick up the browser version of the utils '@rjsf/utils': path.resolve(__dirname, '../utils/src/indexBrowser'), '@rjsf/validator-ajv8': path.resolve(__dirname, '../validator-ajv8/src'), diff --git a/packages/shadcn/.eslintrc b/packages/shadcn/.eslintrc new file mode 100644 index 0000000000..731b36bae0 --- /dev/null +++ b/packages/shadcn/.eslintrc @@ -0,0 +1,4 @@ +{ + "extends": ["../../.eslintrc"], + "plugins": ["@typescript-eslint", "jsx-a11y", "react", "import"] +} diff --git a/packages/shadcn/.gitignore b/packages/shadcn/.gitignore new file mode 100644 index 0000000000..09eb96474c --- /dev/null +++ b/packages/shadcn/.gitignore @@ -0,0 +1,2 @@ +.rts2_** +tsconfig.tsbuildinfo diff --git a/packages/shadcn/README.md b/packages/shadcn/README.md new file mode 100644 index 0000000000..9fc3c45eaa --- /dev/null +++ b/packages/shadcn/README.md @@ -0,0 +1,225 @@ + +
+

+ + Logo + + +

@rjsf/shadcn

+ +

+ Shadcn theme, fields and widgets for react-jsonschema-form. +
+ Explore the docs » +
+
+ View Playground + · + Report Bug + · + Request Feature +

+ + + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [About The Project](#about-the-project) + - [Built With](#built-with) +- [Getting Started](#getting-started) + - [Prerequisites](#prerequisites) + - [Installation](#installation) +- [Usage](#usage) +- [Contributing](#contributing) +- [Contact](#contact) + + + +## About The Project + +Exports `shadcn` theme, fields and widgets for `react-jsonschema-form`. + +[Live demo](https://react-jsonschema-form-shadcn-boilerplate.vercel.app/) + +### Built With + +- [react-jsonschema-form](https://github.com/mozilla-services/react-jsonschema-form/) +- [shadcn](https://ui.shadcn.com/) +- [Typescript](https://www.typescriptlang.org/) + + + +## Getting Started + +### Prerequisites + +- `@rjsf/core >= 6` +- `tailwindcss (optional)` + +```bash +yarn add @rjsf/core +``` + +### Installation + +```bash +yarn add @rjsf/shadcn +``` + +## Usage + +```js +import Form from '@rjsf/shadcn'; +``` + +or + +```js +import {withTheme} from '@rjsf/core'; +import {Theme as shadcnTheme} from '@rjsf/shadcn'; + +const Form = withTheme(shadcnTheme); +``` + + + +## Theming + +### Using Tailwind + +Follow shadCN installation guide [here](https://ui.shadcn.com/docs/installation) for your application + +The color of the RJSF will automatically apply with your shadCN config. + +### Not using Tailwind + +#### Use the theme on demo site + +All shadcn's default color theme are included in the npm packages. Simply do + +``` +import '@rjsf/shadcn/dist/[color].css'; +e.g: +import '@rjsf/shadcn/dist/zinc.css'; +``` + +Supported colors are: + +- default +- zinc +- red +- rose +- orange +- green +- blue +- yellow +- violet + +#### Coloring + +- Generate a theme from [official shadCN site](https://ui.shadcn.com/themes) + or [zippy starter's shadcn/ui theme generator](https://zippystarter.com/tools/shadcn-ui-theme-generator) + or [Railly](https://customizer.railly.dev/) +- Navigate to shadcn/css, create a new file called [your-theme].css +- Replace the base layer code with your new color +- Follow the next section to build your CSS file + +#### Build your CSS file + +If you are not using tailwind but still wants to use this theme, you can follow these steps: + +- Clone the repository + +``` +cd packages/shadcn +npm i +npm run build:css +``` + +- Include the built file in /dist/rjsf-shadcn.css in your application + +## Dark mode (Tailwind only) + +Check out this section by [shadCN](https://ui.shadcn.com/docs/dark-mode) + +## RTL (Tailwind only) + +### Installation + +```bash +npm install @radix-ui/react-direction --save +``` + +### Implementation + +1. Wrap your layout with DirectionProvider: + + ```tsx + import {DirectionProvider as RadixDirectionProvider} from '@radix-ui/react-direction; + + function Layout({children, direction}) { + return ( + + {children} + + ); + } + ``` + +2. Set HTML direction attribute: + + ```html + + ``` + +3. You can refer to `direction-context.tsx`, `direction-provider.tsx` and `rtl-toggle.tsx` from demo repository for + implementation. + +## Updating to latest shadCN version + +- Simply copy the shadcn components into shadcn/src/components/ui and rebuilt the packages or using the shadcn CLI at + the root level with the components.json +- For RTL version, you might need component from [here](https://github.com/shadcn-ui/ui/pull/1638) + by [nahasco](https://github.com/nahasco) +- [Fancy multi-select](https://craft.mxkaske.dev/post/fancy-multi-select) + + + +## Contributing + +Read our [contributors' guide](https://rjsf-team.github.io/react-jsonschema-form/docs/contributing/) to get started. + + + +## Contact + +rjsf team: [https://github.com/orgs/rjsf-team/people](https://github.com/orgs/rjsf-team/people) + +GitHub +repository: [https://github.com/rjsf-team/react-jsonschema-form](https://github.com/rjsf-team/react-jsonschema-form) + + + + +[build-shield]: https://github.com/rjsf-team/react-jsonschema-form/workflows/CI/badge.svg + +[build-url]: https://github.com/rjsf-team/react-jsonschema-form/actions + +[contributors-shield]: https://img.shields.io/github/contributors/rjsf-team/react-jsonschema-form.svg + +[contributors-url]: https://github.com/rjsf-team/react-jsonschema-form/graphs/contributors + +[license-shield]: https://img.shields.io/badge/license-Apache%202.0-blue.svg?style=flat-square + +[license-url]: https://choosealicense.com/licenses/apache-2.0/ + +[npm-shield]: https://img.shields.io/npm/v/@rjsf/shadcn/latest.svg?style=flat-square + +[npm-url]: https://www.npmjs.com/package/@rjsf/shadcn + +[npm-dl-shield]: https://img.shields.io/npm/dm/@rjsf/shadcn.svg?style=flat-square + +[npm-dl-url]: https://www.npmjs.com/package/@rjsf/shadcn + +[product-screenshot]: https://raw.githubusercontent.com/rjsf-team/react-jsonschema-form/59a8206e148474bea854bbb004f624143fbcbac8/packages/shadcn/screenshot.png diff --git a/packages/shadcn/babel.config.js b/packages/shadcn/babel.config.js new file mode 100644 index 0000000000..5f772a56c4 --- /dev/null +++ b/packages/shadcn/babel.config.js @@ -0,0 +1,3 @@ +const defaultConfig = require('../../babel.config'); + +module.exports = defaultConfig; diff --git a/packages/shadcn/build-css.js b/packages/shadcn/build-css.js new file mode 100644 index 0000000000..79a62cd0d5 --- /dev/null +++ b/packages/shadcn/build-css.js @@ -0,0 +1,28 @@ +const { execSync } = require('child_process'); +const fs = require('fs'); +const path = require('path'); + +const srcDir = './src/css'; +const distDir = './dist/'; + +// Ensure dist directory exists +fs.mkdirSync(distDir, { recursive: true }); + +fs.readdirSync(srcDir).forEach((file) => { + if (path.extname(file) === '.css') { + const srcFile = path.join(srcDir, file); + const distFile = path.join(distDir, file); // Keep the same filename + try { + // Add --content flag to explicitly process all content files + execSync( + `npx tailwindcss -i ${srcFile} -o ${distFile} --minify --content="./src/**/*.{js,jsx,ts,tsx},../playground/src/**/*.{js,jsx,ts,tsx}"`, + { + stdio: 'ignore', + } + ); + } catch (error) { + console.error(`Error building ${srcFile}:`, error); + process.exit(1); // Exit with error code if any file fails + } + } +}); diff --git a/packages/shadcn/components.json b/packages/shadcn/components.json new file mode 100644 index 0000000000..083712d05f --- /dev/null +++ b/packages/shadcn/components.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "tailwind.config.js", + "css": "src/index.css", + "baseColor": "zinc", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "src/components", + "utils": "src/lib/utils", + "ui": "src/components/ui", + "lib": "src/lib", + "hooks": "src/hooks" + }, + "iconLibrary": "lucide" +} diff --git a/packages/shadcn/jest.config.js b/packages/shadcn/jest.config.js new file mode 100644 index 0000000000..060cf0d6ea --- /dev/null +++ b/packages/shadcn/jest.config.js @@ -0,0 +1,11 @@ +module.exports = { + testEnvironment: 'jsdom', + transform: { + '^.+\\.(ts|tsx|js|jsx)$': ['babel-jest', { configFile: './babel.config.js' }], + }, + transformIgnorePatterns: ['/node_modules/(?!nanoid/.*)'], + moduleNameMapper: { + '^@/(.*)$': '/src/$1', + }, + setupFilesAfterEnv: ['/jest.setup.js'], +}; diff --git a/packages/shadcn/jest.setup.js b/packages/shadcn/jest.setup.js new file mode 100644 index 0000000000..8cafec1cf2 --- /dev/null +++ b/packages/shadcn/jest.setup.js @@ -0,0 +1 @@ +// Add any global test setup here diff --git a/packages/shadcn/package.json b/packages/shadcn/package.json new file mode 100644 index 0000000000..43b7422be5 --- /dev/null +++ b/packages/shadcn/package.json @@ -0,0 +1,140 @@ +{ + "name": "@rjsf/shadcn", + "version": "6.0.0-alpha.0", + "main": "dist/index.js", + "module": "lib/index.js", + "typings": "lib/index.d.ts", + "description": "shadcn theme, fields and widgets for react-jsonschema-form", + "exports": { + ".": { + "require": "./dist/index.js", + "import": "./lib/index.js", + "types": "./lib/index.d.ts" + }, + "./lib": { + "require": "./dist/index.js", + "import": "./lib/index.js", + "types": "./lib/index.d.ts" + }, + "./lib/*.js": { + "require": "./dist/*.js", + "import": "./lib/*.js", + "types": "./lib/*.d.ts" + }, + "./dist": { + "require": "./dist/index.js", + "import": "./lib/index.js", + "types": "./lib/index.d.ts" + }, + "./dist/*.js": { + "require": "./dist/*.js", + "import": "./lib/*.js", + "types": "./lib/*.d.ts" + } + }, + "files": [ + "dist", + "lib", + "src" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/rjsf-team/react-jsonschema-form.git" + }, + "scripts": { + "build:css": "node build-css.js", + "build:ts": "tsc -b tsconfig.build.json && tsc-alias -p tsconfig.build.json", + "build:cjs": "esbuild ./src/index.ts --bundle --outfile=dist/index.js --sourcemap --packages=external --format=cjs", + "build:esm": "esbuild ./src/index.ts --bundle --outfile=dist/rjsf-shadcn.esm.js --sourcemap --packages=external --format=esm", + "build:umd": "rollup dist/rjsf-shadcn.esm.js --format=umd --file=dist/rjsf-shadcn.umd.js --name=@rjsf/rjsf-shadcn", + "build": "npm run build:ts && npm run build:cjs && npm run build:esm && npm run build:umd && npm run build:css", + "cs-check": "prettier -l \"{src,test}/**/*.ts?(x)\"", + "cs-format": "prettier \"{src,test}/**/*.ts?(x)\" --write", + "lint": "eslint src test", + "precommit": "lint-staged", + "test": "jest", + "test:update": "jest --u" + }, + "lint-staged": { + "{src,test}/**/*.ts?(x)": [ + "eslint --fix" + ] + }, + "peerDependencies": { + "@rjsf/core": "^6.x", + "@rjsf/utils": "^6.x", + "react": "^16.14.0 || >=17" + }, + "engineStrict": false, + "engines": { + "node": ">=20" + }, + "devDependencies": { + "@babel/core": "^7.23.9", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.21.0", + "@babel/preset-env": "^7.23.9", + "@babel/preset-react": "^7.23.3", + "@babel/preset-typescript": "^7.23.3", + "@rjsf/core": "^6.0.0-alpha.0", + "@rjsf/snapshot-tests": "^6.0.0-alpha.0", + "@rjsf/utils": "^6.0.0-alpha.0", + "@rjsf/validator-ajv8": "^6.0.0-alpha.0", + "@types/jest": "^29.5.12", + "@types/react": "^18.2.58", + "@types/react-dom": "^18.2.19", + "@types/react-test-renderer": "^18.0.7", + "babel-jest": "^29.7.0", + "eslint": "^8.56.0", + "jest": "^29.7.0", + "jest-environment-jsdom": "^29.7.0", + "jsdom": "^20.0.3", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-test-renderer": "^18.2.0", + "rimraf": "^5.0.5", + "rollup": "^4.34.8", + "typescript": "^4.9.5", + "tailwindcss": "^3.0.0", + "@types/lodash": "^4.14.202" + }, + "dependencies": { + "@react-icons/all-files": "^4.1.0", + "class-variance-authority": "^0.7.0", + "clsx": "^2.1.1", + "tailwind-merge": "^2.3.0", + "tailwindcss-animate": "^1.0.7", + "lucide-react": "^0.378.0", + "@radix-ui/react-slot": "^1.0.2", + "@radix-ui/react-checkbox": "^1.0.4", + "@radix-ui/react-icons": "^1.3.0", + "@radix-ui/react-slider": "^1.1.2", + "@radix-ui/react-label": "^2.0.2", + "@radix-ui/react-radio-group": "^1.1.3", + "@radix-ui/react-dialog": "^1.0.5", + "@radix-ui/react-select": "^2.0.0", + "@radix-ui/react-popover": "^1.0.7", + "@radix-ui/react-separator": "^1.0.3", + "cmdk": "^1.0.0", + "uuid": "^9.0.1", + "lodash": "^4.17.21", + "lodash-es": "^4.17.21" + }, + "publishConfig": { + "access": "public" + }, + "keywords": [ + "react-jsonschema-form", + "jsonschema", + "json-schema", + "json", + "schema", + "form", + "react", + "shadcn" + ], + "contributors": [ + "tuanphung2308 ({ + uiSchema, + registry, + ...props +}: IconButtonProps) { + const { translateString } = registry; + return ( +
+ +
+ ); +} diff --git a/packages/shadcn/src/AddButton/index.ts b/packages/shadcn/src/AddButton/index.ts new file mode 100644 index 0000000000..752d720d32 --- /dev/null +++ b/packages/shadcn/src/AddButton/index.ts @@ -0,0 +1,2 @@ +export { default } from './AddButton'; +export * from './AddButton'; diff --git a/packages/shadcn/src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx b/packages/shadcn/src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx new file mode 100644 index 0000000000..4804d7689a --- /dev/null +++ b/packages/shadcn/src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx @@ -0,0 +1,40 @@ +import { + ArrayFieldItemTemplateType, + FormContextType, + getTemplate, + getUiOptions, + RJSFSchema, + StrictRJSFSchema, +} from '@rjsf/utils'; + +/** The `ArrayFieldItemTemplate` component is the template used to render an items of an array. + * + * @param props - The `ArrayFieldItemTemplateType` props for the component + */ +export default function ArrayFieldItemTemplate< + T = any, + S extends StrictRJSFSchema = RJSFSchema, + F extends FormContextType = any +>(props: ArrayFieldItemTemplateType) { + const { children, buttonsProps, hasToolbar, uiSchema, registry } = props; + const uiOptions = getUiOptions(uiSchema); + const ArrayFieldItemButtonsTemplate = getTemplate<'ArrayFieldItemButtonsTemplate', T, S, F>( + 'ArrayFieldItemButtonsTemplate', + registry, + uiOptions + ); + return ( +
+
+
{children}
+
+ {hasToolbar && ( +
+ +
+ )} +
+
+
+ ); +} diff --git a/packages/shadcn/src/ArrayFieldItemTemplate/index.ts b/packages/shadcn/src/ArrayFieldItemTemplate/index.ts new file mode 100644 index 0000000000..f104431399 --- /dev/null +++ b/packages/shadcn/src/ArrayFieldItemTemplate/index.ts @@ -0,0 +1,2 @@ +export { default } from './ArrayFieldItemTemplate'; +export * from './ArrayFieldItemTemplate'; diff --git a/packages/shadcn/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx b/packages/shadcn/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx new file mode 100644 index 0000000000..de3d8dc692 --- /dev/null +++ b/packages/shadcn/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx @@ -0,0 +1,84 @@ +import { + ArrayFieldItemTemplateType, + ArrayFieldTemplateProps, + buttonId, + FormContextType, + getTemplate, + getUiOptions, + RJSFSchema, + StrictRJSFSchema, +} from '@rjsf/utils'; + +/** The `ArrayFieldTemplate` component is the template used to render all items in an array. + * + * @param props - The `ArrayFieldItemTemplateType` props for the component + */ +export default function ArrayFieldTemplate< + T = any, + S extends StrictRJSFSchema = RJSFSchema, + F extends FormContextType = any +>(props: ArrayFieldTemplateProps) { + const { canAdd, disabled, idSchema, uiSchema, items, onAddClick, readonly, registry, required, schema, title } = + props; + const uiOptions = getUiOptions(uiSchema); + const ArrayFieldDescriptionTemplate = getTemplate<'ArrayFieldDescriptionTemplate', T, S, F>( + 'ArrayFieldDescriptionTemplate', + registry, + uiOptions + ); + const ArrayFieldItemTemplate = getTemplate<'ArrayFieldItemTemplate', T, S, F>( + 'ArrayFieldItemTemplate', + registry, + uiOptions + ); + const ArrayFieldTitleTemplate = getTemplate<'ArrayFieldTitleTemplate', T, S, F>( + 'ArrayFieldTitleTemplate', + registry, + uiOptions + ); + // Button templates are not overridden in the uiSchema + const { + ButtonTemplates: { AddButton }, + } = registry.templates; + return ( +
+
+
+ + +
+ {items && + items.map(({ key, ...itemProps }: ArrayFieldItemTemplateType) => ( + + ))} + {canAdd && ( +
+ (idSchema, 'add')} + className='array-item-add' + onClick={onAddClick} + disabled={disabled || readonly} + uiSchema={uiSchema} + registry={registry} + /> +
+ )} +
+
+
+
+ ); +} diff --git a/packages/shadcn/src/ArrayFieldTemplate/index.ts b/packages/shadcn/src/ArrayFieldTemplate/index.ts new file mode 100644 index 0000000000..ab908dec2c --- /dev/null +++ b/packages/shadcn/src/ArrayFieldTemplate/index.ts @@ -0,0 +1,2 @@ +export { default } from './ArrayFieldTemplate'; +export * from './ArrayFieldTemplate'; diff --git a/packages/shadcn/src/BaseInputTemplate/BaseInputTemplate.tsx b/packages/shadcn/src/BaseInputTemplate/BaseInputTemplate.tsx new file mode 100644 index 0000000000..8ffedc96ec --- /dev/null +++ b/packages/shadcn/src/BaseInputTemplate/BaseInputTemplate.tsx @@ -0,0 +1,85 @@ +import { + ariaDescribedByIds, + BaseInputTemplateProps, + examplesId, + FormContextType, + getInputProps, + RJSFSchema, + StrictRJSFSchema, +} from '@rjsf/utils'; +import { ChangeEvent, FocusEvent } from 'react'; + +import { Input } from '../components/ui/input'; +import { cn } from '../lib/utils'; + +/** The `BaseInputTemplate` is the template to use to render the basic `` component for the `core` theme. + * It is used as the template for rendering many of the based widgets that differ by `type` and callbacks only. + * It can be customized/overridden for other themes or individual implementations as needed. + * + * @param props - The `WidgetProps` for this template + */ +export default function BaseInputTemplate< + T = any, + S extends StrictRJSFSchema = RJSFSchema, + F extends FormContextType = any +>({ + id, + placeholder, + required, + readonly, + disabled, + type, + value, + onChange, + onChangeOverride, + onBlur, + onFocus, + autofocus, + options, + schema, + rawErrors = [], + children, + extraProps, +}: BaseInputTemplateProps) { + const inputProps = { + ...extraProps, + ...getInputProps(schema, type, options), + }; + const _onChange = ({ target: { value } }: ChangeEvent) => + onChange(value === '' ? options.emptyValue : value); + const _onBlur = ({ target }: FocusEvent) => onBlur(id, target && target.value); + const _onFocus = ({ target }: FocusEvent) => onFocus(id, target && target.value); + + return ( +
+ 0 })} + list={schema.examples ? examplesId(id) : undefined} + {...inputProps} + value={value || value === 0 ? value : ''} + onChange={onChangeOverride || _onChange} + onBlur={_onBlur} + onFocus={_onFocus} + aria-describedby={ariaDescribedByIds(id, !!schema.examples)} + /> + {children} + {Array.isArray(schema.examples) ? ( + (id)}> + {(schema.examples as string[]) + .concat(schema.default && !schema.examples.includes(schema.default) ? ([schema.default] as string[]) : []) + .map((example: any) => { + return + ) : null} +
+ ); +} diff --git a/packages/shadcn/src/BaseInputTemplate/index.ts b/packages/shadcn/src/BaseInputTemplate/index.ts new file mode 100644 index 0000000000..f7ef8d5939 --- /dev/null +++ b/packages/shadcn/src/BaseInputTemplate/index.ts @@ -0,0 +1,2 @@ +export { default } from './BaseInputTemplate'; +export * from './BaseInputTemplate'; diff --git a/packages/shadcn/src/CheckboxWidget/CheckboxWidget.tsx b/packages/shadcn/src/CheckboxWidget/CheckboxWidget.tsx new file mode 100644 index 0000000000..54cd0c68d4 --- /dev/null +++ b/packages/shadcn/src/CheckboxWidget/CheckboxWidget.tsx @@ -0,0 +1,88 @@ +import { + ariaDescribedByIds, + descriptionId, + FormContextType, + getTemplate, + labelValue, + RJSFSchema, + schemaRequiresTrueValue, + StrictRJSFSchema, + WidgetProps, +} from '@rjsf/utils'; +import { Checkbox } from '../components/ui/checkbox'; +import { Label } from '../components/ui/label'; + +/** The `CheckBoxWidget` is a widget for rendering boolean properties. + * It is typically used to represent a boolean. + * + * @param props - The `WidgetProps` for this component + */ +export default function CheckboxWidget< + T = any, + S extends StrictRJSFSchema = RJSFSchema, + F extends FormContextType = any +>(props: WidgetProps) { + const { + id, + value, + disabled, + readonly, + label, + hideLabel, + schema, + autofocus, + options, + onChange, + onBlur, + onFocus, + registry, + uiSchema, + } = props; + // Because an unchecked checkbox will cause html5 validation to fail, only add + // the "required" attribute if the field value must be "true", due to the + // "const" or "enum" keywords + const required = schemaRequiresTrueValue(schema); + const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>( + 'DescriptionFieldTemplate', + registry, + options + ); + + const _onChange = (checked: boolean) => onChange(checked); + const _onBlur = () => onBlur(id, value); + const _onFocus = () => onFocus(id, value); + + const description = options.description || schema.description; + return ( +
(id)} + > + {!hideLabel && !!description && ( + (id)} + description={description} + schema={schema} + uiSchema={uiSchema} + registry={registry} + /> + )} +
+ + +
+
+ ); +} diff --git a/packages/shadcn/src/CheckboxWidget/index.ts b/packages/shadcn/src/CheckboxWidget/index.ts new file mode 100644 index 0000000000..b9e3c318ec --- /dev/null +++ b/packages/shadcn/src/CheckboxWidget/index.ts @@ -0,0 +1,2 @@ +export { default } from './CheckboxWidget'; +export * from './CheckboxWidget'; diff --git a/packages/shadcn/src/CheckboxesWidget/CheckboxesWidget.tsx b/packages/shadcn/src/CheckboxesWidget/CheckboxesWidget.tsx new file mode 100644 index 0000000000..13623e8bf5 --- /dev/null +++ b/packages/shadcn/src/CheckboxesWidget/CheckboxesWidget.tsx @@ -0,0 +1,73 @@ +import { + ariaDescribedByIds, + enumOptionsDeselectValue, + enumOptionsIsSelected, + enumOptionsSelectValue, + enumOptionsValueForIndex, + FormContextType, + optionId, + RJSFSchema, + StrictRJSFSchema, + WidgetProps, +} from '@rjsf/utils'; +import { FocusEvent } from 'react'; + +import { Checkbox } from '../components/ui/checkbox'; +import { Label } from '../components/ui/label'; +import { cn } from '../lib/utils'; + +/** The `CheckboxesWidget` is a widget for rendering checkbox groups. + * It is typically used to represent an array of enums. + * + * @param props - The `WidgetProps` for this component + */ +export default function CheckboxesWidget< + T = any, + S extends StrictRJSFSchema = RJSFSchema, + F extends FormContextType = any +>({ id, disabled, options, value, autofocus, readonly, required, onChange, onBlur, onFocus }: WidgetProps) { + const { enumOptions, enumDisabled, inline, emptyValue } = options; + const checkboxesValues = Array.isArray(value) ? value : [value]; + + const _onBlur = ({ target }: FocusEvent) => + onBlur(id, enumOptionsValueForIndex(target && (target as any).value, enumOptions, emptyValue)); + const _onFocus = ({ target }: FocusEvent) => + onFocus(id, enumOptionsValueForIndex(target && (target as any).value, enumOptions, emptyValue)); + + return ( +
+ {Array.isArray(enumOptions) && + enumOptions.map((option, index: number) => { + const checked = enumOptionsIsSelected(option.value, checkboxesValues); + const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1; + const indexOptionId = optionId(id, index); + + return ( +
+ { + if (state) { + onChange(enumOptionsSelectValue(index, checkboxesValues, enumOptions)); + } else { + onChange(enumOptionsDeselectValue(index, checkboxesValues, enumOptions)); + } + }} + checked={checked} + autoFocus={autofocus && index === 0} + onBlur={_onBlur} + onFocus={_onFocus} + aria-describedby={ariaDescribedByIds(id)} + /> + +
+ ); + })} +
+ ); +} diff --git a/packages/shadcn/src/CheckboxesWidget/index.ts b/packages/shadcn/src/CheckboxesWidget/index.ts new file mode 100644 index 0000000000..97152004fa --- /dev/null +++ b/packages/shadcn/src/CheckboxesWidget/index.ts @@ -0,0 +1,2 @@ +export { default } from './CheckboxesWidget'; +export * from './CheckboxesWidget'; diff --git a/packages/shadcn/src/DescriptionField/DescriptionField.tsx b/packages/shadcn/src/DescriptionField/DescriptionField.tsx new file mode 100644 index 0000000000..f36ca7ff90 --- /dev/null +++ b/packages/shadcn/src/DescriptionField/DescriptionField.tsx @@ -0,0 +1,23 @@ +import { DescriptionFieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils'; + +/** The `DescriptionField` is the template to use to render the description of a field + * + * @param props - The `DescriptionFieldProps` for this component + */ +export default function DescriptionField< + T = any, + S extends StrictRJSFSchema = RJSFSchema, + F extends FormContextType = any +>({ id, description }: DescriptionFieldProps) { + if (description) { + return ( +
+
+ {description} +
+
+ ); + } + + return null; +} diff --git a/packages/shadcn/src/DescriptionField/index.ts b/packages/shadcn/src/DescriptionField/index.ts new file mode 100644 index 0000000000..401540d99b --- /dev/null +++ b/packages/shadcn/src/DescriptionField/index.ts @@ -0,0 +1,2 @@ +export { default } from './DescriptionField'; +export * from './DescriptionField'; diff --git a/packages/shadcn/src/ErrorList/ErrorList.tsx b/packages/shadcn/src/ErrorList/ErrorList.tsx new file mode 100644 index 0000000000..31e07ad745 --- /dev/null +++ b/packages/shadcn/src/ErrorList/ErrorList.tsx @@ -0,0 +1,26 @@ +import { ErrorListProps, FormContextType, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils'; +import { AlertCircle } from 'lucide-react'; + +import { Alert, AlertDescription, AlertTitle } from '../components/ui/alert'; + +/** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form` + * + * @param props - The `ErrorListProps` for this component + */ +export default function ErrorList({ + errors, + registry, +}: ErrorListProps) { + const { translateString } = registry; + return ( + + + {translateString(TranslatableString.ErrorsLabel)} + + {errors.map((error, i: number) => { + return • {error.stack}; + })} + + + ); +} diff --git a/packages/shadcn/src/ErrorList/index.ts b/packages/shadcn/src/ErrorList/index.ts new file mode 100644 index 0000000000..79376ace11 --- /dev/null +++ b/packages/shadcn/src/ErrorList/index.ts @@ -0,0 +1,2 @@ +export { default } from './ErrorList'; +export * from './ErrorList'; diff --git a/packages/shadcn/src/FieldErrorTemplate/FieldErrorTemplate.tsx b/packages/shadcn/src/FieldErrorTemplate/FieldErrorTemplate.tsx new file mode 100644 index 0000000000..cc30c9aac4 --- /dev/null +++ b/packages/shadcn/src/FieldErrorTemplate/FieldErrorTemplate.tsx @@ -0,0 +1,29 @@ +import { FieldErrorProps, FormContextType, RJSFSchema, StrictRJSFSchema, errorId } from '@rjsf/utils'; + +/** The `FieldErrorTemplate` component renders the errors local to the particular field + * + * @param props - The `FieldErrorProps` for the errors being rendered + */ +export default function FieldErrorTemplate< + T = any, + S extends StrictRJSFSchema = RJSFSchema, + F extends FormContextType = any +>(props: FieldErrorProps) { + const { errors = [], idSchema } = props; + if (errors.length === 0) { + return null; + } + const id = errorId(idSchema); + + return ( +
+ {errors.map((error, i: number) => { + return ( + + {error} + + ); + })} +
+ ); +} diff --git a/packages/shadcn/src/FieldErrorTemplate/index.ts b/packages/shadcn/src/FieldErrorTemplate/index.ts new file mode 100644 index 0000000000..2fbf1c353d --- /dev/null +++ b/packages/shadcn/src/FieldErrorTemplate/index.ts @@ -0,0 +1,2 @@ +export { default } from './FieldErrorTemplate'; +export * from './FieldErrorTemplate'; diff --git a/packages/shadcn/src/FieldHelpTemplate/FieldHelpTemplate.tsx b/packages/shadcn/src/FieldHelpTemplate/FieldHelpTemplate.tsx new file mode 100644 index 0000000000..76d4d6a9ea --- /dev/null +++ b/packages/shadcn/src/FieldHelpTemplate/FieldHelpTemplate.tsx @@ -0,0 +1,24 @@ +import { FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema, helpId } from '@rjsf/utils'; + +import { cn } from '../lib/utils'; + +/** The `FieldHelpTemplate` component renders any help desired for a field + * + * @param props - The `FieldHelpProps` to be rendered + */ +export default function FieldHelpTemplate< + T = any, + S extends StrictRJSFSchema = RJSFSchema, + F extends FormContextType = any +>(props: FieldHelpProps) { + const { idSchema, help, hasErrors } = props; + if (!help) { + return null; + } + const id = helpId(idSchema); + return ( + + {help} + + ); +} diff --git a/packages/shadcn/src/FieldHelpTemplate/index.ts b/packages/shadcn/src/FieldHelpTemplate/index.ts new file mode 100644 index 0000000000..b439bce3f1 --- /dev/null +++ b/packages/shadcn/src/FieldHelpTemplate/index.ts @@ -0,0 +1,2 @@ +export { default } from './FieldHelpTemplate'; +export * from './FieldHelpTemplate'; diff --git a/packages/shadcn/src/FieldTemplate/FieldTemplate.tsx b/packages/shadcn/src/FieldTemplate/FieldTemplate.tsx new file mode 100644 index 0000000000..41e3bed949 --- /dev/null +++ b/packages/shadcn/src/FieldTemplate/FieldTemplate.tsx @@ -0,0 +1,93 @@ +import { + FieldTemplateProps, + FormContextType, + getTemplate, + getUiOptions, + RJSFSchema, + StrictRJSFSchema, +} from '@rjsf/utils'; + +import { cn } from '../lib/utils'; + +/** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field + * content, (label, description, children, errors and help) inside a `WrapIfAdditional` component. + * + * @param props - The `FieldTemplateProps` for this component + */ +export default function FieldTemplate< + T = any, + S extends StrictRJSFSchema = RJSFSchema, + F extends FormContextType = any +>({ + id, + children, + displayLabel, + rawErrors = [], + errors, + help, + description, + rawDescription, + classNames, + style, + disabled, + label, + hidden, + onDropPropertyClick, + onKeyChange, + readonly, + required, + schema, + uiSchema, + registry, +}: FieldTemplateProps) { + const uiOptions = getUiOptions(uiSchema); + const WrapIfAdditionalTemplate = getTemplate<'WrapIfAdditionalTemplate', T, S, F>( + 'WrapIfAdditionalTemplate', + registry, + uiOptions + ); + if (hidden) { + return
{children}
; + } + return ( + +
+ {displayLabel && ( + + )} + {children} + {displayLabel && rawDescription && ( + 0 })} + > + {description} + + )} + {errors} + {help} +
+
+ ); +} diff --git a/packages/shadcn/src/FieldTemplate/index.ts b/packages/shadcn/src/FieldTemplate/index.ts new file mode 100644 index 0000000000..6f7dc3861c --- /dev/null +++ b/packages/shadcn/src/FieldTemplate/index.ts @@ -0,0 +1,2 @@ +export { default } from './FieldTemplate'; +export * from './FieldTemplate'; diff --git a/packages/shadcn/src/Form/Form.tsx b/packages/shadcn/src/Form/Form.tsx new file mode 100644 index 0000000000..c5a0167a8f --- /dev/null +++ b/packages/shadcn/src/Form/Form.tsx @@ -0,0 +1,16 @@ +import { ComponentType } from 'react'; + +import { FormProps, withTheme } from '@rjsf/core'; +import { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils'; + +import { generateTheme } from '../Theme'; + +export function generateForm< + T = any, + S extends StrictRJSFSchema = RJSFSchema, + F extends FormContextType = any +>(): ComponentType> { + return withTheme(generateTheme()); +} + +export default generateForm(); diff --git a/packages/shadcn/src/Form/index.ts b/packages/shadcn/src/Form/index.ts new file mode 100644 index 0000000000..60f008b592 --- /dev/null +++ b/packages/shadcn/src/Form/index.ts @@ -0,0 +1,2 @@ +export { default } from './Form'; +export * from './Form'; diff --git a/packages/shadcn/src/GridTemplate/GridTemplate.tsx b/packages/shadcn/src/GridTemplate/GridTemplate.tsx new file mode 100644 index 0000000000..193ffe1fe5 --- /dev/null +++ b/packages/shadcn/src/GridTemplate/GridTemplate.tsx @@ -0,0 +1,19 @@ +import { GridTemplateProps } from '@rjsf/utils'; +import { cn } from '../lib/utils'; + +/** Renders a `GridTemplate` for mui, which is expecting the column sizing information coming in via the + * extra props provided by the caller, which are spread directly on the `Grid2`. + * + * @param props - The GridTemplateProps, including the extra props containing the mui grid positioning details + */ +export default function GridTemplate(props: GridTemplateProps) { + const { children, column, ...rest } = props; + return ( +
+ {children} +
+ ); +} diff --git a/packages/shadcn/src/GridTemplate/index.ts b/packages/shadcn/src/GridTemplate/index.ts new file mode 100644 index 0000000000..ed6c2c4fc5 --- /dev/null +++ b/packages/shadcn/src/GridTemplate/index.ts @@ -0,0 +1,2 @@ +export { default } from './GridTemplate'; +export * from './GridTemplate'; diff --git a/packages/shadcn/src/IconButton/IconButton.tsx b/packages/shadcn/src/IconButton/IconButton.tsx new file mode 100644 index 0000000000..72b2e296f9 --- /dev/null +++ b/packages/shadcn/src/IconButton/IconButton.tsx @@ -0,0 +1,104 @@ +import { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils'; +import { ChevronDown, ChevronUp, Copy, Trash2 } from 'lucide-react'; + +import { Button, ButtonProps } from '../components/ui/button'; + +/** Base button component that renders a Shadcn button with an icon for RJSF form actions. + * This component serves as the foundation for other specialized buttons used in array operations. + * It combines RJSF's IconButtonProps with Shadcn's ButtonProps to provide a consistent styling + * and behavior across the form. + * + * @param props - The combined props from RJSF IconButtonProps and Shadcn ButtonProps, including icon and event handlers + */ +export default function IconButton( + props: IconButtonProps & ButtonProps +) { + const { icon, iconType, className, uiSchema, registry, ...otherProps } = props; + return ( + + ); +} + +/** Renders a copy button for RJSF array fields that allows users to duplicate array items. + * The button includes a copy icon and uses the RJSF translation system for the tooltip text. + * This is used within ArrayField to provide item duplication functionality. + * + * @param props - The RJSF icon button properties, including registry for translations and event handlers + */ +export function CopyButton( + props: IconButtonProps +) { + const { + registry: { translateString }, + } = props; + return ( + } /> + ); +} + +/** Renders a move down button for RJSF array fields that allows reordering of array items. + * The button includes a chevron-down icon and uses the RJSF translation system for the tooltip text. + * This is used within ArrayField to allow moving items to a lower index in the array. + * + * @param props - The RJSF icon button properties, including registry for translations and event handlers + */ +export function MoveDownButton( + props: IconButtonProps +) { + const { + registry: { translateString }, + } = props; + return ( + } + /> + ); +} + +/** Renders a move up button for RJSF array fields that allows reordering of array items. + * The button includes a chevron-up icon and uses the RJSF translation system for the tooltip text. + * This is used within ArrayField to allow moving items to a higher index in the array. + * + * @param props - The RJSF icon button properties, including registry for translations and event handlers + */ +export function MoveUpButton( + props: IconButtonProps +) { + const { + registry: { translateString }, + } = props; + return ( + } + /> + ); +} + +/** Renders a remove button for RJSF array fields that allows deletion of array items. + * The button includes a trash icon and uses the RJSF translation system for the tooltip text. + * It has special styling with destructive colors to indicate its dangerous action. + * This is used within ArrayField to provide item removal functionality. + * + * @param props - The RJSF icon button properties, including registry for translations and event handlers + */ +export function RemoveButton( + props: IconButtonProps +) { + const { + registry: { translateString }, + } = props; + return ( + } + /> + ); +} diff --git a/packages/shadcn/src/IconButton/index.ts b/packages/shadcn/src/IconButton/index.ts new file mode 100644 index 0000000000..655ec4c488 --- /dev/null +++ b/packages/shadcn/src/IconButton/index.ts @@ -0,0 +1,2 @@ +export { default } from './IconButton'; +export * from './IconButton'; diff --git a/packages/shadcn/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx b/packages/shadcn/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx new file mode 100644 index 0000000000..324276be55 --- /dev/null +++ b/packages/shadcn/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx @@ -0,0 +1,89 @@ +import { + buttonId, + canExpand, + descriptionId, + FormContextType, + getTemplate, + getUiOptions, + ObjectFieldTemplateProps, + RJSFSchema, + StrictRJSFSchema, + titleId, +} from '@rjsf/utils'; + +/** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the + * title and description if available. If the object is expandable, then an `AddButton` is also rendered after all + * the properties. + * + * @param props - The `ObjectFieldTemplateProps` for this component + */ +export default function ObjectFieldTemplate< + T = any, + S extends StrictRJSFSchema = RJSFSchema, + F extends FormContextType = any +>({ + description, + title, + properties, + required, + uiSchema, + idSchema, + schema, + formData, + onAddClick, + disabled, + readonly, + registry, +}: ObjectFieldTemplateProps) { + const uiOptions = getUiOptions(uiSchema); + const TitleFieldTemplate = getTemplate<'TitleFieldTemplate', T, S, F>('TitleFieldTemplate', registry, uiOptions); + const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>( + 'DescriptionFieldTemplate', + registry, + uiOptions + ); + // Button templates are not overridden in the uiSchema + const { + ButtonTemplates: { AddButton }, + } = registry.templates; + return ( + <> + {title && ( + (idSchema)} + title={title} + required={required} + schema={schema} + uiSchema={uiSchema} + registry={registry} + /> + )} + {description && ( + (idSchema)} + description={description} + schema={schema} + uiSchema={uiSchema} + registry={registry} + /> + )} +
+ {properties.map((element: any, index: number) => ( +
+
{element.content}
+
+ ))} + {canExpand(schema, uiSchema, formData) ? ( + (idSchema, 'add')} + onClick={onAddClick(schema)} + disabled={disabled || readonly} + className='object-property-expand' + uiSchema={uiSchema} + registry={registry} + /> + ) : null} +
+ + ); +} diff --git a/packages/shadcn/src/ObjectFieldTemplate/index.ts b/packages/shadcn/src/ObjectFieldTemplate/index.ts new file mode 100644 index 0000000000..77c68a9a40 --- /dev/null +++ b/packages/shadcn/src/ObjectFieldTemplate/index.ts @@ -0,0 +1,2 @@ +export { default } from './ObjectFieldTemplate'; +export * from './ObjectFieldTemplate'; diff --git a/packages/shadcn/src/RadioWidget/RadioWidget.tsx b/packages/shadcn/src/RadioWidget/RadioWidget.tsx new file mode 100644 index 0000000000..43f2870b9a --- /dev/null +++ b/packages/shadcn/src/RadioWidget/RadioWidget.tsx @@ -0,0 +1,77 @@ +import { + ariaDescribedByIds, + enumOptionsIsSelected, + enumOptionsValueForIndex, + FormContextType, + optionId, + RJSFSchema, + StrictRJSFSchema, + WidgetProps, +} from '@rjsf/utils'; +import { FocusEvent } from 'react'; + +import { Label } from '../components/ui/label'; +import { RadioGroup, RadioGroupItem } from '../components/ui/radio-group'; +import { cn } from '../lib/utils'; + +/** The `RadioWidget` is a widget for rendering a radio group. + * It is typically used with a string property constrained with enum options. + * + * @param props - The `WidgetProps` for this component + */ +export default function RadioWidget({ + id, + options, + value, + required, + disabled, + readonly, + onChange, + onBlur, + onFocus, +}: WidgetProps) { + const { enumOptions, enumDisabled, emptyValue } = options; + + const _onChange = (value: string) => onChange(enumOptionsValueForIndex(value, enumOptions, emptyValue)); + const _onBlur = ({ target }: FocusEvent) => + onBlur(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue)); + const _onFocus = ({ target }: FocusEvent) => + onFocus(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue)); + + const inline = Boolean(options && options.inline); + + return ( +
+ { + _onChange(e); + }} + onBlur={_onBlur} + onFocus={_onFocus} + aria-describedby={ariaDescribedByIds(id)} + orientation={inline ? 'horizontal' : 'vertical'} + className={cn('flex flex-wrap', { 'flex-col': !inline })} + > + {Array.isArray(enumOptions) && + enumOptions.map((option, index) => { + const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1; + const checked = enumOptionsIsSelected(option.value, value); + return ( +
+ + +
+ ); + })} +
+
+ ); +} diff --git a/packages/shadcn/src/RadioWidget/index.ts b/packages/shadcn/src/RadioWidget/index.ts new file mode 100644 index 0000000000..10292dc565 --- /dev/null +++ b/packages/shadcn/src/RadioWidget/index.ts @@ -0,0 +1,2 @@ +export { default } from './RadioWidget'; +export * from './RadioWidget'; diff --git a/packages/shadcn/src/RangeWidget/RangeWidget.tsx b/packages/shadcn/src/RangeWidget/RangeWidget.tsx new file mode 100644 index 0000000000..a431abc33c --- /dev/null +++ b/packages/shadcn/src/RangeWidget/RangeWidget.tsx @@ -0,0 +1,64 @@ +import { ariaDescribedByIds, FormContextType, rangeSpec, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils'; +import _pick from 'lodash/pick'; + +import { Slider } from '../components/ui/slider'; + +const allowedProps = [ + 'name', + 'min', + 'max', + 'step', + 'orientation', + 'disabled', + 'defaultValue', + 'value', + 'onValueChange', + 'className', + 'dir', + 'inverted', + 'minStepsBetweenThumbs', +]; + +/** + * A range widget component that renders a slider for number input + * @param {object} props - The widget properties + * @param {number} props.value - The current value of the range + * @param {boolean} props.readonly - Whether the widget is read-only + * @param {boolean} props.disabled - Whether the widget is disabled + * @param {object} props.options - Additional options for the widget + * @param props.schema - The JSON schema for this field + * @param {(value: any) => void} props.onChange - Callback for when the value changes + * @param {string} props.label - The label for the range input + * @param {string} props.id - The unique identifier for the widget + * @returns {JSX.Element} The rendered range widget + */ +export default function RangeWidget({ + value, + readonly, + disabled, + options, + schema, + onChange, + label, + id, +}: WidgetProps): JSX.Element { + const _onChange = (value: number[]) => onChange(value[0]); + + const sliderProps = { value, label, id, ...rangeSpec(schema) }; + const uiProps = { id, ..._pick((options.props as object) || {}, allowedProps) }; + return ( + <> + (id)} + /> + {value} + + ); +} diff --git a/packages/shadcn/src/RangeWidget/index.ts b/packages/shadcn/src/RangeWidget/index.ts new file mode 100644 index 0000000000..d8c49226c6 --- /dev/null +++ b/packages/shadcn/src/RangeWidget/index.ts @@ -0,0 +1,2 @@ +export { default } from './RangeWidget'; +export * from './RangeWidget'; diff --git a/packages/shadcn/src/SelectWidget/SelectWidget.tsx b/packages/shadcn/src/SelectWidget/SelectWidget.tsx new file mode 100644 index 0000000000..798772b9db --- /dev/null +++ b/packages/shadcn/src/SelectWidget/SelectWidget.tsx @@ -0,0 +1,93 @@ +import { + ariaDescribedByIds, + enumOptionsIndexForValue, + enumOptionsValueForIndex, + FormContextType, + RJSFSchema, + StrictRJSFSchema, + WidgetProps, +} from '@rjsf/utils'; + +import { FancyMultiSelect } from '../components/ui/fancy-multi-select'; +import { FancySelect } from '../components/ui/fancy-select'; +import { cn } from '../lib/utils'; + +/** The `SelectWidget` is a widget for rendering dropdowns. + * It is typically used with string properties constrained with enum options. + * + * @param props - The `WidgetProps` for this component + */ +export default function SelectWidget< + T = any, + S extends StrictRJSFSchema = RJSFSchema, + F extends FormContextType = any +>({ + id, + options, + required, + disabled, + readonly, + value, + multiple, + autofocus, + onChange, + onBlur, + onFocus, + defaultValue, + placeholder, + rawErrors = [], +}: WidgetProps) { + const { enumOptions, enumDisabled, emptyValue: optEmptyValue } = options; + + const _onFancyFocus = () => { + onFocus(id, enumOptionsValueForIndex(value, enumOptions, optEmptyValue)); + }; + + const _onFancyBlur = () => { + onBlur(id, enumOptionsValueForIndex(value, enumOptions, optEmptyValue)); + }; + + const items = (enumOptions as any)?.map(({ value, label }: any, index: number) => ({ + value: multiple ? value : index.toString(), + label: label, + index, + disabled: Array.isArray(enumDisabled) && enumDisabled.includes(value), + })); + + return ( +
+ {!multiple ? ( + (value ?? defaultValue, enumOptions, false) as unknown as string} + onValueChange={(selectedValue) => { + onChange(enumOptionsValueForIndex(selectedValue, enumOptions, optEmptyValue)); + }} + autoFocus={autofocus} + disabled={disabled || readonly} + required={required} + placeholder={placeholder} + className={cn({ 'border-destructive': rawErrors.length > 0 })} + onFocus={_onFancyFocus} + onBlur={_onFancyBlur} + ariaDescribedby={ariaDescribedByIds(id)} + /> + ) : ( + 0 ? 'border-destructive' : ''} + items={items} + selected={value} + onValueChange={(values) => { + onChange(enumOptionsValueForIndex(values, enumOptions, optEmptyValue)); + }} + onFocus={_onFancyFocus} + onBlur={_onFancyBlur} + /> + )} +
+ ); +} diff --git a/packages/shadcn/src/SelectWidget/index.ts b/packages/shadcn/src/SelectWidget/index.ts new file mode 100644 index 0000000000..e37ea725b8 --- /dev/null +++ b/packages/shadcn/src/SelectWidget/index.ts @@ -0,0 +1,2 @@ +export { default } from './SelectWidget'; +export * from './SelectWidget'; diff --git a/packages/shadcn/src/SubmitButton/SubmitButton.tsx b/packages/shadcn/src/SubmitButton/SubmitButton.tsx new file mode 100644 index 0000000000..8768593267 --- /dev/null +++ b/packages/shadcn/src/SubmitButton/SubmitButton.tsx @@ -0,0 +1,21 @@ +import { FormContextType, getSubmitButtonOptions, RJSFSchema, StrictRJSFSchema, SubmitButtonProps } from '@rjsf/utils'; + +import { Button } from '../components/ui/button'; + +/** The `SubmitButton` renders a button that represent the `Submit` action on a form + */ +export default function SubmitButton( + props: SubmitButtonProps +) { + const { submitText, norender, props: submitButtonProps } = getSubmitButtonOptions(props.uiSchema); + if (norender) { + return null; + } + return ( +
+ +
+ ); +} diff --git a/packages/shadcn/src/SubmitButton/index.ts b/packages/shadcn/src/SubmitButton/index.ts new file mode 100644 index 0000000000..f676497ba2 --- /dev/null +++ b/packages/shadcn/src/SubmitButton/index.ts @@ -0,0 +1,2 @@ +export { default } from './SubmitButton'; +export * from './SubmitButton'; diff --git a/packages/shadcn/src/Templates/Templates.ts b/packages/shadcn/src/Templates/Templates.ts new file mode 100644 index 0000000000..ccb072cb79 --- /dev/null +++ b/packages/shadcn/src/Templates/Templates.ts @@ -0,0 +1,47 @@ +import { FormContextType, RJSFSchema, StrictRJSFSchema, TemplatesType } from '@rjsf/utils'; +import AddButton from '../AddButton'; +import ArrayFieldItemTemplate from '../ArrayFieldItemTemplate'; +import ArrayFieldTemplate from '../ArrayFieldTemplate'; +import BaseInputTemplate from '../BaseInputTemplate/BaseInputTemplate'; +import DescriptionField from '../DescriptionField'; +import ErrorList from '../ErrorList'; +import FieldErrorTemplate from '../FieldErrorTemplate'; +import FieldHelpTemplate from '../FieldHelpTemplate'; +import FieldTemplate from '../FieldTemplate'; +import GridTemplate from '../GridTemplate'; +import { CopyButton, MoveDownButton, MoveUpButton, RemoveButton } from '../IconButton'; +import ObjectFieldTemplate from '../ObjectFieldTemplate'; +import SubmitButton from '../SubmitButton'; +import TitleField from '../TitleField'; +import WrapIfAdditionalTemplate from '../WrapIfAdditionalTemplate'; + +export function generateTemplates< + T = any, + S extends StrictRJSFSchema = RJSFSchema, + F extends FormContextType = any +>(): Partial> { + return { + ArrayFieldItemTemplate, + ArrayFieldTemplate, + BaseInputTemplate, + ButtonTemplates: { + AddButton, + CopyButton, + MoveDownButton, + MoveUpButton, + RemoveButton, + SubmitButton, + }, + DescriptionFieldTemplate: DescriptionField, + ErrorListTemplate: ErrorList, + FieldErrorTemplate, + FieldHelpTemplate, + FieldTemplate, + GridTemplate, + ObjectFieldTemplate, + TitleFieldTemplate: TitleField, + WrapIfAdditionalTemplate, + }; +} + +export default generateTemplates(); diff --git a/packages/shadcn/src/Templates/index.ts b/packages/shadcn/src/Templates/index.ts new file mode 100644 index 0000000000..612ccf692a --- /dev/null +++ b/packages/shadcn/src/Templates/index.ts @@ -0,0 +1,2 @@ +export { default } from './Templates'; +export * from './Templates'; diff --git a/packages/shadcn/src/TextareaWidget/TextareaWidget.tsx b/packages/shadcn/src/TextareaWidget/TextareaWidget.tsx new file mode 100644 index 0000000000..5f09d42118 --- /dev/null +++ b/packages/shadcn/src/TextareaWidget/TextareaWidget.tsx @@ -0,0 +1,59 @@ +import { ariaDescribedByIds, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils'; +import { ChangeEvent, FocusEvent } from 'react'; + +import { Textarea } from '../components/ui/textarea'; + +type CustomWidgetProps = WidgetProps< + T, + S, + F +> & { + options: any; +}; + +/** The `TextareaWidget` is a widget for rendering input fields as textarea. + * + * @param props - The `WidgetProps` for this component + */ +export default function TextareaWidget< + T = any, + S extends StrictRJSFSchema = RJSFSchema, + F extends FormContextType = any +>({ + id, + placeholder, + value, + required, + disabled, + autofocus, + readonly, + onBlur, + onFocus, + onChange, + options, +}: CustomWidgetProps) { + const _onChange = ({ target: { value } }: ChangeEvent) => + onChange(value === '' ? options.emptyValue : value); + const _onBlur = ({ target }: FocusEvent) => onBlur(id, target && target.value); + const _onFocus = ({ target }: FocusEvent) => onFocus(id, target && target.value); + + return ( +
+