@knitify/vue 2.0.0 → 2.2.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.
Files changed (94) hide show
  1. package/README.md +6 -1
  2. package/dist/index.es.js +6611 -2755
  3. package/dist/index.umd.js +1 -1
  4. package/dist/types/components/Alert/KAlert.vue.d.ts +22 -2
  5. package/dist/types/components/Alert/types.d.ts +11 -1
  6. package/dist/types/components/ArticleList/KArticleList.vue.d.ts +11 -0
  7. package/dist/types/components/ArticleList/KArticleListItem.vue.d.ts +15 -0
  8. package/dist/types/components/ArticleList/types.d.ts +47 -0
  9. package/dist/types/components/Avatar/types.d.ts +1 -1
  10. package/dist/types/components/ButtonGroup/KButtonGroup.vue.d.ts +11 -0
  11. package/dist/types/components/ButtonGroup/types.d.ts +7 -0
  12. package/dist/types/components/Calendar/types.d.ts +2 -0
  13. package/dist/types/components/Chat/KChatPrompt.vue.d.ts +2 -2
  14. package/dist/types/components/Chat/keys.d.ts +1 -0
  15. package/dist/types/components/Chat/types.d.ts +19 -4
  16. package/dist/types/components/ChatDock/KChatDock.vue.d.ts +4 -2
  17. package/dist/types/components/ChatDock/KChatNewWindow.vue.d.ts +28 -0
  18. package/dist/types/components/ChatDock/KMessenger.vue.d.ts +6 -0
  19. package/dist/types/components/ChatDock/messenger-types.d.ts +56 -1
  20. package/dist/types/components/ChatDock/types.d.ts +30 -2
  21. package/dist/types/components/DataTable/KDataTable.vue.d.ts +71 -0
  22. package/dist/types/components/DataTable/KDataTableLinkCell.vue.d.ts +21 -0
  23. package/dist/types/components/DataTable/KDataTableSettings.vue.d.ts +32 -0
  24. package/dist/types/components/DataTable/KDataTableSort.vue.d.ts +17 -0
  25. package/dist/types/components/DataTable/columnTypes.d.ts +19 -0
  26. package/dist/types/components/DataTable/keys.d.ts +9 -0
  27. package/dist/types/components/DataTable/types.d.ts +269 -0
  28. package/dist/types/components/DateInput/KDateInput.vue.d.ts +26 -0
  29. package/dist/types/components/DateInput/KDateRangeInput.vue.d.ts +31 -0
  30. package/dist/types/components/DateInput/types.d.ts +69 -0
  31. package/dist/types/components/DateInput/useDateInput.d.ts +27 -0
  32. package/dist/types/components/Dialog/KDialogHost.vue.d.ts +3 -0
  33. package/dist/types/components/Dialog/KDialogItem.vue.d.ts +16 -0
  34. package/dist/types/components/Dialog/types.d.ts +61 -0
  35. package/dist/types/components/Dialog/useDialog.d.ts +41 -0
  36. package/dist/types/components/Divider/KDivider.vue.d.ts +11 -0
  37. package/dist/types/components/Divider/types.d.ts +19 -0
  38. package/dist/types/components/Dropzone/KDropzone.vue.d.ts +39 -0
  39. package/dist/types/components/Dropzone/types.d.ts +89 -0
  40. package/dist/types/components/Field/FieldIsolate.d.ts +4 -0
  41. package/dist/types/components/Field/KField.vue.d.ts +11 -0
  42. package/dist/types/components/Field/keys.d.ts +21 -0
  43. package/dist/types/components/Field/types.d.ts +35 -0
  44. package/dist/types/components/FileTree/KFileTree.vue.d.ts +2 -2
  45. package/dist/types/components/Flex/KFlex.vue.d.ts +11 -0
  46. package/dist/types/components/Flex/types.d.ts +26 -0
  47. package/dist/types/components/Input/KInput.vue.d.ts +2 -0
  48. package/dist/types/components/Input/types.d.ts +10 -0
  49. package/dist/types/components/Modal/types.d.ts +9 -1
  50. package/dist/types/components/Pagination/KPagination.vue.d.ts +13 -0
  51. package/dist/types/components/Pagination/range.d.ts +6 -0
  52. package/dist/types/components/Pagination/types.d.ts +20 -0
  53. package/dist/types/components/RadioCard/KRadioCard.vue.d.ts +20 -0
  54. package/dist/types/components/RadioCard/KRadioCardGroup.vue.d.ts +11 -0
  55. package/dist/types/components/RadioCard/types.d.ts +25 -0
  56. package/dist/types/components/SearchInput/KSearchInput.vue.d.ts +22 -0
  57. package/dist/types/components/SearchInput/types.d.ts +7 -0
  58. package/dist/types/components/SegmentedButtons/KSegmentedButton.vue.d.ts +20 -0
  59. package/dist/types/components/SegmentedButtons/KSegmentedButtons.vue.d.ts +11 -0
  60. package/dist/types/components/SegmentedButtons/types.d.ts +25 -0
  61. package/dist/types/components/Select/KSelect.vue.d.ts +2 -0
  62. package/dist/types/components/Select/types.d.ts +8 -0
  63. package/dist/types/components/Skeleton/KSkeleton.vue.d.ts +4 -0
  64. package/dist/types/components/Skeleton/types.d.ts +19 -0
  65. package/dist/types/components/Table/KTable.vue.d.ts +8 -1
  66. package/dist/types/components/Table/KTableResizer.vue.d.ts +4 -0
  67. package/dist/types/components/Table/types.d.ts +28 -1
  68. package/dist/types/components/Tabs/KTabs.vue.d.ts +1 -1
  69. package/dist/types/components/Tabs/types.d.ts +42 -3
  70. package/dist/types/components/TagsInput/KTagsInput.vue.d.ts +32 -0
  71. package/dist/types/components/TagsInput/types.d.ts +68 -0
  72. package/dist/types/components/TagsInput/useTagsInput.d.ts +27 -0
  73. package/dist/types/components/Time/KTime.vue.d.ts +18 -0
  74. package/dist/types/components/Time/types.d.ts +23 -0
  75. package/dist/types/components/TimeInput/KTimeInput.vue.d.ts +26 -0
  76. package/dist/types/components/TimeInput/types.d.ts +27 -0
  77. package/dist/types/components/TimeInput/useTimeInput.d.ts +22 -0
  78. package/dist/types/components/Toast/types.d.ts +22 -0
  79. package/dist/types/components/Toast/useToast.d.ts +14 -2
  80. package/dist/types/components/Toggle/types.d.ts +2 -0
  81. package/dist/types/components/Tooltip/triggerHandlers.d.ts +33 -0
  82. package/dist/types/components/Tooltip/types.d.ts +5 -0
  83. package/dist/types/components/Tooltip/vTooltip.d.ts +10 -0
  84. package/dist/types/components/Workspace/KWorkspace.vue.d.ts +13 -1
  85. package/dist/types/components/Workspace/types.d.ts +10 -0
  86. package/dist/types/components/index.d.ts +29 -0
  87. package/dist/types/components/types.d.ts +20 -0
  88. package/dist/types/index.d.ts +11 -2
  89. package/dist/types/utils/useCoreModule.d.ts +30 -0
  90. package/dist/types/utils/useFieldControl.d.ts +25 -0
  91. package/dist/types/utils/useRootClasses.d.ts +15 -0
  92. package/dist/types/utils/useTopmost.d.ts +3 -1
  93. package/dist/web-types.json +4927 -1307
  94. package/package.json +3 -3
