@deskpro/deskpro-ui 5.0.4 → 6.1.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/cjs/components/Drilldown/CreateNewOption.js +18 -0
- package/dist/cjs/components/Drilldown/CreateNewOption.js.map +1 -0
- package/dist/cjs/components/Drilldown/Drilldown.js +78 -197
- package/dist/cjs/components/Drilldown/Drilldown.js.map +1 -1
- package/dist/cjs/components/Drilldown/DrilldownItem.js +65 -0
- package/dist/cjs/components/Drilldown/DrilldownItem.js.map +1 -0
- package/dist/cjs/components/Drilldown/DrilldownList.js +133 -0
- package/dist/cjs/components/Drilldown/DrilldownList.js.map +1 -0
- package/dist/cjs/components/Drilldown/DrilldownResetButton.js +2 -2
- package/dist/cjs/components/Drilldown/DrilldownResetButton.js.map +1 -1
- package/dist/cjs/components/Drilldown/hooks/useFilteredItems.js +42 -0
- package/dist/cjs/components/Drilldown/hooks/useFilteredItems.js.map +1 -0
- package/dist/cjs/components/Drilldown/hooks/useTreeify.js +63 -0
- package/dist/cjs/components/Drilldown/hooks/useTreeify.js.map +1 -0
- package/dist/cjs/components/Drilldown/{useUpdateItems.js → hooks/useUpdateItems.js} +2 -2
- package/dist/cjs/components/Drilldown/hooks/useUpdateItems.js.map +1 -0
- package/dist/cjs/components/Drilldown/index.js +9 -7
- package/dist/cjs/components/Drilldown/index.js.map +1 -1
- package/dist/cjs/components/Drilldown/styles.js +14 -1
- package/dist/cjs/components/Drilldown/styles.js.map +1 -1
- package/dist/cjs/components/Drilldown/types.js.map +1 -1
- package/dist/cjs/components/Drilldown/utility.js +45 -22
- package/dist/cjs/components/Drilldown/utility.js.map +1 -1
- package/dist/cjs/components/Infinite/Infinite.js +116 -61
- package/dist/cjs/components/Infinite/Infinite.js.map +1 -1
- package/dist/cjs/components/Infinite/ObservedDiv.js +2 -2
- package/dist/cjs/components/Infinite/ObservedDiv.js.map +1 -1
- package/dist/cjs/components/Infinite/styles.js.map +1 -1
- package/dist/cjs/hooks/usePrevious.js +17 -0
- package/dist/cjs/hooks/usePrevious.js.map +1 -0
- package/dist/cjs/utils/useInView.js +27 -0
- package/dist/cjs/utils/useInView.js.map +1 -0
- package/dist/deskpro-ui.d.ts +40 -46
- package/dist/esm/components/Drilldown/CreateNewOption.js +14 -0
- package/dist/esm/components/Drilldown/CreateNewOption.js.map +1 -0
- package/dist/esm/components/Drilldown/Drilldown.js +78 -193
- package/dist/esm/components/Drilldown/Drilldown.js.map +1 -1
- package/dist/esm/components/Drilldown/DrilldownItem.js +61 -0
- package/dist/esm/components/Drilldown/DrilldownItem.js.map +1 -0
- package/dist/esm/components/Drilldown/DrilldownList.js +127 -0
- package/dist/esm/components/Drilldown/DrilldownList.js.map +1 -0
- package/dist/esm/components/Drilldown/DrilldownResetButton.js +1 -1
- package/dist/esm/components/Drilldown/DrilldownResetButton.js.map +1 -1
- package/dist/esm/components/Drilldown/hooks/useFilteredItems.js +38 -0
- package/dist/esm/components/Drilldown/hooks/useFilteredItems.js.map +1 -0
- package/dist/esm/components/Drilldown/hooks/useTreeify.js +54 -0
- package/dist/esm/components/Drilldown/hooks/useTreeify.js.map +1 -0
- package/dist/esm/components/Drilldown/{useUpdateItems.js → hooks/useUpdateItems.js} +2 -2
- package/dist/esm/components/Drilldown/hooks/useUpdateItems.js.map +1 -0
- package/dist/esm/components/Drilldown/index.js +5 -2
- package/dist/esm/components/Drilldown/index.js.map +1 -1
- package/dist/esm/components/Drilldown/styles.js +13 -0
- package/dist/esm/components/Drilldown/styles.js.map +1 -1
- package/dist/esm/components/Drilldown/types.js.map +1 -1
- package/dist/esm/components/Drilldown/utility.js +40 -20
- package/dist/esm/components/Drilldown/utility.js.map +1 -1
- package/dist/esm/components/Infinite/Infinite.js +117 -62
- package/dist/esm/components/Infinite/Infinite.js.map +1 -1
- package/dist/esm/components/Infinite/ObservedDiv.js +2 -2
- package/dist/esm/components/Infinite/ObservedDiv.js.map +1 -1
- package/dist/esm/components/Infinite/styles.js.map +1 -1
- package/dist/esm/hooks/usePrevious.js +13 -0
- package/dist/esm/hooks/usePrevious.js.map +1 -0
- package/dist/esm/utils/useInView.js +25 -0
- package/dist/esm/utils/useInView.js.map +1 -0
- package/package.json +9 -4
- package/dist/cjs/components/Drilldown/useUpdateItems.js.map +0 -1
- package/dist/esm/components/Drilldown/useUpdateItems.js.map +0 -1
package/dist/deskpro-ui.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { FlattenSimpleInterpolation } from 'styled-components';
|
|
|
26
26
|
import { ForwardRefComponent } from 'framer-motion';
|
|
27
27
|
import { ForwardRefExoticComponent } from 'react';
|
|
28
28
|
import { GlobalStyleComponent } from 'styled-components';
|
|
29
|
+
import type { HierarchyNode } from 'd3-hierarchy';
|
|
29
30
|
import { HTMLAttributes } from 'react';
|
|
30
31
|
import { HTMLMotionProps } from 'framer-motion';
|
|
31
32
|
import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
@@ -119,7 +120,7 @@ is?: string | undefined;
|
|
|
119
120
|
'aria-colindex'?: number | undefined;
|
|
120
121
|
'aria-colspan'?: number | undefined;
|
|
121
122
|
'aria-controls'?: string | undefined;
|
|
122
|
-
'aria-current'?: boolean | "time" | "true" | "false" | "
|
|
123
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "location" | "step" | "date" | undefined;
|
|
123
124
|
'aria-describedby'?: string | undefined;
|
|
124
125
|
'aria-details'?: string | undefined;
|
|
125
126
|
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
@@ -540,7 +541,7 @@ is?: string | undefined;
|
|
|
540
541
|
'aria-colindex'?: number | undefined;
|
|
541
542
|
'aria-colspan'?: number | undefined;
|
|
542
543
|
'aria-controls'?: string | undefined;
|
|
543
|
-
'aria-current'?: boolean | "time" | "true" | "false" | "
|
|
544
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "location" | "step" | "date" | undefined;
|
|
544
545
|
'aria-describedby'?: string | undefined;
|
|
545
546
|
'aria-details'?: string | undefined;
|
|
546
547
|
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
@@ -838,7 +839,7 @@ is?: string | undefined;
|
|
|
838
839
|
'aria-colindex'?: number | undefined;
|
|
839
840
|
'aria-colspan'?: number | undefined;
|
|
840
841
|
'aria-controls'?: string | undefined;
|
|
841
|
-
'aria-current'?: boolean | "time" | "true" | "false" | "
|
|
842
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "location" | "step" | "date" | undefined;
|
|
842
843
|
'aria-describedby'?: string | undefined;
|
|
843
844
|
'aria-details'?: string | undefined;
|
|
844
845
|
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
@@ -1200,7 +1201,7 @@ is?: string | undefined;
|
|
|
1200
1201
|
'aria-colindex'?: number | undefined;
|
|
1201
1202
|
'aria-colspan'?: number | undefined;
|
|
1202
1203
|
'aria-controls'?: string | undefined;
|
|
1203
|
-
'aria-current'?: boolean | "time" | "true" | "false" | "
|
|
1204
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "location" | "step" | "date" | undefined;
|
|
1204
1205
|
'aria-describedby'?: string | undefined;
|
|
1205
1206
|
'aria-details'?: string | undefined;
|
|
1206
1207
|
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
@@ -1731,7 +1732,7 @@ declare type DpCustomIconsId = "active-call" | "admin" | "advanced-filter" | "ag
|
|
|
1731
1732
|
* </Drilldown>
|
|
1732
1733
|
* ```
|
|
1733
1734
|
*/
|
|
1734
|
-
export declare function Drilldown<T, TargetRef extends HTMLElement
|
|
1735
|
+
export declare function Drilldown<T, TargetRef extends HTMLElement>({ type, children, options, inputValue, searchPlaceholder, placement, showInternalSearch, isLoading, usePortal, closeOnSelect, isOpen: isOpenProp, renderCreateNewOption, onCreateNewOption, hideIcons, iconColumnWidth, containerWidth, containerHeight, onSelectOption, onInputChange, onFetchMore, onClear, onClose, onOpen, onInputReturn, tabProps, disabled, fetchMoreText, autoscrollText, emptySearchResultsText, externalLinkIcon, selectedIcon, layer, animationDuration, onDrilldown, onDrilldownAnimationEnd, onDrillupAnimationEnd, backText, filterPredicate, }: DrilldownProps<T, TargetRef>): JSX.Element;
|
|
1735
1736
|
|
|
1736
1737
|
declare interface DrilldownBaseProps<T, TargetRef extends HTMLElement> {
|
|
1737
1738
|
/** Event handler for when an option is selected */
|
|
@@ -1789,6 +1790,8 @@ declare interface DrilldownBaseProps<T, TargetRef extends HTMLElement> {
|
|
|
1789
1790
|
fetchMoreText: ReactNode;
|
|
1790
1791
|
/** The text to show for the autoscroll button */
|
|
1791
1792
|
autoscrollText: ReactNode;
|
|
1793
|
+
/** The text to show for the autoscroll button */
|
|
1794
|
+
emptySearchResultsText: ReactNode;
|
|
1792
1795
|
externalLinkIcon: AnyIcon;
|
|
1793
1796
|
selectedIcon: AnyIcon;
|
|
1794
1797
|
/** Event handler that returns input value after enter has been pressed */
|
|
@@ -1896,8 +1899,8 @@ export declare interface DrilldownFlatProps<T, TargetRef extends HTMLElement> ex
|
|
|
1896
1899
|
/** Event handler for when an option is selected */
|
|
1897
1900
|
/** Event handler for when the search input value changes */
|
|
1898
1901
|
onInputChange?: (input: string, pathToSelectedItem: PathToSelectedItem) => void;
|
|
1899
|
-
/**
|
|
1900
|
-
|
|
1902
|
+
/** Predicate for filtering items */
|
|
1903
|
+
filterPredicate?: (item: DrilldownItemTreeType<T>, input: string) => boolean;
|
|
1901
1904
|
/** Event handler that it called when triggering a drilldown, after animation was run */
|
|
1902
1905
|
onDrilldownAnimationEnd?: (item: DrilldownValueFlatType<T> | undefined, pathToSelectedItem: PathToSelectedItem) => Promise<void>;
|
|
1903
1906
|
}
|
|
@@ -1939,7 +1942,7 @@ export declare const DrilldownInternalSearchInputContainer: StyledComponent<"div
|
|
|
1939
1942
|
/**
|
|
1940
1943
|
* @public
|
|
1941
1944
|
*/
|
|
1942
|
-
export declare function DrilldownItem<T = unknown>({ value, active, onSelect, onSelectIcon, onClickSubItem, hideIcons, iconColumnWidth, selectedIcon, externalLinkIcon, handleDrilldown, dataKey, subItems, }: DrilldownItemProps<T>): JSX.Element;
|
|
1945
|
+
export declare function DrilldownItem<T = unknown>({ value, active, onSelect, onSelectIcon, onClickSubItem, hideIcons, iconColumnWidth, selectedIcon, externalLinkIcon, handleDrilldown, dataKey, subItems, isSearchResult, inputValue, flatItemTree, }: DrilldownItemProps<T>): JSX.Element;
|
|
1943
1946
|
|
|
1944
1947
|
/**
|
|
1945
1948
|
* @public
|
|
@@ -1985,6 +1988,9 @@ export declare interface DrilldownItemProps<T = unknown> {
|
|
|
1985
1988
|
handleDrilldown: (item: DrilldownValueType<T>) => Promise<void>;
|
|
1986
1989
|
dataKey: string;
|
|
1987
1990
|
subItems: DrilldownItemType<T>[] | undefined;
|
|
1991
|
+
isSearchResult?: boolean;
|
|
1992
|
+
inputValue?: string;
|
|
1993
|
+
flatItemTree?: HierarchyNode<DrilldownValueFlatType<T>>;
|
|
1988
1994
|
}
|
|
1989
1995
|
|
|
1990
1996
|
/**
|
|
@@ -2030,7 +2036,18 @@ export declare type DrilldownProps<T, TargetRef extends HTMLElement> = Drilldown
|
|
|
2030
2036
|
/**
|
|
2031
2037
|
* @public
|
|
2032
2038
|
*/
|
|
2033
|
-
export declare function drilldownRenderOptions<T = string>(options
|
|
2039
|
+
export declare function drilldownRenderOptions<T = string>({ options, handleSelectOption, handleDrilldown, activeItem, selectedIcon, externalLinkIcon, hideIcons, iconColumnWidth, }: DrilldownRenderOptionsProps<T>): (value: DrilldownItemType<T>, index: number, array: DrilldownItemType<T>[]) => ReactNode;
|
|
2040
|
+
|
|
2041
|
+
declare type DrilldownRenderOptionsProps<T> = {
|
|
2042
|
+
options: DrilldownItemType<T>[];
|
|
2043
|
+
handleSelectOption: (value: DrilldownValueType<T>) => void;
|
|
2044
|
+
handleDrilldown: (item: DrilldownValueType<T>) => Promise<void>;
|
|
2045
|
+
activeItem: ActiveItem<T>;
|
|
2046
|
+
selectedIcon: AnyIcon;
|
|
2047
|
+
externalLinkIcon: AnyIcon;
|
|
2048
|
+
hideIcons?: boolean;
|
|
2049
|
+
iconColumnWidth?: number;
|
|
2050
|
+
};
|
|
2034
2051
|
|
|
2035
2052
|
/**
|
|
2036
2053
|
* @public
|
|
@@ -2137,8 +2154,8 @@ export declare interface DrilldownTreeProps<T, TargetRef extends HTMLElement> ex
|
|
|
2137
2154
|
/** Event handler for when an option is selected */
|
|
2138
2155
|
/** Event handler for when the search input value changes */
|
|
2139
2156
|
onInputChange?: (input: string, pathToSelectedItem: PathToSelectedItem) => void;
|
|
2140
|
-
/**
|
|
2141
|
-
|
|
2157
|
+
/** Predicate for filtering items */
|
|
2158
|
+
filterPredicate?: (item: DrilldownItemTreeType<T>, input: string) => boolean;
|
|
2142
2159
|
/** Event handler that it called when triggering a drilldown, after animation was run */
|
|
2143
2160
|
onDrilldownAnimationEnd?: (item: DrilldownValueTreeType<T> | undefined, pathToSelectedItem: PathToSelectedItem) => Promise<void>;
|
|
2144
2161
|
}
|
|
@@ -2524,33 +2541,6 @@ export declare interface FaIconAvatarProps {
|
|
|
2524
2541
|
iconStyles?: CSSProperties;
|
|
2525
2542
|
}
|
|
2526
2543
|
|
|
2527
|
-
/**
|
|
2528
|
-
* A helper function to make it easier to filter the items at the current depth
|
|
2529
|
-
* e.g. on search input change (see WithSearch story)
|
|
2530
|
-
*
|
|
2531
|
-
* Returns the full items array with only the deepest sub items of the path updated
|
|
2532
|
-
* @public
|
|
2533
|
-
*/
|
|
2534
|
-
export declare function filterCurrentTreeItems<T>(items: DrilldownItemTreeType<T>[], pathToSelectedItem: {
|
|
2535
|
-
key: string;
|
|
2536
|
-
searchTerm?: string;
|
|
2537
|
-
}[], input: string, filterItemsCb: FilterItemsTreeCb<T>, depth?: number): DrilldownItemTreeType<T>[];
|
|
2538
|
-
|
|
2539
|
-
/**
|
|
2540
|
-
* @public
|
|
2541
|
-
*/
|
|
2542
|
-
export declare type FilterItemsCb<T> = (items: DrilldownItemTreeType<T>[], input: string) => DrilldownItemTreeType<T>[];
|
|
2543
|
-
|
|
2544
|
-
/**
|
|
2545
|
-
* @public
|
|
2546
|
-
*/
|
|
2547
|
-
export declare type FilterItemsFlatCb<T> = (items: DrilldownItemFlatType<T>[], input: string, parentKey?: string) => DrilldownItemFlatType<T>[];
|
|
2548
|
-
|
|
2549
|
-
/**
|
|
2550
|
-
* @public
|
|
2551
|
-
*/
|
|
2552
|
-
export declare type FilterItemsTreeCb<T> = (items: DrilldownItemTreeType<T>[], input: string) => DrilldownItemTreeType<T>[];
|
|
2553
|
-
|
|
2554
2544
|
/**
|
|
2555
2545
|
* Wrapper around Formik's useField hook and ErrorMessage component
|
|
2556
2546
|
* @public
|
|
@@ -2669,7 +2659,7 @@ export declare const GroupByButton: React_2.ForwardRefExoticComponent<{
|
|
|
2669
2659
|
'aria-colindex'?: number | undefined;
|
|
2670
2660
|
'aria-colspan'?: number | undefined;
|
|
2671
2661
|
'aria-controls'?: string | undefined;
|
|
2672
|
-
'aria-current'?: boolean | "time" | "true" | "false" | "
|
|
2662
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "location" | "step" | "date" | undefined;
|
|
2673
2663
|
'aria-describedby'?: string | undefined;
|
|
2674
2664
|
'aria-details'?: string | undefined;
|
|
2675
2665
|
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
@@ -3209,7 +3199,7 @@ is?: string | undefined;
|
|
|
3209
3199
|
'aria-colindex'?: number | undefined;
|
|
3210
3200
|
'aria-colspan'?: number | undefined;
|
|
3211
3201
|
'aria-controls'?: string | undefined;
|
|
3212
|
-
'aria-current'?: boolean | "time" | "true" | "false" | "
|
|
3202
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "location" | "step" | "date" | undefined;
|
|
3213
3203
|
'aria-describedby'?: string | undefined;
|
|
3214
3204
|
'aria-details'?: string | undefined;
|
|
3215
3205
|
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
@@ -3471,7 +3461,7 @@ export declare interface ImageAvatarProps {
|
|
|
3471
3461
|
* the container has scrolled to the top or bottom.
|
|
3472
3462
|
* @public
|
|
3473
3463
|
*/
|
|
3474
|
-
export declare function Infinite({ children, reverse, anchor, onFetchMore, status, maxHeight, scrollSideEffect, width, fetchMoreText, autoscrollText, scrollRef, justify, }: InfiniteProps): JSX.Element;
|
|
3464
|
+
export declare function Infinite({ children, reverse, anchor, onFetchMore, onFetchMoreStart, status, startStatus, maxHeight, scrollSideEffect, width, fetchMoreText, autoscrollText, scrollRef, justify, onResize, onJumpToStart, }: InfiniteProps): JSX.Element;
|
|
3475
3465
|
|
|
3476
3466
|
/**
|
|
3477
3467
|
* @public
|
|
@@ -3483,16 +3473,20 @@ export declare interface InfiniteProps {
|
|
|
3483
3473
|
/** Whether to render the Scroll To Start button */
|
|
3484
3474
|
anchor?: boolean;
|
|
3485
3475
|
onFetchMore?: () => void;
|
|
3476
|
+
onFetchMoreStart?: () => void;
|
|
3486
3477
|
status?: "loading" | "hasNextPage" | "end" | "end-with-force";
|
|
3478
|
+
startStatus?: "loading" | "hasNextPage" | "end" | "end-with-force";
|
|
3487
3479
|
maxHeight?: Property.MaxHeight;
|
|
3488
3480
|
/** Used in <Dropdown /> to hide suboptions on scroll */
|
|
3489
|
-
scrollSideEffect?: () => void;
|
|
3481
|
+
scrollSideEffect?: (event: React_2.UIEvent<HTMLElement, UIEvent>) => void;
|
|
3490
3482
|
width?: string;
|
|
3491
3483
|
/** Align the list, you probably want flex-end if the list is reversed so it aligns to the bottom of the viewport */
|
|
3492
3484
|
justify?: StackProps["justify"];
|
|
3493
3485
|
fetchMoreText: ReactNode;
|
|
3494
3486
|
autoscrollText: ReactNode;
|
|
3495
3487
|
scrollRef?: RefObject<HTMLDivElement>;
|
|
3488
|
+
onResize?: () => void;
|
|
3489
|
+
onJumpToStart?: () => void;
|
|
3496
3490
|
}
|
|
3497
3491
|
|
|
3498
3492
|
/**
|
|
@@ -3823,7 +3817,7 @@ export declare type MenuDividerProps = HTMLAttributes<HTMLLIElement> & {
|
|
|
3823
3817
|
/**
|
|
3824
3818
|
* @public
|
|
3825
3819
|
*/
|
|
3826
|
-
export declare const MenuItem: React_2.ForwardRefExoticComponent<Pick<MenuItemProps, "label" | "slot" | "style" | "title" | "children" | "className" | "type" | "icon" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "media" | "target" | "href" | "
|
|
3820
|
+
export declare const MenuItem: React_2.ForwardRefExoticComponent<Pick<MenuItemProps, "label" | "slot" | "style" | "title" | "children" | "className" | "type" | "icon" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "media" | "target" | "href" | "key" | "download" | "hrefLang" | "ping" | "rel" | "referrerPolicy" | "disabled" | "rightIcon" | "active" | "iconColor" | "useHoverState" | "htmlTitle"> & React_2.RefAttributes<HTMLAnchorElement>>;
|
|
3827
3821
|
|
|
3828
3822
|
/**
|
|
3829
3823
|
* @public
|
|
@@ -4005,7 +3999,7 @@ is?: string | undefined;
|
|
|
4005
3999
|
'aria-colindex'?: number | undefined;
|
|
4006
4000
|
'aria-colspan'?: number | undefined;
|
|
4007
4001
|
'aria-controls'?: string | undefined;
|
|
4008
|
-
'aria-current'?: boolean | "time" | "true" | "false" | "
|
|
4002
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "location" | "step" | "date" | undefined;
|
|
4009
4003
|
'aria-describedby'?: string | undefined;
|
|
4010
4004
|
'aria-details'?: string | undefined;
|
|
4011
4005
|
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
@@ -4340,7 +4334,7 @@ is?: string | undefined;
|
|
|
4340
4334
|
'aria-colindex'?: number | undefined;
|
|
4341
4335
|
'aria-colspan'?: number | undefined;
|
|
4342
4336
|
'aria-controls'?: string | undefined;
|
|
4343
|
-
'aria-current'?: boolean | "time" | "true" | "false" | "
|
|
4337
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "location" | "step" | "date" | undefined;
|
|
4344
4338
|
'aria-describedby'?: string | undefined;
|
|
4345
4339
|
'aria-details'?: string | undefined;
|
|
4346
4340
|
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
@@ -4552,7 +4546,7 @@ formNoValidate?: boolean | undefined;
|
|
|
4552
4546
|
formTarget?: string | undefined;
|
|
4553
4547
|
} & Omit<CommonButtonProps, "icon" | "size" | "fill" | "rightIcon" | "minimal"> & {
|
|
4554
4548
|
icon?: AnyIcon | IconProps | null | undefined;
|
|
4555
|
-
placement?: "
|
|
4549
|
+
placement?: "right-top" | "right-bottom" | "left-top" | "left-bottom" | "middle-top" | "middle-bottom" | undefined;
|
|
4556
4550
|
rightIcon?: AnyIcon | IconProps | null | undefined;
|
|
4557
4551
|
} & React_2.RefAttributes<HTMLButtonElement>>, DefaultTheme, {
|
|
4558
4552
|
position?: "absolute" | "relative" | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as S from "./styles";
|
|
2
|
+
import { Icon } from "../Icon";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export const CreateNewOption = ({ text, icon, onClick, resetButton, iconColor, active, }) => {
|
|
8
|
+
return (React.createElement(S.CreateNewItemLayout, { active: active, className: resetButton ? "resetButton" : "", onClick: onClick },
|
|
9
|
+
React.createElement(S.DrilldownLabel, null,
|
|
10
|
+
React.createElement(S.DrilldownIcon, null,
|
|
11
|
+
React.createElement(Icon, { themeColor: iconColor, icon: icon })),
|
|
12
|
+
text)));
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=CreateNewOption.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateNewOption.js","sourceRoot":"","sources":["../../../../src/components/Drilldown/CreateNewOption.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAW,IAAI,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,WAAW,EACX,SAAS,EACT,MAAM,GACe,EAAe,EAAE;IACtC,OAAO,CACL,oBAAC,CAAC,CAAC,mBAAmB,IACpB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAC3C,OAAO,EAAE,OAAO;QAEhB,oBAAC,CAAC,CAAC,cAAc;YACf,oBAAC,CAAC,CAAC,aAAa;gBACd,oBAAC,IAAI,IAAC,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,GAAI,CAC3B;YACjB,IAAI,CACY,CACG,CACzB,CAAC;AACJ,CAAC,CAAC"}
|