@dhasdk/simple-ui 1.0.63 → 1.0.65

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,12 @@ Tooltip
53
53
 
54
54
  ## Changelog
55
55
 
56
+ 1.0.65 - changed **label** on **`Input`** component to a **`ReactNode`** type. Also updated **aria-label**
57
+ handling logic to compensate (dev can enter **aria-label** manually, if not present and label is of
58
+ type string, will use **label** as the **aria-label**).
59
+
60
+ 1.0.64 - changed **optionsLabel** prop in **`Select`** to a ReactNode from string value
61
+
56
62
  1.0.63 - added **selected** prop to the **`Select`** component
57
63
 
58
64
  1.0.62 - fixed 'checked' and 'indeterminate' prop usage for CheckBox, updated documentation for CheckBox re their usage w/ CheckBox and CheckBoxGroup
@@ -1030,12 +1036,14 @@ A reference can also be created and passed to the input component, and the compo
1030
1036
  | dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the input element for testing purposes |
1031
1037
  | dataTestIdLabel | string | Yes | undefined | A **'data-testid'** value that is applied to the div element that contains the Label value for testing purposes |
1032
1038
  | insetLabel | boolean | Yes | false | indicates whether the label is inset into the border or resides above the input component |
1033
- | label | string | Yes | '' | string value of label, blank for no label |
1039
+ | label | ReactNode | Yes | '' | Can be a String or ReactNode, allows formatting inside the label. The
1040
+ **`aria-label`** value can be specified separately, or taken from **label** if of type string. aria-label is
1041
+ undefined otherwise. |
1034
1042
  | 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** |
1035
1043
  | error | boolean | Yes | false | boolean prop indicating if the current input is in an error state. if true, applies visual error formatting to the input component. |
1036
1044
  | mask | string | Yes | undefined | a text string used to define an input mask. using the provided mask, input will format the users input into the formatted mask. In the case that the user adds invalid input, it is ignored. Non letter/number characters are also automatically entered if a valid following character type is added instead. # represents an individual number character, and @ represents a letter. All other values are themselves. |
1037
1045
  | placeHolder | string | Yes | Yes | | sets the placeholder text inside the input element |
1038
- | ...props | string | Yes | | takes additional props that are not specifically defined in the component, i.e. aria-label |
1046
+ | ...props | string | Yes | | takes additional props that are not specifically defined in the component, i.e. aria-label. Note, if **aria-label** is not specically set, will be derived from **label** if of type string |
1039
1047
  | required | boolean | Yes | | if specified, a red asterisk is prepended to the label, and the required attribute is set to true |
1040
1048
  | textShadow | boolean | Yes | false | indicates whether a drop shadow should be applied or not to the label text, and if used, utilizes the **labelBaseColor** above. |
1041
1049
  | variant | string | Yes | | The predefined variant of Badge to display. Current options are 'default', 'MedCard', 'Outline', and 'nonHover' |
@@ -1770,7 +1778,7 @@ Full list of props below
1770
1778
  | error | boolean | Yes | false | if true a red border is applied to the outside of the select component indicating an error state. |
1771
1779
  | label | string | Yes | undefined | text used as the label for the input, i.e. 'Border Color' above |
1772
1780
  | options | {{name: ..., value:...}, ...} | Yes | undefined | options is an array of objects, each with a **name** and an optional **value** property. If value is not present, name is used in the handler function. |
1773
- | optionsLabel | string | Yes | undefined | appears as the label in the Select component, i.e. 'Choose a Color' above. Note, this is not the label above the component. |
1781
+ | optionsLabel | ReactNode | Yes | 'Options' | appears as the label in the Select component, i.e. 'Choose a Color' or **`{<><strong>Required: </strong>Choose a Color</>}`** Note, this is not the label above the component. |
1774
1782
  | selected | string | Yes | undefined | The **value** or **name** inside the options array to pre-select or display. Is case sensitive. |
1775
1783
  | setSelectedOption | (string) => void | Yes | undefined | calls the function passed in as **`setSelectedOption`** with the selected **value** if present, otherwise with **name** |
1776
1784
  | variant | string | Yes | undefined | The predefined variant of Select to display. Current options are 'default', 'MedCard', 'Outline', and 'nonHover' |