@@ -0,0 +1,89 @@
1
+ export type KDropzoneFileStatus = 'pending' | 'uploading' | 'done' | 'error';
2
+ /** One entry in the model: the file plus where its upload stands. */
3
+ export type KDropzoneFile = {
4
+ /** Stable key for the list; files carry no identity of their own. */
5
+ id: string;
6
+ file: File;
7
+ status: KDropzoneFileStatus;
8
+ /** 0–100, reported through `onProgress` while uploading. */
9
+ progress: number;
10
+ /** Why the upload failed. */
11
+ error?: string;
12
+ /** Whatever the `upload` handler resolved with. */
13
+ response?: unknown;
14
+ };
15
+ export type KDropzoneRejectReason = 'type' | 'size' | 'count';
16
+ export type KDropzoneRejection = {
17
+ file: File;
18
+ reason: KDropzoneRejectReason;
19
+ message: string;
20
+ };
21
+ export type KDropzoneUploadContext = {
22
+ /** Report progress as a 0–100 percentage. */
23
+ onProgress: (percent: number) => void;
24
+ /** Aborted when the file is removed mid-upload. */
25
+ signal: AbortSignal;
26
+ };
27
+ /**
28
+ * Sends one file. Resolve to mark it done (the value lands on `response`);
29
+ * reject to mark it failed (the error's message lands on `error`).
30
+ */
31
+ export type KDropzoneUploadHandler = (file: File, context: KDropzoneUploadContext) => Promise<unknown>;
32
+ export type KDropzoneProps = {
33
+ /** Same syntax as the native `accept`; drops are checked against it too. */
34
+ accept?: string;
35
+ /**
36
+ * Start `upload` as soon as a file is added. Defaults to `true`; turn it off
37
+ * to collect files first and send them with the exposed `upload()`.
38
+ */
39
+ autoUpload?: boolean;
40
+ disabled?: boolean;
41
+ /** Small print under the title, e.g. "PNG or JPG, up to 5 MB". */
42
+ hint?: string;
43
+ invalid?: boolean;
44
+ /** Upper limit on the number of files in the model. */
45
+ maxFiles?: number;
46
+ /** Upper limit per file, in bytes. */
47
+ maxSize?: number;
48
+ /** Allow more than one file. Without it, a new file replaces the old one. */
49
+ multiple?: boolean;
50
+ /** Replaces "Click to upload" — the underlined part of the title. */
51
+ title?: string;
52
+ /**
53
+ * Uploads each file as it is added. Without one, files simply collect in
54
+ * the model as `pending` for the parent to send.
55
+ */
56
+ upload?: KDropzoneUploadHandler;
57
+ };
58
+ export type KDropzoneEmits = {
59
+ /** Files that passed the checks, as they were added to the model. */
60
+ add: [files: KDropzoneFile[]];
61
+ /** Files turned away by `accept`, `maxSize` or `maxFiles`. */
62
+ reject: [rejections: KDropzoneRejection[]];
63
+ remove: [file: KDropzoneFile];
64
+ /** An upload resolved. */
65
+ success: [file: KDropzoneFile];
66
+ /** An upload rejected. */
67
+ error: [file: KDropzoneFile, error: unknown];
68
+ };
69
+ export type KDropzoneSlots = {
70
+ /** Replaces the whole inside of the drop area. */
71
+ default?(props: {
72
+ dragging: boolean;
73
+ open: () => void;
74
+ }): any;
75
+ /** Replaces the upload icon. */
76
+ icon?(): any;
77
+ /** Replaces the hint line. */
78
+ hint?(): any;
79
+ };
80
+ export type KDropzoneExpose = {
81
+ /** Opens the file picker. */
82
+ open: () => void;
83
+ /** Uploads every `pending` and `error` file, or just the one given. */
84
+ upload: (file?: KDropzoneFile) => Promise<void>;
85
+ /** Removes one file, aborting its upload if one is in flight. Ignored while disabled. */
86
+ remove: (file: KDropzoneFile) => void;
87
+ /** Empties the model, aborting uploads in flight. */
88
+ clear: () => void;
89
+ };
@@ -0,0 +1,4 @@
1
+ declare const _default: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
2
+ [key: string]: any;
3
+ }>[] | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
4
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import type { KFieldProps, KFieldSlots } from './types';
2
+ type __VLS_Slots = KFieldSlots;
3
+ declare const __VLS_base: import("vue").DefineComponent<KFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KFieldProps> & 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,21 @@
1
+ import type { ComputedRef, InjectionKey } from 'vue';
2
+ import type { KFieldCount } from './types';
3
+ export interface FieldContext {
4
+ controlId: ComputedRef<string>;
5
+ labelId: ComputedRef<string>;
6
+ hasLabel: ComputedRef<boolean>;
7
+ describedBy: ComputedRef<string | undefined>;
8
+ invalid: ComputedRef<boolean>;
9
+ required: ComputedRef<boolean>;
10
+ /**
11
+ * The hidden "required" text, for controls that cannot take
12
+ * `aria-required` and add it to their `aria-labelledby` instead. Undefined
13
+ * unless the field is required.
14
+ */
15
+ requiredId: ComputedRef<string | undefined>;
16
+ disabled: ComputedRef<boolean>;
17
+ group: ComputedRef<boolean>;
18
+ registerControlId(id: string | undefined): void;
19
+ setCount(count: KFieldCount | null): void;
20
+ }
21
+ export declare const fieldKey: InjectionKey<FieldContext | undefined>;
@@ -0,0 +1,35 @@
1
+ export type KFieldProps = {
2
+ counter?: boolean;
3
+ disabled?: boolean;
4
+ /** A string shows it as the message; `true` marks the field invalid with no message. */
5
+ error?: string | boolean;
6
+ group?: boolean;
7
+ hint?: string;
8
+ horizontal?: boolean;
9
+ id?: string;
10
+ label?: string;
11
+ required?: boolean;
12
+ /**
13
+ * The text announced for a required group or button control (KSelect),
14
+ * where `aria-required` is not allowed. Defaults to `'required'`.
15
+ */
16
+ requiredLabel?: string;
17
+ /** A string shows it as the message; `true` marks the field successful with no message. */
18
+ success?: string | boolean;
19
+ };
20
+ export type KFieldSlotProps = {
21
+ id: string;
22
+ describedBy: string | undefined;
23
+ invalid: boolean;
24
+ required: boolean;
25
+ disabled: boolean;
26
+ };
27
+ export type KFieldSlots = {
28
+ default?(props: KFieldSlotProps): any;
29
+ label?(): any;
30
+ labelEnd?(): any;
31
+ };
32
+ export type KFieldCount = {
33
+ length: number;
34
+ max: number;
35
+ };
@@ -10,17 +10,17 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
10
10
  collapseAll: () => void | undefined;
