diff --git a/package-lock.json b/package-lock.json index 9f4d5f659..9fc9c1b85 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,11 +12,12 @@ "@docusaurus/preset-classic": "2.1.0", "@emotion/react": "11.7.1", "@emotion/styled": "11.6.0", - "@mantine/core": "7.1.2", + "@mantine/core": "7.8.0", + "@mantine/dates": "7.8.0", "@material-ui/core": "4.11.2", "@material-ui/icons": "4.11.2", "@mui/material": "5.4.1", - "@tabler/icons-react": "2.38.0", + "@tabler/icons-react": "3.2.0", "@testing-library/jest-dom": "5.16.5", "@testing-library/react": "12.1.5", "@testing-library/user-event": "14.4.3", @@ -3298,13 +3299,13 @@ } }, "node_modules/@floating-ui/react": { - "version": "0.24.8", - "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.24.8.tgz", - "integrity": "sha512-AuYeDoaR8jtUlUXtZ1IJ/6jtBkGnSpJXbGNzokBL87VDJ8opMq1Bgrc0szhK482ReQY6KZsMoZCVSb4xwalkBA==", + "version": "0.26.16", + "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.26.16.tgz", + "integrity": "sha512-HEf43zxZNAI/E781QIVpYSF3K2VH4TTYZpqecjdsFkjsaU1EbaWcM++kw0HXFffj7gDUcBFevX8s0rQGQpxkow==", "dependencies": { - "@floating-ui/react-dom": "^2.0.1", - "aria-hidden": "^1.2.3", - "tabbable": "^6.0.1" + "@floating-ui/react-dom": "^2.1.0", + "@floating-ui/utils": "^0.2.0", + "tabbable": "^6.0.0" }, "peerDependencies": { "react": ">=16.8.0", @@ -5067,46 +5068,69 @@ ] }, "node_modules/@mantine/core": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@mantine/core/-/core-7.1.2.tgz", - "integrity": "sha512-EZg82V/+uA2bM981mEUOUGfqKIRsMfvxLdAPQpurhtqsnq4yBj1xjC3KzX/Eas9QhhHuR+4DJJyGTuO9aOK6nQ==", - "dependencies": { - "@floating-ui/react": "^0.24.8", - "clsx": "2.0.0", - "react-number-format": "^5.2.2", - "react-remove-scroll": "^2.5.6", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@mantine/core/-/core-7.8.0.tgz", + "integrity": "sha512-19RKuNdJ/s8pZjy2w2rvTsl4ybi/XM6vf+Kc0WY7kpLFCvdG+/UxNi1MuJF8t2Zs0QSFeb/H5yZQNe0XPbegHw==", + "dependencies": { + "@floating-ui/react": "^0.26.9", + "clsx": "2.1.0", + "react-number-format": "^5.3.1", + "react-remove-scroll": "^2.5.7", "react-textarea-autosize": "8.5.3", - "type-fest": "^3.13.1" + "type-fest": "^4.12.0" }, "peerDependencies": { - "@mantine/hooks": "7.1.2", + "@mantine/hooks": "7.8.0", "react": "^18.2.0", "react-dom": "^18.2.0" } }, "node_modules/@mantine/core/node_modules/clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==", "engines": { "node": ">=6" } }, "node_modules/@mantine/core/node_modules/type-fest": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", - "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.18.2.tgz", + "integrity": "sha512-+suCYpfJLAe4OXS6+PPXjW3urOS4IoP9waSiLuXfLgqZODKw/aWwASvzqE886wA0kQgGy0mIWyhd87VpqIy6Xg==", "engines": { - "node": ">=14.16" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@mantine/dates": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@mantine/dates/-/dates-7.8.0.tgz", + "integrity": "sha512-9jjiYMwP3jQOpOLKkjhp9uf2BGhtEbOnOzyAlpLOS0CJJlYtB0tO6dJ3JaogrOZ/Yfee7ZUBgouCG5EkR4/qtQ==", + "dependencies": { + "clsx": "2.1.0" + }, + "peerDependencies": { + "@mantine/core": "7.8.0", + "@mantine/hooks": "7.8.0", + "dayjs": ">=1.0.0", + "react": "^18.2.0", + "react-dom": "^18.2.0" + } + }, + "node_modules/@mantine/dates/node_modules/clsx": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==", + "engines": { + "node": ">=6" + } + }, "node_modules/@mantine/hooks": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@mantine/hooks/-/hooks-7.1.2.tgz", - "integrity": "sha512-2sqfBKse/aJq93zEpIn4OY+jRACmDIWBixfBgobRfltDyeL8G+3223LSAaeT6ZD8+h2YBJVmbCD5QY7bx2l11Q==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@mantine/hooks/-/hooks-7.8.0.tgz", + "integrity": "sha512-+70fkgjhVJeJ+nJqnburIM3UAsfvxat1Low9HMPobLbv64FIdB4Nzu5ct3qojNQ58r5sK01tg5UoFIJYslaVrg==", "peer": true, "peerDependencies": { "react": "^18.2.0" @@ -8994,28 +9018,27 @@ } }, "node_modules/@tabler/icons": { - "version": "2.38.0", - "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-2.38.0.tgz", - "integrity": "sha512-icDKK6n8jUYAavHK+L2Xe0/tYjwZVS7uhVazhCMVjdm3RfJLFbeLSNEIWcYdGOg6QAock9yqWse8hnhvsy2M3w==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-3.2.0.tgz", + "integrity": "sha512-h8GQ2rtxgiSjltrVz4vcopAxTPSpUSUi5nBfJ09H3Bk4fJk6wZ/dVUjzhv/BHfDwGTkAxZBiYe/Q/T95cPeg5Q==", "funding": { "type": "github", "url": "https://github.com/sponsors/codecalm" } }, "node_modules/@tabler/icons-react": { - "version": "2.38.0", - "resolved": "https://registry.npmjs.org/@tabler/icons-react/-/icons-react-2.38.0.tgz", - "integrity": "sha512-4oLo7z7HkFQXZNNAo3tmhpdZTeFrSNSxngmrEOGZ6WsjT2WRlc6kcEHMVxfCekV19JeB6Yprg30Bdr4sUYJLiQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@tabler/icons-react/-/icons-react-3.2.0.tgz", + "integrity": "sha512-b1mZT1XpZrzvbM+eFe1YbYbxkzgJ18tM4knZKqXh0gnHDZ6XVLIH3TzJZ3HZ7PTkUqZLZ7XcGae3qQVGburlBw==", "dependencies": { - "@tabler/icons": "2.38.0", - "prop-types": "^15.7.2" + "@tabler/icons": "3.2.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/codecalm" }, "peerDependencies": { - "react": "^16.5.1 || ^17.0.0 || ^18.0.0" + "react": ">= 16" } }, "node_modules/@testing-library/dom": { @@ -10388,17 +10411,6 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, - "node_modules/aria-hidden": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.4.tgz", - "integrity": "sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==", - "dependencies": { - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/aria-query": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", @@ -31589,13 +31601,13 @@ } }, "@floating-ui/react": { - "version": "0.24.8", - "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.24.8.tgz", - "integrity": "sha512-AuYeDoaR8jtUlUXtZ1IJ/6jtBkGnSpJXbGNzokBL87VDJ8opMq1Bgrc0szhK482ReQY6KZsMoZCVSb4xwalkBA==", + "version": "0.26.16", + "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.26.16.tgz", + "integrity": "sha512-HEf43zxZNAI/E781QIVpYSF3K2VH4TTYZpqecjdsFkjsaU1EbaWcM++kw0HXFffj7gDUcBFevX8s0rQGQpxkow==", "requires": { - "@floating-ui/react-dom": "^2.0.1", - "aria-hidden": "^1.2.3", - "tabbable": "^6.0.1" + "@floating-ui/react-dom": "^2.1.0", + "@floating-ui/utils": "^0.2.0", + "tabbable": "^6.0.0" } }, "@floating-ui/react-dom": { @@ -32983,34 +32995,49 @@ "optional": true }, "@mantine/core": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@mantine/core/-/core-7.1.2.tgz", - "integrity": "sha512-EZg82V/+uA2bM981mEUOUGfqKIRsMfvxLdAPQpurhtqsnq4yBj1xjC3KzX/Eas9QhhHuR+4DJJyGTuO9aOK6nQ==", - "requires": { - "@floating-ui/react": "^0.24.8", - "clsx": "2.0.0", - "react-number-format": "^5.2.2", - "react-remove-scroll": "^2.5.6", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@mantine/core/-/core-7.8.0.tgz", + "integrity": "sha512-19RKuNdJ/s8pZjy2w2rvTsl4ybi/XM6vf+Kc0WY7kpLFCvdG+/UxNi1MuJF8t2Zs0QSFeb/H5yZQNe0XPbegHw==", + "requires": { + "@floating-ui/react": "^0.26.9", + "clsx": "2.1.0", + "react-number-format": "^5.3.1", + "react-remove-scroll": "^2.5.7", "react-textarea-autosize": "8.5.3", - "type-fest": "^3.13.1" + "type-fest": "^4.12.0" }, "dependencies": { "clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==" }, "type-fest": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", - "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==" + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.18.2.tgz", + "integrity": "sha512-+suCYpfJLAe4OXS6+PPXjW3urOS4IoP9waSiLuXfLgqZODKw/aWwASvzqE886wA0kQgGy0mIWyhd87VpqIy6Xg==" + } + } + }, + "@mantine/dates": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@mantine/dates/-/dates-7.8.0.tgz", + "integrity": "sha512-9jjiYMwP3jQOpOLKkjhp9uf2BGhtEbOnOzyAlpLOS0CJJlYtB0tO6dJ3JaogrOZ/Yfee7ZUBgouCG5EkR4/qtQ==", + "requires": { + "clsx": "2.1.0" + }, + "dependencies": { + "clsx": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==" } } }, "@mantine/hooks": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@mantine/hooks/-/hooks-7.1.2.tgz", - "integrity": "sha512-2sqfBKse/aJq93zEpIn4OY+jRACmDIWBixfBgobRfltDyeL8G+3223LSAaeT6ZD8+h2YBJVmbCD5QY7bx2l11Q==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@mantine/hooks/-/hooks-7.8.0.tgz", + "integrity": "sha512-+70fkgjhVJeJ+nJqnburIM3UAsfvxat1Low9HMPobLbv64FIdB4Nzu5ct3qojNQ58r5sK01tg5UoFIJYslaVrg==", "peer": true, "requires": {} }, @@ -35494,17 +35521,16 @@ } }, "@tabler/icons": { - "version": "2.38.0", - "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-2.38.0.tgz", - "integrity": "sha512-icDKK6n8jUYAavHK+L2Xe0/tYjwZVS7uhVazhCMVjdm3RfJLFbeLSNEIWcYdGOg6QAock9yqWse8hnhvsy2M3w==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-3.2.0.tgz", + "integrity": "sha512-h8GQ2rtxgiSjltrVz4vcopAxTPSpUSUi5nBfJ09H3Bk4fJk6wZ/dVUjzhv/BHfDwGTkAxZBiYe/Q/T95cPeg5Q==" }, "@tabler/icons-react": { - "version": "2.38.0", - "resolved": "https://registry.npmjs.org/@tabler/icons-react/-/icons-react-2.38.0.tgz", - "integrity": "sha512-4oLo7z7HkFQXZNNAo3tmhpdZTeFrSNSxngmrEOGZ6WsjT2WRlc6kcEHMVxfCekV19JeB6Yprg30Bdr4sUYJLiQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@tabler/icons-react/-/icons-react-3.2.0.tgz", + "integrity": "sha512-b1mZT1XpZrzvbM+eFe1YbYbxkzgJ18tM4knZKqXh0gnHDZ6XVLIH3TzJZ3HZ7PTkUqZLZ7XcGae3qQVGburlBw==", "requires": { - "@tabler/icons": "2.38.0", - "prop-types": "^15.7.2" + "@tabler/icons": "3.2.0" } }, "@testing-library/dom": { @@ -36675,14 +36701,6 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, - "aria-hidden": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.4.tgz", - "integrity": "sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==", - "requires": { - "tslib": "^2.0.0" - } - }, "aria-query": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", diff --git a/package.json b/package.json index 08760fc98..511201ade 100644 --- a/package.json +++ b/package.json @@ -22,11 +22,12 @@ "@docusaurus/preset-classic": "2.1.0", "@emotion/react": "11.7.1", "@emotion/styled": "11.6.0", - "@mantine/core": "7.1.2", + "@mantine/core": "7.8.0", + "@mantine/dates": "7.8.0", + "@tabler/icons-react": "3.2.0", "@material-ui/core": "4.11.2", "@material-ui/icons": "4.11.2", "@mui/material": "5.4.1", - "@tabler/icons-react": "2.38.0", "@testing-library/jest-dom": "5.16.5", "@testing-library/react": "12.1.5", "@testing-library/user-event": "14.4.3", diff --git a/packages/uniforms-mantine/src/BoolField.tsx b/packages/uniforms-mantine/src/BoolField.tsx index 92a50a796..7efcb1e9e 100644 --- a/packages/uniforms-mantine/src/BoolField.tsx +++ b/packages/uniforms-mantine/src/BoolField.tsx @@ -23,6 +23,7 @@ function Bool({ }: BoolFieldProps) { return ( + onChange={(date: Date) => readOnly ? undefined : date === null @@ -60,7 +61,7 @@ function Date({ placeholder={placeholder} ref={inputRef as RefObject} value={value} - onChange={date => + onChange={(date: Date) => readOnly ? undefined : date === null diff --git a/packages/uniforms-mantine/src/HiddenField.tsx b/packages/uniforms-mantine/src/HiddenField.tsx index 616f87f08..3918ebf59 100644 --- a/packages/uniforms-mantine/src/HiddenField.tsx +++ b/packages/uniforms-mantine/src/HiddenField.tsx @@ -22,6 +22,7 @@ export default function HiddenField({ value, ...rawProps }: HiddenFieldProps) { return props.noDOM ? null : ( { diff --git a/packages/uniforms-mantine/src/ListField.tsx b/packages/uniforms-mantine/src/ListField.tsx index 2a22dd589..7f94f0178 100644 --- a/packages/uniforms-mantine/src/ListField.tsx +++ b/packages/uniforms-mantine/src/ListField.tsx @@ -33,6 +33,7 @@ function List({ }: ListFieldProps) { return ( @@ -47,7 +48,7 @@ function List({ error={showInlineError && !!error && errorMessage} > - {value?.map(itemIndex => + {value?.map((item, itemIndex) => Children.map(children, (child, childIndex) => isValidElement(child) ? cloneElement(child, { diff --git a/packages/uniforms-mantine/src/ListItemField.tsx b/packages/uniforms-mantine/src/ListItemField.tsx index a8ca6f71a..ab7574f4d 100644 --- a/packages/uniforms-mantine/src/ListItemField.tsx +++ b/packages/uniforms-mantine/src/ListItemField.tsx @@ -14,7 +14,7 @@ function ListItem({ {children} - + diff --git a/packages/uniforms-mantine/src/LongTextField.tsx b/packages/uniforms-mantine/src/LongTextField.tsx index c8e8c3069..bf4cfa205 100644 --- a/packages/uniforms-mantine/src/LongTextField.tsx +++ b/packages/uniforms-mantine/src/LongTextField.tsx @@ -21,6 +21,7 @@ function LongText({ }: LongTextFieldProps) { return (