@bridge-ui/vue 0.17.2 → 0.18.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 (151) hide show
  1. package/ai/skills/bridge-ui-components/SKILL.md +33 -33
  2. package/dist/Components/CalendarMonth/composables/useCalendarMonth.d.ts +1 -1
  3. package/dist/Components/CalendarRange/composables/useCalendarRange.js +1 -1
  4. package/dist/Components/ChartAxis/ChartAxis.vue_vue_type_script_setup_true_lang.js +1 -0
  5. package/dist/Components/ChartAxis/chartAxis.types.d.ts +17 -7
  6. package/dist/Components/ChartAxis/composables/useChartAxis.d.ts +2 -2
  7. package/dist/Components/ChartAxis/composables/useChartAxis.js +15 -10
  8. package/dist/Components/ChartBar/ChartBar.js +5 -0
  9. package/dist/Components/ChartBar/ChartBar.vue.d.ts +16 -0
  10. package/dist/Components/ChartBar/ChartBar.vue_vue_type_script_setup_true_lang.js +59 -0
  11. package/dist/Components/ChartBar/chartBar.types.d.ts +56 -0
  12. package/dist/Components/ChartBar/composables/useChartBar.d.ts +26 -0
  13. package/dist/Components/ChartBar/composables/useChartBar.js +13 -0
  14. package/dist/Components/ChartBar/index.d.ts +4 -0
  15. package/dist/Components/ChartBar/index.js +4 -0
  16. package/dist/Components/ChartBarSeries/ChartBarSeries.js +5 -0
  17. package/dist/Components/ChartBarSeries/ChartBarSeries.vue.d.ts +6 -0
  18. package/dist/Components/ChartBarSeries/ChartBarSeries.vue_vue_type_script_setup_true_lang.js +25 -0
  19. package/dist/Components/ChartBarSeries/chartBarSeries.types.d.ts +45 -0
  20. package/dist/Components/ChartBarSeries/composables/useChartBarSeries.d.ts +5 -0
  21. package/dist/Components/ChartBarSeries/composables/useChartBarSeries.js +20 -0
  22. package/dist/Components/ChartBarSeries/index.d.ts +3 -0
  23. package/dist/Components/ChartBarSeries/index.js +3 -0
  24. package/dist/Components/ChartFunnel/ChartFunnel.js +5 -0
  25. package/dist/Components/ChartFunnel/ChartFunnel.vue.d.ts +16 -0
  26. package/dist/Components/ChartFunnel/ChartFunnel.vue_vue_type_script_setup_true_lang.js +59 -0
  27. package/dist/Components/ChartFunnel/chartFunnel.types.d.ts +54 -0
  28. package/dist/Components/ChartFunnel/composables/useChartFunnel.d.ts +29 -0
  29. package/dist/Components/ChartFunnel/composables/useChartFunnel.js +68 -0
  30. package/dist/Components/ChartFunnel/index.d.ts +4 -0
  31. package/dist/Components/ChartFunnel/index.js +4 -0
  32. package/dist/Components/ChartLegend/ChartLegend.vue.d.ts +2 -0
  33. package/dist/Components/ChartLegend/ChartLegend.vue_vue_type_script_setup_true_lang.js +33 -13
  34. package/dist/Components/ChartLegend/chartLegend.types.d.ts +41 -5
  35. package/dist/Components/ChartLegend/composables/useChartLegend.d.ts +9 -5
  36. package/dist/Components/ChartLegend/composables/useChartLegend.js +88 -54
  37. package/dist/Components/ChartLine/ChartLine.js +5 -0
  38. package/dist/Components/ChartLine/ChartLine.vue.d.ts +20 -0
  39. package/dist/Components/ChartLine/ChartLine.vue_vue_type_script_setup_true_lang.js +76 -0
  40. package/dist/Components/ChartLine/chartLine.types.d.ts +72 -0
  41. package/dist/Components/ChartLine/composables/useChartLine.d.ts +26 -0
  42. package/dist/Components/ChartLine/composables/useChartLine.js +13 -0
  43. package/dist/Components/ChartLine/index.d.ts +4 -0
  44. package/dist/Components/ChartLine/index.js +4 -0
  45. package/dist/Components/ChartLineSeries/ChartLineSeries.js +5 -0
  46. package/dist/Components/ChartLineSeries/ChartLineSeries.vue.d.ts +10 -0
  47. package/dist/Components/ChartLineSeries/ChartLineSeries.vue_vue_type_script_setup_true_lang.js +42 -0
  48. package/dist/Components/ChartLineSeries/chartLineSeries.types.d.ts +75 -0
  49. package/dist/Components/ChartLineSeries/composables/useChartLineSeries.d.ts +5 -0
  50. package/dist/Components/ChartLineSeries/composables/useChartLineSeries.js +25 -0
  51. package/dist/Components/ChartLineSeries/index.d.ts +3 -0
  52. package/dist/Components/ChartLineSeries/index.js +3 -0
  53. package/dist/Components/ChartPie/ChartPie.js +5 -0
  54. package/dist/Components/ChartPie/ChartPie.vue.d.ts +15 -0
  55. package/dist/Components/ChartPie/ChartPie.vue_vue_type_script_setup_true_lang.js +73 -0
  56. package/dist/Components/ChartPie/chartPie.types.d.ts +73 -0
  57. package/dist/Components/ChartPie/composables/useChartPie.d.ts +30 -0
  58. package/dist/Components/ChartPie/composables/useChartPie.js +71 -0
  59. package/dist/Components/ChartPie/index.d.ts +4 -0
  60. package/dist/Components/ChartPie/index.js +4 -0
  61. package/dist/Components/ChartScatter/ChartScatter.js +5 -0
  62. package/dist/Components/{Chart/Chart.vue.d.ts → ChartScatter/ChartScatter.vue.d.ts} +3 -2
  63. package/dist/Components/ChartScatter/ChartScatter.vue_vue_type_script_setup_true_lang.js +49 -0
  64. package/dist/Components/ChartScatter/chartScatter.types.d.ts +23 -0
  65. package/dist/Components/ChartScatter/composables/useChartScatter.d.ts +29 -0
  66. package/dist/Components/ChartScatter/composables/useChartScatter.js +103 -0
  67. package/dist/Components/ChartScatter/index.d.ts +4 -0
  68. package/dist/Components/ChartScatter/index.js +4 -0
  69. package/dist/Components/ChartScatterSeries/ChartScatterSeries.js +5 -0
  70. package/dist/Components/ChartScatterSeries/ChartScatterSeries.vue.d.ts +4 -0
  71. package/dist/Components/ChartScatterSeries/ChartScatterSeries.vue_vue_type_script_setup_true_lang.js +21 -0
  72. package/dist/Components/ChartScatterSeries/chartScatterSeries.types.d.ts +38 -0
  73. package/dist/Components/ChartScatterSeries/composables/useChartScatterSeries.d.ts +4 -0
  74. package/dist/Components/ChartScatterSeries/composables/useChartScatterSeries.js +18 -0
  75. package/dist/Components/ChartScatterSeries/index.d.ts +3 -0
  76. package/dist/Components/ChartScatterSeries/index.js +3 -0
  77. package/dist/Components/ChartTooltip/ChartTooltip.vue_vue_type_script_setup_true_lang.js +18 -10
  78. package/dist/Components/ChartTooltip/chartTooltip.types.d.ts +24 -9
  79. package/dist/Components/ChartTooltip/composables/useChartTooltip.d.ts +3 -1
  80. package/dist/Components/ChartTooltip/composables/useChartTooltip.js +79 -65
  81. package/dist/Components/ColorPicker/composables/useColorPicker.js +1 -1
  82. package/dist/Components/DatePicker/composables/useDatePicker.js +1 -1
  83. package/dist/Components/DateRangePicker/composables/useDateRangePicker.js +1 -1
  84. package/dist/Components/DateTimePicker/composables/useDateTimePicker.js +1 -1
  85. package/dist/Components/DateTimeRangePicker/composables/useDateTimeRangePicker.js +1 -1
  86. package/dist/Components/FormField/composables/useFormField.js +3 -1
  87. package/dist/Components/OtpField/composables/useOtpField.js +90 -89
  88. package/dist/Components/ResizablePanel/composables/useResizablePanel.d.ts +1 -1
  89. package/dist/Components/Spinner/composables/useSpinner.d.ts +1 -1
  90. package/dist/Components/TimePicker/composables/useTimePicker.js +1 -1
  91. package/dist/Components/TimeRangePicker/composables/useTimeRangePicker.js +1 -1
  92. package/dist/Utils/Charts/ChartFrame.js +5 -0
  93. package/dist/Utils/Charts/ChartFrame.vue.d.ts +24 -0
  94. package/dist/Utils/Charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +41 -0
  95. package/dist/{Components/Chart → Utils/Charts}/chart.types.d.ts +16 -18
  96. package/dist/Utils/Charts/chartInjectionKey.d.ts +151 -0
  97. package/dist/{Components/Chart → Utils/Charts}/chartInjectionKey.js +2 -2
  98. package/dist/Utils/Charts/echarts/bar.d.ts +6 -0
  99. package/dist/Utils/Charts/echarts/bar.js +22 -0
  100. package/dist/Utils/Charts/echarts/cartesian.d.ts +15 -0
  101. package/dist/Utils/Charts/echarts/cartesian.js +255 -0
  102. package/dist/Utils/Charts/echarts/funnel.d.ts +15 -0
  103. package/dist/Utils/Charts/echarts/funnel.js +79 -0
  104. package/dist/Utils/Charts/echarts/line.d.ts +5 -0
  105. package/dist/Utils/Charts/echarts/line.js +19 -0
  106. package/dist/Utils/Charts/echarts/part.d.ts +19 -0
  107. package/dist/Utils/Charts/echarts/part.js +45 -0
  108. package/dist/Utils/Charts/echarts/pie.d.ts +14 -0
  109. package/dist/Utils/Charts/echarts/pie.js +75 -0
  110. package/dist/Utils/Charts/echarts/plot.d.ts +44 -0
  111. package/dist/Utils/Charts/echarts/plot.js +52 -0
  112. package/dist/Utils/Charts/echarts/scatter.d.ts +14 -0
  113. package/dist/Utils/Charts/echarts/scatter.js +152 -0
  114. package/dist/Utils/Charts/index.d.ts +6 -0
  115. package/dist/Utils/Charts/index.js +6 -0
  116. package/dist/Utils/Charts/useChartCartesian.d.ts +57 -0
  117. package/dist/Utils/Charts/useChartCartesian.js +155 -0
  118. package/dist/Utils/Charts/useChartPart.d.ts +45 -0
  119. package/dist/Utils/Charts/useChartPart.js +97 -0
  120. package/dist/Utils/Charts/useChartRegistry.d.ts +13 -0
  121. package/dist/Utils/Charts/useChartRegistry.js +40 -0
  122. package/dist/Utils/Charts/useChartRoot.d.ts +156 -0
  123. package/dist/Utils/Charts/useChartRoot.js +342 -0
  124. package/dist/Utils/Charts/useChartSeries.d.ts +10 -0
  125. package/dist/Utils/Charts/useChartSeries.js +22 -0
  126. package/dist/augments.d.ts +23 -7
  127. package/docs/README.md +6 -1
  128. package/docs/components/Chart.md +114 -154
  129. package/docs/components/ChartBar.md +137 -0
  130. package/docs/components/ChartFunnel.md +62 -0
  131. package/docs/components/ChartLine.md +151 -0
  132. package/docs/components/ChartPie.md +115 -0
  133. package/docs/components/ChartScatter.md +84 -0
  134. package/package.json +2 -2
  135. package/dist/Components/Chart/Chart.js +0 -5
  136. package/dist/Components/Chart/Chart.vue_vue_type_script_setup_true_lang.js +0 -52
  137. package/dist/Components/Chart/chartInjectionKey.d.ts +0 -94
  138. package/dist/Components/Chart/composables/useChart.d.ts +0 -40
  139. package/dist/Components/Chart/composables/useChart.js +0 -346
  140. package/dist/Components/Chart/echartsChart.d.ts +0 -14
  141. package/dist/Components/Chart/echartsChart.js +0 -199
  142. package/dist/Components/Chart/index.d.ts +0 -4
  143. package/dist/Components/Chart/index.js +0 -4
  144. package/dist/Components/ChartSeries/ChartSeries.js +0 -5
  145. package/dist/Components/ChartSeries/ChartSeries.vue.d.ts +0 -4
  146. package/dist/Components/ChartSeries/ChartSeries.vue_vue_type_script_setup_true_lang.js +0 -24
  147. package/dist/Components/ChartSeries/chartSeries.types.d.ts +0 -37
  148. package/dist/Components/ChartSeries/composables/useChartSeries.d.ts +0 -10
  149. package/dist/Components/ChartSeries/composables/useChartSeries.js +0 -29
  150. package/dist/Components/ChartSeries/index.d.ts +0 -3
  151. package/dist/Components/ChartSeries/index.js +0 -3
