@dhasdk/simple-ui 1.0.54 → 1.0.56
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 +41 -4
- package/index.js +19 -19
- package/index.mjs +1277 -1259
- package/lib/CheckBox.d.ts +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,7 +53,11 @@ Tooltip
|
|
|
53
53
|
|
|
54
54
|
## Changelog
|
|
55
55
|
|
|
56
|
-
1.0.
|
|
56
|
+
1.0.56 - **`ProgressBar`** fix for z-level when **`showMarkers`** is false
|
|
57
|
+
|
|
58
|
+
1.0.55 - added **`classNameLabel`** to **GroupCheckBox** and **CheckBox**, added remaining **`className...`** props to **ChecKBoxGroup**, added **`customIcons`** prop to both **CheckBox** and **CheckBoxGroup** components.
|
|
59
|
+
|
|
60
|
+
1.0.54 - added **`showMarkers`** and **`classNameMarkerFalse`** to the **ProgressBar** component
|
|
57
61
|
|
|
58
62
|
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
63
|
|
|
@@ -783,6 +787,11 @@ Used by itself, **CheckBox** behaves as a normal checkbox component and can be u
|
|
|
783
787
|
| Prop | Type | Optional | Default | Description |
|
|
784
788
|
| ----------- | -------- | -------- | -------- | ----------- |
|
|
785
789
|
| 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. |
|
|
790
|
+
| 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.|
|
|
791
|
+
| classNameInput | string | Yes | **`''`** | alternate css classes to add/change styling of the **input** html element. Passed to all child CheckBox components.|
|
|
792
|
+
| 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.|
|
|
793
|
+
| 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. |
|
|
794
|
+
| 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
795
|
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the CheckBoxGroup component for testing purposes |
|
|
787
796
|
| fill | boolean | Yes | {false} | specifies using the **`fill`** variant or not. If used, the checkbox itself will have a darker solid background. |
|
|
788
797
|
| 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 +806,9 @@ Used by itself, **CheckBox** behaves as a normal checkbox component and can be u
|
|
|
797
806
|
| ariaLabel | string | Yes | 'CheckBox Component' | The **aria-label** to assign to this CheckBox |
|
|
798
807
|
| className | string | Yes | **`'flex items-center'`** | alternate css classes to add/change styling of the **div** that wraps the **input** element. |
|
|
799
808
|
| classNameInput | string | Yes | **`''`** | alternate css classes to add/change styling of the **input** html element. |
|
|
800
|
-
|
|
|
809
|
+
| 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**. |
|
|
810
|
+
| 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.
|
|
811
|
+
| 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
812
|
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the CheckBox component for testing purposes |
|
|
802
813
|
| fill | boolean | Yes | {false} | specifies using the **fill** variant or not. If used, the checkbox itself will have a darker solid background. |
|
|
803
814
|
| 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 +856,32 @@ Using markers via the marker prop
|
|
|
845
856
|
</CheckBoxGroup>
|
|
846
857
|
```
|
|
847
858
|
|
|
859
|
+
Using with Custom Icons
|
|
860
|
+
|
|
861
|
+
```jsx
|
|
862
|
+
import checkedIcon from "../../assets/material-checked.svg";
|
|
863
|
+
import blankIcon from "../../assets/material-blank.svg";
|
|
864
|
+
import indeterminiteIcon from "../../assets/material-indeterminite.svg";
|
|
865
|
+
|
|
866
|
+
<CheckBoxGroup key='1'
|
|
867
|
+
customIcons={{
|
|
868
|
+
checked: checkedIcon,
|
|
869
|
+
unchecked: blankIcon,
|
|
870
|
+
indeterminate: indeterminiteIcon,
|
|
871
|
+
}}
|
|
872
|
+
>
|
|
873
|
+
<CheckBox level={0} name='g1'>Group 1</CheckBox>
|
|
874
|
+
<CheckBox level={1} name='g1i1'>group 1, item 1</CheckBox>
|
|
875
|
+
<CheckBox level={1} name='g1i2'>group 1, item 2</CheckBox>
|
|
876
|
+
<CheckBox level={2} name='h1i2i1'>group 1, item 2, item 1</CheckBox>
|
|
877
|
+
<CheckBox level={2} name='g1i2i2'>group 1, item 2, item 2</CheckBox>
|
|
878
|
+
<CheckBox level={1} name='h1i3'>group 1, item 3</CheckBox>
|
|
879
|
+
<CheckBox level={0} name='g2'>Group 2</CheckBox>
|
|
880
|
+
<CheckBox level={1} name='g2i1'>group 2, item 1</CheckBox>
|
|
881
|
+
<CheckBox level={1} name='g2i2'>group 2, item 2</CheckBox>
|
|
882
|
+
<CheckBox level={2} name='h2i2i1'>group 2, item 2, item 1</CheckBox>
|
|
883
|
+
</CheckBoxGroup>
|
|
884
|
+
```
|
|
848
885
|
### Dependencies
|
|
849
886
|
|
|
850
887
|
**_none_**
|
|
@@ -1304,9 +1341,9 @@ Full list of props below
|
|
|
1304
1341
|
| classNameBorderColor | **`string`** | Yes | **`border-[#305B25]`** | Controls the color of the border around each completed step's circle. |
|
|
1305
1342
|
| classNameFillColor | **`string`** | Yes | **`bg-green-500`**, see notes for **showMarkers** below | Controls the fill color of each completed step's circle. |
|
|
1306
1343
|
| classNameGradient | **`string`** | Yes | **`from-[#305B25] to-[#5AAB46]`** | Controls the colors used in the gradient for the bars between each completed step. |
|
|
1307
|
-
| classNameMarkerFalse | **`string`** | Yes |
|
|
1344
|
+
| classNameMarkerFalse | **`string`** | Yes | **`z-0 -mx-[0.1em] w-full h-2 bg-gray-300 rounded-full`** | The classNames applied to the base div that provides the background (shape and color) to the progress bar. |
|
|
1308
1345
|
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps ProgressBar for testing purposes |
|
|
1309
|
-
| showMarkers | boolean | Yes | true | Sets whether progress markers or checkboxes are displayed. If set to false, a single long bar w/o individual steps is presented, with the progress indicated by a 2nd bar overlaying the 1st. The overlaying progress bar styling can be changed via the **`classNameFillColor`** prop. Default values for **classNameFillColor** in this use case
|
|
1346
|
+
| showMarkers | boolean | Yes | true | Sets whether progress markers or checkboxes are displayed. If set to false, a single long bar w/o individual steps is presented, with the progress indicated by a 2nd bar overlaying the 1st. The overlaying progress bar styling can be changed via the **`classNameFillColor`** prop. Default values for **classNameFillColor** in this use case is **`z-10 -mx-[0.1em] h-2 bg-blue-300 rounded-full`** |
|
|
1310
1347
|
|
|
1311
1348
|
1. Base CSS Classes
|
|
1312
1349
|
|