@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
@@ -60,6 +60,23 @@ A third value per point sets the bubble size. `bubble-size` maps the smallest an
60
60
  </ChartScatter>
61
61
  ```
62
62
 
63
+ ### Color by range
64
+
65
+ `color-ranges` recolors single points by their `y`. A `y` in `[min, max)` takes the range color; other points keep the series color. Range labels show in the tooltip and the data table.
66
+
67
+ ```vue
68
+ <ChartScatter>
69
+ <ChartScatterSeries
70
+ name="Runs"
71
+ :data="runs"
72
+ :color-ranges="[
73
+ { max: 5, color: 'success', label: 'Fast' },
74
+ { min: 5, color: 'warning', label: 'Slow' },
75
+ ]"
76
+ />
77
+ </ChartScatter>
78
+ ```
79
+
63
80
  ## Keyboard
64
81
 
65
82
  Arrow keys move through the points ordered by `x`, then `y`. Each point is announced with its series and values.
@@ -75,10 +92,11 @@ Shared root props (`height`, `palette`, `loading`, `summary`, …) are listed in
75
92
 
76
93
  ## Props (`ChartScatterSeries`)
77
94
 
78
- | Prop | Type | Default | Description |
79
- | ------------- | -------------------------------------------------- | -------- | ------------------------------------------ |
80
- | `name` | `string` | required | Legend, tooltip, and table name. |
81
- | `data` | `[number, number][] \| [number, number, number][]` | required | Points; the third value makes a bubble. |
82
- | `color` | `ChartColorValue` | palette | Token key or CSS color. |
83
- | `size-name` | `string` | `"Size"` | Label for the third value. |
84
- | `symbol-size` | `number` | root | Point size override (ignored for bubbles). |
95
+ | Prop | Type | Default | Description |
96
+ | -------------- | -------------------------------------------------- | -------- | ------------------------------------------------------------------------------ |
97
+ | `name` | `string` | required | Legend, tooltip, and table name. |
98
+ | `data` | `[number, number][] \| [number, number, number][]` | required | Points; the third value makes a bubble. |
99
+ | `color` | `ChartColorValue` | palette | Token key or CSS color. |
100
+ | `size-name` | `string` | `"Size"` | Label for the third value. |
101
+ | `symbol-size` | `number` | root | Point size override (ignored for bubbles). |
102
+ | `color-ranges` | `ChartColorRangeOption[]` | — | `{ min?, max?, color, label? }`: points with `y` in `[min, max)` take `color`. |
@@ -0,0 +1,85 @@
1
+ # Heading
2
+
3
+ Section and page titles. `level` sets the element (`h1`–`h6`) and the default font size; `size` changes only the look.
4
+
5
+ ## Import
6
+
7
+ ```ts
8
+ import { Heading } from "@bridge-ui/vue/Components/Heading";
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ ### Usage
14
+
15
+ ```vue
16
+ <Heading :level="1">Workspaces</Heading>
17
+ ```
18
+
19
+ ### Levels
20
+
21
+ Without `size`, each level has its own font size.
22
+
23
+ ```vue
24
+ <Heading :level="1">Level 1</Heading>
25
+ <Heading :level="2">Level 2</Heading>
26
+ <Heading :level="3">Level 3</Heading>
27
+ <Heading :level="4">Level 4</Heading>
28
+ <Heading :level="5">Level 5</Heading>
29
+ <Heading :level="6">Level 6</Heading>
30
+ ```
31
+
32
+ ### Size
33
+
34
+ Keep the right level for the page outline and set the look with `size`.
35
+
36
+ ```vue
37
+ <Heading size="lg" :level="2">
38
+ Recent transactions
39
+ </Heading>
40
+ ```
41
+
42
+ ### Tone, color, and weight
43
+
44
+ `Heading` shares `variant`, `color`, and `weight` with `Text`. `global.defaultColor` does not apply; the default stays `dark`.
45
+
46
+ ```vue
47
+ <Heading :level="3" variant="muted">
48
+ Archived
49
+ </Heading>
50
+ <Heading :level="3" weight="bold" color="primary">
51
+ Highlights
52
+ </Heading>
53
+ ```
54
+
55
+ ### Provider tokens
56
+
57
+ `tokens.level` sets the font size per level.
58
+
59
+ ```vue
60
+ <BridgeUIProvider
61
+ :components="{
62
+ Heading: {
63
+ defaultProps: { weight: 'bold' },
64
+ tokens: { level: { '1': 'text-4xl', '2': 'text-3xl' } },
65
+ },
66
+ }"
67
+ >
68
+ <App />
69
+ </BridgeUIProvider>
70
+ ```
71
+
72
+ ## Props
73
+
74
+ | Prop | Type | Default | Description |
75
+ | --------- | ---------------------------- | ------------ | ------------------------------------------------------------------------------------------- |
76
+ | `classes` | `HeadingClasses` | — | The classes to apply to the heading. |
77
+ | `color` | `TextColor` | `"dark"` | The color of the heading. Ignores `global.defaultColor`. |
78
+ | `level` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `2` | The heading level. Sets the element (`h1`–`h6`) and, when `size` is not set, the font size. |
79
+ | `size` | `TextSize` | — | The font size of the heading. When unset, it follows `level`. |
80
+ | `variant` | `TextVariant` | `"default"` | The tone of the heading: `default` for main text, `muted` for secondary text. |
81
+ | `weight` | `TextWeight` | `"semibold"` | The font weight of the heading. |
82
+
83
+ ## Related components
84
+
85
+ Text, Card, EmptyState
@@ -0,0 +1,118 @@
1
+ # Text
2
+
3
+ Body text with a semantic tone (`default` or `muted`), a color, a size, and a weight. Colors cover light and dark themes, so pages do not repeat `text-dark-* dark:text-dark-*` pairs.
4
+
5
+ ## Import
6
+
7
+ ```ts
8
+ import { Text } from "@bridge-ui/vue/Components/Text";
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ ### Usage
14
+
15
+ ```vue
16
+ <Text>Monthly summary for your workspace.</Text>
17
+ ```
18
+
19
+ ### Muted
20
+
21
+ Use `variant="muted"` for subtitles, captions, and metadata.
22
+
23
+ ```vue
24
+ <Text size="xs" variant="muted">
25
+ Compared to last month
26
+ </Text>
27
+ ```
28
+
29
+ ### Values
30
+
31
+ `numeric` aligns digits (tabular figures) for money and counts.
32
+
33
+ ```vue
34
+ <Text numeric size="2xl" weight="semibold">
35
+ $9,300.00
36
+ </Text>
37
+ ```
38
+
39
+ ### Color
40
+
41
+ `color` works with both variants. `global.defaultColor` does not apply to `Text`; the default stays `dark`.
42
+
43
+ ```vue
44
+ <Text numeric color="success" weight="semibold">
45
+ +$1,250.00
46
+ </Text>
47
+ <Text numeric color="error" weight="semibold">
48
+ −$480.00
49
+ </Text>
50
+ <Text size="sm" color="error" variant="muted">
51
+ Payment overdue
52
+ </Text>
53
+ ```
54
+
55
+ ### Label
56
+
57
+ ```vue
58
+ <Text uppercase size="xs" variant="muted" weight="medium">
59
+ Balance
60
+ </Text>
61
+ ```
62
+
63
+ ### Element
64
+
65
+ `Text` renders a `p` by default. Use `as` for inline or list content.
66
+
67
+ ```vue
68
+ <Text as="span" size="sm" variant="muted">
69
+ Updated 5 minutes ago
70
+ </Text>
71
+ ```
72
+
73
+ ### Truncate
74
+
75
+ ```vue
76
+ <Text truncate class="max-w-48">
77
+ A very long account name that does not fit
78
+ </Text>
79
+ ```
80
+
81
+ ### Provider defaults and tokens
82
+
83
+ Change the muted tone for the whole app in one place with `tokens`, or set defaults with `defaultProps`.
84
+
85
+ ```vue
86
+ <BridgeUIProvider
87
+ :components="{
88
+ Text: {
89
+ defaultProps: { size: 'sm' },
90
+ tokens: {
91
+ variant: {
92
+ muted: { dark: 'text-dark-600 dark:text-dark-300' },
93
+ },
94
+ },
95
+ },
96
+ }"
97
+ >
98
+ <App />
99
+ </BridgeUIProvider>
100
+ ```
101
+
102
+ ## Props
103
+
104
+ | Prop | Type | Default | Description |
105
+ | ----------- | ---------------------------------------------------------------------------------------------------------- | ----------- | -------------------------------------------------------------------------- |
106
+ | `as` | `"p" \| "dd" \| "dt" \| "em" \| "li" \| "div" \| "span" \| "label" \| "small" \| "strong" \| "figcaption"` | `"p"` | The element rendered as the root. |
107
+ | `classes` | `TextClasses` | — | The classes to apply to the text. |
108
+ | `color` | `TextColor` | `"dark"` | The color of the text. Ignores `global.defaultColor`. |
109
+ | `numeric` | `boolean` | `false` | Whether digits use tabular figures and tight tracking (money, counts). |
110
+ | `size` | `TextSize` | `"md"` | The size of the text (`2xs` to `4xl`). |
111
+ | `truncate` | `boolean` | `false` | Whether the text is cut to one line with an ellipsis. |
112
+ | `uppercase` | `boolean` | `false` | Whether the text is uppercase with wide tracking (small labels). |
113
+ | `variant` | `TextVariant` | `"default"` | The tone of the text: `default` for main text, `muted` for secondary text. |
114
+ | `weight` | `TextWeight` | `"normal"` | The font weight of the text (`normal`, `medium`, `semibold`, `bold`). |
115
+
116
+ ## Related components
117
+
118
+ Heading, Card, Label
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "license": "MIT",
4
- "version": "0.18.0",
4
+ "version": "0.19.0",
5
5
  "author": "BridgeUI",
6
6
  "sideEffects": false,
7
7
  "name": "@bridge-ui/vue",
@@ -109,7 +109,7 @@
109
109
  }
110
110
  },
111
111
  "dependencies": {
112
- "@bridge-ui/core": "^0.18.0",
112
+ "@bridge-ui/core": "^0.19.0",
113
113
  "@tailwindcss/typography": "^0.5.20",
114
114
  "clsx": "^2.1.1",
115
115
  "es-toolkit": "^1.52.0",