@baseline-ui/core 0.44.1 → 0.45.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/Acknowledgements.md +45 -3
- package/dist/index.css +1 -1
- package/dist/index.d.mts +206 -97
- package/dist/index.d.ts +206 -97
- package/dist/index.js +13 -7
- package/dist/index.mjs +13 -7
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -328,7 +328,7 @@ interface SingleSelection {
|
|
|
328
328
|
/** The initial selected key in the collection (uncontrolled). */
|
|
329
329
|
defaultSelectedKey?: Key,
|
|
330
330
|
/** Handler that is called when the selection changes. */
|
|
331
|
-
onSelectionChange?: (key: Key) => void
|
|
331
|
+
onSelectionChange?: (key: Key | null) => void
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
type SelectionMode = 'none' | 'single' | 'multiple';
|
|
@@ -567,9 +567,17 @@ interface DroppableCollectionUtilityOptions {
|
|
|
567
567
|
*/
|
|
568
568
|
onItemDrop?: (e: DroppableCollectionOnItemDropEvent) => void,
|
|
569
569
|
/**
|
|
570
|
-
* Handler that is called when items are reordered
|
|
570
|
+
* Handler that is called when items are reordered within the collection.
|
|
571
|
+
* This handler only allows dropping between items, not on items.
|
|
572
|
+
* It does not allow moving items to a different parent item within a tree.
|
|
571
573
|
*/
|
|
572
574
|
onReorder?: (e: DroppableCollectionReorderEvent) => void,
|
|
575
|
+
/**
|
|
576
|
+
* Handler that is called when items are moved within the source collection.
|
|
577
|
+
* This handler allows dropping both on or between items, and items may be
|
|
578
|
+
* moved to a different parent item within a tree.
|
|
579
|
+
*/
|
|
580
|
+
onMove?: (e: DroppableCollectionReorderEvent) => void,
|
|
573
581
|
/**
|
|
574
582
|
* A function returning whether a given target in the droppable collection is a valid "on" drop target for the current drag types.
|
|
575
583
|
*/
|
|
@@ -581,7 +589,6 @@ interface DroppableCollectionBaseProps {
|
|
|
581
589
|
onDropEnter?: (e: DroppableCollectionEnterEvent) => void,
|
|
582
590
|
/**
|
|
583
591
|
* Handler that is called after a valid drag is held over a drop target for a period of time.
|
|
584
|
-
* @private
|
|
585
592
|
*/
|
|
586
593
|
onDropActivate?: (e: DroppableCollectionActivateEvent) => void,
|
|
587
594
|
/** Handler that is called when a valid drag exits a drop target. */
|
|
@@ -1713,6 +1720,8 @@ interface AriaListBoxProps<T> extends AriaListBoxPropsBase<T> {
|
|
|
1713
1720
|
selectionBehavior?: SelectionBehavior,
|
|
1714
1721
|
/** Whether selection should occur on press up instead of press down. */
|
|
1715
1722
|
shouldSelectOnPressUp?: boolean,
|
|
1723
|
+
/** Whether options should be focused when the user hovers over them. */
|
|
1724
|
+
shouldFocusOnHover?: boolean,
|
|
1716
1725
|
/**
|
|
1717
1726
|
* Handler that is called when a user performs an action on an item. The exact user event depends on
|
|
1718
1727
|
* the collection's `selectionBehavior` prop and the interaction modality.
|
|
@@ -1763,8 +1772,6 @@ interface AriaListBoxOptions<T> extends Omit<AriaListBoxProps<T>, 'children'> {
|
|
|
1763
1772
|
* Whether the listbox items should use virtual focus instead of being focused directly.
|
|
1764
1773
|
*/
|
|
1765
1774
|
shouldUseVirtualFocus?: boolean;
|
|
1766
|
-
/** Whether options should be focused when the user hovers over them. */
|
|
1767
|
-
shouldFocusOnHover?: boolean;
|
|
1768
1775
|
/**
|
|
1769
1776
|
* The behavior of links in the collection.
|
|
1770
1777
|
* - 'action': link behaves like onAction.
|
|
@@ -2110,7 +2117,6 @@ interface DropOptions {
|
|
|
2110
2117
|
/**
|
|
2111
2118
|
* Handler that is called after a valid drag is held over the drop target for a period of time.
|
|
2112
2119
|
* This typically opens the item so that the user can drop within it.
|
|
2113
|
-
* @private
|
|
2114
2120
|
*/
|
|
2115
2121
|
onDropActivate?: (e: DropActivateEvent) => void;
|
|
2116
2122
|
/** Handler that is called when a valid drag exits the drop target. */
|
|
@@ -2132,6 +2138,8 @@ interface DroppableCollectionOptions extends DroppableCollectionProps {
|
|
|
2132
2138
|
keyboardDelegate: KeyboardDelegate;
|
|
2133
2139
|
/** A delegate object that provides drop targets for pointer coordinates within the collection. */
|
|
2134
2140
|
dropTargetDelegate: DropTargetDelegate;
|
|
2141
|
+
/** A custom keyboard event handler for drop targets. */
|
|
2142
|
+
onKeyDown?: (e: KeyboardEvent) => void;
|
|
2135
2143
|
}
|
|
2136
2144
|
interface ClipboardProps {
|
|
2137
2145
|
/** A function that returns the items to copy. */
|
|
@@ -2338,7 +2346,7 @@ interface FocusManager {
|
|
|
2338
2346
|
* management interface that can be used to move focus forward and back in response
|
|
2339
2347
|
* to user events.
|
|
2340
2348
|
*/
|
|
2341
|
-
declare function FocusScope(props: FocusScopeProps):
|
|
2349
|
+
declare function FocusScope(props: FocusScopeProps): JSX$2.Element;
|
|
2342
2350
|
/**
|
|
2343
2351
|
* Returns a FocusManager interface for the parent FocusScope.
|
|
2344
2352
|
* A FocusManager can be used to programmatically move focus within
|
|
@@ -2437,6 +2445,20 @@ interface TreeProps<T> extends CollectionStateBase<T>, Expandable, MultipleSelec
|
|
|
2437
2445
|
/** Whether `disabledKeys` applies to all interactions, or only selection. */
|
|
2438
2446
|
disabledBehavior?: DisabledBehavior;
|
|
2439
2447
|
}
|
|
2448
|
+
interface TreeState<T> {
|
|
2449
|
+
/** A collection of items in the tree. */
|
|
2450
|
+
readonly collection: Collection<Node$1<T>>;
|
|
2451
|
+
/** A set of keys for items that are disabled. */
|
|
2452
|
+
readonly disabledKeys: Set<Key>;
|
|
2453
|
+
/** A set of keys for items that are expanded. */
|
|
2454
|
+
readonly expandedKeys: Set<Key>;
|
|
2455
|
+
/** Toggles the expanded state for an item by its key. */
|
|
2456
|
+
toggleKey(key: Key): void;
|
|
2457
|
+
/** Replaces the set of expanded keys. */
|
|
2458
|
+
setExpandedKeys(keys: Set<Key>): void;
|
|
2459
|
+
/** A selection manager to read and update multiple selection state. */
|
|
2460
|
+
readonly selectionManager: SelectionManager;
|
|
2461
|
+
}
|
|
2440
2462
|
|
|
2441
2463
|
interface GridListProps$1<T> extends CollectionBase<T>, MultipleSelection {
|
|
2442
2464
|
/** Whether to auto focus the gridlist or an option. */
|
|
@@ -2852,7 +2874,7 @@ interface AriaTextFieldProps<T = HTMLInputElement> extends TextFieldProps<T>, Ar
|
|
|
2852
2874
|
/** Identifies the element (or elements) whose contents or presence are controlled by the current element. */
|
|
2853
2875
|
'aria-controls'?: string,
|
|
2854
2876
|
/**
|
|
2855
|
-
* An enumerated attribute that defines what action label or icon to preset for the enter key on virtual keyboards. See [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint
|
|
2877
|
+
* An enumerated attribute that defines what action label or icon to preset for the enter key on virtual keyboards. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint).
|
|
2856
2878
|
*/
|
|
2857
2879
|
enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'
|
|
2858
2880
|
}
|
|
@@ -2881,7 +2903,7 @@ interface SearchFieldProps extends TextFieldProps {
|
|
|
2881
2903
|
|
|
2882
2904
|
interface AriaSearchFieldProps extends SearchFieldProps, AriaTextFieldProps {
|
|
2883
2905
|
/**
|
|
2884
|
-
* An enumerated attribute that defines what action label or icon to preset for the enter key on virtual keyboards. See [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint
|
|
2906
|
+
* An enumerated attribute that defines what action label or icon to preset for the enter key on virtual keyboards. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint).
|
|
2885
2907
|
*/
|
|
2886
2908
|
enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'
|
|
2887
2909
|
}
|
|
@@ -2965,12 +2987,14 @@ declare let Item$2: <T>(props: ItemProps$1<T>) => JSX$2.Element;
|
|
|
2965
2987
|
|
|
2966
2988
|
|
|
2967
2989
|
|
|
2968
|
-
interface TabListProps<T> extends CollectionBase<T>, Omit<SingleSelection, 'disallowEmptySelection'> {
|
|
2990
|
+
interface TabListProps<T> extends CollectionBase<T>, Omit<SingleSelection, 'disallowEmptySelection' | 'onSelectionChange'> {
|
|
2969
2991
|
/**
|
|
2970
2992
|
* Whether the TabList is disabled.
|
|
2971
2993
|
* Shows that a selection exists, but is not available in that circumstance.
|
|
2972
2994
|
*/
|
|
2973
|
-
isDisabled?: boolean
|
|
2995
|
+
isDisabled?: boolean,
|
|
2996
|
+
/** Handler that is called when the selection changes. */
|
|
2997
|
+
onSelectionChange?: (key: Key) => void
|
|
2974
2998
|
}
|
|
2975
2999
|
|
|
2976
3000
|
interface AriaTabListBase extends AriaLabelingProps {
|
|
@@ -3048,7 +3072,7 @@ interface AriaTextFieldOptions<T extends TextFieldIntrinsicElements> extends Ari
|
|
|
3048
3072
|
*/
|
|
3049
3073
|
autoCapitalize?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';
|
|
3050
3074
|
/**
|
|
3051
|
-
* An enumerated attribute that defines what action label or icon to preset for the enter key on virtual keyboards. See [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint
|
|
3075
|
+
* An enumerated attribute that defines what action label or icon to preset for the enter key on virtual keyboards. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint).
|
|
3052
3076
|
*/
|
|
3053
3077
|
enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
|
|
3054
3078
|
}
|
|
@@ -3183,7 +3207,7 @@ interface VisuallyHiddenProps extends DOMAttributes {
|
|
|
3183
3207
|
* VisuallyHidden hides its children visually, while keeping content visible
|
|
3184
3208
|
* to screen readers.
|
|
3185
3209
|
*/
|
|
3186
|
-
declare function VisuallyHidden(props: VisuallyHiddenProps):
|
|
3210
|
+
declare function VisuallyHidden(props: VisuallyHiddenProps): JSX$2.Element;
|
|
3187
3211
|
|
|
3188
3212
|
interface ListOptions<T> {
|
|
3189
3213
|
/** Initial items in the list. */
|
|
@@ -3361,6 +3385,18 @@ interface TreeData<T extends object> {
|
|
|
3361
3385
|
* @param index - The index within the new parent to insert at.
|
|
3362
3386
|
*/
|
|
3363
3387
|
move(key: Key, toParentKey: Key | null, index: number): void;
|
|
3388
|
+
/**
|
|
3389
|
+
* Moves one or more items before a given key.
|
|
3390
|
+
* @param key - The key of the item to move the items before.
|
|
3391
|
+
* @param keys - The keys of the items to move.
|
|
3392
|
+
*/
|
|
3393
|
+
moveBefore(key: Key, keys: Iterable<Key>): void;
|
|
3394
|
+
/**
|
|
3395
|
+
* Moves one or more items after a given key.
|
|
3396
|
+
* @param key - The key of the item to move the items after.
|
|
3397
|
+
* @param keys - The keys of the items to move.
|
|
3398
|
+
*/
|
|
3399
|
+
moveAfter(key: Key, keys: Iterable<Key>): void;
|
|
3364
3400
|
/**
|
|
3365
3401
|
* Updates an item in the tree.
|
|
3366
3402
|
* @param key - The key of the item to update.
|
|
@@ -3380,6 +3416,11 @@ interface AriaToolbarProps extends AriaLabelingProps {
|
|
|
3380
3416
|
* @default 'horizontal'
|
|
3381
3417
|
*/
|
|
3382
3418
|
orientation?: Orientation;
|
|
3419
|
+
/**
|
|
3420
|
+
* Allows tabbing through the toolbar's content when false.
|
|
3421
|
+
* @default true
|
|
3422
|
+
*/
|
|
3423
|
+
isSingleTabStop?: boolean;
|
|
3383
3424
|
}
|
|
3384
3425
|
|
|
3385
3426
|
/*
|
|
@@ -19263,6 +19304,31 @@ declare function getOsSpecificKeyboardShortcutLabel(keyboardShortcut: string, us
|
|
|
19263
19304
|
*/
|
|
19264
19305
|
declare const getPlainText: (text: string) => string;
|
|
19265
19306
|
|
|
19307
|
+
/**
|
|
19308
|
+
* Checks whether a given DOM node is inside an iframe.
|
|
19309
|
+
*
|
|
19310
|
+
* This function compares the node's owning document's `defaultView` to
|
|
19311
|
+
* `window.top`. If they're different, the node is inside an iframe. Handles
|
|
19312
|
+
* cross-origin iframes safely using try/catch.
|
|
19313
|
+
*
|
|
19314
|
+
* @param {Node} node - The DOM node to check.
|
|
19315
|
+
* @returns {boolean} `true` if the node is inside an iframe, `false` otherwise.
|
|
19316
|
+
* @see https://stackoverflow.com/a/326076
|
|
19317
|
+
*/
|
|
19318
|
+
declare function isInIframe(el: Node): boolean;
|
|
19319
|
+
|
|
19320
|
+
/**
|
|
19321
|
+
* Checks whether a given node is inside a Shadow DOM.
|
|
19322
|
+
*
|
|
19323
|
+
* This function uses `getRootNode()` to determine if the node's root is a
|
|
19324
|
+
* `ShadowRoot`, which indicates that the node is part of a shadow tree.
|
|
19325
|
+
*
|
|
19326
|
+
* @param {Node} node - The DOM node to check.
|
|
19327
|
+
* @returns {boolean} `true` if the node is inside a Shadow DOM, `false`
|
|
19328
|
+
* otherwise.
|
|
19329
|
+
*/
|
|
19330
|
+
declare function isInShadowDOM(element: Node | null | undefined): boolean;
|
|
19331
|
+
|
|
19266
19332
|
interface ListHandle {
|
|
19267
19333
|
/** Scrolls the listbox to the specified item. */
|
|
19268
19334
|
scrollIntoView: (id: string, options?: ScrollIntoViewOptions) => void;
|
|
@@ -19377,15 +19443,6 @@ interface StylingWithUIState<T = object> {
|
|
|
19377
19443
|
style?: React__default__default.CSSProperties | ((props: UIStateOptions<T>) => React__default__default.CSSProperties);
|
|
19378
19444
|
}
|
|
19379
19445
|
interface ActionButtonSharedProps extends Omit<AriaButtonProps<"button" | "div">, "rel" | "href" | "target" | "children">, Omit<StylingProps, "className" | "style">, StylingWithUIState {
|
|
19380
|
-
/**
|
|
19381
|
-
* There are some cases where we need to use a button that is not interactive.
|
|
19382
|
-
* For example, when we need to use a button inside a TabItem component that
|
|
19383
|
-
* should remove the tab when clicked. Since this button never needs to be
|
|
19384
|
-
* focused directly, we can set this prop to true to avoid the button being
|
|
19385
|
-
* focusable. At the same time we also avoid the [nested element
|
|
19386
|
-
* rule](https://dequeuniversity.com/rules/axe/html/4.6/nested-interactive)
|
|
19387
|
-
*/
|
|
19388
|
-
UNSAFE_NON_INTERACTIVE?: boolean;
|
|
19389
19446
|
}
|
|
19390
19447
|
interface ActionButtonProps extends ActionButtonSharedProps {
|
|
19391
19448
|
/**
|
|
@@ -19406,24 +19463,10 @@ interface ActionButtonProps extends ActionButtonSharedProps {
|
|
|
19406
19463
|
* @default sm
|
|
19407
19464
|
*/
|
|
19408
19465
|
size?: "sm" | "md" | "lg";
|
|
19409
|
-
/** Indicates whether focusing should be prevented on press. */
|
|
19410
|
-
preventFocusOnPress?: boolean;
|
|
19411
19466
|
}
|
|
19412
19467
|
|
|
19413
19468
|
declare const ActionButton: React__default__default.ForwardRefExoticComponent<ActionButtonProps & React__default__default.RefAttributes<HTMLButtonElement>>;
|
|
19414
19469
|
|
|
19415
|
-
interface DomNodeRendererProps extends StylingProps, Omit<PressHookProps, "ref"> {
|
|
19416
|
-
/**
|
|
19417
|
-
* The DOM node to render inside the component. If this is not provided, the
|
|
19418
|
-
* component will render nothing. If this is provided, the component will
|
|
19419
|
-
* render the DOM node inside a `div` component with `display` set to
|
|
19420
|
-
* `contents`.
|
|
19421
|
-
*/
|
|
19422
|
-
node: Node;
|
|
19423
|
-
}
|
|
19424
|
-
|
|
19425
|
-
declare const DomNodeRenderer: React__default__default.ForwardRefExoticComponent<DomNodeRendererProps & React__default__default.RefAttributes<HTMLDivElement>>;
|
|
19426
|
-
|
|
19427
19470
|
interface ModalProps extends OverlayTriggerProps$1 {
|
|
19428
19471
|
/** The contents of the modal. */
|
|
19429
19472
|
children: React__default__default.ReactNode;
|
|
@@ -19572,6 +19615,91 @@ declare const PopoverTrigger: React__default__default.FC<PopoverTriggerProps>;
|
|
|
19572
19615
|
|
|
19573
19616
|
declare const Popover: React__default__default.FC<PopoverProps>;
|
|
19574
19617
|
|
|
19618
|
+
type MenuOption = Omit<ListOption, "description"> & {
|
|
19619
|
+
keyboardShortcut?: string;
|
|
19620
|
+
};
|
|
19621
|
+
type MenuSection = Omit<ListSection, "children"> & {
|
|
19622
|
+
children: MenuOption[];
|
|
19623
|
+
};
|
|
19624
|
+
type MenuItem = MenuOption | MenuSection;
|
|
19625
|
+
type MenuPopoverProps = Pick<PopoverContentProps, "isNonModal" | "placement" | "shouldUpdatePosition" | "shouldFlip" | "boundaryElement" | "crossOffset" | "offset" | "portalContainer">;
|
|
19626
|
+
interface MenuProps extends MenuPopoverProps, MenuTriggerProps, Omit<AriaMenuProps<MenuItem>, "children">, Omit<AriaMenuTriggerProps, "type"> {
|
|
19627
|
+
/** The `className` property assigned to the root element of the component. */
|
|
19628
|
+
className?: string;
|
|
19629
|
+
/** The `className` property assigned to the content element of the component. */
|
|
19630
|
+
contentClassName?: string;
|
|
19631
|
+
/** The `className` property assigned to the item element of the component. */
|
|
19632
|
+
itemClassName?: string;
|
|
19633
|
+
/**
|
|
19634
|
+
* A list of items to render in the menu. Items have the following shape:
|
|
19635
|
+
*
|
|
19636
|
+
* ```ts
|
|
19637
|
+
* export type MenuOption = {
|
|
19638
|
+
* id: string;
|
|
19639
|
+
* label: string;
|
|
19640
|
+
* keyboardShortcut?: string;
|
|
19641
|
+
* icon?: React.FC<IconProps>;
|
|
19642
|
+
* };
|
|
19643
|
+
*
|
|
19644
|
+
* export type MenuSection = {
|
|
19645
|
+
* id: string;
|
|
19646
|
+
* title?: string;
|
|
19647
|
+
* type: "section";
|
|
19648
|
+
* children: MenuOption[];
|
|
19649
|
+
* };
|
|
19650
|
+
*
|
|
19651
|
+
* export type MenuItem = MenuOption | MenuSection;
|
|
19652
|
+
* ```
|
|
19653
|
+
*/
|
|
19654
|
+
items: MenuItem[];
|
|
19655
|
+
/**
|
|
19656
|
+
* A function that renders the trigger element of the component. The default
|
|
19657
|
+
* implementation renders an `ActionButton` component.
|
|
19658
|
+
*
|
|
19659
|
+
* ```tsx
|
|
19660
|
+
* <Menu renderTrigger={({ buttonProps, ref }) => <ActionButton {...buttonProps} label="Label" ref={ref} />
|
|
19661
|
+
* ```
|
|
19662
|
+
*/
|
|
19663
|
+
renderTrigger?: (options: {
|
|
19664
|
+
buttonProps: ActionButtonProps;
|
|
19665
|
+
ref: React__default__default.RefObject<HTMLButtonElement>;
|
|
19666
|
+
}) => React__default__default.ReactNode;
|
|
19667
|
+
/**
|
|
19668
|
+
* The label of the trigger element. This can be a string, a React node, or a
|
|
19669
|
+
* function that accepts a boolean indicating whether the menu is open.
|
|
19670
|
+
*/
|
|
19671
|
+
triggerLabel?: React__default__default.ReactNode | ((isOpen: boolean) => React__default__default.ReactNode);
|
|
19672
|
+
}
|
|
19673
|
+
|
|
19674
|
+
declare const DefaultListOption: React__default__default.ForwardRefExoticComponent<DefaultListOptionProps & React__default__default.RefAttributes<HTMLLIElement>>;
|
|
19675
|
+
interface DefaultListOptionProps {
|
|
19676
|
+
item: Node$1<ListItem | MenuItem>;
|
|
19677
|
+
liProps: React__default__default.ComponentProps<"li">;
|
|
19678
|
+
labelProps: React__default__default.ComponentProps<"span">;
|
|
19679
|
+
isFocusVisible: boolean;
|
|
19680
|
+
isDisabled: boolean;
|
|
19681
|
+
isSelected: boolean;
|
|
19682
|
+
showSelectedIcon?: boolean;
|
|
19683
|
+
description?: string;
|
|
19684
|
+
descriptionProps?: React__default__default.ComponentProps<"span">;
|
|
19685
|
+
selectionMode?: "single" | "multiple";
|
|
19686
|
+
isFocused?: boolean;
|
|
19687
|
+
isPressed?: boolean;
|
|
19688
|
+
_state: ListState<ListItem> | TreeState<MenuItem>;
|
|
19689
|
+
}
|
|
19690
|
+
|
|
19691
|
+
interface DomNodeRendererProps extends StylingProps, Omit<PressHookProps, "ref"> {
|
|
19692
|
+
/**
|
|
19693
|
+
* The DOM node to render inside the component. If this is not provided, the
|
|
19694
|
+
* component will render nothing. If this is provided, the component will
|
|
19695
|
+
* render the DOM node inside a `div` component with `display` set to
|
|
19696
|
+
* `contents`.
|
|
19697
|
+
*/
|
|
19698
|
+
node: Node;
|
|
19699
|
+
}
|
|
19700
|
+
|
|
19701
|
+
declare const DomNodeRenderer: React__default__default.ForwardRefExoticComponent<DomNodeRendererProps & React__default__default.RefAttributes<HTMLDivElement>>;
|
|
19702
|
+
|
|
19575
19703
|
interface TooltipProps extends StylingProps, TooltipTriggerProps, AriaTooltipProps, Omit<AriaPositionProps, "overlayRef" | "targetRef" | "maxHeight" | "isOpen" | "arrowSize"> {
|
|
19576
19704
|
/** The content of the tooltip. */
|
|
19577
19705
|
text?: string;
|
|
@@ -19651,6 +19779,31 @@ interface ActionIconButtonProps extends ActionButtonSharedProps {
|
|
|
19651
19779
|
tooltip?: boolean | Partial<Omit<TooltipProps, "children">>;
|
|
19652
19780
|
/** The drag props to use for drag and drop interactions. */
|
|
19653
19781
|
dragProps?: React__default__default.HTMLAttributes<HTMLElement>;
|
|
19782
|
+
/**
|
|
19783
|
+
* There are some cases where we need to use a button that is not interactive.
|
|
19784
|
+
* For example, when we need to use a visual button inside a TabItem component
|
|
19785
|
+
* that should remove the tab when clicked. Since this button never needs to
|
|
19786
|
+
* be focused directly, we can set this prop to true to avoid the button being
|
|
19787
|
+
* focusable. At the same time we also avoid the [nested element
|
|
19788
|
+
* rule](https://dequeuniversity.com/rules/axe/html/4.6/nested-interactive)
|
|
19789
|
+
*
|
|
19790
|
+
* This is different from `isExcludedFromRovingFocus` because it only affects
|
|
19791
|
+
* because this prop removes the button fully from the accessibility tree and
|
|
19792
|
+
* renders it as a div with no role, aria-label, aria-labelledby,
|
|
19793
|
+
* aria-disabled, etc.
|
|
19794
|
+
*
|
|
19795
|
+
* @default false
|
|
19796
|
+
*/
|
|
19797
|
+
UNSAFE_isVisuallyInteractiveOnly?: boolean;
|
|
19798
|
+
/**
|
|
19799
|
+
* Whether the button is excluded from roving focus. In this case, the button
|
|
19800
|
+
* will not be focusable using keyboard arrow keys but will still have correct
|
|
19801
|
+
* role, aria-label, aria-labelledby, aria-disabled, etc. Avoid using this
|
|
19802
|
+
* prop unless absolutely necessary.
|
|
19803
|
+
*
|
|
19804
|
+
* @default false
|
|
19805
|
+
*/
|
|
19806
|
+
isExcludedFromRovingFocus?: boolean;
|
|
19654
19807
|
}
|
|
19655
19808
|
|
|
19656
19809
|
declare const ActionIconButton: React__default__default.ForwardRefExoticComponent<ActionIconButtonProps & React__default__default.RefAttributes<HTMLButtonElement>>;
|
|
@@ -19808,62 +19961,6 @@ interface PortalContainerProviderProps {
|
|
|
19808
19961
|
|
|
19809
19962
|
declare const PortalContainerProvider: React__default__default.FC<PortalContainerProviderProps>;
|
|
19810
19963
|
|
|
19811
|
-
type MenuOption = Omit<ListOption, "description"> & {
|
|
19812
|
-
keyboardShortcut?: string;
|
|
19813
|
-
};
|
|
19814
|
-
type MenuSection = Omit<ListSection, "children"> & {
|
|
19815
|
-
children: MenuOption[];
|
|
19816
|
-
};
|
|
19817
|
-
type MenuItem = MenuOption | MenuSection;
|
|
19818
|
-
type MenuPopoverProps = Pick<PopoverContentProps, "isNonModal" | "placement" | "shouldUpdatePosition" | "shouldFlip" | "boundaryElement" | "crossOffset" | "offset" | "portalContainer">;
|
|
19819
|
-
interface MenuProps extends MenuPopoverProps, MenuTriggerProps, Omit<AriaMenuProps<MenuItem>, "children">, Omit<AriaMenuTriggerProps, "type"> {
|
|
19820
|
-
/** The `className` property assigned to the root element of the component. */
|
|
19821
|
-
className?: string;
|
|
19822
|
-
/** The `className` property assigned to the content element of the component. */
|
|
19823
|
-
contentClassName?: string;
|
|
19824
|
-
/** The `className` property assigned to the item element of the component. */
|
|
19825
|
-
itemClassName?: string;
|
|
19826
|
-
/**
|
|
19827
|
-
* A list of items to render in the menu. Items have the following shape:
|
|
19828
|
-
*
|
|
19829
|
-
* ```ts
|
|
19830
|
-
* export type MenuOption = {
|
|
19831
|
-
* id: string;
|
|
19832
|
-
* label: string;
|
|
19833
|
-
* keyboardShortcut?: string;
|
|
19834
|
-
* icon?: React.FC<IconProps>;
|
|
19835
|
-
* };
|
|
19836
|
-
*
|
|
19837
|
-
* export type MenuSection = {
|
|
19838
|
-
* id: string;
|
|
19839
|
-
* title?: string;
|
|
19840
|
-
* type: "section";
|
|
19841
|
-
* children: MenuOption[];
|
|
19842
|
-
* };
|
|
19843
|
-
*
|
|
19844
|
-
* export type MenuItem = MenuOption | MenuSection;
|
|
19845
|
-
* ```
|
|
19846
|
-
*/
|
|
19847
|
-
items: MenuItem[];
|
|
19848
|
-
/**
|
|
19849
|
-
* A function that renders the trigger element of the component. The default
|
|
19850
|
-
* implementation renders an `ActionButton` component.
|
|
19851
|
-
*
|
|
19852
|
-
* ```tsx
|
|
19853
|
-
* <Menu renderTrigger={({ buttonProps, ref }) => <ActionButton {...buttonProps} label="Label" ref={ref} />
|
|
19854
|
-
* ```
|
|
19855
|
-
*/
|
|
19856
|
-
renderTrigger?: (options: {
|
|
19857
|
-
buttonProps: ActionButtonProps;
|
|
19858
|
-
ref: React__default__default.RefObject<HTMLButtonElement>;
|
|
19859
|
-
}) => React__default__default.ReactNode;
|
|
19860
|
-
/**
|
|
19861
|
-
* The label of the trigger element. This can be a string, a React node, or a
|
|
19862
|
-
* function that accepts a boolean indicating whether the menu is open.
|
|
19863
|
-
*/
|
|
19864
|
-
triggerLabel?: React__default__default.ReactNode | ((isOpen: boolean) => React__default__default.ReactNode);
|
|
19865
|
-
}
|
|
19866
|
-
|
|
19867
19964
|
declare const Menu: React__default__default.ForwardRefExoticComponent<MenuProps & React__default__default.RefAttributes<HTMLUListElement>>;
|
|
19868
19965
|
|
|
19869
19966
|
interface LinkProps extends AriaLinkOptions, StylingProps {
|
|
@@ -21168,13 +21265,25 @@ interface ToolbarProps extends StylingProps, AriaToolbarProps {
|
|
|
21168
21265
|
*/
|
|
21169
21266
|
collapsibleMenuProps?: Omit<MenuProps, "items" | "onAction" | "placement" | "disabledKeys">;
|
|
21170
21267
|
/**
|
|
21171
|
-
* A
|
|
21172
|
-
* the toolbar buttons and the menu trigger. This prop is only
|
|
21173
|
-
* `isCollapsible` is true.
|
|
21268
|
+
* A boolean indicating whether to render a spacer element in the collapsible
|
|
21269
|
+
* toolbar between the toolbar buttons and the menu trigger. This prop is only
|
|
21270
|
+
* relevant when `isCollapsible` is true.
|
|
21174
21271
|
*/
|
|
21175
21272
|
renderSpacer?: boolean;
|
|
21176
21273
|
/** The callback to call when any key is pressed. */
|
|
21177
21274
|
onKeyDown?: KeyboardProps["onKeyDown"];
|
|
21275
|
+
/**
|
|
21276
|
+
* When set to true, the toolbar will act as a normal toolbar and will not
|
|
21277
|
+
* contain the navigation within it when the user presses tab again.
|
|
21278
|
+
*
|
|
21279
|
+
* When set to false, the toolbar will allow for navigating through all
|
|
21280
|
+
* elements within it if the user presses tab, and move to the next focusable
|
|
21281
|
+
* element outside of the toolbar only after user navigates through all
|
|
21282
|
+
* elements within the toolbar.
|
|
21283
|
+
*
|
|
21284
|
+
* @default true
|
|
21285
|
+
*/
|
|
21286
|
+
isSingleTabStop?: boolean;
|
|
21178
21287
|
}
|
|
21179
21288
|
|
|
21180
21289
|
declare const Toolbar: React__default__default.ForwardRefExoticComponent<ToolbarProps & React__default__default.RefAttributes<HTMLDivElement>>;
|
|
@@ -21496,7 +21605,7 @@ type Dimension = {
|
|
|
21496
21605
|
width: number | "sm" | "md";
|
|
21497
21606
|
aspectRatio: number;
|
|
21498
21607
|
};
|
|
21499
|
-
interface ImageGalleryProps extends StylingProps, Omit<ListBoxProps, "items" | "layout" | "grid" | "renderOption" | "renderDropIndicator" | "renderDragPreview" | "showSelectedIcon" | "orientation" | "shouldSelectOnPressUp" | "shouldFocusOnHover" | "dropIndicatorClassName" | "dropIndicatorStyle" | "shouldUseVirtualFocus" | "getItems" | "acceptedDragTypes" | "sectionClassName" | "sectionStyle"> {
|
|
21608
|
+
interface ImageGalleryProps extends StylingProps, Omit<ListBoxProps, "items" | "layout" | "grid" | "renderOption" | "renderDropIndicator" | "renderDragPreview" | "showSelectedIcon" | "orientation" | "shouldSelectOnPressUp" | "shouldFocusOnHover" | "dropIndicatorClassName" | "dropIndicatorStyle" | "shouldUseVirtualFocus" | "getItems" | "acceptedDragTypes" | "sectionClassName" | "sectionStyle" | "onKeyDown"> {
|
|
21500
21609
|
/**
|
|
21501
21610
|
* An array of objects containing the image source, alt text, and label for
|
|
21502
21611
|
* each image. This property makes the component a controlled component.
|
|
@@ -22689,5 +22798,5 @@ declare namespace reactStately {
|
|
|
22689
22798
|
export type { Color };
|
|
22690
22799
|
}
|
|
22691
22800
|
|
|
22692
|
-
export { Accordion, AccordionItem, ActionButton, ActionGroup, ActionGroupItem, ActionIconButton, AlertDialog, AudioPlayer, Avatar, Box, ButtonSelect, Checkbox, ColorInput, ColorSwatch, ColorSwatchPicker, ComboBox, DateField, DateFormat, DeviceProvider, DeviceProviderContext, Dialog, DialogTitle, DomNodeRenderer, Drawer, Editor, FileUpload, FocusScope, Focusable, FrameProvider, FreehandCanvas, GlobalToastRegion, GridList, Group, I18nProvider, Icon, IconColorInput, IconColorInputButton, IconSelect, IconSlider, ImageDropZone, ImageGallery, InlineAlert, Link, ListBox, Markdown, Menu, MessageFormat, Modal, ModalClose, ModalContent, ModalTrigger, MotionGlobalConfig, NumberFormat, NumberInput, Pagination, Panel, PanelGroup, PanelResizeHandle, PointPicker, PointPickerContent, PointPickerDisplay, PointsVisualiser, Popover, PopoverContent, PopoverTrigger, Portal, PortalContainerProvider, Pressable, Preview, ProgressBar, ProgressSpinner, RadioGroup, Reaction, ScrollControlButton, SearchInput, Select, Separator, Slider, Switch, TabItem, Tabs, TagGroup, TaggedPagination, Text, TextInput, ThemeProvider, TimeField, ToastQueue, ToggleButton, ToggleIconButton, Toolbar, Tooltip, Transform, TreeView, reactAria as UNSAFE_aria, reactStately as UNSAFE_stately, VisuallyHidden, announce, calculateFontSizeToFitWidth, classNames, cleanKeyFromGlobImport, clearAnnouncer, defineMessages, destroyAnnouncer, directionVar, disableAnimations, enableAnimations, filterDOMProps, filterTruthyValues, findFocusableElements, getAbsoluteBounds, getAbsolutePosition, getActiveElement, getHTMLElement, getOsSpecificKeyboardShortcutLabel, getOwnerDocument, getPlainText, getSvgPathFromStroke, getTextDimensions, invariant, isFocusableElement, isInputThatOpensKeyboard, isInsideOverlayContent, isRect, isUrl, lightenColor, mergeProps, mergeRefs, parseColor, useCollator, useDateFormatter, useDevice, useFocusRing, useFocusVisible, useI18n, useId, useImage, useInteractionModality, useIntersectionObserver, useIsFirstRender, useKeyboard, useLiveInteractionModality, useLocalStorage, useLocale, useMutationObserver, useNumberFormatter, useObjectRef, usePointProximity, usePortalContainer, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
|
|
22801
|
+
export { Accordion, AccordionItem, ActionButton, ActionGroup, ActionGroupItem, ActionIconButton, AlertDialog, AudioPlayer, Avatar, Box, ButtonSelect, Checkbox, ColorInput, ColorSwatch, ColorSwatchPicker, ComboBox, DateField, DateFormat, DefaultListOption, DeviceProvider, DeviceProviderContext, Dialog, DialogTitle, DomNodeRenderer, Drawer, Editor, FileUpload, FocusScope, Focusable, FrameProvider, FreehandCanvas, GlobalToastRegion, GridList, Group, I18nProvider, Icon, IconColorInput, IconColorInputButton, IconSelect, IconSlider, ImageDropZone, ImageGallery, InlineAlert, Link, ListBox, Markdown, Menu, MessageFormat, Modal, ModalClose, ModalContent, ModalTrigger, MotionGlobalConfig, NumberFormat, NumberInput, Pagination, Panel, PanelGroup, PanelResizeHandle, PointPicker, PointPickerContent, PointPickerDisplay, PointsVisualiser, Popover, PopoverContent, PopoverTrigger, Portal, PortalContainerProvider, Pressable, Preview, ProgressBar, ProgressSpinner, RadioGroup, Reaction, ScrollControlButton, SearchInput, Select, Separator, Slider, Switch, TabItem, Tabs, TagGroup, TaggedPagination, Text, TextInput, ThemeProvider, TimeField, ToastQueue, ToggleButton, ToggleIconButton, Toolbar, Tooltip, Transform, TreeView, reactAria as UNSAFE_aria, reactStately as UNSAFE_stately, VisuallyHidden, announce, calculateFontSizeToFitWidth, classNames, cleanKeyFromGlobImport, clearAnnouncer, defineMessages, destroyAnnouncer, directionVar, disableAnimations, enableAnimations, filterDOMProps, filterTruthyValues, findFocusableElements, getAbsoluteBounds, getAbsolutePosition, getActiveElement, getHTMLElement, getOsSpecificKeyboardShortcutLabel, getOwnerDocument, getPlainText, getSvgPathFromStroke, getTextDimensions, invariant, isFocusableElement, isInIframe, isInShadowDOM, isInputThatOpensKeyboard, isInsideOverlayContent, isRect, isUrl, lightenColor, mergeProps, mergeRefs, parseColor, useCollator, useDateFormatter, useDevice, useFocusRing, useFocusVisible, useI18n, useId, useImage, useInteractionModality, useIntersectionObserver, useIsFirstRender, useKeyboard, useLiveInteractionModality, useLocalStorage, useLocale, useMutationObserver, useNumberFormatter, useObjectRef, usePointProximity, usePortalContainer, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
|
|
22693
22802
|
export type { AccordionItemProps, AccordionProps, ActionButtonProps, ActionGroupProps, ActionIconButtonProps, AlertDialogProps, Assertiveness, AudioPlayerProps, AvatarProps, BlockProps, BoxProps, ButtonSelectProps, CheckboxProps, ColorInputProps, ColorPreset, ColorSwatchPickerProps, ColorSwatchProps, ComboBoxProps, DateFieldProps, DateFormatProps, Device, DeviceProviderProps, DialogProps, DialogTitleProps, DomNodeRendererProps, DrawerProps, EditorHandle, EditorProps, FileUploadProps, FocusableProps, FrameProviderProps, FreehandCanvasProps, GridListProps, GroupProps, I18nProviderProps, I18nResult, IconColorInputProps, IconComponentProps$1 as IconComponentProps, IconProps, IconSelectProps, IconSliderProps, ImageDropZoneProps, ImageGalleryProps, ImperativePanelGroupHandle, ImperativePanelHandle, InlineAlertProps, Key, LinkProps, ListBoxProps, ListHandle, ListOption, MarkdownProps, MenuItem, MenuProps, Message, MessageDescriptor, MessageFormatProps, MessageFormatter, ModalContentProps, ModalProps, NumberFormatProps, NumberInputProps, PaginationProps, PanelGroupProps, PanelProps, PanelResizeHandleProps, PointPickerContentProps, PointPickerDisplayProps, PointPickerProps, PointsVisualiserProps, PopoverContentProps, PopoverProps, PopoverTriggerProps, PortalProps, PressEvent, PreviewProps, ProgressBarProps, ProgressSpinnerProps, RadioGroupProps, ReactComplexTreeItem, ReactionProps, Rect, SVGRProps, ScrollControlButtonProps, SearchInputProps, SelectProps, SeparatorProps, SliderProps, StylingProps, SwitchProps, TabItemProps, TabsProps, TagGroupProps, TaggedPaginationProps, TextInputProps, TextProps, ThemeProviderProps, TimeFieldProps, ToastProps, ToggleButtonProps, ToggleIconButtonProps, ToolbarProps, TooltipProps, TransformProps, TreeViewProps };
|