@knitify/vue 2.0.0 → 2.1.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 (72) hide show
  1. package/README.md +2 -0
  2. package/dist/index.es.js +4847 -2383
  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 +40 -0
  9. package/dist/types/components/Avatar/types.d.ts +1 -1
  10. package/dist/types/components/Calendar/types.d.ts +2 -0
  11. package/dist/types/components/Chat/keys.d.ts +1 -0
  12. package/dist/types/components/Chat/types.d.ts +19 -4
  13. package/dist/types/components/ChatDock/KChatDock.vue.d.ts +2 -0
  14. package/dist/types/components/ChatDock/KChatNewWindow.vue.d.ts +28 -0
  15. package/dist/types/components/ChatDock/KMessenger.vue.d.ts +6 -0
  16. package/dist/types/components/ChatDock/messenger-types.d.ts +56 -1
  17. package/dist/types/components/ChatDock/types.d.ts +30 -2
  18. package/dist/types/components/DateInput/KDateInput.vue.d.ts +26 -0
  19. package/dist/types/components/DateInput/KDateRangeInput.vue.d.ts +31 -0
  20. package/dist/types/components/DateInput/types.d.ts +69 -0
  21. package/dist/types/components/DateInput/useDateInput.d.ts +27 -0
  22. package/dist/types/components/Divider/KDivider.vue.d.ts +11 -0
  23. package/dist/types/components/Divider/types.d.ts +19 -0
  24. package/dist/types/components/Field/FieldIsolate.d.ts +4 -0
  25. package/dist/types/components/Field/KField.vue.d.ts +11 -0
  26. package/dist/types/components/Field/keys.d.ts +21 -0
  27. package/dist/types/components/Field/types.d.ts +35 -0
  28. package/dist/types/components/Flex/KFlex.vue.d.ts +11 -0
  29. package/dist/types/components/Flex/types.d.ts +26 -0
  30. package/dist/types/components/Input/KInput.vue.d.ts +2 -0
  31. package/dist/types/components/Input/types.d.ts +10 -0
  32. package/dist/types/components/Modal/types.d.ts +5 -1
  33. package/dist/types/components/Pagination/KPagination.vue.d.ts +13 -0
  34. package/dist/types/components/Pagination/range.d.ts +6 -0
  35. package/dist/types/components/Pagination/types.d.ts +20 -0
  36. package/dist/types/components/RadioCard/KRadioCard.vue.d.ts +20 -0
  37. package/dist/types/components/RadioCard/KRadioCardGroup.vue.d.ts +11 -0
  38. package/dist/types/components/RadioCard/types.d.ts +25 -0
  39. package/dist/types/components/SearchInput/KSearchInput.vue.d.ts +22 -0
  40. package/dist/types/components/SearchInput/types.d.ts +7 -0
  41. package/dist/types/components/SegmentedButtons/KSegmentedButton.vue.d.ts +20 -0
  42. package/dist/types/components/SegmentedButtons/KSegmentedButtons.vue.d.ts +11 -0
  43. package/dist/types/components/SegmentedButtons/types.d.ts +25 -0
  44. package/dist/types/components/Select/KSelect.vue.d.ts +2 -0
  45. package/dist/types/components/Select/types.d.ts +8 -0
  46. package/dist/types/components/Skeleton/KSkeleton.vue.d.ts +4 -0
  47. package/dist/types/components/Skeleton/types.d.ts +19 -0
  48. package/dist/types/components/Table/KTable.vue.d.ts +8 -1
  49. package/dist/types/components/Table/KTableResizer.vue.d.ts +4 -0
  50. package/dist/types/components/Table/types.d.ts +27 -2
  51. package/dist/types/components/Tabs/types.d.ts +25 -3
  52. package/dist/types/components/TagsInput/KTagsInput.vue.d.ts +32 -0
  53. package/dist/types/components/TagsInput/types.d.ts +68 -0
  54. package/dist/types/components/TagsInput/useTagsInput.d.ts +27 -0
  55. package/dist/types/components/Time/KTime.vue.d.ts +18 -0
  56. package/dist/types/components/Time/types.d.ts +23 -0
  57. package/dist/types/components/TimeInput/KTimeInput.vue.d.ts +26 -0
  58. package/dist/types/components/TimeInput/types.d.ts +27 -0
  59. package/dist/types/components/TimeInput/useTimeInput.d.ts +22 -0
  60. package/dist/types/components/Toggle/types.d.ts +2 -0
  61. package/dist/types/components/Tooltip/triggerHandlers.d.ts +33 -0
  62. package/dist/types/components/Tooltip/types.d.ts +5 -0
  63. package/dist/types/components/Tooltip/vTooltip.d.ts +10 -0
  64. package/dist/types/components/Workspace/KWorkspace.vue.d.ts +13 -1
  65. package/dist/types/components/Workspace/types.d.ts +10 -0
  66. package/dist/types/components/index.d.ts +22 -0
  67. package/dist/types/components/types.d.ts +15 -0
  68. package/dist/types/utils/useCoreModule.d.ts +30 -0
  69. package/dist/types/utils/useFieldControl.d.ts +25 -0
  70. package/dist/types/utils/useRootClasses.d.ts +15 -0
  71. package/dist/web-types.json +4319 -1440
  72. package/package.json +3 -3
