@kazee-ds/react 0.6.0 → 0.7.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.
@@ -0,0 +1,42 @@
1
+ import { type HTMLAttributes, type ImgHTMLAttributes, type Ref } from 'react';
2
+ import { type StylingProps } from './styling.js';
3
+ import type { AvatarVariant, ComponentSize, ImageLoadingStatus, IndicatorPlacement, Tone } from './visual.js';
4
+ export declare const AvatarGroupContext: import("react").Context<{
5
+ size?: ComponentSize;
6
+ tone?: Tone;
7
+ variant?: AvatarVariant;
8
+ }>;
9
+ export interface AvatarProps extends HTMLAttributes<HTMLSpanElement>, StylingProps<'image' | 'fallback' | 'badge'> {
10
+ size?: ComponentSize;
11
+ tone?: Tone;
12
+ variant?: AvatarVariant;
13
+ radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
14
+ asChild?: boolean;
15
+ ref?: Ref<HTMLSpanElement>;
16
+ }
17
+ export declare function AvatarRoot({ size, tone, variant, radius, asChild, children, className, classNames, ...props }: AvatarProps): import("react").JSX.Element;
18
+ export interface AvatarImageProps extends ImgHTMLAttributes<HTMLImageElement> {
19
+ asChild?: boolean;
20
+ onLoadingStatusChange?: (status: ImageLoadingStatus) => void;
21
+ ref?: Ref<HTMLImageElement>;
22
+ }
23
+ export declare function AvatarImage(props: AvatarImageProps): import("react").JSX.Element;
24
+ export interface AvatarFallbackProps extends HTMLAttributes<HTMLSpanElement> {
25
+ delayMs?: number;
26
+ tone?: Tone;
27
+ ref?: Ref<HTMLSpanElement>;
28
+ }
29
+ export declare function AvatarFallback({ delayMs, tone, className, ...props }: AvatarFallbackProps): import("react").JSX.Element | null;
30
+ export interface AvatarBadgeProps extends HTMLAttributes<HTMLSpanElement> {
31
+ size?: ComponentSize;
32
+ tone?: Tone;
33
+ placement?: IndicatorPlacement;
34
+ ref?: Ref<HTMLSpanElement>;
35
+ }
36
+ export declare function AvatarBadge({ size, tone, placement, className, children, ...props }: AvatarBadgeProps): import("react").JSX.Element;
37
+ export declare const Avatar: typeof AvatarRoot & {
38
+ Root: typeof AvatarRoot;
39
+ Image: typeof AvatarImage;
40
+ Fallback: typeof AvatarFallback;
41
+ Badge: typeof AvatarBadge;
42
+ };
@@ -0,0 +1,18 @@
1
+ import { type HTMLAttributes } from 'react';
2
+ import { type AvatarProps } from './Avatar.js';
3
+ import { type StylingProps } from './styling.js';
4
+ import type { AvatarVariant, ComponentSize, Tone } from './visual.js';
5
+ export interface AvatarGroupProps extends HTMLAttributes<HTMLDivElement>, StylingProps<'count'> {
6
+ size?: ComponentSize;
7
+ tone?: Tone;
8
+ variant?: AvatarVariant;
9
+ max?: number;
10
+ isGrid?: boolean;
11
+ overlap?: 'clip' | 'ring';
12
+ }
13
+ export declare function AvatarGroupCount({ className, ...props }: AvatarProps): import("react").JSX.Element;
14
+ export declare function AvatarGroupRoot({ size, tone, variant, max, isGrid, overlap, className, classNames, children, ...props }: AvatarGroupProps): import("react").JSX.Element;
15
+ export declare const AvatarGroup: typeof AvatarGroupRoot & {
16
+ Root: typeof AvatarGroupRoot;
17
+ Count: typeof AvatarGroupCount;
18
+ };
@@ -1,8 +1,26 @@
1
- import type { HTMLAttributes } from 'react';
2
- export type BadgeTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
1
+ import { type HTMLAttributes, type Ref } from 'react';
2
+ import type { ComponentSize, IndicatorPlacement, Tone } from './visual.js';
3
+ export type BadgeTone = Tone;
4
+ export type BadgeVariant = 'default' | 'solid' | 'soft' | 'outline' | 'ghost' | 'link';
3
5
  export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
4
- classNames?: Partial<Record<'root', string>>;
6
+ classNames?: Partial<Record<'root' | 'label', string>>;
5
7
  tone?: BadgeTone;
8
+ size?: ComponentSize;
9
+ variant?: BadgeVariant;
10
+ placement?: IndicatorPlacement;
11
+ asChild?: boolean;
12
+ ref?: Ref<HTMLSpanElement>;
6
13
  }
