@kazee-ds/vue 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 +105 -41
- package/dist/index.js.map +1 -1
- package/dist/types/Combobox.vue.d.ts +10 -0
- package/dist/types/DateRangePicker.vue.d.ts +2 -1
- package/dist/types/Select.vue.d.ts +8 -1
- package/dist/types/TemporalPicker.vue.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/popover-position.d.ts +22 -0
- package/dist/types/temporal-parts.d.ts +1 -0
- package/dist/types/temporal-types.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type StylingProps } from './styling.js';
|
|
2
2
|
import type { SelectSize, SelectVariant } from './types.js';
|
|
3
|
+
import { type PopoverAlign, type PopoverPositionProps, type PopoverWidth } from './popover-position.js';
|
|
3
4
|
import { type SelectOption } from './selection-options.js';
|
|
4
5
|
type __VLS_Props = StylingProps<'check' | 'clear' | 'closeIcon' | 'control' | 'description' | 'empty' | 'error' | 'icon' | 'input' | 'item' | 'itemLabel' | 'label' | 'leading' | 'list' | 'popover' | 'required' | 'root' | 'toggle'> & {
|
|
5
6
|
label: string;
|
|
@@ -8,6 +9,12 @@ type __VLS_Props = StylingProps<'check' | 'clear' | 'closeIcon' | 'control' | 'd
|
|
|
8
9
|
hideLabel?: boolean;
|
|
9
10
|
fullWidth?: boolean;
|
|
10
11
|
maxHeight?: number;
|
|
12
|
+
/** Trigger edge the popover aligns to. Defaults to `start`. */
|
|
13
|
+
popoverAlign?: PopoverAlign;
|
|
14
|
+
/** `trigger` (default) matches the input group; `content` grows with the options. */
|
|
15
|
+
popoverWidth?: PopoverWidth;
|
|
16
|
+
/** Reka UI positioning passthrough; `align` here wins over `popoverAlign`. */
|
|
17
|
+
popoverProps?: PopoverPositionProps;
|
|
11
18
|
menuTrigger?: 'input' | 'focus' | 'manual';
|
|
12
19
|
selectOnFocus?: boolean;
|
|
13
20
|
disallowEmptySelection?: boolean;
|
|
@@ -50,7 +57,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
50
57
|
defaultValue: string;
|
|
51
58
|
emptyMessage: string;
|
|
52
59
|
errorMessage: string;
|
|
60
|
+
popoverAlign: PopoverAlign;
|
|
61
|
+
popoverProps: PopoverPositionProps;
|
|
53
62
|
maxHeight: number;
|
|
63
|
+
popoverWidth: PopoverWidth;
|
|
54
64
|
menuTrigger: "input" | "focus" | "manual";
|
|
55
65
|
requiredMessage: string;
|
|
56
66
|
clearLabel: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type StylingProps } from './styling.js';
|
|
2
2
|
import { type DateRange, type DateRangeOptions } from './date-range-model.js';
|
|
3
|
-
|
|
3
|
+
import { type PopoverPositionOptions } from './popover-position.js';
|
|
4
|
+
interface Props extends DateRangeOptions, PopoverPositionOptions {
|
|
4
5
|
modelValue?: DateRange | null;
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
readonly?: boolean;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { type StylingProps } from './styling.js';
|
|
2
2
|
import { type SelectOption } from './selection-options.js';
|
|
3
3
|
import type { SelectSize, SelectVariant } from './types.js';
|
|
4
|
+
import { type PopoverAlign, type PopoverPositionProps, type PopoverWidth } from './popover-position.js';
|
|
4
5
|
declare const __VLS_export: <M extends "single" | "multiple" = "single">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
-
props: import("vue").PublicProps & __VLS_PrettifyLocal<(StylingProps<"root" | "error" | "description" | "label" | "required" | "list" | "value" | "clear" | "item" | "check" | "control" | "closeIcon" | "icon" | "itemLabel" | "leading" | "popover"
|
|
6
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<(StylingProps<"root" | "error" | "description" | "label" | "required" | "list" | "value" | "clear" | "item" | "check" | "control" | "trigger" | "closeIcon" | "icon" | "itemLabel" | "leading" | "popover"> & {
|
|
6
7
|
label: string;
|
|
7
8
|
options: SelectOption[];
|
|
8
9
|
maxHeight?: number;
|
|
10
|
+
/** Trigger edge the popover aligns to. Defaults to `start`. */
|
|
11
|
+
popoverAlign?: PopoverAlign;
|
|
12
|
+
/** `content` (default) grows with the options; `trigger` matches the trigger and wraps them. */
|
|
13
|
+
popoverWidth?: PopoverWidth;
|
|
14
|
+
/** Reka UI positioning passthrough; `align` here wins over `popoverAlign`. */
|
|
15
|
+
popoverProps?: PopoverPositionProps;
|
|
9
16
|
size?: SelectSize;
|
|
10
17
|
variant?: SelectVariant;
|
|
11
18
|
hideLabel?: boolean;
|
|
@@ -34,6 +34,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
34
34
|
range: boolean;
|
|
35
35
|
visibleMonths: 1 | 2;
|
|
36
36
|
weekStartsOn: 0 | 1;
|
|
37
|
+
open: boolean;
|
|
37
38
|
defaultOpen: boolean;
|
|
38
39
|
display: "dialog" | "inline" | "auto" | "popover";
|
|
39
40
|
commitMode: "immediate" | "apply";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export declare const Input: typeof InputCompact & {
|
|
|
34
34
|
ClearButton: typeof Parts.InputClearButton;
|
|
35
35
|
};
|
|
36
36
|
export type { ButtonSize, ButtonVariant, SelectOption, InputSize, InputType } from './types.js';
|
|
37
|
+
export type { PopoverAlign, PopoverWidth, PopoverPositionProps, PopoverPositionOptions, } from './popover-position.js';
|
|
37
38
|
export type { InputVariant, InputMode, InputEnterKeyHint } from './types.js';
|
|
38
39
|
import TextareaCompact from './Textarea.vue.js';
|
|
39
40
|
export declare const Textarea: typeof TextareaCompact & {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Logical trigger edge the popover aligns to; `end` is the left edge in RTL. */
|
|
2
|
+
export type PopoverAlign = 'start' | 'center' | 'end';
|
|
3
|
+
/** `trigger` matches the trigger width and wraps long options; `content` grows with its options. */
|
|
4
|
+
export type PopoverWidth = 'trigger' | 'content';
|
|
5
|
+
/** Reka UI positioning options forwarded to the popover content. */
|
|
6
|
+
export interface PopoverPositionProps {
|
|
7
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
8
|
+
align?: PopoverAlign;
|
|
9
|
+
sideOffset?: number;
|
|
10
|
+
alignOffset?: number;
|
|
11
|
+
avoidCollisions?: boolean;
|
|
12
|
+
collisionPadding?: number | Partial<Record<'top' | 'right' | 'bottom' | 'left', number>>;
|
|
13
|
+
}
|
|
14
|
+
export interface PopoverPositionOptions {
|
|
15
|
+
/** Trigger edge the popover aligns to. Defaults to `start`. */
|
|
16
|
+
popoverAlign?: PopoverAlign;
|
|
17
|
+
/** Positioning passthrough; `align` here wins over `popoverAlign`. */
|
|
18
|
+
popoverProps?: PopoverPositionProps;
|
|
19
|
+
}
|
|
20
|
+
/** Merge defaults, the alignment shortcut and the passthrough, ignoring undefined passthrough keys. */
|
|
21
|
+
export declare function popoverPosition({ popoverAlign, popoverProps }: PopoverPositionOptions, defaults?: PopoverPositionProps): PopoverPositionProps;
|
|
22
|
+
export declare function popoverWidthClass(width: PopoverWidth): string;
|
|
@@ -41,6 +41,7 @@ export declare const TemporalPickerTrigger: import("vue").DefineComponent<{}, ()
|
|
|
41
41
|
export declare const TemporalPickerContent: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
42
42
|
[key: string]: any;
|
|
43
43
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
44
|
+
/** Position attributes set on this part win over the picker's `popoverAlign` / `popoverProps`. */
|
|
44
45
|
export declare const TemporalPickerPopover: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
45
46
|
[key: string]: any;
|
|
46
47
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TemporalConstraints, TemporalKind, TemporalRange } from './temporal-model.js';
|
|
2
|
+
import type { PopoverPositionOptions } from './popover-position.js';
|
|
2
3
|
import type { HTMLAttributes } from 'vue';
|
|
3
4
|
export type TemporalNativeAttributes = Pick<HTMLAttributes, 'class' | 'style' | 'id' | 'role' | 'aria-label' | 'aria-labelledby' | 'aria-describedby'>;
|
|
4
5
|
export type TemporalValue = string | TemporalRange;
|
|
@@ -7,7 +8,7 @@ export interface TemporalPreset<T = TemporalValue> {
|
|
|
7
8
|
label: string;
|
|
8
9
|
value: T | null;
|
|
9
10
|
}
|
|
10
|
-
export interface TemporalOptions extends Omit<TemporalConstraints, 'kind'
|
|
11
|
+
export interface TemporalOptions extends Omit<TemporalConstraints, 'kind'>, PopoverPositionOptions {
|
|
11
12
|
label: string;
|
|
12
13
|
locale?: string;
|
|
13
14
|
dir?: 'ltr' | 'rtl';
|