@katlux/toolkit 0.1.1-alpha.128 → 0.1.1-alpha.130

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/bin/add-ai-reference.mjs +85 -46
  2. package/dist/module.json +1 -1
  3. package/dist/runtime/components/KButton/KButton.global.d.vue.ts +1 -1
  4. package/dist/runtime/components/KButton/KButton.global.vue.d.ts +1 -1
  5. package/dist/runtime/components/KButton/KButton.logic.d.ts +1 -1
  6. package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +3 -3
  7. package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +3 -3
  8. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +6 -6
  9. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +6 -6
  10. package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +1 -1
  11. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +1 -1
  12. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +1 -1
  13. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +1 -1
  14. package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +1 -1
  15. package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +1 -1
  16. package/dist/runtime/components/KPagination/KPagination.global.d.vue.ts +1 -1
  17. package/dist/runtime/components/KPagination/KPagination.global.vue.d.ts +1 -1
  18. package/dist/runtime/components/KTree/KTree.global.d.vue.ts +1 -1
  19. package/dist/runtime/components/KTree/KTree.global.vue.d.ts +1 -1
  20. package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +2 -2
  21. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +2 -2
  22. package/dist/runtime/presets/default/components/KTree/KTree.d.vue.ts +1 -1
  23. package/dist/runtime/presets/default/components/KTree/KTree.vue.d.ts +1 -1
  24. package/dist/skills/KATLUX_INDEX.md +40 -0
  25. package/dist/skills/katlux-components/SKILL.md +106 -0
  26. package/dist/skills/katlux-components/components/KAccordion.md +27 -0
  27. package/dist/skills/katlux-components/components/KAlert.md +22 -0
  28. package/dist/skills/katlux-components/components/KAreaChart.md +19 -0
  29. package/dist/skills/katlux-components/components/KBarChart.md +20 -0
  30. package/dist/skills/katlux-components/components/KBulkActions.md +19 -0
  31. package/dist/skills/katlux-components/components/KButton.md +12 -0
  32. package/dist/skills/katlux-components/components/KCalendar.md +17 -0
  33. package/dist/skills/katlux-components/components/KCheckbox.md +15 -0
  34. package/dist/skills/katlux-components/components/KCombobox.md +41 -0
  35. package/dist/skills/katlux-components/components/KCompositeInput.md +67 -0
  36. package/dist/skills/katlux-components/components/KContextMenu.md +20 -0
  37. package/dist/skills/katlux-components/components/KDataIterator.md +35 -0
  38. package/dist/skills/katlux-components/components/KDatatable.md +55 -0
  39. package/dist/skills/katlux-components/components/KDatePicker.md +26 -0
  40. package/dist/skills/katlux-components/components/KDropdown.md +18 -0
  41. package/dist/skills/katlux-components/components/KGantt.md +28 -0
  42. package/dist/skills/katlux-components/components/KGrid.md +17 -0
  43. package/dist/skills/katlux-components/components/KHeatMap.md +32 -0
  44. package/dist/skills/katlux-components/components/KHourSelect.md +11 -0
  45. package/dist/skills/katlux-components/components/KIcon.md +5 -0
  46. package/dist/skills/katlux-components/components/KLayout.md +34 -0
  47. package/dist/skills/katlux-components/components/KLineChart.md +18 -0
  48. package/dist/skills/katlux-components/components/KLoader.md +7 -0
  49. package/dist/skills/katlux-components/components/KMaskTextbox.md +12 -0
  50. package/dist/skills/katlux-components/components/KModal.md +22 -0
  51. package/dist/skills/katlux-components/components/KPagination.md +22 -0
  52. package/dist/skills/katlux-components/components/KPanel.md +18 -0
  53. package/dist/skills/katlux-components/components/KPieChart.md +14 -0
  54. package/dist/skills/katlux-components/components/KProductList.md +42 -0
  55. package/dist/skills/katlux-components/components/KScatterChart.md +20 -0
  56. package/dist/skills/katlux-components/components/KSlider.md +28 -0
  57. package/dist/skills/katlux-components/components/KTabs.md +31 -0
  58. package/dist/skills/katlux-components/components/KTextbox.md +15 -0
  59. package/dist/skills/katlux-components/components/KToast.md +14 -0
  60. package/dist/skills/katlux-components/components/KTooltip.md +13 -0
  61. package/dist/skills/katlux-components/components/KTree.md +45 -0
  62. package/dist/skills/katlux-components/components/KTreePicker.md +35 -0
  63. package/dist/skills/katlux-components/components/KTreeView.md +30 -0
  64. package/dist/skills/katlux-components/components/MultiTabs.md +20 -0
  65. package/dist/skills/katlux-components/components/calendar-customization.md +6 -0
  66. package/dist/skills/katlux-components/components/datatable-customization.md +14 -0
  67. package/dist/skills/katlux-components/components/directives.md +11 -0
  68. package/dist/skills/katlux-components/components/form-validation.md +125 -0
  69. package/dist/skills/katlux-components/components/tree-customization.md +9 -0
  70. package/dist/skills/katlux-components/components/useToast.md +27 -0
  71. package/dist/skills/katlux-components/components/validation-directives.md +6 -0
  72. package/dist/skills/katlux-config/SKILL.md +156 -0
  73. package/dist/skills/katlux-presets/SKILL.md +356 -0
  74. package/dist/skills/katlux-providers/SKILL.md +64 -0
  75. package/dist/skills/katlux-providers/providers/ADataProvider.md +59 -0
  76. package/dist/skills/katlux-providers/providers/CAPIFlatClientDataProvider.md +28 -0
  77. package/dist/skills/katlux-providers/providers/CAPIFlatServerDataProvider.md +20 -0
  78. package/dist/skills/katlux-providers/providers/CFlatClientDataProvider.md +11 -0
  79. package/dist/skills/katlux-providers/providers/CFlatServerDataProvider.md +58 -0
  80. package/dist/skills/katlux-providers/providers/CTreeClientDataProvider.md +14 -0
  81. package/dist/skills/katlux-providers/providers/CTreeServerDataProvider.md +5 -0
  82. package/dist/skills/katlux-providers/providers/KatluxIndexedDB.md +10 -0
  83. package/dist/skills/katlux-providers/providers/RequestProvider.md +49 -0
  84. package/dist/skills/katlux-providers/providers/RequestQueue.md +52 -0
  85. package/dist/skills/katlux-providers/providers/api-protocol.md +40 -0
  86. package/dist/skills/katlux-providers/providers/caching.md +170 -0
  87. package/dist/skills/katlux-providers/providers/composables.md +107 -0
  88. package/dist/skills/katlux-providers/providers/encryption.md +151 -0
  89. package/dist/skills/katlux-providers/providers/react-integration.md +45 -0
  90. package/dist/skills/katlux-providers/providers/testing-isolation.md +6 -0
  91. package/dist/skills/katlux-providers/providers/types.md +27 -0
  92. package/dist/skills/katlux-providers/providers/useDataProvider.md +51 -0
  93. package/dist/skills/katlux-tokens/SKILL.md +133 -0
  94. package/package.json +3 -3
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: katlux-components
3
+ description: Complete Katlux UI component API index. Links to atomic component documentation files with full props, slots, events, and usage examples. Use this index to locate components and read only the atomic specification needed.
4
+ ---
5
+
6
+ # Katlux Component Library Master Index
7
+
8
+ > **Atomic Architecture**: Each component has its own dedicated, lightweight specification file under [`components/`](components/). To minimize token consumption and avoid context bloat, read **only** the atomic component spec file required for your task.
9
+
10
+ ---
11
+
12
+ ## 1. Layout & Structure
13
+
14
+ | Component | Description | Key Features | Spec Link |
15
+ | :--- | :--- | :--- | :--- |
16
+ | `KLayout` | Root responsive application shell | Dynamic header, sidebar, footer, brand bar, and page slots | [KLayout.md](components/KLayout.md) |
17
+ | `KGrid` | Flexbox/CSS grid layout container | Responsive columns, alignment, gaps, wrapping | [KGrid.md](components/KGrid.md) |
18
+ | `KPanel` | Bordered card/surface container | Header, body, footer, collapsibility, elevation | [KPanel.md](components/KPanel.md) |
19
+ | `KAccordion` | Collapsible accordion sections | Single or multi-expand modes, animated transitions | [KAccordion.md](components/KAccordion.md) |
20
+ | `KTabs` / `KTabItem` | WAI-ARIA tab navigation bar | Keyboard navigation, active indicator, customizable tab headers | [KTabs.md](components/KTabs.md) |
21
+ | `MultiTabs` | Multi-pane split screen workspace | Dynamic vertical panes, tab grouping, pane closure | [MultiTabs.md](components/MultiTabs.md) |
22
+
23
+ ---
24
+
25
+ ## 2. Form & Input Components
26
+
27
+ | Component | Description | Key Features | Spec Link |
28
+ | :--- | :--- | :--- | :--- |
29
+ | `KButton` | Interactive action button | Variants (`primary`, `secondary`, `danger`), loading spinner, icon slot | [KButton.md](components/KButton.md) |
30
+ | `KTextbox` / `KTextarea` | Text and multiline input fields | Two-way binding, clear button, icon prefixes/suffixes, validation states | [KTextbox.md](components/KTextbox.md) |
31
+ | `KCheckbox` / `KRadiobox` | Boolean and radio selection controls | Indeterminate state, custom labels, group binding | [KCheckbox.md](components/KCheckbox.md) |
32
+ | `KSlider` | Numeric range and value sliders | Single and dual-handle range mode, step increments | [KSlider.md](components/KSlider.md) |
33
+ | `KMaskTextbox` | Formatted input with character masks | Phone numbers, credit cards, dates, custom regex masks | [KMaskTextbox.md](components/KMaskTextbox.md) |
34
+ | `KCombobox` | Searchable autocomplete select | Virtual scrolling for 10k items, single/multi-select, tags | [KCombobox.md](components/KCombobox.md) |
35
+ | `KCompositeInput` | Coupled dropdown + text input | Currency + amount, country code + phone, unit + quantity | [KCompositeInput.md](components/KCompositeInput.md) |
36
+ | `KDropdown` | Floating action menu | Trigger element, item list, icons, keyboard navigation | [KDropdown.md](components/KDropdown.md) |
37
+ | `KDatePicker` | Interactive calendar picker | Single date, date-time, marked/defined days | [KDatePicker.md](components/KDatePicker.md) |
38
+ | `KHourSelect` | Time and hour selection dropdown | 12/24-hour formats, minute intervals | [KHourSelect.md](components/KHourSelect.md) |
39
+
40
+ ### Validation & Customization References
41
+ - [Form Validation Architecture](components/form-validation.md): Universal validation props, semantic error states (`--danger-500`), and rules.
42
+ - [Calendar Customization](components/calendar-customization.md): `markedDays` and `definedDays` architecture for `KCalendar` and `KDatePicker`.
43
+
44
+ ---
45
+
46
+ ## 3. Data Display & Tables
47
+
48
+ | Component | Description | Key Features | Spec Link |
49
+ | :--- | :--- | :--- | :--- |
50
+ | `KDatatable` | Enterprise data table | Headless DataProvider binding, multi-page selection, virtual scroll, sorting, filtering, bulk actions | [KDatatable.md](components/KDatatable.md) |
51
+ | `KCalendar` | Full-month calendar view | Marked dates, defined range restrictions, cell slots, day click events | [KCalendar.md](components/KCalendar.md) |
52
+ | `KGantt` | Project schedule / Gantt chart | Timeline bars, virtual scrolling, dependency rendering, zoom levels | [KGantt.md](components/KGantt.md) |
53
+ | `KPagination` | Standalone pagination controller | Two-way sync with DataProviders, page jump, size selector | [KPagination.md](components/KPagination.md) |
54
+ | `KDataIterator` | Headless data repeater / card grid | Slot-based item rendering with DataProvider pagination/sorting | [KDataIterator.md](components/KDataIterator.md) |
55
+ | `KTreeView` | Hierarchical tree navigation | Recursive node display, selection, expand/collapse | [KTreeView.md](components/KTreeView.md) |
56
+ | `KTree` | High-performance enterprise tree | Deep virtualization (50k nodes), multi-select, drag-drop | [KTree.md](components/KTree.md) |
57
+ | `KTreePicker` | Dropdown tree picker | Hierarchical category selection in input popover | [KTreePicker.md](components/KTreePicker.md) |
58
+ | `KContextMenu` | Right-click contextual menu | Mouse position tracking, keyboard dismiss, submenus | [KContextMenu.md](components/KContextMenu.md) |
59
+
60
+ ### Display Customization Guides
61
+ - [Datatable Cell Customization](components/datatable-customization.md): Scoped cell slots (`#cell-[field]`), header slots, row actions.
62
+ - [Tree Item Customization](components/tree-customization.md): Custom node renderers and expansion toggles.
63
+
64
+ ---
65
+
66
+ ## 4. Feedback, Overlays & Utilities
67
+
68
+ | Component | Description | Key Features | Spec Link |
69
+ | :--- | :--- | :--- | :--- |
70
+ | `KModal` | Centered dialog overlay | Two-way `v-model` visibility, header/footer slots, backdrop dismissal | [KModal.md](components/KModal.md) |
71
+ | `KLoader` | Loading spinners & progress | Configurable size, preset color tokens | [KLoader.md](components/KLoader.md) |
72
+ | `KTooltip` | Hover/focus floating tooltip | Placement options, arrow pointer, delay | [KTooltip.md](components/KTooltip.md) |
73
+ | `KAlert` | Inline notification banner | Severity types (`info`, `success`, `warning`, `danger`), dismissible | [KAlert.md](components/KAlert.md) |
74
+ | `KToast` / `useToast()` | Global toast notification queue | Auto-dismiss TTL, programmatic trigger, queue management | [KToast.md](components/KToast.md) / [useToast.md](components/useToast.md) |
75
+ | `KIcon` | Inline SVG icon renderer | Preset SVG catalog lookup by name, size/color tokens | [KIcon.md](components/KIcon.md) |
76
+
77
+ ---
78
+
79
+ ## 5. E-Commerce & Action Blocks
80
+
81
+ | Component | Description | Key Features | Spec Link |
82
+ | :--- | :--- | :--- | :--- |
83
+ | `KBulkActions` | Batch operation floating toolbar | Selection count, action buttons, dropdown actions, responsive mobile sheet | [KBulkActions.md](components/KBulkActions.md) |
84
+ | `KProductList` | Product catalog grid / list | Cart additions, pricing formatters, responsive layout | [KProductList.md](components/KProductList.md) |
85
+
86
+ ---
87
+
88
+ ## 6. Visual Chart Blocks
89
+
90
+ | Component | Description | Key Features | Spec Link |
91
+ | :--- | :--- | :--- | :--- |
92
+ | `KLineChart` | SVG line & curve chart | Multi-series, tooltips, responsive SVG viewBox | [KLineChart.md](components/KLineChart.md) |
93
+ | `KAreaChart` | Gradient filled area chart | Stacked or overlay area fills, interactive hover | [KAreaChart.md](components/KAreaChart.md) |
94
+ | `KBarChart` | Column / bar chart | Vertical/horizontal bars, grouped series | [KBarChart.md](components/KBarChart.md) |
95
+ | `KPieChart` | Donut / pie chart | Segment percentages, legend, center text | [KPieChart.md](components/KPieChart.md) |
96
+ | `KScatterChart` | 2D coordinate plot | Point clusters, custom coordinate scaling | [KScatterChart.md](components/KScatterChart.md) |
97
+ | `KHeatMap` | Activity & matrix heatmap | Color intensity scaling, day-of-week matrices | [KHeatMap.md](components/KHeatMap.md) |
98
+
99
+ ---
100
+
101
+ ## 7. Directives & Semantic Classes
102
+
103
+ | Topic | Description | Link |
104
+ | :--- | :--- | :--- |
105
+ | `v-click-outside` | Vue directive to detect clicks outside an element | [directives.md](components/directives.md) |
106
+ | Validation Classes | Semantic form classes (`.is-invalid`, `.is-valid`, error text) | [validation-directives.md](components/validation-directives.md) |
@@ -0,0 +1,27 @@
1
+ ### `KAccordion` / `KAccordionItem`
2
+ - **Purpose**: Collapsible content sections with two-way data binding (`v-model`) support.
3
+ - **KAccordion Props**:
4
+ | Prop | Type | Default | Description |
5
+ | --- | --- | --- | --- |
6
+ | `v-model` / `modelValue` | `string \| string[] \| number \| number[]` | `undefined` | ID or array of IDs of active open panel(s) with two-way binding |
7
+ | `multiOpen` | `boolean` | `false` | Allow multiple items open simultaneously |
8
+ - **KAccordion Events**:
9
+ | Event | Payload | Description |
10
+ | --- | --- | --- |
11
+ | `@update:modelValue` | `(value: string \| string[] \| number \| number[])` | Emitted when open panel ID(s) change |
12
+ | `@change` | `(value: string \| string[] \| number \| number[])` | Emitted when open panel ID(s) change |
13
+ - **KAccordionItem Props**:
14
+ | Prop | Type | Default | Description |
15
+ | --- | --- | --- | --- |
16
+ | `id` | `string \| number` | auto index | Identifier matching `v-model` |
17
+ | `title` | `string` | **Required** | Header text |
18
+ | `isOpen` | `boolean` | `false` | Initial expansion state (uncontrolled mode) |
19
+ - **Slots**: `default` (Content inside the item).
20
+ - **Example Usage (Pug)**:
21
+ ```pug
22
+ KAccordion(v-model="activeSection")
23
+ KAccordionItem(id="general" title="General Settings")
24
+ p Settings content
25
+ KAccordionItem(id="security" title="Security")
26
+ p Security content
27
+ ```
@@ -0,0 +1,22 @@
1
+ ### `KAlert`
2
+ - **Purpose**: Informational and feedback banner component supporting 4 semantic states, two-way visibility binding (`v-model`), and dismissible controls.
3
+ - **Props**:
4
+ | Prop | Type | Default | Description |
5
+ | --- | --- | --- | --- |
6
+ | `v-model` / `modelValue` | `boolean` | `true` | Controls alert visibility with two-way data binding |
7
+ | `type` | `'info' \| 'success' \| 'warning' \| 'danger'` | `'info'` | Semantic color variant and default icon |
8
+ | `title` | `string` | `undefined` | Optional title header |
9
+ | `dismissible` | `boolean` | `false` | When true, renders a dismiss button |
10
+ | `icon` | `string` | `undefined` | Custom icon name overriding default type icon |
11
+ | `hideIcon` | `boolean` | `false` | When true, suppresses leading icon |
12
+ - **Events**:
13
+ | Event | Payload | Description |
14
+ | --- | --- | --- |
15
+ | `@update:modelValue` | `(value: boolean)` | Emitted when alert visibility changes (e.g. dismissed) |
16
+ | `@dismiss` | `()` | Emitted after the dismiss button is clicked |
17
+ - **Slots**: `default` (alert body content).
18
+ - **Example**:
19
+ ```pug
20
+ KAlert(v-model="showAlert" type="warning" title="Warning" :dismissible="true" @dismiss="onAlertDismiss")
21
+ span Your session is about to expire.
22
+ ```
@@ -0,0 +1,19 @@
1
+ ### `KAreaChart`
2
+ - **Purpose**: Area chart component displaying volume/trends beneath lines with support for stacked and unstacked modes.
3
+ - **Props**:
4
+ | Prop | Type | Default | Description |
5
+ | --- | --- | --- | --- |
6
+ | `dataProvider` | `ADataProvider \| any[]` | `undefined` | Data provider or raw data array |
7
+ | `xField` | `string` | `'x'` | Key for horizontal X-axis values |
8
+ | `yField` | `string` | `'y'` | Key for vertical Y-axis values |
9
+ | `seriesField` | `string` | `undefined` | Key for multi-series grouping |
10
+ | `stacked` | `boolean` | `false` | When true, stacks series areas cumulatively |
11
+ | `animated` | `boolean` | `true` | Enables path entrance animations |
12
+ | `zoomable` | `boolean` | `true` | Enables interactive zooming |
13
+ | `wheelNavigation` | `boolean` | `true` | Enables mouse-wheel zoom & pan |
14
+ | `maxZoom` | `number` | `10` | Maximum zoom magnification factor |
15
+ | `colors` | `string[]` | `undefined` | Color palette array |
16
+ | `backgroundColor` | `string` | `undefined` | Canvas background |
17
+ | `showLegend` | `boolean` | `true` | Displays legend |
18
+ | `xAxisTitle` | `string` | `undefined` | Label displayed on X axis |
19
+ | `yAxisTitle` | `string` | `undefined` | Label displayed on Y axis |
@@ -0,0 +1,20 @@
1
+ ### `KBarChart`
2
+ - **Purpose**: Versatile bar chart supporting simple, clustered, stacked, vertical, and horizontal orientations.
3
+ - **Props**:
4
+ | Prop | Type | Default | Description |
5
+ | --- | --- | --- | --- |
6
+ | `dataProvider` | `ADataProvider \| any[]` | `undefined` | Data source |
7
+ | `categoryField` | `string` | `'category'` | Key for categorical axis labels |
8
+ | `valueField` | `string` | `'value'` | Key for numeric bar lengths |
9
+ | `groupField` | `string` | `undefined` | Key for clustering or stacking subgroups |
10
+ | `orientation` | `'vertical' \| 'horizontal'` | `'vertical'` | Bar orientation direction |
11
+ | `mode` | `'simple' \| 'clustered' \| 'stacked'` | `'simple'` | Grouping display mode |
12
+ | `animated` | `boolean` | `true` | Bar height growth animation |
13
+ | `zoomable` | `boolean` | `true` | Interactive zoom support |
14
+ | `wheelNavigation` | `boolean` | `true` | Wheel zoom/pan support |
15
+ | `maxZoom` | `number` | `10` | Max zoom factor |
16
+ | `colors` | `string[]` | `undefined` | Color palette array |
17
+ | `backgroundColor` | `string` | `undefined` | Canvas background |
18
+ | `showLegend` | `boolean` | `true` | Displays legend |
19
+ | `xAxisTitle` | `string` | `undefined` | Label on X axis |
20
+ | `yAxisTitle` | `string` | `undefined` | Label on Y axis |
@@ -0,0 +1,19 @@
1
+ ### `KBulkActions`
2
+ - **Purpose**: Container for performing operations on multiple selected rows.
3
+ - **Props**:
4
+ | Prop | Type | Default | Description |
5
+ | --- | --- | --- | --- |
6
+ | `bulkActions` | `IKDatatableAction[]` | **Required** | Defined actions |
7
+ | `selectedRows` | `any[]` | **Required** | Current selection array |
8
+ | `selectAll` | `boolean` | `false` | Global dataset selection flag |
9
+ | `unselectedRows` | `any[]` | `[]` | Excluded rows when selectAll is true in dataset scope |
10
+ | `filter` | `any` | `undefined` | Active data provider filter to pass to bulk action callbacks |
11
+ | `idKey` | `string` | `'id'` | Unique identifier field for row key extraction |
12
+
13
+ - **Feature — Interchangeable Row & Bulk Actions & Rich Context**:
14
+ `IKDatatableAction` definitions are interchangeable between row-level actions and bulk actions. When invoked via `KBulkActions`, the callback receives `(payload, selectAll, filter)` where `payload` is the array of applicable rows, augmented with context properties `isAllSelected`, `selectedRows`, `selectedRowKeys`, `unselectedRows`, `unselectedRowKeys`, and `filter`.
15
+
16
+ ---
17
+
18
+ ## 2.6. Customizing with Scoped Slots (Pug Examples)
19
+ Many components expose data to their slots using scoped variables.
@@ -0,0 +1,12 @@
1
+ ### `KButton`
2
+ - **Props**:
3
+ | Prop | Type | Default | Accepted Values |
4
+ | --- | --- | --- | --- |
5
+ | `type` | `string` | `'default'` | `'default'`, `'primary'`, `'danger'`, `'success'`, `'warning'`, `'info'`, `'light'`, `'dark'` |
6
+ | `size` | `string` | `'medium'` | `'small'`, `'medium'`, `'large'` |
7
+ | `disabled` | `boolean` | `false` | Disables interaction |
8
+ | `loading` | `boolean` | `false` | Shows spinner and disables |
9
+ | `iconOnly` | `boolean` | `false` | Renders square 1:1 aspect-ratio icon button |
10
+ | `href` | `string` | `undefined` | Renders as `<a>` tag if provided |
11
+ - **Events**: `@click`
12
+ - **Slots**: `default` (Button label/content), `icon` (Optional custom icon slot, positioned inside the button or as icon-only content)
@@ -0,0 +1,17 @@
1
+ ### `KCalendar`
2
+ - **Props**:
3
+ | Prop | Type | Default | Description |
4
+ | --- | --- | --- | --- |
5
+ | `v-model` / `modelValue` | `Date \| string` | `undefined` | Selected date with two-way data binding |
6
+ | `v-model:selectedDay` / `selectedDay` | `Date \| string` | `null` | Selected date (legacy two-way binding) |
7
+ | `view` | `string` | `'month'` | `'month'` or `'week'` |
8
+ | `viewCount` | `number` | `1` | Number of months/weeks shown |
9
+ | `day` | `Date \| string`| `new Date()` | Active focus date |
10
+ | `markedDays` | `IMarkedDay[]` | `[]` | Events/Dots config |
11
+ | `definedDays` | `IDefinedDay[]` | `[]` | Styling for specific days |
12
+ - **Events**:
13
+ | Event | Payload | Description |
14
+ | --- | --- | --- |
15
+ | `@update:modelValue` | `(date: Date \| string)` | Emitted when selected date changes (for `v-model`) |
16
+ | `@update:selectedDay` | `(date: Date \| string)` | Emitted when selected date changes (for `v-model:selectedDay`) |
17
+ | `@dayClicked` | `(date: Date, marked: IMarkedDay[])` | Emitted when a calendar day is clicked |
@@ -0,0 +1,15 @@
1
+ ### `KCheckbox` / `KRadiobox`
2
+ - **Props**:
3
+ | Prop | Type | Default | Description |
4
+ | --- | --- | --- | --- |
5
+ | `v-model` | `any` | `null` | Binding state |
6
+ | `label` | `string` | `''` | Label text |
7
+ | `value` | `any` | `undefined` | Value when selected |
8
+ | `disabled` | `boolean` | `false` | Disable input |
9
+ | `validation` | `'success' \| 'warning' \| 'error' \| null` | `null` | Semantic validation state |
10
+ | `validationText`| `string` | `''` | message to display below input |
11
+ - **Slots**:
12
+ | Slot | Scope | Description |
13
+ | --- | --- | --- |
14
+ | `label` | None | Custom content for the checkbox label (overrides the `label` prop) |
15
+ | `default` | None | Fallback for the label area |
@@ -0,0 +1,41 @@
1
+ ### `KCombobox`
2
+ - **Props**:
3
+ | Prop | Type | Default | Description |
4
+ | --- | --- | --- | --- |
5
+ | `label` | `string` | `''` | There will be a label. |
6
+ | `dataProvider` | `ADataProvider` | **Required** | Data source |
7
+ | `labelField` | `string` | **Required** | Field to display as label |
8
+ | `valueField` | `string` | `null` | Optional. Field to bind v-model with (primitive) |
9
+ | `v-model` | `any` | `null` | Selected item(s) (Object or Primitive if valueField is set) |
10
+ | `v-model:isOptionsOpen` | `boolean` | `undefined` | Controls dropdown visibility externally |
11
+ | `multiSelect` | `boolean` | `false` | Allow multiple selections |
12
+ | `searchbox` | `boolean` | `false` | Enable live search |
13
+ | `searchPlaceholder` | `string` | `'Search...'` | Placeholder for the search input |
14
+ | `v-model:searchtext` / `searchtext` | `string` | `''` | Live search input text with two-way binding |
15
+ | `closeOnSelect` | `boolean` | `false` | Auto-close dropdown on selection |
16
+ | `maxSelectedDisplay`| `number \| string \| boolean` | `false` | Max items to show in chip format (useful in `multiSelect` to limit chip layout growth and prevent UI overflow; displays `+N` for overflow items) |
17
+ | `disabled` | `boolean` | `false` | Disable interaction |
18
+ | `placeholder` | `string` | `'select'` | Ghost text |
19
+ | `visibleFields` | `string[]` | `null` | Fields to display in dropdown |
20
+ | `teleportTo` | `string` | `undefined` | Target element for dropdown teleportation |
21
+ | `fullWidth` | `boolean` | `true` | Whether the dropdown should match at least the anchor width |
22
+ | `validation` | `'success' \| 'warning' \| 'error' \| null` | `null` | Semantic validation state |
23
+ | `validationText`| `string` | `''` | message to display below input |
24
+ | `virtualScroll` | `boolean` | `true` | Enables virtual DOM windowing and virtual pagination on scroll |
25
+ | `itemHeight` | `number` | `40` | Fixed height in pixels for each option item during virtual scrolling |
26
+ | `buffer` | `number` | `5` | Number of extra buffered items rendered outside visible viewport |
27
+ - **Events / Emits**:
28
+ | Event | Payload | Description |
29
+ | --- | --- | --- |
30
+ | `@update:modelValue` | `(val: any)` | Emitted when selection changes |
31
+ | `@update:isOptionsOpen` | `(open: boolean)` | Emitted when dropdown visibility changes |
32
+ | `@update:searchtext` | `(text: string)` | Emitted when search input changes (`v-model:searchtext`) |
33
+ | `@scroll-state-change` | `(state: IVirtualScrollState)` | Emitted when virtual scroll window updates (`{ startIndex, endIndex, visibleCount, totalCount, scrollTop }`) |
34
+ | `@change` | `(val: any)` | Emitted on option selection |
35
+ - **Exposed Properties (via `ref`)**:
36
+ | Property | Type | Description |
37
+ | --- | --- | --- |
38
+ | `virtualScrollState` | `ComputedRef<IVirtualScrollState>` | Active windowing indices and scroll offset for virtual state tracking/Pinia persistence |
39
+
40
+ > [!TIP]
41
+ > **Virtual Scrolling & Virtual Pagination**: `KCombobox` automatically handles pagination when bound to a paginated `ADataProvider` (`pageSize > 0`). As the user scrolls down the dropdown list, nearing the bottom automatically triggers `dataProvider.setCurrentPage(currentPage + 1)` and appends the incoming page to the option list seamlessly. Only visible items (plus buffer) are rendered in the DOM, keeping DOM node count minimal and scrolling at 60fps even with thousands of items. Searching via `searchbox` resets pagination to page 1 automatically.
@@ -0,0 +1,67 @@
1
+ ### `KCompositeInput`
2
+ - **Purpose**: Combines a selection `KCombobox` with a secondary input element. Each selection item can define its own input component type and configuration via `inputConfig`, enabling use cases like contact type selectors, cascading comboboxes, and per-language inputs.
3
+ - **Props**:
4
+ | Prop | Type | Default | Description |
5
+ | --- | --- | --- | --- |
6
+ | `label` | `string` | `''` | There will be a label. |
7
+ | `selectionValue` | `any` | `null` | Current selection (e.g., language code) |
8
+ | `inputValue` | `any` | `''` | Input value for the active selection |
9
+ | `modelValue` | `ICompositeItem[]` | `[]` | Collection of active selection-value pairs |
10
+ | `dataProvider` | `ADataProvider` | **Required** | Data source for the selection combobox |
11
+ | `type` | `string` | `'textbox'` | Default input type: `'textbox'`, `'textarea'`, `'maskedtextbox'`, `'combobox'`, `'datepicker'`, `'datetimepicker'`, `'hourpicker'`. Can be overridden per-selection via `inputConfig`. |
12
+ | `selectionSide` | `string` | `'left'` | `'left'` or `'right'` |
13
+ | `inputType` | `string` | `'text'` | Default HTML input type (for `textbox` only). Per-selection `inputConfig.inputType` takes priority. |
14
+ | `mask` | `string` | `''` | Default mask pattern (for `maskedtextbox` only). Per-selection `inputConfig.mask` takes priority. |
15
+ | `labelField` | `string` | `'label'` | Combobox label field |
16
+ | `valueField` | `string` | `'value'` | Combobox value field |
17
+ | `placeholder` | `string` | `'Select...'` | Combobox placeholder |
18
+ | `inputPlaceholder`| `string` | `''` | Default main input placeholder. Per-selection `inputConfig.placeholder` takes priority. |
19
+ | `searchbox` | `boolean` | `false` | Enable searchbox for the selection combobox |
20
+ | `inputFormat` | `string` | `undefined` | Default format for date/time pickers. Per-selection `inputConfig.inputFormat` takes priority. |
21
+ | `showClear` | `boolean` | `false` | Default show clear icon. Per-selection `inputConfig.showClear` takes priority. |
22
+ | `teleportTo` | `string` | `undefined` | Target element for dropdown teleportation |
23
+ | `fullWidth` | `boolean` | `true` | Whether the dropdown should match at least the anchor width |
24
+ | `inputConfigField`| `string` | `'inputConfig'` | Field name on selection items that contains `ICompositeInputConfig` |
25
+ | `validateAll` | `boolean` | `false` | When false, only the active selection's input is validated. When true, all items are validated. |
26
+ | `singleValue` | `boolean` | `false` | When true, the component maintains a single unified input value instead of managing independent values per selection item. |
27
+ | `validation` | `'success' \| 'warning' \| 'error' \| null` | `null` | Global validation state. Per-selection `inputConfig.validation` takes priority. |
28
+ | `validationText`| `string` | `''` | Global validation message. Per-selection `inputConfig.validationText` takes priority. |
29
+
30
+ - **Per-Selection Config (`ICompositeInputConfig`)**: Each item in the `dataProvider` can include an `inputConfig` field (configurable via `inputConfigField` prop) with these properties:
31
+ | Property | Type | Description |
32
+ | --- | --- | --- |
33
+ | `type` | `CompositeInputType` | Input component to render (`'textbox'`, `'combobox'`, `'maskedtextbox'`, etc.) |
34
+ | `inputType` | `string` | HTML input type for textbox (`'email'`, `'tel'`, `'number'`, etc.) |
35
+ | `mask` | `string` | Mask pattern for maskedtextbox |
36
+ | `placeholder` | `string` | Input placeholder text |
37
+ | `showClear` | `boolean` | Show clear button |
38
+ | `inputDataProvider` | `ADataProvider` | For combobox type: separate data source for the secondary input |
39
+ | `inputLabelField` | `string` | For combobox type: label field for the secondary combobox |
40
+ | `inputValueField` | `string` | For combobox type: value field for the secondary combobox |
41
+ | `inputSearchbox` | `boolean` | For combobox type: enable searchbox |
42
+ | `inputFormat` | `string` | For date/time pickers: date or time format pattern |
43
+ | `validation` | `string` | Per-selection validation state |
44
+ | `validationText` | `string` | Per-selection validation message |
45
+
46
+ - **Config Resolution**: Per-item `inputConfig` → component-level props → defaults.
47
+ - **Events**:
48
+ | Event | Payload | Description |
49
+ | --- | --- | --- |
50
+ | `update:selectionValue`| `any` | Fired when the active selection changes |
51
+ | `update:inputValue` | `any` | Fired when the active input value changes |
52
+ | `update:modelValue` | `ICompositeItem[]` | Fired when the multi-value collection updates |
53
+
54
+ - **Usage Examples**:
55
+ ```typescript
56
+ // Contact types with per-selection input config
57
+ const contactTypes = [
58
+ { label: 'Email', code: 'email', inputConfig: { type: 'textbox', inputType: 'email', placeholder: 'user@example.com' } },
59
+ { label: 'Phone', code: 'phone', inputConfig: { type: 'maskedtextbox', mask: '+99 (999) 999-9999' } },
60
+ ]
61
+
62
+ // Cascading combobox (Country → City)
63
+ const countries = [
64
+ { label: 'Turkey', code: 'tr', inputConfig: { type: 'combobox', inputDataProvider: turkishCitiesDP, inputLabelField: 'name' } },
65
+ { label: 'Germany', code: 'de', inputConfig: { type: 'combobox', inputDataProvider: germanCitiesDP, inputLabelField: 'name' } },
66
+ ]
67
+ ```
@@ -0,0 +1,20 @@
1
+ ### `KContextMenu`
2
+ - **Purpose**: Right-click popup actions positioned at specific coordinates. Teleports its content to avoid overflow issues.
3
+ - **Props**:
4
+ | Prop | Type | Default | Description |
5
+ | --- | --- | --- | --- |
6
+ | `v-model:isOpen` | `boolean` | `false` | Controls the visibility of the context menu |
7
+ | `x` | `number` | `0` | The horizontal coordinate (clientX) where the menu should open |
8
+ | `y` | `number` | `0` | The vertical coordinate (clientY) where the menu should open |
9
+ | `teleportTo` | `string` | `undefined` | Target element for dropdown teleportation |
10
+ - **Slots**: `default` (List of actions or content to display).
11
+ - **Keyboard Navigation & WAI-ARIA**:
12
+ - Menu container is rendered with `role="menu"`, `aria-orientation="vertical"`, and `tabindex="-1"`.
13
+ - Automatically focuses the first interactive item (`a`, `button`, `[role="menuitem"]`) upon opening.
14
+ - `ArrowDown` / `ArrowUp`: Focus roving between menu items with cyclic wrapping.
15
+ - `Home` / `End`: Focuses the first / last interactive menu item.
16
+ - `Escape` / `Tab`: Dismisses the context menu and restores focus.
17
+
18
+ ---
19
+
20
+ ## 2.5. Feedback & Utilities
@@ -0,0 +1,35 @@
1
+ ### `KDataIterator`
2
+ - **Purpose**: Flexible list iterator with support for custom row templates, pagination, and bulk actions.
3
+ - **Props**:
4
+ | Prop | Type | Default | Description |
5
+ | --- | --- | --- | --- |
6
+ | `dataProvider` | `ADataProvider` | **Required** | Reactive data engine |
7
+ | `rowActions` | `IKDatatableAction[]` | `[]` | Per-row action buttons |
8
+ | `bulkActions` | `IKDatatableAction[]` | `[]` | Global actions for selected rows |
9
+ | `visibleFields` | `string[]` | `null` | Array of keys to expose |
10
+ | `loading` | `boolean` | `false` | Manual loading state toggle |
11
+ | `v-model:search` / `search` | `string` | `''` | Search string with two-way binding |
12
+ | `v-model:page` / `v-model:currentPage` / `page` | `number` | `1` | Current page with two-way binding |
13
+ | `v-model:itemsPerPage` / `v-model:pageSize` / `itemsPerPage` | `number` | `10` | Items per page with two-way binding |
14
+ | `v-model:selectedRows` / `selectedRows` | `any[]` | `[]` | Selected rows array with two-way binding |
15
+ | `v-model:selectAll` / `selectAll` | `boolean` | `false` | Select-all boolean state with two-way binding |
16
+
17
+ - **Events / Emits**:
18
+ | Event | Payload | Description |
19
+ | --- | --- | --- |
20
+ | `@update:page` | `(page: number)` | Emitted when page changes |
21
+ | `@update:currentPage` | `(page: number)` | Emitted when page changes |
22
+ | `@update:itemsPerPage`| `(size: number)` | Emitted when page size changes |
23
+ | `@update:pageSize` | `(size: number)` | Emitted when page size changes |
24
+ | `@update:search` | `(search: string)` | Emitted when search changes |
25
+ | `@update:selectedRows`| `(rows: any[])` | Emitted when selection changes |
26
+ | `@update:selectAll` | `(all: boolean)` | Emitted when selectAll toggles |
27
+
28
+ - **Slots**:
29
+ | Slot | Scope | Description |
30
+ | --- | --- | --- |
31
+ | `#row` | `{ row: any, rowActions: any[] }` | Custom template for each data item |
32
+
33
+ ---
34
+
35
+ ## 2.4. Trees & Navigation
@@ -0,0 +1,55 @@
1
+ ### `KDatatable`
2
+ - **Props**:
3
+ | Prop | Type | Default | Description |
4
+ | --- | --- | --- | --- |
5
+ | `dataProvider` | `ADataProvider` | **Required** | Reactive data engine |
6
+ | `visibleFields` | `string[]` | `null` | Array of keys to show (null = all) |
7
+ | `columnHeaders` | `Record<string, string>` | `{}` | Maps field keys to human-readable labels |
8
+ | `columnWidths` | `Record<string, string>` | `{}` | Maps field keys to CSS widths |
9
+ | `rowActions` | `IKDatatableAction[]` | `[]` | Per-row action buttons |
10
+ | `bulkActions` | `IKDatatableAction[]` | `[]` | Global actions for selected rows. **Automatically enables multi-selection checkboxes** on rows and the header select-all toggle when provided |
11
+ | `cellSlots` | `Record<string, any>` | `undefined` | Custom cell slots map (alternative to template slots) |
12
+ | `headerSlots` | `Record<string, any>` | `undefined` | Custom header slots map (alternative to template slots) |
13
+ | `emptyStateText` | `string` | `'no result'` | Message when dataset is empty |
14
+ | `emptyFilterStateText`| `string` | `'no result found for filter'` | Message when filtered dataset is empty |
15
+ | `v-model:currentPage` / `currentPage` | `number` | `undefined` | Current page number with two-way sync to provider |
16
+ | `v-model:pageSize` / `pageSize` | `number` | `undefined` | Page size number with two-way sync to provider |
17
+ | `v-model:filter` / `filter` | `IDataFilter \| null` | `undefined` | Active filter object with two-way sync |
18
+ | `v-model:sortList` / `sortList` | `IDataSort[]` | `undefined` | Active sort definitions with two-way sync |
19
+ | `v-model:selectedRows` / `selectedRows`| `any[]` | `[]` | Array of currently selected row objects (preserved across page changes) |
20
+ | `v-model:selectAll` / `selectAll` | `boolean` | `false` | Header select-all boolean state |
21
+ | `v-model:unselectedRows` / `unselectedRows` | `any[]` | `[]` | Excluded row objects when `selectAll: true` in dataset scope |
22
+ | `selectAllScope` | `'page' \| 'dataset'` | `'page'` | Scope for header select-all toggle. Automatically defaults/overrides to `'dataset'` when `virtualScroll: true` |
23
+ | `virtualScroll` | `boolean` | `false` | Enables virtual DOM windowing and sticky headers for large datasets |
24
+ | `itemHeight` | `number` | `40` | Row height in pixels for virtual scroll window calculations |
25
+ | `viewportHeight` | `number` | `500` | Viewport container height in pixels for virtual scroll window |
26
+ | `buffer` | `number` | `5` | Buffer rows rendered above and below the viewport |
27
+
28
+ - **Events / Emits**:
29
+ | Event | Payload | Description |
30
+ | --- | --- | --- |
31
+ | `@update:currentPage` | `(page: number)` | Emitted when page changes |
32
+ | `@update:pageSize` | `(size: number)` | Emitted when page size changes |
33
+ | `@update:filter` | `(filter: IDataFilter \| null)` | Emitted when filter changes |
34
+ | `@update:sortList` | `(sortList: IDataSort[])` | Emitted when sorting changes |
35
+ | `@update:selectedRows` | `(rows: any[])` | Emitted when selectedRows changes |
36
+ | `@update:selectAll` | `(all: boolean)` | Emitted when selectAll state changes |
37
+ | `@update:unselectedRows` | `(rows: any[])` | Emitted when unselectedRows changes |
38
+ | `@update:selectAllScope` | `(scope: 'page' \| 'dataset')` | Emitted when selectAllScope changes |
39
+
40
+ > [!NOTE]
41
+ > **Component-Level Selection Architecture (Option B)**:
42
+ > - **Pure Headless DataProvider**: DataProviders are strictly headless data services (fetching, sorting, filtering, caching, pagination) and contain **zero selection state**. This ensures multiple components (e.g. Datatable and Combobox, or multiple Datatables) can safely share the same data provider instance without selection crosstalk.
43
+ > - **Multi-Page Selection Retention**: Navigating across pages via pagination does NOT reset `selectedRows`. Selections across multiple pages are retained until explicitly deselected or cleared.
44
+ > - **Select All Scope (`selectAllScope: 'page' | 'dataset'`)**:
45
+ > - `'page'` (Default): The header checkbox selects only the visible page rows and adds them to `selectedRows`. Navigating to another page keeps previous selections.
46
+ > - `'dataset'`: The header checkbox sets `selectAll = true` as a fast flag without duplicating thousands/millions of records in memory. Deselected rows are recorded in `unselectedRows`, turning the header checkbox into an indeterminate state (`isIndeterminate: true`). Clicking select-all again clears all selections.
47
+ > - **Virtual Scrolling Incompatibility & Override**: Virtual scrolling renders a continuous window without discrete pages. Therefore, when `virtualScroll: true`, `selectAllScope` automatically defaults to `'dataset'`. If `selectAllScope="page"` is explicitly set with `virtualScroll: true`, `KDatatable` logs a console warning and automatically overrides the scope to `'dataset'`.
48
+ >
49
+ > **Mobile Responsiveness**: The datatable container provides native horizontal scrolling with touch scrolling support (`-webkit-overflow-scrolling: touch`) and `white-space: nowrap` on cells to prevent columns from collapsing awkwardly on small screens. Below `768px`, the table footer automatically stacks vertically to keep bulk actions and pagination cleanly separated.
50
+
51
+ - **Slots**:
52
+ | Slot | Scope | Description |
53
+ | --- | --- | --- |
54
+ | `#cell-[field]` | `{ row: any, value: any }` | Custom cell renderer |
55
+ | `#header-[field]`| `{ field: string }` | Custom header renderer |
@@ -0,0 +1,26 @@
1
+ ### `KDatePicker` / `KHourPicker` / `KDateTimePicker`
2
+ - **Common Props**:
3
+ | Prop | Type | Default | Description |
4
+ | --- | --- | --- | --- |
5
+ | `label` | `string` | `''` | There will be a label. |
6
+ | `v-model` | `any` | `undefined` | Primary value binding |
7
+ | `v-model:day` | `any` | `undefined` | Alias for `v-model` (Date/Time) |
8
+ | `v-model:isOpen` | `boolean` | `false` | Controls dropdown visibility |
9
+ | `format` | `string` | *Varies* | Display and mask format |
10
+ | `showClear` | `boolean` | `false` | Show clear icon in the textbox |
11
+ | `placeholder` | `string` | `''` | Placeholder text |
12
+ | `disabled` | `boolean` | `false` | Disable interactions |
13
+ | `markedDays`| `IMarkedDay[]` | `[]` | Event dots on calendar |
14
+ | `definedDays`| `IDefinedDay[]`| `[]` | Styling for specific days |
15
+ | `validation` | `'success' \| 'warning' \| 'error' \| null` | `null` | Semantic validation state |
16
+ | `validationText`| `string` | `''` | message to display below input |
17
+
18
+ - **Component Specific Props**:
19
+ | Component | Prop | Type | Default | Description |
20
+ | --- | --- | --- | --- | --- |
21
+ | `KDatePicker` | `v-model:day` | `any` | `undefined` | Alias for `v-model` |
22
+ | `KHourPicker` | `step` | `number` | `30` | Minute selection interval |
23
+ | `KHourPicker` | `startHour` | `string` | `'00:00'` | Earliest selectable time |
24
+ | `KHourPicker` | `endHour` | `string` | `undefined` | Latest selectable time |
25
+ | `KDateTimePicker` | `timeFormat` | `string` | `'HH:mm'` | Internal time list format |
26
+ | `KDateTimePicker` | `timeStep` | `number` | `30` | Minute selection interval |
@@ -0,0 +1,18 @@
1
+ ### `KDropdown`
2
+ - **Purpose**: Floating dropdown panel with smart viewport-aware positioning. Teleports its content to the target portal to escape overflow-hidden ancestors.
3
+ - **Props**:
4
+ | Prop | Type | Default | Accepted Values | Description |
5
+ | --- | --- | --- | --- | --- |
6
+ | `v-model:isOpen` | `boolean` | `false` | `true`, `false` | Controls open/closed state |
7
+ | `fullWidth` | `boolean` | `false` | `true`, `false` | Sets min-width to match anchor element width |
8
+ | `anchorEl` | `HTMLElement` | `undefined` | Any element ref | The element the dropdown is positioned relative to |
9
+ | `teleportTo` | `string` | `'body'` | CSS selector | Override teleport target (auto-detects modal portals) |
10
+ | `direction` | `string` | `'auto'` | `'auto'`, `'bottom'`, `'top'`, `'left'`, `'right'` | Preferred opening direction. `'auto'` measures available space and picks the best fit (prefers bottom → top → right → left). Forced values fall back gracefully if space is insufficient. |
11
+ | `align` | `string` | `'left'` | `'left'`, `'right'` (for vertical dirs); `'top'`, `'bottom'` (for horizontal dirs) | Secondary cross-axis alignment. For top/bottom directions: aligns the dropdown's left or right edge with the anchor. For left/right directions: aligns the dropdown's top or bottom edge with the anchor. |
12
+
13
+ - **Direction & Align Combinations**:
14
+ - `direction="bottom"` (default): opens below anchor. `align="left"` (default) left-aligns to anchor; `align="right"` right-aligns to anchor.
15
+ - `direction="top"`: opens above anchor. Same left/right align semantics.
16
+ - `direction="right"`: opens to the right of the anchor. `align="top"` (default for horizontal) top-aligns; `align="bottom"` bottom-aligns.
17
+ - `direction="left"`: opens to the left of the anchor. Same top/bottom align semantics.
18
+ - `direction="auto"`: measures viewport space at open time and picks best direction automatically.
@@ -0,0 +1,28 @@
1
+ ### `KGantt`
2
+ - **Props**:
3
+ | Prop | Type | Default | Description |
4
+ | --- | --- | --- | --- |
5
+ | `dataProvider` | `ADataProvider` | **Required** | Resource data source |
6
+ | `columns` | `ITreeViewColumn[]`| **Required** | Left-side resource columns |
7
+ | `treeColumnIndex` | `number` | `0` | Column index displaying the hierarchical tree expander |
8
+ | `startDate` | `Date \| string` | Now - 15d | Timeline start date (date mode) |
9
+ | `endDate` | `Date \| string` | Now + 45d | Timeline end date (date mode) |
10
+ | `startingPoint` | `number` | `undefined` | Timeline starting integer (numeric mode) |
11
+ | `endingPoint` | `number` | `undefined` | Timeline ending integer (numeric mode) |
12
+ | `mode` | `string` | `'date'` | Timeline mode: `'date'` or `'numeric'` |
13
+ | `snapTo` | `string` | `'day'` | Drag snapping unit |
14
+ | `editable` | `boolean` | `true` | Enables interactive dragging and resizing of tasks |
15
+ | `taskMapping` | `any` | `undefined` | Custom mapping definition for task data structure |
16
+ | `resourceTypeField`| `string` | `undefined` | Field identifying resource row classification |
17
+ | `taskTypeField` | `string` | `undefined` | Field identifying individual task classifications |
18
+ | `rowActions` | `IKDatatableAction[]` | `[]` | Per-row action buttons |
19
+ | `bulkActions` | `IKDatatableAction[]` | `[]` | Global actions for selected rows |
20
+ | `loading` | `boolean` | `false` | Manual loading state toggle |
21
+ | `idKey` | `string` | `'id'` | Unique identifier field |
22
+ | `v-model:selectedRows` / `selectedRows` | `any[]` | `[]` | Selected resource rows |
23
+ | `v-model:selectAll` / `selectAll` | `boolean` | `false` | Global select all |
24
+ | `v-model:task` | `any` | `null` | Selected task |
25
+ | `virtualScroll` | `boolean` | `false` | Enables DOM virtualization for large resource datasets |
26
+ | `itemHeight` | `number` | `40` | Fixed height in px for each resource row |
27
+ | `viewportHeight` | `number` | `500` | Height in px of the scrollable viewport |
28
+ | `buffer` | `number` | `5` | Number of off-screen buffer rows rendered above/below |
@@ -0,0 +1,17 @@
1
+ ### `KGrid`
2
+ - **Purpose**: Flexbox-based layout container.
3
+ - **Props**:
4
+ | Prop | Type | Default | Accepted Values | Description |
5
+ | --- | --- | --- | --- | --- |
6
+ | `direction` | `string` | `'row'` | `'row'`, `'column'` | Flex direction |
7
+ | `wrap` | `string` | `'wrap'` | `'wrap'`, `'nowrap'` | Flex wrap |
8
+ | `flexChild` | `boolean` | `false` | `true`, `false` | Apply flex: 1 to child |
9
+ | `align` | `string` | `'start'` | `'start'`, `'center'`, `'end'`, `'stretch'`, `'baseline'` | Align items |
10
+ | `justify` | `string` | `'start'` | `'start'`, `'center'`, `'end'`, `'space-between'`, `'around'`, `'evenly'` | Justify content |
11
+ | `noGap` | `boolean` | `false` | `true`, `false` | Remove default grid gaps |
12
+ | `gap` | `string` | `'1rem'` | Any CSS gap value | Custom gap between items |
13
+ | `columns` | `number \| string` | `undefined` | e.g. `4` or `'repeat(12, 1fr)'` | Grid columns layout |
14
+ - **Slots**:
15
+ | Slot | Scope | Description |
16
+ | --- | --- | --- |
17
+ | `default` | None | Primary content grid items |
@@ -0,0 +1,32 @@
1
+ ### `KHeatMap`
2
+ - **Purpose**: Two-dimensional matrix heat grid visualizing values with continuous color gradients.
3
+ - **Props**:
4
+ | Prop | Type | Default | Description |
5
+ | --- | --- | --- | --- |
6
+ | `dataProvider` | `ADataProvider \| any[]` | `undefined` | Data source |
7
+ | `rowField` | `string` | `'row'` | Vertical matrix row key |
8
+ | `columnField` | `string` | `'column'` | Horizontal matrix column key |
9
+ | `valueField` | `string` | `'value'` | Numeric matrix cell value key |
10
+ | `colorLow` | `string` | `undefined` | Minimum intensity gradient color |
11
+ | `colorHigh` | `string` | `undefined` | Maximum intensity gradient color |
12
+ | `colors` | `string[]` | `undefined` | Custom multi-stop gradient array |
13
+ | `backgroundColor` | `string` | `undefined` | Canvas background |
14
+ | `showLegend` | `boolean` | `true` | Gradient legend bar |
15
+ | `xAxisTitle` | `string` | `undefined` | Label on horizontal axis |
16
+ | `yAxisTitle` | `string` | `undefined` | Label on vertical axis |
17
+
18
+ - **Example Chart Usage (Pug)**:
19
+ ```pug
20
+ KLineChart(
21
+ :dataProvider="salesProvider"
22
+ xField="date"
23
+ yField="revenue"
24
+ seriesField="channel"
25
+ :animated="true"
26
+ :zoomable="true"
27
+ )
28
+ ```
29
+
30
+ ---
31
+
32
+ ## 2.9. Directives Reference