@commercetools-uikit/checkbox-input 19.8.0 → 19.10.0

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.
@@ -446,7 +446,7 @@ CheckboxInput.defaultProps = defaultProps;
446
446
  var CheckboxInput$1 = CheckboxInput;
447
447
 
448
448
  // NOTE: This string will be replaced on build time with the package version.
449
- var version = "19.8.0";
449
+ var version = "19.10.0";
450
450
 
451
451
  exports["default"] = CheckboxInput$1;
452
452
  exports.version = version;
@@ -422,7 +422,7 @@ CheckboxInput.defaultProps = defaultProps;
422
422
  var CheckboxInput$1 = CheckboxInput;
423
423
 
424
424
  // NOTE: This string will be replaced on build time with the package version.
425
- var version = "19.8.0";
425
+ var version = "19.10.0";
426
426
 
427
427
  exports["default"] = CheckboxInput$1;
428
428
  exports.version = version;
@@ -428,6 +428,6 @@ CheckboxInput.defaultProps = defaultProps;
428
428
  var CheckboxInput$1 = CheckboxInput;
429
429
 
430
430
  // NOTE: This string will be replaced on build time with the package version.
431
- var version = "19.8.0";
431
+ var version = "19.10.0";
432
432
 
433
433
  export { CheckboxInput$1 as default, version };
@@ -1,15 +1,52 @@
1
1
  import type { ChangeEventHandler, ReactNode } from 'react';
2
2
  export type TCheckboxProps = {
3
+ /**
4
+ * Used as HTML id attribute. An id is auto-generated when it is not specified.
5
+ */
3
6
  id?: string;
7
+ /**
8
+ * Used as HTML name attribute of the input component
9
+ */
4
10
  name?: string;
11
+ /**
12
+ * Value of the input component.
13
+ */
5
14
  value?: string;
15
+ /**
16
+ * The checked property sets the checked state of the checkbox.
17
+ */
6
18
  isChecked?: boolean;
19
+ /**
20
+ * If `true`, this state is shown as a dash in the checkbox, and indicates that its state is neither checked nor unchecked.
21
+ * This is most often used when the checkbox is tied to a collection of items in mixed states (E.g nested checkboxes).
22
+ * This takes precedence visually in case `isChecked` is marked as `true`
23
+ */
7
24
  isIndeterminate?: boolean;
25
+ /**
26
+ * Will be triggered whenever an `CheckboxInput` is clicked. Called with `event`
27
+ */
8
28
  onChange: ChangeEventHandler<HTMLInputElement>;
29
+ /**
30
+ * Forces CheckboxInput to be rendered in a hovered state.
31
+ * Needed for cases when hovered appearance should be triggered by the parent component and not the CheckboxInput itself.
32
+ * CheckboxInput is capable of handling it's own hovering without the need to pass this prop.
33
+ */
9
34
  isHovered?: boolean;
35
+ /**
36
+ * Disables the CheckboxInput
37
+ */
10
38
  isDisabled?: boolean;
39
+ /**
40
+ * Makes the CheckboxInput readonly
41
+ */
11
42
  isReadOnly?: boolean;
43
+ /**
44
+ * Indicates that the checkbox has an error
45
+ */
12
46
  hasError?: boolean;
47
+ /**
48
+ * The descriptive text of the CheckboxInput, used as its label.
49
+ */
13
50
  children?: ReactNode;
14
51
  };
15
52
  declare const CheckboxInput: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/checkbox-input",
3
3
  "description": "An input component that works as checkbox input.",
4
- "version": "19.8.0",
4
+ "version": "19.10.0",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -24,11 +24,11 @@
24
24
  "dependencies": {
25
25
  "@babel/runtime": "^7.20.13",
26
26
  "@babel/runtime-corejs3": "^7.20.13",
27
- "@commercetools-uikit/design-system": "19.8.0",
28
- "@commercetools-uikit/icons": "19.8.0",
29
- "@commercetools-uikit/input-utils": "19.8.0",
30
- "@commercetools-uikit/select-utils": "19.8.0",
31
- "@commercetools-uikit/utils": "19.8.0",
27
+ "@commercetools-uikit/design-system": "19.10.0",
28
+ "@commercetools-uikit/icons": "19.10.0",
29
+ "@commercetools-uikit/input-utils": "19.10.0",
30
+ "@commercetools-uikit/select-utils": "19.10.0",
31
+ "@commercetools-uikit/utils": "19.10.0",
32
32
  "@emotion/react": "^11.10.5",
33
33
  "@emotion/styled": "^11.10.5",
34
34
  "prop-types": "15.8.1",