@bridge-ui/vue 0.18.0 → 0.20.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 (103) hide show
  1. package/ai/skills/bridge-ui-components/SKILL.md +35 -34
  2. package/ai/skills/bridge-ui-setup/SKILL.md +1 -1
  3. package/dist/Components/Autocomplete/composables/useAutocomplete.js +257 -265
  4. package/dist/Components/Calendar/composables/useCalendar.d.ts +1 -1
  5. package/dist/Components/Calendar/composables/useCalendar.js +192 -187
  6. package/dist/Components/CalendarMonth/composables/useCalendarMonth.d.ts +1 -1
  7. package/dist/Components/CalendarRange/composables/useCalendarRange.d.ts +1 -1
  8. package/dist/Components/CalendarRange/composables/useCalendarRange.js +243 -238
  9. package/dist/Components/ChartBar/ChartBar.vue_vue_type_script_setup_true_lang.js +5 -0
  10. package/dist/Components/ChartBar/chartBar.types.d.ts +11 -1
  11. package/dist/Components/ChartBar/composables/useChartBar.js +4 -4
  12. package/dist/Components/ChartBar/index.d.ts +1 -1
  13. package/dist/Components/ChartBarSeries/ChartBarSeries.vue_vue_type_script_setup_true_lang.js +4 -1
  14. package/dist/Components/ChartBarSeries/chartBarSeries.types.d.ts +24 -2
  15. package/dist/Components/ChartBarSeries/composables/useChartBarSeries.js +3 -0
  16. package/dist/Components/ChartBarSeries/index.d.ts +1 -0
  17. package/dist/Components/ChartFunnel/composables/useChartFunnel.js +10 -10
  18. package/dist/Components/ChartLine/ChartLine.vue_vue_type_script_setup_true_lang.js +1 -0
  19. package/dist/Components/ChartLine/chartLine.types.d.ts +7 -0
  20. package/dist/Components/ChartLine/composables/useChartLine.js +1 -1
  21. package/dist/Components/ChartLineSeries/ChartLineSeries.vue_vue_type_script_setup_true_lang.js +3 -0
  22. package/dist/Components/ChartLineSeries/chartLineSeries.types.d.ts +23 -2
  23. package/dist/Components/ChartLineSeries/composables/useChartLineSeries.js +3 -0
  24. package/dist/Components/ChartLineSeries/index.d.ts +1 -0
  25. package/dist/Components/ChartPie/ChartPie.vue_vue_type_script_setup_true_lang.js +3 -0
  26. package/dist/Components/ChartPie/chartPie.types.d.ts +20 -1
  27. package/dist/Components/ChartPie/composables/useChartPie.d.ts +1 -1
  28. package/dist/Components/ChartPie/composables/useChartPie.js +39 -29
  29. package/dist/Components/ChartScatter/composables/useChartScatter.js +63 -58
  30. package/dist/Components/ChartScatterSeries/ChartScatterSeries.vue_vue_type_script_setup_true_lang.js +1 -0
  31. package/dist/Components/ChartScatterSeries/chartScatterSeries.types.d.ts +8 -1
  32. package/dist/Components/ChartScatterSeries/composables/useChartScatterSeries.js +2 -1
  33. package/dist/Components/ChartScatterSeries/index.d.ts +1 -0
  34. package/dist/Components/ChartTooltip/ChartTooltip.vue_vue_type_script_setup_true_lang.js +11 -7
  35. package/dist/Components/ChartTooltip/chartTooltip.types.d.ts +4 -0
  36. package/dist/Components/ChartTooltip/composables/useChartTooltip.d.ts +1 -0
  37. package/dist/Components/ChartTooltip/composables/useChartTooltip.js +4 -0
  38. package/dist/Components/DataTable/DataTableColumnsMenu.vue.d.ts +1 -2
  39. package/dist/Components/DataTable/composables/useDataTable.d.ts +8 -66
  40. package/dist/Components/DataTable/composables/useDataTable.js +267 -349
  41. package/dist/Components/DataTable/composables/useDataTableColumnsMenu.d.ts +1 -2
  42. package/dist/Components/Heading/Heading.js +5 -0
  43. package/dist/Components/Heading/Heading.vue.d.ts +11 -0
  44. package/dist/Components/Heading/Heading.vue_vue_type_script_setup_true_lang.js +29 -0
  45. package/dist/Components/Heading/composables/useHeading.d.ts +10 -0
  46. package/dist/Components/Heading/composables/useHeading.js +56 -0
  47. package/dist/Components/Heading/heading.types.d.ts +56 -0
  48. package/dist/Components/Heading/index.d.ts +3 -0
  49. package/dist/Components/Heading/index.js +3 -0
  50. package/dist/Components/ListItem/composables/useListItem.js +29 -30
  51. package/dist/Components/Listbox/composables/useListboxNavigation.d.ts +0 -5
  52. package/dist/Components/Listbox/composables/useListboxNavigation.js +23 -50
  53. package/dist/Components/Listbox/index.d.ts +1 -1
  54. package/dist/Components/Listbox/index.js +5 -5
  55. package/dist/Components/ResizablePanel/composables/useResizablePanel.d.ts +1 -1
  56. package/dist/Components/RichTextEditor/composables/useRichTextEditor.js +31 -31
  57. package/dist/Components/Select/composables/useSelect.js +201 -211
  58. package/dist/Components/Slider/composables/useSlider.js +93 -122
  59. package/dist/Components/Text/Text.js +5 -0
  60. package/dist/Components/Text/Text.vue.d.ts +11 -0
  61. package/dist/Components/Text/Text.vue_vue_type_script_setup_true_lang.js +33 -0
  62. package/dist/Components/Text/composables/useText.d.ts +9 -0
  63. package/dist/Components/Text/composables/useText.js +56 -0
  64. package/dist/Components/Text/index.d.ts +3 -0
  65. package/dist/Components/Text/index.js +3 -0
  66. package/dist/Components/Text/text.types.d.ts +76 -0
  67. package/dist/Utils/Charts/chart.types.d.ts +17 -0
  68. package/dist/Utils/Charts/chartInjectionKey.d.ts +2 -2
  69. package/dist/Utils/Charts/index.d.ts +1 -1
  70. package/dist/Utils/Charts/useChartCartesian.d.ts +4 -2
  71. package/dist/Utils/Charts/useChartCartesian.js +90 -76
  72. package/dist/augments.d.ts +10 -0
  73. package/dist/index.d.ts +5 -1
  74. package/dist/index.js +175 -171
  75. package/docs/README.md +2 -0
  76. package/docs/components/BridgeUIProvider.md +1 -1
  77. package/docs/components/Card.md +15 -0
  78. package/docs/components/Chart.md +17 -10
  79. package/docs/components/ChartBar.md +70 -17
  80. package/docs/components/ChartLine.md +57 -16
  81. package/docs/components/ChartPie.md +33 -10
  82. package/docs/components/ChartScatter.md +25 -7
  83. package/docs/components/Heading.md +85 -0
  84. package/docs/components/Text.md +118 -0
  85. package/package.json +2 -2
  86. package/dist/Components/RichTextEditor/tiptapEditor.d.ts +0 -111
  87. package/dist/Components/RichTextEditor/tiptapEditor.js +0 -121
  88. package/dist/Utils/Charts/echarts/bar.d.ts +0 -6
  89. package/dist/Utils/Charts/echarts/bar.js +0 -22
  90. package/dist/Utils/Charts/echarts/cartesian.d.ts +0 -15
  91. package/dist/Utils/Charts/echarts/cartesian.js +0 -255
  92. package/dist/Utils/Charts/echarts/funnel.d.ts +0 -15
  93. package/dist/Utils/Charts/echarts/funnel.js +0 -79
  94. package/dist/Utils/Charts/echarts/line.d.ts +0 -5
  95. package/dist/Utils/Charts/echarts/line.js +0 -19
  96. package/dist/Utils/Charts/echarts/part.d.ts +0 -19
  97. package/dist/Utils/Charts/echarts/part.js +0 -45
  98. package/dist/Utils/Charts/echarts/pie.d.ts +0 -14
  99. package/dist/Utils/Charts/echarts/pie.js +0 -75
  100. package/dist/Utils/Charts/echarts/plot.d.ts +0 -44
  101. package/dist/Utils/Charts/echarts/plot.js +0 -52
  102. package/dist/Utils/Charts/echarts/scatter.d.ts +0 -14
  103. package/dist/Utils/Charts/echarts/scatter.js +0 -152
