vlite3 1.1.2 → 1.1.5

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 (149) hide show
  1. package/README.md +5 -0
  2. package/components/AttachmentsList/AttachmentsList.vue.d.ts +1 -1
  3. package/components/AttachmentsList/AttachmentsList.vue.js +237 -163
  4. package/components/Avatar.vue.js +1 -1
  5. package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
  6. package/components/Button.vue.js +30 -28
  7. package/components/Carousel/Carousel.vue.d.ts +2 -2
  8. package/components/CategoryManager/CategoryManager.vue.d.ts +10 -2
  9. package/components/CategoryManager/CategoryManager.vue.js +138 -119
  10. package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
  11. package/components/CategoryManager/CategoryNode.vue.js +93 -88
  12. package/components/Chart/BarChart.vue.d.ts +48 -0
  13. package/components/Chart/CircleChart.vue.d.ts +47 -0
  14. package/components/Chart/LineChart.vue.d.ts +55 -0
  15. package/components/Chart/PieChart.vue.d.ts +49 -0
  16. package/components/Chart/index.d.ts +5 -0
  17. package/components/Chart/types.d.ts +135 -0
  18. package/components/Chart/utils.d.ts +40 -0
  19. package/components/Chat/ChatBubble.vue.js +22 -22
  20. package/components/CheckBox.vue.js +29 -28
  21. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  22. package/components/ColorPicker/ColorPicker.vue.js +2 -2
  23. package/components/Comment/CommentEditor.vue.d.ts +41 -0
  24. package/components/Comment/CommentEditor.vue.js +221 -0
  25. package/components/Comment/CommentEditor.vue2.js +4 -0
  26. package/components/Comment/CommentItem.vue.d.ts +70 -0
  27. package/components/Comment/CommentItem.vue.js +7 -0
  28. package/components/Comment/CommentItem.vue2.js +322 -0
  29. package/components/Comment/CommentThread.vue.d.ts +64 -0
  30. package/components/Comment/CommentThread.vue.js +185 -0
  31. package/components/Comment/CommentThread.vue2.js +4 -0
  32. package/components/Comment/index.d.ts +4 -0
  33. package/components/Comment/types.d.ts +34 -0
  34. package/components/ConfirmationModal.vue.js +30 -28
  35. package/components/CopyButton.vue.d.ts +50 -0
  36. package/components/CopyButton.vue.js +69 -0
  37. package/components/CopyButton.vue2.js +4 -0
  38. package/components/DataTable/DataTable.vue.d.ts +2 -4
  39. package/components/DataTable/DataTable.vue.js +184 -235
  40. package/components/DataTable/DataTableHeader.vue.d.ts +2 -0
  41. package/components/DataTable/DataTableHeader.vue.js +24 -23
  42. package/components/DataTable/DataTableRow.vue.d.ts +2 -0
  43. package/components/DataTable/DataTableRow.vue.js +32 -31
  44. package/components/DataTable/types.d.ts +2 -9
  45. package/components/DatePicker.vue.js +41 -35
  46. package/components/DateRangePicker.vue.js +18 -17
  47. package/components/Dropdown/Dropdown.vue.d.ts +5 -0
  48. package/components/Dropdown/Dropdown.vue.js +141 -137
  49. package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
  50. package/components/Dropdown/DropdownItem.vue.js +21 -20
  51. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  52. package/components/Dropdown/DropdownMenu.vue2.js +13 -12
  53. package/components/Dropdown/DropdownTrigger.vue.d.ts +4 -0
  54. package/components/Dropdown/DropdownTrigger.vue.js +12 -7
  55. package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
  56. package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
  57. package/components/Dropdown/composables/useDropdownSelection.js +46 -31
  58. package/components/Empty/Empty.vue.js +7 -5
  59. package/components/Empty/index.d.ts +1 -1
  60. package/components/Empty/variants/Variant12.vue.d.ts +22 -0
  61. package/components/Empty/variants/Variant12.vue.js +35 -0
  62. package/components/Empty/variants/Variant12.vue2.js +4 -0
  63. package/components/FilePicker/FilePicker.vue.js +93 -90
  64. package/components/Footer/Footer.vue.d.ts +3 -0
  65. package/components/Footer/Variant1.vue.d.ts +20 -0
  66. package/components/Footer/Variant2.vue.d.ts +20 -0
  67. package/components/Footer/Variant3.vue.d.ts +12 -0
  68. package/components/Footer/index.d.ts +2 -0
  69. package/components/Footer/types.d.ts +73 -0
  70. package/components/Form/CustomFields.vue.d.ts +2 -0
  71. package/components/Form/CustomFields.vue.js +1 -1
  72. package/components/Form/CustomFields.vue2.js +125 -122
  73. package/components/Form/Form.vue.js +2 -2
  74. package/components/Form/Form.vue2.js +68 -64
  75. package/components/Form/FormField.vue.js +205 -149
  76. package/components/Form/FormFields.vue.js +2 -2
  77. package/components/Form/FormFields.vue2.js +28 -27
  78. package/components/Form/types.d.ts +2 -2
  79. package/components/Form/utils/form.utils.d.ts +3 -3
  80. package/components/Form/utils/form.utils.js +37 -37
  81. package/components/Input.vue.js +64 -62
  82. package/components/Invoice/Invoice.vue.js +9 -7
  83. package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
  84. package/components/Invoice/InvoiceTotals.vue.js +86 -0
  85. package/components/Invoice/InvoiceTotals.vue2.js +4 -0
  86. package/components/Invoice/InvoiceVariant1.vue.d.ts +3 -1
  87. package/components/Invoice/InvoiceVariant1.vue.js +194 -207
  88. package/components/Invoice/InvoiceVariant2.vue.d.ts +3 -1
  89. package/components/Invoice/InvoiceVariant2.vue.js +109 -118
  90. package/components/Invoice/InvoiceVariant3.vue.d.ts +3 -1
  91. package/components/Invoice/InvoiceVariant3.vue.js +157 -167
  92. package/components/Invoice/InvoiceVariant4.vue.d.ts +3 -1
  93. package/components/Invoice/InvoiceVariant4.vue.js +192 -202
  94. package/components/Invoice/index.d.ts +1 -0
  95. package/components/Invoice/types.d.ts +22 -0
  96. package/components/Masonry/Masonry.vue.d.ts +1 -1
  97. package/components/Modal.vue.js +1 -1
  98. package/components/Modal.vue2.js +60 -54
  99. package/components/MultiSelect/MultiSelect.vue.d.ts +2 -0
  100. package/components/MultiSelect/MultiSelect.vue.js +92 -90
  101. package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
  102. package/components/NumberInput.vue.js +2 -2
  103. package/components/NumberInput.vue2.js +127 -121
  104. package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
  105. package/components/RichTextEditor/RichTextLinkPopover.vue.d.ts +26 -0
  106. package/components/RichTextEditor/RichTextReader.vue.d.ts +7 -0
  107. package/components/RichTextEditor/RichTextToolbar.vue.d.ts +24 -0
  108. package/components/RichTextEditor/composables/useRichTextImageUpload.d.ts +14 -0
  109. package/components/RichTextEditor/composables/useRichTextLinks.d.ts +32 -0
  110. package/components/RichTextEditor/index.d.ts +2 -0
  111. package/components/Screen/Screen.vue.js +45 -46
  112. package/components/Screen/ScreenFilter.vue.js +1 -1
  113. package/components/SidePanel.vue.js +2 -2
  114. package/components/SidePanel.vue2.js +58 -52
  115. package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
  116. package/components/SidebarMenu/SidebarMenu.vue.js +192 -91
  117. package/components/SidebarMenu/SidebarMenu.vue3.js +5 -0
  118. package/components/SidebarMenu/SidebarMenuItem.vue.js +170 -157
  119. package/components/SidebarMenu/types.d.ts +12 -3
  120. package/components/{DataTable/DataTableToolbar.vue.d.ts → Splitter/Splitter.vue.d.ts} +18 -15
  121. package/components/Splitter/Splitter.vue.js +64 -0
  122. package/components/Splitter/Splitter.vue2.js +4 -0
  123. package/components/Splitter/index.d.ts +1 -0
  124. package/components/Stats/StatItem.vue.js +96 -91
  125. package/components/Stats/types.d.ts +1 -0
  126. package/components/StatusChip/status-map.js +34 -2
  127. package/components/Switch.vue.d.ts +6 -1
  128. package/components/Switch.vue.js +61 -24
  129. package/components/TagInput/TagInput.vue.d.ts +187 -0
  130. package/components/TagInput/TagInput.vue.js +113 -0
  131. package/components/TagInput/TagInput.vue2.js +4 -0
  132. package/components/TagInput/index.d.ts +1 -0
  133. package/components/Textarea.vue.js +19 -18
  134. package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
  135. package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
  136. package/components/index.d.ts +4 -0
  137. package/core/config.d.ts +54 -0
  138. package/index.d.ts +4 -0
  139. package/index.js +300 -285
  140. package/package.json +1 -1
  141. package/style.css +657 -6
  142. package/types/button.d.ts +1 -1
  143. package/types/config.type.d.ts +2 -0
  144. package/types/styles.d.ts +1 -0
  145. package/utils/functions.js +9 -9
  146. package/components/DataTable/DataTableToolbar.vue.js +0 -60
  147. package/components/DataTable/DataTableToolbar.vue2.js +0 -4
  148. package/components/SidebarMenu/SidebarMenu.vue2.js +0 -4
  149. /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
