@brightlocal/ui-components 2.27.0 → 3.1.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.
- package/README.md +7 -1
- package/component-meta.json +568 -143
- package/deprecations.json +298 -1
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.d.ts +36 -0
- package/dist/accordion.d.ts.map +1 -1
- package/dist/accordion.js +74 -61
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.js +18 -18
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts +11 -1
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +31 -28
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.js +4 -4
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +15 -11
- package/dist/blocks/empty-state.cjs +1 -0
- package/dist/blocks/empty-state.d.ts +172 -0
- package/dist/blocks/empty-state.d.ts.map +1 -0
- package/dist/blocks/empty-state.js +147 -0
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +124 -108
- package/dist/blocks/progress-state.cjs +1 -0
- package/dist/blocks/{progress-screen.d.ts → progress-state.d.ts} +30 -18
- package/dist/blocks/progress-state.d.ts.map +1 -0
- package/dist/blocks/{progress-screen.js → progress-state.js} +100 -71
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +160 -161
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/button-group.cjs +1 -0
- package/dist/button-group.d.ts +36 -0
- package/dist/button-group.d.ts.map +1 -0
- package/dist/button-group.js +47 -0
- package/dist/button.cjs +1 -1
- package/dist/button.js +12 -12
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +37 -38
- package/dist/callout.cjs +1 -1
- package/dist/callout.d.ts +24 -2
- package/dist/callout.d.ts.map +1 -1
- package/dist/callout.js +57 -55
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +42 -3
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +102 -91
- package/dist/chart-empty.cjs +1 -0
- package/dist/chart-empty.d.ts +59 -0
- package/dist/chart-empty.d.ts.map +1 -0
- package/dist/chart-empty.js +29 -0
- package/dist/chart.cjs +6 -6
- package/dist/chart.d.ts +46 -13
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +172 -157
- package/dist/chip.cjs +1 -1
- package/dist/chip.d.ts +38 -4
- package/dist/chip.d.ts.map +1 -1
- package/dist/chip.js +100 -84
- package/dist/combobox.cjs +2 -2
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +81 -79
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +23 -1
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +248 -225
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.js +26 -29
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.d.ts +75 -10
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +346 -334
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.d.ts +13 -5
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +54 -53
- package/dist/description.cjs +1 -1
- package/dist/description.js +5 -5
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +20 -20
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.js +8 -11
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +17 -20
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts +8 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +96 -65
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +130 -12
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +146 -127
- package/dist/grid.cjs +1 -0
- package/dist/grid.d.ts +56 -0
- package/dist/grid.d.ts.map +1 -0
- package/dist/grid.js +32 -0
- package/dist/header.d.ts +13 -0
- package/dist/header.d.ts.map +1 -1
- package/dist/hooks/use-delayed-pending.cjs +1 -0
- package/dist/hooks/use-delayed-pending.d.ts +34 -0
- package/dist/hooks/use-delayed-pending.d.ts.map +1 -0
- package/dist/hooks/use-delayed-pending.js +17 -0
- package/dist/hooks/use-mobile.cjs +1 -0
- package/dist/hooks/use-mobile.js +8 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.js +13 -13
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +554 -527
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.js +25 -25
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.js +9 -9
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +9 -9
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.d.ts +17 -9
- package/dist/input-password.d.ts.map +1 -1
- package/dist/input-password.js +73 -72
- package/dist/input.cjs +1 -1
- package/dist/input.js +9 -9
- package/dist/label.cjs +1 -1
- package/dist/label.d.ts.map +1 -1
- package/dist/label.js +25 -28
- package/dist/lib/block-illustration.cjs +1 -0
- package/dist/lib/block-illustration.d.ts +28 -0
- package/dist/lib/block-illustration.d.ts.map +1 -0
- package/dist/lib/block-illustration.js +21 -0
- package/dist/lib/empty-canvas.cjs +1 -0
- package/dist/lib/empty-canvas.d.ts +27 -0
- package/dist/lib/empty-canvas.d.ts.map +1 -0
- package/dist/lib/empty-canvas.js +62 -0
- package/dist/lib/empty-chip.cjs +1 -0
- package/dist/lib/empty-chip.d.ts +4 -0
- package/dist/lib/empty-chip.d.ts.map +1 -0
- package/dist/lib/empty-chip.js +13 -0
- package/dist/lib/optical-center.cjs +1 -0
- package/dist/lib/optical-center.d.ts +12 -0
- package/dist/lib/optical-center.d.ts.map +1 -0
- package/dist/lib/optical-center.js +11 -0
- package/dist/lib/utils.cjs +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +28 -5
- package/dist/list.cjs +1 -1
- package/dist/list.d.ts.map +1 -1
- package/dist/list.js +62 -58
- package/dist/map.cjs +1 -1
- package/dist/map.d.ts +60 -2
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +187 -164
- package/dist/media-empty.cjs +1 -0
- package/dist/media-empty.d.ts +72 -0
- package/dist/media-empty.d.ts.map +1 -0
- package/dist/media-empty.js +45 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +17 -20
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.js +7 -7
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +130 -1
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +193 -102
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +2 -26
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +79 -118
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.d.ts +15 -6
- package/dist/scroll-area.d.ts.map +1 -1
- package/dist/scroll-area.js +38 -36
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts +13 -2
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +92 -87
- package/dist/separator.cjs +1 -1
- package/dist/separator.js +8 -8
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +38 -3
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +43 -20
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.js +26 -26
- package/dist/stepper.cjs +1 -1
- package/dist/stepper.js +40 -40
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +31 -28
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text-reveal-motion.d.ts +10 -0
- package/dist/text-reveal-motion.d.ts.map +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +11 -11
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.js +8 -8
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +8 -8
- package/dist/typography-heading.cjs +1 -0
- package/dist/typography-heading.d.ts +129 -0
- package/dist/typography-heading.d.ts.map +1 -0
- package/dist/typography-heading.js +95 -0
- package/dist/typography-text.cjs +1 -0
- package/dist/typography-text.d.ts +127 -0
- package/dist/typography-text.d.ts.map +1 -0
- package/dist/typography-text.js +92 -0
- package/dist/typography.d.ts +13 -0
- package/dist/typography.d.ts.map +1 -1
- package/package.json +35 -7
- package/src/blocks/empty-state.tsx +412 -0
- package/src/blocks/input-list.tsx +66 -36
- package/src/blocks/{progress-screen.tsx → progress-state.tsx} +154 -93
- package/src/blocks/sidebar.tsx +25 -26
- package/src/components/accordion.tsx +82 -27
- package/src/components/alert-dialog.tsx +2 -2
- package/src/components/alert.tsx +27 -13
- package/src/components/avatar.tsx +1 -1
- package/src/components/badge.tsx +8 -4
- package/src/components/breadcrumb.tsx +1 -1
- package/src/components/button-group.tsx +112 -0
- package/src/components/button.tsx +4 -4
- package/src/components/calendar.tsx +5 -6
- package/src/components/callout.tsx +48 -15
- package/src/components/card.tsx +89 -19
- package/src/components/chart-empty.tsx +116 -0
- package/src/components/chart.tsx +103 -32
- package/src/components/chip.tsx +88 -13
- package/src/components/combobox.tsx +12 -10
- package/src/components/command.tsx +64 -13
- package/src/components/context-menu.tsx +6 -9
- package/src/components/data-table.tsx +135 -20
- package/src/components/date-picker.tsx +18 -7
- package/src/components/description.tsx +1 -1
- package/src/components/dialog.tsx +2 -2
- package/src/components/drawer.tsx +2 -5
- package/src/components/dropdown-menu.tsx +8 -11
- package/src/components/field.tsx +89 -16
- package/src/components/global-layout.tsx +210 -39
- package/src/components/grid.tsx +130 -0
- package/src/components/header.tsx +13 -0
- package/src/components/hover-card.tsx +1 -1
- package/src/components/input-chip.tsx +1 -1
- package/src/components/input-group.tsx +1 -1
- package/src/components/input-otp.tsx +1 -1
- package/src/components/input-password.tsx +24 -12
- package/src/components/input.tsx +1 -1
- package/src/components/label.tsx +10 -13
- package/src/components/list.tsx +13 -9
- package/src/components/map.tsx +101 -5
- package/src/components/media-empty.tsx +156 -0
- package/src/components/menubar.tsx +7 -10
- package/src/components/navigation-menu.tsx +1 -1
- package/src/components/pagination.tsx +286 -1
- package/src/components/progress.tsx +35 -113
- package/src/components/scroll-area.tsx +23 -10
- package/src/components/select.tsx +35 -10
- package/src/components/separator.tsx +1 -1
- package/src/components/sheet.tsx +2 -2
- package/src/components/skeleton.tsx +78 -7
- package/src/components/sonner.tsx +2 -2
- package/src/components/stepper.tsx +3 -3
- package/src/components/table.tsx +6 -3
- package/src/components/tabs.tsx +1 -1
- package/src/components/text-reveal-motion.tsx +10 -0
- package/src/components/textarea.tsx +1 -1
- package/src/components/toggle.tsx +1 -1
- package/src/components/tooltip.tsx +1 -1
- package/src/components/typography-heading.tsx +253 -0
- package/src/components/typography-text.tsx +250 -0
- package/src/components/typography.tsx +13 -0
- package/src/hooks/use-delayed-pending.ts +60 -0
- package/src/index.ts +11 -1
- package/src/lib/block-illustration.tsx +88 -0
- package/src/lib/empty-canvas.tsx +128 -0
- package/src/lib/empty-chip.ts +24 -0
- package/src/lib/optical-center.tsx +45 -0
- package/src/lib/utils.ts +26 -0
- package/dist/blocks/progress-screen.cjs +0 -1
- package/dist/blocks/progress-screen.d.ts.map +0 -1
package/dist/chart.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as b, jsx as s, Fragment as S } from "react/jsx-runtime";
|
|
2
2
|
import * as k from "react";
|
|
3
3
|
import * as N from "recharts";
|
|
4
|
-
import { Area as J, AreaChart as Q, Bar as U, BarChart as Z, CartesianGrid as
|
|
4
|
+
import { Area as J, AreaChart as Q, Bar as U, BarChart as Z, CartesianGrid as K, Cell as ee, Label as te, Legend as re, Tooltip as ne, Customized as ae, LabelList as le, Line as oe, LineChart as se, Pie as ie, PieChart as ce, PolarAngleAxis as de, PolarGrid as ue, PolarRadiusAxis as he, Radar as fe, RadarChart as pe, RadialBar as me, RadialBarChart as ge, Rectangle as Ce, ReferenceLine as be, ResponsiveContainer as xe, Sector as ve, XAxis as ke, YAxis as Ne } from "recharts";
|
|
5
5
|
import { cn as p } from "@brightlocal/ui-components/lib/utils";
|
|
6
|
-
const
|
|
6
|
+
const R = k.createContext(null);
|
|
7
7
|
function P() {
|
|
8
|
-
const
|
|
9
|
-
if (!
|
|
8
|
+
const t = k.useContext(R);
|
|
9
|
+
if (!t)
|
|
10
10
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
11
|
-
return
|
|
11
|
+
return t;
|
|
12
12
|
}
|
|
13
|
-
const
|
|
13
|
+
const j = k.forwardRef(
|
|
14
14
|
({
|
|
15
|
-
id:
|
|
15
|
+
id: t,
|
|
16
16
|
className: r,
|
|
17
17
|
children: l,
|
|
18
18
|
config: e,
|
|
19
|
-
dataHook:
|
|
19
|
+
dataHook: n,
|
|
20
20
|
width: a,
|
|
21
21
|
height: o,
|
|
22
22
|
minWidth: d,
|
|
@@ -26,23 +26,23 @@ const S = k.forwardRef(
|
|
|
26
26
|
trackingLabel: g,
|
|
27
27
|
...m
|
|
28
28
|
}, C) => {
|
|
29
|
-
const
|
|
30
|
-
return /* @__PURE__ */ s(
|
|
29
|
+
const x = k.useId(), f = `chart-${t || x.replace(/:/g, "")}`;
|
|
30
|
+
return /* @__PURE__ */ s(R.Provider, { value: { config: e }, children: /* @__PURE__ */ b(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
33
|
ref: C,
|
|
34
34
|
className: p(
|
|
35
|
-
"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-polar-radius-axis-tick-value]:fill-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-pie-sector]:stroke-background flex aspect-video justify-center
|
|
35
|
+
"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-polar-radius-axis-tick-value]:fill-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-pie-sector]:stroke-background text-body-xs flex aspect-video justify-center [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-pie-sector]:stroke-2 [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none [&_svg_g]:outline-none [&_svg_g]:focus:outline-none",
|
|
36
36
|
r
|
|
37
37
|
),
|
|
38
38
|
"data-chart": f,
|
|
39
|
-
"data-hook":
|
|
39
|
+
"data-hook": n,
|
|
40
40
|
"data-slot": "chart-container",
|
|
41
41
|
"data-tracking-el": h,
|
|
42
42
|
"data-tracking-label": g,
|
|
43
43
|
...m,
|
|
44
44
|
children: [
|
|
45
|
-
/* @__PURE__ */ s(
|
|
45
|
+
/* @__PURE__ */ s(T, { config: e, id: f }),
|
|
46
46
|
/* @__PURE__ */ s(
|
|
47
47
|
N.ResponsiveContainer,
|
|
48
48
|
{
|
|
@@ -60,8 +60,8 @@ const S = k.forwardRef(
|
|
|
60
60
|
) });
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
|
-
|
|
64
|
-
function
|
|
63
|
+
j.displayName = "ChartContainer";
|
|
64
|
+
function T({ id: t, config: r }) {
|
|
65
65
|
const l = Object.entries(r).filter(
|
|
66
66
|
([, e]) => e.theme || e.color
|
|
67
67
|
);
|
|
@@ -69,15 +69,15 @@ function j({ id: n, config: r }) {
|
|
|
69
69
|
"style",
|
|
70
70
|
{
|
|
71
71
|
dangerouslySetInnerHTML: {
|
|
72
|
-
__html: l.map(([e,
|
|
73
|
-
const a = typeof
|
|
72
|
+
__html: l.map(([e, n]) => {
|
|
73
|
+
const a = typeof n.color == "string" ? n.color.replace(/^hsl\((.*)\)$/, "$1") : null;
|
|
74
74
|
return a ? `
|
|
75
|
-
[data-chart=${
|
|
75
|
+
[data-chart=${t}] {
|
|
76
76
|
--color-${e}: ${a};
|
|
77
77
|
}
|
|
78
|
-
` :
|
|
78
|
+
` : n.theme ? Object.entries(n.theme).map(
|
|
79
79
|
([o, d]) => `
|
|
80
|
-
.${o} [data-chart=${
|
|
80
|
+
.${o} [data-chart=${t}] {
|
|
81
81
|
--color-${e}: ${d.replace(/^hsl\((.*)\)$/, "$1")};
|
|
82
82
|
}
|
|
83
83
|
`
|
|
@@ -88,16 +88,19 @@ function j({ id: n, config: r }) {
|
|
|
88
88
|
}
|
|
89
89
|
) : null;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return
|
|
91
|
+
function $(t) {
|
|
92
|
+
return t == null || t === "" ? !1 : typeof t == "number" ? Number.isFinite(t) : !0;
|
|
93
93
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
function A({ ...t }) {
|
|
95
|
+
return /* @__PURE__ */ s(N.Tooltip, { ...t });
|
|
96
|
+
}
|
|
97
|
+
A.displayName = "ChartTooltip";
|
|
98
|
+
function W({
|
|
99
|
+
active: t,
|
|
97
100
|
payload: r,
|
|
98
101
|
className: l,
|
|
99
102
|
indicator: e = "dot",
|
|
100
|
-
hideLabel:
|
|
103
|
+
hideLabel: n = !1,
|
|
101
104
|
hideIndicator: a = !1,
|
|
102
105
|
label: o,
|
|
103
106
|
labelFormatter: d,
|
|
@@ -107,38 +110,38 @@ function A({
|
|
|
107
110
|
nameKey: g,
|
|
108
111
|
labelKey: m
|
|
109
112
|
}) {
|
|
110
|
-
const { config: C } = P(),
|
|
111
|
-
if (
|
|
113
|
+
const { config: C } = P(), x = k.useMemo(() => {
|
|
114
|
+
if (n || !r?.length)
|
|
112
115
|
return null;
|
|
113
116
|
const [c] = r;
|
|
114
117
|
if (!c)
|
|
115
118
|
return null;
|
|
116
|
-
const
|
|
117
|
-
return d ? /* @__PURE__ */ s("div", { className: p("font-medium", i), children: d(
|
|
119
|
+
const L = `${m || c.dataKey || c.name || "value"}`, y = C[L], v = !m && typeof o == "string" ? C[o]?.label || o : y?.label;
|
|
120
|
+
return d ? /* @__PURE__ */ s("div", { className: p("font-medium", i), children: d(v, r) }) : v ? /* @__PURE__ */ s("div", { className: p("font-medium", i), children: v }) : null;
|
|
118
121
|
}, [
|
|
119
122
|
o,
|
|
120
123
|
d,
|
|
121
124
|
r,
|
|
122
|
-
|
|
125
|
+
n,
|
|
123
126
|
i,
|
|
124
127
|
C,
|
|
125
128
|
m
|
|
126
129
|
]);
|
|
127
|
-
if (!
|
|
130
|
+
if (!t || !r?.length)
|
|
128
131
|
return null;
|
|
129
132
|
const f = r.length === 1 && e !== "dot";
|
|
130
|
-
return /* @__PURE__ */
|
|
133
|
+
return /* @__PURE__ */ b(
|
|
131
134
|
"div",
|
|
132
135
|
{
|
|
133
136
|
className: p(
|
|
134
|
-
"border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5
|
|
137
|
+
"border-border/50 bg-background text-body-xs grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 shadow-xl",
|
|
135
138
|
l
|
|
136
139
|
),
|
|
137
140
|
"data-slot": "chart-tooltip-content",
|
|
138
141
|
children: [
|
|
139
|
-
f ? null :
|
|
140
|
-
/* @__PURE__ */ s("div", { className: "grid gap-1.5", children: r.map((c,
|
|
141
|
-
const
|
|
142
|
+
f ? null : x,
|
|
143
|
+
/* @__PURE__ */ s("div", { className: "grid gap-1.5", children: r.map((c, L) => {
|
|
144
|
+
const y = `${g || c.name || c.dataKey || "value"}`, v = C[y], _ = h || c.color || c.payload.fill || `var(--color-${y})`;
|
|
142
145
|
return /* @__PURE__ */ s(
|
|
143
146
|
"div",
|
|
144
147
|
{
|
|
@@ -146,8 +149,9 @@ function A({
|
|
|
146
149
|
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2",
|
|
147
150
|
e === "dot" && "items-center"
|
|
148
151
|
),
|
|
149
|
-
|
|
150
|
-
|
|
152
|
+
"data-slot": "chart-tooltip-item",
|
|
153
|
+
children: u && $(c.value) && c.name ? u(c.value, c.name, c, L, r) : /* @__PURE__ */ b(S, { children: [
|
|
154
|
+
v?.icon && !a ? /* @__PURE__ */ s(v.icon, { size: 10 }) : !a && /* @__PURE__ */ s(
|
|
151
155
|
"div",
|
|
152
156
|
{
|
|
153
157
|
className: p("shrink-0 rounded-[2px]", {
|
|
@@ -162,19 +166,33 @@ function A({
|
|
|
162
166
|
}
|
|
163
167
|
}
|
|
164
168
|
),
|
|
165
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ b(
|
|
166
170
|
"div",
|
|
167
171
|
{
|
|
168
172
|
className: p(
|
|
169
|
-
"flex flex-1 justify-between leading-none",
|
|
173
|
+
"flex flex-1 justify-between gap-2 leading-none",
|
|
170
174
|
f ? "items-end" : "items-center"
|
|
171
175
|
),
|
|
172
176
|
children: [
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
f ?
|
|
175
|
-
/* @__PURE__ */ s(
|
|
177
|
+
/* @__PURE__ */ b("div", { className: "grid gap-1.5", children: [
|
|
178
|
+
f ? x : null,
|
|
179
|
+
/* @__PURE__ */ s(
|
|
180
|
+
"span",
|
|
181
|
+
{
|
|
182
|
+
className: "text-muted-foreground",
|
|
183
|
+
"data-slot": "chart-tooltip-item-name",
|
|
184
|
+
children: v?.label || c.name
|
|
185
|
+
}
|
|
186
|
+
)
|
|
176
187
|
] }),
|
|
177
|
-
c.value && /* @__PURE__ */ s(
|
|
188
|
+
$(c.value) && /* @__PURE__ */ s(
|
|
189
|
+
"span",
|
|
190
|
+
{
|
|
191
|
+
className: "text-foreground tabular-nums",
|
|
192
|
+
"data-slot": "chart-tooltip-item-value",
|
|
193
|
+
children: typeof c.value == "number" ? c.value.toLocaleString() : c.value
|
|
194
|
+
}
|
|
195
|
+
)
|
|
178
196
|
]
|
|
179
197
|
}
|
|
180
198
|
)
|
|
@@ -187,17 +205,17 @@ function A({
|
|
|
187
205
|
}
|
|
188
206
|
);
|
|
189
207
|
}
|
|
190
|
-
|
|
191
|
-
function
|
|
192
|
-
return /* @__PURE__ */ s(N.Legend, { ...
|
|
208
|
+
W.displayName = "ChartTooltipContent";
|
|
209
|
+
function D({ ...t }) {
|
|
210
|
+
return /* @__PURE__ */ s(N.Legend, { ...t });
|
|
193
211
|
}
|
|
194
|
-
|
|
195
|
-
function
|
|
196
|
-
className:
|
|
212
|
+
D.displayName = "ChartLegend";
|
|
213
|
+
function G({
|
|
214
|
+
className: t,
|
|
197
215
|
hideIcon: r = !1,
|
|
198
216
|
payload: l,
|
|
199
217
|
verticalAlign: e = "bottom",
|
|
200
|
-
nameKey:
|
|
218
|
+
nameKey: n
|
|
201
219
|
}) {
|
|
202
220
|
const { config: a } = P();
|
|
203
221
|
return l?.length ? /* @__PURE__ */ s(
|
|
@@ -206,12 +224,12 @@ function D({
|
|
|
206
224
|
className: p(
|
|
207
225
|
"flex items-center justify-center gap-4",
|
|
208
226
|
e === "top" ? "pb-4" : "pt-4",
|
|
209
|
-
|
|
227
|
+
t
|
|
210
228
|
),
|
|
211
229
|
"data-slot": "chart-legend-content",
|
|
212
230
|
children: l.map((o) => {
|
|
213
|
-
const d = `${
|
|
214
|
-
return /* @__PURE__ */
|
|
231
|
+
const d = `${n || o.dataKey || "value"}`, i = a[d];
|
|
232
|
+
return /* @__PURE__ */ b(
|
|
215
233
|
"div",
|
|
216
234
|
{
|
|
217
235
|
className: p(
|
|
@@ -236,30 +254,30 @@ function D({
|
|
|
236
254
|
}
|
|
237
255
|
) : null;
|
|
238
256
|
}
|
|
239
|
-
|
|
240
|
-
function
|
|
241
|
-
colorKey:
|
|
257
|
+
G.displayName = "ChartLegendContent";
|
|
258
|
+
function w({
|
|
259
|
+
colorKey: t,
|
|
242
260
|
color: r,
|
|
243
261
|
fill: l,
|
|
244
262
|
stroke: e,
|
|
245
|
-
payload:
|
|
263
|
+
payload: n
|
|
246
264
|
}) {
|
|
247
|
-
return (
|
|
265
|
+
return (t && typeof n?.[t] == "string" ? n[t] : void 0) ?? r ?? l ?? e ?? "currentColor";
|
|
248
266
|
}
|
|
249
|
-
function
|
|
250
|
-
size:
|
|
267
|
+
function M({
|
|
268
|
+
size: t = 8,
|
|
251
269
|
custom: r = !1,
|
|
252
270
|
color: l,
|
|
253
271
|
colorKey: e,
|
|
254
|
-
cx:
|
|
272
|
+
cx: n,
|
|
255
273
|
cy: a,
|
|
256
274
|
stroke: o,
|
|
257
275
|
fill: d,
|
|
258
276
|
payload: i
|
|
259
277
|
}) {
|
|
260
|
-
if (
|
|
278
|
+
if (n == null || a == null)
|
|
261
279
|
return null;
|
|
262
|
-
const u =
|
|
280
|
+
const u = w({
|
|
263
281
|
colorKey: e,
|
|
264
282
|
color: l,
|
|
265
283
|
fill: d,
|
|
@@ -270,30 +288,30 @@ function G({
|
|
|
270
288
|
"circle",
|
|
271
289
|
{
|
|
272
290
|
className: r ? "fill-background" : void 0,
|
|
273
|
-
cx:
|
|
291
|
+
cx: n,
|
|
274
292
|
cy: a,
|
|
275
293
|
"data-slot": "chart-dot",
|
|
276
294
|
fill: r ? void 0 : u,
|
|
277
|
-
r:
|
|
295
|
+
r: t / 2,
|
|
278
296
|
stroke: r ? u : "none",
|
|
279
297
|
strokeWidth: r ? 2 : void 0
|
|
280
298
|
}
|
|
281
299
|
);
|
|
282
300
|
}
|
|
283
|
-
|
|
284
|
-
function
|
|
285
|
-
size:
|
|
301
|
+
M.displayName = "ChartDot";
|
|
302
|
+
function z({
|
|
303
|
+
size: t = 6,
|
|
286
304
|
color: r,
|
|
287
305
|
colorKey: l,
|
|
288
306
|
cx: e,
|
|
289
|
-
cy:
|
|
307
|
+
cy: n,
|
|
290
308
|
stroke: a,
|
|
291
309
|
fill: o,
|
|
292
310
|
payload: d
|
|
293
311
|
}) {
|
|
294
|
-
if (e == null ||
|
|
312
|
+
if (e == null || n == null)
|
|
295
313
|
return null;
|
|
296
|
-
const i =
|
|
314
|
+
const i = w({
|
|
297
315
|
colorKey: l,
|
|
298
316
|
color: r,
|
|
299
317
|
fill: o,
|
|
@@ -305,26 +323,26 @@ function M({
|
|
|
305
323
|
{
|
|
306
324
|
className: "stroke-background",
|
|
307
325
|
cx: e,
|
|
308
|
-
cy:
|
|
326
|
+
cy: n,
|
|
309
327
|
"data-slot": "chart-dot-on-stroke",
|
|
310
328
|
fill: i,
|
|
311
|
-
r:
|
|
329
|
+
r: t / 2,
|
|
312
330
|
strokeWidth: 2
|
|
313
331
|
}
|
|
314
332
|
);
|
|
315
333
|
}
|
|
316
|
-
|
|
317
|
-
function
|
|
318
|
-
type:
|
|
334
|
+
z.displayName = "ChartDotOnStroke";
|
|
335
|
+
function I({
|
|
336
|
+
type: t = "default",
|
|
319
337
|
filled: r = !1,
|
|
320
338
|
fillColor: l = "var(--chart-teal)",
|
|
321
339
|
fillOpacity: e = 0.2,
|
|
322
|
-
boundaryOnly:
|
|
340
|
+
boundaryOnly: n = !1,
|
|
323
341
|
radialLines: a,
|
|
324
342
|
className: o,
|
|
325
343
|
...d
|
|
326
344
|
}) {
|
|
327
|
-
const i =
|
|
345
|
+
const i = t === "circle" ? "circle" : "polygon", h = n ? `[&_.${i === "circle" ? "recharts-polar-grid-concentric-circle" : "recharts-polar-grid-concentric-polygon"}:not(:last-of-type)]:stroke-transparent` : void 0;
|
|
328
346
|
return r ? /* @__PURE__ */ s(
|
|
329
347
|
N.PolarGrid,
|
|
330
348
|
{
|
|
@@ -346,35 +364,35 @@ function z({
|
|
|
346
364
|
}
|
|
347
365
|
);
|
|
348
366
|
}
|
|
349
|
-
|
|
350
|
-
function
|
|
351
|
-
type:
|
|
367
|
+
I.displayName = "ChartRadarGrid";
|
|
368
|
+
function O({
|
|
369
|
+
type: t = "default",
|
|
352
370
|
data: r,
|
|
353
371
|
primaryKey: l,
|
|
354
372
|
secondaryKey: e,
|
|
355
|
-
x:
|
|
373
|
+
x: n,
|
|
356
374
|
y: a,
|
|
357
375
|
textAnchor: o,
|
|
358
376
|
payload: d,
|
|
359
377
|
index: i
|
|
360
378
|
}) {
|
|
361
|
-
const u = r != null && i != null ? r[i] : void 0, h = u && l != null ? u[l] : void 0, g = u && e != null ? u[e] : void 0, m =
|
|
362
|
-
return /* @__PURE__ */
|
|
379
|
+
const u = r != null && i != null ? r[i] : void 0, h = u && l != null ? u[l] : void 0, g = u && e != null ? u[e] : void 0, m = t === "default" && h != null ? g != null ? `${String(h)}/${String(g)}` : String(h) : null;
|
|
380
|
+
return /* @__PURE__ */ b(
|
|
363
381
|
"text",
|
|
364
382
|
{
|
|
365
|
-
className: "text-xs",
|
|
383
|
+
className: "text-body-xs",
|
|
366
384
|
"data-slot": "chart-radar-label-wrapper",
|
|
367
385
|
textAnchor: o,
|
|
368
|
-
x:
|
|
386
|
+
x: n,
|
|
369
387
|
y: a,
|
|
370
388
|
children: [
|
|
371
|
-
m != null && /* @__PURE__ */ s("tspan", { className: "fill-card-foreground", dy: "-0.5em", x:
|
|
389
|
+
m != null && /* @__PURE__ */ s("tspan", { className: "fill-card-foreground", dy: "-0.5em", x: n, children: m }),
|
|
372
390
|
/* @__PURE__ */ s(
|
|
373
391
|
"tspan",
|
|
374
392
|
{
|
|
375
393
|
className: "fill-muted-foreground",
|
|
376
394
|
dy: m != null ? "1.2em" : void 0,
|
|
377
|
-
x:
|
|
395
|
+
x: n,
|
|
378
396
|
children: d?.value
|
|
379
397
|
}
|
|
380
398
|
)
|
|
@@ -382,26 +400,26 @@ function I({
|
|
|
382
400
|
}
|
|
383
401
|
);
|
|
384
402
|
}
|
|
385
|
-
|
|
386
|
-
function
|
|
387
|
-
nameKey:
|
|
403
|
+
O.displayName = "ChartRadarLabelWrapper";
|
|
404
|
+
function B({
|
|
405
|
+
nameKey: t,
|
|
388
406
|
config: r,
|
|
389
407
|
radiusRatio: l = 0.5,
|
|
390
408
|
cx: e,
|
|
391
|
-
cy:
|
|
409
|
+
cy: n,
|
|
392
410
|
midAngle: a = 0,
|
|
393
411
|
innerRadius: o = 0,
|
|
394
412
|
outerRadius: d = 0,
|
|
395
413
|
payload: i,
|
|
396
414
|
name: u
|
|
397
415
|
}) {
|
|
398
|
-
if (e == null ||
|
|
416
|
+
if (e == null || n == null)
|
|
399
417
|
return null;
|
|
400
|
-
const h = Math.PI / 180, g = o + (d - o) * l, m = e + g * Math.cos(-a * h), C =
|
|
418
|
+
const h = Math.PI / 180, g = o + (d - o) * l, m = e + g * Math.cos(-a * h), C = n + g * Math.sin(-a * h), x = t != null && i != null ? i[t] : void 0, f = x != null ? String(x) : u, c = f != null ? r?.[f]?.label ?? f : f;
|
|
401
419
|
return /* @__PURE__ */ s(
|
|
402
420
|
"text",
|
|
403
421
|
{
|
|
404
|
-
className: "fill-foreground text-xs",
|
|
422
|
+
className: "fill-foreground text-body-xs",
|
|
405
423
|
"data-slot": "chart-pie-label-list",
|
|
406
424
|
dominantBaseline: "middle",
|
|
407
425
|
textAnchor: "middle",
|
|
@@ -411,22 +429,22 @@ function O({
|
|
|
411
429
|
}
|
|
412
430
|
);
|
|
413
431
|
}
|
|
414
|
-
|
|
415
|
-
function
|
|
416
|
-
valueKey:
|
|
432
|
+
B.displayName = "ChartPieLabelList";
|
|
433
|
+
function V({
|
|
434
|
+
valueKey: t,
|
|
417
435
|
x: r,
|
|
418
436
|
y: l,
|
|
419
437
|
textAnchor: e,
|
|
420
|
-
payload:
|
|
438
|
+
payload: n,
|
|
421
439
|
value: a
|
|
422
440
|
}) {
|
|
423
441
|
if (r == null || l == null)
|
|
424
442
|
return null;
|
|
425
|
-
const o =
|
|
443
|
+
const o = t != null && n != null ? n[t] : a;
|
|
426
444
|
return /* @__PURE__ */ s(
|
|
427
445
|
"text",
|
|
428
446
|
{
|
|
429
|
-
className: "fill-foreground text-xs",
|
|
447
|
+
className: "fill-foreground text-body-xs",
|
|
430
448
|
"data-slot": "chart-pie-label-wrapper",
|
|
431
449
|
dominantBaseline: "middle",
|
|
432
450
|
textAnchor: e,
|
|
@@ -436,47 +454,44 @@ function B({
|
|
|
436
454
|
}
|
|
437
455
|
);
|
|
438
456
|
}
|
|
439
|
-
|
|
440
|
-
const
|
|
441
|
-
"2xl": "text-
|
|
442
|
-
"3xl": "text-3xl",
|
|
443
|
-
"4xl": "text-4xl
|
|
457
|
+
V.displayName = "ChartPieLabelWrapper";
|
|
458
|
+
const q = {
|
|
459
|
+
"2xl": "text-metric",
|
|
460
|
+
"3xl": "font-sans text-3xl font-semibold",
|
|
461
|
+
"4xl": "font-sans text-4xl font-semibold"
|
|
444
462
|
};
|
|
445
|
-
function
|
|
446
|
-
primary:
|
|
463
|
+
function E({
|
|
464
|
+
primary: t,
|
|
447
465
|
secondary: r,
|
|
448
466
|
size: l = "3xl",
|
|
449
467
|
viewBox: e
|
|
450
468
|
}) {
|
|
451
469
|
if (e == null || typeof e != "object" || !("cx" in e) || !("cy" in e))
|
|
452
470
|
return null;
|
|
453
|
-
const { cx:
|
|
454
|
-
return /* @__PURE__ */
|
|
471
|
+
const { cx: n, cy: a } = e;
|
|
472
|
+
return /* @__PURE__ */ b(
|
|
455
473
|
"text",
|
|
456
474
|
{
|
|
457
475
|
"data-slot": "chart-center-label",
|
|
458
476
|
dominantBaseline: "middle",
|
|
459
477
|
textAnchor: "middle",
|
|
460
|
-
x:
|
|
478
|
+
x: n,
|
|
461
479
|
y: a,
|
|
462
480
|
children: [
|
|
463
481
|
/* @__PURE__ */ s(
|
|
464
482
|
"tspan",
|
|
465
483
|
{
|
|
466
|
-
className: p(
|
|
467
|
-
|
|
468
|
-
V[l]
|
|
469
|
-
),
|
|
470
|
-
x: t,
|
|
484
|
+
className: p("fill-foreground", q[l]),
|
|
485
|
+
x: n,
|
|
471
486
|
y: a,
|
|
472
|
-
children:
|
|
487
|
+
children: t
|
|
473
488
|
}
|
|
474
489
|
),
|
|
475
490
|
r != null && /* @__PURE__ */ s(
|
|
476
491
|
"tspan",
|
|
477
492
|
{
|
|
478
|
-
className: "fill-muted-foreground
|
|
479
|
-
x:
|
|
493
|
+
className: "fill-muted-foreground text-body-xs",
|
|
494
|
+
x: n,
|
|
480
495
|
y: a + 24,
|
|
481
496
|
children: r
|
|
482
497
|
}
|
|
@@ -485,47 +500,47 @@ function q({
|
|
|
485
500
|
}
|
|
486
501
|
);
|
|
487
502
|
}
|
|
488
|
-
|
|
503
|
+
E.displayName = "ChartCenterLabel";
|
|
489
504
|
export {
|
|
490
505
|
J as Area,
|
|
491
506
|
Q as AreaChart,
|
|
492
507
|
U as Bar,
|
|
493
508
|
Z as BarChart,
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
509
|
+
K as CartesianGrid,
|
|
510
|
+
ee as Cell,
|
|
511
|
+
E as ChartCenterLabel,
|
|
512
|
+
j as ChartContainer,
|
|
513
|
+
M as ChartDot,
|
|
514
|
+
z as ChartDotOnStroke,
|
|
515
|
+
te as ChartLabel,
|
|
516
|
+
D as ChartLegend,
|
|
517
|
+
G as ChartLegendContent,
|
|
518
|
+
B as ChartPieLabelList,
|
|
519
|
+
V as ChartPieLabelWrapper,
|
|
520
|
+
I as ChartRadarGrid,
|
|
521
|
+
O as ChartRadarLabelWrapper,
|
|
522
|
+
T as ChartStyle,
|
|
523
|
+
A as ChartTooltip,
|
|
524
|
+
W as ChartTooltipContent,
|
|
510
525
|
re as ChartsLegend,
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
526
|
+
ne as ChartsTooltip,
|
|
527
|
+
ae as Customized,
|
|
528
|
+
le as LabelList,
|
|
529
|
+
oe as Line,
|
|
530
|
+
se as LineChart,
|
|
531
|
+
ie as Pie,
|
|
532
|
+
ce as PieChart,
|
|
533
|
+
de as PolarAngleAxis,
|
|
534
|
+
ue as PolarGrid,
|
|
535
|
+
he as PolarRadiusAxis,
|
|
536
|
+
fe as Radar,
|
|
537
|
+
pe as RadarChart,
|
|
538
|
+
me as RadialBar,
|
|
539
|
+
ge as RadialBarChart,
|
|
540
|
+
Ce as Rectangle,
|
|
541
|
+
be as ReferenceLine,
|
|
527
542
|
xe as ResponsiveContainer,
|
|
528
543
|
ve as Sector,
|
|
529
|
-
|
|
530
|
-
|
|
544
|
+
ke as XAxis,
|
|
545
|
+
Ne as YAxis
|
|
531
546
|
};
|
package/dist/chip.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),R=require("react"),y=require("class-variance-authority"),I=require("@brightlocal/icons"),b=require("@brightlocal/ui-components/lib/utils"),_=require("@brightlocal/ui-components/spinner"),l=require("@brightlocal/ui-components/tooltip");function $(s){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>s[t]})}}return e.default=s,Object.freeze(e)}const c=$(R),v=y.cva(["inline-flex","items-center","justify-center","gap-0.5","rounded-full","whitespace-nowrap","shrink-0","select-none","bg-secondary","text-foreground","transition-[color,background-color,box-shadow]","duration-fast","ease-out","hover:bg-secondary/80","outline-none","focus-visible:shadow-default","disabled:pointer-events-none","disabled:opacity-50","aria-disabled:pointer-events-none","aria-disabled:opacity-50"],{variants:{size:{md:["h-7","pl-2.5","pr-1","text-label-sm"],lg:["h-8","pl-4","pr-2","text-label"]}},defaultVariants:{size:"md"}}),x=y.cva(["inline-flex","items-center","justify-center","rounded-full","cursor-pointer","text-muted-foreground","hover:text-foreground","outline-none","focus-visible:text-foreground","disabled:pointer-events-none","disabled:opacity-50"],{variants:{size:{md:["size-6"],lg:["size-6"]}},defaultVariants:{size:"md"}}),j=c.forwardRef(({className:s,children:e,size:t="md",loading:i=!1,disabled:w=!1,onRemove:d,dataHook:h,trackingEl:u,trackingLabel:k,maxWidth:T=200,loadingLabel:D,removeAriaLabel:m,removableAriaLabel:z,onKeyDown:S,...q},C)=>{const p=w||i,N=t==="lg"?16:14,f=typeof e=="string"||typeof e=="number"?String(e):"chip",o=d!==void 0&&!p,O=n=>{S?.(n),!(n.defaultPrevented||!o)&&(n.key==="Backspace"||n.key==="Delete")&&(n.preventDefault(),d(n))},r=c.useRef(null),[V,P]=c.useState(!1);c.useEffect(()=>{const n=()=>{r.current&&P(r.current.scrollWidth>r.current.clientWidth)};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]);const g=a.jsx("span",{ref:r,className:"truncate","data-slot":"chip-label",style:{maxWidth:T},children:e});return a.jsxs("div",{ref:C,"aria-disabled":p?"true":void 0,"aria-label":o?(z??"{name}, press Delete to remove").replace("{name}",f):void 0,className:b.cn(v({size:t}),s),"data-hook":h,"data-slot":"chip","data-tracking-el":u,"data-tracking-label":k,role:o?"group":void 0,tabIndex:o?0:void 0,onKeyDown:O,...q,children:[V?a.jsx(l.TooltipProvider,{children:a.jsxs(l.Tooltip,{children:[a.jsx(l.TooltipTrigger,{asChild:!0,children:g}),a.jsx(l.TooltipContent,{dataHook:`${h}-tooltip`,sideOffset:8,children:e})]})}):g,i?a.jsx("span",{"aria-label":D??"Loading",className:b.cn(x({size:t})),"data-slot":"chip-loading",role:"status",children:a.jsx(_.Spinner,{size:t==="lg"?"md":"sm"})}):a.jsx("button",{"aria-label":m?m.replace("{name}",f):`Remove ${f}`,className:b.cn(x({size:t})),"data-slot":"chip-delete","data-tracking-el":u?`${u}-delete`:void 0,disabled:p,tabIndex:-1,type:"button",onClick:d,children:a.jsx(I.X,{size:N})})]})});j.displayName="Chip";exports.Chip=j;exports.chipVariants=v;
|