@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,5 +1,5 @@
1
- import { ChartDatum, ChartReference } from '@bridge-ui/core/Domain';
2
- import { ChartColorValue } from '../../Utils/Charts';
1
+ import { ChartColorRangeAxis, ChartDatum, ChartReference, ChartTone } from '@bridge-ui/core/Domain';
2
+ import { ChartColorRangeOption, ChartColorValue } from '../../Utils/Charts';
3
3
  /**
4
4
  * One bar series registered on the nearest `ChartBar`. Renders nothing.
5
5
  * Unset options fall back to the `ChartBar` props.
@@ -11,6 +11,21 @@ export interface ChartBarSeriesOwnProps {
11
11
  * @default undefined
12
12
  */
13
13
  color?: ChartColorValue;
14
+ /**
15
+ * What `colorRanges` match: each bar's value, or its category index.
16
+ *
17
+ * @default "value"
18
+ */
19
+ colorBy?: ChartColorRangeAxis;
20
+ /**
21
+ * Recolors single bars: values in `[min, max)` take the range color.
22
+ * With `colorBy="category"`, `min` and `max` are category indices (both
23
+ * included). Ranges win over `ChartBar` `categoryColors`. Range labels
24
+ * show in the tooltip and data table.
25
+ *
26
+ * @default undefined
27
+ */
28
+ colorRanges?: ChartColorRangeOption[];
14
29
  /**
15
30
  * One value per `ChartBar` category. `null` leaves the slot empty.
16
31
  */
@@ -38,6 +53,13 @@ export interface ChartBarSeriesOwnProps {
38
53
  * @default ChartBar `stack`
39
54
  */
40
55
  stack?: string;
56
+ /**
57
+ * `muted` mixes every bar color toward the background (a comparison or
58
+ * past period next to a `solid` series).
59
+ *
60
+ * @default "solid"
61
+ */
62
+ tone?: ChartTone;
41
63
  }
