Skip to content

Commit

Permalink
Revert "Revert "feature/GW-1602/Updated-dependencies""
Browse files Browse the repository at this point in the history
  • Loading branch information
remko48 authored Nov 22, 2023
1 parent 9425dae commit 78c7113
Show file tree
Hide file tree
Showing 8 changed files with 6,142 additions and 5,273 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

- **Version 2.2 (breaking changes from 2.1.x)**

- 2.2.27: Updated Checkbox component to NLDS.
- 2.2.27:
- Updated dependencies to latest versions.
- Updated Checkbox component to NLDS.
- 2.2.26: Updated NotificationPopUp secondary button to have hover and href.
- 2.2.25:
- Added box-shadow to CardWrapper.
Expand Down
11,316 changes: 6,095 additions & 5,221 deletions package-lock.json

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@
},
"homepage": "https://github.com/ConductionNL/conduction-components#readme",
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.2.0",
"@fortawesome/free-solid-svg-icons": "^6.2.0",
"@fortawesome/fontawesome-svg-core": "^6.4.2",
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"@fortawesome/react-fontawesome": "^0.2.0",
"@utrecht/component-library-react": "1.0.0-alpha.394",
"clsx": "^1.1.1",
"gatsby": "^4.11.1",
"@utrecht/component-library-react": "2.0.0",
"clsx": "^2.0.0",
"gatsby": "^5.12.9",
"react": "^18.2.0",
"react-datepicker": "^4.10.0",
"react-hook-form": "7.29.0",
"react-datepicker": "^4.23.0",
"react-hook-form": "7.48.2",
"react-paginate": "^8.2.0",
"react-select": "5.3.2",
"react-select": "5.8.0",
"react-tabs": "^6.0.2",
"react-tooltip": "^5.21.3"
"react-tooltip": "^5.23.0"
},
"devDependencies": {
"@types/node": "^17.0.23",
"@types/react": "^18.2.0",
"@types/react-datepicker": "^4.8.0",
"@types/react-dom": "^18.2.0",
"rimraf": "^4.4.0",
"tsc-hooks": "^1.1.1",
"typescript": "^4.6.3"
"@types/node": "^20.9.3",
"@types/react": "^18.2.38",
"@types/react-datepicker": "^4.19.3",
"@types/react-dom": "^18.2.16",
"rimraf": "^5.0.5",
"tsc-hooks": "^1.1.2",
"typescript": "^5.3.2"
}
}
4 changes: 2 additions & 2 deletions src/components/formFields/createKeyValue/CreateKeyValue.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from "react";
import * as styles from "./CreateKeyValue.module.css";
import clsx from "clsx";
import { Control, Controller, FieldValues } from "react-hook-form";
import { IReactHookFormProps } from "../types";
import {
Expand All @@ -12,7 +13,6 @@ import {
Textbox,
Button,
} from "@utrecht/component-library-react/dist/css-module";
import clsx from "clsx";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faCopy, faTrash } from "@fortawesome/free-solid-svg-icons";
import { ErrorMessage } from "../errorMessage/ErrorMessage";
Expand Down Expand Up @@ -55,7 +55,7 @@ export const CreateKeyValue = ({
return (
<>
<KeyValueComponent handleChange={onChange} {...{ defaultValue, errors, disabled, copyValue }} />
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name].message} />}
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name]?.message as string} />}
</>
);
}}
Expand Down
28 changes: 14 additions & 14 deletions src/components/formFields/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ export const InputPassword: React.FC<IInputProps & IReactHookFormProps> = ({
type="password"
{...{ disabled, placeholder }}
{...register(name, { ...validation })}
invalid={errors[name]}
invalid={!!errors[name]}
aria-label={ariaLabel}
/>
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name].message} />}
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name]?.message as string} />}
</>
);
};
Expand All @@ -54,10 +54,10 @@ export const InputText: React.FC<IInputProps & IReactHookFormProps> = ({
type="text"
{...{ defaultValue, disabled, placeholder, icon }}
{...register(name, { ...validation })}
invalid={errors[name]}
invalid={!!errors[name]}
aria-label={ariaLabel}
/>
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name].message} />}
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name]?.message as string} />}
</>
);

Expand All @@ -79,10 +79,10 @@ export const InputEmail: React.FC<IInputProps & IReactHookFormProps> = ({
required={!!validation?.required}
{...{ defaultValue, disabled, placeholder, icon }}
{...register(name, { ...validation })}
invalid={errors[name]}
invalid={!!errors[name]}
aria-label={ariaLabel}
/>
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name].message} />}
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name]?.message as string} />}
</>
);

Expand All @@ -103,10 +103,10 @@ export const InputURL: React.FC<IInputProps & IReactHookFormProps> = ({
type="url"
{...{ defaultValue, disabled, placeholder, icon }}
{...register(name, { ...validation })}
invalid={errors[name]}
invalid={!!errors[name]}
aria-label={ariaLabel}
/>
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name].message} />}
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name]?.message as string} />}
</>
);

Expand All @@ -126,11 +126,11 @@ export const InputNumber: React.FC<IInputProps & IReactHookFormProps> = ({
<Textbox
type="number"
{...{ defaultValue, disabled, placeholder, icon }}
{...register(name, { ...validation, valueAsNumber: true })}
invalid={errors[name]}
{...register(name, { ...{ validation }, valueAsNumber: true })}
invalid={!!errors[name]}
aria-label={ariaLabel}
/>
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name].message} />}
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name]?.message as string} />}
</>
);

Expand All @@ -151,11 +151,11 @@ export const InputFloat: React.FC<IInputProps & IReactHookFormProps> = ({
type="number"
step=".01"
{...{ disabled, placeholder, icon, defaultValue }}
{...register(name, { ...validation, valueAsNumber: true })}
invalid={errors[name]}
{...register(name, { ...{ validation }, valueAsNumber: true })}
invalid={!!errors[name]}
aria-label={ariaLabel}
/>
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name].message} />}
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name]?.message as string} />}
</>
);

Expand Down
12 changes: 6 additions & 6 deletions src/components/formFields/select/select.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as React from "react";
import * as styles from "./select.module.css";
import { Control, Controller, FieldValues } from "react-hook-form";
import ReactSelect, { MenuPlacement, StylesConfig } from "react-select";
import clsx from "clsx";
import CreatableSelect from "react-select/creatable";
import ReactSelect, { MenuPlacement, StylesConfig } from "react-select";
import { Control, Controller, FieldValues } from "react-hook-form";
import { IReactHookFormProps } from "../types";
import clsx from "clsx";
import { ErrorMessage } from "../errorMessage/ErrorMessage";

interface ISelectProps {
Expand Down Expand Up @@ -104,7 +104,7 @@ export const SelectMultiple = ({
styles={selectStyles}
placeholder={disabled ? "Disabled..." : placeholder ?? "Select one or more options..."}
/>
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name].message} />}
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name]?.message as string} />}
</>
);
}}
Expand Down Expand Up @@ -149,7 +149,7 @@ export const SelectCreate = ({
menuPlacement={menuPlacement}
styles={selectStyles}
/>
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name].message} />}
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name]?.message as string} />}
</>
);
}}
Expand Down Expand Up @@ -194,7 +194,7 @@ export const SelectSingle = ({
styles={selectStyles}
placeholder={disabled ? "Disabled..." : placeholder ?? "Select one or more options..."}
/>
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name].message} />}
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name]?.message as string} />}
</>
);
}}
Expand Down
5 changes: 3 additions & 2 deletions src/components/formFields/textarea.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import _ from "lodash";
import { IReactHookFormProps } from "./types";
import { ErrorMessage } from "./errorMessage/ErrorMessage";
import { Textarea as UtrechtTextarea } from "@utrecht/component-library-react/dist/css-module";
Expand All @@ -24,9 +25,9 @@ export const Textarea = ({
<UtrechtTextarea
{...register(name, { ...validation })}
{...{ disabled, defaultValue }}
invalid={errors[name]}
invalid={!!errors[name]}
aria-label={ariaLabel}
/>
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name].message} />}
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name]?.message as string} />}
</>
);
14 changes: 3 additions & 11 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,7 @@
"strict": true,
"skipLibCheck": true
},
"hooks": [
"copy-files"
],
"include": [
"src",
"src/**/*.css"
],
"exclude": [
"node_modules",
"**/__tests__/*"
]
"hooks": ["copy-files"],
"include": ["src", "src/**/*.css"],
"exclude": ["node_modules", "**/__tests__/*", "lib/**/*"]
}

0 comments on commit 78c7113

Please sign in to comment.