@bridge-ui/vue 0.17.3 → 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 (164) hide show
  1. package/ai/skills/bridge-ui-components/SKILL.md +36 -35
  2. package/ai/skills/bridge-ui-setup/SKILL.md +1 -1
  3. package/dist/Components/CalendarMonth/composables/useCalendarMonth.d.ts +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 +64 -0
  11. package/dist/Components/ChartBar/chartBar.types.d.ts +66 -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 +28 -0
  19. package/dist/Components/ChartBarSeries/chartBarSeries.types.d.ts +67 -0
  20. package/dist/Components/ChartBarSeries/composables/useChartBarSeries.d.ts +5 -0
  21. package/dist/Components/ChartBarSeries/composables/useChartBarSeries.js +23 -0
  22. package/dist/Components/ChartBarSeries/index.d.ts +4 -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 +77 -0
  40. package/dist/Components/ChartLine/chartLine.types.d.ts +79 -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 +45 -0
  48. package/dist/Components/ChartLineSeries/chartLineSeries.types.d.ts +96 -0
  49. package/dist/Components/ChartLineSeries/composables/useChartLineSeries.d.ts +5 -0
  50. package/dist/Components/ChartLineSeries/composables/useChartLineSeries.js +28 -0
  51. package/dist/Components/ChartLineSeries/index.d.ts +4 -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 +76 -0
  56. package/dist/Components/ChartPie/chartPie.types.d.ts +92 -0
  57. package/dist/Components/ChartPie/composables/useChartPie.d.ts +30 -0
  58. package/dist/Components/ChartPie/composables/useChartPie.js +81 -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 +108 -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 +22 -0
  72. package/dist/Components/ChartScatterSeries/chartScatterSeries.types.d.ts +45 -0
  73. package/dist/Components/ChartScatterSeries/composables/useChartScatterSeries.d.ts +4 -0
  74. package/dist/Components/ChartScatterSeries/composables/useChartScatterSeries.js +19 -0
  75. package/dist/Components/ChartScatterSeries/index.d.ts +4 -0
  76. package/dist/Components/ChartScatterSeries/index.js +3 -0
  77. package/dist/Components/ChartTooltip/ChartTooltip.vue_vue_type_script_setup_true_lang.js +22 -10
  78. package/dist/Components/ChartTooltip/chartTooltip.types.d.ts +28 -9
  79. package/dist/Components/ChartTooltip/composables/useChartTooltip.d.ts +4 -1
  80. package/dist/Components/ChartTooltip/composables/useChartTooltip.js +81 -63
  81. package/dist/Components/Heading/Heading.js +5 -0
  82. package/dist/Components/Heading/Heading.vue.d.ts +11 -0
  83. package/dist/Components/Heading/Heading.vue_vue_type_script_setup_true_lang.js +29 -0
  84. package/dist/Components/Heading/composables/useHeading.d.ts +10 -0
  85. package/dist/Components/Heading/composables/useHeading.js +56 -0
  86. package/dist/Components/Heading/heading.types.d.ts +56 -0
  87. package/dist/Components/Heading/index.d.ts +3 -0
  88. package/dist/Components/Heading/index.js +3 -0
  89. package/dist/Components/ResizablePanel/composables/useResizablePanel.d.ts +1 -1
  90. package/dist/Components/Spinner/composables/useSpinner.d.ts +1 -1
  91. package/dist/Components/Text/Text.js +5 -0
  92. package/dist/Components/Text/Text.vue.d.ts +11 -0
  93. package/dist/Components/Text/Text.vue_vue_type_script_setup_true_lang.js +33 -0
  94. package/dist/Components/Text/composables/useText.d.ts +9 -0
  95. package/dist/Components/Text/composables/useText.js +56 -0
  96. package/dist/Components/Text/index.d.ts +3 -0
  97. package/dist/Components/Text/index.js +3 -0
  98. package/dist/Components/Text/text.types.d.ts +76 -0
  99. package/dist/Utils/Charts/ChartFrame.js +5 -0
  100. package/dist/Utils/Charts/ChartFrame.vue.d.ts +24 -0
  101. package/dist/Utils/Charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +41 -0
  102. package/dist/{Components/Chart → Utils/Charts}/chart.types.d.ts +33 -18
  103. package/dist/Utils/Charts/chartInjectionKey.d.ts +151 -0
  104. package/dist/{Components/Chart → Utils/Charts}/chartInjectionKey.js +2 -2
  105. package/dist/Utils/Charts/echarts/bar.d.ts +6 -0
  106. package/dist/Utils/Charts/echarts/bar.js +23 -0
  107. package/dist/Utils/Charts/echarts/cartesian.d.ts +15 -0
  108. package/dist/Utils/Charts/echarts/cartesian.js +290 -0
  109. package/dist/Utils/Charts/echarts/funnel.d.ts +15 -0
  110. package/dist/Utils/Charts/echarts/funnel.js +79 -0
  111. package/dist/Utils/Charts/echarts/line.d.ts +5 -0
  112. package/dist/Utils/Charts/echarts/line.js +20 -0
  113. package/dist/Utils/Charts/echarts/part.d.ts +19 -0
  114. package/dist/Utils/Charts/echarts/part.js +45 -0
  115. package/dist/Utils/Charts/echarts/pie.d.ts +14 -0
  116. package/dist/Utils/Charts/echarts/pie.js +76 -0
  117. package/dist/Utils/Charts/echarts/plot.d.ts +44 -0
  118. package/dist/Utils/Charts/echarts/plot.js +52 -0
  119. package/dist/Utils/Charts/echarts/scatter.d.ts +14 -0
  120. package/dist/Utils/Charts/echarts/scatter.js +161 -0
  121. package/dist/Utils/Charts/index.d.ts +6 -0
  122. package/dist/Utils/Charts/index.js +6 -0
  123. package/dist/Utils/Charts/useChartCartesian.d.ts +59 -0
  124. package/dist/Utils/Charts/useChartCartesian.js +169 -0
  125. package/dist/Utils/Charts/useChartPart.d.ts +45 -0
  126. package/dist/Utils/Charts/useChartPart.js +97 -0
  127. package/dist/Utils/Charts/useChartRegistry.d.ts +13 -0
  128. package/dist/Utils/Charts/useChartRegistry.js +40 -0
  129. package/dist/Utils/Charts/useChartRoot.d.ts +156 -0
  130. package/dist/Utils/Charts/useChartRoot.js +342 -0
  131. package/dist/Utils/Charts/useChartSeries.d.ts +10 -0
  132. package/dist/Utils/Charts/useChartSeries.js +22 -0
  133. package/dist/augments.d.ts +33 -7
  134. package/dist/index.d.ts +4 -0
  135. package/dist/index.js +90 -86
  136. package/docs/README.md +8 -1
  137. package/docs/components/BridgeUIProvider.md +1 -1
  138. package/docs/components/Card.md +15 -0
  139. package/docs/components/Chart.md +118 -151
  140. package/docs/components/ChartBar.md +190 -0
  141. package/docs/components/ChartFunnel.md +62 -0
  142. package/docs/components/ChartLine.md +192 -0
  143. package/docs/components/ChartPie.md +138 -0
  144. package/docs/components/ChartScatter.md +102 -0
  145. package/docs/components/Heading.md +85 -0
  146. package/docs/components/Text.md +118 -0
  147. package/package.json +2 -2
  148. package/dist/Components/Chart/Chart.js +0 -5
  149. package/dist/Components/Chart/Chart.vue_vue_type_script_setup_true_lang.js +0 -52
  150. package/dist/Components/Chart/chartInjectionKey.d.ts +0 -94
  151. package/dist/Components/Chart/composables/useChart.d.ts +0 -40
  152. package/dist/Components/Chart/composables/useChart.js +0 -346
  153. package/dist/Components/Chart/echartsChart.d.ts +0 -14
  154. package/dist/Components/Chart/echartsChart.js +0 -199
  155. package/dist/Components/Chart/index.d.ts +0 -4
  156. package/dist/Components/Chart/index.js +0 -4
  157. package/dist/Components/ChartSeries/ChartSeries.js +0 -5
  158. package/dist/Components/ChartSeries/ChartSeries.vue.d.ts +0 -4
  159. package/dist/Components/ChartSeries/ChartSeries.vue_vue_type_script_setup_true_lang.js +0 -24
  160. package/dist/Components/ChartSeries/chartSeries.types.d.ts +0 -37
  161. package/dist/Components/ChartSeries/composables/useChartSeries.d.ts +0 -10
  162. package/dist/Components/ChartSeries/composables/useChartSeries.js +0 -29
  163. package/dist/Components/ChartSeries/index.d.ts +0 -3
  164. package/dist/Components/ChartSeries/index.js +0 -3
