@bridge-ui/vue 0.18.0 → 0.19.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 (69) 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/ChartBar/ChartBar.vue_vue_type_script_setup_true_lang.js +5 -0
  4. package/dist/Components/ChartBar/chartBar.types.d.ts +11 -1
  5. package/dist/Components/ChartBar/index.d.ts +1 -1
  6. package/dist/Components/ChartBarSeries/ChartBarSeries.vue_vue_type_script_setup_true_lang.js +4 -1
  7. package/dist/Components/ChartBarSeries/chartBarSeries.types.d.ts +24 -2
  8. package/dist/Components/ChartBarSeries/composables/useChartBarSeries.js +3 -0
  9. package/dist/Components/ChartBarSeries/index.d.ts +1 -0
  10. package/dist/Components/ChartLine/ChartLine.vue_vue_type_script_setup_true_lang.js +1 -0
  11. package/dist/Components/ChartLine/chartLine.types.d.ts +7 -0
  12. package/dist/Components/ChartLineSeries/ChartLineSeries.vue_vue_type_script_setup_true_lang.js +3 -0
  13. package/dist/Components/ChartLineSeries/chartLineSeries.types.d.ts +23 -2
  14. package/dist/Components/ChartLineSeries/composables/useChartLineSeries.js +3 -0
  15. package/dist/Components/ChartLineSeries/index.d.ts +1 -0
  16. package/dist/Components/ChartPie/ChartPie.vue_vue_type_script_setup_true_lang.js +3 -0
  17. package/dist/Components/ChartPie/chartPie.types.d.ts +20 -1
  18. package/dist/Components/ChartPie/composables/useChartPie.d.ts +1 -1
  19. package/dist/Components/ChartPie/composables/useChartPie.js +35 -25
  20. package/dist/Components/ChartScatter/composables/useChartScatter.js +61 -56
  21. package/dist/Components/ChartScatterSeries/ChartScatterSeries.vue_vue_type_script_setup_true_lang.js +1 -0
  22. package/dist/Components/ChartScatterSeries/chartScatterSeries.types.d.ts +8 -1
  23. package/dist/Components/ChartScatterSeries/composables/useChartScatterSeries.js +2 -1
  24. package/dist/Components/ChartScatterSeries/index.d.ts +1 -0
  25. package/dist/Components/ChartTooltip/ChartTooltip.vue_vue_type_script_setup_true_lang.js +11 -7
  26. package/dist/Components/ChartTooltip/chartTooltip.types.d.ts +4 -0
  27. package/dist/Components/ChartTooltip/composables/useChartTooltip.d.ts +1 -0
  28. package/dist/Components/ChartTooltip/composables/useChartTooltip.js +4 -0
  29. package/dist/Components/Heading/Heading.js +5 -0
  30. package/dist/Components/Heading/Heading.vue.d.ts +11 -0
  31. package/dist/Components/Heading/Heading.vue_vue_type_script_setup_true_lang.js +29 -0
  32. package/dist/Components/Heading/composables/useHeading.d.ts +10 -0
  33. package/dist/Components/Heading/composables/useHeading.js +56 -0
  34. package/dist/Components/Heading/heading.types.d.ts +56 -0
  35. package/dist/Components/Heading/index.d.ts +3 -0
  36. package/dist/Components/Heading/index.js +3 -0
  37. package/dist/Components/Text/Text.js +5 -0
  38. package/dist/Components/Text/Text.vue.d.ts +11 -0
  39. package/dist/Components/Text/Text.vue_vue_type_script_setup_true_lang.js +33 -0
  40. package/dist/Components/Text/composables/useText.d.ts +9 -0
  41. package/dist/Components/Text/composables/useText.js +56 -0
  42. package/dist/Components/Text/index.d.ts +3 -0
  43. package/dist/Components/Text/index.js +3 -0
  44. package/dist/Components/Text/text.types.d.ts +76 -0
  45. package/dist/Utils/Charts/chart.types.d.ts +17 -0
  46. package/dist/Utils/Charts/chartInjectionKey.d.ts +2 -2
  47. package/dist/Utils/Charts/echarts/bar.js +11 -10
  48. package/dist/Utils/Charts/echarts/cartesian.d.ts +2 -2
  49. package/dist/Utils/Charts/echarts/cartesian.js +139 -104
  50. package/dist/Utils/Charts/echarts/line.js +9 -8
  51. package/dist/Utils/Charts/echarts/pie.js +3 -2
  52. package/dist/Utils/Charts/echarts/scatter.js +58 -49
  53. package/dist/Utils/Charts/index.d.ts +1 -1
  54. package/dist/Utils/Charts/useChartCartesian.d.ts +4 -2
  55. package/dist/Utils/Charts/useChartCartesian.js +90 -76
  56. package/dist/augments.d.ts +10 -0
  57. package/dist/index.d.ts +4 -0
  58. package/dist/index.js +90 -86
  59. package/docs/README.md +2 -0
  60. package/docs/components/BridgeUIProvider.md +1 -1
  61. package/docs/components/Card.md +15 -0
  62. package/docs/components/Chart.md +17 -10
  63. package/docs/components/ChartBar.md +70 -17
  64. package/docs/components/ChartLine.md +57 -16
  65. package/docs/components/ChartPie.md +33 -10
  66. package/docs/components/ChartScatter.md +25 -7
  67. package/docs/components/Heading.md +85 -0
  68. package/docs/components/Text.md +118 -0
  69. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: bridge-ui-components