@@ -1,13 +1,13 @@
1
1
  import { useDateAdapter as e } from "../../../Adapters/Date/useDateAdapter.js";
2
2
  import { useResolveMessage as t } from "../../../Adapters/I18n/useI18nAdapter.js";
3
- import { mergePartBind as n, useBridgeUIComponent as ee, useBridgeUIMergedRegistryClasses as te } from "../../../Utils/index.js";
4
- import { computed as r, getCurrentInstance as ne, ref as i, toValue as a, useAttrs as o } from "vue";
5
- import { get as re, isFunction as s, isNil as c, omit as ie } from "es-toolkit/compat";
6
- import { applyDateSelection as l, calendarPanelViewFromGranularity as u, isCalendarMonthPanelHidden as d, isCalendarYearPanelHidden as f, isDateRangeValue as p, normalizeDateToGranularity as m, resolveCalendarPanelView as h } from "@bridge-ui/core/Domain";
7
- import { calendarRoundedProps as ae } from "@bridge-ui/core/Tokens";
8
- import { cn as g, mergeBridgeUILayeredClasses as oe, splitComponentProps as se } from "@bridge-ui/core/Utils";
3
+ import { mergePartBind as n, useBridgeUIComponent as ee, useBridgeUIMergedRegistryClasses as r } from "../../../Utils/index.js";
4
+ import { computed as i, getCurrentInstance as a, ref as o, toValue as s, useAttrs as te } from "vue";
5
+ import { get as ne, isFunction as c, isNil as l, omit as re } from "es-toolkit/compat";
6
+ import { CALENDAR_YEAR_PAGE_SIZE as ie, applyDateSelection as u, calendarPanelViewFromGranularity as d, getCalendarNavigationMessage as f, getCalendarYearPageStart as p, isCalendarMonthPanelHidden as m, isCalendarYearPanelHidden as h, isDateRangeValue as g, resolveCalendarFocusDate as ae, resolveCalendarMonthSelection as oe, resolveCalendarNavigation as se, resolveCalendarPanelView as _, resolveCalendarYearSelection as ce } from "@bridge-ui/core/Domain";
7
+ import { calendarRoundedProps as le } from "@bridge-ui/core/Tokens";
8
+ import { cn as v, mergeBridgeUILayeredClasses as ue, splitComponentProps as de } from "@bridge-ui/core/Utils";
9
9
  //#region src/Components/CalendarRange/composables/useCalendarRange.ts
