@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
@@ -3,13 +3,13 @@ import { chartRootBridgeKeys as t, toChartLegendItems as n, useChartColors as r,
3
3
  import { mountEchartsScatter as c } from "../../../Utils/Charts/echarts/scatter.js";
4
4
  import { computed as l } from "vue";
5
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";
6
+ import { DEFAULT_CHART_BUBBLE_SIZE as d, DEFAULT_CHART_SYMBOL_SIZE as f, getChartBubbleSizeDomain as p, getChartRangeColorItems as m, getChartScatterPoints as h, getChartScatterTable as g, getChartScatterTooltip as _, isChartScatterEmpty as v, resolveChartRangeColors as y } from "@bridge-ui/core/Domain";
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 = l(() => JSON.stringify(t.bubbleSize ?? T.value.bubbleSize ?? d)), A = l(() => JSON.parse(k.value)), j = r(C, () => [...w.entries.value, ...m(w.entries.value)]), M = l(() => 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;
29
+ color: j.value[e.id] ?? "",
30
+ colorRanges: y({
31
+ seriesId: e.id,
32
+ colors: j.value,
33
+ ranges: e.colorRanges ?? []
34
+ })
35
+ }))), N = l(() => h(M.value)), P = l(() => {
36
+ let e = C.theme.value;
32
37
  return u(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: p(M.value),
48
+ symbolSize: T.value.symbolSize ?? f
44
49
  };
45
50
  });
