@baseline-ui/core 0.15.0 → 0.16.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/index.d.mts +31 -5
- package/dist/index.d.ts +31 -5
- package/dist/index.js +83 -81
- package/dist/index.mjs +7 -7
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -263,6 +263,20 @@ declare function useUserPreferences(ownerWindow?: Window & typeof globalThis): {
|
|
|
263
263
|
transparency: boolean;
|
|
264
264
|
};
|
|
265
265
|
|
|
266
|
+
interface PortalContainerProviderProps {
|
|
267
|
+
/**
|
|
268
|
+
* The container element for the popover. By default, the modal is rendered as
|
|
269
|
+
* a child of the body element.
|
|
270
|
+
*
|
|
271
|
+
* @default undefined
|
|
272
|
+
*/
|
|
273
|
+
portalContainer: HTMLElement | undefined;
|
|
274
|
+
/** The children to render. */
|
|
275
|
+
children: React.ReactNode;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
declare const PortalContainerProvider: React.FC<PortalContainerProviderProps>;
|
|
279
|
+
|
|
266
280
|
declare type OverlayTriggerProps_ = Parameters<typeof useOverlayTrigger>[0];
|
|
267
281
|
interface PopoverProps extends OverlayTriggerProps, OverlayTriggerProps_ {
|
|
268
282
|
/** The children of the popover. */
|
|
@@ -279,8 +293,8 @@ interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "tri
|
|
|
279
293
|
/** The contents of the popover. */
|
|
280
294
|
children: React.ReactNode;
|
|
281
295
|
/**
|
|
282
|
-
* The container element for the
|
|
283
|
-
* child of the body element.
|
|
296
|
+
* The container element for the popover. By default, the modal is rendered as
|
|
297
|
+
* a child of the body element.
|
|
284
298
|
*
|
|
285
299
|
* @default document.body
|
|
286
300
|
*/
|
|
@@ -314,7 +328,7 @@ declare type MenuSection = Omit<ListSection, "children"> & {
|
|
|
314
328
|
children: MenuOption[];
|
|
315
329
|
};
|
|
316
330
|
declare type MenuItem = MenuOption | MenuSection;
|
|
317
|
-
declare type MenuPopoverProps = Pick<PopoverContentProps, "isNonModal" | "placement" | "shouldUpdatePosition" | "shouldFlip" | "boundaryElement" | "crossOffset" | "offset">;
|
|
331
|
+
declare type MenuPopoverProps = Pick<PopoverContentProps, "isNonModal" | "placement" | "shouldUpdatePosition" | "shouldFlip" | "boundaryElement" | "crossOffset" | "offset" | "portalContainer">;
|
|
318
332
|
interface MenuProps extends MenuPopoverProps, MenuTriggerProps, Omit<AriaMenuProps<MenuItem>, "children">, Omit<AriaMenuTriggerProps, "type"> {
|
|
319
333
|
/** The `className` property assigned to the root element of the component. */
|
|
320
334
|
className?: string;
|
|
@@ -973,7 +987,7 @@ interface ColorPreset {
|
|
|
973
987
|
label: string;
|
|
974
988
|
color: string;
|
|
975
989
|
}
|
|
976
|
-
interface ColorInputProps extends OverlayTriggerProps, StylingProps, Pick<ColorFieldProps, "onChange" | "defaultValue" | "value" | "label" | "isDisabled">, Pick<AriaLabelingProps, "aria-label">, Pick<PopoverContentProps, "isNonModal" | "placement" | "shouldUpdatePosition" | "shouldFlip" | "boundaryElement" | "crossOffset" | "offset"> {
|
|
990
|
+
interface ColorInputProps extends OverlayTriggerProps, StylingProps, Pick<ColorFieldProps, "onChange" | "defaultValue" | "value" | "label" | "isDisabled">, Pick<AriaLabelingProps, "aria-label">, Pick<PopoverContentProps, "isNonModal" | "placement" | "shouldUpdatePosition" | "shouldFlip" | "boundaryElement" | "crossOffset" | "offset" | "portalContainer"> {
|
|
977
991
|
/**
|
|
978
992
|
* The list of color presets to show in the color picker. The signature of the
|
|
979
993
|
* color presets is:
|
|
@@ -2230,4 +2244,16 @@ interface TextSelectionProps {
|
|
|
2230
2244
|
*/
|
|
2231
2245
|
declare function useDevice(element?: Element | null | undefined): "tablet" | "desktop" | "mobile";
|
|
2232
2246
|
|
|
2233
|
-
|
|
2247
|
+
/**
|
|
2248
|
+
* Custom hook for accessing PortalContainerProviderContext. This hook allows
|
|
2249
|
+
* components to either use a specified portal container or fallback to a
|
|
2250
|
+
* default provided via context.
|
|
2251
|
+
*
|
|
2252
|
+
* @param _portalContainer - An optional HTML element that can be specified as
|
|
2253
|
+
* an override.
|
|
2254
|
+
* @returns The portal container element where components should be rendered,
|
|
2255
|
+
* either the overridden container, one from context or undefined.
|
|
2256
|
+
*/
|
|
2257
|
+
declare function usePortalContainer(_portalContainer?: HTMLElement): HTMLElement | undefined;
|
|
2258
|
+
|
|
2259
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionIconButton, type ActionIconButtonProps, AlertDialog, type AlertDialogProps, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, Checkbox, type CheckboxProps, ColorInput, type ColorInputProps, type ColorPreset, ColorPresetInlineInput, type ColorPresetInlineInputProps, ColorSwatch, type ColorSwatchProps, DateFormat, type DateFormatProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, DomNodeRenderer, type DomNodeRendererProps, Drawer, type DrawerProps, Editor, type EditorHandle, type EditorProps, FileUpload, type FileUploadProps, FreehandCanvas, type FreehandCanvasProps, Group, type GroupProps, I18nProvider, type I18nResult, IconColorInputButton, ImageDropZone, type ImageDropZoneProps, InlineAlert, type InlineAlertProps, Link, type LinkProps, ListBox, type ListBoxProps, 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, 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, Reaction, type ReactionProps, 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, defineMessages, useDevice, useI18n, useImage, useIntersectionObserver, useIsFirstRender, useLocalStorage, useMutationObserver, usePortalContainer, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
|
package/dist/index.d.ts
CHANGED
|
@@ -263,6 +263,20 @@ declare function useUserPreferences(ownerWindow?: Window & typeof globalThis): {
|
|
|
263
263
|
transparency: boolean;
|
|
264
264
|
};
|
|
265
265
|
|
|
266
|
+
interface PortalContainerProviderProps {
|
|
267
|
+
/**
|
|
268
|
+
* The container element for the popover. By default, the modal is rendered as
|
|
269
|
+
* a child of the body element.
|
|
270
|
+
*
|
|
271
|
+
* @default undefined
|
|
272
|
+
*/
|
|
273
|
+
portalContainer: HTMLElement | undefined;
|
|
274
|
+
/** The children to render. */
|
|
275
|
+
children: React.ReactNode;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
declare const PortalContainerProvider: React.FC<PortalContainerProviderProps>;
|
|
279
|
+
|
|
266
280
|
declare type OverlayTriggerProps_ = Parameters<typeof useOverlayTrigger>[0];
|
|
267
281
|
interface PopoverProps extends OverlayTriggerProps, OverlayTriggerProps_ {
|
|
268
282
|
/** The children of the popover. */
|
|
@@ -279,8 +293,8 @@ interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "tri
|
|
|
279
293
|
/** The contents of the popover. */
|
|
280
294
|
children: React.ReactNode;
|
|
281
295
|
/**
|
|
282
|
-
* The container element for the
|
|
283
|
-
* child of the body element.
|
|
296
|
+
* The container element for the popover. By default, the modal is rendered as
|
|
297
|
+
* a child of the body element.
|
|
284
298
|
*
|
|
285
299
|
* @default document.body
|
|
286
300
|
*/
|
|
@@ -314,7 +328,7 @@ declare type MenuSection = Omit<ListSection, "children"> & {
|
|
|
314
328
|
children: MenuOption[];
|
|
315
329
|
};
|
|
316
330
|
declare type MenuItem = MenuOption | MenuSection;
|
|
317
|
-
declare type MenuPopoverProps = Pick<PopoverContentProps, "isNonModal" | "placement" | "shouldUpdatePosition" | "shouldFlip" | "boundaryElement" | "crossOffset" | "offset">;
|
|
331
|
+
declare type MenuPopoverProps = Pick<PopoverContentProps, "isNonModal" | "placement" | "shouldUpdatePosition" | "shouldFlip" | "boundaryElement" | "crossOffset" | "offset" | "portalContainer">;
|
|
318
332
|
interface MenuProps extends MenuPopoverProps, MenuTriggerProps, Omit<AriaMenuProps<MenuItem>, "children">, Omit<AriaMenuTriggerProps, "type"> {
|
|
319
333
|
/** The `className` property assigned to the root element of the component. */
|
|
320
334
|
className?: string;
|
|
@@ -973,7 +987,7 @@ interface ColorPreset {
|
|
|
973
987
|
label: string;
|
|
974
988
|
color: string;
|
|
975
989
|
}
|
|
976
|
-
interface ColorInputProps extends OverlayTriggerProps, StylingProps, Pick<ColorFieldProps, "onChange" | "defaultValue" | "value" | "label" | "isDisabled">, Pick<AriaLabelingProps, "aria-label">, Pick<PopoverContentProps, "isNonModal" | "placement" | "shouldUpdatePosition" | "shouldFlip" | "boundaryElement" | "crossOffset" | "offset"> {
|
|
990
|
+
interface ColorInputProps extends OverlayTriggerProps, StylingProps, Pick<ColorFieldProps, "onChange" | "defaultValue" | "value" | "label" | "isDisabled">, Pick<AriaLabelingProps, "aria-label">, Pick<PopoverContentProps, "isNonModal" | "placement" | "shouldUpdatePosition" | "shouldFlip" | "boundaryElement" | "crossOffset" | "offset" | "portalContainer"> {
|
|
977
991
|
/**
|
|
978
992
|
* The list of color presets to show in the color picker. The signature of the
|
|
979
993
|
* color presets is:
|
|
@@ -2230,4 +2244,16 @@ interface TextSelectionProps {
|
|
|
2230
2244
|
*/
|
|
2231
2245
|
declare function useDevice(element?: Element | null | undefined): "tablet" | "desktop" | "mobile";
|
|
2232
2246
|
|
|
2233
|
-
|
|
2247
|
+
/**
|
|
2248
|
+
* Custom hook for accessing PortalContainerProviderContext. This hook allows
|
|
2249
|
+
* components to either use a specified portal container or fallback to a
|
|
2250
|
+
* default provided via context.
|
|
2251
|
+
*
|
|
2252
|
+
* @param _portalContainer - An optional HTML element that can be specified as
|
|
2253
|
+
* an override.
|
|
2254
|
+
* @returns The portal container element where components should be rendered,
|
|
2255
|
+
* either the overridden container, one from context or undefined.
|
|
2256
|
+
*/
|
|
2257
|
+
declare function usePortalContainer(_portalContainer?: HTMLElement): HTMLElement | undefined;
|
|
2258
|
+
|
|
2259
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionIconButton, type ActionIconButtonProps, AlertDialog, type AlertDialogProps, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, Checkbox, type CheckboxProps, ColorInput, type ColorInputProps, type ColorPreset, ColorPresetInlineInput, type ColorPresetInlineInputProps, ColorSwatch, type ColorSwatchProps, DateFormat, type DateFormatProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, DomNodeRenderer, type DomNodeRendererProps, Drawer, type DrawerProps, Editor, type EditorHandle, type EditorProps, FileUpload, type FileUploadProps, FreehandCanvas, type FreehandCanvasProps, Group, type GroupProps, I18nProvider, type I18nResult, IconColorInputButton, ImageDropZone, type ImageDropZoneProps, InlineAlert, type InlineAlertProps, Link, type LinkProps, ListBox, type ListBoxProps, 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, 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, Reaction, type ReactionProps, 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, defineMessages, useDevice, useI18n, useImage, useIntersectionObserver, useIsFirstRender, useLocalStorage, useMutationObserver, usePortalContainer, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
|