11
11
  expandAll: () => void | undefined;
12
12
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ load: (id: string) => any;
13
14
  select: (id: string) => any;
14
15
  collapse: (id: string) => any;
15
16
  expand: (id: string) => any;
16
- load: (id: string) => any;
17
17
  "update:expanded": (value: string[]) => any;
18
18
  "update:selected": (value: string | null) => any;
19
19
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
20
+ onLoad?: ((id: string) => any) | undefined;
20
21
  onSelect?: ((id: string) => any) | undefined;
21
22
  onCollapse?: ((id: string) => any) | undefined;
22
23
  onExpand?: ((id: string) => any) | undefined;
23
- onLoad?: ((id: string) => any) | undefined;
24
24
  "onUpdate:expanded"?: ((value: string[]) => any) | undefined;
25
25
  "onUpdate:selected"?: ((value: string | null) => any) | undefined;
26
26
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1,11 @@
1
+ import type { KFlexProps, KFlexSlots } from './types';
2
+ type __VLS_Slots = KFlexSlots;
3
+ declare const __VLS_base: import("vue").DefineComponent<KFlexProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KFlexProps> & 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,26 @@
1
+ import type { Size } from '../../types';
2
+ /** Maps to core's `is-items-*`. */
3
+ export type KFlexAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
4
+ /** Maps to core's `is-justify-*`. */
5
+ export type KFlexJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
6
+ /** Space tokens, matching core's `is-gap-*`. `0` is a real gap. */
7
+ export type KFlexGap = 0 | Size | '6xl';
8
+ export type KFlexProps = {
9
+ /** Cross-axis alignment of the children. */
10
+ align?: KFlexAlign;
11
+ /** Element to render. Defaults to `div`. */
12
+ as?: string;
13
+ gap?: KFlexGap;
14
+ /** `inline-flex` instead of `flex`. */
15
+ inline?: boolean;
16
+ /** Main-axis distribution of the children. */
17
+ justify?: KFlexJustify;
18
+ /** Reverses the order along the main axis. */
19
+ reverse?: boolean;
20
+ /** Lays the children out top to bottom instead of left to right. */
21
+ vertical?: boolean;
22
+ wrap?: boolean;
23
+ };
24
+ export type KFlexSlots = {
25
+ default?(): any;
26
+ };
@@ -8,8 +8,10 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
8
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
9
9
  field: Readonly<import("vue").ShallowRef<HTMLTextAreaElement | null>>;