3
3
  description: >-
4
- Use Bridge UI Vue components — Button, ButtonGroup, Avatar, Card, Alert, Accordion, ActionFooter, Badge, Icon,
4
+ Use Bridge UI Vue components — Button, ButtonGroup, Avatar, Card, Alert, Accordion, ActionFooter, Badge, Icon, Text, Heading,
5
5
  Link, List, Table, DataTable, Tabs, Spinner, Skeleton, EmptyState, Sidebar, Progress, Stepper, Carousel, Resizable, ChartLine, ChartBar, ChartScatter, ChartPie, ChartFunnel, Pagination, TextField, Select,
6
6
  Autocomplete, DateField, DatePicker, DateRangeField, DateRangePicker,
7
7
  TimeField, TimePicker, DateTimeField, DateTimePicker, ColorField, ColorPicker,
@@ -16,43 +16,44 @@ In templates, use kebab-case attrs (`start-icon`, `custom-props`, `error-message
16
16
 
17
17
  ## Start here
18
18
 
19
- | Need | Doc |
20
- | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
21
- | Actions | `.ai/docs/components/Button.md`, `ButtonGroup.md` |
22
- | Surfaces / modal body | `.ai/docs/components/Card.md` |
23
- | Avatar | `.ai/docs/components/Avatar.md` |
24
- | Badge | `.ai/docs/components/Badge.md` |
25
- | Alert | `.ai/docs/components/Alert.md` |
26
- | Accordion | `.ai/docs/components/Accordion.md` |
27
- | Action footer | `.ai/docs/components/ActionFooter.md` |
28
- | Stepper | `.ai/docs/components/Stepper.md` |
29
- | Carousel | `.ai/docs/components/Carousel.md` |
30
- | Resizable panels | `.ai/docs/components/Resizable.md` |
31
- | Charts (line, area, sparkline, bar, scatter, pie, donut, funnel) | `.ai/docs/components/Chart.md`, then `ChartLine.md`, `ChartBar.md`, `ChartScatter.md`, `ChartPie.md`, `ChartFunnel.md` |
32
- | Icon | `.ai/docs/components/Icon.md` |
33
- | Lists | `.ai/docs/components/List.md` |
34
- | Table | `.ai/docs/components/Table.md` |
35
- | DataTable | `.ai/docs/components/DataTable.md` |
36
- | Tabs | `.ai/docs/components/Tabs.md` |
37
- | Text input | `.ai/docs/components/TextField.md` |
38
- | Select / autocomplete | `.ai/docs/components/Select.md`, `Autocomplete.md` |
39
- | Sidebar / app shell | `.ai/docs/components/Sidebar.md` |
40
- | Date | `.ai/docs/components/DateField.md`, `DatePicker.md` |
41
- | Date range | `.ai/docs/components/DateRangeField.md`, `DateRangePicker.md` |
42
- | Time | `.ai/docs/components/TimeField.md`, `TimePicker.md` |
43
- | Time range | `.ai/docs/components/TimeRangeField.md`, `TimeRangePicker.md` |
44
- | Date-time | `.ai/docs/components/DateTimeField.md`, `DateTimePicker.md` |
45
- | Date-time range | `.ai/docs/components/DateTimeRangeField.md`, `DateTimeRangePicker.md` |
46
- | Color | `.ai/docs/components/ColorField.md`, `ColorPicker.md` |
47
- | Spinner / skeleton / progress | `.ai/docs/components/Spinner.md`, `Skeleton.md`, `Progress.md` |
48
- | Empty / no data | `.ai/docs/components/EmptyState.md` |
49
- | Scroll fade / scrollbar | `.ai/docs/ScrollUtilities.md` |
50
- | Index | `.ai/docs/README.md` |
19
+ | Need | Doc |
20
+ | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
21
+ | Actions | `.ai/docs/components/Button.md`, `ButtonGroup.md` |
22
+ | Surfaces / modal body | `.ai/docs/components/Card.md` |
23
+ | Avatar | `.ai/docs/components/Avatar.md` |
24
+ | Badge | `.ai/docs/components/Badge.md` |
25
+ | Alert | `.ai/docs/components/Alert.md` |
26
+ | Accordion | `.ai/docs/components/Accordion.md` |
27
+ | Action footer | `.ai/docs/components/ActionFooter.md` |
28
+ | Stepper | `.ai/docs/components/Stepper.md` |
29
+ | Carousel | `.ai/docs/components/Carousel.md` |
30
+ | Resizable panels | `.ai/docs/components/Resizable.md` |
31
+ | Charts (line, area, sparkline, bar, scatter, pie, donut, rose, funnel) | `.ai/docs/components/Chart.md`, then `ChartLine.md`, `ChartBar.md`, `ChartScatter.md`, `ChartPie.md`, `ChartFunnel.md` |
32
+ | Text / headings (tone, color, size) | `.ai/docs/components/Text.md`, `Heading.md` |
33
+ | Icon | `.ai/docs/components/Icon.md` |
34
+ | Lists | `.ai/docs/components/List.md` |
35
+ | Table | `.ai/docs/components/Table.md` |
36
+ | DataTable | `.ai/docs/components/DataTable.md` |
37
+ | Tabs | `.ai/docs/components/Tabs.md` |
38
+ | Text input | `.ai/docs/components/TextField.md` |
39
+ | Select / autocomplete | `.ai/docs/components/Select.md`, `Autocomplete.md` |
40
+ | Sidebar / app shell | `.ai/docs/components/Sidebar.md` |
41
+ | Date | `.ai/docs/components/DateField.md`, `DatePicker.md` |
42
+ | Date range | `.ai/docs/components/DateRangeField.md`, `DateRangePicker.md` |
43
+ | Time | `.ai/docs/components/TimeField.md`, `TimePicker.md` |
44
+ | Time range | `.ai/docs/components/TimeRangeField.md`, `TimeRangePicker.md` |
45
+ | Date-time | `.ai/docs/components/DateTimeField.md`, `DateTimePicker.md` |
46
+ | Date-time range | `.ai/docs/components/DateTimeRangeField.md`, `DateTimeRangePicker.md` |
47
+ | Color | `.ai/docs/components/ColorField.md`, `ColorPicker.md` |
48
+ | Spinner / skeleton / progress | `.ai/docs/components/Spinner.md`, `Skeleton.md`, `Progress.md` |
49
+ | Empty / no data | `.ai/docs/components/EmptyState.md` |
50
+ | Scroll fade / scrollbar | `.ai/docs/ScrollUtilities.md` |
51
+ | Index | `.ai/docs/README.md` |
51
52
 
52
53
  ## Hard rules
53
54
 
54
55
  1. Import from `@bridge-ui/vue/Components/{Name}`.
55
- 2. Prefer Bridge tokens (`color`, `size`, `variant`, `density`) when they exist.
56
+ 2. Prefer Bridge tokens (`color`, `size`, `variant`, `density`) when they exist. For text, use `Text` / `Heading` (`variant="muted"` for secondary text) instead of `text-dark-* dark:text-dark-*` pairs.
56
57
  3. `:classes` / `:custom-props` / named slots follow each component doc.
57
58
  4. Root HTML attributes stay on the component; use `custom-props` for **inner** parts.
58
59
  5. Modal/Drawer content uses **`Card`** — there is no `ModalCard` export.
@@ -30,7 +30,7 @@ npx bridge-ui-vue-ai install
30
30
 
31
31
  ## Hard rules
32
32
 
33
- 1. Tailwind CSS **v4** + `@import "@bridge-ui/vue/theme.css"`.
33
+ 1. Tailwind CSS **v4** + `@import "@bridge-ui/vue/theme.css"`. It also sets the base text color on `body` for light and dark themes.
34
34
  2. Use `app.use(createBridgeUI({ ... }))` and/or `<BridgeUIProvider>`.
35
35
  3. Mount `BridgeUIHosts` when using action hooks (`useDialogAction`, `useModalAction`, `useDrawerAction`, `useSnackbarAction`).
36
36
  4. Semantic icon names, chrome strings, and date libs need `global.icons` / `global.i18n` / `global.dates` — install `@bridge-ui/adapters`, import factories from `@bridge-ui/adapters/vue/{date,icon,i18n}-*`, and install the matching optional peer.
@@ -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,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));
@@ -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';
@@ -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.
@@ -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>;
@@ -2,70 +2,80 @@ import { chartRootBridgeKeys as e, useChartRoot as t } from "../../../Utils/Char
2
2
  import { useChartPart as n } from "../../../Utils/Charts/useChartPart.js";
3
3
  import { mountEchartsPie as r } from "../../../Utils/Charts/echarts/pie.js";
4
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";
5
+ import { DEFAULT_CHART_DONUT_THICKNESS as a, DEFAULT_CHART_MIN_ANGLE as o, getChartPiePercents as s, getChartPieSliceDefaults as c, getChartPieSummaryParams as l } from "@bridge-ui/core/Domain";
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, _ = i(() => m.value.variant ?? "pie"), v = i(() => m.value.labels ?? !1);
43
+ function y(e) {
44
+ let t = c(_.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 ?? o,
53
+ thickness: m.value.thickness ?? a,
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}}.", l({
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
69
  mount: r,
60
70
  data: () => e.data,
61
- labels: () => _.value,
71
+ labels: () => v.value,
62
72
  percents: s,
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 };