@@ -0,0 +1,135 @@
1
+ export type ChartColor = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'purple' | 'teal' | 'orange' | 'pink' | 'cyan' | string;
2
+ export interface ChartDataPoint {
3
+ label: string;
4
+ value: number;
5
+ color?: string;
6
+ [key: string]: any;
7
+ }
8
+ export interface ChartDataset {
9
+ label: string;
10
+ data: number[];
11
+ color?: string;
12
+ }
13
+ export interface LineChartProps {
14
+ /** Single-series data points */
15
+ data?: ChartDataPoint[];
16
+ /** Multi-series datasets (overrides data) */
17
+ datasets?: ChartDataset[];
18
+ /** X-axis labels when using datasets */
19
+ labels?: string[];
20
+ /** Chart height in px */
21
+ height?: number;
22
+ /** Smooth bezier vs straight lines */
23
+ smooth?: boolean;
24
+ /** Fill area under line */
25
+ fill?: boolean;
26
+ /** Show data point dots */
27
+ showDots?: boolean;
28
+ /** Show background gridlines */
29
+ showGrid?: boolean;
30
+ /** Show legend (multi-series) */
31
+ showLegend?: boolean;
32
+ /** Enable hover tooltip */
33
+ showTooltip?: boolean;
34
+ /** Custom color palette */
35
+ colors?: string[];
36
+ /** Entry animation */
37
+ animate?: boolean;
38
+ /** X-axis label */
39
+ xLabel?: string;
40
+ /** Y-axis label */
41
+ yLabel?: string;
42
+ /** Custom value formatter */
43
+ formatValue?: (v: number) => string;
44
+ /** Y-axis min override */
45
+ yMin?: number;
46
+ /** Y-axis max override */
47
+ yMax?: number;
48
+ }
49
+ export interface BarChartProps {
50
+ /** Single-series data points */
51
+ data?: ChartDataPoint[];
52
+ /** Multi-series datasets (overrides data) */
53
+ datasets?: ChartDataset[];
54
+ /** X-axis labels when using datasets */
55
+ labels?: string[];
56
+ /** Chart height in px */
57
+ height?: number;
58
+ /** Bar orientation */
59
+ orientation?: 'vertical' | 'horizontal';
60
+ /** Top-corner radius per bar */
61
+ barRadius?: number;
62
+ /** Show background gridlines */
63
+ showGrid?: boolean;
64
+ /** Show legend (multi-series) */
65
+ showLegend?: boolean;
66
+ /** Enable hover tooltip */
67
+ showTooltip?: boolean;
68
+ /** Show value label on each bar */
69
+ showValues?: boolean;
70
+ /** Custom color palette */
71
+ colors?: string[];
72
+ /** Entry animation */
73
+ animate?: boolean;
74
+ /** Custom value formatter */
75
+ formatValue?: (v: number) => string;
76
+ }
77
+ export type PieLabelMode = 'percent' | 'value' | 'label' | 'none';
78
+ export type LegendPosition = 'right' | 'bottom';
79
+ export interface PieChartProps {
80
+ /** Chart data */
81
+ data: ChartDataPoint[];
82
+ /** Render as donut (ring) */
83
+ donut?: boolean;
84
+ /** Inner cutout as % of radius (donut mode) */
85
+ innerRadius?: number;
86
+ /** Chart diameter in px */
87
+ size?: number;
88
+ /** Start angle in degrees */
89
+ startAngle?: number;
90
+ /** Show legend */
91
+ showLegend?: boolean;
92
+ /** Legend position */
93
+ legendPosition?: LegendPosition;
94
+ /** What to show on each slice */
95
+ labelMode?: PieLabelMode;
96
+ /** Custom color palette */
97
+ colors?: string[];
98
+ /** Entry animation */
99
+ animate?: boolean;
100
+ /** Enable hover tooltip */
101
+ showTooltip?: boolean;
102
+ /** Center text label (donut mode) */
103
+ centerLabel?: string;
104
+ /** Center value text (donut mode) */
105
+ centerValue?: string;
106
+ }
107
+ export type StrokeLineCap = 'round' | 'square' | 'butt';
108
+ export interface CircleChartProps {
109
+ /** Current value */
110
+ value: number;
111
+ /** Maximum value */
112
+ max?: number;
113
+ /** Diameter in px */
114
+ size?: number;
115
+ /** Ring stroke width */
116
+ strokeWidth?: number;
117
+ /** Color theme or hex */
118
+ color?: ChartColor;
119
+ /** Gradient stroke */
120
+ gradient?: boolean;
121
+ /** Label below the value */
122
+ label?: string;
123
+ /** Smaller sub-label */
124
+ sublabel?: string;
125
+ /** Show percentage in center */
126
+ showValue?: boolean;
127
+ /** Custom value display function */
128
+ formatValue?: (v: number, pct: number) => string;
129
+ /** Entry animation */
130
+ animate?: boolean;
131
+ /** Background track color (CSS color or empty) */
132
+ trackColor?: string;
133
+ /** Stroke cap style */
134
+ lineCap?: StrokeLineCap;
135
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Default chart color palette — resolves from CSS variables when possible.
3
+ * Produces vibrant, consistent colors that work in both light & dark modes.
4
+ */
5
+ export declare const CHART_COLORS: string[];
6
+ /** Fallback hex palette when CSS vars aren't available (e.g. canvas) */
7
+ export declare const CHART_COLORS_HEX: string[];
8
+ /** Resolve a semantic color name to a CSS variable */
9
+ export declare function resolveColor(color: string): string;
10
+ /** Get color by index from palette (cycles) */
11
+ export declare function getColor(colors: string[], index: number): string;
12
+ /** Format large numbers: 1200 -> 1.2k */
13
+ export declare function formatNumber(n: number): string;
14
+ /** Clamp a value between min and max */
15
+ export declare function clamp(n: number, min: number, max: number): number;
16
+ /** Linearly interpolate */
17
+ export declare function lerp(a: number, b: number, t: number): number;
18
+ /**
19
+ * Generate a smooth cubic bezier SVG path from a series of [x,y] points.
20
+ * Uses Catmull-Rom to bezier conversion for a natural curve.
21
+ */
22
+ export declare function smoothPath(points: [number, number][]): string;
23
+ /** Generate a straight-line SVG path from a series of [x,y] points */
24
+ export declare function linearPath(points: [number, number][]): string;
25
+ /**
26
+ * Build an SVG arc path for pie/donut slices.
27
+ * @param cx Center X
28
+ * @param cy Center Y
29
+ * @param r Outer radius
30
+ * @param startAngle Degrees
31
+ * @param endAngle Degrees
32
+ * @param innerR Inner radius (donut; 0 = filled pie)
33
+ */
34
+ export declare function arcPath(cx: number, cy: number, r: number, startAngle: number, endAngle: number, innerR?: number): string;
35
+ /** Nice Y-axis tick values for a given data range */
36
+ export declare function niceYTicks(min: number, max: number, count?: number): number[];
37
+ /** Ease-out cubic */
38
+ export declare function easeOutCubic(t: number): number;
39
+ /** Animate from 0→1 using rAF, calling onProgress each frame */
40
+ export declare function animateProgress(duration: number, onProgress: (t: number) => void, onDone?: () => void): () => void;
@@ -1,4 +1,4 @@
1
- import { defineComponent as S, computed as x, ref as T, openBlock as t, createElementBlock as a, normalizeClass as l, createVNode as f, createCommentVNode as i, createElementVNode as d, toDisplayString as u, unref as B, createBlock as E, withModifiers as C } from "vue";
1
+ import { defineComponent as S, computed as x, ref as T, openBlock as t, createElementBlock as i, normalizeClass as l, createVNode as f, createCommentVNode as a, createElementVNode as d, toDisplayString as u, unref as B, createBlock as E, withModifiers as C } from "vue";
2
2
  import D from "../Avatar.vue.js";
3
3
  import g from "../Button.vue.js";
4
4
  import I from "../AttachmentsList/AttachmentsList.vue.js";
@@ -53,16 +53,16 @@ const z = {
53
53
  }, k = () => {
54
54
  n.value = !1, r && (clearTimeout(r), r = null);
55
55
  };
56
- return (m, o) => (t(), a("div", {
56
+ return (m, o) => (t(), i("div", {
57
57
  class: l(["flex w-full min-w-0 gap-3 group", e.isSender ? "flex-row-reverse" : "flex-row"])
58
58
  }, [
59
- e.showAvatar ? (t(), a("div", z, [
59
+ e.showAvatar ? (t(), i("div", z, [
60
60
  f(D, {
61
61
  src: e.message.avatar,
62
62
  alt: e.message.senderName,
63
63
  size: "sm"
64
64
  }, null, 8, ["src", "alt"])
65
- ])) : i("", !0),
65
+ ])) : a("", !0),
66
66
  d("div", {
67
67
  class: l(["flex flex-col min-w-0 overflow-hidden max-w-[85%]", e.isSender ? "items-end" : "items-start"])
68
68
  }, [
@@ -74,9 +74,9 @@ const z = {
74
74
  e.isSender ? "bg-primary text-primary-foreground rounded-br-sm" : "bg-muted text-foreground rounded-bl-sm"
75
75
  ]])
76
76
  }, [
77
- e.showUserInfo && e.message.senderName && !e.isSender ? (t(), a("div", A, u(e.message.senderName), 1)) : i("", !0),
78
- e.message.text ? (t(), a("p", N, u(e.message.text), 1)) : i("", !0),
79
- e.message.attachments && e.message.attachments.length > 0 ? (t(), a("div", {
77
+ e.showUserInfo && e.message.senderName && !e.isSender ? (t(), i("div", A, u(e.message.senderName), 1)) : a("", !0),
78
+ e.message.text ? (t(), i("p", N, u(e.message.text), 1)) : a("", !0),
79
+ e.message.attachments && e.message.attachments.length > 0 ? (t(), i("div", {
80
80
  key: 2,
81
81
  class: l({ "mt-2": e.message.text || e.showUserInfo && !e.isSender })
82
82
  }, [
@@ -89,27 +89,27 @@ const z = {
89
89
  "click-to-preview": !0,
90
90
  "show-download-in-list": !1
91
91
  }, null, 8, ["attachments"])
92
- ], 2)) : i("", !0),
93
- e.showTimestamp && (e.message.timestamp || e.message.isEdited) ? (t(), a("div", {
92
+ ], 2)) : a("", !0),
93
+ e.showTimestamp && (e.message.timestamp || e.message.isEdited) ? (t(), i("div", {
94
94
  key: 3,
95
95
  class: l(["mt-1 flex items-center gap-1", e.isSender ? "justify-end" : "justify-start"])
96
96
  }, [
97
- e.message.isEdited && e.showEditedStatus !== !1 ? (t(), a("span", {
97
+ e.message.isEdited && e.showEditedStatus !== !1 ? (t(), i("span", {
98
98
  key: 0,
99
99
  class: l(["text-[10px] opacity-60", e.isSender ? "text-primary-foreground" : "text-muted-foreground"])
100
- }, u(y.value), 3)) : i("", !0),
101
- e.message.isEdited && e.showEditedStatus !== !1 && e.message.timestamp ? (t(), a("span", {
100
+ }, u(y.value), 3)) : a("", !0),
101
+ e.message.isEdited && e.showEditedStatus !== !1 && e.message.timestamp ? (t(), i("span", {
102
102
  key: 1,
103
103
  class: l(["text-[10px] opacity-40", e.isSender ? "text-primary-foreground" : "text-muted-foreground"])
104
- }, " · ", 2)) : i("", !0),
105
- e.message.timestamp ? (t(), a("span", {
104
+ }, " · ", 2)) : a("", !0),
105
+ e.message.timestamp ? (t(), i("span", {
106
106
  key: 2,
107
107
  class: l(["text-[10px] opacity-60 tabular-nums", e.isSender ? "text-primary-foreground" : "text-muted-foreground"])
108
- }, u(h.value), 3)) : i("", !0)
109
- ], 2)) : i("", !0)
108
+ }, u(h.value), 3)) : a("", !0)
109
+ ], 2)) : a("", !0)
110
110
  ], 2),
111
111
  d("div", {
112
- class: l(["absolute top-1/2 -translate-y-1/2 opacity-0 group-hover/bubble:opacity-100 focus-within:opacity-100 transition-opacity flex gap-0 pointer-events-none group-hover/bubble:pointer-events-auto focus-within:pointer-events-auto z-10", e.isSender ? "right-full pr-1" : "left-full pl-1"])
112
+ class: l(["opacity-0 group-hover/bubble:opacity-100 focus-within:opacity-100 transition-opacity flex gap-0 pointer-events-none group-hover/bubble:pointer-events-auto focus-within:pointer-events-auto z-10", e.isSender ? "right-full pr-1" : "left-full pl-1"])
113
113
  }, [
114
114
  (e.isSender || e.allowEditAll) && e.message.text?.trim() ? (t(), E(g, {
115
115
  key: 0,
@@ -120,8 +120,8 @@ const z = {
120
120
  class: "text-muted-foreground hover:text-foreground h-7 w-7",
121
121
  onClick: o[0] || (o[0] = ($) => c("edit", e.message)),
122
122
  "aria-label": "Edit message"
123
- })) : i("", !0),
124
- e.isSender || e.allowDeleteAll ? (t(), a("div", j, [
123
+ })) : a("", !0),
124
+ e.isSender || e.allowDeleteAll ? (t(), i("div", j, [
125
125
  f(g, {
126
126
  variant: "ghost",
127
127
  size: "xs",
@@ -131,7 +131,7 @@ const z = {
131
131
  onClick: b,
132
132
  "aria-label": n.value ? "Confirm delete" : "Delete message"
133
133
  }, null, 8, ["icon", "aria-label"]),
134
- n.value ? (t(), a("button", {
134
+ n.value ? (t(), i("button", {
135
135
  key: 0,
136
136
  class: "absolute -top-1.5 -right-1.5 w-3.5 h-3.5 rounded-full bg-muted border border-border flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors",
137
137
  onClick: C(k, ["stop"]),
@@ -160,8 +160,8 @@ const z = {
160
160
  y2: "18"
161
161
  })
162
162
  ], -1)
163
- ])])) : i("", !0)
164
- ])) : i("", !0)
163
+ ])])) : a("", !0)
164
+ ])) : a("", !0)
165
165
  ], 2)
