@knitify/vue 0.0.8 → 1.0.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 +86 -0
- package/dist/index.es.js +2627 -115
- package/dist/index.umd.js +1 -1
- package/dist/types/components/Accordion/KAccordion.vue.d.ts +11 -0
- package/dist/types/components/Accordion/KAccordionItem.vue.d.ts +22 -0
- package/dist/types/components/Accordion/keys.d.ts +2 -0
- package/dist/types/components/Accordion/types.d.ts +37 -0
- package/dist/types/components/Alert/KAlert.vue.d.ts +11 -0
- package/dist/types/components/Alert/types.d.ts +18 -0
- package/dist/types/components/Avatar/KAvatar.vue.d.ts +11 -0
- package/dist/types/components/Avatar/KAvatarGroup.vue.d.ts +11 -0
- package/dist/types/components/Avatar/types.d.ts +42 -0
- package/dist/types/components/Breadcrumb/KBreadcrumb.vue.d.ts +11 -0
- package/dist/types/components/Breadcrumb/KBreadcrumbItem.vue.d.ts +11 -0
- package/dist/types/components/Breadcrumb/types.d.ts +23 -0
- package/dist/types/components/Button/KButton.vue.d.ts +11 -0
- package/dist/types/components/Button/types.d.ts +28 -0
- package/dist/types/components/Calendar/KCalendar.vue.d.ts +34 -0
- package/dist/types/components/Calendar/types.d.ts +26 -0
- package/dist/types/components/Card/KCard.vue.d.ts +11 -0
- package/dist/types/components/Card/types.d.ts +26 -0
- package/dist/types/components/Chat/KChat.vue.d.ts +14 -0
- package/dist/types/components/Chat/KChatMessage.vue.d.ts +11 -0
- package/dist/types/components/Chat/KChatMessages.vue.d.ts +11 -0
- package/dist/types/components/Chat/KChatPrompt.vue.d.ts +30 -0
- package/dist/types/components/Chat/KChatShimmer.vue.d.ts +11 -0
- package/dist/types/components/Chat/keys.d.ts +2 -0
- package/dist/types/components/Chat/types.d.ts +50 -0
- package/dist/types/components/Checkbox/KCheckbox.vue.d.ts +20 -0
- package/dist/types/components/Checkbox/types.d.ts +23 -0
- package/dist/types/components/Collapse/KCollapse.vue.d.ts +32 -0
- package/dist/types/components/Collapse/types.d.ts +32 -0
- package/dist/types/components/Collapse/useCollapseSync.d.ts +29 -0
- package/dist/types/components/Drawer/KDrawer.vue.d.ts +34 -0
- package/dist/types/components/Drawer/types.d.ts +54 -0
- package/dist/types/components/Dropdown/KDropdown.vue.d.ts +28 -0
- package/dist/types/components/Dropdown/KDropdownItem.vue.d.ts +13 -0
- package/dist/types/components/Dropdown/KDropdownMenu.vue.d.ts +13 -0
- package/dist/types/components/Dropdown/types.d.ts +34 -0
- package/dist/types/components/FileTree/KFileTree.vue.d.ts +34 -0
- package/dist/types/components/FileTree/KFileTreeNode.vue.d.ts +20 -0
- package/dist/types/components/FileTree/types.d.ts +39 -0
- package/dist/types/components/Grid/KGrid.vue.d.ts +11 -0
- package/dist/types/components/Grid/KGridColumn.vue.d.ts +11 -0
- package/dist/types/components/Grid/KGridRow.vue.d.ts +19 -0
- package/dist/types/components/Grid/types.d.ts +41 -0
- package/dist/types/components/Grid/useGrid.d.ts +8 -0
- package/dist/types/components/Icon/types.d.ts +1 -1
- package/dist/types/components/Input/KInput.vue.d.ts +22 -0
- package/dist/types/components/Input/types.d.ts +21 -0
- package/dist/types/components/MenuList/KMenuList.vue.d.ts +11 -0
- package/dist/types/components/MenuList/KMenuListItem.vue.d.ts +11 -0
- package/dist/types/components/MenuList/types.d.ts +20 -0
- package/dist/types/components/Modal/KModal.vue.d.ts +36 -0
- package/dist/types/components/Modal/types.d.ts +57 -0
- package/dist/types/components/NotificationList/KNotificationList.vue.d.ts +11 -0
- package/dist/types/components/NotificationList/KNotificationListItem.vue.d.ts +11 -0
- package/dist/types/components/NotificationList/types.d.ts +36 -0
- package/dist/types/components/Popover/KPopover.vue.d.ts +28 -0
- package/dist/types/components/Popover/types.d.ts +24 -0
- package/dist/types/components/Popover/useOverlaySync.d.ts +35 -0
- package/dist/types/components/Progress/KProgress.vue.d.ts +11 -0
- package/dist/types/components/Progress/types.d.ts +19 -0
- package/dist/types/components/Radio/KRadio.vue.d.ts +20 -0
- package/dist/types/components/Radio/types.d.ts +20 -0
- package/dist/types/components/Select/KSelect.vue.d.ts +22 -0
- package/dist/types/components/Select/types.d.ts +30 -0
- package/dist/types/components/Table/KTable.vue.d.ts +11 -0
- package/dist/types/components/Table/types.d.ts +16 -0
- package/dist/types/components/Tabs/KTab.vue.d.ts +13 -0
- package/dist/types/components/Tabs/KTabPanel.vue.d.ts +13 -0
- package/dist/types/components/Tabs/KTabs.vue.d.ts +25 -0
- package/dist/types/components/Tabs/types.d.ts +35 -0
- package/dist/types/components/Toast/types.d.ts +20 -0
- package/dist/types/components/Toast/useToast.d.ts +20 -0
- package/dist/types/components/Toggle/KToggle.vue.d.ts +20 -0
- package/dist/types/components/Toggle/types.d.ts +8 -0
- package/dist/types/components/Tooltip/KTooltip.vue.d.ts +45 -0
- package/dist/types/components/Tooltip/types.d.ts +18 -0
- package/dist/types/components/Workspace/KWorkspace.vue.d.ts +30 -0
- package/dist/types/components/Workspace/types.d.ts +29 -0
- package/dist/types/components/index.d.ts +46 -0
- package/dist/types/components/types.d.ts +29 -0
- package/dist/types/types.d.ts +1 -0
- package/dist/types/utils/capitalize.d.ts +1 -0
- package/package.json +13 -5
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { KChatPromptProps, KChatPromptSlots } from './types';
|
|
2
|
+
type __VLS_Props = KChatPromptProps;
|
|
3
|
+
type __VLS_Slots = KChatPromptSlots;
|
|
4
|
+
type __VLS_ModelProps = {
|
|
5
|
+
modelValue?: string;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
stop: () => any;
|
|
10
|
+
submit: (value: string) => any;
|
|
11
|
+
"update:modelValue": (value: string) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
onStop?: (() => any) | undefined;
|
|
14
|
+
onSubmit?: ((value: string) => any) | undefined;
|
|
15
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
busy: boolean;
|
|
19
|
+
maxRows: number;
|
|
20
|
+
placeholder: string;
|
|
21
|
+
newlineOnEnter: boolean;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { KChatShimmerProps, KChatShimmerSlots } from './types';
|
|
2
|
+
type __VLS_Slots = KChatShimmerSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<KChatShimmerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KChatShimmerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export type KChatProps = {
|
|
2
|
+
ai?: boolean;
|
|
3
|
+
autoscroll?: boolean;
|
|
4
|
+
busy?: boolean;
|
|
5
|
+
height?: string;
|
|
6
|
+
};
|
|
7
|
+
export type KChatSlots = {
|
|
8
|
+
default?(): any;
|
|
9
|
+
footer?(): any;
|
|
10
|
+
};
|
|
11
|
+
export type KChatMessagesSlots = {
|
|
12
|
+
default?(): any;
|
|
13
|
+
};
|
|
14
|
+
export type KChatMessageProps = {
|
|
15
|
+
sender?: boolean;
|
|
16
|
+
time?: string;
|
|
17
|
+
};
|
|
18
|
+
export type KChatMessageSlots = {
|
|
19
|
+
default?(): any;
|
|
20
|
+
time?(): any;
|
|
21
|
+
};
|
|
22
|
+
export type KChatPromptProps = {
|
|
23
|
+
busy?: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
maxRows?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Enter inserts a newline instead of sending. The button becomes the only
|
|
28
|
+
* send path, which is how core's plain-HTML prompt behaves.
|
|
29
|
+
*/
|
|
30
|
+
newlineOnEnter?: boolean;
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
};
|
|
33
|
+
export type KChatPromptEmits = {
|
|
34
|
+
stop: [];
|
|
35
|
+
submit: [value: string];
|
|
36
|
+
};
|
|
37
|
+
export type KChatPromptSlots = {
|
|
38
|
+
send?(props: {
|
|
39
|
+
busy: boolean;
|
|
40
|
+
disabled: boolean;
|
|
41
|
+
}): any;
|
|
42
|
+
};
|
|
43
|
+
export type KChatShimmerProps = {
|
|
44
|
+
interval?: number;
|
|
45
|
+
text?: string;
|
|
46
|
+
texts?: string[];
|
|
47
|
+
};
|
|
48
|
+
export type KChatShimmerSlots = {
|
|
49
|
+
default?(): any;
|
|
50
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { KCheckboxModel, KCheckboxProps, KCheckboxSlots } from './types';
|
|
2
|
+
type __VLS_Props = KCheckboxProps;
|
|
3
|
+
type __VLS_Slots = KCheckboxSlots;
|
|
4
|
+
type __VLS_ModelProps = {
|
|
5
|
+
modelValue?: KCheckboxModel;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (value: KCheckboxModel) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
11
|
+
"onUpdate:modelValue"?: ((value: KCheckboxModel) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `boolean` for a standalone box; an array for a group, where `value` is the
|
|
3
|
+
* entry added and removed as the box is toggled.
|
|
4
|
+
*
|
|
5
|
+
* Core ships no `--error` modifier — the one in its docs helper was removed —
|
|
6
|
+
* so there is deliberately no `error` prop here.
|
|
7
|
+
*/
|
|
8
|
+
export type KCheckboxModel = boolean | unknown[];
|
|
9
|
+
export type KCheckboxProps = {
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Partially-selected, for a "select all" parent. This is a DOM property
|
|
13
|
+
* rather than an attribute, so it is written to the input imperatively.
|
|
14
|
+
*/
|
|
15
|
+
indeterminate?: boolean;
|
|
16
|
+
/** Text beside the box. The default slot overrides it; omit both for a bare box. */
|
|
17
|
+
label?: string;
|
|
18
|
+
/** The entry this box contributes when the model is an array. */
|
|
19
|
+
value?: unknown;
|
|
20
|
+
};
|
|
21
|
+
export type KCheckboxSlots = {
|
|
22
|
+
default?(): any;
|
|
23
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { KCollapseProps, KCollapseSlots } from './types';
|
|
2
|
+
type __VLS_Props = KCollapseProps;
|
|
3
|
+
type __VLS_Slots = KCollapseSlots;
|
|
4
|
+
type __VLS_ModelProps = {
|
|
5
|
+
'expanded'?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
9
|
+
toggle: () => void;
|
|
10
|
+
expand: () => boolean;
|
|
11
|
+
collapse: () => boolean;
|
|
12
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
collapse: () => any;
|
|
14
|
+
collapsed: () => any;
|
|
15
|
+
expand: () => any;
|
|
16
|
+
expanded: () => any;
|
|
17
|
+
"update:expanded": (value: boolean) => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
19
|
+
onCollapse?: (() => any) | undefined;
|
|
20
|
+
onCollapsed?: (() => any) | undefined;
|
|
21
|
+
onExpand?: (() => any) | undefined;
|
|
22
|
+
onExpanded?: (() => any) | undefined;
|
|
23
|
+
"onUpdate:expanded"?: ((value: boolean) => any) | undefined;
|
|
24
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type KCollapseDirection = 'left' | 'right';
|
|
2
|
+
export type KCollapseProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Which edge a horizontal collapse clips from. `right` clips from the right;
|
|
5
|
+
* `left` pins the content to the right edge, which is what a right-hand
|
|
6
|
+
* sidebar wants.
|
|
7
|
+
*/
|
|
8
|
+
direction?: KCollapseDirection;
|
|
9
|
+
/** Collapse along the inline axis rather than the block one. */
|
|
10
|
+
horizontal?: boolean;
|
|
11
|
+
/** Element to render as. */
|
|
12
|
+
tag?: string;
|
|
13
|
+
};
|
|
14
|
+
/** Mirrors core's four `kt.collapse*` events. None carries a payload. */
|
|
15
|
+
export type KCollapseEmits = {
|
|
16
|
+
collapse: [];
|
|
17
|
+
collapsed: [];
|
|
18
|
+
expand: [];
|
|
19
|
+
expanded: [];
|
|
20
|
+
};
|
|
21
|
+
export type KCollapseSlots = {
|
|
22
|
+
/** The panel that opens and closes. */
|
|
23
|
+
default?(): any;
|
|
24
|
+
/**
|
|
25
|
+
* Anything here sits outside the collapsing region. A
|
|
26
|
+
* `data-kt-collapse-toggle` element inside it is driven by core directly.
|
|
27
|
+
*/
|
|
28
|
+
toggle?(props: {
|
|
29
|
+
toggle: () => void;
|
|
30
|
+
expanded: boolean;
|
|
31
|
+
}): any;
|
|
32
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type Ref, type ShallowRef } from 'vue';
|
|
2
|
+
export type CollapseSyncOptions = {
|
|
3
|
+
direction?: () => 'left' | 'right';
|
|
4
|
+
/** The `[data-kt-collapse]` root. */
|
|
5
|
+
element: Readonly<ShallowRef<HTMLElement | null>>;
|
|
6
|
+
expanded: Ref<boolean>;
|
|
7
|
+
horizontal?: () => boolean;
|
|
8
|
+
onEvent?: (name: 'collapse' | 'collapsed' | 'expand' | 'expanded') => void;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Two-way binding between a `v-model` and core's Collapse module.
|
|
12
|
+
*
|
|
13
|
+
* `data-kt-collapse` stays on the element, so core's delegated toggle keeps
|
|
14
|
+
* working — including `data-kt-collapse-group`, where opening one pane closes
|
|
15
|
+
* its siblings through core rather than through Vue. Each sibling hears its own
|
|
16
|
+
* `kt.collapse` and updates its own model, so grouping needs no coordination
|
|
17
|
+
* here.
|
|
18
|
+
*
|
|
19
|
+
* The guard is `moduleExpanded` — which way the module is actually going —
|
|
20
|
+
* rather than a flag set around the model write. Vue 3.5 batches reactive
|
|
21
|
+
* effects, so even a `sync` watcher runs at the end of the enclosing batch,
|
|
22
|
+
* by which time a flag would already have been cleared and the watcher would
|
|
23
|
+
* re-enter the module and dispatch a second event.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useCollapseSync({ direction, element, expanded, horizontal, onEvent, }: CollapseSyncOptions): {
|
|
26
|
+
collapse: () => void;
|
|
27
|
+
expand: () => void;
|
|
28
|
+
toggle: () => void;
|
|
29
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { KDrawerProps, KDrawerSlots } from './types';
|
|
2
|
+
type __VLS_Props = KDrawerProps;
|
|
3
|
+
type __VLS_Slots = KDrawerSlots;
|
|
4
|
+
declare function hide(): void;
|
|
5
|
+
type __VLS_ModelProps = {
|
|
6
|
+
'open'?: boolean;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
10
|
+
show: () => boolean;
|
|
11
|
+
hide: typeof hide;
|
|
12
|
+
toggle: () => boolean;
|
|
13
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
"update:open": (value: boolean) => any;
|
|
15
|
+
} & {
|
|
16
|
+
hidden: () => any;
|
|
17
|
+
hide: () => any;
|
|
18
|
+
show: () => any;
|
|
19
|
+
shown: () => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
+
onHidden?: (() => any) | undefined;
|
|
22
|
+
onHide?: (() => any) | undefined;
|
|
23
|
+
onShow?: (() => any) | undefined;
|
|
24
|
+
onShown?: (() => any) | undefined;
|
|
25
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
26
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ClassValue } from 'vue';
|
|
2
|
+
export type KDrawerEdge = 'left' | 'right';
|
|
3
|
+
/** `md` is core's default and emits no modifier class. */
|
|
4
|
+
export type KDrawerSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export type KDrawerProps = {
|
|
6
|
+
bodyClass?: ClassValue;
|
|
7
|
+
/** Renders the header's dismiss button. */
|
|
8
|
+
closable?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Confine the drawer to its nearest positioned ancestor rather than the
|
|
11
|
+
* viewport. Implies `teleport: false` — moving it to `<body>` would defeat
|
|
12
|
+
* the containment.
|
|
13
|
+
*/
|
|
14
|
+
contained?: boolean;
|
|
15
|
+
/** Which side it slides in from. */
|
|
16
|
+
edge?: KDrawerEdge;
|
|
17
|
+
/**
|
|
18
|
+
* Focus the first focusable element on open. Core rebuilds its own instance
|
|
19
|
+
* for `data-kt-drawer-toggle` clicks and does not read this off the DOM, so
|
|
20
|
+
* it only applies when Vue opens the drawer.
|
|
21
|
+
*/
|
|
22
|
+
focus?: boolean;
|
|
23
|
+
footerClass?: ClassValue;
|
|
24
|
+
headerClass?: ClassValue;
|
|
25
|
+
/** Defaults to a generated id. Point `data-kt-drawer-toggle` at this. */
|
|
26
|
+
id?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Close on Escape. Honoured on both paths — the wrapper intercepts the key
|
|
29
|
+
* in the capture phase to hold core's own handler off.
|
|
30
|
+
*/
|
|
31
|
+
keyboard?: boolean;
|
|
32
|
+
/** Leaves the page behind clickable and drops the scrim. */
|
|
33
|
+
noBackdrop?: boolean;
|
|
34
|
+
panelClass?: ClassValue;
|
|
35
|
+
size?: KDrawerSize;
|
|
36
|
+
/** Ignore backdrop clicks, leaving an explicit dismiss the only way out. */
|
|
37
|
+
staticBackdrop?: boolean;
|
|
38
|
+
/** Defaults to true, except for a `contained` drawer. */
|
|
39
|
+
teleport?: boolean;
|
|
40
|
+
title?: string;
|
|
41
|
+
};
|
|
42
|
+
export type KDrawerEmits = {
|
|
43
|
+
(event: 'hide'): void;
|
|
44
|
+
(event: 'hidden'): void;
|
|
45
|
+
(event: 'show'): void;
|
|
46
|
+
(event: 'shown'): void;
|
|
47
|
+
};
|
|
48
|
+
export type KDrawerSlots = {
|
|
49
|
+
close?(): any;
|
|
50
|
+
default?(): any;
|
|
51
|
+
footer?(): any;
|
|
52
|
+
header?(): any;
|
|
53
|
+
title?(): any;
|
|
54
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { KDropdownProps, KDropdownSlots } from './types';
|
|
2
|
+
type __VLS_Props = KDropdownProps;
|
|
3
|
+
type __VLS_Slots = KDropdownSlots;
|
|
4
|
+
type __VLS_ModelProps = {
|
|
5
|
+
'open'?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
9
|
+
toggle: () => void;
|
|
10
|
+
show: () => boolean;
|
|
11
|
+
hide: () => boolean;
|
|
12
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
hidden: () => any;
|
|
14
|
+
shown: () => any;
|
|
15
|
+
"update:open": (value: boolean) => any;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
17
|
+
onHidden?: (() => any) | undefined;
|
|
18
|
+
onShown?: (() => any) | undefined;
|
|
19
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { KDropdownItemProps } from './types';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
default?(): any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<KDropdownItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KDropdownItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { KDropdownMenuProps } from './types';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
default?(): any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<KDropdownMenuProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KDropdownMenuProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ClassValue } from 'vue';
|
|
2
|
+
import type { KPlacement } from '../Popover/types';
|
|
3
|
+
export type KDropdownProps = {
|
|
4
|
+
/** Renders the menu inline in the flow instead of floating. */
|
|
5
|
+
inline?: boolean;
|
|
6
|
+
menuClass?: ClassValue;
|
|
7
|
+
placement?: KPlacement;
|
|
8
|
+
toggleClass?: ClassValue;
|
|
9
|
+
};
|
|
10
|
+
export type KDropdownItemProps = {
|
|
11
|
+
active?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Opens a submenu. Put a `KDropdownMenu` with `submenu` inside the item's
|
|
14
|
+
* default slot.
|
|
15
|
+
*/
|
|
16
|
+
parent?: boolean;
|
|
17
|
+
/** Renders a non-interactive line of text rather than a menu row. */
|
|
18
|
+
text?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export type KDropdownMenuProps = {
|
|
21
|
+
/** Nested menu, revealed by its parent item. */
|
|
22
|
+
submenu?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export type KDropdownEmits = {
|
|
25
|
+
hidden: [];
|
|
26
|
+
shown: [];
|
|
27
|
+
};
|
|
28
|
+
export type KDropdownSlots = {
|
|
29
|
+
default?(): any;
|
|
30
|
+
toggle?(props: {
|
|
31
|
+
open: boolean;
|
|
32
|
+
toggle: () => void;
|
|
33
|
+
}): any;
|
|
34
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { KFileTreeProps, KFileTreeSlots } from './types';
|
|
2
|
+
type __VLS_Props = KFileTreeProps;
|
|
3
|
+
type __VLS_Slots = KFileTreeSlots;
|
|
4
|
+
type __VLS_ModelProps = {
|
|
5
|
+
'selected'?: string | null;
|
|
6
|
+
'expanded'?: string[];
|
|
7
|
+
};
|
|
8
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
10
|
+
collapseAll: () => void | undefined;
|
|
11
|
+
expandAll: () => void | undefined;
|
|
12
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
select: (id: string) => any;
|
|
14
|
+
collapse: (id: string) => any;
|
|
15
|
+
expand: (id: string) => any;
|
|
16
|
+
load: (id: string) => any;
|
|
17
|
+
"update:expanded": (value: string[]) => any;
|
|
18
|
+
"update:selected": (value: string | null) => any;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
|
+
onSelect?: ((id: string) => any) | undefined;
|
|
21
|
+
onCollapse?: ((id: string) => any) | undefined;
|
|
22
|
+
onExpand?: ((id: string) => any) | undefined;
|
|
23
|
+
onLoad?: ((id: string) => any) | undefined;
|
|
24
|
+
"onUpdate:expanded"?: ((value: string[]) => any) | undefined;
|
|
25
|
+
"onUpdate:selected"?: ((value: string | null) => any) | undefined;
|
|
26
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { KFileTreeNode } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
caretIcon?: string;
|
|
4
|
+
node: KFileTreeNode;
|
|
5
|
+
tabbable?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_Slots = {
|
|
8
|
+
label?(props: {
|
|
9
|
+
node: KFileTreeNode;
|
|
10
|
+
}): any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: 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>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type KFileTreeActivation = 'row' | 'caret';
|
|
2
|
+
export type KFileTreeNode = {
|
|
3
|
+
/** Branch contents. An empty array still makes the node a branch. */
|
|
4
|
+
children?: KFileTreeNode[];
|
|
5
|
+
expanded?: boolean;
|
|
6
|
+
/** Sprite href for the leading glyph. */
|
|
7
|
+
icon?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Stable identity, used by `v-model:selected` and `v-model:expanded`.
|
|
10
|
+
* Falls back to the label, so give siblings distinct labels or supply ids.
|
|
11
|
+
*/
|
|
12
|
+
id?: string;
|
|
13
|
+
label: string;
|
|
14
|
+
/**
|
|
15
|
+
* A branch whose children arrive later. Listen for `load` and push them into
|
|
16
|
+
* the node's `children`.
|
|
17
|
+
*/
|
|
18
|
+
lazy?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export type KFileTreeProps = {
|
|
21
|
+
/** Whether the whole row toggles a branch, or only its caret. */
|
|
22
|
+
activation?: KFileTreeActivation;
|
|
23
|
+
/** Sprite href for a branch's caret. */
|
|
24
|
+
caretIcon?: string;
|
|
25
|
+
nodes?: KFileTreeNode[];
|
|
26
|
+
};
|
|
27
|
+
export type KFileTreeEmits = {
|
|
28
|
+
collapse: [id: string];
|
|
29
|
+
expand: [id: string];
|
|
30
|
+
/** A lazy branch was opened and needs its children. */
|
|
31
|
+
load: [id: string];
|
|
32
|
+
select: [id: string];
|
|
33
|
+
};
|
|
34
|
+
export type KFileTreeSlots = {
|
|
35
|
+
/** Replaces a row's default icon-and-label content. */
|
|
36
|
+
label?(props: {
|
|
37
|
+
node: KFileTreeNode;
|
|
38
|
+
}): any;
|
|
39
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { KGridProps, KGridSlots } from './types';
|
|
2
|
+
type __VLS_Slots = KGridSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<KGridProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KGridProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { KGridColumnProps, KGridSlots } from './types';
|
|
2
|
+
type __VLS_Slots = KGridSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<KGridColumnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KGridColumnProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { KGridSlots } from './types';
|
|
2
|
+
type __VLS_Slots = KGridSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<{
|
|
4
|
+
gap?: import("./types").KGridGap;
|
|
5
|
+
colGap?: import("./types").KGridGap;
|
|
6
|
+
rowGap?: import("./types").KGridGap;
|
|
7
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
8
|
+
gap?: import("./types").KGridGap;
|
|
9
|
+
colGap?: import("./types").KGridGap;
|
|
10
|
+
rowGap?: import("./types").KGridGap;
|
|
11
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Core emits no `md` class — `space.md` is the default gap. */
|
|
2
|
+
export type KGridGap = 0 | 'xs' | 'sm' | 'lg' | 'xl' | '2xl';
|
|
3
|
+
export type KGridAlign = 'start' | 'center' | 'end' | 'stretch';
|
|
4
|
+
export type KGridBreakpoint = 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
5
|
+
/** A bare number, or a value per breakpoint. `base` is the unprefixed class. */
|
|
6
|
+
export type KGridResponsive = number | ({
|
|
7
|
+
base?: number;
|
|
8
|
+
} & Partial<Record<KGridBreakpoint, number>>);
|
|
9
|
+
type GapProps = {
|
|
10
|
+
/** Both axes at once. `rowGap` and `colGap` override it per axis. */
|
|
11
|
+
gap?: KGridGap;
|
|
12
|
+
colGap?: KGridGap;
|
|
13
|
+
rowGap?: KGridGap;
|
|
14
|
+
};
|
|
15
|
+
export type KGridProps = GapProps & {
|
|
16
|
+
align?: KGridAlign;
|
|
17
|
+
/**
|
|
18
|
+
* Equal columns. 1–12 use core's `is-cols-{n}`; anything else falls back to
|
|
19
|
+
* setting `--kt-grid-columns` inline, which is core's documented escape
|
|
20
|
+
* hatch for counts outside that range.
|
|
21
|
+
*/
|
|
22
|
+
cols?: number;
|
|
23
|
+
justify?: KGridAlign;
|
|
24
|
+
/** Sets `--kt-grid-rows`. */
|
|
25
|
+
rows?: number;
|
|
26
|
+
};
|
|
27
|
+
export type KGridRowProps = GapProps;
|
|
28
|
+
export type KGridColumnProps = {
|
|
29
|
+
alignSelf?: KGridAlign;
|
|
30
|
+
justifySelf?: KGridAlign;
|
|
31
|
+
/** Row span. Core ships 2–6 only. */
|
|
32
|
+
row?: number;
|
|
33
|
+
/** Where the column begins. Column numbering starts at 1. */
|
|
34
|
+
start?: KGridResponsive;
|
|
35
|
+
/** How many of the 12 columns to span. */
|
|
36
|
+
span?: KGridResponsive;
|
|
37
|
+
};
|
|
38
|
+
export type KGridSlots = {
|
|
39
|
+
default?(): any;
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { KGridGap, KGridResponsive } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Expands a responsive prop into core's class list. `base` is unprefixed and
|
|
4
|
+
* every breakpoint carries its infix, so `{ base: 12, md: 6 }` on `column`
|
|
5
|
+
* becomes `is-column-12 is-column-md-6`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function responsiveClasses(prefix: string, value: KGridResponsive | undefined): string[];
|
|
8
|
+
export declare function gapClasses(gap?: KGridGap, rowGap?: KGridGap, colGap?: KGridGap): (string | false)[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { KInputProps, KInputSlots } from './types';
|
|
2
|
+
type __VLS_Props = KInputProps;
|
|
3
|
+
type __VLS_Slots = KInputSlots;
|
|
4
|
+
type __VLS_ModelProps = {
|
|
5
|
+
modelValue?: string;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
9
|
+
field: Readonly<import("vue").ShallowRef<HTMLTextAreaElement | null>>;
|
|
10
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|