7
- /** Static status text. Dynamic announcements belong in an application-owned live region. */
8
- export declare function Badge({ tone, className, classNames, ...props }: BadgeProps): import("react").JSX.Element;
14
+ /** Static status text; wrap in Badge.Anchor to position it relative to another element. */
15
+ export declare function BadgeRoot({ tone, size, variant, placement, asChild, children, className, classNames, ...props }: BadgeProps): import("react").JSX.Element;
16
+ export declare function BadgeAnchor({ className, ...props }: HTMLAttributes<HTMLSpanElement> & {
17
+ ref?: Ref<HTMLSpanElement>;
18
+ }): import("react").JSX.Element;
19
+ export declare function BadgeLabel({ className, ...props }: HTMLAttributes<HTMLSpanElement> & {
20
+ ref?: Ref<HTMLSpanElement>;
21
+ }): import("react").JSX.Element;
22
+ export declare const Badge: typeof BadgeRoot & {
23
+ Root: typeof BadgeRoot;
24
+ Anchor: typeof BadgeAnchor;
25
+ Label: typeof BadgeLabel;
26
+ };
@@ -2,7 +2,7 @@ import { type StylingProps } from './styling.js';
2
2
  import { type ButtonProps as AriaButtonProps } from 'react-aria-components/Button';
3
3
  import { type ReactNode } from 'react';
4
4
  export type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'outline' | 'tertiary' | 'ghost' | 'danger-soft' | 'ai';
5
- export type ButtonSize = 'sm' | 'md' | 'lg';
5
+ export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
6
6
  /** The event passed to `onPress`: pointer type, modifier keys, and the target element. */
7
7
  export type ButtonPressEvent = Parameters<NonNullable<AriaButtonProps['onPress']>>[0];
8
8
  /** Public flags supplied to the Button render function. */
@@ -0,0 +1,60 @@
1
+ import { type HTMLAttributes } from 'react';
2
+ import { CalendarDate } from '@internationalized/date';
3
+ import { type StylingProps } from './styling.js';
4
+ import type { TemporalRange } from './temporal-model.js';
5
+ export interface MonthPickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
6
+ value?: number;
7
+ year?: number;
8
+ onChange?: (month: number) => void;
9
+ locale?: string;
10
+ minDate?: string;
11
+ maxDate?: string;
12
+ isDisabled?: boolean;
13
+ }
14
+ export declare function MonthPicker({ value, year, onChange, locale, minDate, maxDate, isDisabled, className, ...props }: MonthPickerProps): import("react").JSX.Element;
15
+ export interface YearPickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
16
+ value?: number;
17
+ onChange?: (year: number) => void;
18
+ locale?: string;
19
+ minDate?: string;
20
+ maxDate?: string;
21
+ isDisabled?: boolean;
22
+ }
23
+ export declare function YearPicker({ value, onChange, locale, minDate, maxDate, isDisabled, className, ...props }: YearPickerProps): import("react").JSX.Element;
24
+ export interface MonthYearNavigationProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
25
+ value: string;
26
+ onChange: (value: string) => void;
27
+ locale?: string;
28
+ minDate?: string;
29
+ maxDate?: string;
30
+ isDisabled?: boolean;
31
+ }
32
+ export declare function MonthYearNavigation({ value, onChange, locale, minDate, maxDate, isDisabled, className, ...props }: MonthYearNavigationProps): import("react").JSX.Element;
33
+ /** Reads actual visibleRange rather than assuming the focused day is the first panel. */
34
+ export declare function CalendarViewHeader({ offset, onNavigate, ...props }: Omit<MonthYearNavigationProps, 'value' | 'onChange'> & {
35
+ offset?: number;
36
+ onNavigate: (value: CalendarDate) => void;
37
+ }): import("react").JSX.Element;
38
+ export interface CalendarProps extends StylingProps<'header' | 'grid' | 'day' | 'month'> {
39
+ label?: string;
40
+ value?: string | null;
41
+ defaultValue?: string | null;
42
+ onChange?: (value: string | null) => void;
43
+ locale?: string;
44
+ dir?: 'ltr' | 'rtl';
45
+ minDate?: string;
46
+ maxDate?: string;
47
+ isDateUnavailable?: (value: string) => boolean;
48
+ isDisabled?: boolean;
49
+ isReadOnly?: boolean;
50
+ weekStartsOn?: 0 | 1;
51
+ visibleMonths?: 1 | 2;
52
+ referenceDate?: string;
53
+ }
54
+ export interface RangeCalendarProps extends Omit<CalendarProps, 'value' | 'defaultValue' | 'onChange'> {
55
+ value?: TemporalRange | null;
56
+ defaultValue?: TemporalRange | null;
57
+ onChange?: (value: TemporalRange | null) => void;
58
+ }
59
+ export declare function Calendar(props: CalendarProps): import("react").JSX.Element;
60
+ export declare function RangeCalendar(props: RangeCalendarProps): import("react").JSX.Element;
@@ -1,7 +1,20 @@
1
- import type { HTMLAttributes, ReactNode } from 'react';
1
+ import type { HTMLAttributes, ReactNode, AnchorHTMLAttributes } from 'react';
2
2
  import { type StylingProps } from './styling.js';
