@bloomreach/react-banana-ui 1.7.0 → 1.8.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.
Files changed (64) hide show
  1. package/dist/bloomreach-react-banana-ui.es.js +4660 -6686
  2. package/dist/bloomreach-react-banana-ui.es.js.map +1 -1
  3. package/dist/bloomreach-react-banana-ui.umd.js +15 -34
  4. package/dist/bloomreach-react-banana-ui.umd.js.map +1 -1
  5. package/dist/style.css +1 -1
  6. package/dist/utils/index.d.ts +1 -43
  7. package/package.json +2 -3
  8. package/dist/components/containers/dropdown/dropdown.d.ts +0 -132
  9. package/dist/components/containers/scroll-region/scroll-region.d.ts +0 -107
  10. package/dist/components/containers/scroll-view/scroll-view.d.ts +0 -116
  11. package/dist/components/inputs/selection/selection.d.ts +0 -234
  12. package/dist/components/lists/list-view/list-view.d.ts +0 -150
  13. package/dist/components/loaders/loader/loader.d.ts +0 -25
  14. package/dist/components/types.d.ts +0 -19
  15. package/dist/utils/add-font.d.ts +0 -29
  16. package/dist/utils/after-render.d.ts +0 -5
  17. package/dist/utils/async-dom-render.d.ts +0 -6
  18. package/dist/utils/chalk.d.ts +0 -44
  19. package/dist/utils/chunk.d.ts +0 -4
  20. package/dist/utils/classnames.d.ts +0 -6
  21. package/dist/utils/clone-client-rect.d.ts +0 -26
  22. package/dist/utils/compare-client-rect.d.ts +0 -5
  23. package/dist/utils/compare-sets.d.ts +0 -5
  24. package/dist/utils/compose-refs.d.ts +0 -5
  25. package/dist/utils/cookie-parser.d.ts +0 -8
  26. package/dist/utils/copy-text-to-clipboard.d.ts +0 -7
  27. package/dist/utils/debounce.d.ts +0 -4
  28. package/dist/utils/deep-clone.d.ts +0 -5
  29. package/dist/utils/deep-equal.d.ts +0 -4
  30. package/dist/utils/ensure-modal-root.d.ts +0 -4
  31. package/dist/utils/event-element-position.d.ts +0 -4
  32. package/dist/utils/filter-react-children.d.ts +0 -6
  33. package/dist/utils/find-react-children.d.ts +0 -10
  34. package/dist/utils/flatten-array.d.ts +0 -5
  35. package/dist/utils/fuzzy-groups.d.ts +0 -51
  36. package/dist/utils/get-decimal.d.ts +0 -8
  37. package/dist/utils/get-error-message.d.ts +0 -6
  38. package/dist/utils/get-first-with-class.d.ts +0 -5
  39. package/dist/utils/get-index.d.ts +0 -5
  40. package/dist/utils/get-selected-text.d.ts +0 -4
  41. package/dist/utils/get-type-name.d.ts +0 -14
  42. package/dist/utils/group-react-children.d.ts +0 -8
  43. package/dist/utils/has-child.d.ts +0 -4
  44. package/dist/utils/local-storage.d.ts +0 -42
  45. package/dist/utils/make-buffer.d.ts +0 -28
  46. package/dist/utils/map-lookup-values.d.ts +0 -65
  47. package/dist/utils/no-op.d.ts +0 -4
  48. package/dist/utils/normalize-wheel/ExecutionEnvironment.d.ts +0 -38
  49. package/dist/utils/normalize-wheel/UserAgent_DEPRECATED.d.ts +0 -116
  50. package/dist/utils/normalize-wheel/index.d.ts +0 -2
  51. package/dist/utils/normalize-wheel/isEventSupported.d.ts +0 -46
  52. package/dist/utils/normalize-wheel/normalizeWheel.d.ts +0 -139
  53. package/dist/utils/promise-resolver.d.ts +0 -36
  54. package/dist/utils/relative-client-rect.d.ts +0 -5
  55. package/dist/utils/rush.d.ts +0 -4
  56. package/dist/utils/state-controls.d.ts +0 -28
  57. package/dist/utils/stop-all-propagation.d.ts +0 -8
  58. package/dist/utils/template.d.ts +0 -49
  59. package/dist/utils/to-digits.d.ts +0 -4
  60. package/dist/utils/to-query-params.d.ts +0 -14
  61. package/dist/utils/types.d.ts +0 -69
  62. package/dist/utils/url-join.d.ts +0 -24
  63. package/dist/utils/wait.d.ts +0 -1
  64. package/dist/utils/when.d.ts +0 -2
