@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
@@ -0,0 +1,18 @@
1
+ import type { KTimeProps } from './types';
2
+ type __VLS_Props = KTimeProps;
3
+ type __VLS_ModelProps = {
4
+ modelValue?: string | null;
5
+ };
6
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
8
+ clear: () => null;
9
+ focus: () => void | undefined;
10
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ select: (value: string) => any;
12
+ "update:modelValue": (value: string | null) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
14
+ onSelect?: ((value: string) => any) | undefined;
15
+ "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
16
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
@@ -0,0 +1,23 @@
1
+ export type KTimeHourCycle = 12 | 24;
2
+ export type KTimeProps = {
3
+ /** `12` adds AM/PM buttons; `24` shows 00–23. The value is always 24-hour. Default `12`. */
4
+ hourCycle?: KTimeHourCycle;
5
+ /** Latest selectable time, `HH:mm` or `HH:mm:ss`, inclusive. */
6
+ maxTime?: string;
7
+ /** Earliest selectable time, `HH:mm` or `HH:mm:ss`, inclusive. */
8
+ minTime?: string;
9
+ /** Minutes per + / − press (and ↑/↓ in the field), 1–30. Default `1`. */
10
+ minuteStep?: number;
11
+ /** The Now button's label. Default `'Now'`. */
12
+ nowLabel?: string;
13
+ /** Seconds per + / − press, 1–30. Default `1`. */
14
+ secondStep?: number;
15
+ /** Adds seconds; the value becomes `HH:mm:ss`. */
16
+ seconds?: boolean;
17
+ /** Shows a Now button that picks the current time. */
18
+ showNow?: boolean;
19
+ };
20
+ export type KTimeEmits = {
21
+ /** Enter was pressed in a part, or Now was picked. */
22
+ select: [value: string];
23
+ };
@@ -0,0 +1,26 @@
1
+ import type { KTimeInputInvalidReason, KTimeInputProps } from './types';
2
+ type __VLS_Props = KTimeInputProps;
3
+ type __VLS_ModelProps = {
4
+ modelValue?: string | 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: KTimeInputInvalidReason, text: string) => any;
16
+ clear: () => any;
17
+ "update:modelValue": (value: string | null) => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
19
+ onOpen?: (() => any) | undefined;
20
+ onClose?: (() => any) | undefined;
21
+ onInvalid?: ((reason: KTimeInputInvalidReason, text: string) => any) | undefined;
22
+ onClear?: (() => any) | undefined;
23
+ "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
@@ -0,0 +1,27 @@
1
+ import type { KTimeProps } from '../Time/types';
2
+ export type KTimeInputInvalidReason = 'incomplete' | 'out-of-range';
3
+ export type KTimeInputProps = KTimeProps & {
4
+ /** Shows a × that clears the value while there is one. */
5
+ clearable?: boolean;
6
+ /** The × button's accessible name. Default `'Clear'`. */
7
+ clearLabel?: string;
8
+ disabled?: boolean;
9
+ ghost?: boolean;
10
+ /** Shows a spinner as the last addon and disables the clock button; the field stays editable. */
11
+ loading?: boolean;
12
+ /** Posts the value (`HH:mm` or `HH:mm:ss`, 24-hour) through a hidden input. */
13
+ name?: string;
14
+ /** Defaults to the layout, e.g. `hh:mm AA`. */
15
+ placeholder?: string;
16
+ readonly?: boolean;
17
+ rounded?: boolean;
18
+ sunken?: boolean;
19
+ transparent?: boolean;
20
+ };
21
+ export type KTimeInputEmits = {
22
+ /** The × cleared the value. */
23
+ clear: [];
24
+ close: [];
25
+ invalid: [reason: KTimeInputInvalidReason, text: string];
26
+ open: [];
27
+ };
@@ -0,0 +1,22 @@
1
+ import type { ShallowRef } from 'vue';
2
+ import Knitify from '@knitify/core';
3
+ type TimeInputModuleConfig = NonNullable<ConstructorParameters<typeof Knitify.modules.TimeInput>[1]>;
4
+ type TimeInputControls = {
5
+ close(): void;
6
+ getValue(): string | null;
7
+ open(): void;
8
+ setValue(value: string | null): void;
9
+ };
10
+ type Options = {
11
+ root: Readonly<ShallowRef<HTMLElement | null>>;
12
+ /** Read inside a watcher, so every prop it touches triggers a rebuild. */
13
+ config: () => TimeInputModuleConfig;
14
+ /** Pushes the current model into a freshly built module. */
15
+ apply: (instance: TimeInputControls) => void;
16
+ listeners: Record<string, (event: CustomEvent) => void>;
17
+ };
18
+ export declare const syncClearButton: (element: unknown) => void;
19
+ export declare function useTimeInput(options: Options): {
20
+ getInstance: () => TimeInputControls | undefined;
21
+ };
22
+ export {};
@@ -2,6 +2,8 @@ export type KToggleProps = {
2
2
  disabled?: boolean;
3
3
  /** Text beside the switch. The default slot overrides it. */
4
4
  label?: string;
5
+ /** Shows ON/OFF inside the track. Off by default. */
6
+ text?: boolean;
5
7
  };