3
- export type CardPart = 'root' | 'header' | 'heading' | 'titleRow' | 'title' | 'description' | 'actions' | 'content' | 'footer';
4
- export interface CardProps extends HTMLAttributes<HTMLDivElement>, StylingProps<CardPart> {
3
+ export type CardPart = 'root' | 'action' | 'header' | 'heading' | 'titleRow' | 'title' | 'description' | 'actions' | 'content' | 'footer';
4
+ export interface CardInteractionProps {
5
+ density?: 'default' | 'compact';
6
+ href?: string;
7
+ target?: AnchorHTMLAttributes<HTMLAnchorElement>['target'];
8
+ rel?: string;
9
+ onPress?: () => void;
10
+ isDisabled?: boolean;
11
+ actionLabel?: string;
12
+ actionLabelledBy?: string;
13
+ actionClassName?: string;
14
+ /** Compose a router link using the supplied native anchor props. */
15
+ renderLink?: (props: AnchorHTMLAttributes<HTMLAnchorElement>) => ReactNode;
16
+ }
17
+ export interface CardProps extends HTMLAttributes<HTMLDivElement>, StylingProps<CardPart>, CardInteractionProps {
5
18
  title?: string;
6
19
  description?: string;
7
20
  headingLevel?: 2 | 3 | 4 | 5 | 6;
@@ -11,11 +24,16 @@ export interface CardProps extends HTMLAttributes<HTMLDivElement>, StylingProps<
11
24
  titleExtras?: ReactNode;
12
25
  actions?: ReactNode;
13
26
  footer?: ReactNode;
27
+ headerAlign?: 'start' | 'center' | 'end';
28
+ dividedHeader?: boolean;
29
+ flushFooter?: boolean;
14
30
  }
15
- /** A content container; place links and buttons inside rather than making it clickable. */
16
- declare function CompactCard({ title, description, headingLevel, actions, header, titleExtras, footer, children, className, classNames, ...props }: CardProps): import("react").JSX.Element;
17
- export declare function CardRoot({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
18
- export declare function CardHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
31
+ declare function CompactCard({ title, description, headingLevel, actions, header, titleExtras, footer, children, className, classNames, density, href, target, rel, onPress, isDisabled, actionLabel, actionLabelledBy, actionClassName, renderLink, headerAlign, dividedHeader, flushFooter, ...props }: CardProps): import("react").JSX.Element;
32
+ export declare function CardRoot({ className, classNames, children, density, href, target, rel, onPress, isDisabled, actionLabel, actionLabelledBy, actionClassName, renderLink, ...props }: HTMLAttributes<HTMLDivElement> & CardInteractionProps & StylingProps<'action'>): import("react").JSX.Element;
33
+ export declare function CardHeader({ className, align, divided, ...props }: HTMLAttributes<HTMLDivElement> & {
34
+ align?: 'start' | 'center' | 'end';
35
+ divided?: boolean;
36
+ }): import("react").JSX.Element;
19
37
  export declare function CardHeading({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
20
38
  export declare function CardTitleRow({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
21
39
  export declare function CardTitle({ className, headingLevel, ...props }: HTMLAttributes<HTMLHeadingElement> & {
@@ -24,7 +42,9 @@ export declare function CardTitle({ className, headingLevel, ...props }: HTMLAtt
24
42
  export declare function CardDescription({ className, ...props }: HTMLAttributes<HTMLParagraphElement>): import("react").JSX.Element;
25
43
  export declare function CardActions({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
26
44
  export declare function CardContent({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
27
- export declare function CardFooter({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
45
+ export declare function CardFooter({ className, flush, ...props }: HTMLAttributes<HTMLDivElement> & {
46
+ flush?: boolean;
47
+ }): import("react").JSX.Element;
28
48
  export declare const Card: typeof CompactCard & {
29
49
  Root: typeof CardRoot;
30
50
  Header: typeof CardHeader;
@@ -5,7 +5,7 @@ import { type ReactNode } from 'react';
5
5
  import { type PopoverProps } from 'react-aria-components/Popover';
6
6
  import { type MenuSelectionMode, type MenuPlacement } from './overlay-model.js';
7
7
  import type { DropdownMenuItem } from './dashboard-types.js';
8
- import type { ButtonVariant } from './Button.js';
8
+ import type { ButtonVariant, ButtonSize } from './Button.js';
9
9
  export type DropdownMenuPart = 'root' | 'trigger' | 'panel' | 'list' | 'item' | 'check' | 'icon' | 'text' | 'description' | 'shortcut' | 'arrow' | 'separator' | 'heading' | 'section';
10
10
  export interface DropdownMenuProps extends StylingProps<DropdownMenuPart> {
11
11
  triggerLabel: string;
@@ -19,6 +19,7 @@ export interface DropdownMenuProps extends StylingProps<DropdownMenuPart> {
19
19
  triggerContent?: ReactNode;
20
20
  triggerIconOnly?: boolean;
21
21
  triggerVariant?: ButtonVariant;
22
+ triggerSize?: ButtonSize;
22
23
  renderIcon?: (item: DropdownMenuItem) => ReactNode;
23
24
  selectionMode?: MenuSelectionMode;
24
25
  selectedKeys?: string[];
@@ -1,13 +1,14 @@
1
1
  import { InputRoot, InputGroup, InputPrefix, InputSuffix, type InputCompositionProps } from './control-composition.js';
2
2
  import { type StylingProps } from './styling.js';
3
+ import { InputClearButton } from './input-clear.js';
3
4
  import { type FocusEventHandler, type KeyboardEventHandler, type ReactNode } from 'react';
4
- export type InputSize = 'sm' | 'md' | 'lg';
5
+ export type InputSize = 'xs' | 'sm' | 'dense' | 'md' | 'lg' | 'xl';
5
6
  export type InputType = 'text' | 'email' | 'password' | 'search' | 'tel' | 'url';
6
- export type InputVariant = 'primary' | 'secondary';
7
+ export type InputVariant = 'primary' | 'secondary' | 'flat' | 'sunken';
7
8
  export type InputMode = 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
8
9
  export type InputEnterKeyHint = 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
9
10
  /** A labeled single-line string field. Numeric/date parsing is a separate contract. */
10
- export interface InputProps extends StylingProps<'root' | 'input' | 'control' | 'label' | 'boundary' | 'prefix' | 'suffix' | 'description' | 'error' | 'group'> {
11
+ export interface InputProps extends StylingProps<'root' | 'input' | 'control' | 'label' | 'boundary' | 'prefix' | 'suffix' | 'description' | 'error' | 'group' | 'clearButton'> {
11
12
  label: string;
12
13
  value?: string;
13
14
  defaultValue?: string;
@@ -26,6 +27,9 @@ export interface InputProps extends StylingProps<'root' | 'input' | 'control' |
26
27
  variant?: InputVariant;
27
28
  /** Fill the available width. Defaults to true to preserve the existing field layout. */
28
29
  fullWidth?: boolean;
30
+ hideLabel?: boolean;
31
+ isClearable?: boolean;
32
+ clearLabel?: string;
29
33
  /** Leading/trailing content. Mark decorative icons aria-hidden; name interactive buttons. */
30
34
  prefix?: ReactNode;
31
35
  suffix?: ReactNode;
@@ -54,4 +58,5 @@ export declare const Input: import("react").ForwardRefExoticComponent<(InputComp
54
58
  Group: typeof InputGroup;
55
59
  Prefix: typeof InputPrefix;
56
60
  Suffix: typeof InputSuffix;
61
+ ClearButton: typeof InputClearButton;
57
62
  };
@@ -2,4 +2,4 @@ import type { ReactNode } from 'react';
2
2
  export declare function OverlayDirection({ dir, children }: {
3
3
  dir?: 'ltr' | 'rtl';
4
4
  children: ReactNode;
5
- }): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
5
+ }): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
@@ -3,8 +3,8 @@ import { type StylingProps } from './styling.js';
3
3
  import { type ReactNode } from 'react';
4
4
  import { type SelectOption } from './selection-options.js';
5
5
  export type { SelectOption } from './selection-options.js';
6
- export type SelectSize = 'sm' | 'md' | 'lg';
7
- export type SelectVariant = 'primary' | 'secondary' | 'outline';
6
+ export type SelectSize = 'xs' | 'sm' | 'dense' | 'md' | 'lg' | 'xl';
7
+ export type SelectVariant = 'primary' | 'secondary' | 'outline' | 'flat';
8
8
  interface SelectCommonProps extends StylingProps<'root' | 'label' | 'required' | 'control' | 'trigger' | 'leading' | 'value' | 'indicator' | 'clearButton' | 'clearIcon' | 'popover' | 'list' | 'item' | 'itemLabel' | 'itemDescription' | 'itemIndicator' | 'description' | 'error'> {
9
9
  /** Activates an option even when it is already selected (for linked editors). */
10
10
  onAction?: (value: string) => void;
@@ -1,12 +1,18 @@
1
- import { SwitchComposition, SwitchControl, SwitchThumb, ChoiceContent, type SwitchCompositionProps } from './choice-composition.js';
1
+ import { SwitchComposition, SwitchControl, SwitchThumb, SwitchIcon, ChoiceContent, type SwitchCompositionProps } from './choice-composition.js';
2
2
  import { type StylingProps } from './styling.js';
3
3
  import type { FieldFeedbackProps } from './field.js';
4
- export interface SwitchProps extends FieldFeedbackProps, StylingProps<'root' | 'choice' | 'control' | 'thumb' | 'label' | 'description' | 'error'> {
4
+ import { type SwitchVisualProps } from './switch-visual.js';
5
+ export { SwitchGroup } from './switch-visual.js';
6
+ export interface SwitchProps extends FieldFeedbackProps, SwitchVisualProps, StylingProps<'root' | 'choice' | 'control' | 'thumb' | 'label' | 'description' | 'error'> {
5
7
  label: string;
6
8
  isSelected?: boolean;
7
9
  defaultSelected?: boolean;
8
10
  onChange?: (selected: boolean) => void;
9
11
  isDisabled?: boolean;
12
+ isReadOnly?: boolean;
13
+ isRequired?: boolean;
14
+ validate?: import('react-aria-components/Switch').SwitchFieldProps['validate'];
15
+ validationBehavior?: 'native' | 'aria';
10
16
  name?: string;
11
17
  value?: string;
12
18
  id?: string;
@@ -17,6 +23,7 @@ export declare const Switch: typeof SwitchRoot & {
17
23
  Root: typeof SwitchComposition;
18
24
  Control: typeof SwitchControl;
19
25
  Thumb: typeof SwitchThumb;
26
+ Icon: typeof SwitchIcon;
20
27
  Content: typeof ChoiceContent;
21
28
  };
22
29
  export type { SwitchCompositionProps } from './choice-composition.js';
@@ -13,6 +13,7 @@ export interface TabsProps extends StylingProps<TabsPart> {
13
13
  label: string;
14
14
  variant?: TabsVariant;
15
15
  size?: ButtonSize;
16
+ indicatorShadow?: boolean;
16
17
  orientation?: 'horizontal' | 'vertical';
17
18
  align?: 'start' | 'center' | 'end';
18
19
  fullWidth?: boolean;
@@ -40,10 +41,11 @@ export interface TabsRootProps extends Omit<AriaTabsProps, 'selectedKey' | 'defa
40
41
  onChange?: (value: string) => void;
41
42
  variant?: TabsVariant;
42
43
  size?: ButtonSize;
44
+ indicatorShadow?: boolean;
43
45
  align?: 'start' | 'center' | 'end';
44
46
  fullWidth?: boolean;
45
47
  }
46
- export declare function TabsRoot({ className, classNames, value, defaultValue, onChange, variant, size, align, fullWidth, ...props }: TabsRootProps): import("react").JSX.Element;
48
+ export declare function TabsRoot({ className, classNames, value, defaultValue, onChange, variant, size, align, fullWidth, indicatorShadow, ...props }: TabsRootProps): import("react").JSX.Element;
47
49
  export declare function TabsListContainer({ className, children, previousLabel, nextLabel, ...props }: HTMLAttributes<HTMLDivElement> & {
48
50
  previousLabel?: string;
49
51
  nextLabel?: string;
@@ -0,0 +1,36 @@
1
+ import { type TemporalConstraints, type TemporalKind } from './temporal-model.js';
2
+ import { type StylingProps } from './styling.js';
3
+ export interface TemporalFieldProps extends Omit<TemporalConstraints, 'kind'>, StylingProps<'label' | 'input' | 'segment' | 'description' | 'error'> {
4
+ label: string;
5
+ value?: string | null;
6
+ defaultValue?: string | null;
7
+ onChange?: (value: string | null) => void;
8
+ onError?: (error: string | null) => void;
9
+ locale?: string;
10
+ dir?: 'ltr' | 'rtl';
11
+ hourCycle?: 12 | 24;
12
+ isDisabled?: boolean;
13
+ isReadOnly?: boolean;
14
+ isInvalid?: boolean;
15
+ name?: string;
16
+ id?: string;
17
+ description?: string;
18
+ errorMessage?: string;
19
+ hideLabel?: boolean;
20
+ /** Disable only when this field edits an uncommitted picker draft. */
21
+ formValidation?: boolean;
22
+ }
23
+ export declare function TemporalField({ kind, ...props }: TemporalFieldProps & {
24
+ kind: TemporalKind;
25
+ }): import("react").JSX.Element;
26
+ export declare function DateField(props: TemporalFieldProps): import("react").JSX.Element;
27
+ export declare function TimeField(props: TemporalFieldProps): import("react").JSX.Element;
28
+ export declare function DateTimeField(props: TemporalFieldProps): import("react").JSX.Element;
29
+ export interface TemporalRangeFieldProps extends Omit<TemporalFieldProps, 'value' | 'defaultValue' | 'onChange'> {
30
+ value?: import('./temporal-model.js').TemporalRange | null;
31
+ defaultValue?: import('./temporal-model.js').TemporalRange | null;
32
+ onChange?: (value: import('./temporal-model.js').TemporalRange | null) => void;
33
+ }
34
+ export declare function DateRangeField(props: TemporalRangeFieldProps): import("react").JSX.Element;
35
+ export declare function TimeRangeField(props: TemporalRangeFieldProps): import("react").JSX.Element;
36
+ export declare function DateTimeRangeField(props: TemporalRangeFieldProps): import("react").JSX.Element;
@@ -0,0 +1,137 @@
1
+ import { type ReactNode, type HTMLAttributes, type ButtonHTMLAttributes } from 'react';
2
+ import { type ButtonProps } from 'react-aria-components/Button';
3
+ import { MonthPicker, YearPicker } from './Calendar.js';
4
+ import { type TemporalFieldProps } from './TemporalField.js';
5
+ import { type StylingProps } from './styling.js';
6
+ import { type TemporalConstraints, type TemporalRange } from './temporal-model.js';
7
+ export type TemporalValue = string | TemporalRange;
8
+ export interface TemporalPreset<T> {
9
+ id: string;
10
+ label: string;
11
+ value: T | null;
12
+ }
13
+ export interface TemporalPickerOptions extends Omit<TemporalConstraints, 'kind'>, StylingProps<'label' | 'trigger' | 'value' | 'panel' | 'content' | 'field' | 'calendar' | 'time' | 'footer' | 'applyButton' | 'cancelButton' | 'clearButton' | 'preset' | 'description' | 'error'> {
14
+ label: string;
15
+ locale?: string;
16
+ dir?: 'ltr' | 'rtl';
17
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
18
+ hourCycle?: 12 | 24;
19
+ display?: 'inline' | 'popover' | 'dialog' | 'auto';
20
+ commitMode?: 'apply' | 'immediate';
21
+ isDisabled?: boolean;
22
+ isReadOnly?: boolean;
23
+ isInvalid?: boolean;
24
+ hideLabel?: boolean;
25
+ name?: string;
26
+ description?: string;
27
+ errorMessage?: string;
28
+ open?: boolean;
29
+ defaultOpen?: boolean;
30
+ onOpenChange?: (open: boolean) => void;
31
+ onError?: (error: string | null) => void;
32
+ visibleMonths?: 1 | 2;
33
+ weekStartsOn?: 0 | 1;
34
+ referenceDate?: string;
35
+ timePresentation?: 'list' | 'clock';
36
+ showInputs?: boolean;
37
+ showActions?: boolean;
38
+ children?: ReactNode;
39
+ formatValue?: (value: TemporalValue, locale: string) => string;
40
+ }
41
+ export interface TemporalPickerProps<T extends TemporalValue = string> extends TemporalPickerOptions {
42
+ value?: T | null;
43
+ defaultValue?: T | null;
44
+ onChange?: (value: T | null) => void;
45
+ onApply?: (value: T | null) => void;
46
+ presets?: TemporalPreset<T>[];
47
+ }
48
+ export declare function TemporalPickerField({ part, ...props }: Partial<TemporalFieldProps> & {
49
+ part?: 'start' | 'end';
50
+ }): import("react").JSX.Element;
51
+ export declare function TemporalPickerCalendar(props: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
52
+ export declare function TemporalPickerTime({ part, ...props }: HTMLAttributes<HTMLDivElement> & {
53
+ part?: 'start' | 'end';
54
+ }): import("react").JSX.Element;
55
+ export declare function TemporalPickerValue({ children, className, ...props }: HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
56
+ export declare function TemporalPickerTrigger({ children, className, ...props }: Omit<ButtonProps, 'children' | 'className'> & {
57
+ children?: ReactNode;
58
+ className?: string;
59
+ }): import("react").JSX.Element;
60
+ export declare function TemporalPickerContent({ children, className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
61
+ export declare function TemporalPickerPopover({ children, className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
62
+ export declare const TemporalPickerApplyButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element, TemporalPickerCancelButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element, TemporalPickerClearButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element;
63
+ export declare const DatePicker: ((props: TemporalPickerProps<string>) => import("react").JSX.Element) & {
64
+ Root: (props: TemporalPickerProps<string>) => import("react").JSX.Element;
65
+ Trigger: typeof TemporalPickerTrigger;
66
+ Value: typeof TemporalPickerValue;
67
+ Popover: typeof TemporalPickerPopover;
68
+ Content: typeof TemporalPickerContent;
69
+ Field: typeof TemporalPickerField;
70
+ Calendar: typeof TemporalPickerCalendar;
71
+ Time: typeof TemporalPickerTime;
72
+ MonthPicker: typeof MonthPicker;
73
+ YearPicker: typeof YearPicker;
74
+ ApplyButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element;
75
+ CancelButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element;
76
+ ClearButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element;
77
+ };
78
+ export declare const TimePicker: ((props: TemporalPickerProps<string>) => import("react").JSX.Element) & {
79
+ Root: (props: TemporalPickerProps<string>) => import("react").JSX.Element;
80
+ Trigger: typeof TemporalPickerTrigger;
81
+ Value: typeof TemporalPickerValue;
82
+ Popover: typeof TemporalPickerPopover;
83
+ Content: typeof TemporalPickerContent;
84
+ Field: typeof TemporalPickerField;
85
+ Calendar: typeof TemporalPickerCalendar;
86
+ Time: typeof TemporalPickerTime;
87
+ MonthPicker: typeof MonthPicker;
88
+ YearPicker: typeof YearPicker;
89
+ ApplyButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element;
90
+ CancelButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element;
91
+ ClearButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element;
92
+ };
93
+ export declare const TimeRangePicker: ((props: TemporalPickerProps<TemporalRange>) => import("react").JSX.Element) & {
94
+ Root: (props: TemporalPickerProps<TemporalRange>) => import("react").JSX.Element;
95
+ Trigger: typeof TemporalPickerTrigger;
96
+ Value: typeof TemporalPickerValue;
97
+ Popover: typeof TemporalPickerPopover;
98
+ Content: typeof TemporalPickerContent;
99
+ Field: typeof TemporalPickerField;
100
+ Calendar: typeof TemporalPickerCalendar;
101
+ Time: typeof TemporalPickerTime;
102
+ MonthPicker: typeof MonthPicker;
103
+ YearPicker: typeof YearPicker;
104
+ ApplyButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element;
105
+ CancelButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element;
106
+ ClearButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element;
107
+ };
108
+ export declare const DateTimePicker: ((props: TemporalPickerProps<string>) => import("react").JSX.Element) & {
109
+ Root: (props: TemporalPickerProps<string>) => import("react").JSX.Element;
110
+ Trigger: typeof TemporalPickerTrigger;
111
+ Value: typeof TemporalPickerValue;
112
+ Popover: typeof TemporalPickerPopover;
113
+ Content: typeof TemporalPickerContent;
114
+ Field: typeof TemporalPickerField;
115
+ Calendar: typeof TemporalPickerCalendar;
116
+ Time: typeof TemporalPickerTime;
117
+ MonthPicker: typeof MonthPicker;
118
+ YearPicker: typeof YearPicker;
119
+ ApplyButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element;
120
+ CancelButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element;
121
+ ClearButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element;
122
+ };
123
+ export declare const DateTimeRangePicker: ((props: TemporalPickerProps<TemporalRange>) => import("react").JSX.Element) & {
124
+ Root: (props: TemporalPickerProps<TemporalRange>) => import("react").JSX.Element;
125
+ Trigger: typeof TemporalPickerTrigger;
126
+ Value: typeof TemporalPickerValue;
127
+ Popover: typeof TemporalPickerPopover;
128
+ Content: typeof TemporalPickerContent;
129
+ Field: typeof TemporalPickerField;
130
+ Calendar: typeof TemporalPickerCalendar;
131
+ Time: typeof TemporalPickerTime;
132
+ MonthPicker: typeof MonthPicker;
133
+ YearPicker: typeof YearPicker;
134
+ ApplyButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element;
135
+ CancelButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element;
136
+ ClearButton: ({ children, className, onClick, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element;
137
+ };
@@ -0,0 +1,14 @@
1
+ import { type HTMLAttributes } from 'react';
2
+ import { type TemporalConstraints } from './temporal-model.js';
3
+ export interface TimeControlProps extends Omit<TemporalConstraints, 'kind'>, Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
4
+ value?: string | null;
5
+ defaultValue?: string | null;
6
+ onChange?: (value: string) => void;
7
+ label?: string;
8
+ locale?: string;
9
+ hourCycle?: 12 | 24;
10
+ isDisabled?: boolean;
11
+ isReadOnly?: boolean;
12
+ }
13
+ export declare function TimeList({ value, defaultValue, onChange, label, locale, hourCycle, isDisabled, isReadOnly, className, minTime, maxTime, hourStep, minuteStep, secondStep, granularity, isTimeUnavailable, ...props }: TimeControlProps): import("react").JSX.Element;
14
+ export declare function TimeClock({ value, defaultValue, onChange, label, locale, hourCycle, isDisabled, isReadOnly, className, minTime, maxTime, hourStep, minuteStep, secondStep, granularity, isTimeUnavailable, ...props }: TimeControlProps): import("react").JSX.Element;
@@ -2,7 +2,7 @@ import { type StylingProps } from './styling.js';
2
2
  import { type ReactNode } from 'react';
3
3
  import { type ToggleButtonRenderProps as AriaRenderProps } from 'react-aria-components/ToggleButton';
4
4
  import type { ButtonPressEvent, ButtonSize } from './Button.js';
5
- export type ToggleButtonVariant = 'default' | 'ghost';
5
+ export type ToggleButtonVariant = 'default' | 'ghost' | 'chip';
6
6
  export type ToggleButtonRenderProps = Omit<AriaRenderProps, 'state'>;
7
7
  export interface ToggleButtonProps extends StylingProps {
8
8
  id?: string;
@@ -21,4 +21,5 @@ export interface ToggleButtonProps extends StylingProps {
21
21
  autoFocus?: boolean;
22
22
  }
23
23
  export declare const ToggleButtonSizeContext: import("react").Context<ButtonSize>;
24
+ export declare const ToggleButtonVariantContext: import("react").Context<ToggleButtonVariant>;
24
25
  export declare function ToggleButton({ children, variant, size, isIconOnly, className: consumerClassName, classNames, style, ...props }: ToggleButtonProps): import("react").JSX.Element;
@@ -1,11 +1,13 @@
1
1
  import { type StylingProps } from './styling.js';
2
2
  import type { ReactNode } from 'react';
3
3
  import type { ButtonSize } from './Button.js';
4
+ import { type ToggleButtonVariant } from './ToggleButton.js';
4
5
  import { ButtonGroupSeparator } from './ButtonGroup.js';
5
6
  interface Common extends StylingProps {
6
7
  label: string;
7
8
  children: ReactNode;
8
9
  size?: ButtonSize;
10
+ variant?: ToggleButtonVariant;
9
11
  isDisabled?: boolean;
10
12
  isDetached?: boolean;
11
13
  fullWidth?: boolean;
@@ -2,6 +2,7 @@ import { type HTMLAttributes } from 'react';
2
2
  import { type CheckboxProps as AriaCheckboxProps } from 'react-aria-components/Checkbox';
3
3
  import { type SwitchFieldProps } from 'react-aria-components/Switch';
4
4
  import { type RadioGroupProps as AriaRadioGroupProps, type RadioProps } from 'react-aria-components/RadioGroup';
5
+ import { type SwitchVisualProps } from './switch-visual.js';
5
6
  type ChoiceElementProps = HTMLAttributes<HTMLSpanElement>;
6
7
  export type CheckboxCompositionProps = Omit<AriaCheckboxProps, 'className'> & {
7
8
  className?: string;
@@ -11,13 +12,15 @@ export declare function CheckboxComposition({ className, children, ...props }: C
11
12
  export declare function CheckboxControl({ className, ...props }: ChoiceElementProps): import("react").JSX.Element;
12
13
  export declare function CheckboxIndicator({ className, children, ...props }: ChoiceElementProps): import("react").JSX.Element;
13
14
  export declare function ChoiceContent({ className, ...props }: ChoiceElementProps): import("react").JSX.Element;
14
- export type SwitchCompositionProps = Omit<SwitchFieldProps, 'className'> & {
15
+ export type SwitchCompositionProps = Omit<SwitchFieldProps, 'className' | 'children'> & SwitchVisualProps & {
15
16
  className?: string;
16
17
  label?: never;
18
+ children?: import('react').ReactNode | ((state: import('react-aria-components/Switch').SwitchFieldRenderProps & Partial<import('react-aria-components/Switch').SwitchButtonRenderProps>) => import('react').ReactNode);
17
19
  };
18
- export declare function SwitchComposition({ className, children, ...props }: SwitchCompositionProps): import("react").JSX.Element;
20
+ export declare function SwitchComposition({ className, children, size, tone, variant, ...props }: SwitchCompositionProps): import("react").JSX.Element;
19
21
  export declare function SwitchControl({ className, ...props }: ChoiceElementProps): import("react").JSX.Element;
20
22
  export declare function SwitchThumb({ className, ...props }: ChoiceElementProps): import("react").JSX.Element;
23
+ export declare function SwitchIcon({ className, ...props }: ChoiceElementProps): import("react").JSX.Element;
21
24
  export type RadioGroupCompositionProps = Omit<AriaRadioGroupProps, 'className'> & {
22
25
  className?: string;
23
26
  options?: never;
@@ -17,8 +17,8 @@ export type SelectCompositionProps<M extends 'single' | 'multiple' = 'single'> =
17
17
  defaultValue?: AriaSelectProps<object, M>['defaultValue'];
18
18
  onChange?: (value: M extends 'multiple' ? string[] : string | null) => void;
19
19
  onClear?: () => void;
20
- size?: 'sm' | 'md' | 'lg';
21
- variant?: 'primary' | 'secondary' | 'outline';
20
+ size?: import('./Select.js').SelectSize;
21
+ variant?: import('./Select.js').SelectVariant;
22
22
  fullWidth?: boolean;
23
23
  hideLabel?: boolean;
24
24
  };
@@ -56,10 +56,11 @@ export declare function FieldError({ className, ...props }: Omit<FieldErrorProps
56
56
  export type InputCompositionProps = Omit<TextFieldProps, 'className'> & {
57
57
  className?: string;
58
58
  label?: never;
59
+ size?: import('./Input.js').InputSize;
60
+ variant?: import('./Input.js').InputVariant;
61
+ hideLabel?: boolean;
59
62
  };
60
- export declare function InputRoot({ className, ...props }: Omit<TextFieldProps, 'className'> & {
61
- className?: string;
62
- }): import("react").JSX.Element;
63
+ export declare function InputRoot({ className, size, variant, hideLabel, value, defaultValue, onChange, ...props }: Omit<InputCompositionProps, 'label'>): import("react").JSX.Element;
63
64
  export declare const InputControlRefContext: import("react").Context<Ref<HTMLInputElement> | undefined>;
64
65
  export declare const InputControl: import("react").ForwardRefExoticComponent<Omit<AriaInputProps, "className"> & {
65
66
  className?: string;