46
- o(x, {
47
- options: M,
51
+ o(C, {
52
+ options: P,
48
53
  mount: c
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 = l(() => ({
56
+ size: O("Size"),
57
+ x: w.axes.value.x?.label ?? "x",
58
+ y: w.axes.value.y?.label ?? "y"
59
+ })), I = l(() => {
60
+ let e = C.active.value.index, t = u(e) ? void 0 : N.value[e], n = u(t) ? void 0 : M.value[t.seriesIndex];
61
+ return u(t) || u(n) ? null : _({
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, l(() => {
72
+ let e = w.entries.value;
68
73
  return {
69
- tooltip: P.value,
70
- count: j.value.length,
71
- isEmpty: _(e),
72
- summary: E("Scatter chart with {{count}} series ({{names}}) and {{points}} points.", {
74
+ tooltip: I.value,
75
+ count: N.value.length,
76
+ isEmpty: v(e),
77
+ summary: O("Scatter chart with {{count}} series ({{names}}) and {{points}} points.", {
73
78
  count: e.length,
74
- points: m(e).length,
79
+ points: h(e).length,
75
80
  names: e.map((e) => e.name).join(", ")
76
81
  }),
77
- table: h({
82
+ table: g({
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) => !u(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, l(() => ({
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
  });
@@ -10,6 +10,10 @@ export interface ChartTooltipClasses {
10
10
  * Classes merged onto each row label.
11
11
  */
12
12
  label?: string;
13
+ /**
14
+ * Classes merged onto each color range label (`colorRanges`).
15
+ */
16
+ note?: string;
13
17
  /**
14
18
  * Classes merged onto each percent (pie, funnel).
15
19
  */
@@ -6,6 +6,7 @@ export declare function useChartTooltip(props: ChartTooltipOwnProps, tooltipRef:
6
6
  merged: import('vue').ComputedRef<ChartTooltipOwnProps>;
7
7
  context: import('vue').ComputedRef<ChartTooltipContentContext | null>;
8
8
  itemBind: import('vue').ComputedRef<HTMLAttributes>;
9
+ noteBind: import('vue').ComputedRef<HTMLAttributes>;
9
10
  rootBind: import('vue').ComputedRef<HTMLAttributes>;
10
11
  labelBind: import('vue').ComputedRef<HTMLAttributes>;
11
12
  titleBind: import('vue').ComputedRef<HTMLAttributes>;
@@ -107,6 +107,10 @@ function _(_, v) {
107
107
  merged: C,
108
108
  context: O,
109
109
  itemBind: N,
110
+ noteBind: i(() => ({ class: m({
111
+ "text-dark-500 dark:text-dark-400": !0,
112
+ [c(T.value, "note") ?? ""]: !0
113
+ }) })),
110
114
  rootBind: j,
111
115
  labelBind: F,
112
116
  titleBind: M,
@@ -0,0 +1,5 @@
1
+ import e from "./Heading.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/Components/Heading/Heading.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,11 @@
1
+ import { HeadingOwnProps, HeadingSlots } from './heading.types';
2
+ type __VLS_Slots = HeadingSlots;
3
+ declare const __VLS_base: import('vue').DefineComponent<HeadingOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<HeadingOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
4
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
7
+ type __VLS_WithSlots<T, S> = T & {
8
+ new (): {
9
+ $slots: S;
10
+ };
11
+ };
@@ -0,0 +1,29 @@
1
+ import { useHeading as e } from "./composables/useHeading.js";
2
+ import { createBlock as t, defineComponent as n, guardReactiveProps as r, normalizeProps as i, openBlock as a, renderSlot as o, resolveDynamicComponent as s, unref as c, withCtx as l } from "vue";
3
+ //#region src/Components/Heading/Heading.vue?vue&type=script&setup=true&lang.ts
4
+ var u = /*@__PURE__*/ n({
5
+ inheritAttrs: !1,
6
+ __name: "Heading",
7
+ props: {
8
+ classes: {},
9
+ color: {},
10
+ level: {},
11
+ size: {},
12
+ variant: {},
13
+ weight: {}
14
+ },
15
+ setup(n) {
16
+ let { rootTag: u, rootBind: d } = e(n, {
17
+ level: 2,
18
+ color: "dark",
19
+ weight: "semibold",
20
+ variant: "default"
21
+ });
22
+ return (e, n) => (a(), t(s(c(u)), i(r(c(d))), {
23
+ default: l(() => [o(e.$slots, "default")]),
24
+ _: 3
25
+ }, 16));
26
+ }
27
+ });
28
+ //#endregion
29
+ export { u as default };
@@ -0,0 +1,10 @@
1
+ import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core/Utils';
2
+ import { HeadingOwnProps, HeadingProps } from '../heading.types';
3
+ type HeadingLibDefaults = LibDefaultsShape<HeadingOwnProps, "color" | "level" | "weight" | "variant">;
4
+ type HeadingMerged = MergeLibDefaults<HeadingOwnProps, HeadingLibDefaults>;
5
+ export declare function useHeading(props: HeadingOwnProps, libDefaults: HeadingLibDefaults): {
6
+ merged: import('vue').ComputedRef<HeadingMerged>;
7
+ rootTag: import('vue').ComputedRef<"h1" | "h2" | "h3" | "h4" | "h5" | "h6">;
8
+ rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", {}, Omit<HeadingProps, "color" | "size" | "classes" | "variant" | "weight" | "level">>>;
9
+ };
10
+ export {};
@@ -0,0 +1,56 @@
1
+ import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
2
+ import { computed as r, useAttrs as i } from "vue";
3
+ import { get as a, isNil as o } from "es-toolkit/compat";
4
+ import { headingLevelProps as s, textSizeProps as c, textVariantProps as l, textWeightProps as u } from "@bridge-ui/core/Tokens";
5
+ import { cn as d, mergeBridgeUILayeredClasses as f, splitComponentProps as p } from "@bridge-ui/core/Utils";
6
+ //#region src/Components/Heading/composables/useHeading.ts
7
+ var m = [
8
+ "size",
9
+ "color",
10
+ "level",
11
+ "weight",
12
+ "classes",
13
+ "variant"
14
+ ];
15
+ function h(h, g) {
16
+ let _ = i(), v = r(() => p({
17
+ props: {
18
+ ..._,
19
+ ...h
20
+ },
21
+ bridgeKeys: m
22
+ })), { merged: y, entry: b } = t({
23
+ libDefaults: g,
24
+ componentName: "Heading",
25
+ props: () => v.value.componentProps
26
+ }), x = n({
27
+ entry: b,
28
+ props: () => v.value.componentProps
29
+ }), S = r(() => `h${y.value.level}`), C = r(() => {
30
+ if (o(y.value.size)) {
31
+ let e = f(s, b.value?.tokens?.level);
32
+ return a(e, String(y.value.level));
33
+ }
34
+ let e = f(c, b.value?.tokens?.size);
35
+ return a(e, y.value.size);
36
+ }), w = r(() => {
37
+ let e = f(l, b.value?.tokens?.variant);
38
+ return a(e, [y.value.variant, y.value.color]);
39
+ }), T = r(() => {
40
+ let e = f(u, b.value?.tokens?.weight);
41
+ return a(e, y.value.weight);
42
+ });
43
+ return {
44
+ merged: y,
45
+ rootTag: S,
46
+ rootBind: r(() => e({}, v.value.inheritedAttrs, d({
47
+ "tracking-tight": !0,
48
+ [C.value ?? ""]: !0,
49
+ [T.value ?? ""]: !0,
50
+ [w.value ?? ""]: !0,
51
+ [x.value.root ?? ""]: !0
52
+ })))
53
+ };
54
+ }
55
+ //#endregion
56
+ export { h as useHeading };
@@ -0,0 +1,56 @@
1
+ import { HTMLAttributes, Slot } from 'vue';
2
+ import { TextColor, TextSize, TextVariant, TextWeight } from '@bridge-ui/core/Tokens';
3
+ import { MergeHtmlProps, MergeProps } from '@bridge-ui/core/Utils';
4
+ import { TextColorOverrides, TextSizeOverrides, TextVariantOverrides, TextWeightOverrides } from '../Text';
5
+ export interface HeadingClasses {
6
+ /**
7
+ * The classes to apply to the root.
8
+ */
9
+ root?: string;
10
+ }
11
+ export interface HeadingOwnProps {
12
+ /**
13
+ * The classes to apply to the heading.
14
+ *
15
+ * @default undefined
16
+ */
17
+ classes?: HeadingClasses;
18
+ /**
19
+ * The color of the heading. Ignores `global.defaultColor`.
20
+ *
21
+ * @default "dark"
22
+ */
23
+ color?: MergeProps<TextColor, TextColorOverrides>;
24
+ /**
25
+ * The heading level. Sets the element (`h1`–`h6`) and, when `size` is not
26
+ * set, the font size.
27
+ *
28
+ * @default 2
29
+ */
30
+ level?: 1 | 2 | 3 | 4 | 5 | 6;
31
+ /**
32
+ * The font size of the heading. When unset, it follows `level`.
33
+ *
34
+ * @default undefined
35
+ */
36
+ size?: MergeProps<TextSize, TextSizeOverrides>;
37
+ /**
38
+ * The tone of the heading: `default` for main text, `muted` for secondary text.
39
+ *
40
+ * @default "default"
41
+ */
42
+ variant?: MergeProps<TextVariant, TextVariantOverrides>;
43
+ /**
44
+ * The font weight of the heading.
45
+ *
46
+ * @default "semibold"
47
+ */
48
+ weight?: MergeProps<TextWeight, TextWeightOverrides>;
49
+ }
50
+ export interface HeadingSlots {
51
+ /**
52
+ * The content of the heading.
53
+ */
54
+ default?: Slot<undefined>;
55
+ }
56
+ export type HeadingProps = MergeHtmlProps<HeadingOwnProps, HTMLAttributes>;
@@ -0,0 +1,3 @@
1
+ export { useHeading } from './composables/useHeading';
2
+ export type { HeadingClasses, HeadingOwnProps, HeadingProps, HeadingSlots, } from './heading.types';
3
+ export { default as Heading } from './Heading.vue';
@@ -0,0 +1,3 @@
1
+ import { useHeading as e } from "./composables/useHeading.js";
2
+ import t from "./Heading.js";
3
+ export { t as Heading, e as useHeading };
@@ -0,0 +1,5 @@
1
+ import e from "./Text.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/Components/Text/Text.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,11 @@
1
+ import { TextOwnProps, TextSlots } from './text.types';
2
+ type __VLS_Slots = TextSlots;
3
+ declare const __VLS_base: import('vue').DefineComponent<TextOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TextOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
4
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
7
+ type __VLS_WithSlots<T, S> = T & {
8
+ new (): {
9
+ $slots: S;
10
+ };
11
+ };
@@ -0,0 +1,33 @@
1
+ import { useText as e } from "./composables/useText.js";
2
+ import { createBlock as t, defineComponent as n, guardReactiveProps as r, normalizeProps as i, openBlock as a, renderSlot as o, resolveDynamicComponent as s, unref as c, withCtx as l } from "vue";
3
+ //#region src/Components/Text/Text.vue?vue&type=script&setup=true&lang.ts
4
+ var u = /*@__PURE__*/ n({
5
+ inheritAttrs: !1,
6
+ __name: "Text",
7
+ props: {
8
+ as: {},
9
+ classes: {},
10
+ color: {},
11
+ numeric: { type: Boolean },
12
+ size: {},
13
+ truncate: { type: Boolean },
14
+ uppercase: { type: Boolean },
15
+ variant: {},
16
+ weight: {}
17
+ },
18
+ setup(n) {
19
+ let { merged: u, rootBind: d } = e(n, {
20
+ as: "p",
21
+ size: "md",
22
+ color: "dark",
23
+ weight: "normal",
24
+ variant: "default"
25
+ });
26
+ return (e, n) => (a(), t(s(c(u).as), i(r(c(d))), {
27
+ default: l(() => [o(e.$slots, "default")]),
28
+ _: 3
29
+ }, 16));
30
+ }
31
+ });
32
+ //#endregion
33
+ export { u as default };
@@ -0,0 +1,9 @@
1
+ import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core/Utils';
2
+ import { TextOwnProps, TextProps } from '../text.types';
3
+ type TextLibDefaults = LibDefaultsShape<TextOwnProps, "as" | "size" | "color" | "weight" | "variant">;
4
+ type TextMerged = MergeLibDefaults<TextOwnProps, TextLibDefaults>;
5
+ export declare function useText(props: TextOwnProps, libDefaults: TextLibDefaults): {
6
+ merged: import('vue').ComputedRef<TextMerged>;
7
+ rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", {}, Omit<TextProps, "color" | "size" | "classes" | "as" | "variant" | "numeric" | "truncate" | "weight" | "uppercase">>>;
8
+ };
9
+ export {};
@@ -0,0 +1,56 @@
1
+ import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
2
+ import { computed as r, useAttrs as i } from "vue";
3
+ import { get as a } from "es-toolkit/compat";
4
+ import { textSizeProps as o, textVariantProps as s, textWeightProps as c } from "@bridge-ui/core/Tokens";
5
+ import { cn as l, mergeBridgeUILayeredClasses as u, splitComponentProps as d } from "@bridge-ui/core/Utils";
6
+ //#region src/Components/Text/composables/useText.ts
7
+ var f = [
8
+ "as",
9
+ "size",
10
+ "color",
11
+ "weight",
12
+ "classes",
13
+ "numeric",
14
+ "variant",
15
+ "truncate",
16
+ "uppercase"
17
+ ];
18
+ function p(p, m) {
19
+ let h = i(), g = r(() => d({
20
+ bridgeKeys: f,
21
+ props: {
22
+ ...h,
23
+ ...p
24
+ }
25
+ })), { merged: _, entry: v } = t({
26
+ libDefaults: m,
27
+ componentName: "Text",
28
+ props: () => g.value.componentProps
29
+ }), y = n({
30
+ entry: v,
31
+ props: () => g.value.componentProps
32
+ }), b = r(() => {
33
+ let e = u(o, v.value?.tokens?.size);
34
+ return a(e, _.value.size);
35
+ }), x = r(() => {
36
+ let e = u(s, v.value?.tokens?.variant);
37
+ return a(e, [_.value.variant, _.value.color]);
38
+ }), S = r(() => {
39
+ let e = u(c, v.value?.tokens?.weight);
40
+ return a(e, _.value.weight);
41
+ });
42
+ return {
43
+ merged: _,
44
+ rootBind: r(() => e({}, g.value.inheritedAttrs, l({
45
+ [b.value ?? ""]: !0,
46
+ [S.value ?? ""]: !0,
47
+ [x.value ?? ""]: !0,
48
+ truncate: _.value.truncate === !0,
49
+ "tabular-nums tracking-tight": _.value.numeric === !0,
50
+ "uppercase tracking-wider": _.value.uppercase === !0,
51
+ [y.value.root ?? ""]: !0
52
+ })))
53
+ };
54
+ }
55
+ //#endregion
56
+ export { p as useText };
@@ -0,0 +1,3 @@
1
+ export { useText } from './composables/useText';
2
+ export type { TextClasses, TextColorOverrides, TextOwnProps, TextProps, TextSizeOverrides, TextSlots, TextVariantOverrides, TextWeightOverrides, } from './text.types';
3
+ export { default as Text } from './Text.vue';
@@ -0,0 +1,3 @@
1
+ import { useText as e } from "./composables/useText.js";
2
+ import t from "./Text.js";
3
+ export { t as Text, e as useText };