@baseline-ui/core 0.4.0 → 0.5.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 CHANGED
@@ -1,9 +1,9 @@
1
1
  import React, { Key } from 'react';
2
2
  import { IconProps, SVGRProps } from '@baseline-ui/icons';
3
3
  import * as react_aria from 'react-aria';
4
- import { AriaButtonProps, AriaSliderProps, AriaSwitchProps, AriaSearchFieldProps, AriaPopoverProps, AriaMenuProps, AriaMenuTriggerProps, AriaLinkOptions, SeparatorProps as SeparatorProps$1, AriaProgressBarProps, AriaTextFieldProps, AriaTooltipProps, AriaPositionProps, OverlayProps, AriaToggleButtonProps, AriaCheckboxProps, AriaNumberFieldProps, I18nProviderProps as I18nProviderProps$1, LocalizedStrings, useNumberFormatter, useDateFormatter, AriaTagGroupProps, AriaListBoxProps, AriaListBoxOptions, OptionAria, AriaSelectOptions, AriaDialogProps, DropOptions, ClipboardProps, PressProps, AriaRadioGroupProps, AriaModalOverlayProps, Locale } from 'react-aria';
4
+ import { AriaButtonProps, AriaSliderProps, AriaSwitchProps, AriaSearchFieldProps, AriaPopoverProps, useOverlayTrigger, AriaMenuProps, AriaMenuTriggerProps, AriaLinkOptions, SeparatorProps as SeparatorProps$1, AriaProgressBarProps, AriaTextFieldProps, AriaTooltipProps, AriaPositionProps, OverlayProps, AriaToggleButtonProps, AriaCheckboxProps, AriaNumberFieldProps, I18nProviderProps as I18nProviderProps$1, LocalizedStrings, useNumberFormatter, useDateFormatter, AriaTagGroupProps, AriaListBoxProps, AriaListBoxOptions, OptionAria, AriaSelectOptions, AriaDialogProps, DropOptions, ClipboardProps, PressProps, AriaRadioGroupProps, AriaModalOverlayProps, Locale } from 'react-aria';
5
5
  export { I18nProviderProps, useCollator, useDateFormatter, useNumberFormatter } from 'react-aria';
6
- import { SliderStateOptions, ToggleProps, MenuTriggerProps, TooltipTriggerProps, NumberFieldStateOptions, ListProps, Orientation, SelectStateOptions, Item as Item$2, OverlayTriggerProps } from 'react-stately';
6
+ import { SliderStateOptions, ToggleProps, OverlayTriggerProps, OverlayTriggerState, MenuTriggerProps, TooltipTriggerProps, NumberFieldStateOptions, ListProps, Orientation, SelectStateOptions, Item as Item$2 } from 'react-stately';
7
7
  import { Theme, Sprinkles } from '@baseline-ui/tokens';
8
8
  import { Node as Node$1, AriaLabelingProps } from '@react-types/shared';
9
9
  import { AriaTabListProps } from '@react-types/tabs';
@@ -160,6 +160,11 @@ declare function useUserPreferences(): {
160
160
  transparency: boolean;
161
161
  };
162
162
 
163
+ type OverlayTriggerProps_ = Parameters<typeof useOverlayTrigger>[0];
164
+ interface PopoverProps extends OverlayTriggerProps, OverlayTriggerProps_ {
165
+ /** The children of the popover. */
166
+ children: React.ReactNode | ((state: OverlayTriggerState) => React.ReactNode);
167
+ }
163
168
  interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "triggerRef">, StylingProps {
164
169
  /**
165
170
  * The reference element for the popover position. By default, the popover is
@@ -171,6 +176,16 @@ interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "tri
171
176
  /** The contents of the popover. */
172
177
  children: React.ReactNode;
173
178
  }
179
+ interface PopoverTriggerProps {
180
+ /** The contents of the popover trigger. */
181
+ children: React.ReactNode;
182
+ }
183
+
184
+ declare const PopoverContent: React.ForwardRefExoticComponent<PopoverContentProps & React.RefAttributes<HTMLDivElement>>;
185
+
186
+ declare const PopoverTrigger: React.FC;
187
+
188
+ declare const Popover: React.FC<PopoverProps>;
174
189
 
175
190
  type Item$1 = {
176
191
  label: string;
@@ -1188,6 +1203,10 @@ interface ImageDropZoneProps extends Omit<SharedFileUploadProps, "label" | "vari
1188
1203
  includeCheckeredBackground?: boolean;
1189
1204
  /** Whether the component is inlined. */
1190
1205
  isInline?: boolean;
1206
+ /** The class name to apply to the picker button. */
1207
+ pickerButtonClassName?: string;
1208
+ /** The style to apply to the picker button. */
1209
+ pickerButtonStyle?: React.CSSProperties;
1191
1210
  }
1192
1211
 
