@kazee-ds/react 0.5.5 → 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.
- package/README.md +3 -1
- package/dist/index.js +4742 -1012
- package/dist/index.js.map +1 -1
- package/dist/types/Alert.d.ts +20 -4
- package/dist/types/Avatar.d.ts +42 -0
- package/dist/types/AvatarGroup.d.ts +18 -0
- package/dist/types/Badge.d.ts +23 -4
- package/dist/types/Breadcrumb.d.ts +24 -2
- package/dist/types/Button.d.ts +4 -3
- package/dist/types/ButtonGroup.d.ts +4 -3
- package/dist/types/Calendar.d.ts +60 -0
- package/dist/types/Card.d.ts +49 -4
- package/dist/types/Chart.d.ts +13 -2
- package/dist/types/Checkbox.d.ts +11 -2
- package/dist/types/Combobox.d.ts +13 -3
- package/dist/types/DataTable.d.ts +23 -2
- package/dist/types/DateRangePicker.d.ts +20 -2
- package/dist/types/Dialog.d.ts +20 -2
- package/dist/types/DropdownMenu.d.ts +23 -3
- package/dist/types/Empty.d.ts +12 -2
- package/dist/types/FieldComponent.d.ts +3 -2
- package/dist/types/Form.d.ts +3 -2
- package/dist/types/Input.d.ts +19 -4
- package/dist/types/Label.d.ts +4 -3
- package/dist/types/Listbox.d.ts +11 -2
- package/dist/types/NumberField.d.ts +12 -2
- package/dist/types/OverlayDirection.d.ts +1 -1
- package/dist/types/Pagination.d.ts +29 -2
- package/dist/types/Popover.d.ts +19 -2
- package/dist/types/RadioGroup.d.ts +12 -2
- package/dist/types/Select.d.ts +19 -7
- package/dist/types/SelectGroup.d.ts +3 -2
- package/dist/types/Separator.d.ts +2 -1
- package/dist/types/Sidebar.d.ts +16 -2
- package/dist/types/Skeleton.d.ts +2 -1
- package/dist/types/Spinner.d.ts +3 -2
- package/dist/types/Switch.d.ts +18 -2
- package/dist/types/Table.d.ts +16 -2
- package/dist/types/Tabs.d.ts +38 -3
- package/dist/types/TemporalField.d.ts +36 -0
- package/dist/types/TemporalPicker.d.ts +137 -0
- package/dist/types/Textarea.d.ts +13 -2
- package/dist/types/TimeControls.d.ts +14 -0
- package/dist/types/Toast.d.ts +31 -7
- package/dist/types/ToggleButton.d.ts +5 -3
- package/dist/types/ToggleButtonGroup.d.ts +4 -1
- package/dist/types/ToggleGroup.d.ts +18 -3
- package/dist/types/Tooltip.d.ts +12 -2
- package/dist/types/choice-composition.d.ts +35 -0
- package/dist/types/combobox-composition.d.ts +22 -0
- package/dist/types/control-composition.d.ts +73 -0
- package/dist/types/date-range-composition.d.ts +46 -0
- package/dist/types/date-range-model.d.ts +3 -1
- package/dist/types/field.d.ts +6 -1
- package/dist/types/index.d.ts +46 -1
- package/dist/types/input-clear.d.ts +24 -0
- package/dist/types/label-context.d.ts +8 -0
- package/dist/types/layout-parts.d.ts +44 -0
- package/dist/types/number-composition.d.ts +24 -0
- package/dist/types/structural-parts.d.ts +56 -0
- package/dist/types/styling.d.ts +8 -0
- package/dist/types/switch-visual.d.ts +21 -0
- package/dist/types/temporal-model.d.ts +44 -0
- package/dist/types/toggle-group-model.d.ts +1 -1
- package/dist/types/visual-slot.d.ts +3 -0
- package/dist/types/visual.d.ts +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type ComponentProps, type HTMLAttributes, type TableHTMLAttributes, type ThHTMLAttributes, type TdHTMLAttributes, type SVGAttributes } from 'react';
|
|
2
|
+
import { DialogTrigger, Dialog, Heading } from 'react-aria-components/Dialog';
|
|
3
|
+
import { Button } from 'react-aria-components/Button';
|
|
4
|
+
import { TooltipTrigger } from 'react-aria-components/Tooltip';
|
|
5
|
+
import { MenuTrigger, type MenuProps } from 'react-aria-components/Menu';
|
|
6
|
+
import { Text } from 'react-aria-components/Text';
|
|
7
|
+
export type DialogRootProps = Omit<ComponentProps<typeof DialogTrigger>, 'isOpen' | 'defaultOpen'> & {
|
|
8
|
+
open?: boolean;
|
|
9
|
+
defaultOpen?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function DialogRoot({ open, defaultOpen, ...props }: DialogRootProps): import("react").JSX.Element;
|
|
12
|
+
export declare const DialogTriggerPart: ({ className, ...props }: import("react-aria-components").ButtonProps & import("react").RefAttributes<HTMLButtonElement>) => import("react").ReactElement<import("react-aria-components").ButtonProps & import("react").RefAttributes<HTMLButtonElement>, string | import("react").JSXElementConstructor<any>>;
|
|
13
|
+
export declare const DialogBackdrop: ({ className, ...props }: import("react-aria-components").ModalOverlayProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<import("react-aria-components").ModalOverlayProps & import("react").RefAttributes<HTMLDivElement>, string | import("react").JSXElementConstructor<any>>;
|
|
14
|
+
export declare const DialogPanel: ({ className, ...props }: import("react-aria-components").ModalOverlayProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<import("react-aria-components").ModalOverlayProps & import("react").RefAttributes<HTMLDivElement>, string | import("react").JSXElementConstructor<any>>;
|
|
15
|
+
export declare function DialogContent(props: ComponentProps<typeof Dialog>): import("react").JSX.Element;
|
|
16
|
+
export declare const OverlayHeader: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react").JSX.Element;
|
|
17
|
+
export declare const OverlayBody: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react").JSX.Element;
|
|
18
|
+
export declare const OverlayFooter: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react").JSX.Element;
|
|
19
|
+
export declare function OverlayHeading({ level, slot, ...props }: ComponentProps<typeof Heading>): import("react").JSX.Element;
|
|
20
|
+
export declare function OverlayDescription({ className, slot, id, ...props }: ComponentProps<typeof Text>): import("react").JSX.Element;
|
|
21
|
+
export declare function DialogCloseButton({ slot, ...props }: ComponentProps<typeof Button>): import("react").JSX.Element;
|
|
22
|
+
export declare const PopoverTrigger: ({ className, ...props }: import("react-aria-components").ButtonProps & import("react").RefAttributes<HTMLButtonElement>) => import("react").ReactElement<import("react-aria-components").ButtonProps & import("react").RefAttributes<HTMLButtonElement>, string | import("react").JSXElementConstructor<any>>;
|
|
23
|
+
export declare const PopoverContent: ({ className, ...props }: import("react-aria-components").PopoverProps & import("react").RefAttributes<HTMLElement>) => import("react").ReactElement<import("react-aria-components").PopoverProps & import("react").RefAttributes<HTMLElement>, string | import("react").JSXElementConstructor<any>>;
|
|
24
|
+
export declare function PopoverDialog(props: ComponentProps<typeof Dialog>): import("react").JSX.Element;
|
|
25
|
+
export declare function PopoverCloseButton({ slot, ...props }: ComponentProps<typeof Button>): import("react").JSX.Element;
|
|
26
|
+
export type TooltipRootProps = Omit<ComponentProps<typeof TooltipTrigger>, 'isOpen' | 'defaultOpen'> & {
|
|
27
|
+
open?: boolean;
|
|
28
|
+
defaultOpen?: boolean;
|
|
29
|
+
};
|
|
30
|
+
export declare function TooltipRoot({ open, defaultOpen, ...props }: TooltipRootProps): import("react").JSX.Element;
|
|
31
|
+
export declare const TooltipTriggerPart: ({ className, ...props }: import("react-aria-components").ButtonProps & import("react").RefAttributes<HTMLButtonElement>) => import("react").ReactElement<import("react-aria-components").ButtonProps & import("react").RefAttributes<HTMLButtonElement>, string | import("react").JSXElementConstructor<any>>;
|
|
32
|
+
export declare const TooltipContent: ({ className, ...props }: import("react-aria-components").TooltipProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<import("react-aria-components").TooltipProps & import("react").RefAttributes<HTMLDivElement>, string | import("react").JSXElementConstructor<any>>;
|
|
33
|
+
export type DropdownRootProps = Omit<ComponentProps<typeof MenuTrigger>, 'isOpen' | 'defaultOpen'> & {
|
|
34
|
+
open?: boolean;
|
|
35
|
+
defaultOpen?: boolean;
|
|
36
|
+
};
|
|
37
|
+
export declare function DropdownRoot({ open, defaultOpen, ...props }: DropdownRootProps): import("react").JSX.Element;
|
|
38
|
+
export declare const DropdownTrigger: ({ className, ...props }: import("react-aria-components").ButtonProps & import("react").RefAttributes<HTMLButtonElement>) => import("react").ReactElement<import("react-aria-components").ButtonProps & import("react").RefAttributes<HTMLButtonElement>, string | import("react").JSXElementConstructor<any>>;
|
|
39
|
+
export declare const DropdownPopover: ({ className, ...props }: import("react-aria-components").PopoverProps & import("react").RefAttributes<HTMLElement>) => import("react").ReactElement<import("react-aria-components").PopoverProps & import("react").RefAttributes<HTMLElement>, string | import("react").JSXElementConstructor<any>>;
|
|
40
|
+
export declare function DropdownList<T extends object>(props: MenuProps<T>): import("react").JSX.Element;
|
|
41
|
+
export declare const DropdownItem: ({ className, ...props }: import("react-aria-components").MenuItemProps<unknown> & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<import("react-aria-components").MenuItemProps<unknown> & import("react").RefAttributes<HTMLDivElement>, string | import("react").JSXElementConstructor<any>>;
|
|
42
|
+
export declare const DropdownSection: <T>(props: import("react-aria-components").MenuSectionProps<T> & React.RefAttributes<HTMLElement>) => import("react").ReactElement | null;
|
|
43
|
+
export declare const DropdownHeading: ({ className, ...props }: import("react-aria-components").HeaderProps & import("react").RefAttributes<HTMLElement>) => import("react").ReactElement<import("react-aria-components").HeaderProps & import("react").RefAttributes<HTMLElement>, string | import("react").JSXElementConstructor<any>>;
|
|
44
|
+
export declare const DropdownSeparator: ({ className, ...props }: import("react-aria-components").SeparatorProps & import("react").RefAttributes<HTMLElement>) => import("react").ReactElement<import("react-aria-components").SeparatorProps & import("react").RefAttributes<HTMLElement>, string | import("react").JSXElementConstructor<any>>;
|
|
45
|
+
export declare const DropdownSubmenuTrigger: (props: import("react-aria-components").SubmenuTriggerProps & React.RefAttributes<HTMLDivElement>) => import("react").ReactElement | null;
|
|
46
|
+
export declare function DropdownItemIndicator({ className, children, ...props }: SVGAttributes<SVGSVGElement>): import("react").JSX.Element;
|
|
47
|
+
export declare function DropdownSubmenuIndicator({ className, children, ...props }: SVGAttributes<SVGSVGElement>): import("react").JSX.Element;
|
|
48
|
+
export declare function TableRoot({ className, ...props }: TableHTMLAttributes<HTMLTableElement>): import("react").JSX.Element;
|
|
49
|
+
export declare function TableScrollContainer({ className, 'aria-label': label, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
50
|
+
export declare function TableHeader(props: HTMLAttributes<HTMLTableSectionElement>): import("react").JSX.Element;
|
|
51
|
+
export declare function TableBody(props: HTMLAttributes<HTMLTableSectionElement>): import("react").JSX.Element;
|
|
52
|
+
export declare function TableFooter(props: HTMLAttributes<HTMLTableSectionElement>): import("react").JSX.Element;
|
|
53
|
+
export declare function TableRow(props: HTMLAttributes<HTMLTableRowElement>): import("react").JSX.Element;
|
|
54
|
+
export declare function TableColumn({ scope, ...props }: ThHTMLAttributes<HTMLTableCellElement>): import("react").JSX.Element;
|
|
55
|
+
export declare function TableCell(props: TdHTMLAttributes<HTMLTableCellElement>): import("react").JSX.Element;
|
|
56
|
+
export declare function TableCaption({ className, ...props }: HTMLAttributes<HTMLTableCaptionElement>): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
/** Stable public styling slots; classes are applied directly to their owning element. */
|
|
3
|
+
export interface StylingProps<Part extends string = never> {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
classNames?: Partial<Record<Part | 'root', string>>;
|
|
7
|
+
}
|
|
8
|
+
export declare function partClass(base: string, override?: string): string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
import type { Tone, ComponentSize } from './visual.js';
|
|
3
|
+
export interface SwitchVisualProps {
|
|
4
|
+
size?: ComponentSize;
|
|
5
|
+
tone?: Tone;
|
|
6
|
+
variant?: 'default' | 'outline';
|
|
7
|
+
}
|
|
8
|
+
export declare const SwitchVisualContext: import("react").Context<SwitchVisualProps & {
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function SwitchGroup({ size, tone, variant, isDisabled, orientation, className, ...props }: HTMLAttributes<HTMLDivElement> & SwitchVisualProps & {
|
|
12
|
+
label?: string;
|
|
13
|
+
orientation?: 'horizontal' | 'vertical';
|
|
14
|
+
isDisabled?: boolean;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
export declare function useSwitchVisual(props: SwitchVisualProps): {
|
|
17
|
+
size: ComponentSize;
|
|
18
|
+
tone: Tone;
|
|
19
|
+
variant: "default" | "outline";
|
|
20
|
+
disabled: boolean | undefined;
|
|
21
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type TemporalKind = 'date' | 'time' | 'datetime';
|
|
2
|
+
export interface TemporalRange {
|
|
3
|
+
start: string;
|
|
4
|
+
end: string;
|
|
5
|
+
}
|
|
6
|
+
export type TemporalError = 'invalid' | 'required' | 'incomplete' | 'order' | 'bounds' | 'unavailable' | 'step';
|
|
7
|
+
export interface TemporalConstraints {
|
|
8
|
+
kind: TemporalKind;
|
|
9
|
+
minDate?: string;
|
|
10
|
+
maxDate?: string;
|
|
11
|
+
minTime?: string;
|
|
12
|
+
maxTime?: string;
|
|
13
|
+
minDateTime?: string;
|
|
14
|
+
maxDateTime?: string;
|
|
15
|
+
isDateUnavailable?: (date: string) => boolean;
|
|
16
|
+
isTimeUnavailable?: (time: string) => boolean;
|
|
17
|
+
isRequired?: boolean;
|
|
18
|
+
hourStep?: number;
|
|
19
|
+
minuteStep?: number;
|
|
20
|
+
secondStep?: number;
|
|
21
|
+
granularity?: 'hour' | 'minute' | 'second';
|
|
22
|
+
timeZone?: string;
|
|
23
|
+
disambiguation?: 'compatible' | 'earlier' | 'later' | 'reject';
|
|
24
|
+
}
|
|
25
|
+
/** Wall time is resolved explicitly; DST gaps/overlaps reject by default. */
|
|
26
|
+
export declare function toZonedValue(value: string, timeZone?: string, disambiguation?: TemporalConstraints['disambiguation']): string;
|
|
27
|
+
export declare function toLocalValue(value: string, timeZone?: string, seconds?: boolean): string;
|
|
28
|
+
export declare function temporalError(value: string | null, options: TemporalConstraints): TemporalError | null;
|
|
29
|
+
export declare function temporalRangeError(value: TemporalRange | null, options: TemporalConstraints): TemporalError | null;
|
|
30
|
+
/** Project instant boundaries into the selected display zone for disabled calendar/time options. */
|
|
31
|
+
export declare function temporalDisplayBounds(options: TemporalConstraints, selectedDate?: string): {
|
|
32
|
+
minDate: string | undefined;
|
|
33
|
+
maxDate: string | undefined;
|
|
34
|
+
minTime: string | undefined;
|
|
35
|
+
maxTime: string | undefined;
|
|
36
|
+
};
|
|
37
|
+
/** Minute-granularity list; seconds are edited with TimeField/TimeClock to avoid 86k DOM options. */
|
|
38
|
+
export declare function timeChoices(options: TemporalConstraints): string[];
|
|
39
|
+
/** User edits zero units hidden by the configured field granularity. */
|
|
40
|
+
export declare function normalizeTime(value: string, granularity?: TemporalConstraints['granularity']): string;
|
|
41
|
+
export declare function normalizeWallDateTime(value: string, granularity?: TemporalConstraints['granularity']): string;
|
|
42
|
+
/** Keep the selected unit and choose the nearest complete valid time for the other units. */
|
|
43
|
+
export declare function resolveTimeUnit(value: string, part: 'hour' | 'minute' | 'second', selected: number, options: TemporalConstraints): string | null;
|
|
44
|
+
export declare function temporalMessages(locale?: string): Record<TemporalError, string>;
|
|
@@ -4,6 +4,6 @@ export interface ToggleGroupItem {
|
|
|
4
4
|
isDisabled?: boolean;
|
|
5
5
|
}
|
|
6
6
|
export type ToggleGroupMode = 'single' | 'multiple';
|
|
7
|
-
export type ToggleGroupVariant = 'outline' | 'ghost';
|
|
7
|
+
export type ToggleGroupVariant = 'outline' | 'ghost' | 'chip';
|
|
8
8
|
/** Normalize IDs without discarding existing disabled selections. */
|
|
9
9
|
export declare function toggleIds(value: unknown, items: ToggleGroupItem[], multiple: boolean): string[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
2
|
+
/** Decorate one child while preserving its handlers and ref. */
|
|
3
|
+
export declare function visualSlot(children: ReactNode, props: Record<string, unknown>): ReactElement<Record<string, unknown>, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type Tone = 'neutral' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
|
|
2
|
+
export type ComponentSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
export type IndicatorPlacement = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
4
|
+
export type AvatarVariant = 'default' | 'soft';
|
|
5
|
+
export type ImageLoadingStatus = 'idle' | 'loading' | 'loaded' | 'error';
|