@wisemen/vue-core-components 1.17.0 → 2.0.0-beta.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/dist/{AlertCircleIcon-DVsVCSLr.js → AlertCircleIcon-D7CicIEs.js} +1 -1
- package/dist/{AlertTriangleIcon-C7yedJDj.js → AlertTriangleIcon-DzlLdT1q.js} +1 -1
- package/dist/{ArrowDownIcon-CTqY9yih.js → ArrowDownIcon-DZr01Sf6.js} +1 -1
- package/dist/{ArrowLeftIcon-CMBqMcN8.js → ArrowLeftIcon-CVU7B5Rv.js} +1 -1
- package/dist/{ArrowRightIcon-BYaugluP.js → ArrowRightIcon-A8_LzUxJ.js} +1 -1
- package/dist/{ArrowUpIcon-Ci3lRZK5.js → ArrowUpIcon-c-BbbYHh.js} +1 -1
- package/dist/{CalendarIcon-AHt2ALJb.js → CalendarIcon-D2NvYthk.js} +1 -1
- package/dist/{CheckCircleIcon-BSCXFP22.js → CheckCircleIcon-DKnYfS0a.js} +1 -1
- package/dist/{CheckIcon-BcSj6qzw.js → CheckIcon-BdFM_PWS.js} +1 -1
- package/dist/{ChevronLeftDoubleIcon-DhecHeTI.js → ChevronLeftDoubleIcon-BjIKgpkh.js} +1 -1
- package/dist/{ChevronLeftIcon-DkH4rff3.js → ChevronLeftIcon-DhUy0U_9.js} +1 -1
- package/dist/{ChevronRightDoubleIcon-CELq3EDE.js → ChevronRightDoubleIcon-BF0prMpM.js} +1 -1
- package/dist/{ChevronRightIcon-Xk2hDdj0.js → ChevronRightIcon-5hSTA6TF.js} +1 -1
- package/dist/{CloseIcon-BXmDw2ST.js → CloseIcon-C0sSLkrm.js} +1 -1
- package/dist/{EyeIcon-SRgflOZ4.js → EyeIcon-LaL5PkGR.js} +1 -1
- package/dist/{EyeOffIcon-DaacPXpf.js → EyeOffIcon-CG1ArkOt.js} +1 -1
- package/dist/{InfoCircleIcon-BO5xoT5y.js → InfoCircleIcon-itEN2uGV.js} +1 -1
- package/dist/{MinusIcon-Dhrr9qOB.js → MinusIcon-Dm3It5EC.js} +1 -1
- package/dist/{PlusIcon-BEfwXUnE.js → PlusIcon-C71GCIJ1.js} +1 -1
- package/dist/{SearchIcon-CMyCjH4B.js → SearchIcon-DMDvaCjI.js} +1 -1
- package/dist/{SelectIconRight-d8i-3c2D.js → SelectIconRight-CpQjNlqt.js} +1 -1
- package/dist/{StarsIcon-5kBm7r6u.js → StarsIcon-CtRxOZ6l.js} +1 -1
- package/dist/{SwitchVerticalIcon-CooLQOrG.js → SwitchVerticalIcon-BbFWYPhT.js} +1 -1
- package/dist/{TranslateIcon-CCaXc-R1.js → TranslateIcon-BWa8fOJh.js} +1 -1
- package/dist/class-variant/classVariant.type.d.ts +0 -7
- package/dist/components/config-provider/index.d.ts +1 -0
- package/dist/components/date-field/DateField.d.ts +29 -19
- package/dist/components/date-field/dateField.context.d.ts +3 -2
- package/dist/components/date-field/parts/DateFieldRoot.d.ts +51 -19
- package/dist/components/date-picker/range/DateRangePicker.d.ts +7 -6
- package/dist/components/date-picker/range/dateRangePicker.context.d.ts +3 -2
- package/dist/components/date-picker/range/parts/DateRangePickerRoot.d.ts +7 -6
- package/dist/components/date-picker/shared/datePicker.util.d.ts +3 -0
- package/dist/components/date-picker/single/DatePicker.d.ts +7 -6
- package/dist/components/date-picker/single/datePicker.context.d.ts +3 -2
- package/dist/components/date-picker/single/parts/DatePickerRoot.d.ts +7 -6
- package/dist/components/date-range-field/DateRangeField.d.ts +29 -19
- package/dist/components/date-range-field/dateRangeField.context.d.ts +3 -2
- package/dist/components/date-range-field/parts/DateRangeFieldRoot.d.ts +51 -19
- package/dist/components/dialog/Dialog.d.ts +2 -0
- package/dist/components/dialog/DialogContainer.d.ts +1 -5
- package/dist/components/dialog/dialog.composable.d.ts +12 -4
- package/dist/components/dialog/dialog.type.d.ts +5 -47
- package/dist/components/dialog/index.d.ts +1 -1
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +4 -0
- package/dist/components/dropdown-menu/dropdownMenu.context.d.ts +2 -0
- package/dist/components/dropdown-menu/parts/DropdownMenuRoot.d.ts +4 -0
- package/dist/components/index.d.ts +0 -1
- package/dist/components/table/index.d.ts +3 -7
- package/dist/components/table/parts/TableBody.d.ts +16 -1
- package/dist/components/table/parts/TableCell.d.ts +2 -4
- package/dist/components/table/parts/TableHeader.d.ts +16 -1
- package/dist/components/table/parts/TableHeaderCell.d.ts +15 -4
- package/dist/components/table/parts/TableHiddenResultsHint.d.ts +7 -1
- package/dist/components/table/parts/TableRoot.d.ts +22 -15
- package/dist/components/table/parts/TableRow.d.ts +20 -2
- package/dist/components/table/table.composable.d.ts +6 -15
- package/dist/components/table/table.context.d.ts +1 -5
- package/dist/components/table/table.props.d.ts +3 -36
- package/dist/components/table/table.style.d.ts +3 -0
- package/dist/components/table/table.type.d.ts +11 -43
- package/dist/components/theme-provider/ThemeProvider.d.ts +8 -2
- package/dist/components/time-field/TimeField.d.ts +26 -17
- package/dist/components/time-field/parts/TimeFieldRoot.d.ts +48 -17
- package/dist/components/time-field/timeField.context.d.ts +2 -1
- package/dist/components/toast/index.d.ts +1 -1
- package/dist/{index-B--cIpg_.js → index-B8ijWIxM.js} +4623 -5542
- package/dist/index.js +140 -152
- package/dist/index.umd +14 -14
- package/dist/style.css +1 -1
- package/dist/types/dateRange.type.d.ts +2 -1
- package/package.json +8 -6
- package/dist/components/internal/ProgressiveBlur.d.ts +0 -5
- package/dist/components/table/Table.d.ts +0 -24
- package/dist/components/table/parts/TableCellLayout.d.ts +0 -21
- package/dist/components/table/parts/TableEmptyOrLoadingState.d.ts +0 -19
- package/dist/components/table/parts/TableHeaderCellProvider.d.ts +0 -21
- package/dist/components/table/parts/TableInteractiveElement.d.ts +0 -17
- package/dist/components/table/parts/TableRowAction.d.ts +0 -6
- package/dist/components/table/table.emits.d.ts +0 -3
- package/dist/components/table/tableHeaderCell.context.d.ts +0 -7
- package/dist/components/table-next/index.d.ts +0 -11
- package/dist/components/table-next/parts/TableBody.d.ts +0 -17
- package/dist/components/table-next/parts/TableCell.d.ts +0 -24
- package/dist/components/table-next/parts/TableContent.d.ts +0 -17
- package/dist/components/table-next/parts/TableHeader.d.ts +0 -17
- package/dist/components/table-next/parts/TableHeaderCell.d.ts +0 -29
- package/dist/components/table-next/parts/TableHiddenResultsHint.d.ts +0 -8
- package/dist/components/table-next/parts/TableRoot.d.ts +0 -27
- package/dist/components/table-next/parts/TableRow.d.ts +0 -23
- package/dist/components/table-next/parts/TableScrollContainer.d.ts +0 -21
- package/dist/components/table-next/table.composable.d.ts +0 -7
- package/dist/components/table-next/table.context.d.ts +0 -15
- package/dist/components/table-next/table.props.d.ts +0 -21
- package/dist/components/table-next/table.style.d.ts +0 -37
- package/dist/components/table-next/table.type.d.ts +0 -12
- /package/dist/components/{table-next → table}/parts/TableCellSkeleton.d.ts +0 -0
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Temporal } from 'temporal-polyfill';
|
|
2
|
+
import { ResolvedClassConfig } from '../../../class-variant/classVariant.type';
|
|
2
3
|
import { DateRangeFieldProps } from '../dateRangeField.props';
|
|
3
4
|
import { DateRange } from '../../../types/dateRange.type';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
modelValue: DateRange<TValue>;
|
|
12
|
-
placeholderValue?: Date;
|
|
13
|
-
} & DateRangeFieldProps) & Partial<{}>> & import('vue').PublicProps;
|
|
14
|
-
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
15
|
-
attrs: any;
|
|
5
|
+
type __VLS_Props = DateRangeFieldProps;
|
|
6
|
+
type __VLS_PublicProps = {
|
|
7
|
+
modelValue: DateRange<Temporal.PlainDate>;
|
|
8
|
+
'placeholderValue'?: Temporal.PlainDate;
|
|
9
|
+
} & __VLS_Props;
|
|
10
|
+
declare function __VLS_template(): {
|
|
11
|
+
attrs: Partial<{}>;
|
|
16
12
|
slots: {
|
|
17
13
|
default?(_: {
|
|
18
14
|
segments: {
|
|
@@ -27,11 +23,47 @@ declare const _default: <TValue extends Date>(__VLS_props: NonNullable<Awaited<t
|
|
|
27
23
|
};
|
|
28
24
|
}): any;
|
|
29
25
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
26
|
+
refs: {};
|
|
27
|
+
rootEl: any;
|
|
33
28
|
};
|
|
29
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
30
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
31
|
+
"update:modelValue": (value: DateRange<Temporal.PlainDate>) => any;
|
|
32
|
+
"update:placeholderValue": (value: Temporal.PlainDate) => any;
|
|
33
|
+
} & {
|
|
34
|
+
focus: (e: FocusEvent) => any;
|
|
35
|
+
blur: (e: FocusEvent) => any;
|
|
36
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
37
|
+
onFocus?: ((e: FocusEvent) => any) | undefined;
|
|
38
|
+
onBlur?: ((e: FocusEvent) => any) | undefined;
|
|
39
|
+
"onUpdate:modelValue"?: ((value: DateRange<Temporal.PlainDate>) => any) | undefined;
|
|
40
|
+
"onUpdate:placeholderValue"?: ((value: Temporal.PlainDate) => any) | undefined;
|
|
41
|
+
}>, {
|
|
42
|
+
variant: null;
|
|
43
|
+
iconLeft: import('../../..').Icon | null;
|
|
44
|
+
label: string | null;
|
|
45
|
+
hint: string | null;
|
|
46
|
+
isLoading: boolean;
|
|
47
|
+
testId: string | null;
|
|
48
|
+
isDisabled: boolean;
|
|
49
|
+
id: string | null;
|
|
50
|
+
isRequired: boolean;
|
|
51
|
+
isTouched: boolean;
|
|
52
|
+
errorMessage: string | null;
|
|
53
|
+
classConfig: ResolvedClassConfig<"dateRangeField"> | null;
|
|
54
|
+
autocomplete: "off" | "on";
|
|
55
|
+
hideDatePicker: boolean;
|
|
56
|
+
maxDate: Date | null;
|
|
57
|
+
minDate: Date | null;
|
|
58
|
+
isDateDisabled: (date: Date) => boolean;
|
|
59
|
+
isDateUnavailable: (date: Date) => boolean;
|
|
60
|
+
allowDeselect: boolean;
|
|
61
|
+
showTwoMonths: boolean;
|
|
62
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
63
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
34
64
|
export default _default;
|
|
35
|
-
type
|
|
36
|
-
|
|
37
|
-
|
|
65
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
66
|
+
new (): {
|
|
67
|
+
$slots: S;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
@@ -23,9 +23,11 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
23
23
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
24
|
close: () => any;
|
|
25
25
|
"update:isOpen": (value: boolean) => any;
|
|
26
|
+
close_: () => any;
|
|
26
27
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
27
28
|
onClose?: (() => any) | undefined;
|
|
28
29
|
"onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
|
|
30
|
+
onClose_?: (() => any) | undefined;
|
|
29
31
|
}>, {
|
|
30
32
|
testId: string | null;
|
|
31
33
|
classConfig: import('../../class-variant/classVariant.type').ResolvedClassConfig<"dialog"> | null;
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
2
|
-
"update:activeDialogCount": (count: number) => any;
|
|
3
|
-
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
-
"onUpdate:activeDialogCount"?: ((count: number) => any) | undefined;
|
|
5
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
6
2
|
export default _default;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Dialog,
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { Dialog, DialogTriggerProps, GetComponentProps, OpenDialog } from './dialog.type';
|
|
3
3
|
export declare const dialogs: Ref<Dialog[]>;
|
|
4
|
-
export declare function useDialogContainer():
|
|
5
|
-
|
|
4
|
+
export declare function useDialogContainer(): {
|
|
5
|
+
dialogs: Ref<Dialog[], Dialog[]>;
|
|
6
|
+
};
|
|
7
|
+
export declare function removeDialogFromContainer(id: string): void;
|
|
8
|
+
export declare function useDialog<TComponent extends abstract new (...args: any) => any>(component: TComponent): {
|
|
9
|
+
isOpen: import('vue').ComputedRef<boolean>;
|
|
10
|
+
close: () => void;
|
|
11
|
+
open: OpenDialog<GetComponentProps<TComponent>>;
|
|
12
|
+
triggerProps: import('vue').ComputedRef<DialogTriggerProps>;
|
|
13
|
+
};
|
|
@@ -1,64 +1,22 @@
|
|
|
1
|
-
import { Component
|
|
1
|
+
import { Component } from 'vue';
|
|
2
2
|
export interface DialogTriggerProps {
|
|
3
3
|
'id': string;
|
|
4
|
+
'aria-controls'?: string;
|
|
4
5
|
'aria-expanded': boolean;
|
|
5
6
|
'aria-haspopup': 'dialog';
|
|
6
7
|
'data-state': boolean;
|
|
7
8
|
}
|
|
8
|
-
export type
|
|
9
|
+
export type IgnoredProps = '__v_isVNode' | 'class' | 'key' | 'onVnodeBeforeMount' | 'onVnodeBeforeUnmount' | 'onVnodeBeforeUpdate' | 'onVnodeMounted' | 'onVnodeUnmounted' | 'onVnodeUpdated' | 'ref' | 'ref_for' | 'ref_key' | 'style';
|
|
9
10
|
type PickKeys<T extends object, TValue extends null | undefined> = NonNullable<{
|
|
10
11
|
[K in keyof T]: TValue extends T[K] ? K : never;
|
|
11
12
|
}[keyof T]>;
|
|
12
13
|
type OptionalKeys<T extends object> = PickKeys<T, undefined>;
|
|
13
14
|
type RequiredKeys<T extends object> = Exclude<keyof T, OptionalKeys<T>>;
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
__isSuspense?: never;
|
|
17
|
-
__isTeleport?: never;
|
|
18
|
-
new (...args: never[]): {
|
|
19
|
-
$props: P;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export type Attrs<TComponent> = Omit<{
|
|
23
|
-
[K in keyof TComponent]: Ref<TComponent[K]> | TComponent[K];
|
|
24
|
-
}, 'isOpen'>;
|
|
25
|
-
export interface UseDialogOptions<TComponent extends Component> {
|
|
26
|
-
/**
|
|
27
|
-
* The component to render. Must be a component of which the root is `AppDialog`
|
|
28
|
-
*/
|
|
29
|
-
component: () => Promise<{
|
|
30
|
-
default: Constructor<TComponent>;
|
|
31
|
-
}>;
|
|
32
|
-
}
|
|
33
|
-
export interface UseDialogReturnType<TComponent extends Component> {
|
|
34
|
-
isOpen: (id?: string) => boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Close the dialog
|
|
37
|
-
*/
|
|
38
|
-
close: (id?: string) => void;
|
|
39
|
-
/**
|
|
40
|
-
* The props to pass to the trigger
|
|
41
|
-
* @param id The id of the dialog
|
|
42
|
-
*/
|
|
43
|
-
getTriggerProps: (id?: string) => DialogTriggerProps;
|
|
44
|
-
/**
|
|
45
|
-
* Open the dialog
|
|
46
|
-
* @param attrs The props to pass to the dialog - optional
|
|
47
|
-
*/
|
|
48
|
-
open: Omit<Attrs<TComponent>, 'Symbol'> extends Record<string, never> ? (attrs?: {
|
|
49
|
-
id?: string;
|
|
50
|
-
}) => Promise<void> : RequiredKeys<Omit<Attrs<TComponent>, 'Symbol'>> extends Record<string, never> ? (attrs?: Omit<Attrs<TComponent>, IgnoredKeys> & {
|
|
51
|
-
id?: string;
|
|
52
|
-
}) => Promise<void> : (attrs: Omit<Attrs<TComponent>, IgnoredKeys> & {
|
|
53
|
-
id?: string;
|
|
54
|
-
}) => Promise<void>;
|
|
55
|
-
}
|
|
15
|
+
export type GetComponentProps<TComponent extends abstract new (...args: any) => any> = Omit<InstanceType<TComponent>['$props'], IgnoredProps>;
|
|
16
|
+
export type OpenDialog<TProps extends Record<string, any>> = TProps extends Record<string, never> ? () => Promise<void> : RequiredKeys<Omit<TProps, IgnoredProps>> extends Record<string, never> ? (attrs?: Omit<TProps, IgnoredProps>) => Promise<void> : (attrs: Omit<TProps, IgnoredProps>) => Promise<void>;
|
|
56
17
|
export interface Dialog {
|
|
57
18
|
id: string;
|
|
58
19
|
isOpen: boolean;
|
|
59
20
|
component: Component;
|
|
60
21
|
}
|
|
61
|
-
export interface UseDialogContainerReturnType {
|
|
62
|
-
dialogs: Ref<Dialog[]>;
|
|
63
|
-
}
|
|
64
22
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { useDialog
|
|
1
|
+
export { useDialog } from './dialog.composable';
|
|
2
2
|
export type { DialogProps as VcDialogProps } from './dialog.props';
|
|
3
3
|
export { createDialogStyle } from './dialog.style';
|
|
4
4
|
export type { DialogTriggerProps as VcDialogTriggerProps } from './dialog.type';
|
|
@@ -29,8 +29,12 @@ declare function __VLS_template(): {
|
|
|
29
29
|
};
|
|
30
30
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
31
31
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
32
|
+
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
33
|
+
closeAutoFocus: (event: Event) => any;
|
|
32
34
|
"update:isOpen": (value: boolean) => any;
|
|
33
35
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
36
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
37
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
34
38
|
"onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
|
|
35
39
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
36
40
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -7,6 +7,8 @@ interface DropdownMenuContext extends PropsToComputed<DropdownMenuProps> {
|
|
|
7
7
|
isOpen: ComputedRef<boolean>;
|
|
8
8
|
customClassConfig: ComputedRef<ResolvedClassConfig<'dropdownMenu'>>;
|
|
9
9
|
style: ComputedRef<CreateDropdownMenuStyle>;
|
|
10
|
+
onCloseAutoFocus: (event: Event) => void;
|
|
11
|
+
onEscapeKeyDown: (event: KeyboardEvent) => void;
|
|
10
12
|
}
|
|
11
13
|
export declare const useProvideDropdownMenuContext: (context: DropdownMenuContext) => DropdownMenuContext, useInjectDropdownMenuContext: <TFallback extends DropdownMenuContext | null = DropdownMenuContext>(fallback?: TFallback | undefined) => TFallback extends null ? DropdownMenuContext | null : DropdownMenuContext;
|
|
12
14
|
export {};
|
|
@@ -13,8 +13,12 @@ declare function __VLS_template(): {
|
|
|
13
13
|
};
|
|
14
14
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
15
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
+
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
17
|
+
closeAutoFocus: (event: Event) => any;
|
|
16
18
|
"update:isOpen": (value: boolean) => any;
|
|
17
19
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
21
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
18
22
|
"onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
|
|
19
23
|
}>, {
|
|
20
24
|
variant: null;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
export { default as VcTableBody } from './parts/TableBody';
|
|
2
2
|
export { default as VcTableCell } from './parts/TableCell';
|
|
3
|
+
export { default as VcTableCellSkeleton } from './parts/TableCellSkeleton';
|
|
3
4
|
export { default as VcTableContent } from './parts/TableContent';
|
|
4
|
-
export { default as VcTableEmptyOrLoadingState } from './parts/TableEmptyOrLoadingState';
|
|
5
5
|
export { default as VcTableHeader } from './parts/TableHeader';
|
|
6
|
-
export { default as
|
|
6
|
+
export { default as VcTableHeaderCell } from './parts/TableHeaderCell';
|
|
7
7
|
export { default as VcTableHiddenResultsHint } from './parts/TableHiddenResultsHint';
|
|
8
|
-
export { default as VcTableInteractiveElement } from './parts/TableInteractiveElement';
|
|
9
8
|
export { default as VcTableRoot } from './parts/TableRoot';
|
|
10
9
|
export { default as VcTableRow } from './parts/TableRow';
|
|
11
10
|
export { default as VcTableScrollContainer } from './parts/TableScrollContainer';
|
|
12
|
-
export
|
|
13
|
-
export { createTableStyle } from './table.style';
|
|
14
|
-
export type { TableColumn } from './table.type';
|
|
15
|
-
export { default as VcTable } from './Table';
|
|
11
|
+
export { type TableRowAction } from './table.type';
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
declare
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: HTMLDivElement;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
2
12
|
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
-
|
|
3
|
-
* When set to true, the cell will have the primary text color to make it stand out
|
|
4
|
-
* @default false
|
|
5
|
-
*/
|
|
2
|
+
hasInteractiveContent?: boolean;
|
|
6
3
|
isPrimaryCell?: boolean;
|
|
7
4
|
};
|
|
8
5
|
declare function __VLS_template(): {
|
|
@@ -15,6 +12,7 @@ declare function __VLS_template(): {
|
|
|
15
12
|
};
|
|
16
13
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
14
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
hasInteractiveContent: boolean;
|
|
18
16
|
isPrimaryCell: boolean;
|
|
19
17
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
20
18
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
declare
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: HTMLDivElement;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
2
12
|
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -1,14 +1,25 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
isSortable?: boolean;
|
|
3
|
+
sortDirection?: 'asc' | 'desc' | null;
|
|
4
|
+
};
|
|
1
5
|
declare function __VLS_template(): {
|
|
2
6
|
attrs: Partial<{}>;
|
|
3
7
|
slots: {
|
|
4
|
-
|
|
5
|
-
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
default?(_: {}): any;
|
|
6
10
|
};
|
|
7
11
|
refs: {};
|
|
8
|
-
rootEl:
|
|
12
|
+
rootEl: HTMLDivElement;
|
|
9
13
|
};
|
|
10
14
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
+
sort: () => any;
|
|
17
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onSort?: (() => any) | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
isSortable: boolean;
|
|
21
|
+
sortDirection: "asc" | "desc" | null;
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
12
23
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
13
24
|
export default _default;
|
|
14
25
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
isEmpty: boolean;
|
|
3
|
+
isLoading: boolean;
|
|
4
|
+
activeFilterCount: number;
|
|
5
|
+
onClear: () => void;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
2
8
|
export default _default;
|
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
import { TableEmits } from '../table.emits';
|
|
2
1
|
import { TableProps } from '../table.props';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
6
|
-
readonly onNextPage?: (() => any) | undefined;
|
|
7
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onNextPage"> & TableProps<TSchema, TPagination> & Partial<{}>> & import('vue').PublicProps;
|
|
8
|
-
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
9
|
-
attrs: any;
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
10
4
|
slots: {
|
|
11
|
-
default?(_: {
|
|
5
|
+
default?(_: {
|
|
6
|
+
hasReachedHorizontalEnd: boolean;
|
|
7
|
+
hasVerticalOverflow: boolean;
|
|
8
|
+
isScrolledHorizontally: boolean;
|
|
9
|
+
}): any;
|
|
12
10
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
11
|
+
refs: {};
|
|
12
|
+
rootEl: HTMLDivElement;
|
|
16
13
|
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<TableProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TableProps> & Readonly<{}>, {
|
|
16
|
+
variant: null;
|
|
17
|
+
classConfig: import('../../../class-variant/classVariant.type').ResolvedClassConfig<"table"> | null;
|
|
18
|
+
isFirstColumnSticky: boolean;
|
|
19
|
+
isLastColumnSticky: boolean;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
21
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
17
22
|
export default _default;
|
|
18
|
-
type
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -1,5 +1,23 @@
|
|
|
1
|
+
import { TableRowAction } from '../table.type';
|
|
1
2
|
type __VLS_Props = {
|
|
2
|
-
|
|
3
|
+
action?: TableRowAction | null;
|
|
3
4
|
};
|
|
4
|
-
declare
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: HTMLDivElement;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
action: TableRowAction | null;
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
5
18
|
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
rowCount: ComputedRef<number>;
|
|
6
|
-
onNextPage: () => void;
|
|
7
|
-
}
|
|
8
|
-
interface UseTable {
|
|
9
|
-
hasReachedHorizontalEnd: ComputedRef<boolean>;
|
|
10
|
-
hasVerticalOverflow: ComputedRef<boolean>;
|
|
11
|
-
isScrolledHorizontally: ComputedRef<boolean>;
|
|
12
|
-
gridTemplateColumns: ComputedRef<string>;
|
|
1
|
+
export declare function useTable(): {
|
|
2
|
+
hasReachedHorizontalEnd: import('vue').ComputedRef<boolean>;
|
|
3
|
+
hasVerticalOverflow: import('vue').ComputedRef<boolean>;
|
|
4
|
+
isScrolledHorizontally: import('vue').ComputedRef<boolean>;
|
|
13
5
|
setTableScrollContainerRef: (el: HTMLElement) => void;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export {};
|
|
6
|
+
tableScrollContainerRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
7
|
+
};
|
|
@@ -3,17 +3,13 @@ import { ResolvedClassConfig } from '../../class-variant/classVariant.type';
|
|
|
3
3
|
import { TableProps } from './table.props';
|
|
4
4
|
import { CreateTableStyle } from './table.style';
|
|
5
5
|
import { PropsToComputed } from '../../utils/props.util';
|
|
6
|
-
interface TableContext extends PropsToComputed<TableProps
|
|
6
|
+
interface TableContext extends PropsToComputed<TableProps> {
|
|
7
7
|
hasReachedHorizontalEnd: ComputedRef<boolean>;
|
|
8
8
|
hasVerticalOverflow: ComputedRef<boolean>;
|
|
9
|
-
isEmpty: ComputedRef<boolean>;
|
|
10
9
|
isScrolledHorizontally: ComputedRef<boolean>;
|
|
11
|
-
activeFilterCount: ComputedRef<number>;
|
|
12
10
|
customClassConfig: ComputedRef<ResolvedClassConfig<'table'>>;
|
|
13
|
-
gridTemplateColumns: ComputedRef<string>;
|
|
14
11
|
setTableScrollContainerRef: (el: HTMLElement) => void;
|
|
15
12
|
style: ComputedRef<CreateTableStyle>;
|
|
16
|
-
onClearFiltersAndSearch: () => void;
|
|
17
13
|
}
|
|
18
14
|
export declare const useProvideTableContext: (context: TableContext) => TableContext, useInjectTableContext: <TFallback extends TableContext | null = TableContext>(fallback?: TFallback | undefined) => TFallback extends null ? TableContext | null : TableContext;
|
|
19
15
|
export {};
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import { CustomizableElement, GetComponentProp } from '../../class-variant/classVariant.type';
|
|
2
|
-
|
|
3
|
-
import { BasePagination, PaginatedData, Pagination } from '../../composables/pagination/pagination.type';
|
|
4
|
-
import { Routes } from '../../types/routes.type';
|
|
5
|
-
interface LinkAction<TSchema> {
|
|
6
|
-
label: (data: TSchema) => string;
|
|
7
|
-
to: (data: TSchema) => Routes[number];
|
|
8
|
-
type: 'link';
|
|
9
|
-
}
|
|
10
|
-
interface ButtonAction<TSchema> {
|
|
11
|
-
label: (data: TSchema) => string;
|
|
12
|
-
type: 'button';
|
|
13
|
-
onClick: (data: TSchema) => void;
|
|
14
|
-
}
|
|
15
|
-
type RowAction<TSchema> = ButtonAction<TSchema> | LinkAction<TSchema>;
|
|
16
|
-
export interface TableProps<TSchema, TPagination extends BasePagination> extends CustomizableElement<'table'> {
|
|
2
|
+
export interface TableProps extends CustomizableElement<'table'> {
|
|
17
3
|
/**
|
|
18
4
|
* Makes the first column sticky (fixed) when horizontally scrolling.
|
|
19
5
|
* @default false
|
|
@@ -25,30 +11,11 @@ export interface TableProps<TSchema, TPagination extends BasePagination> extends
|
|
|
25
11
|
*/
|
|
26
12
|
isLastColumnSticky?: boolean;
|
|
27
13
|
/**
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
isLoading: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* An array of column definitions that describe how to render each column.
|
|
33
|
-
*/
|
|
34
|
-
columns: TableColumn<TSchema>[];
|
|
35
|
-
/**
|
|
36
|
-
* The paginated data to be displayed in the table.
|
|
37
|
-
*/
|
|
38
|
-
data: PaginatedData<TSchema> | null;
|
|
39
|
-
/**
|
|
40
|
-
* Pagination object
|
|
41
|
-
*/
|
|
42
|
-
pagination: Pagination<TPagination>;
|
|
43
|
-
/**
|
|
44
|
-
* Optional row-level action. When using other interactable elements inside cells,
|
|
45
|
-
* make sure to user the `TableInteractiveElement` component.
|
|
46
|
-
* @default null
|
|
14
|
+
* The grid template columns style for the table.
|
|
47
15
|
*/
|
|
48
|
-
|
|
16
|
+
gridTemplateColumns: string;
|
|
49
17
|
/**
|
|
50
18
|
* Defines the visual style of the table.
|
|
51
19
|
*/
|
|
52
20
|
variant?: GetComponentProp<'table', 'variant'> | null;
|
|
53
21
|
}
|
|
54
|
-
export {};
|
|
@@ -6,6 +6,7 @@ export declare const createTableStyle: import('tailwind-variants').TVReturnType<
|
|
|
6
6
|
cellSkeleton: string;
|
|
7
7
|
header: string;
|
|
8
8
|
headerCell: string;
|
|
9
|
+
headerCellLabel: string;
|
|
9
10
|
hiddenResultsHint: string;
|
|
10
11
|
root: string;
|
|
11
12
|
row: string;
|
|
@@ -16,6 +17,7 @@ export declare const createTableStyle: import('tailwind-variants').TVReturnType<
|
|
|
16
17
|
cellSkeleton: string;
|
|
17
18
|
header: string;
|
|
18
19
|
headerCell: string;
|
|
20
|
+
headerCellLabel: string;
|
|
19
21
|
hiddenResultsHint: string;
|
|
20
22
|
root: string;
|
|
21
23
|
row: string;
|
|
@@ -26,6 +28,7 @@ export declare const createTableStyle: import('tailwind-variants').TVReturnType<
|
|
|
26
28
|
cellSkeleton: string;
|
|
27
29
|
header: string;
|
|
28
30
|
headerCell: string;
|
|
31
|
+
headerCellLabel: string;
|
|
29
32
|
hiddenResultsHint: string;
|
|
30
33
|
root: string;
|
|
31
34
|
row: string;
|
|
@@ -1,44 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* @default null
|
|
6
|
-
*/
|
|
7
|
-
testId?: string;
|
|
8
|
-
/**
|
|
9
|
-
* Whether the column is sortable
|
|
10
|
-
* @default false
|
|
11
|
-
*/
|
|
12
|
-
isSortable?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* The cell render function of the column
|
|
15
|
-
*/
|
|
16
|
-
cell: (row: TSchema) => VNode;
|
|
17
|
-
/**
|
|
18
|
-
* The header render function of the column
|
|
19
|
-
*/
|
|
20
|
-
header?: (column: TableColumn<TSchema>) => VNode;
|
|
21
|
-
/**
|
|
22
|
-
* The header label of the column
|
|
23
|
-
*/
|
|
24
|
-
headerLabel?: string;
|
|
25
|
-
/**
|
|
26
|
-
* The key of the column
|
|
27
|
-
*/
|
|
28
|
-
key: string;
|
|
29
|
-
/**
|
|
30
|
-
* The maximum width of the column. Be careful when using this property, as it can cause underflow issues
|
|
31
|
-
* where the width of the content is smaller than the width of the table.
|
|
32
|
-
* @default 'auto'
|
|
33
|
-
*/
|
|
34
|
-
maxWidth?: string;
|
|
35
|
-
/**
|
|
36
|
-
* The skeleton render function of the column
|
|
37
|
-
*/
|
|
38
|
-
skeleton?: (row: TSchema) => VNode;
|
|
39
|
-
/**
|
|
40
|
-
* The width of the column
|
|
41
|
-
* @default 'min-content'
|
|
42
|
-
*/
|
|
43
|
-
width?: string;
|
|
1
|
+
interface LinkAction {
|
|
2
|
+
label: string;
|
|
3
|
+
to: Routes[number];
|
|
4
|
+
type: 'link';
|
|
44
5
|
}
|
|
6
|
+
interface ButtonAction {
|
|
7
|
+
label: string;
|
|
8
|
+
type: 'button';
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
}
|
|
11
|
+
export type TableRowAction = ButtonAction | LinkAction;
|
|
12
|
+
export {};
|