@dhasdk/simple-ui 1.0.52 → 1.0.53
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 +67 -8
- package/index.css +1 -1
- package/index.js +19 -19
- package/index.mjs +2032 -1942
- package/lib/Accordion.d.ts +4 -0
- package/lib/AppointmentPicker.d.ts +4 -1
- package/lib/Badge.d.ts +3 -0
- package/lib/Breadcrumbs.d.ts +1 -1
- package/lib/Button.d.ts +1 -0
- package/lib/ButtonGroup.d.ts +1 -0
- package/lib/Card.d.ts +3 -0
- package/lib/CharacterCounter.d.ts +3 -1
- package/lib/CheckBox.d.ts +3 -1
- package/lib/DatePicker.d.ts +4 -1
- package/lib/ExpandableText.d.ts +3 -1
- package/lib/Input.d.ts +2 -0
- package/lib/List.d.ts +2 -1
- package/lib/Modal.d.ts +4 -1
- package/lib/Pill.d.ts +1 -0
- package/lib/ProgressBar.d.ts +1 -0
- package/lib/RadioGroup.d.ts +1 -0
- package/lib/Search.d.ts +2 -0
- package/lib/SectionHeader.d.ts +1 -0
- package/lib/Select.d.ts +4 -1
- package/lib/Shield.d.ts +1 -0
- package/lib/SideBarNav.d.ts +3 -1
- package/lib/Skeleton.d.ts +2 -0
- package/lib/Slider.d.ts +2 -0
- package/lib/Status.d.ts +2 -0
- package/lib/Tabs.d.ts +3 -1
- package/lib/Toggle.d.ts +1 -0
- package/lib/Tooltip.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,6 +53,8 @@ Tooltip
|
|
|
53
53
|
|
|
54
54
|
## Changelog
|
|
55
55
|
|
|
56
|
+
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
|
+
|
|
56
58
|
1.0.51/52 - **`Search`** added iconLinkHandler prop + updates to documentation, **`ExpandableText`** added a **`clickHandler`** prop
|
|
57
59
|
|
|
58
60
|
1.0.50 - fixes for **`Search`** results display on tailwindcss lg: breakpoint
|
|
@@ -149,6 +151,7 @@ Finally, if Accordion props are specified inside the parent component, those val
|
|
|
149
151
|
| classNameChildContent | string | No | N/A | CSS classes to apply to the child Accordion component content body. These can be overridden on an individual basis using the same prop on the Accordion component. |
|
|
150
152
|
| classNameContainer | string | Yes | undefined | CSS classes applied to the container div for the **AccordionParent** component. |
|
|
151
153
|
| classNameHr | string | Yes | CSS classes applied to the HR that sits between the accordion heading and content body when open and the prop useBackground is true. |
|
|
154
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element inside AccordionGroup that wraps individual Accordion components |
|
|
152
155
|
| hr | boolean | Yes | true | This boolean value when true directs the display an hr element between the Accordion heading and body when in the open state. |
|
|
153
156
|
| ...props | string | No | | takes additional props that are not specifically defined in the component, i.e. aria-label |
|
|
154
157
|
| singleOpen | boolean | Yes | false | This boolean value directs the accordion to allow only one opened child content body at a time. Setting a value of false will allow multiple to be opened at once. |
|
|
@@ -167,6 +170,9 @@ Finally, if Accordion props are specified inside the parent component, those val
|
|
|
167
170
|
| classNameHeading | string | Yes | CSS classes to apply to the child Accordion component headings. |
|
|
168
171
|
| classNameContent | string | No | N/A | CSS classes to apply to the Accordion component content body. |
|
|
169
172
|
| classNameHr | string | Yes | CSS classes applied to the HR that sits between the accordion heading and content body when open and the prop useBackground is true. |
|
|
173
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the Accordion components, used for testing purposes |
|
|
174
|
+
| dataTestIdLabel | string | Yes | undefined | A **'data-testid'** value that is applied to the span element that that contains the label inside the Accordion component, used for testing purposes |
|
|
175
|
+
| dataTestIdBody | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that that contains the body of the opened Accordion component. Only present when the Accordion is in the opened state, used for testing purposes |
|
|
170
176
|
| hr | boolean | Yes | true | This boolean value when true directs the display an hr element between the Accordion heading and body when in the open state. |
|
|
171
177
|
| index | number | string | yes | undefined | optional index value for a specific accordion in the stack. if not present, label is used. |
|
|
172
178
|
| onExpand | (setOpen: CallbackFunction) => void | Yes | undefined | Callback function that is executed when Accordin is expanded. |
|
|
@@ -219,6 +225,9 @@ This component takes multiple optional props in addition to any other html attri
|
|
|
219
225
|
| ----------- | -------- | -------- | -------- | -------------------------------------------- |
|
|
220
226
|
| className | string | Yes | see below | a group of alternate css classes that can be specified by the developer for use in the dropdown button portion of the component. |
|
|
221
227
|
| classNameContainer | string | Yes | '' | a group of alternate css classes that can be specified by the developer for use in the parent container of the component. |
|
|
228
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the select component used in AppointmentPicker, for testing purposes |
|
|
229
|
+
| dataTestIdButton | string | Yes | undefined | A **'data-testid'** value that is applied to the button element that is the Select component for testing purposes |
|
|
230
|
+
| dataTestIdList | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the drop down list for testing purposes |
|
|
222
231
|
| interval | 'hour' \| 'half-hour' \| 'quarter-hour' | Yes | **`'hour'`** | Controls the interval between times, for example 'hour' intervals would produce results like 01:00, 02:00 etc, while half hour and quarter hour would produce gaps of 30 and 15 minutes respectively. |
|
|
223
232
|
| timeFormat | '12hr' \| '24hr' | Yes | **`'24hr'`** | Controls whether the times are listed as military or standard 12 hour, am/pm times. (13:00 vs 1:00pm & 03:00 vs 3:00am) |
|
|
224
233
|
| hourRange | [number, number] | Yes | **`undefined`** | If specified, only hours within and including the range specified will be available for selection. |
|
|
@@ -278,6 +287,9 @@ This div is also styled using the tailwind **`twMerge()`** utility, so custom cl
|
|
|
278
287
|
| className | string | Yes | See **(1)** below | Alternate CSS classnames to apply to the Badge component.twMerge is used to apply these styles, so they reliably overwrite existing styles |
|
|
279
288
|
| classNameChildren | string | Yes | See **(2)** below | Alternate CSS classnames to apply to the Children content inside the Badge component.twMerge is used to apply these styles, so they reliably overwrite existing styles. |
|
|
280
289
|
| classNameImage | string | Yes | See **(3)** below | Alternate CSS classes that are applied to the image for variant type media. |
|
|
290
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the **`div`** element that wraps the Badge component, used for testing purposes |
|
|
291
|
+
| dataTestIdContent | string | Yes | undefined | A **'data-testid'** value that is applied to the **`div`** element that contains the child content inside the Badge component |
|
|
292
|
+
| dataTestIdIcon | string | Yes | undefined | A **'data-testid'** value that is applied to the **`span`** element in the case that a custom icon is used in the Badge, or the **`img`** element if an included icon is used |
|
|
281
293
|
| icon | ReactNode | Yes | undefined | An alternate icon to use for the instance of this Badge |
|
|
282
294
|
| iconAlt | string | Yes | undefined | When an imagePath is specified, please specify an imageAlt that can be used for accessibility purposes. |
|
|
283
295
|
|
|
@@ -368,9 +380,10 @@ Full list of props below
|
|
|
368
380
|
| className | string | Yes | | This is used to apply user supplied styling to the `Link` components. Note that words are capitalized using CSS, and can be made using the prop. |
|
|
369
381
|
| classNameContainer | string | Yes | | This is used to apply user supplied styling to the container `nav` element. |
|
|
370
382
|
| classNameFinal | string | Yes | | Applies styling to the name of the current page in the breadcrumbs list. |
|
|
371
|
-
| classNameIcon | string | Yes | | This is used to apply user supplied styling to the separator icons in the list, i.e. with **`stroke-[some-color] fill-[some-color]`**. |
|
|
383
|
+
<!-- | classNameIcon | string | Yes | | This is used to apply user supplied styling to the separator icons in the list, i.e. with **`stroke-[some-color] fill-[some-color]`**. | -->
|
|
372
384
|
| classNameIconHome | string | Yes | | This is used to apply user supplied styling to the separator home icon in the list, i.e. with **`stroke-[some-color] fill-[some-color]`**. |
|
|
373
385
|
| classNameIconSeparator | string | Yes | | This is used to apply user supplied styling to 'Separator' icons inside the element between path names. These by default only use 'stroke' values, so an example would be 'stroke-[#FFF]'. |
|
|
386
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the **`nav`** element that wraps the Breadcrumbs component, used for testing purposes |
|
|
374
387
|
| routes | []{ name: string, route: string} | Yes | undefined | When present the Breadcrumbs component will use this list of supplied routes + names instead of attempting to auto-create a routes list. |
|
|
375
388
|
| ...props | string | Yes | undefined | takes additional props that are not specifically defined in the component, i.e. aria-label |
|
|
376
389
|
| separator | string | Yes | | A string value providing the path name to an alternate separator |
|
|
@@ -421,6 +434,7 @@ A reference can also be created and passed to the button component, and the comp
|
|
|
421
434
|
| classNameIconRight | string | Yes | **`ml-3`** | Class names to style the span element that contains the right icon |
|
|
422
435
|
| classNameContent | string | Yes | **`grow-1 text-start`** | Class names to style the content block / body, i.e. the label |
|
|
423
436
|
| classNameSelected | string | Yes | undefined | Class names to apply to the components if they are in the optional selected state, see **selected** below |
|
|
437
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the button element that is the Button component, used for testing purposes |
|
|
424
438
|
| icon | ReactNode | Yes | undefined | image, icon, etc. to use for left or right icon as defined by **`iconPosition`** |
|
|
425
439
|
| iconLeft | ReactNode | Yes | undefined | This contains the optional icon to display on the left side of the button. This prop does not require the use of the iconPosition prop below. |
|
|
426
440
|
| iconRight | ReactNode | Yes | undefined | This contains the optional icon to display on the right side of the button. This prop does not require the use of the iconPosition prop below. |
|
|
@@ -531,6 +545,7 @@ The variants labeled **default** and **column** demonstrated in the examples bel
|
|
|
531
545
|
| children | ReactNode | Yes | | This contains one or more Button components that comprise this ButtonGroup. |
|
|
532
546
|
| className | string | Yes |'' | This prop applies the given classNames to the DIV that wraps and comprises the ButtonGroup component. |
|
|
533
547
|
| classNameButtons | string | Yes | undefined | These are common classes that are applied to each of the children Button components. These classes can be overridden on a one by one basis by using an individual Button components own className prop. |
|
|
548
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the ButtonGroup component, used for testing purposes |
|
|
534
549
|
| variant | string | Yes | 'default' | One of three possible variants that can be specified, **'default'** and **'column'** are UX defined variants that pre-layout up to three buttons for each variant. A **'custom'** variant is also present that leaves all layout and styling to the developer. |
|
|
535
550
|
|
|
536
551
|
|
|
@@ -633,12 +648,14 @@ Full list of props below
|
|
|
633
648
|
| ariaLabel | string | Yes | 'card component' | This is the aria-label applied to the parentDIV element in the Card component. |
|
|
634
649
|
| className | string | Yes | (1) below | Class names to style component |
|
|
635
650
|
| classNameImage | string | Yes | | CSS Classes to apply to the **img** element inside the Card component. These classes are applied using **`twMerge()`** and will safely override any conflicting tailwind css classes. |
|
|
651
|
+
| dataTestIdContainer | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the Card component, used for testing purposes |
|
|
652
|
+
| dataTestIdImage | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that contains the image inside the Card component, used for testing purposes |
|
|
653
|
+
| dataTestIdChildren | string | Yes | undefined | A **'data-testid'** value that is applied to the div element inside the Card component that contains the child content, used for testing purposes |
|
|
636
654
|
| imageInset | string | Yes | | A boolean value indicating whether the image inside the card should be inset or not. See above for functional examples. |
|
|
637
655
|
| ...props | string | Yes | undefined | additional props that are not specifically defined in the component, i.e. aria-label |
|
|
638
656
|
| variant | string | Yes | 'default' | valid Card variant choices are 'default', 'imageLeft', 'imageBottom', and 'imageRight'. The default variant has its image on the top of the Card. |
|
|
639
657
|
| variantStyle | string | Yes | 'default' | Optoins are 'default' and 'outline' |
|
|
640
658
|
|
|
641
|
-
|
|
642
659
|
**(1) classnames for different variants**
|
|
643
660
|
|
|
644
661
|
- default --> **`flex flex-col w-64 max-w-64`**
|
|
@@ -707,6 +724,8 @@ Full list of props below
|
|
|
707
724
|
| classNameOverLimitMessage | string | Yes | | CSS classes to apply to the message text after the user has exceeded the specified limit. |
|
|
708
725
|
| altRemainingMessageText | string | Yes | 'remaining' | A string value containing an alternate message to display to the user as they type. If the user has typed 5 characters and is not over the limit, the default reads "5 remaining". |
|
|
709
726
|
| altOverageMessageText | string | Yes | 'characters too many' | A string value containing an alternate message to display to the user they have exceeded the specified limit. If the user has typed 15 characters and is over the limit, the default reads "5 characters too many" in red text (with default classNameOverLimitMessage). |
|
|
727
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the content being counted by the CharacterCounter component, used for testing purposes |
|
|
728
|
+
| dataTestIdMessage | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that contains the message printed by the CharacterCounter component |
|
|
710
729
|
|
|
711
730
|
|
|
712
731
|
### Example Usage
|
|
@@ -762,6 +781,7 @@ Used by itself, **CheckBox** behaves as a normal checkbox component and can be u
|
|
|
762
781
|
| Prop | Type | Optional | Default | Description |
|
|
763
782
|
| ----------- | -------- | -------- | -------- | ----------- |
|
|
764
783
|
| 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. |
|
|
784
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the CheckBoxGroup component for testing purposes |
|
|
765
785
|
| fill | boolean | Yes | {false} | specifies using the **`fill`** variant or not. If used, the checkbox itself will have a darker solid background. |
|
|
766
786
|
| 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. |
|
|
767
787
|
| marker | boolean | Yes | {false} | When true this boolean will cause the normal checked checkbox to instead display an 'x' marker icon. |
|
|
@@ -776,6 +796,7 @@ Used by itself, **CheckBox** behaves as a normal checkbox component and can be u
|
|
|
776
796
|
| className | string | Yes | **`'flex items-center'`** | alternate css classes to add/change styling of the **div** that wraps the **input** element. |
|
|
777
797
|
| classNameInput | string | Yes | **`''`** | alternate css classes to add/change styling of the **input** html element. |
|
|
778
798
|
| 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. |
|
|
799
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the CheckBox component for testing purposes |
|
|
779
800
|
| fill | boolean | Yes | {false} | specifies using the **fill** variant or not. If used, the checkbox itself will have a darker solid background. |
|
|
780
801
|
| 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. |
|
|
781
802
|
| marker | boolean | Yes | {false} | When true this boolean will cause the normal checked checkbox to instead display an 'x' marker icon. |
|
|
@@ -843,6 +864,9 @@ The DatePicker component as built takes in various props (id, label, value, onCh
|
|
|
843
864
|
|
|
844
865
|
| Prop | Type | Optional | Default | Description |
|
|
845
866
|
| ----------- | -------- | -------- | -------- | -------------------------------------------- |
|
|
867
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the DatePicker component for testing purposes |
|
|
868
|
+
| dataTestIdInput | string | Yes | undefined | A **'data-testid'** value that is applied to the input element that of a DatePicker for testing purposes |
|
|
869
|
+
| dataTestIdExpanded | string | Yes | undefined | A **'data-testid'** value that is applied to the div element of the expanded portion of the DatePicker component for testing purposes |
|
|
846
870
|
| id | string | No | | An ID to differentiate/target the component. |
|
|
847
871
|
| label | string | No | | A label for the component |
|
|
848
872
|
| onChange | (date: string) => void \| No | undefined | Handler function to be fed to the component, executed when the date changes |
|
|
@@ -903,6 +927,8 @@ buttons.
|
|
|
903
927
|
| clickHandler | **`(expanded: boolean) => void`** | Yes | **`undefined`** | Takes a user-defined function that accepts a boolean value indicating whether the text is expanded or not (true or false). |
|
|
904
928
|
| collapseButton | **`boolean`** | Yes | **`false`** | to display a collapse button or not |
|
|
905
929
|
| collapseText | **`string`** | Yes | **`'collapse'`** | text label for 'collapse' button |
|
|
930
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the ExpandableText component for testing purposes |
|
|
931
|
+
| dataTestIdButton | string | Yes | undefined | A **'data-testid'** value that is applied to the button element that either expands or shrinks the ExpandaleText component for testing purposes |
|
|
906
932
|
| initialChars | **`number`** | Yes | 40 | number of characters to display by default in collapsed state |
|
|
907
933
|
|
|
908
934
|
### Example Usage
|
|
@@ -938,7 +964,9 @@ A reference can also be created and passed to the input component, and the compo
|
|
|
938
964
|
| ----------- | -------- | -------- | -------- | ----------- |
|
|
939
965
|
| className | string | Yes | **(1) below** | pass any css class names to add/change styling
|
|
940
966
|
| classNameLabel | string | Yes | **(2) below** | pass any css class names to add/change styling for the input label |
|
|
941
|
-
| classNameRequired | string | Yes | |
|
|
967
|
+
| classNameRequired | string | Yes | | a group of alternate css classes that can be specified by the developer styling and placement of the askterisk used to indicate an input value is required. |
|
|
968
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the input element for testing purposes |
|
|
969
|
+
| dataTestIdLabel | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that contains the Label value for testing purposes |
|
|
942
970
|
| insetLabel | boolean | Yes | false | indicates whether the label is inset into the border or resides above the input component |
|
|
943
971
|
| label | string | Yes | '' | string value of label, blank for no label |
|
|
944
972
|
| labelBaseColor | string | Yes | | Use if the page or input color is not white, this will help to blend the label background to the surrounding area, color is a string hex value, i.e. **#fefefe** |
|
|
@@ -1040,6 +1068,7 @@ The **List** component is a component that creates a list of items, ordered or u
|
|
|
1040
1068
|
| withDividers | boolean | Yes | false | if true, this prop will display a divider to separate each item within the list |
|
|
1041
1069
|
| classNameDividerColor | string | Yes | undefined | this prop is used to change the color of dividers when used, for example 'red-400' |
|
|
1042
1070
|
| classNameItem | string | Yes | undefined | takes additional classnames to add/change styling of the items within the list |
|
|
1071
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the List component for testing purposes |
|
|
1043
1072
|
| isDecimal | boolean | Yes | false | if true, this prop will change the component to be ordered as a decimal list, placing a number next toe each item |
|
|
1044
1073
|
| isDisc | boolean | Yes | false | if true, this prob will change the list to be unordered, placing bullet points next to each item |
|
|
1045
1074
|
| isAlphabetical | boolean | false | if true, this prop will change the list indicators to be alphabetical, placing a letter next to each item starting with 'a'. |
|
|
@@ -1150,19 +1179,22 @@ Full list of props below
|
|
|
1150
1179
|
|
|
1151
1180
|
| Prop | Type | Optional | Default | Description |
|
|
1152
1181
|
| ----------- | -------- | -------- | -------- | ----------- |
|
|
1153
|
-
| children | ReactNode | No | | This prop takes children content, i.e. html and content that becomes the body of the Modal. |
|
|
1154
|
-
| isOpen | boolean | No | | indicates whether the Modal is displayed or not. This value also controls the overflow: hidden css property, as well as enabling/disabling keyboard event listeners for accessibility purposes. |
|
|
1155
|
-
| onClose | () => void() | No | | This is the close handler for the Modal component. |
|
|
1156
|
-
| title | string | No | | This is the title to display in the Modal component. |
|
|
1157
1182
|
| blurLevel | 'sm', 'md', 'lg', 'xl', '2xl', '3xl' | Yes | undefined | sets backdrop blur behind the modal |
|
|
1183
|
+
| children | ReactNode | No | | This prop takes children content, i.e. html and content that becomes the body of the Modal. |
|
|
1158
1184
|
| className | string | Yes | **see below** | Alternate CSS classnames to apply to the Modal component. twMerge is used to apply these classes, so they reliably overwrite existing styles. |
|
|
1159
1185
|
| clickOutsideCloses | boolean | Yes | false | When true, any mouse click outside of the Modal will close the Modal component. |
|
|
1160
1186
|
| closeButton | boolean | Yes | true | if true, a close button is presented in the modal |
|
|
1161
1187
|
| closeButtonText | string | Yes | | The string value to display in the Close button |
|
|
1188
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the Modal component for testing purposes |
|
|
1189
|
+
| dataTestIdBody | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that contains the model content for testing purposes |
|
|
1190
|
+
| dataTestIdTitle | string | Yes | undefined | A **'data-testid'** value that is applied to the heading element that contains the title for testing purposes |
|
|
1162
1191
|
| displayClosingX | boolean | Yes | | When true, an 'x' icon is displayed in the upper right of the Modal component that when clicked will close the component. |
|
|
1163
1192
|
| continueButton | boolean | Yes | | When true, a 'Continue' button is displayed in the Modal along with a 'Close' button |
|
|
1164
1193
|
| continueButtonText | string | Yes | | The string value to display in the Continue button |
|
|
1165
1194
|
| continueButtonHandler | () => void | Yes | | The function handler to execute when the Continue button is clicked. |
|
|
1195
|
+
| isOpen | boolean | No | | indicates whether the Modal is displayed or not. This value also controls the overflow: hidden css property, as well as enabling/disabling keyboard event listeners for accessibility purposes. |
|
|
1196
|
+
| onClose | () => void() | No | | This is the close handler for the Modal component. |
|
|
1197
|
+
| title | string | No | | This is the title to display in the Modal component. |
|
|
1166
1198
|
| variant | string | Yes | 'default' - **see below** | indicates the modal variant classes to apply. |
|
|
1167
1199
|
|
|
1168
1200
|
|
|
@@ -1214,6 +1246,7 @@ Full list of props below
|
|
|
1214
1246
|
| ----------- | -------- | -------- | -------- | ----------- |
|
|
1215
1247
|
| children | ReactNode | No | | The primary content to display in this Pill, i.e. the word 'Pill' above.|
|
|
1216
1248
|
| className | string | Yes | | Alternate CSS classnames to apply to the Pill component, which is itself built inside a Button. **`twMerge`** is used to apply these styles, so they reliably overwrite existing classes. |
|
|
1249
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the button element that wraps the Pill component for testing purposes |
|
|
1217
1250
|
| iconLeft | ReactNode | Yes | | This prop takes an image to display as its left icon. It takes this value as a ReactNode.|
|
|
1218
1251
|
| iconLeftSelected | ReactNode | Yes | | This prop takes an image to display as its left icon when the component is in its selected state. It takes this value as a ReactNode.|
|
|
1219
1252
|
| iconRight | ReactNode | Yes | | This prop takes an image to display as its right icon. It takes this value as a ReactNode.|
|
|
@@ -1269,6 +1302,7 @@ Full list of props below
|
|
|
1269
1302
|
| classNameBorderColor | **`string`** | Yes | **`border-[#305B25]`** | Controls the color of the border around each completed step's circle. |
|
|
1270
1303
|
| classNameFillColor | **`string`** | Yes | **`bg-green-500`** | Controls the fill color of each completed step's circle. |
|
|
1271
1304
|
| classNameGradient | **`string`** | Yes | **`from-[#305B25] to-[#5AAB46]`** | Controls the colors used in the gradient for the bars between each completed step. |
|
|
1305
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps ProgressBar for testing purposes |
|
|
1272
1306
|
|
|
1273
1307
|
1. Base CSS Classes
|
|
1274
1308
|
|
|
@@ -1328,6 +1362,7 @@ Full list of props below
|
|
|
1328
1362
|
| classNameContainer | **`string`** | Yes | **`undefined`** | a group of alternate css classes that can be specified by the developer for use in the container (fieldset) element. |
|
|
1329
1363
|
| classNameInput | **`string`** | Yes | see below | a group of alternate css classes that can be specified by the developer for use in the input element of the component. |
|
|
1330
1364
|
| classNameLabel | **`string`** | Yes | see below | a group of alternate css classes that can be specified by the developer for use in the label element of the component. |
|
|
1365
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the fieldset element that wraps RadioGroup for testing purposes |
|
|
1331
1366
|
| options | **`string`** | No | | Array of RadioOption objects that define the options available for selection. |
|
|
1332
1367
|
|
|
1333
1368
|
1. Base CSS Classes
|
|
@@ -1441,12 +1476,15 @@ Full list of props below
|
|
|
1441
1476
|
| classNameContainer | **`string`** | Yes | **`h-12 md:h-[50px] lg:h-14 flex items-center max-w-full relative`** | alternate css classes to add/change styling of the span tag that wraps the search component. |
|
|
1442
1477
|
| classNameInputContainer | **`string`** | Yes | **`border-[#6a686b] w-[309px] md:w-[334px] lg:w-[350px] inline-flex bg-white items-center lg:bg-transparent pe-2`** | alternate css classes to add/change styling of the span tag that wraps the search component. |
|
|
1443
1478
|
| classNameListOutput | **`string`** | Yes | see (2) below | alternate css classes to add/change styling of the output list or search results box. |
|
|
1479
|
+
| dataTestIdInput | string | Yes | undefined | A **'data-testid'** value that is applied to the input element inside the Search component |
|
|
1480
|
+
| dataTestIdResults | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that is the container for the Search results list, applied for testing purposes |
|
|
1444
1481
|
| iconLink | **`boolean`** | Yes | **`{false}`** | If set to true, a search icon is displayed that when clicked will expand into a wider Search component. |
|
|
1445
1482
|
| iconLinkHandler | **`() => void`** | Yes | **undefined** | If **iconLink** is true, this handler will fire when the user clicks the icon to expand the Search bar. This can be used in case the parent container should be notified the Search component is expanded. |
|
|
1446
1483
|
| searchableData | **`SearchDataItem[]`** | No | undefined | The data that the search component uses as its data source. This data must conform to the SearchDataItem interface. An example data file is shown above. |
|
|
1447
1484
|
| setSearchResults | **`(DataSearchResults) => return void`** | Yes |undefined | If the use case entails sending the user to a separate results page, provide a function here that takes those search and performs the desired action. See (2) below for the DataSearchResults definition. |
|
|
1448
1485
|
| variant | **`string`** | Yes | undefined | There is one non-default optional variant type, and that is 'rounded'. This variant type will cause the ends of the **`Search`** component to be full rounded in appearance. |
|
|
1449
1486
|
|
|
1487
|
+
|
|
1450
1488
|
1. Default className
|
|
1451
1489
|
|
|
1452
1490
|
**`grow shrink-1 appearance-none h-8 md:h-[32px] my-2 lg:h-14 py-2 lg:ps-[19px] rounded-tl rounded-bl rounded-br-none rounded-tr-none lg:border border-[#07192d] font-['Arial'] bg-white text-[#333234] text-base lg:text-lg hover:border-[#5992fa] focus:border-[#5992fa] outline-hidden`**
|
|
@@ -1558,6 +1596,7 @@ Full list of props below
|
|
|
1558
1596
|
| className | string | Yes | (1) below | Alternate CSS classnames to apply to the SectionHeader component. **`twMerge`** is used to apply these styles, so they reliably overwrite existing classes. |
|
|
1559
1597
|
| classNameChildren | string | Yes | (2) below | Alternate CSS classnames to apply to the **`children`** component which contains the Header content. **`twMerge`** is used to apply these styles, so they reliably overwrite existing classes. |
|
|
1560
1598
|
| classNameSubHeader | string | Yes | (3) below | Alternate CSS classnames to apply to the subHeader portion when present. **`twMerge`** is used to apply these styles, so they reliably overwrite existing classes. |
|
|
1599
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that is the container for testing purposes |
|
|
1561
1600
|
| fill | boolean | Yes | false | if true, the background on the sectionHeader is filled. Fill is applied by applying **`bg-[#092068] text-[#f0f0f0]`** to the default classes. A custom fill can be applied by applying your own classList via the **`className`** prop and leaving **`fill`** at its default false setting. |
|
|
1562
1601
|
| button | boolean | Yes | false | Boolean value specifying whether to display a button or not on the right side of the SectionHeader. |
|
|
1563
1602
|
| buttonOnClick | () => void | Yes | undefined | An onClick handler for the optional button. |
|
|
@@ -1623,6 +1662,9 @@ Full list of props below
|
|
|
1623
1662
|
| ----------- | -------- | -------- | -------- | ----------- |
|
|
1624
1663
|
| className | string | Yes | (1) below | a group of alternate css classes that can be specified by the developer for use in the input element. |
|
|
1625
1664
|
| classNameContainer | string | Yes | undefined | a group of alternate css classes that can be specified by the developer for use in the parent container of the component. |
|
|
1665
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the select component for testing purposes |
|
|
1666
|
+
| dataTestIdButton | string | Yes | undefined | A **'data-testid'** value that is applied to the button element that is the select component for testing purposes |
|
|
1667
|
+
| dataTestIdList | string | Yes | undefined | A **'data-testid'** value that is applied div element that wraps the drop down list for testing purposes |
|
|
1626
1668
|
| disabled | boolean | Yes | undefined | if true the Select component is placed in a disabled state |
|
|
1627
1669
|
| error | boolean | Yes | false | if true a red border is applied to the outside of the select component indicating an error state. |
|
|
1628
1670
|
| label | string | Yes | undefined | text used as the label for the input, i.e. 'Border Color' above |
|
|
@@ -1688,6 +1730,7 @@ This div is also styled using the tailwind **`twMerge()`** utility, so custom cl
|
|
|
1688
1730
|
| subVariant | string | No | See **(1)** below | The predefined variant of Badge to display. |
|
|
1689
1731
|
| variant | string | No | See **(1)** below | The predefined variant of Badge to display. UX designed variants are **go**, **hazard**, and **warning** |
|
|
1690
1732
|
| className | string | Yes | See **(2)** below | Alternate CSS classnames to apply to the Badge component.twMerge is used to apply these styles, so they reliably overwrite existing styles |
|
|
1733
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that wraps the shield for testing purposes |
|
|
1691
1734
|
| imageAlt | string | See Comment | undefined | When an imagePath is specified, please specify an imageAlt that can be used for accessibility purposes. |
|
|
1692
1735
|
| classNameImage | string | Yes | undefined | Alternate CSS classes that are applied to the image for variant type media. |
|
|
1693
1736
|
| imagePath | string | See Comment | undefined | When variant is of type "media", an imagePath has to be specified that the component can load and display. |
|
|
@@ -1795,6 +1838,8 @@ Full list of props below
|
|
|
1795
1838
|
| classNameMenu | string | Yes | empty string | alternate css classes to apply to the element that makes up the hamburger menu |
|
|
1796
1839
|
| classNameMenuContainer | string | Yes | (3) below | alternate css classes to apply to the **`button`** element that wraps up the hamburger menu |
|
|
1797
1840
|
| classNameMenuItem | string | Yes | 'pb-4' | allows the user to add alternate classes via **`twMerge`** to individual menu items |
|
|
1841
|
+
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the dialog element that wraps the menu for testing purposes |
|
|
1842
|
+
| dataTestIdHamburger | string | Yes | 'hamburgerMenu' | A **'data-testid'** value that is applied to the button that is the hamburger menu for testing purposes. |
|
|
1798
1843
|
| backgroundShadow | boolean | Yes | false | When true (or present) this sets a background shadow that covers the page with the SideBarNav on top when activated. See also **`classNameBackgroundShadow`** to apply custom styling. |
|
|
1799
1844
|
| clickOutsideCloses | boolean | Yes | **`false`** | clicking or tapping elsewhere on the application will close the SideBarNav |
|
|
1800
1845
|
| customButton | boolean | Yes | false | When present (or true) this sets the SideBarNav to respond to the custom event handler **`toggleSideBarNav`**. This allows the developer to utilize their own button that simply executes the above custom event handler to toggle the SideBarNav open & closed state. |
|
|
@@ -1917,6 +1962,7 @@ Full list of props below
|
|
|
1917
1962
|
| Prop | Type | Optional | Default | Description |
|
|
1918
1963
|
| ----------- | -------- | -------- | -------- | ----------- |
|
|
1919
1964
|
| className | string | Yes | | This is used to apply user supplied styling to the `Skeleton` component. |
|
|
1965
|
+
| dataTestId | **`string`** | Yes | undefined | A **'data-testid'** value that is applied to a component div element for testing purposes |
|
|
1920
1966
|
| variant | string | Yes | | Allows the user to enter a pre-defined variant that includes its own pre-defined styling |
|
|
1921
1967
|
|
|
1922
1968
|
### Props for SkelCircle & SkelLine components
|
|
@@ -1924,6 +1970,7 @@ Full list of props below
|
|
|
1924
1970
|
| Prop | Type | Optional | Default | Description |
|
|
1925
1971
|
| ----------- | -------- | -------- | -------- | ----------- |
|
|
1926
1972
|
| className | string | Yes | | This is used to apply user supplied styling to the `SkelCircle` and `SkelLine` components. |
|
|
1973
|
+
| dataTestId | **`string`** | Yes | undefined | A **'data-testid'** value that is applied to a component div element for testing purposes |
|
|
1927
1974
|
| inline | boolean | Yes | false | if specified or true this component will be layed out inline. The `className` prop can be used to set a width, and if desired, additional inline components can be placed on the same line inside the Skeleton. |
|
|
1928
1975
|
|
|
1929
1976
|
### Props for SkelCircle & SkelLine components
|
|
@@ -1931,6 +1978,9 @@ Full list of props below
|
|
|
1931
1978
|
| Prop | Type | Optional | Default | Description |
|
|
1932
1979
|
| ----------- | -------- | -------- | -------- | ----------- |
|
|
1933
1980
|
| className | string | Yes | | This is used to apply user supplied styling to the `SkelSection` and `SkelRow` components. |
|
|
1981
|
+
| dataTestId | **`string`** | Yes | undefined | A **'data-testid'** value that is applied to a component div element for testing purposes |
|
|
1982
|
+
|
|
1983
|
+
|
|
1934
1984
|
|
|
1935
1985
|
Tailwind CSS Classes used for Skeleton components
|
|
1936
1986
|
|
|
@@ -2014,9 +2064,10 @@ Full list of props below
|
|
|
2014
2064
|
| className | string | Yes | | This is used to apply user supplied styling to the **input** element that makes up the **Slider** component. |
|
|
2015
2065
|
| classNameLabel | string | Yes | | A string value of tailwind classes used to apply styling to the **label** inside the **Slider** component. |
|
|
2016
2066
|
| changeHandler | **`(value: number) => void;`** | Yes | | A **callback** function can be used to pass values back to the parent. Example in the usage display of the callback example above. |
|
|
2067
|
+
| dataTestIdInput | **`string`** | Yes | undefined | A **'data-testid'** value that is applied to the components input element for testing purposes |
|
|
2068
|
+
| dataTestIdLabel | **`string`** | Yes | undefined | A **'data-testid'** value that is applied to the components label element for testing purposes |
|
|
2017
2069
|
| id | string | Yes | | The **id** value used to link the **label** and **input** elements together. If an **id** is not provided, the **label** is not displayed. |
|
|
2018
2070
|
|
|
2019
|
-
|
|
2020
2071
|
Tailwind CSS Classes used for Slider components
|
|
2021
2072
|
|
|
2022
2073
|
- className defaults
|
|
@@ -2093,9 +2144,12 @@ Full list of props below
|
|
|
2093
2144
|
| className | string | Yes | (1) below | Alternate CSS classnames to apply to the Status component. `twMerge` is used to apply these styles, so they reliably overwrite existing styles. |
|
|
2094
2145
|
| classNameChild | string | Yes | (2) below | This prop takes in alternate classes to apply style to the `div` that contains the child content. |
|
|
2095
2146
|
| classNameImage | string | Yes | (3) below | Alternate CSS classes that are applied to the div containing the childe div that contains the Status component image. |
|
|
2147
|
+
| dataTestIdContent | **`string`** | Yes | undefined | A **'data-testid'** value that is applied to the components containing div for testing purposes |
|
|
2148
|
+
| dataTestIdContainer | **`string`** | Yes | undefined | A **'data-testid'** value that is applied to the component for testing purposes |
|
|
2096
2149
|
| image | ReactNode | Yes | | This prop takes type `ReactNode`, and is used to display a custom user supplied image. See usage examples above for more. |
|
|
2097
2150
|
| variant | string | No | 'available' | The predefined variant of Status to display. Predefined variants are `available`, `inProgress`, and `notAvailable` |
|
|
2098
2151
|
|
|
2152
|
+
|
|
2099
2153
|
1. className
|
|
2100
2154
|
|
|
2101
2155
|
**`h-[45px] px-4 py-3 bg-green-50 rounded-[100px] border border-green-700 justify-center items-center gap-2 inline-flex`**
|
|
@@ -2172,6 +2226,8 @@ Full list of props below
|
|
|
2172
2226
|
| ----------- | -------- | -------- | -------- | ----------- |
|
|
2173
2227
|
| className | string | Yes | undefined | 'flex border-b border-gray-200' | Additional css classes to apply to the div containing the individual tabs |
|
|
2174
2228
|
| classNameContainer | string | Yes | 'w-full' | Additional css classes to apply to the containing div for the tabs component |
|
|
2229
|
+
| dataTestIdTabButton | **`string`** | Yes | undefined | A **'data-testid'** value that is applied to the component for testing purposes |
|
|
2230
|
+
| dataTestIdContainer | **`string`** | Yes | undefined | A **'data-testid'** value that is applied to the component for testing purposes |
|
|
2175
2231
|
| tabs | {id: string; label: string; content: ReactNode;}[] | Yes | undefined | An array of objects representing the individual tabs to display |
|
|
2176
2232
|
| variant | string | Yes | 'default' | The predefined variant of Tabs to display. Current options are 'default', 'outline', and 'transparent' |
|
|
2177
2233
|
|
|
@@ -2229,6 +2285,7 @@ As with the button component, Toggle takes any other additional html attributes
|
|
|
2229
2285
|
| ----------- | -------- | -------- | -------- | ----------- |
|
|
2230
2286
|
| className | string | Yes | (1) below | alternate css classes to add/change styling of button element inside component |
|
|
2231
2287
|
| classNameButton | string | Yes | (1) below | alternate css classes to add/change styling of div used inside button/toggle |
|
|
2288
|
+
| dataTestId | **`string`** | Yes | undefined | A **'data-testid'** value that is applied to the component for testing purposes |
|
|
2232
2289
|
| defaultChecked | boolean | Yes | **`false`** | sets default state as checked or unchecked state when first displayed |
|
|
2233
2290
|
| disabled | boolean | Yes | **`false`** | sets disabled state of Toggle component || label | string | Yes | 'Toggle on/off' | The **label** prop denotes the aria label to set for the toggle component. |
|
|
2234
2291
|
| onCheckedChange | (checked: boolean) => void | Yes | undefined | callback function that is called with the new value of `checked` whenever it changes. To capture the correct state, it is recommended that you use an arrow function here. |
|
|
@@ -2299,6 +2356,7 @@ For accessibility purposes the **`TooltipContent`** component also takes an **`i
|
|
|
2299
2356
|
| children | **`ReactNode`** | No | | This contains the wrapped content that when hovered will cause the tooltip to display. |
|
|
2300
2357
|
| className | **`string`** | Yes | **`relative inline-block`** | alternate css classes to add/change styling of the Tooltip (Not the TooltipContent) component. There is very little here wrt CSS classes, so will probably not be touched. |
|
|
2301
2358
|
| delay | **`number`** | Yes | **`0`** | Sets a numeric value that delays the tooltip displaying by this number of milliseconds. Default value is 0, or no delay. |
|
|
2359
|
+
| dataTestId | **`string`** | Yes | undefined | A **'data-testid'** value that is applied to the component for testing purposes |
|
|
2302
2360
|
|
|
2303
2361
|
### Props for the TooltipContent component
|
|
2304
2362
|
|
|
@@ -2307,6 +2365,7 @@ For accessibility purposes the **`TooltipContent`** component also takes an **`i
|
|
|
2307
2365
|
| children | **`ReactNode `** | No | | This contains the content to display inside the tooltip. |
|
|
2308
2366
|
| className | **`string`** | Yes | See (1) below | Alternate CSS styling to change (or alter) the display position and/or style of the tooltip. See below for current css class values. |
|
|
2309
2367
|
| position | **`string`** | Yes | **`undefined`** | Determines the position of the tooltip when displayed relative to the wrapped component. Default positioning is on the bottom-left, or southwest location. Other options are 'w', 'nw', 'n', 'ne', 'e', 'se', 's', and 'c' (center) |
|
|
2368
|
+
| dataTestId | **`string`** | Yes | undefined | A **'data-testid'** value that is applied to the component for testing purposes |
|
|
2310
2369
|
|
|
2311
2370
|
|
|
2312
2371
|
1. Base CSS Classes
|