10
- var ce = [
10
+ var fe = [
11
11
  "fill",
12
12
  "color",
13
13
  "error",
@@ -34,285 +34,290 @@ var ce = [
34
34
  "disableMonths",
35
35
  "hideOutsideDays"
36
36
  ];
37
- function le(e, t, n) {
38
- return c(e) ? t.now(n) : e[0];
37
+ function pe(e) {
38
+ return g(e) ? e : null;
39
39
  }
40
- function ue(e) {
41
- return p(e) ? e : null;
42
- }
43
- function _(p, _, v, y) {
44
- let de = o(), b = e(), x = t(), S = r(() => se({
45
- bridgeKeys: ce,
40
+ function y(g, y, b, x) {
41
+ let S = te(), C = e(), w = t(), T = i(() => de({
42
+ bridgeKeys: fe,
46
43
  props: {
47
- ...de,
48
- ...a(p)
44
+ ...S,
45
+ ...s(g)
49
46
  }
50
- })), { merged: C, entry: w } = ee({
51
- libDefaults: _,
47
+ })), { merged: E, entry: me } = ee({
48
+ libDefaults: y,
52
49
  componentName: "Calendar",
53
- props: () => S.value.componentProps
54
- }), T = r(() => C.value.customProps), fe = r(() => ie(S.value.inheritedAttrs, [
50
+ props: () => T.value.componentProps
51
+ }), D = i(() => E.value.customProps), he = i(() => re(T.value.inheritedAttrs, [
55
52
  "onChange",
56
53
  "onViewDateChange",
57
54
  "onPreviewDateChange",
58
55
  "onUpdate:modelValue"
59
- ])), E = te({
60
- props: () => S.value.componentProps,
61
- entry: r(() => {})
62
- }), D = r(() => C.value.timeZone), O = r(() => a(p)), k = r(() => {
63
- let e = ne()?.vnode.props ?? {}, t = s(e.onViewDateChange) || s(e["onUpdate:viewDate"]);
64
- return !c(O.value.viewDate) && t;
65
- }), A = r(() => !c(O.value.previewDate)), j = i(h({
66
- hideYears: C.value.hideYears,
67
- hideMonths: C.value.hideMonths,
68
- granularity: O.value.granularity ?? "day",
69
- view: O.value.defaultView ?? u(O.value.granularity ?? "day")
70
- })), M = i(b.value.startOfMonth(c(O.value.viewDate) ? le(v.value, b.value, D.value) : O.value.viewDate, D.value)), N = i(null), P = i(null), F = r(() => C.value.granularity ?? "day"), I = r(() => h({
71
- view: j.value,
72
- granularity: F.value,
73
- hideYears: C.value.hideYears,
74
- hideMonths: C.value.hideMonths
75
- })), L = r(() => k.value ? O.value.viewDate : M.value), R = r(() => b.value.addMonths(L.value, 1, D.value)), z = r(() => A.value ? O.value.previewDate ?? null : N.value), B = r(() => String(b.value.getYear(L.value, D.value))), V = r(() => b.value.getMonthNames()[b.value.getMonth(L.value, D.value)] ?? ""), pe = r(() => b.value.getMonthNames()[b.value.getMonth(R.value, D.value)] ?? ""), H = r(() => b.value.getYear(L.value, D.value)), U = r(() => b.value.getMonth(L.value, D.value)), W = r(() => c(P.value) ? Math.max(1, H.value - 7) : P.value), G = r(() => {
76
- let e = oe(ae, w.value?.tokens?.rounded);
77
- return re(e, C.value.rounded);
78
- }), K = (e) => {
79
- j.value = e;
80
- }, me = () => {
81
- P.value = Math.max(1, H.value - 7), K("year");
56
+ ])), O = r({
57
+ props: () => T.value.componentProps,
58
+ entry: i(() => {})
59
+ }), k = i(() => E.value.timeZone), A = i(() => s(g)), j = i(() => {
60
+ let e = a()?.vnode.props ?? {}, t = c(e.onViewDateChange) || c(e["onUpdate:viewDate"]);
61
+ return !l(A.value.viewDate) && t;
62
+ }), M = i(() => !l(A.value.previewDate)), N = o(_({
63
+ hideYears: E.value.hideYears,
64
+ hideMonths: E.value.hideMonths,
65
+ granularity: A.value.granularity ?? "day",
66
+ view: A.value.defaultView ?? d(A.value.granularity ?? "day")
67
+ })), P = o(C.value.startOfMonth(l(A.value.viewDate) ? ae(b.value, C.value, k.value) : A.value.viewDate, k.value)), F = o(null), I = o(null), L = i(() => E.value.granularity ?? "day"), R = i(() => _({
68
+ view: N.value,
69
+ granularity: L.value,
70
+ hideYears: E.value.hideYears,
71
+ hideMonths: E.value.hideMonths
72
+ })), z = i(() => j.value ? A.value.viewDate : P.value), B = i(() => C.value.addMonths(z.value, 1, k.value)), ge = i(() => M.value ? A.value.previewDate ?? null : F.value), _e = i(() => String(C.value.getYear(z.value, k.value))), ve = i(() => C.value.getMonthNames()[C.value.getMonth(z.value, k.value)] ?? ""), ye = i(() => C.value.getMonthNames()[C.value.getMonth(B.value, k.value)] ?? ""), V = i(() => C.value.getYear(z.value, k.value)), H = i(() => C.value.getMonth(z.value, k.value)), U = i(() => l(I.value) ? p(V.value) : I.value), W = i(() => {
73
+ let e = ue(le, me.value?.tokens?.rounded);
74
+ return ne(e, E.value.rounded);
75
+ }), G = (e) => {
76
+ N.value = e;
77
+ }, be = () => {
78
+ I.value = p(V.value), G("year");
79
+ }, K = (e) => {
80
+ let t = C.value.startOfMonth(e, k.value);
81
+ j.value || (P.value = t), x("viewDateChange", t);
82
+ }, xe = (e) => {
83
+ K(e);
84
+ }, Se = (e) => {
85
+ K(C.value.addMonths(e, -1, k.value));
82
86
  }, q = (e) => {
83
- let t = b.value.startOfMonth(e, D.value);
84
- k.value || (M.value = t), y("viewDateChange", t);
85
- }, he = (e) => {
86
- q(e);
87
- }, ge = (e) => {
88
- q(b.value.addMonths(e, -1, D.value));
87
+ let t = pe(e);
88
+ b.value = t, x("change", t);
89
89
  }, J = (e) => {
90
- let t = ue(e);
91
- v.value = t, y("change", t);
92
- }, _e = (e) => {
93
- A.value || (N.value = e), y("previewDateChange", e);
94
- }, ve = () => {
95
- if (I.value === "year") {
96
- P.value = Math.max(1, W.value - 15);
97
- return;
98
- }
99
- if (I.value === "month") {
100
- q(b.value.addYears(L.value, -1, D.value));
101
- return;
102
- }
103
- q(b.value.addMonths(L.value, -1, D.value));
104
- }, ye = () => {
105
- if (I.value === "year") {
106
- P.value = W.value + 15;
107
- return;
108
- }
109
- if (I.value === "month") {
110
- q(b.value.addYears(L.value, 1, D.value));
90
+ M.value || (F.value = e), x("previewDateChange", e);
91
+ }, Y = (e) => {
92
+ let t = se({
93
+ direction: e,
94
+ view: R.value,
95
+ adapter: C.value,
96
+ viewDate: z.value,
97
+ timeZone: k.value,
98
+ yearPageStart: U.value
99
+ });
100
+ if (t.type === "yearPage") {
101
+ I.value = t.yearPageStart;
111
102
  return;
112
103
  }
113
- q(b.value.addMonths(L.value, 1, D.value));
114
- }, be = () => {
115
- let e = b.value.startOfMonth(b.value.now(D.value), D.value);
116
- P.value = null, q(e), K(u(F.value));
117
- }, xe = (e) => {
118
- P.value = null;
119
- let t = b.value.setYear(L.value, e, D.value);
120
- if (q(t), F.value === "year") {
121
- J(l({
104
+ K(t.viewDate);
105
+ }, Ce = () => {
106
+ Y(-1);
107
+ }, we = () => {
108
+ Y(1);
109
+ }, Te = () => {
110
+ let e = C.value.startOfMonth(C.value.now(k.value), k.value);
111
+ I.value = null, K(e), G(d(L.value));
112
+ }, Ee = (e) => {
113
+ I.value = null;
114
+ let t = ce({
115
+ year: e,
116
+ adapter: C.value,
117
+ viewDate: z.value,
118
+ timeZone: k.value,
119
+ granularity: L.value,
120
+ hideMonths: E.value.hideMonths
121
+ });
122
+ if (K(t.viewDate), t.type === "commit") {
123
+ q(u({
122
124
  mode: "range",
123
- value: v.value,
124
- granularity: "year",
125
- adapter: b.value,
126
- timeZone: D.value,
127
- next: m(t, "year", b.value, D.value)
125
+ value: b.value,
126
+ next: t.date,
127
+ adapter: C.value,
128
+ timeZone: k.value,
129
+ granularity: L.value
128
130
  }));
129
131
  return;
130
132
  }
131
- K(d({
132
- granularity: F.value,
133
- hideMonths: C.value.hideMonths
134
- }) ? u(F.value) : "month");
135
- }, Y = () => {
136
- K("month");
137
- }, Se = (e) => {
138
- let t = b.value.setMonth(L.value, e, D.value);
139
- if (q(t), F.value === "month") {
140
- J(l({
133
+ G(t.view);
134
+ }, X = () => {
135
+ G("month");
136
+ }, De = (e) => {
137
+ let t = oe({
138
+ month: e,
139
+ adapter: C.value,
140
+ viewDate: z.value,
141
+ timeZone: k.value,
142
+ granularity: L.value
143
+ });
144
+ if (K(t.viewDate), t.type === "commit") {
145
+ q(u({
141
146
  mode: "range",
142
- value: v.value,
143
- granularity: "month",
144
- adapter: b.value,
145
- timeZone: D.value,
146
- next: m(t, "month", b.value, D.value)
147
+ value: b.value,
148
+ next: t.date,
149
+ adapter: C.value,
150
+ timeZone: k.value,
151
+ granularity: L.value
147
152
  }));
148
153
  return;
149
154
  }
150
- K("date");
151
- }, Ce = H, we = U, Te = r(() => ({
152
- color: C.value.color,
153
- error: C.value.error,
154
- rounded: C.value.rounded,
155
- maxDate: C.value.maxDate,
156
- minDate: C.value.minDate,
157
- disabled: C.value.disabled,
158
- readOnly: C.value.readOnly,
159
- timeZone: C.value.timeZone
160
- })), X = r(() => C.value.orientation === "vertical"), Ee = r(() => n(T.value?.root, fe.value, g({
155
+ G(t.view);
156
+ }, Oe = V, ke = H, Ae = i(() => ({
157
+ color: E.value.color,
158
+ error: E.value.error,
159
+ rounded: E.value.rounded,
160
+ maxDate: E.value.maxDate,
161
+ minDate: E.value.minDate,
162
+ disabled: E.value.disabled,
163
+ readOnly: E.value.readOnly,
164
+ timeZone: E.value.timeZone
165
+ })), Z = i(() => E.value.orientation === "vertical"), je = i(() => n(D.value?.root, he.value, v({
161
166
  "flex flex-col overflow-hidden": !0,
162
- "w-full": C.value.fill,
167
+ "w-full": E.value.fill,
163
168
  "min-w-max": !0,
164
- "w-fit": !C.value.fill && X.value,
165
- [E.value.root ?? ""]: !0
166
- }))), De = r(() => n(T.value?.header, {}, g({
169
+ "w-fit": !E.value.fill && Z.value,
170
+ [O.value.root ?? ""]: !0
171
+ }))), Me = i(() => n(D.value?.header, {}, v({
167
172
  "relative flex w-full items-center p-2.5": !0,
168
- [E.value.header ?? ""]: !0
169
- }))), Oe = r(() => n(T.value?.months, {}, g({
173
+ [O.value.header ?? ""]: !0
174
+ }))), Ne = i(() => n(D.value?.months, {}, v({
170
175
  "flex min-w-0 flex-1 items-center justify-center": !0,
171
- [E.value.months ?? ""]: !0
172
- }))), ke = r(() => n(T.value?.startHeader, {}, g({
176
+ [O.value.months ?? ""]: !0
177
+ }))), Pe = i(() => n(D.value?.startHeader, {}, v({
173
178
  "flex min-w-0 flex-1 items-center pr-4": !0,
174
- [E.value.startHeader ?? ""]: !0
175
- }))), Ae = r(() => n(T.value?.endHeader, {}, g({
179
+ [O.value.startHeader ?? ""]: !0
180
+ }))), Fe = i(() => n(D.value?.endHeader, {}, v({
176
181
  "items-center": !0,
177
- "flex min-w-0 flex-1 items-center pl-4": !X.value || I.value === "month",
178
- "flex justify-center": X.value && I.value !== "month",
179
- [E.value.endHeader ?? ""]: !0
180
- }))), je = r(() => n(T.value?.body, {}, g({
182
+ "flex min-w-0 flex-1 items-center pl-4": !Z.value || R.value === "month",
183
+ "flex justify-center": Z.value && R.value !== "month",
184
+ [O.value.endHeader ?? ""]: !0
185
+ }))), Ie = i(() => n(D.value?.body, {}, v({
181
186
  "relative flex min-h-64 flex-col": !0,
182
- [E.value.body ?? ""]: !0
183
- }))), Me = r(() => n(T.value?.panels, { "aria-hidden": I.value !== "date" }, g({
187
+ [O.value.body ?? ""]: !0
188
+ }))), Le = i(() => n(D.value?.panels, { "aria-hidden": R.value !== "date" }, v({
184
189
  "flex w-full": !0,
185
- "flex-row": !X.value,
186
- "flex-col": X.value,
187
- invisible: I.value !== "date",
188
- [E.value.panels ?? ""]: !0
189
- }))), Ne = r(() => n(T.value?.start, {}, g({
190
+ "flex-row": !Z.value,
191
+ "flex-col": Z.value,
192
+ invisible: R.value !== "date",
193
+ [O.value.panels ?? ""]: !0
194
+ }))), Re = i(() => n(D.value?.start, {}, v({
190
195
  "flex min-w-72 flex-1 flex-col px-2.5": !0,
191
- "pb-2.5": !X.value,
192
- [E.value.start ?? ""]: !0
193
- }))), Pe = r(() => n(T.value?.end, {}, g({
196
+ "pb-2.5": !Z.value,
197
+ [O.value.start ?? ""]: !0
198
+ }))), ze = i(() => n(D.value?.end, {}, v({
194
199
  "flex min-w-72 flex-1 flex-col px-2.5 pb-2.5": !0,
195
- [E.value.end ?? ""]: !0
196
- }))), Fe = r(() => g({ "absolute inset-0 z-10 flex flex-col bg-white p-2.5 dark:bg-dark-800": !0 })), Z = r(() => n(T.value?.selector, {
200
+ [O.value.end ?? ""]: !0
201
+ }))), Be = i(() => v({ "absolute inset-0 z-10 flex flex-col bg-white p-2.5 dark:bg-dark-800": !0 })), Q = i(() => n(D.value?.selector, {
197
202
  type: "button",
198
- disabled: C.value.disabled
199
- }, g({
203
+ disabled: E.value.disabled
204
+ }, v({
200
205
  "inline-flex cursor-pointer items-center gap-x-2 px-1.5 py-1 text-sm font-medium text-dark-600 hover:bg-dark-100 focus:outline-none disabled:cursor-not-allowed dark:text-dark-300 dark:hover:bg-dark-800": !0,
201
- [G.value ?? ""]: !0,
202
- [E.value.selector ?? ""]: !0
203
- }))), Q = r(() => n(T.value?.navButton, {
206
+ [W.value ?? ""]: !0,
207
+ [O.value.selector ?? ""]: !0
208
+ }))), $ = i(() => n(D.value?.navButton, {
204
209
  type: "button",
205
- disabled: C.value.disabled
206
- }, g({
210
+ disabled: E.value.disabled
211
+ }, v({
207
212
  "inline-flex size-8 shrink-0 cursor-pointer items-center justify-center text-dark-600 hover:bg-dark-100 disabled:cursor-not-allowed dark:text-dark-300 dark:hover:bg-dark-800": !0,
208
- [G.value ?? ""]: !0,
209
- [E.value.navButton ?? ""]: !0
210
- }))), Ie = r(() => I.value === "year" ? x("Previous years") : I.value === "month" ? x("Previous year") : x("Previous month")), Le = r(() => I.value === "year" ? x("Next years") : I.value === "month" ? x("Next year") : x("Next month")), $ = r(() => n(T.value?.previousButton, {
211
- ...Q.value,
212
- onClick: ve,
213
+ [W.value ?? ""]: !0,
214
+ [O.value.navButton ?? ""]: !0
215
+ }))), Ve = i(() => w(f(R.value, -1))), He = i(() => w(f(R.value, 1))), Ue = i(() => n(D.value?.previousButton, {
216
+ ...$.value,
217
+ onClick: Ce,
213
218
  type: "button",
214
- disabled: C.value.disabled,
215
- "aria-label": Ie.value
216
- }, g({ [E.value.navButton ?? ""]: !0 }))), Re = r(() => n(T.value?.nextButton, {
217
- ...Q.value,
218
- onClick: ye,
219
+ disabled: E.value.disabled,
220
+ "aria-label": Ve.value
221
+ }, v({ [O.value.navButton ?? ""]: !0 }))), We = i(() => n(D.value?.nextButton, {
222
+ ...$.value,
223
+ onClick: we,
219
224
  type: "button",
220
- disabled: C.value.disabled,
221
- "aria-label": Le.value
222
- }, g({ [E.value.navButton ?? ""]: !0 }))), ze = r(() => n(T.value?.todayButton, {
223
- onClick: be,
225
+ disabled: E.value.disabled,
226
+ "aria-label": He.value
227
+ }, v({ [O.value.navButton ?? ""]: !0 }))), Ge = i(() => n(D.value?.todayButton, {
228
+ onClick: Te,
224
229
  type: "button",
225
- disabled: C.value.disabled,
226
- "aria-label": x("Today")
227
- }, g({
230
+ disabled: E.value.disabled,
231
+ "aria-label": w("Today")
232
+ }, v({
228
233
  "inline-flex size-8 shrink-0 cursor-pointer items-center justify-center hover:bg-dark-100 disabled:cursor-not-allowed dark:hover:bg-dark-800": !0,
229
- [G.value ?? ""]: !0,
230
- [E.value.navButton ?? ""]: !0
231
- }))), Be = r(() => n(T.value?.selector, void 0, {
232
- ...Z.value,
233
- onClick: me,
234
+ [W.value ?? ""]: !0,
235
+ [O.value.navButton ?? ""]: !0
236
+ }))), Ke = i(() => n(D.value?.selector, void 0, {
237
+ ...Q.value,
238
+ onClick: be,
234
239
  type: "button",
235
- "aria-label": x("Select year"),
236
- disabled: C.value.disabled || f({
237
- granularity: F.value,
238
- hideYears: C.value.hideYears
240
+ "aria-label": w("Select year"),
241
+ disabled: E.value.disabled || h({
242
+ granularity: L.value,
243
+ hideYears: E.value.hideYears
239
244
  })
240
- })), Ve = r(() => ({
241
- ...n(T.value?.selector, void 0, {
242
- ...Z.value,
245
+ })), qe = i(() => ({
246
+ ...n(D.value?.selector, void 0, {
247
+ ...Q.value,
243
248
  type: "button",
244
- "aria-label": x("Select month"),
245
- disabled: C.value.disabled || d({
246
- granularity: F.value,
247
- hideMonths: C.value.hideMonths
249
+ "aria-label": w("Select month"),
250
+ disabled: E.value.disabled || m({
251
+ granularity: L.value,
252
+ hideMonths: E.value.hideMonths
248
253
  })
249
254
  }),
250
- onClick: Y
251
- })), He = r(() => ({
252
- ...n(T.value?.selector, void 0, {
253
- ...Z.value,
255
+ onClick: X
256
+ })), Je = i(() => ({
257
+ ...n(D.value?.selector, void 0, {
258
+ ...Q.value,
254
259
  type: "button",
255
- "aria-label": x("Select end month"),
256
- disabled: C.value.disabled || d({
257
- granularity: F.value,
258
- hideMonths: C.value.hideMonths
260
+ "aria-label": w("Select end month"),
261
+ disabled: E.value.disabled || m({
262
+ granularity: L.value,
263
+ hideMonths: E.value.hideMonths
259
264
  })
260
265
  }),
261
- onClick: Y
262
- })), Ue = r(() => !f({
263
- granularity: F.value,
264
- hideYears: C.value.hideYears
265
- })), We = r(() => !d({
266
- granularity: F.value,
267
- hideMonths: C.value.hideMonths
266
+ onClick: X
267
+ })), Ye = i(() => !h({
268
+ granularity: L.value,
269
+ hideYears: E.value.hideYears
270
+ })), Xe = i(() => !m({
271
+ granularity: L.value,
272
+ hideMonths: E.value.hideMonths
268
273
  }));
269
274
  return {
270
- view: I,
271
- model: v,
272
- shared: Te,
273
- merged: C,
274
- showNav: r(() => !0),
275
- endBind: Pe,
276
- rootBind: Ee,
277
- bodyBind: je,
278
- viewDate: L,
279
- viewYear: H,
280
- startBind: Ne,
281
- viewMonth: U,
282
- yearLabel: B,
283
- monthLabel: V,
284
- headerBind: De,
285
- monthsBind: Oe,
286
- panelsBind: Me,
287
- isVertical: X,
288
- endViewDate: R,
289
- previewDate: z,
290
- setViewDate: q,
291
- navIconBind: r(() => T.value?.navIcon),
292
- granularity: F,
293
- handleChange: J,
294
- yearPageSize: 15,
295
- endMonthLabel: pe,
296
- endHeaderBind: Ae,
297
- monthYearBind: Fe,
298
- nextButtonBind: Re,
299
- monthPanelYear: Ce,
300
- startHeaderBind: ke,
301
- todayButtonBind: ze,
302
- monthPanelValue: we,
303
- yearSelectorBind: Be,
304
- handleYearSelect: xe,
305
- showYearSelector: Ue,
306
- monthSelectorBind: Ve,
307
- handleMonthSelect: Se,
308
- showMonthSelector: We,
309
- previousButtonBind: $,
310
- endMonthSelectorBind: He,
311
- handleEndViewDateChange: ge,
312
- handlePreviewDateChange: _e,
313
- handleStartViewDateChange: he,
314
- yearPageStart: W
275
+ view: R,
276
+ model: b,
277
+ shared: Ae,
278
+ merged: E,
279
+ showNav: i(() => !0),
280
+ endBind: ze,
281
+ rootBind: je,
282
+ bodyBind: Ie,
283
+ viewDate: z,
284
+ viewYear: V,
285
+ startBind: Re,
286
+ viewMonth: H,
287
+ yearLabel: _e,
288
+ monthLabel: ve,
289
+ headerBind: Me,
290
+ monthsBind: Ne,
291
+ panelsBind: Le,
292
+ isVertical: Z,
293
+ endViewDate: B,
294
+ previewDate: ge,
295
+ setViewDate: K,
296
+ navIconBind: i(() => D.value?.navIcon),
297
+ granularity: L,
298
+ handleChange: q,
299
+ endMonthLabel: ye,
300
+ endHeaderBind: Fe,
301
+ monthYearBind: Be,
302
+ nextButtonBind: We,
303
+ monthPanelYear: Oe,
304
+ startHeaderBind: Pe,
305
+ todayButtonBind: Ge,
306
+ monthPanelValue: ke,
307
+ yearSelectorBind: Ke,
308
+ handleYearSelect: Ee,
309
+ showYearSelector: Ye,
310
+ monthSelectorBind: qe,
311
+ handleMonthSelect: De,
312
+ showMonthSelector: Xe,
313
+ previousButtonBind: Ue,
314
+ endMonthSelectorBind: Je,
315
+ handleEndViewDateChange: Se,
316
+ handlePreviewDateChange: J,
317
+ handleStartViewDateChange: xe,
318
+ yearPageStart: U,
319
+ yearPageSize: ie
315
320
  };
316
321
  }
317
322
  //#endregion
318
- export { _ as useCalendarRange };
323
+ export { y as useCalendarRange };
@@ -7,6 +7,11 @@ var l = /*@__PURE__*/ i({
7
7
  __name: "ChartBar",
8
8
  props: {
9
9
  categories: {},
10
+ categoryColors: { type: [
11
+ Boolean,
12
+ Array,
13
+ Object
14
+ ] },
10
15
  formatDate: {},
11
16
  formatLabel: {},
12
17
  labels: {
@@ -1,7 +1,7 @@
1
1
  import { HTMLAttributes } from 'vue';
2
2
  import { ChartOrientation } from '@bridge-ui/core/Domain';
3
3
  import { MergeHtmlProps } from '@bridge-ui/core/Utils';
4
- import { ChartRootOwnProps } from '../../Utils/Charts';
4
+ import { ChartCategoryColors, ChartRootOwnProps } from '../../Utils/Charts';
5
5
  /**
6
6
  * Bar chart root. Compose with `ChartBarSeries` (and `ChartLineSeries` for
7
7
  * bar + line charts), `ChartAxis`, `ChartLegend`, and `ChartTooltip`. The
@@ -13,6 +13,16 @@ export interface ChartBarOwnProps extends ChartRootOwnProps {
13
13
  * Each series has one value per category.
14
14
  */
15
15
  categories: Date[] | string[];
16
+ /**
17
+ * Gives each category its own bar color: `true` takes palette entries in
18
+ * category order, an array follows the category order, and a record maps
19
+ * category labels. Every bar series in a category shares the color (use
20
+ * `tone` to tell them apart); the legend shows each series in a neutral
21
+ * color. `ChartLineSeries` keep their own color.
22
+ *
23
+ * @default undefined
24
+ */
25
+ categoryColors?: ChartCategoryColors;
16
26
  /**
17
27
  * Formats date categories in the tooltip, data table, and summary.
18
28
  * Time axis ticks use `ChartAxis` `formatTick` (it receives the timestamp).
@@ -1,11 +1,11 @@
1
- import { mountEchartsBar as e } from "../../../Utils/Charts/echarts/bar.js";
2
- import { useChartCartesian as t } from "../../../Utils/Charts/useChartCartesian.js";
1
+ import { useChartCartesian as e } from "../../../Utils/Charts/useChartCartesian.js";
2
+ import { mountEchartsBar as t } from "@bridge-ui/core/Integrations/Echarts";
3
3
  //#region src/Components/ChartBar/composables/useChartBar.ts
4
4
  function n(n, r) {
5
- return t(n, {
5
+ return e(n, {
6
6
  libDefaults: r,
7
7
  kind: "bar",
8
- mount: e,
8
+ mount: t,
9
9
  componentName: "ChartBar"
10
10
  });
11
11
  }
@@ -1,4 +1,4 @@
1
1
  export type { ChartBarOwnProps, ChartBarProps, } from './chartBar.types';
2
2
  export { default as ChartBar } from './ChartBar.vue';
3
3
  export { useChartBar } from './composables/useChartBar';
4
- export { useChartContext, type ChartClasses, type ChartColorOverrides, type ChartColorValue, type ChartContextValue, type ChartCustomProps, type ChartSizeOverrides, type ChartSlots, } from '../../Utils/Charts';
4
+ export { useChartContext, type ChartCategoryColors, type ChartClasses, type ChartColorOverrides, type ChartColorValue, type ChartContextValue, type ChartCustomProps, type ChartSizeOverrides, type ChartSlots, } from '../../Utils/Charts';
@@ -8,6 +8,8 @@ var i = {
8
8
  __name: "ChartBarSeries",
9
9
  props: {
10
10
  color: {},
11
+ colorBy: {},
12
+ colorRanges: {},
11
13
  data: {},
12
14
  labels: {
13
15
  type: Boolean,
@@ -15,7 +17,8 @@ var i = {
15
17
  },
16
18
  name: {},
17
19
  reference: {},
18
- stack: {}
20
+ stack: {},
21
+ tone: {}
19
22
  },
20
23
  setup(n) {
21
24
  return e(n), (e, n) => (r(), t("span", i));