@@ -1,116 +0,0 @@
1
- import * as React from 'react';
2
- import { DOMRectBounds, INestedChildren } from '../../../utils';
3
- import './scroll-view.scss';
4
- export declare enum ScrollBarSide {
5
- RIGHT = 0,
6
- LEFT = 1
7
- }
8
- export declare const ScrollViewMode: {
9
- readonly LIGHT: "ScrollView--light";
10
- readonly DARK: "ScrollView--dark";
11
- };
12
- export type ScrollViewModeType = (typeof ScrollViewMode)[keyof typeof ScrollViewMode];
13
- export interface IScrollView extends INestedChildren<React.ReactNode> {
14
- /** When set, the scroll will have some inertia for touch controls */
15
- allowTouchInertia?: boolean;
16
- /** Provides a custom class name to the container of this component */
17
- className?: string;
18
- /** Applies a custom class to the content portion of the scroll view */
19
- contentClassName?: string;
20
- /** Rendering mode of this scrollview */
21
- mode?: ScrollViewModeType;
22
- /** Props to apply directly to the container div of this component */
23
- containerProps?: React.HTMLProps<HTMLDivElement>;
24
- /** Props to apply directly to the scrollview content panel container */
25
- contentProps?: React.HTMLProps<HTMLDivElement>;
26
- /**
27
- * When true, scroll events will stop being absorbed by this scroll view when
28
- * the user tries to scroll beyond the max bounds of the scroll region.
29
- */
30
- allowScrollFlowThrough?: boolean;
31
- /** This forces a maximum amount of scroll room */
32
- scrollHeight?: number;
33
- /** Sets this scroll view to the given scroll top value */
34
- scrollTopOnce?: number;
35
- /**
36
- * Sets how quick the scrollTopOnce settles to the new position. Set to 1 to
37
- * be essentially instant.
38
- */
39
- autoScrollDuration?: number;
40
- /** Determines which side the scroll bar should appear on */
41
- side?: ScrollBarSide;
42
- /**
43
- * Set to make this view manage horizontal scrolling instead of vertical.
44
- * ALl of the "top" and "height" related properties will be applied
45
- * horizontally instead of vertically.
46
- */
47
- horizontal?: boolean;
48
- /**
49
- * Causes wheel events that are more biased to horizontal scrolling to be
50
- * absorbed and used by this view.
51
- */
52
- onlyHorizontalWheel?: boolean;
53
- /**
54
- * When set to true, this will always show the scroll bar as visible as long
55
- * as the space can be scrolled. If the space is not scrollable, the scroll
56
- * bar will be hidden.
57
- */
58
- alwaysShowScroll?: boolean;
59
- /**
60
- * Disables using the wheel to scroll this view.
61
- */
62
- preventWheel?: boolean;
63
- /**
64
- * When this view changes the scroll top value it provides it in this callback
65
- *
66
- * isAutomated is true when the system is scrolling the view and not the user.
67
- */
68
- onScroll?(scrollTop: number, scrollMax: number, viewBounds: DOMRectBounds, contentBounds: DOMRectBounds, isAutomated?: boolean): void;
69
- }
70
- interface IState {
71
- isOpen: boolean;
72
- isDragging: boolean;
73
- top: number;
74
- bounds?: DOMRectBounds;
75
- contentBounds?: DOMRectBounds;
76
- /**
77
- * This is set to true when the scroll is supposed to self animate. This will
78
- * only happen temporarily for automation and can not remain active while the
79
- * user interacts with the scrolling manually.
80
- */
81
- animating?: boolean;
82
- }
83
- /**
84
- * @internal This component exist to keep Pagination component works as before.
85
- * @deprecated Replace this component as new aligned with design will be added.
86
- * This is a custom scroller for rendering a custom scrollbar
87
- */
88
- export declare class ScrollView extends React.Component<IScrollView, IState> {
89
- state: IState;
90
- container: React.RefObject<HTMLDivElement>;
91
- scrollBarRef: React.RefObject<HTMLDivElement>;
92
- private content;
93
- private scrolledToOnce?;
94
- private currentScrollHeight?;
95
- private initialized;
96
- private childrenChanged;
97
- private isUpdatingChildren;
98
- private animateScrollId;
99
- private touch;
100
- getSnapshotBeforeUpdate(prevProps: Readonly<IScrollView>): null;
101
- init: () => void;
102
- componentDidMount(): void;
103
- componentDidUpdate(): void;
104
- componentWillUnmount(): void;
105
- private animateScrollOnce;
106
- private getScrollMetrics;
107
- positionScrollBar(top: number): void;
108
- handleResize: () => void;
109
- handleTouchStart: (e: TouchEvent) => void;
110
- handleTouchEnd: (e: TouchEvent) => void;
111
- handleTouchMove: (e: TouchEvent) => void;
112
- handleWheel: (e: WheelEvent) => void;
113
- handleBarDown: (e: React.PointerEvent<HTMLDivElement>) => void;
114
- render(): JSX.Element;
115
- }
116
- export {};
@@ -1,234 +0,0 @@
1
- import * as React from 'react';
2
- import { DOMRectBounds, DOMRectPadding } from '../../../utils';
3
- import './selection.scss';
4
- /**
5
- * Builds a selection's options from an object style enum.
6
- */
7
- export declare function selectionOptionsFromEnum(obj: Record<string, any>): ISelection['options'];
8
- /**
9
- * Available preformatted render modes
10
- */
11
- export declare const SelectionMode: {
12
- /**
13
- * Render mode for the selection being placed within an existing field (such
14
- * as within a TextInput on the right).
15
- */
16
- readonly FIELD_INLINE: "Selection--field-inline";
17
- /**
18
- * Same as field_inline but with toned down colors.
19
- */
20
- readonly FIELD_INLINE_SUBTLE: "Selection--field-inline-subtle";
21
- /**
22
- * Style that typically shows up at the top of a page spanning table to filter
23
- * its contents.
24
- */
25
- readonly FILTER_HEADER: "Selection--filter-header";
26
- /**
27
- * Common style when the selection is within a table setting
28
- */
29
- readonly TABLE: "Selection-table";
30
- /**
31
- * Renders this mode as disabled. This mode is automatically used when the
32
- * disabled flag is set for this component.
33
- */
34
- readonly DISABLED: "Selection--disabled";
35
- };
36
- /**
37
- * Available preformatted render sizes
38
- */
39
- export declare const SelectionSize: {
40
- readonly HEIGHT_30: "Selection--height-30";
41
- readonly HEIGHT_32: "Selection--height-32";
42
- readonly HEIGHT_36: "Selection--height-36";
43
- readonly HEIGHT_40: "Selection--height-40";
44
- readonly HEIGHT_60: "Selection--height-60";
45
- };
46
- export type SelectionSizeType = (typeof SelectionSize)[keyof typeof SelectionSize];
47
- export declare const SelectionDropdownMode: {
48
- PLAIN: string;
49
- };
50
- export type SelectionModeType = (typeof SelectionMode)[keyof typeof SelectionMode];
51
- /**
52
- * Selection Props
53
- */
54
- export interface ISelection {
55
- /** Allows children */
56
- children?: React.ReactNode;
57
- /** Provides a custom class name to the container of this component */
58
- className?: string;
59
- /** Props to apply directly to the container div of this component */
60
- containerProps?: React.HTMLProps<HTMLDivElement>;
61
- /**
62
- * This causes the selection to display a customized dropdown menu. This
63
- * essentially bypasses any "options" provided and will NOT manage any of the
64
- * values or callbacks.
65
- *
66
- * You can pass a <Dropdown> component to this prop, or you can pass a
67
- * component with a <Dropdown> as it's top level container and has a
68
- * containerProps: IDropdown prop.
69
- */
70
- customDropdown?: React.ReactNode;
71
- /** Optional decal to be injected on the left of displayed value */
72
- decal?: React.ReactNode;
73
- /**
74
- * When true, the drop arrow decal will render up instead of down
75
- */
76
- decalUp?: boolean;
77
- /** The initial displayed value within the selection menu */
78
- defaultValue?: any;
79
- /** Set to true to render this component as disabled and eliminate handlers */
80
- disabled?: boolean;
81
- /**
82
- * Set this to force a displayed value instead of the user selected value.
83
- * NOTE: This sets the display WITHOUT affecting the selection value in any
84
- * way.
85
- */
86
- displayValue?: React.ReactNode;
87
- /**
88
- * Provide this to force render the dropdown of the selection with custom
89
- * bounds.
90
- */
91
- dropdownBounds?: DOMRectBounds;
92
- /**
93
- * Pads the dropdown reference box with the provided padding to allow for a
94
- * larger dropdown region than just the width of the value box. This also
95
- * makes it easier to gap the dropdown from the value box.
96
- */
97
- dropdownPadding?: DOMRectPadding;
98
- /** Placeholder message if no value is selected yet */
99
- placeholder?: string;
100
- /** Error message */
101
- error?: string;
102
- /**
103
- * Indicate if the dropdown should include a Quick Search.
104
- *
105
- * NOTE: The quick search will ONLY work on options that have a string for
106
- * its label OR is provided a search term to compare against. A React Element
107
- * can not be searched against.
108
- */
109
- hasSearch?: boolean;
110
- /**
111
- * Set to true to indicate there are more options that can be loaded in when
112
- * the user scrolls to the bottom of the list.
113
- */
114
- hasMore?: boolean;
115
- /**
116
- * Set to true to indicate the dropdown items are being loaded.
117
- */
118
- isLoading?: boolean;
119
- /**
120
- * Displays a label adjacent to this dropdown.
121
- */
122
- label?: React.ReactNode;
123
- /** Render mode of the selection input */
124
- mode?: SelectionModeType;
125
- /** The options to offer in the selection menu */
126
- options: {
127
- /**
128
- * The label of the selection in the dropdown menu (and displayed as the
129
- * value when selected).
130
- */
131
- label: React.ReactNode;
132
- /** Value paired with the option */
133
- value: any;
134
- /** Provides the string the search compares against to find options */
135
- search?: string;
136
- /** When true, places a divider between this item and the next item */
137
- divider?: boolean;
138
- }[];
139
- /** Indicates how many rows for the dropdown should render at max */
140
- rowDisplayCount?: number;
141
- /** Render size of the selection input */
142
- size?: SelectionSizeType;
143
- /** Props to configure the select element to help work with forms */
144
- selectProps?: React.HTMLProps<HTMLSelectElement>;
145
- /** When set, this does a controlled component pattern. */
146
- value?: any;
147
- /** A label to display next to the current displayed value */
148
- valueLabel?: string;
149
- /**
150
- * Executes when the user changes the value of this field.
151
- */
152
- onChange?(value: any): void;
153
- /**
154
- * If hasMore is true and the user reaches the end of the list, this will
155
- * execute to indicate more data needs to be loaded for the user to view.
156
- */
157
- onLoadMore?(options: this['options']): Promise<void>;
158
- /**
159
- * Executes when the user opens the dropdown.
160
- */
161
- onOpen?(): void;
162
- /**
163
- * Executes when the dropdown is closed. Return false to prevent the dropdown
164
- * from closing.
165
- */
166
- onClose?(): boolean;
167
- /**
168
- * This executes when the user types in a search in the QuickSearch field.
169
- */
170
- onSearch?(searchTerm: string): void;
171
- /**
172
- * This hijacks the click event for the decal arrow. In some cases, the arrow
173
- * may cause a differing behavior, such as sort direction control.
174
- */
175
- onArrowClick?(e: React.MouseEvent): void;
176
- }
177
- interface IState {
178
- dropdownBounds: DOMRectBounds | null;
179
- hovered: boolean;
180
- focused: boolean;
181
- internalValue: any;
182
- /** The current search term applied to the selection. */
183
- searchValue?: string;
184
- }
185
- /**
186
- * @internal This component exist to keep Pagination component works as before.
187
- * @deprecated Replace this component as new aligned with design will be added.
188
- * Displays a dropdown where the user picks an item from a list of items
189
- *
190
- * When this component has children, it will skip rendering the header default
191
- * header component and allow for a customized header which will be the
192
- * children; HOWEVER, this will still provide the dropdown for rendering for a
193
- * selection style dropdown menu that will render.
194
- */
195
- export declare class Selection extends React.Component<ISelection, IState> {
196
- state: IState;
197
- container: React.RefObject<HTMLDivElement>;
198
- private selectRef;
199
- private headerRef;
200
- private searchRef;
201
- private stopBlur;
202
- private preventRefocus;
203
- private willLoadMore;
204
- private windowBlurred;
205
- componentDidMount(): void;
206
- componentDidUpdate(_prevProps: this['props'], prevState: IState): void;
207
- componentWillUnmount(): void;
208
- get valueLabel(): React.ReactNode | string;
209
- get valueIndex(): number;
210
- /**
211
- * Retrieves the list of options that should be displayed. This takes into
212
- * account the current search term the user may have entered.
213
- */
214
- get options(): ISelection['options'];
215
- handleWindowBlur: () => void;
216
- handleClick: (e: React.SyntheticEvent) => void;
217
- handleOpen: () => void;
218
- handleClose: () => void;
219
- handleFocus: (e: FocusEvent) => void;
220
- handleBlur: (e: FocusEvent) => void;
221
- handleSelect: (option: ISelection['options'][0]) => () => void;
222
- /**
223
- * Handles the user's input into the Quick Search bar
224
- */
225
- handleSearch: (e: React.ChangeEvent) => void;
226
- preventBlur: () => void;
227
- handleRange: (_start: number, _end: number, _total: number, isEnd: boolean) => Promise<void>;
228
- handleMouseDown: (e: React.MouseEvent) => void;
229
- renderHeader(): JSX.Element;
230
- renderDropdown(): JSX.Element | null | undefined;
231
- renderSearch(): JSX.Element;
232
- render(): JSX.Element;
233
- }
234
- export {};
@@ -1,150 +0,0 @@
1
- import * as React from 'react';
2
- import { DOMRectBounds, INestedChildren } from '../../../utils';
3
- import { ScrollRegion } from '../../containers/scroll-region/scroll-region';
4
- import { ScrollView } from '../../containers/scroll-view/scroll-view';
5
- import './list-view.scss';
6
- export interface IRowProps {
7
- /** The index of the row to be rendered. */
8
- index: number;
9
- /** A fairly mandatory style object you should apply to the top level item */
10
- style?: React.CSSProperties;
11
- /** Indicates this row is the last element to be rendered */
12
- isEnd: boolean;
13
- /**
14
- * Gives an opportunity to modify/override the style properties applied to
15
- * the generated row item
16
- */
17
- rowStyle: React.CSSProperties;
18
- }
19
- export interface IListView extends INestedChildren<React.FunctionComponent<IRowProps>> {
20
- /** When set, causes inertia to occur with touch swiping */
21
- allowTouchInertia?: boolean;
22
- /**
23
- * A base size to associate with a list item. This helps give a realistic
24
- * scroll range. Use a negative value to indicate the row should be measured
25
- * to have a more dynamic row size. The absolute value of the negative value
26
- * provided will be the minimum size of the row. Use the rowGap property to
27
- * ensure spacing is provided between the row and it's next row if needed.
28
- */
29
- rowSize: number | ((index: number, isEnd: boolean) => number);
30
- /**
31
- * Place an incrementing number here. If the rows need recomputing due to a
32
- * size change, this value should change.
33
- */
34
- rowUpdate?: any;
35
- /** This is ONLY used for rows that get measured and automatically adjusted */
36
- rowGap?: number;
37
- /** Applies a class to the top level container of the pane */
38
- className?: string;
39
- /** Props to apply to the container of this component */
40
- containerProps?: React.HTMLProps<HTMLDivElement>;
41
- /** WHen the list is empty, this will render a centered label in it's place */
42
- emptyLabel?: string;
43
- /** Total number of items to render */
44
- total: number;
45
- /**
46
- * Scrolls to the provided location a single time for the given value. A
47
- * different value must be provided to trigger this a second time.
48
- */
49
- scrollToOnce?: number;
50
- /**
51
- * Sets how quick the scrollToOnce settles to the new position. Set to 1 to
52
- * be essentially instant.
53
- */
54
- autoScrollDuration?: number;
55
- /**
56
- * This limits the list to only display so many rows before forcing scroll.
57
- * NOTE: When rowSize is a method for varying row sizes, this will means
58
- * rowDisplayCount will display the number of rows with THE LARGEST AVAILABLE
59
- * SIZE. So, do not expect this to auto adjust for the varying row sizes
60
- * available and be super magical.
61
- */
62
- rowDisplayCount?: number;
63
- /**
64
- * When set to true, this will render the list within a ScrollRegion instead
65
- * of a ScrollView.
66
- */
67
- useScrollRegion?: boolean;
68
- /** Executes when the range of visible rows has changed */
69
- onRange?(start: number, end: number, total: number, isEnd: boolean): void;
70
- /** Executes on scroll events */
71
- onScroll?(scrollTop: number, maxScroll: number, viewBounds: DOMRectBounds, contentBounds: DOMRectBounds, isAutomated?: boolean): void;
72
- }
73
- /**
74
- * @internal This component exist to keep Pagination component works as before.
75
- * @deprecated Replace this component as new aligned with design will be added.
76
- * This is a specialized scroll view that aids in recycling and rendering items
77
- */
78
- export declare class ListView extends React.Component<IListView> {
79
- state: {
80
- startIndex: number;
81
- endIndex: number;
82
- };
83
- /**
84
- * This is the scrollview container this list uses for creating the scroll
85
- * space of the list.
86
- */
87
- container: React.RefObject<ScrollRegion | ScrollView>;
88
- /**
89
- * When rowSize is a method, this is used to store the calculated row values.
90
- * This helps optimize the list to prevent deep looping in really large lists
91
- * of items.
92
- */
93
- rowTop: number[];
94
- /**
95
- * This is a helper optimization. It stores the last row's most recently known
96
- * height. This helps speed up determining the total scroll area of the list.
97
- */
98
- lastRowHeight: number;
99
- /** This tracks what row size is the largest row size */
100
- maxRowSize: number;
101
- /**
102
- * This is the last row update context utilized to compute the row tops. If
103
- * this is different from the props rowUpdate value then it should trigger a
104
- * recalculation.
105
- */
106
- rowUpdateContext?: any;
107
- /** Used to indicate if this has been intiialized correctly yet. */
108
- mounted: boolean;
109
- /** Tracks the rows that will be measured when rendered */
110
- willMeasure: Set<number>;
111
- /** Tracks the rows that are rendered and need immediate measuring for re-rendering */
112
- measuring: Map<number, React.RefObject<HTMLDivElement> | undefined>;
113
- /**
114
- * This is set when the list detects rows that are auto calculated. Some
115
- * initialization behaviors need to be aware of this in order to perform the
116
- * initial render properly.
117
- */
118
- hasAutoHeightRows: boolean;
119
- /** Helps watch for mutations in the DOM to aid in dynamically sized rows */
120
- observer?: MutationObserver;
121
- constructor(props: IListView);
122
- componentDidMount(): void;
123
- /**
124
- *
125
- * We will use this to process incoming props to determine if the row tops
126
- * should be recalculated.
127
- */
128
- shouldComponentUpdate(nextProps: IListView): boolean;
129
- componentDidUpdate(): void;
130
- componentWillUnmount(): void;
131
- /**
132
- * Gets the computed scroll height
133
- */
134
- get scrollHeight(): number;
135
- /**
136
- * Applies a calculated style object for the scroll view. This keeps the
137
- * integrity of the containerProps
138
- */
139
- get scrollStyle(): React.CSSProperties;
140
- handleResize: () => void;
141
- handleScrollRegion: (scrollTop: [number, number], maxScroll: [number, number], viewBounds: DOMRectBounds, contentBounds: DOMRectBounds) => void;
142
- handleScroll: (scrollTop: number, maxScroll: number, viewBounds: DOMRectBounds, contentBounds: DOMRectBounds) => void;
143
- /**
144
- * Resets all rowTop calculation assumptions and queues all rows for
145
- * recalculating.
146
- */
147
- queueRemeasure(props: IListView): void;
148
- private renderListItems;
149
- render(): JSX.Element;
150
- }
@@ -1,25 +0,0 @@
1
- import * as React from 'react';
2
- import './loader.scss';
3
- export declare const LoaderSize: {
4
- readonly NORMAL: "Loader--medium";
5
- readonly SMALL: "Loader--small";
6
- readonly TINY: "Loader--tiny";
7
- };
8
- export type LoaderSizeType = (typeof LoaderSize)[keyof typeof LoaderSize];
9
- /**
10
- * Loader Props
11
- */
12
- export interface ILoader {
13
- /** Provides a custom class name to the container of this component */
14
- className?: string;
15
- /** Props to apply directly to the container div of this component */
16
- containerProps?: React.HTMLProps<HTMLDivElement>;
17
- /** Rendering sie of the standard loader */
18
- size?: LoaderSizeType;
19
- }
20
- /**
21
- * @internal This component exist to keep Pagination component works as before.
22
- * @deprecated Replace this component as new aligned with design will be added.
23
- * Displays the common loader found throughout the application.
24
- */
25
- export declare function Loader(props: ILoader): React.ReactElement;
@@ -1,19 +0,0 @@
1
- /**
2
- * ID used for the Toast modal. Helpful for keeping the modals sorted to a
3
- * degree.
4
- */
5
- export declare const ToastModalID = "__yeah_toast__";
6
- /**
7
- * ID used for the tooltip modal. Helpful for keeping the modals sorted to a
8
- * degree.
9
- */
10
- export declare const TooltipModalID = "__tooltip__";
11
- /**
12
- * ID used for the generic dropdown modal. Helpful for keeping the modals sorted
13
- * to a degree.
14
- */
15
- export declare const DropdownModalID = "__dropdown__";
16
- /**
17
- * Date type format. Strings are expected to be in an appropriate ISO format.
18
- */
19
- export type DateType = string | number | Date;
@@ -1,29 +0,0 @@
1
- /**
2
- * This method ensures the fonts required for this SPA are embedded into the
3
- * page.
4
- *
5
- * @param context Provide a context id to identify the fonts embedded for the
6
- * sake of destroying them later.
7
- * @param fontName The name of the font as is expected to be used from the font
8
- * resource (such as "sans serif")
9
- * @param fontResource Use require(<file path>) to provide for the param.
10
- * @param fontType Set the type of font the file is providing
11
- * @param weight The weight value associated with this font:
12
- * - 100: thin
13
- * - 200: extra-light
14
- * - 300: light
15
- * - 400: normal
16
- * - 500: medium
17
- * - 600: semi-bold
18
- * - 700: bold
19
- * - 800: extra-bold
20
- * - 900: black
21
- */
22
- export declare function addFont(context: string, fontName: string, fontResource: string, fontType: string, weight?: number, style?: string): void;
23
- /**
24
- * Destroys the embedded fonts for this SPA. This ensures your component does
25
- * not cause leaks
26
- *
27
- * @param context Provide the context id for the fonts that should be destroyed.
28
- */
29
- export declare function destroyAllFonts(context: string): void;
@@ -1,5 +0,0 @@
1
- /**
2
- * A dubious method to help with dubious times. Used to call for updates during
3
- * specialized render callbacks like <Route render>.
4
- */
5
- export declare function afterRender(fn?: () => void): Promise<void>;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * This method performs a ReactDOM render, but encapsulates the render with a
4
- * Promise to make it easier to await the result.
5
- */
6
- export declare function asyncDomRender(element: React.ReactNode, container: Element | DocumentFragment): Promise<void>;
@@ -1,44 +0,0 @@
1
- export declare const chalk: {
2
- cyan: (...text: string[]) => string;
3
- red: (...text: string[]) => string;
4
- yellow: (...text: string[]) => string;
5
- green: (...text: string[]) => string;
6
- blue: (...text: string[]) => string;
7
- magenta: (...text: string[]) => string;
8
- cyanBright: (...text: string[]) => string;
9
- redBright: (...text: string[]) => string;
10
- yellowBright: (...text: string[]) => string;
11
- greenBright: (...text: string[]) => string;
12
- blueBright: (...text: string[]) => string;
13
- magentaBright: (...text: string[]) => string;
14
- whiteBright: (...text: string[]) => string;
15
- gray: (...text: string[]) => string;
16
- grey: (...text: string[]) => string;
17
- white: (...text: string[]) => string;
18
- black: (...text: string[]) => string;
19
- blackBright: (...text: string[]) => string;
20
- bgCyan: (...text: string[]) => string;
21
- bgRed: (...text: string[]) => string;
22
- bgYellow: (...text: string[]) => string;
23
- bgGreen: (...text: string[]) => string;
24
- bgBlue: (...text: string[]) => string;
25
- bgMagenta: (...text: string[]) => string;
26
- bgCyanBright: (...text: string[]) => string;
27
- bgRedBright: (...text: string[]) => string;
28
- bgYellowBright: (...text: string[]) => string;
29
- bgGreenBright: (...text: string[]) => string;
30
- bgBlueBright: (...text: string[]) => string;
31
- bgMagentaBright: (...text: string[]) => string;
32
- cyanBrightBold: (...text: string[]) => string;
33
- redBrightBold: (...text: string[]) => string;
34
- yellowBrightBold: (...text: string[]) => string;
35
- greenBrightBold: (...text: string[]) => string;
36
- blueBrightBold: (...text: string[]) => string;
37
- magentaBrightBold: (...text: string[]) => string;
38
- whiteBrightBold: (...text: string[]) => string;
39
- grayBrightBold: (...text: string[]) => string;
40
- greyBrightBold: (...text: string[]) => string;
41
- whiteBold: (...text: string[]) => string;
42
- blackBold: (...text: string[]) => string;
43
- blackBrightBold: (...text: string[]) => string;
44
- };
@@ -1,4 +0,0 @@
1
- /**
2
- * Breaks an array into chunks
3
- */
4
- export declare function chunk<T>(array: T[], size: number): T[][];
@@ -1,6 +0,0 @@
1
- /**
2
- * This takes several arguments and concatenates them into a single css class
3
- * name compatible string. It will remove any falsy values and will trim any
4
- * whitespace.
5
- */
6
- export declare function classnames(...str: (string | undefined | null)[]): string;
@@ -1,26 +0,0 @@
1
- /**
2
- * Padding values to grow a client rect during a client rect cloning operation.
3
- */
4
- export type DOMRectPadding = {
5
- left?: number;
6
- top?: number;
7
- bottom?: number;
8
- right?: number;
9
- };
10
- export type DOMRectBounds = {
11
- x: number;
12
- y: number;
13
- top: number;
14
- left: number;
15
- bottom: number;
16
- right: number;
17
- width: number;
18
- height: number;
19
- };
20
- /**
21
- * ClientRects are a bit annoying to work around their immutability if needed.
22
- * This properly makes a Mutable clone without altering the original (unless
23
- * padding is specified to do a one time change of the bounds. The padding
24
- * expands/contracts the box on the indicated sides).
25
- */
26
- export declare function cloneClientRect(box?: DOMRectBounds, padding?: DOMRectPadding): DOMRectBounds;
@@ -1,5 +0,0 @@
1
- import { DOMRectBounds } from './clone-client-rect';
2
- /**
3
- * Compares two client rects against each other.
4
- */
5
- export declare function compareClientRect(a?: DOMRectBounds | null, b?: DOMRectBounds | null): boolean;