@conduction/components 2.0.17 → 2.0.19

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,7 +4,8 @@
4
4
 
5
5
  - **Version 2**
6
6
 
7
- - 2.0.17: Refactor PrimaryTopNav styling.
7
+ - 2.0.19: Add disabled state to Textarea and InputCheckbox components.
8
+ - 2.0.17 & 2.0.18: Refactor PrimaryTopNav styling.
8
9
  - 2.0.16: Remove styling warnings.
9
10
  - 2.0.15: Added mobile support to PrimaryTopNav.
10
11
  - 2.0.14: Refactored SelectCreate placeholder text.
@@ -4,5 +4,6 @@ export interface ICheckboxProps {
4
4
  label: string;
5
5
  name: string;
6
6
  defaultChecked?: boolean;
7
+ disabled?: boolean;
7
8
  }
8
9
  export declare const InputCheckbox: React.FC<ICheckboxProps & IReactHookFormProps>;
@@ -1,3 +1,3 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { FormControlLabel } from "@gemeente-denhaag/components-react";
3
- export const InputCheckbox = ({ name, validation, register, label, defaultChecked, }) => (_jsx(FormControlLabel, { input: _jsx("input", { type: "checkbox", ...{ defaultChecked }, ...register(name, { ...validation }) }), ...{ label } }));
3
+ export const InputCheckbox = ({ name, validation, register, label, defaultChecked, disabled, }) => (_jsx(FormControlLabel, { input: _jsx("input", { type: "checkbox", ...{ defaultChecked, disabled }, ...register(name, { ...validation }) }), ...{ label } }));
@@ -1,3 +1,3 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { TextArea } from "@gemeente-denhaag/textarea";
3
- export const Textarea = ({ name, validation, register, errors }) => (_jsx(TextArea, { ...register(name, { ...validation }), invalid: errors[name] }));
3
+ export const Textarea = ({ name, validation, register, errors, disabled, }) => _jsx(TextArea, { ...(register(name, { ...validation }), { disabled }), invalid: errors[name] });
@@ -119,10 +119,6 @@
119
119
  position: absolute;
120
120
  }
121
121
 
122
- .dropdown > li {
123
- padding-inline-start: 0;
124
- }
125
-
126
122
  .menuToggleContainer {
127
123
  display: none;
128
124
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduction/components",
3
- "version": "2.0.17",
3
+ "version": "2.0.19",
4
4
  "description": "React (Gatsby) components used within the Conduction Skeleton Application (and its implementations)",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -5,6 +5,7 @@ export interface ICheckboxProps {
5
5
  label: string;
6
6
  name: string;
7
7
  defaultChecked?: boolean;
8
+ disabled?: boolean;
8
9
  }
9
10
 
10
11
  export const InputCheckbox: React.FC<ICheckboxProps & IReactHookFormProps> = ({
@@ -13,9 +14,10 @@ export const InputCheckbox: React.FC<ICheckboxProps & IReactHookFormProps> = ({
13
14
  register,
14
15
  label,
15
16
  defaultChecked,
17
+ disabled,
16
18
  }) => (
17
19
  <FormControlLabel
18
- input={<input type="checkbox" {...{ defaultChecked }} {...register(name, { ...validation })} />}
20
+ input={<input type="checkbox" {...{ defaultChecked, disabled }} {...register(name, { ...validation })} />}
19
21
  {...{ label }}
20
22
  />
21
23
  );
@@ -8,6 +8,10 @@ export interface ITextAreaProps {
8
8
  defaultValue?: string;
9
9
  }
10
10
 
11
- export const Textarea: React.FC<ITextAreaProps & IReactHookFormProps> = ({ name, validation, register, errors }) => (
12
- <TextArea {...register(name, { ...validation })} invalid={errors[name]} />
13
- );
11
+ export const Textarea: React.FC<ITextAreaProps & IReactHookFormProps> = ({
12
+ name,
13
+ validation,
14
+ register,
15
+ errors,
16
+ disabled,
17
+ }) => <TextArea {...(register(name, { ...validation }), { disabled })} invalid={errors[name]} />;
@@ -119,10 +119,6 @@
119
119
  position: absolute;
120
120
  }
121
121
 
122
- .dropdown > li {
123
- padding-inline-start: 0;
124
- }
125
-
126
122
  .menuToggleContainer {
127
123
  display: none;
128
124
  }