@dhasdk/simple-ui 1.0.53 → 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 +41 -2
- package/index.css +1 -1
- package/index.js +19 -19
- package/index.mjs +1614 -1573
- package/lib/CheckBox.d.ts +9 -1
- package/lib/ProgressBar.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,6 +53,10 @@ Tooltip
|
|
|
53
53
|
|
|
54
54
|
## Changelog
|
|
55
55
|
|
|
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
|
|
59
|
+
|
|
56
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.
|
|
57
61
|
|
|
58
62
|
1.0.51/52 - **`Search`** added iconLinkHandler prop + updates to documentation, **`ExpandableText`** added a **`clickHandler`** prop
|
|
@@ -781,6 +785,11 @@ Used by itself, **CheckBox** behaves as a normal checkbox component and can be u
|
|
|
781
785
|
| Prop | Type | Optional | Default | Description |
|
|
782
786
|
| ----------- | -------- | -------- | -------- | ----------- |
|
|
783
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. |
|
|
784
793
|
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the CheckBoxGroup component for testing purposes |
|
|
785
794
|
| fill | boolean | Yes | {false} | specifies using the **`fill`** variant or not. If used, the checkbox itself will have a darker solid background. |
|
|
786
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. |
|
|
@@ -795,7 +804,9 @@ Used by itself, **CheckBox** behaves as a normal checkbox component and can be u
|
|
|
795
804
|
| ariaLabel | string | Yes | 'CheckBox Component' | The **aria-label** to assign to this CheckBox |
|
|
796
805
|
| className | string | Yes | **`'flex items-center'`** | alternate css classes to add/change styling of the **div** that wraps the **input** element. |
|
|
797
806
|
| classNameInput | string | Yes | **`''`** | alternate css classes to add/change styling of the **input** html element. |
|
|
798
|
-
|
|
|
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. |
|
|
799
810
|
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the CheckBox component for testing purposes |
|
|
800
811
|
| fill | boolean | Yes | {false} | specifies using the **fill** variant or not. If used, the checkbox itself will have a darker solid background. |
|
|
801
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. |
|
|
@@ -843,6 +854,32 @@ Using markers via the marker prop
|
|
|
843
854
|
</CheckBoxGroup>
|
|
844
855
|
```
|
|
845
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
|
+
```
|
|
846
883
|
### Dependencies
|
|
847
884
|
|
|
848
885
|
**_none_**
|
|
@@ -1300,9 +1337,11 @@ Full list of props below
|
|
|
1300
1337
|
| isStep | **`boolean`** | Yes | **`true`** | Controls whether steps inside the circle are displayed as numbers, or if false, displayed as checkmarks/dashes. |
|
|
1301
1338
|
| classNameArrowColor | **`string`** | Yes | **`fill-[#305B25]`** | Controls the color of the arrow that points from last completed step to current step. |
|
|
1302
1339
|
| classNameBorderColor | **`string`** | Yes | **`border-[#305B25]`** | Controls the color of the border around each completed step's circle. |
|
|
1303
|
-
| classNameFillColor | **`string`** | Yes | **`bg-green-500
|
|
1340
|
+
| classNameFillColor | **`string`** | Yes | **`bg-green-500`**, see notes for **showMarkers** below | Controls the fill color of each completed step's circle. |
|
|
1304
1341
|
| classNameGradient | **`string`** | Yes | **`from-[#305B25] to-[#5AAB46]`** | Controls the colors used in the gradient for the bars between each completed step. |
|
|
1342
|
+
| classNameMarkerFalse | **`string`** | Yes | **`-z-10 -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. |
|
|
1305
1343
|
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps ProgressBar for testing purposes |
|
|
1344
|
+
| 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 are **`z-0 -mx-[0.1em] h-2 bg-blue-300 rounded-full`** |
|
|
1306
1345
|
|
|
1307
1346
|
1. Base CSS Classes
|
|
1308
1347
|
|