@hitachivantara/uikit-react-core 3.68.1 → 3.68.4

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.
Files changed (282) hide show
  1. package/dist/Accordion/Accordion.js.map +1 -1
  2. package/dist/ActionBar/ActionBar.js.map +1 -1
  3. package/dist/ActionsGeneric/ActionsGeneric.js.map +1 -1
  4. package/dist/AppSwitcher/Action/Action.js.map +1 -1
  5. package/dist/AppSwitcher/AppSwitcher.js.map +1 -1
  6. package/dist/AppSwitcher/TitleWithTooltip.js.map +1 -1
  7. package/dist/AssetInventory/AssetInventory.js.map +1 -1
  8. package/dist/AssetInventory/CardView/CardView.js.map +1 -1
  9. package/dist/AssetInventory/ListView/ListView.js.map +1 -1
  10. package/dist/AssetInventory/ListView/ListViewCell/ListViewCell.js.map +1 -1
  11. package/dist/AssetInventory/ListView/ListViewCell/styles.js.map +1 -1
  12. package/dist/AssetInventory/ListView/ListViewContext/ListViewContext.js.map +1 -1
  13. package/dist/AssetInventory/ListView/ListViewHeaderRow/ListViewHeaderRow.js.map +1 -1
  14. package/dist/AssetInventory/ListView/ListViewRow/ListViewRow.js.map +1 -1
  15. package/dist/AssetInventory/Multibutton/Multibutton.js.map +1 -1
  16. package/dist/AssetInventory/Search/Search.js.map +1 -1
  17. package/dist/AssetInventory/Sort/Sort.js.map +1 -1
  18. package/dist/AssetInventory/setActionsId.js.map +1 -1
  19. package/dist/Avatar/Avatar.js.map +1 -1
  20. package/dist/Badge/Badge.js.map +1 -1
  21. package/dist/Banner/Banner.js.map +1 -1
  22. package/dist/Banner/BannerWrapper/ActionContainer/ActionContainer.js.map +1 -1
  23. package/dist/Banner/BannerWrapper/ActionContainer/styles.js.map +1 -1
  24. package/dist/Banner/BannerWrapper/BannerContentWrapper.js.map +1 -1
  25. package/dist/Banner/BannerWrapper/MessageContainer/MessageContainer.js.map +1 -1
  26. package/dist/BaseCheckBox/BaseCheckBox.js.map +1 -1
  27. package/dist/BaseDropdown/BaseDropdown.js.map +1 -1
  28. package/dist/BaseDropdown/BaseDropdownContext/BaseDropdownContext.js.map +1 -1
  29. package/dist/BaseInput/BaseInput.js.map +1 -1
  30. package/dist/BaseInput/validations.js.map +1 -1
  31. package/dist/BaseRadio/BaseRadio.js.map +1 -1
  32. package/dist/BaseSwitch/BaseSwitch.js.map +1 -1
  33. package/dist/BreadCrumb/BreadCrumb.js.map +1 -1
  34. package/dist/BreadCrumb/utils.js.map +1 -1
  35. package/dist/BulkActions/BulkActions.js.map +1 -1
  36. package/dist/BulkActions/styles.js.map +1 -1
  37. package/dist/Button/Button.js.map +1 -1
  38. package/dist/Button/materialConfigurarion.js.map +1 -1
  39. package/dist/Button/styles.js.map +1 -1
  40. package/dist/Calendar/Calendar.js.map +1 -1
  41. package/dist/Calendar/CalendarHeader/CalendarHeader.js.map +1 -1
  42. package/dist/Calendar/CalendarNavigation/ComposedNavigation/ComposedNavigation.js.map +1 -1
  43. package/dist/Calendar/CalendarNavigation/MonthSelector/MonthSelector.js.map +1 -1
  44. package/dist/Calendar/CalendarNavigation/Navigation/Navigation.js.map +1 -1
  45. package/dist/Calendar/CalendarWeekLabels/CalendarWeekLabels.js.map +1 -1
  46. package/dist/Calendar/SingleCalendar/CalendarCell.js.map +1 -1
  47. package/dist/Calendar/SingleCalendar/SingleCalendar.js.map +1 -1
  48. package/dist/Calendar/model.js.map +1 -1
  49. package/dist/Calendar/utils.js.map +1 -1
  50. package/dist/Card/Card.js.map +1 -1
  51. package/dist/Card/Content/Content.js.map +1 -1
  52. package/dist/Card/Header/Header.js.map +1 -1
  53. package/dist/Card/Media/Media.js.map +1 -1
  54. package/dist/Card/styles.js.map +1 -1
  55. package/dist/CheckBox/CheckBox.js.map +1 -1
  56. package/dist/CheckBoxGroup/CheckBoxGroup.js.map +1 -1
  57. package/dist/Container/Container.js.map +1 -1
  58. package/dist/DatePicker/DatePicker.js.map +1 -1
  59. package/dist/DatePicker/useVisibleDate.js.map +1 -1
  60. package/dist/DatePicker/utils.js.map +1 -1
  61. package/dist/Dialog/Dialog.js.map +1 -1
  62. package/dist/Dialog/DialogActions/DialogActions.js.map +1 -1
  63. package/dist/Dialog/DialogContent/DialogContent.js.map +1 -1
  64. package/dist/Dialog/DialogTitle/DialogTitle.js.map +1 -1
  65. package/dist/Dialog/styles.js.map +1 -1
  66. package/dist/DropDownMenu/DropDownMenu.js.map +1 -1
  67. package/dist/Dropdown/Dropdown.js.map +1 -1
  68. package/dist/Dropdown/List/List.js.map +1 -1
  69. package/dist/EmptyState/EmptyState.js.map +1 -1
  70. package/dist/FileUploader/DropZone/DropZone.js.map +1 -1
  71. package/dist/FileUploader/File/File.js.map +1 -1
  72. package/dist/FileUploader/FileList/FileList.js.map +1 -1
  73. package/dist/FileUploader/FileUploader.js.map +1 -1
  74. package/dist/FileUploader/Preview/Preview.js.map +1 -1
  75. package/dist/FilterGroup/Counter/Counter.js.map +1 -1
  76. package/dist/FilterGroup/Counter/styles.js.map +1 -1
  77. package/dist/FilterGroup/FilterContent/FilterContent.js.map +1 -1
  78. package/dist/FilterGroup/FilterContent/styles.js.map +1 -1
  79. package/dist/FilterGroup/FilterGroup.js.map +1 -1
  80. package/dist/FilterGroup/FilterGroupContext.js.map +1 -1
  81. package/dist/FilterGroup/LeftPanel/LeftPanel.js.map +1 -1
  82. package/dist/FilterGroup/LeftPanel/styles.js.map +1 -1
  83. package/dist/FilterGroup/RightPanel/RightPanel.js.map +1 -1
  84. package/dist/FilterGroup/RightPanel/styles.js.map +1 -1
  85. package/dist/FilterGroup/styles.js.map +1 -1
  86. package/dist/Focus/Focus.js.map +1 -1
  87. package/dist/Focus/utils.js.map +1 -1
  88. package/dist/Footer/Footer.js.map +1 -1
  89. package/dist/Forms/Adornment/Adornment.js.map +1 -1
  90. package/dist/Forms/CharCounter/CharCounter.js.map +1 -1
  91. package/dist/Forms/FormElement/FormElement.js.map +1 -1
  92. package/dist/Forms/FormElement/context/FormElementContext.js.map +1 -1
  93. package/dist/Forms/FormElement/context/FormElementDescriptorsContext.js.map +1 -1
  94. package/dist/Forms/FormElement/context/FormElementValueContext.js.map +1 -1
  95. package/dist/Forms/FormElement/utils/FormUtils.js.map +1 -1
  96. package/dist/Forms/InfoMessage/InfoMessage.js.map +1 -1
  97. package/dist/Forms/Label/Label.js.map +1 -1
  98. package/dist/Forms/Suggestions/Suggestions.js.map +1 -1
  99. package/dist/Forms/WarningText/WarningText.js.map +1 -1
  100. package/dist/GlobalActions/GlobalActions.js.map +1 -1
  101. package/dist/Grid/Grid.js.map +1 -1
  102. package/dist/Header/Actions/Actions.js.map +1 -1
  103. package/dist/Header/Brand/Brand.js.map +1 -1
  104. package/dist/Header/Header.js.map +1 -1
  105. package/dist/Header/Navigation/MenuBar/MenuBar.js +5 -1
  106. package/dist/Header/Navigation/MenuBar/MenuBar.js.map +1 -1
  107. package/dist/Header/Navigation/MenuItem/MenuItem.js +29 -9
  108. package/dist/Header/Navigation/MenuItem/MenuItem.js.map +1 -1
  109. package/dist/Header/Navigation/MenuItem/styles.js +4 -0
  110. package/dist/Header/Navigation/MenuItem/styles.js.map +1 -1
  111. package/dist/Header/Navigation/Navigation.d.ts +4 -0
  112. package/dist/Header/Navigation/Navigation.js +5 -1
  113. package/dist/Header/Navigation/Navigation.js.map +1 -1
  114. package/dist/Header/Navigation/utils/FocusContext.js.map +1 -1
  115. package/dist/Header/Navigation/utils/SelectionContext.js.map +1 -1
  116. package/dist/Header/Navigation/utils/useSelectionPath.js.map +1 -1
  117. package/dist/Input/Input.js.map +1 -1
  118. package/dist/Kpi/Kpi.js.map +1 -1
  119. package/dist/Link/Link.js.map +1 -1
  120. package/dist/List/List.js +20 -16
  121. package/dist/List/List.js.map +1 -1
  122. package/dist/List/useSelectableList.js.map +1 -1
  123. package/dist/List/utils.js.map +1 -1
  124. package/dist/ListContainer/ListContainer.js.map +1 -1
  125. package/dist/ListContainer/ListContext/ListContext.js.map +1 -1
  126. package/dist/ListContainer/ListItem/ListItem.js.map +1 -1
  127. package/dist/Loading/Loading.js.map +1 -1
  128. package/dist/Login/Login.js.map +1 -1
  129. package/dist/Login/styles.js.map +1 -1
  130. package/dist/MultiButton/MultiButton.js.map +1 -1
  131. package/dist/OverflowTooltip/OverflowTooltip.js.map +1 -1
  132. package/dist/Pagination/Pagination.js.map +1 -1
  133. package/dist/Pagination/Select.js.map +1 -1
  134. package/dist/Pagination/utils.js.map +1 -1
  135. package/dist/Panel/Panel.js.map +1 -1
  136. package/dist/Provider/Provider.js.map +1 -1
  137. package/dist/Provider/context.js.map +1 -1
  138. package/dist/Provider/useLocale.js.map +1 -1
  139. package/dist/Radio/Radio.js.map +1 -1
  140. package/dist/RadioGroup/RadioGroup.js.map +1 -1
  141. package/dist/ScrollTo/Horizontal/HorizontalScrollListItem/HorizontalScrollListItem.js.map +1 -1
  142. package/dist/ScrollTo/Horizontal/ScrollToHorizontal.js.map +1 -1
  143. package/dist/ScrollTo/Horizontal/styles.js.map +1 -1
  144. package/dist/ScrollTo/Vertical/ScrollToVertical.js.map +1 -1
  145. package/dist/ScrollTo/Vertical/VerticalScrollListItem/VerticalScrollListItem.js.map +1 -1
  146. package/dist/ScrollTo/Vertical/styles.js.map +1 -1
  147. package/dist/ScrollTo/useScrollTo.js.map +1 -1
  148. package/dist/ScrollTo/withTooltip.js.map +1 -1
  149. package/dist/SelectionList/SelectionList.js.map +1 -1
  150. package/dist/SimpleGrid/SimpleGrid.js.map +1 -1
  151. package/dist/SimpleGrid/styles.js.map +1 -1
  152. package/dist/Slider/Slider.js.map +1 -1
  153. package/dist/Slider/SliderInput/SliderInput.js.map +1 -1
  154. package/dist/Slider/utils.js.map +1 -1
  155. package/dist/Snackbar/Snackbar.js.map +1 -1
  156. package/dist/Snackbar/SnackbarContentWrapper/SnackbarContentWrapper.js.map +1 -1
  157. package/dist/Snackbar/SnackbarProvider/SnackbarProvider.js.map +1 -1
  158. package/dist/Stack/Stack.js.map +1 -1
  159. package/dist/Switch/Switch.js.map +1 -1
  160. package/dist/Tab/Tab.js.map +1 -1
  161. package/dist/Table/CellWithTooltip/index.js.map +1 -1
  162. package/dist/Table/Header/Header.js.map +1 -1
  163. package/dist/Table/NoData/index.js.map +1 -1
  164. package/dist/Table/NoData/styles.js.map +1 -1
  165. package/dist/Table/Table.js +19 -22
  166. package/dist/Table/Table.js.map +1 -1
  167. package/dist/Table/columnUtils.js.map +1 -1
  168. package/dist/Table/selectTable.js.map +1 -1
  169. package/dist/Table/styles.js.map +1 -1
  170. package/dist/Tabs/Tabs.js.map +1 -1
  171. package/dist/Tag/Tag.js.map +1 -1
  172. package/dist/Tag/styles.js.map +1 -1
  173. package/dist/TagsInput/TagsInput.js.map +1 -1
  174. package/dist/TextArea/TextArea.js.map +1 -1
  175. package/dist/TimePicker/PeriodPicker/PeriodPicker.js.map +1 -1
  176. package/dist/TimePicker/PeriodPicker/index.js.map +1 -1
  177. package/dist/TimePicker/TimePicker.js.map +1 -1
  178. package/dist/TimePicker/UnitTimePicker/UnitTimePicker.js.map +1 -1
  179. package/dist/TimePicker/UnitTimePicker/index.js.map +1 -1
  180. package/dist/TimePicker/timePickerConverter.js.map +1 -1
  181. package/dist/TimePicker/timePickerFormatter.js.map +1 -1
  182. package/dist/TimePicker/timePickerUtils.js.map +1 -1
  183. package/dist/ToggleButton/ToggleButton.js.map +1 -1
  184. package/dist/Tooltip/Tooltip.js.map +1 -1
  185. package/dist/Typography/Typography.js.map +1 -1
  186. package/dist/UserPreferences/Action/Action.js.map +1 -1
  187. package/dist/UserPreferences/Action/styles.js.map +1 -1
  188. package/dist/UserPreferences/Actions/Actions.js.map +1 -1
  189. package/dist/UserPreferences/Options/Group/Group.js.map +1 -1
  190. package/dist/UserPreferences/Options/Label/Label.js.map +1 -1
  191. package/dist/UserPreferences/Options/Option.js.map +1 -1
  192. package/dist/UserPreferences/Options/Options.js.map +1 -1
  193. package/dist/UserPreferences/Options/OptionsContext.js.map +1 -1
  194. package/dist/UserPreferences/Options/styles.js.map +1 -1
  195. package/dist/UserPreferences/UserPreferences.js.map +1 -1
  196. package/dist/VerticalNavigation/Actions/Action.js.map +1 -1
  197. package/dist/VerticalNavigation/Actions/Actions.js.map +1 -1
  198. package/dist/VerticalNavigation/Navigation/Navigation.d.ts +8 -0
  199. package/dist/VerticalNavigation/Navigation/Navigation.js +10 -3
  200. package/dist/VerticalNavigation/Navigation/Navigation.js.map +1 -1
  201. package/dist/VerticalNavigation/TreeView/TreeView.js.map +1 -1
  202. package/dist/VerticalNavigation/TreeView/TreeViewContexts.js.map +1 -1
  203. package/dist/VerticalNavigation/TreeView/TreeViewItem.d.ts +8 -0
  204. package/dist/VerticalNavigation/TreeView/TreeViewItem.js +25 -4
  205. package/dist/VerticalNavigation/TreeView/TreeViewItem.js.map +1 -1
  206. package/dist/VerticalNavigation/TreeView/descendants.js.map +1 -1
  207. package/dist/VerticalNavigation/TreeView/styles.js +3 -0
  208. package/dist/VerticalNavigation/TreeView/styles.js.map +1 -1
  209. package/dist/VerticalNavigation/VerticalContainer/VerticalContainer.js.map +1 -1
  210. package/dist/VerticalNavigation/VerticalNavigation.js.map +1 -1
  211. package/dist/legacy/Header/Navigation/MenuBar/MenuBar.js +5 -1
  212. package/dist/legacy/Header/Navigation/MenuBar/MenuBar.js.map +1 -1
  213. package/dist/legacy/Header/Navigation/MenuItem/MenuItem.js +25 -9
  214. package/dist/legacy/Header/Navigation/MenuItem/MenuItem.js.map +1 -1
  215. package/dist/legacy/Header/Navigation/MenuItem/styles.js +4 -0
  216. package/dist/legacy/Header/Navigation/MenuItem/styles.js.map +1 -1
  217. package/dist/legacy/Header/Navigation/Navigation.d.ts +4 -0
  218. package/dist/legacy/Header/Navigation/Navigation.js +5 -1
  219. package/dist/legacy/Header/Navigation/Navigation.js.map +1 -1
  220. package/dist/legacy/List/List.js +23 -19
  221. package/dist/legacy/List/List.js.map +1 -1
  222. package/dist/legacy/Table/Table.js +20 -23
  223. package/dist/legacy/Table/Table.js.map +1 -1
  224. package/dist/legacy/VerticalNavigation/Navigation/Navigation.d.ts +8 -0
  225. package/dist/legacy/VerticalNavigation/Navigation/Navigation.js +10 -3
  226. package/dist/legacy/VerticalNavigation/Navigation/Navigation.js.map +1 -1
  227. package/dist/legacy/VerticalNavigation/TreeView/TreeViewItem.d.ts +8 -0
  228. package/dist/legacy/VerticalNavigation/TreeView/TreeViewItem.js +24 -4
  229. package/dist/legacy/VerticalNavigation/TreeView/TreeViewItem.js.map +1 -1
  230. package/dist/legacy/VerticalNavigation/TreeView/styles.js +3 -0
  231. package/dist/legacy/VerticalNavigation/TreeView/styles.js.map +1 -1
  232. package/dist/legacy/utils/ConditionalRenderer.js +1 -0
  233. package/dist/legacy/utils/ConditionalRenderer.js.map +1 -1
  234. package/dist/modern/Header/Navigation/MenuBar/MenuBar.js +5 -1
  235. package/dist/modern/Header/Navigation/MenuBar/MenuBar.js.map +1 -1
  236. package/dist/modern/Header/Navigation/MenuItem/MenuItem.js +24 -9
  237. package/dist/modern/Header/Navigation/MenuItem/MenuItem.js.map +1 -1
  238. package/dist/modern/Header/Navigation/MenuItem/styles.js +4 -0
  239. package/dist/modern/Header/Navigation/MenuItem/styles.js.map +1 -1
  240. package/dist/modern/Header/Navigation/Navigation.d.ts +4 -0
  241. package/dist/modern/Header/Navigation/Navigation.js +5 -1
  242. package/dist/modern/Header/Navigation/Navigation.js.map +1 -1
  243. package/dist/modern/List/List.js +25 -24
  244. package/dist/modern/List/List.js.map +1 -1
  245. package/dist/modern/Table/Table.js +20 -23
  246. package/dist/modern/Table/Table.js.map +1 -1
  247. package/dist/modern/VerticalNavigation/Navigation/Navigation.d.ts +8 -0
  248. package/dist/modern/VerticalNavigation/Navigation/Navigation.js +10 -2
  249. package/dist/modern/VerticalNavigation/Navigation/Navigation.js.map +1 -1
  250. package/dist/modern/VerticalNavigation/TreeView/TreeViewItem.d.ts +8 -0
  251. package/dist/modern/VerticalNavigation/TreeView/TreeViewItem.js +23 -4
  252. package/dist/modern/VerticalNavigation/TreeView/TreeViewItem.js.map +1 -1
  253. package/dist/modern/VerticalNavigation/TreeView/styles.js +3 -0
  254. package/dist/modern/VerticalNavigation/TreeView/styles.js.map +1 -1
  255. package/dist/modern/utils/ConditionalRenderer.js +1 -0
  256. package/dist/modern/utils/ConditionalRenderer.js.map +1 -1
  257. package/dist/theme/CssBaseline.js.map +1 -1
  258. package/dist/theme/ScopedCssBaseline.js.map +1 -1
  259. package/dist/theme/createGenerateClassName.js.map +1 -1
  260. package/dist/theme/index.js.map +1 -1
  261. package/dist/theme/overrides/muiButton.js.map +1 -1
  262. package/dist/theme/palette.js.map +1 -1
  263. package/dist/theme/typography.js.map +1 -1
  264. package/dist/useUniqueId.js.map +1 -1
  265. package/dist/utils/ConditionalRenderer.js +1 -0
  266. package/dist/utils/ConditionalRenderer.js.map +1 -1
  267. package/dist/utils/browser.js.map +1 -1
  268. package/dist/utils/hexToRgbA.js.map +1 -1
  269. package/dist/utils/refType.js.map +1 -1
  270. package/dist/utils/setId.js.map +1 -1
  271. package/dist/utils/useComputation.js.map +1 -1
  272. package/dist/utils/useDeprecated.js.map +1 -1
  273. package/dist/utils/useImageLoaded.js.map +1 -1
  274. package/dist/utils/useIsMounted.js.map +1 -1
  275. package/dist/utils/useLabels.js.map +1 -1
  276. package/dist/utils/usePropAsRef.js.map +1 -1
  277. package/dist/utils/useSavedState.js.map +1 -1
  278. package/dist/utils/useUpdated.js.map +1 -1
  279. package/dist/utils/useWidth.js.map +1 -1
  280. package/dist/withId.js.map +1 -1
  281. package/dist/withTooltip.js.map +1 -1
  282. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"FormElement.js","names":["HvFormElement","props","classes","className","children","id","name","value","disabled","required","readOnly","status","others","elementId","contextValue","elementName","elementStatus","elementDisabled","elementRequired","elementReadOnly","descriptors","root","formElementType","propTypes","PropTypes","string","shape","isRequired","node","any","label","description","bool","oneOf","statusMessage","onChange","func","styles"],"sources":["../../../src/Forms/FormElement/FormElement.js"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport clsx from \"clsx\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\n\nimport useUniqueId from \"../../useUniqueId\";\n\nimport { findDescriptors } from \"./utils/FormUtils\";\nimport { HvFormElementContextProvider } from \"./context/FormElementContext\";\nimport { HvFormElementValueContextProvider } from \"./context/FormElementValueContext\";\nimport { HvFormElementDescriptorsContextProvider } from \"./context/FormElementDescriptorsContext\";\nimport styles from \"./styles\";\n\n/**\n * The FormElement intends to establish the base API for form elements and also to\n * ensure state consistency among children in relation to ids, validation status, etc..\n *\n * FormElement and its provided building blocks can be used when implementing a custom\n * use case not covered by ready-to-use form elements.\n * Most of these form elements offer a Base version with minimal wiring and logic, with\n * the intent of also serving as building blocks for such cases.\n */\nconst HvFormElement = (props) => {\n const {\n classes,\n className,\n\n children,\n\n id,\n name,\n value,\n\n disabled = false,\n required = false,\n readOnly = false,\n\n status = \"standBy\",\n\n ...others\n } = props;\n\n const elementId = useUniqueId(id, \"hvformelement\");\n\n const contextValue = useMemo(\n () => ({\n elementId,\n elementName: name,\n elementStatus: status,\n elementDisabled: disabled,\n elementRequired: required,\n elementReadOnly: readOnly,\n }),\n [disabled, elementId, name, readOnly, required, status]\n );\n\n const descriptors = useMemo(() => findDescriptors(children), [children]);\n\n return (\n <div id={id} className={clsx(className, classes.root)} {...others}>\n <HvFormElementContextProvider value={contextValue}>\n <HvFormElementValueContextProvider value={value}>\n <HvFormElementDescriptorsContextProvider value={descriptors}>\n {children}\n </HvFormElementDescriptorsContextProvider>\n </HvFormElementValueContextProvider>\n </HvFormElementContextProvider>\n </div>\n );\n};\n\nHvFormElement.formElementType = \"formelement\";\n\nHvFormElement.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied to the FormElement.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n }).isRequired,\n\n /**\n * Components that will receive the form context values.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * Component identifier.\n */\n id: PropTypes.string,\n\n /**\n * Name of the form element.\n *\n * Part of a name/value pair, should be the name property of the underling native input.\n */\n name: PropTypes.string,\n /**\n * Current value of the form element.\n *\n * Part of a name/value pair, should be the value property of the underling native input.\n */\n // eslint-disable-next-line react/forbid-prop-types\n value: PropTypes.any,\n\n /**\n * The label of the form element.\n *\n * The form element must be labeled for accessibility reasons.\n * If not provided, an aria-label or aria-labelledby must be provided instead.\n */\n label: PropTypes.node,\n /**\n * Provide additional descriptive text for the form element.\n */\n description: PropTypes.node,\n\n /**\n * Whether the form element is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * Indicates that the form element is not editable.\n */\n readOnly: PropTypes.bool,\n /**\n * Indicates that user input is required on the form element.\n */\n required: PropTypes.bool,\n\n /**\n * The status of the form element.\n *\n * Valid is correct, invalid is incorrect and standBy means no validations have run.\n *\n * When uncontrolled and unspecified it will default to \"standBy\" and change to either \"valid\"\n * or \"invalid\" after any change to the state.\n */\n status: PropTypes.oneOf([\"standBy\", \"valid\", \"invalid\"]),\n /**\n * The error message to show when `status` is \"invalid\".\n */\n statusMessage: PropTypes.string,\n\n /**\n * The callback fired when the value changes.\n */\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles, { name: \"HvFormElement\" })(HvFormElement);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAAW;EAC/B,IACEC,OADF,GAiBID,KAjBJ,CACEC,OADF;EAAA,IAEEC,SAFF,GAiBIF,KAjBJ,CAEEE,SAFF;EAAA,IAIEC,QAJF,GAiBIH,KAjBJ,CAIEG,QAJF;EAAA,IAMEC,EANF,GAiBIJ,KAjBJ,CAMEI,EANF;EAAA,IAOEC,IAPF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GAAgC,aAAhC;AAEA,wCAAAtB,aAAa,CAACuB,SAAd,GAA0B;EACxB;AACF;AACA;EACEpB,SAAS,EAAEqB,mBAAUC,MAJG;;EAKxB;AACF;AACA;EACEvB,OAAO,EAAEsB,mBAAUE,KAAV,CAAgB;IACvB;AACJ;AACA;IACIL,IAAI,EAAEG,mBAAUC;EAJO,CAAhB,EAKNE,UAbqB;;EAexB;AACF;AACA;EACEvB,QAAQ,EAAEoB,mBAAUI,IAAV,CAAeD,UAlBD;;EAoBxB;AACF;AACA;EACEtB,EAAE,EAAEmB,mBAAUC,MAvBU;;EAyBxB;AACF;AACA;AACA;AACA;EACEnB,IAAI,EAAEkB,mBAAUC,MA9BQ;;EA+BxB;AACF;AACA;AACA;AACA;EACE;EACAlB,KAAK,EAAEiB,mBAAUK,GArCO;;EAuCxB;AACF;AACA;AACA;AACA;AACA;EACEC,KAAK,EAAEN,mBAAUI,IA7CO;;EA8CxB;AACF;AACA;EACEG,WAAW,EAAEP,mBAAUI,IAjDC;;EAmDxB;AACF;AACA;EACEpB,QAAQ,EAAEgB,mBAAUQ,IAtDI;;EAuDxB;AACF;AACA;EACEtB,QAAQ,EAAEc,mBAAUQ,IA1DI;;EA2DxB;AACF;AACA;EACEvB,QAAQ,EAAEe,mBAAUQ,IA9DI;;EAgExB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACErB,MAAM,EAAEa,mBAAUS,KAAV,CAAgB,CAAC,SAAD,EAAY,OAAZ,EAAqB,SAArB,CAAhB,CAxEgB;;EAyExB;AACF;AACA;EACEC,aAAa,EAAEV,mBAAUC,MA5ED;;EA8ExB;AACF;AACA;EACEU,QAAQ,EAAEX,mBAAUY;AAjFI,CAA1B;;eAoFe,sBAAWC,eAAX,EAAmB;EAAE/B,IAAI,EAAE;AAAR,CAAnB,EAA8CN,aAA9C,C"}
