@bloomreach/react-banana-ui 1.4.0 → 1.6.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/dist/bloomreach-react-banana-ui.es.js +5816 -4493
- package/dist/bloomreach-react-banana-ui.es.js.map +1 -1
- package/dist/bloomreach-react-banana-ui.umd.js +17 -16
- package/dist/bloomreach-react-banana-ui.umd.js.map +1 -1
- package/dist/components/buttons/button/button.d.ts +3 -2
- package/dist/components/buttons/button/button.stories.d.ts +1 -0
- package/dist/components/buttons/button-group/button-group.d.ts +1 -0
- package/dist/components/buttons/toggle-button/toggle-button.d.ts +1 -0
- package/dist/components/containers/dropdown/dropdown.d.ts +1 -0
- package/dist/components/containers/scroll-region/scroll-region.d.ts +1 -0
- package/dist/components/containers/scroll-view/scroll-view.d.ts +1 -0
- package/dist/components/dropdowns/index.d.ts +1 -0
- package/dist/components/dropdowns/menu/index.d.ts +13 -0
- package/dist/components/dropdowns/menu/menu/index.d.ts +2 -0
- package/dist/components/dropdowns/menu/menu/menu.d.ts +7 -0
- package/dist/components/dropdowns/menu/menu/menu.stories.d.ts +6 -0
- package/dist/components/dropdowns/menu/menu/menu.types.d.ts +11 -0
- package/dist/components/dropdowns/menu/menu-button/index.d.ts +2 -0
- package/dist/components/dropdowns/menu/menu-button/menu-button.d.ts +4 -0
- package/dist/components/dropdowns/menu/menu-button/menu-button.stories.d.ts +6 -0
- package/dist/components/dropdowns/menu/menu-button/menu-button.types.d.ts +3 -0
- package/dist/components/dropdowns/menu/menu-content/index.d.ts +2 -0
- package/dist/components/dropdowns/menu/menu-content/menu-content.d.ts +7 -0
- package/dist/components/dropdowns/menu/menu-content/menu-content.stories.d.ts +10 -0
- package/dist/components/dropdowns/menu/menu-content/menu-content.types.d.ts +12 -0
- package/dist/components/dropdowns/menu/menu-group/index.d.ts +2 -0
- package/dist/components/dropdowns/menu/menu-group/menu-group.d.ts +8 -0
- package/dist/components/dropdowns/menu/menu-group/menu-group.stories.d.ts +6 -0
- package/dist/components/dropdowns/menu/menu-group/menu-group.types.d.ts +6 -0
- package/dist/components/dropdowns/menu/menu-group-label/index.d.ts +2 -0
- package/dist/components/dropdowns/menu/menu-group-label/menu-group-label.d.ts +8 -0
- package/dist/components/dropdowns/menu/menu-group-label/menu-group-label.stories.d.ts +6 -0
- package/dist/components/dropdowns/menu/menu-group-label/menu-group-label.types.d.ts +6 -0
- package/dist/components/dropdowns/menu/menu-item/index.d.ts +2 -0
- package/dist/components/dropdowns/menu/menu-item/menu-item.d.ts +7 -0
- package/dist/components/dropdowns/menu/menu-item/menu-item.stories.d.ts +6 -0
- package/dist/components/dropdowns/menu/menu-item/menu-item.types.d.ts +20 -0
- package/dist/components/dropdowns/menu/menu-separator/index.d.ts +1 -0
- package/dist/components/dropdowns/menu/menu-separator/menu-separator.d.ts +7 -0
- package/dist/components/dropdowns/menu/menu-separator/menu-separator.stories.d.ts +6 -0
- package/dist/components/dropdowns/menu/menu.stories.d.ts +6 -0
- package/dist/components/feedback/alert/alert-title.d.ts +1 -0
- package/dist/components/feedback/alert/alert.d.ts +1 -0
- package/dist/components/foundations/icon/{icons → deprecated}/NextStepIcon.d.ts +4 -0
- package/dist/components/foundations/icon/{icons → deprecated}/SortAscIcon.d.ts +4 -0
- package/dist/components/foundations/icon/{icons → deprecated}/SortDescIcon.d.ts +4 -0
- package/dist/components/foundations/icon/{icons → deprecated}/SortInactiveIcon.d.ts +4 -0
- package/dist/components/foundations/icon/deprecated/index.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ForceAddToRecallIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ForceAddToRecallUndoIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/ImpactDownIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/RuleLabelIcon.d.ts +4 -0
- package/dist/components/foundations/icon/icons/index.d.ts +4 -4
- package/dist/components/foundations/icon/index.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/inputs/base-field/base-field.d.ts +1 -0
- package/dist/components/inputs/base-input/base-input.d.ts +1 -0
- package/dist/components/inputs/field-label/field-label.d.ts +1 -0
- package/dist/components/inputs/selection/selection.d.ts +1 -0
- package/dist/components/inputs/text-field/text-field.d.ts +1 -0
- package/dist/components/inputs/toggle/toggle.d.ts +1 -0
- package/dist/components/inputs/toggle-field/toggle-field.d.ts +1 -0
- package/dist/components/lists/list-view/list-view.d.ts +1 -0
- package/dist/components/loaders/loader/loader.d.ts +1 -0
- package/dist/components/navigation/pagination/pagination.d.ts +1 -0
- package/dist/components/popovers/modal/modal-body.d.ts +1 -0
- package/dist/components/popovers/modal/modal.d.ts +1 -0
- package/dist/components/popovers/tooltip/tooltip.d.ts +1 -0
- package/dist/setupTests.d.ts +0 -0
- package/dist/style.css +1 -1
- package/package.json +38 -37
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes,
|
|
1
|
+
import { ButtonHTMLAttributes, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
import './button.scss';
|
|
2
3
|
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
|
|
3
4
|
/**
|
|
4
5
|
* The content of the component.
|
|
@@ -40,7 +41,7 @@ export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement
|
|
|
40
41
|
/**
|
|
41
42
|
* Callback fired when the component is clicked.
|
|
42
43
|
*/
|
|
43
|
-
onClick?:
|
|
44
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
44
45
|
/**
|
|
45
46
|
* Icon displayed before the children.
|
|
46
47
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactElement, ForwardedRef, ReactNode, SyntheticEvent } from 'react';
|
|
2
2
|
import { ButtonProps } from '../button/button';
|
|
3
|
+
import './toggle-button.scss';
|
|
3
4
|
export interface ToggleButtonProps<T extends string | number = string> extends Omit<ButtonProps, 'onClick'> {
|
|
4
5
|
/**
|
|
5
6
|
* The content of the component.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './menu';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { Menu } from './menu';
|
|
2
|
+
export { MenuButton } from './menu-button';
|
|
3
|
+
export { MenuContent } from './menu-content';
|
|
4
|
+
export { MenuGroup } from './menu-group';
|
|
5
|
+
export { MenuGroupLabel } from './menu-group-label';
|
|
6
|
+
export { MenuItem } from './menu-item';
|
|
7
|
+
export { MenuSeparator } from './menu-separator';
|
|
8
|
+
export type { MenuProps } from './menu';
|
|
9
|
+
export type { MenuButtonProps } from './menu-button';
|
|
10
|
+
export type { MenuContentProps } from './menu-content';
|
|
11
|
+
export type { MenuGroupProps } from './menu-group';
|
|
12
|
+
export type { MenuGroupLabelProps } from './menu-group-label';
|
|
13
|
+
export type { MenuItemProps } from './menu-item';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SyntheticEvent } from 'react';
|
|
2
|
+
export interface MenuProps {
|
|
3
|
+
/**
|
|
4
|
+
* Allows to control whether the dropdown is open.
|
|
5
|
+
*/
|
|
6
|
+
open?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Callback fired when the component requests to be opened or closed.
|
|
9
|
+
*/
|
|
10
|
+
onOpenChange?: (event: SyntheticEvent | null, open: boolean) => void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { MenuContentProps } from './menu-content.types';
|
|
3
|
+
import './menu-content.scss';
|
|
4
|
+
declare const MenuContent: import("react").ForwardRefExoticComponent<MenuContentProps & {
|
|
5
|
+
children?: import("react").ReactNode;
|
|
6
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export default MenuContent;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import MenuContent from './menu-content';
|
|
3
|
+
declare const meta: Meta;
|
|
4
|
+
export default meta;
|
|
5
|
+
export type Story = StoryObj<typeof MenuContent>;
|
|
6
|
+
export declare const MenuContentStory: Story;
|
|
7
|
+
export declare const MenuContentTopPlacement: Story;
|
|
8
|
+
export declare const MenuContentRightPlacement: Story;
|
|
9
|
+
export declare const MenuContentBottomPlacement: Story;
|
|
10
|
+
export declare const MenuContentLeftPlacement: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Placement } from '@floating-ui/react';
|
|
2
|
+
export interface MenuContentProps {
|
|
3
|
+
/**
|
|
4
|
+
* Custom class for the component
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Placement position of the menu dropdownn wrt to trigger.
|
|
9
|
+
* @default 'bottom-end'
|
|
10
|
+
*/
|
|
11
|
+
placement?: Placement;
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import type { MenuGroupProps } from './menu-group.types';
|
|
3
|
+
import './menu-group.scss';
|
|
4
|
+
declare function MenuGroup(props: PropsWithChildren<MenuGroupProps>): JSX.Element;
|
|
5
|
+
declare namespace MenuGroup {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
export default MenuGroup;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import type { MenuGroupLabelProps } from './menu-group-label.types';
|
|
3
|
+
import './menu-group-label.scss';
|
|
4
|
+
declare function MenuGroupLabel(props: PropsWithChildren<MenuGroupLabelProps>): JSX.Element;
|
|
5
|
+
declare namespace MenuGroupLabel {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
export default MenuGroupLabel;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { MenuItemProps } from './menu-item.types';
|
|
3
|
+
import './menu-item.scss';
|
|
4
|
+
declare const MenuItem: import("react").ForwardRefExoticComponent<MenuItemProps & {
|
|
5
|
+
children?: import("react").ReactNode;
|
|
6
|
+
} & import("react").RefAttributes<HTMLUListElement>>;
|
|
7
|
+
export default MenuItem;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
export interface MenuItemProps {
|
|
3
|
+
/**
|
|
4
|
+
* Custom class for the component
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Event fired on click or selection of an item
|
|
9
|
+
*/
|
|
10
|
+
onClick?: MouseEventHandler<HTMLElement>;
|
|
11
|
+
/**
|
|
12
|
+
* If `true`, the menu item will be disabled.
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Icon displayed before the content
|
|
18
|
+
*/
|
|
19
|
+
startIcon?: ReactNode;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as MenuSeparator } from './menu-separator';
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IconInstanceProps } from '../icon';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated This icon has been removed from the @bloomreach/banana-theme package.
|
|
5
|
+
* Please don't use it anymore. It will be removed in the next major version.
|
|
6
|
+
*/
|
|
3
7
|
declare const NextStepIcon: import("react").ForwardRefExoticComponent<IconInstanceProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
4
8
|
export default NextStepIcon;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IconInstanceProps } from '../icon';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated This icon has been removed from the @bloomreach/banana-theme package.
|
|
5
|
+
* Please don't use it anymore. It will be removed in the next major version.
|
|
6
|
+
*/
|
|
3
7
|
declare const SortAscIcon: import("react").ForwardRefExoticComponent<IconInstanceProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
4
8
|
export default SortAscIcon;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IconInstanceProps } from '../icon';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated This icon has been removed from the @bloomreach/banana-theme package.
|
|
5
|
+
* Please don't use it anymore. It will be removed in the next major version.
|
|
6
|
+
*/
|
|
3
7
|
declare const SortDescIcon: import("react").ForwardRefExoticComponent<IconInstanceProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
4
8
|
export default SortDescIcon;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IconInstanceProps } from '../icon';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated This icon has been removed from the @bloomreach/banana-theme package.
|
|
5
|
+
* Please don't use it anymore. It will be removed in the next major version.
|
|
6
|
+
*/
|
|
3
7
|
declare const SortInactiveIcon: import("react").ForwardRefExoticComponent<IconInstanceProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
4
8
|
export default SortInactiveIcon;
|
|
@@ -102,6 +102,8 @@ export { default as FilterIcon } from './FilterIcon';
|
|
|
102
102
|
export { default as FireIcon } from './FireIcon';
|
|
103
103
|
export { default as FolderEmptyIcon } from './FolderEmptyIcon';
|
|
104
104
|
export { default as FolderFullIcon } from './FolderFullIcon';
|
|
105
|
+
export { default as ForceAddToRecallIcon } from './ForceAddToRecallIcon';
|
|
106
|
+
export { default as ForceAddToRecallUndoIcon } from './ForceAddToRecallUndoIcon';
|
|
105
107
|
export { default as FormulaExpressionIcon } from './FormulaExpressionIcon';
|
|
106
108
|
export { default as FormulaIcon } from './FormulaIcon';
|
|
107
109
|
export { default as FromStartAltIcon } from './FromStartAltIcon';
|
|
@@ -117,6 +119,7 @@ export { default as HomeIcon } from './HomeIcon';
|
|
|
117
119
|
export { default as HtmlIcon } from './HtmlIcon';
|
|
118
120
|
export { default as ImageSearchIcon } from './ImageSearchIcon';
|
|
119
121
|
export { default as ImagesIcon } from './ImagesIcon';
|
|
122
|
+
export { default as ImpactDownIcon } from './ImpactDownIcon';
|
|
120
123
|
export { default as InfoFilledIcon } from './InfoFilledIcon';
|
|
121
124
|
export { default as InfoIcon } from './InfoIcon';
|
|
122
125
|
export { default as InfoSmallIcon } from './InfoSmallIcon';
|
|
@@ -144,7 +147,6 @@ export { default as MultiParentRejectedIcon } from './MultiParentRejectedIcon';
|
|
|
144
147
|
export { default as MultiParentSelectedIcon } from './MultiParentSelectedIcon';
|
|
145
148
|
export { default as MultiParentUnassignedIcon } from './MultiParentUnassignedIcon';
|
|
146
149
|
export { default as NegationIcon } from './NegationIcon';
|
|
147
|
-
export { default as NextStepIcon } from './NextStepIcon';
|
|
148
150
|
export { default as NotificationIcon } from './NotificationIcon';
|
|
149
151
|
export { default as NumberIcon } from './NumberIcon';
|
|
150
152
|
export { default as OfflineFillIcon } from './OfflineFillIcon';
|
|
@@ -184,6 +186,7 @@ export { default as RewertRightIcon } from './RewertRightIcon';
|
|
|
184
186
|
export { default as RibbonIcon } from './RibbonIcon';
|
|
185
187
|
export { default as RoadmapIcon } from './RoadmapIcon';
|
|
186
188
|
export { default as RobotIcon } from './RobotIcon';
|
|
189
|
+
export { default as RuleLabelIcon } from './RuleLabelIcon';
|
|
187
190
|
export { default as RunningAggregateIcon } from './RunningAggregateIcon';
|
|
188
191
|
export { default as SaveIcon } from './SaveIcon';
|
|
189
192
|
export { default as ScenarioIcon } from './ScenarioIcon';
|
|
@@ -195,10 +198,7 @@ export { default as SettingsIcon } from './SettingsIcon';
|
|
|
195
198
|
export { default as ShareIcon } from './ShareIcon';
|
|
196
199
|
export { default as ShopIcon } from './ShopIcon';
|
|
197
200
|
export { default as ShrinkIcon } from './ShrinkIcon';
|
|
198
|
-
export { default as SortAscIcon } from './SortAscIcon';
|
|
199
|
-
export { default as SortDescIcon } from './SortDescIcon';
|
|
200
201
|
export { default as SortIcon } from './SortIcon';
|
|
201
|
-
export { default as SortInactiveIcon } from './SortInactiveIcon';
|
|
202
202
|
export { default as SplitFlowIcon } from './SplitFlowIcon';
|
|
203
203
|
export { default as SqlIcon } from './SqlIcon';
|
|
204
204
|
export { default as StarFillIcon } from './StarFillIcon';
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { DOMRectBounds, INestedChildren } from '../../../utils';
|
|
3
3
|
import { ScrollRegion } from '../../containers/scroll-region/scroll-region';
|
|
4
4
|
import { ScrollView } from '../../containers/scroll-view/scroll-view';
|
|
5
|
+
import './list-view.scss';
|
|
5
6
|
export interface IRowProps {
|
|
6
7
|
/** The index of the row to be rendered. */
|
|
7
8
|
index: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ModalBodyProps } from './modal-types';
|
|
3
|
+
import './modal.scss';
|
|
3
4
|
/**
|
|
4
5
|
* Modal body component is used to render the body section of the modal dialog.
|
|
5
6
|
* Use the `padding` prop to control the padding of the body section, the default is `narrow`.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Placement } from '@floating-ui/react';
|
|
2
2
|
import React, { ReactNode, ReactElement, HTMLAttributes } from 'react';
|
|
3
|
+
import './tooltip.scss';
|
|
3
4
|
export interface TooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
4
5
|
/**
|
|
5
6
|
* Custom class name for the tooltip container
|
|
File without changes
|