1193
1212
  declare const ImageDropZone: React.ForwardRefExoticComponent<ImageDropZoneProps & React.RefAttributes<HTMLLabelElement>>;
@@ -1682,4 +1701,4 @@ interface TextSelectionProps {
1682
1701
  isDisabled?: boolean;
1683
1702
  }
1684
1703
 
1685
- export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionIconButton, type ActionIconButtonProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, Checkbox, type CheckboxProps, ColorInput, type ColorInputProps, type ColorPreset, ColorPresetInlineInput, type ColorPresetInlineInputProps, ColorSwatch, DateFormat, type DateFormatProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, DomNodeRenderer, type DomNodeRendererProps, FileUpload, type FileUploadProps, FreehandCanvas, type FreehandCanvasProps, Group, type GroupProps, I18nProvider, type I18nResult, ImageDropZone, type ImageDropZoneProps, InlineAlert, type InlineAlertProps, Link, type LinkProps, ListBox, type ListBoxProps, type ListOption, Menu, type MenuProps, type MessageDescriptor, MessageFormat, type MessageFormatProps, Modal, ModalClose, ModalContent, type ModalContentProps, type ModalProps, ModalTrigger, NumberFormat, type NumberFormatProps, NumberInput, type NumberInputProps, Pagination, type PaginationProps, Portal, type PortalProps, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, Reaction, type ReactionProps, 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, Tooltip, type TooltipProps, Transform, type TransformProps, defineMessages, useI18n, useImage, useIntersectionObserver, useIsFirstRender, useLocalStorage, useMutationObserver, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
1704
+ export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionIconButton, type ActionIconButtonProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, Checkbox, type CheckboxProps, ColorInput, type ColorInputProps, type ColorPreset, ColorPresetInlineInput, type ColorPresetInlineInputProps, ColorSwatch, DateFormat, type DateFormatProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, DomNodeRenderer, type DomNodeRendererProps, FileUpload, type FileUploadProps, FreehandCanvas, type FreehandCanvasProps, Group, type GroupProps, I18nProvider, type I18nResult, ImageDropZone, type ImageDropZoneProps, InlineAlert, type InlineAlertProps, Link, type LinkProps, ListBox, type ListBoxProps, type ListOption, Menu, 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, type PortalProps, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, Reaction, type ReactionProps, 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, Tooltip, type TooltipProps, Transform, type TransformProps, defineMessages, useI18n, useImage, useIntersectionObserver, useIsFirstRender, useLocalStorage, useMutationObserver, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import React, { Key } from 'react';
2
2
  import { IconProps, SVGRProps } from '@baseline-ui/icons';
3
3
  import * as react_aria from 'react-aria';
4
- import { AriaButtonProps, AriaSliderProps, AriaSwitchProps, AriaSearchFieldProps, AriaPopoverProps, AriaMenuProps, AriaMenuTriggerProps, AriaLinkOptions, SeparatorProps as SeparatorProps$1, AriaProgressBarProps, AriaTextFieldProps, AriaTooltipProps, AriaPositionProps, OverlayProps, AriaToggleButtonProps, AriaCheckboxProps, AriaNumberFieldProps, I18nProviderProps as I18nProviderProps$1, LocalizedStrings, useNumberFormatter, useDateFormatter, AriaTagGroupProps, AriaListBoxProps, AriaListBoxOptions, OptionAria, AriaSelectOptions, AriaDialogProps, DropOptions, ClipboardProps, PressProps, AriaRadioGroupProps, AriaModalOverlayProps, Locale } from 'react-aria';
4
+ import { AriaButtonProps, AriaSliderProps, AriaSwitchProps, AriaSearchFieldProps, AriaPopoverProps, useOverlayTrigger, AriaMenuProps, AriaMenuTriggerProps, AriaLinkOptions, SeparatorProps as SeparatorProps$1, AriaProgressBarProps, AriaTextFieldProps, AriaTooltipProps, AriaPositionProps, OverlayProps, AriaToggleButtonProps, AriaCheckboxProps, AriaNumberFieldProps, I18nProviderProps as I18nProviderProps$1, LocalizedStrings, useNumberFormatter, useDateFormatter, AriaTagGroupProps, AriaListBoxProps, AriaListBoxOptions, OptionAria, AriaSelectOptions, AriaDialogProps, DropOptions, ClipboardProps, PressProps, AriaRadioGroupProps, AriaModalOverlayProps, Locale } from 'react-aria';
5
5
  export { I18nProviderProps, useCollator, useDateFormatter, useNumberFormatter } from 'react-aria';
