@bloomreach/react-banana-ui 1.1.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +310 -0
- package/dist/bloomreach-react-banana-ui.es.js +7683 -0
- package/dist/bloomreach-react-banana-ui.es.js.map +1 -0
- package/dist/bloomreach-react-banana-ui.umd.js +52 -0
- package/dist/bloomreach-react-banana-ui.umd.js.map +1 -0
- package/dist/components/buttons/button/button.d.ts +71 -0
- package/dist/components/buttons/button/button.qa.stories.d.ts +8 -0
- package/dist/components/buttons/button/button.stories.d.ts +16 -0
- package/dist/components/buttons/button/index.d.ts +1 -0
- package/dist/components/buttons/button-group/button-group.d.ts +41 -0
- package/dist/components/buttons/button-group/button-group.stories.d.ts +9 -0
- package/dist/components/buttons/button-group/index.d.ts +2 -0
- package/dist/components/buttons/index.d.ts +4 -0
- package/dist/components/buttons/toggle-button/index.d.ts +2 -0
- package/dist/components/buttons/toggle-button/toggle-button.d.ts +75 -0
- package/dist/components/buttons/toggle-button/toggle-button.stories.d.ts +7 -0
- package/dist/components/buttons/toggle-button-group/index.d.ts +2 -0
- package/dist/components/buttons/toggle-button-group/toggle-button-group.d.ts +94 -0
- package/dist/components/buttons/toggle-button-group/toggle-button-group.stories.d.ts +8 -0
- package/dist/components/containers/dropdown/dropdown.d.ts +131 -0
- package/dist/components/containers/scroll-region/scroll-region.d.ts +106 -0
- package/dist/components/containers/scroll-view/scroll-view.d.ts +115 -0
- package/dist/components/feedback/alert/alert-title.d.ts +13 -0
- package/dist/components/feedback/alert/alert.d.ts +41 -0
- package/dist/components/feedback/alert/alert.stories.d.ts +11 -0
- package/dist/components/feedback/alert/index.d.ts +2 -0
- package/dist/components/feedback/index.d.ts +1 -0
- package/dist/components/foundations/icon/icon.d.ts +41 -0
- package/dist/components/foundations/icon/icon.qa.stories.d.ts +6 -0
- package/dist/components/foundations/icon/icon.stories.d.ts +16 -0
- package/dist/components/foundations/icon/icons/AbTestIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/AggregateIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/AnalyticsIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/AndroidIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/AnonymizeIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/AppleIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ArchiveAltIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ArchiveIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ArrowCollapseIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ArrowDownIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ArrowExpandIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ArrowKeyboardNextIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ArrowKeyboardPreviousIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ArrowKeyboardUpIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ArrowLeftIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ArrowRightIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ArrowUpIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/AxisIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/AxisLimtIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/BarChartIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/BooleanIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/BracketsCancelIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/BracketsIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/BrowserIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/BrowserPushIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CalendarAltIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CalendarIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CatalogIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ChatAddIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ChatIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ChatsIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CheckCircleIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CheckFilledIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CheckIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CheckSmallIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ChevronDownFillIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ChevronDownIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ChevronLeftFillIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ChevronLeftIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ChevronRightFillIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ChevronRightIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ChevronUpFillIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ChevronUpIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ClearFillIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ClearIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ClipboardAddIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ClockCircleIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CloneIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CloseIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CloseSmallIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CloudCheckIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CloudDownloadIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CodeIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ColorPickerAltIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ColorPickerIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ColumnsIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ConditionAltIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ConditionIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ConsoleIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ConstantAltIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ConstantIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ContextualPersonalizationIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CopyIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CopyToDashboardIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CsvIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CustomRowIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CustomerIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CustomersFilterIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/CustomersSegmentationIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/DateTimeIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/DescriptionIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/DesktopIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/DisabledIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/DivideIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/DocumentationIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/DownloadIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/DragHorizontalIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/DragVericalIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/EditIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/EducationHubIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/EllipsisVerticalIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/EllipsissHorizontalIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/EmailIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/EmojiPickerIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ErrorFillIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/EventIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/EventsSegmentationIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ExperimentIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ExposeIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ExpressionIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ExternalLinkIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/EyeCrossedIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/EyeIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/FastForwardIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/FileIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/FilterIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/FireIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/FolderEmptyIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/FolderFullIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/FormulaExpressionIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/FormulaIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/FromStartAltIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/FullscreenIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/GiftIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/GoToIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/GraphStatsIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/GridAltIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/GridIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/HelpIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/HistoryIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/HomeIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/HtmlIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ImagesIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/InfoFilledIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/InfoIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/InfoSmallIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/InternetIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/KeyIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/LayoutIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/LikeIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/LineChartIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/LinkIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ListIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/LoaderIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/LockIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/MapIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/MetricAltIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/MinusIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/MobileAppInboxIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/MobileImageMessageIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/MobilePhoneLandscapeIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/MobilePhonePortraitIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/MobilePushIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/MobileSmsIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/MobileTextMessageIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/MoveIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/NegationIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/NotificationIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/NumberIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/OfflineFillIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/OfflineIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/PaintIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ParagraphCenterAlignIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ParagraphLeftAlignIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ParagraphRightAlignIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/PercentageIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/PersAlt1Icon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/PersAlt2Icon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/PersAlt3Icon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/PersAlt4Icon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/PictureAltIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/PictureIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/PinIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/PlugPlayIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/PlusCircleFillIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/PlusCircleIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/PlusIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/PoverButtonIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/RefreshIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ReleaseNotesIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/RenameAltIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/RenameIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ReorderIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ReportIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/RetentionIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/RewertLeftIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/RewertRightIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/RibbonIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/RoadmapIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/RobotIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/RunningAggregateIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/SaveIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ScenarioIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/SearchIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/SecurityShieldIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/SendIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/SettingsAltIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/SettingsIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ShareIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ShopIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ShrinkIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/SortIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/SplitFlowIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/SqlIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/StarFillIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/StarIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/StartFillIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/StartIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/StatusDotIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/StopIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/StopwatchIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/StringComponentIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/StringIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/SuggestionIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/SurveyIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/SwapIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/TabletLangscapeIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/TabletPortraitIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/TagAltIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/TagIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/TemplateIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/TextBoldIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/TextItalicIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/TextStyleIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/TragetIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/TransferIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/TrashIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/TrendIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/UnExposeIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/UnarchiveAltIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/UndoIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/UnlinkIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/UnlockIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/UntilNowAltIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/UploadIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/UsagesIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/UsersIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/VisualIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/VoucherIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/WaitIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/WalkthroughsIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/WarningFillIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/WebhookIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/WeblayerIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/WrenchIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/index.d.ts +225 -0
- package/dist/components/foundations/icon/index.d.ts +3 -0
- package/dist/components/foundations/index.d.ts +1 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/inputs/base-field/base-field.d.ts +48 -0
- package/dist/components/inputs/base-field/generate-field-id.d.ts +4 -0
- package/dist/components/inputs/base-field/index.d.ts +2 -0
- package/dist/components/inputs/base-input/base-input.d.ts +104 -0
- package/dist/components/inputs/base-input/index.d.ts +2 -0
- package/dist/components/inputs/index.d.ts +2 -0
- package/dist/components/inputs/input-field/index.d.ts +2 -0
- package/dist/components/inputs/input-field/input-field.d.ts +119 -0
- package/dist/components/inputs/input-field/input-field.qa.stories.d.ts +13 -0
- package/dist/components/inputs/input-field/input-field.stories.d.ts +23 -0
- package/dist/components/inputs/internal.d.ts +2 -0
- package/dist/components/inputs/selection/selection.d.ts +233 -0
- package/dist/components/inputs/text-field/index.d.ts +2 -0
- package/dist/components/inputs/text-field/text-field.d.ts +138 -0
- package/dist/components/inputs/text-field/text-field.qa.stories.d.ts +14 -0
- package/dist/components/inputs/text-field/text-field.stories.d.ts +25 -0
- package/dist/components/internal.d.ts +1 -0
- package/dist/components/lists/list-view/list-view.d.ts +149 -0
- package/dist/components/loaders/loader/loader.d.ts +24 -0
- package/dist/components/navigation/index.d.ts +1 -0
- package/dist/components/navigation/pagination/index.d.ts +2 -0
- package/dist/components/navigation/pagination/pagination-config.d.ts +4 -0
- package/dist/components/navigation/pagination/pagination-context.d.ts +5 -0
- package/dist/components/navigation/pagination/pagination-items-per-page-selector.d.ts +2 -0
- package/dist/components/navigation/pagination/pagination-navigation-helpers.d.ts +11 -0
- package/dist/components/navigation/pagination/pagination-navigation-item.d.ts +6 -0
- package/dist/components/navigation/pagination/pagination-navigation.d.ts +2 -0
- package/dist/components/navigation/pagination/pagination-summary.d.ts +2 -0
- package/dist/components/navigation/pagination/pagination-types.d.ts +38 -0
- package/dist/components/navigation/pagination/pagination.d.ts +21 -0
- package/dist/components/navigation/pagination/pagination.qa.stories.d.ts +8 -0
- package/dist/components/navigation/pagination/pagination.stories.d.ts +20 -0
- package/dist/components/popovers/index.d.ts +2 -0
- package/dist/components/popovers/modal/index.d.ts +8 -0
- package/dist/components/popovers/modal/modal-body.d.ts +8 -0
- package/dist/components/popovers/modal/modal-close-button.d.ts +13 -0
- package/dist/components/popovers/modal/modal-context.d.ts +5 -0
- package/dist/components/popovers/modal/modal-footer-actions.d.ts +8 -0
- package/dist/components/popovers/modal/modal-footer.d.ts +10 -0
- package/dist/components/popovers/modal/modal-header-title.d.ts +7 -0
- package/dist/components/popovers/modal/modal-header.d.ts +9 -0
- package/dist/components/popovers/modal/modal-types.d.ts +94 -0
- package/dist/components/popovers/modal/modal.d.ts +37 -0
- package/dist/components/popovers/modal/modal.qa.stories.d.ts +10 -0
- package/dist/components/popovers/modal/modal.stories.d.ts +14 -0
- package/dist/components/popovers/tooltip/index.d.ts +2 -0
- package/dist/components/popovers/tooltip/tooltip-config.d.ts +2 -0
- package/dist/components/popovers/tooltip/tooltip.d.ts +50 -0
- package/dist/components/popovers/tooltip/tooltip.qa.stories.d.ts +8 -0
- package/dist/components/popovers/tooltip/tooltip.stories.d.ts +25 -0
- package/dist/components/types.d.ts +19 -0
- package/dist/index.d.ts +1 -0
- package/dist/style.css +1 -0
- package/dist/utils/add-font.d.ts +29 -0
- package/dist/utils/after-render.d.ts +5 -0
- package/dist/utils/async-dom-render.d.ts +6 -0
- package/dist/utils/chalk.d.ts +44 -0
- package/dist/utils/chunk.d.ts +4 -0
- package/dist/utils/classnames.d.ts +6 -0
- package/dist/utils/clone-client-rect.d.ts +26 -0
- package/dist/utils/compare-client-rect.d.ts +5 -0
- package/dist/utils/compare-sets.d.ts +5 -0
- package/dist/utils/compose-refs.d.ts +5 -0
- package/dist/utils/cookie-parser.d.ts +8 -0
- package/dist/utils/copy-text-to-clipboard.d.ts +7 -0
- package/dist/utils/debounce.d.ts +4 -0
- package/dist/utils/deep-clone.d.ts +5 -0
- package/dist/utils/deep-equal.d.ts +4 -0
- package/dist/utils/ensure-modal-root.d.ts +4 -0
- package/dist/utils/event-element-position.d.ts +4 -0
- package/dist/utils/filter-react-children.d.ts +6 -0
- package/dist/utils/find-react-children.d.ts +10 -0
- package/dist/utils/flatten-array.d.ts +5 -0
- package/dist/utils/fuzzy-groups.d.ts +51 -0
- package/dist/utils/get-decimal.d.ts +8 -0
- package/dist/utils/get-error-message.d.ts +6 -0
- package/dist/utils/get-first-with-class.d.ts +5 -0
- package/dist/utils/get-index.d.ts +5 -0
- package/dist/utils/get-selected-text.d.ts +4 -0
- package/dist/utils/get-type-name.d.ts +14 -0
- package/dist/utils/group-react-children.d.ts +8 -0
- package/dist/utils/has-child.d.ts +4 -0
- package/dist/utils/hooks/index.d.ts +1 -0
- package/dist/utils/hooks/use-hover.d.ts +10 -0
- package/dist/utils/index.d.ts +43 -0
- package/dist/utils/local-storage.d.ts +42 -0
- package/dist/utils/make-buffer.d.ts +28 -0
- package/dist/utils/map-lookup-values.d.ts +65 -0
- package/dist/utils/no-op.d.ts +4 -0
- package/dist/utils/normalize-wheel/ExecutionEnvironment.d.ts +38 -0
- package/dist/utils/normalize-wheel/UserAgent_DEPRECATED.d.ts +116 -0
- package/dist/utils/normalize-wheel/index.d.ts +2 -0
- package/dist/utils/normalize-wheel/isEventSupported.d.ts +46 -0
- package/dist/utils/normalize-wheel/normalizeWheel.d.ts +139 -0
- package/dist/utils/promise-resolver.d.ts +36 -0
- package/dist/utils/relative-client-rect.d.ts +5 -0
- package/dist/utils/rush.d.ts +4 -0
- package/dist/utils/state-controls.d.ts +28 -0
- package/dist/utils/stop-all-propagation.d.ts +8 -0
- package/dist/utils/template.d.ts +49 -0
- package/dist/utils/to-digits.d.ts +4 -0
- package/dist/utils/to-query-params.d.ts +14 -0
- package/dist/utils/types.d.ts +69 -0
- package/dist/utils/url-join.d.ts +24 -0
- package/dist/utils/wait.d.ts +1 -0
- package/dist/utils/when.d.ts +2 -0
- package/package.json +117 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode, SyntheticEvent } from 'react';
|
|
2
|
+
export interface BrButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
|
|
3
|
+
/**
|
|
4
|
+
* The content of the component.
|
|
5
|
+
*/
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Custom class name for the container of this component.
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The color of the component.
|
|
13
|
+
* @default 'default'
|
|
14
|
+
*/
|
|
15
|
+
color?: 'default' | 'alternative' | 'danger';
|
|
16
|
+
/**
|
|
17
|
+
* If `true`, the button will be disabled.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Icon displayed after the children.
|
|
23
|
+
*/
|
|
24
|
+
endIcon?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Set the original html type of button,
|
|
27
|
+
* see: [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type)
|
|
28
|
+
* @default 'button'
|
|
29
|
+
*/
|
|
30
|
+
htmlType?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
31
|
+
/**
|
|
32
|
+
* If `true`, the button will be in a loading state.
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
loading?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Text to display when the button is in a loading state.
|
|
38
|
+
*/
|
|
39
|
+
loadingText?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Callback fired when the component is clicked.
|
|
42
|
+
*/
|
|
43
|
+
onClick?: (event: SyntheticEvent<HTMLButtonElement>) => void;
|
|
44
|
+
/**
|
|
45
|
+
* Icon displayed before the children.
|
|
46
|
+
*/
|
|
47
|
+
startIcon?: ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Tooltip to display when the button is hovered or focused.
|
|
50
|
+
*/
|
|
51
|
+
tooltip?: ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* The button type.
|
|
54
|
+
* @default 'secondary'
|
|
55
|
+
*/
|
|
56
|
+
type?: 'primary' | 'secondary' | 'tertiary';
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The button allow users to take actions, and make choices, with a single tap.
|
|
60
|
+
*
|
|
61
|
+
* ## Usage
|
|
62
|
+
* ```jsx
|
|
63
|
+
* import { BrButton } from '@bloomreach/react-banana-ui';
|
|
64
|
+
*
|
|
65
|
+
* export default function MyComponent() {
|
|
66
|
+
* return <BrButton onClick={() => console.log('click')}>Button</BrButton>;
|
|
67
|
+
* }
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
declare const BrButton: import("react").ForwardRefExoticComponent<BrButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
71
|
+
export default BrButton;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { type Story } from './button.stories';
|
|
3
|
+
declare const meta: Meta;
|
|
4
|
+
export default meta;
|
|
5
|
+
export declare const Basic: Story;
|
|
6
|
+
export declare const Loading: Story;
|
|
7
|
+
export declare const Icons: Story;
|
|
8
|
+
export declare const WithTooltip: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { BrButton } from '..';
|
|
3
|
+
declare const meta: Meta<typeof BrButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
export type Story = StoryObj<typeof BrButton>;
|
|
6
|
+
export declare const Wrapper: ({ children }: {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
export declare const Basic: Story;
|
|
10
|
+
export declare const Disabled: Story;
|
|
11
|
+
export declare const Loading: Story;
|
|
12
|
+
export declare const IconStart: Story;
|
|
13
|
+
export declare const IconBoth: Story;
|
|
14
|
+
export declare const IconEnd: Story;
|
|
15
|
+
export declare const WithTooltip: Story;
|
|
16
|
+
export declare const NativeButton: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BrButton } from './button';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { BrButtonProps } from '../button/button';
|
|
3
|
+
export interface BrButtonGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
4
|
+
/**
|
|
5
|
+
* The content of the component.
|
|
6
|
+
*/
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Custom class name for the container of this component.
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* If `true`, the group and all children will be disabled.
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The button type.
|
|
19
|
+
* @default 'secondary'
|
|
20
|
+
*/
|
|
21
|
+
type?: BrButtonProps['type'];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The button group component can be used to group related buttons.
|
|
25
|
+
*
|
|
26
|
+
* ## Usage
|
|
27
|
+
* ```jsx
|
|
28
|
+
* import { BrButton, BrButtonGroup } from '@bloomreach/react-banana-ui';
|
|
29
|
+
*
|
|
30
|
+
* function MyButtonGroup() {
|
|
31
|
+
* return (
|
|
32
|
+
* <BrButtonGroup>
|
|
33
|
+
* <BrButton>One</BrButton>
|
|
34
|
+
* <BrButton>Two</BrButton>
|
|
35
|
+
* </BrButtonGroup>
|
|
36
|
+
* );
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
declare const BrButtonGroup: import("react").ForwardRefExoticComponent<BrButtonGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
41
|
+
export default BrButtonGroup;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { BrButtonGroup } from '..';
|
|
3
|
+
declare const meta: Meta<typeof BrButtonGroup>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof BrButtonGroup>;
|
|
6
|
+
export declare const Basic: Story;
|
|
7
|
+
export declare const Icons: Story;
|
|
8
|
+
export declare const OneDisabledButton: Story;
|
|
9
|
+
export declare const OneButton: Story;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ReactElement, ForwardedRef, ReactNode, SyntheticEvent } from 'react';
|
|
2
|
+
import { BrButtonProps } from '../button/button';
|
|
3
|
+
export interface BrToggleButtonProps<T extends string | number = string> extends Omit<BrButtonProps, 'onClick'> {
|
|
4
|
+
/**
|
|
5
|
+
* The content of the component.
|
|
6
|
+
*/
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Custom class name for the container of this component.
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* If `true`, the button will be disabled.
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Callback fired when the button is clicked.
|
|
19
|
+
*/
|
|
20
|
+
onClick?: (event: SyntheticEvent<HTMLButtonElement>, value: T) => void;
|
|
21
|
+
/**
|
|
22
|
+
* If `true`, the button will be selected.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
selected?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The value to associate with the button when selected in a toggle button group.
|
|
28
|
+
*/
|
|
29
|
+
value: T;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The current component is used as an argument for the `forwardRef` function to forward ref.
|
|
33
|
+
* However, to keep the generic interface of the `BrToggleButton` component we have to cast type
|
|
34
|
+
* after wrapping this component with the `forwardRef` function.
|
|
35
|
+
*/
|
|
36
|
+
declare function BrToggleButtonInner<T extends string | number = string>(props: BrToggleButtonProps<T>, forwardedRef: ForwardedRef<HTMLButtonElement>): ReactElement;
|
|
37
|
+
/**
|
|
38
|
+
* The `BrToggleButton` component can be used to group related options.
|
|
39
|
+
*
|
|
40
|
+
* ## Usage
|
|
41
|
+
*
|
|
42
|
+
* ### Basic
|
|
43
|
+
* ```tsx
|
|
44
|
+
* import { BrToggleButton, BrToggleButtonGroup } from '@bloomreach/react-banana-ui`;
|
|
45
|
+
*
|
|
46
|
+
* export default BasicToggleGroup() {
|
|
47
|
+
* const [value, setValue] = useState('mobile');
|
|
48
|
+
*
|
|
49
|
+
* return (
|
|
50
|
+
* <BrToggleButtonGroup
|
|
51
|
+
* value={value}
|
|
52
|
+
* onChange={(event, value) => { setValue(value); }}
|
|
53
|
+
* >
|
|
54
|
+
* <BrToggleButton value="web">Web</BrToggleButton>
|
|
55
|
+
* <BrToggleButton value="mobile">Mobile</BrToggleButton>
|
|
56
|
+
* <BrToggleButton value="desktop">Desktop</BrToggleButton>
|
|
57
|
+
* </BrToggleButtonGroup>
|
|
58
|
+
* );
|
|
59
|
+
* };
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* ### Defined value type
|
|
63
|
+
* The `BrToggleButton` is generic component and determinate value type
|
|
64
|
+
* based on `value` or it might be explicitly defined like
|
|
65
|
+
*
|
|
66
|
+
* ```tsx
|
|
67
|
+
* type MyValue = 'one' | 'two' | 'three';
|
|
68
|
+
* <BrToggleButton<MyValue> value="two">...</BrToggleButton>
|
|
69
|
+
* ```
|
|
70
|
+
* by default `value` has a `string` type.
|
|
71
|
+
*/
|
|
72
|
+
declare const _default: <T extends string | number = string>(props: BrToggleButtonProps<T> & {
|
|
73
|
+
ref?: ForwardedRef<HTMLButtonElement> | undefined;
|
|
74
|
+
}) => ReturnType<typeof BrToggleButtonInner>;
|
|
75
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { BrToggleButton } from '..';
|
|
3
|
+
declare const meta: Meta<typeof BrToggleButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story<T extends string | number = string> = StoryObj<typeof BrToggleButton<T>>;
|
|
6
|
+
export declare const Basic: Story;
|
|
7
|
+
export declare const Selectable: Story<number>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { ForwardedRef, ReactElement, SyntheticEvent } from 'react';
|
|
2
|
+
import { type BrButtonGroupProps } from '../button-group/button-group';
|
|
3
|
+
interface BrToggleButtonGroupBaseProps extends Omit<BrButtonGroupProps, 'onChange'> {
|
|
4
|
+
/**
|
|
5
|
+
* If `true`, allow multiple items to be selected (checkbox behavior).
|
|
6
|
+
*/
|
|
7
|
+
multiple?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface BrToggleButtonGroupSingleProps<T extends string | number = string> extends BrToggleButtonGroupBaseProps {
|
|
10
|
+
multiple?: false;
|
|
11
|
+
/**
|
|
12
|
+
* Callback fired when the component is clicked. Value is a single value of the toggle button.
|
|
13
|
+
* If no value is selected the value is a `null`.
|
|
14
|
+
*/
|
|
15
|
+
onChange?: (event: SyntheticEvent<HTMLButtonElement>, value: T) => void;
|
|
16
|
+
/**
|
|
17
|
+
* The currently selected value within the group is an array of selected values.
|
|
18
|
+
* The value must have reference equality with the option in order to be selected.
|
|
19
|
+
*/
|
|
20
|
+
value?: T;
|
|
21
|
+
}
|
|
22
|
+
export interface BrToggleButtonGroupMultipleProps<T extends string | number = string> extends BrToggleButtonGroupBaseProps {
|
|
23
|
+
multiple: true;
|
|
24
|
+
/**
|
|
25
|
+
* Callback fired when the component is clicked. Value is an array of selected values.
|
|
26
|
+
* If no value is selected the value is an empty array.
|
|
27
|
+
*/
|
|
28
|
+
onChange?: (event: SyntheticEvent<HTMLButtonElement>, value: T[]) => void;
|
|
29
|
+
/**
|
|
30
|
+
* The currently selected an array of values.
|
|
31
|
+
* The value must have reference equality with the option in order to be selected.
|
|
32
|
+
*/
|
|
33
|
+
value?: T[];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The current component is used as an argument for the `forwardRef` function to forward ref.
|
|
37
|
+
* However, to keep the generic interface of the `BrToggleButtonGroup` component we have to cast type
|
|
38
|
+
* after wrapping this component with the `forwardRef` function.
|
|
39
|
+
*/
|
|
40
|
+
declare function BrToggleButtonGroupInner<T extends string | number = string>(props: BrToggleButtonGroupSingleProps<T>, forwardedRef: ForwardedRef<HTMLDivElement>): ReactElement;
|
|
41
|
+
declare function BrToggleButtonGroupInner<T extends string | number = string>(props: BrToggleButtonGroupMultipleProps<T>, forwardedRef: ForwardedRef<HTMLDivElement>): ReactElement;
|
|
42
|
+
/**
|
|
43
|
+
* The `BrToggleButtonGroup` controls the selected state of its child buttons when given its own `value` prop.
|
|
44
|
+
* To emphasize groups of related toggle buttons, a group should share a common container.
|
|
45
|
+
*
|
|
46
|
+
* ## Usage
|
|
47
|
+
*
|
|
48
|
+
* ### Basic
|
|
49
|
+
* ```tsx
|
|
50
|
+
* import { BrToggleButton, BrToggleButtonGroup } from '@bloomreach/react-banana-ui`;
|
|
51
|
+
*
|
|
52
|
+
* export default BasicToggleGroup() {
|
|
53
|
+
* const [value, setValue] = useState('mobile');
|
|
54
|
+
*
|
|
55
|
+
* return (
|
|
56
|
+
* <BrToggleButtonGroup
|
|
57
|
+
* value={value}
|
|
58
|
+
* onChange={(event, value) => { setValue(value); }}
|
|
59
|
+
* >
|
|
60
|
+
* <BrToggleButton value="web">Web</BrToggleButton>
|
|
61
|
+
* <BrToggleButton value="mobile">Mobile</BrToggleButton>
|
|
62
|
+
* <BrToggleButton value="desktop">Desktop</BrToggleButton>
|
|
63
|
+
* </BrToggleButtonGroup>
|
|
64
|
+
* );
|
|
65
|
+
* };
|
|
66
|
+
* ```
|
|
67
|
+
* The toggle group might be used as a radio button when selecting one option deselects any other
|
|
68
|
+
* it is the default behavior also as multiple selections by passing the `multiple` prop
|
|
69
|
+
* it allows to have multiple options selected.
|
|
70
|
+
*
|
|
71
|
+
* The toggle button group `value` is the currently selected value within the group or
|
|
72
|
+
* an array of selected values when `multiple` is `true`.
|
|
73
|
+
* The value must have reference equality with the option in order to be selected.
|
|
74
|
+
*
|
|
75
|
+
* The `onChange` callback is fired on the value change and has a different signature for the `value` argument.
|
|
76
|
+
* When `multiple` is `true` this is an array of selected values; when `false` is a single value.
|
|
77
|
+
* If no value is selected and `multiple` is `true` the value is an empty array.
|
|
78
|
+
* In case when `multiple` is `false` then `onChange` the callback doesn't fire
|
|
79
|
+
* if the user clicks on the already selected value.
|
|
80
|
+
*
|
|
81
|
+
* The `BrToggleButtonGroup` is generic component and determinate value type
|
|
82
|
+
* based on `value` or it might be explicitly defined like
|
|
83
|
+
*
|
|
84
|
+
* ### Defined value type
|
|
85
|
+
* ```tsx
|
|
86
|
+
* type MyValue = 'one' | 'two' | 'three';
|
|
87
|
+
* <BrToggleButtonGroup<MyValue>>...</BrToggleButtonGroup>
|
|
88
|
+
* ```
|
|
89
|
+
* by default `value` has a `string` type and `string[]` for `multiple` mode.
|
|
90
|
+
*/
|
|
91
|
+
declare const _default: <T extends string | number = string>(props: BrToggleButtonGroupSingleProps<T> | (BrToggleButtonGroupMultipleProps<T> & {
|
|
92
|
+
ref?: ForwardedRef<HTMLDivElement> | undefined;
|
|
93
|
+
})) => ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
94
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { BrToggleButtonGroup, BrToggleButtonGroupMultipleProps, BrToggleButtonGroupSingleProps } from '..';
|
|
3
|
+
declare const meta: Meta<typeof BrToggleButtonGroup>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<BrToggleButtonGroupSingleProps>;
|
|
6
|
+
export declare const Basic: Story;
|
|
7
|
+
export declare const Multiple: StoryObj<BrToggleButtonGroupMultipleProps<number>>;
|
|
8
|
+
export declare const IndividuallyToggleButtonStates: Story;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DOMRectBounds } from '../../../utils';
|
|
3
|
+
export interface IDropdown {
|
|
4
|
+
/** Allows children */
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* When this is provided, it will open the menu relative to these provided
|
|
8
|
+
* bounds
|
|
9
|
+
*/
|
|
10
|
+
bounds?: DOMRectBounds | null;
|
|
11
|
+
/** Provides a custom class name to the container of this component. */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Props to apply directly to the container div of this component */
|
|
14
|
+
containerProps?: React.HTMLProps<HTMLDivElement>;
|
|
15
|
+
/**
|
|
16
|
+
* If there is already a modal root in the document, you can specify one here.
|
|
17
|
+
* Otherwise, one will automatically be made
|
|
18
|
+
*/
|
|
19
|
+
customModalRoot?: HTMLElement;
|
|
20
|
+
/**
|
|
21
|
+
* Provide a custom modal root by ID instead of element so this component will
|
|
22
|
+
* ensure the modal itself
|
|
23
|
+
*/
|
|
24
|
+
customModalRootId?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Will inline the contents of this dropdown if there are no bounds provided
|
|
27
|
+
*/
|
|
28
|
+
showWithNoBounds?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* This makes the dropdown region cover the reference bounds IFF the dropdown
|
|
31
|
+
* can fit dropping down
|
|
32
|
+
*/
|
|
33
|
+
coverBounds?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* When set, this renders this dropdown inline in the DOM where it is
|
|
36
|
+
* rendered. This lets you render the dropdown in a "relative" context easily.
|
|
37
|
+
*/
|
|
38
|
+
inline?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* This is the suggested height of the region. This may not always be the true
|
|
41
|
+
* height as this region positions itself as good as possible relative to the
|
|
42
|
+
* reference bounds.
|
|
43
|
+
*
|
|
44
|
+
* If this is omitted, the height of the region is allowed to flex, but may
|
|
45
|
+
* cause a slight flicker while the region gets computed.
|
|
46
|
+
*/
|
|
47
|
+
height?: number;
|
|
48
|
+
/**
|
|
49
|
+
* When provided this sets a manual width for the menu instead of utilizing
|
|
50
|
+
* the reference bound;
|
|
51
|
+
*/
|
|
52
|
+
width?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Does not let the modal's width exceed this amount.
|
|
55
|
+
*/
|
|
56
|
+
maxWidth?: number;
|
|
57
|
+
/**
|
|
58
|
+
* If this is set, this will prioritize positioning itself above the bounds
|
|
59
|
+
* instead of below the bounds.
|
|
60
|
+
*/
|
|
61
|
+
dropUp?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* If this is set, this will prioritize positioning itself left of the bounds
|
|
64
|
+
* instead of below the bounds.
|
|
65
|
+
*/
|
|
66
|
+
dropLeft?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* If this is set, this will prioritize positioning itself right of the bounds
|
|
69
|
+
* instead of below the bounds.
|
|
70
|
+
*/
|
|
71
|
+
dropRight?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* If this is set, this will prioritize positioning itself center of the bounds
|
|
74
|
+
* instead of below the bounds. Mainly used to center the tooltip component.
|
|
75
|
+
*/
|
|
76
|
+
dropCenter?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* If this is set, this will perform a middling procedure to attempt to align
|
|
79
|
+
* the middle of the dropdown to its reference. This is specifically NOT
|
|
80
|
+
* called "centering" because it "can" be used to center the dropdown if the
|
|
81
|
+
* reference space is sufficiently small, but otherwise will NOT actually
|
|
82
|
+
* center the dropdown.
|
|
83
|
+
*/
|
|
84
|
+
shiftToMiddle?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Populates a ref object that points to this object
|
|
87
|
+
*/
|
|
88
|
+
ref?: React.RefObject<Dropdown>;
|
|
89
|
+
/**
|
|
90
|
+
* This is a very advanced usage of the dropdown to help resolve overlapping
|
|
91
|
+
* drop down dismissals. When this is set, the dropdown will test to see if
|
|
92
|
+
* the event happened on the container instead of the modal root. This helps
|
|
93
|
+
* resolve nuances when dropdowns share the same modal root.
|
|
94
|
+
*/
|
|
95
|
+
dismissTestOnContainer?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Event fires when there is a typical user interaction that suggests this
|
|
98
|
+
* dropdown should be dismissed, such as clicking outside of these dropdowns
|
|
99
|
+
* rendered region.
|
|
100
|
+
*/
|
|
101
|
+
onClose?(e: MouseEvent): void;
|
|
102
|
+
}
|
|
103
|
+
interface IState {
|
|
104
|
+
dropdownWidth?: number;
|
|
105
|
+
dropdownHeight?: number;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* @internal This component exist to keep Pagination component works as before.
|
|
109
|
+
* @deprecated Replace this component as new aligned with design will be added.
|
|
110
|
+
* Less opinionated dropdown region that offers a region to render within but
|
|
111
|
+
* does not have contents of its own.
|
|
112
|
+
*/
|
|
113
|
+
export declare class Dropdown extends React.Component<IDropdown> {
|
|
114
|
+
container: React.RefObject<HTMLDivElement>;
|
|
115
|
+
state: IState;
|
|
116
|
+
componentDidMount(): void;
|
|
117
|
+
componentDidUpdate(): void;
|
|
118
|
+
componentWillUnmount(): void;
|
|
119
|
+
get isOpen(): boolean;
|
|
120
|
+
private get modalId();
|
|
121
|
+
private get topQueuedItem();
|
|
122
|
+
private get isTopQueuedId();
|
|
123
|
+
private get isTopQueued();
|
|
124
|
+
private get isQueued();
|
|
125
|
+
addQueueId: () => void;
|
|
126
|
+
removeQueueId: () => void;
|
|
127
|
+
private handleDocumentDown;
|
|
128
|
+
renderContent(style?: React.CSSProperties): JSX.Element;
|
|
129
|
+
render(): JSX.Element | null;
|
|
130
|
+
}
|
|
131
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DOMRectBounds, INestedChildren } from '../../../utils';
|
|
3
|
+
export declare const ScrollRegionMode: {
|
|
4
|
+
readonly LIGHT: "ScrollRegion--light";
|
|
5
|
+
readonly DARK: "ScrollRegion--dark";
|
|
6
|
+
};
|
|
7
|
+
export type ScrollRegionModeType = (typeof ScrollRegionMode)[keyof typeof ScrollRegionMode];
|
|
8
|
+
export interface IScrollRegion extends INestedChildren<React.ReactNode> {
|
|
9
|
+
/** When set, the scroll will have some inertia for touch controls */
|
|
10
|
+
allowTouchInertia?: boolean;
|
|
11
|
+
/** Provides a custom class name to the container of this component */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Applies a custom class to the content portion of the scroll region */
|
|
14
|
+
contentClassName?: string;
|
|
15
|
+
/** Rendering mode of this scrollRegion */
|
|
16
|
+
mode?: ScrollRegionModeType;
|
|
17
|
+
/** Props to apply directly to the container div of this component */
|
|
18
|
+
containerProps?: React.HTMLProps<HTMLDivElement>;
|
|
19
|
+
/** Props to apply directly to the scrollRegion content panel container */
|
|
20
|
+
contentProps?: React.HTMLProps<HTMLDivElement>;
|
|
21
|
+
/**
|
|
22
|
+
* When true, scroll events will stop being absorbed by this scroll region when
|
|
23
|
+
* the user tries to scroll beyond the max bounds of the scroll region.
|
|
24
|
+
*/
|
|
25
|
+
allowScrollFlowThrough?: boolean;
|
|
26
|
+
/** This forces a maximum amount of scroll room */
|
|
27
|
+
scrollHeight?: number;
|
|
28
|
+
/** Sets this scroll region to the given scroll location */
|
|
29
|
+
scrollToOnce?: [number, number];
|
|
30
|
+
/**
|
|
31
|
+
* Sets how quick the scrollTopOnce settles to the new position. Set to 1 to
|
|
32
|
+
* be essentially instant.
|
|
33
|
+
*/
|
|
34
|
+
autoScrollDuration?: number;
|
|
35
|
+
/**
|
|
36
|
+
* When set to true, this will always show the scroll bar as visible as long
|
|
37
|
+
* as the space can be scrolled. If the space is not scrollable, the scroll
|
|
38
|
+
* bar will be hidden.
|
|
39
|
+
*/
|
|
40
|
+
alwaysShowScroll?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Disables using the wheel to scroll this view.
|
|
43
|
+
*/
|
|
44
|
+
preventWheel?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* When this view changes the scroll top or left value it provides it in this
|
|
47
|
+
* callback
|
|
48
|
+
*
|
|
49
|
+
* isAutomated is true when the system is scrolling the view and not the user.
|
|
50
|
+
*/
|
|
51
|
+
onScroll?(scroll: [number, number], scrollMax: [number, number], viewBounds: DOMRectBounds, contentBounds: DOMRectBounds, isAutomated?: boolean): void;
|
|
52
|
+
}
|
|
53
|
+
interface IState {
|
|
54
|
+
isOpen: boolean;
|
|
55
|
+
isDragging: boolean;
|
|
56
|
+
top: [number, number];
|
|
57
|
+
bounds?: DOMRectBounds;
|
|
58
|
+
contentBounds?: DOMRectBounds;
|
|
59
|
+
/**
|
|
60
|
+
* This is the computed region width by examining all immediate children of
|
|
61
|
+
* the content wrapper.
|
|
62
|
+
*/
|
|
63
|
+
regionWidth?: number;
|
|
64
|
+
/**
|
|
65
|
+
* This is set to true when the scroll is supposed to self animate. This will
|
|
66
|
+
* only happen temporarily for automation and can not remain active while the
|
|
67
|
+
* user interacts with the scrolling manually.
|
|
68
|
+
*/
|
|
69
|
+
animating?: boolean;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @internal This component exist to keep Pagination component works as before.
|
|
73
|
+
* @deprecated Replace this component as new aligned with design will be added.
|
|
74
|
+
* This is a custom scroller for rendering a custom scrollbar for an X and Y
|
|
75
|
+
* axis scrolling.
|
|
76
|
+
*/
|
|
77
|
+
export declare class ScrollRegion extends React.Component<IScrollRegion, IState> {
|
|
78
|
+
state: IState;
|
|
79
|
+
container: React.RefObject<HTMLDivElement>;
|
|
80
|
+
private wrapper;
|
|
81
|
+
private content;
|
|
82
|
+
private scrolledToOnce?;
|
|
83
|
+
private currentScrollHeight?;
|
|
84
|
+
private initialized;
|
|
85
|
+
private childrenChanged;
|
|
86
|
+
private isUpdatingChildren;
|
|
87
|
+
private animateScrollId;
|
|
88
|
+
private touch;
|
|
89
|
+
getSnapshotBeforeUpdate(prevProps: Readonly<IScrollRegion>): null;
|
|
90
|
+
init: () => void;
|
|
91
|
+
componentDidMount(): void;
|
|
92
|
+
componentDidUpdate(): void;
|
|
93
|
+
componentWillUnmount(): void;
|
|
94
|
+
private updateRegionWidth;
|
|
95
|
+
private animateScrollOnce;
|
|
96
|
+
private getScrollMetrics;
|
|
97
|
+
handleResize: () => void;
|
|
98
|
+
handleTouchStart: (e: TouchEvent) => void;
|
|
99
|
+
handleTouchEnd: (e: TouchEvent) => void;
|
|
100
|
+
handleTouchMove: (e: TouchEvent) => void;
|
|
101
|
+
handleWheel: (e: WheelEvent) => boolean;
|
|
102
|
+
handleHorizontalBarDown: (e: React.PointerEvent<HTMLDivElement>) => void;
|
|
103
|
+
handleVerticalBarDown: (e: React.PointerEvent<HTMLDivElement>) => void;
|
|
104
|
+
render(): JSX.Element;
|
|
105
|
+
}
|
|
106
|
+
export {};
|