@@ -1,8 +1,8 @@
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,
5
- Link, List, Table, DataTable, Tabs, Spinner, Skeleton, EmptyState, Sidebar, Progress, Stepper, Carousel, Resizable, Chart, Pagination, TextField, Select,
4
+ Use Bridge UI Vue components — Button, ButtonGroup, Avatar, Card, Alert, Accordion, ActionFooter, Badge, Icon, Text, Heading,
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,
8
8
  classes, customProps, slots. Use when building UI with Bridge components.
@@ -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
- | Chart | `.ai/docs/components/Chart.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.
@@ -17,7 +17,7 @@ export declare function useCalendarMonth(props: MaybeRefOrGetter<CalendarMonthOw
17
17
  year: import('vue').ComputedRef<number>;
18
18
  merged: import('vue').ComputedRef<CalendarMonthMerged>;
19
19
  months: import('vue').ComputedRef<CalendarMonthCell[]>;
20
- rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<CalendarMonthOwnProps, "error" | "color" | "classes" | "customProps" | "disabled" | "rounded" | "multiple" | "range" | "timeZone" | "readOnly" | "disableDates" | "disableMonths" | "disableYears" | "maxDate" | "minDate" | "previewDate" | "year" | "selection">>>>;
20
+ rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<CalendarMonthOwnProps, "error" | "color" | "classes" | "customProps" | "disabled" | "rounded" | "multiple" | "range" | "timeZone" | "year" | "readOnly" | "disableDates" | "disableMonths" | "disableYears" | "maxDate" | "minDate" | "previewDate" | "selection">>>>;
21
21
  gridBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
22
22
  role: string;
23
23
  onMouseLeave: () => void;
@@ -7,6 +7,7 @@ var i = {
7
7
  }, a = /*@__PURE__*/ n({
8
8
  __name: "ChartAxis",
9
9
  props: {
10
+ formatCategory: {},
10
11
  formatTick: {},
11
12
  grid: {
12
13
  type: Boolean,
@@ -1,18 +1,27 @@
1
1
  import { ChartAxisPosition } from '@bridge-ui/core/Domain';
2
2
  /**
3
- * Axis options for the nearest `Chart`. Renders nothing.
3
+ * Axis options for the nearest `ChartLine`, `ChartBar`, or `ChartScatter`.
4
+ * Renders nothing.
4
5
  */
5
6
  export interface ChartAxisOwnProps {
6
7
  /**
7
- * Formats tick labels. Receives the category (`x`) or value (`y`).
8
+ * Formats category tick labels (the category axis of `ChartLine` and
9
+ * `ChartBar`).
8
10
  *
9
11
  * @default undefined
10
12
  */
11
- formatTick?: (value: number | string) => string;
13
+ formatCategory?: (category: string) => string;
14
+ /**
15
+ * Formats numeric tick labels: the value on a value axis, or the timestamp
16
+ * (ms) on a time axis.
17
+ *
18
+ * @default undefined
19
+ */
20
+ formatTick?: (value: number) => string;
12
21
  /**
13
22
  * Draws grid lines for this axis.
14
23
  *
15
- * @default true for `y`, false for `x`
24
+ * @default true for the value axis, false for the category axis
16
25
  */
17
26
  grid?: boolean;
18
27
  /**
@@ -28,19 +37,20 @@ export interface ChartAxisOwnProps {
28
37
  */
29
38
  label?: string;
30
39
  /**
31
- * Upper bound for the value axis (`y`). The plot picks one when omitted.
40
+ * Upper bound (value or time axis). The plot picks one when omitted.
32
41
  *
33
42
  * @default undefined
34
43
  */
35
44
  max?: number;
36
45
  /**
37
- * Lower bound for the value axis (`y`). The plot picks one when omitted.
46
+ * Lower bound (value or time axis). The plot picks one when omitted.
38
47
  *
39
48
  * @default undefined
40
49
  */
41
50
  min?: number;
42
51
  /**
43
- * Which axis to configure (`x` = categories, `y` = values).
52
+ * Which axis to configure: `x` is horizontal, `y` is vertical. On a
53
+ * horizontal `ChartBar`, categories sit on `y` and values on `x`.
44
54
  */
45
55
  position: ChartAxisPosition;
46
56
  /**
@@ -1,5 +1,5 @@
1
- import { ChartRenderAxis } from '@bridge-ui/core/Domain';
1
+ import { ChartAxisOptions } from '@bridge-ui/core/Domain';
2
2
  import { ChartAxisProps } from '../chartAxis.types';
3
3
  export declare function useChartAxis(props: ChartAxisProps): {
4
- options: import('vue').ComputedRef<Partial<ChartRenderAxis>>;
4
+ options: import('vue').ComputedRef<ChartAxisOptions>;
5
5
  };
@@ -1,28 +1,33 @@
1
- import { useChartContext as e } from "../../Chart/chartInjectionKey.js";
1
+ import { useChartContext as e } from "../../../Utils/Charts/chartInjectionKey.js";
2
2
  import { computed as t, onBeforeUnmount as n, watch as r } from "vue";
3
3
  import { isNil as i, isUndefined as a, omitBy as o } from "es-toolkit/compat";
4
4
  //#region src/Components/ChartAxis/composables/useChartAxis.ts
5
5
  function s(s) {
6
- let c = e();
7
- function l(e) {
6
+ let { setAxis: c, removeAxis: l } = e().value;
7
+ if (i(c) || i(l)) throw Error("ChartAxis must be used within ChartLine, ChartBar, or ChartScatter");
8
+ function u(e) {
8
9
  return s.formatTick?.(e) ?? String(e);
9
10
  }
10
- let u = t(() => !i(s.formatTick)), d = t(() => o({
11
+ function d(e) {
12
+ return s.formatCategory?.(e) ?? e;
13
+ }
14
+ let f = t(() => !i(s.formatTick)), p = t(() => !i(s.formatCategory)), m = t(() => o({
11
15
  max: s.max,
12
16
  min: s.min,
13
17
  grid: s.grid,
14
18
  label: s.label,
15
19
  hidden: s.hidden,
16
20
  tickCount: s.tickCount,
17
- formatTick: u.value ? l : void 0
21
+ formatTick: f.value ? u : void 0,
22
+ formatCategory: p.value ? d : void 0
18
23
  }, a));
19
24
  return r(() => s.position, (e, t) => {
20
- i(t) || c.value.removeAxis(t);
21
- }), r([d, () => s.position], ([e, t]) => {
22
- c.value.setAxis(t, e);
25
+ i(t) || l(t);
26
+ }), r([m, () => s.position], ([e, t]) => {
27
+ c(t, e);
23
28
  }, { immediate: !0 }), n(() => {
24
- c.value.removeAxis(s.position);
25
- }), { options: d };
29
+ l(s.position);
30
+ }), { options: m };
26
31
  }
27
32
  //#endregion
28
33
  export { s as useChartAxis };
@@ -0,0 +1,5 @@
1
+ import e from "./ChartBar.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/Components/ChartBar/ChartBar.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,16 @@
1
+ import { ChartBarOwnProps } from './chartBar.types';
2
+ import { ChartSlots } from '../../Utils/Charts';
3
+ type __VLS_Slots = ChartSlots;
4
+ declare const __VLS_base: import('vue').DefineComponent<ChartBarOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ChartBarOwnProps> & Readonly<{}>, {
5
+ loading: boolean;
6
+ labels: boolean;
7
+ animation: boolean;
8
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
12
+ type __VLS_WithSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };
@@ -0,0 +1,64 @@
1
+ import e from "../../Utils/Charts/ChartFrame.js";
2
+ import { useChartBar as t } from "./composables/useChartBar.js";
3
+ import { createBlock as n, createSlots as r, defineComponent as i, openBlock as a, renderSlot as o, unref as s, withCtx as c } from "vue";
4
+ //#region src/Components/ChartBar/ChartBar.vue?vue&type=script&setup=true&lang.ts
5
+ var l = /*@__PURE__*/ i({
6
+ inheritAttrs: !1,
7
+ __name: "ChartBar",
8
+ props: {
9
+ categories: {},
10
+ categoryColors: { type: [
11
+ Boolean,
12
+ Array,
13
+ Object
14
+ ] },
15
+ formatDate: {},
16
+ formatLabel: {},
17
+ labels: {
18
+ type: Boolean,
19
+ default: void 0
20
+ },
21
+ orientation: {},
22
+ radius: {},
23
+ stack: {},
24
+ animation: {
25
+ type: Boolean,
26
+ default: void 0
27
+ },
28
+ classes: {},
29
+ customProps: {},
30
+ height: {},
31
+ loading: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
35
+ palette: {},
36
+ size: {},
37
+ summary: {},
38
+ width: {}
39
+ },
40
+ setup(i) {
41
+ let { frame: l } = t(i, {
42
+ radius: 4,
43
+ size: "md",
44
+ height: 280,
45
+ labels: !1,
46
+ animation: !0,
47
+ orientation: "vertical"
48
+ });
49
+ return (t, i) => (a(), n(s(e), { frame: s(l) }, r({
50
+ default: c(() => [o(t.$slots, "default")]),
51
+ _: 2
52
+ }, [t.$slots.empty ? {
53
+ name: "empty",
54
+ fn: c(() => [o(t.$slots, "empty")]),
55
+ key: "0"
56
+ } : void 0, t.$slots.loading ? {
57
+ name: "loading",
58
+ fn: c(() => [o(t.$slots, "loading")]),
59
+ key: "1"
60
+ } : void 0]), 1032, ["frame"]));
61
+ }
62
+ });
63
+ //#endregion
64
+ export { l as default };
@@ -0,0 +1,66 @@
1
+ import { HTMLAttributes } from 'vue';
2
+ import { ChartOrientation } from '@bridge-ui/core/Domain';
3
+ import { MergeHtmlProps } from '@bridge-ui/core/Utils';
4
+ import { ChartCategoryColors, ChartRootOwnProps } from '../../Utils/Charts';
5
+ /**
6
+ * Bar chart root. Compose with `ChartBarSeries` (and `ChartLineSeries` for
7
+ * bar + line charts), `ChartAxis`, `ChartLegend`, and `ChartTooltip`. The
8
+ * plot is drawn by ECharts.
9
+ */
10
+ export interface ChartBarOwnProps extends ChartRootOwnProps {
11
+ /**
12
+ * Category labels, or dates for a time axis (bars placed by time).
13
+ * Each series has one value per category.
14
+ */
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;
26
+ /**
27
+ * Formats date categories in the tooltip, data table, and summary.
28
+ * Time axis ticks use `ChartAxis` `formatTick` (it receives the timestamp).
29
+ *
30
+ * @default undefined
31
+ */
32
+ formatDate?: (date: Date) => string;
33
+ /**
34
+ * Formats value labels and reference line labels.
35
+ *
36
+ * @default undefined
37
+ */
38
+ formatLabel?: (value: number) => string;
39
+ /**
40
+ * Shows value labels on every series (per-series `labels` wins).
41
+ *
42
+ * @default false
43
+ */
44
+ labels?: boolean;
45
+ /**
46
+ * `horizontal` puts categories on the `y` axis and values on `x`.
47
+ *
48
+ * @default "vertical"
49
+ */
50
+ orientation?: ChartOrientation;
51
+ /**
52
+ * Corner radius (px) on the value end of each bar. In a stack, only the
53
+ * outermost bar is rounded.
54
+ *
55
+ * @default 4
56
+ */
57
+ radius?: number;
58
+ /**
59
+ * Stacks every bar series under this key (per-series `stack` wins). A
60
+ * `ChartLineSeries` inside stacks only with its own `stack`.
61
+ *
62
+ * @default undefined
63
+ */
64
+ stack?: string;
65
+ }
66
+ export type ChartBarProps = MergeHtmlProps<ChartBarOwnProps, HTMLAttributes>;
@@ -0,0 +1,26 @@
1
+ import { ChartBarOwnProps } from '../chartBar.types';
2
+ import { ChartCartesianMerged } from '../../../Utils/Charts/useChartCartesian';
3
+ export declare function useChartBar(props: ChartBarOwnProps, libDefaults: Partial<ChartCartesianMerged>): {
4
+ frame: {
5
+ label: import('vue').ComputedRef<string>;
6
+ table: import('vue').ComputedRef<import('@bridge-ui/core/Domain').ChartTable>;
7
+ isEmpty: import('vue').ComputedRef<boolean>;
8
+ hostBind: import('vue').ComputedRef<import('vue').HTMLAttributes>;
9
+ plotBind: import('vue').ComputedRef<import('vue').HTMLAttributes>;
10
+ rootBind: import('vue').ComputedRef<import('vue').HTMLAttributes>;
11
+ liveBind: import('vue').ComputedRef<import('vue').HTMLAttributes>;
12
+ emptyBind: import('vue').ComputedRef<import('vue').HTMLAttributes>;
13
+ isLoading: import('vue').ComputedRef<boolean>;
14
+ tableBind: import('vue').ComputedRef<import('vue').HTMLAttributes>;
15
+ centerBind: import('vue').ComputedRef<import('vue').HTMLAttributes>;
16
+ loadingBind: import('vue').ComputedRef<import('vue').HTMLAttributes>;
17
+ announcement: import('vue').ComputedRef<string>;
18
+ emptyMessage: import('vue').ComputedRef<string>;
19
+ rootRef: import('vue').ShallowRef<HTMLDivElement | null, HTMLDivElement | null>;
20
+ plotRef: import('vue').ShallowRef<HTMLDivElement | null, HTMLDivElement | null>;
21
+ hostRef: import('vue').ShallowRef<HTMLDivElement | null, HTMLDivElement | null>;
22
+ };
23
+ merged: import('vue').ComputedRef<ChartCartesianMerged>;
24
+ context: import('vue').ComputedRef<import('..').ChartContextValue>;
25
+ options: import('vue').ComputedRef<import('@bridge-ui/core/Domain').ChartCartesianRenderOptions | null>;
26
+ };
@@ -0,0 +1,13 @@
1
+ import { mountEchartsBar as e } from "../../../Utils/Charts/echarts/bar.js";
2
+ import { useChartCartesian as t } from "../../../Utils/Charts/useChartCartesian.js";
3
+ //#region src/Components/ChartBar/composables/useChartBar.ts
4
+ function n(n, r) {
5
+ return t(n, {
6
+ libDefaults: r,
7
+ kind: "bar",
8
+ mount: e,
9
+ componentName: "ChartBar"
10
+ });
11
+ }
12
+ //#endregion
13
+ export { n as useChartBar };
@@ -0,0 +1,4 @@
1
+ export type { ChartBarOwnProps, ChartBarProps, } from './chartBar.types';
2
+ export { default as ChartBar } from './ChartBar.vue';
3
+ export { useChartBar } from './composables/useChartBar';
4
+ export { useChartContext, type ChartCategoryColors, type ChartClasses, type ChartColorOverrides, type ChartColorValue, type ChartContextValue, type ChartCustomProps, type ChartSizeOverrides, type ChartSlots, } from '../../Utils/Charts';
@@ -0,0 +1,4 @@
1
+ import { useChartContext as e } from "../../Utils/Charts/chartInjectionKey.js";
2
+ import { useChartBar as t } from "./composables/useChartBar.js";
3
+ import n from "./ChartBar.js";
4
+ export { n as ChartBar, t as useChartBar, e as useChartContext };
@@ -0,0 +1,5 @@
1
+ import e from "./ChartBarSeries.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/Components/ChartBarSeries/ChartBarSeries.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,6 @@
1
+ import { ChartBarSeriesOwnProps } from './chartBarSeries.types';
2
+ declare const __VLS_export: import('vue').DefineComponent<ChartBarSeriesOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ChartBarSeriesOwnProps> & Readonly<{}>, {
3
+ labels: boolean;
4
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import { useChartBarSeries as e } from "./composables/useChartBarSeries.js";
2
+ import { createElementBlock as t, defineComponent as n, openBlock as r } from "vue";
3
+ //#region src/Components/ChartBarSeries/ChartBarSeries.vue?vue&type=script&setup=true&lang.ts
4
+ var i = {
5
+ hidden: "",
6
+ "aria-hidden": "true"
7
+ }, a = /*@__PURE__*/ n({
8
+ __name: "ChartBarSeries",
9
+ props: {
10
+ color: {},
11
+ colorBy: {},
12
+ colorRanges: {},
13
+ data: {},
14
+ labels: {
15
+ type: Boolean,
16
+ default: void 0
17
+ },
18
+ name: {},
19
+ reference: {},
20
+ stack: {},
21
+ tone: {}
22
+ },
23
+ setup(n) {
24
+ return e(n), (e, n) => (r(), t("span", i));
25
+ }
26
+ });
27
+ //#endregion
28
+ export { a as default };
@@ -0,0 +1,67 @@
1
+ import { ChartColorRangeAxis, ChartDatum, ChartReference, ChartTone } from '@bridge-ui/core/Domain';
2
+ import { ChartColorRangeOption, ChartColorValue } from '../../Utils/Charts';
3
+ /**
4
+ * One bar series registered on the nearest `ChartBar`. Renders nothing.
5
+ * Unset options fall back to the `ChartBar` props.
6
+ */
7
+ export interface ChartBarSeriesOwnProps {
8
+ /**
9
+ * Series color (token key or CSS color). Falls back to the palette.
10
+ *
11
+ * @default undefined
12
+ */
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[];
29
+ /**
30
+ * One value per `ChartBar` category. `null` leaves the slot empty.
31
+ */
32
+ data: ChartDatum[];
33
+ /**
34
+ * Shows value labels on the bars.
35
+ *
36
+ * @default ChartBar `labels`
37
+ */
38
+ labels?: boolean;
39
+ /**
40
+ * Series name shown in the legend, tooltip, and data table.
41
+ */
42
+ name: string;
43
+ /**
44
+ * Reference lines: `{ type: "average" | "min" | "max" }` or
45
+ * `{ value }`, each with an optional `label`.
46
+ *
47
+ * @default undefined
48
+ */
49
+ reference?: ChartReference | ChartReference[];
50
+ /**
51
+ * Stack key. Series with the same key stack.
52
+ *
53
+ * @default ChartBar `stack`
54
+ */
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;
63
+ }
64
+ /**
65
+ * `ChartBarSeries` has no DOM element, so it takes no HTML attributes.
66
+ */
67
+ export type ChartBarSeriesProps = ChartBarSeriesOwnProps;
@@ -0,0 +1,5 @@
1
+ import { ChartBarSeriesOwnProps } from '../chartBarSeries.types';
2
+ import { ChartBarSeriesRegistration } from '../../../Utils/Charts';
3
+ export declare function useChartBarSeries(props: ChartBarSeriesOwnProps): {
4
+ entry: import('vue').ComputedRef<ChartBarSeriesRegistration>;
5
+ };
@@ -0,0 +1,23 @@
1
+ import { useChartSeries as e } from "../../../Utils/Charts/useChartSeries.js";
2
+ import { castArray as t, isNil as n } from "es-toolkit/compat";
3
+ //#region src/Components/ChartBarSeries/composables/useChartBarSeries.ts
4
+ function r(r) {
5
+ return { entry: e({
6
+ families: ["bar"],
7
+ componentName: "ChartBarSeries",
8
+ entry: () => ({
9
+ kind: "bar",
10
+ tone: r.tone,
11
+ name: r.name,
12
+ data: r.data,
13
+ color: r.color,
14
+ stack: r.stack,
15
+ labels: r.labels,
16
+ colorBy: r.colorBy,
17
+ colorRanges: r.colorRanges,
18
+ reference: n(r.reference) ? void 0 : t(r.reference)
19
+ })
20
+ }) };
21
+ }
22
+ //#endregion
23
+ export { r as useChartBarSeries };
@@ -0,0 +1,4 @@
1
+ export type { ChartBarSeriesOwnProps, ChartBarSeriesProps, } from './chartBarSeries.types';
2
+ export { default as ChartBarSeries } from './ChartBarSeries.vue';
3
+ export { useChartBarSeries } from './composables/useChartBarSeries';
4
+ export type { ChartColorRangeOption } from '../../Utils/Charts';
@@ -0,0 +1,3 @@
1
+ import { useChartBarSeries as e } from "./composables/useChartBarSeries.js";
2
+ import t from "./ChartBarSeries.js";
3
+ export { t as ChartBarSeries, e as useChartBarSeries };
@@ -0,0 +1,5 @@
1
+ import e from "./ChartFunnel.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/Components/ChartFunnel/ChartFunnel.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,16 @@
1
+ import { ChartFunnelOwnProps } from './chartFunnel.types';
2
+ import { ChartSlots } from '../../Utils/Charts';
3
+ type __VLS_Slots = ChartSlots;
4
+ declare const __VLS_base: import('vue').DefineComponent<ChartFunnelOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ChartFunnelOwnProps> & Readonly<{}>, {
5
+ loading: boolean;
6
+ labels: boolean;
7
+ animation: boolean;
8
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
12
+ type __VLS_WithSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };