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

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.
@@ -46,6 +46,7 @@ export * from './separator';
46
46
  export * from './sidebar';
47
47
  export * from './skeleton';
48
48
  export * from './slider';
49
+ export * from './slider-group';
49
50
  export * from './switch';
50
51
  export * from './table';
51
52
  export * from './tabs';
@@ -1,2 +1,2 @@
1
1
  import { PopoverPanelProps } from './popover.types';
2
- export declare const PopoverPanel: ({ className, ref, children, ...props }: PopoverPanelProps) => import("react").JSX.Element;
2
+ export declare const PopoverPanel: ({ elevation, className, ref, children, ...props }: PopoverPanelProps) => import("react").JSX.Element;
@@ -1,8 +1,12 @@
1
1
  import { Popover as BasePopover } from '@base-ui/react/popover';
2
+ import { VariantProps } from 'class-variance-authority';
2
3
  import { Button } from '..';
4
+ export declare const popoverPanelVariants: (props?: ({
5
+ elevation?: "medium" | "low" | "high" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
3
7
  export type PopoverProps = React.ComponentProps<typeof BasePopover.Root>;
4
8
  export type PopoverTriggerProps = React.ComponentProps<typeof BasePopover.Trigger>;
5
- export type PopoverPanelProps = React.ComponentProps<typeof BasePopover.Positioner>;
9
+ export type PopoverPanelProps = React.ComponentProps<typeof BasePopover.Positioner> & VariantProps<typeof popoverPanelVariants>;
6
10
  export type PopoverTitleProps = React.ComponentProps<typeof BasePopover.Title>;
7
11
  export type PopoverDescriptionProps = React.ComponentProps<typeof BasePopover.Description>;
8
12
  export type PopoverHeaderProps = React.ComponentProps<'div'>;
@@ -1,10 +1,3 @@
1
1
  export { Slider } from './slider';
2
- export type { SliderProps, SliderThumbProps, SliderDescriptionProps, SliderIconProps, SliderInputProps, SliderLabelProps, SliderValueProps, SliderGroupProps, } from './slider.types';
3
2
  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';
3
+ export type { SliderProps, SliderThumbProps } from './slider.types';
@@ -1,3 +1,5 @@
1
- import { SliderGroupContextValue } from './slider.types';
1
+ import { SliderGroupContextValue } from '../slider-group/slider-group.types';
2
2
  export declare const SliderGroupContext: import('react').Context<SliderGroupContextValue | null>;
3
3
  export declare const useSliderGroupContext: () => SliderGroupContextValue | null;
4
+ export declare const areNumberArraysEqual: (a?: number[], b?: number[]) => boolean;
5
+ export declare const useStableNumberArray: (next: number[] | undefined) => number[] | undefined;
@@ -1,3 +1,3 @@
1
1
  import { default as React } from 'react';
2
- import { SliderGroupProps } from './slider.types';
2
+ import { SliderGroupProps } from '../slider-group';
3
3
  export declare const SliderGroup: ({ className, children, ref, defaultValue, value: valueProp, onValueChange, ...props }: SliderGroupProps) => React.JSX.Element;
@@ -1,3 +1,2 @@
1
- import { default as React } from 'react';
2
1
  import { SliderProps } from './slider.types';
3
- export declare const Slider: ({ size, tone, defaultValue, min, max, step, showIndicator, showTooltip, showThumbOnHover, value, onValueChange, className, ref, ...props }: SliderProps) => React.JSX.Element;
2
+ export declare const Slider: ({ size, tone, defaultValue, min, max, step, showIndicator, showTooltip, showThumbOnHover, value, onValueChange, className, ref, ...props }: SliderProps) => import("react").JSX.Element;
@@ -1,5 +1,4 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { Input } from '../input';
3
2
  import { Slider as BaseSlider } from '@base-ui/react';
4
3
  import { ComponentProps } from 'react';
5
4
  export declare const sliderVariants: (props?: ({
@@ -14,27 +13,3 @@ export type SliderProps = ComponentProps<typeof BaseSlider.Root> & VariantProps<
14
13
  export type SliderThumbProps = ComponentProps<typeof BaseSlider.Thumb> & {
15
14
  hide?: boolean;
16
15
  };
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'>;
@@ -0,0 +1,9 @@
1
+ export { SliderGroup } from './slider-group';
2
+ export { SliderGroupSlider } from './slider-group-slider';
3
+ export { SliderInput } from './slider-input';
4
+ export { SliderValue } from './slider-value';
5
+ export { SliderLabel } from './slider-label';
6
+ export { SliderDescription } from './slider-description';
7
+ export { SliderIcon } from './slider-icon';
8
+ export { useSliderGroupContext } from './slider-group-context';
9
+ export type { SliderGroupProps, SliderGroupSliderProps, SliderInputProps, SliderValueProps, SliderLabelProps, SliderDescriptionProps, SliderIconProps, } from './slider-group.types';
@@ -1,2 +1,2 @@
1
- import { SliderDescriptionProps } from './slider.types';
1
+ import { SliderDescriptionProps } from './slider-group.types';
2
2
  export declare const SliderDescription: ({ className, children, ref, ...props }: SliderDescriptionProps) => import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { SliderGroupContextValue } from './slider-group.types';
2
+ export declare const SliderGroupContext: import('react').Context<SliderGroupContextValue | null>;
3
+ export declare const useSliderGroupContext: () => SliderGroupContextValue | null;
4
+ export declare const areNumberArraysEqual: (a?: number[], b?: number[]) => boolean;
5
+ export declare const useStableNumberArray: (next: number[] | undefined) => number[] | undefined;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { SliderGroupSliderProps } from './slider-group.types';
3
+ export declare const SliderGroupSlider: ({ min, max, step, defaultValue, value, onValueChange, ...props }: SliderGroupSliderProps) => React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { SliderGroupProps } from './slider-group.types';
3
+ export declare const SliderGroup: ({ className, children, ref, defaultValue, value: valueProp, onValueChange, ...props }: SliderGroupProps) => React.JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { Input } from '../input';
2
+ import { SliderProps } from '../slider';
3
+ export type SliderGroupProps = Omit<React.ComponentProps<'div'>, 'defaultValue' | 'onChange'> & {
4
+ defaultValue?: number | number[];
5
+ value?: number | number[];
6
+ onValueChange?: (value: number[]) => void;
7
+ };
8
+ export type SliderGroupConfig = {
9
+ min: number;
10
+ max: number;
11
+ step: number;
12
+ defaultValue?: number | readonly number[];
13
+ };
14
+ export type SliderGroupContextValue = {
15
+ value: number[] | undefined;
16
+ setValue: (value: number[]) => void;
17
+ min: number;
18
+ max: number;
19
+ step: number;
20
+ registerConfig: (config: SliderGroupConfig) => void;
21
+ };
22
+ export type SliderGroupSliderProps = SliderProps;
23
+ export type SliderDescriptionProps = React.ComponentProps<'p'>;
24
+ export type SliderIconProps = React.ComponentProps<'div'>;
25
+ export type SliderInputProps = Omit<React.ComponentProps<typeof Input>, 'value' | 'onChange' | 'type'>;
26
+ export type SliderLabelProps = React.ComponentProps<'span'>;
27
+ export type SliderValueProps = React.ComponentProps<'span'>;
@@ -1,2 +1,2 @@
1
- import { SliderIconProps } from './slider.types';
1
+ import { SliderIconProps } from './slider-group.types';
2
2
  export declare const SliderIcon: ({ className, children, ref, ...props }: SliderIconProps) => import("react").JSX.Element;
@@ -1,2 +1,2 @@
1
- import { SliderInputProps } from './slider.types';
1
+ import { SliderInputProps } from './slider-group.types';
2
2
  export declare const SliderInput: ({ className, ref, ...props }: SliderInputProps) => import("react").JSX.Element | null;
@@ -1,2 +1,2 @@
1
- import { SliderLabelProps } from './slider.types';
1
+ import { SliderLabelProps } from './slider-group.types';
2
2
  export declare const SliderLabel: ({ className, children, ref, ...props }: SliderLabelProps) => import("react").JSX.Element;
@@ -1,2 +1,2 @@
1
- import { SliderValueProps } from './slider.types';
1
+ import { SliderValueProps } from './slider-group.types';
2
2
  export declare const SliderValue: ({ className, children, ref, ...props }: SliderValueProps) => import("react").JSX.Element | null;