@telus-uds/components-base 2.4.0 → 3.0.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/CHANGELOG.md +33 -2
- package/lib/cjs/A11yInfoProvider/index.js +73 -0
- package/lib/cjs/A11yText/index.js +75 -0
- package/lib/cjs/ActionCard/ActionCard.js +349 -0
- package/lib/cjs/ActionCard/index.js +9 -0
- package/lib/cjs/ActivityIndicator/Spinner.js +85 -0
- package/lib/cjs/ActivityIndicator/Spinner.native.js +151 -0
- package/lib/cjs/ActivityIndicator/index.js +51 -0
- package/lib/cjs/ActivityIndicator/shared.js +20 -0
- package/lib/cjs/Autocomplete/Autocomplete.js +480 -0
- package/lib/cjs/Autocomplete/Loading.js +42 -0
- package/lib/cjs/Autocomplete/Suggestions.js +71 -0
- package/lib/cjs/Autocomplete/constants.js +10 -0
- package/lib/cjs/Autocomplete/dictionary.js +18 -0
- package/lib/cjs/Autocomplete/index.js +9 -0
- package/lib/cjs/Badge/Badge.js +109 -0
- package/lib/cjs/Badge/index.js +9 -0
- package/lib/cjs/BaseProvider/HydrationContext.js +56 -0
- package/lib/cjs/BaseProvider/index.js +46 -0
- package/lib/cjs/Box/Box.js +385 -0
- package/lib/cjs/Box/backgroundImageStylesMap.js +100 -0
- package/lib/cjs/Box/index.js +9 -0
- package/lib/cjs/Button/Button.js +43 -0
- package/lib/cjs/Button/ButtonBase.js +353 -0
- package/lib/cjs/Button/ButtonDropdown.js +182 -0
- package/lib/cjs/Button/ButtonGroup.js +279 -0
- package/lib/cjs/Button/ButtonLink.js +57 -0
- package/lib/cjs/Button/index.js +34 -0
- package/lib/cjs/Button/propTypes.js +53 -0
- package/lib/cjs/Card/Card.js +334 -0
- package/lib/cjs/Card/CardBase.js +127 -0
- package/lib/cjs/Card/PressableCardBase.js +121 -0
- package/lib/cjs/Card/index.js +32 -0
- package/lib/cjs/CardGroup/CardGroup.js +219 -0
- package/lib/cjs/CardGroup/dictionary.js +14 -0
- package/lib/cjs/CardGroup/index.js +9 -0
- package/lib/cjs/Carousel/Carousel.js +1046 -0
- package/lib/cjs/Carousel/CarouselContext.js +59 -0
- package/lib/cjs/Carousel/CarouselFirstFocus/CarouselFirstFocus.js +57 -0
- package/lib/cjs/Carousel/CarouselItem/CarouselItem.js +185 -0
- package/lib/cjs/Carousel/CarouselItem/index.js +9 -0
- package/lib/cjs/Carousel/CarouselStepTracker/CarouselStepTracker.js +101 -0
- package/lib/cjs/Carousel/CarouselStepTracker/index.js +9 -0
- package/lib/cjs/Carousel/CarouselTabs/CarouselTabs.js +54 -0
- package/lib/cjs/Carousel/CarouselTabs/CarouselTabsPanel.js +95 -0
- package/lib/cjs/Carousel/CarouselTabs/CarouselTabsPanelItem.js +125 -0
- package/lib/cjs/Carousel/CarouselTabs/index.js +9 -0
- package/lib/cjs/Carousel/CarouselThumbnail.js +120 -0
- package/lib/cjs/Carousel/CarouselThumbnailNavigation.js +78 -0
- package/lib/cjs/Carousel/Constants.js +13 -0
- package/lib/cjs/Carousel/dictionary.js +28 -0
- package/lib/cjs/Carousel/index.js +36 -0
- package/lib/cjs/Checkbox/Checkbox.js +349 -0
- package/lib/cjs/Checkbox/CheckboxButton.js +171 -0
- package/lib/cjs/Checkbox/CheckboxGroup.js +249 -0
- package/lib/cjs/Checkbox/CheckboxInput.js +55 -0
- package/lib/cjs/Checkbox/CheckboxInput.native.js +11 -0
- package/lib/cjs/Checkbox/index.js +16 -0
- package/lib/cjs/CheckboxCard/CheckboxCard.js +191 -0
- package/lib/cjs/CheckboxCard/index.js +9 -0
- package/lib/cjs/CheckboxCardGroup/CheckboxCardGroup.js +215 -0
- package/lib/cjs/CheckboxCardGroup/index.js +9 -0
- package/lib/cjs/ColourToggle/ColourBubble.js +133 -0
- package/lib/cjs/ColourToggle/ColourToggle.js +98 -0
- package/lib/cjs/ColourToggle/index.js +9 -0
- package/lib/cjs/Divider/Divider.js +138 -0
- package/lib/cjs/Divider/index.js +9 -0
- package/lib/cjs/DownloadApp/DownloadApp.js +167 -0
- package/lib/cjs/DownloadApp/dictionary.js +16 -0
- package/lib/cjs/DownloadApp/index.js +9 -0
- package/lib/cjs/ExpandCollapse/Accordion.js +20 -0
- package/lib/cjs/ExpandCollapse/Control.js +170 -0
- package/lib/cjs/ExpandCollapse/ExpandCollapse.js +105 -0
- package/lib/cjs/ExpandCollapse/Panel.js +248 -0
- package/lib/cjs/ExpandCollapse/dictionary.js +16 -0
- package/lib/cjs/ExpandCollapse/index.js +19 -0
- package/lib/cjs/ExpandCollapseMini/ExpandCollapseMini.js +84 -0
- package/lib/cjs/ExpandCollapseMini/ExpandCollapseMiniControl.js +133 -0
- package/lib/cjs/ExpandCollapseMini/index.js +9 -0
- package/lib/cjs/Feedback/Feedback.js +167 -0
- package/lib/cjs/Feedback/index.js +9 -0
- package/lib/cjs/Fieldset/Fieldset.js +198 -0
- package/lib/cjs/Fieldset/FieldsetContainer.js +55 -0
- package/lib/cjs/Fieldset/FieldsetContainer.native.js +39 -0
- package/lib/cjs/Fieldset/Legend.js +29 -0
- package/lib/cjs/Fieldset/Legend.native.js +36 -0
- package/lib/cjs/Fieldset/cssReset.js +20 -0
- package/lib/cjs/Fieldset/index.js +9 -0
- package/lib/cjs/FileUpload/FileUpload.js +370 -0
- package/lib/cjs/FileUpload/NotificationContent.js +59 -0
- package/lib/cjs/FileUpload/dictionary.js +50 -0
- package/lib/cjs/FileUpload/index.js +9 -0
- package/lib/cjs/FlexGrid/Col/Col.js +264 -0
- package/lib/cjs/FlexGrid/Col/index.js +9 -0
- package/lib/cjs/FlexGrid/FlexGrid.js +165 -0
- package/lib/cjs/FlexGrid/Row/Row.js +188 -0
- package/lib/cjs/FlexGrid/Row/index.js +9 -0
- package/lib/cjs/FlexGrid/helpers/index.js +21 -0
- package/lib/cjs/FlexGrid/index.js +9 -0
- package/lib/cjs/FlexGrid/providers/GutterContext.js +10 -0
- package/lib/cjs/Footnote/Footnote.js +323 -0
- package/lib/cjs/Footnote/FootnoteLink.js +114 -0
- package/lib/cjs/Footnote/dictionary.js +18 -0
- package/lib/cjs/Footnote/index.js +11 -0
- package/lib/cjs/HorizontalScroll/HorizontalScroll.js +175 -0
- package/lib/cjs/HorizontalScroll/HorizontalScrollButton.js +86 -0
- package/lib/cjs/HorizontalScroll/ScrollViewEnd.js +53 -0
- package/lib/cjs/HorizontalScroll/ScrollViewEnd.native.js +32 -0
- package/lib/cjs/HorizontalScroll/dictionary.js +17 -0
- package/lib/cjs/HorizontalScroll/index.js +26 -0
- package/lib/cjs/HorizontalScroll/itemPositions.js +122 -0
- package/lib/cjs/Icon/Icon.js +101 -0
- package/lib/cjs/Icon/IconText.js +117 -0
- package/lib/cjs/Icon/index.js +24 -0
- package/lib/cjs/IconButton/IconButton.js +208 -0
- package/lib/cjs/IconButton/index.js +9 -0
- package/lib/cjs/InputLabel/InputLabel.js +184 -0
- package/lib/cjs/InputLabel/LabelContent.js +35 -0
- package/lib/cjs/InputLabel/LabelContent.native.js +26 -0
- package/lib/cjs/InputLabel/index.js +9 -0
- package/lib/cjs/InputSupports/InputSupports.js +140 -0
- package/lib/cjs/InputSupports/dictionary.js +18 -0
- package/lib/cjs/InputSupports/index.js +9 -0
- package/lib/cjs/InputSupports/useInputSupports.js +47 -0
- package/lib/cjs/Link/ChevronLink.js +73 -0
- package/lib/cjs/Link/InlinePressable.js +53 -0
- package/lib/cjs/Link/InlinePressable.native.js +93 -0
- package/lib/cjs/Link/Link.js +35 -0
- package/lib/cjs/Link/LinkBase.js +283 -0
- package/lib/cjs/Link/TextButton.js +48 -0
- package/lib/cjs/Link/index.js +34 -0
- package/lib/cjs/List/List.js +83 -0
- package/lib/cjs/List/ListItem.js +37 -0
- package/lib/cjs/List/ListItemBase.js +171 -0
- package/lib/cjs/List/ListItemContent.js +80 -0
- package/lib/cjs/List/ListItemMark.js +132 -0
- package/lib/cjs/List/PressableListItemBase.js +117 -0
- package/lib/cjs/List/index.js +23 -0
- package/lib/cjs/Listbox/GroupControl.js +112 -0
- package/lib/cjs/Listbox/Listbox.js +177 -0
- package/lib/cjs/Listbox/ListboxContext.js +11 -0
- package/lib/cjs/Listbox/ListboxGroup.js +133 -0
- package/lib/cjs/Listbox/ListboxItem.js +83 -0
- package/lib/cjs/Listbox/ListboxOverlay.js +87 -0
- package/lib/cjs/Listbox/PressableItem.js +146 -0
- package/lib/cjs/Listbox/index.js +9 -0
- package/lib/cjs/Modal/Modal.js +377 -0
- package/lib/cjs/Modal/ModalContent.js +205 -0
- package/lib/cjs/Modal/WebModal.js +83 -0
- package/lib/cjs/Modal/dictionary.js +15 -0
- package/lib/cjs/Modal/index.js +9 -0
- package/lib/cjs/MultiSelectFilter/ModalOverlay.js +162 -0
- package/lib/cjs/MultiSelectFilter/MultiSelectFilter.js +544 -0
- package/lib/cjs/MultiSelectFilter/dictionary.js +18 -0
- package/lib/cjs/MultiSelectFilter/index.js +9 -0
- package/lib/cjs/Notification/Notification.js +437 -0
- package/lib/cjs/Notification/dictionary.js +14 -0
- package/lib/cjs/Notification/index.js +9 -0
- package/lib/cjs/OrderedList/Item.js +166 -0
- package/lib/cjs/OrderedList/ItemBase.js +51 -0
- package/lib/cjs/OrderedList/OrderedList.js +70 -0
- package/lib/cjs/OrderedList/OrderedListBase.js +44 -0
- package/lib/cjs/OrderedList/index.js +9 -0
- package/lib/cjs/Pagination/PageButton.js +82 -0
- package/lib/cjs/Pagination/Pagination.js +226 -0
- package/lib/cjs/Pagination/SideButton.js +119 -0
- package/lib/cjs/Pagination/constants.js +9 -0
- package/lib/cjs/Pagination/dictionary.js +24 -0
- package/lib/cjs/Pagination/index.js +9 -0
- package/lib/cjs/Pagination/usePagination.js +83 -0
- package/lib/cjs/Portal/Portal.js +56 -0
- package/lib/cjs/Portal/Portal.native.js +8 -0
- package/lib/cjs/Portal/index.js +9 -0
- package/lib/cjs/PriceLockup/PriceLockup.js +230 -0
- package/lib/cjs/PriceLockup/index.js +9 -0
- package/lib/cjs/PriceLockup/utils/renderFootnoteContent.js +92 -0
- package/lib/cjs/PriceLockup/utils/renderFootnoteLinks.js +35 -0
- package/lib/cjs/PriceLockup/utils/renderPrice.js +146 -0
- package/lib/cjs/PriceLockup/utils/renderTypography.js +30 -0
- package/lib/cjs/ProductCard/ProductCard.js +237 -0
- package/lib/cjs/ProductCard/dictionary.js +44 -0
- package/lib/cjs/ProductCard/index.js +9 -0
- package/lib/cjs/ProductCardGroup/ProductCardGroup.js +77 -0
- package/lib/cjs/ProductCardGroup/index.js +9 -0
- package/lib/cjs/Progress/Progress.js +101 -0
- package/lib/cjs/Progress/ProgressBar.js +168 -0
- package/lib/cjs/Progress/ProgressBarBackground.js +49 -0
- package/lib/cjs/Progress/constants.js +10 -0
- package/lib/cjs/Progress/index.js +11 -0
- package/lib/cjs/QuickLinks/QuickLinks.js +83 -0
- package/lib/cjs/QuickLinks/QuickLinksCard.js +38 -0
- package/lib/cjs/QuickLinks/QuickLinksItem.js +56 -0
- package/lib/cjs/QuickLinks/index.js +11 -0
- package/lib/cjs/QuickLinksFeature/QuickLinksFeature.js +74 -0
- package/lib/cjs/QuickLinksFeature/QuickLinksFeatureItem.js +152 -0
- package/lib/cjs/QuickLinksFeature/index.js +11 -0
- package/lib/cjs/Radio/Radio.js +291 -0
- package/lib/cjs/Radio/RadioButton.js +191 -0
- package/lib/cjs/Radio/RadioGroup.js +262 -0
- package/lib/cjs/Radio/RadioInput.js +55 -0
- package/lib/cjs/Radio/RadioInput.native.js +11 -0
- package/lib/cjs/Radio/index.js +16 -0
- package/lib/cjs/RadioCard/RadioCard.js +219 -0
- package/lib/cjs/RadioCard/RadioCardGroup.js +266 -0
- package/lib/cjs/RadioCard/index.js +16 -0
- package/lib/cjs/Responsive/Responsive.js +70 -0
- package/lib/cjs/Responsive/ResponsiveProp.js +45 -0
- package/lib/cjs/Responsive/ResponsiveWithMediaQueryStyleSheet.js +75 -0
- package/lib/cjs/Responsive/index.js +9 -0
- package/lib/cjs/Search/Search.js +281 -0
- package/lib/cjs/Search/dictionary.js +18 -0
- package/lib/cjs/Search/index.js +9 -0
- package/lib/cjs/Select/Group.js +31 -0
- package/lib/cjs/Select/Group.native.js +23 -0
- package/lib/cjs/Select/Item.js +30 -0
- package/lib/cjs/Select/Item.native.js +8 -0
- package/lib/cjs/Select/Picker.js +103 -0
- package/lib/cjs/Select/Picker.native.js +130 -0
- package/lib/cjs/Select/Select.js +339 -0
- package/lib/cjs/Select/constants.js +13 -0
- package/lib/cjs/Select/index.js +13 -0
- package/lib/cjs/SideNav/Item.js +150 -0
- package/lib/cjs/SideNav/ItemContent.js +56 -0
- package/lib/cjs/SideNav/ItemsGroup.js +125 -0
- package/lib/cjs/SideNav/SideNav.js +139 -0
- package/lib/cjs/SideNav/index.js +13 -0
- package/lib/cjs/Skeleton/Skeleton.js +184 -0
- package/lib/cjs/Skeleton/index.js +9 -0
- package/lib/cjs/Skeleton/skeleton.constant.js +8 -0
- package/lib/cjs/Skeleton/skeletonWebAnimation.js +20 -0
- package/lib/cjs/Skeleton/useSkeletonNativeAnimation.js +35 -0
- package/lib/cjs/SkipLink/SkipLink.js +196 -0
- package/lib/cjs/SkipLink/index.js +9 -0
- package/lib/cjs/Spacer/Spacer.js +100 -0
- package/lib/cjs/Spacer/index.js +9 -0
- package/lib/cjs/StackView/StackView.js +133 -0
- package/lib/cjs/StackView/StackWrap.js +54 -0
- package/lib/cjs/StackView/StackWrap.native.js +10 -0
- package/lib/cjs/StackView/StackWrapBox.js +121 -0
- package/lib/cjs/StackView/StackWrapGap.js +68 -0
- package/lib/cjs/StackView/common.js +43 -0
- package/lib/cjs/StackView/getStackedContent.js +128 -0
- package/lib/cjs/StackView/index.js +23 -0
- package/lib/cjs/Status/Status.js +176 -0
- package/lib/cjs/Status/index.js +9 -0
- package/lib/cjs/StepTracker/Step.js +271 -0
- package/lib/cjs/StepTracker/StepTracker.js +220 -0
- package/lib/cjs/StepTracker/dictionary.js +36 -0
- package/lib/cjs/StepTracker/index.js +9 -0
- package/lib/cjs/TabBar/TabBar.js +132 -0
- package/lib/cjs/TabBar/TabBarItem.js +182 -0
- package/lib/cjs/TabBar/index.js +9 -0
- package/lib/cjs/Tabs/Tabs.js +188 -0
- package/lib/cjs/Tabs/TabsItem.js +245 -0
- package/lib/cjs/Tabs/index.js +9 -0
- package/lib/cjs/Tags/Tags.js +252 -0
- package/lib/cjs/Tags/index.js +9 -0
- package/lib/cjs/TextInput/TextArea.js +105 -0
- package/lib/cjs/TextInput/TextInput.js +86 -0
- package/lib/cjs/TextInput/TextInputBase.js +502 -0
- package/lib/cjs/TextInput/dictionary.js +18 -0
- package/lib/cjs/TextInput/index.js +20 -0
- package/lib/cjs/TextInput/propTypes.js +40 -0
- package/lib/cjs/ThemeProvider/ThemeProvider.js +91 -0
- package/lib/cjs/ThemeProvider/index.js +59 -0
- package/lib/cjs/ThemeProvider/useResponsiveThemeTokens.js +88 -0
- package/lib/cjs/ThemeProvider/useSetTheme.js +30 -0
- package/lib/cjs/ThemeProvider/useTheme.js +17 -0
- package/lib/cjs/ThemeProvider/useThemeTokens.js +118 -0
- package/lib/cjs/ThemeProvider/utils/index.js +27 -0
- package/lib/cjs/ThemeProvider/utils/styles.js +208 -0
- package/lib/cjs/ThemeProvider/utils/theme-tokens.js +173 -0
- package/lib/cjs/Timeline/Timeline.js +175 -0
- package/lib/cjs/Timeline/index.js +9 -0
- package/lib/cjs/ToggleSwitch/ToggleSwitch.js +286 -0
- package/lib/cjs/ToggleSwitch/ToggleSwitchGroup.js +215 -0
- package/lib/cjs/ToggleSwitch/index.js +20 -0
- package/lib/cjs/Tooltip/Backdrop.js +57 -0
- package/lib/cjs/Tooltip/Backdrop.native.js +46 -0
- package/lib/cjs/Tooltip/Tooltip.js +295 -0
- package/lib/cjs/Tooltip/Tooltip.native.js +370 -0
- package/lib/cjs/Tooltip/dictionary.js +14 -0
- package/lib/cjs/Tooltip/getTooltipPosition.js +175 -0
- package/lib/cjs/Tooltip/index.js +12 -0
- package/lib/cjs/Tooltip/shared.js +48 -0
- package/lib/cjs/TooltipButton/TooltipButton.js +97 -0
- package/lib/cjs/TooltipButton/index.js +9 -0
- package/lib/cjs/Typography/Typography.js +271 -0
- package/lib/cjs/Typography/index.js +9 -0
- package/lib/cjs/Validator/Validator.js +228 -0
- package/lib/cjs/Validator/index.js +9 -0
- package/lib/cjs/ViewportProvider/ViewportProvider.js +32 -0
- package/lib/cjs/ViewportProvider/index.js +22 -0
- package/lib/cjs/ViewportProvider/useViewport.js +10 -0
- package/lib/cjs/ViewportProvider/useViewportListener.js +43 -0
- package/lib/cjs/index.js +781 -0
- package/lib/cjs/server.js +40 -0
- package/lib/cjs/utils/BaseView/BaseView.js +47 -0
- package/lib/cjs/utils/BaseView/BaseView.native.js +12 -0
- package/lib/cjs/utils/BaseView/index.js +9 -0
- package/lib/cjs/utils/a11y/index.js +27 -0
- package/lib/cjs/utils/a11y/semantics.js +145 -0
- package/lib/cjs/utils/a11y/textSize.js +44 -0
- package/lib/cjs/utils/animation/index.js +13 -0
- package/lib/cjs/utils/animation/useVerticalExpandAnimation.js +92 -0
- package/lib/cjs/utils/children.js +121 -0
- package/lib/cjs/utils/containUniqueFields.js +30 -0
- package/lib/cjs/utils/convertFromMegaByteToByte.js +16 -0
- package/lib/cjs/utils/floating-ui/index.js +42 -0
- package/lib/cjs/utils/floating-ui/index.native.js +42 -0
- package/lib/cjs/utils/formatImageSource.js +33 -0
- package/lib/cjs/utils/hasOwnProperty.js +17 -0
- package/lib/cjs/utils/htmlAttrs.js +30 -0
- package/lib/cjs/utils/index.js +245 -0
- package/lib/cjs/utils/info/index.js +14 -0
- package/lib/cjs/utils/info/platform/index.js +18 -0
- package/lib/cjs/utils/info/platform/platform.android.js +7 -0
- package/lib/cjs/utils/info/platform/platform.ios.js +7 -0
- package/lib/cjs/utils/info/platform/platform.js +7 -0
- package/lib/cjs/utils/info/platform/platform.native.js +10 -0
- package/lib/cjs/utils/info/versions.js +12 -0
- package/lib/cjs/utils/input.js +193 -0
- package/lib/cjs/utils/pressability.js +122 -0
- package/lib/cjs/utils/props/a11yProps.js +315 -0
- package/lib/cjs/utils/props/clickProps.js +32 -0
- package/lib/cjs/utils/props/componentPropType.js +55 -0
- package/lib/cjs/utils/props/contentfulProps.js +29 -0
- package/lib/cjs/utils/props/copyPropTypes.js +9 -0
- package/lib/cjs/utils/props/getPropSelector.js +58 -0
- package/lib/cjs/utils/props/handlerProps.js +111 -0
- package/lib/cjs/utils/props/hrefAttrsProp.js +39 -0
- package/lib/cjs/utils/props/index.js +176 -0
- package/lib/cjs/utils/props/inputSupportsProps.js +87 -0
- package/lib/cjs/utils/props/linkProps.js +50 -0
- package/lib/cjs/utils/props/paddingProp.js +16 -0
- package/lib/cjs/utils/props/pressProps.js +49 -0
- package/lib/cjs/utils/props/rectProp.js +16 -0
- package/lib/cjs/utils/props/responsiveProps.js +35 -0
- package/lib/cjs/utils/props/selectSystemProps.js +29 -0
- package/lib/cjs/utils/props/spacingProps.js +63 -0
- package/lib/cjs/utils/props/textInputProps.js +194 -0
- package/lib/cjs/utils/props/textProps.js +67 -0
- package/lib/cjs/utils/props/tokens.js +140 -0
- package/lib/cjs/utils/props/variantProp.js +24 -0
- package/lib/cjs/utils/props/viewProps.js +28 -0
- package/lib/cjs/utils/ssr-media-query/create-stylesheet/create-stylesheet-mobile.js +55 -0
- package/lib/cjs/utils/ssr-media-query/create-stylesheet/index.android.js +9 -0
- package/lib/cjs/utils/ssr-media-query/create-stylesheet/index.ios.js +9 -0
- package/lib/cjs/utils/ssr-media-query/create-stylesheet/index.js +42 -0
- package/lib/cjs/utils/ssr-media-query/hash.js +19 -0
- package/lib/cjs/utils/ssr-media-query/index.js +18 -0
- package/lib/cjs/utils/ssr-media-query/utils/common.js +44 -0
- package/lib/cjs/utils/ssr-media-query/utils/create-declaration-block.js +23 -0
- package/lib/cjs/utils/ssr-media-query/utils/create-media-query-styles.js +66 -0
- package/lib/cjs/utils/ssr-media-query/utils/hyphenate-style-name.js +18 -0
- package/lib/cjs/utils/ssr-media-query/utils/inject.js +47 -0
- package/lib/cjs/utils/ssr.js +150 -0
- package/lib/cjs/utils/transformGradient.js +22 -0
- package/lib/cjs/utils/useCopy.js +48 -0
- package/lib/cjs/utils/useHash.js +44 -0
- package/lib/cjs/utils/useHash.native.js +12 -0
- package/lib/cjs/utils/useOverlaidPosition.js +242 -0
- package/lib/cjs/utils/useResponsiveProp.js +53 -0
- package/lib/cjs/utils/useSafeLayoutEffect.js +34 -0
- package/lib/cjs/utils/useScrollBlocking.js +55 -0
- package/lib/cjs/utils/useScrollBlocking.native.js +9 -0
- package/lib/cjs/utils/useSpacingScale.js +129 -0
- package/lib/cjs/utils/useUniqueId.js +17 -0
- package/lib/cjs/utils/withLinkRouter.js +89 -0
- package/lib/esm/A11yInfoProvider/index.js +65 -0
- package/lib/esm/Autocomplete/Autocomplete.js +473 -0
- package/lib/esm/Autocomplete/Suggestions.js +64 -0
- package/lib/esm/BaseProvider/HydrationContext.js +47 -0
- package/lib/esm/BaseProvider/index.js +40 -0
- package/lib/esm/Button/ButtonDropdown.js +173 -0
- package/lib/esm/Card/Card.js +327 -0
- package/lib/esm/Card/CardBase.js +120 -0
- package/lib/esm/Card/PressableCardBase.js +113 -0
- package/lib/esm/CardGroup/CardGroup.js +210 -0
- package/lib/esm/Carousel/Carousel.js +1039 -0
- package/lib/esm/Carousel/CarouselItem/CarouselItem.js +178 -0
- package/lib/esm/Carousel/CarouselStepTracker/CarouselStepTracker.js +94 -0
- package/lib/esm/Carousel/CarouselTabs/CarouselTabs.js +49 -0
- package/lib/esm/Carousel/CarouselTabs/CarouselTabsPanel.js +88 -0
- package/lib/esm/Carousel/CarouselTabs/CarouselTabsPanelItem.js +118 -0
- package/lib/esm/Carousel/CarouselThumbnail.js +113 -0
- package/lib/esm/Carousel/Constants.js +7 -0
- package/lib/esm/Checkbox/Checkbox.js +342 -0
- package/lib/esm/ColourToggle/ColourToggle.js +91 -0
- package/lib/esm/ExpandCollapseMini/ExpandCollapseMini.js +77 -0
- package/lib/esm/ExpandCollapseMini/ExpandCollapseMiniControl.js +126 -0
- package/lib/esm/ExpandCollapseMini/index.js +2 -0
- package/lib/esm/Footnote/Footnote.js +316 -0
- package/lib/esm/HorizontalScroll/HorizontalScroll.js +167 -0
- package/lib/esm/Icon/Icon.js +94 -0
- package/lib/esm/Icon/IconText.js +110 -0
- package/lib/esm/IconButton/IconButton.js +202 -0
- package/lib/esm/InputSupports/InputSupports.js +133 -0
- package/lib/esm/Link/LinkBase.js +276 -0
- package/lib/esm/List/List.js +76 -0
- package/lib/esm/List/ListItemContent.js +73 -0
- package/lib/esm/Listbox/Listbox.js +168 -0
- package/lib/esm/Listbox/PressableItem.js +139 -0
- package/lib/esm/Modal/Modal.js +370 -0
- package/lib/esm/MultiSelectFilter/MultiSelectFilter.js +537 -0
- package/lib/esm/Notification/Notification.js +430 -0
- package/lib/esm/OrderedList/OrderedList.js +63 -0
- package/lib/esm/Pagination/usePagination.js +77 -0
- package/lib/esm/PriceLockup/utils/renderFootnoteContent.js +85 -0
- package/lib/esm/PriceLockup/utils/renderFootnoteLinks.js +28 -0
- package/lib/esm/PriceLockup/utils/renderPrice.js +139 -0
- package/lib/esm/ProductCard/ProductCard.js +230 -0
- package/lib/esm/Progress/ProgressBarBackground.js +42 -0
- package/lib/esm/QuickLinksFeature/QuickLinksFeature.js +68 -0
- package/lib/esm/Radio/Radio.js +282 -0
- package/lib/esm/Search/Search.js +274 -0
- package/lib/esm/Select/Picker.js +96 -0
- package/lib/esm/StackView/StackWrap.js +48 -0
- package/lib/esm/StackView/getStackedContent.js +121 -0
- package/lib/esm/StepTracker/StepTracker.js +213 -0
- package/lib/esm/TabBar/TabBar.js +125 -0
- package/lib/esm/Tabs/Tabs.js +179 -0
- package/lib/esm/Tabs/TabsItem.js +238 -0
- package/lib/esm/TextInput/TextArea.js +98 -0
- package/lib/esm/TextInput/TextInput.js +79 -0
- package/lib/esm/TextInput/TextInputBase.js +495 -0
- package/lib/esm/ThemeProvider/utils/theme-tokens.js +158 -0
- package/lib/esm/Timeline/Timeline.js +168 -0
- package/lib/esm/Tooltip/Tooltip.native.js +363 -0
- package/lib/esm/Typography/Typography.js +265 -0
- package/lib/esm/Validator/Validator.js +221 -0
- package/lib/esm/ViewportProvider/useViewportListener.js +37 -0
- package/lib/esm/index.js +72 -0
- package/lib/esm/utils/children.js +113 -0
- package/lib/esm/utils/input.js +185 -0
- package/lib/esm/utils/props/componentPropType.js +49 -0
- package/lib/esm/utils/props/selectSystemProps.js +23 -0
- package/lib/esm/utils/ssr-media-query/create-stylesheet/create-stylesheet-mobile.js +48 -0
- package/lib/esm/utils/ssr-media-query/create-stylesheet/index.js +35 -0
- package/lib/esm/utils/ssr-media-query/utils/inject.js +37 -0
- package/lib/esm/utils/useHash.js +38 -0
- package/lib/esm/utils/useOverlaidPosition.js +235 -0
- package/lib/esm/utils/useScrollBlocking.js +49 -0
- package/lib/esm/utils/useSpacingScale.js +123 -0
- package/lib/package.json +88 -0
- package/package.json +13 -11
- package/src/Carousel/Carousel.jsx +228 -155
- package/src/Carousel/CarouselItem/CarouselItem.jsx +14 -4
- package/src/Carousel/CarouselStepTracker/CarouselStepTracker.jsx +3 -0
- package/src/Carousel/Constants.js +4 -0
- package/src/ExpandCollapseMini/ExpandCollapseMini.jsx +76 -0
- package/src/ExpandCollapseMini/ExpandCollapseMiniControl.jsx +119 -0
- package/src/ExpandCollapseMini/index.js +3 -0
- package/src/Link/LinkBase.jsx +8 -3
- package/src/TextInput/TextInputBase.jsx +30 -1
- package/src/index.js +1 -0
- package/src/utils/useOverlaidPosition.js +23 -0
- package/lib/A11yInfoProvider/index.js +0 -65
- package/lib/Autocomplete/Autocomplete.js +0 -483
- package/lib/Autocomplete/Suggestions.js +0 -64
- package/lib/BaseProvider/HydrationContext.js +0 -48
- package/lib/BaseProvider/index.js +0 -41
- package/lib/Button/ButtonDropdown.js +0 -173
- package/lib/Card/Card.js +0 -328
- package/lib/Card/CardBase.js +0 -120
- package/lib/Card/PressableCardBase.js +0 -113
- package/lib/CardGroup/CardGroup.js +0 -210
- package/lib/Carousel/Carousel.js +0 -981
- package/lib/Carousel/CarouselItem/CarouselItem.js +0 -161
- package/lib/Carousel/CarouselStepTracker/CarouselStepTracker.js +0 -91
- package/lib/Carousel/CarouselTabs/CarouselTabs.js +0 -50
- package/lib/Carousel/CarouselTabs/CarouselTabsPanel.js +0 -88
- package/lib/Carousel/CarouselTabs/CarouselTabsPanelItem.js +0 -118
- package/lib/Carousel/CarouselThumbnail.js +0 -113
- package/lib/Carousel/Constants.js +0 -3
- package/lib/Checkbox/Checkbox.js +0 -342
- package/lib/ColourToggle/ColourToggle.js +0 -91
- package/lib/Footnote/Footnote.js +0 -316
- package/lib/HorizontalScroll/HorizontalScroll.js +0 -168
- package/lib/Icon/Icon.js +0 -94
- package/lib/Icon/IconText.js +0 -111
- package/lib/IconButton/IconButton.js +0 -203
- package/lib/InputSupports/InputSupports.js +0 -133
- package/lib/Link/LinkBase.js +0 -271
- package/lib/List/List.js +0 -77
- package/lib/List/ListItemContent.js +0 -73
- package/lib/Listbox/Listbox.js +0 -171
- package/lib/Listbox/PressableItem.js +0 -139
- package/lib/Modal/Modal.js +0 -373
- package/lib/MultiSelectFilter/MultiSelectFilter.js +0 -537
- package/lib/Notification/Notification.js +0 -432
- package/lib/OrderedList/OrderedList.js +0 -64
- package/lib/Pagination/usePagination.js +0 -78
- package/lib/PriceLockup/utils/renderFootnoteContent.js +0 -85
- package/lib/PriceLockup/utils/renderFootnoteLinks.js +0 -28
- package/lib/PriceLockup/utils/renderPrice.js +0 -139
- package/lib/ProductCard/ProductCard.js +0 -231
- package/lib/Progress/ProgressBarBackground.js +0 -42
- package/lib/QuickLinksFeature/QuickLinksFeature.js +0 -69
- package/lib/Radio/Radio.js +0 -282
- package/lib/Search/Search.js +0 -275
- package/lib/Select/Picker.js +0 -96
- package/lib/StackView/StackWrap.js +0 -51
- package/lib/StackView/getStackedContent.js +0 -122
- package/lib/StepTracker/StepTracker.js +0 -214
- package/lib/TabBar/TabBar.js +0 -125
- package/lib/Tabs/Tabs.js +0 -179
- package/lib/Tabs/TabsItem.js +0 -238
- package/lib/TextInput/TextArea.js +0 -98
- package/lib/TextInput/TextInput.js +0 -79
- package/lib/TextInput/TextInputBase.js +0 -468
- package/lib/ThemeProvider/utils/theme-tokens.js +0 -160
- package/lib/Timeline/Timeline.js +0 -169
- package/lib/Tooltip/Tooltip.native.js +0 -363
- package/lib/Typography/Typography.js +0 -266
- package/lib/Validator/Validator.js +0 -226
- package/lib/ViewportProvider/useViewportListener.js +0 -37
- package/lib/index.js +0 -71
- package/lib/utils/children.js +0 -117
- package/lib/utils/input.js +0 -185
- package/lib/utils/props/componentPropType.js +0 -50
- package/lib/utils/props/selectSystemProps.js +0 -23
- package/lib/utils/ssr-media-query/create-stylesheet/create-stylesheet-mobile.js +0 -48
- package/lib/utils/ssr-media-query/create-stylesheet/index.js +0 -36
- package/lib/utils/ssr-media-query/utils/inject.js +0 -39
- package/lib/utils/useHash.js +0 -41
- package/lib/utils/useOverlaidPosition.js +0 -214
- package/lib/utils/useScrollBlocking.js +0 -51
- package/lib/utils/useSpacingScale.js +0 -123
- /package/lib/{A11yText → esm/A11yText}/index.js +0 -0
- /package/lib/{ActionCard → esm/ActionCard}/ActionCard.js +0 -0
- /package/lib/{ActionCard → esm/ActionCard}/index.js +0 -0
- /package/lib/{ActivityIndicator → esm/ActivityIndicator}/Spinner.js +0 -0
- /package/lib/{ActivityIndicator → esm/ActivityIndicator}/Spinner.native.js +0 -0
- /package/lib/{ActivityIndicator → esm/ActivityIndicator}/index.js +0 -0
- /package/lib/{ActivityIndicator → esm/ActivityIndicator}/shared.js +0 -0
- /package/lib/{Autocomplete → esm/Autocomplete}/Loading.js +0 -0
- /package/lib/{Autocomplete → esm/Autocomplete}/constants.js +0 -0
- /package/lib/{Autocomplete → esm/Autocomplete}/dictionary.js +0 -0
- /package/lib/{Autocomplete → esm/Autocomplete}/index.js +0 -0
- /package/lib/{Badge → esm/Badge}/Badge.js +0 -0
- /package/lib/{Badge → esm/Badge}/index.js +0 -0
- /package/lib/{Box → esm/Box}/Box.js +0 -0
- /package/lib/{Box → esm/Box}/backgroundImageStylesMap.js +0 -0
- /package/lib/{Box → esm/Box}/index.js +0 -0
- /package/lib/{Button → esm/Button}/Button.js +0 -0
- /package/lib/{Button → esm/Button}/ButtonBase.js +0 -0
- /package/lib/{Button → esm/Button}/ButtonGroup.js +0 -0
- /package/lib/{Button → esm/Button}/ButtonLink.js +0 -0
- /package/lib/{Button → esm/Button}/index.js +0 -0
- /package/lib/{Button → esm/Button}/propTypes.js +0 -0
- /package/lib/{Card → esm/Card}/index.js +0 -0
- /package/lib/{CardGroup → esm/CardGroup}/dictionary.js +0 -0
- /package/lib/{CardGroup → esm/CardGroup}/index.js +0 -0
- /package/lib/{Carousel → esm/Carousel}/CarouselContext.js +0 -0
- /package/lib/{Carousel → esm/Carousel}/CarouselFirstFocus/CarouselFirstFocus.js +0 -0
- /package/lib/{Carousel → esm/Carousel}/CarouselItem/index.js +0 -0
- /package/lib/{Carousel → esm/Carousel}/CarouselStepTracker/index.js +0 -0
- /package/lib/{Carousel → esm/Carousel}/CarouselTabs/index.js +0 -0
- /package/lib/{Carousel → esm/Carousel}/CarouselThumbnailNavigation.js +0 -0
- /package/lib/{Carousel → esm/Carousel}/dictionary.js +0 -0
- /package/lib/{Carousel → esm/Carousel}/index.js +0 -0
- /package/lib/{Checkbox → esm/Checkbox}/CheckboxButton.js +0 -0
- /package/lib/{Checkbox → esm/Checkbox}/CheckboxGroup.js +0 -0
- /package/lib/{Checkbox → esm/Checkbox}/CheckboxInput.js +0 -0
- /package/lib/{Checkbox → esm/Checkbox}/CheckboxInput.native.js +0 -0
- /package/lib/{Checkbox → esm/Checkbox}/index.js +0 -0
- /package/lib/{CheckboxCard → esm/CheckboxCard}/CheckboxCard.js +0 -0
- /package/lib/{CheckboxCard → esm/CheckboxCard}/index.js +0 -0
- /package/lib/{CheckboxCardGroup → esm/CheckboxCardGroup}/CheckboxCardGroup.js +0 -0
- /package/lib/{CheckboxCardGroup → esm/CheckboxCardGroup}/index.js +0 -0
- /package/lib/{ColourToggle → esm/ColourToggle}/ColourBubble.js +0 -0
- /package/lib/{ColourToggle → esm/ColourToggle}/index.js +0 -0
- /package/lib/{Divider → esm/Divider}/Divider.js +0 -0
- /package/lib/{Divider → esm/Divider}/index.js +0 -0
- /package/lib/{DownloadApp → esm/DownloadApp}/DownloadApp.js +0 -0
- /package/lib/{DownloadApp → esm/DownloadApp}/dictionary.js +0 -0
- /package/lib/{DownloadApp → esm/DownloadApp}/index.js +0 -0
- /package/lib/{ExpandCollapse → esm/ExpandCollapse}/Accordion.js +0 -0
- /package/lib/{ExpandCollapse → esm/ExpandCollapse}/Control.js +0 -0
- /package/lib/{ExpandCollapse → esm/ExpandCollapse}/ExpandCollapse.js +0 -0
- /package/lib/{ExpandCollapse → esm/ExpandCollapse}/Panel.js +0 -0
- /package/lib/{ExpandCollapse → esm/ExpandCollapse}/dictionary.js +0 -0
- /package/lib/{ExpandCollapse → esm/ExpandCollapse}/index.js +0 -0
- /package/lib/{Feedback → esm/Feedback}/Feedback.js +0 -0
- /package/lib/{Feedback → esm/Feedback}/index.js +0 -0
- /package/lib/{Fieldset → esm/Fieldset}/Fieldset.js +0 -0
- /package/lib/{Fieldset → esm/Fieldset}/FieldsetContainer.js +0 -0
- /package/lib/{Fieldset → esm/Fieldset}/FieldsetContainer.native.js +0 -0
- /package/lib/{Fieldset → esm/Fieldset}/Legend.js +0 -0
- /package/lib/{Fieldset → esm/Fieldset}/Legend.native.js +0 -0
- /package/lib/{Fieldset → esm/Fieldset}/cssReset.js +0 -0
- /package/lib/{Fieldset → esm/Fieldset}/index.js +0 -0
- /package/lib/{FileUpload → esm/FileUpload}/FileUpload.js +0 -0
- /package/lib/{FileUpload → esm/FileUpload}/NotificationContent.js +0 -0
- /package/lib/{FileUpload → esm/FileUpload}/dictionary.js +0 -0
- /package/lib/{FileUpload → esm/FileUpload}/index.js +0 -0
- /package/lib/{FlexGrid → esm/FlexGrid}/Col/Col.js +0 -0
- /package/lib/{FlexGrid → esm/FlexGrid}/Col/index.js +0 -0
- /package/lib/{FlexGrid → esm/FlexGrid}/FlexGrid.js +0 -0
- /package/lib/{FlexGrid → esm/FlexGrid}/Row/Row.js +0 -0
- /package/lib/{FlexGrid → esm/FlexGrid}/Row/index.js +0 -0
- /package/lib/{FlexGrid → esm/FlexGrid}/helpers/index.js +0 -0
- /package/lib/{FlexGrid → esm/FlexGrid}/index.js +0 -0
- /package/lib/{FlexGrid → esm/FlexGrid}/providers/GutterContext.js +0 -0
- /package/lib/{Footnote → esm/Footnote}/FootnoteLink.js +0 -0
- /package/lib/{Footnote → esm/Footnote}/dictionary.js +0 -0
- /package/lib/{Footnote → esm/Footnote}/index.js +0 -0
- /package/lib/{HorizontalScroll → esm/HorizontalScroll}/HorizontalScrollButton.js +0 -0
- /package/lib/{HorizontalScroll → esm/HorizontalScroll}/ScrollViewEnd.js +0 -0
- /package/lib/{HorizontalScroll → esm/HorizontalScroll}/ScrollViewEnd.native.js +0 -0
- /package/lib/{HorizontalScroll → esm/HorizontalScroll}/dictionary.js +0 -0
- /package/lib/{HorizontalScroll → esm/HorizontalScroll}/index.js +0 -0
- /package/lib/{HorizontalScroll → esm/HorizontalScroll}/itemPositions.js +0 -0
- /package/lib/{Icon → esm/Icon}/index.js +0 -0
- /package/lib/{IconButton → esm/IconButton}/index.js +0 -0
- /package/lib/{InputLabel → esm/InputLabel}/InputLabel.js +0 -0
- /package/lib/{InputLabel → esm/InputLabel}/LabelContent.js +0 -0
- /package/lib/{InputLabel → esm/InputLabel}/LabelContent.native.js +0 -0
- /package/lib/{InputLabel → esm/InputLabel}/index.js +0 -0
- /package/lib/{InputSupports → esm/InputSupports}/dictionary.js +0 -0
- /package/lib/{InputSupports → esm/InputSupports}/index.js +0 -0
- /package/lib/{InputSupports → esm/InputSupports}/useInputSupports.js +0 -0
- /package/lib/{Link → esm/Link}/ChevronLink.js +0 -0
- /package/lib/{Link → esm/Link}/InlinePressable.js +0 -0
- /package/lib/{Link → esm/Link}/InlinePressable.native.js +0 -0
- /package/lib/{Link → esm/Link}/Link.js +0 -0
- /package/lib/{Link → esm/Link}/TextButton.js +0 -0
- /package/lib/{Link → esm/Link}/index.js +0 -0
- /package/lib/{List → esm/List}/ListItem.js +0 -0
- /package/lib/{List → esm/List}/ListItemBase.js +0 -0
- /package/lib/{List → esm/List}/ListItemMark.js +0 -0
- /package/lib/{List → esm/List}/PressableListItemBase.js +0 -0
- /package/lib/{List → esm/List}/index.js +0 -0
- /package/lib/{Listbox → esm/Listbox}/GroupControl.js +0 -0
- /package/lib/{Listbox → esm/Listbox}/ListboxContext.js +0 -0
- /package/lib/{Listbox → esm/Listbox}/ListboxGroup.js +0 -0
- /package/lib/{Listbox → esm/Listbox}/ListboxItem.js +0 -0
- /package/lib/{Listbox → esm/Listbox}/ListboxOverlay.js +0 -0
- /package/lib/{Listbox → esm/Listbox}/index.js +0 -0
- /package/lib/{Modal → esm/Modal}/ModalContent.js +0 -0
- /package/lib/{Modal → esm/Modal}/WebModal.js +0 -0
- /package/lib/{Modal → esm/Modal}/dictionary.js +0 -0
- /package/lib/{Modal → esm/Modal}/index.js +0 -0
- /package/lib/{MultiSelectFilter → esm/MultiSelectFilter}/ModalOverlay.js +0 -0
- /package/lib/{MultiSelectFilter → esm/MultiSelectFilter}/dictionary.js +0 -0
- /package/lib/{MultiSelectFilter → esm/MultiSelectFilter}/index.js +0 -0
- /package/lib/{Notification → esm/Notification}/dictionary.js +0 -0
- /package/lib/{Notification → esm/Notification}/index.js +0 -0
- /package/lib/{OrderedList → esm/OrderedList}/Item.js +0 -0
- /package/lib/{OrderedList → esm/OrderedList}/ItemBase.js +0 -0
- /package/lib/{OrderedList → esm/OrderedList}/OrderedListBase.js +0 -0
- /package/lib/{OrderedList → esm/OrderedList}/index.js +0 -0
- /package/lib/{Pagination → esm/Pagination}/PageButton.js +0 -0
- /package/lib/{Pagination → esm/Pagination}/Pagination.js +0 -0
- /package/lib/{Pagination → esm/Pagination}/SideButton.js +0 -0
- /package/lib/{Pagination → esm/Pagination}/constants.js +0 -0
- /package/lib/{Pagination → esm/Pagination}/dictionary.js +0 -0
- /package/lib/{Pagination → esm/Pagination}/index.js +0 -0
- /package/lib/{Portal → esm/Portal}/Portal.js +0 -0
- /package/lib/{Portal → esm/Portal}/Portal.native.js +0 -0
- /package/lib/{Portal → esm/Portal}/index.js +0 -0
- /package/lib/{PriceLockup → esm/PriceLockup}/PriceLockup.js +0 -0
- /package/lib/{PriceLockup → esm/PriceLockup}/index.js +0 -0
- /package/lib/{PriceLockup → esm/PriceLockup}/utils/renderTypography.js +0 -0
- /package/lib/{ProductCard → esm/ProductCard}/dictionary.js +0 -0
- /package/lib/{ProductCard → esm/ProductCard}/index.js +0 -0
- /package/lib/{ProductCardGroup → esm/ProductCardGroup}/ProductCardGroup.js +0 -0
- /package/lib/{ProductCardGroup → esm/ProductCardGroup}/index.js +0 -0
- /package/lib/{Progress → esm/Progress}/Progress.js +0 -0
- /package/lib/{Progress → esm/Progress}/ProgressBar.js +0 -0
- /package/lib/{Progress → esm/Progress}/constants.js +0 -0
- /package/lib/{Progress → esm/Progress}/index.js +0 -0
- /package/lib/{QuickLinks → esm/QuickLinks}/QuickLinks.js +0 -0
- /package/lib/{QuickLinks → esm/QuickLinks}/QuickLinksCard.js +0 -0
- /package/lib/{QuickLinks → esm/QuickLinks}/QuickLinksItem.js +0 -0
- /package/lib/{QuickLinks → esm/QuickLinks}/index.js +0 -0
- /package/lib/{QuickLinksFeature → esm/QuickLinksFeature}/QuickLinksFeatureItem.js +0 -0
- /package/lib/{QuickLinksFeature → esm/QuickLinksFeature}/index.js +0 -0
- /package/lib/{Radio → esm/Radio}/RadioButton.js +0 -0
- /package/lib/{Radio → esm/Radio}/RadioGroup.js +0 -0
- /package/lib/{Radio → esm/Radio}/RadioInput.js +0 -0
- /package/lib/{Radio → esm/Radio}/RadioInput.native.js +0 -0
- /package/lib/{Radio → esm/Radio}/index.js +0 -0
- /package/lib/{RadioCard → esm/RadioCard}/RadioCard.js +0 -0
- /package/lib/{RadioCard → esm/RadioCard}/RadioCardGroup.js +0 -0
- /package/lib/{RadioCard → esm/RadioCard}/index.js +0 -0
- /package/lib/{Responsive → esm/Responsive}/Responsive.js +0 -0
- /package/lib/{Responsive → esm/Responsive}/ResponsiveProp.js +0 -0
- /package/lib/{Responsive → esm/Responsive}/ResponsiveWithMediaQueryStyleSheet.js +0 -0
- /package/lib/{Responsive → esm/Responsive}/index.js +0 -0
- /package/lib/{Search → esm/Search}/dictionary.js +0 -0
- /package/lib/{Search → esm/Search}/index.js +0 -0
- /package/lib/{Select → esm/Select}/Group.js +0 -0
- /package/lib/{Select → esm/Select}/Group.native.js +0 -0
- /package/lib/{Select → esm/Select}/Item.js +0 -0
- /package/lib/{Select → esm/Select}/Item.native.js +0 -0
- /package/lib/{Select → esm/Select}/Picker.native.js +0 -0
- /package/lib/{Select → esm/Select}/Select.js +0 -0
- /package/lib/{Select → esm/Select}/constants.js +0 -0
- /package/lib/{Select → esm/Select}/index.js +0 -0
- /package/lib/{SideNav → esm/SideNav}/Item.js +0 -0
- /package/lib/{SideNav → esm/SideNav}/ItemContent.js +0 -0
- /package/lib/{SideNav → esm/SideNav}/ItemsGroup.js +0 -0
- /package/lib/{SideNav → esm/SideNav}/SideNav.js +0 -0
- /package/lib/{SideNav → esm/SideNav}/index.js +0 -0
- /package/lib/{Skeleton → esm/Skeleton}/Skeleton.js +0 -0
- /package/lib/{Skeleton → esm/Skeleton}/index.js +0 -0
- /package/lib/{Skeleton → esm/Skeleton}/skeleton.constant.js +0 -0
- /package/lib/{Skeleton → esm/Skeleton}/skeletonWebAnimation.js +0 -0
- /package/lib/{Skeleton → esm/Skeleton}/useSkeletonNativeAnimation.js +0 -0
- /package/lib/{SkipLink → esm/SkipLink}/SkipLink.js +0 -0
- /package/lib/{SkipLink → esm/SkipLink}/index.js +0 -0
- /package/lib/{Spacer → esm/Spacer}/Spacer.js +0 -0
- /package/lib/{Spacer → esm/Spacer}/index.js +0 -0
- /package/lib/{StackView → esm/StackView}/StackView.js +0 -0
- /package/lib/{StackView → esm/StackView}/StackWrap.native.js +0 -0
- /package/lib/{StackView → esm/StackView}/StackWrapBox.js +0 -0
- /package/lib/{StackView → esm/StackView}/StackWrapGap.js +0 -0
- /package/lib/{StackView → esm/StackView}/common.js +0 -0
- /package/lib/{StackView → esm/StackView}/index.js +0 -0
- /package/lib/{Status → esm/Status}/Status.js +0 -0
- /package/lib/{Status → esm/Status}/index.js +0 -0
- /package/lib/{StepTracker → esm/StepTracker}/Step.js +0 -0
- /package/lib/{StepTracker → esm/StepTracker}/dictionary.js +0 -0
- /package/lib/{StepTracker → esm/StepTracker}/index.js +0 -0
- /package/lib/{TabBar → esm/TabBar}/TabBarItem.js +0 -0
- /package/lib/{TabBar → esm/TabBar}/index.js +0 -0
- /package/lib/{Tabs → esm/Tabs}/index.js +0 -0
- /package/lib/{Tags → esm/Tags}/Tags.js +0 -0
- /package/lib/{Tags → esm/Tags}/index.js +0 -0
- /package/lib/{TextInput → esm/TextInput}/dictionary.js +0 -0
- /package/lib/{TextInput → esm/TextInput}/index.js +0 -0
- /package/lib/{TextInput → esm/TextInput}/propTypes.js +0 -0
- /package/lib/{ThemeProvider → esm/ThemeProvider}/ThemeProvider.js +0 -0
- /package/lib/{ThemeProvider → esm/ThemeProvider}/index.js +0 -0
- /package/lib/{ThemeProvider → esm/ThemeProvider}/useResponsiveThemeTokens.js +0 -0
- /package/lib/{ThemeProvider → esm/ThemeProvider}/useSetTheme.js +0 -0
- /package/lib/{ThemeProvider → esm/ThemeProvider}/useTheme.js +0 -0
- /package/lib/{ThemeProvider → esm/ThemeProvider}/useThemeTokens.js +0 -0
- /package/lib/{ThemeProvider → esm/ThemeProvider}/utils/index.js +0 -0
- /package/lib/{ThemeProvider → esm/ThemeProvider}/utils/styles.js +0 -0
- /package/lib/{Timeline → esm/Timeline}/index.js +0 -0
- /package/lib/{ToggleSwitch → esm/ToggleSwitch}/ToggleSwitch.js +0 -0
- /package/lib/{ToggleSwitch → esm/ToggleSwitch}/ToggleSwitchGroup.js +0 -0
- /package/lib/{ToggleSwitch → esm/ToggleSwitch}/index.js +0 -0
- /package/lib/{Tooltip → esm/Tooltip}/Backdrop.js +0 -0
- /package/lib/{Tooltip → esm/Tooltip}/Backdrop.native.js +0 -0
- /package/lib/{Tooltip → esm/Tooltip}/Tooltip.js +0 -0
- /package/lib/{Tooltip → esm/Tooltip}/dictionary.js +0 -0
- /package/lib/{Tooltip → esm/Tooltip}/getTooltipPosition.js +0 -0
- /package/lib/{Tooltip → esm/Tooltip}/index.js +0 -0
- /package/lib/{Tooltip → esm/Tooltip}/shared.js +0 -0
- /package/lib/{TooltipButton → esm/TooltipButton}/TooltipButton.js +0 -0
- /package/lib/{TooltipButton → esm/TooltipButton}/index.js +0 -0
- /package/lib/{Typography → esm/Typography}/index.js +0 -0
- /package/lib/{Validator → esm/Validator}/index.js +0 -0
- /package/lib/{ViewportProvider → esm/ViewportProvider}/ViewportProvider.js +0 -0
- /package/lib/{ViewportProvider → esm/ViewportProvider}/index.js +0 -0
- /package/lib/{ViewportProvider → esm/ViewportProvider}/useViewport.js +0 -0
- /package/lib/{server.js → esm/server.js} +0 -0
- /package/lib/{utils → esm/utils}/BaseView/BaseView.js +0 -0
- /package/lib/{utils → esm/utils}/BaseView/BaseView.native.js +0 -0
- /package/lib/{utils → esm/utils}/BaseView/index.js +0 -0
- /package/lib/{utils → esm/utils}/a11y/index.js +0 -0
- /package/lib/{utils → esm/utils}/a11y/semantics.js +0 -0
- /package/lib/{utils → esm/utils}/a11y/textSize.js +0 -0
- /package/lib/{utils → esm/utils}/animation/index.js +0 -0
- /package/lib/{utils → esm/utils}/animation/useVerticalExpandAnimation.js +0 -0
- /package/lib/{utils → esm/utils}/containUniqueFields.js +0 -0
- /package/lib/{utils → esm/utils}/convertFromMegaByteToByte.js +0 -0
- /package/lib/{utils → esm/utils}/floating-ui/index.js +0 -0
- /package/lib/{utils → esm/utils}/floating-ui/index.native.js +0 -0
- /package/lib/{utils → esm/utils}/formatImageSource.js +0 -0
- /package/lib/{utils → esm/utils}/hasOwnProperty.js +0 -0
- /package/lib/{utils → esm/utils}/htmlAttrs.js +0 -0
- /package/lib/{utils → esm/utils}/index.js +0 -0
- /package/lib/{utils → esm/utils}/info/index.js +0 -0
- /package/lib/{utils → esm/utils}/info/platform/index.js +0 -0
- /package/lib/{utils → esm/utils}/info/platform/platform.android.js +0 -0
- /package/lib/{utils → esm/utils}/info/platform/platform.ios.js +0 -0
- /package/lib/{utils → esm/utils}/info/platform/platform.js +0 -0
- /package/lib/{utils → esm/utils}/info/platform/platform.native.js +0 -0
- /package/lib/{utils → esm/utils}/info/versions.js +0 -0
- /package/lib/{utils → esm/utils}/pressability.js +0 -0
- /package/lib/{utils → esm/utils}/props/a11yProps.js +0 -0
- /package/lib/{utils → esm/utils}/props/clickProps.js +0 -0
- /package/lib/{utils → esm/utils}/props/contentfulProps.js +0 -0
- /package/lib/{utils → esm/utils}/props/copyPropTypes.js +0 -0
- /package/lib/{utils → esm/utils}/props/getPropSelector.js +0 -0
- /package/lib/{utils → esm/utils}/props/handlerProps.js +0 -0
- /package/lib/{utils → esm/utils}/props/hrefAttrsProp.js +0 -0
- /package/lib/{utils → esm/utils}/props/index.js +0 -0
- /package/lib/{utils → esm/utils}/props/inputSupportsProps.js +0 -0
- /package/lib/{utils → esm/utils}/props/linkProps.js +0 -0
- /package/lib/{utils → esm/utils}/props/paddingProp.js +0 -0
- /package/lib/{utils → esm/utils}/props/pressProps.js +0 -0
- /package/lib/{utils → esm/utils}/props/rectProp.js +0 -0
- /package/lib/{utils → esm/utils}/props/responsiveProps.js +0 -0
- /package/lib/{utils → esm/utils}/props/spacingProps.js +0 -0
- /package/lib/{utils → esm/utils}/props/textInputProps.js +0 -0
- /package/lib/{utils → esm/utils}/props/textProps.js +0 -0
- /package/lib/{utils → esm/utils}/props/tokens.js +0 -0
- /package/lib/{utils → esm/utils}/props/variantProp.js +0 -0
- /package/lib/{utils → esm/utils}/props/viewProps.js +0 -0
- /package/lib/{utils → esm/utils}/ssr-media-query/create-stylesheet/index.android.js +0 -0
- /package/lib/{utils → esm/utils}/ssr-media-query/create-stylesheet/index.ios.js +0 -0
- /package/lib/{utils → esm/utils}/ssr-media-query/hash.js +0 -0
- /package/lib/{utils → esm/utils}/ssr-media-query/index.js +0 -0
- /package/lib/{utils → esm/utils}/ssr-media-query/utils/common.js +0 -0
- /package/lib/{utils → esm/utils}/ssr-media-query/utils/create-declaration-block.js +0 -0
- /package/lib/{utils → esm/utils}/ssr-media-query/utils/create-media-query-styles.js +0 -0
- /package/lib/{utils → esm/utils}/ssr-media-query/utils/hyphenate-style-name.js +0 -0
- /package/lib/{utils → esm/utils}/ssr.js +0 -0
- /package/lib/{utils → esm/utils}/transformGradient.js +0 -0
- /package/lib/{utils → esm/utils}/useCopy.js +0 -0
- /package/lib/{utils → esm/utils}/useHash.native.js +0 -0
- /package/lib/{utils → esm/utils}/useResponsiveProp.js +0 -0
- /package/lib/{utils → esm/utils}/useSafeLayoutEffect.js +0 -0
- /package/lib/{utils → esm/utils}/useScrollBlocking.native.js +0 -0
- /package/lib/{utils → esm/utils}/useUniqueId.js +0 -0
- /package/lib/{utils → esm/utils}/withLinkRouter.js +0 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.resolvePressableTokens = exports.resolvePressableState = exports.getPressHandlersWithArgs = exports.getCursorStyle = void 0;
|
|
7
|
+
var _Platform = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Platform"));
|
|
8
|
+
var _StyleSheet = _interopRequireDefault(require("react-native-web/dist/cjs/exports/StyleSheet"));
|
|
9
|
+
var _pressProps = _interopRequireDefault(require("./props/pressProps"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {import('react').ReactNode} ReactNode
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
// These roles should result in cursor: pointer but don't in current RNW releases
|
|
16
|
+
const shouldUseCursor = ['checkbox', 'radio', 'switch'];
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* React Native Web has some built-in logic for applying cursor styles based on accessibility roles;
|
|
20
|
+
* however, it misses certain cases. This fills in known cases where widely used versions of RNW
|
|
21
|
+
* fail to apply an expected cursor style.
|
|
22
|
+
*
|
|
23
|
+
* @param {object} props
|
|
24
|
+
* @param {boolean} [props.inactive]
|
|
25
|
+
* @param {boolean} [props.disabled]
|
|
26
|
+
* @param {string} [props.accessibilityRole]
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
29
|
+
const getCursorStyle = _ref => {
|
|
30
|
+
let {
|
|
31
|
+
inactive,
|
|
32
|
+
disabled,
|
|
33
|
+
accessibilityRole
|
|
34
|
+
} = _ref;
|
|
35
|
+
if (_Platform.default.OS !== 'web') return undefined;
|
|
36
|
+
if (inactive || disabled) return staticStyles.notAllowed;
|
|
37
|
+
if (shouldUseCursor.includes(accessibilityRole)) return staticStyles.pointer;
|
|
38
|
+
return undefined; // allows React Native Web's built-in logic to apply
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @typedef {{ pressed: boolean, focused: boolean, hovered?: boolean }} PressableState
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Maps the state object given by the React Native `Pressable` component to the set of
|
|
47
|
+
* equivalent appearance names used in UDS.
|
|
48
|
+
*
|
|
49
|
+
* @param {PressableState} pressableState - state object passed by React Native's `<Pressable>` into
|
|
50
|
+
* render functions passed to its `style` or `children` props.
|
|
51
|
+
* @param {object} [additionalState] - properties specific to the current component,
|
|
52
|
+
* such as `inactive`, `selected`, etc.
|
|
53
|
+
* @returns {object}
|
|
54
|
+
*/
|
|
55
|
+
exports.getCursorStyle = getCursorStyle;
|
|
56
|
+
const resolvePressableState = function () {
|
|
57
|
+
let {
|
|
58
|
+
pressed = false,
|
|
59
|
+
focused = false,
|
|
60
|
+
hovered = false
|
|
61
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
62
|
+
let additionalState = arguments.length > 1 ? arguments[1] : undefined;
|
|
63
|
+
return {
|
|
64
|
+
...additionalState,
|
|
65
|
+
focus: focused,
|
|
66
|
+
hover: hovered,
|
|
67
|
+
pressed
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Takes a UDS `tokens` prop and, if it is a function, resolves it based on a state
|
|
73
|
+
* object passed from the React Native `Pressable` component and optional extra properties.
|
|
74
|
+
*
|
|
75
|
+
* @param {object|function} tokens - UDS system tokens prop
|
|
76
|
+
* @param {PressableState} pressableState - state object passed by React Native's `<Pressable>`
|
|
77
|
+
* @param {object} [additionalState] - properties specific to the current component
|
|
78
|
+
* @returns {object} - resolved tokens object
|
|
79
|
+
*/
|
|
80
|
+
exports.resolvePressableState = resolvePressableState;
|
|
81
|
+
const resolvePressableTokens = (tokens, pressableState, additionalState) => {
|
|
82
|
+
if (typeof tokens !== 'function') return tokens;
|
|
83
|
+
const udsPressableState = resolvePressableState(pressableState, additionalState);
|
|
84
|
+
return tokens(udsPressableState);
|
|
85
|
+
};
|
|
86
|
+
exports.resolvePressableTokens = resolvePressableTokens;
|
|
87
|
+
const staticStyles = _StyleSheet.default.create(_Platform.default.select({
|
|
88
|
+
web: {
|
|
89
|
+
notAllowed: {
|
|
90
|
+
cursor: 'not-allowed'
|
|
91
|
+
},
|
|
92
|
+
pointer: {
|
|
93
|
+
cursor: 'pointer'
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
default: {}
|
|
97
|
+
}));
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* From an object of props, extracts any platform-appropriate press handler functions and wraps
|
|
101
|
+
* them in a function that passes in some provided args. Allows components containing a Pressable
|
|
102
|
+
* to pass in press handlers that are then called with state or values that is otherwise internal.
|
|
103
|
+
*/
|
|
104
|
+
const getPressHandlersWithArgs = function () {
|
|
105
|
+
let pressableProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
106
|
+
let args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
107
|
+
// Allow handlers to be passed down for blur, hover, focus, pressIn, etc
|
|
108
|
+
const pressHandlers = Object.fromEntries(Object.entries(_pressProps.default.selectHandlers(pressableProps)).map(_ref2 => {
|
|
109
|
+
let [key, handler] = _ref2;
|
|
110
|
+
return {
|
|
111
|
+
[key]: function () {
|
|
112
|
+
for (var _len = arguments.length, defaultArgs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
113
|
+
defaultArgs[_key] = arguments[_key];
|
|
114
|
+
}
|
|
115
|
+
// Pass each handler data on this button and current selection
|
|
116
|
+
handler(...args, ...defaultArgs);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
}));
|
|
120
|
+
return pressHandlers;
|
|
121
|
+
};
|
|
122
|
+
exports.getPressHandlersWithArgs = getPressHandlersWithArgs;
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
|
+
var _Platform = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Platform"));
|
|
9
|
+
var _getPropSelector = _interopRequireDefault(require("./getPropSelector"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
// React Native exports a11y prop definitions as TypeScript Interfaces, but no longer exports PropTypes
|
|
12
|
+
// so we have to define them ourselves.
|
|
13
|
+
const nativeA11yPropTypes = {
|
|
14
|
+
accessible: _propTypes.default.bool,
|
|
15
|
+
focusable: _propTypes.default.bool,
|
|
16
|
+
accessibilityElementsHidden: _propTypes.default.bool,
|
|
17
|
+
accessibilityHint: _propTypes.default.string,
|
|
18
|
+
// react-native-web ignores `accessibilityHint`
|
|
19
|
+
accessibilityIgnoresInvertColors: _propTypes.default.bool,
|
|
20
|
+
accessibilityLabel: _propTypes.default.string,
|
|
21
|
+
accessibilityRole: _propTypes.default.string,
|
|
22
|
+
accessibilityActions: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
23
|
+
name: _propTypes.default.string.isRequired,
|
|
24
|
+
label: _propTypes.default.string
|
|
25
|
+
})),
|
|
26
|
+
accessibilityLiveRegion: _propTypes.default.oneOf(['none', 'polite', 'assertive']),
|
|
27
|
+
accessibilityState: _propTypes.default.shape({
|
|
28
|
+
disabled: _propTypes.default.bool,
|
|
29
|
+
selected: _propTypes.default.bool,
|
|
30
|
+
checked: _propTypes.default.oneOf([true, false, 'mixed']),
|
|
31
|
+
busy: _propTypes.default.bool,
|
|
32
|
+
expanded: _propTypes.default.bool
|
|
33
|
+
}),
|
|
34
|
+
accessibilityValue: _propTypes.default.shape({
|
|
35
|
+
min: _propTypes.default.number,
|
|
36
|
+
max: _propTypes.default.number,
|
|
37
|
+
now: _propTypes.default.number,
|
|
38
|
+
text: _propTypes.default.string
|
|
39
|
+
}),
|
|
40
|
+
accessibilityViewIsModal: _propTypes.default.bool,
|
|
41
|
+
importantForAccessibility: _propTypes.default.oneOf(['auto', 'yes', 'no', 'no-hide-descendants']),
|
|
42
|
+
onAccessibilityAction: _propTypes.default.func,
|
|
43
|
+
onAccessibilityEscape: _propTypes.default.func,
|
|
44
|
+
onAccessibilityTap: _propTypes.default.func
|
|
45
|
+
};
|
|
46
|
+
const a11yPropTypes = {
|
|
47
|
+
...nativeA11yPropTypes,
|
|
48
|
+
// React Native Web adds many a11y props that alias aria-* attributes
|
|
49
|
+
// Types based on https://necolas.github.io/react-native-web/docs/accessibility/
|
|
50
|
+
accessibilityActiveDescendant: _propTypes.default.string,
|
|
51
|
+
accessibilityAtomic: _propTypes.default.bool,
|
|
52
|
+
accessibilityAutoComplete: _propTypes.default.string,
|
|
53
|
+
accessibilityBusy: _propTypes.default.bool,
|
|
54
|
+
accessibilityChecked: _propTypes.default.oneOf([true, false, 'mixed']),
|
|
55
|
+
accessibilityColumnCount: _propTypes.default.number,
|
|
56
|
+
accessibilityColumnIndex: _propTypes.default.number,
|
|
57
|
+
accessibilityColumnSpan: _propTypes.default.number,
|
|
58
|
+
accessibilityControls: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)]),
|
|
59
|
+
accessibilityCurrent: _propTypes.default.oneOf([true, false, 'page', 'step', 'location', 'date', 'time']),
|
|
60
|
+
accessibilityDescribedBy: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)]),
|
|
61
|
+
accessibilityDetails: _propTypes.default.string,
|
|
62
|
+
accessibilityDisabled: _propTypes.default.bool,
|
|
63
|
+
accessibilityErrorMessage: _propTypes.default.string,
|
|
64
|
+
accessibilityExpanded: _propTypes.default.bool,
|
|
65
|
+
accessibilityFlowTo: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)]),
|
|
66
|
+
accessibilityHasPopup: _propTypes.default.string,
|
|
67
|
+
accessibilityHidden: _propTypes.default.bool,
|
|
68
|
+
accessibilityInvalid: _propTypes.default.bool,
|
|
69
|
+
accessibilityKeyShortcuts: _propTypes.default.string,
|
|
70
|
+
accessibilityLabelledBy: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)]),
|
|
71
|
+
accessibilityLevel: _propTypes.default.number,
|
|
72
|
+
accessibilityModal: _propTypes.default.bool,
|
|
73
|
+
accessibilityMultiline: _propTypes.default.bool,
|
|
74
|
+
accessibilityMultiSelectable: _propTypes.default.bool,
|
|
75
|
+
accessibilityOrientation: _propTypes.default.oneOf(['horizontal', 'vertical']),
|
|
76
|
+
accessibilityOwns: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)]),
|
|
77
|
+
accessibilityPlaceholder: _propTypes.default.string,
|
|
78
|
+
accessibilityPosInSet: _propTypes.default.number,
|
|
79
|
+
accessibilityPressed: _propTypes.default.bool,
|
|
80
|
+
accessibilityReadOnly: _propTypes.default.bool,
|
|
81
|
+
accessibilityRequired: _propTypes.default.bool,
|
|
82
|
+
accessibilityRoleDescription: _propTypes.default.string,
|
|
83
|
+
accessibilityRowCount: _propTypes.default.number,
|
|
84
|
+
accessibilityRowIndex: _propTypes.default.number,
|
|
85
|
+
accessibilityRowSpan: _propTypes.default.number,
|
|
86
|
+
accessibilitySelected: _propTypes.default.bool,
|
|
87
|
+
accessibilitySetSize: _propTypes.default.number,
|
|
88
|
+
accessibilitySort: _propTypes.default.oneOf(['ascending', 'descending', 'none', 'other']),
|
|
89
|
+
accessibilityValueMax: _propTypes.default.number,
|
|
90
|
+
accessibilityValueMin: _propTypes.default.number,
|
|
91
|
+
accessibilityValueNow: _propTypes.default.number,
|
|
92
|
+
accessibilityValueText: _propTypes.default.string
|
|
93
|
+
};
|
|
94
|
+
const a11yPropTypesByPlatform = _Platform.default.select({
|
|
95
|
+
// React Native Web adds many a11y props that alias aria-* attributes
|
|
96
|
+
// Types based on https://necolas.github.io/react-native-web/docs/accessibility/
|
|
97
|
+
web: a11yPropTypes,
|
|
98
|
+
// Ignore web-only props in native builds
|
|
99
|
+
default: nativeA11yPropTypes
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
// These RNW-only props only exist in RNW >=0.18. Catch them and map them according to platform
|
|
103
|
+
// so all props work on RN, RNW >=0.18 and RNW <=0.18, regardless of which they were written for:
|
|
104
|
+
// - On native, bundle them into objects, like `accessibilityValue: { max: 100 }`
|
|
105
|
+
// - On web, split them into both of:
|
|
106
|
+
// - The appropriate aria-* attr, like `aria-valuenow`, which will work regardless of RNW version
|
|
107
|
+
// - The corresponding RNW >=0.18 prop, like `accessibilityValueNow`, which in some cases does more
|
|
108
|
+
// than just add the aria-* (e.g. `accessibilityDisabled` adds `disabled` if element supports it,
|
|
109
|
+
// and future releases might add more features here).
|
|
110
|
+
const rwnPropMappings = {
|
|
111
|
+
// Former accessibilityValue props.
|
|
112
|
+
accessibilityValueMax: value => _Platform.default.select({
|
|
113
|
+
web: {
|
|
114
|
+
'aria-valuemax': value,
|
|
115
|
+
accessibilityValueMax: value
|
|
116
|
+
},
|
|
117
|
+
default: {
|
|
118
|
+
accessibilityValue: {
|
|
119
|
+
max: value
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}),
|
|
123
|
+
accessibilityValueMin: value => _Platform.default.select({
|
|
124
|
+
web: {
|
|
125
|
+
'aria-valuemin': value,
|
|
126
|
+
accessibilityValueMin: value
|
|
127
|
+
},
|
|
128
|
+
default: {
|
|
129
|
+
accessibilityValue: {
|
|
130
|
+
min: value
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}),
|
|
134
|
+
accessibilityValueNow: value => _Platform.default.select({
|
|
135
|
+
web: {
|
|
136
|
+
'aria-valuenow': value,
|
|
137
|
+
accessibilityValueNow: value
|
|
138
|
+
},
|
|
139
|
+
default: {
|
|
140
|
+
accessibilityValue: {
|
|
141
|
+
now: value
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}),
|
|
145
|
+
accessibilityValueText: value => _Platform.default.select({
|
|
146
|
+
web: {
|
|
147
|
+
'aria-valuetext': value,
|
|
148
|
+
accessibilityValueText: value
|
|
149
|
+
},
|
|
150
|
+
default: {
|
|
151
|
+
accessibilityValue: {
|
|
152
|
+
text: value
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}),
|
|
156
|
+
// Former accessibilityState props
|
|
157
|
+
accessibilityBusy: value => _Platform.default.select({
|
|
158
|
+
web: {
|
|
159
|
+
'aria-busy': value,
|
|
160
|
+
accessibilityBusy: value
|
|
161
|
+
},
|
|
162
|
+
default: {
|
|
163
|
+
accessibilityState: {
|
|
164
|
+
busy: value
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}),
|
|
168
|
+
accessibilityChecked: value => _Platform.default.select({
|
|
169
|
+
web: {
|
|
170
|
+
'aria-checked': value,
|
|
171
|
+
accessibilityChecked: value
|
|
172
|
+
},
|
|
173
|
+
default: {
|
|
174
|
+
accessibilityState: {
|
|
175
|
+
checked: value
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}),
|
|
179
|
+
accessibilityDisabled: value => _Platform.default.select({
|
|
180
|
+
web: {
|
|
181
|
+
'aria-disabled': value,
|
|
182
|
+
// RNW >= 0.18 maps `accessibilityDisabled` to `disabled` attr if element supports it
|
|
183
|
+
accessibilityDisabled: value,
|
|
184
|
+
// As of RNW 0.18.9, Pressable doesn't support `accessibilityDisabled`, only `disabled`,
|
|
185
|
+
// but everything else supports `accessibilityDisabled` but not `disabled`.
|
|
186
|
+
disabled: value
|
|
187
|
+
},
|
|
188
|
+
default: {
|
|
189
|
+
accessibilityState: {
|
|
190
|
+
disabled: value
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}),
|
|
194
|
+
accessibilityExpanded: value => _Platform.default.select({
|
|
195
|
+
web: {
|
|
196
|
+
'aria-expanded': value,
|
|
197
|
+
accessibilityExpanded: value
|
|
198
|
+
},
|
|
199
|
+
default: {
|
|
200
|
+
accessibilityState: {
|
|
201
|
+
expanded: value
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}),
|
|
205
|
+
accessibilitySelected: value => _Platform.default.select({
|
|
206
|
+
web: {
|
|
207
|
+
'aria-selected': value,
|
|
208
|
+
accessibilitySelected: value
|
|
209
|
+
},
|
|
210
|
+
default: {
|
|
211
|
+
accessibilityState: {
|
|
212
|
+
selected: value
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
})
|
|
216
|
+
};
|
|
217
|
+
if (_Platform.default.OS === 'web') {
|
|
218
|
+
const mapIfDefined = (value, fn) => value === undefined ? undefined : fn(value);
|
|
219
|
+
|
|
220
|
+
// On Web only, these React Native object props need manual mapping in RNW >=0.18
|
|
221
|
+
// which dropped support for the React Native shape of these props.
|
|
222
|
+
// Re-use our RNW 0.18 prop mappings to support both RNW <0.18 (aria-*) and
|
|
223
|
+
// new features added in >=0.18 (e.g. for accessibilityDisabled).
|
|
224
|
+
rwnPropMappings.accessibilityValue = function () {
|
|
225
|
+
let {
|
|
226
|
+
max,
|
|
227
|
+
min,
|
|
228
|
+
now,
|
|
229
|
+
text
|
|
230
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
231
|
+
return {
|
|
232
|
+
...mapIfDefined(max, rwnPropMappings.accessibilityValueMax),
|
|
233
|
+
...mapIfDefined(min, rwnPropMappings.accessibilityValueMin),
|
|
234
|
+
...mapIfDefined(now, rwnPropMappings.accessibilityValueNow),
|
|
235
|
+
...mapIfDefined(text, rwnPropMappings.accessibilityValueText)
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
rwnPropMappings.accessibilityState = function () {
|
|
239
|
+
let {
|
|
240
|
+
busy,
|
|
241
|
+
checked,
|
|
242
|
+
disabled,
|
|
243
|
+
expanded,
|
|
244
|
+
selected
|
|
245
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
246
|
+
return {
|
|
247
|
+
...mapIfDefined(busy, rwnPropMappings.accessibilityBusy),
|
|
248
|
+
...mapIfDefined(checked, rwnPropMappings.accessibilityChecked),
|
|
249
|
+
...mapIfDefined(disabled, rwnPropMappings.accessibilityDisabled),
|
|
250
|
+
...mapIfDefined(expanded, rwnPropMappings.accessibilityExpanded),
|
|
251
|
+
...mapIfDefined(selected, rwnPropMappings.accessibilitySelected)
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
var _default = exports.default = {
|
|
256
|
+
/**
|
|
257
|
+
* Proptypes for recognised React Native accessiblity (a11y) props.
|
|
258
|
+
* Spread this in the propTypes of components that accept React Native a11y props.
|
|
259
|
+
*/
|
|
260
|
+
types: a11yPropTypes,
|
|
261
|
+
/**
|
|
262
|
+
* Filters a props object, returning only recognised React Native accessiblity (a11y) props.
|
|
263
|
+
*
|
|
264
|
+
* Where components accept React Native a11y props, pass { ...rest } from its props to this,
|
|
265
|
+
* then spread the returned object into the component's props (usually its outer container).
|
|
266
|
+
*/
|
|
267
|
+
select: (0, _getPropSelector.default)(
|
|
268
|
+
// Allow all React Native accessibility props
|
|
269
|
+
a11yPropTypesByPlatform,
|
|
270
|
+
// Allow any `aria-*` attribute on web; ignore them on native
|
|
271
|
+
_Platform.default.OS === 'web' && /^aria-/,
|
|
272
|
+
// For the props added and deprecated in React Native Web 0.18, convert them to
|
|
273
|
+
// a form that is platform-appropriate and RNW-version safe
|
|
274
|
+
(key, value) => {
|
|
275
|
+
const rnwPropMapper = rwnPropMappings[key];
|
|
276
|
+
return rnwPropMapper ? rnwPropMapper(value) : undefined;
|
|
277
|
+
}),
|
|
278
|
+
/**
|
|
279
|
+
* Use this to disable focus for elements which are visually hidden but still rendered.
|
|
280
|
+
*/
|
|
281
|
+
nonFocusableProps: {
|
|
282
|
+
focusable: false,
|
|
283
|
+
// for android, and for keyboard nav in web
|
|
284
|
+
..._Platform.default.select({
|
|
285
|
+
web: {
|
|
286
|
+
accessibilityHidden: true // web screenreaders
|
|
287
|
+
},
|
|
288
|
+
android: {
|
|
289
|
+
importantForAccessibility: 'no-hide-descendants'
|
|
290
|
+
},
|
|
291
|
+
ios: {
|
|
292
|
+
accessibilityElementsHidden: true
|
|
293
|
+
}
|
|
294
|
+
})
|
|
295
|
+
},
|
|
296
|
+
/**
|
|
297
|
+
* Generates an object of platform-appropriate a11y props describing an item that has an
|
|
298
|
+
* ordered position in a set. Examples of usage by accessibility tools includes screenreaders
|
|
299
|
+
* saying "Item X of Y" when this item is select.
|
|
300
|
+
*
|
|
301
|
+
* @param {number} itemsCount - the number of items in the set
|
|
302
|
+
* @param {number} index - the current item's index in the set
|
|
303
|
+
* @returns {object} - platform-applicable a11y props describing this position (if available)
|
|
304
|
+
*/
|
|
305
|
+
getPositionInSet: (itemsCount, index) => _Platform.default.select({
|
|
306
|
+
web: {
|
|
307
|
+
// accessibilityPosInSet etc exists in React Native Web main branch
|
|
308
|
+
// but not in a release compatible with Expo etc; just use `aria-*`
|
|
309
|
+
'aria-setsize': itemsCount,
|
|
310
|
+
'aria-posinset': index + 1
|
|
311
|
+
},
|
|
312
|
+
// No equivalents exist on the native side
|
|
313
|
+
default: {}
|
|
314
|
+
})
|
|
315
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
const clickHandlerMapping = {
|
|
10
|
+
onClick: 'onPress',
|
|
11
|
+
onMouseDown: 'onPressIn',
|
|
12
|
+
onMouseUp: 'onPressOut'
|
|
13
|
+
};
|
|
14
|
+
var _default = exports.default = {
|
|
15
|
+
/**
|
|
16
|
+
* Web-oriented HTML click handlers that may be mapped to React Native press handlers
|
|
17
|
+
*/
|
|
18
|
+
types: Object.fromEntries(Object.keys(clickHandlerMapping).map(mouseName => [mouseName, _propTypes.default.func])),
|
|
19
|
+
/**
|
|
20
|
+
* Takes a set of props and converts HTML mouse click oriented event handlers to closest
|
|
21
|
+
* equivalent React Native press event handler.
|
|
22
|
+
*
|
|
23
|
+
* Use this when a component that expects press-oriented props may need to support third-party
|
|
24
|
+
* web-oriented tooling that injects web-oriented event handlers directly. For example, for
|
|
25
|
+
* to support use with NextJS's 'next/link' component, which injects `onClick` prop into its child.
|
|
26
|
+
*/
|
|
27
|
+
toPressProps: props => Object.fromEntries(Object.entries(props).map(_ref => {
|
|
28
|
+
let [originalName, value] = _ref;
|
|
29
|
+
const translatedName = clickHandlerMapping[originalName];
|
|
30
|
+
return translatedName ? [translatedName, value] : [originalName, value];
|
|
31
|
+
}))
|
|
32
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = componentPropType;
|
|
7
|
+
/**
|
|
8
|
+
* Returns a prop type validator which checks whether a prop is either a component or an array of
|
|
9
|
+
* components of a given type, based on their `name` or `displayName` properties.
|
|
10
|
+
* Use an array of strings for `passedName` to accept more than one component type.
|
|
11
|
+
* For an array the validation fails on the first occurrence of an invalid element.
|
|
12
|
+
*
|
|
13
|
+
* @param {string|string[]} passedName
|
|
14
|
+
* @return {function}
|
|
15
|
+
*/
|
|
16
|
+
function componentPropType(passedName) {
|
|
17
|
+
const passedNames = typeof passedName === 'string' ? [passedName] : passedName;
|
|
18
|
+
const checkProp = (props, propName, componentName) => {
|
|
19
|
+
if (props[propName] === undefined || props[propName] === null) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
if (Array.isArray(props[propName])) {
|
|
23
|
+
// Iterates through every child and try to find the first element that does not match the passed name
|
|
24
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
|
25
|
+
return props[propName].map((_, index) => checkProp(props[propName], index, componentName)).find(Boolean);
|
|
26
|
+
}
|
|
27
|
+
const nameInProp = props[propName].type?.displayName || props[propName].type?.name;
|
|
28
|
+
if (!nameInProp || !passedNames.includes(nameInProp)) {
|
|
29
|
+
const propDescription = nameInProp ? `Component ${nameInProp}` : typeof props[propName];
|
|
30
|
+
return new Error(`${componentName}: ${propDescription} was passed to \`${propName}\` prop; should be ${passedNames.join(' or ')}`);
|
|
31
|
+
}
|
|
32
|
+
return undefined;
|
|
33
|
+
};
|
|
34
|
+
const checkRequired = (props, propName, componentName) => {
|
|
35
|
+
if (props[propName] === undefined) {
|
|
36
|
+
return new Error(`The prop \`${propName}\` is marked as required in \`${componentName}\`, but its value is ${props[propName]}.`);
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
};
|
|
40
|
+
const createValidate = isRequired => {
|
|
41
|
+
if (isRequired) {
|
|
42
|
+
return (props, propName, componentName) => {
|
|
43
|
+
const checkForError = checkProp(props, propName, componentName);
|
|
44
|
+
if (checkForError) {
|
|
45
|
+
return checkForError;
|
|
46
|
+
}
|
|
47
|
+
return checkRequired(props, propName, componentName);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return checkProp;
|
|
51
|
+
};
|
|
52
|
+
const validate = createValidate();
|
|
53
|
+
validate.isRequired = createValidate(true);
|
|
54
|
+
return validate;
|
|
55
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
|
+
var _Platform = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Platform"));
|
|
9
|
+
var _getPropSelector = _interopRequireDefault(require("./getPropSelector"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const contentfulPropsTypes = {
|
|
12
|
+
..._Platform.default.select({
|
|
13
|
+
web: {
|
|
14
|
+
'data-contentful-field-id': _propTypes.default.string,
|
|
15
|
+
'data-contentful-entry-id': _propTypes.default.string
|
|
16
|
+
},
|
|
17
|
+
default: {}
|
|
18
|
+
})
|
|
19
|
+
};
|
|
20
|
+
var _default = exports.default = {
|
|
21
|
+
/**
|
|
22
|
+
* Set of contentful properties used for the content preview inspector.
|
|
23
|
+
*/
|
|
24
|
+
types: contentfulPropsTypes,
|
|
25
|
+
/**
|
|
26
|
+
* Filters a props object, returning only contentful props.
|
|
27
|
+
*/
|
|
28
|
+
select: (0, _getPropSelector.default)(contentfulPropsTypes)
|
|
29
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
var _default = exports.default = _propTypes.default.oneOf(['en', 'fr']);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = getPropSelector;
|
|
7
|
+
var _lodash = _interopRequireDefault(require("lodash.merge"));
|
|
8
|
+
var _hasOwnProperty = _interopRequireDefault(require("../hasOwnProperty"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
/**
|
|
11
|
+
* @callback PropSelectorCallback - a callback called for each prop passed to a component
|
|
12
|
+
* @param {string} key - the key for the prop to be tested
|
|
13
|
+
* @param {*} value - the value of the prop being passed in to the component
|
|
14
|
+
* @returns {object|undefined}
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @param {PropSelectorCallback} callback
|
|
19
|
+
* @param {object} items
|
|
20
|
+
* @param {string} key
|
|
21
|
+
* @param {*} value
|
|
22
|
+
* @returns {object|undefined}
|
|
23
|
+
*/
|
|
24
|
+
const applyCallback = (callback, items, key, value) => {
|
|
25
|
+
// If there's no callback, continue and look up keys as normal
|
|
26
|
+
if (typeof callback !== 'function') return undefined;
|
|
27
|
+
const newItems = callback(key, value);
|
|
28
|
+
|
|
29
|
+
// If the callback doesn't return anything, continue and look up keys as normal
|
|
30
|
+
if (!newItems) return undefined;
|
|
31
|
+
|
|
32
|
+
// If the callback returns items, merge them in, deep merging props that are objects
|
|
33
|
+
return (0, _lodash.default)({}, items, newItems);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Generates a function to filter an object of props down to a subset of allowed props, with
|
|
38
|
+
* optional prop alteration and re-mapping via an optional callback.
|
|
39
|
+
*
|
|
40
|
+
* @param {object} propTypes - an object where every defined key is a valid prop
|
|
41
|
+
* @param {*} [regexp] - an optional regular expression where any match is a valid prop
|
|
42
|
+
* @param {PropSelectorCallback} callback - optional function taking `(key, value)` returning either undefined or an object of new props to merge in
|
|
43
|
+
* @returns {object} - valid props for this component
|
|
44
|
+
*/
|
|
45
|
+
function getPropSelector(propTypes, regexp, callback) {
|
|
46
|
+
return props => Object.entries(props).reduce((items, _ref) => {
|
|
47
|
+
let [key, value] = _ref;
|
|
48
|
+
return (
|
|
49
|
+
// If there's a callback and it matches something, applyCallback merges it in; return that
|
|
50
|
+
applyCallback(callback, items, key, value) || (
|
|
51
|
+
// If there's no callback match, check if this prop is valid and merge it in if it is
|
|
52
|
+
(0, _hasOwnProperty.default)(propTypes, key) || regexp && regexp.test(key) ? {
|
|
53
|
+
...items,
|
|
54
|
+
[key]: value
|
|
55
|
+
} : items)
|
|
56
|
+
);
|
|
57
|
+
}, {});
|
|
58
|
+
}
|