@conduction/components 2.1.13 → 2.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/lib/components/formFields/checkbox/Checkbox.module.css +7 -0
- package/lib/components/formFields/{checkbox.d.ts → checkbox/checkbox.d.ts} +1 -1
- package/lib/components/formFields/checkbox/checkbox.js +3 -0
- package/lib/components/formFields/index.d.ts +1 -1
- package/lib/components/formFields/index.js +1 -1
- package/package.json +1 -1
- package/src/components/formFields/checkbox/Checkbox.module.css +7 -0
- package/src/components/formFields/checkbox/checkbox.tsx +28 -0
- package/src/components/formFields/index.tsx +1 -1
- package/lib/components/formFields/checkbox.js +0 -3
- package/src/components/formFields/checkbox.js +0 -3
- package/src/components/formFields/checkbox.tsx +0 -30
- package/src/index.js +0 -14
package/README.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
- **Version 2.1 (breaking changes from 2.0.x)**
|
|
6
6
|
|
|
7
|
+
- 2.1.14: Refactor checkbox to remove svg errors
|
|
7
8
|
- 2.1.13: Refactor components to remove svg errors (e.g. shape-rendering => shapeRendering)
|
|
8
9
|
- 2.1.12: Added ToolTip max-width and break-word
|
|
9
10
|
- 2.1.11: Added CreateKeyValue component disabled state on delete buttons
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as styles from "./Checkbox.module.css";
|
|
3
|
+
export const InputCheckbox = ({ name, validation, register, label, defaultChecked, disabled, }) => (_jsxs("div", { className: styles.container, children: [_jsx("input", { type: "checkbox", id: `checkbox${name}`, ...{ defaultChecked, disabled }, ...register(name, { ...validation }) }), _jsx("label", { htmlFor: `checkbox${name}`, children: label })] }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InputText, InputPassword, InputEmail, InputURL, InputDate, InputDateTime, InputNumber, InputFile } from "./input";
|
|
2
2
|
import { Textarea } from "./textarea";
|
|
3
|
-
import { InputCheckbox } from "./checkbox";
|
|
3
|
+
import { InputCheckbox } from "./checkbox/checkbox";
|
|
4
4
|
import { InputRadio } from "./radio";
|
|
5
5
|
import { SelectSingle, SelectMultiple, SelectCreate } from "./select/select";
|
|
6
6
|
import { CreateKeyValue, IKeyValue } from "./createKeyValue/CreateKeyValue";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InputText, InputPassword, InputEmail, InputURL, InputDate, InputDateTime, InputNumber, InputFile, } from "./input";
|
|
2
2
|
import { Textarea } from "./textarea";
|
|
3
|
-
import { InputCheckbox } from "./checkbox";
|
|
3
|
+
import { InputCheckbox } from "./checkbox/checkbox";
|
|
4
4
|
import { InputRadio } from "./radio";
|
|
5
5
|
import { SelectSingle, SelectMultiple, SelectCreate } from "./select/select";
|
|
6
6
|
import { CreateKeyValue } from "./createKeyValue/CreateKeyValue";
|
package/package.json
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as styles from "./Checkbox.module.css";
|
|
2
|
+
import { IReactHookFormProps } from "./../types";
|
|
3
|
+
|
|
4
|
+
export interface ICheckboxProps {
|
|
5
|
+
label: string;
|
|
6
|
+
name: string;
|
|
7
|
+
defaultChecked?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const InputCheckbox: React.FC<ICheckboxProps & IReactHookFormProps> = ({
|
|
12
|
+
name,
|
|
13
|
+
validation,
|
|
14
|
+
register,
|
|
15
|
+
label,
|
|
16
|
+
defaultChecked,
|
|
17
|
+
disabled,
|
|
18
|
+
}) => (
|
|
19
|
+
<div className={styles.container}>
|
|
20
|
+
<input
|
|
21
|
+
type="checkbox"
|
|
22
|
+
id={`checkbox${name}`}
|
|
23
|
+
{...{ defaultChecked, disabled }}
|
|
24
|
+
{...register(name, { ...validation })}
|
|
25
|
+
/>
|
|
26
|
+
<label htmlFor={`checkbox${name}`}>{label}</label>
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
InputFile,
|
|
10
10
|
} from "./input";
|
|
11
11
|
import { Textarea } from "./textarea";
|
|
12
|
-
import { InputCheckbox } from "./checkbox";
|
|
12
|
+
import { InputCheckbox } from "./checkbox/checkbox";
|
|
13
13
|
import { InputRadio } from "./radio";
|
|
14
14
|
import { SelectSingle, SelectMultiple, SelectCreate } from "./select/select";
|
|
15
15
|
import { CreateKeyValue, IKeyValue } from "./createKeyValue/CreateKeyValue";
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { FormControlLabel } from "@gemeente-denhaag/components-react";
|
|
3
|
-
export const InputCheckbox = ({ name, validation, register, label, defaultChecked, disabled, }) => (_jsx(FormControlLabel, { input: _jsx("input", { type: "checkbox", id: `checkbox${name}`, ...{ defaultChecked, disabled }, ...register(name, { ...validation }) }), ...{ label } }));
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { FormControlLabel } from "@gemeente-denhaag/components-react";
|
|
3
|
-
export const InputCheckbox = ({ name, validation, register, label, }) => _jsx(FormControlLabel, { input: _jsx("input", { type: "checkbox", ...register(name, { ...validation }) }), ...{ label } });
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { FormControlLabel } from "@gemeente-denhaag/components-react";
|
|
2
|
-
import { IReactHookFormProps } from "./types";
|
|
3
|
-
|
|
4
|
-
export interface ICheckboxProps {
|
|
5
|
-
label: string;
|
|
6
|
-
name: string;
|
|
7
|
-
defaultChecked?: boolean;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const InputCheckbox: React.FC<ICheckboxProps & IReactHookFormProps> = ({
|
|
12
|
-
name,
|
|
13
|
-
validation,
|
|
14
|
-
register,
|
|
15
|
-
label,
|
|
16
|
-
defaultChecked,
|
|
17
|
-
disabled,
|
|
18
|
-
}) => (
|
|
19
|
-
<FormControlLabel
|
|
20
|
-
input={
|
|
21
|
-
<input
|
|
22
|
-
type="checkbox"
|
|
23
|
-
id={`checkbox${name}`}
|
|
24
|
-
{...{ defaultChecked, disabled }}
|
|
25
|
-
{...register(name, { ...validation })}
|
|
26
|
-
/>
|
|
27
|
-
}
|
|
28
|
-
{...{ label }}
|
|
29
|
-
/>
|
|
30
|
-
);
|
package/src/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from "./components/card";
|
|
2
|
-
export * from "./components/casesTable/CasesTable";
|
|
3
|
-
export * from "./components/container/Container";
|
|
4
|
-
export * from "./components/denhaag-wrappers/breadcrumbs/Breadcrumbs";
|
|
5
|
-
export * from "./components/editableTableRow/EditableTableRow";
|
|
6
|
-
export * from "./components/formFields";
|
|
7
|
-
export * from "./components/imageDivider/ImageDivider";
|
|
8
|
-
export * from "./components/logo/Logo";
|
|
9
|
-
export * from "./components/messageForm/MessageForm";
|
|
10
|
-
export * from "./components/messagesTable/MessagesTable";
|
|
11
|
-
export * from "./components/metaIcon/MetaIcon";
|
|
12
|
-
export * from "./components/privateRoute/PrivateRoute";
|
|
13
|
-
export * from "./components/statusSteps/StatusSteps";
|
|
14
|
-
export * from "./components/topNav/TopNav";
|