@knitify/vue 1.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 (97) hide show
  1. package/README.md +113 -86
  2. package/dist/index.es.js +5773 -1451
  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/KAvatar.vue.d.ts +5 -1
  10. package/dist/types/components/Avatar/types.d.ts +92 -4
  11. package/dist/types/components/Badge/types.d.ts +2 -0
  12. package/dist/types/components/Calendar/types.d.ts +2 -0
  13. package/dist/types/components/Chat/KChatDivider.vue.d.ts +11 -0
  14. package/dist/types/components/Chat/KChatMessageActions.vue.d.ts +18 -0
  15. package/dist/types/components/Chat/KChatNotice.vue.d.ts +11 -0
  16. package/dist/types/components/Chat/KChatPrompt.vue.d.ts +1 -1
  17. package/dist/types/components/Chat/keys.d.ts +1 -0
  18. package/dist/types/components/Chat/types.d.ts +109 -4
  19. package/dist/types/components/ChatDock/KChatDock.vue.d.ts +47 -0
  20. package/dist/types/components/ChatDock/KChatDockItem.vue.d.ts +11 -0
  21. package/dist/types/components/ChatDock/KChatDockPanel.vue.d.ts +11 -0
  22. package/dist/types/components/ChatDock/KChatNewWindow.vue.d.ts +28 -0
  23. package/dist/types/components/ChatDock/KChatWindow.vue.d.ts +27 -0
  24. package/dist/types/components/ChatDock/KMessenger.vue.d.ts +29 -0
  25. package/dist/types/components/ChatDock/keys.d.ts +98 -0
  26. package/dist/types/components/ChatDock/messenger-types.d.ts +335 -0
  27. package/dist/types/components/ChatDock/store-keys.d.ts +7 -0
  28. package/dist/types/components/ChatDock/types.d.ts +162 -0
  29. package/dist/types/components/ChatDock/useChatDock.d.ts +11 -0
  30. package/dist/types/components/Collapse/KCollapse.vue.d.ts +2 -2
  31. package/dist/types/components/Collapse/useCollapseSync.d.ts +7 -5
  32. package/dist/types/components/DateInput/KDateInput.vue.d.ts +26 -0
  33. package/dist/types/components/DateInput/KDateRangeInput.vue.d.ts +31 -0
  34. package/dist/types/components/DateInput/types.d.ts +69 -0
  35. package/dist/types/components/DateInput/useDateInput.d.ts +27 -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/Drawer/KDrawer.vue.d.ts +3 -3
  39. package/dist/types/components/Dropdown/KDropdown.vue.d.ts +2 -2
  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/Flex/KFlex.vue.d.ts +11 -0
  45. package/dist/types/components/Flex/types.d.ts +26 -0
  46. package/dist/types/components/Input/KInput.vue.d.ts +2 -0
  47. package/dist/types/components/Input/types.d.ts +11 -1
  48. package/dist/types/components/Modal/KModal.vue.d.ts +3 -3
  49. package/dist/types/components/Modal/types.d.ts +5 -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/Popover/KPopover.vue.d.ts +2 -2
  54. package/dist/types/components/Popover/useOverlaySync.d.ts +15 -1
  55. package/dist/types/components/RadioCard/KRadioCard.vue.d.ts +20 -0
  56. package/dist/types/components/RadioCard/KRadioCardGroup.vue.d.ts +11 -0
  57. package/dist/types/components/RadioCard/types.d.ts +25 -0
  58. package/dist/types/components/SearchInput/KSearchInput.vue.d.ts +22 -0
  59. package/dist/types/components/SearchInput/types.d.ts +7 -0
  60. package/dist/types/components/SegmentedButtons/KSegmentedButton.vue.d.ts +20 -0
  61. package/dist/types/components/SegmentedButtons/KSegmentedButtons.vue.d.ts +11 -0
  62. package/dist/types/components/SegmentedButtons/types.d.ts +25 -0
  63. package/dist/types/components/Select/KSelect.vue.d.ts +2 -0
  64. package/dist/types/components/Select/types.d.ts +8 -0
  65. package/dist/types/components/Skeleton/KSkeleton.vue.d.ts +4 -0
  66. package/dist/types/components/Skeleton/types.d.ts +19 -0
  67. package/dist/types/components/Spinner/KSpinner.vue.d.ts +6 -0
  68. package/dist/types/components/Spinner/types.d.ts +13 -0
  69. package/dist/types/components/Table/KTable.vue.d.ts +8 -1
  70. package/dist/types/components/Table/KTableResizer.vue.d.ts +4 -0
  71. package/dist/types/components/Table/types.d.ts +27 -2
  72. package/dist/types/components/Tabs/types.d.ts +25 -3
  73. package/dist/types/components/TagsInput/KTagsInput.vue.d.ts +32 -0
  74. package/dist/types/components/TagsInput/types.d.ts +68 -0
  75. package/dist/types/components/TagsInput/useTagsInput.d.ts +27 -0
  76. package/dist/types/components/Time/KTime.vue.d.ts +18 -0
  77. package/dist/types/components/Time/types.d.ts +23 -0
  78. package/dist/types/components/TimeInput/KTimeInput.vue.d.ts +26 -0
  79. package/dist/types/components/TimeInput/types.d.ts +27 -0
  80. package/dist/types/components/TimeInput/useTimeInput.d.ts +22 -0
  81. package/dist/types/components/Toggle/types.d.ts +2 -0
  82. package/dist/types/components/Tooltip/triggerHandlers.d.ts +33 -0
  83. package/dist/types/components/Tooltip/types.d.ts +5 -0
  84. package/dist/types/components/Tooltip/vTooltip.d.ts +10 -0
  85. package/dist/types/components/Workspace/KWorkspace.vue.d.ts +13 -1
  86. package/dist/types/components/Workspace/types.d.ts +10 -0
  87. package/dist/types/components/index.d.ts +34 -0
  88. package/dist/types/components/types.d.ts +19 -0
  89. package/dist/types/index.d.ts +1 -0
  90. package/dist/types/utils/useCoreModule.d.ts +30 -0
  91. package/dist/types/utils/useDocumentEvent.d.ts +19 -0
  92. package/dist/types/utils/useExclusive.d.ts +13 -0
  93. package/dist/types/utils/useFieldControl.d.ts +25 -0
  94. package/dist/types/utils/useRootClasses.d.ts +15 -0
  95. package/dist/types/utils/useTopmost.d.ts +17 -0
  96. package/dist/web-types.json +7986 -0
  97. package/package.json +17 -5
