@veeqo/ui 9.4.1 → 9.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/Accordion/Accordion.js +21 -21
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/ActionMenu/ActionMenu.js +4 -4
- package/dist/components/ActionMenu/ActionMenu.js.map +1 -1
- package/dist/components/Alerts/Alert/Alert.js +11 -11
- package/dist/components/Alerts/Alert/Alert.js.map +1 -1
- package/dist/components/Alerts/MiniAlert/MiniAlert.js +4 -4
- package/dist/components/Alerts/MiniAlert/MiniAlert.js.map +1 -1
- package/dist/components/Anchor/Anchor.js +2 -2
- package/dist/components/Anchor/Anchor.js.map +1 -1
- package/dist/components/AnimatedDropdown/AnimatedDropdown.js +5 -5
- package/dist/components/AnimatedDropdown/AnimatedDropdown.js.map +1 -1
- package/dist/components/AnimatedDropdown/components/BasicDropdown.js +2 -2
- package/dist/components/AnimatedDropdown/components/BasicDropdown.js.map +1 -1
- package/dist/components/Avatar/Avatar.js +2 -2
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Badge/Badge.js +4 -4
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Banner/Banner.js +7 -7
- package/dist/components/Banner/Banner.js.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +5 -5
- package/dist/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/Breadcrumbs/components/Breadcrumb.js +4 -4
- package/dist/components/Breadcrumbs/components/Breadcrumb.js.map +1 -1
- package/dist/components/Button/Button.js +7 -7
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Calendars/components/Calendar/Calendar.js +4 -4
- package/dist/components/Calendars/components/Calendar/Calendar.js.map +1 -1
- package/dist/components/Calendars/components/RangeCalendar/RangeCalendar.js +4 -4
- package/dist/components/Calendars/components/RangeCalendar/RangeCalendar.js.map +1 -1
- package/dist/components/Calendars/components/subcomponents/CalendarGrid/CalendarGrid.js +4 -4
- package/dist/components/Calendars/components/subcomponents/CalendarGrid/CalendarGrid.js.map +1 -1
- package/dist/components/Calendars/components/subcomponents/CalendarGrid/subCalendars/DodecadeCalendar.js +2 -2
- package/dist/components/Calendars/components/subcomponents/CalendarGrid/subCalendars/DodecadeCalendar.js.map +1 -1
- package/dist/components/Calendars/components/subcomponents/CalendarGrid/subCalendars/MonthCalendar.js +4 -4
- package/dist/components/Calendars/components/subcomponents/CalendarGrid/subCalendars/MonthCalendar.js.map +1 -1
- package/dist/components/Calendars/components/subcomponents/CalendarGrid/subCalendars/YearCalendar.js +2 -2
- package/dist/components/Calendars/components/subcomponents/CalendarGrid/subCalendars/YearCalendar.js.map +1 -1
- package/dist/components/Calendars/components/subcomponents/CalendarHeader.js +9 -9
- package/dist/components/Calendars/components/subcomponents/CalendarHeader.js.map +1 -1
- package/dist/components/Calendars/components/subcomponents/CalendarHeading.js +2 -2
- package/dist/components/Calendars/components/subcomponents/CalendarHeading.js.map +1 -1
- package/dist/components/Card/Card.js +6 -6
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/CardHeader/CardHeader.js +8 -8
- package/dist/components/CardHeader/CardHeader.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +3 -3
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Choice/Choice.js +14 -14
- package/dist/components/Choice/Choice.js.map +1 -1
- package/dist/components/ChoiceList/ChoiceList.js +4 -4
- package/dist/components/ChoiceList/ChoiceList.js.map +1 -1
- package/dist/components/CopyToClipboard/CopyToClipboard.js +4 -4
- package/dist/components/CopyToClipboard/CopyToClipboard.js.map +1 -1
- package/dist/components/DataTable/DataTable.js +34 -34
- package/dist/components/DataTable/DataTable.js.map +1 -1
- package/dist/components/DataTable/components/ActionBar.js +3 -3
- package/dist/components/DataTable/components/ActionBar.js.map +1 -1
- package/dist/components/DataTable/components/ColumnDivider.js +2 -2
- package/dist/components/DataTable/components/ColumnDivider.js.map +1 -1
- package/dist/components/DataTable/components/ColumnMenu.cjs +1 -1
- package/dist/components/DataTable/components/ColumnMenu.cjs.map +1 -1
- package/dist/components/DataTable/components/ColumnMenu.js +11 -11
- package/dist/components/DataTable/components/ColumnMenu.js.map +1 -1
- package/dist/components/DataTable/components/SelectionCell.js +5 -5
- package/dist/components/DataTable/components/SelectionCell.js.map +1 -1
- package/dist/components/DataTable/components/SelectionHeader.js +4 -4
- package/dist/components/DataTable/components/SelectionHeader.js.map +1 -1
- package/dist/components/DataTable/components/StickyHead.js +4 -4
- package/dist/components/DataTable/components/StickyHead.js.map +1 -1
- package/dist/components/DataTable/hooks/useSelection.js +3 -3
- package/dist/components/DataTable/hooks/useSelection.js.map +1 -1
- package/dist/components/DataTable/renderers/renderFooter.js +2 -2
- package/dist/components/DataTable/renderers/renderFooter.js.map +1 -1
- package/dist/components/DataTable/renderers/renderHeader.js +8 -8
- package/dist/components/DataTable/renderers/renderHeader.js.map +1 -1
- package/dist/components/DataTable/renderers/renderLoadingCell.js +3 -3
- package/dist/components/DataTable/renderers/renderLoadingCell.js.map +1 -1
- package/dist/components/DataTable/renderers/renderNestedCell.js +2 -2
- package/dist/components/DataTable/renderers/renderNestedCell.js.map +1 -1
- package/dist/components/DataTable/utils/GetSortIcon.cjs +2 -2
- package/dist/components/DataTable/utils/GetSortIcon.cjs.map +1 -1
- package/dist/components/DataTable/utils/GetSortIcon.js +5 -5
- package/dist/components/DataTable/utils/GetSortIcon.js.map +1 -1
- package/dist/components/DateInputField/DateInputField.js +11 -11
- package/dist/components/DateInputField/DateInputField.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +9 -9
- package/dist/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +12 -12
- package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/DateRangePicker/components/ComparePreviousPeriod.js +5 -5
- package/dist/components/DateRangePicker/components/ComparePreviousPeriod.js.map +1 -1
- package/dist/components/DescriptionList/DescriptionList.js +9 -9
- package/dist/components/DescriptionList/DescriptionList.js.map +1 -1
- package/dist/components/DetailPage/DetailPage.js +4 -4
- package/dist/components/DetailPage/DetailPage.js.map +1 -1
- package/dist/components/DimensionsInput/DimensionsInput.js +10 -10
- package/dist/components/DimensionsInput/DimensionsInput.js.map +1 -1
- package/dist/components/Dropdown/Dropdown.js +4 -4
- package/dist/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/components/Dropdown/DropdownPopover.js +4 -4
- package/dist/components/Dropdown/DropdownPopover.js.map +1 -1
- package/dist/components/FilterTag/FilterTag.js +12 -12
- package/dist/components/FilterTag/FilterTag.js.map +1 -1
- package/dist/components/Image/Image.js +8 -8
- package/dist/components/Image/Image.js.map +1 -1
- package/dist/components/Image/components/PlaceholderImage.js +3 -3
- package/dist/components/Image/components/PlaceholderImage.js.map +1 -1
- package/dist/components/Indicator/Indicator.js +2 -2
- package/dist/components/Indicator/Indicator.js.map +1 -1
- package/dist/components/InputGroup/components/InputGroupLabel/InputGroupLabel.js +3 -3
- package/dist/components/InputGroup/components/InputGroupLabel/InputGroupLabel.js.map +1 -1
- package/dist/components/LegacyDataTable/LegacyDataTable.cjs +2 -2
- package/dist/components/LegacyDataTable/LegacyDataTable.cjs.map +1 -1
- package/dist/components/LegacyDataTable/LegacyDataTable.js +40 -40
- package/dist/components/LegacyDataTable/LegacyDataTable.js.map +1 -1
- package/dist/components/LegacyDataTable/SkeletonContent/SkeletonContent.js +3 -3
- package/dist/components/LegacyDataTable/SkeletonContent/SkeletonContent.js.map +1 -1
- package/dist/components/LegacyDataTable/SpecificState/SpecificState.js +5 -5
- package/dist/components/LegacyDataTable/SpecificState/SpecificState.js.map +1 -1
- package/dist/components/LegacyDataTable/StickyHeader.js +3 -3
- package/dist/components/LegacyDataTable/StickyHeader.js.map +1 -1
- package/dist/components/LegacyDataTable/cells/ClickableCell.js +3 -3
- package/dist/components/LegacyDataTable/cells/ClickableCell.js.map +1 -1
- package/dist/components/LegacyDataTable/cells/EditableCell.js +4 -4
- package/dist/components/LegacyDataTable/cells/EditableCell.js.map +1 -1
- package/dist/components/LegacyDataTable/cells/SkeletonCell.js +3 -3
- package/dist/components/LegacyDataTable/cells/SkeletonCell.js.map +1 -1
- package/dist/components/LegacyDataTable/cells/SkeletonHeaderCell.js +3 -3
- package/dist/components/LegacyDataTable/cells/SkeletonHeaderCell.js.map +1 -1
- package/dist/components/LegacyDataTable/utils/constants.js +3 -3
- package/dist/components/LegacyDataTable/utils/constants.js.map +1 -1
- package/dist/components/Loader/Grid.js +20 -20
- package/dist/components/Loader/Grid.js.map +1 -1
- package/dist/components/Loader/Loader.js +4 -4
- package/dist/components/Loader/Loader.js.map +1 -1
- package/dist/components/Loader/TailSpin.js +13 -13
- package/dist/components/Loader/TailSpin.js.map +1 -1
- package/dist/components/Loader/ThreeDots.js +11 -11
- package/dist/components/Loader/ThreeDots.js.map +1 -1
- package/dist/components/LoginWithAmazonButton/LoginWithAmazonButton.js +3 -3
- package/dist/components/LoginWithAmazonButton/LoginWithAmazonButton.js.map +1 -1
- package/dist/components/Modal/Modal.js +11 -11
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Modal/components/Dialog/Dialog.js +2 -2
- package/dist/components/Modal/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Pagination/Pagination.js +9 -9
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Pagination/components.js +6 -6
- package/dist/components/Pagination/components.js.map +1 -1
- package/dist/components/Popover/Popover.js +4 -4
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/PriceInput/PriceInput.js +6 -6
- package/dist/components/PriceInput/PriceInput.js.map +1 -1
- package/dist/components/Radio/Radio.js +3 -3
- package/dist/components/Radio/Radio.js.map +1 -1
- package/dist/components/ScreenReaderOnly/ScreenReaderOnly.js +2 -2
- package/dist/components/ScreenReaderOnly/ScreenReaderOnly.js.map +1 -1
- package/dist/components/Search/Search.js +9 -9
- package/dist/components/Search/Search.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +2 -2
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/components/Select/Select.js +3 -3
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/ShortcutKeys/ShortcutKeys.js +6 -6
- package/dist/components/ShortcutKeys/ShortcutKeys.js.map +1 -1
- package/dist/components/SimpleTable/SimpleTable.js +2 -2
- package/dist/components/SimpleTable/SimpleTable.js.map +1 -1
- package/dist/components/Slider/Slider.js +6 -6
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Stepper/Stepper.js +6 -6
- package/dist/components/Stepper/Stepper.js.map +1 -1
- package/dist/components/TextField/TextField.js +3 -3
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/ToastsLayout/ToastsLayout.js +4 -4
- package/dist/components/ToastsLayout/ToastsLayout.js.map +1 -1
- package/dist/components/ToastsLayout/components/Toast.js +10 -10
- package/dist/components/ToastsLayout/components/Toast.js.map +1 -1
- package/dist/components/Toggle/Toggle.js +6 -6
- package/dist/components/Toggle/Toggle.js.map +1 -1
- package/dist/components/ToggleButton/ToggleButton.js +2 -2
- package/dist/components/ToggleButton/ToggleButton.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +5 -5
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip/components/TooltipPopover.js +4 -4
- package/dist/components/Tooltip/components/TooltipPopover.js.map +1 -1
- package/dist/components/UploadFile/UploadFile.js +13 -13
- package/dist/components/UploadFile/UploadFile.js.map +1 -1
- package/dist/components/UploadFile/UploadGraphic.js +4 -4
- package/dist/components/UploadFile/UploadGraphic.js.map +1 -1
- package/dist/components/UploadFile/components/UploadCopy/UploadCopy.js +4 -4
- package/dist/components/UploadFile/components/UploadCopy/UploadCopy.js.map +1 -1
- package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.js +4 -4
- package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.js.map +1 -1
- package/dist/components/UploadFile/components/UploadedFile/UploadedFile.js +4 -4
- package/dist/components/UploadFile/components/UploadedFile/UploadedFile.js.map +1 -1
- package/dist/components/VideoModal/VideoModal.js +6 -6
- package/dist/components/VideoModal/VideoModal.js.map +1 -1
- package/dist/components/VideoModal/components/Popup.js +7 -7
- package/dist/components/VideoModal/components/Popup.js.map +1 -1
- package/dist/components/View/View.js +9 -9
- package/dist/components/View/View.js.map +1 -1
- package/dist/components/ViewTab/ViewTab.js +10 -10
- package/dist/components/ViewTab/ViewTab.js.map +1 -1
- package/dist/components/ViewsContainer/ViewsContainer.js +9 -9
- package/dist/components/ViewsContainer/ViewsContainer.js.map +1 -1
- package/dist/components/WeightInput/WeightInput.js +13 -13
- package/dist/components/WeightInput/WeightInput.js.map +1 -1
- package/dist/hoc/withDeprecated.js +2 -2
- package/dist/hoc/withDeprecated.js.map +1 -1
- package/dist/hoc/withLabels/withLabels.js +13 -13
- package/dist/hoc/withLabels/withLabels.js.map +1 -1
- package/dist/hooks/useFocusVisible.js +8 -8
- package/dist/hooks/useFocusVisible.js.map +1 -1
- package/dist/index.cjs +74 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -1
- package/dist/tempIcons/ActiveCheckboxIcon.cjs +14 -0
- package/dist/tempIcons/ActiveCheckboxIcon.cjs.map +1 -0
- package/dist/tempIcons/ActiveCheckboxIcon.js +8 -0
- package/dist/tempIcons/ActiveCheckboxIcon.js.map +1 -0
- package/dist/tempIcons/ActiveRadioIcon.cjs +14 -0
- package/dist/tempIcons/ActiveRadioIcon.cjs.map +1 -0
- package/dist/tempIcons/ActiveRadioIcon.js +8 -0
- package/dist/tempIcons/ActiveRadioIcon.js.map +1 -0
- package/dist/tempIcons/ArrowDownIcon.js +3 -3
- package/dist/tempIcons/ArrowDownIcon.js.map +1 -1
- package/dist/tempIcons/ArrowUpIcon.js +3 -3
- package/dist/tempIcons/ArrowUpIcon.js.map +1 -1
- package/dist/tempIcons/AttentionIcon.js +3 -3
- package/dist/tempIcons/AttentionIcon.js.map +1 -1
- package/dist/tempIcons/CalendarIcon.js +3 -3
- package/dist/tempIcons/CalendarIcon.js.map +1 -1
- package/dist/tempIcons/ClipboardIcon.js +3 -3
- package/dist/tempIcons/ClipboardIcon.js.map +1 -1
- package/dist/tempIcons/CrossIcon.js +3 -3
- package/dist/tempIcons/CrossIcon.js.map +1 -1
- package/dist/tempIcons/DashboardIcon.cjs +13 -0
- package/dist/tempIcons/DashboardIcon.cjs.map +1 -0
- package/dist/tempIcons/DashboardIcon.d.ts +2 -0
- package/dist/tempIcons/DashboardIcon.js +7 -0
- package/dist/tempIcons/DashboardIcon.js.map +1 -0
- package/dist/tempIcons/DestructiveIcon.cjs +30 -0
- package/dist/tempIcons/DestructiveIcon.cjs.map +1 -0
- package/dist/tempIcons/DestructiveIcon.js +8 -0
- package/dist/tempIcons/DestructiveIcon.js.map +1 -0
- package/dist/tempIcons/DoubleArrowAscIcon.js +4 -4
- package/dist/tempIcons/DoubleArrowAscIcon.js.map +1 -1
- package/dist/tempIcons/DoubleArrowDescIcon.js +4 -4
- package/dist/tempIcons/DoubleArrowDescIcon.js.map +1 -1
- package/dist/tempIcons/{DoubleArrowIconIcon.cjs → DoubleArrowIcon.cjs} +1 -1
- package/dist/tempIcons/DoubleArrowIcon.cjs.map +1 -0
- package/dist/tempIcons/DoubleArrowIcon.js +8 -0
- package/dist/tempIcons/DoubleArrowIcon.js.map +1 -0
- package/dist/tempIcons/DownArrowIcon.js +3 -3
- package/dist/tempIcons/DownArrowIcon.js.map +1 -1
- package/dist/tempIcons/DragIndicatorIcon.cjs +13 -0
- package/dist/tempIcons/DragIndicatorIcon.cjs.map +1 -0
- package/dist/tempIcons/DragIndicatorIcon.js +7 -0
- package/dist/tempIcons/DragIndicatorIcon.js.map +1 -0
- package/dist/tempIcons/DropdownIcon.js +3 -3
- package/dist/tempIcons/DropdownIcon.js.map +1 -1
- package/dist/tempIcons/EditIcon.js +3 -3
- package/dist/tempIcons/EditIcon.js.map +1 -1
- package/dist/tempIcons/EndArrowIcon.js +4 -4
- package/dist/tempIcons/EndArrowIcon.js.map +1 -1
- package/dist/tempIcons/FailIcon.js +3 -3
- package/dist/tempIcons/FailIcon.js.map +1 -1
- package/dist/tempIcons/HelpIcon.js +3 -3
- package/dist/tempIcons/HelpIcon.js.map +1 -1
- package/dist/tempIcons/InactiveCheckboxIcon.cjs +14 -0
- package/dist/tempIcons/InactiveCheckboxIcon.cjs.map +1 -0
- package/dist/tempIcons/InactiveCheckboxIcon.js +8 -0
- package/dist/tempIcons/InactiveCheckboxIcon.js.map +1 -0
- package/dist/tempIcons/InactiveRadioIcon.cjs +14 -0
- package/dist/tempIcons/InactiveRadioIcon.cjs.map +1 -0
- package/dist/tempIcons/InactiveRadioIcon.js +8 -0
- package/dist/tempIcons/InactiveRadioIcon.js.map +1 -0
- package/dist/tempIcons/InfoIcon.js +5 -5
- package/dist/tempIcons/InfoIcon.js.map +1 -1
- package/dist/tempIcons/LeftArrowIcon.js +3 -3
- package/dist/tempIcons/LeftArrowIcon.js.map +1 -1
- package/dist/tempIcons/MergeIcon.js +3 -3
- package/dist/tempIcons/MergeIcon.js.map +1 -1
- package/dist/tempIcons/PlusIcon.cjs +30 -0
- package/dist/tempIcons/PlusIcon.cjs.map +1 -0
- package/dist/tempIcons/PlusIcon.js +8 -0
- package/dist/tempIcons/PlusIcon.js.map +1 -0
- package/dist/tempIcons/RecommendIcon.js +5 -5
- package/dist/tempIcons/RecommendIcon.js.map +1 -1
- package/dist/tempIcons/ReorderIcon.js +3 -3
- package/dist/tempIcons/ReorderIcon.js.map +1 -1
- package/dist/tempIcons/RightArrowIcon.js +3 -3
- package/dist/tempIcons/RightArrowIcon.js.map +1 -1
- package/dist/tempIcons/SearchIcon.js +3 -3
- package/dist/tempIcons/SearchIcon.js.map +1 -1
- package/dist/tempIcons/StartArrowIcon.js +4 -4
- package/dist/tempIcons/StartArrowIcon.js.map +1 -1
- package/dist/tempIcons/SuccessIcon.js +3 -3
- package/dist/tempIcons/SuccessIcon.js.map +1 -1
- package/dist/tempIcons/ThreeDotsIcon.js +3 -3
- package/dist/tempIcons/ThreeDotsIcon.js.map +1 -1
- package/dist/tempIcons/UpArrowIcon.js +3 -3
- package/dist/tempIcons/UpArrowIcon.js.map +1 -1
- package/dist/tempIcons/VisibilityIcon.cjs +2 -2
- package/dist/tempIcons/VisibilityIcon.cjs.map +1 -1
- package/dist/tempIcons/VisibilityIcon.d.ts +1 -1
- package/dist/tempIcons/VisibilityIcon.js +4 -4
- package/dist/tempIcons/VisibilityIcon.js.map +1 -1
- package/dist/tempIcons/VisibilityOffIcon.cjs +2 -2
- package/dist/tempIcons/VisibilityOffIcon.cjs.map +1 -1
- package/dist/tempIcons/VisibilityOffIcon.d.ts +1 -1
- package/dist/tempIcons/VisibilityOffIcon.js +4 -4
- package/dist/tempIcons/VisibilityOffIcon.js.map +1 -1
- package/dist/tempIcons/WarningIcon.js +4 -4
- package/dist/tempIcons/WarningIcon.js.map +1 -1
- package/dist/tempIcons/index.d.ts +37 -0
- package/package.json +1 -1
- package/dist/tempIcons/DoubleArrowIconIcon.cjs.map +0 -1
- package/dist/tempIcons/DoubleArrowIconIcon.d.ts +0 -2
- package/dist/tempIcons/DoubleArrowIconIcon.js +0 -8
- package/dist/tempIcons/DoubleArrowIconIcon.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popup.js","sources":["../../../../src/components/VideoModal/components/Popup.tsx"],"sourcesContent":["import React, { ReactNode, FC } from 'react';\n\n// @ts-ignore\nimport ScrollLock from 'react-scrolllock-configurable';\nimport { Portal } from '../../Portal';\n\nimport { Container, Shadow, Wrap } from './styled';\nimport { buildClassnames } from '../../../utils/buildClassnames';\n\ninterface WithPortalProps {\n usePortal?: boolean;\n children: ReactNode;\n}\n\nconst WithPortal = ({ usePortal, children }: WithPortalProps) => (\n // eslint-disable-next-line react/jsx-no-useless-fragment\n <>{usePortal ? <Portal>{children}</Portal> : children}</>\n);\n\nexport interface PopupProps {\n children: ReactNode;\n shouldShow: boolean;\n usePortal?: boolean;\n className?: string;\n}\n\nexport const Popup: FC<PopupProps> = ({\n className,\n children = null,\n shouldShow = false,\n usePortal = true,\n}: PopupProps) => (\n <WithPortal usePortal={usePortal}>\n <Container\n className={buildClassnames([`${className}-container`, className])}\n shouldShow={shouldShow}\n >\n <Shadow />\n <ScrollLock isActive={shouldShow}>\n <Wrap className={buildClassnames([`${className}-wrap`, className])}>{children}</Wrap>\n </ScrollLock>\n </Container>\n </WithPortal>\n);\n"],"names":[],"mappings":";;;;;;AAcA,MAAM,UAAU,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAmB;AAC1D;
|
|
1
|
+
{"version":3,"file":"Popup.js","sources":["../../../../src/components/VideoModal/components/Popup.tsx"],"sourcesContent":["import React, { ReactNode, FC } from 'react';\n\n// @ts-ignore\nimport ScrollLock from 'react-scrolllock-configurable';\nimport { Portal } from '../../Portal';\n\nimport { Container, Shadow, Wrap } from './styled';\nimport { buildClassnames } from '../../../utils/buildClassnames';\n\ninterface WithPortalProps {\n usePortal?: boolean;\n children: ReactNode;\n}\n\nconst WithPortal = ({ usePortal, children }: WithPortalProps) => (\n // eslint-disable-next-line react/jsx-no-useless-fragment\n <>{usePortal ? <Portal>{children}</Portal> : children}</>\n);\n\nexport interface PopupProps {\n children: ReactNode;\n shouldShow: boolean;\n usePortal?: boolean;\n className?: string;\n}\n\nexport const Popup: FC<PopupProps> = ({\n className,\n children = null,\n shouldShow = false,\n usePortal = true,\n}: PopupProps) => (\n <WithPortal usePortal={usePortal}>\n <Container\n className={buildClassnames([`${className}-container`, className])}\n shouldShow={shouldShow}\n >\n <Shadow />\n <ScrollLock isActive={shouldShow}>\n <Wrap className={buildClassnames([`${className}-wrap`, className])}>{children}</Wrap>\n </ScrollLock>\n </Container>\n </WithPortal>\n);\n"],"names":["React"],"mappings":";;;;;;AAcA,MAAM,UAAU,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAmB;AAC1D;AACAA,cAAA,CAAA,aAAA,CAAAA,cAAA,CAAA,QAAA,EAAA,IAAA,EAAG,SAAS,GAAGA,6BAAC,MAAM,EAAA,IAAA,EAAE,QAAQ,CAAU,GAAG,QAAQ,CAAI,CAC1D;AASM,MAAM,KAAK,GAAmB,CAAC,EACpC,SAAS,EACT,QAAQ,GAAG,IAAI,EACf,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,IAAI,GACL,MACXA,cAAC,CAAA,aAAA,CAAA,UAAU,EAAC,EAAA,SAAS,EAAE,SAAS,EAAA;AAC9B,IAAAA,cAAA,CAAA,aAAA,CAAC,SAAS,EACR,EAAA,SAAS,EAAE,eAAe,CAAC,CAAC,CAAA,EAAG,SAAS,CAAA,UAAA,CAAY,EAAE,SAAS,CAAC,CAAC,EACjE,UAAU,EAAE,UAAU,EAAA;AAEtB,QAAAA,cAAA,CAAA,aAAA,CAAC,MAAM,EAAG,IAAA,CAAA;AACV,QAAAA,cAAA,CAAA,aAAA,CAAC,UAAU,EAAA,EAAC,QAAQ,EAAE,UAAU,EAAA;YAC9BA,cAAC,CAAA,aAAA,CAAA,IAAI,IAAC,SAAS,EAAE,eAAe,CAAC,CAAC,GAAG,SAAS,CAAA,KAAA,CAAO,EAAE,SAAS,CAAC,CAAC,EAAG,EAAA,QAAQ,CAAQ,CAC1E,CACH,CACD;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useCallback } from 'react';
|
|
2
2
|
import '../../hooks/useFocusVisible.js';
|
|
3
3
|
import { useHover } from '../../hooks/useHover.js';
|
|
4
4
|
import { buildClassnames } from '../../utils/buildClassnames.js';
|
|
@@ -43,14 +43,14 @@ const View = ({ id, iconSlot, name, type, className, colourPalette = colors.seco
|
|
|
43
43
|
const isDraft = type === ViewTypes.draft;
|
|
44
44
|
const isSaved = type === ViewTypes.saved;
|
|
45
45
|
const fill = active ? colors.neutral.ink.dark : colors.neutral.ink.base;
|
|
46
|
-
return (
|
|
47
|
-
|
|
48
|
-
iconSlot &&
|
|
49
|
-
|
|
50
|
-
count && (
|
|
51
|
-
|
|
52
|
-
isDraft && (
|
|
53
|
-
isSaved && active && (
|
|
46
|
+
return (React__default.createElement(Container, { className: `${buildClassnames([classNames === null || classNames === undefined ? undefined : classNames.container, e2eClassNames === null || e2eClassNames === undefined ? undefined : e2eClassNames.container])} ${(active && (e2eClassNames === null || e2eClassNames === undefined ? undefined : e2eClassNames.active)) || ''}`, onClick: handleClick },
|
|
47
|
+
React__default.createElement(Contour, { active: active, onMouseEnter: handleEnter, onMouseLeave: handleLeave, colourPalette: colourPalette, customTextColour: customTextColour },
|
|
48
|
+
iconSlot && React__default.createElement(CustomIconWrapper, null, iconSlot),
|
|
49
|
+
React__default.createElement(Text, { variant: "bodyBold" }, name),
|
|
50
|
+
count && (React__default.createElement(CounterContainer, { active: active || isHovered, colourPalette: colourPalette, customTextColour: customTextColour },
|
|
51
|
+
React__default.createElement(CounterText, { className: e2eClassNames === null || e2eClassNames === undefined ? undefined : e2eClassNames.counter, variant: "subheadingSmall" }, count))),
|
|
52
|
+
isDraft && (React__default.createElement(CrossIcon, { ...IconStyling, color: fill, className: e2eClassNames === null || e2eClassNames === undefined ? undefined : e2eClassNames.delete, onClick: handleDelete })),
|
|
53
|
+
isSaved && active && (React__default.createElement(EditIcon, { ...IconStyling, color: fill, className: e2eClassNames === null || e2eClassNames === undefined ? undefined : e2eClassNames.edit, onClick: handleEdit })))));
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
export { View };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"View.js","sources":["../../../src/components/View/View.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\n\nimport { useHover } from '../../hooks';\nimport { colors } from '../../theme/modules/colors';\n\nimport { ViewProps, ViewTypes } from './types';\n\nimport {\n Container,\n Contour,\n CounterContainer,\n CounterText,\n CustomIconWrapper,\n IconStyling,\n Text,\n} from './styled';\nimport { buildClassnames } from '../../utils/buildClassnames';\nimport { CrossIcon } from '../../tempIcons/CrossIcon';\nimport { EditIcon } from '../../tempIcons/EditIcon';\n\nexport interface ClassNamesReturnPayload {\n delete?: string;\n options?: string;\n edit?: string;\n container?: string;\n active?: string;\n counter?: string;\n}\n\nconst generateClassNames = (prefix?: string): ClassNamesReturnPayload => ({\n delete: prefix ? `${prefix}-delete` : undefined,\n options: prefix ? `${prefix}-options` : undefined,\n edit: prefix ? `${prefix}-edit` : undefined,\n container: prefix ? `${prefix}-container` : undefined,\n active: prefix ? `${prefix}-active` : undefined,\n counter: prefix ? `${prefix}-counter` : undefined,\n});\n\n/**\n *\n * @deprecated\n *\n * use ViewTab component instead\n *\n */\nexport const View = ({\n id,\n iconSlot,\n name,\n type,\n className,\n colourPalette = colors.secondary.blue,\n customTextColour,\n count,\n active = false,\n onClick,\n onDelete,\n onEdit,\n e2eClassName,\n}: ViewProps) => {\n const classNames = generateClassNames(className);\n const e2eClassNames = generateClassNames(e2eClassName);\n const [isHovered, handleEnter, handleLeave] = useHover();\n\n const handleClick = useCallback(() => onClick(id), [id, onClick]);\n const handleDelete = useCallback(\n (event) => {\n event.stopPropagation();\n if (onDelete) onDelete(id);\n },\n [onDelete, id],\n );\n const handleEdit = useCallback(\n (event) => {\n event.stopPropagation();\n if (onEdit) onEdit(id);\n },\n [onEdit, id],\n );\n\n const isDraft = type === ViewTypes.draft;\n const isSaved = type === ViewTypes.saved;\n const fill = active ? colors.neutral.ink.dark : colors.neutral.ink.base;\n\n return (\n <Container\n className={`${buildClassnames([classNames?.container, e2eClassNames?.container])} ${\n (active && e2eClassNames?.active) || ''\n }`}\n onClick={handleClick}\n >\n <Contour\n active={active}\n onMouseEnter={handleEnter}\n onMouseLeave={handleLeave}\n colourPalette={colourPalette}\n customTextColour={customTextColour}\n >\n {iconSlot && <CustomIconWrapper>{iconSlot}</CustomIconWrapper>}\n <Text variant=\"bodyBold\">{name}</Text>\n {count && (\n <CounterContainer\n active={active || isHovered}\n colourPalette={colourPalette}\n customTextColour={customTextColour}\n >\n <CounterText className={e2eClassNames?.counter} variant=\"subheadingSmall\">\n {count}\n </CounterText>\n </CounterContainer>\n )}\n {isDraft && (\n <CrossIcon\n {...IconStyling}\n color={fill}\n className={e2eClassNames?.delete}\n onClick={handleDelete}\n />\n )}\n {isSaved && active && (\n <EditIcon\n {...IconStyling}\n color={fill}\n className={e2eClassNames?.edit}\n onClick={handleEdit}\n />\n )}\n </Contour>\n </Container>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AA6BA,MAAM,kBAAkB,GAAG,CAAC,MAAe,MAA+B;IACxE,MAAM,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAS,OAAA,CAAA,GAAG,SAAS;IAC/C,OAAO,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAU,QAAA,CAAA,GAAG,SAAS;IACjD,IAAI,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAO,KAAA,CAAA,GAAG,SAAS;IAC3C,SAAS,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAY,UAAA,CAAA,GAAG,SAAS;IACrD,MAAM,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAS,OAAA,CAAA,GAAG,SAAS;IAC/C,OAAO,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAU,QAAA,CAAA,GAAG,SAAS;AAClD,CAAA,CAAC;AAEF;;;;;;AAMG;AACU,MAAA,IAAI,GAAG,CAAC,EACnB,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,EACrC,gBAAgB,EAChB,KAAK,EACL,MAAM,GAAG,KAAK,EACd,OAAO,EACP,QAAQ,EACR,MAAM,EACN,YAAY,GACF,KAAI;AACd,IAAA,MAAM,UAAU,GAAG,kBAAkB,CAAC,SAAS,CAAC;AAChD,IAAA,MAAM,aAAa,GAAG,kBAAkB,CAAC,YAAY,CAAC;IACtD,MAAM,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,CAAC,GAAG,QAAQ,EAAE;AAExD,IAAA,MAAM,WAAW,GAAG,WAAW,CAAC,MAAM,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;AACjE,IAAA,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,KAAK,KAAI;QACR,KAAK,CAAC,eAAe,EAAE;AACvB,QAAA,IAAI,QAAQ;YAAE,QAAQ,CAAC,EAAE,CAAC;AAC5B,KAAC,EACD,CAAC,QAAQ,EAAE,EAAE,CAAC,CACf;AACD,IAAA,MAAM,UAAU,GAAG,WAAW,CAC5B,CAAC,KAAK,KAAI;QACR,KAAK,CAAC,eAAe,EAAE;AACvB,QAAA,IAAI,MAAM;YAAE,MAAM,CAAC,EAAE,CAAC;AACxB,KAAC,EACD,CAAC,MAAM,EAAE,EAAE,CAAC,CACb;AAED,IAAA,MAAM,OAAO,GAAG,IAAI,KAAK,SAAS,CAAC,KAAK;AACxC,IAAA,MAAM,OAAO,GAAG,IAAI,KAAK,SAAS,CAAC,KAAK;IACxC,MAAM,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI;IAEvE,
|
|
1
|
+
{"version":3,"file":"View.js","sources":["../../../src/components/View/View.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\n\nimport { useHover } from '../../hooks';\nimport { colors } from '../../theme/modules/colors';\n\nimport { ViewProps, ViewTypes } from './types';\n\nimport {\n Container,\n Contour,\n CounterContainer,\n CounterText,\n CustomIconWrapper,\n IconStyling,\n Text,\n} from './styled';\nimport { buildClassnames } from '../../utils/buildClassnames';\nimport { CrossIcon } from '../../tempIcons/CrossIcon';\nimport { EditIcon } from '../../tempIcons/EditIcon';\n\nexport interface ClassNamesReturnPayload {\n delete?: string;\n options?: string;\n edit?: string;\n container?: string;\n active?: string;\n counter?: string;\n}\n\nconst generateClassNames = (prefix?: string): ClassNamesReturnPayload => ({\n delete: prefix ? `${prefix}-delete` : undefined,\n options: prefix ? `${prefix}-options` : undefined,\n edit: prefix ? `${prefix}-edit` : undefined,\n container: prefix ? `${prefix}-container` : undefined,\n active: prefix ? `${prefix}-active` : undefined,\n counter: prefix ? `${prefix}-counter` : undefined,\n});\n\n/**\n *\n * @deprecated\n *\n * use ViewTab component instead\n *\n */\nexport const View = ({\n id,\n iconSlot,\n name,\n type,\n className,\n colourPalette = colors.secondary.blue,\n customTextColour,\n count,\n active = false,\n onClick,\n onDelete,\n onEdit,\n e2eClassName,\n}: ViewProps) => {\n const classNames = generateClassNames(className);\n const e2eClassNames = generateClassNames(e2eClassName);\n const [isHovered, handleEnter, handleLeave] = useHover();\n\n const handleClick = useCallback(() => onClick(id), [id, onClick]);\n const handleDelete = useCallback(\n (event) => {\n event.stopPropagation();\n if (onDelete) onDelete(id);\n },\n [onDelete, id],\n );\n const handleEdit = useCallback(\n (event) => {\n event.stopPropagation();\n if (onEdit) onEdit(id);\n },\n [onEdit, id],\n );\n\n const isDraft = type === ViewTypes.draft;\n const isSaved = type === ViewTypes.saved;\n const fill = active ? colors.neutral.ink.dark : colors.neutral.ink.base;\n\n return (\n <Container\n className={`${buildClassnames([classNames?.container, e2eClassNames?.container])} ${\n (active && e2eClassNames?.active) || ''\n }`}\n onClick={handleClick}\n >\n <Contour\n active={active}\n onMouseEnter={handleEnter}\n onMouseLeave={handleLeave}\n colourPalette={colourPalette}\n customTextColour={customTextColour}\n >\n {iconSlot && <CustomIconWrapper>{iconSlot}</CustomIconWrapper>}\n <Text variant=\"bodyBold\">{name}</Text>\n {count && (\n <CounterContainer\n active={active || isHovered}\n colourPalette={colourPalette}\n customTextColour={customTextColour}\n >\n <CounterText className={e2eClassNames?.counter} variant=\"subheadingSmall\">\n {count}\n </CounterText>\n </CounterContainer>\n )}\n {isDraft && (\n <CrossIcon\n {...IconStyling}\n color={fill}\n className={e2eClassNames?.delete}\n onClick={handleDelete}\n />\n )}\n {isSaved && active && (\n <EditIcon\n {...IconStyling}\n color={fill}\n className={e2eClassNames?.edit}\n onClick={handleEdit}\n />\n )}\n </Contour>\n </Container>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;AA6BA,MAAM,kBAAkB,GAAG,CAAC,MAAe,MAA+B;IACxE,MAAM,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAS,OAAA,CAAA,GAAG,SAAS;IAC/C,OAAO,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAU,QAAA,CAAA,GAAG,SAAS;IACjD,IAAI,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAO,KAAA,CAAA,GAAG,SAAS;IAC3C,SAAS,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAY,UAAA,CAAA,GAAG,SAAS;IACrD,MAAM,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAS,OAAA,CAAA,GAAG,SAAS;IAC/C,OAAO,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAU,QAAA,CAAA,GAAG,SAAS;AAClD,CAAA,CAAC;AAEF;;;;;;AAMG;AACU,MAAA,IAAI,GAAG,CAAC,EACnB,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,EACrC,gBAAgB,EAChB,KAAK,EACL,MAAM,GAAG,KAAK,EACd,OAAO,EACP,QAAQ,EACR,MAAM,EACN,YAAY,GACF,KAAI;AACd,IAAA,MAAM,UAAU,GAAG,kBAAkB,CAAC,SAAS,CAAC;AAChD,IAAA,MAAM,aAAa,GAAG,kBAAkB,CAAC,YAAY,CAAC;IACtD,MAAM,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,CAA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
2
2
|
import '../../hooks/useFocusVisible.js';
|
|
3
3
|
import { useHover } from '../../hooks/useHover.js';
|
|
4
4
|
import { buildClassnames } from '../../utils/buildClassnames.js';
|
|
@@ -15,7 +15,7 @@ const generateClassNames = (prefix) => ({
|
|
|
15
15
|
active: prefix ? `${prefix}-active` : undefined,
|
|
16
16
|
counter: prefix ? `${prefix}-counter` : undefined,
|
|
17
17
|
});
|
|
18
|
-
const ViewTab =
|
|
18
|
+
const ViewTab = React__default.forwardRef(({ id, iconSlot, name, type, className, colourPalette = colors.secondary.blue, customTextColour, count, active = false, onClick, subAction, ariaContext, ...props }, ref) => {
|
|
19
19
|
const classNames = generateClassNames(className);
|
|
20
20
|
const [isHovered, handleEnter, handleLeave] = useHover();
|
|
21
21
|
const action = active && subAction ? subAction : onClick;
|
|
@@ -29,14 +29,14 @@ const ViewTab = React.forwardRef(({ id, iconSlot, name, type, className, colourP
|
|
|
29
29
|
return 'Edit';
|
|
30
30
|
return '';
|
|
31
31
|
};
|
|
32
|
-
return (
|
|
33
|
-
|
|
34
|
-
iconSlot &&
|
|
35
|
-
|
|
36
|
-
count !== undefined && count !== null && (
|
|
37
|
-
|
|
38
|
-
isDraft &&
|
|
39
|
-
isSaved && active &&
|
|
32
|
+
return (React__default.createElement(ViewButton, { className: buildClassnames([classNames === null || classNames === undefined ? undefined : classNames.container]), onClick: handleAction, role: "tab", "aria-selected": active, "aria-label": `${getLabelAction()} ${name} view ${count ? `with ${count} ${ariaContext}` : ''}`, customTextColour: customTextColour, ref: ref, ...props },
|
|
33
|
+
React__default.createElement(Contour, { active: active, onMouseEnter: handleEnter, onMouseLeave: handleLeave, colourPalette: colourPalette, customTextColour: customTextColour },
|
|
34
|
+
iconSlot && React__default.createElement(CustomIconWrapper, null, iconSlot),
|
|
35
|
+
React__default.createElement(Text, { variant: "bodyBold" }, name),
|
|
36
|
+
count !== undefined && count !== null && (React__default.createElement(CounterContainer, { "data-testid": "countContainer", active: active || isHovered, colourPalette: colourPalette, customTextColour: customTextColour },
|
|
37
|
+
React__default.createElement(CounterText, { variant: "subheadingSmall" }, count))),
|
|
38
|
+
isDraft && React__default.createElement(CrossIconStyling, { ...IconStyling, "aria-label": "delete icon" }),
|
|
39
|
+
isSaved && active && React__default.createElement(ThreeDotsIconStyling, { ...IconStyling, "aria-label": "edit icon" }))));
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
export { ViewTab };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewTab.js","sources":["../../../src/components/ViewTab/ViewTab.tsx"],"sourcesContent":["import React, { Ref } from 'react';\n\nimport { useHover } from '../../hooks';\nimport { colors } from '../../theme/modules/colors';\n\nimport { ViewTabProps, ViewTabTypes } from './types';\n\nimport {\n Contour,\n CounterContainer,\n CounterText,\n CrossIconStyling,\n CustomIconWrapper,\n IconStyling,\n Text,\n ThreeDotsIconStyling,\n ViewButton,\n} from './styled';\nimport { buildClassnames } from '../../utils/buildClassnames';\n\nexport interface ClassNamesReturnPayload {\n delete?: string;\n edit?: string;\n container?: string;\n active?: string;\n counter?: string;\n}\n\nconst generateClassNames = (prefix?: string): ClassNamesReturnPayload => ({\n delete: prefix ? `${prefix}-delete` : undefined,\n edit: prefix ? `${prefix}-edit` : undefined,\n container: prefix ? `${prefix}-view` : undefined,\n active: prefix ? `${prefix}-active` : undefined,\n counter: prefix ? `${prefix}-counter` : undefined,\n});\n\nexport const ViewTab = React.forwardRef<HTMLButtonElement, ViewTabProps>(\n (\n {\n id,\n iconSlot,\n name,\n type,\n className,\n colourPalette = colors.secondary.blue,\n customTextColour,\n count,\n active = false,\n onClick,\n subAction,\n ariaContext,\n ...props\n }: ViewTabProps,\n ref: Ref<HTMLButtonElement>,\n ) => {\n const classNames = generateClassNames(className);\n const [isHovered, handleEnter, handleLeave] = useHover();\n\n const action = active && subAction ? subAction : onClick;\n const handleAction = () => action(id);\n\n const isDraft = type === ViewTabTypes.draft;\n const isSaved = type === ViewTabTypes.saved;\n\n const getLabelAction = () => {\n if (active && isDraft) return 'Delete';\n if (active && isSaved) return 'Edit';\n return '';\n };\n\n return (\n <ViewButton\n className={buildClassnames([classNames?.container])}\n onClick={handleAction}\n role=\"tab\"\n aria-selected={active}\n aria-label={`${getLabelAction()} ${name} view ${\n count ? `with ${count} ${ariaContext}` : ''\n }`}\n customTextColour={customTextColour}\n ref={ref}\n {...props}\n >\n <Contour\n active={active}\n onMouseEnter={handleEnter}\n onMouseLeave={handleLeave}\n colourPalette={colourPalette}\n customTextColour={customTextColour}\n >\n {iconSlot && <CustomIconWrapper>{iconSlot}</CustomIconWrapper>}\n <Text variant=\"bodyBold\">{name}</Text>\n {count !== undefined && count !== null && (\n <CounterContainer\n data-testid=\"countContainer\"\n active={active || isHovered}\n colourPalette={colourPalette}\n customTextColour={customTextColour}\n >\n <CounterText variant=\"subheadingSmall\">{count}</CounterText>\n </CounterContainer>\n )}\n {isDraft && <CrossIconStyling {...IconStyling} aria-label=\"delete icon\" />}\n {isSaved && active && <ThreeDotsIconStyling {...IconStyling} aria-label=\"edit icon\" />}\n </Contour>\n </ViewButton>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;;;AA4BA,MAAM,kBAAkB,GAAG,CAAC,MAAe,MAA+B;IACxE,MAAM,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAS,OAAA,CAAA,GAAG,SAAS;IAC/C,IAAI,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAO,KAAA,CAAA,GAAG,SAAS;IAC3C,SAAS,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAO,KAAA,CAAA,GAAG,SAAS;IAChD,MAAM,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAS,OAAA,CAAA,GAAG,SAAS;IAC/C,OAAO,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAU,QAAA,CAAA,GAAG,SAAS;AAClD,CAAA,CAAC;MAEW,OAAO,
|
|
1
|
+
{"version":3,"file":"ViewTab.js","sources":["../../../src/components/ViewTab/ViewTab.tsx"],"sourcesContent":["import React, { Ref } from 'react';\n\nimport { useHover } from '../../hooks';\nimport { colors } from '../../theme/modules/colors';\n\nimport { ViewTabProps, ViewTabTypes } from './types';\n\nimport {\n Contour,\n CounterContainer,\n CounterText,\n CrossIconStyling,\n CustomIconWrapper,\n IconStyling,\n Text,\n ThreeDotsIconStyling,\n ViewButton,\n} from './styled';\nimport { buildClassnames } from '../../utils/buildClassnames';\n\nexport interface ClassNamesReturnPayload {\n delete?: string;\n edit?: string;\n container?: string;\n active?: string;\n counter?: string;\n}\n\nconst generateClassNames = (prefix?: string): ClassNamesReturnPayload => ({\n delete: prefix ? `${prefix}-delete` : undefined,\n edit: prefix ? `${prefix}-edit` : undefined,\n container: prefix ? `${prefix}-view` : undefined,\n active: prefix ? `${prefix}-active` : undefined,\n counter: prefix ? `${prefix}-counter` : undefined,\n});\n\nexport const ViewTab = React.forwardRef<HTMLButtonElement, ViewTabProps>(\n (\n {\n id,\n iconSlot,\n name,\n type,\n className,\n colourPalette = colors.secondary.blue,\n customTextColour,\n count,\n active = false,\n onClick,\n subAction,\n ariaContext,\n ...props\n }: ViewTabProps,\n ref: Ref<HTMLButtonElement>,\n ) => {\n const classNames = generateClassNames(className);\n const [isHovered, handleEnter, handleLeave] = useHover();\n\n const action = active && subAction ? subAction : onClick;\n const handleAction = () => action(id);\n\n const isDraft = type === ViewTabTypes.draft;\n const isSaved = type === ViewTabTypes.saved;\n\n const getLabelAction = () => {\n if (active && isDraft) return 'Delete';\n if (active && isSaved) return 'Edit';\n return '';\n };\n\n return (\n <ViewButton\n className={buildClassnames([classNames?.container])}\n onClick={handleAction}\n role=\"tab\"\n aria-selected={active}\n aria-label={`${getLabelAction()} ${name} view ${\n count ? `with ${count} ${ariaContext}` : ''\n }`}\n customTextColour={customTextColour}\n ref={ref}\n {...props}\n >\n <Contour\n active={active}\n onMouseEnter={handleEnter}\n onMouseLeave={handleLeave}\n colourPalette={colourPalette}\n customTextColour={customTextColour}\n >\n {iconSlot && <CustomIconWrapper>{iconSlot}</CustomIconWrapper>}\n <Text variant=\"bodyBold\">{name}</Text>\n {count !== undefined && count !== null && (\n <CounterContainer\n data-testid=\"countContainer\"\n active={active || isHovered}\n colourPalette={colourPalette}\n customTextColour={customTextColour}\n >\n <CounterText variant=\"subheadingSmall\">{count}</CounterText>\n </CounterContainer>\n )}\n {isDraft && <CrossIconStyling {...IconStyling} aria-label=\"delete icon\" />}\n {isSaved && active && <ThreeDotsIconStyling {...IconStyling} aria-label=\"edit icon\" />}\n </Contour>\n </ViewButton>\n );\n },\n);\n"],"names":["React"],"mappings":";;;;;;;;;;AA4BA,MAAM,kBAAkB,GAAG,CAAC,MAAe,MAA+B;IACxE,MAAM,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAS,OAAA,CAAA,GAAG,SAAS;IAC/C,IAAI,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAO,KAAA,CAAA,GAAG,SAAS;IAC3C,SAAS,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAO,KAAA,CAAA,GAAG,SAAS;IAChD,MAAM,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAS,OAAA,CAAA,GAAG,SAAS;IAC/C,OAAO,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAU,QAAA,CAAA,GAAG,SAAS;AAClD,CAAA,CAAC;MAEW,OAAO,GAAGA,cAAK,CAAC,UAAU,CACrC,CACE,EACE,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,EACrC,gBAAgB,EAChB,KAAK,EACL,MAAM,GAAG,KAAK,EACd,OAAO,EACP,SAAS,EACT,WAAW,EACX,GAAG,KAAK,EACK,EACf,GAA2B,KACzB;AACF,IAAA,MAAM,UAAU,GAAG,kBAAkB,CAAC,SAAS,CAAC;IAChD,MAAM,CAAC,SAAS,EAAE,WAAW,EAAE,WA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,aAAA,CAAC,IAAI,EAAC,EAAA,OAAO,EAAC,UAAU,EAAA,EAAE,IAAI,CAAQ;YACrC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,KACpCA,cAAC,CAAA,aAAA,CAAA,gBAAgB,EACH,EAAA,aAAA,EAAA,gBAAgB,EAC5B,MAAM,EAAE,MAAM,IAAI,SAAS,EAC3B,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAAA;gBAElCA,cAAC,CAAA,aAAA,CAAA,WAAW,IAAC,OAAO,EAAC,iBAAiB,EAAE,EAAA,KAAK,CAAe,CAC3C,CACpB;AACA,YAAA,OAAO,IAAIA,cAAC,CAAA,aAAA,CAAA,gBAAgB,OAAK,WAAW,EAAA,YAAA,EAAa,aAAa,EAAG,CAAA;AACzE,YAAA,OAAO,IAAI,MAAM,IAAIA,cAAA,CAAA,aAAA,CAAC,oBAAoB,EAAA,EAAA,GAAK,WAAW,EAAA,YAAA,EAAa,WAAW,EAAA,CAAG,CAC9E,CACC;AAEjB,CAAC;;;;"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useRef } from 'react';
|
|
2
2
|
import { Container, ViewsWrapper, StyledInputGroup, StyledLeftButton, StyledLeftIcon, StyledRightButton, StyledRightIcon, StyledMenuButton, StyledMenuIcon } from './styled.js';
|
|
3
3
|
import { useSetScrollPosition } from './hooks/useSetScrollPosition.js';
|
|
4
4
|
|
|
5
|
-
const ViewsContainer =
|
|
5
|
+
const ViewsContainer = React__default.forwardRef(({ children, onClickMenu, ariaMenuControls, ariaMenuExpanded }, menuRef) => {
|
|
6
6
|
const viewsRef = useRef(null);
|
|
7
7
|
const { rightDisabled, leftDisabled, toNextScrollPosition, toPrevScrollPosition } = useSetScrollPosition(viewsRef, children);
|
|
8
|
-
return (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
(!leftDisabled || !rightDisabled) && (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
return (React__default.createElement(Container, { direction: "horizontal", alignY: "center", alignX: "between" },
|
|
9
|
+
React__default.createElement(ViewsWrapper, { ref: viewsRef, id: "views", role: "tablist", alignY: "center", direction: "horizontal" }, children),
|
|
10
|
+
React__default.createElement(StyledInputGroup, null,
|
|
11
|
+
(!leftDisabled || !rightDisabled) && (React__default.createElement(React__default.Fragment, null,
|
|
12
|
+
React__default.createElement(StyledLeftButton, { id: "left-arrow", iconSlot: React__default.createElement(StyledLeftIcon, null), disabled: leftDisabled, onClick: toPrevScrollPosition, variant: "flat", "aria-label": "move views to the left" }),
|
|
13
|
+
React__default.createElement(StyledRightButton, { id: "right-arrow", iconSlot: React__default.createElement(StyledRightIcon, null), disabled: rightDisabled, onClick: toNextScrollPosition, variant: "flat", "aria-label": "move views to the right" }))),
|
|
14
|
+
React__default.createElement(StyledMenuButton, { iconSlot: React__default.createElement(StyledMenuIcon, null), variant: "flat", onClick: onClickMenu, "aria-label": "open menu", "aria-controls": ariaMenuControls, "aria-expanded": ariaMenuExpanded, "aria-haspopup": ariaMenuControls ? 'dialog' : undefined, ref: menuRef }))));
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
export { ViewsContainer };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewsContainer.js","sources":["../../../src/components/ViewsContainer/ViewsContainer.tsx"],"sourcesContent":["import React, { useRef, MutableRefObject, Ref } from 'react';\n\nimport { ViewContainerProps } from './types';\nimport {\n Container,\n StyledLeftButton,\n StyledLeftIcon,\n StyledMenuButton,\n StyledMenuIcon,\n StyledRightButton,\n StyledRightIcon,\n StyledInputGroup,\n ViewsWrapper,\n} from './styled';\nimport { useSetScrollPosition } from './hooks/useSetScrollPosition';\n\nexport const ViewsContainer = React.forwardRef<HTMLButtonElement, ViewContainerProps>(\n (\n { children, onClickMenu, ariaMenuControls, ariaMenuExpanded }: ViewContainerProps,\n menuRef: Ref<HTMLButtonElement>,\n ) => {\n const viewsRef = useRef<HTMLDivElement>(null) as MutableRefObject<HTMLDivElement>;\n const { rightDisabled, leftDisabled, toNextScrollPosition, toPrevScrollPosition } =\n useSetScrollPosition(viewsRef, children);\n\n return (\n <Container direction=\"horizontal\" alignY=\"center\" alignX=\"between\">\n <ViewsWrapper\n ref={viewsRef}\n id=\"views\"\n role=\"tablist\"\n alignY=\"center\"\n direction=\"horizontal\"\n >\n {children}\n </ViewsWrapper>\n\n <StyledInputGroup>\n {(!leftDisabled || !rightDisabled) && (\n <>\n <StyledLeftButton\n id=\"left-arrow\"\n iconSlot={<StyledLeftIcon />}\n disabled={leftDisabled}\n onClick={toPrevScrollPosition}\n variant=\"flat\"\n aria-label=\"move views to the left\"\n />\n <StyledRightButton\n id=\"right-arrow\"\n iconSlot={<StyledRightIcon />}\n disabled={rightDisabled}\n onClick={toNextScrollPosition}\n variant=\"flat\"\n aria-label=\"move views to the right\"\n />\n </>\n )}\n <StyledMenuButton\n iconSlot={<StyledMenuIcon />}\n variant=\"flat\"\n onClick={onClickMenu}\n aria-label=\"open menu\"\n aria-controls={ariaMenuControls}\n aria-expanded={ariaMenuExpanded}\n aria-haspopup={ariaMenuControls ? 'dialog' : undefined}\n ref={menuRef}\n />\n </StyledInputGroup>\n </Container>\n );\n },\n);\n"],"names":[],"mappings":";;;;MAgBa,cAAc,
|
|
1
|
+
{"version":3,"file":"ViewsContainer.js","sources":["../../../src/components/ViewsContainer/ViewsContainer.tsx"],"sourcesContent":["import React, { useRef, MutableRefObject, Ref } from 'react';\n\nimport { ViewContainerProps } from './types';\nimport {\n Container,\n StyledLeftButton,\n StyledLeftIcon,\n StyledMenuButton,\n StyledMenuIcon,\n StyledRightButton,\n StyledRightIcon,\n StyledInputGroup,\n ViewsWrapper,\n} from './styled';\nimport { useSetScrollPosition } from './hooks/useSetScrollPosition';\n\nexport const ViewsContainer = React.forwardRef<HTMLButtonElement, ViewContainerProps>(\n (\n { children, onClickMenu, ariaMenuControls, ariaMenuExpanded }: ViewContainerProps,\n menuRef: Ref<HTMLButtonElement>,\n ) => {\n const viewsRef = useRef<HTMLDivElement>(null) as MutableRefObject<HTMLDivElement>;\n const { rightDisabled, leftDisabled, toNextScrollPosition, toPrevScrollPosition } =\n useSetScrollPosition(viewsRef, children);\n\n return (\n <Container direction=\"horizontal\" alignY=\"center\" alignX=\"between\">\n <ViewsWrapper\n ref={viewsRef}\n id=\"views\"\n role=\"tablist\"\n alignY=\"center\"\n direction=\"horizontal\"\n >\n {children}\n </ViewsWrapper>\n\n <StyledInputGroup>\n {(!leftDisabled || !rightDisabled) && (\n <>\n <StyledLeftButton\n id=\"left-arrow\"\n iconSlot={<StyledLeftIcon />}\n disabled={leftDisabled}\n onClick={toPrevScrollPosition}\n variant=\"flat\"\n aria-label=\"move views to the left\"\n />\n <StyledRightButton\n id=\"right-arrow\"\n iconSlot={<StyledRightIcon />}\n disabled={rightDisabled}\n onClick={toNextScrollPosition}\n variant=\"flat\"\n aria-label=\"move views to the right\"\n />\n </>\n )}\n <StyledMenuButton\n iconSlot={<StyledMenuIcon />}\n variant=\"flat\"\n onClick={onClickMenu}\n aria-label=\"open menu\"\n aria-controls={ariaMenuControls}\n aria-expanded={ariaMenuExpanded}\n aria-haspopup={ariaMenuControls ? 'dialog' : undefined}\n ref={menuRef}\n />\n </StyledInputGroup>\n </Container>\n );\n },\n);\n"],"names":["React"],"mappings":";;;;MAgBa,cAAc,GAAGA,cAAK,CAAC,UAAU,CAC5C,CACE,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAsB,EACjF,OAA+B,KAC7B;AACF,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAqC;AACjF,IAAA,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,GAC/E,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,CAAC;AAE1C,IAAA,QACEA,cAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAC,SAAS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AAO,GACZ,CACe,CACT;AAEhB,CAAC;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { theme } from '../../theme/index.js';
|
|
3
3
|
import { isWeightMetric, isWeightImperial } from './types.js';
|
|
4
4
|
import { ComponentSize } from '../types.js';
|
|
@@ -9,18 +9,18 @@ import { invalidCharsList } from '../../utils/invalidCharactersNumeric.js';
|
|
|
9
9
|
import { InputGroupLabel } from '../InputGroup/components/InputGroupLabel/InputGroupLabel.js';
|
|
10
10
|
|
|
11
11
|
const blockInvalidChars = (e) => blockInvalidCharacters(e, invalidCharsList);
|
|
12
|
-
const WeightInput = ({ size = ComponentSize.base, hasError, className, ...rest }) => (
|
|
13
|
-
|
|
14
|
-
isWeightMetric(rest) && (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
isWeightImperial(rest) && (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
const WeightInput = ({ size = ComponentSize.base, hasError, className, ...rest }) => (React__default.createElement(Container, { className: className, role: "group", "aria-label": "Weight" },
|
|
13
|
+
React__default.createElement(Row, null,
|
|
14
|
+
isWeightMetric(rest) && (React__default.createElement(InputGroup, null,
|
|
15
|
+
React__default.createElement(StyledTextField, { name: "gram", type: "number", value: rest.gram, "aria-label": "Grams", min: "0", step: "any", size: size, hasError: hasError, onChange: rest.handleChangeGram, onKeyDown: blockInvalidChars }),
|
|
16
|
+
React__default.createElement(InputGroupLabel, { unit: "g", size: size }))),
|
|
17
|
+
isWeightImperial(rest) && (React__default.createElement(React__default.Fragment, null,
|
|
18
|
+
React__default.createElement(InputGroup, { style: { marginRight: theme.sizes.xs } },
|
|
19
|
+
React__default.createElement(StyledTextField, { name: "pound", type: "number", value: rest.pound, "aria-label": "Pounds", min: "0", step: "any", size: size, hasError: hasError, onChange: rest.handleChangePound, onKeyDown: blockInvalidChars }),
|
|
20
|
+
React__default.createElement(InputGroupLabel, { unit: "lb", size: size })),
|
|
21
|
+
React__default.createElement(InputGroup, null,
|
|
22
|
+
React__default.createElement(StyledTextField, { name: "ounce", type: "number", value: rest.ounce, "aria-label": "Ounces", min: "0", step: "any", size: size, hasError: hasError, onChange: rest.handleChangeOunce, onKeyDown: blockInvalidChars }),
|
|
23
|
+
React__default.createElement(InputGroupLabel, { unit: "oz", size: size })))))));
|
|
24
24
|
WeightInput.displayName = 'WeightInput';
|
|
25
25
|
WeightInput.defaultProps = {
|
|
26
26
|
weightUnit: 'lb',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WeightInput.js","sources":["../../../src/components/WeightInput/WeightInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { theme } from 'Theme';\nimport { WeightProps, isWeightImperial, isWeightMetric } from './types';\nimport { ComponentSize } from '../types';\nimport { InputGroup, InputGroupLabel } from '../InputGroup';\n\nimport { Container, TextField, Row } from './styled';\nimport { blockInvalidCharacters } from '../../utils/blockInvalidCharacters';\nimport { invalidCharsList } from '../../utils/invalidCharactersNumeric';\n\nconst blockInvalidChars = (e: React.KeyboardEvent) => blockInvalidCharacters(e, invalidCharsList);\n\nexport const WeightInput: FC<WeightProps> = ({\n size = ComponentSize.base,\n hasError,\n className,\n ...rest\n}: WeightProps) => (\n <Container className={className} role=\"group\" aria-label=\"Weight\">\n <Row>\n {isWeightMetric(rest) && (\n <InputGroup>\n <TextField\n name=\"gram\"\n type=\"number\"\n value={rest.gram}\n aria-label=\"Grams\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangeGram}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"g\" size={size} />\n </InputGroup>\n )}\n\n {isWeightImperial(rest) && (\n <>\n <InputGroup style={{ marginRight: theme.sizes.xs }}>\n <TextField\n name=\"pound\"\n type=\"number\"\n value={rest.pound}\n aria-label=\"Pounds\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangePound}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"lb\" size={size} />\n </InputGroup>\n <InputGroup>\n <TextField\n name=\"ounce\"\n type=\"number\"\n value={rest.ounce}\n aria-label=\"Ounces\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangeOunce}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"oz\" size={size} />\n </InputGroup>\n </>\n )}\n </Row>\n </Container>\n);\n\nWeightInput.displayName = 'WeightInput';\n\nWeightInput.defaultProps = {\n weightUnit: 'lb',\n};\n"],"names":["TextField"],"mappings":";;;;;;;;;;AAWA,MAAM,iBAAiB,GAAG,CAAC,CAAsB,KAAK,sBAAsB,CAAC,CAAC,EAAE,gBAAgB,CAAC;AAE1F,MAAM,WAAW,GAAoB,CAAC,EAC3C,IAAI,GAAG,aAAa,CAAC,IAAI,EACzB,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACK,
|
|
1
|
+
{"version":3,"file":"WeightInput.js","sources":["../../../src/components/WeightInput/WeightInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { theme } from 'Theme';\nimport { WeightProps, isWeightImperial, isWeightMetric } from './types';\nimport { ComponentSize } from '../types';\nimport { InputGroup, InputGroupLabel } from '../InputGroup';\n\nimport { Container, TextField, Row } from './styled';\nimport { blockInvalidCharacters } from '../../utils/blockInvalidCharacters';\nimport { invalidCharsList } from '../../utils/invalidCharactersNumeric';\n\nconst blockInvalidChars = (e: React.KeyboardEvent) => blockInvalidCharacters(e, invalidCharsList);\n\nexport const WeightInput: FC<WeightProps> = ({\n size = ComponentSize.base,\n hasError,\n className,\n ...rest\n}: WeightProps) => (\n <Container className={className} role=\"group\" aria-label=\"Weight\">\n <Row>\n {isWeightMetric(rest) && (\n <InputGroup>\n <TextField\n name=\"gram\"\n type=\"number\"\n value={rest.gram}\n aria-label=\"Grams\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangeGram}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"g\" size={size} />\n </InputGroup>\n )}\n\n {isWeightImperial(rest) && (\n <>\n <InputGroup style={{ marginRight: theme.sizes.xs }}>\n <TextField\n name=\"pound\"\n type=\"number\"\n value={rest.pound}\n aria-label=\"Pounds\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangePound}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"lb\" size={size} />\n </InputGroup>\n <InputGroup>\n <TextField\n name=\"ounce\"\n type=\"number\"\n value={rest.ounce}\n aria-label=\"Ounces\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangeOunce}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"oz\" size={size} />\n </InputGroup>\n </>\n )}\n </Row>\n </Container>\n);\n\nWeightInput.displayName = 'WeightInput';\n\nWeightInput.defaultProps = {\n weightUnit: 'lb',\n};\n"],"names":["React","TextField"],"mappings":";;;;;;;;;;AAWA,MAAM,iBAAiB,GAAG,CAAC,CAAsB,KAAK,sBAAsB,CAAC,CAAC,EAAE,gBAAgB,CAAC;AAE1F,MAAM,WAAW,GAAoB,CAAC,EAC3C,IAAI,GAAG,aAAa,CAAC,IAAI,EACzB,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACK,MACZA,6BAAC,SAAS,EAAA,EAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAC,OAAO,gBAAY,QAAQ,EAAA;AAC/D,IAAAA,cAAA,CAAA,aAAA,CAAC,GAAG,EAAA,IAAA;AACD,QAAA,cAAc,CAAC,IAAI,CAAC,KACnBA,6BAAC,UAAU,EAAA,IAAA;AACT,YAAAA,cAAA,CAAA,aAAA,CAACC,eAAS,EACR,EAAA,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,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AAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAChC,SAAS,EAAE,iBAAiB,EAC5B,CAAA;AACF,gBAAAD,cAAA,CAAA,aAAA,CAAC,eAAe,EAAC,EAAA,IAAI,EAAC,IAAI,EAAC,IAAI,EAAE,IAAI,EAAA,CAAI,CAC9B,CACZ,CACJ,CACG,CACI;AAGd,WAAW,CAAC,WAAW,GAAG,aAAa;AAEvC,WAAW,CAAC,YAAY,GAAG;AACzB,IAAA,UAAU,EAAE,IAAI;CACjB;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useEffect } from 'react';
|
|
2
2
|
|
|
3
3
|
const withDeprecated = (Component) => (props) => {
|
|
4
4
|
useEffect(() => {
|
|
5
5
|
// eslint-disable-next-line no-console
|
|
6
6
|
console.warn(`${Component.name} is deprecated.`);
|
|
7
7
|
}, []);
|
|
8
|
-
return
|
|
8
|
+
return React__default.createElement(Component, { ...props });
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { withDeprecated };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withDeprecated.js","sources":["../../src/hoc/withDeprecated.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\n\nexport const withDeprecated =\n <P extends object>(Component: React.ComponentType<P>): React.FC<P> =>\n (props: P) => {\n useEffect(() => {\n // eslint-disable-next-line no-console\n console.warn(`${Component.name} is deprecated.`);\n }, []);\n return <Component {...(props as P)} />;\n };\n"],"names":[],"mappings":";;AAEO,MAAM,cAAc,GACzB,CAAmB,SAAiC,KACpD,CAAC,KAAQ,KAAI;IACX,SAAS,CAAC,MAAK;;QAEb,OAAO,CAAC,IAAI,CAAC,CAAA,EAAG,SAAS,CAAC,IAAI,CAAiB,eAAA,CAAA,CAAC;KACjD,EAAE,EAAE,CAAC;AACN,IAAA,
|
|
1
|
+
{"version":3,"file":"withDeprecated.js","sources":["../../src/hoc/withDeprecated.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\n\nexport const withDeprecated =\n <P extends object>(Component: React.ComponentType<P>): React.FC<P> =>\n (props: P) => {\n useEffect(() => {\n // eslint-disable-next-line no-console\n console.warn(`${Component.name} is deprecated.`);\n }, []);\n return <Component {...(props as P)} />;\n };\n"],"names":["React"],"mappings":";;AAEO,MAAM,cAAc,GACzB,CAAmB,SAAiC,KACpD,CAAC,KAAQ,KAAI;IACX,SAAS,CAAC,MAAK;;QAEb,OAAO,CAAC,IAAI,CAAC,CAAA,EAAG,SAAS,CAAC,IAAI,CAAiB,eAAA,CAAA,CAAC;KACjD,EAAE,EAAE,CAAC;AACN,IAAA,OAAOA,cAAC,CAAA,aAAA,CAAA,SAAS,EAAM,EAAA,GAAA,KAAW,GAAI;AACxC;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { AttentionIcon } from '../../tempIcons/AttentionIcon.js';
|
|
3
3
|
import { theme } from '../../theme/index.js';
|
|
4
4
|
import { Stack } from '../../components/Stack/Stack.js';
|
|
@@ -9,18 +9,18 @@ import { useId } from '../../hooks/useId.js';
|
|
|
9
9
|
const withLabels = (Component) => ({ label, hint, error, tooltip, tooltipContent, ...otherProps }) => {
|
|
10
10
|
const componentId = useId({ id: otherProps === null || otherProps === undefined ? undefined : otherProps.id, prefix: Component.name });
|
|
11
11
|
if (!label)
|
|
12
|
-
return
|
|
13
|
-
return (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
(tooltip || tooltipContent) && (
|
|
18
|
-
|
|
19
|
-
hint &&
|
|
20
|
-
|
|
21
|
-
error && (
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
return React__default.createElement(Component, { hasError: !!error, ...otherProps });
|
|
13
|
+
return (React__default.createElement(RootStack, { spacing: "sm", alignX: "stretch" },
|
|
14
|
+
React__default.createElement("div", { style: { marginBottom: theme.sizes.xs } },
|
|
15
|
+
React__default.createElement(Stack, { direction: "horizontal", alignY: "center", spacing: "sm" },
|
|
16
|
+
React__default.createElement(Label, { id: `${componentId}-label`, htmlFor: componentId }, label),
|
|
17
|
+
(tooltip || tooltipContent) && (React__default.createElement(BlockTooltip, { text: tooltip, content: tooltipContent },
|
|
18
|
+
React__default.createElement(HelpIcon, { "data-testid": "tooltip-help", width: theme.sizes.base, height: theme.sizes.base, color: theme.colors.neutral.ink.light })))),
|
|
19
|
+
hint && React__default.createElement(Hint, { id: `${componentId}-hint` }, hint)),
|
|
20
|
+
React__default.createElement(Component, { id: componentId, hasError: !!error, ...otherProps }),
|
|
21
|
+
error && (React__default.createElement(Stack, { direction: "horizontal", alignY: "center", spacing: "xs" },
|
|
22
|
+
React__default.createElement(AttentionIcon, { width: 16, height: 16, color: theme.colors.secondary.red.base }),
|
|
23
|
+
React__default.createElement(Error, null, error)))));
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
export { withLabels };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withLabels.js","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, FC, ReactNode } from 'react';\nimport { AttentionIcon } from '../../tempIcons/AttentionIcon';\nimport { theme } from '../../theme';\nimport { Stack } from '../../components/Stack';\n\nimport { RootStack, Label, Hint, Error, BlockTooltip } from './styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { useId } from '../../hooks/useId';\n\nexport interface WithLabelsProps {\n id?: string;\n label?: ReactNode;\n hint?: ReactNode;\n error?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n}\n\nexport const withLabels =\n <P extends object>(Component: ComponentType<P>): FC<P & WithLabelsProps> =>\n ({ label, hint, error, tooltip, tooltipContent, ...otherProps }: WithLabelsProps) => {\n const componentId = useId({ id: otherProps?.id, prefix: Component.name });\n\n if (!label) return <Component hasError={!!error} {...(otherProps as P)} />;\n\n return (\n <RootStack spacing=\"sm\" alignX=\"stretch\">\n <div style={{ marginBottom: theme.sizes.xs }}>\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"sm\">\n <Label id={`${componentId}-label`} htmlFor={componentId}>\n {label}\n </Label>\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n width={theme.sizes.base}\n height={theme.sizes.base}\n color={theme.colors.neutral.ink.light}\n />\n </BlockTooltip>\n )}\n </Stack>\n {hint && <Hint id={`${componentId}-hint`}>{hint}</Hint>}\n </div>\n <Component id={componentId} hasError={!!error} {...(otherProps as P)} />\n {error && (\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"xs\">\n <AttentionIcon width={16} height={16} color={theme.colors.secondary.red.base} />\n <Error>{error}</Error>\n </Stack>\n )}\n </RootStack>\n );\n };\n"],"names":[],"mappings":";;;;;;;;AAkBa,MAAA,UAAU,GACrB,CAAmB,SAA2B,KAC9C,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,UAAU,EAAmB,KAAI;IAClF,MAAM,WAAW,GAAG,KAAK,CAAC,EAAE,EAAE,EAAE,UAAU,KAAA,IAAA,IAAV,UAAU,KAAA,SAAA,GAAA,SAAA,GAAV,UAAU,CAAE,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;AAEzE,IAAA,IAAI,CAAC,KAAK;QAAE,
|
|
1
|
+
{"version":3,"file":"withLabels.js","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, FC, ReactNode } from 'react';\nimport { AttentionIcon } from '../../tempIcons/AttentionIcon';\nimport { theme } from '../../theme';\nimport { Stack } from '../../components/Stack';\n\nimport { RootStack, Label, Hint, Error, BlockTooltip } from './styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { useId } from '../../hooks/useId';\n\nexport interface WithLabelsProps {\n id?: string;\n label?: ReactNode;\n hint?: ReactNode;\n error?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n}\n\nexport const withLabels =\n <P extends object>(Component: ComponentType<P>): FC<P & WithLabelsProps> =>\n ({ label, hint, error, tooltip, tooltipContent, ...otherProps }: WithLabelsProps) => {\n const componentId = useId({ id: otherProps?.id, prefix: Component.name });\n\n if (!label) return <Component hasError={!!error} {...(otherProps as P)} />;\n\n return (\n <RootStack spacing=\"sm\" alignX=\"stretch\">\n <div style={{ marginBottom: theme.sizes.xs }}>\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"sm\">\n <Label id={`${componentId}-label`} htmlFor={componentId}>\n {label}\n </Label>\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n width={theme.sizes.base}\n height={theme.sizes.base}\n color={theme.colors.neutral.ink.light}\n />\n </BlockTooltip>\n )}\n </Stack>\n {hint && <Hint id={`${componentId}-hint`}>{hint}</Hint>}\n </div>\n <Component id={componentId} hasError={!!error} {...(otherProps as P)} />\n {error && (\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"xs\">\n <AttentionIcon width={16} height={16} color={theme.colors.secondary.red.base} />\n <Error>{error}</Error>\n </Stack>\n )}\n </RootStack>\n );\n };\n"],"names":["React"],"mappings":";;;;;;;;AAkBa,MAAA,UAAU,GACrB,CAAmB,SAA2B,KAC9C,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,UAAU,EAAmB,KAAI;IAClF,MAAM,WAAW,GAAG,KAAK,CAAC,EAAE,EAAE,EAAE,UAAU,KAAA,IAAA,IAAV,UAAU,KAAA,SAAA,GAAA,SAAA,GAAV,UAAU,CAAE,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;AAEzE,IAAA,IAAI,CAAC,KAAK;QAAE,OAAOA,cAAA,CAAA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AAQ,EAAE,CAAC,CAAC,KAAK,EAAA,GAAO,UAAgB,EAAI,CAAA;AACvE,QAAA,KAAK,KACJA,cAAC,CAAA,aAAA,CAAA,KAAK,IAAC,SAAS,EAAC,YAAY,EAAC,MAAM,EAAC,QAAQ,EAAC,OAAO,EAAC,IAAI,EAAA;YACxDA,cAAC,CAAA,aAAA,CAAA,aAAa,IAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAI,CAAA;YAChFA,cAAC,CAAA,aAAA,CAAA,KAAK,QAAE,KAAK,CAAS,CAChB,CACT,CACS;AAEhB;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useState, useEffect } from 'react';
|
|
2
2
|
|
|
3
3
|
// A React hook based on: https://github.com/WICG/focus-visible
|
|
4
|
-
const FocusVisibleContext =
|
|
4
|
+
const FocusVisibleContext = React__default.createContext({
|
|
5
5
|
hadKeyboardEvent: true,
|
|
6
6
|
isInitialized: false,
|
|
7
7
|
});
|
|
@@ -106,16 +106,16 @@ function FocusVisibleManager({ children }) {
|
|
|
106
106
|
}, [setHadKeyboardEvent]);
|
|
107
107
|
return (
|
|
108
108
|
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
109
|
-
|
|
109
|
+
React__default.createElement(FocusVisibleContext.Provider, { value: { hadKeyboardEvent, isInitialized: true } }, children));
|
|
110
110
|
}
|
|
111
111
|
function useFocusVisible() {
|
|
112
|
-
const [isFocused, setIsFocused] =
|
|
113
|
-
const { hadKeyboardEvent, isInitialized } =
|
|
114
|
-
const onFocus =
|
|
112
|
+
const [isFocused, setIsFocused] = React__default.useState(false);
|
|
113
|
+
const { hadKeyboardEvent, isInitialized } = React__default.useContext(FocusVisibleContext);
|
|
114
|
+
const onFocus = React__default.useCallback(() => {
|
|
115
115
|
if (!isFocused)
|
|
116
116
|
setIsFocused(true);
|
|
117
117
|
}, [isFocused]);
|
|
118
|
-
const onBlur =
|
|
118
|
+
const onBlur = React__default.useCallback(() => {
|
|
119
119
|
if (isFocused)
|
|
120
120
|
setIsFocused(false);
|
|
121
121
|
}, [isFocused]);
|
|
@@ -127,7 +127,7 @@ function useFocusVisible() {
|
|
|
127
127
|
// Fallback to focused when the `FocusVisibleManager` is not used.
|
|
128
128
|
focusVisible = isFocused;
|
|
129
129
|
}
|
|
130
|
-
return
|
|
130
|
+
return React__default.useMemo(() => ({
|
|
131
131
|
focusVisible,
|
|
132
132
|
onFocus,
|
|
133
133
|
onBlur,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusVisible.js","sources":["../../src/hooks/useFocusVisible.tsx"],"sourcesContent":["import React, { PropsWithChildren, useEffect, useState } from 'react';\n\n// A React hook based on: https://github.com/WICG/focus-visible\n\nexport const FocusVisibleContext = React.createContext({\n hadKeyboardEvent: true,\n isInitialized: false,\n});\n\nexport function FocusVisibleManager({ children }: PropsWithChildren<{}>) {\n const [hadKeyboardEvent, setHadKeyboardEvent] = useState(true);\n\n useEffect(() => {\n function onPointerDown() {\n setHadKeyboardEvent(false);\n }\n\n /**\n * When the polfyill first loads, assume the user is in keyboard modality.\n * If any event is received from a pointing device (e.g. mouse, pointer,\n * touch), turn off keyboard modality.\n * This accounts for situations where focus enters the page from the URL bar.\n * @param {Event} e\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function onInitialPointerMove(e: any) {\n // Work around a Safari quirk that fires a mousemove on <html> whenever the\n // window blurs, even if you're tabbing out of the page. ¯\\_(ツ)_/¯\n if (e.target.nodeName && e.target.nodeName.toLowerCase() === 'html') {\n return;\n }\n\n setHadKeyboardEvent(false);\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n removeInitialPointerMoveListeners();\n }\n\n /**\n * Add a group of listeners to detect usage of any pointing devices.\n * These listeners will be added when the polyfill first loads, and anytime\n * the window is blurred, so that they are active when the window regains\n * focus.\n */\n function addInitialPointerMoveListeners() {\n document.addEventListener('mousemove', onInitialPointerMove);\n document.addEventListener('mousedown', onInitialPointerMove);\n document.addEventListener('mouseup', onInitialPointerMove);\n document.addEventListener('pointermove', onInitialPointerMove);\n document.addEventListener('pointerdown', onInitialPointerMove);\n document.addEventListener('pointerup', onInitialPointerMove);\n document.addEventListener('touchmove', onInitialPointerMove);\n document.addEventListener('touchstart', onInitialPointerMove);\n document.addEventListener('touchend', onInitialPointerMove);\n }\n\n function removeInitialPointerMoveListeners() {\n document.removeEventListener('mousemove', onInitialPointerMove);\n document.removeEventListener('mousedown', onInitialPointerMove);\n document.removeEventListener('mouseup', onInitialPointerMove);\n document.removeEventListener('pointermove', onInitialPointerMove);\n document.removeEventListener('pointerdown', onInitialPointerMove);\n document.removeEventListener('pointerup', onInitialPointerMove);\n document.removeEventListener('touchmove', onInitialPointerMove);\n document.removeEventListener('touchstart', onInitialPointerMove);\n document.removeEventListener('touchend', onInitialPointerMove);\n }\n\n /**\n * If the most recent user interaction was via the keyboard;\n * and the key press did not include a meta, alt/option, or control key;\n * then the modality is keyboard. Otherwise, the modality is not keyboard.\n * Apply `focus-visible` to any current active element and keep track\n * of our keyboard modality state with `hadKeyboardEvent`.\n * @param {KeyboardEvent} e\n */\n function onKeyDown(e: KeyboardEvent) {\n if (e.metaKey || e.altKey || e.ctrlKey) {\n return;\n }\n\n setHadKeyboardEvent(true);\n }\n /**\n * If the user changes tabs, keep track of whether or not the previously\n * focused element had .focus-visible.\n * @param {Event} e\n */\n function onVisibilityChange() {\n if (document.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the class when the user switches back to the tab.\n setHadKeyboardEvent(true);\n addInitialPointerMoveListeners();\n }\n }\n\n // For some kinds of state, we are interested in changes at the global scope\n // only. For example, global pointer input, global key presses and global\n // visibility change should affect the state at every scope:\n document.addEventListener('keydown', onKeyDown, true);\n document.addEventListener('mousedown', onPointerDown, true);\n document.addEventListener('pointerdown', onPointerDown, true);\n document.addEventListener('touchstart', onPointerDown, true);\n document.addEventListener('visibilitychange', onVisibilityChange, true);\n\n addInitialPointerMoveListeners();\n\n return () => {\n document.removeEventListener('keydown', onKeyDown, true);\n document.removeEventListener('mousedown', onPointerDown, true);\n document.removeEventListener('pointerdown', onPointerDown, true);\n document.removeEventListener('touchstart', onPointerDown, true);\n document.removeEventListener('visibilitychange', onVisibilityChange, true);\n\n removeInitialPointerMoveListeners();\n };\n }, [setHadKeyboardEvent]);\n\n return (\n // eslint-disable-next-line react/jsx-no-constructed-context-values\n <FocusVisibleContext.Provider value={{ hadKeyboardEvent, isInitialized: true }}>\n {children}\n </FocusVisibleContext.Provider>\n );\n}\n\nexport function useFocusVisible() {\n const [isFocused, setIsFocused] = React.useState(false);\n const { hadKeyboardEvent, isInitialized } = React.useContext(FocusVisibleContext);\n\n const onFocus = React.useCallback(() => {\n if (!isFocused) setIsFocused(true);\n }, [isFocused]);\n\n const onBlur = React.useCallback(() => {\n if (isFocused) setIsFocused(false);\n }, [isFocused]);\n\n let focusVisible: boolean;\n if (isInitialized) {\n focusVisible = hadKeyboardEvent && isFocused;\n } else {\n // Fallback to focused when the `FocusVisibleManager` is not used.\n focusVisible = isFocused;\n }\n\n return React.useMemo(\n () => ({\n focusVisible,\n onFocus,\n onBlur,\n }),\n [focusVisible, onBlur, onFocus],\n );\n}\n"],"names":[],"mappings":";;AAEA;AAEa,MAAA,mBAAmB,
|
|
1
|
+
{"version":3,"file":"useFocusVisible.js","sources":["../../src/hooks/useFocusVisible.tsx"],"sourcesContent":["import React, { PropsWithChildren, useEffect, useState } from 'react';\n\n// A React hook based on: https://github.com/WICG/focus-visible\n\nexport const FocusVisibleContext = React.createContext({\n hadKeyboardEvent: true,\n isInitialized: false,\n});\n\nexport function FocusVisibleManager({ children }: PropsWithChildren<{}>) {\n const [hadKeyboardEvent, setHadKeyboardEvent] = useState(true);\n\n useEffect(() => {\n function onPointerDown() {\n setHadKeyboardEvent(false);\n }\n\n /**\n * When the polfyill first loads, assume the user is in keyboard modality.\n * If any event is received from a pointing device (e.g. mouse, pointer,\n * touch), turn off keyboard modality.\n * This accounts for situations where focus enters the page from the URL bar.\n * @param {Event} e\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function onInitialPointerMove(e: any) {\n // Work around a Safari quirk that fires a mousemove on <html> whenever the\n // window blurs, even if you're tabbing out of the page. ¯\\_(ツ)_/¯\n if (e.target.nodeName && e.target.nodeName.toLowerCase() === 'html') {\n return;\n }\n\n setHadKeyboardEvent(false);\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n removeInitialPointerMoveListeners();\n }\n\n /**\n * Add a group of listeners to detect usage of any pointing devices.\n * These listeners will be added when the polyfill first loads, and anytime\n * the window is blurred, so that they are active when the window regains\n * focus.\n */\n function addInitialPointerMoveListeners() {\n document.addEventListener('mousemove', onInitialPointerMove);\n document.addEventListener('mousedown', onInitialPointerMove);\n document.addEventListener('mouseup', onInitialPointerMove);\n document.addEventListener('pointermove', onInitialPointerMove);\n document.addEventListener('pointerdown', onInitialPointerMove);\n document.addEventListener('pointerup', onInitialPointerMove);\n document.addEventListener('touchmove', onInitialPointerMove);\n document.addEventListener('touchstart', onInitialPointerMove);\n document.addEventListener('touchend', onInitialPointerMove);\n }\n\n function removeInitialPointerMoveListeners() {\n document.removeEventListener('mousemove', onInitialPointerMove);\n document.removeEventListener('mousedown', onInitialPointerMove);\n document.removeEventListener('mouseup', onInitialPointerMove);\n document.removeEventListener('pointermove', onInitialPointerMove);\n document.removeEventListener('pointerdown', onInitialPointerMove);\n document.removeEventListener('pointerup', onInitialPointerMove);\n document.removeEventListener('touchmove', onInitialPointerMove);\n document.removeEventListener('touchstart', onInitialPointerMove);\n document.removeEventListener('touchend', onInitialPointerMove);\n }\n\n /**\n * If the most recent user interaction was via the keyboard;\n * and the key press did not include a meta, alt/option, or control key;\n * then the modality is keyboard. Otherwise, the modality is not keyboard.\n * Apply `focus-visible` to any current active element and keep track\n * of our keyboard modality state with `hadKeyboardEvent`.\n * @param {KeyboardEvent} e\n */\n function onKeyDown(e: KeyboardEvent) {\n if (e.metaKey || e.altKey || e.ctrlKey) {\n return;\n }\n\n setHadKeyboardEvent(true);\n }\n /**\n * If the user changes tabs, keep track of whether or not the previously\n * focused element had .focus-visible.\n * @param {Event} e\n */\n function onVisibilityChange() {\n if (document.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the class when the user switches back to the tab.\n setHadKeyboardEvent(true);\n addInitialPointerMoveListeners();\n }\n }\n\n // For some kinds of state, we are interested in changes at the global scope\n // only. For example, global pointer input, global key presses and global\n // visibility change should affect the state at every scope:\n document.addEventListener('keydown', onKeyDown, true);\n document.addEventListener('mousedown', onPointerDown, true);\n document.addEventListener('pointerdown', onPointerDown, true);\n document.addEventListener('touchstart', onPointerDown, true);\n document.addEventListener('visibilitychange', onVisibilityChange, true);\n\n addInitialPointerMoveListeners();\n\n return () => {\n document.removeEventListener('keydown', onKeyDown, true);\n document.removeEventListener('mousedown', onPointerDown, true);\n document.removeEventListener('pointerdown', onPointerDown, true);\n document.removeEventListener('touchstart', onPointerDown, true);\n document.removeEventListener('visibilitychange', onVisibilityChange, true);\n\n removeInitialPointerMoveListeners();\n };\n }, [setHadKeyboardEvent]);\n\n return (\n // eslint-disable-next-line react/jsx-no-constructed-context-values\n <FocusVisibleContext.Provider value={{ hadKeyboardEvent, isInitialized: true }}>\n {children}\n </FocusVisibleContext.Provider>\n );\n}\n\nexport function useFocusVisible() {\n const [isFocused, setIsFocused] = React.useState(false);\n const { hadKeyboardEvent, isInitialized } = React.useContext(FocusVisibleContext);\n\n const onFocus = React.useCallback(() => {\n if (!isFocused) setIsFocused(true);\n }, [isFocused]);\n\n const onBlur = React.useCallback(() => {\n if (isFocused) setIsFocused(false);\n }, [isFocused]);\n\n let focusVisible: boolean;\n if (isInitialized) {\n focusVisible = hadKeyboardEvent && isFocused;\n } else {\n // Fallback to focused when the `FocusVisibleManager` is not used.\n focusVisible = isFocused;\n }\n\n return React.useMemo(\n () => ({\n focusVisible,\n onFocus,\n onBlur,\n }),\n [focusVisible, onBlur, onFocus],\n );\n}\n"],"names":["React"],"mappings":";;AAEA;AAEa,MAAA,mBAAmB,GAAGA,cAAK,CAAC,aAAa,CAAC;AACrD,IAAA,gBAAgB,EAAE,IAAI;AACtB,IAAA,aAAa,EAAE,KAAK;AACrB,CAAA;AAEe,SAAA,mBAAmB,CAAC,EAAE,QAAQ,EAAyB,EAAA;IACrE,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC;IAE9D,SAAS,CAAC,MAAK;AACb,QAAA,SAAS,aAAa,GAAA;YACpB,mBAAmB,CAAC,KAAK,CAAC;;AAG5B;;;;;;AAMG;;QAEH,SAAS,oBAAoB,CAAC,CAAM,EAAA;;;AAGlC,YAAA,IAAI,CAAC,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,MAAM,EAAE;gBACnE;AACD;YAED,mBAAmB,CAAC,KAAK,CAAC;;AAE1B,YAAA,iCAAiC,EAAE;;AAGrC;;;;;AAKG;AACH,QAAA,SAAS,8BAA8B,GAAA;AACrC,YAAA,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,oBAAoB,CAAC;AAC5D,YAAA,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,oBAAoB,CAAC;AAC5D,YAAA,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,oBAAoB,CAAC;AAC1D,YAAA,QAAQ,CAAC,gBAAgB,CAAC,aAAa,EAAE,oBAAoB,CAAC;AAC9D,YAAA,QAAQ,CAAC,gBAAgB,CAAC,aAAa,EAAE,oBAAoB,CAAC;AAC9D,Y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AU,CAAC,mBAAmB,CAAC;AAEjF,IAAA,MAAM,OAAO,GAAGA,cAAK,CAAC,WAAW,CAAC,MAAK;AACrC,QAAA,IAAI,CAAC,SAAS;YAAE,YAAY,CAAC,IAAI,CAAC;AACpC,KAAC,EAAE,CAAC,SAAS,CAAC,CAAC;AAEf,IAAA,MAAM,MAAM,GAAGA,cAAK,CAAC,WAAW,CAAC,MAAK;AACpC,QAAA,IAAI,SAAS;YAAE,YAAY,CAAC,KAAK,CAAC;AACpC,KAAC,EAAE,CAAC,SAAS,CAAC,CAAC;AAEf,IAAA,IAAI,YAAqB;AACzB,IAAA,IAAI,aAAa,EAAE;AACjB,QAAA,YAAY,GAAG,gBAAgB,IAAI,SAAS;AAC7C;AAAM,SAAA;;QAEL,YAAY,GAAG,SAAS;AACzB;AAED,IAAA,OAAOA,cAAK,CAAC,OAAO,CAClB,OAAO;QACL,YAAY;QACZ,OAAO;QACP,MAAM;KACP,CAAC,EACF,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,CAChC;AACH;;;;"}
|
package/dist/index.cjs
CHANGED
|
@@ -90,6 +90,43 @@ var color = require('./utils/color.cjs');
|
|
|
90
90
|
var generateId = require('./utils/generateId.cjs');
|
|
91
91
|
var isExternalLink = require('./utils/isExternalLink.cjs');
|
|
92
92
|
var index$6 = require('./theme/index.cjs');
|
|
93
|
+
var ActiveCheckboxIcon = require('./tempIcons/ActiveCheckboxIcon.cjs');
|
|
94
|
+
var ActiveRadioIcon = require('./tempIcons/ActiveRadioIcon.cjs');
|
|
95
|
+
var ArrowDownIcon = require('./tempIcons/ArrowDownIcon.cjs');
|
|
96
|
+
var ArrowUpIcon = require('./tempIcons/ArrowUpIcon.cjs');
|
|
97
|
+
var AttentionIcon = require('./tempIcons/AttentionIcon.cjs');
|
|
98
|
+
var CalendarIcon = require('./tempIcons/CalendarIcon.cjs');
|
|
99
|
+
var ClipboardIcon = require('./tempIcons/ClipboardIcon.cjs');
|
|
100
|
+
var CrossIcon = require('./tempIcons/CrossIcon.cjs');
|
|
101
|
+
var DashboardIcon = require('./tempIcons/DashboardIcon.cjs');
|
|
102
|
+
var DestructiveIcon = require('./tempIcons/DestructiveIcon.cjs');
|
|
103
|
+
var DoubleArrowAscIcon = require('./tempIcons/DoubleArrowAscIcon.cjs');
|
|
104
|
+
var DoubleArrowDescIcon = require('./tempIcons/DoubleArrowDescIcon.cjs');
|
|
105
|
+
var DoubleArrowIcon = require('./tempIcons/DoubleArrowIcon.cjs');
|
|
106
|
+
var DownArrowIcon = require('./tempIcons/DownArrowIcon.cjs');
|
|
107
|
+
var DragIndicatorIcon = require('./tempIcons/DragIndicatorIcon.cjs');
|
|
108
|
+
var DropdownIcon = require('./tempIcons/DropdownIcon.cjs');
|
|
109
|
+
var EditIcon = require('./tempIcons/EditIcon.cjs');
|
|
110
|
+
var EndArrowIcon = require('./tempIcons/EndArrowIcon.cjs');
|
|
111
|
+
var FailIcon = require('./tempIcons/FailIcon.cjs');
|
|
112
|
+
var HelpIcon = require('./tempIcons/HelpIcon.cjs');
|
|
113
|
+
var InactiveCheckboxIcon = require('./tempIcons/InactiveCheckboxIcon.cjs');
|
|
114
|
+
var InactiveRadioIcon = require('./tempIcons/InactiveRadioIcon.cjs');
|
|
115
|
+
var InfoIcon = require('./tempIcons/InfoIcon.cjs');
|
|
116
|
+
var LeftArrowIcon = require('./tempIcons/LeftArrowIcon.cjs');
|
|
117
|
+
var MergeIcon = require('./tempIcons/MergeIcon.cjs');
|
|
118
|
+
var PlusIcon = require('./tempIcons/PlusIcon.cjs');
|
|
119
|
+
var RecommendIcon = require('./tempIcons/RecommendIcon.cjs');
|
|
120
|
+
var ReorderIcon = require('./tempIcons/ReorderIcon.cjs');
|
|
121
|
+
var RightArrowIcon = require('./tempIcons/RightArrowIcon.cjs');
|
|
122
|
+
var SearchIcon = require('./tempIcons/SearchIcon.cjs');
|
|
123
|
+
var StartArrowIcon = require('./tempIcons/StartArrowIcon.cjs');
|
|
124
|
+
var SuccessIcon = require('./tempIcons/SuccessIcon.cjs');
|
|
125
|
+
var ThreeDotsIcon = require('./tempIcons/ThreeDotsIcon.cjs');
|
|
126
|
+
var UpArrowIcon = require('./tempIcons/UpArrowIcon.cjs');
|
|
127
|
+
var VisibilityIcon = require('./tempIcons/VisibilityIcon.cjs');
|
|
128
|
+
var VisibilityOffIcon = require('./tempIcons/VisibilityOffIcon.cjs');
|
|
129
|
+
var WarningIcon = require('./tempIcons/WarningIcon.cjs');
|
|
93
130
|
var utils = require('./theme/utils.cjs');
|
|
94
131
|
|
|
95
132
|
|
|
@@ -200,5 +237,42 @@ exports.hexToRgb = color.hexToRgb;
|
|
|
200
237
|
exports.generateId = generateId.generateId;
|
|
201
238
|
exports.isExternalLink = isExternalLink.isExternalLink;
|
|
202
239
|
exports.theme = index$6.theme;
|
|
240
|
+
exports.ActiveCheckboxIcon = ActiveCheckboxIcon.ActiveCheckboxIcon;
|
|
241
|
+
exports.ActiveRadioIcon = ActiveRadioIcon.ActiveRadioIcon;
|
|
242
|
+
exports.ArrowDownIcon = ArrowDownIcon.ArrowDownIcon;
|
|
243
|
+
exports.ArrowUpIcon = ArrowUpIcon.ArrowUpIcon;
|
|
244
|
+
exports.AttentionIcon = AttentionIcon.AttentionIcon;
|
|
245
|
+
exports.CalendarIcon = CalendarIcon.CalendarIcon;
|
|
246
|
+
exports.ClipboardIcon = ClipboardIcon.ClipboardIcon;
|
|
247
|
+
exports.CrossIcon = CrossIcon.CrossIcon;
|
|
248
|
+
exports.DashboardIcon = DashboardIcon.DashboardIcon;
|
|
249
|
+
exports.DestructiveIcon = DestructiveIcon.DestructiveIcon;
|
|
250
|
+
exports.DoubleArrowAscIcon = DoubleArrowAscIcon.DoubleArrowAscIcon;
|
|
251
|
+
exports.DoubleArrowDescIcon = DoubleArrowDescIcon.DoubleArrowDescIcon;
|
|
252
|
+
exports.DoubleArrowIcon = DoubleArrowIcon.DoubleArrowIcon;
|
|
253
|
+
exports.DownArrowIcon = DownArrowIcon.DownArrowIcon;
|
|
254
|
+
exports.DragIndicatorIcon = DragIndicatorIcon.DragIndicatorIcon;
|
|
255
|
+
exports.DropdownIcon = DropdownIcon.DropdownIcon;
|
|
256
|
+
exports.EditIcon = EditIcon.EditIcon;
|
|
257
|
+
exports.EndArrowIcon = EndArrowIcon.EndArrowIcon;
|
|
258
|
+
exports.FailIcon = FailIcon.FailIcon;
|
|
259
|
+
exports.HelpIcon = HelpIcon.HelpIcon;
|
|
260
|
+
exports.InactiveCheckboxIcon = InactiveCheckboxIcon.InactiveCheckboxIcon;
|
|
261
|
+
exports.InactiveRadioIcon = InactiveRadioIcon.InactiveRadioIcon;
|
|
262
|
+
exports.InfoIcon = InfoIcon.InfoIcon;
|
|
263
|
+
exports.LeftArrowIcon = LeftArrowIcon.LeftArrowIcon;
|
|
264
|
+
exports.MergeIcon = MergeIcon.MergeIcon;
|
|
265
|
+
exports.PlusIcon = PlusIcon.PlusIcon;
|
|
266
|
+
exports.RecommendIcon = RecommendIcon.RecommendIcon;
|
|
267
|
+
exports.ReorderIcon = ReorderIcon.ReorderIcon;
|
|
268
|
+
exports.RightArrowIcon = RightArrowIcon.RightArrowIcon;
|
|
269
|
+
exports.SearchIcon = SearchIcon.SearchIcon;
|
|
270
|
+
exports.StartArrowIcon = StartArrowIcon.StartArrowIcon;
|
|
271
|
+
exports.SuccessIcon = SuccessIcon.SuccessIcon;
|
|
272
|
+
exports.ThreeDotsIcon = ThreeDotsIcon.ThreeDotsIcon;
|
|
273
|
+
exports.UpArrowIcon = UpArrowIcon.UpArrowIcon;
|
|
274
|
+
exports.VisibilityIcon = VisibilityIcon.VisibilityIcon;
|
|
275
|
+
exports.VisibilityOffIcon = VisibilityOffIcon.VisibilityOffIcon;
|
|
276
|
+
exports.WarningIcon = WarningIcon.WarningIcon;
|
|
203
277
|
exports.getTextStyles = utils.getTextStyles;
|
|
204
278
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED