@hitachivantara/uikit-react-core 3.68.0 → 3.68.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion/Accordion.js.map +1 -1
- package/dist/ActionBar/ActionBar.js.map +1 -1
- package/dist/ActionsGeneric/ActionsGeneric.js.map +1 -1
- package/dist/AppSwitcher/Action/Action.js.map +1 -1
- package/dist/AppSwitcher/AppSwitcher.js.map +1 -1
- package/dist/AppSwitcher/TitleWithTooltip.js.map +1 -1
- package/dist/AssetInventory/AssetInventory.js.map +1 -1
- package/dist/AssetInventory/CardView/CardView.js.map +1 -1
- package/dist/AssetInventory/ListView/ListView.js.map +1 -1
- package/dist/AssetInventory/ListView/ListViewCell/ListViewCell.js.map +1 -1
- package/dist/AssetInventory/ListView/ListViewCell/styles.js.map +1 -1
- package/dist/AssetInventory/ListView/ListViewContext/ListViewContext.js.map +1 -1
- package/dist/AssetInventory/ListView/ListViewHeaderRow/ListViewHeaderRow.js.map +1 -1
- package/dist/AssetInventory/ListView/ListViewRow/ListViewRow.js.map +1 -1
- package/dist/AssetInventory/Multibutton/Multibutton.js.map +1 -1
- package/dist/AssetInventory/Search/Search.js.map +1 -1
- package/dist/AssetInventory/Sort/Sort.js.map +1 -1
- package/dist/AssetInventory/setActionsId.js.map +1 -1
- package/dist/Avatar/Avatar.js.map +1 -1
- package/dist/Badge/Badge.js.map +1 -1
- package/dist/Banner/Banner.js.map +1 -1
- package/dist/Banner/BannerWrapper/ActionContainer/ActionContainer.js.map +1 -1
- package/dist/Banner/BannerWrapper/ActionContainer/styles.js.map +1 -1
- package/dist/Banner/BannerWrapper/BannerContentWrapper.js.map +1 -1
- package/dist/Banner/BannerWrapper/MessageContainer/MessageContainer.js.map +1 -1
- package/dist/BaseCheckBox/BaseCheckBox.js.map +1 -1
- package/dist/BaseDropdown/BaseDropdown.js.map +1 -1
- package/dist/BaseDropdown/BaseDropdownContext/BaseDropdownContext.js.map +1 -1
- package/dist/BaseInput/BaseInput.js.map +1 -1
- package/dist/BaseInput/validations.js.map +1 -1
- package/dist/BaseRadio/BaseRadio.js.map +1 -1
- package/dist/BaseSwitch/BaseSwitch.js.map +1 -1
- package/dist/BreadCrumb/BreadCrumb.js.map +1 -1
- package/dist/BreadCrumb/utils.js.map +1 -1
- package/dist/BulkActions/BulkActions.js.map +1 -1
- package/dist/BulkActions/styles.js.map +1 -1
- package/dist/Button/Button.js.map +1 -1
- package/dist/Button/materialConfigurarion.js.map +1 -1
- package/dist/Button/styles.js.map +1 -1
- package/dist/Calendar/Calendar.js.map +1 -1
- package/dist/Calendar/CalendarHeader/CalendarHeader.js.map +1 -1
- package/dist/Calendar/CalendarNavigation/ComposedNavigation/ComposedNavigation.js.map +1 -1
- package/dist/Calendar/CalendarNavigation/MonthSelector/MonthSelector.js.map +1 -1
- package/dist/Calendar/CalendarNavigation/Navigation/Navigation.js.map +1 -1
- package/dist/Calendar/CalendarWeekLabels/CalendarWeekLabels.js.map +1 -1
- package/dist/Calendar/SingleCalendar/CalendarCell.js.map +1 -1
- package/dist/Calendar/SingleCalendar/SingleCalendar.js.map +1 -1
- package/dist/Calendar/model.js.map +1 -1
- package/dist/Calendar/utils.js.map +1 -1
- package/dist/Card/Card.js.map +1 -1
- package/dist/Card/Content/Content.js.map +1 -1
- package/dist/Card/Header/Header.js.map +1 -1
- package/dist/Card/Media/Media.js.map +1 -1
- package/dist/Card/styles.js.map +1 -1
- package/dist/CheckBox/CheckBox.js.map +1 -1
- package/dist/CheckBoxGroup/CheckBoxGroup.js.map +1 -1
- package/dist/Container/Container.js.map +1 -1
- package/dist/DatePicker/DatePicker.js.map +1 -1
- package/dist/DatePicker/useVisibleDate.js.map +1 -1
- package/dist/DatePicker/utils.js.map +1 -1
- package/dist/Dialog/Dialog.js.map +1 -1
- package/dist/Dialog/DialogActions/DialogActions.js.map +1 -1
- package/dist/Dialog/DialogContent/DialogContent.js.map +1 -1
- package/dist/Dialog/DialogTitle/DialogTitle.js.map +1 -1
- package/dist/Dialog/styles.js.map +1 -1
- package/dist/DropDownMenu/DropDownMenu.js.map +1 -1
- package/dist/Dropdown/Dropdown.js.map +1 -1
- package/dist/Dropdown/List/List.js.map +1 -1
- package/dist/EmptyState/EmptyState.js.map +1 -1
- package/dist/FileUploader/DropZone/DropZone.js.map +1 -1
- package/dist/FileUploader/File/File.js.map +1 -1
- package/dist/FileUploader/FileList/FileList.js.map +1 -1
- package/dist/FileUploader/FileUploader.js.map +1 -1
- package/dist/FileUploader/Preview/Preview.js.map +1 -1
- package/dist/FilterGroup/Counter/Counter.js.map +1 -1
- package/dist/FilterGroup/Counter/styles.js.map +1 -1
- package/dist/FilterGroup/FilterContent/FilterContent.js.map +1 -1
- package/dist/FilterGroup/FilterContent/styles.js.map +1 -1
- package/dist/FilterGroup/FilterGroup.js.map +1 -1
- package/dist/FilterGroup/FilterGroupContext.js.map +1 -1
- package/dist/FilterGroup/LeftPanel/LeftPanel.js.map +1 -1
- package/dist/FilterGroup/LeftPanel/styles.js.map +1 -1
- package/dist/FilterGroup/RightPanel/RightPanel.js.map +1 -1
- package/dist/FilterGroup/RightPanel/styles.js.map +1 -1
- package/dist/FilterGroup/styles.js.map +1 -1
- package/dist/Focus/Focus.js.map +1 -1
- package/dist/Focus/utils.js.map +1 -1
- package/dist/Footer/Footer.js.map +1 -1
- package/dist/Forms/Adornment/Adornment.js.map +1 -1
- package/dist/Forms/CharCounter/CharCounter.js.map +1 -1
- package/dist/Forms/FormElement/FormElement.js.map +1 -1
- package/dist/Forms/FormElement/context/FormElementContext.js.map +1 -1
- package/dist/Forms/FormElement/context/FormElementDescriptorsContext.js.map +1 -1
- package/dist/Forms/FormElement/context/FormElementValueContext.js.map +1 -1
- package/dist/Forms/FormElement/utils/FormUtils.js.map +1 -1
- package/dist/Forms/InfoMessage/InfoMessage.js.map +1 -1
- package/dist/Forms/Label/Label.js.map +1 -1
- package/dist/Forms/Suggestions/Suggestions.js.map +1 -1
- package/dist/Forms/WarningText/WarningText.js.map +1 -1
- package/dist/GlobalActions/GlobalActions.js.map +1 -1
- package/dist/Grid/Grid.js.map +1 -1
- package/dist/Header/Actions/Actions.js.map +1 -1
- package/dist/Header/Brand/Brand.js.map +1 -1
- package/dist/Header/Header.js.map +1 -1
- package/dist/Header/Navigation/MenuBar/MenuBar.js.map +1 -1
- package/dist/Header/Navigation/MenuItem/MenuItem.js.map +1 -1
- package/dist/Header/Navigation/Navigation.js.map +1 -1
- package/dist/Header/Navigation/utils/FocusContext.js.map +1 -1
- package/dist/Header/Navigation/utils/SelectionContext.js.map +1 -1
- package/dist/Header/Navigation/utils/useSelectionPath.js.map +1 -1
- package/dist/Input/Input.js.map +1 -1
- package/dist/Kpi/Kpi.js.map +1 -1
- package/dist/Link/Link.js.map +1 -1
- package/dist/List/List.js +20 -16
- package/dist/List/List.js.map +1 -1
- package/dist/List/useSelectableList.js.map +1 -1
- package/dist/List/utils.js.map +1 -1
- package/dist/ListContainer/ListContainer.js.map +1 -1
- package/dist/ListContainer/ListContext/ListContext.js.map +1 -1
- package/dist/ListContainer/ListItem/ListItem.js.map +1 -1
- package/dist/Loading/Loading.js.map +1 -1
- package/dist/Login/Login.js.map +1 -1
- package/dist/Login/styles.js.map +1 -1
- package/dist/MultiButton/MultiButton.js.map +1 -1
- package/dist/OverflowTooltip/OverflowTooltip.js.map +1 -1
- package/dist/Pagination/Pagination.js.map +1 -1
- package/dist/Pagination/Select.js.map +1 -1
- package/dist/Pagination/utils.js.map +1 -1
- package/dist/Panel/Panel.js.map +1 -1
- package/dist/Provider/Provider.js.map +1 -1
- package/dist/Provider/context.js.map +1 -1
- package/dist/Provider/useLocale.js.map +1 -1
- package/dist/Radio/Radio.js.map +1 -1
- package/dist/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/ScrollTo/Horizontal/HorizontalScrollListItem/HorizontalScrollListItem.js.map +1 -1
- package/dist/ScrollTo/Horizontal/ScrollToHorizontal.js.map +1 -1
- package/dist/ScrollTo/Horizontal/styles.js.map +1 -1
- package/dist/ScrollTo/Vertical/ScrollToVertical.js.map +1 -1
- package/dist/ScrollTo/Vertical/VerticalScrollListItem/VerticalScrollListItem.js.map +1 -1
- package/dist/ScrollTo/Vertical/styles.js.map +1 -1
- package/dist/ScrollTo/useScrollTo.js.map +1 -1
- package/dist/ScrollTo/withTooltip.js.map +1 -1
- package/dist/SelectionList/SelectionList.js.map +1 -1
- package/dist/SimpleGrid/SimpleGrid.js.map +1 -1
- package/dist/SimpleGrid/styles.js.map +1 -1
- package/dist/Slider/Slider.js.map +1 -1
- package/dist/Slider/SliderInput/SliderInput.js.map +1 -1
- package/dist/Slider/utils.js.map +1 -1
- package/dist/Snackbar/Snackbar.js.map +1 -1
- package/dist/Snackbar/SnackbarContentWrapper/SnackbarContentWrapper.js.map +1 -1
- package/dist/Snackbar/SnackbarProvider/SnackbarProvider.js.map +1 -1
- package/dist/Stack/Stack.js.map +1 -1
- package/dist/Switch/Switch.js.map +1 -1
- package/dist/Tab/Tab.js.map +1 -1
- package/dist/Table/CellWithTooltip/index.js.map +1 -1
- package/dist/Table/Header/Header.js.map +1 -1
- package/dist/Table/NoData/index.js.map +1 -1
- package/dist/Table/NoData/styles.js.map +1 -1
- package/dist/Table/Table.js +19 -22
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/columnUtils.js.map +1 -1
- package/dist/Table/selectTable.js.map +1 -1
- package/dist/Table/styles.js.map +1 -1
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Tag/Tag.js.map +1 -1
- package/dist/Tag/styles.js.map +1 -1
- package/dist/TagsInput/TagsInput.js.map +1 -1
- package/dist/TextArea/TextArea.js.map +1 -1
- package/dist/TimePicker/PeriodPicker/PeriodPicker.js.map +1 -1
- package/dist/TimePicker/PeriodPicker/index.js.map +1 -1
- package/dist/TimePicker/TimePicker.js.map +1 -1
- package/dist/TimePicker/UnitTimePicker/UnitTimePicker.js.map +1 -1
- package/dist/TimePicker/UnitTimePicker/index.js.map +1 -1
- package/dist/TimePicker/timePickerConverter.js.map +1 -1
- package/dist/TimePicker/timePickerFormatter.js.map +1 -1
- package/dist/TimePicker/timePickerUtils.js.map +1 -1
- package/dist/ToggleButton/ToggleButton.js.map +1 -1
- package/dist/Tooltip/Tooltip.js.map +1 -1
- package/dist/Typography/Typography.js.map +1 -1
- package/dist/UserPreferences/Action/Action.js.map +1 -1
- package/dist/UserPreferences/Action/styles.js.map +1 -1
- package/dist/UserPreferences/Actions/Actions.js.map +1 -1
- package/dist/UserPreferences/Options/Group/Group.js.map +1 -1
- package/dist/UserPreferences/Options/Label/Label.js.map +1 -1
- package/dist/UserPreferences/Options/Option.js.map +1 -1
- package/dist/UserPreferences/Options/Options.js.map +1 -1
- package/dist/UserPreferences/Options/OptionsContext.js.map +1 -1
- package/dist/UserPreferences/Options/styles.js.map +1 -1
- package/dist/UserPreferences/UserPreferences.js.map +1 -1
- package/dist/VerticalNavigation/Actions/Action.js.map +1 -1
- package/dist/VerticalNavigation/Actions/Actions.js.map +1 -1
- package/dist/VerticalNavigation/Navigation/Navigation.js +0 -1
- package/dist/VerticalNavigation/Navigation/Navigation.js.map +1 -1
- package/dist/VerticalNavigation/TreeView/TreeView.js.map +1 -1
- package/dist/VerticalNavigation/TreeView/TreeViewContexts.js.map +1 -1
- package/dist/VerticalNavigation/TreeView/TreeViewItem.js +1 -1
- package/dist/VerticalNavigation/TreeView/TreeViewItem.js.map +1 -1
- package/dist/VerticalNavigation/TreeView/descendants.js.map +1 -1
- package/dist/VerticalNavigation/VerticalContainer/VerticalContainer.js.map +1 -1
- package/dist/VerticalNavigation/VerticalNavigation.js.map +1 -1
- package/dist/legacy/List/List.js +23 -19
- package/dist/legacy/List/List.js.map +1 -1
- package/dist/legacy/Table/Table.js +20 -23
- package/dist/legacy/Table/Table.js.map +1 -1
- package/dist/legacy/VerticalNavigation/Navigation/Navigation.js +0 -1
- package/dist/legacy/VerticalNavigation/Navigation/Navigation.js.map +1 -1
- package/dist/legacy/VerticalNavigation/TreeView/TreeViewItem.js +1 -1
- package/dist/legacy/VerticalNavigation/TreeView/TreeViewItem.js.map +1 -1
- package/dist/legacy/utils/ConditionalRenderer.js +1 -0
- package/dist/legacy/utils/ConditionalRenderer.js.map +1 -1
- package/dist/modern/List/List.js +25 -24
- package/dist/modern/List/List.js.map +1 -1
- package/dist/modern/Table/Table.js +20 -23
- package/dist/modern/Table/Table.js.map +1 -1
- package/dist/modern/VerticalNavigation/TreeView/TreeViewItem.js +1 -1
- package/dist/modern/VerticalNavigation/TreeView/TreeViewItem.js.map +1 -1
- package/dist/modern/utils/ConditionalRenderer.js +1 -0
- package/dist/modern/utils/ConditionalRenderer.js.map +1 -1
- package/dist/theme/CssBaseline.js.map +1 -1
- package/dist/theme/ScopedCssBaseline.js.map +1 -1
- package/dist/theme/createGenerateClassName.js.map +1 -1
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/overrides/muiButton.js.map +1 -1
- package/dist/theme/palette.js.map +1 -1
- package/dist/theme/typography.js.map +1 -1
- package/dist/useUniqueId.js.map +1 -1
- package/dist/utils/ConditionalRenderer.js +1 -0
- package/dist/utils/ConditionalRenderer.js.map +1 -1
- package/dist/utils/browser.js.map +1 -1
- package/dist/utils/hexToRgbA.js.map +1 -1
- package/dist/utils/refType.js.map +1 -1
- package/dist/utils/setId.js.map +1 -1
- package/dist/utils/useComputation.js.map +1 -1
- package/dist/utils/useDeprecated.js.map +1 -1
- package/dist/utils/useImageLoaded.js.map +1 -1
- package/dist/utils/useIsMounted.js.map +1 -1
- package/dist/utils/useLabels.js.map +1 -1
- package/dist/utils/usePropAsRef.js.map +1 -1
- package/dist/utils/useSavedState.js.map +1 -1
- package/dist/utils/useUpdated.js.map +1 -1
- package/dist/utils/useWidth.js.map +1 -1
- package/dist/withId.js.map +1 -1
- package/dist/withTooltip.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimePicker.js","names":["setFocusToContent","containerRef","getElementsByTagName","focus","timeIsEqual","timeA","timeB","hours","minutes","seconds","period","timeIsValid","time","timeFormat","hourInputState","TimeFormat","H24","H12","minutesInputState","secondsInputState","HvTimePicker","classes","className","id","name","required","disabled","label","ariaLabel","ariaLabelledBy","description","ariaDescribedBy","onChange","status","statusMessage","ariaErrorMessage","placeholder","hoursPlaceholder","minutesPlaceholder","secondsPlaceholder","valueProp","value","defaultValueProp","defaultValue","chosenTimeFormat","localeProp","locale","disableDefaultValue","onToggleCallback","onToggle","Date","getHours","getMinutes","chosenTimePeriod","disablePortal","escapeWithReference","dropdownProps","others","elementId","localeFromProvider","toString","v","PeriodPickerOptions","AM","PM","setValue","rollbackValue","lastValidValue","validationMessage","validationState","setValidationState","isOpen","setOpen","firstRender","currentValue","current","currentTimeFormat","to12","h","p","undefined","dayPeriod","handleTimeChange","updatedTimeObject","valid","handleHoursChange","updatedHours","newSelectedTime","handleMinutesChange","updatedMinutes","handleSecondsChange","updatedSeconds","handleChangePeriod","updatedPeriod","evt","open","hasLabels","hasDescription","canShowError","isStateInvalid","errorMessageId","root","formElementRoot","labelContainer","dropdownPlaceholderDisabled","dropdownPlaceholder","header","dropdownHeaderInvalid","headerOpen","dropdownHeaderOpen","iconBaseRoot","join","trim","modifiers","enabled","timePopperContainer","TimePickerUnits","HOUR_24","type","HOUR_12","separator","MINUTE","SECOND","error","propTypes","PropTypes","shape","string","input","periodContainer","isRequired","number","bool","node","oneOf","func","instanceOf","Object","styles"],"sources":["../../src/TimePicker/TimePicker.js"],"sourcesContent":["import React, { useState, useEffect, useRef, useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { withStyles } from \"@material-ui/core\";\n\nimport { Time as TimeIcon } from \"@hitachivantara/uikit-react-icons\";\nimport {\n HvFormElement,\n HvBaseDropdown,\n HvLabel,\n HvWarningText,\n HvInfoMessage,\n setId,\n useUniqueId,\n useControlled,\n useLocale,\n HvTypography,\n useSavedState,\n} from \"..\";\n\nimport { TimePickerUnits, TimeFormat, PeriodPickerOptions } from \"./enums\";\nimport { getFormattedTime, getTimeFormatForLocale } from \"./timePickerFormatter\";\nimport { getHoursForTimeFormat, getTimeWithFormat24 } from \"./timePickerConverter\";\nimport UnitTimePicker from \"./UnitTimePicker\";\nimport PeriodPicker from \"./PeriodPicker\";\n\nimport styles from \"./styles\";\n\nconst setFocusToContent = (containerRef) => {\n containerRef?.getElementsByTagName(\"input\")[0]?.focus();\n};\n\nconst timeIsEqual = (timeA, timeB) => {\n return (\n timeA === timeB ||\n (timeA == null && timeB == null) ||\n (timeA != null &&\n timeB != null &&\n timeA.hours === timeB.hours &&\n timeA.minutes === timeB.minutes &&\n timeA.seconds === timeB.seconds &&\n timeA.period === timeB.period)\n );\n};\n\nconst timeIsValid = (time, timeFormat) => {\n const hourInputState =\n time?.hours != null &&\n time.hours !== \"\" &&\n time.hours >= 0 &&\n ((timeFormat === TimeFormat.H24 && time.hours <= 24) ||\n (timeFormat === TimeFormat.H12 && time.hours <= 12));\n const minutesInputState =\n time?.minutes != null && time.minutes !== \"\" && time.minutes >= 0 && time.minutes <= 59;\n const secondsInputState =\n time?.seconds != null && time.seconds !== \"\" && time.seconds >= 0 && time.seconds <= 59;\n\n return hourInputState && minutesInputState && secondsInputState;\n};\n\n/**\n * A TimePicker component used to choose the time.\n */\n\nconst HvTimePicker = ({\n classes,\n className,\n\n id,\n name,\n\n required = false,\n disabled = false,\n\n label,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n description,\n \"aria-describedby\": ariaDescribedBy,\n\n onChange,\n\n status,\n statusMessage,\n \"aria-errormessage\": ariaErrorMessage,\n\n placeholder,\n hoursPlaceholder = \"hh\",\n minutesPlaceholder = \"mm\",\n secondsPlaceholder = \"ss\",\n\n value: valueProp,\n defaultValue: defaultValueProp,\n\n timeFormat: chosenTimeFormat,\n locale: localeProp,\n\n disableDefaultValue,\n\n onToggle: onToggleCallback,\n\n // deprecated properties:\n hours = new Date().getHours(),\n minutes = new Date().getMinutes(),\n seconds = 0,\n period: chosenTimePeriod,\n\n // misc properties:\n disablePortal = true,\n escapeWithReference = true,\n dropdownProps,\n ...others\n}) => {\n // #region STATE\n const elementId = useUniqueId(id, \"hvtimepicker\");\n\n const localeFromProvider = useLocale();\n const locale = localeProp || localeFromProvider;\n const timeFormat = useMemo(\n () => (chosenTimeFormat != null ? chosenTimeFormat.toString() : getTimeFormatForLocale(locale)),\n [chosenTimeFormat, locale]\n );\n\n const [value, setValue, rollbackValue, lastValidValue] = useSavedState(() => {\n // fallback to the deprecated properties\n // we shouldn't do that when promoting to core\n // as it makes impossible to start with an empty value\n const defaultValue =\n defaultValueProp ??\n (disableDefaultValue\n ? null\n : {\n hours,\n minutes,\n seconds,\n });\n\n const v = valueProp ?? defaultValue;\n\n return v != null\n ? {\n hours: v?.hours != null ? getHoursForTimeFormat(v.hours, timeFormat) : null,\n minutes: v?.minutes,\n seconds: v?.seconds,\n period:\n timeFormat === TimeFormat.H12\n ? chosenTimePeriod ??\n (v?.hours == null || v.hours < 12 ? PeriodPickerOptions.AM : PeriodPickerOptions.PM)\n : null,\n }\n : null;\n });\n\n const [validationMessage] = useControlled(statusMessage, \"Required\");\n const [validationState, setValidationState] = useControlled(status, \"standBy\");\n\n const [isOpen, setOpen] = useState(false);\n // #endregion\n\n // #region SIDE EFFECTS\n const firstRender = useRef(true);\n const currentValue = useRef(value);\n useEffect(() => {\n currentValue.current = value;\n });\n const currentTimeFormat = useRef(timeFormat);\n useEffect(() => {\n currentTimeFormat.current = timeFormat;\n });\n\n useEffect(() => {\n // allow external changes to the time format (via timeFormat or locale properties)\n if (!firstRender.current && currentValue.current != null) {\n const to12 = timeFormat === TimeFormat.H12;\n\n let { hours: h, period: p } = currentValue.current;\n if (to12) {\n if (h == null || h < 12) {\n p = PeriodPickerOptions.AM;\n } else {\n p = PeriodPickerOptions.PM;\n if (h > 12) {\n h -= 12;\n }\n }\n } else {\n if (p === PeriodPickerOptions.AM) {\n if (h === 12) {\n h = 0;\n }\n } else if (h < 12) {\n h += 12;\n }\n p = undefined;\n }\n\n setValue(\n {\n hours: h,\n minutes: currentValue.current.minutes,\n seconds: currentValue.current.seconds,\n period: p,\n },\n true\n );\n }\n }, [setValue, timeFormat]);\n\n useEffect(() => {\n // allow control of value property\n if (!firstRender.current) {\n const dayPeriod =\n valueProp?.hours == null || valueProp.hours < 12\n ? PeriodPickerOptions.AM\n : PeriodPickerOptions.PM;\n\n setValue(\n valueProp != null\n ? {\n hours:\n valueProp?.hours != null\n ? getHoursForTimeFormat(valueProp.hours, currentTimeFormat.current)\n : null,\n minutes: valueProp?.minutes,\n seconds: valueProp?.seconds,\n period: currentTimeFormat.current === TimeFormat.H12 ? dayPeriod : null,\n }\n : null,\n true\n );\n }\n }, [setValue, valueProp]);\n\n useEffect(() => {\n // on close, make sure to restore the last valid value\n // (in the case the user closed with some time part invalid)\n if (!firstRender.current && !isOpen) {\n rollbackValue();\n }\n }, [isOpen, rollbackValue]);\n\n useEffect(() => {\n // run validations on each render\n // (except on the first, remaining in the standBy/untouched state)\n if (!firstRender.current) {\n setValidationState(() => {\n // this will only run if status is uncontrolled\n if (required && lastValidValue == null) {\n return \"invalid\";\n }\n return \"valid\";\n });\n }\n });\n\n useEffect(() => {\n firstRender.current = false;\n }, []);\n // #endregion\n\n // #region EVENT HANDLERS\n const handleTimeChange = (updatedTimeObject) => {\n if (!timeIsEqual(value, updatedTimeObject)) {\n const valid = timeIsValid(updatedTimeObject, timeFormat);\n\n // the value only is commited if valid\n setValue(updatedTimeObject, valid);\n\n if (valid) {\n // always output in 24h format\n onChange?.(getTimeWithFormat24(updatedTimeObject, timeFormat));\n }\n }\n };\n\n /**\n * Handles the change of the hours value\n * @param {Number} hours - selected hours\n * @memberof HvTimePicker\n */\n const handleHoursChange = (updatedHours) => {\n const newSelectedTime = {\n ...value,\n hours: updatedHours,\n };\n\n handleTimeChange(newSelectedTime);\n };\n\n /**\n * Handles the change of the minutes value\n * @param {Number} minutes - selected minutes\n * @memberof HvTimePicker\n */\n const handleMinutesChange = (updatedMinutes) => {\n const newSelectedTime = {\n ...value,\n minutes: updatedMinutes,\n };\n\n handleTimeChange(newSelectedTime);\n };\n\n /**\n * Handles the change of the seconds value\n * @param {Number} seconds - selected seconds\n * @memberof HvTimePicker\n */\n const handleSecondsChange = (updatedSeconds) => {\n const newSelectedTime = {\n ...value,\n seconds: updatedSeconds,\n };\n\n handleTimeChange(newSelectedTime);\n };\n\n /**\n * Handles the change of the period (am/pm)\n * @param {String} period - selected period\n * @memberof HvTimePicker\n */\n const handleChangePeriod = (updatedPeriod) => {\n const newSelectedTime = {\n ...value,\n period: updatedPeriod,\n };\n\n handleTimeChange(newSelectedTime);\n };\n\n const onToggle = (evt, open) => {\n /* \n If evt is null this toggle wasn't triggered by the user.\n instead it was triggered by the baseDropdown useEffect after\n the change of the expanded property.\n */\n if (evt === null) return;\n\n onToggleCallback?.(evt, open);\n\n setOpen(open);\n };\n // #endregion\n\n const hasLabels = label != null;\n const hasDescription = description != null;\n\n // the error message area will only be created if:\n // - an external element that provides an error message isn't identified via aria-errormessage AND\n // - both status and statusMessage properties are being controlled OR\n // - status is uncontrolled and required is true\n const canShowError =\n ariaErrorMessage == null &&\n ((status !== undefined && statusMessage !== undefined) || (status === undefined && required));\n\n const isStateInvalid = validationState === \"invalid\";\n\n let errorMessageId;\n if (isStateInvalid) {\n errorMessageId = canShowError ? setId(elementId, \"error\") : ariaErrorMessage;\n }\n\n return (\n <HvFormElement\n id={id}\n name={name}\n locale={locale}\n required={required}\n disabled={disabled}\n status={validationState}\n classes={{\n root: classes.formElementRoot,\n }}\n className={clsx(className, classes.root)}\n {...others}\n >\n {(hasLabels || hasDescription) && (\n <div className={classes.labelContainer}>\n {hasLabels && (\n <HvLabel id={setId(elementId, \"label\")} label={label} className={classes.label} />\n )}\n {hasDescription && (\n <HvInfoMessage id={setId(elementId, \"description\")} className={classes.description}>\n {description}\n </HvInfoMessage>\n )}\n </div>\n )}\n <HvBaseDropdown\n id={setId(elementId, \"timepicker-dropdown\")}\n role=\"combobox\"\n placeholder={\n lastValidValue != null ? (\n getFormattedTime(lastValidValue, timeFormat)\n ) : (\n <HvTypography variant=\"placeholderText\">{placeholder}</HvTypography>\n )\n }\n classes={{\n placeholder: disabled ? classes.dropdownPlaceholderDisabled : classes.dropdownPlaceholder,\n header: isStateInvalid ? classes.dropdownHeaderInvalid : undefined,\n headerOpen: classes.dropdownHeaderOpen,\n }}\n variableWidth\n placement=\"right\"\n adornment={\n <TimeIcon color={disabled ? \"atmo5\" : \"acce1\"} className={classes.iconBaseRoot} />\n }\n expanded={isOpen}\n onToggle={onToggle}\n onContainerCreation={setFocusToContent}\n aria-haspopup=\"dialog\"\n aria-label={ariaLabel}\n aria-labelledby={\n [label && setId(elementId, \"label\"), ariaLabelledBy].join(\" \").trim() || undefined\n }\n aria-invalid={isStateInvalid ? true : undefined}\n aria-errormessage={errorMessageId}\n aria-describedby={\n [description && setId(elementId, \"description\"), ariaDescribedBy].join(\" \").trim() ||\n undefined\n }\n disablePortal={disablePortal}\n disabled={disabled}\n popperProps={{ modifiers: [{ name: \"preventOverflow\", enabled: escapeWithReference }] }}\n {...dropdownProps}\n >\n <div className={classes.timePopperContainer}>\n <UnitTimePicker\n id={setId(elementId, \"hours\")}\n placeholder={hoursPlaceholder}\n unit={\n timeFormat === TimeFormat.H24\n ? TimePickerUnits.HOUR_24.type\n : TimePickerUnits.HOUR_12.type\n }\n unitValue={value?.hours}\n onChangeUnitTimeValue={handleHoursChange}\n />\n <span className={classes.separator}>:</span>\n <UnitTimePicker\n id={setId(elementId, \"minutes\")}\n placeholder={minutesPlaceholder}\n unit={TimePickerUnits.MINUTE.type}\n unitValue={value?.minutes}\n onChangeUnitTimeValue={handleMinutesChange}\n />\n <span className={classes.separator}>:</span>\n <UnitTimePicker\n id={setId(elementId, \"seconds\")}\n placeholder={secondsPlaceholder}\n unit={TimePickerUnits.SECOND.type}\n unitValue={value?.seconds}\n onChangeUnitTimeValue={handleSecondsChange}\n />\n {timeFormat === TimeFormat.H12 && (\n <PeriodPicker onChangePeriod={handleChangePeriod} period={value?.period} />\n )}\n </div>\n </HvBaseDropdown>\n {canShowError && (\n <HvWarningText id={setId(elementId, \"error\")} disableBorder className={classes.error}>\n {validationMessage}\n </HvWarningText>\n )}\n </HvFormElement>\n );\n};\n\nHvTimePicker.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied to the input/popper\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the root element.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the input.\n */\n input: PropTypes.string,\n /**\n * Styles applied to the label.\n */\n label: PropTypes.string,\n /**\n * Styles applied to the timePopperContainer.\n */\n timePopperContainer: PropTypes.string,\n /**\n * Styles applied to the separator.\n */\n separator: PropTypes.string,\n /**\n * Styles applied to the period container.\n */\n periodContainer: PropTypes.string,\n /**\n * Styles applied to the form element.\n */\n formElementRoot: PropTypes.string,\n /**\n * Styles applied to the dropdown placeholder.\n */\n dropdownPlaceholder: PropTypes.string,\n /**\n * Styles applied to the icon base.\n */\n iconBaseRoot: PropTypes.string,\n /**\n * Styles applied to the error area.\n */\n error: PropTypes.string,\n /**\n * Styles applied to the container of the labels elements.\n */\n labelContainer: PropTypes.string,\n /**\n * Styles applied to the icon information text.\n */\n description: PropTypes.string,\n /**\n * Styles applied to the dropdown when invalid information text.\n */\n dropdownHeaderInvalid: PropTypes.string,\n /**\n * Styles applied to the dropdown text when invalid.\n */\n\n dropdownPlaceholderDisabled: PropTypes.string,\n /**\n * Styles applied to the dropdown border when invalid.\n */\n dropdownHeaderOpen: PropTypes.string,\n }).isRequired,\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n\n /**\n * Id to be applied to the form element root node.\n */\n id: PropTypes.string,\n\n /**\n * The form element name.\n */\n name: PropTypes.string,\n\n /**\n * The value of the form element.\n */\n value: PropTypes.shape({\n hours: PropTypes.number,\n minutes: PropTypes.number,\n seconds: PropTypes.number,\n period: PropTypes.string,\n }),\n /**\n * When uncontrolled, defines the initial input value.\n */\n defaultValue: PropTypes.shape({\n hours: PropTypes.number,\n minutes: PropTypes.number,\n seconds: PropTypes.number,\n period: PropTypes.string,\n }),\n\n /**\n * Indicates that user input is required on the form element.\n */\n required: PropTypes.bool,\n\n /**\n * Indicates that the form element is disabled.\n */\n disabled: PropTypes.bool,\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.string,\n\n /**\n * @ignore\n */\n \"aria-label\": PropTypes.string,\n\n /**\n * @ignore\n */\n \"aria-labelledby\": PropTypes.string,\n\n /**\n * Provide additional descriptive text for the form element.\n */\n description: PropTypes.node,\n\n /**\n * @ignore\n */\n \"aria-describedby\": PropTypes.string,\n\n /**\n * The placeholder value when no time is selected.\n */\n placeholder: PropTypes.string,\n\n /**\n * The placeholder of the hours input.\n */\n hoursPlaceholder: PropTypes.string,\n /**\n * The placeholder of the minutes input.\n */\n minutesPlaceholder: PropTypes.string,\n /**\n * The placeholder of the seconds input.\n */\n secondsPlaceholder: PropTypes.string,\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 the validation status is \"invalid\".\n *\n * Defaults to \"Required\" when the status is uncontrolled and no `aria-errormessage` is provided.\n */\n statusMessage: PropTypes.node,\n /**\n * Identifies the element that provides an error message for the time picker.\n *\n * Will only be used when the validation status is invalid.\n */\n \"aria-errormessage\": PropTypes.string,\n\n /**\n * If the time should be presented in 12 or 24 hour format.\n * If undefined, the component will use a format according to the passed locale.\n * If defined, it will \"override\" the default value given by the locale\n */\n timeFormat: PropTypes.oneOf([TimeFormat.H12, TimeFormat.H24, 12, 24, undefined]),\n\n /**\n * Locale that will provide the time format(12 or 24 hour format)\n * It is \"overwritten\" by the timeFormat prop\n */\n locale: PropTypes.string,\n\n /**\n * Callback function to be triggered when the input value is changed.\n * It is invoked with a object param with the following props:\n * - hours (in a 24h format)\n * - minutes\n * - seconds\n * - period\n *\n * It is always invoked with the hours in a 24h format\n */\n onChange: PropTypes.func,\n\n /**\n * Callback called when dropdown changes the expanded state.\n *\n * @param {object} event The event source of the callback.\n * @param {boolean} open If the dropdown new state is open (`true`) or closed (`false`).\n */\n onToggle: PropTypes.func,\n\n /**\n * Allow starting with an empty value by not defaulting to the current time.\n * This should become the default behavior when the component is promoted to core.\n */\n disableDefaultValue: PropTypes.bool,\n\n /**\n * Default value for the hours picker\n * @deprecated use defaultValue instead\n */\n hours: PropTypes.number,\n /**\n * Default value for the minutes picker\n * @deprecated use defaultValue instead\n */\n minutes: PropTypes.number,\n /**\n * Default value for the seconds picker\n * @deprecated use defaultValue instead\n */\n seconds: PropTypes.number,\n /**\n * Default value for the period picker\n * @deprecated use defaultValue instead\n */\n period: PropTypes.string,\n\n /**\n * Disable the portal behavior. The children stay within it's parent DOM hierarchy.\n */\n disablePortal: PropTypes.bool,\n\n /**\n * Sets if the calendar container should follow the date picker input out of the screen or stay visible.\n */\n escapeWithReference: PropTypes.bool,\n /**\n * Extra properties to be passed to the timepicker dropdown.\n */\n dropdownProps: PropTypes.instanceOf(Object),\n};\n\nexport default withStyles(styles, { name: \"HvTimePicker\" })(HvTimePicker);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AAcA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;;;;;AAEA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,YAAD,EAAkB;EAAA;;EAC1CA,YAAY,SAAZ,IAAAA,YAAY,WAAZ,qCAAAA,YAAY,CAAEC,oBAAd,CAAmC,OAAnC,EAA4C,CAA5C,iFAAgDC,KA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AACA;EACE7E,mBAAmB,EAAEsE,mBAAUO,IAvPR;;EAwPvB;AACF;AACA;EACE5E,aAAa,EAAEqE,mBAAUW,UAAV,CAAqBC,MAArB;AA3PQ,CAAzB;;eA8Pe,sBAAWC,eAAX,EAAmB;EAAElH,IAAI,EAAE;AAAR,CAAnB,EAA6CJ,YAA7C,C"}
|
|
1
|
+
{"version":3,"file":"TimePicker.js","names":["setFocusToContent","containerRef","getElementsByTagName","focus","timeIsEqual","timeA","timeB","hours","minutes","seconds","period","timeIsValid","time","timeFormat","hourInputState","TimeFormat","H24","H12","minutesInputState","secondsInputState","HvTimePicker","classes","className","id","name","required","disabled","label","ariaLabel","ariaLabelledBy","description","ariaDescribedBy","onChange","status","statusMessage","ariaErrorMessage","placeholder","hoursPlaceholder","minutesPlaceholder","secondsPlaceholder","valueProp","value","defaultValueProp","defaultValue","chosenTimeFormat","localeProp","locale","disableDefaultValue","onToggleCallback","onToggle","Date","getHours","getMinutes","chosenTimePeriod","disablePortal","escapeWithReference","dropdownProps","others","elementId","useUniqueId","localeFromProvider","useLocale","useMemo","toString","getTimeFormatForLocale","useSavedState","v","getHoursForTimeFormat","PeriodPickerOptions","AM","PM","setValue","rollbackValue","lastValidValue","useControlled","validationMessage","validationState","setValidationState","useState","isOpen","setOpen","firstRender","useRef","currentValue","useEffect","current","currentTimeFormat","to12","h","p","undefined","dayPeriod","handleTimeChange","updatedTimeObject","valid","getTimeWithFormat24","handleHoursChange","updatedHours","newSelectedTime","handleMinutesChange","updatedMinutes","handleSecondsChange","updatedSeconds","handleChangePeriod","updatedPeriod","evt","open","hasLabels","hasDescription","canShowError","isStateInvalid","errorMessageId","setId","root","formElementRoot","clsx","labelContainer","getFormattedTime","dropdownPlaceholderDisabled","dropdownPlaceholder","header","dropdownHeaderInvalid","headerOpen","dropdownHeaderOpen","iconBaseRoot","join","trim","modifiers","enabled","timePopperContainer","TimePickerUnits","HOUR_24","type","HOUR_12","separator","MINUTE","SECOND","error","propTypes","PropTypes","shape","string","input","periodContainer","isRequired","number","bool","node","oneOf","func","instanceOf","Object","withStyles","styles"],"sources":["../../src/TimePicker/TimePicker.js"],"sourcesContent":["import React, { useState, useEffect, useRef, useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { withStyles } from \"@material-ui/core\";\n\nimport { Time as TimeIcon } from \"@hitachivantara/uikit-react-icons\";\nimport {\n HvFormElement,\n HvBaseDropdown,\n HvLabel,\n HvWarningText,\n HvInfoMessage,\n setId,\n useUniqueId,\n useControlled,\n useLocale,\n HvTypography,\n useSavedState,\n} from \"..\";\n\nimport { TimePickerUnits, TimeFormat, PeriodPickerOptions } from \"./enums\";\nimport { getFormattedTime, getTimeFormatForLocale } from \"./timePickerFormatter\";\nimport { getHoursForTimeFormat, getTimeWithFormat24 } from \"./timePickerConverter\";\nimport UnitTimePicker from \"./UnitTimePicker\";\nimport PeriodPicker from \"./PeriodPicker\";\n\nimport styles from \"./styles\";\n\nconst setFocusToContent = (containerRef) => {\n containerRef?.getElementsByTagName(\"input\")[0]?.focus();\n};\n\nconst timeIsEqual = (timeA, timeB) => {\n return (\n timeA === timeB ||\n (timeA == null && timeB == null) ||\n (timeA != null &&\n timeB != null &&\n timeA.hours === timeB.hours &&\n timeA.minutes === timeB.minutes &&\n timeA.seconds === timeB.seconds &&\n timeA.period === timeB.period)\n );\n};\n\nconst timeIsValid = (time, timeFormat) => {\n const hourInputState =\n time?.hours != null &&\n time.hours !== \"\" &&\n time.hours >= 0 &&\n ((timeFormat === TimeFormat.H24 && time.hours <= 24) ||\n (timeFormat === TimeFormat.H12 && time.hours <= 12));\n const minutesInputState =\n time?.minutes != null && time.minutes !== \"\" && time.minutes >= 0 && time.minutes <= 59;\n const secondsInputState =\n time?.seconds != null && time.seconds !== \"\" && time.seconds >= 0 && time.seconds <= 59;\n\n return hourInputState && minutesInputState && secondsInputState;\n};\n\n/**\n * A TimePicker component used to choose the time.\n */\n\nconst HvTimePicker = ({\n classes,\n className,\n\n id,\n name,\n\n required = false,\n disabled = false,\n\n label,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n description,\n \"aria-describedby\": ariaDescribedBy,\n\n onChange,\n\n status,\n statusMessage,\n \"aria-errormessage\": ariaErrorMessage,\n\n placeholder,\n hoursPlaceholder = \"hh\",\n minutesPlaceholder = \"mm\",\n secondsPlaceholder = \"ss\",\n\n value: valueProp,\n defaultValue: defaultValueProp,\n\n timeFormat: chosenTimeFormat,\n locale: localeProp,\n\n disableDefaultValue,\n\n onToggle: onToggleCallback,\n\n // deprecated properties:\n hours = new Date().getHours(),\n minutes = new Date().getMinutes(),\n seconds = 0,\n period: chosenTimePeriod,\n\n // misc properties:\n disablePortal = true,\n escapeWithReference = true,\n dropdownProps,\n ...others\n}) => {\n // #region STATE\n const elementId = useUniqueId(id, \"hvtimepicker\");\n\n const localeFromProvider = useLocale();\n const locale = localeProp || localeFromProvider;\n const timeFormat = useMemo(\n () => (chosenTimeFormat != null ? chosenTimeFormat.toString() : getTimeFormatForLocale(locale)),\n [chosenTimeFormat, locale]\n );\n\n const [value, setValue, rollbackValue, lastValidValue] = useSavedState(() => {\n // fallback to the deprecated properties\n // we shouldn't do that when promoting to core\n // as it makes impossible to start with an empty value\n const defaultValue =\n defaultValueProp ??\n (disableDefaultValue\n ? null\n : {\n hours,\n minutes,\n seconds,\n });\n\n const v = valueProp ?? defaultValue;\n\n return v != null\n ? {\n hours: v?.hours != null ? getHoursForTimeFormat(v.hours, timeFormat) : null,\n minutes: v?.minutes,\n seconds: v?.seconds,\n period:\n timeFormat === TimeFormat.H12\n ? chosenTimePeriod ??\n (v?.hours == null || v.hours < 12 ? PeriodPickerOptions.AM : PeriodPickerOptions.PM)\n : null,\n }\n : null;\n });\n\n const [validationMessage] = useControlled(statusMessage, \"Required\");\n const [validationState, setValidationState] = useControlled(status, \"standBy\");\n\n const [isOpen, setOpen] = useState(false);\n // #endregion\n\n // #region SIDE EFFECTS\n const firstRender = useRef(true);\n const currentValue = useRef(value);\n useEffect(() => {\n currentValue.current = value;\n });\n const currentTimeFormat = useRef(timeFormat);\n useEffect(() => {\n currentTimeFormat.current = timeFormat;\n });\n\n useEffect(() => {\n // allow external changes to the time format (via timeFormat or locale properties)\n if (!firstRender.current && currentValue.current != null) {\n const to12 = timeFormat === TimeFormat.H12;\n\n let { hours: h, period: p } = currentValue.current;\n if (to12) {\n if (h == null || h < 12) {\n p = PeriodPickerOptions.AM;\n } else {\n p = PeriodPickerOptions.PM;\n if (h > 12) {\n h -= 12;\n }\n }\n } else {\n if (p === PeriodPickerOptions.AM) {\n if (h === 12) {\n h = 0;\n }\n } else if (h < 12) {\n h += 12;\n }\n p = undefined;\n }\n\n setValue(\n {\n hours: h,\n minutes: currentValue.current.minutes,\n seconds: currentValue.current.seconds,\n period: p,\n },\n true\n );\n }\n }, [setValue, timeFormat]);\n\n useEffect(() => {\n // allow control of value property\n if (!firstRender.current) {\n const dayPeriod =\n valueProp?.hours == null || valueProp.hours < 12\n ? PeriodPickerOptions.AM\n : PeriodPickerOptions.PM;\n\n setValue(\n valueProp != null\n ? {\n hours:\n valueProp?.hours != null\n ? getHoursForTimeFormat(valueProp.hours, currentTimeFormat.current)\n : null,\n minutes: valueProp?.minutes,\n seconds: valueProp?.seconds,\n period: currentTimeFormat.current === TimeFormat.H12 ? dayPeriod : null,\n }\n : null,\n true\n );\n }\n }, [setValue, valueProp]);\n\n useEffect(() => {\n // on close, make sure to restore the last valid value\n // (in the case the user closed with some time part invalid)\n if (!firstRender.current && !isOpen) {\n rollbackValue();\n }\n }, [isOpen, rollbackValue]);\n\n useEffect(() => {\n // run validations on each render\n // (except on the first, remaining in the standBy/untouched state)\n if (!firstRender.current) {\n setValidationState(() => {\n // this will only run if status is uncontrolled\n if (required && lastValidValue == null) {\n return \"invalid\";\n }\n return \"valid\";\n });\n }\n });\n\n useEffect(() => {\n firstRender.current = false;\n }, []);\n // #endregion\n\n // #region EVENT HANDLERS\n const handleTimeChange = (updatedTimeObject) => {\n if (!timeIsEqual(value, updatedTimeObject)) {\n const valid = timeIsValid(updatedTimeObject, timeFormat);\n\n // the value only is commited if valid\n setValue(updatedTimeObject, valid);\n\n if (valid) {\n // always output in 24h format\n onChange?.(getTimeWithFormat24(updatedTimeObject, timeFormat));\n }\n }\n };\n\n /**\n * Handles the change of the hours value\n * @param {Number} hours - selected hours\n * @memberof HvTimePicker\n */\n const handleHoursChange = (updatedHours) => {\n const newSelectedTime = {\n ...value,\n hours: updatedHours,\n };\n\n handleTimeChange(newSelectedTime);\n };\n\n /**\n * Handles the change of the minutes value\n * @param {Number} minutes - selected minutes\n * @memberof HvTimePicker\n */\n const handleMinutesChange = (updatedMinutes) => {\n const newSelectedTime = {\n ...value,\n minutes: updatedMinutes,\n };\n\n handleTimeChange(newSelectedTime);\n };\n\n /**\n * Handles the change of the seconds value\n * @param {Number} seconds - selected seconds\n * @memberof HvTimePicker\n */\n const handleSecondsChange = (updatedSeconds) => {\n const newSelectedTime = {\n ...value,\n seconds: updatedSeconds,\n };\n\n handleTimeChange(newSelectedTime);\n };\n\n /**\n * Handles the change of the period (am/pm)\n * @param {String} period - selected period\n * @memberof HvTimePicker\n */\n const handleChangePeriod = (updatedPeriod) => {\n const newSelectedTime = {\n ...value,\n period: updatedPeriod,\n };\n\n handleTimeChange(newSelectedTime);\n };\n\n const onToggle = (evt, open) => {\n /* \n If evt is null this toggle wasn't triggered by the user.\n instead it was triggered by the baseDropdown useEffect after\n the change of the expanded property.\n */\n if (evt === null) return;\n\n onToggleCallback?.(evt, open);\n\n setOpen(open);\n };\n // #endregion\n\n const hasLabels = label != null;\n const hasDescription = description != null;\n\n // the error message area will only be created if:\n // - an external element that provides an error message isn't identified via aria-errormessage AND\n // - both status and statusMessage properties are being controlled OR\n // - status is uncontrolled and required is true\n const canShowError =\n ariaErrorMessage == null &&\n ((status !== undefined && statusMessage !== undefined) || (status === undefined && required));\n\n const isStateInvalid = validationState === \"invalid\";\n\n let errorMessageId;\n if (isStateInvalid) {\n errorMessageId = canShowError ? setId(elementId, \"error\") : ariaErrorMessage;\n }\n\n return (\n <HvFormElement\n id={id}\n name={name}\n locale={locale}\n required={required}\n disabled={disabled}\n status={validationState}\n classes={{\n root: classes.formElementRoot,\n }}\n className={clsx(className, classes.root)}\n {...others}\n >\n {(hasLabels || hasDescription) && (\n <div className={classes.labelContainer}>\n {hasLabels && (\n <HvLabel id={setId(elementId, \"label\")} label={label} className={classes.label} />\n )}\n {hasDescription && (\n <HvInfoMessage id={setId(elementId, \"description\")} className={classes.description}>\n {description}\n </HvInfoMessage>\n )}\n </div>\n )}\n <HvBaseDropdown\n id={setId(elementId, \"timepicker-dropdown\")}\n role=\"combobox\"\n placeholder={\n lastValidValue != null ? (\n getFormattedTime(lastValidValue, timeFormat)\n ) : (\n <HvTypography variant=\"placeholderText\">{placeholder}</HvTypography>\n )\n }\n classes={{\n placeholder: disabled ? classes.dropdownPlaceholderDisabled : classes.dropdownPlaceholder,\n header: isStateInvalid ? classes.dropdownHeaderInvalid : undefined,\n headerOpen: classes.dropdownHeaderOpen,\n }}\n variableWidth\n placement=\"right\"\n adornment={\n <TimeIcon color={disabled ? \"atmo5\" : \"acce1\"} className={classes.iconBaseRoot} />\n }\n expanded={isOpen}\n onToggle={onToggle}\n onContainerCreation={setFocusToContent}\n aria-haspopup=\"dialog\"\n aria-label={ariaLabel}\n aria-labelledby={\n [label && setId(elementId, \"label\"), ariaLabelledBy].join(\" \").trim() || undefined\n }\n aria-invalid={isStateInvalid ? true : undefined}\n aria-errormessage={errorMessageId}\n aria-describedby={\n [description && setId(elementId, \"description\"), ariaDescribedBy].join(\" \").trim() ||\n undefined\n }\n disablePortal={disablePortal}\n disabled={disabled}\n popperProps={{ modifiers: [{ name: \"preventOverflow\", enabled: escapeWithReference }] }}\n {...dropdownProps}\n >\n <div className={classes.timePopperContainer}>\n <UnitTimePicker\n id={setId(elementId, \"hours\")}\n placeholder={hoursPlaceholder}\n unit={\n timeFormat === TimeFormat.H24\n ? TimePickerUnits.HOUR_24.type\n : TimePickerUnits.HOUR_12.type\n }\n unitValue={value?.hours}\n onChangeUnitTimeValue={handleHoursChange}\n />\n <span className={classes.separator}>:</span>\n <UnitTimePicker\n id={setId(elementId, \"minutes\")}\n placeholder={minutesPlaceholder}\n unit={TimePickerUnits.MINUTE.type}\n unitValue={value?.minutes}\n onChangeUnitTimeValue={handleMinutesChange}\n />\n <span className={classes.separator}>:</span>\n <UnitTimePicker\n id={setId(elementId, \"seconds\")}\n placeholder={secondsPlaceholder}\n unit={TimePickerUnits.SECOND.type}\n unitValue={value?.seconds}\n onChangeUnitTimeValue={handleSecondsChange}\n />\n {timeFormat === TimeFormat.H12 && (\n <PeriodPicker onChangePeriod={handleChangePeriod} period={value?.period} />\n )}\n </div>\n </HvBaseDropdown>\n {canShowError && (\n <HvWarningText id={setId(elementId, \"error\")} disableBorder className={classes.error}>\n {validationMessage}\n </HvWarningText>\n )}\n </HvFormElement>\n );\n};\n\nHvTimePicker.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied to the input/popper\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the root element.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the input.\n */\n input: PropTypes.string,\n /**\n * Styles applied to the label.\n */\n label: PropTypes.string,\n /**\n * Styles applied to the timePopperContainer.\n */\n timePopperContainer: PropTypes.string,\n /**\n * Styles applied to the separator.\n */\n separator: PropTypes.string,\n /**\n * Styles applied to the period container.\n */\n periodContainer: PropTypes.string,\n /**\n * Styles applied to the form element.\n */\n formElementRoot: PropTypes.string,\n /**\n * Styles applied to the dropdown placeholder.\n */\n dropdownPlaceholder: PropTypes.string,\n /**\n * Styles applied to the icon base.\n */\n iconBaseRoot: PropTypes.string,\n /**\n * Styles applied to the error area.\n */\n error: PropTypes.string,\n /**\n * Styles applied to the container of the labels elements.\n */\n labelContainer: PropTypes.string,\n /**\n * Styles applied to the icon information text.\n */\n description: PropTypes.string,\n /**\n * Styles applied to the dropdown when invalid information text.\n */\n dropdownHeaderInvalid: PropTypes.string,\n /**\n * Styles applied to the dropdown text when invalid.\n */\n\n dropdownPlaceholderDisabled: PropTypes.string,\n /**\n * Styles applied to the dropdown border when invalid.\n */\n dropdownHeaderOpen: PropTypes.string,\n }).isRequired,\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n\n /**\n * Id to be applied to the form element root node.\n */\n id: PropTypes.string,\n\n /**\n * The form element name.\n */\n name: PropTypes.string,\n\n /**\n * The value of the form element.\n */\n value: PropTypes.shape({\n hours: PropTypes.number,\n minutes: PropTypes.number,\n seconds: PropTypes.number,\n period: PropTypes.string,\n }),\n /**\n * When uncontrolled, defines the initial input value.\n */\n defaultValue: PropTypes.shape({\n hours: PropTypes.number,\n minutes: PropTypes.number,\n seconds: PropTypes.number,\n period: PropTypes.string,\n }),\n\n /**\n * Indicates that user input is required on the form element.\n */\n required: PropTypes.bool,\n\n /**\n * Indicates that the form element is disabled.\n */\n disabled: PropTypes.bool,\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.string,\n\n /**\n * @ignore\n */\n \"aria-label\": PropTypes.string,\n\n /**\n * @ignore\n */\n \"aria-labelledby\": PropTypes.string,\n\n /**\n * Provide additional descriptive text for the form element.\n */\n description: PropTypes.node,\n\n /**\n * @ignore\n */\n \"aria-describedby\": PropTypes.string,\n\n /**\n * The placeholder value when no time is selected.\n */\n placeholder: PropTypes.string,\n\n /**\n * The placeholder of the hours input.\n */\n hoursPlaceholder: PropTypes.string,\n /**\n * The placeholder of the minutes input.\n */\n minutesPlaceholder: PropTypes.string,\n /**\n * The placeholder of the seconds input.\n */\n secondsPlaceholder: PropTypes.string,\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 the validation status is \"invalid\".\n *\n * Defaults to \"Required\" when the status is uncontrolled and no `aria-errormessage` is provided.\n */\n statusMessage: PropTypes.node,\n /**\n * Identifies the element that provides an error message for the time picker.\n *\n * Will only be used when the validation status is invalid.\n */\n \"aria-errormessage\": PropTypes.string,\n\n /**\n * If the time should be presented in 12 or 24 hour format.\n * If undefined, the component will use a format according to the passed locale.\n * If defined, it will \"override\" the default value given by the locale\n */\n timeFormat: PropTypes.oneOf([TimeFormat.H12, TimeFormat.H24, 12, 24, undefined]),\n\n /**\n * Locale that will provide the time format(12 or 24 hour format)\n * It is \"overwritten\" by the timeFormat prop\n */\n locale: PropTypes.string,\n\n /**\n * Callback function to be triggered when the input value is changed.\n * It is invoked with a object param with the following props:\n * - hours (in a 24h format)\n * - minutes\n * - seconds\n * - period\n *\n * It is always invoked with the hours in a 24h format\n */\n onChange: PropTypes.func,\n\n /**\n * Callback called when dropdown changes the expanded state.\n *\n * @param {object} event The event source of the callback.\n * @param {boolean} open If the dropdown new state is open (`true`) or closed (`false`).\n */\n onToggle: PropTypes.func,\n\n /**\n * Allow starting with an empty value by not defaulting to the current time.\n * This should become the default behavior when the component is promoted to core.\n */\n disableDefaultValue: PropTypes.bool,\n\n /**\n * Default value for the hours picker\n * @deprecated use defaultValue instead\n */\n hours: PropTypes.number,\n /**\n * Default value for the minutes picker\n * @deprecated use defaultValue instead\n */\n minutes: PropTypes.number,\n /**\n * Default value for the seconds picker\n * @deprecated use defaultValue instead\n */\n seconds: PropTypes.number,\n /**\n * Default value for the period picker\n * @deprecated use defaultValue instead\n */\n period: PropTypes.string,\n\n /**\n * Disable the portal behavior. The children stay within it's parent DOM hierarchy.\n */\n disablePortal: PropTypes.bool,\n\n /**\n * Sets if the calendar container should follow the date picker input out of the screen or stay visible.\n */\n escapeWithReference: PropTypes.bool,\n /**\n * Extra properties to be passed to the timepicker dropdown.\n */\n dropdownProps: PropTypes.instanceOf(Object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qF,kBAAA,CAAUO,IAlPF;;EAoPvB;AACF;AACA;EACE3F,mBAAmB,EAAEoF,kBAAA,CAAUO,IAvPR;;EAwPvB;AACF;AACA;EACE1F,aAAa,EAAEmF,kBAAA,CAAUW,UAAV,CAAqBC,MAArB;AA3PQ,CAAzB;;eA8Pe,IAAAC,gBAAA,EAAWC,eAAX,EAAmB;EAAEjI,IAAI,EAAE;AAAR,CAAnB,EAA6CJ,YAA7C,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnitTimePicker.js","names":["UnitTimePicker","props","classes","id","placeholder","unit","unitValue","onChangeUnitTimeValue","minValue","TimePickerUnits","min","maxValue","max","currentValue","setCurrentValue","isFocused","setIsFocused","isValid","setIsValid","changeTimeUnit","value","callback","handleCurrentValueChange","event","unitTime","Number","toString","length","handleFocusChange","handleOnBlur","handleKeyPressed","KeyboardCodes","Enter","handleAddTime","newUnitTime","handleSubtractTime","renderTimeUnit","unitTimeContainer","input","unitTimeInput","root","inputContainer","inputBorderContainer","inputRoot","unitTimeInputRoot","autoComplete","type","subtractIcon","propTypes","PropTypes","string","instanceOf","Object","isRequired","oneOf","HOUR_24","HOUR_12","MINUTE","SECOND","number","func"],"sources":["../../../src/TimePicker/UnitTimePicker/UnitTimePicker.js"],"sourcesContent":["import React, { useState } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport {\n DropDownXS as SubtractTimeIcon,\n DropUpXS as AddTimeIcon,\n} from \"@hitachivantara/uikit-react-icons\";\nimport { HvInput, isKeypress, KeyboardCodes } from \"../..\";\nimport { isUnitTimeInValidRange } from \"../timePickerUtils\";\nimport { padTime } from \"../timePickerFormatter\";\nimport { TimePickerUnits } from \"../enums\";\n\nconst UnitTimePicker = (props) => {\n const { classes, id, placeholder, unit, unitValue, onChangeUnitTimeValue } = props;\n\n const minValue = TimePickerUnits[unit].min;\n const maxValue = TimePickerUnits[unit].max;\n\n const [currentValue, setCurrentValue] = useState(unitValue ?? \"\");\n const [isFocused, setIsFocused] = useState(false);\n const [isValid, setIsValid] = useState(true);\n\n /**\n * Changes the time unit value in the state.\n *\n * @param {Number} value - new time unit value\n * @memberof UnitTimePicker\n */\n const changeTimeUnit = (value, callback = false) => {\n setCurrentValue(value);\n setIsValid(isUnitTimeInValidRange(value, unit));\n\n if (callback) {\n onChangeUnitTimeValue(value !== \"\" ? value : null);\n }\n };\n\n /**\n * Handles the unit time value change when it is done through a change on the input.\n * It only reflects on the state if the number of digits is between 0 and 2 *\n * @param event - event\n * @param value - new unit time value\n * @memberof UnitTimePicker\n */\n const handleCurrentValueChange = (event, value) => {\n const unitTime = value === \"\" ? value : Number(value);\n if (unitTime.toString().length <= 2) {\n changeTimeUnit(unitTime);\n }\n };\n\n /**\n * Handles the change on the focus of the input\n * @memberof UnitTimePicker\n */\n const handleFocusChange = () => {\n setIsFocused(true);\n };\n\n const handleOnBlur = () => {\n setIsFocused(false);\n\n onChangeUnitTimeValue(currentValue !== \"\" ? currentValue : null);\n };\n\n const handleKeyPressed = (event) => {\n if (isKeypress(event, KeyboardCodes.Enter)) {\n onChangeUnitTimeValue(currentValue !== \"\" ? currentValue : null);\n }\n };\n\n /**\n * Handles the action to increase the unit time value\n * If the new value surpasses the max allowed, it updates the time to the min value.\n * @memberof UnitTimePicker\n */\n const handleAddTime = () => {\n let newUnitTime = currentValue === \"\" ? minValue : currentValue + 1;\n if (newUnitTime < minValue) {\n newUnitTime = minValue;\n } else if (newUnitTime > maxValue) {\n newUnitTime = minValue;\n }\n changeTimeUnit(newUnitTime, true);\n };\n\n /**\n * Handles the action to decrease the unit time value\n * If the new value goes below the min allowed, it updates the time to the max value.\n * @memberof UnitTimePicker\n */\n const handleSubtractTime = () => {\n let newUnitTime = currentValue === \"\" ? maxValue : currentValue - 1;\n if (newUnitTime < minValue) {\n newUnitTime = maxValue;\n } else if (newUnitTime > maxValue) {\n newUnitTime = maxValue;\n }\n changeTimeUnit(newUnitTime, true);\n };\n\n /**\n * Renderers\n */\n\n /**\n * Renders the time unit value input in the correct format\n * @memberof UnitTimePicker\n */\n const renderTimeUnit = () => {\n return isFocused ? currentValue.toString() : padTime(currentValue).toString();\n };\n\n return (\n <div className={classes.unitTimeContainer}>\n <AddTimeIcon onClick={handleAddTime} />\n <HvInput\n id={id}\n disableClear\n classes={{\n input: classes.unitTimeInput,\n root: classes.inputContainer,\n inputBorderContainer: classes.inputBorderContainer,\n inputRoot: clsx(classes.unitTimeInputRoot),\n }}\n required\n status={isValid ? \"valid\" : \"invalid\"}\n value={currentValue !== \"\" ? renderTimeUnit() : \"\"}\n onChange={handleCurrentValueChange}\n onFocus={handleFocusChange}\n onBlur={handleOnBlur}\n onKeyDown={handleKeyPressed}\n placeholder={placeholder}\n inputProps={{\n autoComplete: \"off\",\n type: \"number\",\n min: TimePickerUnits[unit].min,\n max: TimePickerUnits[unit].max,\n }}\n />\n <SubtractTimeIcon className={classes.subtractIcon} onClick={handleSubtractTime} />\n </div>\n );\n};\n\nUnitTimePicker.propTypes = {\n /**\n * Id to be applied to the input node.\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied to the input/popper\n */\n classes: PropTypes.instanceOf(Object).isRequired,\n /**\n * The placeholder when empty.\n */\n placeholder: PropTypes.string,\n /**\n * Type of Unit time picker (hour, minute or second)\n */\n unit: PropTypes.oneOf([\n TimePickerUnits.HOUR_24.type,\n TimePickerUnits.HOUR_12.type,\n TimePickerUnits.MINUTE.type,\n TimePickerUnits.SECOND.type,\n ]).isRequired,\n /**\n * Default unit time value\n */\n unitValue: PropTypes.number,\n /**\n * Callback function called when the unit time value changes\n */\n onChangeUnitTimeValue: PropTypes.func.isRequired,\n};\n\nexport default UnitTimePicker;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB,CAACC,KAAD,EAAW;EAChC,IAAQC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kB,SAAS,EAAEV,OAAO,CAAC6C,YAArC;IAAmD,OAAO,EAAEZ;EAA5D,EA1BF,CADF;AA8BD,CAnID;;AAqIA,wCAAAnC,cAAc,CAACgD,SAAf,GAA2B;EACzB;AACF;AACA;EACE7C,EAAE,EAAE8C,mBAAUC,MAJW;;EAKzB;AACF;AACA;EACEhD,OAAO,EAAE+C,mBAAUE,UAAV,CAAqBC,MAArB,EAA6BC,UARb;;EASzB;AACF;AACA;EACEjD,WAAW,EAAE6C,mBAAUC,MAZE;;EAazB;AACF;AACA;EACE7C,IAAI,EAAE4C,mBAAUK,KAAV,CAAgB,CACpB7C,uBAAgB8C,OAAhB,CAAwBT,IADJ,EAEpBrC,uBAAgB+C,OAAhB,CAAwBV,IAFJ,EAGpBrC,uBAAgBgD,MAAhB,CAAuBX,IAHH,EAIpBrC,uBAAgBiD,MAAhB,CAAuBZ,IAJH,CAAhB,EAKHO,UArBsB;;EAsBzB;AACF;AACA;EACE/C,SAAS,EAAE2C,mBAAUU,MAzBI;;EA0BzB;AACF;AACA;EACEpD,qBAAqB,EAAE0C,mBAAUW,IAAV,CAAeP;AA7Bb,CAA3B;eAgCerD,c"}
|
|
1
|
+
{"version":3,"file":"UnitTimePicker.js","names":["UnitTimePicker","props","classes","id","placeholder","unit","unitValue","onChangeUnitTimeValue","minValue","TimePickerUnits","min","maxValue","max","useState","currentValue","setCurrentValue","isFocused","setIsFocused","isValid","setIsValid","changeTimeUnit","value","callback","isUnitTimeInValidRange","handleCurrentValueChange","event","unitTime","Number","toString","length","handleFocusChange","handleOnBlur","handleKeyPressed","isKeypress","KeyboardCodes","Enter","handleAddTime","newUnitTime","handleSubtractTime","renderTimeUnit","padTime","unitTimeContainer","input","unitTimeInput","root","inputContainer","inputBorderContainer","inputRoot","clsx","unitTimeInputRoot","autoComplete","type","subtractIcon","propTypes","PropTypes","string","instanceOf","Object","isRequired","oneOf","HOUR_24","HOUR_12","MINUTE","SECOND","number","func"],"sources":["../../../src/TimePicker/UnitTimePicker/UnitTimePicker.js"],"sourcesContent":["import React, { useState } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport {\n DropDownXS as SubtractTimeIcon,\n DropUpXS as AddTimeIcon,\n} from \"@hitachivantara/uikit-react-icons\";\nimport { HvInput, isKeypress, KeyboardCodes } from \"../..\";\nimport { isUnitTimeInValidRange } from \"../timePickerUtils\";\nimport { padTime } from \"../timePickerFormatter\";\nimport { TimePickerUnits } from \"../enums\";\n\nconst UnitTimePicker = (props) => {\n const { classes, id, placeholder, unit, unitValue, onChangeUnitTimeValue } = props;\n\n const minValue = TimePickerUnits[unit].min;\n const maxValue = TimePickerUnits[unit].max;\n\n const [currentValue, setCurrentValue] = useState(unitValue ?? \"\");\n const [isFocused, setIsFocused] = useState(false);\n const [isValid, setIsValid] = useState(true);\n\n /**\n * Changes the time unit value in the state.\n *\n * @param {Number} value - new time unit value\n * @memberof UnitTimePicker\n */\n const changeTimeUnit = (value, callback = false) => {\n setCurrentValue(value);\n setIsValid(isUnitTimeInValidRange(value, unit));\n\n if (callback) {\n onChangeUnitTimeValue(value !== \"\" ? value : null);\n }\n };\n\n /**\n * Handles the unit time value change when it is done through a change on the input.\n * It only reflects on the state if the number of digits is between 0 and 2 *\n * @param event - event\n * @param value - new unit time value\n * @memberof UnitTimePicker\n */\n const handleCurrentValueChange = (event, value) => {\n const unitTime = value === \"\" ? value : Number(value);\n if (unitTime.toString().length <= 2) {\n changeTimeUnit(unitTime);\n }\n };\n\n /**\n * Handles the change on the focus of the input\n * @memberof UnitTimePicker\n */\n const handleFocusChange = () => {\n setIsFocused(true);\n };\n\n const handleOnBlur = () => {\n setIsFocused(false);\n\n onChangeUnitTimeValue(currentValue !== \"\" ? currentValue : null);\n };\n\n const handleKeyPressed = (event) => {\n if (isKeypress(event, KeyboardCodes.Enter)) {\n onChangeUnitTimeValue(currentValue !== \"\" ? currentValue : null);\n }\n };\n\n /**\n * Handles the action to increase the unit time value\n * If the new value surpasses the max allowed, it updates the time to the min value.\n * @memberof UnitTimePicker\n */\n const handleAddTime = () => {\n let newUnitTime = currentValue === \"\" ? minValue : currentValue + 1;\n if (newUnitTime < minValue) {\n newUnitTime = minValue;\n } else if (newUnitTime > maxValue) {\n newUnitTime = minValue;\n }\n changeTimeUnit(newUnitTime, true);\n };\n\n /**\n * Handles the action to decrease the unit time value\n * If the new value goes below the min allowed, it updates the time to the max value.\n * @memberof UnitTimePicker\n */\n const handleSubtractTime = () => {\n let newUnitTime = currentValue === \"\" ? maxValue : currentValue - 1;\n if (newUnitTime < minValue) {\n newUnitTime = maxValue;\n } else if (newUnitTime > maxValue) {\n newUnitTime = maxValue;\n }\n changeTimeUnit(newUnitTime, true);\n };\n\n /**\n * Renderers\n */\n\n /**\n * Renders the time unit value input in the correct format\n * @memberof UnitTimePicker\n */\n const renderTimeUnit = () => {\n return isFocused ? currentValue.toString() : padTime(currentValue).toString();\n };\n\n return (\n <div className={classes.unitTimeContainer}>\n <AddTimeIcon onClick={handleAddTime} />\n <HvInput\n id={id}\n disableClear\n classes={{\n input: classes.unitTimeInput,\n root: classes.inputContainer,\n inputBorderContainer: classes.inputBorderContainer,\n inputRoot: clsx(classes.unitTimeInputRoot),\n }}\n required\n status={isValid ? \"valid\" : \"invalid\"}\n value={currentValue !== \"\" ? renderTimeUnit() : \"\"}\n onChange={handleCurrentValueChange}\n onFocus={handleFocusChange}\n onBlur={handleOnBlur}\n onKeyDown={handleKeyPressed}\n placeholder={placeholder}\n inputProps={{\n autoComplete: \"off\",\n type: \"number\",\n min: TimePickerUnits[unit].min,\n max: TimePickerUnits[unit].max,\n }}\n />\n <SubtractTimeIcon className={classes.subtractIcon} onClick={handleSubtractTime} />\n </div>\n );\n};\n\nUnitTimePicker.propTypes = {\n /**\n * Id to be applied to the input node.\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied to the input/popper\n */\n classes: PropTypes.instanceOf(Object).isRequired,\n /**\n * The placeholder when empty.\n */\n placeholder: PropTypes.string,\n /**\n * Type of Unit time picker (hour, minute or second)\n */\n unit: PropTypes.oneOf([\n TimePickerUnits.HOUR_24.type,\n TimePickerUnits.HOUR_12.type,\n TimePickerUnits.MINUTE.type,\n TimePickerUnits.SECOND.type,\n ]).isRequired,\n /**\n * Default unit time value\n */\n unitValue: PropTypes.number,\n /**\n * Callback function called when the unit time value changes\n */\n onChangeUnitTimeValue: PropTypes.func.isRequired,\n};\n\nexport default UnitTimePicker;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB,CAACC,KAAD,EAAW;EAChC,IAAQC,OAAR,GAA6ED,KAA7E,CAAQC,OAAR;EAAA,IAAiBC,EAAjB,GAA6EF,KAA7E,CAAiBE,EAAjB;EAAA,IAAqBC,WAArB,GAA6EH,KAA7E,CAAqBG,WAArB;EAAA,IAAkCC,IAAlC,GAA6EJ,KAA7E,CAAkCI,IAAlC;EAAA,IAAwCC,SAAxC,GAA6EL,KAA7E,CAAwCK,SAAxC;EAAA,IAAmDC,qBAAnD,GAA6EN,KAA7E,CAAmDM,qBAAnD;EAEA,IAAMC,QAAQ,GAAGC,sBAAA,CAAgBJ,IAAhB,EAAsBK,GAAvC;EACA,IAAMC,QAAQ,GAAGF,sBAAA,CAAgBJ,IAAhB,EAAsBO,GAAvC;;EAEA,gBAAwC,IAAAC,eAAA,EAASP,SAAT,aAASA,SAAT,cAASA,SAAT,GAAsB,EAAtB,CAAxC;EAAA;EAAA,IAAOQ,YAAP;EAAA,IAAqBC,eAArB;;EACA,iBAAkC,IAAAF,eAAA,EAAS,KAAT,CAAlC;EAAA;EAAA,IAAOG,SAAP;EAAA,IAAkBC,YAAlB;;EACA,iBAA8B,IAAAJ,eAAA,EAAS,IAAT,CAA9B;EAAA;EAAA,IAAOK,OAAP;EAAA,IAAgBC,UAAhB;EAEA;AACF;AACA;A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AAEgD,kBAAA,CAAUU,MAzBI;;EA0BzB;AACF;AACA;EACEzD,qBAAqB,EAAE+C,kBAAA,CAAUW,IAAV,CAAeP;AA7Bb,CAA3B;eAgCe1D,c"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["styles","name","UnitTimePicker"],"sources":["../../../src/TimePicker/UnitTimePicker/index.js"],"sourcesContent":["import withStyles from \"@material-ui/core/styles/withStyles\";\nimport styles from \"./styles\";\nimport UnitTimePicker from \"./UnitTimePicker\";\n\nexport default withStyles(styles, { name: \"HvTimePickerUnitTimePicker\" })(UnitTimePicker);\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;eAEe,
|
|
1
|
+
{"version":3,"file":"index.js","names":["withStyles","styles","name","UnitTimePicker"],"sources":["../../../src/TimePicker/UnitTimePicker/index.js"],"sourcesContent":["import withStyles from \"@material-ui/core/styles/withStyles\";\nimport styles from \"./styles\";\nimport UnitTimePicker from \"./UnitTimePicker\";\n\nexport default withStyles(styles, { name: \"HvTimePickerUnitTimePicker\" })(UnitTimePicker);\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;eAEe,IAAAA,mBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAA2DC,uBAA3D,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timePickerConverter.js","names":["getHoursForTimeFormat","hours","timeFormat","TimeFormat","H12","TimePickerUnits","HOUR_12","max","type","HOUR_24","getTimeWithFormat24","time","period","timeIn24Format","PeriodPickerOptions","AM","min","PM"],"sources":["../../src/TimePicker/timePickerConverter.js"],"sourcesContent":["import { isUnitTimeInValidRange } from \"./timePickerUtils\";\nimport { TimeFormat, PeriodPickerOptions, TimePickerUnits } from \"./enums\";\n\n/**\n * Gets hours for the passed time format.\n * e.g. 20hours in 12h format is set to 8\n * @param {Number} hours - current hours\n * @param {String} timeFormat - AM/PM\n *\n * @returns {Number} - hours in the correct format\n */\nconst getHoursForTimeFormat = (hours, timeFormat) => {\n if (timeFormat === TimeFormat.H12) {\n if (hours == null || hours === 0) {\n return TimePickerUnits.HOUR_12.max;\n }\n if (isUnitTimeInValidRange(hours, TimePickerUnits.HOUR_12.type)) {\n return hours;\n }\n if (isUnitTimeInValidRange(hours, TimePickerUnits.HOUR_24.type)) {\n return hours - TimePickerUnits.HOUR_12.max;\n }\n }\n return hours;\n};\n\n/**\n * Gets the time in 24h format\n * e.g. 08:00:00:PM in 12h format is set to 20:00:00\n * @param {Object} time - object with hours, minutes, seconds and period\n * @param {String} timeFormat - AM/PM\n *\n * @returns {Object} - time object (hours, minutes, seconds and period) with the hours set\n * into the correct format\n */\nconst getTimeWithFormat24 = (time, timeFormat) => {\n const { hours, period } = time;\n const timeIn24Format = { ...time };\n if (timeFormat === TimeFormat.H12) {\n if (period === PeriodPickerOptions.AM && hours === TimePickerUnits.HOUR_12.max) {\n timeIn24Format.hours = TimePickerUnits.HOUR_24.min;\n } else if (period === PeriodPickerOptions.PM && hours < TimePickerUnits.HOUR_12.max) {\n timeIn24Format.hours = hours + TimePickerUnits.HOUR_12.max;\n }\n }\n return timeIn24Format;\n};\n\nexport { getHoursForTimeFormat, getTimeWithFormat24 };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACC,KAAD,EAAQC,UAAR,EAAuB;EACnD,IAAIA,UAAU,KAAKC,
|
|
1
|
+
{"version":3,"file":"timePickerConverter.js","names":["getHoursForTimeFormat","hours","timeFormat","TimeFormat","H12","TimePickerUnits","HOUR_12","max","isUnitTimeInValidRange","type","HOUR_24","getTimeWithFormat24","time","period","timeIn24Format","PeriodPickerOptions","AM","min","PM"],"sources":["../../src/TimePicker/timePickerConverter.js"],"sourcesContent":["import { isUnitTimeInValidRange } from \"./timePickerUtils\";\nimport { TimeFormat, PeriodPickerOptions, TimePickerUnits } from \"./enums\";\n\n/**\n * Gets hours for the passed time format.\n * e.g. 20hours in 12h format is set to 8\n * @param {Number} hours - current hours\n * @param {String} timeFormat - AM/PM\n *\n * @returns {Number} - hours in the correct format\n */\nconst getHoursForTimeFormat = (hours, timeFormat) => {\n if (timeFormat === TimeFormat.H12) {\n if (hours == null || hours === 0) {\n return TimePickerUnits.HOUR_12.max;\n }\n if (isUnitTimeInValidRange(hours, TimePickerUnits.HOUR_12.type)) {\n return hours;\n }\n if (isUnitTimeInValidRange(hours, TimePickerUnits.HOUR_24.type)) {\n return hours - TimePickerUnits.HOUR_12.max;\n }\n }\n return hours;\n};\n\n/**\n * Gets the time in 24h format\n * e.g. 08:00:00:PM in 12h format is set to 20:00:00\n * @param {Object} time - object with hours, minutes, seconds and period\n * @param {String} timeFormat - AM/PM\n *\n * @returns {Object} - time object (hours, minutes, seconds and period) with the hours set\n * into the correct format\n */\nconst getTimeWithFormat24 = (time, timeFormat) => {\n const { hours, period } = time;\n const timeIn24Format = { ...time };\n if (timeFormat === TimeFormat.H12) {\n if (period === PeriodPickerOptions.AM && hours === TimePickerUnits.HOUR_12.max) {\n timeIn24Format.hours = TimePickerUnits.HOUR_24.min;\n } else if (period === PeriodPickerOptions.PM && hours < TimePickerUnits.HOUR_12.max) {\n timeIn24Format.hours = hours + TimePickerUnits.HOUR_12.max;\n }\n }\n return timeIn24Format;\n};\n\nexport { getHoursForTimeFormat, getTimeWithFormat24 };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACC,KAAD,EAAQC,UAAR,EAAuB;EACnD,IAAIA,UAAU,KAAKC,iBAAA,CAAWC,GAA9B,EAAmC;IACjC,IAAIH,KAAK,IAAI,IAAT,IAAiBA,KAAK,KAAK,CAA/B,EAAkC;MAChC,OAAOI,sB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locale","options","hour","dateTimeFormat","Intl","DateTimeFormat","isInHour12Format","resolvedOptions","hour12","TimeFormat","H12","H24","getFormattedTime","time","timeFormat","hours","minutes","seconds","period","p","PeriodPickerOptions","PM","AM"],"sources":["../../src/TimePicker/timePickerFormatter.js"],"sourcesContent":["import { TimeFormat, PeriodPickerOptions } from \"./enums\";\nimport { getHoursForTimeFormat } from \"./timePickerConverter\";\n\n/**\n * Pads the unit time values so that they always have two digits\n * @param {Number} value - unit time value\n * @returns The unit time value with two digits\n */\nconst padTime = (value) => {\n if (value == null || value === \"\" || value < 0) {\n return value?.toString();\n }\n if (value < 10 && value.toString().length === 1) {\n return `0${value.toString()}`;\n }\n return value.toString();\n};\n\n/**\n * Gets the time format for a given locale\n * @param {String} locale - locale\n * @returns {TimeFormat} the time format for the given locale (12 or 24)\n */\nconst getTimeFormatForLocale = (locale) => {\n const options = {\n hour: \"numeric\",\n };\n const dateTimeFormat = new Intl.DateTimeFormat(locale, options);\n const isInHour12Format = dateTimeFormat.resolvedOptions().hour12;\n return isInHour12Format ? TimeFormat.H12 : TimeFormat.H24;\n};\n\n/**\n * Formats the time to be rendered\n * @param {Object} time - time object to be rendered\n * @param {Number} time.hours - hours\n * @param {Number} time.minutes - minutes\n * @param {Number} time.seconds - seconds\n * @param {String} time.period - period (am/pm). It is undefined when the time is to be shown in 24h format\n *\n * @returns {String} formatted time\n */\nconst getFormattedTime = (time, timeFormat) => {\n const { hours, minutes, seconds, period } = time;\n\n const isInHour12Format = timeFormat === TimeFormat.H12 || (timeFormat == null && period != null);\n\n if (isInHour12Format) {\n const p = period ?? (hours > 12 ? PeriodPickerOptions.PM : PeriodPickerOptions.AM);\n return `${padTime(getHoursForTimeFormat(hours, TimeFormat.H12))}:${padTime(minutes)}:${padTime(\n seconds\n )} ${p}`;\n }\n\n return `${padTime(hours)}:${padTime(minutes)}:${padTime(seconds)}`;\n};\n\nexport { padTime, getFormattedTime, getTimeFormatForLocale };\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAMA,OAAO,GAAG,SAAVA,OAAU,CAACC,KAAD,EAAW;EACzB,IAAIA,KAAK,IAAI,IAAT,IAAiBA,KAAK,KAAK,EAA3B,IAAiCA,KAAK,GAAG,CAA7C,EAAgD;IAC9C,OAAOA,KAAP,aAAOA,KAAP,uBAAOA,KAAK,CAAEC,QAAP,EAAP;EACD;;EACD,IAAID,KAAK,GAAG,EAAR,IAAcA,KAAK,CAACC,QAAN,GAAiBC,MAAjB,KAA4B,CAA9C,EAAiD;IAC/C,kBAAWF,KAAK,CAACC,QAAN,EAAX;EACD;;EACD,OAAOD,KAAK,CAACC,QAAN,EAAP;AACD,CARD;AAUA;AACA;AACA;AACA;AACA;;;;;AACA,IAAME,sBAAsB,GAAG,SAAzBA,sBAAyB,CAACC,MAAD,EAAY;EACzC,IAAMC,OAAO,GAAG;IACdC,IAAI,EAAE;EADQ,CAAhB;EAGA,IAAMC,cAAc,GAAG,IAAIC,IAAI,CAACC,cAAT,CAAwBL,MAAxB,EAAgCC,OAAhC,CAAvB;EACA,IAAMK,gBAAgB,GAAGH,cAAc,CAACI,eAAf,GAAiCC,MAA1D;EACA,OAAOF,gBAAgB,GAAGG,
|
|
1
|
+
{"version":3,"file":"timePickerFormatter.js","names":["padTime","value","toString","length","getTimeFormatForLocale","locale","options","hour","dateTimeFormat","Intl","DateTimeFormat","isInHour12Format","resolvedOptions","hour12","TimeFormat","H12","H24","getFormattedTime","time","timeFormat","hours","minutes","seconds","period","p","PeriodPickerOptions","PM","AM","getHoursForTimeFormat"],"sources":["../../src/TimePicker/timePickerFormatter.js"],"sourcesContent":["import { TimeFormat, PeriodPickerOptions } from \"./enums\";\nimport { getHoursForTimeFormat } from \"./timePickerConverter\";\n\n/**\n * Pads the unit time values so that they always have two digits\n * @param {Number} value - unit time value\n * @returns The unit time value with two digits\n */\nconst padTime = (value) => {\n if (value == null || value === \"\" || value < 0) {\n return value?.toString();\n }\n if (value < 10 && value.toString().length === 1) {\n return `0${value.toString()}`;\n }\n return value.toString();\n};\n\n/**\n * Gets the time format for a given locale\n * @param {String} locale - locale\n * @returns {TimeFormat} the time format for the given locale (12 or 24)\n */\nconst getTimeFormatForLocale = (locale) => {\n const options = {\n hour: \"numeric\",\n };\n const dateTimeFormat = new Intl.DateTimeFormat(locale, options);\n const isInHour12Format = dateTimeFormat.resolvedOptions().hour12;\n return isInHour12Format ? TimeFormat.H12 : TimeFormat.H24;\n};\n\n/**\n * Formats the time to be rendered\n * @param {Object} time - time object to be rendered\n * @param {Number} time.hours - hours\n * @param {Number} time.minutes - minutes\n * @param {Number} time.seconds - seconds\n * @param {String} time.period - period (am/pm). It is undefined when the time is to be shown in 24h format\n *\n * @returns {String} formatted time\n */\nconst getFormattedTime = (time, timeFormat) => {\n const { hours, minutes, seconds, period } = time;\n\n const isInHour12Format = timeFormat === TimeFormat.H12 || (timeFormat == null && period != null);\n\n if (isInHour12Format) {\n const p = period ?? (hours > 12 ? PeriodPickerOptions.PM : PeriodPickerOptions.AM);\n return `${padTime(getHoursForTimeFormat(hours, TimeFormat.H12))}:${padTime(minutes)}:${padTime(\n seconds\n )} ${p}`;\n }\n\n return `${padTime(hours)}:${padTime(minutes)}:${padTime(seconds)}`;\n};\n\nexport { padTime, getFormattedTime, getTimeFormatForLocale };\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAMA,OAAO,GAAG,SAAVA,OAAU,CAACC,KAAD,EAAW;EACzB,IAAIA,KAAK,IAAI,IAAT,IAAiBA,KAAK,KAAK,EAA3B,IAAiCA,KAAK,GAAG,CAA7C,EAAgD;IAC9C,OAAOA,KAAP,aAAOA,KAAP,uBAAOA,KAAK,CAAEC,QAAP,EAAP;EACD;;EACD,IAAID,KAAK,GAAG,EAAR,IAAcA,KAAK,CAACC,QAAN,GAAiBC,MAAjB,KAA4B,CAA9C,EAAiD;IAC/C,kBAAWF,KAAK,CAACC,Q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AC5FsB,OAD4F,CAA9F,cAEKE,CAFL;EAGD;;EAED,iBAAUxB,OAAO,CAACoB,KAAD,CAAjB,cAA4BpB,OAAO,CAACqB,OAAD,CAAnC,cAAgDrB,OAAO,CAACsB,OAAD,CAAvD;AACD,CAbD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timePickerUtils.js","names":["getPeriodForDate","date","Date","hours","getHours","PeriodPickerOptions","AM","PM","isUnitTimeInValidRange","value","type","timeUnit","TimePickerUnits","min","max"],"sources":["../../src/TimePicker/timePickerUtils.js"],"sourcesContent":["import { PeriodPickerOptions, TimePickerUnits } from \"./enums\";\n\n/**\n * Gets the period(am/pm) for a given time\n * @param {Date} date - Date to get the period from. The default date is the current one.\n * @returns {String} - AM or PM\n */\nconst getPeriodForDate = (date = new Date()) => {\n const hours = date.getHours();\n return hours < 12 ? PeriodPickerOptions.AM : PeriodPickerOptions.PM;\n};\n\n/**\n * Checks if the unit time value is inside the acceptable range\n *\n * @param {Number} value - unit time value\n * @param {String} type - unit time type. One of the TimePickerUnits types.\n */\nconst isUnitTimeInValidRange = (value, type) => {\n const timeUnit = TimePickerUnits[type];\n return value !== \"\" && value >= timeUnit.min && value <= timeUnit.max;\n};\n\nexport { getPeriodForDate, isUnitTimeInValidRange };\n"],"mappings":";;;;;;;AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAmB,GAAuB;EAAA,IAAtBC,IAAsB,uEAAf,IAAIC,IAAJ,EAAe;EAC9C,IAAMC,KAAK,GAAGF,IAAI,CAACG,QAAL,EAAd;EACA,OAAOD,KAAK,GAAG,EAAR,GAAaE,
|
|
1
|
+
{"version":3,"file":"timePickerUtils.js","names":["getPeriodForDate","date","Date","hours","getHours","PeriodPickerOptions","AM","PM","isUnitTimeInValidRange","value","type","timeUnit","TimePickerUnits","min","max"],"sources":["../../src/TimePicker/timePickerUtils.js"],"sourcesContent":["import { PeriodPickerOptions, TimePickerUnits } from \"./enums\";\n\n/**\n * Gets the period(am/pm) for a given time\n * @param {Date} date - Date to get the period from. The default date is the current one.\n * @returns {String} - AM or PM\n */\nconst getPeriodForDate = (date = new Date()) => {\n const hours = date.getHours();\n return hours < 12 ? PeriodPickerOptions.AM : PeriodPickerOptions.PM;\n};\n\n/**\n * Checks if the unit time value is inside the acceptable range\n *\n * @param {Number} value - unit time value\n * @param {String} type - unit time type. One of the TimePickerUnits types.\n */\nconst isUnitTimeInValidRange = (value, type) => {\n const timeUnit = TimePickerUnits[type];\n return value !== \"\" && value >= timeUnit.min && value <= timeUnit.max;\n};\n\nexport { getPeriodForDate, isUnitTimeInValidRange };\n"],"mappings":";;;;;;;AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAmB,GAAuB;EAAA,IAAtBC,IAAsB,uEAAf,IAAIC,IAAJ,EAAe;EAC9C,IAAMC,KAAK,GAAGF,IAAI,CAACG,QAAL,EAAd;EACA,OAAOD,KAAK,GAAG,EAAR,GAAaE,0BAAA,CAAoBC,EAAjC,GAAsCD,0BAAA,CAAoBE,EAAjE;AACD,CAHD;AAKA;AACA;AACA;AACA;AACA;AACA;;;;;AACA,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAyB,CAACC,KAAD,EAAQC,IAAR,EAAiB;EAC9C,IAAMC,QAAQ,GAAGC,sBAAA,CAAgBF,IAAhB,CAAjB;EACA,OAAOD,KAAK,KAAK,EAAV,IAAgBA,KAAK,IAAIE,QAAQ,CAACE,GAAlC,IAAyCJ,KAAK,IAAIE,QAAQ,CAACG,GAAlE;AACD,CAHD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleButton.js","names":["ToggleButton","React","forwardRef","props","ref","defaultSelected","selected","notSelectedIcon","selectedIcon","onClick","children","others","Boolean","isSelected","setIsSelected","onClickHandler","e","propTypes","PropTypes","bool","node","func","styles","name"],"sources":["../../src/ToggleButton/ToggleButton.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\n\nimport { HvButton } from \"..\";\nimport { useControlled } from \"../utils\";\n\nimport styles from \"./styles\";\n\n/**\n * A two-state button that can be either off (not pressed) or on (pressed).\n * Wraps the Button component, but adds the aria-pressed attribute.\n *\n * Use when two instances are opposite and the on/off analogy doesn’t apply (Ex: Locked / Unlocked).\n * Only well known icons should be used, otherwise use a single checkbox for the same situation.\n */\n\nconst ToggleButton = React.forwardRef((props, ref) => {\n const {\n defaultSelected,\n selected,\n notSelectedIcon,\n selectedIcon = null,\n onClick,\n children,\n ...others\n } = props;\n const [isSelected, setIsSelected] = useControlled(selected, Boolean(defaultSelected));\n\n const onClickHandler = (e) => {\n setIsSelected(!isSelected);\n onClick?.(e, !isSelected);\n };\n\n return (\n <HvButton ref={ref} icon aria-pressed={isSelected} onClick={onClickHandler} {...others}>\n {children || (!isSelected ? notSelectedIcon : selectedIcon)}\n </HvButton>\n );\n});\n\nToggleButton.propTypes = {\n /**\n * When uncontrolled, defines the initial selected state.\n */\n defaultSelected: PropTypes.bool,\n /**\n * Defines if the button is selected.\n * When defined the button state becomes controlled.\n */\n selected: PropTypes.bool,\n /**\n * Icon for when not selected. Ignored if the component has children.\n */\n notSelectedIcon: PropTypes.node,\n /**\n * Icon for when selected. Ignored if the component has children.\n */\n selectedIcon: PropTypes.node,\n /**\n * Function called when icon is clicked.\n */\n onClick: PropTypes.func,\n /**\n * The content of the button.\n * When provided, it is its own responsibility to react to the selected state.\n */\n children: PropTypes.node,\n};\n\nexport default withStyles(styles, { name: \"HvToggleButton\" })(ToggleButton);\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AAEA;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,IAAMA,YAAY,gBAAGC,
|
|
1
|
+
{"version":3,"file":"ToggleButton.js","names":["ToggleButton","React","forwardRef","props","ref","defaultSelected","selected","notSelectedIcon","selectedIcon","onClick","children","others","useControlled","Boolean","isSelected","setIsSelected","onClickHandler","e","propTypes","PropTypes","bool","node","func","withStyles","styles","name"],"sources":["../../src/ToggleButton/ToggleButton.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\n\nimport { HvButton } from \"..\";\nimport { useControlled } from \"../utils\";\n\nimport styles from \"./styles\";\n\n/**\n * A two-state button that can be either off (not pressed) or on (pressed).\n * Wraps the Button component, but adds the aria-pressed attribute.\n *\n * Use when two instances are opposite and the on/off analogy doesn’t apply (Ex: Locked / Unlocked).\n * Only well known icons should be used, otherwise use a single checkbox for the same situation.\n */\n\nconst ToggleButton = React.forwardRef((props, ref) => {\n const {\n defaultSelected,\n selected,\n notSelectedIcon,\n selectedIcon = null,\n onClick,\n children,\n ...others\n } = props;\n const [isSelected, setIsSelected] = useControlled(selected, Boolean(defaultSelected));\n\n const onClickHandler = (e) => {\n setIsSelected(!isSelected);\n onClick?.(e, !isSelected);\n };\n\n return (\n <HvButton ref={ref} icon aria-pressed={isSelected} onClick={onClickHandler} {...others}>\n {children || (!isSelected ? notSelectedIcon : selectedIcon)}\n </HvButton>\n );\n});\n\nToggleButton.propTypes = {\n /**\n * When uncontrolled, defines the initial selected state.\n */\n defaultSelected: PropTypes.bool,\n /**\n * Defines if the button is selected.\n * When defined the button state becomes controlled.\n */\n selected: PropTypes.bool,\n /**\n * Icon for when not selected. Ignored if the component has children.\n */\n notSelectedIcon: PropTypes.node,\n /**\n * Icon for when selected. Ignored if the component has children.\n */\n selectedIcon: PropTypes.node,\n /**\n * Function called when icon is clicked.\n */\n onClick: PropTypes.func,\n /**\n * The content of the button.\n * When provided, it is its own responsibility to react to the selected state.\n */\n children: PropTypes.node,\n};\n\nexport default withStyles(styles, { name: \"HvToggleButton\" })(ToggleButton);\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AAEA;;;;AAEA;AACA;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b,YAAY,EAAEW,kBAAA,CAAUE,IAjBD;;EAkBvB;AACF;AACA;EACEZ,OAAO,EAAEU,kBAAA,CAAUG,IArBI;;EAsBvB;AACF;AACA;AACA;EACEZ,QAAQ,EAAES,kBAAA,CAAUE;AA1BG,CAAzB;;eA6Be,IAAAE,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAA+CzB,YAA/C,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","names":["HvTooltip","React","forwardRef","props","ref","className","classes","open","enterDelay","placement","useSingle","children","title","TransitionComponent","Fade","TransitionProps","timeout","others","undefined","tooltip","tooltipMulti","popper","propTypes","PropTypes","string","shape","root","valuesContainer","values","color","separatorColor","separator","valueWrapper","isRequired","bool","oneOf","number","node","any","object","styles","name"],"sources":["../../src/Tooltip/Tooltip.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Fade, Tooltip, withStyles } from \"@material-ui/core\";\nimport styles from \"./styles\";\n\n/**\n * Tooltips display informative text when users hover over, focus on, or tap an element.\n */\n\nconst HvTooltip = React.forwardRef((props, ref) => {\n const {\n className,\n classes,\n open,\n enterDelay = 300,\n placement = \"top\",\n useSingle = true,\n children,\n title,\n TransitionComponent = Fade,\n TransitionProps = { timeout: 400 },\n ...others\n } = props;\n\n return (\n <Tooltip\n ref={ref}\n open={open ?? undefined}\n enterDelay={enterDelay}\n placement={placement}\n TransitionComponent={TransitionComponent}\n TransitionProps={TransitionProps}\n className={className}\n classes={{\n tooltip: useSingle ? classes.tooltip : classes.tooltipMulti,\n popper: classes.popper,\n }}\n title={title}\n {...others}\n >\n {children}\n </Tooltip>\n );\n});\n\nHvTooltip.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 tooltip root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the tooltip class when it is single\n * */\n tooltip: PropTypes.string,\n /**\n * Styles applied to the tooltip class when it is multi\n * */\n tooltipMulti: PropTypes.string,\n /**\n * Styles applied to the popper component\n * */\n popper: PropTypes.string,\n /**\n * Styles applied to the title.\n */\n title: PropTypes.string,\n /**\n * Styles applied to the values container.\n */\n valuesContainer: PropTypes.string,\n /**\n * Styles applied to the values.\n */\n values: PropTypes.string,\n /**\n * Styles applied to the color.\n */\n color: PropTypes.string,\n /**\n * Styles applied to the separator between color and title.\n */\n separatorColor: PropTypes.string,\n /**\n * Styles applied to the separator.\n */\n separator: PropTypes.string,\n /**\n * Styles applied to the values wrapper.\n */\n valueWrapper: PropTypes.string,\n }).isRequired,\n /**\n * If true, the tooltip is shown.\n */\n open: PropTypes.bool,\n /**\n * Tooltip placement.\n */\n placement: PropTypes.oneOf([\n \"bottom-end\",\n \"bottom-start\",\n \"bottom\",\n \"left-end\",\n \"left-start\",\n \"left\",\n \"right-end\",\n \"right-start\",\n \"right\",\n \"top-end\",\n \"top-start\",\n \"top\",\n ]),\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This property won't impact the enter touch delay (enterTouchDelay).\n */\n enterDelay: PropTypes.number,\n /**\n * Tooltip title. Zero-length titles string are never displayed.\n */\n title: PropTypes.node.isRequired,\n /**\n * The component used for the transition\n */\n // eslint-disable-next-line react/forbid-prop-types\n TransitionComponent: PropTypes.any,\n /**\n * Properties applied to the Transition element.\n */\n // eslint-disable-next-line react/forbid-prop-types\n TransitionProps: PropTypes.object,\n /**\n * Defines if should use a single or multiline tooltip.\n */\n useSingle: PropTypes.bool,\n /**\n * Node to apply the tooltip.\n */\n children: PropTypes.node.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTooltip\" })(HvTooltip);\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;AAEA;AACA;AACA;AAEA,IAAMA,SAAS,gBAAGC,
|
|
1
|
+
{"version":3,"file":"Tooltip.js","names":["HvTooltip","React","forwardRef","props","ref","className","classes","open","enterDelay","placement","useSingle","children","title","TransitionComponent","Fade","TransitionProps","timeout","others","undefined","tooltip","tooltipMulti","popper","propTypes","PropTypes","string","shape","root","valuesContainer","values","color","separatorColor","separator","valueWrapper","isRequired","bool","oneOf","number","node","any","object","withStyles","styles","name"],"sources":["../../src/Tooltip/Tooltip.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Fade, Tooltip, withStyles } from \"@material-ui/core\";\nimport styles from \"./styles\";\n\n/**\n * Tooltips display informative text when users hover over, focus on, or tap an element.\n */\n\nconst HvTooltip = React.forwardRef((props, ref) => {\n const {\n className,\n classes,\n open,\n enterDelay = 300,\n placement = \"top\",\n useSingle = true,\n children,\n title,\n TransitionComponent = Fade,\n TransitionProps = { timeout: 400 },\n ...others\n } = props;\n\n return (\n <Tooltip\n ref={ref}\n open={open ?? undefined}\n enterDelay={enterDelay}\n placement={placement}\n TransitionComponent={TransitionComponent}\n TransitionProps={TransitionProps}\n className={className}\n classes={{\n tooltip: useSingle ? classes.tooltip : classes.tooltipMulti,\n popper: classes.popper,\n }}\n title={title}\n {...others}\n >\n {children}\n </Tooltip>\n );\n});\n\nHvTooltip.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 tooltip root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the tooltip class when it is single\n * */\n tooltip: PropTypes.string,\n /**\n * Styles applied to the tooltip class when it is multi\n * */\n tooltipMulti: PropTypes.string,\n /**\n * Styles applied to the popper component\n * */\n popper: PropTypes.string,\n /**\n * Styles applied to the title.\n */\n title: PropTypes.string,\n /**\n * Styles applied to the values container.\n */\n valuesContainer: PropTypes.string,\n /**\n * Styles applied to the values.\n */\n values: PropTypes.string,\n /**\n * Styles applied to the color.\n */\n color: PropTypes.string,\n /**\n * Styles applied to the separator between color and title.\n */\n separatorColor: PropTypes.string,\n /**\n * Styles applied to the separator.\n */\n separator: PropTypes.string,\n /**\n * Styles applied to the values wrapper.\n */\n valueWrapper: PropTypes.string,\n }).isRequired,\n /**\n * If true, the tooltip is shown.\n */\n open: PropTypes.bool,\n /**\n * Tooltip placement.\n */\n placement: PropTypes.oneOf([\n \"bottom-end\",\n \"bottom-start\",\n \"bottom\",\n \"left-end\",\n \"left-start\",\n \"left\",\n \"right-end\",\n \"right-start\",\n \"right\",\n \"top-end\",\n \"top-start\",\n \"top\",\n ]),\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This property won't impact the enter touch delay (enterTouchDelay).\n */\n enterDelay: PropTypes.number,\n /**\n * Tooltip title. Zero-length titles string are never displayed.\n */\n title: PropTypes.node.isRequired,\n /**\n * The component used for the transition\n */\n // eslint-disable-next-line react/forbid-prop-types\n TransitionComponent: PropTypes.any,\n /**\n * Properties applied to the Transition element.\n */\n // eslint-disable-next-line react/forbid-prop-types\n TransitionProps: PropTypes.object,\n /**\n * Defines if should use a single or multiline tooltip.\n */\n useSingle: PropTypes.bool,\n /**\n * Node to apply the tooltip.\n */\n children: PropTypes.node.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTooltip\" })(HvTooltip);\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;AAEA;AACA;AACA;AAEA,IAAMA,SAAS,gBAAGC,cAAA,CAAMC,UAAN,CAAiB,UAACC,KAAD,EAAQC,GAAR,EAAgB;EACjD,IACEC,SADF,GAYIF,KAZJ,CACEE,SADF;EAAA,IAEEC,OAFF,GAYIH,KAZJ,CAEEG,OAFF;EAAA,IAGEC,IAHF,GAYIJ,KAZJ,CAGEI,IAHF;EAAA,wBAYIJ,KAZJ,CAIEK,UAJF;EAAA,IAIEA,UAJF,kCAIe,GAJf;EAAA,uBAYIL,KAZJ,CAKEM,SALF;EAAA,IAKEA,SALF,iCAKc,KALd;EAAA,uBAYIN,KAZJ,CAMEO,SANF;EAAA,IAMEA,SANF,i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|
-
{"version":3,"file":"Typography.js","names":["defaultVariantMapping","xxlTitle","xlTitle","lTitle","mTitle","sTitle","xsTitle","xxsTitle","sectionTitle","highlightText","normalText","placeholderText","link","disabledText","selectedNavText","vizText","vizTextDisabled","xsInlineLink","HvTypography","React","forwardRef","props","ref","id","variant","classes","paragraph","className","component","children","noWrap","others","Component","root","propTypes","PropTypes","node","isRequired","shape","string","elementType","bool","oneOf","styles","name"],"sources":["../../src/Typography/Typography.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 defaultVariantMapping = {\n \"5xlTitle\": \"h1\",\n \"4xlTitle\": \"h1\",\n \"3xlTitle\": \"h1\",\n xxlTitle: \"h1\",\n xlTitle: \"h1\",\n lTitle: \"h2\",\n mTitle: \"h3\",\n sTitle: \"h4\",\n xsTitle: \"h5\",\n xxsTitle: \"h6\",\n sectionTitle: \"p\",\n highlightText: \"p\",\n normalText: \"p\",\n placeholderText: \"p\",\n link: \"p\",\n disabledText: \"p\",\n selectedNavText: \"p\",\n vizText: \"p\",\n vizTextDisabled: \"p\",\n xsInlineLink: \"p\",\n};\n\nconst HvTypography = React.forwardRef((props, ref) => {\n const {\n id,\n variant = \"normalText\",\n classes,\n paragraph = false,\n className,\n component,\n children,\n noWrap = false,\n ...others\n } = props;\n const Component = component || (paragraph ? \"p\" : defaultVariantMapping[variant]) || \"span\";\n\n return (\n <Component\n id={id}\n ref={ref}\n className={clsx(className, classes.root, classes[variant], {\n [classes.noWrap]: noWrap,\n })}\n {...others}\n >\n {children}\n </Component>\n );\n});\n\nHvTypography.propTypes = {\n /**\n * The text to be set.\n */\n children: PropTypes.node.isRequired,\n /**\n * Override or extend the styles applied to the component.\n * See CSS API tab for more details.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root element\n */\n root: PropTypes.string,\n /**\n * Styles applied to the 5xlTitle variant\n */\n \"5xlTitle\": PropTypes.string,\n /**\n * Styles applied to the 4xlTitle variant\n */\n \"4xlTitle\": PropTypes.string,\n /**\n * Styles applied to the 3xlTitle variant.\n */\n \"3xlTitle\": PropTypes.string,\n /**\n * Styles applied to the xxlTitle variant\n */\n xxlTitle: PropTypes.string,\n /**\n * Styles applied to the xlTitle variant\n */\n xlTitle: PropTypes.string,\n /**\n * Styles applied to the lTitle variant\n */\n lTitle: PropTypes.string,\n /**\n * Styles applied to the mTitle variant\n */\n mTitle: PropTypes.string,\n /**\n * Styles applied to the sTitle variant\n */\n sTitle: PropTypes.string,\n /**\n * Styles applied to the xsTitle variant\n */\n xsTitle: PropTypes.string,\n /**\n * Styles applied to the xxsTitle variant\n */\n xxsTitle: PropTypes.string,\n /**\n * Styles applied to the highlightText variant\n */\n highlightText: PropTypes.string,\n /**\n * Styles applied to the normalText variant\n */\n normalText: PropTypes.string,\n /**\n * Styles applied to the placeholderText variant\n */\n placeholderText: PropTypes.string,\n /**\n * Styles applied to the link variant\n */\n link: PropTypes.string,\n /**\n * Styles applied to the disabledText variant\n */\n disabledText: PropTypes.string,\n /**\n * Styles applied to the selectedNavText variant\n */\n selectedNavText: PropTypes.string,\n /**\n * Styles applied to the vizText variant\n */\n vizText: PropTypes.string,\n /**\n * Styles applied to the vizTextDisabled variant\n */\n vizTextDisabled: PropTypes.string,\n /**\n * Styles applied to the xsInlineLink variant\n */\n xsInlineLink: PropTypes.string,\n /**\n * Styles applied to the root root element if noWrap is used\n */\n noWrap: PropTypes.string,\n }),\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 * By default, it maps the variant to a good default headline component.\n */\n component: PropTypes.elementType,\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * If `true`, the text will have a bottom margin.\n */\n paragraph: PropTypes.bool,\n /**\n * The selected typography.\n */\n variant: PropTypes.oneOf([\n \"5xlTitle\",\n \"4xlTitle\",\n \"3xlTitle\",\n \"xxlTitle\",\n \"xlTitle\",\n \"lTitle\",\n \"mTitle\",\n \"sTitle\",\n \"xsTitle\",\n \"xxsTitle\",\n \"sectionTitle\",\n \"highlightText\",\n \"normalText\",\n \"placeholderText\",\n \"link\",\n \"disabledText\",\n \"selectedNavText\",\n \"vizText\",\n \"vizTextDisabled\",\n \"xsInlineLink\",\n ]),\n /**\n * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.\n *\n * Note that text overflow can only happen with block or inline-block level elements\n * (the element needs to have a width in order to overflow).\n */\n noWrap: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvTypography\" })(HvTypography);\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;AAEA,IAAMA,qBAAqB,GAAG;EAC5B,YAAY,IADgB;EAE5B,YAAY,IAFgB;EAG5B,YAAY,IAHgB;EAI5BC,QAAQ,EAAE,IAJkB;EAK5BC,OAAO,EAAE,IALmB;EAM5BC,MAAM,EAAE,IANoB;EAO5BC,MAAM,EAAE,IAPoB;EAQ5BC,MAAM,EAAE,IARoB;EAS5BC,OAAO,EAAE,IATmB;EAU5BC,QAAQ,EAAE,IAVkB;EAW5BC,YAAY,EAAE,GAXc;EAY5BC,aAAa,EAAE,GAZa;EAa5BC,UAAU,EAAE,GAbgB;EAc5BC,eAAe,EAAE,GAdW;EAe5BC,IAAI,EAAE,GAfsB;EAgB5BC,YAAY,EAAE,GAhBc;EAiB5BC,eAAe,EAAE,GAjBW;EAkB5BC,OAAO,EAAE,GAlBmB;EAmB5BC,eAAe,EAAE,GAnBW;EAoB5BC,YAAY,EAAE;AApBc,CAA9B;;AAuBA,IAAMC,YAAY,gBAAGC,
|
|
1
|
+
{"version":3,"file":"Typography.js","names":["defaultVariantMapping","xxlTitle","xlTitle","lTitle","mTitle","sTitle","xsTitle","xxsTitle","sectionTitle","highlightText","normalText","placeholderText","link","disabledText","selectedNavText","vizText","vizTextDisabled","xsInlineLink","HvTypography","React","forwardRef","props","ref","id","variant","classes","paragraph","className","component","children","noWrap","others","Component","clsx","root","propTypes","PropTypes","node","isRequired","shape","string","elementType","bool","oneOf","withStyles","styles","name"],"sources":["../../src/Typography/Typography.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 defaultVariantMapping = {\n \"5xlTitle\": \"h1\",\n \"4xlTitle\": \"h1\",\n \"3xlTitle\": \"h1\",\n xxlTitle: \"h1\",\n xlTitle: \"h1\",\n lTitle: \"h2\",\n mTitle: \"h3\",\n sTitle: \"h4\",\n xsTitle: \"h5\",\n xxsTitle: \"h6\",\n sectionTitle: \"p\",\n highlightText: \"p\",\n normalText: \"p\",\n placeholderText: \"p\",\n link: \"p\",\n disabledText: \"p\",\n selectedNavText: \"p\",\n vizText: \"p\",\n vizTextDisabled: \"p\",\n xsInlineLink: \"p\",\n};\n\nconst HvTypography = React.forwardRef((props, ref) => {\n const {\n id,\n variant = \"normalText\",\n classes,\n paragraph = false,\n className,\n component,\n children,\n noWrap = false,\n ...others\n } = props;\n const Component = component || (paragraph ? \"p\" : defaultVariantMapping[variant]) || \"span\";\n\n return (\n <Component\n id={id}\n ref={ref}\n className={clsx(className, classes.root, classes[variant], {\n [classes.noWrap]: noWrap,\n })}\n {...others}\n >\n {children}\n </Component>\n );\n});\n\nHvTypography.propTypes = {\n /**\n * The text to be set.\n */\n children: PropTypes.node.isRequired,\n /**\n * Override or extend the styles applied to the component.\n * See CSS API tab for more details.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root element\n */\n root: PropTypes.string,\n /**\n * Styles applied to the 5xlTitle variant\n */\n \"5xlTitle\": PropTypes.string,\n /**\n * Styles applied to the 4xlTitle variant\n */\n \"4xlTitle\": PropTypes.string,\n /**\n * Styles applied to the 3xlTitle variant.\n */\n \"3xlTitle\": PropTypes.string,\n /**\n * Styles applied to the xxlTitle variant\n */\n xxlTitle: PropTypes.string,\n /**\n * Styles applied to the xlTitle variant\n */\n xlTitle: PropTypes.string,\n /**\n * Styles applied to the lTitle variant\n */\n lTitle: PropTypes.string,\n /**\n * Styles applied to the mTitle variant\n */\n mTitle: PropTypes.string,\n /**\n * Styles applied to the sTitle variant\n */\n sTitle: PropTypes.string,\n /**\n * Styles applied to the xsTitle variant\n */\n xsTitle: PropTypes.string,\n /**\n * Styles applied to the xxsTitle variant\n */\n xxsTitle: PropTypes.string,\n /**\n * Styles applied to the highlightText variant\n */\n highlightText: PropTypes.string,\n /**\n * Styles applied to the normalText variant\n */\n normalText: PropTypes.string,\n /**\n * Styles applied to the placeholderText variant\n */\n placeholderText: PropTypes.string,\n /**\n * Styles applied to the link variant\n */\n link: PropTypes.string,\n /**\n * Styles applied to the disabledText variant\n */\n disabledText: PropTypes.string,\n /**\n * Styles applied to the selectedNavText variant\n */\n selectedNavText: PropTypes.string,\n /**\n * Styles applied to the vizText variant\n */\n vizText: PropTypes.string,\n /**\n * Styles applied to the vizTextDisabled variant\n */\n vizTextDisabled: PropTypes.string,\n /**\n * Styles applied to the xsInlineLink variant\n */\n xsInlineLink: PropTypes.string,\n /**\n * Styles applied to the root root element if noWrap is used\n */\n noWrap: PropTypes.string,\n }),\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 * By default, it maps the variant to a good default headline component.\n */\n component: PropTypes.elementType,\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * If `true`, the text will have a bottom margin.\n */\n paragraph: PropTypes.bool,\n /**\n * The selected typography.\n */\n variant: PropTypes.oneOf([\n \"5xlTitle\",\n \"4xlTitle\",\n \"3xlTitle\",\n \"xxlTitle\",\n \"xlTitle\",\n \"lTitle\",\n \"mTitle\",\n \"sTitle\",\n \"xsTitle\",\n \"xxsTitle\",\n \"sectionTitle\",\n \"highlightText\",\n \"normalText\",\n \"placeholderText\",\n \"link\",\n \"disabledText\",\n \"selectedNavText\",\n \"vizText\",\n \"vizTextDisabled\",\n \"xsInlineLink\",\n ]),\n /**\n * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.\n *\n * Note that text overflow can only happen with block or inline-block level elements\n * (the element needs to have a width in order to overflow).\n */\n noWrap: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvTypography\" })(HvTypography);\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;AAEA,IAAMA,qBAAqB,GAAG;EAC5B,YAAY,IADgB;EAE5B,YAAY,IAFgB;EAG5B,YAAY,IAHgB;EAI5BC,QAAQ,EAAE,IAJkB;EAK5BC,OAAO,EAAE,IALmB;EAM5BC,MAAM,EAAE,IANoB;EAO5BC,MAAM,EAAE,IAPoB;EAQ5BC,MAAM,EAAE,IARoB;EAS5BC,OAAO,EAAE,IATmB;EAU5BC,QAAQ,EAAE,IAVkB;EAW5BC,YAAY,EAAE,GAXc;EAY5BC,aAAa,EAAE,GAZa;EAa5BC,UAAU,EAAE,GAbgB;EAc5BC,eAAe,EAAE,GAdW;EAe5BC,IAAI,EAAE,GAfsB;EAgB5BC,YAAY,EAAE,GAhBc;EAiB5BC,eAAe,EAAE,GAjBW;EAkB5BC,OAAO,EAAE,GAlBmB;EAmB5BC,eAAe,EAAE,GAnBW;EAoB5BC,YAAY,EAAE;AApBc,CAA9B;;AAuBA,IAAMC,YAAY,gBAAGC,cAAA,CAAMC,UAAN,CAAiB,UAACC,KAAD,EAAQC,GAAR,EAAgB;EACpD,IACEC,EADF,GAUIF,KAVJ,CACEE,EADF;EAAA,qBAUIF,KAVJ,CAEEG,OAFF;EAAA,IAEEA,OAFF,+BAEY,YAFZ;EAAA,IAGEC,OAHF,GAUIJ,KAVJ,CAGEI,OAHF;EAAA,uBAUIJ,KAVJ,CAIEK,SAJF;EAAA,IAIEA,SAJF,iCAIc,KAJd;EAAA,IAKEC,SALF,GAUIN,KAVJ,CAKEM,SALF;EAAA,IAMEC,SANF,GAUIP,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uB,EAUvB,UAVuB,EAWvB,cAXuB,EAYvB,eAZuB,EAavB,YAbuB,EAcvB,iBAduB,EAevB,MAfuB,EAgBvB,cAhBuB,EAiBvB,iBAjBuB,EAkBvB,SAlBuB,EAmBvB,iBAnBuB,EAoBvB,cApBuB,CAAhB,CApHc;;EA0IvB;AACF;AACA;AACA;AACA;AACA;EACEb,MAAM,EAAEM,kBAAA,CAAUM;AAhJK,CAAzB;;eAmJe,IAAAE,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAA6C5B,YAA7C,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.js","names":["Action","classes","className","id","label","icon","onClick","others","payload","handleClick","event","root","propTypes","PropTypes","string","shape","isRequired","node","func","styles","name"],"sources":["../../../src/UserPreferences/Action/Action.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\";\nimport { HvButton, HvTypography } from \"../..\";\n\nconst Action = ({ classes, className, id, label, icon, onClick, ...others }) => {\n const payload = { id, label };\n\n const handleClick = (event) => {\n onClick?.(event, payload);\n };\n\n return (\n <HvButton\n id={id}\n category=\"ghost\"\n className={clsx(className, classes.root)}\n startIcon={icon}\n onClick={handleClick}\n {...others}\n >\n <HvTypography variant=\"normalText\">{label}</HvTypography>\n </HvButton>\n );\n};\n\nAction.propTypes = {\n /**\n * Id to be applied to the action.\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 to the component.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the component.\n */\n root: PropTypes.string,\n }).isRequired,\n /**\n * Visual label.\n */\n label: PropTypes.string,\n /**\n * Icon.\n */\n icon: PropTypes.node,\n /**\n * Callback called when clicked.\n */\n onClick: PropTypes.func,\n};\n\nexport default withStyles(styles, { name: \"HvUserPreferencesAction\" })(Action);\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,OAAiE;EAAA,IAA9DC,OAA8D,QAA9DA,OAA8D;EAAA,IAArDC,SAAqD,QAArDA,SAAqD;EAAA,IAA1CC,EAA0C,QAA1CA,EAA0C;EAAA,IAAtCC,KAAsC,QAAtCA,KAAsC;EAAA,IAA/BC,IAA+B,QAA/BA,IAA+B;EAAA,IAAzBC,OAAyB,QAAzBA,OAAyB;EAAA,IAAbC,MAAa;EAC9E,IAAMC,OAAO,GAAG;IAAEL,EAAE,EAAFA,EAAF;IAAMC,KAAK,EAALA;EAAN,CAAhB;;EAEA,IAAMK,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAAW;IAC7BJ,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAGI,KAAH,EAAUF,OAAV,CAAP;EACD,CAFD;;EAIA,oBACE,6BAAC,UAAD;IACE,EAAE,EAAEL,EADN;IAEE,QAAQ,EAAC,OAFX;IAGE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"Action.js","names":["Action","classes","className","id","label","icon","onClick","others","payload","handleClick","event","clsx","root","propTypes","PropTypes","string","shape","isRequired","node","func","withStyles","styles","name"],"sources":["../../../src/UserPreferences/Action/Action.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\";\nimport { HvButton, HvTypography } from \"../..\";\n\nconst Action = ({ classes, className, id, label, icon, onClick, ...others }) => {\n const payload = { id, label };\n\n const handleClick = (event) => {\n onClick?.(event, payload);\n };\n\n return (\n <HvButton\n id={id}\n category=\"ghost\"\n className={clsx(className, classes.root)}\n startIcon={icon}\n onClick={handleClick}\n {...others}\n >\n <HvTypography variant=\"normalText\">{label}</HvTypography>\n </HvButton>\n );\n};\n\nAction.propTypes = {\n /**\n * Id to be applied to the action.\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 to the component.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the component.\n */\n root: PropTypes.string,\n }).isRequired,\n /**\n * Visual label.\n */\n label: PropTypes.string,\n /**\n * Icon.\n */\n icon: PropTypes.node,\n /**\n * Callback called when clicked.\n */\n onClick: PropTypes.func,\n};\n\nexport default withStyles(styles, { name: \"HvUserPreferencesAction\" })(Action);\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,OAAiE;EAAA,IAA9DC,OAA8D,QAA9DA,OAA8D;EAAA,IAArDC,SAAqD,QAArDA,SAAqD;EAAA,IAA1CC,EAA0C,QAA1CA,EAA0C;EAAA,IAAtCC,KAAsC,QAAtCA,KAAsC;EAAA,IAA/BC,IAA+B,QAA/BA,IAA+B;EAAA,IAAzBC,OAAyB,QAAzBA,OAAyB;EAAA,IAAbC,MAAa;EAC9E,IAAMC,OAAO,GAAG;IAAEL,EAAE,EAAFA,EAAF;IAAMC,KAAK,EAALA;EAAN,CAAhB;;EAEA,IAAMK,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAAW;IAC7BJ,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAGI,KAAH,EAAUF,OAAV,CAAP;EACD,CAFD;;EAIA,oBACE,6BAAC,UAAD;IACE,EAAE,EAAEL,EADN;IAEE,QAAQ,EAAC,OAFX;IAGE,SAAS,EAAE,IAAAQ,aAAA,EAAKT,SAAL,EAAgBD,OAAO,CAACW,IAAxB,CAHb;IAIE,SAAS,EAAEP,IAJb;IAKE,OAAO,EAAEI;EALX,GAMMF,MANN,gBAQE,6BAAC,cAAD;IAAc,OAAO,EAAC;EAAtB,GAAoCH,KAApC,CARF,CADF;AAYD,CAnBD;;AAqBA,wCAAAJ,MAAM,CAACa,SAAP,GAAmB;EACjB;AACF;AACA;EACEV,EAAE,EAAEW,kBAAA,CAAUC,MAJG;;EAKjB;AACF;AACA;EACEb,SAAS,EAAEY,kBAAA,CAAUC,MARJ;;EASjB;AACF;AACA;EACEd,OAAO,EAAEa,kBAAA,CAAUE,KAAV,CAAgB;IACvB;AACJ;AACA;IACIJ,IAAI,EAAEE,kBAAA,CAAUC;EAJO,CAAhB,EAKNE,UAjBc;;EAkBjB;AACF;AACA;EACEb,KAAK,EAAEU,kBAAA,CAAUC,MArBA;;EAsBjB;AACF;AACA;EACEV,IAAI,EAAES,kBAAA,CAAUI,IAzBC;;EA0BjB;AACF;AACA;EACEZ,OAAO,EAAEQ,kBAAA,CAAUK;AA7BF,CAAnB;;eAgCe,IAAAC,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAwDtB,MAAxD,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles","theme","root"],"sources":["../../../src/UserPreferences/Action/styles.js"],"sourcesContent":["import { buttonStyles } from \"../styles\";\n\nconst styles = (theme) => ({\n root: {\n ...buttonStyles(theme),\n },\n});\n\nexport default styles;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,IAAI,oBACC,
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","theme","root","buttonStyles"],"sources":["../../../src/UserPreferences/Action/styles.js"],"sourcesContent":["import { buttonStyles } from \"../styles\";\n\nconst styles = (theme) => ({\n root: {\n ...buttonStyles(theme),\n },\n});\n\nexport default styles;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,IAAI,oBACC,IAAAC,oBAAA,EAAaF,KAAb,CADD;EADqB,CAAZ;AAAA,CAAf;;eAMeD,M"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","names":["Actions","classes","className","children","others","root","propTypes","PropTypes","string","shape","isRequired","node","styles","name"],"sources":["../../../src/UserPreferences/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 = ({ classes, className, children, ...others }) => {\n return (\n <div className={clsx(className, classes.root)} {...others}>\n {children}\n </div>\n );\n};\n\nActions.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 component.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the component.\n */\n root: PropTypes.string,\n }).isRequired,\n /**\n * Node to be rendered\n */\n children: PropTypes.node,\n};\n\nexport default withStyles(styles, { name: \"HvUserPreferencesActions\" })(Actions);\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,OAAO,GAAG,SAAVA,OAAU,OAAiD;EAAA,IAA9CC,OAA8C,QAA9CA,OAA8C;EAAA,IAArCC,SAAqC,QAArCA,SAAqC;EAAA,IAA1BC,QAA0B,QAA1BA,QAA0B;EAAA,IAAbC,MAAa;EAC/D,oBACE;IAAK,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"Actions.js","names":["Actions","classes","className","children","others","clsx","root","propTypes","PropTypes","string","shape","isRequired","node","withStyles","styles","name"],"sources":["../../../src/UserPreferences/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 = ({ classes, className, children, ...others }) => {\n return (\n <div className={clsx(className, classes.root)} {...others}>\n {children}\n </div>\n );\n};\n\nActions.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 component.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the component.\n */\n root: PropTypes.string,\n }).isRequired,\n /**\n * Node to be rendered\n */\n children: PropTypes.node,\n};\n\nexport default withStyles(styles, { name: \"HvUserPreferencesActions\" })(Actions);\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,OAAO,GAAG,SAAVA,OAAU,OAAiD;EAAA,IAA9CC,OAA8C,QAA9CA,OAA8C;EAAA,IAArCC,SAAqC,QAArCA,SAAqC;EAAA,IAA1BC,QAA0B,QAA1BA,QAA0B;EAAA,IAAbC,MAAa;EAC/D,oBACE;IAAK,SAAS,EAAE,IAAAC,aAAA,EAAKH,SAAL,EAAgBD,OAAO,CAACK,IAAxB;EAAhB,GAAmDF,MAAnD,GACGD,QADH,CADF;AAKD,CAND;;AAQA,wCAAAH,OAAO,CAACO,SAAR,GAAoB;EAClB;AACF;AACA;EACEL,SAAS,EAAEM,kBAAA,CAAUC,MAJH;;EAKlB;AACF;AACA;EACER,OAAO,EAAEO,kBAAA,CAAUE,KAAV,CAAgB;IACvB;AACJ;AACA;IACIJ,IAAI,EAAEE,kBAAA,CAAUC;EAJO,CAAhB,EAKNE,UAbe;;EAclB;AACF;AACA;EACER,QAAQ,EAAEK,kBAAA,CAAUI;AAjBF,CAApB;;eAoBe,IAAAC,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAyDf,OAAzD,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Group.js","names":["Group","id","className","classes","label","children","labelProps","others","labelId","root","undefined","ul","propTypes","PropTypes","string","shape","isRequired","instanceOf","Object","node","styles","name"],"sources":["../../../../src/UserPreferences/Options/Group/Group.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { withStyles } from \"@material-ui/core\";\nimport Typography from \"../../../Typography\";\nimport withId from \"../../../withId\";\nimport { setId } from \"../../../utils\";\nimport styles from \"./styles\";\n\nconst Group = ({ id, className, classes, label, children, labelProps, ...others }) => {\n const labelId = setId(id, \"grouplabel\");\n\n return (\n <nav\n id={id}\n className={clsx(className, classes.root)}\n aria-labelledby={label ? labelId : undefined}\n {...others}\n >\n {label && (\n <Typography\n component=\"div\"\n id={labelId}\n variant=\"highlightText\"\n className={classes.label}\n {...labelProps}\n >\n {label}\n </Typography>\n )}\n <ul className={classes.ul}>{children}</ul>\n </nav>\n );\n};\n\nGroup.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 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 label.\n */\n label: PropTypes.string,\n /**\n * Styles applied to the ul component.\n */\n ul: PropTypes.string,\n }).isRequired,\n /**\n * Label for the group.\n */\n label: PropTypes.string,\n /**\n * Props applied to the generated label.\n */\n labelProps: PropTypes.instanceOf(Object),\n /**\n * Children component.\n */\n children: PropTypes.node.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvUserPreferencesGroup\" })(withId(Group));\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,KAAK,GAAG,SAARA,KAAQ,OAAwE;EAAA,IAArEC,EAAqE,QAArEA,EAAqE;EAAA,IAAjEC,SAAiE,QAAjEA,SAAiE;EAAA,IAAtDC,OAAsD,QAAtDA,OAAsD;EAAA,IAA7CC,KAA6C,QAA7CA,KAA6C;EAAA,IAAtCC,QAAsC,QAAtCA,QAAsC;EAAA,IAA5BC,UAA4B,QAA5BA,UAA4B;EAAA,IAAbC,MAAa;EACpF,IAAMC,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"Group.js","names":["Group","id","className","classes","label","children","labelProps","others","labelId","setId","clsx","root","undefined","ul","propTypes","PropTypes","string","shape","isRequired","instanceOf","Object","node","withStyles","styles","name","withId"],"sources":["../../../../src/UserPreferences/Options/Group/Group.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { withStyles } from \"@material-ui/core\";\nimport Typography from \"../../../Typography\";\nimport withId from \"../../../withId\";\nimport { setId } from \"../../../utils\";\nimport styles from \"./styles\";\n\nconst Group = ({ id, className, classes, label, children, labelProps, ...others }) => {\n const labelId = setId(id, \"grouplabel\");\n\n return (\n <nav\n id={id}\n className={clsx(className, classes.root)}\n aria-labelledby={label ? labelId : undefined}\n {...others}\n >\n {label && (\n <Typography\n component=\"div\"\n id={labelId}\n variant=\"highlightText\"\n className={classes.label}\n {...labelProps}\n >\n {label}\n </Typography>\n )}\n <ul className={classes.ul}>{children}</ul>\n </nav>\n );\n};\n\nGroup.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 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 label.\n */\n label: PropTypes.string,\n /**\n * Styles applied to the ul component.\n */\n ul: PropTypes.string,\n }).isRequired,\n /**\n * Label for the group.\n */\n label: PropTypes.string,\n /**\n * Props applied to the generated label.\n */\n labelProps: PropTypes.instanceOf(Object),\n /**\n * Children component.\n */\n children: PropTypes.node.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvUserPreferencesGroup\" })(withId(Group));\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,KAAK,GAAG,SAARA,KAAQ,OAAwE;EAAA,IAArEC,EAAqE,QAArEA,EAAqE;EAAA,IAAjEC,SAAiE,QAAjEA,SAAiE;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;EAkChB;AACF;AACA;EACEf,QAAQ,EAAEU,kBAAA,CAAUM,IAAV,CAAeH;AArCT,CAAlB;;eAwCe,IAAAI,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAuD,IAAAC,eAAA,EAAOzB,KAAP,CAAvD,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.js","names":["Label","className","children","classes","others","root","propTypes","PropTypes","string","shape","isRequired","node","styles","name"],"sources":["../../../../src/UserPreferences/Options/Label/Label.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\";\nimport Typography from \"../../../Typography\";\n\nconst Label = ({ className, children, classes, ...others }) => (\n <Typography\n component=\"li\"\n variant=\"highlightText\"\n className={clsx(className, classes.root)}\n {...others}\n >\n {children}\n </Typography>\n);\n\nLabel.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 }).isRequired,\n /**\n * Children component.\n */\n children: PropTypes.node.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvUserPreferencesLabel\" })(Label);\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,KAAK,GAAG,SAARA,KAAQ;EAAA,IAAGC,SAAH,QAAGA,SAAH;EAAA,IAAcC,QAAd,QAAcA,QAAd;EAAA,IAAwBC,OAAxB,QAAwBA,OAAxB;EAAA,IAAoCC,MAApC;EAAA,oBACZ,6BAAC,mBAAD;IACE,SAAS,EAAC,IADZ;IAEE,OAAO,EAAC,eAFV;IAGE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"Label.js","names":["Label","className","children","classes","others","clsx","root","propTypes","PropTypes","string","shape","isRequired","node","withStyles","styles","name"],"sources":["../../../../src/UserPreferences/Options/Label/Label.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\";\nimport Typography from \"../../../Typography\";\n\nconst Label = ({ className, children, classes, ...others }) => (\n <Typography\n component=\"li\"\n variant=\"highlightText\"\n className={clsx(className, classes.root)}\n {...others}\n >\n {children}\n </Typography>\n);\n\nLabel.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 }).isRequired,\n /**\n * Children component.\n */\n children: PropTypes.node.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvUserPreferencesLabel\" })(Label);\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,KAAK,GAAG,SAARA,KAAQ;EAAA,IAAGC,SAAH,QAAGA,SAAH;EAAA,IAAcC,QAAd,QAAcA,QAAd;EAAA,IAAwBC,OAAxB,QAAwBA,OAAxB;EAAA,IAAoCC,MAApC;EAAA,oBACZ,6BAAC,mBAAD;IACE,SAAS,EAAC,IADZ;IAEE,OAAO,EAAC,eAFV;IAGE,SAAS,EAAE,IAAAC,aAAA,EAAKJ,SAAL,EAAgBE,OAAO,CAACG,IAAxB;EAHb,GAIMF,MAJN,GAMGF,QANH,CADY;AAAA,CAAd;;AAWA,wCAAAF,KAAK,CAACO,SAAN,GAAkB;EAChB;AACF;AACA;EACEN,SAAS,EAAEO,kBAAA,CAAUC,MAJL;;EAKhB;AACF;AACA;EACEN,OAAO,EAAEK,kBAAA,CAAUE,KAAV,CAAgB;IACvB;AACJ;AACA;IACIJ,IAAI,EAAEE,kBAAA,CAAUC;EAJO,CAAhB,EAKNE,UAba;;EAchB;AACF;AACA;EACET,QAAQ,EAAEM,kBAAA,CAAUI,IAAV,CAAeD;AAjBT,CAAlB;;eAoBe,IAAAE,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAuDf,KAAvD,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Option.js","names":["Option","classes","id","className","label","icon","onClick","others","OptionsContext","selected","onSelection","isSelected","handleClick","event","payload","li","action","propTypes","PropTypes","string","shape","noIcon","isRequired","node","func","styles","name"],"sources":["../../../src/UserPreferences/Options/Option.js"],"sourcesContent":["import React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { withStyles } from \"@material-ui/core\";\nimport styles from \"./styles\";\nimport { HvButton, HvTypography } from \"../..\";\nimport WithId from \"../../withId\";\nimport OptionsContext from \"./OptionsContext\";\n\nconst Option = ({ classes, id, className, label, icon, onClick, ...others }) => {\n const { selected, onSelection } = useContext(OptionsContext);\n\n const isSelected = id === selected;\n\n const handleClick = (event) => {\n if (isSelected) return;\n const payload = { id, label };\n\n onSelection?.(event, payload);\n onClick?.(event, payload);\n };\n\n return (\n <li className={classes.li}>\n <HvButton\n id={id}\n category=\"ghost\"\n className={clsx(className, classes.action, {\n [classes.selected]: isSelected,\n })}\n onClick={handleClick}\n startIcon={icon}\n {...others}\n >\n <HvTypography>{label}</HvTypography>\n </HvButton>\n </li>\n );\n};\n\nOption.propTypes = {\n /**\n * Id to be applied to the option.\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 to the component.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the component.\n */\n action: PropTypes.string,\n /**\n * Style applied when no icon is present.\n */\n noIcon: PropTypes.string,\n /**\n * Style applied to the `li`.\n */\n li: PropTypes.string,\n /**\n * Style applied when selected.\n */\n selected: PropTypes.string,\n }).isRequired,\n /**\n * Visual label.\n */\n label: PropTypes.string,\n /**\n * Icon.\n */\n icon: PropTypes.node,\n /**\n * Callback called when clicked.\n */\n onClick: PropTypes.func,\n};\n\nexport default withStyles(styles, { name: \"HvUserPreferencesOption\" })(WithId(Option));\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,OAAiE;EAAA,IAA9DC,OAA8D,QAA9DA,OAA8D;EAAA,IAArDC,EAAqD,QAArDA,EAAqD;EAAA,IAAjDC,SAAiD,QAAjDA,SAAiD;EAAA,IAAtCC,KAAsC,QAAtCA,KAAsC;EAAA,IAA/BC,IAA+B,QAA/BA,IAA+B;EAAA,IAAzBC,OAAyB,QAAzBA,OAAyB;EAAA,IAAbC,MAAa;;EAC9E,kBAAkC,
|
|
1
|
+
{"version":3,"file":"Option.js","names":["Option","classes","id","className","label","icon","onClick","others","useContext","OptionsContext","selected","onSelection","isSelected","handleClick","event","payload","li","clsx","action","propTypes","PropTypes","string","shape","noIcon","isRequired","node","func","withStyles","styles","name","WithId"],"sources":["../../../src/UserPreferences/Options/Option.js"],"sourcesContent":["import React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { withStyles } from \"@material-ui/core\";\nimport styles from \"./styles\";\nimport { HvButton, HvTypography } from \"../..\";\nimport WithId from \"../../withId\";\nimport OptionsContext from \"./OptionsContext\";\n\nconst Option = ({ classes, id, className, label, icon, onClick, ...others }) => {\n const { selected, onSelection } = useContext(OptionsContext);\n\n const isSelected = id === selected;\n\n const handleClick = (event) => {\n if (isSelected) return;\n const payload = { id, label };\n\n onSelection?.(event, payload);\n onClick?.(event, payload);\n };\n\n return (\n <li className={classes.li}>\n <HvButton\n id={id}\n category=\"ghost\"\n className={clsx(className, classes.action, {\n [classes.selected]: isSelected,\n })}\n onClick={handleClick}\n startIcon={icon}\n {...others}\n >\n <HvTypography>{label}</HvTypography>\n </HvButton>\n </li>\n );\n};\n\nOption.propTypes = {\n /**\n * Id to be applied to the option.\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 to the component.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the component.\n */\n action: PropTypes.string,\n /**\n * Style applied when no icon is present.\n */\n noIcon: PropTypes.string,\n /**\n * Style applied to the `li`.\n */\n li: PropTypes.string,\n /**\n * Style applied when selected.\n */\n selected: PropTypes.string,\n }).isRequired,\n /**\n * Visual label.\n */\n label: PropTypes.string,\n /**\n * Icon.\n */\n icon: PropTypes.node,\n /**\n * Callback called when clicked.\n */\n onClick: PropTypes.func,\n};\n\nexport default withStyles(styles, { name: \"HvUserPreferencesOption\" })(WithId(Option));\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,OAAiE;EAAA,IAA9DC,OAA8D,QAA9DA,OAA8D;EAAA,IAArDC,EAAqD,QAArDA,EAAqD;EAAA,IAAjDC,SAAiD,QAAjDA,SAAiD;EAAA,IAAtCC,KAAsC,QAAtCA,KAAsC;EAAA,IAA/BC,IAA+B,QAA/BA,IAA+B;EAAA,IAAzBC,OAAyB,QAAzBA,OAAyB;EAAA,IAAbC,MAAa;;EAC9E,kBAAkC,IAAAC,iBAAA,EAAWC,uBAAX,CAAlC;EAAA,IAAQC,QAAR,eAAQA,QAAR;EAAA,IAAkBC,WAAlB,eAAkBA,WAAlB;;EAEA,IAAMC,UAAU,GAAGV,EAAE,KAAKQ,QAA1B;;EAEA,IAAMG,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAAW;IAC7B,IAAIF,UAAJ,EAAgB;IAChB,IAAMG,OAAO,GAAG;MAAEb,EAAE,EAAFA,EAAF;MAAME,KAAK,EAALA;IAAN,CAAhB;IAEAO,WAAW,SAAX,IAAAA,WAAW,WAAX,YAAAA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,CAAnB,EAAwD,IAAAC,eAAA,EAAO9B,MAAP,CAAxD,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Options.js","names":["Options","classes","className","onClick","children","others","selected","setSelected","onSelection","event","payload","id","optionsStateContext","root","propTypes","PropTypes","string","shape","func","node","isRequired","styles","name"],"sources":["../../../src/UserPreferences/Options/Options.js"],"sourcesContent":["import React, { useMemo, useState, useCallback } from \"react\";\nimport clsx from \"clsx\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\nimport styles from \"./styles\";\nimport OptionsContext from \"./OptionsContext\";\n\nconst Options = ({ classes, className, onClick, children, ...others }) => {\n const [selected, setSelected] = useState();\n\n const onSelection = useCallback(\n (event, payload) => {\n setSelected(payload.id);\n onClick?.(event, payload);\n },\n [onClick]\n );\n\n const optionsStateContext = useMemo(\n () => ({\n selected,\n onSelection,\n }),\n [selected, onSelection]\n );\n\n return (\n <div className={clsx(className, classes.root)} {...others}>\n <OptionsContext.Provider value={optionsStateContext}>{children}</OptionsContext.Provider>\n </div>\n );\n};\n\nOptions.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 * Function call when a option is chosen.\n */\n onClick: PropTypes.func,\n /**\n * Children component.\n */\n children: PropTypes.node.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvUserPreferencesOptions\" })(Options);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,OAAO,GAAG,SAAVA,OAAU,OAA0D;EAAA,IAAvDC,OAAuD,QAAvDA,OAAuD;EAAA,IAA9CC,SAA8C,QAA9CA,SAA8C;EAAA,IAAnCC,OAAmC,QAAnCA,OAAmC;EAAA,IAA1BC,QAA0B,QAA1BA,QAA0B;EAAA,IAAbC,MAAa;;EACxE,gBAAgC,
|
|
1
|
+
{"version":3,"file":"Options.js","names":["Options","classes","className","onClick","children","others","useState","selected","setSelected","onSelection","useCallback","event","payload","id","optionsStateContext","useMemo","clsx","root","propTypes","PropTypes","string","shape","func","node","isRequired","withStyles","styles","name"],"sources":["../../../src/UserPreferences/Options/Options.js"],"sourcesContent":["import React, { useMemo, useState, useCallback } from \"react\";\nimport clsx from \"clsx\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\nimport styles from \"./styles\";\nimport OptionsContext from \"./OptionsContext\";\n\nconst Options = ({ classes, className, onClick, children, ...others }) => {\n const [selected, setSelected] = useState();\n\n const onSelection = useCallback(\n (event, payload) => {\n setSelected(payload.id);\n onClick?.(event, payload);\n },\n [onClick]\n );\n\n const optionsStateContext = useMemo(\n () => ({\n selected,\n onSelection,\n }),\n [selected, onSelection]\n );\n\n return (\n <div className={clsx(className, classes.root)} {...others}>\n <OptionsContext.Provider value={optionsStateContext}>{children}</OptionsContext.Provider>\n </div>\n );\n};\n\nOptions.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 * Function call when a option is chosen.\n */\n onClick: PropTypes.func,\n /**\n * Children component.\n */\n children: PropTypes.node.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvUserPreferencesOptions\" })(Options);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,OAAO,GAAG,SAAVA,OAAU,OAA0D;EAAA,IAAvDC,OAAuD,QAAvDA,OAAuD;EAAA,IAA9CC,SAA8C,QAA9CA,SAA8C;EAAA,IAAnCC,OAAmC,QAAnCA,OAAmC;EAAA,IAA1BC,QAA0B,QAA1BA,QAA0B;EAAA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|
|
1
|
-
{"version":3,"file":"OptionsContext.js","names":["OptionsContext","React","createContext","displayName"],"sources":["../../../src/UserPreferences/Options/OptionsContext.js"],"sourcesContent":["import React from \"react\";\n\nconst OptionsContext = React.createContext({});\nOptionsContext.displayName = \"OptionsContext\";\n\nexport default OptionsContext;\n"],"mappings":";;;;;;;;;AAAA;;AAEA,IAAMA,cAAc,gBAAGC,
|
|
1
|
+
{"version":3,"file":"OptionsContext.js","names":["OptionsContext","React","createContext","displayName"],"sources":["../../../src/UserPreferences/Options/OptionsContext.js"],"sourcesContent":["import React from \"react\";\n\nconst OptionsContext = React.createContext({});\nOptionsContext.displayName = \"OptionsContext\";\n\nexport default OptionsContext;\n"],"mappings":";;;;;;;;;AAAA;;AAEA,IAAMA,cAAc,gBAAGC,cAAA,CAAMC,aAAN,CAAoB,EAApB,CAAvB;;AACAF,cAAc,CAACG,WAAf,GAA6B,gBAA7B;eAEeH,c"}
|