@dhasdk/simple-ui 1.0.61 → 1.0.62

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
@@ -53,6 +53,8 @@ Tooltip
53
53
 
54
54
  ## Changelog
55
55
 
56
+ 1.0.62 - fixed 'checked' and 'indeterminate' prop usage for CheckBox, updated documentation for CheckBox re their usage w/ CheckBox and CheckBoxGroup
57
+
56
58
  1.0.61 - added **selectedId** prop to **`RadioGroup`** as well as updated documentation with the **RadioOptions** interface
57
59
 
58
60
  1.0.60 - added **classNameSvgLine** and **classNameIcon** props to **`CheckBox`** the former to share duties with and more focus **classNameSvg**. The latter allows for positioning of the checkbox icon if needed.
@@ -791,6 +793,8 @@ The **CheckBoxGroup** component can be optionally used with any number of **Chec
791
793
 
792
794
  **CheckBoxGroup** also takes three props that are directly passed down to **CheckBox**, allowing you to specify any of these values in one place instead of in each instance of **CheckBox**. These three props are all boolean values, described below. They are **`fill`**, **`icon`**, and **`marker`**.
793
795
 
796
+ **Note:** Using **checked** or **indeterminate** on a **`CheckBox`** inside a **`CheckBoxGroup`** will only effect that CheckBox and will not have an effect on the child or parent CheckBoxes as is done when an individual CheckBox is manually clicked inside a CheckBoxGroup. This can for example place a CheckBox in a checked state leaving its children unchecked. If you wish to use **checked** or **indeterminate** on a CheckBox inside a CheckBoxGroup, it is up to the developer to manage the values for all CheckBoxes in that group on initial state.
797
+
794
798
  Used by itself, **CheckBox** behaves as a normal checkbox component and can be used individually or in groups. It also takes the same attributes that a normal **`html input type="checkbox"`** would.
795
799
 
796
800
  ### Props for CheckBoxGroup
@@ -817,6 +821,7 @@ Used by itself, **CheckBox** behaves as a normal checkbox component and can be u
817
821
  | Prop | Type | Optional | Default | Description |
818
822
  | ----------- | -------- | -------- | -------- | ----------- |
819
823
  | ariaLabel | string | Yes | 'CheckBox Component' | The **aria-label** to assign to this CheckBox |
824
+ | checked | boolean | Yes | **`false`** | if present, checkbox is initially displayed in a 'checked' state. See above note for more information |
820
825
  | className | string | Yes | **`'flex items-center'`** | alternate css classes to add/change styling of the **div** that wraps the **input** element. |
821
826
  | classNameIcon | string | Yes | **`''`** | CSS classes that will be applied to the custom icon (non html default) that is the checkbox, indeterminate checkbox, or blank checkbox. Can be useful for positioning, etc. |
822
827
  | classNameInput | string | Yes | **`''`** | alternate css classes to add/change styling of the **input** html element. |
@@ -827,6 +832,7 @@ Used by itself, **CheckBox** behaves as a normal checkbox component and can be u
827
832
  | dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the CheckBox component for testing purposes |
828
833
  | fill | boolean | Yes | {false} | specifies using the **fill** variant or not. If used, the checkbox itself will have a darker solid background. |
829
834
  | icon | boolean | Yes | {true} | When true (default value) this prop will utilize one of two UX created icons to represent a checked, indeterminate, and blank checkbox. When **marker** is true as well, a marker icon is used in place of the checked. |
835
+ | indeterminate | boolean | Yes | **`false`** | if present, checkbox is initially displayed in an 'indeterminate' state. See above note for more information |
830
836
  | marker | boolean | Yes | {false} | When true this boolean will cause the normal checked checkbox to instead display an 'x' marker icon. |
831
837
  | ...props | string | Yes | undefined | takes additional props that are not specifically defined in the component, i.e. aria-label |
832
838
  | ref | string | Yes | undefined | ref is exposed as a prop, and can be assigned and used on this component as normal |