166
166
  ], 2)
167
167
  ], 2)
@@ -1,11 +1,11 @@
1
- import { defineComponent as v, computed as s, openBlock as l, createElementBlock as f, createElementVNode as g, normalizeClass as i, createVNode as w, Transition as C, withCtx as h, createBlock as o, createCommentVNode as r, createTextVNode as V, toDisplayString as z } from "vue";
2
- import p from "./Icon.vue.js";
3
- import B from "./Label.vue.js";
4
- import { $t as N } from "../utils/i18n.js";
5
- const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-state", "disabled", "id"], I = {
1
+ import { defineComponent as v, computed as n, openBlock as s, createElementBlock as f, createElementVNode as g, normalizeClass as o, createVNode as w, Transition as C, withCtx as h, createBlock as c, createCommentVNode as r, createTextVNode as V, toDisplayString as z } from "vue";
2
+ import b from "./Icon.vue.js";
3
+ import $ from "./Label.vue.js";
4
+ import { $t as B } from "../utils/i18n.js";
5
+ const N = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-state", "disabled", "id", "data-testid"], I = {
6
6
  key: 0,
7
7
  class: "flex items-center justify-center text-current w-full h-full"
8
- }, L = /* @__PURE__ */ v({
8
+ }, q = /* @__PURE__ */ v({
9
9
  __name: "CheckBox",
10
10
  props: {
11
11
  modelValue: { type: Boolean, default: !1 },
@@ -20,24 +20,24 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
20
20
  rounded: {}
21
21
  },
22
22
  emits: ["update:modelValue", "update:checked"],
23
- setup(t, { emit: b }) {
24
- const e = t, c = b, u = s(() => e.labelI18n ? N(e.labelI18n) : e.label), m = () => {
23
+ setup(t, { emit: k }) {
24
+ const e = t, u = k, d = n(() => e.labelI18n ? B(e.labelI18n) : e.label), m = () => {
25
25
  if (e.disabled) return;
26
- const d = !(e.modelValue || e.checked);
27
- c("update:modelValue", d), c("update:checked", d);
28
- }, k = {
26
+ const l = !(e.modelValue || e.checked);
27
+ u("update:modelValue", l), u("update:checked", l);
28
+ }, p = {
29
29
  xs: "h-3.5 w-3.5",
30
30
  sm: "h-4 w-4",
31
31
  md: "h-4.5 w-4.5",
32
32
  lg: "h-5 w-5",
33
33
  xl: "h-5.5 w-5.5"
34
- }, n = {
34
+ }, i = {
35
35
  xs: "h-2.5 w-2.5",
36
36
  sm: "h-3 w-3",
37
37
  md: "h-3.5 w-3.5",
38
38
  lg: "h-4 w-4",
39
39
  xl: "h-5 w-5"
40
- }, y = {
40
+ }, x = {
41
41
  none: "rounded-none",
42
42
  xs: "rounded-[3px]",
43
43
  sm: "rounded-[4px]",
@@ -46,34 +46,35 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
46
46
  xl: "rounded-lg",
47
47
  "2xl": "rounded-xl",
48
48
  full: "rounded-full"
49
- }, a = s(() => e.indeterminate ? "indeterminate" : e.modelValue || e.checked ? "checked" : "unchecked"), x = s(() => [
49
+ }, a = n(() => e.indeterminate ? "indeterminate" : e.modelValue || e.checked ? "checked" : "unchecked"), y = n(() => [
50
50
  "peer shrink-0 border transition-all duration-200 ease-in-out",
51
51
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
52
52
  "disabled:cursor-not-allowed disabled:opacity-50",
53
53
  "data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
54
54
  "data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground",
55
55
  "cursor-pointer bg-transparent",
56
- k[e.size],
57
- y[e.rounded || e.size],
56
+ p[e.size],
57
+ x[e.rounded || e.size],
58
58
  a.value === "checked" ? "border-primary!" : "border-gray-400!",
59
59
  e.class
60
60
  ].join(" "));
61
- return s(() => [
61
+ return n(() => [
62
62
  "transition-transform duration-200",
63
63
  a.value === "checked" || a.value === "indeterminate" ? "scale-100" : "scale-0",
64
- n[e.size]
65
- ].join(" ")), (d, $) => (l(), f("div", _, [
64
+ i[e.size]
65
+ ].join(" ")), (l, S) => (s(), f("div", N, [
66
66
  g("button", {
67
67
  type: "button",
68
68
  role: "checkbox",
69
69
  "aria-checked": t.indeterminate ? "mixed" : t.modelValue,
70
70
  "data-state": a.value,
71
71
  disabled: t.disabled,
72
- class: i(x.value),
72
+ class: o(y.value),
73
73
  id: t.id,
74
+ "data-testid": l.$attrs["data-testid"] || (l.$attrs.name ? `checkbox-${l.$attrs.name}` : t.id ? `checkbox-${t.id}` : d.value ? `checkbox-${d.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "checkbox"),
74
75
  onClick: m
75
76
  }, [
76
- a.value === "checked" || a.value === "indeterminate" ? (l(), f("div", I, [
77
+ a.value === "checked" || a.value === "indeterminate" ? (s(), f("div", I, [
77
78
  w(C, {
78
79
  "enter-active-class": "transition duration-200 ease-out",
79
80
  "enter-from-class": "scale-50 opacity-0",
@@ -83,28 +84,28 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
83
84
  "leave-to-class": "scale-50 opacity-0"
84
85
  }, {
85
86
  default: h(() => [
86
- a.value === "checked" ? (l(), o(p, {
87
+ a.value === "checked" ? (s(), c(b, {
87
88
  key: 0,
88
89
  icon: "lucide:check",
89
- class: i(n[t.size])
90
- }, null, 8, ["class"])) : a.value === "indeterminate" ? (l(), o(p, {
90
+ class: o(i[t.size])
91
+ }, null, 8, ["class"])) : a.value === "indeterminate" ? (s(), c(b, {
91
92
  key: 1,
92
93
  icon: "lucide:minus",
93
- class: i(n[t.size])
94
+ class: o(i[t.size])
94
95
  }, null, 8, ["class"])) : r("", !0)
95
96
  ]),
96
97
  _: 1
97
98
  })
98
99
  ])) : r("", !0)
99
100
  ], 10, j),
100
- u.value ? (l(), o(B, {
101
+ d.value ? (s(), c($, {
101
102
  key: 0,
102
103
  for: t.id,
103
104
  class: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",
104
105
  onClick: m
105
106
  }, {
106
107
  default: h(() => [
107
- V(z(u.value), 1)
108
+ V(z(d.value), 1)
108
109
  ]),
109
110
  _: 1
110
111
  }, 8, ["for"])) : r("", !0)
@@ -112,5 +113,5 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
112
113
  }
113
114
  });
114
115
  export {
115
- L as default
116
+ q as default
116
117
  };
@@ -1,5 +1,5 @@
1
- import o from "./ColorIro.vue2.js";
2
- /* empty css */
1
+ import o from "./ColorIro.vue.js";
2
+ /* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -6,8 +6,8 @@ import O from "../Input.vue.js";
6
6
  import "../../core/config.js";
7
7
  /* empty css */
8
8
  import y from "../Button.vue.js";
9
- import E from "./ColorIro.vue2.js";
10
- /* empty css */
9
+ import E from "./ColorIro.vue.js";
10
+ /* empty css */
11
11
  import { useEyeDropper as P } from "@vueuse/core";
12
12
  const I = {
13
13
  key: 0,
@@ -0,0 +1,41 @@
1
+ import { ChatAttachment } from '../Chat';
2
+ import { CommentAuthor } from './types';
3
+ type __VLS_Props = {
4
+ /** Pre-fill the textarea (e.g. for editing) */
5
+ initialText?: string;
6
+ /**
7
+ * 'root' = main discussion input (with background and border)
8
+ * 'reply' = inline reply (indented, no big background, smaller avatar)
9
+ * 'edit' = inline edit (no avatar, shows editing header)
10
+ */
11
+ variant?: 'root' | 'reply' | 'edit';
12
+ placeholder?: string;
13
+ editingText?: string;
14
+ cancelEditText?: string;
15
+ cancelText?: string;
16
+ /** The currently logged in user to display their avatar */
17
+ currentUser?: CommentAuthor | null;
18
+ /** Controls visibility of the file attachment button */
19
+ allowFileUpload?: boolean;
20
+ /** Remote folder ID for uploaded files */
21
+ folderId?: string;
22
+ /** Max file size in bytes */
23
+ maxFileSize?: number;
24
+ /** Attempt to focus the input on mount */
25
+ autofocus?: boolean;
26
+ };
27
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
28
+ submit: (text: string, attachments?: ChatAttachment[]) => any;
29
+ cancel: () => any;
30
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
31
+ onSubmit?: (text: string, attachments?: ChatAttachment[]) => any;
32
+ onCancel?: () => any;
33
+ }>, {
34
+ variant: "root" | "reply" | "edit";
35
+ allowFileUpload: boolean;
36
+ initialText: string;
37
+ currentUser: CommentAuthor | null;
38
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
39
+ textareaRef: HTMLTextAreaElement;
40
+ }, HTMLDivElement>;
41
+ export default _default;