@kazee-ds/vue 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.
- package/README.md +2 -2
- package/dist/index.js +3235 -414
- package/dist/index.js.map +1 -1
- package/dist/types/Alert.vue.d.ts +1 -1
- package/dist/types/Avatar.vue.d.ts +31 -0
- package/dist/types/AvatarBadge.vue.d.ts +24 -0
- package/dist/types/AvatarFallback.vue.d.ts +22 -0
- package/dist/types/AvatarGroup.d.ts +79 -0
- package/dist/types/AvatarGroupCount.vue.d.ts +20 -0
- package/dist/types/AvatarImage.vue.d.ts +30 -0
- package/dist/types/Badge.vue.d.ts +19 -8
- package/dist/types/BadgeAnchor.vue.d.ts +19 -0
- package/dist/types/Button.vue.d.ts +2 -2
- package/dist/types/ButtonGroup.d.ts +2 -2
- package/dist/types/Calendar.vue.d.ts +47 -0
- package/dist/types/Card.vue.d.ts +9 -1
- package/dist/types/CardAction.vue.d.ts +15 -0
- package/dist/types/CardFooter.vue.d.ts +20 -0
- package/dist/types/CardHeader.vue.d.ts +22 -0
- package/dist/types/CardRoot.vue.d.ts +23 -0
- package/dist/types/CardTitle.vue.d.ts +21 -0
- package/dist/types/Checkbox.vue.d.ts +3 -3
- package/dist/types/DataTable.vue.d.ts +1 -1
- package/dist/types/DateRangePicker.vue.d.ts +13 -11
- package/dist/types/Dialog.vue.d.ts +3 -3
- package/dist/types/DropdownMenu.vue.d.ts +6 -4
- package/dist/types/Field.vue.d.ts +2 -2
- package/dist/types/Form.vue.d.ts +2 -2
- package/dist/types/Input.vue.d.ts +12 -8
- package/dist/types/InputClearButton.vue.d.ts +13 -0
- package/dist/types/InputRoot.vue.d.ts +6 -0
- package/dist/types/Listbox.vue.d.ts +3 -3
- package/dist/types/MonthYearNavigation.vue.d.ts +23 -0
- package/dist/types/NumberField.vue.d.ts +4 -4
- package/dist/types/RadioGroup.vue.d.ts +3 -3
- package/dist/types/Select.vue.d.ts +3 -3
- package/dist/types/SelectGroup.d.ts +2 -2
- package/dist/types/SelectRoot.vue.d.ts +6 -0
- package/dist/types/SelectionValidation.vue.d.ts +2 -2
- package/dist/types/Switch.vue.d.ts +25 -4
- package/dist/types/SwitchGroup.vue.d.ts +21 -0
- package/dist/types/SwitchRoot.vue.d.ts +37 -0
- package/dist/types/Tabs.vue.d.ts +5 -3
- package/dist/types/TabsRoot.vue.d.ts +32 -0
- package/dist/types/TemporalField.vue.d.ts +20 -0
- package/dist/types/TemporalPanel.vue.d.ts +3 -0
- package/dist/types/TemporalPicker.vue.d.ts +52 -0
- package/dist/types/TemporalRangeField.vue.d.ts +21 -0
- package/dist/types/Textarea.vue.d.ts +4 -4
- package/dist/types/TimeControls.vue.d.ts +20 -0
- package/dist/types/Toast.vue.d.ts +1 -1
- package/dist/types/ToastProvider.vue.d.ts +1 -1
- package/dist/types/ToggleButton.vue.d.ts +2 -2
- package/dist/types/ToggleButtonGroup.vue.d.ts +1 -0
- package/dist/types/avatar-context.d.ts +19 -0
- package/dist/types/button-family-context.d.ts +1 -0
- package/dist/types/card-context.d.ts +2 -0
- package/dist/types/card-types.d.ts +12 -0
- package/dist/types/composition.d.ts +11 -17
- package/dist/types/date-range-model.d.ts +3 -1
- package/dist/types/index.d.ts +25 -1
- package/dist/types/switch-context.d.ts +9 -0
- package/dist/types/temporal-components.d.ts +855 -0
- package/dist/types/temporal-context.d.ts +32 -0
- package/dist/types/temporal-model.d.ts +44 -0
- package/dist/types/temporal-parts.d.ts +53 -0
- package/dist/types/temporal-types.d.ts +56 -0
- package/dist/types/toggle-group-model.d.ts +1 -1
- package/dist/types/types.d.ts +6 -6
- package/dist/types/visual.d.ts +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type InjectionKey, type Ref } from 'vue';
|
|
2
|
+
import type { TemporalKind } from './temporal-model.js';
|
|
3
|
+
import type { TemporalOptions, TemporalValue } from './temporal-types.js';
|
|
4
|
+
export interface TemporalContext {
|
|
5
|
+
options: TemporalOptions;
|
|
6
|
+
kind: TemporalKind;
|
|
7
|
+
range: boolean;
|
|
8
|
+
draft: Ref<TemporalValue | null>;
|
|
9
|
+
error: Readonly<Ref<string | null>>;
|
|
10
|
+
text: Readonly<Ref<string>>;
|
|
11
|
+
isDialog: Readonly<Ref<boolean>>;
|
|
12
|
+
id: string;
|
|
13
|
+
invalid: Readonly<Ref<boolean>>;
|
|
14
|
+
describedBy: Readonly<Ref<string | undefined>>;
|
|
15
|
+
edit: (value: TemporalValue | null, part?: string) => void;
|
|
16
|
+
inputError: (part: string, error: string | null) => void;
|
|
17
|
+
apply: () => void;
|
|
18
|
+
cancel: () => void;
|
|
19
|
+
clear: () => void;
|
|
20
|
+
}
|
|
21
|
+
export declare const temporalKey: InjectionKey<TemporalContext>;
|
|
22
|
+
export declare function useTemporal(): TemporalContext;
|
|
23
|
+
export declare function temporalLabels(locale?: string): {
|
|
24
|
+
apply: string;
|
|
25
|
+
cancel: string;
|
|
26
|
+
clear: string;
|
|
27
|
+
today: string;
|
|
28
|
+
now: string;
|
|
29
|
+
start: string;
|
|
30
|
+
end: string;
|
|
31
|
+
choose: string;
|
|
32
|
+
};
|
|
@@ -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>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
export declare const TemporalPickerField: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
part: {
|
|
4
|
+
type: PropType<"start" | "end">;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
part: {
|
|
11
|
+
type: PropType<"start" | "end">;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{}>, {
|
|
15
|
+
part: "start" | "end";
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
|
+
export declare const TemporalPickerCalendar: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
export declare const TemporalPickerTime: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
21
|
+
part: {
|
|
22
|
+
type: PropType<"start" | "end">;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
|
+
part: {
|
|
29
|
+
type: PropType<"start" | "end">;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
}>> & Readonly<{}>, {
|
|
33
|
+
part: "start" | "end";
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
35
|
+
export declare const TemporalPickerValue: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
38
|
+
export declare const TemporalPickerTrigger: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
41
|
+
export declare const TemporalPickerContent: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
42
|
+
[key: string]: any;
|
|
43
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
44
|
+
export declare const TemporalPickerPopover: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
45
|
+
[key: string]: any;
|
|
46
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
47
|
+
export declare const TemporalPickerApplyButton: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, TemporalPickerCancelButton: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
50
|
+
[key: string]: any;
|
|
51
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, TemporalPickerClearButton: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
52
|
+
[key: string]: any;
|
|
53
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { TemporalConstraints, TemporalKind, TemporalRange } from './temporal-model.js';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
export type TemporalNativeAttributes = Pick<HTMLAttributes, 'class' | 'style' | 'id' | 'role' | 'aria-label' | 'aria-labelledby' | 'aria-describedby'>;
|
|
4
|
+
export type TemporalValue = string | TemporalRange;
|
|
5
|
+
export interface TemporalPreset<T = TemporalValue> {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
value: T | null;
|
|
9
|
+
}
|
|
10
|
+
export interface TemporalOptions extends Omit<TemporalConstraints, 'kind'> {
|
|
11
|
+
label: string;
|
|
12
|
+
locale?: string;
|
|
13
|
+
dir?: 'ltr' | 'rtl';
|
|
14
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
15
|
+
hourCycle?: 12 | 24;
|
|
16
|
+
display?: 'inline' | 'popover' | 'dialog' | 'auto';
|
|
17
|
+
commitMode?: 'apply' | 'immediate';
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
readonly?: boolean;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
invalid?: boolean;
|
|
22
|
+
isDisabled?: boolean;
|
|
23
|
+
isReadOnly?: boolean;
|
|
24
|
+
isRequired?: boolean;
|
|
25
|
+
isInvalid?: boolean;
|
|
26
|
+
hideLabel?: boolean;
|
|
27
|
+
name?: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
errorMessage?: string;
|
|
30
|
+
open?: boolean;
|
|
31
|
+
defaultOpen?: boolean;
|
|
32
|
+
visibleMonths?: 1 | 2;
|
|
33
|
+
weekStartsOn?: 0 | 1;
|
|
34
|
+
referenceDate?: string;
|
|
35
|
+
timePresentation?: 'list' | 'clock';
|
|
36
|
+
showInputs?: boolean;
|
|
37
|
+
showActions?: boolean;
|
|
38
|
+
formatValue?: (value: TemporalValue, locale: string) => string;
|
|
39
|
+
classNames?: Partial<Record<'root' | 'label' | 'trigger' | 'value' | 'panel' | 'content' | 'field' | 'calendar' | 'time' | 'footer' | 'applyButton' | 'cancelButton' | 'clearButton' | 'preset' | 'description' | 'error' | 'input' | 'segment', string>>;
|
|
40
|
+
}
|
|
41
|
+
export interface TemporalPickerProps<T = TemporalValue> extends TemporalOptions, TemporalNativeAttributes {
|
|
42
|
+
modelValue?: T | null;
|
|
43
|
+
defaultValue?: T | null;
|
|
44
|
+
presets?: TemporalPreset<T>[];
|
|
45
|
+
'onUpdate:modelValue'?: (value: T | null) => void;
|
|
46
|
+
onChange?: (value: T | null) => void;
|
|
47
|
+
onApply?: (value: T | null) => void;
|
|
48
|
+
'onUpdate:open'?: (open: boolean) => void;
|
|
49
|
+
onError?: (error: string | null) => void;
|
|
50
|
+
}
|
|
51
|
+
export interface TemporalFieldOptions extends TemporalOptions {
|
|
52
|
+
formValidation?: boolean;
|
|
53
|
+
modelValue?: string | null;
|
|
54
|
+
defaultValue?: string | null;
|
|
55
|
+
kind?: TemporalKind;
|
|
56
|
+
}
|
|
@@ -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[];
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'outline' | 'tertiary' | 'ghost' | 'danger-soft' | 'ai';
|
|
2
|
-
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
3
|
-
export type InputSize = 'sm' | 'md' | 'lg';
|
|
4
|
-
export type SelectSize = 'sm' | 'md' | 'lg';
|
|
5
|
-
export type SelectVariant = 'primary' | 'secondary' | 'outline';
|
|
2
|
+
export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
export type InputSize = 'xs' | 'sm' | 'dense' | 'md' | 'lg' | 'xl';
|
|
4
|
+
export type SelectSize = 'xs' | 'sm' | 'dense' | 'md' | 'lg' | 'xl';
|
|
5
|
+
export type SelectVariant = 'primary' | 'secondary' | 'outline' | 'flat';
|
|
6
6
|
export type InputType = 'text' | 'email' | 'password' | 'search' | 'tel' | 'url';
|
|
7
|
-
export type InputVariant = 'primary' | 'secondary';
|
|
7
|
+
export type InputVariant = 'primary' | 'secondary' | 'flat' | 'sunken';
|
|
8
8
|
export type InputMode = 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
|
|
9
9
|
export type InputEnterKeyHint = 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
|
|
10
10
|
export type { SelectOption } from './selection-options.js';
|
|
@@ -32,7 +32,7 @@ export interface FieldSlotProps {
|
|
|
32
32
|
invalid: boolean;
|
|
33
33
|
errorMessage: string | undefined;
|
|
34
34
|
}
|
|
35
|
-
export type BadgeTone = '
|
|
35
|
+
export type BadgeTone = import('./visual.js').Tone;
|
|
36
36
|
export interface TabItem {
|
|
37
37
|
id: string;
|
|
38
38
|
label: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
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 BadgeVariant = 'default' | 'solid' | 'soft' | 'outline' | 'ghost' | 'link';
|
|
6
|
+
export type ImageLoadingStatus = 'idle' | 'loading' | 'loaded' | 'error';
|