@@ -1,6 +1,26 @@
1
- import type { KAlertProps, KAlertSlots } from './types';
1
+ import type { KAlertSlots } from './types';
2
2
  type __VLS_Slots = KAlertSlots;
3
- declare const __VLS_base: import("vue").DefineComponent<KAlertProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KAlertProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
+ declare const __VLS_base: import("vue").DefineComponent<({
4
+ title?: string;
5
+ } & {
6
+ banner?: false;
7
+ variant?: import("../..").Intent;
8
+ }) | ({
9
+ title?: string;
10
+ } & {
11
+ banner: true;
12
+ variant?: import("./types").KAlertBannerIntent;
13
+ }), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<({
14
+ title?: string;
15
+ } & {
16
+ banner?: false;
17
+ variant?: import("../..").Intent;
18
+ }) | ({
19
+ title?: string;
20
+ } & {
21
+ banner: true;
22
+ variant?: import("./types").KAlertBannerIntent;
23
+ })> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
24
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
5
25
  declare const _default: typeof __VLS_export;
6
26
  export default _default;
@@ -1,4 +1,6 @@
1
1
  import { Intent } from '../../types';
2
+ /** The intents core gives a banner colour to. */
3
+ export type KAlertBannerIntent = Extract<Intent, 'caution' | 'critical' | 'info'>;
2
4
  /**
3
5
  * Core ships no `--edged` modifier — the one in its docs helper does not exist
4
6
  * in the stylesheet — so there is deliberately no `edged` prop here.
@@ -6,12 +8,20 @@ import { Intent } from '../../types';
6
8
  * Anchors inside the message need `class="KAlert-link"` to pick up the alert's
7
9
  * text colour. That stays the consumer's job: the slot content is arbitrary,
8
10
  * so the wrapper has nothing to attach it to.
11
+ *
12
+ * `banner` narrows `variant` to the intents that have a banner colour.
9
13
  */