42
64
  /**
43
65
  * `ChartBarSeries` has no DOM element, so it takes no HTML attributes.
@@ -7,11 +7,14 @@ function r(r) {
7
7
  componentName: "ChartBarSeries",
8
8
  entry: () => ({
9
9
  kind: "bar",
10
+ tone: r.tone,
10
11
  name: r.name,
11
12
  data: r.data,
12
13
  color: r.color,
13
14
  stack: r.stack,
14
15
  labels: r.labels,
16
+ colorBy: r.colorBy,
17
+ colorRanges: r.colorRanges,
15
18
  reference: n(r.reference) ? void 0 : t(r.reference)
16
19
  })
17
20
  }) };
@@ -1,3 +1,4 @@
1
1
  export type { ChartBarSeriesOwnProps, ChartBarSeriesProps, } from './chartBarSeries.types';
2
2
  export { default as ChartBarSeries } from './ChartBarSeries.vue';
3
3
  export { useChartBarSeries } from './composables/useChartBarSeries';
4
+ export type { ChartColorRangeOption } from '../../Utils/Charts';
@@ -1,8 +1,8 @@
1
1
  import { chartRootBridgeKeys as e, useChartRoot as t } from "../../../Utils/Charts/useChartRoot.js";
2
- import { mountEchartsFunnel as n } from "../../../Utils/Charts/echarts/funnel.js";
3
- import { useChartPart as r } from "../../../Utils/Charts/useChartPart.js";
4
- import { computed as i } from "vue";
5
- import { getChartFunnelPercents as a, getChartFunnelSummaryParams as o, sortChartStages as s } from "@bridge-ui/core/Domain";
2
+ import { useChartPart as n } from "../../../Utils/Charts/useChartPart.js";
3
+ import { computed as r } from "vue";
4
+ import { getChartFunnelPercents as i, getChartFunnelSummaryParams as a, sortChartStages as o } from "@bridge-ui/core/Domain";
5
+ import { mountEchartsFunnel as s } from "@bridge-ui/core/Integrations/Echarts";
6
6
  //#region src/Components/ChartFunnel/composables/useChartFunnel.ts
7
7
  var c = [
8
8
  ...e,
@@ -30,9 +30,9 @@ function u(e, u) {
30
30
  componentName: "ChartFunnel",
31
31
  bridgeKeys: c,
32
32
  registryKeys: l
33
- }), { merged: f, locale: p, resolveMessage: m } = d, h = i(() => f.value.labels ?? !0);
33
+ }), { merged: f, locale: p, resolveMessage: m } = d, h = r(() => f.value.labels ?? !0);
34
34
  function g(e) {
35
- return s(e, f.value.sort ?? "descending");
35
+ return o(e, f.value.sort ?? "descending");
36
36
  }
37
37
  function _(e) {
38
38
  return {
@@ -43,22 +43,22 @@ function u(e, u) {
43
43
  };
44
44
  }
45
45
  function v(e) {
46
- return m("Funnel chart with {{count}} stages, from {{first}} ({{firstValue}}) to {{last}} ({{lastValue}}).", o({
46
+ return m("Funnel chart with {{count}} stages, from {{first}} ({{firstValue}}) to {{last}} ({{lastValue}}).", a({
47
47
  slices: e,
48
48
  locale: p.value
49
49
  }));
50
50
  }
51
51
  return {
52
- ...r(d, {
52
+ ...n(d, {
53
53
  order: g,
54
54
  summary: v,
55
55
  buildOptions: _,
56
56
  family: "funnel",
57
57
  positiveOnly: !1,
58
58
  data: () => e.data,
59
- mount: n,
59
+ mount: s,
60
60
  labels: () => h.value,
61
- percents: a,
61
+ percents: i,
62
62
  labelContent: () => e.labelContent
63
63
  }),
64
64
  merged: f
@@ -10,6 +10,7 @@ var l = /*@__PURE__*/ i({
10
10
  type: Boolean,
11
11
  default: void 0
12
12
  },
13
+ areaOpacity: {},
13
14
  categories: {},
14
15
  curve: {},
15
16
  formatDate: {},
@@ -13,6 +13,13 @@ export interface ChartLineOwnProps extends ChartRootOwnProps {
13
13
  * @default false
14
14
  */
15
15
  area?: boolean;
16
+ /**
17
+ * Opacity (`0`–`1`) of the area fill for every series (per-series
18
+ * `areaOpacity` wins).
19
+ *
20
+ * @default 0.15
21
+ */
22
+ areaOpacity?: number;
16
23
  /**
17
24
  * Category labels, or dates for a time axis (points spaced by time).
18
25
  * Each series has one value per category.
@@ -1,5 +1,5 @@
1
1
  import { useChartCartesian as e } from "../../../Utils/Charts/useChartCartesian.js";
2
- import { mountEchartsLine as t } from "../../../Utils/Charts/echarts/line.js";
2
+ import { mountEchartsLine as t } from "@bridge-ui/core/Integrations/Echarts";
3
3
  //#region src/Components/ChartLine/composables/useChartLine.ts
4
4
  function n(n, r) {
5
5
  return e(n, {
@@ -11,7 +11,10 @@ var i = {
11
11
  type: Boolean,
12
12
  default: void 0
13
13
  },
14
+ areaOpacity: {},
14
15
  color: {},
16
+ colorBy: {},
17
+ colorRanges: {},
15
18
  curve: {},
16
19
  dashed: {
17
20
  type: Boolean,
@@ -1,5 +1,5 @@
1
- import { ChartCurve, ChartDatum, ChartReference, ChartStep } from '@bridge-ui/core/Domain';
2
- import { ChartColorValue } from '../../Utils/Charts';
1
+ import { ChartColorRangeAxis, ChartCurve, ChartDatum, ChartReference, ChartStep } from '@bridge-ui/core/Domain';
2
+ import { ChartColorRangeOption, ChartColorValue } from '../../Utils/Charts';
3
3
  /**
4
4
  * One line registered on the nearest `ChartLine`, or drawn over the bars of
5
5
  * a `ChartBar`. Renders nothing. Unset options fall back to the root props.
@@ -11,12 +11,33 @@ export interface ChartLineSeriesOwnProps {
11
11
  * @default ChartLine `area`
12
12
  */
13
13
  area?: boolean;
14
+ /**
15
+ * Opacity (`0`–`1`) of the area fill.
16
+ *
17
+ * @default ChartLine `areaOpacity` (0.15)
18
+ */
19
+ areaOpacity?: number;
14
20
  /**
15
21
  * Series color (token key or CSS color). Falls back to the palette.
16
22
  *
17
23
  * @default undefined
18
24
  */
19
25
  color?: ChartColorValue;
26
+ /**
27
+ * What `colorRanges` match: each point's value, or its category index.
28
+ *
29
+ * @default "value"
30
+ */
31
+ colorBy?: ChartColorRangeAxis;
32
+ /**
33
+ * Recolors the line (and its area) piece by piece: values in
34
+ * `[min, max)` take the range color. With `colorBy="category"`, `min`
35
+ * and `max` are category indices (both included). Points outside every
36
+ * range keep `color`. Range labels show in the tooltip and data table.
37
+ *
38
+ * @default undefined
39
+ */
40
+ colorRanges?: ChartColorRangeOption[];
20
41
  /**
21
42
  * Line interpolation.
22
43
  *
@@ -16,7 +16,10 @@ function r(r) {
16
16
  stack: r.stack,
17
17
  dashed: r.dashed,
18
18
  labels: r.labels,
19
+ colorBy: r.colorBy,
19
20
  showPoints: r.showPoints,
21
+ areaOpacity: r.areaOpacity,
22
+ colorRanges: r.colorRanges,
20
23
  reference: n(r.reference) ? void 0 : t(r.reference)
21
24
  })
22
25
  }) };
@@ -1,3 +1,4 @@
1
1
  export type { ChartLineSeriesOwnProps, ChartLineSeriesProps, } from './chartLineSeries.types';
2
2
  export { default as ChartLineSeries } from './ChartLineSeries.vue';
3
3
  export { useChartLineSeries } from './composables/useChartLineSeries';
4
+ export type { ChartColorRangeOption } from '../../Utils/Charts';
@@ -6,6 +6,7 @@ var l = /*@__PURE__*/ i({
6
6
  inheritAttrs: !1,
7
7
  __name: "ChartPie",
8
8
  props: {
9
+ cornerRadius: {},
9
10
  data: {},
10
11
  labelContent: {},
11
12
  labelPosition: {},
@@ -15,6 +16,8 @@ var l = /*@__PURE__*/ i({
15
16
  },
16
17
  maxSlices: {},
17
18
  minAngle: {},
19
+ padAngle: {},
20
+ rose: {},
18
21
  thickness: {},
19
22
  variant: {},
20
23
  animation: {
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes, Slot } from 'vue';
2
- import { ChartLabelContent, ChartLabelPosition, ChartPieVariant, ChartSlice } from '@bridge-ui/core/Domain';
2
+ import { ChartLabelContent, ChartLabelPosition, ChartPieRose, ChartPieVariant, ChartSlice } from '@bridge-ui/core/Domain';
3
3
  import { MergeHtmlProps } from '@bridge-ui/core/Utils';
4
4
  import { ChartColorValue, ChartRootOwnProps, ChartSlots } from '../../Utils/Charts';
5
5
  /**
@@ -7,6 +7,12 @@ import { ChartColorValue, ChartRootOwnProps, ChartSlots } from '../../Utils/Char
7
7
  * `ChartLegend` and `ChartTooltip`.
8
8
  */
9
9
  export interface ChartPieOwnProps extends ChartRootOwnProps {
10
+ /**
11
+ * Slice corner radius (px).
12
+ *
13
+ * @default 0 (2 for `donut`)
14
+ */
15
+ cornerRadius?: number;
10
16
  /**
11
17
  * Slices in order. Non-positive values are skipped.
12
18
  */
@@ -42,6 +48,19 @@ export interface ChartPieOwnProps extends ChartRootOwnProps {
42
48
  * @default 2
43
49
  */
44
50
  minAngle?: number;
51
+ /**
52
+ * Gap angle (deg) between slices.
53
+ *
54
+ * @default 0 (1 for `donut`)
55
+ */
56
+ padAngle?: number;
57
+ /**
58
+ * Nightingale (rose) pie: each slice radius shows its value. `radius`
59
+ * keeps the angle as the share; `area` gives every slice the same angle.
60
+ *
61
+ * @default undefined
62
+ */
63
+ rose?: ChartPieRose;
45
64
  /**
46
65
  * Donut ring thickness as a fraction of the radius (`0`–`1`).
47
66
  *
@@ -1,7 +1,7 @@
1
1
  import { ChartPieRenderOptions } from '@bridge-ui/core/Domain';
2
2
  import { ChartPieOwnProps } from '../chartPie.types';
3
3
  import { ChartRootMerged } from '../../../Utils/Charts';
4
- type ChartPieMerged = ChartRootMerged & Pick<ChartPieOwnProps, "labels" | "variant" | "minAngle" | "thickness" | "labelPosition">;
4
+ type ChartPieMerged = ChartRootMerged & Pick<ChartPieOwnProps, "rose" | "labels" | "variant" | "minAngle" | "padAngle" | "thickness" | "cornerRadius" | "labelPosition">;
5
5
  export declare function useChartPie(props: ChartPieOwnProps, libDefaults: Partial<ChartPieMerged>): {
6
6
  merged: import('vue').ComputedRef<ChartPieMerged>;
7
7
  variant: import('vue').ComputedRef<import('@bridge-ui/core/Domain').ChartPieVariant>;
@@ -1,71 +1,81 @@
1
1
  import { chartRootBridgeKeys as e, useChartRoot as t } from "../../../Utils/Charts/useChartRoot.js";
2
2
  import { useChartPart as n } from "../../../Utils/Charts/useChartPart.js";
3
- import { mountEchartsPie as r } from "../../../Utils/Charts/echarts/pie.js";
4
- import { computed as i } from "vue";
5
- import { DEFAULT_CHART_DONUT_THICKNESS as a, DEFAULT_CHART_MIN_ANGLE as o, getChartPiePercents as s, getChartPieSummaryParams as c } from "@bridge-ui/core/Domain";
3
+ import { computed as r } from "vue";
4
+ import { DEFAULT_CHART_DONUT_THICKNESS as i, DEFAULT_CHART_MIN_ANGLE as a, getChartPiePercents as o, getChartPieSliceDefaults as s, getChartPieSummaryParams as c } from "@bridge-ui/core/Domain";
5
+ import { mountEchartsPie as l } from "@bridge-ui/core/Integrations/Echarts";
6
6
  //#region src/Components/ChartPie/composables/useChartPie.ts
7
- var l = [
7
+ var u = [
8
8
  ...e,
9
9
  "data",
10
+ "rose",
10
11
  "labels",
11
12
  "variant",
12
13
  "minAngle",
14
+ "padAngle",
13
15
  "maxSlices",
14
16
  "thickness",
17
+ "cornerRadius",
15
18
  "labelContent",
16
19
  "labelPosition"
17
- ], u = [
20
+ ], d = [
21
+ "rose",
18
22
  "size",
19
23
  "height",
20
24
  "labels",
21
25
  "classes",
22
26
  "variant",
23
27
  "minAngle",
28
+ "padAngle",
24
29
  "animation",
25
30
  "thickness",
26
31
  "customProps",
32
+ "cornerRadius",
27
33
  "labelPosition"
28
34
  ];
29
- function d(e, d) {
30
- let f = t({
35
+ function f(e, f) {
36
+ let p = t({
31
37
  props: e,
32
- libDefaults: d,
38
+ libDefaults: f,
33
39
  componentName: "ChartPie",
34
- bridgeKeys: l,
35
- registryKeys: u
36
- }), { merged: p, locale: m, resolveMessage: h } = f, g = i(() => p.value.variant ?? "pie"), _ = i(() => p.value.labels ?? !1);
37
- function v(e) {
40
+ bridgeKeys: u,
41
+ registryKeys: d
42
+ }), { merged: m, locale: h, resolveMessage: g } = p, _ = r(() => m.value.variant ?? "pie"), v = r(() => m.value.labels ?? !1);
43
+ function y(e) {
44
+ let t = s(_.value);
38
45
  return {
39
46
  ...e,
40
- labels: _.value,
41
- variant: g.value,
42
- labelPosition: p.value.labelPosition ?? "outside",
43
- minAngle: p.value.minAngle ?? o,
44
- thickness: p.value.thickness ?? a
47
+ labels: v.value,
48
+ variant: _.value,
49
+ rose: m.value.rose ?? null,
50
+ labelPosition: m.value.labelPosition ?? "outside",
51
+ padAngle: m.value.padAngle ?? t.padAngle,
52
+ minAngle: m.value.minAngle ?? a,
53
+ thickness: m.value.thickness ?? i,
54
+ cornerRadius: m.value.cornerRadius ?? t.cornerRadius
45
55
  };
46
56
  }
47
- function y(e) {
48
- return h("Pie chart with {{count}} slices: {{items}}.", c({
57
+ function b(e) {
58
+ return g("Pie chart with {{count}} slices: {{items}}.", c({
49
59
  slices: e,
50
- locale: m.value
60
+ locale: h.value
51
61
  }));
52
62
  }
53
63
  return {
54
- ...n(f, {
55
- summary: y,
56
- buildOptions: v,
64
+ ...n(p, {
65
+ summary: b,
66
+ buildOptions: y,
57
67
  family: "pie",
58
68
  positiveOnly: !0,
59
- mount: r,
69
+ mount: l,
60
70
  data: () => e.data,
61
- labels: () => _.value,
62
- percents: s,
71
+ labels: () => v.value,
72
+ percents: o,
63
73
  maxSlices: () => e.maxSlices,
64
74
  labelContent: () => e.labelContent
65
75
  }),
66
- merged: p,
67
- variant: g
76
+ merged: m,
77
+ variant: _
68
78
  };
69
79
  }
70
80
  //#endregion
71
- export { d as useChartPie };
81
+ export { f as useChartPie };
@@ -1,15 +1,15 @@
1
1
  import { useChartRegistry as e } from "../../../Utils/Charts/useChartRegistry.js";
2
2
  import { chartRootBridgeKeys as t, toChartLegendItems as n, useChartColors as r, useChartContextValue as i, useChartFrame as a, useChartPlot as o, useChartRoot as s } from "../../../Utils/Charts/useChartRoot.js";
3
- import { mountEchartsScatter as c } from "../../../Utils/Charts/echarts/scatter.js";
4
- import { computed as l } from "vue";
5
- import { isNil as u } from "es-toolkit/compat";
6
- import { DEFAULT_CHART_BUBBLE_SIZE as d, DEFAULT_CHART_SYMBOL_SIZE as f, getChartBubbleSizeDomain as p, getChartScatterPoints as m, getChartScatterTable as h, getChartScatterTooltip as g, isChartScatterEmpty as _ } from "@bridge-ui/core/Domain";
3
+ import { computed as c } from "vue";
4
+ import { isNil as l } from "es-toolkit/compat";
5
+ import { DEFAULT_CHART_BUBBLE_SIZE as u, DEFAULT_CHART_SYMBOL_SIZE as d, getChartBubbleSizeDomain as f, getChartRangeColorItems as p, getChartScatterPoints as m, getChartScatterTable as h, getChartScatterTooltip as g, isChartScatterEmpty as _, resolveChartRangeColors as v } from "@bridge-ui/core/Domain";
6
+ import { mountEchartsScatter as y } from "@bridge-ui/core/Integrations/Echarts";
7
7
  //#region src/Components/ChartScatter/composables/useChartScatter.ts
8
- var v = [
8
+ var b = [
9
9
  ...t,
10
10
  "bubbleSize",
11
11
  "symbolSize"
12
- ], y = [
12
+ ], x = [
13
13
  "size",
14
14
  "height",
15
15
  "classes",
@@ -17,87 +17,92 @@ var v = [
17
17
  "symbolSize",
18
18
  "customProps"
19
19
  ];
20
- function b(t, b) {
21
- let x = s({
20
+ function S(t, S) {
21
+ let C = s({
22
22
  props: t,
23
- libDefaults: b,
23
+ libDefaults: S,
24
24
  componentName: "ChartScatter",
25
- bridgeKeys: v,
26
- registryKeys: y
27
- }), S = e(), { merged: C, hidden: w, locale: T, resolveMessage: E } = x, D = l(() => JSON.stringify(t.bubbleSize ?? C.value.bubbleSize ?? d)), O = l(() => JSON.parse(D.value)), k = r(x, () => S.entries.value), A = l(() => S.entries.value.filter((e) => !w.value.includes(e.id)).map((e) => ({
25
+ bridgeKeys: b,
26
+ registryKeys: x
27
+ }), w = e(), { merged: T, hidden: E, locale: D, resolveMessage: O } = C, k = c(() => JSON.stringify(t.bubbleSize ?? T.value.bubbleSize ?? u)), A = c(() => JSON.parse(k.value)), j = r(C, () => [...w.entries.value, ...p(w.entries.value)]), M = c(() => w.entries.value.filter((e) => !E.value.includes(e.id)).map((e) => ({
28
28
  ...e,
29
- color: k.value[e.id] ?? ""
30
- }))), j = l(() => m(A.value)), M = l(() => {
31
- let e = x.theme.value;
32
- return u(e) ? null : {
29
+ color: j.value[e.id] ?? "",
30
+ colorRanges: v({
31
+ seriesId: e.id,
32
+ colors: j.value,
33
+ ranges: e.colorRanges ?? []
34
+ })
35
+ }))), N = c(() => m(M.value)), P = c(() => {
36
+ let e = C.theme.value;
37
+ return l(e) ? null : {
33
38
  theme: e,
34
- points: j.value,
35
- series: A.value,
36
- bubbleSize: O.value,
37
- animation: x.animation.value,
38
- width: x.plotSize.value.width,
39
- height: x.plotSize.value.height,
40
- xAxis: { ...S.axes.value.x },
41
- yAxis: { ...S.axes.value.y },
42
- sizeDomain: p(A.value),
43
- symbolSize: C.value.symbolSize ?? f
39
+ points: N.value,
40
+ series: M.value,
41
+ bubbleSize: A.value,
42
+ animation: C.animation.value,
43
+ width: C.plotSize.value.width,
44
+ height: C.plotSize.value.height,
45
+ xAxis: { ...w.axes.value.x },
46
+ yAxis: { ...w.axes.value.y },
47
+ sizeDomain: f(M.value),
48
+ symbolSize: T.value.symbolSize ?? d
44
49
  };
45
50
  });
46
- o(x, {
47
- options: M,
48
- mount: c
51
+ o(C, {
52
+ options: P,
53
+ mount: y
49
54
  });
50
- let N = l(() => ({
51
- size: E("Size"),
52
- x: S.axes.value.x?.label ?? "x",
53
- y: S.axes.value.y?.label ?? "y"
54
- })), P = l(() => {
55
- let e = x.active.value.index, t = u(e) ? void 0 : j.value[e], n = u(t) ? void 0 : A.value[t.seriesIndex];
56
- return u(t) || u(n) ? null : g({
55
+ let F = c(() => ({
56
+ size: O("Size"),
57
+ x: w.axes.value.x?.label ?? "x",
58
+ y: w.axes.value.y?.label ?? "y"
59
+ })), I = c(() => {
60
+ let e = C.active.value.index, t = l(e) ? void 0 : N.value[e], n = l(t) ? void 0 : M.value[t.seriesIndex];
61
+ return l(t) || l(n) ? null : g({
57
62
  point: t,
58
63
  series: n,
59
64
  labels: {
60
- ...N.value,
61
- size: n.sizeName ?? N.value.size
65
+ ...F.value,
66
+ size: n.sizeName ?? F.value.size
62
67
  }
63
68
  });
64
69
  });
65
70
  return {
66
- frame: a(x, l(() => {
67
- let e = S.entries.value;
71
+ frame: a(C, c(() => {
72
+ let e = w.entries.value;
68
73
  return {
69
- tooltip: P.value,
70
- count: j.value.length,
74
+ tooltip: I.value,
75
+ count: N.value.length,
71
76
  isEmpty: _(e),
72
- summary: E("Scatter chart with {{count}} series ({{names}}) and {{points}} points.", {
77
+ summary: O("Scatter chart with {{count}} series ({{names}}) and {{points}} points.", {
73
78
  count: e.length,
74
79
  points: m(e).length,
75
80
  names: e.map((e) => e.name).join(", ")
76
81
  }),
77
82
  table: h({
78
83
  series: e,
79
- locale: T.value,
84
+ locale: D.value,
80
85
  headers: {
81
- x: N.value.x,
82
- y: N.value.y,
83
- series: E("Series"),
84
- size: e.find((e) => !u(e.sizeName))?.sizeName ?? N.value.size
86
+ x: F.value.x,
87
+ y: F.value.y,
88
+ series: O("Series"),
89
+ size: e.find((e) => !l(e.sizeName))?.sizeName ?? F.value.size
85
90
  }
86
91
  })
87
92
  };
88
93
  })),
89
- merged: C,
90
- context: i(x, l(() => ({
91
- tooltip: P.value,
92
- setAxis: S.setAxis,
94
+ merged: T,
95
+ context: i(C, c(() => ({
96
+ tooltip: I.value,
97
+ setAxis: w.setAxis,
93
98
  family: "scatter",
94
- removeAxis: S.removeAxis,
95
- upsertSeries: S.upsertSeries,
96
- removeSeries: S.removeSeries,
97
- legendItems: n(S.entries.value, k.value, w.value)
99
+ removeAxis: w.removeAxis,
100
+ upsertSeries: w.upsertSeries,
101
+ removeSeries: w.removeSeries,
102
+ legendItems: n(w.entries.value, j.value, E.value)
98
103
  }))),
99
- options: M
104
+ options: P
100
105
  };
101
106
  }
102
107
  //#endregion
103
- export { b as useChartScatter };
108
+ export { S as useChartScatter };
@@ -8,6 +8,7 @@ var i = {
8
8
  __name: "ChartScatterSeries",
9
9
  props: {
10
10
  color: {},
11
+ colorRanges: {},
11
12
  data: {},
12
13
  name: {},
13
14
  sizeName: {},
@@ -1,5 +1,5 @@
1
1
  import { ChartScatterPoint } from '@bridge-ui/core/Domain';
2
- import { ChartColorValue } from '../../Utils/Charts';
2
+ import { ChartColorRangeOption, ChartColorValue } from '../../Utils/Charts';
3
3
  /**
4
4
  * One group of points registered on the nearest `ChartScatter`.
5
5
  * Renders nothing.
@@ -11,6 +11,13 @@ export interface ChartScatterSeriesOwnProps {
11
11
  * @default undefined
12
12
  */
13
13
  color?: ChartColorValue;
14
+ /**
15
+ * Recolors single points by their `y`: values in `[min, max)` take the
16
+ * range color. Range labels show in the tooltip and data table.
17
+ *
18
+ * @default undefined
19
+ */
20
+ colorRanges?: ChartColorRangeOption[];
14
21
  /**
15
22
  * Points: `[x, y]`, or `[x, y, size]` for bubbles.
16
23
  */
@@ -10,7 +10,8 @@ function t(t) {
10
10
  data: t.data,
11
11
  color: t.color,
12
12
  sizeName: t.sizeName,
13
- symbolSize: t.symbolSize
13
+ symbolSize: t.symbolSize,
14
+ colorRanges: t.colorRanges
14
15
  })
15
16
  }) };
16
17
  }
@@ -1,3 +1,4 @@
1
1
  export type { ChartScatterSeriesOwnProps, ChartScatterSeriesProps, } from './chartScatterSeries.types';
2
2
  export { default as ChartScatterSeries } from './ChartScatterSeries.vue';
3
3
  export { useChartScatterSeries } from './composables/useChartScatterSeries';
4
+ export type { ChartColorRangeOption } from '../../Utils/Charts';
@@ -11,21 +11,25 @@ var g = /*@__PURE__*/ o({
11
11
  formatValue: { type: Function }
12
12
  },
13
13
  setup(o) {
14
- let g = o, _ = h("tooltip"), { isOpen: v, context: y, itemBind: b, rootBind: x, labelBind: S, titleBind: C, valueBind: w, percentBind: T, formatValue: E, formatPercent: D, getSwatchBind: O } = e(g, _);
14
+ let g = o, _ = h("tooltip"), { isOpen: v, context: y, itemBind: b, noteBind: x, rootBind: S, labelBind: C, titleBind: w, valueBind: T, percentBind: E, formatValue: D, formatPercent: O, getSwatchBind: k } = e(g, _);
15
15
  return (e, o) => m(v) && m(y) ? (u(), r("div", c({
16
16
  key: 0,
17
17
  ref: "tooltip"
18
- }, m(x)), [f(e.$slots, "content", l(s(m(y))), () => [m(y).title ? (u(), r("div", l(c({ key: 0 }, m(C))), [m(y).color ? (u(), r("span", l(c({ key: 0 }, m(O)(m(y).color))), null, 16)) : n("", !0), a(" " + p(m(y).title), 1)], 16)) : n("", !0), (u(!0), r(t, null, d(m(y).items, (e) => (u(), r("div", c({ key: e.id }, { ref_for: !0 }, m(b)), [
18
+ }, m(S)), [f(e.$slots, "content", l(s(m(y))), () => [m(y).title ? (u(), r("div", l(c({ key: 0 }, m(w))), [m(y).color ? (u(), r("span", l(c({ key: 0 }, m(k)(m(y).color))), null, 16)) : n("", !0), a(" " + p(m(y).title), 1)], 16)) : n("", !0), (u(!0), r(t, null, d(m(y).items, (e) => (u(), r("div", c({ key: e.id }, { ref_for: !0 }, m(b)), [
19
19
  e.color ? (u(), r("span", c({
20
20
  key: 0,
21
21
  ref_for: !0
22
- }, m(O)(e.color)), null, 16)) : n("", !0),
23
- i("span", c({ ref_for: !0 }, m(S)), p(e.name), 17),
24
- i("span", c({ ref_for: !0 }, m(w)), p(m(E)(e)), 17),
25
- m(D)(e) === null ? n("", !0) : (u(), r("span", c({
22
+ }, m(k)(e.color)), null, 16)) : n("", !0),
23
+ i("span", c({ ref_for: !0 }, m(C)), p(e.name), 17),
24
+ i("span", c({ ref_for: !0 }, m(T)), p(m(D)(e)), 17),
25
+ e.note ? (u(), r("span", c({
26
26
  key: 1,
27
27
  ref_for: !0
28
- }, m(T)), p(m(D)(e)), 17))
28
+ }, m(x)), p(e.note), 17)) : n("", !0),
29
+ m(O)(e) === null ? n("", !0) : (u(), r("span", c({
30
+ key: 2,
31
+ ref_for: !0
32
+ }, m(E)), p(m(O)(e)), 17))
29
33
  ], 16))), 128))])], 16)) : n("", !0);
30
34
  }
31
35
  });