@dhasdk/simple-ui 1.0.54 → 1.0.55
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 +37 -2
- package/index.js +19 -19
- package/index.mjs +1275 -1257
- package/lib/CheckBox.d.ts +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,7 +53,9 @@ Tooltip
|
|
|
53
53
|
|
|
54
54
|
## Changelog
|
|
55
55
|
|
|
56
|
-
1.0.
|
|
56
|
+
1.0.55 - added **`classNameLabel`** to **GroupCheckBox** and **CheckBox**, added remaining **`className...`** props to **ChecKBoxGroup**, added **`customIcons`** prop to both **CheckBox** and **CheckBoxGroup** components.
|
|
57
|
+
|
|
58
|
+
1.0.54 - added **`showMarkers`** and **`classNameMarkerFalse`** to the **ProgressBar** component
|
|
57
59
|
|
|
58
60
|
1.0.53 - added **`data-testid`** prop(s) to **Accordion**, **AppointmentPicker**, **Badge**, **Breadcrumbs**, **ButtonGroup**, **Card**, **CharacterCounter**, **CheckBox** and **CheckBoxGroup**, **DatePicker**, **ExpandableText**, **Input**, **List**, **Modal**, **ProgressBar**, **RadioGroup**, **Search**, **SectionHeader**, **Select**, **Shield**, **SideBarNav**, **skeleton**, **slider**, **status**, **tabs**, **toggle**, **tooltip**. See docs for uses per component.
|
|
59
61
|
|
|
@@ -783,6 +785,11 @@ Used by itself, **CheckBox** behaves as a normal checkbox component and can be u
|
|
|
783
785
|
| Prop | Type | Optional | Default | Description |
|
|
784
786
|
| ----------- | -------- | -------- | -------- | ----------- |
|
|
785
787
|
| bridgePraent | boolean | Yes | {false} | When true, the lines that denote the relationships between parent CheckBoxes and their children are extended at the root level to match root level CheckBoxes to one another. In the above examples, compare 'Multi-Level' and 'bridgeParent' to see the differences. |
|
|
788
|
+
| className | string | Yes | **`'flex items-center'`** | alternate css classes to add/change styling of the **div** that wraps the **input** element. Passed to all child CheckBox components.|
|
|
789
|
+
| classNameInput | string | Yes | **`''`** | alternate css classes to add/change styling of the **input** html element. Passed to all child CheckBox components.|
|
|
790
|
+
| classNameLabel | string | Yes | **`'inline-flex items-center gap-1 text-base md:text-lg'`** | alternate css classes to add/change styling of the **label** html element used by this **CheckBox**. Passed to all child CheckBox components.|
|
|
791
|
+
| classNameSvg | string | Yes | **`'stroke-[#a1a6a8] h-full border'`** | This prop is applied to the lines that are drawn inside the SVGs that denote the relationships between separate **CheckBox** components. The easiest change to effect is the color of the lines by applying a different custom stroke value. Passed to all child CheckBox components. |
|
|
792
|
+
| customIcons | map | Yes | default icons | A list of custom icons to use for checked, unchecked, and indeterminate states. See Custom Icons usage code example below. |
|
|
786
793
|
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the CheckBoxGroup component for testing purposes |
|
|
787
794
|
| fill | boolean | Yes | {false} | specifies using the **`fill`** variant or not. If used, the checkbox itself will have a darker solid background. |
|
|
788
795
|
| 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. |
|
|
@@ -797,7 +804,9 @@ Used by itself, **CheckBox** behaves as a normal checkbox component and can be u
|
|
|
797
804
|
| ariaLabel | string | Yes | 'CheckBox Component' | The **aria-label** to assign to this CheckBox |
|
|
798
805
|
| className | string | Yes | **`'flex items-center'`** | alternate css classes to add/change styling of the **div** that wraps the **input** element. |
|
|
799
806
|
| classNameInput | string | Yes | **`''`** | alternate css classes to add/change styling of the **input** html element. |
|
|
800
|
-
|
|
|
807
|
+
| classNameLabel | string | Yes | **`'inline-flex items-center gap-1 text-base md:text-lg'`** | alternate css classes to add/change styling of the **label** html element used by this **CheckBox**. |
|
|
808
|
+
| classNameSvg | string | Yes | **`'stroke-[#a1a6a8] h-full border'`** | This prop is applied to the lines that are drawn inside the SVGs that denote the relationships between separate **CheckBox** components. The easiest change to effect is the color of the lines by applying a different custom stroke value.
|
|
809
|
+
| customIcons | map | Yes | default icons | A list of custom icons to use for checked, unchecked, and indeterminate states. See Custom Icons usage code example below. |
|
|
801
810
|
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the CheckBox component for testing purposes |
|
|
802
811
|
| fill | boolean | Yes | {false} | specifies using the **fill** variant or not. If used, the checkbox itself will have a darker solid background. |
|
|
803
812
|
| 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. |
|
|
@@ -845,6 +854,32 @@ Using markers via the marker prop
|
|
|
845
854
|
</CheckBoxGroup>
|
|
846
855
|
```
|
|
847
856
|
|
|
857
|
+
Using with Custom Icons
|
|
858
|
+
|
|
859
|
+
```jsx
|
|
860
|
+
import checkedIcon from "../../assets/material-checked.svg";
|
|
861
|
+
import blankIcon from "../../assets/material-blank.svg";
|
|
862
|
+
import indeterminiteIcon from "../../assets/material-indeterminite.svg";
|
|
863
|
+
|
|
864
|
+
<CheckBoxGroup key='1'
|
|
865
|
+
customIcons={{
|
|
866
|
+
checked: checkedIcon,
|
|
867
|
+
unchecked: blankIcon,
|
|
868
|
+
indeterminate: indeterminiteIcon,
|
|
869
|
+
}}
|
|
870
|
+
>
|
|
871
|
+
<CheckBox level={0} name='g1'>Group 1</CheckBox>
|
|
872
|
+
<CheckBox level={1} name='g1i1'>group 1, item 1</CheckBox>
|
|
873
|
+
<CheckBox level={1} name='g1i2'>group 1, item 2</CheckBox>
|
|
874
|
+
<CheckBox level={2} name='h1i2i1'>group 1, item 2, item 1</CheckBox>
|
|
875
|
+
<CheckBox level={2} name='g1i2i2'>group 1, item 2, item 2</CheckBox>
|
|
876
|
+
<CheckBox level={1} name='h1i3'>group 1, item 3</CheckBox>
|
|
877
|
+
<CheckBox level={0} name='g2'>Group 2</CheckBox>
|
|
878
|
+
<CheckBox level={1} name='g2i1'>group 2, item 1</CheckBox>
|
|
879
|
+
<CheckBox level={1} name='g2i2'>group 2, item 2</CheckBox>
|
|
880
|
+
<CheckBox level={2} name='h2i2i1'>group 2, item 2, item 1</CheckBox>
|
|
881
|
+
</CheckBoxGroup>
|
|
882
|
+
```
|
|
848
883
|
### Dependencies
|
|
849
884
|
|
|
850
885
|
**_none_**
|