@kazee-ds/react 0.11.0 → 0.12.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 -3
- package/dist/index.js +85 -28
- package/dist/index.js.map +1 -1
- package/dist/types/Combobox.d.ts +4 -1
- package/dist/types/DateRangePicker.d.ts +2 -1
- package/dist/types/Select.d.ts +4 -1
- package/dist/types/TemporalPicker.d.ts +4 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/popover-position.d.ts +16 -0
- package/package.json +1 -1
package/dist/types/Combobox.d.ts
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { ComboboxComposition, ComboboxInputGroup, ComboboxInput, ComboboxTrigger, ComboboxPopover, ComboboxClearButton, type ComboboxCompositionProps } from './combobox-composition.js';
|
|
2
2
|
import { type StylingProps } from './styling.js';
|
|
3
|
+
import { type PopoverPositionOptions, type PopoverWidth } from './popover-position.js';
|
|
3
4
|
import { type ReactNode } from 'react';
|
|
4
5
|
import type { SelectSize, SelectVariant } from './Select.js';
|
|
5
6
|
import { type SelectOption } from './selection-options.js';
|
|
6
|
-
export interface ComboboxProps extends StylingProps<'root' | 'label' | 'required' | 'control' | 'leading' | 'input' | 'clearButton' | 'clearIcon' | 'trigger' | 'indicator' | 'popover' | 'list' | 'empty' | 'item' | 'itemLabel' | 'itemDescription' | 'itemIndicator' | 'description' | 'error'> {
|
|
7
|
+
export interface ComboboxProps extends PopoverPositionOptions, StylingProps<'root' | 'label' | 'required' | 'control' | 'leading' | 'input' | 'clearButton' | 'clearIcon' | 'trigger' | 'indicator' | 'popover' | 'list' | 'empty' | 'item' | 'itemLabel' | 'itemDescription' | 'itemIndicator' | 'description' | 'error'> {
|
|
7
8
|
label: string;
|
|
8
9
|
size?: SelectSize;
|
|
9
10
|
variant?: SelectVariant;
|
|
10
11
|
hideLabel?: boolean;
|
|
11
12
|
fullWidth?: boolean;
|
|
12
13
|
maxHeight?: number;
|
|
14
|
+
/** `trigger` (default) matches the input group; `content` grows with the options. */
|
|
15
|
+
popoverWidth?: PopoverWidth;
|
|
13
16
|
menuTrigger?: 'input' | 'focus' | 'manual';
|
|
14
17
|
selectOnFocus?: boolean;
|
|
15
18
|
disallowEmptySelection?: boolean;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { DateRangeTrigger, DateRangeValue, DateRangeIndicator, DateRangePopover, DateRangeContent, DateRangeCalendar, DateRangeInput, DateRangeApplyButton, DateRangeClearButton, DateRangeCancelButton } from './date-range-composition.js';
|
|
2
2
|
import { type StylingProps } from './styling.js';
|
|
3
3
|
import { type ReactNode } from 'react';
|
|
4
|
+
import { type PopoverPositionOptions } from './popover-position.js';
|
|
4
5
|
import { type DateRange, type DateRangeOptions } from './date-range-model.js';
|
|
5
|
-
export interface DateRangePickerProps extends DateRangeOptions, StylingProps<'root' | 'content' | 'intro' | 'summary' | 'body' | 'presets' | 'preset' | 'main' | 'inputs' | 'field' | 'input' | 'inputLabel' | 'monthSelect' | 'yearInput' | 'title' | 'draftError' | 'jump' | 'calendar' | 'navigation' | 'navigationButton' | 'months' | 'month' | 'heading' | 'grid' | 'weekday' | 'day' | 'validation' | 'footer' | 'clearButton' | 'cancelButton' | 'applyButton' | 'label' | 'panel' | 'trigger' | 'icon' | 'value' | 'chevron' | 'dialog' | 'description' | 'error'> {
|
|
6
|
+
export interface DateRangePickerProps extends DateRangeOptions, PopoverPositionOptions, StylingProps<'root' | 'content' | 'intro' | 'summary' | 'body' | 'presets' | 'preset' | 'main' | 'inputs' | 'field' | 'input' | 'inputLabel' | 'monthSelect' | 'yearInput' | 'title' | 'draftError' | 'jump' | 'calendar' | 'navigation' | 'navigationButton' | 'months' | 'month' | 'heading' | 'grid' | 'weekday' | 'day' | 'validation' | 'footer' | 'clearButton' | 'cancelButton' | 'applyButton' | 'label' | 'panel' | 'trigger' | 'icon' | 'value' | 'chevron' | 'dialog' | 'description' | 'error'> {
|
|
6
7
|
value?: DateRange | null;
|
|
7
8
|
onChange?: (value: DateRange | null) => void;
|
|
8
9
|
children?: ReactNode;
|
package/dist/types/Select.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type PopoverPositionOptions, type PopoverWidth } from './popover-position.js';
|
|
1
2
|
import { SelectComposition, SelectControl, SelectTrigger, SelectValuePart, SelectIndicator, SelectClearButton, SelectPopover, type SelectCompositionProps } from './control-composition.js';
|
|
2
3
|
import { type StylingProps } from './styling.js';
|
|
3
4
|
import { type ReactNode } from 'react';
|
|
@@ -5,12 +6,14 @@ import { type SelectOption } from './selection-options.js';
|
|
|
5
6
|
export type { SelectOption } from './selection-options.js';
|
|
6
7
|
export type SelectSize = 'xs' | 'sm' | 'dense' | 'md' | 'lg' | 'xl';
|
|
7
8
|
export type SelectVariant = 'primary' | 'secondary' | 'outline' | 'flat';
|
|
8
|
-
interface SelectCommonProps extends StylingProps<'root' | 'label' | 'required' | 'control' | 'trigger' | 'leading' | 'value' | 'indicator' | 'clearButton' | 'clearIcon' | 'popover' | 'list' | 'item' | 'itemLabel' | 'itemDescription' | 'itemIndicator' | 'description' | 'error'> {
|
|
9
|
+
interface SelectCommonProps extends PopoverPositionOptions, StylingProps<'root' | 'label' | 'required' | 'control' | 'trigger' | 'leading' | 'value' | 'indicator' | 'clearButton' | 'clearIcon' | 'popover' | 'list' | 'item' | 'itemLabel' | 'itemDescription' | 'itemIndicator' | 'description' | 'error'> {
|
|
9
10
|
/** Activates an option even when it is already selected (for linked editors). */
|
|
10
11
|
onAction?: (value: string) => void;
|
|
11
12
|
label: string;
|
|
12
13
|
options: SelectOption[];
|
|
13
14
|
maxHeight?: number;
|
|
15
|
+
/** `content` (default) grows with the options; `trigger` matches the trigger and wraps them. */
|
|
16
|
+
popoverWidth?: PopoverWidth;
|
|
14
17
|
size?: SelectSize;
|
|
15
18
|
variant?: SelectVariant;
|
|
16
19
|
/** Hide visually while retaining the accessible label. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ReactNode, type HTMLAttributes, type ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { type PopoverPositionOptions, type PopoverPositionProps } from './popover-position.js';
|
|
2
3
|
import { type ButtonProps } from 'react-aria-components/Button';
|
|
3
4
|
import { MonthPicker, YearPicker } from './Calendar.js';
|
|
4
5
|
import { type TemporalFieldProps } from './TemporalField.js';
|
|
@@ -10,7 +11,7 @@ export interface TemporalPreset<T> {
|
|
|
10
11
|
label: string;
|
|
11
12
|
value: T | null;
|
|
12
13
|
}
|
|
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
|
+
export interface TemporalPickerOptions extends Omit<TemporalConstraints, 'kind'>, PopoverPositionOptions, StylingProps<'label' | 'trigger' | 'value' | 'panel' | 'content' | 'field' | 'calendar' | 'time' | 'footer' | 'applyButton' | 'cancelButton' | 'clearButton' | 'preset' | 'description' | 'error'> {
|
|
14
15
|
label: string;
|
|
15
16
|
locale?: string;
|
|
16
17
|
dir?: 'ltr' | 'rtl';
|
|
@@ -58,7 +59,8 @@ export declare function TemporalPickerTrigger({ children, className, ...props }:
|
|
|
58
59
|
className?: string;
|
|
59
60
|
}): import("react").JSX.Element;
|
|
60
61
|
export declare function TemporalPickerContent({ children, className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
61
|
-
|
|
62
|
+
/** Position props set on this part win over the picker's `popoverAlign` / `popoverProps`. */
|
|
63
|
+
export declare function TemporalPickerPopover({ children, className, placement, offset, crossOffset, shouldFlip, containerPadding, ...props }: HTMLAttributes<HTMLDivElement> & PopoverPositionProps): import("react").JSX.Element;
|
|
62
64
|
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
65
|
export declare const DatePicker: ((props: TemporalPickerProps<string>) => import("react").JSX.Element) & {
|
|
64
66
|
Root: (props: TemporalPickerProps<string>) => import("react").JSX.Element;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type { ToggleButtonGroupProps } from './ToggleButtonGroup.js';
|
|
|
8
8
|
export type { ButtonPressEvent, ButtonProps, ButtonRenderProps, ButtonSize, ButtonVariant, } from './Button.js';
|
|
9
9
|
export { Select } from './Select.js';
|
|
10
10
|
export type { SelectOption, SelectProps, SelectSize, SelectVariant } from './Select.js';
|
|
11
|
+
export type { PopoverAlign, PopoverWidth, PopoverPositionProps, PopoverPositionOptions, } from './popover-position.js';
|
|
11
12
|
export { SelectGroup } from './SelectGroup.js';
|
|
12
13
|
export type { SelectGroupProps } from './SelectGroup.js';
|
|
13
14
|
export { Input } from './Input.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PopoverProps } from 'react-aria-components/Popover';
|
|
2
|
+
/** Logical trigger edge the popover aligns to; `end` is the left edge in RTL. */
|
|
3
|
+
export type PopoverAlign = 'start' | 'center' | 'end';
|
|
4
|
+
/** `trigger` matches the trigger width and wraps long options; `content` grows with its options. */
|
|
5
|
+
export type PopoverWidth = 'trigger' | 'content';
|
|
6
|
+
/** React Aria positioning options forwarded to the popover. */
|
|
7
|
+
export type PopoverPositionProps = Pick<PopoverProps, 'placement' | 'offset' | 'crossOffset' | 'shouldFlip' | 'containerPadding'>;
|
|
8
|
+
export interface PopoverPositionOptions {
|
|
9
|
+
/** Trigger edge the popover aligns to. Defaults to `start`. */
|
|
10
|
+
popoverAlign?: PopoverAlign;
|
|
11
|
+
/** Positioning passthrough; `placement` here wins over `popoverAlign`. */
|
|
12
|
+
popoverProps?: PopoverPositionProps;
|
|
13
|
+
}
|
|
14
|
+
/** Merge defaults, the alignment shortcut and the passthrough, ignoring undefined passthrough keys. */
|
|
15
|
+
export declare function popoverPosition({ popoverAlign, popoverProps }: PopoverPositionOptions, defaults?: PopoverPositionProps): PopoverPositionProps;
|
|
16
|
+
export declare function popoverWidthClass(width: PopoverWidth): string;
|