@telus-uds/components-base 2.5.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 +20 -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/{Carousel → esm/Carousel}/Carousel.js +166 -107
- package/lib/{Carousel → esm/Carousel}/CarouselItem/CarouselItem.js +23 -6
- package/lib/esm/Carousel/Constants.js +7 -0
- package/lib/{TextInput → esm/TextInput}/TextInputBase.js +30 -1
- 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/Constants.js +4 -0
- package/src/TextInput/TextInputBase.jsx +30 -1
- package/lib/Carousel/Constants.js +0 -3
- /package/lib/{A11yInfoProvider → esm/A11yInfoProvider}/index.js +0 -0
- /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}/Autocomplete.js +0 -0
- /package/lib/{Autocomplete → esm/Autocomplete}/Loading.js +0 -0
- /package/lib/{Autocomplete → esm/Autocomplete}/Suggestions.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/{BaseProvider → esm/BaseProvider}/HydrationContext.js +0 -0
- /package/lib/{BaseProvider → esm/BaseProvider}/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}/ButtonDropdown.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}/Card.js +0 -0
- /package/lib/{Card → esm/Card}/CardBase.js +0 -0
- /package/lib/{Card → esm/Card}/PressableCardBase.js +0 -0
- /package/lib/{Card → esm/Card}/index.js +0 -0
- /package/lib/{CardGroup → esm/CardGroup}/CardGroup.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/CarouselStepTracker.js +0 -0
- /package/lib/{Carousel → esm/Carousel}/CarouselStepTracker/index.js +0 -0
- /package/lib/{Carousel → esm/Carousel}/CarouselTabs/CarouselTabs.js +0 -0
- /package/lib/{Carousel → esm/Carousel}/CarouselTabs/CarouselTabsPanel.js +0 -0
- /package/lib/{Carousel → esm/Carousel}/CarouselTabs/CarouselTabsPanelItem.js +0 -0
- /package/lib/{Carousel → esm/Carousel}/CarouselTabs/index.js +0 -0
- /package/lib/{Carousel → esm/Carousel}/CarouselThumbnail.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}/Checkbox.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}/ColourToggle.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/{ExpandCollapseMini → esm/ExpandCollapseMini}/ExpandCollapseMini.js +0 -0
- /package/lib/{ExpandCollapseMini → esm/ExpandCollapseMini}/ExpandCollapseMiniControl.js +0 -0
- /package/lib/{ExpandCollapseMini → esm/ExpandCollapseMini}/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}/Footnote.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}/HorizontalScroll.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}/Icon.js +0 -0
- /package/lib/{Icon → esm/Icon}/IconText.js +0 -0
- /package/lib/{Icon → esm/Icon}/index.js +0 -0
- /package/lib/{IconButton → esm/IconButton}/IconButton.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}/InputSupports.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}/LinkBase.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}/List.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}/ListItemContent.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}/Listbox.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}/PressableItem.js +0 -0
- /package/lib/{Listbox → esm/Listbox}/index.js +0 -0
- /package/lib/{Modal → esm/Modal}/Modal.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}/MultiSelectFilter.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}/Notification.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}/OrderedList.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/{Pagination → esm/Pagination}/usePagination.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/renderFootnoteContent.js +0 -0
- /package/lib/{PriceLockup → esm/PriceLockup}/utils/renderFootnoteLinks.js +0 -0
- /package/lib/{PriceLockup → esm/PriceLockup}/utils/renderPrice.js +0 -0
- /package/lib/{PriceLockup → esm/PriceLockup}/utils/renderTypography.js +0 -0
- /package/lib/{ProductCard → esm/ProductCard}/ProductCard.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}/ProgressBarBackground.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}/QuickLinksFeature.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}/Radio.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}/Search.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.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.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}/getStackedContent.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}/StepTracker.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}/TabBar.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}/Tabs.js +0 -0
- /package/lib/{Tabs → esm/Tabs}/TabsItem.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}/TextArea.js +0 -0
- /package/lib/{TextInput → esm/TextInput}/TextInput.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/{ThemeProvider → esm/ThemeProvider}/utils/theme-tokens.js +0 -0
- /package/lib/{Timeline → esm/Timeline}/Timeline.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}/Tooltip.native.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}/Typography.js +0 -0
- /package/lib/{Typography → esm/Typography}/index.js +0 -0
- /package/lib/{Validator → esm/Validator}/Validator.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/{ViewportProvider → esm/ViewportProvider}/useViewportListener.js +0 -0
- /package/lib/{index.js → esm/index.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}/children.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}/input.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/componentPropType.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/selectSystemProps.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/create-stylesheet-mobile.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/create-stylesheet/index.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-media-query/utils/inject.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.js +0 -0
- /package/lib/{utils → esm/utils}/useHash.native.js +0 -0
- /package/lib/{utils → esm/utils}/useOverlaidPosition.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.js +0 -0
- /package/lib/{utils → esm/utils}/useScrollBlocking.native.js +0 -0
- /package/lib/{utils → esm/utils}/useSpacingScale.js +0 -0
- /package/lib/{utils → esm/utils}/useUniqueId.js +0 -0
- /package/lib/{utils → esm/utils}/withLinkRouter.js +0 -0
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _View = _interopRequireDefault(require("react-native-web/dist/cjs/exports/View"));
|
|
9
|
+
var _Platform = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Platform"));
|
|
10
|
+
var _StyleSheet = _interopRequireDefault(require("react-native-web/dist/cjs/exports/StyleSheet"));
|
|
11
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
+
var _ThemeProvider = require("../ThemeProvider");
|
|
13
|
+
var _utils = require("../utils");
|
|
14
|
+
var _Picker = _interopRequireDefault(require("./Picker"));
|
|
15
|
+
var _InputSupports = _interopRequireDefault(require("../InputSupports"));
|
|
16
|
+
var _constants = require("./constants");
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
+
const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.inputSupportsProps, _utils.viewProps, _utils.htmlAttrs]);
|
|
20
|
+
const selectInputStyles = (_ref, themeOptions, inactive) => {
|
|
21
|
+
let {
|
|
22
|
+
backgroundColor,
|
|
23
|
+
color,
|
|
24
|
+
borderWidth = 0,
|
|
25
|
+
borderColor,
|
|
26
|
+
borderRadius,
|
|
27
|
+
paddingTop,
|
|
28
|
+
paddingBottom,
|
|
29
|
+
paddingLeft = 0,
|
|
30
|
+
paddingRight,
|
|
31
|
+
fontName,
|
|
32
|
+
fontSize,
|
|
33
|
+
fontWeight,
|
|
34
|
+
lineHeight,
|
|
35
|
+
icon,
|
|
36
|
+
iconSize = 0,
|
|
37
|
+
validationIcon,
|
|
38
|
+
validationIconSize = 0,
|
|
39
|
+
height
|
|
40
|
+
} = _ref;
|
|
41
|
+
// Subtract border width from padding so overall input width/height doesn't
|
|
42
|
+
// jump around if the border width changes (avoiding NaN and negative padding)
|
|
43
|
+
const offsetBorder = value => typeof value === 'number' ? Math.max(0, value - borderWidth) : value;
|
|
44
|
+
const textStyles = (0, _ThemeProvider.applyTextStyles)({
|
|
45
|
+
fontName,
|
|
46
|
+
fontSize,
|
|
47
|
+
lineHeight,
|
|
48
|
+
fontWeight,
|
|
49
|
+
themeOptions
|
|
50
|
+
});
|
|
51
|
+
const webStyles = _Platform.default.select({
|
|
52
|
+
web: {
|
|
53
|
+
appearance: 'none',
|
|
54
|
+
WebkitAppearance: 'none',
|
|
55
|
+
// since iOS Safari needs a prefix
|
|
56
|
+
outline: 'none',
|
|
57
|
+
cursor: inactive ? 'not-allowed' : undefined,
|
|
58
|
+
opacity: inactive ? 1 : undefined // override Chrome's default fadeout of a disabled select
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
let paddingWithIcons = paddingRight;
|
|
62
|
+
if (_Platform.default.OS !== 'android') {
|
|
63
|
+
if (icon) {
|
|
64
|
+
paddingWithIcons += iconSize;
|
|
65
|
+
}
|
|
66
|
+
if (validationIcon) {
|
|
67
|
+
paddingWithIcons += validationIconSize;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
backgroundColor,
|
|
72
|
+
color,
|
|
73
|
+
borderWidth,
|
|
74
|
+
borderColor,
|
|
75
|
+
borderRadius,
|
|
76
|
+
paddingLeft: offsetBorder(paddingLeft),
|
|
77
|
+
paddingRight: offsetBorder(paddingWithIcons),
|
|
78
|
+
paddingTop: offsetBorder(paddingTop),
|
|
79
|
+
paddingBottom: offsetBorder(paddingBottom),
|
|
80
|
+
height,
|
|
81
|
+
...textStyles,
|
|
82
|
+
...webStyles
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
const selectOuterBorderStyles = _ref2 => {
|
|
86
|
+
let {
|
|
87
|
+
outerBackgroundColor,
|
|
88
|
+
outerBorderWidth,
|
|
89
|
+
outerBorderColor,
|
|
90
|
+
borderRadius
|
|
91
|
+
} = _ref2;
|
|
92
|
+
return {
|
|
93
|
+
background: outerBackgroundColor,
|
|
94
|
+
...(0, _ThemeProvider.applyOuterBorder)({
|
|
95
|
+
outerBorderColor,
|
|
96
|
+
outerBorderWidth,
|
|
97
|
+
borderRadius
|
|
98
|
+
})
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
const selectIconTokens = _ref3 => {
|
|
102
|
+
let {
|
|
103
|
+
iconSize,
|
|
104
|
+
iconColor
|
|
105
|
+
} = _ref3;
|
|
106
|
+
return {
|
|
107
|
+
size: iconSize,
|
|
108
|
+
color: iconColor
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
const selectIconContainerStyles = _ref4 => {
|
|
112
|
+
let {
|
|
113
|
+
paddingRight,
|
|
114
|
+
paddingBottom
|
|
115
|
+
} = _ref4;
|
|
116
|
+
return {
|
|
117
|
+
paddingRight: paddingRight + 4,
|
|
118
|
+
marginRight: -4,
|
|
119
|
+
paddingBottom
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
const selectValidationIconTokens = _ref5 => {
|
|
123
|
+
let {
|
|
124
|
+
validationIconSize,
|
|
125
|
+
validationIconColor
|
|
126
|
+
} = _ref5;
|
|
127
|
+
return {
|
|
128
|
+
size: validationIconSize,
|
|
129
|
+
color: validationIconColor
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
const selectValidationIconContainerStyles = _ref6 => {
|
|
133
|
+
let {
|
|
134
|
+
icon,
|
|
135
|
+
iconSize = 0,
|
|
136
|
+
paddingRight = 0,
|
|
137
|
+
paddingBottom
|
|
138
|
+
} = _ref6;
|
|
139
|
+
return {
|
|
140
|
+
paddingRight: icon ? paddingRight + iconSize + 4 : paddingRight,
|
|
141
|
+
...(_Platform.default.OS === 'android' ? {
|
|
142
|
+
paddingBottom: paddingBottom + _constants.ANDROID_VALIDATION_ICON_CONTAINER_OFFSET
|
|
143
|
+
} : {
|
|
144
|
+
paddingBottom
|
|
145
|
+
})
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
const selectCustomFeedbackStyles = _ref7 => {
|
|
149
|
+
let {
|
|
150
|
+
feedbackBackgroundColor
|
|
151
|
+
} = _ref7;
|
|
152
|
+
return {
|
|
153
|
+
backgroundColor: feedbackBackgroundColor
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* A basic form single-choice select component. Use in forms or individually to receive user's input.
|
|
159
|
+
*
|
|
160
|
+
* ## Usage criteria
|
|
161
|
+
* - Include a `placeholder` to provide instructions such as "Please select..." as an unselectable option (recommended)
|
|
162
|
+
* - Use when options are between 7-15 (recommended)
|
|
163
|
+
* - For options are 6 and under, use `Radio` groups or `ButtonGroup`.
|
|
164
|
+
* - For options 15 and above, look for alternatives (e.g grouping into categories, or input field with auto-complete etc.)
|
|
165
|
+
*
|
|
166
|
+
* ## Controlled component
|
|
167
|
+
* If it is required that the state of the `Select` be controlled by the application or other external methods,
|
|
168
|
+
* `value` and `onChange` props must be passed to the `Select`.
|
|
169
|
+
* If the `Select` value should not be changed by user input, a `readOnly` prop must be provided.
|
|
170
|
+
*
|
|
171
|
+
* ## Uncontrolled component
|
|
172
|
+
* If it is not necessary to control the `Select` state, you can create one without a value prop.
|
|
173
|
+
* In this case its value can be accessed within the `onChange` callback. Use the `initialValue` prop to set the
|
|
174
|
+
* default value for an uncontrolled `Select`.
|
|
175
|
+
*
|
|
176
|
+
* ## Getting feedback for entered values
|
|
177
|
+
* Use the `feedback` prop to give the user feedback regarding their selection.
|
|
178
|
+
* You can affirm that the user's selection was correct, or highlight errors that must be corrected, using the `validation` prop.
|
|
179
|
+
* Keep feedback text as brief as possible, should be limited to text and links.
|
|
180
|
+
*
|
|
181
|
+
* ## Using a tooltip
|
|
182
|
+
* When a more in-depth explanation is needed to fill out a `Select` properly, the tooltip prop may be used.
|
|
183
|
+
*
|
|
184
|
+
* ## Grouping options
|
|
185
|
+
* `Select` supports option groups. Use a `Select.Group` component to render an `<optgroup>` element with its items.
|
|
186
|
+
* NOTE: this does not work on native platforms - the grouped items will be shown at the same level as the non-grouped items.
|
|
187
|
+
*
|
|
188
|
+
*/
|
|
189
|
+
const Select = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
|
|
190
|
+
let {
|
|
191
|
+
value,
|
|
192
|
+
initialValue,
|
|
193
|
+
onChange,
|
|
194
|
+
children,
|
|
195
|
+
inactive,
|
|
196
|
+
readOnly,
|
|
197
|
+
placeholder,
|
|
198
|
+
validation,
|
|
199
|
+
tokens,
|
|
200
|
+
variant,
|
|
201
|
+
testID,
|
|
202
|
+
...rest
|
|
203
|
+
} = _ref8;
|
|
204
|
+
const {
|
|
205
|
+
currentValue,
|
|
206
|
+
setValue
|
|
207
|
+
} = (0, _utils.useInputValue)({
|
|
208
|
+
value,
|
|
209
|
+
initialValue,
|
|
210
|
+
onChange,
|
|
211
|
+
readOnly
|
|
212
|
+
});
|
|
213
|
+
const [isFocused, setIsFocused] = _react.default.useState(false);
|
|
214
|
+
const handleFocus = () => setIsFocused(true);
|
|
215
|
+
const handleBlur = () => setIsFocused(false);
|
|
216
|
+
const [isHovered, setIsHovered] = _react.default.useState(false);
|
|
217
|
+
const handleMouseOver = () => setIsHovered(true);
|
|
218
|
+
const handleMouseOut = () => setIsHovered(false);
|
|
219
|
+
const [isOpen, setIsOpen] = _react.default.useState(false);
|
|
220
|
+
const {
|
|
221
|
+
supportsProps,
|
|
222
|
+
...selectedProps
|
|
223
|
+
} = selectProps(rest);
|
|
224
|
+
const themeTokens = (0, _ThemeProvider.useThemeTokens)('Select', tokens, variant, {
|
|
225
|
+
focus: isFocused,
|
|
226
|
+
hover: isHovered,
|
|
227
|
+
inactive,
|
|
228
|
+
active: isOpen,
|
|
229
|
+
validation
|
|
230
|
+
});
|
|
231
|
+
const {
|
|
232
|
+
icon: IconComponent,
|
|
233
|
+
validationIcon: ValidationIconComponent
|
|
234
|
+
} = themeTokens;
|
|
235
|
+
const {
|
|
236
|
+
themeOptions
|
|
237
|
+
} = (0, _ThemeProvider.useTheme)();
|
|
238
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputSupports.default, {
|
|
239
|
+
...supportsProps,
|
|
240
|
+
...selectedProps,
|
|
241
|
+
validation: validation,
|
|
242
|
+
feedbackTokens: selectCustomFeedbackStyles(themeTokens),
|
|
243
|
+
children: _ref9 => {
|
|
244
|
+
let {
|
|
245
|
+
inputId,
|
|
246
|
+
...props
|
|
247
|
+
} = _ref9;
|
|
248
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
|
|
249
|
+
style: selectOuterBorderStyles(themeTokens),
|
|
250
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Picker.default, {
|
|
251
|
+
ref: ref,
|
|
252
|
+
style: selectInputStyles(themeTokens, themeOptions, inactive),
|
|
253
|
+
onFocus: handleFocus,
|
|
254
|
+
onBlur: handleBlur,
|
|
255
|
+
onMouseOver: handleMouseOver,
|
|
256
|
+
onMouseOut: handleMouseOut,
|
|
257
|
+
onOpen: () => setIsOpen(true),
|
|
258
|
+
onClose: () => setIsOpen(false),
|
|
259
|
+
onChange: e => setValue(e, null),
|
|
260
|
+
value: currentValue,
|
|
261
|
+
inactive: inactive,
|
|
262
|
+
placeholder: placeholder !== undefined ? {
|
|
263
|
+
label: placeholder,
|
|
264
|
+
value: ''
|
|
265
|
+
} : undefined,
|
|
266
|
+
...props,
|
|
267
|
+
nativeID: inputId,
|
|
268
|
+
testID: testID,
|
|
269
|
+
children: children
|
|
270
|
+
}), ValidationIconComponent && /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
271
|
+
pointerEvents: "none",
|
|
272
|
+
style: [staticStyles.iconContainer, selectValidationIconContainerStyles(themeTokens)],
|
|
273
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ValidationIconComponent, {
|
|
274
|
+
...selectValidationIconTokens(themeTokens)
|
|
275
|
+
})
|
|
276
|
+
}), IconComponent && /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
277
|
+
pointerEvents: "none",
|
|
278
|
+
style: [staticStyles.iconContainer, selectIconContainerStyles(themeTokens)],
|
|
279
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent, {
|
|
280
|
+
...selectIconTokens(themeTokens)
|
|
281
|
+
})
|
|
282
|
+
})]
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
Select.displayName = 'Select';
|
|
288
|
+
Select.propTypes = {
|
|
289
|
+
...selectedSystemPropTypes,
|
|
290
|
+
/**
|
|
291
|
+
* Initial value for the uncontrolled version.
|
|
292
|
+
*/
|
|
293
|
+
initialValue: _propTypes.default.string,
|
|
294
|
+
/**
|
|
295
|
+
* Current value to be set as selected.
|
|
296
|
+
*/
|
|
297
|
+
value: _propTypes.default.string,
|
|
298
|
+
/**
|
|
299
|
+
* Callback to be called when the value changes.
|
|
300
|
+
*/
|
|
301
|
+
onChange: _propTypes.default.func,
|
|
302
|
+
/**
|
|
303
|
+
* An array of items or item groups to be used as options.
|
|
304
|
+
*/
|
|
305
|
+
children: (0, _utils.componentPropType)(['Item', 'Group']),
|
|
306
|
+
/**
|
|
307
|
+
* Whether the select is disabled.
|
|
308
|
+
*/
|
|
309
|
+
inactive: _propTypes.default.bool,
|
|
310
|
+
/**
|
|
311
|
+
* Whether the select is read-only.
|
|
312
|
+
*/
|
|
313
|
+
readOnly: _propTypes.default.bool,
|
|
314
|
+
/**
|
|
315
|
+
* A placeholder to provide instructions (such as "Please select...")
|
|
316
|
+
* as an unselectable option
|
|
317
|
+
*/
|
|
318
|
+
placeholder: _propTypes.default.string,
|
|
319
|
+
/**
|
|
320
|
+
* Select tokens.
|
|
321
|
+
*/
|
|
322
|
+
tokens: (0, _utils.getTokensPropType)('Select'),
|
|
323
|
+
/**
|
|
324
|
+
* Select variant.
|
|
325
|
+
*/
|
|
326
|
+
variant: _utils.variantProp.propType,
|
|
327
|
+
/**
|
|
328
|
+
* Dedicated ID for testing.
|
|
329
|
+
*/
|
|
330
|
+
testID: _propTypes.default.string
|
|
331
|
+
};
|
|
332
|
+
var _default = exports.default = Select;
|
|
333
|
+
const staticStyles = _StyleSheet.default.create({
|
|
334
|
+
iconContainer: {
|
|
335
|
+
position: 'absolute',
|
|
336
|
+
right: 0,
|
|
337
|
+
bottom: 0
|
|
338
|
+
}
|
|
339
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MAX_FONT_SIZE_MULTIPLIER = exports.ANDROID_VALIDATION_ICON_CONTAINER_OFFSET = exports.ANDROID_HORIZONTAL_PADDING_OFFSET = exports.ANDROID_DEFAULT_PADDING = exports.ALLOW_FONT_SCALING = exports.ADJUSTS_FONT_SIZE_TO_FIT = void 0;
|
|
7
|
+
// Because Android
|
|
8
|
+
const ANDROID_VALIDATION_ICON_CONTAINER_OFFSET = exports.ANDROID_VALIDATION_ICON_CONTAINER_OFFSET = 5;
|
|
9
|
+
const ANDROID_HORIZONTAL_PADDING_OFFSET = exports.ANDROID_HORIZONTAL_PADDING_OFFSET = 8;
|
|
10
|
+
const ANDROID_DEFAULT_PADDING = exports.ANDROID_DEFAULT_PADDING = 0;
|
|
11
|
+
const ALLOW_FONT_SCALING = exports.ALLOW_FONT_SCALING = true;
|
|
12
|
+
const ADJUSTS_FONT_SIZE_TO_FIT = exports.ADJUSTS_FONT_SIZE_TO_FIT = true;
|
|
13
|
+
const MAX_FONT_SIZE_MULTIPLIER = exports.MAX_FONT_SIZE_MULTIPLIER = 3;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _Select = _interopRequireDefault(require("./Select"));
|
|
8
|
+
var _Group = _interopRequireDefault(require("./Group"));
|
|
9
|
+
var _Item = _interopRequireDefault(require("./Item"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
_Select.default.Group = _Group.default;
|
|
12
|
+
_Select.default.Item = _Item.default;
|
|
13
|
+
var _default = exports.default = _Select.default;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _Pressable = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Pressable"));
|
|
9
|
+
var _Platform = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Platform"));
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
var _utils = require("../utils");
|
|
12
|
+
var _ThemeProvider = require("../ThemeProvider");
|
|
13
|
+
var _ItemContent = _interopRequireDefault(require("./ItemContent"));
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.linkProps, _utils.viewProps]);
|
|
17
|
+
function selectItemStyles(_ref) {
|
|
18
|
+
let {
|
|
19
|
+
backgroundColor,
|
|
20
|
+
borderColor,
|
|
21
|
+
borderWidth,
|
|
22
|
+
borderStyle,
|
|
23
|
+
paddingLeft,
|
|
24
|
+
paddingRight,
|
|
25
|
+
paddingTop,
|
|
26
|
+
paddingBottom,
|
|
27
|
+
justifyContent,
|
|
28
|
+
verticalAlign
|
|
29
|
+
} = _ref;
|
|
30
|
+
return {
|
|
31
|
+
backgroundColor,
|
|
32
|
+
borderTopColor: borderColor,
|
|
33
|
+
borderTopWidth: borderWidth,
|
|
34
|
+
borderTopStyle: borderStyle,
|
|
35
|
+
paddingLeft,
|
|
36
|
+
paddingRight,
|
|
37
|
+
paddingTop,
|
|
38
|
+
paddingBottom,
|
|
39
|
+
justifyContent,
|
|
40
|
+
...(0, _ThemeProvider.verticalAlignRow)(verticalAlign)
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
`SideNav.Item` is a navigational element that is used within `SideNav` or `SideNav.ItemsGroup`.
|
|
46
|
+
|
|
47
|
+
This component can only be accessed as a name-spaced component: `SideNav.Item`.
|
|
48
|
+
*/
|
|
49
|
+
const Item = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
|
|
50
|
+
let {
|
|
51
|
+
children,
|
|
52
|
+
itemId,
|
|
53
|
+
groupId,
|
|
54
|
+
onPress,
|
|
55
|
+
isActive = false,
|
|
56
|
+
isExpanded = false,
|
|
57
|
+
tokens,
|
|
58
|
+
variant,
|
|
59
|
+
href,
|
|
60
|
+
accessibilityRole = 'link',
|
|
61
|
+
testID,
|
|
62
|
+
...props
|
|
63
|
+
} = _ref2;
|
|
64
|
+
const handlePress = () => onPress(itemId, groupId);
|
|
65
|
+
const {
|
|
66
|
+
hrefAttrs,
|
|
67
|
+
rest
|
|
68
|
+
} = _utils.hrefAttrsProp.bundle(props);
|
|
69
|
+
const selectedProps = selectProps({
|
|
70
|
+
accessibilityRole,
|
|
71
|
+
href,
|
|
72
|
+
onPress: handlePress,
|
|
73
|
+
hrefAttrs,
|
|
74
|
+
...rest
|
|
75
|
+
});
|
|
76
|
+
const getTokens = (0, _ThemeProvider.useThemeTokensCallback)('SideNavItem', tokens, variant);
|
|
77
|
+
const getAppearanceState = _ref3 => {
|
|
78
|
+
let {
|
|
79
|
+
hovered,
|
|
80
|
+
focused
|
|
81
|
+
} = _ref3;
|
|
82
|
+
return {
|
|
83
|
+
hover: hovered,
|
|
84
|
+
active: isActive,
|
|
85
|
+
expanded: isExpanded,
|
|
86
|
+
focus: focused
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
const getPressableStyle = pressableState => ({
|
|
90
|
+
...selectItemStyles(getTokens(getAppearanceState(pressableState))),
|
|
91
|
+
...(_Platform.default.OS === 'web' ? {
|
|
92
|
+
outline: 'none'
|
|
93
|
+
} : {})
|
|
94
|
+
});
|
|
95
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Pressable.default, {
|
|
96
|
+
ref: ref,
|
|
97
|
+
style: getPressableStyle,
|
|
98
|
+
accessibilityState: {
|
|
99
|
+
selected: isActive
|
|
100
|
+
},
|
|
101
|
+
...selectedProps,
|
|
102
|
+
children: pressableState => {
|
|
103
|
+
const themeTokens = getTokens(getAppearanceState(pressableState));
|
|
104
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ItemContent.default, {
|
|
105
|
+
tokens: themeTokens,
|
|
106
|
+
children: children
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
Item.displayName = 'Item';
|
|
112
|
+
Item.propTypes = {
|
|
113
|
+
...selectedSystemPropTypes,
|
|
114
|
+
/**
|
|
115
|
+
* Text content of the `Item`.
|
|
116
|
+
*/
|
|
117
|
+
children: _propTypes.default.node.isRequired,
|
|
118
|
+
/**
|
|
119
|
+
* @ignore
|
|
120
|
+
* Set internally in `SideNav` render function - used to keep track of active item.
|
|
121
|
+
*/
|
|
122
|
+
itemId: _propTypes.default.string,
|
|
123
|
+
/**
|
|
124
|
+
* @ignore
|
|
125
|
+
* Set internally in `SideNav` render function - used to keep track of expanded items groups.
|
|
126
|
+
*/
|
|
127
|
+
groupId: _propTypes.default.string,
|
|
128
|
+
onPress: _propTypes.default.func,
|
|
129
|
+
href: _propTypes.default.string,
|
|
130
|
+
/**
|
|
131
|
+
* On Web if href is passed, React Native Web maps this object's props to
|
|
132
|
+
* `rel`, `target` and `download` attrs.
|
|
133
|
+
*/
|
|
134
|
+
hrefAttrs: _propTypes.default.shape(_utils.hrefAttrsProp.types),
|
|
135
|
+
/**
|
|
136
|
+
* @ignore
|
|
137
|
+
* Set internally in `SideNav` render function.
|
|
138
|
+
*/
|
|
139
|
+
isActive: _propTypes.default.bool,
|
|
140
|
+
/**
|
|
141
|
+
* @ignore
|
|
142
|
+
* Set internally in `SideNav.ItemsGroup` render function. Used to mark expanded `ItemsGroup` parent.
|
|
143
|
+
*/
|
|
144
|
+
isExpanded: _propTypes.default.bool,
|
|
145
|
+
accessibilityRole: _propTypes.default.string,
|
|
146
|
+
testID: _propTypes.default.number,
|
|
147
|
+
tokens: (0, _utils.getTokensPropType)('SideNavItem'),
|
|
148
|
+
variant: _utils.variantProp.propType
|
|
149
|
+
};
|
|
150
|
+
var _default = exports.default = Item;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
exports.selectAccentStyles = selectAccentStyles;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _View = _interopRequireDefault(require("react-native-web/dist/cjs/exports/View"));
|
|
11
|
+
var _StyleSheet = _interopRequireDefault(require("react-native-web/dist/cjs/exports/StyleSheet"));
|
|
12
|
+
var _Typography = _interopRequireDefault(require("../Typography"));
|
|
13
|
+
var _utils = require("../utils");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
function selectAccentStyles(tokens) {
|
|
17
|
+
return {
|
|
18
|
+
left: tokens.accentOffset,
|
|
19
|
+
top: tokens.accentPadding,
|
|
20
|
+
bottom: tokens.accentPadding,
|
|
21
|
+
backgroundColor: tokens.accentBackgroundColor,
|
|
22
|
+
width: tokens.accentWidth,
|
|
23
|
+
position: 'absolute'
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Content inside an item or control in a SideNav, themed by the SideNavItem theme
|
|
29
|
+
*/
|
|
30
|
+
const ItemContent = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
31
|
+
let {
|
|
32
|
+
children,
|
|
33
|
+
tokens
|
|
34
|
+
} = _ref;
|
|
35
|
+
const typographyTokens = (0, _utils.selectTokens)('Typography', tokens);
|
|
36
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
37
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
38
|
+
tokens: typographyTokens,
|
|
39
|
+
ref: ref,
|
|
40
|
+
children: children
|
|
41
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
42
|
+
style: [staticStyles.absolute, selectAccentStyles(tokens)]
|
|
43
|
+
})]
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
ItemContent.displayName = 'ItemContent';
|
|
47
|
+
ItemContent.propTypes = {
|
|
48
|
+
tokens: (0, _utils.getTokensPropType)('SideNavItem'),
|
|
49
|
+
children: _propTypes.default.node
|
|
50
|
+
};
|
|
51
|
+
const staticStyles = _StyleSheet.default.create({
|
|
52
|
+
absolute: {
|
|
53
|
+
position: 'absolute'
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
var _default = exports.default = ItemContent;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _ItemContent = _interopRequireDefault(require("./ItemContent"));
|
|
10
|
+
var _ExpandCollapse = _interopRequireDefault(require("../ExpandCollapse"));
|
|
11
|
+
var _utils = require("../utils");
|
|
12
|
+
var _ThemeProvider = require("../ThemeProvider");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
/**
|
|
16
|
+
Expandable content areas for use within `SideNav`.
|
|
17
|
+
|
|
18
|
+
This component can only be accessed as a name-spaced component: `SideNav.ItemsGroup`.
|
|
19
|
+
|
|
20
|
+
`SideNav.ItemsGroup` contains a label and a list of items. Items can link to in-page elements or route to other pages.
|
|
21
|
+
|
|
22
|
+
## Usage Criteria
|
|
23
|
+
- Use `SideNav.ItemsGroup` with large pages that have multiple sections
|
|
24
|
+
*/const ItemsGroup = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
25
|
+
let {
|
|
26
|
+
children,
|
|
27
|
+
label,
|
|
28
|
+
openGroups,
|
|
29
|
+
groupId,
|
|
30
|
+
isActive = false,
|
|
31
|
+
variant,
|
|
32
|
+
tokens,
|
|
33
|
+
itemTokens,
|
|
34
|
+
onToggle
|
|
35
|
+
} = _ref;
|
|
36
|
+
// A SideNav control uses the same style and theme as SideNavItem, with a 'parent' variant,
|
|
37
|
+
// plus control-specific tokens from the SideNavItemsGroup theme (e.g. open/close icon, etc).
|
|
38
|
+
const getAppearance = appearance => ({
|
|
39
|
+
...variant,
|
|
40
|
+
...appearance,
|
|
41
|
+
active: isActive
|
|
42
|
+
});
|
|
43
|
+
const getItemAppearance = appearance => ({
|
|
44
|
+
...getAppearance(appearance),
|
|
45
|
+
type: 'parent'
|
|
46
|
+
});
|
|
47
|
+
const getGroupTokens = (0, _ThemeProvider.useThemeTokensCallback)('SideNavItemsGroup', tokens, variant);
|
|
48
|
+
const getPanelTokens = appearance => {
|
|
49
|
+
const {
|
|
50
|
+
panelBorderColor,
|
|
51
|
+
...itemsGroupTokens
|
|
52
|
+
} = getGroupTokens(getAppearance(appearance));
|
|
53
|
+
const groupTokens = {
|
|
54
|
+
...itemsGroupTokens,
|
|
55
|
+
borderWidth: 0,
|
|
56
|
+
marginBottom: 0
|
|
57
|
+
};
|
|
58
|
+
return (0, _utils.selectTokens)('ExpandCollapsePanel', groupTokens);
|
|
59
|
+
};
|
|
60
|
+
const getItemTokens = (0, _ThemeProvider.useThemeTokensCallback)('SideNavItem', itemTokens, variant);
|
|
61
|
+
const getControlTokens = appearance => (0, _utils.selectTokens)('ExpandCollapseControl', {
|
|
62
|
+
...getItemTokens(getItemAppearance(appearance)),
|
|
63
|
+
// main style from SideNavItem
|
|
64
|
+
...getGroupTokens(getAppearance(appearance)) // control-specific tokens like icon etc
|
|
65
|
+
});
|
|
66
|
+
const controlContent = controlState => {
|
|
67
|
+
const currentItemTokens = getItemTokens(getItemAppearance(controlState));
|
|
68
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ItemContent.default, {
|
|
69
|
+
tokens: currentItemTokens,
|
|
70
|
+
children: label
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandCollapse.default.Panel, {
|
|
74
|
+
ref: ref,
|
|
75
|
+
openIds: openGroups,
|
|
76
|
+
panelId: groupId,
|
|
77
|
+
onToggle: onToggle,
|
|
78
|
+
tokens: getPanelTokens,
|
|
79
|
+
controlTokens: getControlTokens,
|
|
80
|
+
control: controlContent,
|
|
81
|
+
accessibilityState: {
|
|
82
|
+
active: isActive
|
|
83
|
+
} // ExpandCollapse.Panel handles expanded state
|
|
84
|
+
,
|
|
85
|
+
children: children
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
ItemsGroup.displayName = 'ItemsGroup';
|
|
89
|
+
ItemsGroup.propTypes = {
|
|
90
|
+
/**
|
|
91
|
+
* Specifies the links contained within. It may only contain `SideNav.Item`.
|
|
92
|
+
*/
|
|
93
|
+
children: (0, _utils.componentPropType)('Item'),
|
|
94
|
+
/**
|
|
95
|
+
* Text content of the group's parent `SideNav.Item`.
|
|
96
|
+
*/
|
|
97
|
+
label: _propTypes.default.string.isRequired,
|
|
98
|
+
/**
|
|
99
|
+
* @ignore
|
|
100
|
+
* Set internally in `SideNav` render function - used to keep track of expanded items groups.
|
|
101
|
+
*/
|
|
102
|
+
groupId: _propTypes.default.string,
|
|
103
|
+
/**
|
|
104
|
+
* @ignore
|
|
105
|
+
* Set internally in `SideNav` render function. Called when the group is expanded/collapsed.
|
|
106
|
+
*/
|
|
107
|
+
onToggle: _propTypes.default.func,
|
|
108
|
+
/**
|
|
109
|
+
* @ignore
|
|
110
|
+
* Set internally in `SideNav` render function. Contains `groupId`s of currently open groups.
|
|
111
|
+
*/
|
|
112
|
+
openGroups: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number])),
|
|
113
|
+
/**
|
|
114
|
+
* @ignore
|
|
115
|
+
* Set internally in `SideNav` render function. Used to mark group containing the currently active `SideNav.Item`.
|
|
116
|
+
*/
|
|
117
|
+
isActive: _propTypes.default.bool,
|
|
118
|
+
variant: _utils.variantProp.propType,
|
|
119
|
+
tokens: (0, _utils.getTokensPropType)('SideNavItemsGroup'),
|
|
120
|
+
/**
|
|
121
|
+
* Custom tokens for `SideNav.Item`
|
|
122
|
+
*/
|
|
123
|
+
itemTokens: (0, _utils.getTokensPropType)('SideNavItem')
|
|
124
|
+
};
|
|
125
|
+
var _default = exports.default = ItemsGroup;
|