@baseline-ui/core 0.31.1 → 0.33.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 +129 -29
- package/dist/index.css +1 -1
- package/dist/index.d.mts +32 -14
- package/dist/index.d.ts +32 -14
- package/dist/index.js +95 -94
- package/dist/index.mjs +14 -14
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ import { IconProps, SVGRProps } from '@baseline-ui/icons';
|
|
|
4
4
|
import * as react_stately from 'react-stately';
|
|
5
5
|
import { DraggableCollectionStateOptions, DroppableCollectionStateOptions, Orientation, ListState, OverlayTriggerProps, OverlayTriggerState, TooltipTriggerProps, SliderStateOptions, ToggleProps, MenuTriggerProps, NumberFieldStateOptions, ListProps, SelectStateOptions, Item as Item$2, Selection as Selection$1, ComboBoxStateOptions, Node as Node$2, TreeProps } from 'react-stately';
|
|
6
6
|
import * as react_aria from 'react-aria';
|
|
7
|
-
import { DraggableCollectionOptions, DroppableCollectionOptions, AriaListBoxProps, AriaListBoxOptions, OptionAria, AriaButtonProps, AriaPopoverProps, useOverlayTrigger, AriaTooltipProps, AriaPositionProps, AriaSliderProps, AriaSwitchProps, AriaSearchFieldProps, AriaMenuProps, AriaMenuTriggerProps, AriaLinkOptions, SeparatorProps as SeparatorProps$1, AriaProgressBarProps, AriaTextFieldProps, OverlayProps, AriaToggleButtonProps, AriaCheckboxProps, AriaNumberFieldProps, I18nProviderProps as I18nProviderProps$1, LocalizedStrings, useNumberFormatter, useDateFormatter, AriaTagGroupProps, AriaSelectOptions, Key as Key$1, AriaDialogProps, DropOptions, ClipboardProps, PressProps, AriaRadioGroupProps, AriaModalOverlayProps, AriaComboBoxOptions, AriaComboBoxProps, AriaGridListOptions, GridListItemAria, Locale } from 'react-aria';
|
|
7
|
+
import { DraggableCollectionOptions, DroppableCollectionOptions, AriaListBoxProps, AriaListBoxOptions, OptionAria, AriaButtonProps, AriaPopoverProps, useOverlayTrigger, AriaTooltipProps, AriaPositionProps, FocusableOptions, AriaSliderProps, AriaSwitchProps, AriaSearchFieldProps, AriaMenuProps, AriaMenuTriggerProps, AriaLinkOptions, SeparatorProps as SeparatorProps$1, AriaProgressBarProps, AriaTextFieldProps, OverlayProps, AriaToggleButtonProps, AriaCheckboxProps, AriaNumberFieldProps, I18nProviderProps as I18nProviderProps$1, LocalizedStrings, useNumberFormatter, useDateFormatter, AriaTagGroupProps, AriaSelectOptions, Key as Key$1, AriaDialogProps, DropOptions, ClipboardProps, PressProps, AriaRadioGroupProps, AriaModalOverlayProps, AriaComboBoxOptions, AriaComboBoxProps, AriaGridListOptions, GridListItemAria, Locale } from 'react-aria';
|
|
8
8
|
export { I18nProviderProps, useCollator, useDateFormatter, useNumberFormatter } from 'react-aria';
|
|
9
|
-
import { Node as Node$1, DragItem, DOMAttributes, AriaLabelingProps, AriaValidationProps, DOMProps } from '@react-types/shared';
|
|
9
|
+
import { Node as Node$1, DragItem, FocusableElement, DOMAttributes, AriaLabelingProps, AriaValidationProps, DOMProps } from '@react-types/shared';
|
|
10
10
|
import { PressHookProps, KeyboardProps } from '@react-aria/interactions';
|
|
11
11
|
import { Theme, Sprinkles } from '@baseline-ui/tokens';
|
|
12
12
|
import { AriaTabListProps } from '@react-types/tabs';
|
|
@@ -104,8 +104,11 @@ declare function isInsideOverlayContent(selector: HTMLElement): Element | null;
|
|
|
104
104
|
*/
|
|
105
105
|
declare function isRect(rect: Rect): rect is Rect;
|
|
106
106
|
|
|
107
|
-
interface
|
|
107
|
+
interface ListHandle {
|
|
108
|
+
/** Scrolls the listbox to the specified item. */
|
|
108
109
|
scrollIntoView: (id: string, options?: ScrollIntoViewOptions) => void;
|
|
110
|
+
/** Imperatively focuses the specified key */
|
|
111
|
+
setFocusedKey: (key: string) => void;
|
|
109
112
|
}
|
|
110
113
|
interface ListBoxProps extends StylingProps, Omit<AriaListBoxProps<ListItem> & AriaListBoxOptions<ListItem>, "children" | "linkBehavior" | "isVirtualized" | "keyboardDelegate" | "items">, Omit<DragAndDropProps, "preview" | "enableReorder" | "orientation" | "layout">, Partial<Pick<DragAndDropProps, "enableReorder" | "orientation" | "layout">> {
|
|
111
114
|
/**
|
|
@@ -189,7 +192,7 @@ interface ListBoxProps extends StylingProps, Omit<AriaListBoxProps<ListItem> & A
|
|
|
189
192
|
*/
|
|
190
193
|
withSectionHeaderPadding?: boolean;
|
|
191
194
|
/** Handle to access the listbox methods. */
|
|
192
|
-
listBoxHandle?: React__default.RefObject<
|
|
195
|
+
listBoxHandle?: React__default.RefObject<ListHandle>;
|
|
193
196
|
}
|
|
194
197
|
|
|
195
198
|
declare const ListBox: React__default.ForwardRefExoticComponent<ListBoxProps & React__default.RefAttributes<HTMLUListElement>>;
|
|
@@ -353,9 +356,21 @@ interface TooltipProps extends StylingProps, TooltipTriggerProps, AriaTooltipPro
|
|
|
353
356
|
*/
|
|
354
357
|
portalContainer?: HTMLElement;
|
|
355
358
|
}
|
|
359
|
+
interface FocusableProps extends FocusableOptions, StylingProps {
|
|
360
|
+
/** The content of the focusable element. */
|
|
361
|
+
children: React__default.ReactNode;
|
|
362
|
+
/**
|
|
363
|
+
* The element type to render.
|
|
364
|
+
*
|
|
365
|
+
* @default "div"
|
|
366
|
+
*/
|
|
367
|
+
elementType?: keyof React__default.ReactHTML;
|
|
368
|
+
}
|
|
356
369
|
|
|
357
370
|
declare const Tooltip: React__default.ForwardRefExoticComponent<TooltipProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
358
371
|
|
|
372
|
+
declare const Focusable: React__default.ForwardRefExoticComponent<FocusableProps & React__default.RefAttributes<FocusableElement>>;
|
|
373
|
+
|
|
359
374
|
interface IconComponentProps {
|
|
360
375
|
/** The icon to show at the start of the color input. */
|
|
361
376
|
icon?: React__default.FC<IconProps>;
|
|
@@ -2419,6 +2434,8 @@ interface ComboBoxProps extends StylingProps, Omit<AriaComboBoxOptions<ListItem>
|
|
|
2419
2434
|
* is set to `number`.
|
|
2420
2435
|
*/
|
|
2421
2436
|
maxValue?: number;
|
|
2437
|
+
/** Listener to call when the input value is submitted */
|
|
2438
|
+
onInputSubmit?: (value: string) => void;
|
|
2422
2439
|
}
|
|
2423
2440
|
|
|
2424
2441
|
declare const ComboBox: React__default.ForwardRefExoticComponent<ComboBoxProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
@@ -2438,16 +2455,17 @@ interface ColorSwatchProps extends Omit<AriaColorSwatchProps, "colorName">, Styl
|
|
|
2438
2455
|
* disabled styles.
|
|
2439
2456
|
*/
|
|
2440
2457
|
isDisabled?: boolean;
|
|
2458
|
+
/**
|
|
2459
|
+
* Whether to show a tooltip. You can pass a boolean or a partial tooltip
|
|
2460
|
+
* object that extends the default tooltip props.
|
|
2461
|
+
*
|
|
2462
|
+
* @default false
|
|
2463
|
+
*/
|
|
2464
|
+
tooltip?: boolean | Partial<Omit<TooltipProps, "children">>;
|
|
2441
2465
|
}
|
|
2442
2466
|
|
|
2443
2467
|
declare const ColorSwatch: React__default.ForwardRefExoticComponent<ColorSwatchProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
2444
2468
|
|
|
2445
|
-
interface GridListHandle {
|
|
2446
|
-
/** Sets the selection manager focus state */
|
|
2447
|
-
setFocused: (value: boolean) => void;
|
|
2448
|
-
/** Imperatively focuses the specified key */
|
|
2449
|
-
setFocusedKey: (key: Key$1) => void;
|
|
2450
|
-
}
|
|
2451
2469
|
declare type GridListProps = Omit<StylingProps & ListProps<ListOption> & AriaGridListOptions<ListOption> & {
|
|
2452
2470
|
/**
|
|
2453
2471
|
* The items to render in the grid list. Items have the following shape:
|
|
@@ -2510,7 +2528,7 @@ declare type GridListProps = Omit<StylingProps & ListProps<ListOption> & AriaGri
|
|
|
2510
2528
|
*/
|
|
2511
2529
|
isEditing?: boolean;
|
|
2512
2530
|
/** Handle to access the gridlist imperative methods. */
|
|
2513
|
-
gridListHandle?: React__default.RefObject<
|
|
2531
|
+
gridListHandle?: React__default.RefObject<ListHandle>;
|
|
2514
2532
|
}, "children" | "suppressTextValueWarning" | "allowDuplicateSelectionEvents" | "linkBehavior" | "keyboardDelegate" | "isVirtualized" | "filter">;
|
|
2515
2533
|
|
|
2516
2534
|
declare const GridList: React__default.ForwardRefExoticComponent<GridListProps & React__default.RefAttributes<HTMLUListElement>>;
|
|
@@ -2557,7 +2575,7 @@ interface ActionGroupItemProps extends Pick<ActionGroupProps, "tooltipProps" | "
|
|
|
2557
2575
|
state: ListState<ListItem>;
|
|
2558
2576
|
}
|
|
2559
2577
|
|
|
2560
|
-
interface ColorSwatchPickerProps extends StylingProps, Pick<RadioGroupProps, "optionsContainerClassName" | "labelPosition">, Pick<ListBoxProps, "optionClassName" | "optionStyle">, AriaLabelingProps {
|
|
2578
|
+
interface ColorSwatchPickerProps extends StylingProps, Pick<RadioGroupProps, "optionsContainerClassName" | "labelPosition">, Pick<ListBoxProps, "optionClassName" | "optionStyle" | "shouldFocusWrap">, AriaLabelingProps {
|
|
2561
2579
|
/**
|
|
2562
2580
|
* The items to display in the picker. Each item should have a `color` and a
|
|
2563
2581
|
* `label`.
|
|
@@ -2580,7 +2598,7 @@ interface ColorSwatchPickerProps extends StylingProps, Pick<RadioGroupProps, "op
|
|
|
2580
2598
|
*/
|
|
2581
2599
|
value?: string;
|
|
2582
2600
|
/** A function that is called when the selected item changes. */
|
|
2583
|
-
onChange?: (value
|
|
2601
|
+
onChange?: (value?: string) => void;
|
|
2584
2602
|
/** The default value of the picker. */
|
|
2585
2603
|
defaultValue?: string;
|
|
2586
2604
|
/** The label for the picker. */
|
|
@@ -3106,4 +3124,4 @@ declare type Device = ReturnType<typeof useDevice>;
|
|
|
3106
3124
|
*/
|
|
3107
3125
|
declare function usePortalContainer(_portalContainer?: HTMLElement): HTMLElement | undefined;
|
|
3108
3126
|
|
|
3109
|
-
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionGroup, ActionGroupItem, type ActionGroupProps, ActionIconButton, type ActionIconButtonProps, AlertDialog, type AlertDialogProps, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, ButtonSelect, type ButtonSelectProps, Checkbox, type CheckboxProps, ColorInput, type ColorInputProps, type ColorPreset, ColorSwatch, ColorSwatchPicker, type ColorSwatchPickerProps, type ColorSwatchProps, ComboBox, type ComboBoxProps, DateFormat, type DateFormatProps, type Device, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, DomNodeRenderer, type DomNodeRendererProps, Drawer, type DrawerProps, Editor, type EditorHandle, type EditorProps, FileUpload, type FileUploadProps,
|
|
3127
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionGroup, ActionGroupItem, type ActionGroupProps, ActionIconButton, type ActionIconButtonProps, AlertDialog, type AlertDialogProps, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, ButtonSelect, type ButtonSelectProps, Checkbox, type CheckboxProps, ColorInput, type ColorInputProps, type ColorPreset, ColorSwatch, ColorSwatchPicker, type ColorSwatchPickerProps, type ColorSwatchProps, ComboBox, type ComboBoxProps, DateFormat, type DateFormatProps, type Device, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, DomNodeRenderer, type DomNodeRendererProps, Drawer, type DrawerProps, Editor, type EditorHandle, type EditorProps, FileUpload, type FileUploadProps, Focusable, type FocusableProps, FreehandCanvas, type FreehandCanvasProps, GridList, type GridListProps, Group, type GroupProps, I18nProvider, type I18nResult, IconColorInput, IconColorInputButton, type IconColorInputProps, IconSelect, type IconSelectProps, IconSlider, type IconSliderProps, ImageDropZone, type ImageDropZoneProps, ImageGallery, type ImageGalleryProps, type ImperativePanelGroupHandle, type ImperativePanelHandle, InlineAlert, type InlineAlertProps, Link, type LinkProps, ListBox, type ListBoxProps, type ListHandle, type ListOption, Markdown, type MarkdownProps, Menu, type MenuItem, type MenuProps, type MessageDescriptor, MessageFormat, type MessageFormatProps, Modal, ModalClose, ModalContent, type ModalContentProps, type ModalProps, ModalTrigger, NumberFormat, type NumberFormatProps, NumberInput, type NumberInputProps, Pagination, type PaginationProps, Panel, PanelGroup, type PanelGroupProps, type PanelProps, PanelResizeHandle, type PanelResizeHandleProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, PortalContainerProvider, type PortalProps, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, type ReactComplexTreeItem, Reaction, type ReactionProps, type Rect, ScrollControlButton, type ScrollControlButtonProps, SearchInput, type SearchInputProps, Select, type SelectProps, Separator, type SeparatorProps, Slider, type SliderProps, type StylingProps, Switch, type SwitchProps, TabItem, type TabItemProps, Tabs, type TabsProps, TagGroup, type TagGroupProps, Text, TextInput, type TextInputProps, type TextProps, ThemeProvider, type ThemeProviderProps, ToggleButton, type ToggleButtonProps, ToggleIconButton, type ToggleIconButtonProps, Toolbar, type ToolbarProps, Tooltip, type TooltipProps, Transform, type TransformProps, Transition, type TransitionProps, TreeView, type TreeViewProps, defineMessages, isInsideOverlayContent, isRect, useDevice, useI18n, useImage, useIntersectionObserver, useIsFirstRender, useLocalStorage, useMutationObserver, usePortalContainer, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
|