6
- import { SliderStateOptions, ToggleProps, MenuTriggerProps, TooltipTriggerProps, NumberFieldStateOptions, ListProps, Orientation, SelectStateOptions, Item as Item$2, OverlayTriggerProps } from 'react-stately';
6
+ import { SliderStateOptions, ToggleProps, OverlayTriggerProps, OverlayTriggerState, MenuTriggerProps, TooltipTriggerProps, NumberFieldStateOptions, ListProps, Orientation, SelectStateOptions, Item as Item$2 } from 'react-stately';
7
7
  import { Theme, Sprinkles } from '@baseline-ui/tokens';
8
8
  import { Node as Node$1, AriaLabelingProps } from '@react-types/shared';
9
9
  import { AriaTabListProps } from '@react-types/tabs';
@@ -160,6 +160,11 @@ declare function useUserPreferences(): {
160
160
  transparency: boolean;
161
161
  };
162
162
 
163
+ type OverlayTriggerProps_ = Parameters<typeof useOverlayTrigger>[0];
164
+ interface PopoverProps extends OverlayTriggerProps, OverlayTriggerProps_ {
165
+ /** The children of the popover. */
166
+ children: React.ReactNode | ((state: OverlayTriggerState) => React.ReactNode);
167
+ }
163
168
  interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "triggerRef">, StylingProps {
164
169
  /**
165
170
  * The reference element for the popover position. By default, the popover is
@@ -171,6 +176,16 @@ interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "tri
171
176
  /** The contents of the popover. */
172
177
  children: React.ReactNode;
173
178
  }
179
+ interface PopoverTriggerProps {
180
+ /** The contents of the popover trigger. */
181
+ children: React.ReactNode;
182
+ }
183
+
184
+ declare const PopoverContent: React.ForwardRefExoticComponent<PopoverContentProps & React.RefAttributes<HTMLDivElement>>;
185
+
186
+ declare const PopoverTrigger: React.FC;
187
+
188
+ declare const Popover: React.FC<PopoverProps>;
174
189
 
175
190
  type Item$1 = {
176
191
  label: string;
@@ -1188,6 +1203,10 @@ interface ImageDropZoneProps extends Omit<SharedFileUploadProps, "label" | "vari
1188
1203
  includeCheckeredBackground?: boolean;
1189
1204
  /** Whether the component is inlined. */
1190
1205
  isInline?: boolean;
1206
+ /** The class name to apply to the picker button. */
1207
+ pickerButtonClassName?: string;
1208
+ /** The style to apply to the picker button. */
1209
+ pickerButtonStyle?: React.CSSProperties;
1191
1210
  }
1192
1211
 
1193
1212
  declare const ImageDropZone: React.ForwardRefExoticComponent<ImageDropZoneProps & React.RefAttributes<HTMLLabelElement>>;
@@ -1682,4 +1701,4 @@ interface TextSelectionProps {
1682
1701
  isDisabled?: boolean;
1683
1702
  }
1684
1703
 
1685
- export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionIconButton, type ActionIconButtonProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, Checkbox, type CheckboxProps, ColorInput, type ColorInputProps, type ColorPreset, ColorPresetInlineInput, type ColorPresetInlineInputProps, ColorSwatch, DateFormat, type DateFormatProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, DomNodeRenderer, type DomNodeRendererProps, FileUpload, type FileUploadProps, FreehandCanvas, type FreehandCanvasProps, Group, type GroupProps, I18nProvider, type I18nResult, ImageDropZone, type ImageDropZoneProps, InlineAlert, type InlineAlertProps, Link, type LinkProps, ListBox, type ListBoxProps, type ListOption, Menu, type MenuProps, type MessageDescriptor, MessageFormat, type MessageFormatProps, Modal, ModalClose, ModalContent, type ModalContentProps, type ModalProps, ModalTrigger, NumberFormat, type NumberFormatProps, NumberInput, type NumberInputProps, Pagination, type PaginationProps, Portal, type PortalProps, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, Reaction, type ReactionProps, 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, Tooltip, type TooltipProps, Transform, type TransformProps, defineMessages, useI18n, useImage, useIntersectionObserver, useIsFirstRender, useLocalStorage, useMutationObserver, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
1704
+ export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionIconButton, type ActionIconButtonProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, Checkbox, type CheckboxProps, ColorInput, type ColorInputProps, type ColorPreset, ColorPresetInlineInput, type ColorPresetInlineInputProps, ColorSwatch, DateFormat, type DateFormatProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, DomNodeRenderer, type DomNodeRendererProps, FileUpload, type FileUploadProps, FreehandCanvas, type FreehandCanvasProps, Group, type GroupProps, I18nProvider, type I18nResult, ImageDropZone, type ImageDropZoneProps, InlineAlert, type InlineAlertProps, Link, type LinkProps, ListBox, type ListBoxProps, type ListOption, Menu, 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, type PortalProps, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, Reaction, type ReactionProps, 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, Tooltip, type TooltipProps, Transform, type TransformProps, defineMessages, useI18n, useImage, useIntersectionObserver, useIsFirstRender, useLocalStorage, useMutationObserver, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };