dawn-ui-react 1.0.0-alpha.41 → 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.
- package/dist/components/avatar/avatar-image.d.ts +2 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/popover/popover-panel.d.ts +1 -1
- package/dist/components/popover/popover.types.d.ts +5 -1
- package/dist/components/sidebar/sidebar-provider.d.ts +0 -1
- package/dist/components/slider/index.d.ts +1 -1
- package/dist/components/slider/slider-group-context.d.ts +5 -0
- package/dist/components/slider/slider-group.d.ts +3 -0
- package/dist/components/slider/slider-thumb.d.ts +1 -1
- package/dist/components/slider/slider.d.ts +1 -1
- package/dist/components/slider/slider.types.d.ts +5 -8
- package/dist/components/slider-group/index.d.ts +9 -0
- package/dist/components/slider-group/slider-description.d.ts +2 -0
- package/dist/components/slider-group/slider-group-context.d.ts +5 -0
- package/dist/components/slider-group/slider-group-slider.d.ts +3 -0
- package/dist/components/slider-group/slider-group.d.ts +3 -0
- package/dist/components/slider-group/slider-group.types.d.ts +27 -0
- package/dist/components/slider-group/slider-icon.d.ts +2 -0
- package/dist/components/slider-group/slider-input.d.ts +2 -0
- package/dist/components/slider-group/slider-label.d.ts +2 -0
- package/dist/components/slider-group/slider-value.d.ts +2 -0
- package/dist/dawn-ui-react.js +10527 -10419
- package/dist/dawn-ui-react.umd.cjs +55 -55
- package/package.json +3 -3
|
@@ -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) =>
|
|
3
|
+
export declare const AvatarImage: ({ className, ref, ...props }: AvatarImageProps) => React.JSX.Element;
|
|
@@ -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'>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SliderGroupContextValue } from '../slider-group/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;
|
|
@@ -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;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SliderProps } from './slider.types';
|
|
2
|
-
export declare const Slider: ({ size, tone, defaultValue,
|
|
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,18 +1,15 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { Slider as BaseSlider } from '@base-ui/react';
|
|
3
|
-
import { Icon } from '@phosphor-icons/react';
|
|
4
3
|
import { ComponentProps } from 'react';
|
|
5
4
|
export declare const sliderVariants: (props?: ({
|
|
6
5
|
size?: "small" | "large" | "medium" | null | undefined;
|
|
7
6
|
tone?: "brand" | "accent" | "neutral" | "error" | "info" | "success" | "warning" | null | undefined;
|
|
8
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
8
|
export type SliderProps = ComponentProps<typeof BaseSlider.Root> & VariantProps<typeof sliderVariants> & {
|
|
10
|
-
|
|
11
|
-
description?: string;
|
|
12
|
-
leadingIcon?: Icon;
|
|
13
|
-
trailingIcon?: Icon;
|
|
14
|
-
showMin?: boolean;
|
|
15
|
-
showMax?: boolean;
|
|
9
|
+
showIndicator?: boolean;
|
|
16
10
|
showThumbOnHover?: boolean;
|
|
11
|
+
showTooltip?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type SliderThumbProps = ComponentProps<typeof BaseSlider.Thumb> & {
|
|
14
|
+
hide?: boolean;
|
|
17
15
|
};
|
|
18
|
-
export type SliderThumbProps = ComponentProps<typeof BaseSlider.Thumb>;
|
|
@@ -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';
|
|
@@ -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,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'>;
|