10
10
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ clear: () => any;
11
12
  "update:modelValue": (value: string | undefined) => any;
12
13
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
14
+ onClear?: (() => any) | undefined;
13
15
  "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
14
16
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
17
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -2,12 +2,22 @@ export type KInputSlots = {
2
2
  prefix?(): any;
3
3
  suffix?(): any;
4
4
  };
5
+ export type KInputEmits = {
6
+ /** The × emptied the field. */
7
+ clear: [];
8
+ };
5
9
  export type KInputProps = {
6
10
  addonBordered?: boolean;
7
11
  /** Implies `textarea`. Growth is core's `Input.ts`, driven by this component. */
8
12
  autosize?: boolean;
13
+ /** Shows a × that clears the value while there is one. Not for textareas. */
14
+ clearable?: boolean;
15
+ /** The × button's accessible name. Default `'Clear'`. */
16
+ clearLabel?: string;
9
17
  disabled?: boolean;
10
18
  ghost?: boolean;
19
+ /** Shows a spinner as the last addon and marks the field busy. It stays editable. */
20
+ loading?: boolean;
11
21
  maxRows?: number;
12
22
  placeholder?: string;
13
23
  readonly?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { ClassValue } from 'vue';
2
- export type KModalSize = 'sm' | 'md' | 'lg' | 'xl';
2
+ export type KModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
3
3
  export type KModalProps = {
4
4
  bodyClass?: ClassValue;
5
5
  /** Vertically centre the dialog rather than aligning it to the top. */
@@ -9,6 +9,8 @@ export type KModalProps = {
9
9
  containerClass?: ClassValue;
10
10
  dialogClass?: ClassValue;
11
11
  dialogLabel?: string;
12
+ /** Removes the header and footer borders that divide them from the body. */
13
+ flush?: boolean;
12
14
  /**
13
15
  * Focus the first focusable element on open. Core rebuilds its own instance
14
16
  * for `data-kt-modal-toggle` clicks and does not read this off the DOM, so it
@@ -31,6 +33,8 @@ export type KModalProps = {
31
33
  mainClass?: ClassValue;
32
34
  scrollable?: boolean;
33
35
  sidebarClass?: ClassValue;
36
+ /** Any CSS length, e.g. `'280px'`. Sets `--kt-modal-sidebar-width`. */
37
+ sidebarWidth?: string;
34
38
  size?: KModalSize;
35
39
  /** Ignore backdrop clicks, leaving an explicit dismiss the only way out. */
36
40
  staticBackdrop?: boolean;
@@ -48,6 +52,10 @@ export type KModalEmits = {
48
52
  (event: 'shown'): void;
49
53
  };
50
54
  export type KModalSlots = {
55
+ /**
56
+ * The close button's content. The default is the sprite's `kt-cross`, so it
57
+ * needs core's icon sprite on the page — imported with `@knitify/core`.
58
+ */
51
59
  close?(): any;
52
60
  default?(): any;
53
61
  footer?(): any;
@@ -0,0 +1,13 @@
1
+ import type { KPaginationProps } from './types';
2
+ type __VLS_Props = KPaginationProps;
3
+ type __VLS_ModelProps = {
4
+ 'page'?: number;
5
+ };
6
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ "update:page": (value: number) => any;
9
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
10
+ "onUpdate:page"?: ((value: number) => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import type { KPaginationItem } from './types';
2
+ /**
3
+ * The pages to show around `page`. The item count stays the same wherever the
4
+ * current page is, so the control doesn't change width as you page through.
5
+ */
6
+ export declare function getPaginationRange(page: number, total: number, siblings: number, boundaries: number): KPaginationItem[];
@@ -0,0 +1,20 @@
1
+ import type { KButtonSize } from '../Button/types';
2
+ export type KPaginationProps = {
3
+ /** Names the navigation landmark. */
4
+ ariaLabel?: string;
5
+ /** Pages shown at each end, before and after the ellipses. */
6
+ boundaries?: number;
7
+ disabled?: boolean;
8
+ /** Accessible name of the next-page button. */
9
+ nextLabel?: string;
10
+ /** Accessible name of the previous-page button. */
11
+ prevLabel?: string;
12
+ /** Pages shown either side of the current one. */
13
+ siblings?: number;
14
+ /** Passed to every page button. Defaults to `sm`. */
15
+ size?: KButtonSize;
16
+ /** Number of pages. */
17
+ total: number;
18
+ };
19
+ /** A page number, or a gap rendered as an ellipsis. */
20
+ export type KPaginationItem = number | 'ellipsis';
@@ -0,0 +1,20 @@
1
+ import type { KRadioCardProps, KRadioCardSlots } from './types';
2
+ type __VLS_Props = KRadioCardProps;
3
+ type __VLS_Slots = KRadioCardSlots;
4
+ type __VLS_ModelProps = {
5
+ modelValue?: unknown;
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: unknown) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:modelValue"?: ((value: unknown) => 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,11 @@
1
+ import type { KRadioCardGroupSlots } from './types';
2
+ type __VLS_Slots = KRadioCardGroupSlots;
3
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, 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,25 @@
1
+ export type KRadioCardProps = {
2
+ disabled?: boolean;
3
+ /**
4
+ * Sprite id of the illustration above the label, e.g. `kt-megaphoneColored`.
5
+ * The `media` slot overrides it.
6
+ */
7
+ icon?: string;
8
+ /** Text under the illustration. The default slot overrides it. */
9
+ label?: string;
10
+ /**
11
+ * Groups cards for keyboard navigation. Selection is driven by the shared
12
+ * `v-model`, so this is only needed when the group must also work natively —
13
+ * inside an uncontrolled form, say.
14
+ */
15
+ name?: string;
16
+ /** What the shared model is set to when this card is picked. */
17
+ value?: unknown;
18
+ };
19
+ export type KRadioCardSlots = {
20
+ default?(): any;
21
+ media?(): any;
22
+ };
23
+ export type KRadioCardGroupSlots = {
24
+ default?(): any;
25
+ };
@@ -0,0 +1,22 @@
1
+ import type { KSearchInputProps, KSearchInputSlots } from './types';
2
+ type __VLS_Props = KSearchInputProps;
3
+ type __VLS_Slots = KSearchInputSlots;
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: import("vue").ComputedRef<HTMLTextAreaElement | null | undefined>;
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
+ };
@@ -0,0 +1,7 @@
1
+ import type { KInputProps } from '../Input/types';
2
+ export type KSearchInputProps = Omit<KInputProps, 'autosize' | 'maxRows' | 'rows' | 'textarea' | 'type'>;
3
+ export type KSearchInputSlots = {
4
+ /** Replaces the search icon. */
5
+ prefix?(): any;
6
+ suffix?(): any;
7
+ };
@@ -0,0 +1,20 @@
1
+ import type { KSegmentedButtonProps, KSegmentedButtonSlots } from './types';
2
+ type __VLS_Props = KSegmentedButtonProps;
3
+ type __VLS_Slots = KSegmentedButtonSlots;
4
+ type __VLS_ModelProps = {
5
+ modelValue?: unknown;
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: unknown) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:modelValue"?: ((value: unknown) => 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,11 @@
1
+ import type { KSegmentedButtonsProps, KSegmentedButtonsSlots } from './types';
2
+ type __VLS_Slots = KSegmentedButtonsSlots;
3
+ declare const __VLS_base: import("vue").DefineComponent<KSegmentedButtonsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KSegmentedButtonsProps> & 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,25 @@
1
+ export type KSegmentedButtonsProps = {
2
+ /** Stretches across the container, splitting the width equally. */
3
+ block?: boolean;
4
+ };
5
+ export type KSegmentedButtonsSlots = {
6
+ default?(): any;
7
+ };
8
+ export type KSegmentedButtonProps = {
9
+ disabled?: boolean;
10
+ /** Sprite id of the icon before the label, e.g. `kt-preview`. */
11
+ icon?: string;
12
+ /** Segment text. The default slot overrides it. */
13
+ label?: string;
14
+ /**
15
+ * Groups segments for keyboard navigation. Selection is driven by the shared
16
+ * `v-model`, so this is only needed when the group must also work natively —
17
+ * inside an uncontrolled form, say.
18
+ */
19
+ name?: string;
20
+ /** What the shared model is set to when this segment is picked. */
21
+ value?: unknown;
22
+ };
23
+ export type KSegmentedButtonSlots = {
24
+ default?(): any;
25
+ };
@@ -7,9 +7,11 @@ type __VLS_ModelProps = {
7
7
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
8
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
9
  change: (value: string) => any;
10
+ clear: () => any;
10
11
  "update:modelValue": (value: string | undefined) => any;
11
12
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
12
13
  onChange?: ((value: string) => any) | undefined;
14
+ onClear?: (() => any) | undefined;
13
15
  "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
14
16
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
17
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -4,11 +4,17 @@ export type KSelectOption = {
4
4
  value: string;
5
5
  };
6
6
  export type KSelectProps = {
7
+ /** Shows a × that clears the selection while there is one. */
8
+ clearable?: boolean;
9
+ /** The × button's accessible name. Default `'Clear'`. */
10
+ clearLabel?: string;
7
11
  disabled?: boolean;
8
12
  /** Sprite href for the caret. */
9
13
  icon?: string;
10
14
  /** Renders the control inline rather than filling its container. */
11
15
  inline?: boolean;
16
+ /** Shows a spinner in place of the caret; the menu does not open while loading. */
17
+ loading?: boolean;
12
18
  menuClass?: ClassValue;
13
19
  /**
14
20
  * A bare string is used as both value and label.
@@ -23,6 +29,8 @@ export type KSelectProps = {
23
29
  };
24
30
  export type KSelectEmits = {
25
31
  change: [value: string];
32
+ /** The × cleared the selection; the model is now `undefined`. */
33
+ clear: [];
26
34
  };
27
35
  export type KSelectSlots = {
28
36
  /** Replaces the generated items. Give each one `data-kt-select-item`. */
@@ -0,0 +1,4 @@
1
+ import type { KSkeletonProps } from './types';
2
+ declare const __VLS_export: import("vue").DefineComponent<KSkeletonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KSkeletonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
+ declare const _default: typeof __VLS_export;
4
+ export default _default;
@@ -0,0 +1,19 @@
1
+ export type KSkeletonShape = 'rect' | 'text' | 'circle' | 'rounded';
2
+ export type KSkeletonAnimation = 'shimmer' | 'pulse' | 'none';
3
+ /** A CSS length, or a number of pixels. */
4
+ export type KSkeletonSize = string | number;
5
+ export type KSkeletonProps = {
6
+ /** Defaults to `rect`. */
7
+ shape?: KSkeletonShape;
8
+ /**
9
+ * Defaults to the full width, or the base avatar size for a `circle`. With
10
+ * `lines`, the width of the whole group.
11
+ */
12
+ width?: KSkeletonSize;
13
+ /** For a `circle`, the diameter when `width` is not given. */
14
+ height?: KSkeletonSize;
15
+ /** Number of `text` lines; the last is shortened. Defaults to 1. */
16
+ lines?: number;
17
+ /** Defaults to `shimmer`. Always off under reduced motion. */
18
+ animation?: KSkeletonAnimation;
19
+ };
@@ -1,6 +1,13 @@
1
1
  import type { KTableProps, KTableSlots } from './types';
2
2
  type __VLS_Slots = KTableSlots;
3
- declare const __VLS_base: import("vue").DefineComponent<KTableProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KTableProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
+ declare const __VLS_base: import("vue").DefineComponent<KTableProps, {
4
+ /** Hands every column back to automatic layout. */
5
+ reset: () => void;
6
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
+ resize: (widths: number[]) => any;
8
+ }, string, import("vue").PublicProps, Readonly<KTableProps> & Readonly<{
9
+ onResize?: ((widths: number[]) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
11
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
5
12
  declare const _default: typeof __VLS_export;
6
13
  export default _default;
@@ -0,0 +1,4 @@
1
+ import type { KTableResizerProps } from './types';
2
+ declare const __VLS_export: import("vue").DefineComponent<KTableResizerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KTableResizerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
+ declare const _default: typeof __VLS_export;
4
+ export default _default;
@@ -6,11 +6,38 @@ export type KTableSize = 'md' | 'lg' | 'xl';
6
6
  * colspans — stays yours.
7
7
  */
8
8
  export type KTableProps = {
9
- borderless?: boolean;
10
9
  hoverable?: boolean;
10
+ /**
11
+ * How many leading columns stay put while the table scrolls sideways, up to
12
+ * 5. Wrap the table in an `overflow-x: auto` container.
13
+ */
14
+ pinStart?: number;
15
+ /** How many trailing columns stay put, up to 5 — e.g. an actions column. */
16
+ pinEnd?: number;
11
17
  size?: KTableSize;
18
+ /**
19
+ * Pins the header to the top of the nearest scrolling ancestor — a
20
+ * height-capped `overflow: auto` wrapper, or the page. Offset it with the
21
+ * `--kt-table-sticky-top` CSS variable, e.g. below a fixed navbar.
22
+ */
23
+ stickyHeader?: boolean;
24
+ /** Tints every other body row. */
12
25
  striped?: boolean;
13
26
  };
27
+ export type KTableEmits = {
28
+ /**
29
+ * A column was resized — dragged, stepped with the arrow keys, or reset by
30
+ * a double-click. Carries every column's width in px, header order.
31
+ */
32
+ (event: 'resize', widths: number[]): void;
33
+ };
34
+ export type KTableResizerProps = {
35
+ /** Names the handle for assistive tech, e.g. "Resize Title". */
36
+ label?: string;
37
+ };
14
38
  export type KTableSlots = {
39
+ /** The table's rows — `<thead>`, `<tbody>` and so on. */
15
40
  default?(): any;
41
+ /** Rendered inside a `<tfoot>` — pass `<tr>`s, e.g. a totals row. */
42
+ footer?(): any;
16
43
  };
@@ -12,8 +12,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
12
12
  } & {
13
13
  shown: (name: string) => any;
14
14
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
15
- "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
16
15
  onShown?: ((name: string) => any) | undefined;
16
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
17
17
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
18
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
19
  declare const _default: typeof __VLS_export;