@uniformdev/design-system 20.49.4-alpha.102 → 20.49.4-alpha.124
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/esm/index.js +195 -95
- package/dist/index.d.mts +260 -206
- package/dist/index.d.ts +260 -206
- package/dist/index.js +597 -497
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { Decorator } from '@storybook/react-vite';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
|
-
import React__default, { RefObject, ReactElement, HTMLAttributes, ReactNode, ButtonHTMLAttributes, ImgHTMLAttributes, SVGProps, InputHTMLAttributes,
|
|
4
|
+
import React__default, { RefObject, ReactElement, HTMLAttributes, ReactNode, ButtonHTMLAttributes, ImgHTMLAttributes, SVGProps, InputHTMLAttributes, HtmlHTMLAttributes, PropsWithChildren, CSSProperties, Ref, FocusEventHandler, ChangeEvent } from 'react';
|
|
5
5
|
import { GroupBase, Props, MultiValue, SingleValue, StylesConfig } from 'react-select';
|
|
6
6
|
export { ActionMeta, FormatOptionLabelContext, FormatOptionLabelMeta, GetOptionLabel, GetOptionValue, GroupBase, GroupHeadingProps, GroupProps, MenuListProps, MenuPlacement, MultiValue, MultiValueGenericProps, MultiValueProps, MultiValueRemoveProps, OnChangeValue, OptionContext, OptionProps, Options, OptionsOrGroups } from 'react-select';
|
|
7
7
|
import * as _emotion_react from '@emotion/react';
|
|
@@ -2723,6 +2723,208 @@ type KeyValueInputProps<TValue extends string = string> = {
|
|
|
2723
2723
|
*/
|
|
2724
2724
|
declare const KeyValueInput: <TValue extends string = string>({ value, onChange, label, newItemDefault, keyLabel, valueLabel, iconLabel, keyInfoPopover, valueInfoPopover, iconInfoPopover, disabled, errors, onFocusChange, showIconColumn, renderIconSelector, }: KeyValueInputProps<TValue>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2725
2725
|
|
|
2726
|
+
interface DropdownStyleMenuTriggerProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
2727
|
+
children: React.ReactNode;
|
|
2728
|
+
/** sets the background color of the button */
|
|
2729
|
+
bgColor?: string;
|
|
2730
|
+
/** sets the variant of the button
|
|
2731
|
+
* @default "ghost"
|
|
2732
|
+
*/
|
|
2733
|
+
variant?: 'ghost' | 'outline';
|
|
2734
|
+
}
|
|
2735
|
+
/** Renders a dropdown menu style menu trigger button */
|
|
2736
|
+
declare const DropdownStyleMenuTrigger: React$1.ForwardRefExoticComponent<DropdownStyleMenuTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2737
|
+
|
|
2738
|
+
declare const legacyPlacements: readonly ["auto", "auto-start", "auto-end"];
|
|
2739
|
+
type LegacyPlacement = (typeof legacyPlacements)[number];
|
|
2740
|
+
interface MenuProps extends MenuProps$1 {
|
|
2741
|
+
/** the component that triggers the menu functionality */
|
|
2742
|
+
menuTrigger: React$1.ReactElement & React$1.RefAttributes<any>;
|
|
2743
|
+
/** (optional) Ariakit placements options for the expandable menu */
|
|
2744
|
+
placement?: MenuStoreProps['placement'] | LegacyPlacement;
|
|
2745
|
+
/** (optional) allows users to set additional class names */
|
|
2746
|
+
menuItemsContainerCssClasses?: SerializedStyles | string;
|
|
2747
|
+
/** (optional) allows users to add child elements */
|
|
2748
|
+
children?: React$1.ReactNode;
|
|
2749
|
+
/**
|
|
2750
|
+
* By default the menu will automatically remove MenuItemSeparator components when they are:
|
|
2751
|
+
* - the first child
|
|
2752
|
+
* - the last child
|
|
2753
|
+
* - adjacent to another separator
|
|
2754
|
+
*
|
|
2755
|
+
* ...both in the menu's immediate child items and any Fragment or MenuGroup components' children within.
|
|
2756
|
+
* This simplifies boolean logic with highly conditional menus so one can not worry about contiguous separators.
|
|
2757
|
+
* If you need to disable this functionality, set this prop to true.
|
|
2758
|
+
*/
|
|
2759
|
+
disableAutoSeparatorManagement?: boolean;
|
|
2760
|
+
/** sets whether to use a React portal rendering or not. */
|
|
2761
|
+
withoutPortal?: boolean;
|
|
2762
|
+
/** (optional) sets the test id attribute */
|
|
2763
|
+
testId?: string;
|
|
2764
|
+
/** (optional) sets the maximum height of the menu
|
|
2765
|
+
* setting a max menu height value will make the menu scrollable if the content exceeds the height
|
|
2766
|
+
* this is not compatible with nested menus that expand to the left or right of the menu
|
|
2767
|
+
*/
|
|
2768
|
+
maxMenuHeight?: string;
|
|
2769
|
+
portalElement?: React$1.ComponentProps<typeof Menu$1>['portalElement'];
|
|
2770
|
+
/** sets the menu size
|
|
2771
|
+
* it's recommended to use the same size for all menu items in a menu
|
|
2772
|
+
* @default 'base'
|
|
2773
|
+
*/
|
|
2774
|
+
size?: 'small' | 'base';
|
|
2775
|
+
/** (optional) disables the menu trigger so the menu cannot be opened */
|
|
2776
|
+
disabled?: boolean;
|
|
2777
|
+
}
|
|
2778
|
+
/**
|
|
2779
|
+
* Component used for creating clickable menus
|
|
2780
|
+
* @example
|
|
2781
|
+
* <Menu
|
|
2782
|
+
* menuTrigger={<button type="button">Click me</button>}
|
|
2783
|
+
* menuItemsContainerCssClasses="bg-white"
|
|
2784
|
+
* >
|
|
2785
|
+
* <MenuItem>Item 1</MenuItem>
|
|
2786
|
+
* </Menu>
|
|
2787
|
+
*/
|
|
2788
|
+
declare const Menu: React$1.ForwardRefExoticComponent<Omit<MenuProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2789
|
+
|
|
2790
|
+
type MenuGroupProps = {
|
|
2791
|
+
/** Title for the menu group. If undefined or an empty string, the group will render as normal menu */
|
|
2792
|
+
title: ReactNode | undefined;
|
|
2793
|
+
/** Menu items to render in the group */
|
|
2794
|
+
children: ReactNode;
|
|
2795
|
+
};
|
|
2796
|
+
declare const MenuGroup: ({ title, children }: MenuGroupProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2797
|
+
|
|
2798
|
+
/**
|
|
2799
|
+
* base - default
|
|
2800
|
+
* red - red text
|
|
2801
|
+
* accent-alt - AI color (accent-alt-dark). DOES NOT change the text - only the icon color!
|
|
2802
|
+
*/
|
|
2803
|
+
type MenuItemTextThemeProps = 'base' | 'red' | 'accent-alt';
|
|
2804
|
+
type MenuItemProps = MenuItemProps$1 & {
|
|
2805
|
+
/**
|
|
2806
|
+
* Sets child elements within the component.
|
|
2807
|
+
* Can be omitted when using the `render` prop
|
|
2808
|
+
*/
|
|
2809
|
+
children?: ChildFunction | React$1.ReactNode;
|
|
2810
|
+
/** (optional) set whether to hide the menu after a click action */
|
|
2811
|
+
hideMenuOnClick?: boolean;
|
|
2812
|
+
/** (optional) set an icon along side the item text, we recommend using the MenuItemIcon component
|
|
2813
|
+
* @example <MenuItemIcon icon="add-r" />
|
|
2814
|
+
*/
|
|
2815
|
+
icon?: React$1.ReactElement;
|
|
2816
|
+
/** When an element is disabled, it may still be focusable. It works similarly to readOnly on form elements. In this case, only aria-disabled will be set. */
|
|
2817
|
+
focusable?: boolean;
|
|
2818
|
+
/** (optional) set the menu item text color
|
|
2819
|
+
* @default 'base'
|
|
2820
|
+
*/
|
|
2821
|
+
textColor?: MenuItemTextThemeProps;
|
|
2822
|
+
/**
|
|
2823
|
+
* Overrides the focus styles and forces this menu item to have highlighted/selected styles
|
|
2824
|
+
* Normally automatically managed.
|
|
2825
|
+
*/
|
|
2826
|
+
active?: boolean;
|
|
2827
|
+
/**
|
|
2828
|
+
* Renders a keyboard shortcut for the menu item. The onClick of the menu will
|
|
2829
|
+
* be automatically set to invoke the shortcut's handler function.
|
|
2830
|
+
*/
|
|
2831
|
+
shortcut?: ShortcutReference;
|
|
2832
|
+
};
|
|
2833
|
+
type ChildFunction = (menuItemProps: MenuItemProps$1) => React$1.ReactElement | null;
|
|
2834
|
+
/**
|
|
2835
|
+
* MenuItem Component used along side <Menu /> component
|
|
2836
|
+
* @example <MenuItem onClick={() => alert('menu item was clicked')} icon={<RedClose />}>Remove Link</MenuItem>
|
|
2837
|
+
*/
|
|
2838
|
+
declare const MenuItem: React$1.ForwardRefExoticComponent<Omit<MenuItemProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2839
|
+
/**
|
|
2840
|
+
* MenuItem Component for headless use outside <Menu /> component
|
|
2841
|
+
* Use only if adapting Uniform menu item appearance to a non-ariakit menu.
|
|
2842
|
+
* This is required because ariakit does not let you use MenuItem outside of a Menu component.
|
|
2843
|
+
* @example <MenuItemInner onClick={() => alert('menu item was clicked')} icon={<RedClose />}>Remove Link</MenuItem>
|
|
2844
|
+
*/
|
|
2845
|
+
declare const MenuItemInner: React$1.FC<MenuItemProps>;
|
|
2846
|
+
/**
|
|
2847
|
+
* Renders an icon for a menu item. Optional micro wrapper around an Icon component
|
|
2848
|
+
* configured to match the menu item icon style.
|
|
2849
|
+
*/
|
|
2850
|
+
declare function MenuItemIcon({ icon, size }: {
|
|
2851
|
+
icon: IconType;
|
|
2852
|
+
size?: string;
|
|
2853
|
+
}): _emotion_react_jsx_runtime.JSX.Element;
|
|
2854
|
+
/**
|
|
2855
|
+
* Indents a menu item as if it had an icon when it does not
|
|
2856
|
+
* Use this to align menu items without icons with those that have icons
|
|
2857
|
+
* in a mixed menu. Intended to be passed as the `icon` prop to a MenuItem.
|
|
2858
|
+
*/
|
|
2859
|
+
declare function MenuItemEmptyIcon(): _emotion_react_jsx_runtime.JSX.Element;
|
|
2860
|
+
|
|
2861
|
+
declare const MenuItemSeparator: ({ ...props }: HtmlHTMLAttributes<HTMLHRElement>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2862
|
+
|
|
2863
|
+
type MenuButtonProp = {
|
|
2864
|
+
children: React.ReactNode;
|
|
2865
|
+
} & HTMLAttributes<HTMLButtonElement>;
|
|
2866
|
+
declare const MenuButton: React$1.ForwardRefExoticComponent<{
|
|
2867
|
+
children: React.ReactNode;
|
|
2868
|
+
} & HTMLAttributes<HTMLButtonElement> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2869
|
+
type MenuThreeDotsProps = {
|
|
2870
|
+
/** sets the aria-label and title value on the button
|
|
2871
|
+
* @default 'More options'
|
|
2872
|
+
*/
|
|
2873
|
+
buttonTitle?: string;
|
|
2874
|
+
/** sets the icon size
|
|
2875
|
+
* @default '1rem'
|
|
2876
|
+
*/
|
|
2877
|
+
iconSize?: string;
|
|
2878
|
+
disabled?: boolean;
|
|
2879
|
+
} & HTMLAttributes<HTMLButtonElement>;
|
|
2880
|
+
declare const MenuThreeDots: React$1.ForwardRefExoticComponent<{
|
|
2881
|
+
/** sets the aria-label and title value on the button
|
|
2882
|
+
* @default 'More options'
|
|
2883
|
+
*/
|
|
2884
|
+
buttonTitle?: string;
|
|
2885
|
+
/** sets the icon size
|
|
2886
|
+
* @default '1rem'
|
|
2887
|
+
*/
|
|
2888
|
+
iconSize?: string;
|
|
2889
|
+
disabled?: boolean;
|
|
2890
|
+
} & HTMLAttributes<HTMLButtonElement> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2891
|
+
declare const MenuSelect: React$1.ForwardRefExoticComponent<{
|
|
2892
|
+
/** sets the size of the menu select
|
|
2893
|
+
* @default 'base'
|
|
2894
|
+
*/
|
|
2895
|
+
size?: "xs" | "sm" | "base" | "md" | "lg";
|
|
2896
|
+
children: React.ReactNode;
|
|
2897
|
+
} & HTMLAttributes<HTMLButtonElement> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2898
|
+
|
|
2899
|
+
type SearchableMenuProps = {
|
|
2900
|
+
/** Note: this is pre-debounced for your handling enjoyment */
|
|
2901
|
+
onSearchTextChanged: (searchTerm: string) => void;
|
|
2902
|
+
/** Shows a no results message when no matching results exist */
|
|
2903
|
+
hasNoResults: boolean | string;
|
|
2904
|
+
/** Disables the search function, i.e. if few menu items exist */
|
|
2905
|
+
disableSearch?: boolean;
|
|
2906
|
+
/** Sets the placeholder in the search input */
|
|
2907
|
+
searchPlaceholder?: string;
|
|
2908
|
+
} & MenuProps;
|
|
2909
|
+
/**
|
|
2910
|
+
* Searchable menu allows searching through its menu items
|
|
2911
|
+
*/
|
|
2912
|
+
declare const SearchableMenu: (props: SearchableMenuProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2913
|
+
|
|
2914
|
+
interface SelectableMenuItemProps extends PropsWithChildren<Omit<MenuItemProps, 'children'>> {
|
|
2915
|
+
/** whether the menu item is selected */
|
|
2916
|
+
selected: boolean;
|
|
2917
|
+
/** the styles to use for the selectable menu item
|
|
2918
|
+
* @default 'default'
|
|
2919
|
+
*/
|
|
2920
|
+
selectStyles?: 'default' | 'checkbox-select';
|
|
2921
|
+
/** whether the menu item is selectable
|
|
2922
|
+
* @default true
|
|
2923
|
+
*/
|
|
2924
|
+
isSelectable?: boolean;
|
|
2925
|
+
}
|
|
2926
|
+
declare function SelectableMenuItem({ selected, children, selectStyles, isSelectable, ...menuItemProps }: SelectableMenuItemProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
2927
|
+
|
|
2726
2928
|
type SwatchSize = 'default' | 'small';
|
|
2727
2929
|
type SwatchVariant = 'swatch-default' | 'swatch-red' | 'swatch-orange' | 'swatch-yellow' | 'swatch-green' | 'swatch-blue' | 'swatch-purple' | 'swatch-pink' | 'swatch-brown' | 'swatch-gray';
|
|
2728
2930
|
type SwatchProps = {
|
|
@@ -2875,6 +3077,8 @@ type LabelsQuickFilterItem = {
|
|
|
2875
3077
|
type LabelsQuickFilterProps = {
|
|
2876
3078
|
/** The text to display on the filter button */
|
|
2877
3079
|
buttonText: string;
|
|
3080
|
+
/** The text to display on the add button */
|
|
3081
|
+
addButtonText?: string | null;
|
|
2878
3082
|
/** All available label items (including groups and children) */
|
|
2879
3083
|
items: LabelsQuickFilterItem[];
|
|
2880
3084
|
/** Set or array of currently selected item IDs */
|
|
@@ -2899,13 +3103,36 @@ type LabelsQuickFilterProps = {
|
|
|
2899
3103
|
* @default '4rem'
|
|
2900
3104
|
*/
|
|
2901
3105
|
maxContainerSize?: string;
|
|
3106
|
+
/** the function to call when the quick filter is opened */
|
|
3107
|
+
onOpen?: () => void;
|
|
3108
|
+
/** the function to call when the quick filter is closed */
|
|
3109
|
+
onClose?: () => void;
|
|
3110
|
+
/**
|
|
3111
|
+
* Override the Ariakit placement of the dropdown menu.
|
|
3112
|
+
* @default 'bottom-end'
|
|
3113
|
+
*/
|
|
3114
|
+
menuPlacement?: MenuProps['placement'];
|
|
3115
|
+
/**
|
|
3116
|
+
* Override the Ariakit getAnchorRect for custom menu anchor positioning.
|
|
3117
|
+
* Pass `null` to disable the built-in default and use standard Ariakit positioning.
|
|
3118
|
+
*/
|
|
3119
|
+
menuGetAnchorRect?: MenuProps['getAnchorRect'] | null;
|
|
3120
|
+
/**
|
|
3121
|
+
* Override the Ariakit updatePosition to control when the menu repositions.
|
|
3122
|
+
* Pass `null` to disable the built-in default (position freezing) and allow normal repositioning.
|
|
3123
|
+
*/
|
|
3124
|
+
menuUpdatePosition?: MenuProps['updatePosition'] | null;
|
|
3125
|
+
/** the maximum number of results to display
|
|
3126
|
+
* @default 0 (no limit)
|
|
3127
|
+
*/
|
|
3128
|
+
maxCount?: number;
|
|
2902
3129
|
};
|
|
2903
3130
|
/**
|
|
2904
3131
|
* A reusable quick filter component for selecting labels with swatch colors.
|
|
2905
3132
|
* Supports flat labels and grouped labels with nested menus.
|
|
2906
3133
|
* @example <LabelsQuickFilter buttonText="Filter by label" items={labels} selectedIds={selectedSet} onSelect={handleSelect} onDeselect={handleDeselect} />
|
|
2907
3134
|
*/
|
|
2908
|
-
declare const LabelsQuickFilter: ({ buttonText, items, selectedIds, onSelect, onDeselect, disabled, testId, totalResults, onCreateLabel, withoutPortal, maxContainerSize, }: LabelsQuickFilterProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
3135
|
+
declare const LabelsQuickFilter: ({ buttonText, addButtonText, items, selectedIds, onSelect, onDeselect, disabled, testId, totalResults, onCreateLabel, withoutPortal, maxContainerSize, onOpen, onClose, menuPlacement, menuGetAnchorRect, menuUpdatePosition, maxCount, }: LabelsQuickFilterProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2909
3136
|
|
|
2910
3137
|
type AsideAndSectionLayout = {
|
|
2911
3138
|
/** sets child components in the aside / supporting column */
|
|
@@ -3110,208 +3337,6 @@ interface LoadingIconProps extends HTMLAttributes<SVGSVGElement> {
|
|
|
3110
3337
|
*/
|
|
3111
3338
|
declare const LoadingIcon: ({ height, width, ...props }: LoadingIconProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
3112
3339
|
|
|
3113
|
-
interface DropdownStyleMenuTriggerProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
3114
|
-
children: React.ReactNode;
|
|
3115
|
-
/** sets the background color of the button */
|
|
3116
|
-
bgColor?: string;
|
|
3117
|
-
/** sets the variant of the button
|
|
3118
|
-
* @default "ghost"
|
|
3119
|
-
*/
|
|
3120
|
-
variant?: 'ghost' | 'outline';
|
|
3121
|
-
}
|
|
3122
|
-
/** Renders a dropdown menu style menu trigger button */
|
|
3123
|
-
declare const DropdownStyleMenuTrigger: React$1.ForwardRefExoticComponent<DropdownStyleMenuTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
3124
|
-
|
|
3125
|
-
declare const legacyPlacements: readonly ["auto", "auto-start", "auto-end"];
|
|
3126
|
-
type LegacyPlacement = (typeof legacyPlacements)[number];
|
|
3127
|
-
interface MenuProps extends MenuProps$1 {
|
|
3128
|
-
/** the component that triggers the menu functionality */
|
|
3129
|
-
menuTrigger: React$1.ReactElement & React$1.RefAttributes<any>;
|
|
3130
|
-
/** (optional) Ariakit placements options for the expandable menu */
|
|
3131
|
-
placement?: MenuStoreProps['placement'] | LegacyPlacement;
|
|
3132
|
-
/** (optional) allows users to set additional class names */
|
|
3133
|
-
menuItemsContainerCssClasses?: SerializedStyles | string;
|
|
3134
|
-
/** (optional) allows users to add child elements */
|
|
3135
|
-
children?: React$1.ReactNode;
|
|
3136
|
-
/**
|
|
3137
|
-
* By default the menu will automatically remove MenuItemSeparator components when they are:
|
|
3138
|
-
* - the first child
|
|
3139
|
-
* - the last child
|
|
3140
|
-
* - adjacent to another separator
|
|
3141
|
-
*
|
|
3142
|
-
* ...both in the menu's immediate child items and any Fragment or MenuGroup components' children within.
|
|
3143
|
-
* This simplifies boolean logic with highly conditional menus so one can not worry about contiguous separators.
|
|
3144
|
-
* If you need to disable this functionality, set this prop to true.
|
|
3145
|
-
*/
|
|
3146
|
-
disableAutoSeparatorManagement?: boolean;
|
|
3147
|
-
/** sets whether to use a React portal rendering or not. */
|
|
3148
|
-
withoutPortal?: boolean;
|
|
3149
|
-
/** (optional) sets the test id attribute */
|
|
3150
|
-
testId?: string;
|
|
3151
|
-
/** (optional) sets the maximum height of the menu
|
|
3152
|
-
* setting a max menu height value will make the menu scrollable if the content exceeds the height
|
|
3153
|
-
* this is not compatible with nested menus that expand to the left or right of the menu
|
|
3154
|
-
*/
|
|
3155
|
-
maxMenuHeight?: string;
|
|
3156
|
-
portalElement?: React$1.ComponentProps<typeof Menu$1>['portalElement'];
|
|
3157
|
-
/** sets the menu size
|
|
3158
|
-
* it's recommended to use the same size for all menu items in a menu
|
|
3159
|
-
* @default 'base'
|
|
3160
|
-
*/
|
|
3161
|
-
size?: 'small' | 'base';
|
|
3162
|
-
/** (optional) disables the menu trigger so the menu cannot be opened */
|
|
3163
|
-
disabled?: boolean;
|
|
3164
|
-
}
|
|
3165
|
-
/**
|
|
3166
|
-
* Component used for creating clickable menus
|
|
3167
|
-
* @example
|
|
3168
|
-
* <Menu
|
|
3169
|
-
* menuTrigger={<button type="button">Click me</button>}
|
|
3170
|
-
* menuItemsContainerCssClasses="bg-white"
|
|
3171
|
-
* >
|
|
3172
|
-
* <MenuItem>Item 1</MenuItem>
|
|
3173
|
-
* </Menu>
|
|
3174
|
-
*/
|
|
3175
|
-
declare const Menu: React$1.ForwardRefExoticComponent<Omit<MenuProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
3176
|
-
|
|
3177
|
-
type MenuGroupProps = {
|
|
3178
|
-
/** Title for the menu group. If undefined or an empty string, the group will render as normal menu */
|
|
3179
|
-
title: ReactNode | undefined;
|
|
3180
|
-
/** Menu items to render in the group */
|
|
3181
|
-
children: ReactNode;
|
|
3182
|
-
};
|
|
3183
|
-
declare const MenuGroup: ({ title, children }: MenuGroupProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
3184
|
-
|
|
3185
|
-
/**
|
|
3186
|
-
* base - default
|
|
3187
|
-
* red - red text
|
|
3188
|
-
* accent-alt - AI color (accent-alt-dark). DOES NOT change the text - only the icon color!
|
|
3189
|
-
*/
|
|
3190
|
-
type MenuItemTextThemeProps = 'base' | 'red' | 'accent-alt';
|
|
3191
|
-
type MenuItemProps = MenuItemProps$1 & {
|
|
3192
|
-
/**
|
|
3193
|
-
* Sets child elements within the component.
|
|
3194
|
-
* Can be omitted when using the `render` prop
|
|
3195
|
-
*/
|
|
3196
|
-
children?: ChildFunction | React$1.ReactNode;
|
|
3197
|
-
/** (optional) set whether to hide the menu after a click action */
|
|
3198
|
-
hideMenuOnClick?: boolean;
|
|
3199
|
-
/** (optional) set an icon along side the item text, we recommend using the MenuItemIcon component
|
|
3200
|
-
* @example <MenuItemIcon icon="add-r" />
|
|
3201
|
-
*/
|
|
3202
|
-
icon?: React$1.ReactElement;
|
|
3203
|
-
/** When an element is disabled, it may still be focusable. It works similarly to readOnly on form elements. In this case, only aria-disabled will be set. */
|
|
3204
|
-
focusable?: boolean;
|
|
3205
|
-
/** (optional) set the menu item text color
|
|
3206
|
-
* @default 'base'
|
|
3207
|
-
*/
|
|
3208
|
-
textColor?: MenuItemTextThemeProps;
|
|
3209
|
-
/**
|
|
3210
|
-
* Overrides the focus styles and forces this menu item to have highlighted/selected styles
|
|
3211
|
-
* Normally automatically managed.
|
|
3212
|
-
*/
|
|
3213
|
-
active?: boolean;
|
|
3214
|
-
/**
|
|
3215
|
-
* Renders a keyboard shortcut for the menu item. The onClick of the menu will
|
|
3216
|
-
* be automatically set to invoke the shortcut's handler function.
|
|
3217
|
-
*/
|
|
3218
|
-
shortcut?: ShortcutReference;
|
|
3219
|
-
};
|
|
3220
|
-
type ChildFunction = (menuItemProps: MenuItemProps$1) => React$1.ReactElement | null;
|
|
3221
|
-
/**
|
|
3222
|
-
* MenuItem Component used along side <Menu /> component
|
|
3223
|
-
* @example <MenuItem onClick={() => alert('menu item was clicked')} icon={<RedClose />}>Remove Link</MenuItem>
|
|
3224
|
-
*/
|
|
3225
|
-
declare const MenuItem: React$1.ForwardRefExoticComponent<Omit<MenuItemProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
3226
|
-
/**
|
|
3227
|
-
* MenuItem Component for headless use outside <Menu /> component
|
|
3228
|
-
* Use only if adapting Uniform menu item appearance to a non-ariakit menu.
|
|
3229
|
-
* This is required because ariakit does not let you use MenuItem outside of a Menu component.
|
|
3230
|
-
* @example <MenuItemInner onClick={() => alert('menu item was clicked')} icon={<RedClose />}>Remove Link</MenuItem>
|
|
3231
|
-
*/
|
|
3232
|
-
declare const MenuItemInner: React$1.FC<MenuItemProps>;
|
|
3233
|
-
/**
|
|
3234
|
-
* Renders an icon for a menu item. Optional micro wrapper around an Icon component
|
|
3235
|
-
* configured to match the menu item icon style.
|
|
3236
|
-
*/
|
|
3237
|
-
declare function MenuItemIcon({ icon, size }: {
|
|
3238
|
-
icon: IconType;
|
|
3239
|
-
size?: string;
|
|
3240
|
-
}): _emotion_react_jsx_runtime.JSX.Element;
|
|
3241
|
-
/**
|
|
3242
|
-
* Indents a menu item as if it had an icon when it does not
|
|
3243
|
-
* Use this to align menu items without icons with those that have icons
|
|
3244
|
-
* in a mixed menu. Intended to be passed as the `icon` prop to a MenuItem.
|
|
3245
|
-
*/
|
|
3246
|
-
declare function MenuItemEmptyIcon(): _emotion_react_jsx_runtime.JSX.Element;
|
|
3247
|
-
|
|
3248
|
-
declare const MenuItemSeparator: ({ ...props }: HtmlHTMLAttributes<HTMLHRElement>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
3249
|
-
|
|
3250
|
-
type MenuButtonProp = {
|
|
3251
|
-
children: React.ReactNode;
|
|
3252
|
-
} & HTMLAttributes<HTMLButtonElement>;
|
|
3253
|
-
declare const MenuButton: React$1.ForwardRefExoticComponent<{
|
|
3254
|
-
children: React.ReactNode;
|
|
3255
|
-
} & HTMLAttributes<HTMLButtonElement> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
3256
|
-
type MenuThreeDotsProps = {
|
|
3257
|
-
/** sets the aria-label and title value on the button
|
|
3258
|
-
* @default 'More options'
|
|
3259
|
-
*/
|
|
3260
|
-
buttonTitle?: string;
|
|
3261
|
-
/** sets the icon size
|
|
3262
|
-
* @default '1rem'
|
|
3263
|
-
*/
|
|
3264
|
-
iconSize?: string;
|
|
3265
|
-
disabled?: boolean;
|
|
3266
|
-
} & HTMLAttributes<HTMLButtonElement>;
|
|
3267
|
-
declare const MenuThreeDots: React$1.ForwardRefExoticComponent<{
|
|
3268
|
-
/** sets the aria-label and title value on the button
|
|
3269
|
-
* @default 'More options'
|
|
3270
|
-
*/
|
|
3271
|
-
buttonTitle?: string;
|
|
3272
|
-
/** sets the icon size
|
|
3273
|
-
* @default '1rem'
|
|
3274
|
-
*/
|
|
3275
|
-
iconSize?: string;
|
|
3276
|
-
disabled?: boolean;
|
|
3277
|
-
} & HTMLAttributes<HTMLButtonElement> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
3278
|
-
declare const MenuSelect: React$1.ForwardRefExoticComponent<{
|
|
3279
|
-
/** sets the size of the menu select
|
|
3280
|
-
* @default 'base'
|
|
3281
|
-
*/
|
|
3282
|
-
size?: "xs" | "sm" | "base" | "md" | "lg";
|
|
3283
|
-
children: React.ReactNode;
|
|
3284
|
-
} & HTMLAttributes<HTMLButtonElement> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
3285
|
-
|
|
3286
|
-
type SearchableMenuProps = {
|
|
3287
|
-
/** Note: this is pre-debounced for your handling enjoyment */
|
|
3288
|
-
onSearchTextChanged: (searchTerm: string) => void;
|
|
3289
|
-
/** Shows a no results message when no matching results exist */
|
|
3290
|
-
hasNoResults: boolean | string;
|
|
3291
|
-
/** Disables the search function, i.e. if few menu items exist */
|
|
3292
|
-
disableSearch?: boolean;
|
|
3293
|
-
/** Sets the placeholder in the search input */
|
|
3294
|
-
searchPlaceholder?: string;
|
|
3295
|
-
} & MenuProps;
|
|
3296
|
-
/**
|
|
3297
|
-
* Searchable menu allows searching through its menu items
|
|
3298
|
-
*/
|
|
3299
|
-
declare const SearchableMenu: (props: SearchableMenuProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
3300
|
-
|
|
3301
|
-
interface SelectableMenuItemProps extends PropsWithChildren<Omit<MenuItemProps, 'children'>> {
|
|
3302
|
-
/** whether the menu item is selected */
|
|
3303
|
-
selected: boolean;
|
|
3304
|
-
/** the styles to use for the selectable menu item
|
|
3305
|
-
* @default 'default'
|
|
3306
|
-
*/
|
|
3307
|
-
selectStyles?: 'default' | 'checkbox-select';
|
|
3308
|
-
/** whether the menu item is selectable
|
|
3309
|
-
* @default true
|
|
3310
|
-
*/
|
|
3311
|
-
isSelectable?: boolean;
|
|
3312
|
-
}
|
|
3313
|
-
declare function SelectableMenuItem({ selected, children, selectStyles, isSelectable, ...menuItemProps }: SelectableMenuItemProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
3314
|
-
|
|
3315
3340
|
type ModalProps = {
|
|
3316
3341
|
header?: React__default.ReactNode;
|
|
3317
3342
|
children?: React__default.ReactNode;
|
|
@@ -3712,6 +3737,14 @@ type ParameterLabelsInnerProps = Pick<InputComboBoxProps<LabelOption, true>, 'op
|
|
|
3712
3737
|
onCreateLabel?: (label: string) => void;
|
|
3713
3738
|
/** Override the text displayed on the filter button */
|
|
3714
3739
|
buttonText?: string;
|
|
3740
|
+
/** Override the text displayed on the add button */
|
|
3741
|
+
addButtonText?: string | null;
|
|
3742
|
+
/** the function to call when the quick filter is opened */
|
|
3743
|
+
onOpen?: () => void;
|
|
3744
|
+
/** the function to call when the quick filter is closed */
|
|
3745
|
+
onClose?: () => void;
|
|
3746
|
+
/** The maximum number of labels that can be selected */
|
|
3747
|
+
maxCount?: number;
|
|
3715
3748
|
};
|
|
3716
3749
|
type ParameterLabelsProps = CommonParameterInputProps & ParameterLabelsInnerProps & {
|
|
3717
3750
|
disabled?: boolean;
|
|
@@ -4306,7 +4339,7 @@ type QuickFilterProps = {
|
|
|
4306
4339
|
/** addButtonText to use for the add button
|
|
4307
4340
|
* @default 'Add'
|
|
4308
4341
|
*/
|
|
4309
|
-
addButtonText?: string;
|
|
4342
|
+
addButtonText?: string | null;
|
|
4310
4343
|
/** the css to use for the swatch colors
|
|
4311
4344
|
* @default swatchColors from the Swatch component
|
|
4312
4345
|
*/
|
|
@@ -4350,8 +4383,29 @@ type QuickFilterProps = {
|
|
|
4350
4383
|
maxContainerSize?: string;
|
|
4351
4384
|
/** the icon to display on the left of the quick filter when collapsed */
|
|
4352
4385
|
collapsedIcon?: IconType;
|
|
4386
|
+
/** the function to call when the quick filter is opened */
|
|
4387
|
+
onOpen?: () => void;
|
|
4388
|
+
/** the function to call when the quick filter is closed */
|
|
4389
|
+
onClose?: () => void;
|
|
4390
|
+
/**
|
|
4391
|
+
* Override the Ariakit placement of the dropdown menu.
|
|
4392
|
+
* @default 'bottom-end'
|
|
4393
|
+
*/
|
|
4394
|
+
menuPlacement?: MenuProps['placement'];
|
|
4395
|
+
/**
|
|
4396
|
+
* Override the Ariakit getAnchorRect for custom menu anchor positioning.
|
|
4397
|
+
* Pass `null` to disable the built-in default and use standard Ariakit positioning.
|
|
4398
|
+
* @default Anchors to the container's right edge
|
|
4399
|
+
*/
|
|
4400
|
+
menuGetAnchorRect?: MenuProps['getAnchorRect'] | null;
|
|
4401
|
+
/**
|
|
4402
|
+
* Override the Ariakit updatePosition to control when the menu repositions.
|
|
4403
|
+
* Pass `null` to disable the built-in default (position freezing) and allow normal repositioning.
|
|
4404
|
+
* @default Freezes position after initial placement
|
|
4405
|
+
*/
|
|
4406
|
+
menuUpdatePosition?: MenuProps['updatePosition'] | null;
|
|
4353
4407
|
};
|
|
4354
|
-
declare const QuickFilter: ({ iconLeft, collapsedIcon, buttonText, testId, ariaLabel, children, size, disabled, selectedItems, onSearchTermChanged, addButtonText, onItemRemoved, totalResults, maxMenuHeight, maxCount, containerCss, resultsComponent, hasNoResultsMessage, searchPlaceholderText, maxContainerSize, }: QuickFilterProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
4408
|
+
declare const QuickFilter: ({ iconLeft, collapsedIcon, buttonText, testId, ariaLabel, children, size, disabled, selectedItems, onSearchTermChanged, addButtonText, onItemRemoved, totalResults, maxMenuHeight, maxCount, containerCss, resultsComponent, hasNoResultsMessage, searchPlaceholderText, maxContainerSize, onOpen, onClose, menuPlacement, menuGetAnchorRect, menuUpdatePosition, }: QuickFilterProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
4355
4409
|
|
|
4356
4410
|
type SegmentedControlOption<TValue extends string = string> = {
|
|
4357
4411
|
value: TValue;
|