10
14
  export type KAlertProps = {
11
15
  /** Bold label above the message. The `title` slot overrides it. */
12
16
  title?: string;
17
+ } & ({
18
+ banner?: false;
13
19
  variant?: Intent;
14
- };
20
+ } | {
21
+ /** Full-width page banner: no border or radius, centered text. */
22
+ banner: true;
23
+ variant?: KAlertBannerIntent;
24
+ });
15
25
  export type KAlertSlots = {
16
26
  default?(): any;
17
27
  title?(): any;
@@ -0,0 +1,11 @@
1
+ import type { KArticleListProps, KArticleListSlots } from './types';
2
+ type __VLS_Slots = KArticleListSlots;
3
+ declare const __VLS_base: import("vue").DefineComponent<KArticleListProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KArticleListProps> & 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,15 @@
1
+ import type { KArticleListItemProps, KArticleListItemSlots } from './types';
2
+ type __VLS_Slots = KArticleListItemSlots;
3
+ declare const __VLS_base: import("vue").DefineComponent<KArticleListItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
+ click: (event: MouseEvent) => any;
5
+ }, string, import("vue").PublicProps, Readonly<KArticleListItemProps> & Readonly<{
6
+ onClick?: ((event: MouseEvent) => any) | undefined;
7
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
11
+ type __VLS_WithSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
@@ -0,0 +1,40 @@
1
+ import type { RouteLocationRaw } from 'vue-router';
2
+ export type KArticleListProps = {
3
+ /** Names the list for a screen reader. */
4
+ ariaLabel?: string;
5
+ };
6
+ export type KArticleListItemProps = {
7
+ /**
8
+ * Marks the article currently open. Maps to core's `is-active` plus
9
+ * `aria-current`, since the fill alone conveys nothing to a screen reader.
10
+ */
11
+ active?: boolean;
12
+ /** Publication date. The `date` slot overrides it. */
13
+ date?: string;
14
+ /** Native `disabled` on a button; `is-disabled` + `aria-disabled` on a link. */
15
+ disabled?: boolean;
16
+ /** Excerpt, clamped to three lines by core. The default slot overrides it. */
17
+ excerpt?: string;
18
+ /** Forces the hover fill, for previews. */
19
+ hovered?: boolean;
20
+ href?: string;
21
+ /** Sprite id of the trailing icon. */
22
+ icon?: string;
23
+ /** Article title. The `title` slot overrides it. */
24
+ title?: string;
25
+ /** Router destination. Takes precedence over `href`. */
26
+ to?: RouteLocationRaw;
27
+ };
28
+ export type KArticleListItemEmits = {
29
+ click: [event: MouseEvent];
30
+ };
31
+ export type KArticleListSlots = {
32
+ default?(): any;
33
+ };
34
+ export type KArticleListItemSlots = {
35
+ date?(): any;
36
+ /** The excerpt. */
37
+ default?(): any;
38
+ icon?(): any;
39
+ title?(): any;
40
+ };
@@ -19,7 +19,7 @@ export type KAvatarProps = {
19
19
  */
20
20
  colorKey?: string;
21
21
  /**
22
- * Placeholder glyph, used when there is no `src`. `true` is core's `#user`;
22
+ * Placeholder glyph, used when there is no `src`. `true` is core's `#kt-user`;
23
23
  * a string is any other sprite href.
24
24
  */
25
25
  icon?: boolean | string;
@@ -13,6 +13,8 @@ export type KCalendarProps = {
13
13
  maxDate?: Date;
14
14
  minDate?: Date;
15
15
  mode?: KCalendarMode;
16
+ /** Months shown side by side. Two suits range selection; defaults to `1`. */
17
+ months?: 1 | 2;
16
18
  };
17
19
  export type KCalendarEmits = {
18
20
  clear: [];
@@ -1,2 +1,3 @@
1
1
  import type { InjectionKey, Ref } from 'vue';
2
2
  export declare const chatBusyKey: InjectionKey<Ref<boolean>>;
3
+ export declare const chatAiKey: InjectionKey<Ref<boolean>>;
@@ -124,11 +124,25 @@ export type KChatPromptEmits = {
124
124
  stop: [];
125
125
  submit: [value: string];
126
126
  };
127
+ /**
128
+ * `busy` is the chat's busy state; `disabled` is whether the send button is
129
+ * disabled (no draft, or the prompt itself disabled), for controls that
130
+ * should follow it.
131
+ */
132
+ type KChatPromptSlotProps = {
133
+ busy: boolean;
134
+ disabled: boolean;
135
+ };
127
136
  export type KChatPromptSlots = {
128
- send?(props: {
129
- busy: boolean;
130
- disabled: boolean;
131
- }): any;
137
+ send?(props: KChatPromptSlotProps): any;
138
+ /** Inside the field border, before the text (a `KInput` addon). */
139
+ prefix?(props: KChatPromptSlotProps): any;
140
+ /** Inside the field border, after the text (a `KInput` addon). */
141
+ suffix?(props: KChatPromptSlotProps): any;
142
+ /** Outside the field, before it. */
143
+ start?(props: KChatPromptSlotProps): any;
144
+ /** Outside the field, between it and the send button. */
145
+ end?(props: KChatPromptSlotProps): any;
132
146
  };
133
147
  export type KChatShimmerProps = {
134
148
  interval?: number;
@@ -138,3 +152,4 @@ export type KChatShimmerProps = {
138
152
  export type KChatShimmerSlots = {
139
153
  default?(): any;
140
154
  };
155
+ export {};
@@ -25,6 +25,7 @@ declare const __VLS_base: import("vue").DefineComponent<KChatDockProps, {
25
25
  search: (query: string) => any;
26
26
  reflow: () => any;
27
27
  launcher: () => any;
28
+ compose: () => any;
28
29
  panel: (open: boolean) => any;
29
30
  activate: (id: string) => any;
30
31
  }, string, import("vue").PublicProps, Readonly<KChatDockProps> & Readonly<{
@@ -32,6 +33,7 @@ declare const __VLS_base: import("vue").DefineComponent<KChatDockProps, {
32
33
  onSearch?: ((query: string) => any) | undefined;
33
34
  onReflow?: (() => any) | undefined;
34
35
  onLauncher?: (() => any) | undefined;
36
+ onCompose?: (() => any) | undefined;
35
37
  onPanel?: ((open: boolean) => any) | undefined;
36
38
  onActivate?: ((id: string) => any) | undefined;
37
39
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1,28 @@
1
+ import type { KChatNewWindowProps, KChatNewWindowSlots, KChatWindowState } from './types';
2
+ type __VLS_Props = KChatNewWindowProps;
3
+ type __VLS_Slots = KChatNewWindowSlots;
4
+ type __VLS_ModelProps = {
5
+ 'state'?: KChatWindowState;
6
+ };
7
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
9
+ expand: () => void | undefined;
10
+ rail: () => void | undefined;
11
+ focus: () => void | undefined;
12
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ close: () => any;
14
+ search: (query: string) => any;
15
+ "update:state": (value: KChatWindowState) => any;
16
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
17
+ onClose?: (() => any) | undefined;
18
+ onSearch?: ((query: string) => any) | undefined;
19
+ "onUpdate:state"?: ((value: KChatWindowState) => 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
+ };
@@ -6,12 +6,18 @@ declare const __VLS_base: import("vue").DefineComponent<KMessengerProps, ChatDoc
6
6
  open: (id: string) => any;
7
7
  close: (id: string) => any;
8
8
  receive: (message: import("./messenger-types").ChatMessage) => any;
9
+ compose: () => any;
10
+ "new-chat-search": (query: string) => any;
11
+ "new-chat-close": () => any;
9
12
  }, string, import("vue").PublicProps, Readonly<KMessengerProps> & Readonly<{
10
13
  onError?: ((kind: import("./messenger-types").ChatDockErrorKind, id: string | undefined, error: unknown) => any) | undefined;
11
14
  onSend?: ((message: import("./messenger-types").ChatMessage) => any) | undefined;
12
15
  onOpen?: ((id: string) => any) | undefined;
13
16
  onClose?: ((id: string) => any) | undefined;
14
17
  onReceive?: ((message: import("./messenger-types").ChatMessage) => any) | undefined;
18
+ onCompose?: (() => any) | undefined;
19
+ "onNew-chat-search"?: ((query: string) => any) | undefined;
20
+ "onNew-chat-close"?: (() => any) | undefined;
15
21
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
22
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
23
  declare const _default: typeof __VLS_export;
@@ -55,6 +55,12 @@ export type ChatDockLoaders = {
55
55
  export type ChatDockOptions = {
56
56
  /** Drop messages, cursor and draft when a window closes. Default `false`. */
57
57
  evictOnClose?: boolean;
58
+ /**
59
+ * Skip the list load the store otherwise starts on creation; nothing is
60
+ * fetched until `ensureConversations` (or `refreshConversations`) is
61
+ * called. `KMessenger` calls it when the panel first opens. Default `false`.
62
+ */
63
+ lazy?: boolean;
58
64
  };
59
65
  export type ChatWindowState = 'closed' | 'expanded' | 'railed';
60
66
  export type LoadState = 'idle' | 'loading' | 'loaded' | 'error';
@@ -82,6 +88,12 @@ export type ChatDockStore = {
82
88
  /** Whether a composer can be rendered at all. */
83
89
  canSend: boolean;
84
90
  refreshConversations: () => Promise<void>;
91
+ /**
92
+ * Loads the list only if it has not loaded yet: starts a load when idle or
93
+ * failed, joins the one in flight, and does nothing once loaded. Safe to
94
+ * call on every panel open.
95
+ */
96
+ ensureConversations: () => Promise<void>;
85
97
  open: (id: string) => Promise<void>;
86
98
  /**
87
99
  * Shows a window again without treating it as a user-initiated open: no
@@ -130,8 +142,19 @@ export type KMessengerProps = {
130
142
  minWindows?: number;
131
143
  title?: string;
132
144
  placeholder?: string;
145
+ /** The "New chat" window's title. Default `'New Chat'`. */
146
+ newChatTitle?: string;
147
+ /** The "New chat" people search placeholder. Default `'To: Search People'`. */
148
+ newChatPlaceholder?: string;
149
+ /** The "New chat" people search's accessible name. Default `'Search people'`. */
150
+ newChatSearchLabel?: string;
133
151
  /** Passed to `useChatDock` when the component creates the store. */
134
152
  evictOnClose?: boolean;
153
+ /**
154
+ * Passed to `useChatDock` when the component creates the store: the list
155
+ * loads when the panel first opens instead of on mount. Default `false`.
156
+ */
157
+ lazy?: boolean;
135
158
  /**
136
159
  * Passed to every window's `KChat`: stacks message actions under the bubble.
137
160
  * Defaults to `true` — a dock window is too narrow to spare the width beside
@@ -175,6 +198,12 @@ export type KMessengerEmits = {
175
198
  send: [message: ChatMessage];
176
199
  receive: [message: ChatMessage];
177
200
  error: [kind: ChatDockErrorKind, id: string | undefined, error: unknown];
201
+ /** The panel's write button was clicked; the "New chat" window is open. */
202
+ compose: [];
203
+ /** Each keystroke in the "New chat" window's people search. */
204
+ 'new-chat-search': [query: string];
205
+ /** The "New chat" window was closed. */
206
+ 'new-chat-close': [];
178
207
  };
179
208
  export type KMessengerSlots = {
180
209
  /** Inside the avatar circle of a head and a panel row. */
@@ -206,8 +235,16 @@ export type KMessengerSlots = {
206
235
  conversation: ChatConversation;
207
236
  entry: ChatEntry;
208
237
  }): any;
209
- /** The panel header's action area, between the title and close. */
238
+ /** The panel header's action area, before the write, maximize and close. */
210
239
  'panel-actions'?(): any;
240
+ /**
241
+ * The "New chat" window's body, under its people search — e.g. a "Create
242
+ * New Group" link and suggested people. `close` dismisses the window, for
243
+ * once a person is picked.
244
+ */
245
+ 'new-chat'?(props: {
246
+ close: () => void;
247
+ }): any;
211
248
  /** The whole panel row. */
212
249
  item?(props: {
213
250
  conversation: ChatConversation;
@@ -238,6 +275,24 @@ export type KMessengerSlots = {
238
275
  send: (text: string) => void;
239
276
  setDraft: (text: string) => void;
240
277
  }): any;
278
+ /**
279
+ * Extra controls on the default composer, scoped by conversation so one
280
+ * template serves every window: `prefix`/`suffix` inside the field border,
281
+ * `start`/`end` outside it (`end` sits before the send button). Ignored
282
+ * when `composer` replaces the whole footer.
283
+ */
284
+ 'composer-prefix'?(props: {
285
+ conversation: ChatConversation;
286
+ }): any;
287
+ 'composer-suffix'?(props: {
288
+ conversation: ChatConversation;
289
+ }): any;
290
+ 'composer-start'?(props: {
291
+ conversation: ChatConversation;
292
+ }): any;
293
+ 'composer-end'?(props: {
294
+ conversation: ChatConversation;
295
+ }): any;
241
296
  /** Window body while the first page loads. */
242
297
  loading?(props: {
243
298
  conversation: ChatConversation;
@@ -11,6 +11,11 @@ export type KChatDockProps = {
11
11
  export type KChatDockEmits = {
12
12
  reflow: [];
13
13
  launcher: [];
14
+ /**
15
+ * The panel's write button was clicked. The dock mounts nothing itself —
16
+ * render a `KChatNewWindow` (or anything else) in response.
17
+ */
18
+ compose: [];
14
19
  /** After the panel opens or closes. */
15
20
  panel: [open: boolean];
16
21
  /** After each filter, including the reset when the panel closes. */
@@ -65,10 +70,33 @@ export type KChatWindowSlots = {
65
70
  default?(): any;
66
71
  /** A railed head's circle. Falls back to `avatar` when not given. */
67
72
  head?(): any;
73
+ /**
74
+ * A full-width row under the title and actions, inside the header — e.g.
75
+ * the people search of `KChatNewWindow`. Rendered only when passed.
76
+ */
77
+ search?(): any;
68
78
  /** The popover row's avatar. Falls back to `avatar` when not given. */
69
79
  row?(): any;
70
80
  title?(): any;
71
81
  };
82
+ export type KChatNewWindowProps = {
83
+ /** Pairs the window with its rail head, as `KChatWindow`'s `id` does. */
84
+ id?: string;
85
+ title?: string;
86
+ /** People search placeholder. */
87
+ placeholder?: string;
88
+ /** People search's accessible name. Default `'Search people'`. */
89
+ searchLabel?: string;
90
+ };
91
+ export type KChatNewWindowEmits = {
92
+ /** On every keystroke in the people search. */
93
+ search: [query: string];
94
+ close: [];
95
+ };
96
+ export type KChatNewWindowSlots = {
97
+ /** The body under the search: e.g. a "Create New Group" link, suggestions. */
98
+ default?(): any;
99
+ };
72
100
  export type KChatDockPanelProps = {
73
101
  /** Header text. */
74
102
  title?: string;
@@ -84,8 +112,8 @@ export type KChatDockPanelSlots = {
84
112
  /** `KChatDockItem`s. */
85
113
  default?(): any;
86
114
  /**
87
- * Header controls, between the title and the close button — so close stays
88
- * last in the DOM and in the tab order. Rendered only when passed.
115
+ * Header controls, between the title and the built-in write, maximize and
116
+ * close buttons — so close stays last in the DOM and in the tab order.
89
117
  *
90
118
  * Controls here bind their own handlers. Do not put
91
119
  * `data-kt-chat-dock-item` on anything in this slot: `KChatDock`'s root
@@ -0,0 +1,26 @@
1
+ import type { KDateInputInvalidReason, KDateInputProps } from './types';
2
+ type __VLS_Props = KDateInputProps;
3
+ type __VLS_ModelProps = {
4
+ modelValue?: Date | null;
5
+ };
6
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
8
+ clear: () => null;
9
+ close: () => void | undefined;
10
+ focus: () => void | undefined;
11
+ open: () => void | undefined;
12
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ open: () => any;
14
+ close: () => any;
15
+ invalid: (reason: KDateInputInvalidReason, text: string) => any;
16
+ clear: () => any;
17
+ "update:modelValue": (value: Date | null) => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
19
+ onOpen?: (() => any) | undefined;
20
+ onClose?: (() => any) | undefined;
21
+ onInvalid?: ((reason: KDateInputInvalidReason, text: string) => any) | undefined;
22
+ onClear?: (() => any) | undefined;
23
+ "onUpdate:modelValue"?: ((value: Date | null) => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
@@ -0,0 +1,31 @@
1
+ import type { KDateInputInvalidReason, KDateRange, KDateRangeInputProps } from './types';
2
+ type __VLS_Props = KDateRangeInputProps;
3
+ type __VLS_ModelProps = {
4
+ modelValue?: KDateRange;
5
+ };
6
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
8
+ clear: () => {
9
+ end: null;
10
+ start: null;
11
+ };
12
+ close: () => void | undefined;
13
+ focus: () => void | undefined;
14
+ open: () => void | undefined;
15
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ open: () => any;
17
+ close: () => any;
18
+ invalid: (reason: KDateInputInvalidReason, text: string) => any;
19
+ clear: () => any;
20
+ rangestart: (date: Date) => any;
21
+ "update:modelValue": (value: KDateRange) => any;
22
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
23
+ onOpen?: (() => any) | undefined;
24
+ onClose?: (() => any) | undefined;
25
+ onInvalid?: ((reason: KDateInputInvalidReason, text: string) => any) | undefined;
26
+ onClear?: (() => any) | undefined;
27
+ onRangestart?: ((date: Date) => any) | undefined;
28
+ "onUpdate:modelValue"?: ((value: KDateRange) => any) | undefined;
29
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
@@ -0,0 +1,69 @@
1
+ export type KDateRange = {
2
+ end: Date | null;
3
+ start: Date | null;
4
+ };
5
+ export type KDateInputInvalidReason = 'disabled' | 'incomplete' | 'invalid' | 'order' | 'out-of-range';
6
+ export type KDateInputProps = {
7
+ /** Shows a × that clears the value while there is one. */
8
+ clearable?: boolean;
9
+ /** The × button's accessible name. Default `'Clear'`. */
10
+ clearLabel?: string;
11
+ disabled?: boolean;
12
+ /** Time for a day picked or typed without one, `HH:mm`. Default `'00:00'`. Needs `timeable`. */
13
+ defaultTime?: string;
14
+ /** Shows a spinner as the last addon and disables the calendar button; the field stays editable. */
15
+ loading?: boolean;
16
+ /** Dates that cannot be picked or typed. */
17
+ disabledDates?: Date[];
18
+ /** `0` is Sunday, `1` is Monday. */
19
+ firstDay?: 0 | 1;
20
+ /** `MM`, `DD` and `YYYY` in any order with a separator between each. Defaults to `MM/DD/YYYY`. */
21
+ format?: string;
22
+ ghost?: boolean;
23
+ /** `12` shows hh:mm AA; `24` shows HH:mm. Needs `timeable`. Default `12`. */
24
+ hourCycle?: 12 | 24;
25
+ /** BCP 47 tag driving the calendar's month and weekday names. */
26
+ locale?: string;
27
+ maxDate?: Date;
28
+ /** Latest time of day allowed, `HH:mm[:ss]`. Needs `timeable`. */
29
+ maxTime?: string;
30
+ minDate?: Date;
31
+ /** Earliest time of day allowed, `HH:mm[:ss]`. Needs `timeable`. */
32
+ minTime?: string;
33
+ /** Minutes per step, 1–30. Needs `timeable`. */
34
+ minuteStep?: number;
35
+ /** Months the calendar shows side by side. */
36
+ months?: 1 | 2;
37
+ /** Posts the value as ISO `YYYY-MM-DD` (`YYYY-MM-DDTHH:mm` when `timeable`) through a hidden input (`name[start]` / `name[end]` for a range). */
38
+ name?: string;
39
+ /** The Now button's label. Needs `timeable`. */
40
+ nowLabel?: string;
41
+ /** Defaults to the format (plus the time layout when `timeable`). */
42
+ placeholder?: string;
43
+ readonly?: boolean;
44
+ rounded?: boolean;
45
+ /** Seconds per step, 1–30. Needs `timeable` and `seconds`. */
46
+ secondStep?: number;
47
+ /** Adds seconds to the time. Needs `timeable`. */
48
+ seconds?: boolean;
49
+ /** Shows a Now button in the time panel(s). Needs `timeable`. */
50
+ showNow?: boolean;
51
+ sunken?: boolean;
52
+ /** Adds time to each date: the field gets time sections and the dropdown Time panel(s); values keep their time. */
53
+ timeable?: boolean;
54
+ transparent?: boolean;
55
+ };
56
+ export type KDateRangeInputProps = KDateInputProps & {
57
+ /** Time for a range end picked or typed without one, `HH:mm`. Default `'23:59'`. Needs `timeable`. */
58
+ defaultEndTime?: string;
59
+ };
60
+ export type KDateInputEmits = {
61
+ /** The × cleared the value. */
62
+ clear: [];
63
+ close: [];
64
+ invalid: [reason: KDateInputInvalidReason, text: string];
65
+ open: [];
66
+ };
67
+ export type KDateRangeInputEmits = KDateInputEmits & {
68
+ rangestart: [date: Date];
69
+ };
@@ -0,0 +1,27 @@
1
+ import type { ShallowRef } from 'vue';
2
+ import Knitify from '@knitify/core';
3
+ type DateInputModuleConfig = NonNullable<ConstructorParameters<typeof Knitify.modules.DateInput>[1]>;
4
+ type DateInputControls = {
5
+ close(): void;
6
+ getRange(): {
7
+ start: Date | null;
8
+ end: Date | null;
9
+ };
10
+ getValue(): Date | null;
11
+ open(): void;
12
+ setRange(start: Date | null, end: Date | null): void;
13
+ setValue(date: Date | null): void;
14
+ };
15
+ type Options = {
16
+ root: Readonly<ShallowRef<HTMLElement | null>>;
17
+ /** Read inside a watcher, so every prop it touches triggers a rebuild. */
18
+ config: () => DateInputModuleConfig;
19
+ /** Pushes the current model into a freshly built module. */
20
+ apply: (instance: DateInputControls) => void;
21
+ listeners: Record<string, (event: CustomEvent) => void>;
22
+ };
23
+ export declare const syncClearButton: (element: unknown) => void;
24
+ export declare function useDateInput(options: Options): {
25
+ getInstance: () => DateInputControls | undefined;
26
+ };
27
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { KDividerProps, KDividerSlots } from './types';
2
+ type __VLS_Slots = KDividerSlots;
3
+ declare const __VLS_base: import("vue").DefineComponent<KDividerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KDividerProps> & 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
+ export type KDividerLabelPosition = 'start' | 'center' | 'end';
2
+ export type KDividerTone = 'muted' | 'base' | 'accented' | 'inverse';
3
+ export type KDividerSpacing = 'none' | 'sm' | 'md' | 'lg';
4
+ export type KDividerProps = {
5
+ /** Runs top to bottom; stretches to the height of a flex row. */
6
+ vertical?: boolean;
7
+ /** Text on the line. The default slot overrides it. Omit for a plain rule. */
8
+ label?: string;
9
+ /** Where the label sits along the line. Defaults to `center`. */
10
+ labelPosition?: KDividerLabelPosition;
11
+ /** Line color, from the border tones. Defaults to `base`. */
12
+ tone?: KDividerTone;
13
+ dashed?: boolean;
14
+ /** Margin across the line. Defaults to `md`. */
15
+ spacing?: KDividerSpacing;
16
+ };
17
+ export type KDividerSlots = {
18
+ default?(): any;
19
+ };
@@ -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>;