@@ -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
+ };
@@ -13,16 +13,16 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
13
13
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
14
  "update:open": (value: boolean) => any;
15
15
  } & {
16
+ shown: () => any;
16
17
  hidden: () => any;
17
18
  hide: () => any;
18
19
  show: () => any;
19
- shown: () => any;
20
20
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
21
+ onShown?: (() => any) | undefined;
21
22
  onHidden?: (() => any) | undefined;
22
23
  onHide?: (() => any) | undefined;
23
- onShow?: (() => any) | undefined;
24
- onShown?: (() => any) | undefined;
25
24
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
25
+ onShow?: (() => any) | undefined;
26
26
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
27
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
28
  declare const _default: typeof __VLS_export;
@@ -10,12 +10,12 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
10
10
  show: () => boolean;
11
11
  hide: () => boolean;
12
12
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
- hidden: () => any;
14
13
  shown: () => any;
14
+ hidden: () => any;
15
15
  "update:open": (value: boolean) => any;
16
16
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
17
- onHidden?: (() => any) | undefined;
18
17
  onShown?: (() => any) | undefined;
18
+ onHidden?: (() => any) | undefined;
19
19
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
20
20
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
21
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -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
+ };
@@ -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
- /** Implies `textarea`. Growth is core's `Input.ts`, so it needs `Knitify.init()`. */
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;
@@ -15,16 +15,16 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
15
15
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
16
  "update:open": (value: boolean) => any;
17
17
  } & {
18
+ shown: () => any;
18
19
  hidden: () => any;
19
20
  hide: () => any;
20
21
  show: () => any;
21
- shown: () => any;
22
22
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
23
+ onShown?: (() => any) | undefined;
23
24
  onHidden?: (() => any) | undefined;
24
25
  onHide?: (() => any) | undefined;
25
- onShow?: (() => any) | undefined;
26
- onShown?: (() => any) | undefined;
27
26
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
27
+ onShow?: (() => any) | undefined;
28
28
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
29
29
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
30
30
  declare const _default: typeof __VLS_export;
@@ -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;
@@ -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';
@@ -10,12 +10,12 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
10
10
  show: () => boolean;
11
11
  hide: () => boolean;
12
12
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
- hidden: () => any;
14
13
  shown: () => any;
14
+ hidden: () => any;
15
15
  "update:open": (value: boolean) => any;
16
16
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
17
- onHidden?: (() => any) | undefined;
18
17
  onShown?: (() => any) | undefined;
18
+ onHidden?: (() => any) | undefined;
19
19
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
20
20
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
21
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -2,6 +2,8 @@ import { type Ref, type ShallowRef } from 'vue';
2
2
  export type OverlayModule = {
3
3
  hide(): void;
4
4
  show(): void;
5
+ /** Core moves this to `<body>` while open, so it is outside the root. */
6
+ getContent?(): Element | null;
5
7
  };
6
8
  export type OverlaySyncOptions<T extends OverlayModule> = {
7
9
  /** Builds the core module against the root element. */
@@ -10,6 +12,12 @@ export type OverlaySyncOptions<T extends OverlayModule> = {
10
12
  element: Readonly<ShallowRef<HTMLElement | null>>;
11
13
  onEvent?: (name: 'shown' | 'hidden') => void;
12
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;
13
21
  };
14
22
  /**
15
23
  * Two-way binding between a `v-model` and core's Popover, Dropdown or Tooltip.
@@ -28,7 +36,13 @@ export type OverlaySyncOptions<T extends OverlayModule> = {
28
36
  * because Vue 3.5 batches reactive effects: a flag set around the model write
29
37
  * would already be cleared by the time even a `sync` watcher ran.
30
38
  */
31
- export declare function useOverlaySync<T extends OverlayModule>({ create, element, onEvent, open, }: OverlaySyncOptions<T>): {
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;
32
46
  hide: () => void;
33
47
  show: () => void;
34
48
  toggle: () => void;
@@ -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
+ };