@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 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,7 @@
1
+ .container {
2
+ user-select: none;
3
+ }
4
+
5
+ .container:hover {
6
+ cursor: pointer;
7
+ }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { IReactHookFormProps } from "./types";
2
+ import { IReactHookFormProps } from "./../types";
3
3
  export interface ICheckboxProps {
4
4
  label: string;
5
5
  name: string;
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduction/components",
3
- "version": "2.1.13",
3
+ "version": "2.1.14",
4
4
  "description": "React (Gatsby) components used within the Conduction Skeleton Application (and its implementations)",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -0,0 +1,7 @@
1
+ .container {
2
+ user-select: none;
3
+ }
4
+
5
+ .container:hover {
6
+ cursor: pointer;
7
+ }
@@ -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";