6
8
  export type KToggleSlots = {
7
9
  default?(): any;
@@ -0,0 +1,33 @@
1
+ import type { KTooltipProps } from './types';
2
+ declare function onMouseover(event: MouseEvent): void;
3
+ declare function onMouseout(event: MouseEvent): void;
4
+ declare function onFocusin(event: FocusEvent): void;
5
+ declare function onFocusout(event: FocusEvent): void;
6
+ /** The trigger listeners, keyed by DOM event name. */
7
+ export declare const triggerListeners: {
8
+ readonly focusin: typeof onFocusin;
9
+ readonly focusout: typeof onFocusout;
10
+ readonly mouseout: typeof onMouseout;
11
+ readonly mouseover: typeof onMouseover;
12
+ };
13
+ /** The same listeners as vnode props, for `cloneVNode`. */
14
+ export declare const triggerListenerProps: {
15
+ onFocusin: typeof onFocusin;
16
+ onFocusout: typeof onFocusout;
17
+ onMouseout: typeof onMouseout;
18
+ onMouseover: typeof onMouseover;
19
+ };
20
+ /** Core's attributes for a label, placement and delay, as a plain record. */
21
+ export declare function triggerAttributes(options: KTooltipProps): Record<string, string>;
22
+ export declare const triggerAttributeNames: readonly ["data-kt-tooltip", "data-kt-tooltip-placement", "data-kt-tooltip-delay"];
23
+ export declare function retainEscape(): void;
24
+ export declare function releaseEscape(): void;
25
+ /**
26
+ * A trigger unmounted while its tooltip is up would otherwise strand the
27
+ * bubble, which core has moved to `<body>`. With the trigger in hand, only its
28
+ * own tooltip closes — a row leaving a list must not close the tooltip of the
29
+ * row still under the pointer. Without one (KTooltip, which does not hold its
30
+ * child's element), every tooltip closes, as core's delegated version does.
31
+ */
32
+ export declare function hideOnUnmount(trigger?: Element): void;
33
+ export {};
@@ -16,3 +16,8 @@ export type KTooltipSlots = {
16
16
  */
17
17
  default?(): any;
18
18
  };
19
+ /**
20
+ * The value of `v-tooltip`: a label, the full options, or a falsy value to
21
+ * turn the tooltip off.
22
+ */
23
+ export type KTooltipDirectiveValue = string | KTooltipProps | null | undefined | false;
@@ -0,0 +1,10 @@
1
+ import type { ObjectDirective } from 'vue';
2
+ import type { KPlacement } from '../Popover/types';
3
+ import type { KTooltipDirectiveValue } from './types';
4
+ export declare const vTooltip: ObjectDirective<Element, KTooltipDirectiveValue, string, KPlacement>;
5
+ export default vTooltip;
6
+ declare module 'vue' {
7
+ interface GlobalDirectives {
8
+ vTooltip: typeof vTooltip;
9
+ }
10
+ }
@@ -1,24 +1,36 @@
1
- import type { KWorkspaceProps, KWorkspaceSlots } from './types';
1
+ import type { KWorkspaceDrawer, KWorkspaceProps, KWorkspaceSlots } from './types';
2
2
  type __VLS_Props = KWorkspaceProps;
3
3
  type __VLS_Slots = KWorkspaceSlots;
4
4
  declare function toggle(): void;
5
5
  declare function expand(): void;
6
6
  declare function collapseSidebar(): void;
7
+ declare function openDrawer(target?: KWorkspaceDrawer): void;
8
+ declare function closeDrawer(target?: KWorkspaceDrawer): void;
9
+ declare function toggleDrawer(target?: KWorkspaceDrawer): void;
7
10
  type __VLS_ModelProps = {
8
11
  'expanded'?: boolean;
12
+ 'open'?: boolean;
13
+ 'bodyOpen'?: boolean;
9
14
  };
10
15
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
11
16
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
12
17
  toggle: typeof toggle;
13
18
  expand: typeof expand;
14
19
  collapse: typeof collapseSidebar;
20
+ openDrawer: typeof openDrawer;
21
+ closeDrawer: typeof closeDrawer;
22
+ toggleDrawer: typeof toggleDrawer;
15
23
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
24
  "update:expanded": (value: boolean) => any;
25
+ "update:open": (value: boolean) => any;
26
+ "update:bodyOpen": (value: boolean) => any;
17
27
  } & {
18
28
  toggle: (value: boolean) => any;
19
29
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
20
30
  onToggle?: ((value: boolean) => any) | undefined;
21
31
  "onUpdate:expanded"?: ((value: boolean) => any) | undefined;
32
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
33
+ "onUpdate:bodyOpen"?: ((value: boolean) => any) | undefined;
22
34
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
35
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
36
  declare const _default: typeof __VLS_export;
@@ -1,18 +1,28 @@
1
1
  import { ClassValue } from 'vue';
2
2
  export type KWorkspaceSide = 'left' | 'right';
3
+ export type KWorkspaceBreakpoint = 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
4
+ export type KWorkspaceDrawer = 'sidebar' | 'bodySidebar';
3
5
  export type KWorkspaceProps = {
4
6
  bodyClass?: ClassValue;
5
7
  bodyContentClass?: ClassValue;
8
+ bodyDrawerAt?: KWorkspaceBreakpoint;
9
+ bodyDrawerWidth?: string;
6
10
  bodySidebarClass?: ClassValue;
7
11
  bodySidebarSide?: KWorkspaceSide;
12
+ bodySidebarWidth?: string;
8
13
  collapsible?: boolean;
14
+ drawerAt?: KWorkspaceBreakpoint;
15
+ drawerWidth?: string;
9
16
  footerClass?: ClassValue;
10
17
  height?: string;
11
18
  mainClass?: ClassValue;
19
+ rounded?: boolean;
12
20
  side?: KWorkspaceSide;
13
21
  sidebarBodyClass?: ClassValue;
14
22
  sidebarClass?: ClassValue;
23
+ sidebarHeaderClass?: ClassValue;
15
24
  sidebarInnerClass?: ClassValue;
25
+ sidebarWidth?: string;
16
26
  topbarClass?: ClassValue;
17
27
  };
18
28
  export type KWorkspaceEmits = {
@@ -3,9 +3,13 @@ export { chatBusyKey } from './Chat/keys';
3
3
  export { chatDockKey } from './ChatDock/keys';
4
4
  export { chatDockStoreKey, injectChatDock, provideChatDock, } from './ChatDock/store-keys';
5
5
  export { useChatDock } from './ChatDock/useChatDock';
6
+ export { fieldKey } from './Field/keys';
7
+ export { useFieldControl } from '../utils/useFieldControl';
6
8
  export { default as KAccordion } from './Accordion/KAccordion.vue';
7
9
  export { default as KAccordionItem } from './Accordion/KAccordionItem.vue';
8
10
  export { default as KAlert } from './Alert/KAlert.vue';
11
+ export { default as KArticleList } from './ArticleList/KArticleList.vue';
12
+ export { default as KArticleListItem } from './ArticleList/KArticleListItem.vue';
9
13
  export { default as KAvatar } from './Avatar/KAvatar.vue';
10
14
  export { default as KAvatarGroup } from './Avatar/KAvatarGroup.vue';
11
15
  export { default as KBadge } from './Badge/KBadge.vue';
@@ -27,14 +31,20 @@ export { default as KChatNotice } from './Chat/KChatNotice.vue';
27
31
  export { default as KChatPrompt } from './Chat/KChatPrompt.vue';
28
32
  export { default as KChatShimmer } from './Chat/KChatShimmer.vue';
29
33
  export { default as KChatWindow } from './ChatDock/KChatWindow.vue';
34
+ export { default as KChatNewWindow } from './ChatDock/KChatNewWindow.vue';
30
35
  export { default as KCheckbox } from './Checkbox/KCheckbox.vue';
31
36
  export { default as KCollapse } from './Collapse/KCollapse.vue';
32
37
  export { default as KContainer } from './Container/KContainer.vue';
38
+ export { default as KDateInput } from './DateInput/KDateInput.vue';
39
+ export { default as KDateRangeInput } from './DateInput/KDateRangeInput.vue';
40
+ export { default as KDivider } from './Divider/KDivider.vue';
33
41
  export { default as KDrawer } from './Drawer/KDrawer.vue';
34
42
  export { default as KDropdown } from './Dropdown/KDropdown.vue';
35
43
  export { default as KDropdownItem } from './Dropdown/KDropdownItem.vue';
36
44
  export { default as KDropdownMenu } from './Dropdown/KDropdownMenu.vue';
45
+ export { default as KField } from './Field/KField.vue';
37
46
  export { default as KFileTree } from './FileTree/KFileTree.vue';
47
+ export { default as KFlex } from './Flex/KFlex.vue';
38
48
  export { default as KGrid } from './Grid/KGrid.vue';
39
49
  export { default as KGridColumn } from './Grid/KGridColumn.vue';
40
50
  export { default as KGridRow } from './Grid/KGridRow.vue';
@@ -47,16 +57,28 @@ export { default as KNavbar } from './Navbar/KNavbar.vue';
47
57
  export { default as KNavbarMenu } from './Navbar/KNavbarMenu.vue';
48
58
  export { default as KNotificationList } from './NotificationList/KNotificationList.vue';
49
59
  export { default as KNotificationListItem } from './NotificationList/KNotificationListItem.vue';
60
+ export { default as KPagination } from './Pagination/KPagination.vue';
50
61
  export { default as KPopover } from './Popover/KPopover.vue';
51
62
  export { default as KProgress } from './Progress/KProgress.vue';
52
63
  export { default as KRadio } from './Radio/KRadio.vue';
64
+ export { default as KRadioCard } from './RadioCard/KRadioCard.vue';
65
+ export { default as KRadioCardGroup } from './RadioCard/KRadioCardGroup.vue';
66
+ export { default as KSearchInput } from './SearchInput/KSearchInput.vue';
67
+ export { default as KSegmentedButton } from './SegmentedButtons/KSegmentedButton.vue';
68
+ export { default as KSegmentedButtons } from './SegmentedButtons/KSegmentedButtons.vue';
53
69
  export { default as KSelect } from './Select/KSelect.vue';
70
+ export { default as KSkeleton } from './Skeleton/KSkeleton.vue';
54
71
  export { default as KSpinner } from './Spinner/KSpinner.vue';
55
72
  export { default as KTab } from './Tabs/KTab.vue';
56
73
  export { default as KTable } from './Table/KTable.vue';
74
+ export { default as KTableResizer } from './Table/KTableResizer.vue';
57
75
  export { default as KTabPanel } from './Tabs/KTabPanel.vue';
58
76
  export { default as KTabs } from './Tabs/KTabs.vue';
77
+ export { default as KTagsInput } from './TagsInput/KTagsInput.vue';
78
+ export { default as KTime } from './Time/KTime.vue';
79
+ export { default as KTimeInput } from './TimeInput/KTimeInput.vue';
59
80
  export { default as KToggle } from './Toggle/KToggle.vue';
60
81
  export { default as KTooltip } from './Tooltip/KTooltip.vue';
82
+ export { vTooltip } from './Tooltip/vTooltip';
61
83
  export { default as KWorkspace } from './Workspace/KWorkspace.vue';
62
84
  export { useToast } from './Toast/useToast';
@@ -1,10 +1,12 @@
1
1
  export * from './Accordion/types';
2
2
  export * from './Alert/types';
3
+ export * from './ArticleList/types';
3
4
  export * from './Avatar/types';
4
5
  export * from './Badge/types';
5
6
  export * from './Breadcrumb/types';
6
7
  export * from './Button/types';
7
8
  export * from './Calendar/types';
9
+ export * from './DateInput/types';
8
10
  export * from './Card/types';
9
11
  export * from './Chat/types';
10
12
  export type { ChatDockCallResult, ChatDockContext, ChatDockInstance, } from './ChatDock/keys';
@@ -13,9 +15,14 @@ export * from './ChatDock/messenger-types';
13
15
  export * from './Checkbox/types';
14
16
  export * from './Collapse/types';
15
17
  export * from './Container/types';
18
+ export * from './Divider/types';
16
19
  export * from './Drawer/types';
20
+ export * from './Field/types';
21
+ export type { FieldContext } from './Field/keys';
22
+ export type { UseFieldControlOptions } from '../utils/useFieldControl';
17
23
  export * from './Dropdown/types';
18
24
  export * from './FileTree/types';
25
+ export * from './Flex/types';
19
26
  export * from './Grid/types';
20
27
  export * from './Icon/types';
21
28
  export * from './Input/types';
@@ -23,13 +30,21 @@ export * from './MenuList/types';
23
30
  export * from './Modal/types';
24
31
  export * from './Navbar/types';
25
32
  export * from './NotificationList/types';
33
+ export * from './Pagination/types';
26
34
  export * from './Popover/types';
27
35
  export * from './Progress/types';
28
36
  export * from './Radio/types';
37
+ export * from './RadioCard/types';
38
+ export * from './SearchInput/types';
39
+ export * from './SegmentedButtons/types';
29
40
  export * from './Select/types';
41
+ export * from './Skeleton/types';
30
42
  export * from './Spinner/types';
31
43
  export * from './Table/types';
32
44
  export * from './Tabs/types';
45
+ export * from './TagsInput/types';
46
+ export * from './Time/types';
47
+ export * from './TimeInput/types';
33
48
  export * from './Toast/types';
34
49
  export * from './Toggle/types';
35
50
  export * from './Tooltip/types';
@@ -0,0 +1,30 @@
1
+ import type { ShallowRef } from 'vue';
2
+ type Destroyable = {
3
+ destroy(): void;
4
+ };
5
+ type Options<Config, Controls> = {
6
+ root: Readonly<ShallowRef<HTMLElement | null>>;
7
+ /** Builds the core module on the root. */
8
+ create: (node: HTMLElement, config: Config) => Controls & Destroyable;
9
+ /** Read inside a watcher, so every prop it touches triggers a rebuild. */
10
+ config: () => Config;
11
+ /** Pushes the current model into a freshly built module. */
12
+ apply: (instance: Controls) => void;
13
+ listeners: Record<string, (event: CustomEvent) => void>;
14
+ };
15
+ /**
16
+ * The lifecycle the form-field wrappers share. Core reads its config once, in
17
+ * the constructor, so a config change means a rebuild rather than an update.
18
+ * Vue owns the root; core owns everything it renders inside.
19
+ */
20
+ export declare function useCoreModule<Config, Controls>({ root, create, config, apply, listeners, }: Options<Config, Controls>): {
21
+ getInstance: () => Controls | undefined;
22
+ };
23
+ /**
24
+ * Core disables a field's × while it is empty, but only when it paints. One
25
+ * the template inserts later takes its state from the root's `is-empty`,
26
+ * which core keeps current, so it never sits enabled with nothing to clear.
27
+ * Bound as a function ref: Vue calls it each time the button renders.
28
+ */
29
+ export declare function syncClearButtonFor(rootSelector: string): (element: unknown) => void;
30
+ export {};
@@ -0,0 +1,25 @@
1
+ type Attrs = Record<string, unknown>;
2
+ export type UseFieldControlOptions = {
3
+ /** The control's own `disabled` prop. */
4
+ disabled: () => boolean;
5
+ /**
6
+ * The control is a button (KSelect's toggle). A button's name comes from its
7
+ * content, so it is labelled by the field label plus itself. It takes no
8
+ * `aria-required`, which ARIA does not allow on a button, so a required
9
+ * field's hidden "required" text joins its `aria-labelledby` instead.
10
+ */
11
+ button?: boolean;
12
+ };
13
+ /**
14
+ * Merges the enclosing KField's ids and state onto a control's native element.
15
+ * Outside a KField it hands `baseAttrs` back untouched. Inside a group field
16
+ * the ARIA lives on the fieldset, so only `disabled` is inherited.
17
+ *
18
+ * A non-group field wires exactly one control: two would share its id.
19
+ */
20
+ export declare function useFieldControl(baseAttrs: () => Attrs, options: UseFieldControlOptions): {
21
+ controlAttrs: import("vue").ComputedRef<Attrs>;
22
+ isDisabled: import("vue").ComputedRef<boolean>;
23
+ field: import("..").FieldContext | undefined;
24
+ };
25
+ export {};
@@ -0,0 +1,15 @@
1
+ import { type ClassValue, type Ref } from 'vue';
2
+ /**
3
+ * Applies `classes` to `element` with `classList`, for a root whose classes
4
+ * core also writes.
5
+ *
6
+ * Core adds and removes its state classes (`is-active`, `is-shown`, …) on the
7
+ * root itself. A `:class` binding cannot share the element with it: whenever
8
+ * the bound value changes, Vue assigns `className` outright, wiping every class
9
+ * core added — so changing a modifier while the component was open hid it.
10
+ * Adding and removing only the classes this owns leaves core's alone.
11
+ *
12
+ * The root keeps its base class as a static `class` in the template. Vue
13
+ * writes that once, when the element is created, and never patches it.
14
+ */
15
+ export declare function useRootClasses(element: Readonly<Ref<HTMLElement | null>>, classes: () => ClassValue): void;