@@ -74,7 +74,7 @@ function b(b, x, S, C) {
74
74
  }, G = a(() => {
75
75
  let e = d(h, O.value.rounded ?? "md");
76
76
  return t(A.value?.root, j.value, g({
77
- "flex flex-col overflow-hidden bg-white shadow-lg dark:bg-dark-900": !0,
77
+ "flex flex-col overflow-hidden bg-white shadow-lg dark:bg-dark-800": !0,
78
78
  "w-full": O.value.fill,
79
79
  "w-fit": !O.value.fill,
80
80
  [e]: !0,
@@ -131,6 +131,7 @@ function b(b, x, S = {}) {
131
131
  required: M.value.required,
132
132
  root: h({
133
133
  [Q.value?.label ?? ""]: L.value,
134
+ [Q.value?.labelDisabled ?? ""]: L.value && P.value && !N.value,
134
135
  [M.value.label ?? ""]: !0
135
136
  })
136
137
  }
@@ -144,6 +145,7 @@ function b(b, x, S = {}) {
144
145
  size: D.value.size,
145
146
  classes: { root: h({
146
147
  [Q.value?.corner ?? ""]: L.value,
148
+ [Q.value?.cornerDisabled ?? ""]: L.value && P.value && !N.value,
147
149
  [M.value.corner ?? ""]: !0
148
150
  }) }
149
151
  })), pe = o(() => {
@@ -202,11 +204,11 @@ function b(b, x, S = {}) {
202
204
  "group/field relative flex flex-row items-stretch overflow-hidden": R.value,
203
205
  "group/field relative flex justify-start gap-x-2 items-stretch": !R.value,
204
206
  "transition-all ease-in-out duration-150 outline-none": !0,
205
- "bg-dark-100 dark:bg-dark-800": P.value && !N.value,
206
207
  [X.value?.container ?? ""]: !B.value,
207
208
  [X.value?.containerTextareaLikeInput ?? ""]: V.value,
208
209
  [X.value?.containerTextarea ?? ""]: B.value && !V.value,
209
210
  [Q.value?.container ?? ""]: !0,
211
+ [Q.value?.containerDisabled ?? ""]: P.value && !N.value,
210
212
  [ne.value ?? ""]: !z.value,
211
213
  [ae.value ?? ""]: !0,
212
214
  [re.value ?? ""]: !0,
@@ -2,11 +2,11 @@ import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistr
2
2
  import { baseFieldBridgeKeys as r, useBaseField as i } from "../../BaseField/composables/useBaseField.js";
3
3
  import { computed as a, nextTick as o, onMounted as ee, ref as s, toValue as c, useAttrs as te } from "vue";
4
4
  import { get as l, isUndefined as ne, omit as re, pick as ie } from "es-toolkit/compat";
5
- import { applyOtpInput as u, applyOtpKeyNavigation as d, applyOtpPaste as f, isOtpComplete as p, joinOtpDigits as m, normalizeOtpValue as h, resolveOtpLength as g, splitOtpValue as _ } from "@bridge-ui/core/Domain";
6
- import { otpFieldColorProps as v, otpFieldRoundedProps as y, otpFieldSizeProps as b, otpFieldVariantProps as x } from "@bridge-ui/core/Tokens";
7
- import { cn as S, getColorToken as ae, mergeBridgeUILayeredClasses as C, splitComponentProps as oe } from "@bridge-ui/core/Utils";
5
+ import { applyOtpInput as ae, applyOtpKeyNavigation as u, applyOtpPaste as d, isOtpComplete as f, joinOtpDigits as p, normalizeOtpValue as m, resolveOtpLength as h, splitOtpValue as g } from "@bridge-ui/core/Domain";
6
+ import { otpFieldColorProps as _, otpFieldRoundedProps as v, otpFieldSizeProps as y, otpFieldVariantProps as b } from "@bridge-ui/core/Tokens";
7
+ import { cn as x, getColorToken as oe, mergeBridgeUILayeredClasses as S, splitComponentProps as se } from "@bridge-ui/core/Utils";
8
8
  //#region src/Components/OtpField/composables/useOtpField.ts
9
- var w = [
9
+ var C = [
10
10
  "mask",
11
11
  "type",
12
12
  "color",
@@ -18,12 +18,12 @@ var w = [
18
18
  "defaultValue",
19
19
  ...r
20
20
  ];
21
- function se(e) {
21
+ function ce(e) {
22
22
  if (!e) return;
23
23
  let { pin: t, input: n, ...r } = e;
24
24
  return r;
25
25
  }
26
- function T(T, E, D = {}, O = {
26
+ function w(w, T, E = {}, D = {
27
27
  length: 6,
28
28
  size: "md",
29
29
  rounded: "md",
@@ -31,139 +31,140 @@ function T(T, E, D = {}, O = {
31
31
  color: "primary",
32
32
  variant: "outline"
33
33
  }) {
34
- let k = te(), A = s([]), j = a(() => oe({
35
- bridgeKeys: w,
34
+ let O = te(), k = s([]), A = a(() => se({
35
+ bridgeKeys: C,
36
36
  props: {
37
- ...k,
38
- ...c(T)
37
+ ...O,
38
+ ...c(w)
39
39
  }
40
- })), { merged: M, entry: N } = t({
41
- libDefaults: O,
40
+ })), { merged: j, entry: M } = t({
41
+ libDefaults: D,
42
42
  chrome: "BaseField",
43
43
  componentName: "OtpField",
44
- props: () => j.value.componentProps
45
- }), P = n({
46
- entry: N,
47
- props: () => j.value.componentProps
48
- }), F = a(() => M.value.customProps), I = a(() => se(M.value.customProps)), L = a(() => ({
49
- ...ie(j.value.componentProps, r),
50
- customProps: I.value,
51
- id: j.value.inheritedAttrs.id,
52
- class: j.value.inheritedAttrs.class,
53
- ...re(j.value.inheritedAttrs, ["class", "id"])
54
- })), R = i(() => L.value, {
44
+ props: () => A.value.componentProps
45
+ }), N = n({
46
+ entry: M,
47
+ props: () => A.value.componentProps
48
+ }), P = a(() => j.value.customProps), F = a(() => ce(j.value.customProps)), I = a(() => ({
49
+ ...ie(A.value.componentProps, r),
50
+ customProps: F.value,
51
+ id: A.value.inheritedAttrs.id,
52
+ class: A.value.inheritedAttrs.class,
53
+ ...re(A.value.inheritedAttrs, ["class", "id"])
54
+ })), L = i(() => I.value, {
55
55
  size: "md",
56
56
  hideErrorMessage: !1
57
57
  }, {
58
58
  componentName: "OtpField",
59
59
  labelHtmlFor: (e) => `${e}-0`
60
- }), { controlId: z, isDisabled: B, isReadonly: V, invalidated: H, ariaDescribedBy: U } = R, W = a(() => g(M.value.length)), G = a(() => M.value.type ?? "numeric"), K = a(() => M.value.variant ?? "outline"), q = a(() => K.value === "underlined"), J = a(() => !ne(E.value)), Y = s(h(c(T).defaultValue, W.value, G.value)), ce = a(() => J.value ? h(E.value, W.value, G.value) : Y.value), X = a(() => _(ce.value, W.value));
60
+ }), { controlId: R, isDisabled: z, isReadonly: B, invalidated: V, ariaDescribedBy: H } = L, U = a(() => h(j.value.length)), W = a(() => j.value.type ?? "numeric"), G = a(() => j.value.variant ?? "outline"), K = a(() => G.value === "underlined"), q = a(() => !ne(T.value)), J = s(m(c(w).defaultValue, U.value, W.value)), le = a(() => q.value ? m(T.value, U.value, W.value) : J.value), Y = a(() => g(le.value, U.value));
61
61
  ee(() => {
62
- if (!M.value.autoFocus || B.value || V.value) return;
63
- let e = X.value.findIndex((e) => e === ""), t = e === -1 ? 0 : e;
64
- A.value[t]?.focus();
62
+ if (!j.value.autoFocus || z.value || B.value) return;
63
+ let e = Y.value.findIndex((e) => e === ""), t = e === -1 ? 0 : e;
64
+ k.value[t]?.focus();
65
65
  });
66
- let Z = (e, t) => {
67
- let n = m(e);
68
- J.value || (Y.value = n), E.value = n, D.onChange?.(n), p(n, W.value) && D.onComplete?.(n), t != null && o(() => {
69
- A.value[t]?.focus(), A.value[t]?.select();
66
+ let X = (e, t) => {
67
+ let n = p(e);
68
+ q.value || (J.value = n), T.value = n, E.onChange?.(n), f(n, U.value) && E.onComplete?.(n), t != null && o(() => {
69
+ k.value[t]?.focus(), k.value[t]?.select();
70
70
  });
71
- }, Q = a(() => {
72
- let e = C(b, N.value?.tokens?.size);
73
- return l(e, M.value.size ?? "md");
74
- }), $ = a(() => {
75
- let e = C(v, N.value?.tokens?.color);
76
- return ae({
71
+ }, Z = a(() => {
72
+ let e = S(y, M.value?.tokens?.size);
73
+ return l(e, j.value.size ?? "md");
74
+ }), Q = a(() => {
75
+ let e = S(_, M.value?.tokens?.color);
76
+ return oe({
77
77
  tokens: e,
78
- color: M.value.color,
79
- invalid: H.value
78
+ color: j.value.color,
79
+ invalid: V.value
80
80
  });
81
- }), le = a(() => {
82
- let e = C(y, N.value?.tokens?.rounded);
83
- return l(e, M.value.rounded ?? "md");
84
81
  }), ue = a(() => {
85
- let e = C(x, N.value?.tokens?.variant);
86
- return l(e, K.value);
82
+ let e = S(v, M.value?.tokens?.rounded);
83
+ return l(e, j.value.rounded ?? "md");
84
+ }), $ = a(() => {
85
+ let e = S(b, M.value?.tokens?.variant);
86
+ return l(e, G.value);
87
87
  });
88
88
  return {
89
- merged: M,
90
- digits: X,
91
- length: W,
92
- pinBind: (t) => e(F.value?.pin, {}, S({
89
+ merged: j,
90
+ digits: Y,
91
+ length: U,
92
+ pinBind: (t) => e(P.value?.pin, {}, x({
93
93
  "relative flex shrink-0 items-center justify-center overflow-hidden": !0,
94
- [Q.value?.pin ?? ""]: !0,
95
- [ue.value?.pin ?? ""]: !0,
96
- [le.value?.pin ?? ""]: !q.value,
97
- [$.value?.pin ?? ""]: !q.value,
98
- [$.value?.underlined ?? ""]: q.value,
99
- "bg-error-50 ring-error-500 dark:bg-error-700/10 dark:ring-error-600": H.value && !q.value,
100
- "border-error-500 dark:border-error-600": H.value && q.value,
101
- [P.value.pin ?? ""]: !0
94
+ [Z.value?.pin ?? ""]: !0,
95
+ [$.value?.pin ?? ""]: !0,
96
+ [$.value?.pinDisabled ?? ""]: z.value && !V.value,
97
+ [ue.value?.pin ?? ""]: !K.value,
98
+ [Q.value?.pin ?? ""]: !K.value,
99
+ [Q.value?.underlined ?? ""]: K.value,
100
+ "bg-error-50 ring-error-500 dark:bg-error-700/10 dark:ring-error-600": V.value && !K.value,
101
+ "border-error-500 dark:border-error-600": V.value && K.value,
102
+ [N.value.pin ?? ""]: !0
102
103
  })),
103
- pinsBind: a(() => e({}, {}, S({
104
+ pinsBind: a(() => e({}, {}, x({
104
105
  "flex flex-wrap items-center": !0,
105
- [R.sizeClasses.value?.group ?? ""]: !0
106
+ [L.sizeClasses.value?.group ?? ""]: !0
106
107
  }))),
107
- baseField: R,
108
+ baseField: L,
108
109
  inputBind: (t) => {
109
- let n = G.value === "numeric" ? "numeric" : "text";
110
+ let n = W.value === "numeric" ? "numeric" : "text";
110
111
  return e({
111
- ...F.value?.input,
112
+ ...P.value?.input,
112
113
  inputmode: n,
113
- maxlength: W.value,
114
- disabled: B.value,
115
- readOnly: V.value,
116
- value: X.value[t] ?? "",
117
- id: `${z.value}-${t}`,
118
- placeholder: M.value.placeholder,
119
- "aria-describedby": U.value,
120
- type: M.value.mask ? "password" : "text",
121
- "aria-invalid": H.value || void 0,
114
+ maxlength: U.value,
115
+ disabled: z.value,
116
+ readOnly: B.value,
117
+ value: Y.value[t] ?? "",
118
+ id: `${R.value}-${t}`,
119
+ placeholder: j.value.placeholder,
120
+ "aria-describedby": H.value,
121
+ type: j.value.mask ? "password" : "text",
122
+ "aria-invalid": V.value || void 0,
122
123
  autocomplete: t === 0 ? "one-time-code" : "off",
123
- "aria-label": `Digit ${t + 1} of ${W.value}`
124
- }, {}, S({
124
+ "aria-label": `Digit ${t + 1} of ${U.value}`
125
+ }, {}, x({
125
126
  "h-full w-full min-w-0 bg-transparent border-0 shadow-none text-center": !0,
126
127
  "text-dark-900 dark:text-dark-100 placeholder:text-dark-400": !0,
127
128
  "outline-none ring-0 focus:outline-none focus:ring-0": !0,
128
129
  "disabled:cursor-not-allowed": !0,
129
- [Q.value?.input ?? ""]: !0,
130
- [P.value.input ?? ""]: !0
130
+ [Z.value?.input ?? ""]: !0,
131
+ [N.value.input ?? ""]: !0
131
132
  }));
132
133
  },
133
134
  setPinRef: (e, t) => {
134
- A.value[e] = t;
135
+ k.value[e] = t;
135
136
  },
136
- inputType: G,
137
+ inputType: W,
137
138
  handlePinInput: (e, t) => {
138
- let n = t.target.value, r = u({
139
+ let n = t.target.value, r = ae({
139
140
  index: e,
140
141
  input: n,
141
- digits: X.value,
142
- type: G.value
142
+ digits: Y.value,
143
+ type: W.value
143
144
  });
144
- Z(r.digits, r.focusIndex);
145
+ X(r.digits, r.focusIndex);
145
146
  },
146
147
  handlePinFocus: (e) => {
147
- A.value[e]?.select();
148
+ k.value[e]?.select();
148
149
  },
149
150
  handlePinPaste: (e, t) => {
150
- let n = t.clipboardData?.getData("text") ?? "", r = f({
151
+ let n = t.clipboardData?.getData("text") ?? "", r = d({
151
152
  index: e,
152
153
  pasted: n,
153
- digits: X.value,
154
- type: G.value
154
+ digits: Y.value,
155
+ type: W.value
155
156
  });
156
- r.focusIndex == null && r.digits.every((e, t) => e === X.value[t]) || (t.preventDefault(), Z(r.digits, r.focusIndex));
157
+ r.focusIndex == null && r.digits.every((e, t) => e === Y.value[t]) || (t.preventDefault(), X(r.digits, r.focusIndex));
157
158
  },
158
159
  handlePinKeyDown: (e, t) => {
159
- let n = d({
160
+ let n = u({
160
161
  index: e,
161
162
  key: t.key,
162
- digits: X.value
163
+ digits: Y.value
163
164
  });
164
- n && (t.preventDefault(), Z(n.digits, n.focusIndex));
165
+ n && (t.preventDefault(), X(n.digits, n.focusIndex));
165
166
  }
166
167
  };
167
168
  }
168
169
  //#endregion
169
- export { w as otpFieldBridgeKeys, T as useOtpField };
170
+ export { C as otpFieldBridgeKeys, w as useOtpField };
@@ -13,7 +13,7 @@ export declare function useResizablePanel(props: ResizablePanelOwnProps, libDefa
13
13
  [x: string]: string;
14
14
  };
15
15
  class: string;
16
- }, "class", {}, Omit<Omit<ResizablePanelProps, "classes" | "maxSize" | "collapsedSize" | "collapsible" | "defaultSize" | "minSize">, "style">>>;
16
+ }, "class", {}, Omit<Omit<ResizablePanelProps, "classes" | "minSize" | "maxSize" | "collapsedSize" | "collapsible" | "defaultSize">, "style">>>;
17
17
  collapsed: import('vue').ComputedRef<boolean>;
18
18
  elementRef: Ref<HTMLElement | null, HTMLElement | null>;
19
19
  id: string;
@@ -13,7 +13,7 @@ export declare function useSpinner(props: SpinnerOwnProps, libDefaults: SpinnerL
13
13
  "aria-valuemax"?: number | undefined;
14
14
  "aria-valuenow"?: number | undefined;
15
15
  role: string;
16
- }, "class", import('vue').HTMLAttributes | undefined, Omit<SpinnerProps, "color" | "size" | "value" | "classes" | "customProps" | "variant" | "disableShrink" | "enableTrack" | "thickness">>>;
16
+ }, "class", import('vue').HTMLAttributes | undefined, Omit<SpinnerProps, "color" | "size" | "value" | "classes" | "customProps" | "variant" | "thickness" | "disableShrink" | "enableTrack">>>;
17
17
  trackBind: import('vue').ComputedRef<(object & {
18
18
  cx: number;
19
19
  cy: number;
@@ -66,7 +66,7 @@ function g(g, _, v, y) {
66
66
  }, P = i(() => {
67
67
  let t = u(f, C.value.rounded ?? "md");
68
68
  return e(T.value?.root, E.value, p({
69
- "flex flex-col overflow-hidden bg-white shadow-lg dark:bg-dark-900": !0,
69
+ "flex flex-col overflow-hidden bg-white shadow-lg dark:bg-dark-800": !0,
70
70
  "w-full": C.value.fill,
71
71
  "w-fit": !C.value.fill,
72
72
  [t]: !0,
@@ -80,7 +80,7 @@ function b(b, x, S, C) {
80
80
  }, G = o(() => {
81
81
  let e = f(g, k.value.rounded ?? "md");
82
82
  return n(j.value?.root, M.value, _({
83
- "flex flex-col overflow-hidden bg-white shadow-lg dark:bg-dark-900": !0,
83
+ "flex flex-col overflow-hidden bg-white shadow-lg dark:bg-dark-800": !0,
84
84
  "w-full": k.value.fill,
85
85
  "w-fit": !k.value.fill,
86
86
  [e]: !0,
@@ -0,0 +1,5 @@
1
+ import e from "./ChartFrame.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/Utils/Charts/ChartFrame.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,24 @@
1
+ import { ChartFrameState } from './useChartRoot';
2
+ type __VLS_Props = {
3
+ frame: ChartFrameState;
4
+ showCenter?: boolean;
5
+ };
6
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_10: {}, __VLS_12: {};
7
+ type __VLS_Slots = {} & {
8
+ center?: (props: typeof __VLS_1) => any;
9
+ } & {
10
+ loading?: (props: typeof __VLS_3) => any;
11
+ } & {
12
+ empty?: (props: typeof __VLS_10) => any;
13
+ } & {
14
+ default?: (props: typeof __VLS_12) => any;
15
+ };
16
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,41 @@
1
+ import e from "../LoadingSpin.js";
2
+ import { Fragment as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, guardReactiveProps as c, mergeProps as l, normalizeProps as u, openBlock as d, renderList as f, renderSlot as p, toDisplayString as m, unref as h } from "vue";
3
+ //#region src/Utils/Charts/ChartFrame.vue?vue&type=script&setup=true&lang.ts
4
+ var g = {
5
+ key: 0,
6
+ scope: "row"
7
+ }, _ = { key: 1 }, v = /*@__PURE__*/ s({
8
+ __name: "ChartFrame",
9
+ props: {
10
+ frame: {},
11
+ showCenter: { type: Boolean }
12
+ },
13
+ setup(s) {
14
+ let { table: v, isEmpty: y, rootRef: b, plotRef: x, hostRef: S, hostBind: C, plotBind: w, rootBind: T, liveBind: E, emptyBind: D, isLoading: O, tableBind: k, centerBind: A, loadingBind: j, announcement: M, emptyMessage: N } = s.frame;
15
+ function P(e) {
16
+ b.value = e;
17
+ }
18
+ function F(e) {
19
+ x.value = e;
20
+ }
21
+ function I(e) {
22
+ S.value = e;
23
+ }
24
+ return (b, x) => (d(), r("div", l({ ref: P }, h(T)), [
25
+ i("div", l({ ref: F }, h(w)), [
26
+ i("div", l({ ref: I }, h(C)), null, 16),
27
+ s.showCenter && !h(y) ? (d(), r("div", u(l({ key: 0 }, h(A))), [p(b.$slots, "center")], 16)) : n("", !0),
28
+ h(O) ? (d(), r("div", u(l({ key: 1 }, h(j))), [p(b.$slots, "loading", {}, () => [o(e)])], 16)) : n("", !0),
29
+ h(y) ? (d(), r("div", u(l({ key: 2 }, h(D))), [p(b.$slots, "empty", {}, () => [a(m(h(N)), 1)])], 16)) : n("", !0)
30
+ ], 16),
31
+ p(b.$slots, "default"),
32
+ i("table", u(c(h(k))), [i("thead", null, [i("tr", null, [(d(!0), r(t, null, f(h(v).headers, (e, t) => (d(), r("th", {
33
+ scope: "col",
34
+ key: `${t}-${e}`
35
+ }, m(e), 1))), 128))])]), i("tbody", null, [(d(!0), r(t, null, f(h(v).rows, (e) => (d(), r("tr", { key: e.key }, [(d(!0), r(t, null, f(e.cells, (e, n) => (d(), r(t, { key: n }, [n === 0 ? (d(), r("th", g, m(e), 1)) : (d(), r("td", _, m(e), 1))], 64))), 128))]))), 128))])], 16),
36
+ i("div", u(c(h(E))), m(h(M)), 17)
37
+ ], 16));
38
+ }
39
+ });
40
+ //#endregion
41
+ export { v as default };
@@ -1,14 +1,18 @@
1
1
  import { HTMLAttributes, Slot } from 'vue';
2
2
  import { ChartColor, ChartSize } from '@bridge-ui/core/Tokens';
3
- import { MergeHtmlProps, MergeProps } from '@bridge-ui/core/Utils';
3
+ import { MergeProps } from '@bridge-ui/core/Utils';
4
4
  export interface ChartSizeOverrides {}
5
5
  export interface ChartColorOverrides {}
6
6
  /**
7
- * Series color: a Chart color token key (`"primary"`, `"info"`, …) or any
8
- * CSS color (`"#6366f1"`, `"rgb(0 0 0)"`, `"var(--brand)"`).
7
+ * Chart color: a Chart color token key (`"primary"`, `"info"`, …) or any CSS
8
+ * color (`"#6366f1"`, `"rgb(0 0 0)"`, `"var(--brand)"`).
9
9
  */
10
- export type ChartSeriesColor = (string & {}) | MergeProps<ChartColor, ChartColorOverrides>;
10
+ export type ChartColorValue = (string & {}) | MergeProps<ChartColor, ChartColorOverrides>;
11
11
  export interface ChartClasses {
12
+ /**
13
+ * Classes merged onto the center content (`ChartPie` donut hole).
14
+ */
15
+ center?: string;
12
16
  /**
13
17
  * Classes merged onto the empty-state overlay.
14
18
  */
@@ -45,20 +49,16 @@ export interface ChartCustomProps {
45
49
  root?: HTMLAttributes;
46
50
  }
47
51
  /**
48
- * Chart root. Compose with `ChartSeries`, `ChartAxis`, `ChartLegend`,
49
- * and `ChartTooltip`. The plot is drawn by ECharts.
52
+ * Props shared by every chart root (`ChartLine`, `ChartBar`, `ChartScatter`,
53
+ * `ChartPie`, `ChartFunnel`).
50
54
  */
51
- export interface ChartOwnProps {
55
+ export interface ChartRootOwnProps {
52
56
  /**
53
57
  * Enables engine transitions. Always off under `prefers-reduced-motion`.
54
58
  *
55
59
  * @default true
56
60
  */
57
61
  animation?: boolean;
58
- /**
59
- * Category labels for the x axis. Each series has one value per category.
60
- */
61
- categories: string[];
62
62
  /**
63
63
  * Classes for chart parts.
64
64
  *
@@ -84,20 +84,19 @@ export interface ChartOwnProps {
84
84
  */
85
85
  loading?: boolean;
86
86
  /**
87
- * Series colors used in order when a `ChartSeries` omits `color`.
87
+ * Colors used in order when a series or slice omits `color`.
88
88
  *
89
89
  * @default ["primary", "info", "success", "warning", "error", "secondary", "dark"]
90
90
  */
91
- palette?: ChartSeriesColor[];
91
+ palette?: ChartColorValue[];
92
92
  /**
93
- * Density of axis labels, legend, and tooltip.
93
+ * Density of labels, legend, and tooltip.
94
94
  *
95
95
  * @default "md"
96
96
  */
97
97
  size?: MergeProps<ChartSize, ChartSizeOverrides>;
98
98
  /**
99
- * Accessible description of the plot. Defaults to a generated summary
100
- * (series names and category range).
99
+ * Accessible description of the plot. Defaults to a generated summary.
101
100
  *
102
101
  * @default undefined
103
102
  */
@@ -111,7 +110,7 @@ export interface ChartOwnProps {
111
110
  }
112
111
  export interface ChartSlots {
113
112
  /**
114
- * Chart parts (`ChartSeries`, `ChartAxis`, `ChartLegend`, `ChartTooltip`).
113
+ * Chart parts (series, `ChartAxis`, `ChartLegend`, `ChartTooltip`).
115
114
  */
116
115
  default?: Slot<undefined>;
117
116
  /**
@@ -123,4 +122,3 @@ export interface ChartSlots {
123
122
  */
124
123
  loading?: Slot<undefined>;
125
124
  }
126
- export type ChartProps = MergeHtmlProps<ChartOwnProps, HTMLAttributes>;
@@ -0,0 +1,151 @@
1
+ import { ComputedRef, InjectionKey } from 'vue';
2
+ import { ChartAnchor, ChartAxisOptions, ChartAxisPosition, ChartBarSeriesEntry, ChartLineSeriesEntry, ChartReference, ChartScatterSeriesEntry, ChartTooltipContent } from '@bridge-ui/core/Domain';
3
+ /**
4
+ * Chart family of the nearest root.
5
+ */
6
+ export type ChartFamily = "bar" | "pie" | "line" | "funnel" | "scatter";
7
+ /**
8
+ * Where `ChartLegend` sits relative to the plot.
9
+ */
10
+ export type ChartLegendPosition = "top" | "left" | "right" | "bottom";
11
+ /**
12
+ * Series registered by `ChartLineSeries`. Unset options fall back to the
13
+ * `ChartLine` props.
14
+ */
15
+ export type ChartLineSeriesRegistration = Pick<ChartLineSeriesEntry, "id" | "data" | "kind" | "name" | "color"> & Partial<Pick<ChartLineSeriesEntry, "area" | "step" | "curve" | "stack" | "dashed" | "labels" | "showPoints">> & {
16
+ /**
17
+ * Reference lines.
18
+ */
19
+ reference?: ChartReference[];
20
+ };
21
+ /**
22
+ * Series registered by `ChartBarSeries`. Unset options fall back to the
23
+ * `ChartBar` props.
24
+ */
25
+ export type ChartBarSeriesRegistration = Pick<ChartBarSeriesEntry, "id" | "data" | "kind" | "name" | "color"> & Partial<Pick<ChartBarSeriesEntry, "stack" | "labels">> & {
26
+ /**
27
+ * Reference lines.
28
+ */
29
+ reference?: ChartReference[];
30
+ };
31
+ /**
32
+ * Series registered by `ChartScatterSeries`.
33
+ */
34
+ export type ChartScatterSeriesRegistration = ChartScatterSeriesEntry;
35
+ /**
36
+ * Any series a chart root accepts.
37
+ */
38
+ export type ChartSeriesRegistration = ChartBarSeriesRegistration | ChartLineSeriesRegistration | ChartScatterSeriesRegistration;
39
+ /**
40
+ * One legend entry: a series or a slice.
41
+ */
42
+ export type ChartLegendItem = {
43
+ /**
44
+ * Resolved CSS color (empty until the first layout pass).
45
+ */
46
+ color: string;
47
+ /**
48
+ * Whether the item is hidden with the legend toggle.
49
+ */
50
+ hidden: boolean;
51
+ /**
52
+ * Series or slice id.
53
+ */
54
+ id: string;
55
+ /**
56
+ * Series name or slice label.
57
+ */
58
+ name: string;
59
+ /**
60
+ * Share (`0`–`100`, slices only). `undefined` while hidden.
61
+ */
62
+ percent?: number;
63
+ /**
64
+ * Slice value (slices only).
65
+ */
66
+ value?: number;
67
+ };
68
+ /**
69
+ * Shared chart state for series, `ChartAxis`, `ChartLegend`, and
70
+ * `ChartTooltip` descendants.
71
+ */
72
+ export type ChartContextValue = {
73
+ /**
74
+ * Active item index (pointer or keyboard). `null` when idle.
75
+ */
76
+ activeIndex: null | number;
77
+ /**
78
+ * Chart family of the root.
79
+ */
80
+ family: ChartFamily;
81
+ /**
82
+ * Root size (px) used to keep the tooltip inside the chart.
83
+ */
84
+ getBounds: () => {
85
+ height: number;
86
+ width: number;
87
+ };
88
+ /**
89
+ * Tooltip anchor for an item, relative to the chart root.
90
+ */
91
+ getTooltipAnchor: (index: number) => null | ChartAnchor;
92
+ /**
93
+ * Emphasizes one legend item in the plot. `null` clears it.
94
+ */
95
+ highlightItem: (id: null | string) => void;
96
+ /**
97
+ * Stable id prefix for chart parts.
98
+ */
99
+ id: string;
100
+ /**
101
+ * Legend entries in order, with colors and visibility.
102
+ */
103
+ legendItems: ChartLegendItem[];
104
+ /**
105
+ * Locale used to format values.
106
+ */
107
+ locale: string;
108
+ /**
109
+ * Removes axis options registered by `ChartAxis` (axis charts only).
110
+ */
111
+ removeAxis?: (position: ChartAxisPosition) => void;
112
+ /**
113
+ * Removes a series by id (series charts only).
114
+ */
115
+ removeSeries?: (id: string) => void;
116
+ /**
117
+ * Sets axis options (axis charts only; no-op when unchanged).
118
+ */
119
+ setAxis?: (position: ChartAxisPosition, options: ChartAxisOptions) => void;
120
+ /**
121
+ * Tells the root where the legend sits (`null` when it unmounts).
122
+ */
123
+ setLegendPosition: (position: null | ChartLegendPosition) => void;
124
+ /**
125
+ * Shows / hides a legend item by id.
126
+ */
127
+ toggleItem: (id: string) => void;
128
+ /**
129
+ * Merged size token classes for legend and tooltip.
130
+ */
131
+ tokenClasses: {
132
+ legend?: string;
133
+ legendItem?: string;
134
+ swatch?: string;
135
+ tooltip?: string;
136
+ };
137
+ /**
138
+ * Tooltip content for `activeIndex`. `null` when idle or empty.
139
+ */
140
+ tooltip: null | ChartTooltipContent;
141
+ /**
142
+ * Adds or replaces a series by `id`, keeping its position (series charts
143
+ * only; no-op when unchanged).
144
+ */
145
+ upsertSeries?: (entry: ChartSeriesRegistration) => void;
146
+ };
147
+ export declare const CHART_INJECTION_KEY: InjectionKey<ComputedRef<ChartContextValue>>;
148
+ /**
149
+ * Injects the nearest chart root context. Throws when used outside a chart.
150
+ */
151
+ export declare function useChartContext(): ComputedRef<ChartContextValue>;
@@ -1,9 +1,9 @@
1
1
  import { inject as e } from "vue";
2
- //#region src/Components/Chart/chartInjectionKey.ts
2
+ //#region src/Utils/Charts/chartInjectionKey.ts
3
3
  var t = Symbol("bridge-chart");
4
4
  function n() {
5
5
  let n = e(t, null);
6
- if (!n) throw Error("Chart components must be used within a Chart");
6
+ if (!n) throw Error("Chart components must be used within ChartLine, ChartBar, ChartScatter, ChartPie, or ChartFunnel");
7
7
  return n;
8
8
  }
9
9
  //#endregion