dawn-ui-react 1.0.0-alpha.40 → 1.0.0-alpha.42

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.
@@ -1,2 +1,3 @@
1
+ import { default as React } from 'react';
1
2
  import { AvatarImageProps } from './avatar.types';
2
- export declare const AvatarImage: ({ className, ref, ...props }: AvatarImageProps) => import("react").JSX.Element;
3
+ export declare const AvatarImage: ({ className, ref, ...props }: AvatarImageProps) => React.JSX.Element;
@@ -15,3 +15,4 @@ export { SidebarMenuCollapsible } from './sidebar-menu-collapsible';
15
15
  export { SidebarMenuCollapsiblePanel } from './sidebar-menu-collapsible-panel';
16
16
  export { SidebarMenuCollapsibleTrigger } from './sidebar-menu-collapsible-trigger';
17
17
  export { SidebarMenuItem } from './sidebar-menu-item';
18
+ export { getStoredSidebarOpen } from './sidebar.utils';
@@ -6,7 +6,6 @@ type SidebarContextProps = React.ComponentProps<'div'> & {
6
6
  open?: boolean;
7
7
  setOpen?: (open: boolean) => void;
8
8
  isMobile?: boolean;
9
- setIsMobile?: (isMobile: boolean) => void;
10
9
  side?: 'left' | 'right';
11
10
  collapsible?: 'offcanvas' | 'icon' | 'none';
12
11
  };
@@ -0,0 +1 @@
1
+ export declare const getStoredSidebarOpen: (id: string, fallback: boolean) => boolean;
@@ -1,3 +1,10 @@
1
1
  export { Slider } from './slider';
2
- export type { SliderProps, SliderThumbProps } from './slider.types';
2
+ export type { SliderProps, SliderThumbProps, SliderDescriptionProps, SliderIconProps, SliderInputProps, SliderLabelProps, SliderValueProps, SliderGroupProps, } from './slider.types';
3
3
  export { SliderThumb } from './slider-thumb';
4
+ export { SliderDescription } from './slider-description';
5
+ export { SliderIcon } from './slider-icon';
6
+ export { SliderInput } from './slider-input';
7
+ export { SliderLabel } from './slider-label';
8
+ export { SliderValue } from './slider-value';
9
+ export { SliderGroup } from './slider-group';
10
+ export { useSliderGroupContext } from './slider-group-context';
@@ -0,0 +1,2 @@
1
+ import { SliderDescriptionProps } from './slider.types';
2
+ export declare const SliderDescription: ({ className, children, ref, ...props }: SliderDescriptionProps) => import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { SliderGroupContextValue } from './slider.types';
2
+ export declare const SliderGroupContext: import('react').Context<SliderGroupContextValue | null>;
3
+ export declare const useSliderGroupContext: () => SliderGroupContextValue | null;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { SliderGroupProps } from './slider.types';
3
+ export declare const SliderGroup: ({ className, children, ref, defaultValue, value: valueProp, onValueChange, ...props }: SliderGroupProps) => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SliderIconProps } from './slider.types';
2
+ export declare const SliderIcon: ({ className, children, ref, ...props }: SliderIconProps) => import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SliderInputProps } from './slider.types';
2
+ export declare const SliderInput: ({ className, ref, ...props }: SliderInputProps) => import("react").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import { SliderLabelProps } from './slider.types';
2
+ export declare const SliderLabel: ({ className, children, ref, ...props }: SliderLabelProps) => import("react").JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { default as React } from 'react';
2
2
  import { SliderThumbProps } from './slider.types';
3
- export declare const SliderThumb: ({ className, children, ref, ...props }: SliderThumbProps) => React.JSX.Element;
3
+ export declare const SliderThumb: ({ className, children, ref, hide, ...props }: SliderThumbProps) => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SliderValueProps } from './slider.types';
2
+ export declare const SliderValue: ({ className, children, ref, ...props }: SliderValueProps) => import("react").JSX.Element | null;
@@ -1,2 +1,3 @@
1
+ import { default as React } from 'react';
1
2
  import { SliderProps } from './slider.types';
2
- export declare const Slider: ({ size, tone, defaultValue, description, label, leadingIcon: LeadingIcon, max, min, showMax, showMin, trailingIcon: TrailingIcon, showThumbOnHover, value, className, ref, ...props }: SliderProps) => import("react").JSX.Element;
3
+ export declare const Slider: ({ size, tone, defaultValue, min, max, step, showIndicator, showTooltip, showThumbOnHover, value, onValueChange, className, ref, ...props }: SliderProps) => React.JSX.Element;
@@ -1,18 +1,40 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
+ import { Input } from '../input';
2
3
  import { Slider as BaseSlider } from '@base-ui/react';
3
- import { Icon } from '@phosphor-icons/react';
4
4
  import { ComponentProps } from 'react';
5
5
  export declare const sliderVariants: (props?: ({
6
6
  size?: "small" | "large" | "medium" | null | undefined;
7
7
  tone?: "brand" | "accent" | "neutral" | "error" | "info" | "success" | "warning" | null | undefined;
8
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
9
  export type SliderProps = ComponentProps<typeof BaseSlider.Root> & VariantProps<typeof sliderVariants> & {
10
- label?: string;
11
- description?: string;
12
- leadingIcon?: Icon;
13
- trailingIcon?: Icon;
14
- showMin?: boolean;
15
- showMax?: boolean;
10
+ showIndicator?: boolean;
16
11
  showThumbOnHover?: boolean;
12
+ showTooltip?: boolean;
17
13
  };
18
- export type SliderThumbProps = ComponentProps<typeof BaseSlider.Thumb>;
14
+ export type SliderThumbProps = ComponentProps<typeof BaseSlider.Thumb> & {
15
+ hide?: boolean;
16
+ };
17
+ export type SliderDescriptionProps = React.ComponentProps<'p'>;
18
+ export type SliderGroupProps = Omit<React.ComponentProps<'div'>, 'defaultValue' | 'onChange'> & {
19
+ defaultValue?: number | number[];
20
+ value?: number | number[];
21
+ onValueChange?: (value: number[]) => void;
22
+ };
23
+ export type SliderGroupConfig = {
24
+ min: number;
25
+ max: number;
26
+ step: number;
27
+ defaultValue?: number | readonly number[];
28
+ };
29
+ export type SliderGroupContextValue = {
30
+ value: number[] | undefined;
31
+ setValue: (value: number[]) => void;
32
+ min: number;
33
+ max: number;
34
+ step: number;
35
+ registerConfig: (config: SliderGroupConfig) => void;
36
+ };
37
+ export type SliderIconProps = React.ComponentProps<'div'>;
38
+ export type SliderInputProps = Omit<React.ComponentProps<typeof Input>, 'value' | 'onChange' | 'type'>;
39
+ export type SliderLabelProps = React.ComponentProps<'span'>;
40
+ export type SliderValueProps = React.ComponentProps<'span'>;