1
+ {"version":3,"file":"FormElement.js","names":["HvFormElement","props","classes","className","children","id","name","value","disabled","required","readOnly","status","others","elementId","useUniqueId","contextValue","useMemo","elementName","elementStatus","elementDisabled","elementRequired","elementReadOnly","descriptors","findDescriptors","clsx","root","formElementType","propTypes","PropTypes","string","shape","isRequired","node","any","label","description","bool","oneOf","statusMessage","onChange","func","withStyles","styles"],"sources":["../../../src/Forms/FormElement/FormElement.js"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport clsx from \"clsx\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\n\nimport useUniqueId from \"../../useUniqueId\";\n\nimport { findDescriptors } from \"./utils/FormUtils\";\nimport { HvFormElementContextProvider } from \"./context/FormElementContext\";\nimport { HvFormElementValueContextProvider } from \"./context/FormElementValueContext\";\nimport { HvFormElementDescriptorsContextProvider } from \"./context/FormElementDescriptorsContext\";\nimport styles from \"./styles\";\n\n/**\n * The FormElement intends to establish the base API for form elements and also to\n * ensure state consistency among children in relation to ids, validation status, etc..\n *\n * FormElement and its provided building blocks can be used when implementing a custom\n * use case not covered by ready-to-use form elements.\n * Most of these form elements offer a Base version with minimal wiring and logic, with\n * the intent of also serving as building blocks for such cases.\n */\nconst HvFormElement = (props) => {\n const {\n classes,\n className,\n\n children,\n\n id,\n name,\n value,\n\n disabled = false,\n required = false,\n readOnly = false,\n\n status = \"standBy\",\n\n ...others\n } = props;\n\n const elementId = useUniqueId(id, \"hvformelement\");\n\n const contextValue = useMemo(\n () => ({\n elementId,\n elementName: name,\n elementStatus: status,\n elementDisabled: disabled,\n elementRequired: required,\n elementReadOnly: readOnly,\n }),\n [disabled, elementId, name, readOnly, required, status]\n );\n\n const descriptors = useMemo(() => findDescriptors(children), [children]);\n\n return (\n <div id={id} className={clsx(className, classes.root)} {...others}>\n <HvFormElementContextProvider value={contextValue}>\n <HvFormElementValueContextProvider value={value}>\n <HvFormElementDescriptorsContextProvider value={descriptors}>\n {children}\n </HvFormElementDescriptorsContextProvider>\n </HvFormElementValueContextProvider>\n </HvFormElementContextProvider>\n </div>\n );\n};\n\nHvFormElement.formElementType = \"formelement\";\n\nHvFormElement.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied to the FormElement.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n }).isRequired,\n\n /**\n * Components that will receive the form context values.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * Component identifier.\n */\n id: PropTypes.string,\n\n /**\n * Name of the form element.\n *\n * Part of a name/value pair, should be the name property of the underling native input.\n */\n name: PropTypes.string,\n /**\n * Current value of the form element.\n *\n * Part of a name/value pair, should be the value property of the underling native input.\n */\n // eslint-disable-next-line react/forbid-prop-types\n value: PropTypes.any,\n\n /**\n * The label of the form element.\n *\n * The form element must be labeled for accessibility reasons.\n * If not provided, an aria-label or aria-labelledby must be provided instead.\n */\n label: PropTypes.node,\n /**\n * Provide additional descriptive text for the form element.\n */\n description: PropTypes.node,\n\n /**\n * Whether the form element is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * Indicates that the form element is not editable.\n */\n readOnly: PropTypes.bool,\n /**\n * Indicates that user input is required on the form element.\n */\n required: PropTypes.bool,\n\n /**\n * The status of the form element.\n *\n * Valid is correct, invalid is incorrect and standBy means no validations have run.\n *\n * When uncontrolled and unspecified it will default to \"standBy\" and change to either \"valid\"\n * or \"invalid\" after any change to the state.\n */\n status: PropTypes.oneOf([\"standBy\", \"valid\", \"invalid\"]),\n /**\n * The error message to show when `status` is \"invalid\".\n */\n statusMessage: PropTypes.string,\n\n /**\n * The callback fired when the value changes.\n */\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles, { name: \"HvFormElement\" })(HvFormElement);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAAW;EAC/B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,CAAgB,CAAC,SAAD,EAAY,OAAZ,EAAqB,SAArB,CAAhB,CAxEgB;;EAyExB;AACF;AACA;EACEC,aAAa,EAAEV,kBAAA,CAAUC,MA5ED;;EA8ExB;AACF;AACA;EACEU,QAAQ,EAAEX,kBAAA,CAAUY;AAjFI,CAA1B;;eAoFe,IAAAC,gBAAA,EAAWC,eAAX,EAAmB;EAAEpC,IAAI,EAAE;AAAR,CAAnB,EAA8CN,aAA9C,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormElementContext.js","names":["HvFormElementContext","React","createContext","HvFormElementContextProvider","Provider","HvFormElementContextConsumer","Consumer"],"sources":["../../../../src/Forms/FormElement/context/FormElementContext.js"],"sourcesContent":["import React from \"react\";\n\nexport const HvFormElementContext = React.createContext({});\n\nexport const HvFormElementContextProvider = HvFormElementContext.Provider;\nexport const HvFormElementContextConsumer = HvFormElementContext.Consumer;\nexport default HvFormElementContext;\n"],"mappings":";;;;;;;;;AAAA;;AAEO,IAAMA,oBAAoB,gBAAGC,eAAMC,aAAN,CAAoB,EAApB,CAA7B;;;AAEA,IAAMC,4BAA4B,GAAGH,oBAAoB,CAACI,QAA1D;;AACA,IAAMC,4BAA4B,GAAGL,oBAAoB,CAACM,QAA1D;;eACQN,oB"}
1
+ {"version":3,"file":"FormElementContext.js","names":["HvFormElementContext","React","createContext","HvFormElementContextProvider","Provider","HvFormElementContextConsumer","Consumer"],"sources":["../../../../src/Forms/FormElement/context/FormElementContext.js"],"sourcesContent":["import React from \"react\";\n\nexport const HvFormElementContext = React.createContext({});\n\nexport const HvFormElementContextProvider = HvFormElementContext.Provider;\nexport const HvFormElementContextConsumer = HvFormElementContext.Consumer;\nexport default HvFormElementContext;\n"],"mappings":";;;;;;;;;AAAA;;AAEO,IAAMA,oBAAoB,gBAAGC,cAAA,CAAMC,aAAN,CAAoB,EAApB,CAA7B;;;AAEA,IAAMC,4BAA4B,GAAGH,oBAAoB,CAACI,QAA1D;;AACA,IAAMC,4BAA4B,GAAGL,oBAAoB,CAACM,QAA1D;;eACQN,oB"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormElementDescriptorsContext.js","names":["HvFormElementDescriptorsContext","React","createContext","HvFormElementDescriptorsContextProvider","Provider","HvFormElementDescriptorsContextConsumer","Consumer"],"sources":["../../../../src/Forms/FormElement/context/FormElementDescriptorsContext.js"],"sourcesContent":["import React from \"react\";\n\nexport const HvFormElementDescriptorsContext = React.createContext({});\n\nexport const HvFormElementDescriptorsContextProvider = HvFormElementDescriptorsContext.Provider;\nexport const HvFormElementDescriptorsContextConsumer = HvFormElementDescriptorsContext.Consumer;\nexport default HvFormElementDescriptorsContext;\n"],"mappings":";;;;;;;;;AAAA;;AAEO,IAAMA,+BAA+B,gBAAGC,eAAMC,aAAN,CAAoB,EAApB,CAAxC;;;AAEA,IAAMC,uCAAuC,GAAGH,+BAA+B,CAACI,QAAhF;;AACA,IAAMC,uCAAuC,GAAGL,+BAA+B,CAACM,QAAhF;;eACQN,+B"}
1
+ {"version":3,"file":"FormElementDescriptorsContext.js","names":["HvFormElementDescriptorsContext","React","createContext","HvFormElementDescriptorsContextProvider","Provider","HvFormElementDescriptorsContextConsumer","Consumer"],"sources":["../../../../src/Forms/FormElement/context/FormElementDescriptorsContext.js"],"sourcesContent":["import React from \"react\";\n\nexport const HvFormElementDescriptorsContext = React.createContext({});\n\nexport const HvFormElementDescriptorsContextProvider = HvFormElementDescriptorsContext.Provider;\nexport const HvFormElementDescriptorsContextConsumer = HvFormElementDescriptorsContext.Consumer;\nexport default HvFormElementDescriptorsContext;\n"],"mappings":";;;;;;;;;AAAA;;AAEO,IAAMA,+BAA+B,gBAAGC,cAAA,CAAMC,aAAN,CAAoB,EAApB,CAAxC;;;AAEA,IAAMC,uCAAuC,GAAGH,+BAA+B,CAACI,QAAhF;;AACA,IAAMC,uCAAuC,GAAGL,+BAA+B,CAACM,QAAhF;;eACQN,+B"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormElementValueContext.js","names":["HvFormElementValueContext","React","createContext","undefined","HvFormElementValueContextProvider","Provider","HvFormElementValueContextConsumer","Consumer"],"sources":["../../../../src/Forms/FormElement/context/FormElementValueContext.js"],"sourcesContent":["import React from \"react\";\n\nexport const HvFormElementValueContext = React.createContext(undefined);\n\nexport const HvFormElementValueContextProvider = HvFormElementValueContext.Provider;\nexport const HvFormElementValueContextConsumer = HvFormElementValueContext.Consumer;\nexport default HvFormElementValueContext;\n"],"mappings":";;;;;;;;;AAAA;;AAEO,IAAMA,yBAAyB,gBAAGC,eAAMC,aAAN,CAAoBC,SAApB,CAAlC;;;AAEA,IAAMC,iCAAiC,GAAGJ,yBAAyB,CAACK,QAApE;;AACA,IAAMC,iCAAiC,GAAGN,yBAAyB,CAACO,QAApE;;eACQP,yB"}
1
+ {"version":3,"file":"FormElementValueContext.js","names":["HvFormElementValueContext","React","createContext","undefined","HvFormElementValueContextProvider","Provider","HvFormElementValueContextConsumer","Consumer"],"sources":["../../../../src/Forms/FormElement/context/FormElementValueContext.js"],"sourcesContent":["import React from \"react\";\n\nexport const HvFormElementValueContext = React.createContext(undefined);\n\nexport const HvFormElementValueContextProvider = HvFormElementValueContext.Provider;\nexport const HvFormElementValueContextConsumer = HvFormElementValueContext.Consumer;\nexport default HvFormElementValueContext;\n"],"mappings":";;;;;;;;;AAAA;;AAEO,IAAMA,yBAAyB,gBAAGC,cAAA,CAAMC,aAAN,CAAoBC,SAApB,CAAlC;;;AAEA,IAAMC,iCAAiC,GAAGJ,yBAAyB,CAACK,QAApE;;AACA,IAAMC,iCAAiC,GAAGN,yBAAyB,CAACO,QAApE;;eACQP,yB"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormUtils.js","names":["findDescriptors","children","descriptors","input","label","description","controlled","errormessage","HvCalendarHeader","React","Children","forEach","child","type","formElementType","props","id","push","htmlFor","getIdReferenceListFor","filterFor","referenceList","filter","d","map","join","trim","undefined","getIdReferenceFor","buildFormElementPropsFromContext","context","name","elementName","disabled","elementDisabled","readOnly","elementReadOnly","required","elementRequired","status","elementStatus","buildAriaPropsFromContext","isInvalid","inputId","arias"],"sources":["../../../../src/Forms/FormElement/utils/FormUtils.js"],"sourcesContent":["import React from \"react\";\n\n/**\n * Scans the element's children looking for the children IDs that match the different form element types.\n * This function will produce an object that has a key for each provided name\n * Inside each key there will be an array with each id of the found descriptor.\n *\n * @param {Array} children - The children inside the form element to scan.\n * @param {Object} descriptors - Initial descriptors map (used for recursion).\n *\n */\nconst findDescriptors = (\n children,\n descriptors = {\n input: [],\n label: [],\n description: [],\n controlled: [],\n errormessage: [],\n\n // TODO: refactor this out\n HvCalendarHeader: [],\n }\n) => {\n React.Children.forEach(children, (child) => {\n if (child?.type?.formElementType && child.props?.id) {\n descriptors[child.type.formElementType]?.push({\n id: child.props?.id,\n htmlFor: child.props?.htmlFor,\n });\n }\n\n if (child?.type?.formElementType !== \"formelement\") {\n findDescriptors(child?.props?.children, descriptors);\n }\n });\n\n return descriptors;\n};\n\nconst getIdReferenceListFor = (formElementType, descriptors, filterFor = null) => {\n const referenceList = descriptors?.[formElementType]\n ?.filter((d) => d.htmlFor !== filterFor)\n ?.map((d) => d.id)\n .join(\" \")\n .trim();\n\n return referenceList !== \"\" ? referenceList : undefined;\n};\n\nconst getIdReferenceFor = (formElementType, descriptors, filterFor = null) => {\n const referenceList = descriptors?.[formElementType]\n ?.filter((d) => d.htmlFor !== filterFor)\n ?.map((d) => d.id)?.[0];\n\n return referenceList !== \"\" ? referenceList : undefined;\n};\n\nconst buildFormElementPropsFromContext = (props, context) => {\n return {\n name: props.name || context?.elementName,\n disabled: props.disabled !== undefined ? props.disabled : context?.elementDisabled,\n readOnly: props.readOnly !== undefined ? props.readOnly : context?.elementReadOnly,\n required: props.required !== undefined ? props.required : context?.elementRequired,\n status: props.status || context?.elementStatus,\n };\n};\n\nconst buildAriaPropsFromContext = (props, context, isInvalid, inputId) => {\n const arias = {\n \"aria-labelledby\":\n props?.[\"aria-labelledby\"] !== undefined\n ? props?.[\"aria-labelledby\"]\n : getIdReferenceListFor(\"label\", context?.descriptors, inputId),\n \"aria-describedby\":\n props?.[\"aria-describedby\"] !== undefined\n ? props?.[\"aria-describedby\"]\n : getIdReferenceListFor(\"description\", context?.descriptors),\n \"aria-controls\":\n props?.[\"aria-controls\"] !== undefined\n ? props?.[\"aria-controls\"]\n : getIdReferenceListFor(\"controlled\", context?.descriptors),\n };\n\n if (isInvalid) {\n arias[\"aria-invalid\"] = isInvalid;\n arias[\"aria-errormessage\"] =\n props?.[\"aria-errormessage\"] !== undefined\n ? props?.[\"aria-errormessage\"]\n : getIdReferenceFor(\"errormessage\", context?.descriptors);\n }\n\n return arias;\n};\n\nexport {\n findDescriptors,\n getIdReferenceListFor,\n getIdReferenceFor,\n buildFormElementPropsFromContext,\n buildAriaPropsFromContext,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CACtBC,QADsB,EAYnB;EAAA,IAVHC,WAUG,uEAVW;IACZC,KAAK,EAAE,EADK;IAEZC,KAAK,EAAE,EAFK;IAGZC,WAAW,EAAE,EAHD;IAIZC,UAAU,EAAE,EAJA;IAKZC,YAAY,EAAE,EALF;IAOZ;IACAC,gBAAgB,EAAE;EARN,CAUX;;EACHC,eAAMC,QAAN,CAAeC,OAAf,CAAuBV,QAAvB,EAAiC,UAACW,KAAD,EAAW;IAAA;;IAC1C,IAAIA,KAAK,SAAL,IAAAA,KAAK,WAAL,mBAAAA,KAAK,CAAEC,IAAP,oDAAaC,eAAb,oBAAgCF,KAAK,CAACG,KAAtC,yCAAgC,aAAaC,EAAjD,EAAqD;MAAA;;MACnD,yBAAAd,WAAW,CAACU,KAAK,CAACC,IAAN,CAAWC,eAAZ,CAAX,gFAAyCG,IAAzC,CAA8C;QAC5CD,EAAE,mBAAEJ,KAAK,CAACG,KAAR,kDAAE,cAAaC,EAD2B;QAE5CE,OAAO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UA,OAAO,CAAE5B,WAAnB,EAAgCyC,OAAhC,CAJf;IAKZ,oBACE,CAAA5B,KAAK,SAAL,IAAAA,KAAK,WAAL,YAAAA,KAAK,CAAG,kBAAH,CAAL,MAAgCY,SAAhC,GACIZ,KADJ,aACIA,KADJ,uBACIA,KAAK,CAAG,kBAAH,CADT,GAEII,qBAAqB,CAAC,aAAD,EAAgBW,OAAhB,aAAgBA,OAAhB,uBAAgBA,OAAO,CAAE5B,WAAzB,CARf;IASZ,iBACE,CAAAa,KAAK,SAAL,IAAAA,KAAK,WAAL,YAAAA,KAAK,CAAG,eAAH,CAAL,MAA6BY,SAA7B,GACIZ,KADJ,aACIA,KADJ,uBACIA,KAAK,CAAG,eAAH,CADT,GAEII,qBAAqB,CAAC,YAAD,EAAeW,OAAf,aAAeA,OAAf,uBAAeA,OAAO,CAAE5B,WAAxB;EAZf,CAAd;;EAeA,IAAIwC,SAAJ,EAAe;IACbE,KAAK,CAAC,cAAD,CAAL,GAAwBF,SAAxB;IACAE,KAAK,CAAC,mBAAD,CAAL,GACE,CAAA7B,KAAK,SAAL,IAAAA,KAAK,WAAL,YAAAA,KAAK,CAAG,mBAAH,CAAL,MAAiCY,SAAjC,GACIZ,KADJ,aACIA,KADJ,uBACIA,KAAK,CAAG,mBAAH,CADT,GAEIa,iBAAiB,CAAC,cAAD,EAAiBE,OAAjB,aAAiBA,OAAjB,uBAAiBA,OAAO,CAAE5B,WAA1B,CAHvB;EAID;;EAED,OAAO0C,KAAP;AACD,CAzBD"}
1
+ {"version":3,"file":"FormUtils.js","names":["findDescriptors","children","descriptors","input","label","description","controlled","errormessage","HvCalendarHeader","React","Children","forEach","child","type","formElementType","props","id","push","htmlFor","getIdReferenceListFor","filterFor","referenceList","filter","d","map","join","trim","undefined","getIdReferenceFor","buildFormElementPropsFromContext","context","name","elementName","disabled","elementDisabled","readOnly","elementReadOnly","required","elementRequired","status","elementStatus","buildAriaPropsFromContext","isInvalid","inputId","arias"],"sources":["../../../../src/Forms/FormElement/utils/FormUtils.js"],"sourcesContent":["import React from \"react\";\n\n/**\n * Scans the element's children looking for the children IDs that match the different form element types.\n * This function will produce an object that has a key for each provided name\n * Inside each key there will be an array with each id of the found descriptor.\n *\n * @param {Array} children - The children inside the form element to scan.\n * @param {Object} descriptors - Initial descriptors map (used for recursion).\n *\n */\nconst findDescriptors = (\n children,\n descriptors = {\n input: [],\n label: [],\n description: [],\n controlled: [],\n errormessage: [],\n\n // TODO: refactor this out\n HvCalendarHeader: [],\n }\n) => {\n React.Children.forEach(children, (child) => {\n if (child?.type?.formElementType && child.props?.id) {\n descriptors[child.type.formElementType]?.push({\n id: child.props?.id,\n htmlFor: child.props?.htmlFor,\n });\n }\n\n if (child?.type?.formElementType !== \"formelement\") {\n findDescriptors(child?.props?.children, descriptors);\n }\n });\n\n return descriptors;\n};\n\nconst getIdReferenceListFor = (formElementType, descriptors, filterFor = null) => {\n const referenceList = descriptors?.[formElementType]\n ?.filter((d) => d.htmlFor !== filterFor)\n ?.map((d) => d.id)\n .join(\" \")\n .trim();\n\n return referenceList !== \"\" ? referenceList : undefined;\n};\n\nconst getIdReferenceFor = (formElementType, descriptors, filterFor = null) => {\n const referenceList = descriptors?.[formElementType]\n ?.filter((d) => d.htmlFor !== filterFor)\n ?.map((d) => d.id)?.[0];\n\n return referenceList !== \"\" ? referenceList : undefined;\n};\n\nconst buildFormElementPropsFromContext = (props, context) => {\n return {\n name: props.name || context?.elementName,\n disabled: props.disabled !== undefined ? props.disabled : context?.elementDisabled,\n readOnly: props.readOnly !== undefined ? props.readOnly : context?.elementReadOnly,\n required: props.required !== undefined ? props.required : context?.elementRequired,\n status: props.status || context?.elementStatus,\n };\n};\n\nconst buildAriaPropsFromContext = (props, context, isInvalid, inputId) => {\n const arias = {\n \"aria-labelledby\":\n props?.[\"aria-labelledby\"] !== undefined\n ? props?.[\"aria-labelledby\"]\n : getIdReferenceListFor(\"label\", context?.descriptors, inputId),\n \"aria-describedby\":\n props?.[\"aria-describedby\"] !== undefined\n ? props?.[\"aria-describedby\"]\n : getIdReferenceListFor(\"description\", context?.descriptors),\n \"aria-controls\":\n props?.[\"aria-controls\"] !== undefined\n ? props?.[\"aria-controls\"]\n : getIdReferenceListFor(\"controlled\", context?.descriptors),\n };\n\n if (isInvalid) {\n arias[\"aria-invalid\"] = isInvalid;\n arias[\"aria-errormessage\"] =\n props?.[\"aria-errormessage\"] !== undefined\n ? props?.[\"aria-errormessage\"]\n : getIdReferenceFor(\"errormessage\", context?.descriptors);\n }\n\n return arias;\n};\n\nexport {\n findDescriptors,\n getIdReferenceListFor,\n getIdReferenceFor,\n buildFormElementPropsFromContext,\n buildAriaPropsFromContext,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CACtBC,QADsB,EAYnB;EAAA,IAVHC,WAUG,uEAVW;IACZC,KAAK,EAAE,EADK;IAEZC,KAAK,EAAE,EAFK;IAGZC,WAAW,EAAE,EAHD;IAIZC,UAAU,EAAE,EAJA;IAKZC,YAAY,EAAE,EALF;IAOZ;IACAC,gBAAgB,EAAE;EARN,CAUX;;EACHC,cAAA,CAAMC,QAAN,CAAeC,OAAf,CAAuBV,QAAvB,EAAiC,UAACW,KAAD,EAAW;IAAA;;IAC1C,IAAIA,KAAK,SAAL,IAAAA,KAAK,WAAL,mBAAAA,KAAK,CAAEC,IAAP,oDAAaC,eAAb,oBAAgCF,KAAK,CAACG,KAAtC,yCAAgC,aAAaC,EAAjD,EAAqD;MAAA;;MACnD,yBAAAd,WAAW,CAACU,KAAK,CAACC,IAAN,CAAWC,eAAZ,CAAX,gFAAyCG,IAAzC,CAA8C;QAC5CD,EAAE,mBAAEJ,KAAK,CAACG,KAAR,kDAAE,cAAaC,EAD2B;QAE5CE,OAAO,mBAAEN,KAAK,CAACG,KAAR,kDAAE,cAAaG;MAFsB,CAA9C;IAID;;IA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A5B,KAAK,SAAL,IAAAA,KAAK,WAAL,YAAAA,KAAK,CAAG,kBAAH,CAAL,MAAgCY,SAAhC,GACIZ,KADJ,aACIA,KADJ,uBACIA,KAAK,CAAG,kBAAH,CADT,GAEII,qBAAqB,CAAC,aAAD,EAAgBW,OAAhB,aAAgBA,OAAhB,uBAAgBA,OAAO,CAAE5B,WAAzB,CARf;IASZ,iBACE,CAAAa,KAAK,SAAL,IAAAA,KAAK,WAAL,YAAAA,KAAK,CAAG,eAAH,CAAL,MAA6BY,SAA7B,GACIZ,KADJ,aACIA,KADJ,uBACIA,KAAK,CAAG,eAAH,CADT,GAEII,qBAAqB,CAAC,YAAD,EAAeW,OAAf,aAAeA,OAAf,uBAAeA,OAAO,CAAE5B,WAAxB;EAZf,CAAd;;EAeA,IAAIwC,SAAJ,EAAe;IACbE,KAAK,CAAC,cAAD,CAAL,GAAwBF,SAAxB;IACAE,KAAK,CAAC,mBAAD,CAAL,GACE,CAAA7B,KAAK,SAAL,IAAAA,KAAK,WAAL,YAAAA,KAAK,CAAG,mBAAH,CAAL,MAAiCY,SAAjC,GACIZ,KADJ,aACIA,KADJ,uBACIA,KAAK,CAAG,mBAAH,CADT,GAEIa,iBAAiB,CAAC,cAAD,EAAiBE,OAAjB,aAAiBA,OAAjB,uBAAiBA,OAAO,CAAE5B,WAA1B,CAHvB;EAID;;EAED,OAAO0C,KAAP;AACD,CAzBD"}
@@ -1 +1 @@
1
- {"version":3,"file":"InfoMessage.js","names":["HvInfoMessage","props","label","children","classes","className","id","disabled","disableGutter","others","HvFormElementContext","elementId","elementDisabled","localDisabled","localId","root","infoDisabled","gutter","formElementType","propTypes","PropTypes","string","shape","isRequired","node","bool","styles","name"],"sources":["../../../src/Forms/InfoMessage/InfoMessage.js"],"sourcesContent":["import React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { withStyles } from \"@material-ui/core\";\nimport { HvFormElementContext } from \"../FormElement\";\nimport { HvTypography } from \"../..\";\nimport { setId } from \"../../utils\";\nimport styles from \"./styles\";\n\n/**\n * Provides the user with additional descriptive text for the form element.\n */\nconst HvInfoMessage = (props) => {\n const {\n label,\n children,\n classes,\n className,\n id,\n disabled,\n disableGutter = false,\n ...others\n } = props;\n const { elementId, elementDisabled } = useContext(HvFormElementContext);\n const localDisabled = disabled || elementDisabled;\n const localId = id ?? setId(elementId, \"description\");\n\n return (\n <HvTypography\n id={localId}\n className={clsx(className, classes.root, {\n [classes.infoDisabled]: localDisabled,\n [classes.gutter]: !disableGutter,\n })}\n variant=\"normalText\"\n component=\"label\"\n {...others}\n >\n {children}\n </HvTypography>\n );\n};\n\nHvInfoMessage.formElementType = \"description\";\n\nHvInfoMessage.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the component styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the information text.\n */\n root: PropTypes.string,\n /**\n * Styles applied when the text should be shown.\n */\n infoDisabled: PropTypes.string,\n /**\n * Separation for the message.\n */\n gutter: PropTypes.string,\n }).isRequired,\n /**\n * The children to label.\n * If defined the aria-labelledby prop will be overriden for this element id.\n */\n children: PropTypes.node,\n /**\n * The text to be shown by the label.\n */\n label: PropTypes.node,\n /**\n * If `true` the label is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true` the info message won't have margins.\n */\n disableGutter: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvInfoMessage\" })(HvInfoMessage);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA;AACA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAAW;EAC/B,IACEC,KADF,GASID,KATJ,CACEC,KADF;EAAA,IAEEC,QAFF,GASIF,KATJ,CAEEE,QAFF;EAAA,IAGEC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F;AACA;AACA;EACEpB,QAAQ,EAAEiB,mBAAUI,IA9BI;;EA+BxB;AACF;AACA;EACEtB,KAAK,EAAEkB,mBAAUI,IAlCO;;EAmCxB;AACF;AACA;EACEjB,QAAQ,EAAEa,mBAAUK,IAtCI;;EAuCxB;AACF;AACA;EACEjB,aAAa,EAAEY,mBAAUK;AA1CD,CAA1B;;eA6Ce,sBAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAA8C3B,aAA9C,C"}
1
+ {"version":3,"file":"InfoMessage.js","names":["HvInfoMessage","props","label","children","classes","className","id","disabled","disableGutter","others","useContext","HvFormElementContext","elementId","elementDisabled","localDisabled","localId","setId","clsx","root","infoDisabled","gutter","formElementType","propTypes","PropTypes","string","shape","isRequired","node","bool","withStyles","styles","name"],"sources":["../../../src/Forms/InfoMessage/InfoMessage.js"],"sourcesContent":["import React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { withStyles } from \"@material-ui/core\";\nimport { HvFormElementContext } from \"../FormElement\";\nimport { HvTypography } from \"../..\";\nimport { setId } from \"../../utils\";\nimport styles from \"./styles\";\n\n/**\n * Provides the user with additional descriptive text for the form element.\n */\nconst HvInfoMessage = (props) => {\n const {\n label,\n children,\n classes,\n className,\n id,\n disabled,\n disableGutter = false,\n ...others\n } = props;\n const { elementId, elementDisabled } = useContext(HvFormElementContext);\n const localDisabled = disabled || elementDisabled;\n const localId = id ?? setId(elementId, \"description\");\n\n return (\n <HvTypography\n id={localId}\n className={clsx(className, classes.root, {\n [classes.infoDisabled]: localDisabled,\n [classes.gutter]: !disableGutter,\n })}\n variant=\"normalText\"\n component=\"label\"\n {...others}\n >\n {children}\n </HvTypography>\n );\n};\n\nHvInfoMessage.formElementType = \"description\";\n\nHvInfoMessage.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the component styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the information text.\n */\n root: PropTypes.string,\n /**\n * Styles applied when the text should be shown.\n */\n infoDisabled: PropTypes.string,\n /**\n * Separation for the message.\n */\n gutter: PropTypes.string,\n }).isRequired,\n /**\n * The children to label.\n * If defined the aria-labelledby prop will be overriden for this element id.\n */\n children: PropTypes.node,\n /**\n * The text to be shown by the label.\n */\n label: PropTypes.node,\n /**\n * If `true` the label is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true` the info message won't have margins.\n */\n disableGutter: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvInfoMessage\" })(HvInfoMessage);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA;AACA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAAW;EAC/B,IACEC,KADF,GASID,KATJ,CACEC,KADF;EAAA,IAEEC,QAFF,GASIF,KATJ,CAEEE,QAFF;EAAA,IAGEC,OAHF,GASIH,KATJ,CAGEG,OAHF;EAAA,IAIEC,SAJF,GASIJ,KATJ,CAIEI,SAJF;EAAA,IAKEC,EALF,GASIL,KATJ,CAKEK,EALF;EAAA,IAMEC,QANF,GASIN,KATJ,CAMEM,QANF;EAAA,2BASIN,KATJ,CAOEO,aAPF;EAAA,IAOEA,aAPF,qCAOkB,KAPlB;EAAA,IAQKC,MARL,0CASIR,KATJ;;EAUA,kBAAuC,IAAAS,iBAAA,EAAWC,iCAAX,CAAvC;EAAA,IAAQC,SAAR,eAAQA,SAAR;EAAA,IAAmBC,eAAnB,eAAmBA,eAAnB;;EACA,IAAMC,aAAa,GAAGP,QAAQ,IAAIM,eAAlC;EACA,IAAME,OAAO,GAAGT,EAAH,aAAGA,EAAH,cAAGA,EAAH,GAAS,IAAAU,YAAA,EAAMJ,SAAN,EAAiB,aAAjB,CAAtB;EAEA,oBACE,6BAAC,cAAD;IACE,EAAE,EAAEG,OADN;IAEE,SAAS,EAAE,IAAAE,aAAA,EAAKZ,SAAL,EAAgBD,OAAO,CAACc,IAAxB,EACeJ,aADf,IACRV,OAAO,CAACe,YADA,EAES,CAACX,aAFV,IAERJ,OAAO,CAACgB,MAFA,CAFb;IAME,OAAO,EAAC,YANV;IAOE,SAAS,EAAC;EAPZ,GAQMX,MARN,GAUGN,QAVH,CADF;AAcD,CA7BD;;AA+BAH,aAAa,CAACqB,eAAd,GAAgC,aAAhC;AAEA,wCAAArB,aAAa,CAACsB,SAAd,GAA0B;EACxB;AACF;AACA;EACEjB,SAAS,EAAEkB,kBAAA,CAAUC,MAJG;;EAKxB;AACF;AACA;EACElB,EAAE,EAAEiB,kBAAA,CAAUC,MARU;;EASxB;AACF;AACA;EACEpB,OAAO,EAAEmB,kBAAA,CAAUE,KAAV,CAAgB;IACvB;AACJ;AACA;IACIP,IAAI,EAAEK,kBAAA,CAAUC,MAJO;;IAKvB;AACJ;AACA;IACIL,YAAY,EAAEI,kBAAA,CAAUC,MARD;;IASvB;AACJ;AACA;IACIJ,MAAM,EAAEG,kBAAA,CAAUC;EAZK,CAAhB,EAaNE,UAzBqB;;EA0BxB;AACF;AACA;AACA;EACEvB,QAAQ,EAAEoB,kBAAA,CAAUI,IA9BI;;EA+BxB;AACF;AACA;EACEzB,KAAK,EAAEqB,kBAAA,CAAUI,IAlCO;;EAmCxB;AACF;AACA;EACEpB,QAAQ,EAAEgB,kBAAA,CAAUK,IAtCI;;EAuCxB;AACF;AACA;EACEpB,aAAa,EAAEe,kBAAA,CAAUK;AA1CD,CAA1B;;eA6Ce,IAAAC,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAA8C/B,aAA9C,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"Label.js","names":["HvLabel","props","label","children","classes","className","id","disabled","required","htmlForProp","htmlFor","others","HvFormElementContext","elementId","elementDisabled","elementRequired","localDisabled","localRequired","localId","forId","input","root","labelDisabled","childGutter","formElementType","propTypes","PropTypes","string","shape","isRequired","node","bool","styles","name"],"sources":["../../../src/Forms/Label/Label.js"],"sourcesContent":["import React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { withStyles } from \"@material-ui/core\";\nimport { HvFormElementContext } from \"../FormElement\";\nimport { findDescriptors } from \"../FormElement/utils/FormUtils\";\nimport { HvTypography } from \"../..\";\nimport { setId } from \"../../utils\";\nimport styles from \"./styles\";\n\n/**\n * Provides the user with a recognizable name for a given form element.\n */\nconst HvLabel = (props) => {\n const {\n label,\n children,\n classes,\n className,\n id,\n disabled,\n required,\n htmlFor: htmlForProp,\n ...others\n } = props;\n const { elementId, elementDisabled, elementRequired } = useContext(HvFormElementContext);\n\n const localDisabled = disabled || elementDisabled;\n const localRequired = required || elementRequired;\n\n const localId = id ?? setId(elementId, \"label\");\n\n const forId = htmlForProp || findDescriptors(children)?.input?.[0]?.id;\n\n return (\n <>\n <HvTypography\n id={localId}\n className={clsx(className, classes.root, {\n [classes.labelDisabled]: localDisabled,\n [classes.childGutter]: children && label,\n })}\n variant=\"highlightText\"\n component=\"label\"\n htmlFor={forId}\n {...others}\n >\n {label}\n {localRequired && <span aria-hidden=\"true\">*</span>}\n </HvTypography>\n {children}\n </>\n );\n};\n\nHvLabel.formElementType = \"label\";\n\nHvLabel.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the component styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the information text.\n */\n root: PropTypes.string,\n /**\n * Styles applied when the text should be shown.\n */\n labelDisabled: PropTypes.string,\n /**\n * Separation between the label and the children.\n */\n childGutter: PropTypes.string,\n }).isRequired,\n /**\n * The children to label.\n * If defined the aria-labelledby prop will be overriden for this element id.\n */\n children: PropTypes.node,\n /**\n * The text to be shown by the label.\n */\n label: PropTypes.node,\n /**\n * The id of the form element the label is bound to.\n */\n htmlFor: PropTypes.string,\n /**\n * If `true` the label is displayed with a disabled style.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the label will indicate that the form element is required (an `*` after the label text).\n */\n required: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvLabel\" })(HvLabel);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA;AACA;AACA;AACA,IAAMA,OAAO,GAAG,SAAVA,OAAU,CAACC,KAAD,EAAW;EAAA;;EACzB,IACEC,KADF,GAUID,KAVJ,CACEC,KADF;EAAA,IAEEC,QAFF,GAUIF,KAVJ,CAEEE,QAFF;EAAA,IAGEC,OAHF,GAUIH,KAVJ,CAGEG,OAHF;EAAA,IAIEC,SAJF,GAUIJ,KAVJ,CAIEI,SAJF;EAAA,IAKEC,EALF,GAUIL,KAVJ,CAKEK,EALF;EAAA,IAMEC,QANF,GAUIN,KAVJ,CAMEM,QANF;EAAA,IAOEC,QAPF,GAUIP,KAVJ,CAOEO,QAPF;EAAA,IAQWC,WARX,GAUIR,KAVJ,CAQES,OARF;EAAA,IASKC,MATL,0CAUIV,KAVJ;;EAWA,kBAAwD,uBAAWW,iCAAX,CAAxD;EAAA,IAAQC,SAAR,eAAQA,SAAR;EAAA,IAAmBC,eAAnB,eAAmBA,eAAnB;EAAA,IAAoCC,eAApC,eAAoCA,eAApC;;EAEA,IAAMC,aAAa,GAAGT,QAAQ,IAAIO,eAAlC;EACA,IAAMG,aAAa,GAAGT,QAAQ,IAAIO,eAAlC;EAEA,IAAMG,OAAO,GAAGZ,EAAH,aAAGA,EAAH,cAAGA,EAAH,GAAS,kBAAMO,SAAN,EAAiB,OAAjB,CAAtB;EAEA,IAAMM,KAAK,GAAGV,WAAW,yBAAI,gCAAgBN,QAAhB,CAAJ,8EAAI,iBAA2BiB,KAA/B,oFAAI,sB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AAnB,EAAwCjC,OAAxC,C"}
1
+ {"version":3,"file":"Label.js","names":["HvLabel","props","label","children","classes","className","id","disabled","required","htmlForProp","htmlFor","others","useContext","HvFormElementContext","elementId","elementDisabled","elementRequired","localDisabled","localRequired","localId","setId","forId","findDescriptors","input","clsx","root","labelDisabled","childGutter","formElementType","propTypes","PropTypes","string","shape","isRequired","node","bool","withStyles","styles","name"],"sources":["../../../src/Forms/Label/Label.js"],"sourcesContent":["import React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { withStyles } from \"@material-ui/core\";\nimport { HvFormElementContext } from \"../FormElement\";\nimport { findDescriptors } from \"../FormElement/utils/FormUtils\";\nimport { HvTypography } from \"../..\";\nimport { setId } from \"../../utils\";\nimport styles from \"./styles\";\n\n/**\n * Provides the user with a recognizable name for a given form element.\n */\nconst HvLabel = (props) => {\n const {\n label,\n children,\n classes,\n className,\n id,\n disabled,\n required,\n htmlFor: htmlForProp,\n ...others\n } = props;\n const { elementId, elementDisabled, elementRequired } = useContext(HvFormElementContext);\n\n const localDisabled = disabled || elementDisabled;\n const localRequired = required || elementRequired;\n\n const localId = id ?? setId(elementId, \"label\");\n\n const forId = htmlForProp || findDescriptors(children)?.input?.[0]?.id;\n\n return (\n <>\n <HvTypography\n id={localId}\n className={clsx(className, classes.root, {\n [classes.labelDisabled]: localDisabled,\n [classes.childGutter]: children && label,\n })}\n variant=\"highlightText\"\n component=\"label\"\n htmlFor={forId}\n {...others}\n >\n {label}\n {localRequired && <span aria-hidden=\"true\">*</span>}\n </HvTypography>\n {children}\n </>\n );\n};\n\nHvLabel.formElementType = \"label\";\n\nHvLabel.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the component styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the information text.\n */\n root: PropTypes.string,\n /**\n * Styles applied when the text should be shown.\n */\n labelDisabled: PropTypes.string,\n /**\n * Separation between the label and the children.\n */\n childGutter: PropTypes.string,\n }).isRequired,\n /**\n * The children to label.\n * If defined the aria-labelledby prop will be overriden for this element id.\n */\n children: PropTypes.node,\n /**\n * The text to be shown by the label.\n */\n label: PropTypes.node,\n /**\n * The id of the form element the label is bound to.\n */\n htmlFor: PropTypes.string,\n /**\n * If `true` the label is displayed with a disabled style.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the label will indicate that the form element is required (an `*` after the label text).\n */\n required: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvLabel\" })(HvLabel);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA;AACA;AACA;AACA,IAAMA,OAAO,GAAG,SAAVA,OAAU,CAACC,KAAD,EAAW;EAAA;;EACzB,IACEC,KADF,GAUID,KAVJ,CACEC,KADF;EAAA,IAEEC,QAFF,GAUIF,KAVJ,CAEEE,QAFF;EAAA,IAGEC,OAHF,GAUIH,KAVJ,CAGEG,OAHF;EAAA,IAIEC,SAJF,GAUIJ,KAVJ,CAIEI,SAJF;EAAA,IAKEC,EALF,GAUIL,KAVJ,CAKEK,EALF;EAAA,IAMEC,QANF,GAUIN,KAVJ,CAMEM,QANF;EAAA,IAOEC,QAPF,GAUIP,KAVJ,CAOEO,QAPF;EAAA,IAQWC,WARX,GAUIR,KAVJ,CAQES,OARF;EAAA,IASKC,MATL,0CAUIV,KAVJ;;EAWA,kBAAwD,IAAAW,iBAAA,EAAWC,iCAAX,CAAxD;EAAA,IAAQC,SAAR,eAAQA,SAAR;EAAA,IAAmBC,eAAnB,eAAmBA,eAAnB;EAAA,IAAoCC,eAApC,eAAoCA,eAApC;;EAEA,IAAMC,aAAa,GAAGV,QAAQ,IAAIQ,eAAlC;EACA,IAAMG,aAAa,GAAGV,QAAQ,IAAIQ,eAAlC;EAEA,IAAMG,OAA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ACEhC,KAAK,EAAE4B,kBAAA,CAAUI,IAlCC;;EAmClB;AACF;AACA;EACExB,OAAO,EAAEoB,kBAAA,CAAUC,MAtCD;;EAuClB;AACF;AACA;EACExB,QAAQ,EAAEuB,kBAAA,CAAUK,IA1CF;;EA2ClB;AACF;AACA;EACE3B,QAAQ,EAAEsB,kBAAA,CAAUK;AA9CF,CAApB;;eAiDe,IAAAC,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAwCtC,OAAxC,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"Suggestions.js","names":["HvSuggestions","props","id","className","classes","expanded","anchorEl","suggestionValues","onClose","onSuggestionSelected","others","HvFormElementContext","elementId","localId","root","popper","e","list","map","item","i","itemKey","disabled","undefined","label","formElementType","propTypes","PropTypes","string","shape","isRequired","bool","oneOfType","element","object","func","arrayOf","node","value","any","styles","name"],"sources":["../../../src/Forms/Suggestions/Suggestions.js"],"sourcesContent":["import React, { useContext } from \"react\";\nimport clsx from \"clsx\";\nimport PropTypes from \"prop-types\";\nimport OutsideClickHandler from \"react-outside-click-handler\";\nimport { Popper, withStyles } from \"@material-ui/core\";\nimport { HvSelectionList, HvListItem } from \"../..\";\nimport { setId } from \"../../utils\";\nimport { HvFormElementContext } from \"../FormElement\";\nimport styles from \"./styles\";\n\n/**\n * Allow text input boxes to trigger the display of one or more predictions of the user's intended value.\n */\nconst HvSuggestions = (props) => {\n const {\n id,\n className,\n classes,\n expanded = false,\n anchorEl,\n suggestionValues = [],\n onClose,\n onSuggestionSelected,\n ...others\n } = props;\n\n const { elementId } = useContext(HvFormElementContext);\n const localId = id ?? setId(elementId, \"suggestions\");\n\n return (\n <div id={localId} className={clsx(className, classes.root)} {...others}>\n <Popper open={expanded} disablePortal anchorEl={anchorEl} className={classes.popper}>\n <OutsideClickHandler onOutsideClick={(e) => onClose?.(e)}>\n <HvSelectionList\n className={classes.list}\n id={setId(localId, \"list\")}\n onChange={onSuggestionSelected}\n >\n {suggestionValues?.map((item, i) => {\n const itemKey = item.id || setId(\"item\", i);\n\n return (\n <HvListItem key={itemKey} value={item} disabled={item.disabled || undefined}>\n {item.label}\n </HvListItem>\n );\n })}\n </HvSelectionList>\n </OutsideClickHandler>\n </Popper>\n </div>\n );\n};\n\nHvSuggestions.formElementType = \"controlled\";\n\nHvSuggestions.propTypes = {\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the popper component.\n */\n popper: PropTypes.string,\n /**\n * Styles applied to the suggestion list container.\n */\n list: PropTypes.string,\n }).isRequired,\n /**\n * Whether suggestions is visible.\n */\n expanded: PropTypes.bool,\n /**\n * The HTML element Suggestions attaches to.\n */\n anchorEl: PropTypes.oneOfType([PropTypes.element, PropTypes.object, PropTypes.func]),\n /**\n * Array of { id, label, ...others } values to display in the suggestion list\n */\n suggestionValues: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n label: PropTypes.node.isRequired,\n value: PropTypes.any,\n })\n ),\n /**\n * Function called when suggestion list is closed\n */\n onClose: PropTypes.func,\n /**\n * Function called when a suggestion is selected\n */\n onSuggestionSelected: PropTypes.func,\n};\n\nexport default withStyles(styles, { name: \"HvSuggestions\" })(HvSuggestions);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA;AACA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAAW;EAC/B,IACEC,EADF,GAUID,KAVJ,CACEC,EADF;EAAA,IAEEC,SAFF,GAUIF,KAVJ,CAEEE,SAFF;EAAA,IAGEC,OAHF,GAUIH,KAVJ,CAGEG,OAHF;EAAA,sBAUIH,KAVJ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":"Suggestions.js","names":["HvSuggestions","props","id","className","classes","expanded","anchorEl","suggestionValues","onClose","onSuggestionSelected","others","useContext","HvFormElementContext","elementId","localId","setId","clsx","root","popper","e","list","map","item","i","itemKey","disabled","undefined","label","formElementType","propTypes","PropTypes","string","shape","isRequired","bool","oneOfType","element","object","func","arrayOf","node","value","any","withStyles","styles","name"],"sources":["../../../src/Forms/Suggestions/Suggestions.js"],"sourcesContent":["import React, { useContext } from \"react\";\nimport clsx from \"clsx\";\nimport PropTypes from \"prop-types\";\nimport OutsideClickHandler from \"react-outside-click-handler\";\nimport { Popper, withStyles } from \"@material-ui/core\";\nimport { HvSelectionList, HvListItem } from \"../..\";\nimport { setId } from \"../../utils\";\nimport { HvFormElementContext } from \"../FormElement\";\nimport styles from \"./styles\";\n\n/**\n * Allow text input boxes to trigger the display of one or more predictions of the user's intended value.\n */\nconst HvSuggestions = (props) => {\n const {\n id,\n className,\n classes,\n expanded = false,\n anchorEl,\n suggestionValues = [],\n onClose,\n onSuggestionSelected,\n ...others\n } = props;\n\n const { elementId } = useContext(HvFormElementContext);\n const localId = id ?? setId(elementId, \"suggestions\");\n\n return (\n <div id={localId} className={clsx(className, classes.root)} {...others}>\n <Popper open={expanded} disablePortal anchorEl={anchorEl} className={classes.popper}>\n <OutsideClickHandler onOutsideClick={(e) => onClose?.(e)}>\n <HvSelectionList\n className={classes.list}\n id={setId(localId, \"list\")}\n onChange={onSuggestionSelected}\n >\n {suggestionValues?.map((item, i) => {\n const itemKey = item.id || setId(\"item\", i);\n\n return (\n <HvListItem key={itemKey} value={item} disabled={item.disabled || undefined}>\n {item.label}\n </HvListItem>\n );\n })}\n </HvSelectionList>\n </OutsideClickHandler>\n </Popper>\n </div>\n );\n};\n\nHvSuggestions.formElementType = \"controlled\";\n\nHvSuggestions.propTypes = {\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the popper component.\n */\n popper: PropTypes.string,\n /**\n * Styles applied to the suggestion list container.\n */\n list: PropTypes.string,\n }).isRequired,\n /**\n * Whether suggestions is visible.\n */\n expanded: PropTypes.bool,\n /**\n * The HTML element Suggestions attaches to.\n */\n anchorEl: PropTypes.oneOfType([PropTypes.element, PropTypes.object, PropTypes.func]),\n /**\n * Array of { id, label, ...others } values to display in the suggestion list\n */\n suggestionValues: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n label: PropTypes.node.isRequired,\n value: PropTypes.any,\n })\n ),\n /**\n * Function called when suggestion list is closed\n */\n onClose: PropTypes.func,\n /**\n * Function called when a suggestion is selected\n */\n onSuggestionSelected: PropTypes.func,\n};\n\nexport default withStyles(styles, { name: \"HvSuggestions\" })(HvSuggestions);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA;AACA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAAW;EAC/B,IACEC,EADF,GAUID,KAVJ,CACEC,EADF;EAAA,IAEEC,SAFF,GAUIF,KAVJ,CAEEE,SAFF;EAAA,IAGEC,OAHF,GAUIH,KAVJ,CAGEG,OAHF;EAAA,sBAUIH,KAVJ,CAIEI,QAJF;EAAA,IAIEA,QAJF,gCAIa,KAJb;EAAA,IAKEC,QALF,GAUIL,KAVJ,CAKEK,QALF;EAAA,4BAUIL,KAVJ,CAMEM,gBANF;EAAA,IAMEA,gBANF,sCAMqB,EANrB;EAAA,IAOEC,OAPF,GAUIP,KAVJ,CAOEO,OAPF;EAAA,IAQEC,oBARF,GAUIR,KAVJ,CAQEQ,oBARF;EAAA,IASKC,MATL,0CAUIT,KAVJ;;EAYA,kBAAsB,IAAAU,iBAAA,EAAWC,iCAAX,CAAtB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AA,CAAUC,MAJU;;EAKxB;AACF;AACA;EACE5B,SAAS,EAAE2B,kBAAA,CAAUC,MARG;;EASxB;AACF;AACA;EACE3B,OAAO,EAAE0B,kBAAA,CAAUE,KAAV,CAAgB;IACvB;AACJ;AACA;IACIf,IAAI,EAAEa,kBAAA,CAAUC,MAJO;;IAKvB;AACJ;AACA;IACIb,MAAM,EAAEY,kBAAA,CAAUC,MARK;;IASvB;AACJ;AACA;IACIX,IAAI,EAAEU,kBAAA,CAAUC;EAZO,CAAhB,EAaNE,UAzBqB;;EA0BxB;AACF;AACA;EACE5B,QAAQ,EAAEyB,kBAAA,CAAUI,IA7BI;;EA8BxB;AACF;AACA;EACE5B,QAAQ,EAAEwB,kBAAA,CAAUK,SAAV,CAAoB,CAACL,kBAAA,CAAUM,OAAX,EAAoBN,kBAAA,CAAUO,MAA9B,EAAsCP,kBAAA,CAAUQ,IAAhD,CAApB,CAjCc;;EAkCxB;AACF;AACA;EACE/B,gBAAgB,EAAEuB,kBAAA,CAAUS,OAAV,CAChBT,kBAAA,CAAUE,KAAV,CAAgB;IACd9B,EAAE,EAAE4B,kBAAA,CAAUC,MADA;IAEdJ,KAAK,EAAEG,kBAAA,CAAUU,IAAV,CAAeP,UAFR;IAGdQ,KAAK,EAAEX,kBAAA,CAAUY;EAHH,CAAhB,CADgB,CArCM;;EA4CxB;AACF;AACA;EACElC,OAAO,EAAEsB,kBAAA,CAAUQ,IA/CK;;EAgDxB;AACF;AACA;EACE7B,oBAAoB,EAAEqB,kBAAA,CAAUQ;AAnDR,CAA1B;;eAsDe,IAAAK,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAA8C7C,aAA9C,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"WarningText.js","names":["HvWarningText","props","children","adornment","isVisible","classes","className","id","disabled","disableGutter","disableBorder","disableAdornment","hideText","others","HvFormElementContext","elementId","elementStatus","elementDisabled","localDisabled","localVisible","localId","showWarning","content","localAdornment","defaultIcon","root","show","topBorder","warningText","topGutter","formElementType","propTypes","PropTypes","string","node","shape","isRequired","bool","styles","name"],"sources":["../../../src/Forms/WarningText/WarningText.js"],"sourcesContent":["import React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport isNil from \"lodash/isNil\";\nimport { Fail } from \"@hitachivantara/uikit-react-icons\";\nimport { withStyles } from \"@material-ui/core\";\nimport { HvFormElementContext } from \"../FormElement\";\nimport { HvTypography } from \"../..\";\nimport { setId } from \"../../utils\";\nimport styles from \"./styles\";\n\n/**\n * Provides the user with a descriptive text, signaling an error, for when the form element is in an invalid state.\n */\nconst HvWarningText = (props) => {\n const {\n children,\n adornment,\n isVisible,\n classes,\n className,\n id,\n disabled,\n disableGutter = false,\n disableBorder = false,\n disableAdornment = false,\n hideText = false,\n ...others\n } = props;\n\n const { elementId, elementStatus, elementDisabled } = useContext(HvFormElementContext);\n const localDisabled = disabled || elementDisabled;\n const localVisible = !isNil(isVisible) ? isVisible : elementStatus === \"invalid\";\n const localId = id ?? setId(elementId, \"error\");\n const showWarning = localVisible && !localDisabled;\n const content = showWarning ? children : \"\";\n const localAdornment = adornment || <Fail className={classes.defaultIcon} semantic=\"sema4\" />;\n\n return (\n <div\n className={clsx(className, classes.root, {\n [classes.show]: showWarning,\n [classes.topBorder]: !disableBorder,\n })}\n >\n {!disableAdornment && localAdornment}\n <HvTypography\n id={localId}\n className={clsx(classes.warningText, {\n [classes.topGutter]: !disableGutter,\n [classes.hideText]: hideText,\n })}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n aria-relevant=\"additions text\"\n {...others}\n >\n {showWarning && content}\n </HvTypography>\n </div>\n );\n};\n\nHvWarningText.formElementType = \"errormessage\";\n\nHvWarningText.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * The description to be shown by this helper text\n */\n children: PropTypes.node,\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the component styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the default icon.\n */\n defaultIcon: PropTypes.string,\n /**\n * Styles applied to the warning text.\n */\n warningText: PropTypes.string,\n /**\n * Styles applied when the text should be shown.\n */\n show: PropTypes.string,\n /**\n * Separation between text and upper element.\n */\n topGutter: PropTypes.string,\n /**\n * The top border.\n */\n topBorder: PropTypes.string,\n /**\n * Styles applied to the text when the error are is active\n * but the text is to be not visible.\n */\n hideText: PropTypes.string,\n }).isRequired,\n /**\n * Icon to be rendered alongside the warning text.\n */\n adornment: PropTypes.node,\n /**\n * If `true` the text is not rendered.\n */\n isVisible: PropTypes.bool,\n /**\n * If `true` the text is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true` the text won't include a gutter.\n */\n disableGutter: PropTypes.bool,\n /**\n * If `true` the text won't include the top border.\n */\n disableBorder: PropTypes.bool,\n /**\n * If `true` the adornment icon isn't shown.\n */\n disableAdornment: PropTypes.bool,\n /**\n * If `true` the text isn't shown.\n */\n hideText: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvWarningText\" })(HvWarningText);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA;AACA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAAW;EAC/B,IACEC,QADF,GAaID,KAbJ,CACEC,QADF;EAAA,IAEEC,SAFF,GAaIF,KAbJ,CAEEE,SAFF;EAAA,IAGEC,SAHF,GAaIH,KAbJ,CAGEG,SAHF;EAAA,IAIEC,OAJF,GAaIJ,KAbJ,CAIEI,OAJF;EAAA,IAKEC,SALF,GAaIL,KAbJ,CAKEK,SALF;EAAA,IAMEC,EANF,GAaIN,KAbJ,CAMEM,EANF;EAAA,IAOEC,QAPF,GAaIP,KAbJ,CAOEO,Q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mBAAUK,IAtEJ;;EAuExB;AACF;AACA;EACEzB,QAAQ,EAAEoB,mBAAUK;AA1EI,CAA1B;;eA6Ee,sBAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAA8CvC,aAA9C,C"}
1
+ {"version":3,"file":"WarningText.js","names":["HvWarningText","props","children","adornment","isVisible","classes","className","id","disabled","disableGutter","disableBorder","disableAdornment","hideText","others","useContext","HvFormElementContext","elementId","elementStatus","elementDisabled","localDisabled","localVisible","isNil","localId","setId","showWarning","content","localAdornment","defaultIcon","clsx","root","show","topBorder","warningText","topGutter","formElementType","propTypes","PropTypes","string","node","shape","isRequired","bool","withStyles","styles","name"],"sources":["../../../src/Forms/WarningText/WarningText.js"],"sourcesContent":["import React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport isNil from \"lodash/isNil\";\nimport { Fail } from \"@hitachivantara/uikit-react-icons\";\nimport { withStyles } from \"@material-ui/core\";\nimport { HvFormElementContext } from \"../FormElement\";\nimport { HvTypography } from \"../..\";\nimport { setId } from \"../../utils\";\nimport styles from \"./styles\";\n\n/**\n * Provides the user with a descriptive text, signaling an error, for when the form element is in an invalid state.\n */\nconst HvWarningText = (props) => {\n const {\n children,\n adornment,\n isVisible,\n classes,\n className,\n id,\n disabled,\n disableGutter = false,\n disableBorder = false,\n disableAdornment = false,\n hideText = false,\n ...others\n } = props;\n\n const { elementId, elementStatus, elementDisabled } = useContext(HvFormElementContext);\n const localDisabled = disabled || elementDisabled;\n const localVisible = !isNil(isVisible) ? isVisible : elementStatus === \"invalid\";\n const localId = id ?? setId(elementId, \"error\");\n const showWarning = localVisible && !localDisabled;\n const content = showWarning ? children : \"\";\n const localAdornment = adornment || <Fail className={classes.defaultIcon} semantic=\"sema4\" />;\n\n return (\n <div\n className={clsx(className, classes.root, {\n [classes.show]: showWarning,\n [classes.topBorder]: !disableBorder,\n })}\n >\n {!disableAdornment && localAdornment}\n <HvTypography\n id={localId}\n className={clsx(classes.warningText, {\n [classes.topGutter]: !disableGutter,\n [classes.hideText]: hideText,\n })}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n aria-relevant=\"additions text\"\n {...others}\n >\n {showWarning && content}\n </HvTypography>\n </div>\n );\n};\n\nHvWarningText.formElementType = \"errormessage\";\n\nHvWarningText.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * The description to be shown by this helper text\n */\n children: PropTypes.node,\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the component styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the default icon.\n */\n defaultIcon: PropTypes.string,\n /**\n * Styles applied to the warning text.\n */\n warningText: PropTypes.string,\n /**\n * Styles applied when the text should be shown.\n */\n show: PropTypes.string,\n /**\n * Separation between text and upper element.\n */\n topGutter: PropTypes.string,\n /**\n * The top border.\n */\n topBorder: PropTypes.string,\n /**\n * Styles applied to the text when the error are is active\n * but the text is to be not visible.\n */\n hideText: PropTypes.string,\n }).isRequired,\n /**\n * Icon to be rendered alongside the warning text.\n */\n adornment: PropTypes.node,\n /**\n * If `true` the text is not rendered.\n */\n isVisible: PropTypes.bool,\n /**\n * If `true` the text is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true` the text won't include a gutter.\n */\n disableGutter: PropTypes.bool,\n /**\n * If `true` the text won't include the top border.\n */\n disableBorder: PropTypes.bool,\n /**\n * If `true` the adornment icon isn't shown.\n */\n disableAdornment: PropTypes.bool,\n /**\n * If `true` the text isn't shown.\n */\n hideText: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvWarningText\" })(HvWarningText);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA;AACA;AACA;AACA,IAAMA,aAAa,GAAG,S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AqBvB;AACJ;AACA;IACIN,SAAS,EAAEK,kBAAA,CAAUC,MAxBE;;IAyBvB;AACJ;AACA;AACA;IACIzB,QAAQ,EAAEwB,kBAAA,CAAUC;EA7BG,CAAhB,EA8BNG,UA9CqB;;EA+CxB;AACF;AACA;EACErC,SAAS,EAAEiC,kBAAA,CAAUE,IAlDG;;EAmDxB;AACF;AACA;EACElC,SAAS,EAAEgC,kBAAA,CAAUK,IAtDG;;EAuDxB;AACF;AACA;EACEjC,QAAQ,EAAE4B,kBAAA,CAAUK,IA1DI;;EA2DxB;AACF;AACA;EACEhC,aAAa,EAAE2B,kBAAA,CAAUK,IA9DD;;EA+DxB;AACF;AACA;EACE/B,aAAa,EAAE0B,kBAAA,CAAUK,IAlED;;EAmExB;AACF;AACA;EACE9B,gBAAgB,EAAEyB,kBAAA,CAAUK,IAtEJ;;EAuExB;AACF;AACA;EACE7B,QAAQ,EAAEwB,kBAAA,CAAUK;AA1EI,CAA1B;;eA6Ee,IAAAC,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAA8C5C,aAA9C,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalActions.js","names":["HvGlobalActions","props","className","classes","title","children","variant","backButton","backButtonAction","backButtonAriaLabel","backwardsIcon","headingLevel","positionProp","position","others","BackButtonComp","headingLevelToApply","backButtonRenderer","bkButton","root","positionSticky","positionFixed","global","wrapper","globalWrapperComplement","globalSectionArea","name","actions","propTypes","PropTypes","string","shape","isRequired","node","oneOfType","bool","func","oneOf","styles"],"sources":["../../src/GlobalActions/GlobalActions.js"],"sourcesContent":["import React, { useCallback } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport deprecatedPropType from \"@material-ui/core/utils/deprecatedPropType\";\n\nimport { Backwards } from \"@hitachivantara/uikit-react-icons\";\nimport { withStyles } from \"@material-ui/core\";\nimport isString from \"lodash/isString\";\n\nimport HvButton from \"../Button\";\nimport HvTypography from \"../Typography\";\n\nimport styles from \"./styles\";\n\n/**\n * Global Actions are actions that affect the entire page they live in.\n * They should persist while scrolling down the screen.\n */\nconst HvGlobalActions = (props) => {\n const {\n className,\n classes,\n title,\n children,\n variant = \"global\",\n backButton,\n backButtonAction,\n backButtonAriaLabel = \"Back\",\n backwardsIcon,\n headingLevel,\n position: positionProp,\n ...others\n } = props;\n\n const BackButtonComp = useCallback(\n () => (\n <HvButton aria-label={backButtonAriaLabel} icon onClick={backButtonAction}>\n {backwardsIcon || <Backwards />}\n </HvButton>\n ),\n [backButtonAction, backButtonAriaLabel, backwardsIcon]\n );\n\n const headingLevelToApply = headingLevel || (variant === \"global\" ? 1 : 2);\n\n const backButtonRenderer = () => {\n let bkButton;\n\n if (typeof backButton === \"object\") {\n bkButton = <div className={classes.backButton}>{backButton}</div>;\n } else if (backButton !== false) {\n bkButton = (\n <div className={classes.backButton}>\n <BackButtonComp />\n </div>\n );\n }\n\n return bkButton;\n };\n\n const position = positionProp || (variant === \"global\" ? \"sticky\" : \"relative\");\n\n return (\n <div\n className={clsx(className, classes.root, {\n [classes.positionSticky]: position === \"sticky\",\n [classes.positionFixed]: position === \"fixed\",\n [classes.global]: variant === \"global\",\n })}\n {...others}\n >\n <div\n className={clsx(classes.wrapper, {\n [classes.globalWrapperComplement]: variant === \"global\",\n [classes.globalSectionArea]: variant === \"section\",\n })}\n >\n {variant === \"global\" && backButtonRenderer()}\n {!isString(title) ? (\n title\n ) : (\n <HvTypography\n variant={variant === \"global\" ? \"xsTitle\" : \"sectionTitle\"}\n component={`h${headingLevelToApply}`}\n className={classes.name}\n >\n {title}\n </HvTypography>\n )}\n {children && <div className={classes.actions}>{children}</div>}\n </div>\n </div>\n );\n};\n\nHvGlobalActions.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n\n * Styles applied to the component root class if component is sticky.\n */\n positionSticky: PropTypes.string,\n /**\n * Styles applied to the component root class if component is fixed.\n */\n positionFixed: PropTypes.string,\n /**\n * Styles applied to the component root when `variant=\"global\"`.\n */\n global: PropTypes.string,\n /**\n * Styles applied to the component wrapper class.\n */\n wrapper: PropTypes.string,\n /**\n * Styles applied to the component wrapper class, to differentiate from a section area.\n */\n globalWrapperComplement: PropTypes.string,\n /**\n * Styles applied to the components globalSectionArea class.\n */\n globalSectionArea: PropTypes.string,\n /**\n * Styles applied to the component backButton class.\n */\n backButton: PropTypes.string,\n /**\n * Styles applied to the naming section.\n */\n name: PropTypes.string,\n /**\n * Styles applied to the actions container.\n */\n actions: PropTypes.string,\n }).isRequired,\n /**\n * Action Buttons passed into the Component.\n */\n children: PropTypes.node,\n /**\n * Denotes if this is a global or section component.\n */\n variant: PropTypes.string,\n /**\n * Text to display in the component.\n */\n title: PropTypes.node,\n /**\n * User can pass in a fully customized button or false for when the back button should not be rendered.\n */\n backButton: PropTypes.oneOfType([PropTypes.node, PropTypes.bool]),\n /**\n * Action to be executed by the Back button in the Global Actions.\n */\n backButtonAction: deprecatedPropType(\n PropTypes.func,\n \"Instead use the backButon property to pass in the button for the back action\"\n ),\n /**\n * Aria label to be applied to the back navigation button.\n */\n backButtonAriaLabel: deprecatedPropType(\n PropTypes.string,\n \"Instead use the backButon property to pass in the button for the back action\"\n ),\n /**\n * Custom item to be applied to Backwards button.\n */\n backwardsIcon: deprecatedPropType(\n PropTypes.node,\n \"Instead use the backButon property to pass in the button for the back action\"\n ),\n\n /**\n * Heading Level to apply to Title Area.\n */\n headingLevel: PropTypes.oneOf([1, 2, 3, 4, 5, 6]),\n /**\n * Position of the Global Actions.\n * Defaults to `sticky` when it is a global title and `relative` when it's a section title.\n */\n position: PropTypes.oneOf([\"sticky\", \"fixed\", \"relative\"]),\n};\n\nexport default withStyles(styles, { name: \"HvGlobalActions\" })(HvGlobalActions);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAD,EAAI,CAAJ,EAAO,CAAP,EAAU,CAAV,EAAa,CAAb,EAAgB,CAAhB,CAAhB,CA5FY;;EA6F1B;AACF;AACA;AACA;EACExB,QAAQ,EAAEgB,mBAAUQ,KAAV,CAAgB,CAAC,QAAD,EAAW,OAAX,EAAoB,UAApB,CAAhB;AAjGgB,CAA5B;;eAoGe,sBAAWC,eAAX,EAAmB;EAAEZ,IAAI,EAAE;AAAR,CAAnB,EAAgD1B,eAAhD,C"}
1
+ {"version":3,"file":"GlobalActions.js","names":["HvGlobalActions","props","className","classes","title","children","variant","backButton","backButtonAction","backButtonAriaLabel","backwardsIcon","headingLevel","positionProp","position","others","BackButtonComp","useCallback","headingLevelToApply","backButtonRenderer","bkButton","clsx","root","positionSticky","positionFixed","global","wrapper","globalWrapperComplement","globalSectionArea","isString","name","actions","propTypes","PropTypes","string","shape","isRequired","node","oneOfType","bool","deprecatedPropType","func","oneOf","withStyles","styles"],"sources":["../../src/GlobalActions/GlobalActions.js"],"sourcesContent":["import React, { useCallback } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport deprecatedPropType from \"@material-ui/core/utils/deprecatedPropType\";\n\nimport { Backwards } from \"@hitachivantara/uikit-react-icons\";\nimport { withStyles } from \"@material-ui/core\";\nimport isString from \"lodash/isString\";\n\nimport HvButton from \"../Button\";\nimport HvTypography from \"../Typography\";\n\nimport styles from \"./styles\";\n\n/**\n * Global Actions are actions that affect the entire page they live in.\n * They should persist while scrolling down the screen.\n */\nconst HvGlobalActions = (props) => {\n const {\n className,\n classes,\n title,\n children,\n variant = \"global\",\n backButton,\n backButtonAction,\n backButtonAriaLabel = \"Back\",\n backwardsIcon,\n headingLevel,\n position: positionProp,\n ...others\n } = props;\n\n const BackButtonComp = useCallback(\n () => (\n <HvButton aria-label={backButtonAriaLabel} icon onClick={backButtonAction}>\n {backwardsIcon || <Backwards />}\n </HvButton>\n ),\n [backButtonAction, backButtonAriaLabel, backwardsIcon]\n );\n\n const headingLevelToApply = headingLevel || (variant === \"global\" ? 1 : 2);\n\n const backButtonRenderer = () => {\n let bkButton;\n\n if (typeof backButton === \"object\") {\n bkButton = <div className={classes.backButton}>{backButton}</div>;\n } else if (backButton !== false) {\n bkButton = (\n <div className={classes.backButton}>\n <BackButtonComp />\n </div>\n );\n }\n\n return bkButton;\n };\n\n const position = positionProp || (variant === \"global\" ? \"sticky\" : \"relative\");\n\n return (\n <div\n className={clsx(className, classes.root, {\n [classes.positionSticky]: position === \"sticky\",\n [classes.positionFixed]: position === \"fixed\",\n [classes.global]: variant === \"global\",\n })}\n {...others}\n >\n <div\n className={clsx(classes.wrapper, {\n [classes.globalWrapperComplement]: variant === \"global\",\n [classes.globalSectionArea]: variant === \"section\",\n })}\n >\n {variant === \"global\" && backButtonRenderer()}\n {!isString(title) ? (\n title\n ) : (\n <HvTypography\n variant={variant === \"global\" ? \"xsTitle\" : \"sectionTitle\"}\n component={`h${headingLevelToApply}`}\n className={classes.name}\n >\n {title}\n </HvTypography>\n )}\n {children && <div className={classes.actions}>{children}</div>}\n </div>\n </div>\n );\n};\n\nHvGlobalActions.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n\n * Styles applied to the component root class if component is sticky.\n */\n positionSticky: PropTypes.string,\n /**\n * Styles applied to the component root class if component is fixed.\n */\n positionFixed: PropTypes.string,\n /**\n * Styles applied to the component root when `variant=\"global\"`.\n */\n global: PropTypes.string,\n /**\n * Styles applied to the component wrapper class.\n */\n wrapper: PropTypes.string,\n /**\n * Styles applied to the component wrapper class, to differentiate from a section area.\n */\n globalWrapperComplement: PropTypes.string,\n /**\n * Styles applied to the components globalSectionArea class.\n */\n globalSectionArea: PropTypes.string,\n /**\n * Styles applied to the component backButton class.\n */\n backButton: PropTypes.string,\n /**\n * Styles applied to the naming section.\n */\n name: PropTypes.string,\n /**\n * Styles applied to the actions container.\n */\n actions: PropTypes.string,\n }).isRequired,\n /**\n * Action Buttons passed into the Component.\n */\n children: PropTypes.node,\n /**\n * Denotes if this is a global or section component.\n */\n variant: PropTypes.string,\n /**\n * Text to display in the component.\n */\n title: PropTypes.node,\n /**\n * User can pass in a fully customized button or false for when the back button should not be rendered.\n */\n backButton: PropTypes.oneOfType([PropTypes.node, PropTypes.bool]),\n /**\n * Action to be executed by the Back button in the Global Actions.\n */\n backButtonAction: deprecatedPropType(\n PropTypes.func,\n \"Instead use the backButon property to pass in the button for the back action\"\n ),\n /**\n * Aria label to be applied to the back navigation button.\n */\n backButtonAriaLabel: deprecatedPropType(\n PropTypes.string,\n \"Instead use the backButon property to pass in the button for the back action\"\n ),\n /**\n * Custom item to be applied to Backwards button.\n */\n backwardsIcon: deprecatedPropType(\n PropTypes.node,\n \"Instead use the backButon property to pass in the button for the back action\"\n ),\n\n /**\n * Heading Level to apply to Title Area.\n */\n headingLevel: PropTypes.oneOf([1, 2, 3, 4, 5, 6]),\n /**\n * Position of the Global Actions.\n * Defaults to `sticky` when it is a global title and `relative` when it's a section title.\n */\n position: PropTypes.oneOf([\"sticky\", \"fixed\", \"relative\"]),\n};\n\nexport default withStyles(styles, { name: \"HvGlobalActions\" })(HvGlobalActions);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;AAEA;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD,EAAW;EAAA;;EACjC,IACEC,SADF,GAaID,KAbJ,CACEC,SADF;EAAA,IAEEC,OAFF,GAaIF,KAbJ,CAEEE,OAFF;EAAA,IAGEC,KAHF,GAaIH,KAbJ,CAGEG,KAHF;EAAA,IAIEC,QAJF,GAaIJ,KAbJ,CAIEI,QAJF;EAAA,qBAaIJ,KAbJ,CAKEK,OALF;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AAV,CAAgB,CAAC,QAAD,EAAW,OAAX,EAAoB,UAApB,CAAhB;AAjGgB,CAA5B;;eAoGe,IAAAC,gBAAA,EAAWC,eAAX,EAAmB;EAAEd,IAAI,EAAE;AAAR,CAAnB,EAAgD7B,eAAhD,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.js","names":["BREAKPOINT_GUTTERS","xs","sm","md","lg","xl","SPACINGS","HvGrid","React","forwardRef","ref","container","spacing","others","width","gridSpacing","propTypes","alignContent","PropTypes","oneOf","alignItems","children","node","classes","shape","root","string","item","zeroMinWidth","isRequired","className","component","elementType","bool","direction","justify","wrap","name"],"sources":["../../src/Grid/Grid.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport isString from \"lodash/isString\";\nimport { withStyles, Grid } from \"@material-ui/core\";\nimport useWidth from \"../utils/useWidth\";\n\nconst BREAKPOINT_GUTTERS = {\n xs: 2,\n sm: 2,\n md: 4,\n lg: 4,\n xl: 4,\n};\n\nconst SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n\n/**\n * The grid creates visual consistency between layouts while allowing flexibility\n * across a wide variety of designs. This component is based in a 12-column grid layout.\n *\n * It is is based in the [Material UI Grid](https://material-ui.com/components/grid/#grid).\n *\n * The definitions were set following the Design System directives:\n *\n * | Breakpoint | Width (in px) | Gutters (in px) | Number of columns |\n * | ---------- | ------------- | --------------- | ----------------- |\n * | xs | [0-600[ | 15 | 4 |\n * | sm | [600-960[ | 15 | 8 |\n * | md | [960-1270[ | 30 | 12 |\n * | lg | [1270-1920[ | 30 | 12 |\n * | xl | [1920-...[ | 30 | 12 |\n *\n */\nconst HvGrid = React.forwardRef(({ container, spacing = \"auto\", ...others }, ref) => {\n const width = useWidth();\n let gridSpacing = spacing;\n\n if (isString(spacing)) {\n if (spacing === \"auto\") {\n gridSpacing = BREAKPOINT_GUTTERS[width];\n } else {\n gridSpacing = BREAKPOINT_GUTTERS[spacing];\n }\n }\n\n return <Grid ref={ref} {...(container && { container, spacing: gridSpacing })} {...others} />;\n});\n\n/*\n * copied from Material-UI Grid.js since we simply override the styles of the component\n * please make sure this is updated when we update our Material-UI dependency\n */\nHvGrid.propTypes = {\n /**\n * Defines the `align-content` style property.\n * It's applied for all screen sizes.\n */\n alignContent: PropTypes.oneOf([\n \"stretch\",\n \"center\",\n \"flex-start\",\n \"flex-end\",\n \"space-between\",\n \"space-around\",\n ]),\n /**\n * Defines the `align-items` style property.\n * It's applied for all screen sizes.\n */\n alignItems: PropTypes.oneOf([\"flex-start\", \"center\", \"flex-end\", \"stretch\", \"baseline\"]),\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n // eslint-disable-next-line react/forbid-prop-types\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the root element if container={true}.\n */\n container: PropTypes.string,\n /**\n * Styles applied to the root element if item={true}.\n */\n item: PropTypes.string,\n /**\n * Styles applied to the root element if zeroMinWidth={true}.\n */\n zeroMinWidth: PropTypes.string,\n /**\n * Styles related to column direction.\n */\n \"direction-xs-column\": PropTypes.string,\n /**\n * Styles related to column direction.\n */\n \"direction-xs-reverse\": PropTypes.string,\n /**\n * Styles related to column direction.\n */\n \"direction-xs-row-reverse\": PropTypes.string,\n /**\n * Styles related to wrapping.\n */\n \"wrap-xs-nowrap\": PropTypes.string,\n /**\n * Styles related to wrapping.\n */\n \"wrap-xs-wrap-reverse\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-items-xs-center\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-items-xs-flex-start\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-items-xs-flex-end\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-items-xs-baseline\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-content-xs-center\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-content-xs-flex-start\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-content-xs-flex-end\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-content-xs-space-between\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-content-xs-space-around\": PropTypes.string,\n /**\n * Styles related to content justification.\n */\n \"justify-xs-center\": PropTypes.string,\n /**\n * Styles related to content justification.\n */\n \"justify-xs-flex-end\": PropTypes.string,\n /**\n * Styles related to content justification.\n */\n \"justify-xs-space-between\": PropTypes.string,\n /**\n * Styles related to content justification.\n */\n \"justify-xs-space-around\": PropTypes.string,\n /**\n * Styles related to content justification.\n */\n \"justify-xs-space-evenly\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-1\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-2\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-3\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-4\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-5\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-6\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-7\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-8\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-9\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-10\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-auto\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-true\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-1\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-2\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-3\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-4\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-5\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-6\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-7\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-8\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-9\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-10\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-11\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-12\": PropTypes.string,\n }).isRequired,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a DOM element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the component will have the flex *container* behavior.\n * You should be wrapping *items* with a *container*.\n */\n container: PropTypes.bool,\n /**\n * Defines the `flex-direction` style property.\n * It is applied for all screen sizes.\n */\n direction: PropTypes.oneOf([\"row\", \"row-reverse\", \"column\", \"column-reverse\"]),\n /**\n * If `true`, the component will have the flex *item* behavior.\n * You should be wrapping *items* with a *container*.\n */\n item: PropTypes.bool,\n /**\n * Defines the `justify-content` style property.\n * It is applied for all screen sizes.\n */\n justify: PropTypes.oneOf([\n \"flex-start\",\n \"center\",\n \"flex-end\",\n \"space-between\",\n \"space-around\",\n \"space-evenly\",\n ]),\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `lg` breakpoint and wider screens if not overridden.\n */\n lg: PropTypes.oneOf([false, \"auto\", true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `md` breakpoint and wider screens if not overridden.\n */\n md: PropTypes.oneOf([false, \"auto\", true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `sm` breakpoint and wider screens if not overridden.\n */\n sm: PropTypes.oneOf([false, \"auto\", true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n /**\n * Defines the space between the type item component. It can only be used on a type container component.\n * Based in the 7.5px factor defined in the theme, it allows the definition of this factor based on the factor\n * (number between 0 and 10), breakpoint or auto.\n */\n spacing: PropTypes.oneOf([\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"auto\", ...SPACINGS]),\n /**\n * Defines the `flex-wrap` style property.\n * It's applied for all screen sizes.\n */\n wrap: PropTypes.oneOf([\"nowrap\", \"wrap\", \"wrap-reverse\"]),\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `xl` breakpoint and wider screens.\n */\n xl: PropTypes.oneOf([false, \"auto\", true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for all the screen sizes with the lowest priority.\n */\n xs: PropTypes.oneOf([false, \"auto\", true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n /**\n * If `true`, it sets `min-width: 0` on the item.\n * Refer to the limitations section of the documentation to better understand the use case.\n */\n zeroMinWidth: PropTypes.bool,\n};\n\nexport default withStyles({}, { name: \"HvGrid\" })(HvGrid);\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;AAEA,IAAMA,kBAAkB,GAAG;EACzBC,EAAE,EAAE,CADqB;EAEzBC,EAAE,EAAE,CAFqB;EAGzBC,EAAE,EAAE,CAHqB;EAIzBC,EAAE,EAAE,CAJqB;EAKzBC,EAAE,EAAE;AALqB,CAA3B;AAQA,IAAMC,QAAN,2CAAiB,CAAC,CAAD,EAAI,CAAJ,EAAO,CAAP,EAAU,CAAV,EAAa,CAAb,EAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB,CAAzB,EAA4B,CAA5B,EAA+B,EAA/B,CAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;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CAA3C,EAA8C,CAA9C,EAAiD,EAAjD,EAAqD,EAArD,EAAyD,EAAzD,CAAhB,CA3Qa;;EA4QjB;AACF;AACA;AACA;AACA;EACEP,OAAO,EAAEM,mBAAUC,KAAV,EAAiB,IAAjB,EAAuB,IAAvB,EAA6B,IAA7B,EAAmC,IAAnC,EAAyC,IAAzC,EAA+C,MAA/C,0CAA0Db,QAA1D,GAjRQ;;EAkRjB;AACF;AACA;AACA;EACE8B,IAAI,EAAElB,mBAAUC,KAAV,CAAgB,CAAC,QAAD,EAAW,MAAX,EAAmB,cAAnB,CAAhB,CAtRW;;EAuRjB;AACF;AACA;AACA;EACEd,EAAE,EAAEa,mBAAUC,KAAV,CAAgB,CAAC,KAAD,EAAQ,MAAR,EAAgB,IAAhB,EAAsB,CAAtB,EAAyB,CAAzB,EAA4B,CAA5B,EAA+B,CAA/B,EAAkC,CAAlC,EAAqC,CAArC,EAAwC,CAAxC,EAA2C,CAA3C,EAA8C,CAA9C,EAAiD,EAAjD,EAAqD,EAArD,EAAyD,EAAzD,CAAhB,CA3Ra;;EA4RjB;AACF;AACA;AACA;EACElB,EAAE,EAAEiB,mBAAUC,KAAV,CAAgB,CAAC,KAAD,EAAQ,MAAR,EAAgB,IAAhB,EAAsB,CAAtB,EAAyB,CAAzB,EAA4B,CAA5B,EAA+B,CAA/B,EAAkC,CAAlC,EAAqC,CAArC,EAAwC,CAAxC,EAA2C,CAA3C,EAA8C,CAA9C,EAAiD,EAAjD,EAAqD,EAArD,EAAyD,EAAzD,CAAhB,CAhSa;;EAiSjB;AACF;AACA;AACA;EACES,YAAY,EAAEV,mBAAUe;AArSP,CAAnB;;eAwSe,sBAAW,EAAX,EAAe;EAAEI,IAAI,EAAE;AAAR,CAAf,EAAmC9B,MAAnC,C"}
1
+ {"version":3,"file":"Grid.js","names":["BREAKPOINT_GUTTERS","xs","sm","md","lg","xl","SPACINGS","HvGrid","React","forwardRef","ref","container","spacing","others","width","useWidth","gridSpacing","isString","propTypes","alignContent","PropTypes","oneOf","alignItems","children","node","classes","shape","root","string","item","zeroMinWidth","isRequired","className","component","elementType","bool","direction","justify","wrap","withStyles","name"],"sources":["../../src/Grid/Grid.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport isString from \"lodash/isString\";\nimport { withStyles, Grid } from \"@material-ui/core\";\nimport useWidth from \"../utils/useWidth\";\n\nconst BREAKPOINT_GUTTERS = {\n xs: 2,\n sm: 2,\n md: 4,\n lg: 4,\n xl: 4,\n};\n\nconst SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n\n/**\n * The grid creates visual consistency between layouts while allowing flexibility\n * across a wide variety of designs. This component is based in a 12-column grid layout.\n *\n * It is is based in the [Material UI Grid](https://material-ui.com/components/grid/#grid).\n *\n * The definitions were set following the Design System directives:\n *\n * | Breakpoint | Width (in px) | Gutters (in px) | Number of columns |\n * | ---------- | ------------- | --------------- | ----------------- |\n * | xs | [0-600[ | 15 | 4 |\n * | sm | [600-960[ | 15 | 8 |\n * | md | [960-1270[ | 30 | 12 |\n * | lg | [1270-1920[ | 30 | 12 |\n * | xl | [1920-...[ | 30 | 12 |\n *\n */\nconst HvGrid = React.forwardRef(({ container, spacing = \"auto\", ...others }, ref) => {\n const width = useWidth();\n let gridSpacing = spacing;\n\n if (isString(spacing)) {\n if (spacing === \"auto\") {\n gridSpacing = BREAKPOINT_GUTTERS[width];\n } else {\n gridSpacing = BREAKPOINT_GUTTERS[spacing];\n }\n }\n\n return <Grid ref={ref} {...(container && { container, spacing: gridSpacing })} {...others} />;\n});\n\n/*\n * copied from Material-UI Grid.js since we simply override the styles of the component\n * please make sure this is updated when we update our Material-UI dependency\n */\nHvGrid.propTypes = {\n /**\n * Defines the `align-content` style property.\n * It's applied for all screen sizes.\n */\n alignContent: PropTypes.oneOf([\n \"stretch\",\n \"center\",\n \"flex-start\",\n \"flex-end\",\n \"space-between\",\n \"space-around\",\n ]),\n /**\n * Defines the `align-items` style property.\n * It's applied for all screen sizes.\n */\n alignItems: PropTypes.oneOf([\"flex-start\", \"center\", \"flex-end\", \"stretch\", \"baseline\"]),\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n // eslint-disable-next-line react/forbid-prop-types\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the root element if container={true}.\n */\n container: PropTypes.string,\n /**\n * Styles applied to the root element if item={true}.\n */\n item: PropTypes.string,\n /**\n * Styles applied to the root element if zeroMinWidth={true}.\n */\n zeroMinWidth: PropTypes.string,\n /**\n * Styles related to column direction.\n */\n \"direction-xs-column\": PropTypes.string,\n /**\n * Styles related to column direction.\n */\n \"direction-xs-reverse\": PropTypes.string,\n /**\n * Styles related to column direction.\n */\n \"direction-xs-row-reverse\": PropTypes.string,\n /**\n * Styles related to wrapping.\n */\n \"wrap-xs-nowrap\": PropTypes.string,\n /**\n * Styles related to wrapping.\n */\n \"wrap-xs-wrap-reverse\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-items-xs-center\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-items-xs-flex-start\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-items-xs-flex-end\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-items-xs-baseline\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-content-xs-center\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-content-xs-flex-start\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-content-xs-flex-end\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-content-xs-space-between\": PropTypes.string,\n /**\n * Styles related to alignment.\n */\n \"align-content-xs-space-around\": PropTypes.string,\n /**\n * Styles related to content justification.\n */\n \"justify-xs-center\": PropTypes.string,\n /**\n * Styles related to content justification.\n */\n \"justify-xs-flex-end\": PropTypes.string,\n /**\n * Styles related to content justification.\n */\n \"justify-xs-space-between\": PropTypes.string,\n /**\n * Styles related to content justification.\n */\n \"justify-xs-space-around\": PropTypes.string,\n /**\n * Styles related to content justification.\n */\n \"justify-xs-space-evenly\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-1\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-2\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-3\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-4\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-5\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-6\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-7\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-8\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-9\": PropTypes.string,\n /**\n * Styles related to spacing.\n */\n \"spacing-xs-10\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-auto\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-true\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-1\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-2\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-3\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-4\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-5\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-6\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-7\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-8\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-9\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-10\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-11\": PropTypes.string,\n /**\n * Styles related to grid sizing.\n */\n \"grid-xs-12\": PropTypes.string,\n }).isRequired,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a DOM element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the component will have the flex *container* behavior.\n * You should be wrapping *items* with a *container*.\n */\n container: PropTypes.bool,\n /**\n * Defines the `flex-direction` style property.\n * It is applied for all screen sizes.\n */\n direction: PropTypes.oneOf([\"row\", \"row-reverse\", \"column\", \"column-reverse\"]),\n /**\n * If `true`, the component will have the flex *item* behavior.\n * You should be wrapping *items* with a *container*.\n */\n item: PropTypes.bool,\n /**\n * Defines the `justify-content` style property.\n * It is applied for all screen sizes.\n */\n justify: PropTypes.oneOf([\n \"flex-start\",\n \"center\",\n \"flex-end\",\n \"space-between\",\n \"space-around\",\n \"space-evenly\",\n ]),\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `lg` breakpoint and wider screens if not overridden.\n */\n lg: PropTypes.oneOf([false, \"auto\", true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `md` breakpoint and wider screens if not overridden.\n */\n md: PropTypes.oneOf([false, \"auto\", true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `sm` breakpoint and wider screens if not overridden.\n */\n sm: PropTypes.oneOf([false, \"auto\", true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n /**\n * Defines the space between the type item component. It can only be used on a type container component.\n * Based in the 7.5px factor defined in the theme, it allows the definition of this factor based on the factor\n * (number between 0 and 10), breakpoint or auto.\n */\n spacing: PropTypes.oneOf([\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"auto\", ...SPACINGS]),\n /**\n * Defines the `flex-wrap` style property.\n * It's applied for all screen sizes.\n */\n wrap: PropTypes.oneOf([\"nowrap\", \"wrap\", \"wrap-reverse\"]),\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `xl` breakpoint and wider screens.\n */\n xl: PropTypes.oneOf([false, \"auto\", true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for all the screen sizes with the lowest priority.\n */\n xs: PropTypes.oneOf([false, \"auto\", true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n /**\n * If `true`, it sets `min-width: 0` on the item.\n * Refer to the limitations section of the documentation to better understand the use case.\n */\n zeroMinWidth: PropTypes.bool,\n};\n\nexport default withStyles({}, { name: \"HvGrid\" })(HvGrid);\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;AAEA,IAAMA,kBAAkB,GAAG;EACzBC,EAAE,EAAE,CADqB;EAEzBC,EAAE,EAAE,CAFqB;EAGzBC,EAAE,EAAE,CAHqB;EAIzBC,EAAE,EAAE,CAJqB;EAKzBC,EAAE,EAAE;AALqB,CAA3B;AAQA,IAAMC,QAAN,2CAAiB,CAAC,CAAD,EAAI,CAAJ,EAAO,CAAP,EAAU,CAAV,EAAa,CAAb,EAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB,CAAzB,EAA4B,CAA5B,EAA+B,EAA/B,CAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMC,MAAM,gBAAGC,cAAA,CAAMC,UAAN,CAAiB,gBAA6CC,GAA7C,EAAqD;EAAA,IAAlDC,SAAkD,QAAlDA,SAAkD;EAAA,wBAAvCC,OAAuC;EAAA,IAAvCA,OAAuC,6BAA7B,MAA6B;EAAA,IAAlBC,MAAkB;EACnF,IAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EACA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,MAAnC,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","names":["Actions","props","classes","className","children","others","root","propTypes","PropTypes","shape","string","isRequired","node","styles","name"],"sources":["../../../src/Header/Actions/Actions.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { withStyles } from \"@material-ui/core\";\nimport styles from \"./styles\";\n\nconst Actions = (props) => {\n const { classes, className, children, ...others } = props;\n return (\n <div className={clsx(className, classes.root)} {...others}>\n {children}\n </div>\n );\n};\n\nActions.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n }).isRequired,\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Node to be rendered.\n */\n children: PropTypes.node,\n};\n\nexport default withStyles(styles, { name: \"HvHeaderActions\" })(Actions);\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,OAAO,GAAG,SAAVA,OAAU,CAACC,KAAD,EAAW;EACzB,IAAQC,OAAR,GAAoDD,KAApD,CAAQC,OAAR;EAAA,IAAiBC,SAAjB,GAAoDF,KAApD,CAAiBE,SAAjB;EAAA,IAA4BC,QAA5B,GAAoDH,KAApD,CAA4BG,QAA5B;EAAA,IAAyCC,MAAzC,0CAAoDJ,KAApD;EACA,oBACE;IAAK,SAAS,EAAE,mBAAKE,SAAL,EAAgBD,OAAO,CAACI,IAAxB;EAAhB,GAAmDD,MAAnD,GACGD,QADH,CADF;AAKD,CAPD;;AASA,wCAAAJ,OAAO,CAACO,SAAR,GAAoB;EAClB;AACF;AACA;EACEL,OAAO,EAAEM,mBAAUC,KAAV,CAAgB;IACvB;AACJ;AACA;IACIH,IAAI,EAAEE,mBAAUE;EAJO,CAAhB,EAKNC,UATe;;EAUlB;AACF;AACA;EACER,SAAS,EAAEK,mBAAUE,MAbH;;EAclB;AACF;AACA;EACEN,QAAQ,EAAEI,mBAAUI;AAjBF,CAApB;;eAoBe,sBAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAgDd,OAAhD,C"}
1
+ {"version":3,"file":"Actions.js","names":["Actions","props","classes","className","children","others","clsx","root","propTypes","PropTypes","shape","string","isRequired","node","withStyles","styles","name"],"sources":["../../../src/Header/Actions/Actions.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { withStyles } from \"@material-ui/core\";\nimport styles from \"./styles\";\n\nconst Actions = (props) => {\n const { classes, className, children, ...others } = props;\n return (\n <div className={clsx(className, classes.root)} {...others}>\n {children}\n </div>\n );\n};\n\nActions.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n }).isRequired,\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Node to be rendered.\n */\n children: PropTypes.node,\n};\n\nexport default withStyles(styles, { name: \"HvHeaderActions\" })(Actions);\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,OAAO,GAAG,SAAVA,OAAU,CAACC,KAAD,EAAW;EACzB,IAAQC,OAAR,GAAoDD,KAApD,CAAQC,OAAR;EAAA,IAAiBC,SAAjB,GAAoDF,KAApD,CAAiBE,SAAjB;EAAA,IAA4BC,QAA5B,GAAoDH,KAApD,CAA4BG,QAA5B;EAAA,IAAyCC,MAAzC,0CAAoDJ,KAApD;EACA,oBACE;IAAK,SAAS,EAAE,IAAAK,aAAA,EAAKH,SAAL,EAAgBD,OAAO,CAACK,IAAxB;EAAhB,GAAmDF,MAAnD,GACGD,QADH,CADF;AAKD,CAPD;;AASA,wCAAAJ,OAAO,CAACQ,SAAR,GAAoB;EAClB;AACF;AACA;EACEN,OAAO,EAAEO,kBAAA,CAAUC,KAAV,CAAgB;IACvB;AACJ;AACA;IACIH,IAAI,EAAEE,kBAAA,CAAUE;EAJO,CAAhB,EAKNC,UATe;;EAUlB;AACF;AACA;EACET,SAAS,EAAEM,kBAAA,CAAUE,MAbH;;EAclB;AACF;AACA;EACEP,QAAQ,EAAEK,kBAAA,CAAUI;AAjBF,CAApB;;eAoBe,IAAAC,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAgDhB,OAAhD,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"Brand.js","names":["Brand","classes","className","logo","name","others","root","separator","propTypes","PropTypes","shape","string","isRequired","node","styles"],"sources":["../../../src/Header/Brand/Brand.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { withStyles } from \"@material-ui/core\";\nimport HvTypography from \"../../Typography\";\nimport styles from \"./styles\";\n\nconst Brand = ({ classes, className, logo, name, ...others }) => {\n return (\n <div className={clsx(className, classes.root)} {...others}>\n {logo}\n {logo && name && <div className={classes.separator} />}\n {name && <HvTypography variant=\"highlightText\">{name}</HvTypography>}\n </div>\n );\n};\n\nBrand.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the separator component class.\n */\n separator: PropTypes.string,\n }).isRequired,\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * The brand image node.\n */\n logo: PropTypes.node,\n /**\n * The brand name string.\n */\n name: PropTypes.string,\n};\n\nexport default withStyles(styles, { name: \"HvHeaderBrand\" })(Brand);\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,KAAK,GAAG,SAARA,KAAQ,OAAmD;EAAA,IAAhDC,OAAgD,QAAhDA,OAAgD;EAAA,IAAvCC,SAAuC,QAAvCA,SAAuC;EAAA,IAA5BC,IAA4B,QAA5BA,IAA4B;EAAA,IAAtBC,IAAsB,QAAtBA,IAAsB;EAAA,IAAbC,MAAa;EAC/D,oBACE;IAAK,SAAS,EAAE,mBAAKH,SAAL,EAAgBD,OAAO,CAACK,IAAxB;EAAhB,GAAmDD,MAAnD,GACGF,IADH,EAEGA,IAAI,IAAIC,IAAR,iBAAgB;IAAK,SAAS,EAAEH,OAAO,CAACM;EAAxB,EAFnB,EAGGH,IAAI,iBAAI,6BAAC,mBAAD;IAAc,OAAO,EAAC;EAAtB,GAAuCA,IAAvC,CAHX,CADF;AAOD,CARD;;AAUA,wCAAAJ,KAAK,CAACQ,SAAN,GAAkB;EAChB;AACF;AACA;EACEP,OAAO,EAAEQ,mBAAUC,KAAV,CAAgB;IACvB;AACJ;AACA;IACIJ,IAAI,EAAEG,mBAAUE,MAJO;;IAKvB;AACJ;AACA;IACIJ,SAAS,EAAEE,mBAAUE;EARE,CAAhB,EASNC,UAba;;EAchB;AACF;AACA;EACEV,SAAS,EAAEO,mBAAUE,MAjBL;;EAkBhB;AACF;AACA;EACER,IAAI,EAAEM,mBAAUI,IArBA;;EAsBhB;AACF;AACA;EACET,IAAI,EAAEK,mBAAUE;AAzBA,CAAlB;;eA4Be,sBAAWG,eAAX,EAAmB;EAAEV,IAAI,EAAE;AAAR,CAAnB,EAA8CJ,KAA9C,C"}
1
+ {"version":3,"file":"Brand.js","names":["Brand","classes","className","logo","name","others","clsx","root","separator","propTypes","PropTypes","shape","string","isRequired","node","withStyles","styles"],"sources":["../../../src/Header/Brand/Brand.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { withStyles } from \"@material-ui/core\";\nimport HvTypography from \"../../Typography\";\nimport styles from \"./styles\";\n\nconst Brand = ({ classes, className, logo, name, ...others }) => {\n return (\n <div className={clsx(className, classes.root)} {...others}>\n {logo}\n {logo && name && <div className={classes.separator} />}\n {name && <HvTypography variant=\"highlightText\">{name}</HvTypography>}\n </div>\n );\n};\n\nBrand.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the separator component class.\n */\n separator: PropTypes.string,\n }).isRequired,\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * The brand image node.\n */\n logo: PropTypes.node,\n /**\n * The brand name string.\n */\n name: PropTypes.string,\n};\n\nexport default withStyles(styles, { name: \"HvHeaderBrand\" })(Brand);\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,KAAK,GAAG,SAARA,KAAQ,OAAmD;EAAA,IAAhDC,OAAgD,QAAhDA,OAAgD;EAAA,IAAvCC,SAAuC,QAAvCA,SAAuC;EAAA,IAA5BC,IAA4B,QAA5BA,IAA4B;EAAA,IAAtBC,IAAsB,QAAtBA,IAAsB;EAAA,IAAbC,MAAa;EAC/D,oBACE;IAAK,SAAS,EAAE,IAAAC,aAAA,EAAKJ,SAAL,EAAgBD,OAAO,CAACM,IAAxB;EAAhB,GAAmDF,MAAnD,GACGF,IADH,EAEGA,IAAI,IAAIC,IAAR,iBAAgB;IAAK,SAAS,EAAEH,OAAO,CAACO;EAAxB,EAFnB,EAGGJ,IAAI,iBAAI,6BAAC,mBAAD;IAAc,OAAO,EAAC;EAAtB,GAAuCA,IAAvC,CAHX,CADF;AAOD,CARD;;AAUA,wCAAAJ,KAAK,CAACS,SAAN,GAAkB;EAChB;AACF;AACA;EACER,OAAO,EAAES,kBAAA,CAAUC,KAAV,CAAgB;IACvB;AACJ;AACA;IACIJ,IAAI,EAAEG,kBAAA,CAAUE,MAJO;;IAKvB;AACJ;AACA;IACIJ,SAAS,EAAEE,kBAAA,CAAUE;EARE,CAAhB,EASNC,UAba;;EAchB;AACF;AACA;EACEX,SAAS,EAAEQ,kBAAA,CAAUE,MAjBL;;EAkBhB;AACF;AACA;EACET,IAAI,EAAEO,kBAAA,CAAUI,IArBA;;EAsBhB;AACF;AACA;EACEV,IAAI,EAAEM,kBAAA,CAAUE;AAzBA,CAAlB;;eA4Be,IAAAG,gBAAA,EAAWC,eAAX,EAAmB;EAAEZ,IAAI,EAAE;AAAR,CAAnB,EAA8CJ,KAA9C,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"Header.js","names":["HvHeader","classes","position","children","others","root","colorPrimary","backgroundColor","header","propTypes","PropTypes","shape","string","isRequired","oneOf","node","styles","name"],"sources":["../../src/Header/Header.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { AppBar, withStyles } from \"@material-ui/core\";\nimport styles from \"./styles\";\n\n/**\n * The header should be informative and provide the most important information about the digital product so that users can scan it in split seconds.\n *\n * Our implementation of the Header is divided in:\n * <ul>\n * <li>Brand</li>\n * <li>Navigation</li>\n * <li>Actions</li>\n * </ul>\n */\nconst HvHeader = ({ classes, position = \"fixed\", children, ...others }) => {\n return (\n <AppBar\n classes={{ root: classes.root, colorPrimary: classes.backgroundColor }}\n position={position}\n {...others}\n >\n <div className={classes.header}>{children}</div>\n </AppBar>\n );\n};\n\nHvHeader.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the component header class.\n */\n header: PropTypes.string,\n /**\n * Styles applied to the component background color.\n */\n backgroundColor: PropTypes.string,\n }).isRequired,\n /**\n * Position of the component.\n */\n position: PropTypes.oneOf([\"static\", \"relative\", \"fixed\", \"absolute\", \"sticky\"]),\n /**\n * Children to be rendered.\n */\n children: PropTypes.node.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvHeader\" })(HvHeader);\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,QAAQ,GAAG,SAAXA,QAAW,OAA0D;EAAA,IAAvDC,OAAuD,QAAvDA,OAAuD;EAAA,yBAA9CC,QAA8C;EAAA,IAA9CA,QAA8C,8BAAnC,OAAmC;EAAA,IAA1BC,QAA0B,QAA1BA,QAA0B;EAAA,IAAbC,MAAa;EACzE,oBACE,6BAAC,YAAD;IACE,OAAO,EAAE;MAAEC,IAAI,EAAEJ,OAAO,CAACI,IAAhB;MAAsBC,YAAY,EAAEL,OAAO,CAACM;IAA5C,CADX;IAEE,QAAQ,EAAEL;EAFZ,GAGME,MAHN,gBAKE;IAAK,SAAS,EAAEH,OAAO,CAACO;EAAxB,GAAiCL,QAAjC,CALF,CADF;AASD,CAVD;;AAYA,wCAAAH,QAAQ,CAACS,SAAT,GAAqB;EACnB;AACF;AACA;EACER,OAAO,EAAES,mBAAUC,KAAV,CAAgB;IACvB;AACJ;AACA;IACIN,IAAI,EAAEK,mBAAUE,MAJO;;IAKvB;AACJ;AACA;IACIJ,MAAM,EAAEE,mBAAUE,MARK;;IASvB;AACJ;AACA;IACIL,eAAe,EAAEG,mBAAUE;EAZJ,CAAhB,EAaNC,UAjBgB;;EAkBnB;AACF;AACA;EACEX,QAAQ,EAAEQ,mBAAUI,KAAV,CAAgB,CAAC,QAAD,EAAW,UAAX,EAAuB,OAAvB,EAAgC,UAAhC,EAA4C,QAA5C,CAAhB,CArBS;;EAsBnB;AACF;AACA;EACEX,QAAQ,EAAEO,mBAAUK,IAAV,CAAeF;AAzBN,CAArB;;eA4Be,sBAAWG,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAyCjB,QAAzC,C"}
1
+ {"version":3,"file":"Header.js","names":["HvHeader","classes","position","children","others","root","colorPrimary","backgroundColor","header","propTypes","PropTypes","shape","string","isRequired","oneOf","node","withStyles","styles","name"],"sources":["../../src/Header/Header.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { AppBar, withStyles } from \"@material-ui/core\";\nimport styles from \"./styles\";\n\n/**\n * The header should be informative and provide the most important information about the digital product so that users can scan it in split seconds.\n *\n * Our implementation of the Header is divided in:\n * <ul>\n * <li>Brand</li>\n * <li>Navigation</li>\n * <li>Actions</li>\n * </ul>\n */\nconst HvHeader = ({ classes, position = \"fixed\", children, ...others }) => {\n return (\n <AppBar\n classes={{ root: classes.root, colorPrimary: classes.backgroundColor }}\n position={position}\n {...others}\n >\n <div className={classes.header}>{children}</div>\n </AppBar>\n );\n};\n\nHvHeader.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the component header class.\n */\n header: PropTypes.string,\n /**\n * Styles applied to the component background color.\n */\n backgroundColor: PropTypes.string,\n }).isRequired,\n /**\n * Position of the component.\n */\n position: PropTypes.oneOf([\"static\", \"relative\", \"fixed\", \"absolute\", \"sticky\"]),\n /**\n * Children to be rendered.\n */\n children: PropTypes.node.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvHeader\" })(HvHeader);\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,QAAQ,GAAG,SAAXA,QAAW,OAA0D;EAAA,IAAvDC,OAAuD,QAAvDA,OAAuD;EAAA,yBAA9CC,QAA8C;EAAA,IAA9CA,QAA8C,8BAAnC,OAAmC;EAAA,IAA1BC,QAA0B,QAA1BA,QAA0B;EAAA,IAAbC,MAAa;EACzE,oBACE,6BAAC,YAAD;IACE,OAAO,EAAE;MAAEC,IAAI,EAAEJ,OAAO,CAACI,IAAhB;MAAsBC,YAAY,EAAEL,OAAO,CAACM;IAA5C,CADX;IAEE,QAAQ,EAAEL;EAFZ,GAGME,MAHN,gBAKE;IAAK,SAAS,EAAEH,OAAO,CAACO;EAAxB,GAAiCL,QAAjC,CALF,CADF;AASD,CAVD;;AAYA,wCAAAH,QAAQ,CAACS,SAAT,GAAqB;EACnB;AACF;AACA;EACER,OAAO,EAAES,kBAAA,CAAUC,KAAV,CAAgB;IACvB;AACJ;AACA;IACIN,IAAI,EAAEK,kBAAA,CAAUE,MAJO;;IAKvB;AACJ;AACA;IACIJ,MAAM,EAAEE,kBAAA,CAAUE,MARK;;IASvB;AACJ;AACA;IACIL,eAAe,EAAEG,kBAAA,CAAUE;EAZJ,CAAhB,EAaNC,UAjBgB;;EAkBnB;AACF;AACA;EACEX,QAAQ,EAAEQ,kBAAA,CAAUI,KAAV,CAAgB,CAAC,QAAD,EAAW,UAAX,EAAuB,OAAvB,EAAgC,UAAhC,EAA4C,QAA5C,CAAhB,CArBS;;EAsBnB;AACF;AACA;EACEX,QAAQ,EAAEO,kBAAA,CAAUK,IAAV,CAAeF;AAzBN,CAArB;;eA4Be,IAAAG,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAyClB,QAAzC,C"}
@@ -117,10 +117,14 @@ process.env.NODE_ENV !== "production" ? MenuBar.propTypes = {
117
117
  *
118
118
  * id - the id to be applied to the root element.
119
119
  * label - the label to be rendered on the menu item.
120
+ * href - the url used for navigation.
121
+ * target - the behavior when opening an url.
120
122
  */
121
123
  data: _propTypes.default.arrayOf(_propTypes.default.shape({
122
124
  id: _propTypes.default.string.isRequired,
123
- label: _propTypes.default.string.isRequired
125
+ label: _propTypes.default.string.isRequired,
126
+ href: _propTypes.default.string,
127
+ target: _propTypes.default.string
124
128
  })),
125
129
 
126
130
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"MenuBar.js","names":["MenuBar","classes","id","data","onClick","type","selectionPath","SelectionContext","isMenu","isActive","filter","item","length","root","hidden","active","list","map","propTypes","PropTypes","shape","string","menubar","menu","isRequired","arrayOf","label","func","oneOf","styles","name"],"sources":["../../../../src/Header/Navigation/MenuBar/MenuBar.js"],"sourcesContent":["import React, { useContext } from \"react\";\nimport clsx from \"clsx\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\nimport SelectionContext from \"../utils/SelectionContext\";\nimport MenuItem from \"../MenuItem\";\nimport styles from \"./styles\";\n\nconst MenuBar = ({ classes, id, data = [], onClick, type }) => {\n const selectionPath = useContext(SelectionContext);\n\n const isMenu = type === \"menu\";\n const isActive = isMenu && data.filter((item) => item.id === selectionPath[1]).length > 0;\n\n return (\n <div\n className={clsx(classes.root, classes[`${type}`], {\n [classes.hidden]: isMenu,\n [classes.active]: isActive,\n })}\n >\n <ul id={id} className={classes.list} onFocus={() => {}}>\n {data.map((item) => (\n <MenuItem key={item.id} item={item} type={type} onClick={onClick} />\n ))}\n </ul>\n </div>\n );\n};\n\nMenuBar.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the root.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the menu bar.\n */\n menubar: PropTypes.string,\n /**\n * Styles applied to the menu.\n */\n menu: PropTypes.string,\n /**\n * Styles applied when in menu mode.\n */\n hidden: PropTypes.string,\n /**\n * Styles applied when active.\n */\n active: PropTypes.string,\n /**\n * Styles applied to the list.\n */\n list: PropTypes.string,\n }).isRequired,\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * An array containing the data for each menu item.\n *\n * id - the id to be applied to the root element.\n * label - the label to be rendered on the menu item.\n */\n data: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n })\n ),\n /**\n * Callback triggered when item is clicked.\n */\n onClick: PropTypes.func,\n /**\n * The type of menu.\n */\n type: PropTypes.oneOf([\"menubar\", \"menu\"]).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvHeaderMenuBar\" })(MenuBar);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,OAAO,GAAG,SAAVA,OAAU,OAA+C;EAAA,IAA5CC,OAA4C,QAA5CA,OAA4C;EAAA,IAAnC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BAAUE,MAhBK;;IAiBvB;AACJ;AACA;IACIN,MAAM,EAAEI,mBAAUE,MApBK;;IAqBvB;AACJ;AACA;IACIL,IAAI,EAAEG,mBAAUE;EAxBO,CAAhB,EAyBNG,UA7Be;;EA8BlB;AACF;AACA;EACEtB,EAAE,EAAEiB,mBAAUE,MAjCI;;EAkClB;AACF;AACA;AACA;AACA;AACA;EACElB,IAAI,EAAEgB,mBAAUM,OAAV,CACJN,mBAAUC,KAAV,CAAgB;IACdlB,EAAE,EAAEiB,mBAAUE,MAAV,CAAiBG,UADP;IAEdE,KAAK,EAAEP,mBAAUE,MAAV,CAAiBG;EAFV,CAAhB,CADI,CAxCY;;EA8ClB;AACF;AACA;EACEpB,OAAO,EAAEe,mBAAUQ,IAjDD;;EAkDlB;AACF;AACA;EACEtB,IAAI,EAAEc,mBAAUS,KAAV,CAAgB,CAAC,SAAD,EAAY,MAAZ,CAAhB,EAAqCJ;AArDzB,CAApB;;eAwDe,sBAAWK,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAgD9B,OAAhD,C"}
1
+ {"version":3,"file":"MenuBar.js","names":["MenuBar","classes","id","data","onClick","type","selectionPath","useContext","SelectionContext","isMenu","isActive","filter","item","length","clsx","root","hidden","active","list","map","propTypes","PropTypes","shape","string","menubar","menu","isRequired","arrayOf","label","href","target","func","oneOf","withStyles","styles","name"],"sources":["../../../../src/Header/Navigation/MenuBar/MenuBar.js"],"sourcesContent":["import React, { useContext } from \"react\";\nimport clsx from \"clsx\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\nimport SelectionContext from \"../utils/SelectionContext\";\nimport MenuItem from \"../MenuItem\";\nimport styles from \"./styles\";\n\nconst MenuBar = ({ classes, id, data = [], onClick, type }) => {\n const selectionPath = useContext(SelectionContext);\n\n const isMenu = type === \"menu\";\n const isActive = isMenu && data.filter((item) => item.id === selectionPath[1]).length > 0;\n\n return (\n <div\n className={clsx(classes.root, classes[`${type}`], {\n [classes.hidden]: isMenu,\n [classes.active]: isActive,\n })}\n >\n <ul id={id} className={classes.list} onFocus={() => {}}>\n {data.map((item) => (\n <MenuItem key={item.id} item={item} type={type} onClick={onClick} />\n ))}\n </ul>\n </div>\n );\n};\n\nMenuBar.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the root.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the menu bar.\n */\n menubar: PropTypes.string,\n /**\n * Styles applied to the menu.\n */\n menu: PropTypes.string,\n /**\n * Styles applied when in menu mode.\n */\n hidden: PropTypes.string,\n /**\n * Styles applied when active.\n */\n active: PropTypes.string,\n /**\n * Styles applied to the list.\n */\n list: PropTypes.string,\n }).isRequired,\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * An array containing the data for each menu item.\n *\n * id - the id to be applied to the root element.\n * label - the label to be rendered on the menu item.\n * href - the url used for navigation.\n * target - the behavior when opening an url.\n */\n data: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n href: PropTypes.string,\n target: PropTypes.string,\n })\n ),\n /**\n * Callback triggered when item is clicked.\n */\n onClick: PropTypes.func,\n /**\n * The type of menu.\n */\n type: PropTypes.oneOf([\"menubar\", \"menu\"]).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvHeaderMenuBar\" })(MenuBar);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,OAAO,GAAG,SAAVA,OAAU,OAA+C;EAAA,IAA5CC,OAA4C,QAA5CA,OAA4C;EAAA,IAAnCC,EAAmC,QAAnCA,EAAmC;EAAA,qBAA/BC,IAA+B;EAAA,IAA/BA,IAA+B,0BAAxB,EAAwB;EAAA,IAApBC,OAAoB,QAApBA,OAAoB;EAAA,IAAXC,IAAW,QAAXA,IAAW;EAC7D,I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,IAAI,EAAEG,kBAAA,CAAUE;EAxBO,CAAhB,EAyBNG,UA7Be;;EA8BlB;AACF;AACA;EACExB,EAAE,EAAEmB,kBAAA,CAAUE,MAjCI;;EAkClB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEpB,IAAI,EAAEkB,kBAAA,CAAUM,OAAV,CACJN,kBAAA,CAAUC,KAAV,CAAgB;IACdpB,EAAE,EAAEmB,kBAAA,CAAUE,MAAV,CAAiBG,UADP;IAEdE,KAAK,EAAEP,kBAAA,CAAUE,MAAV,CAAiBG,UAFV;IAGdG,IAAI,EAAER,kBAAA,CAAUE,MAHF;IAIdO,MAAM,EAAET,kBAAA,CAAUE;EAJJ,CAAhB,CADI,CA1CY;;EAkDlB;AACF;AACA;EACEnB,OAAO,EAAEiB,kBAAA,CAAUU,IArDD;;EAsDlB;AACF;AACA;EACE1B,IAAI,EAAEgB,kBAAA,CAAUW,KAAV,CAAgB,CAAC,SAAD,EAAY,MAAZ,CAAhB,EAAqCN;AAzDzB,CAApB;;eA4De,IAAAO,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAgDnC,OAAhD,C"}
@@ -21,6 +21,10 @@ Object.defineProperty(exports, "__esModule", {
21
21
  });
22
22
  exports.default = void 0;
23
23
 
24
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
25
+
26
+ require("core-js/modules/es.string.link.js");
27
+
24
28
  var _react = _interopRequireWildcard(require("react"));
25
29
 
26
30
  var _clsx = _interopRequireDefault(require("clsx"));
@@ -89,6 +93,17 @@ var MenuItem = function MenuItem(_ref) {
89
93
  };
90
94
 
91
95
  var isIe = (0, _browser.default)(["ie", "edge"]);
96
+
97
+ var label = /*#__PURE__*/_react.default.createElement(_Typography.default, {
98
+ variant: isSelected ? "selectedNavText" : "normalText"
99
+ }, item.label);
100
+
101
+ var itemProps = {
102
+ onClick: actionHandler,
103
+ onKeyDown: actionHandler,
104
+ tabIndex: 0,
105
+ onFocus: handleFocus
106
+ };
92
107
  return /*#__PURE__*/_react.default.createElement("li", {
93
108
  id: id,
94
109
  key: item.label,
@@ -96,16 +111,14 @@ var MenuItem = function MenuItem(_ref) {
96
111
  }, /*#__PURE__*/_react.default.createElement(_ConditionalWrapper.default, {
97
112
  condition: isIe,
98
113
  wrapper: focusWrapper
99
- }, /*#__PURE__*/_react.default.createElement("div", {
100
- role: "button",
114
+ }, item !== null && item !== void 0 && item.href ? /*#__PURE__*/_react.default.createElement("a", (0, _extends2.default)({
115
+ className: (0, _clsx.default)(classes.button, classes.link),
116
+ href: item === null || item === void 0 ? void 0 : item.href,
117
+ target: item === null || item === void 0 ? void 0 : item.target
118
+ }, itemProps), label) : /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
101
119
  className: (0, _clsx.default)(classes.button),
102
- onClick: actionHandler,
103
- onKeyDown: actionHandler,
104
- tabIndex: 0,
105
- onFocus: handleFocus
106
- }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
107
- variant: isSelected ? "selectedNavText" : "normalText"
108
- }, item.label))), hasSubLevel && /*#__PURE__*/_react.default.createElement(_MenuBar.default, {
120
+ role: "button"
121
+ }, itemProps), label)), hasSubLevel && /*#__PURE__*/_react.default.createElement(_MenuBar.default, {
109
122
  data: data,
110
123
  onClick: onClick,
111
124
  type: "menu"
@@ -137,6 +150,11 @@ process.env.NODE_ENV !== "production" ? MenuItem.propTypes = {
137
150
  */
138
151
  button: _propTypes.default.string,
139
152
 
153
+ /**
154
+ * Style applied to each item button when it is behaving as a.
155
+ */
156
+ link: _propTypes.default.string,
157
+
140
158
  /**
141
159
  * Style applied to the reference element used for ie focus.
142
160
  */
@@ -162,6 +180,8 @@ process.env.NODE_ENV !== "production" ? MenuItem.propTypes = {
162
180
  item: _propTypes.default.shape({
163
181
  id: _propTypes.default.string.isRequired,
164
182
  label: _propTypes.default.string.isRequired,
183
+ href: _propTypes.default.string,
184
+ target: _propTypes.default.string,
165
185
  data: _propTypes.default.arrayOf(_propTypes.default.shape({
166
186
  id: _propTypes.default.string.isRequired,
167
187
  label: _propTypes.default.string.isRequired