@knitify/vue 0.0.9 → 2.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 +111 -0
- package/dist/index.es.js +4490 -221
- 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 +15 -0
- package/dist/types/components/Avatar/KAvatarGroup.vue.d.ts +11 -0
- package/dist/types/components/Avatar/types.d.ts +130 -0
- package/dist/types/components/Badge/types.d.ts +2 -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/types.d.ts +15 -4
- 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/KChatDivider.vue.d.ts +11 -0
- package/dist/types/components/Chat/KChatMessage.vue.d.ts +11 -0
- package/dist/types/components/Chat/KChatMessageActions.vue.d.ts +18 -0
- package/dist/types/components/Chat/KChatMessages.vue.d.ts +11 -0
- package/dist/types/components/Chat/KChatNotice.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 +140 -0
- package/dist/types/components/ChatDock/KChatDock.vue.d.ts +45 -0
- package/dist/types/components/ChatDock/KChatDockItem.vue.d.ts +11 -0
- package/dist/types/components/ChatDock/KChatDockPanel.vue.d.ts +11 -0
- package/dist/types/components/ChatDock/KChatWindow.vue.d.ts +27 -0
- package/dist/types/components/ChatDock/KMessenger.vue.d.ts +23 -0
- package/dist/types/components/ChatDock/keys.d.ts +98 -0
- package/dist/types/components/ChatDock/messenger-types.d.ts +280 -0
- package/dist/types/components/ChatDock/store-keys.d.ts +7 -0
- package/dist/types/components/ChatDock/types.d.ts +134 -0
- package/dist/types/components/ChatDock/useChatDock.d.ts +11 -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 +31 -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 +3 -1
- package/dist/types/components/Input/types.d.ts +8 -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 +49 -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/Spinner/KSpinner.vue.d.ts +6 -0
- package/dist/types/components/Spinner/types.d.ts +13 -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 +56 -0
- package/dist/types/components/types.d.ts +31 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types.d.ts +1 -0
- package/dist/types/utils/useDocumentEvent.d.ts +19 -0
- package/dist/types/utils/useExclusive.d.ts +13 -0
- package/dist/types/utils/useTopmost.d.ts +17 -0
- package/dist/web-types.json +5107 -0
- package/package.json +22 -6
- package/dist/types/stories/KBadge.stories.d.ts +0 -104
- package/dist/types/stories/KButton.stories.d.ts +0 -117
- package/dist/types/stories/KContainer.stories.d.ts +0 -84
- package/dist/types/stories/KInput.stories.d.ts +0 -172
- package/dist/types/stories/KNavbar.stories.d.ts +0 -67
- package/dist/types/stories/KNavbarMenu.stories.d.ts +0 -99
|
@@ -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
|
+
shown: () => any;
|
|
14
|
+
hidden: () => any;
|
|
15
|
+
"update:open": (value: boolean) => any;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
17
|
+
onShown?: (() => any) | undefined;
|
|
18
|
+
onHidden?: (() => 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)[];
|
|
@@ -5,7 +5,9 @@ type __VLS_ModelProps = {
|
|
|
5
5
|
modelValue?: string;
|
|
6
6
|
};
|
|
7
7
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
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, {
|
|
9
11
|
"update:modelValue": (value: string | undefined) => any;
|
|
10
12
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
11
13
|
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
@@ -3,11 +3,19 @@ export type KInputSlots = {
|
|
|
3
3
|
suffix?(): any;
|
|
4
4
|
};
|
|
5
5
|
export type KInputProps = {
|
|
6
|
+
addonBordered?: boolean;
|
|
7
|
+
/** Implies `textarea`. Growth is core's `Input.ts`, driven by this component. */
|
|
8
|
+
autosize?: boolean;
|
|
6
9
|
disabled?: boolean;
|
|
7
10
|
ghost?: boolean;
|
|
11
|
+
maxRows?: number;
|
|
8
12
|
placeholder?: string;
|
|
13
|
+
readonly?: boolean;
|
|
9
14
|
rounded?: boolean;
|
|
15
|
+
/** Fixed-height textareas only — an autosize field is always one row tall to start. */
|
|
16
|
+
rows?: number;
|
|
10
17
|
sunken?: boolean;
|
|
18
|
+
textarea?: boolean;
|
|
11
19
|
transparent?: boolean;
|
|
12
20
|
type?: string;
|
|
13
21
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { KMenuListProps, KMenuListSlots } from './types';
|
|
2
|
+
type __VLS_Slots = KMenuListSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<KMenuListProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KMenuListProps> & 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 { KMenuListItemProps, KMenuListSlots } from './types';
|
|
2
|
+
type __VLS_Slots = KMenuListSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<KMenuListItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KMenuListItemProps> & 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,20 @@
|
|
|
1
|
+
import type { RouteLocationRaw } from 'vue-router';
|
|
2
|
+
export type KMenuListProps = {
|
|
3
|
+
/** Names the navigation landmark wrapping the list. Omit for a plain list. */
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
};
|
|
6
|
+
export type KMenuListItemProps = {
|
|
7
|
+
/**
|
|
8
|
+
* Marks the current row. With `to` and no explicit value, it follows the
|
|
9
|
+
* router's own active state.
|
|
10
|
+
*/
|
|
11
|
+
active?: boolean;
|
|
12
|
+
/** Native `disabled` on a button; `is-disabled` + `aria-disabled` on a link. */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
href?: string;
|
|
15
|
+
/** Router destination. Takes precedence over `href`. */
|
|
16
|
+
to?: RouteLocationRaw;
|
|
17
|
+
};
|
|
18
|
+
export type KMenuListSlots = {
|
|
19
|
+
default?(): any;
|
|
20
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { KModalProps, KModalSlots } from './types';
|
|
2
|
+
type __VLS_Props = KModalProps;
|
|
3
|
+
type __VLS_Slots = KModalSlots;
|
|
4
|
+
declare function show(): void;
|
|
5
|
+
declare function hide(): void;
|
|
6
|
+
declare function toggle(): void;
|
|
7
|
+
type __VLS_ModelProps = {
|
|
8
|
+
'open'?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
12
|
+
show: typeof show;
|
|
13
|
+
hide: typeof hide;
|
|
14
|
+
toggle: typeof toggle;
|
|
15
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
"update:open": (value: boolean) => any;
|
|
17
|
+
} & {
|
|
18
|
+
shown: () => any;
|
|
19
|
+
hidden: () => any;
|
|
20
|
+
hide: () => any;
|
|
21
|
+
show: () => any;
|
|
22
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
23
|
+
onShown?: (() => any) | undefined;
|
|
24
|
+
onHidden?: (() => any) | undefined;
|
|
25
|
+
onHide?: (() => any) | undefined;
|
|
26
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
27
|
+
onShow?: (() => any) | undefined;
|
|
28
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ClassValue } from 'vue';
|
|
2
|
+
export type KModalSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
export type KModalProps = {
|
|
4
|
+
bodyClass?: ClassValue;
|
|
5
|
+
/** Vertically centre the dialog rather than aligning it to the top. */
|
|
6
|
+
centered?: boolean;
|
|
7
|
+
/** Renders the header's dismiss button. */
|
|
8
|
+
closable?: boolean;
|
|
9
|
+
containerClass?: ClassValue;
|
|
10
|
+
dialogClass?: ClassValue;
|
|
11
|
+
dialogLabel?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Focus the first focusable element on open. Core rebuilds its own instance
|
|
14
|
+
* for `data-kt-modal-toggle` clicks and does not read this off the DOM, so it
|
|
15
|
+
* only applies when Vue opens the modal.
|
|
16
|
+
*/
|
|
17
|
+
focus?: boolean;
|
|
18
|
+
footerClass?: ClassValue;
|
|
19
|
+
fullscreen?: boolean;
|
|
20
|
+
headerClass?: ClassValue;
|
|
21
|
+
/** Defaults to a generated id. Point `data-kt-modal-toggle` at this. */
|
|
22
|
+
id?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Close on Escape. Honoured on both paths — the wrapper intercepts the key in
|
|
25
|
+
* the capture phase to hold core's own handler off.
|
|
26
|
+
*
|
|
27
|
+
* With two modals open at once, core closes the first `is-active` element in
|
|
28
|
+
* document order rather than the topmost, so Escape can reach the wrong one.
|
|
29
|
+
*/
|
|
30
|
+
keyboard?: boolean;
|
|
31
|
+
mainClass?: ClassValue;
|
|
32
|
+
scrollable?: boolean;
|
|
33
|
+
sidebarClass?: ClassValue;
|
|
34
|
+
size?: KModalSize;
|
|
35
|
+
/** Ignore backdrop clicks, leaving an explicit dismiss the only way out. */
|
|
36
|
+
staticBackdrop?: boolean;
|
|
37
|
+
title?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Render into `document.body`. On by default: the modal is `position: fixed`,
|
|
40
|
+
* which a transformed or filtered ancestor would otherwise contain.
|
|
41
|
+
*/
|
|
42
|
+
teleport?: boolean;
|
|
43
|
+
};
|
|
44
|
+
export type KModalEmits = {
|
|
45
|
+
(event: 'hide'): void;
|
|
46
|
+
(event: 'hidden'): void;
|
|
47
|
+
(event: 'show'): void;
|
|
48
|
+
(event: 'shown'): void;
|
|
49
|
+
};
|
|
50
|
+
export type KModalSlots = {
|
|
51
|
+
close?(): any;
|
|
52
|
+
default?(): any;
|
|
53
|
+
footer?(): any;
|
|
54
|
+
header?(): any;
|
|
55
|
+
sidebar?(): any;
|
|
56
|
+
title?(): any;
|
|
57
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { KNotificationListProps, KNotificationListSlots } from './types';
|
|
2
|
+
type __VLS_Slots = KNotificationListSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<KNotificationListProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KNotificationListProps> & 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 { KNotificationListItemProps, KNotificationListItemSlots } from './types';
|
|
2
|
+
type __VLS_Slots = KNotificationListItemSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<KNotificationListItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KNotificationListItemProps> & 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,36 @@
|
|
|
1
|
+
export type KNotificationListProps = {
|
|
2
|
+
/** Names the list for a screen reader. */
|
|
3
|
+
ariaLabel?: string;
|
|
4
|
+
};
|
|
5
|
+
export type KNotificationListItemProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Forces the actions slot open. Core hides it until the row is hovered or
|
|
8
|
+
* focused within.
|
|
9
|
+
*/
|
|
10
|
+
hovered?: boolean;
|
|
11
|
+
/** Relative timestamp. The `time` slot overrides it. */
|
|
12
|
+
time?: string;
|
|
13
|
+
/** Unread. Maps to core's `is-active`. */
|
|
14
|
+
unread?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Visually hidden prefix announcing the unread state. Core's `is-active`
|
|
17
|
+
* changes only a fill and a bar, which conveys nothing to a screen reader
|
|
18
|
+
* or to anyone who cannot separate the brand tint from the base surface
|
|
19
|
+
* (WCAG 1.4.1). Core ships no visually-hidden utility, so this supplies one.
|
|
20
|
+
*/
|
|
21
|
+
unreadLabel?: string;
|
|
22
|
+
};
|
|
23
|
+
export type KNotificationListSlots = {
|
|
24
|
+
default?(): any;
|
|
25
|
+
};
|
|
26
|
+
export type KNotificationListItemSlots = {
|
|
27
|
+
/**
|
|
28
|
+
* The overflow trigger. Core keeps this `display: none` until hover, which
|
|
29
|
+
* puts it outside the tab order — on a row with no inline link there is no
|
|
30
|
+
* keyboard path to it. Use `hovered` to keep it visible where that matters.
|
|
31
|
+
*/
|
|
32
|
+
actions?(): any;
|
|
33
|
+
default?(): any;
|
|
34
|
+
media?(): any;
|
|
35
|
+
time?(): any;
|
|
36
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { KPopoverProps, KPopoverSlots } from './types';
|
|
2
|
+
type __VLS_Props = KPopoverProps;
|
|
3
|
+
type __VLS_Slots = KPopoverSlots;
|
|
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
|
+
shown: () => any;
|
|
14
|
+
hidden: () => any;
|
|
15
|
+
"update:open": (value: boolean) => any;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
17
|
+
onShown?: (() => any) | undefined;
|
|
18
|
+
onHidden?: (() => 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,24 @@
|
|
|
1
|
+
import { ClassValue } from 'vue';
|
|
2
|
+
export type KPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
3
|
+
export type KPopoverProps = {
|
|
4
|
+
contentClass?: ClassValue;
|
|
5
|
+
placement?: KPlacement;
|
|
6
|
+
toggleClass?: ClassValue;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Core dispatches only the completion pair, so these fire once the overlay has
|
|
10
|
+
* finished opening or closing rather than when it begins.
|
|
11
|
+
*/
|
|
12
|
+
export type KPopoverEmits = {
|
|
13
|
+
hidden: [];
|
|
14
|
+
shown: [];
|
|
15
|
+
};
|
|
16
|
+
export type KPopoverSlots = {
|
|
17
|
+
/** The floating panel. */
|
|
18
|
+
default?(): any;
|
|
19
|
+
/** The element the panel is anchored to. */
|
|
20
|
+
toggle?(props: {
|
|
21
|
+
open: boolean;
|
|
22
|
+
toggle: () => void;
|
|
23
|
+
}): any;
|
|
24
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type Ref, type ShallowRef } from 'vue';
|
|
2
|
+
export type OverlayModule = {
|
|
3
|
+
hide(): void;
|
|
4
|
+
show(): void;
|
|
5
|
+
/** Core moves this to `<body>` while open, so it is outside the root. */
|
|
6
|
+
getContent?(): Element | null;
|
|
7
|
+
};
|
|
8
|
+
export type OverlaySyncOptions<T extends OverlayModule> = {
|
|
9
|
+
/** Builds the core module against the root element. */
|
|
10
|
+
create: (element: HTMLElement) => T;
|
|
11
|
+
/** The `[data-kt-*]` root. */
|
|
12
|
+
element: Readonly<ShallowRef<HTMLElement | null>>;
|
|
13
|
+
onEvent?: (name: 'shown' | 'hidden') => void;
|
|
14
|
+
open: Ref<boolean>;
|
|
15
|
+
/**
|
|
16
|
+
* Opening this overlay closes every other mounted overlay sharing the group.
|
|
17
|
+
* Replaces the sweep core's delegated toggle did by querying
|
|
18
|
+
* `[data-kt-popover].is-active` across the page.
|
|
19
|
+
*/
|
|
20
|
+
group?: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Two-way binding between a `v-model` and core's Popover, Dropdown or Tooltip.
|
|
24
|
+
*
|
|
25
|
+
* Two things differ from the Modal flavour of this pattern:
|
|
26
|
+
*
|
|
27
|
+
* 1. These modules dispatch bare `kt.shown` / `kt.hidden` rather than a
|
|
28
|
+
* namespaced `kt.modal.*`, and the events bubble. A tooltip inside a
|
|
29
|
+
* dropdown would therefore reach the dropdown's listener, so every event is
|
|
30
|
+
* checked against the element it was dispatched on.
|
|
31
|
+
* 2. There is no `show` / `hide` intent event — only the completion pair — so
|
|
32
|
+
* the model updates when the overlay has opened or closed rather than when
|
|
33
|
+
* it starts to.
|
|
34
|
+
*
|
|
35
|
+
* The guard is `moduleOpen`, which tracks the direction the module is heading,
|
|
36
|
+
* because Vue 3.5 batches reactive effects: a flag set around the model write
|
|
37
|
+
* would already be cleared by the time even a `sync` watcher ran.
|
|
38
|
+
*/
|
|
39
|
+
export declare function useOverlaySync<T extends OverlayModule>({ create, element, group, onEvent, open, }: OverlaySyncOptions<T>): {
|
|
40
|
+
/**
|
|
41
|
+
* The live core instance, for module-specific behaviour a wrapper binds
|
|
42
|
+
* itself — Dropdown's submenus, for instance. Undefined before the root
|
|
43
|
+
* element exists.
|
|
44
|
+
*/
|
|
45
|
+
getInstance: () => T | undefined;
|
|
46
|
+
hide: () => void;
|
|
47
|
+
show: () => void;
|
|
48
|
+
toggle: () => void;
|
|
49
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { KProgressProps, KProgressSlots } from './types';
|
|
2
|
+
type __VLS_Slots = KProgressSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<KProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KProgressProps> & 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
|
+
};
|