@brightlocal/ui-components 2.22.0 → 2.23.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 +2 -1
- package/component-meta.json +19 -1
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +31 -31
- package/dist/blocks/data-table.cjs +1 -1
- package/dist/blocks/data-table.js +2 -2
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.js +111 -109
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +109 -121
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +295 -293
- package/dist/loading.cjs +1 -0
- package/dist/loading.d.ts +46 -0
- package/dist/loading.d.ts.map +1 -0
- package/dist/loading.js +142 -0
- package/dist/map.cjs +1 -1
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +1 -1
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +97 -99
- package/dist/popover.cjs +1 -1
- package/dist/popover.d.ts.map +1 -1
- package/dist/popover.js +27 -26
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +29 -35
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.d.ts +21 -2
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.js +35 -32
- package/package.json +1 -1
- package/src/blocks/data-table.tsx +2 -2
- package/src/components/alert.tsx +9 -13
- package/src/components/context-menu.tsx +8 -3
- package/src/components/dropdown-menu.tsx +6 -15
- package/src/components/loading.tsx +322 -0
- package/src/components/map.tsx +3 -1
- package/src/components/menubar.tsx +6 -5
- package/src/components/popover.tsx +6 -2
- package/src/components/select.tsx +5 -8
- package/src/components/tooltip.tsx +28 -3
- package/src/index.ts +1 -0
package/dist/select.js
CHANGED
|
@@ -3,21 +3,21 @@ import * as h from "react";
|
|
|
3
3
|
import * as o from "@radix-ui/react-select";
|
|
4
4
|
import { Check as x, ChevronDown as f, ChevronUp as S } from "@brightlocal/icons";
|
|
5
5
|
import { cva as y } from "class-variance-authority";
|
|
6
|
-
import { cn as a } from "@brightlocal/ui-components/lib/utils";
|
|
6
|
+
import { cn as a, FLOATING_CONTENT_ANIMATION as N } from "@brightlocal/ui-components/lib/utils";
|
|
7
7
|
import { useDevWarning as w } from "./lib/use-dev-warning.js";
|
|
8
|
-
import { useOverlayPointerLock as
|
|
9
|
-
function
|
|
8
|
+
import { useOverlayPointerLock as k } from "@brightlocal/ui-components/hooks/use-overlay-pointer-lock";
|
|
9
|
+
function I({ children: e, ...r }) {
|
|
10
10
|
return /* @__PURE__ */ t(o.Root, { "data-slot": "select", ...r, children: e });
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
I.displayName = "Select";
|
|
13
13
|
function C(e) {
|
|
14
14
|
return /* @__PURE__ */ t(o.Group, { "data-slot": "select-group", ...e });
|
|
15
15
|
}
|
|
16
16
|
C.displayName = "SelectGroup";
|
|
17
|
-
function
|
|
17
|
+
function T(e) {
|
|
18
18
|
return /* @__PURE__ */ t(o.Value, { "data-slot": "select-value", ...e });
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
T.displayName = "SelectValue";
|
|
21
21
|
const j = y([
|
|
22
22
|
// Base layout
|
|
23
23
|
"relative flex w-full h-9 items-center justify-between gap-2",
|
|
@@ -48,15 +48,15 @@ function B({
|
|
|
48
48
|
placeholder: l,
|
|
49
49
|
dataHook: s,
|
|
50
50
|
error: i,
|
|
51
|
-
selectLabel:
|
|
51
|
+
selectLabel: d,
|
|
52
52
|
...n
|
|
53
53
|
}) {
|
|
54
|
-
const
|
|
54
|
+
const c = i || n["aria-invalid"] === !0 || n["aria-invalid"] === "true", u = n["aria-required"] === !0 || n["aria-required"] === "true", m = n["aria-label"] || d || l || "Select an option", v = c ? "border-destructive-40 dark:border-destructive-40 focus-visible:border-destructive-40 dark:focus-visible:border-destructive-40 focus-visible:shadow-destructive data-[state=open]:border-destructive-40 dark:data-[state=open]:border-destructive-40 data-[state=open]:shadow-destructive" : "";
|
|
55
55
|
return /* @__PURE__ */ p(
|
|
56
56
|
o.Trigger,
|
|
57
57
|
{
|
|
58
58
|
...n,
|
|
59
|
-
"aria-invalid":
|
|
59
|
+
"aria-invalid": c ? "true" : void 0,
|
|
60
60
|
"aria-label": m,
|
|
61
61
|
"aria-required": u ? "true" : void 0,
|
|
62
62
|
className: a(j(), v, e),
|
|
@@ -70,15 +70,15 @@ function B({
|
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
B.displayName = "SelectTrigger";
|
|
73
|
-
function
|
|
73
|
+
function L({
|
|
74
74
|
className: e,
|
|
75
75
|
children: r,
|
|
76
76
|
position: l = "popper",
|
|
77
77
|
maxHeight: s,
|
|
78
78
|
style: i,
|
|
79
|
-
...
|
|
79
|
+
...d
|
|
80
80
|
}) {
|
|
81
|
-
|
|
81
|
+
k();
|
|
82
82
|
const n = h.useRef(null);
|
|
83
83
|
w(
|
|
84
84
|
() => n.current ? n.current.querySelectorAll('[data-slot="select-item"]').length >= 100 : !1,
|
|
@@ -86,7 +86,7 @@ function q({
|
|
|
86
86
|
Import: import { Combobox } from "@brightlocal/ui-components/combobox"`,
|
|
87
87
|
[r]
|
|
88
88
|
);
|
|
89
|
-
const
|
|
89
|
+
const c = a(
|
|
90
90
|
// Base appearance
|
|
91
91
|
"relative z-50 overflow-hidden",
|
|
92
92
|
"min-w-[8rem]",
|
|
@@ -96,13 +96,7 @@ Import: import { Combobox } from "@brightlocal/ui-components/combobox"`,
|
|
|
96
96
|
"max-h-[var(--radix-select-content-available-height)]",
|
|
97
97
|
"origin-[var(--radix-select-content-transform-origin)]",
|
|
98
98
|
// Animations
|
|
99
|
-
|
|
100
|
-
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
101
|
-
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
102
|
-
"data-[side=bottom]:slide-in-from-top-2",
|
|
103
|
-
"data-[side=left]:slide-in-from-right-2",
|
|
104
|
-
"data-[side=right]:slide-in-from-left-2",
|
|
105
|
-
"data-[side=top]:slide-in-from-bottom-2"
|
|
99
|
+
N
|
|
106
100
|
), u = l === "popper" && a(
|
|
107
101
|
"data-[side=bottom]:translate-y-1",
|
|
108
102
|
"data-[side=left]:-translate-x-1",
|
|
@@ -115,11 +109,11 @@ Import: import { Combobox } from "@brightlocal/ui-components/combobox"`,
|
|
|
115
109
|
return /* @__PURE__ */ t(o.Portal, { children: /* @__PURE__ */ p(
|
|
116
110
|
o.Content,
|
|
117
111
|
{
|
|
118
|
-
className: a(
|
|
112
|
+
className: a(c, u, e),
|
|
119
113
|
"data-slot": "select-content",
|
|
120
114
|
position: l,
|
|
121
115
|
style: m,
|
|
122
|
-
...
|
|
116
|
+
...d,
|
|
123
117
|
children: [
|
|
124
118
|
/* @__PURE__ */ t(b, {}),
|
|
125
119
|
/* @__PURE__ */ t(
|
|
@@ -138,8 +132,8 @@ Import: import { Combobox } from "@brightlocal/ui-components/combobox"`,
|
|
|
138
132
|
}
|
|
139
133
|
) });
|
|
140
134
|
}
|
|
141
|
-
|
|
142
|
-
function
|
|
135
|
+
L.displayName = "SelectContent";
|
|
136
|
+
function _({
|
|
143
137
|
className: e,
|
|
144
138
|
...r
|
|
145
139
|
}) {
|
|
@@ -155,8 +149,8 @@ function D({
|
|
|
155
149
|
}
|
|
156
150
|
);
|
|
157
151
|
}
|
|
158
|
-
|
|
159
|
-
function
|
|
152
|
+
_.displayName = "SelectLabel";
|
|
153
|
+
function q({
|
|
160
154
|
className: e,
|
|
161
155
|
children: r,
|
|
162
156
|
...l
|
|
@@ -189,8 +183,8 @@ function L({
|
|
|
189
183
|
}
|
|
190
184
|
);
|
|
191
185
|
}
|
|
192
|
-
|
|
193
|
-
function
|
|
186
|
+
q.displayName = "SelectItem";
|
|
187
|
+
function D({
|
|
194
188
|
className: e,
|
|
195
189
|
...r
|
|
196
190
|
}) {
|
|
@@ -203,7 +197,7 @@ function R({
|
|
|
203
197
|
}
|
|
204
198
|
);
|
|
205
199
|
}
|
|
206
|
-
|
|
200
|
+
D.displayName = "SelectSeparator";
|
|
207
201
|
function b({
|
|
208
202
|
className: e,
|
|
209
203
|
...r
|
|
@@ -241,14 +235,14 @@ function g({
|
|
|
241
235
|
}
|
|
242
236
|
g.displayName = "SelectScrollDownButton";
|
|
243
237
|
export {
|
|
244
|
-
|
|
245
|
-
|
|
238
|
+
I as Select,
|
|
239
|
+
L as SelectContent,
|
|
246
240
|
C as SelectGroup,
|
|
247
|
-
|
|
248
|
-
|
|
241
|
+
q as SelectItem,
|
|
242
|
+
_ as SelectLabel,
|
|
249
243
|
g as SelectScrollDownButton,
|
|
250
244
|
b as SelectScrollUpButton,
|
|
251
|
-
|
|
245
|
+
D as SelectSeparator,
|
|
252
246
|
B as SelectTrigger,
|
|
253
|
-
|
|
247
|
+
T as SelectValue
|
|
254
248
|
};
|
package/dist/tooltip.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"),m=require("react"),x=require("@radix-ui/react-tooltip"),l=require("@brightlocal/ui-components/lib/utils");function s(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(o,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return o.default=t,Object.freeze(o)}const c=s(m),i=s(x);function j({delayDuration:t=0,skipDelayDuration:o=0,...e}){return a.jsx(i.Provider,{delayDuration:t,skipDelayDuration:o,...e})}function y({...t}){return a.jsx(i.Root,{...t})}const d=c.forwardRef(({dataHook:t,trackingEl:o,trackingLabel:e,...r},n)=>a.jsx(i.Trigger,{ref:n,"data-hook":t,"data-slot":"tooltip-trigger","data-tracking-el":o,"data-tracking-label":e,...r}));d.displayName="TooltipTrigger";const p=c.forwardRef(({className:t,sideOffset:o=0,dataHook:e,trackingEl:r,trackingLabel:n,hideArrow:u=!1,children:g,...T},f)=>a.jsx(i.Portal,{children:a.jsxs(i.Content,{ref:f,className:l.cn("bg-secondary text-secondary-foreground z-50 w-max max-w-sm rounded-md px-3 py-1.5 text-xs leading-4 font-normal",l.FLOATING_CONTENT_ANIMATION,"**:data-[slot=tooltip-arrow]:-translate-y-px",t),"data-hook":e,"data-slot":"tooltip-content","data-tracking-el":r,"data-tracking-label":n,sideOffset:o,...T,children:[g,!u&&a.jsx(i.Arrow,{className:"fill-secondary","data-slot":"tooltip-arrow",height:7,width:14})]})}));p.displayName="TooltipContent";exports.Tooltip=y;exports.TooltipContent=p;exports.TooltipProvider=j;exports.TooltipTrigger=d;
|
package/dist/tooltip.d.ts
CHANGED
|
@@ -41,7 +41,26 @@ declare function TooltipProvider({ delayDuration, skipDelayDuration, ...props }:
|
|
|
41
41
|
* multiple tooltips.
|
|
42
42
|
*/
|
|
43
43
|
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
|
|
44
|
+
interface TooltipTriggerProps extends React.ComponentProps<typeof TooltipPrimitive.Trigger> {
|
|
45
|
+
/**
|
|
46
|
+
* Data hook for automated testing, rendered as the `data-hook` attribute
|
|
47
|
+
* (the platform test-selector contract).
|
|
48
|
+
*
|
|
49
|
+
* Optional because `TooltipTrigger` is commonly used with `asChild`, where the
|
|
50
|
+
* child element (e.g. a `Button`) already carries its own `dataHook`. When
|
|
51
|
+
* `asChild` is set, the child's `data-hook` wins over this one.
|
|
52
|
+
*/
|
|
53
|
+
dataHook?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Optional analytics element identifier
|
|
56
|
+
*/
|
|
57
|
+
trackingEl?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Optional analytics label context
|
|
60
|
+
*/
|
|
61
|
+
trackingLabel?: string;
|
|
62
|
+
}
|
|
63
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<TooltipTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
45
64
|
interface TooltipContentProps extends React.ComponentProps<typeof TooltipPrimitive.Content> {
|
|
46
65
|
/**
|
|
47
66
|
* Required data-hook attribute for testing and analytics
|
|
@@ -62,5 +81,5 @@ interface TooltipContentProps extends React.ComponentProps<typeof TooltipPrimiti
|
|
|
62
81
|
}
|
|
63
82
|
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
64
83
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
65
|
-
export type { TooltipContentProps, TooltipProviderProps };
|
|
84
|
+
export type { TooltipContentProps, TooltipProviderProps, TooltipTriggerProps };
|
|
66
85
|
//# sourceMappingURL=tooltip.d.ts.map
|
package/dist/tooltip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAO5D,UAAU,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CACzD,OAAO,gBAAgB,CAAC,QAAQ,CACjC;IACC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;GAeG;AACH,iBAAS,eAAe,CAAC,EACvB,aAAiB,EACjB,iBAAqB,EACrB,GAAG,KAAK,EACT,EAAE,oBAAoB,2CAQtB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,OAAO,CAAC,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAEpD;AAED,QAAA,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAO5D,UAAU,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CACzD,OAAO,gBAAgB,CAAC,QAAQ,CACjC;IACC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;GAeG;AACH,iBAAS,eAAe,CAAC,EACvB,aAAiB,EACjB,iBAAqB,EACrB,GAAG,KAAK,EACT,EAAE,oBAAoB,2CAQtB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,OAAO,CAAC,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAEpD;AAED,UAAU,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CACxD,OAAO,gBAAgB,CAAC,OAAO,CAChC;IACC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,cAAc,4GAclB,CAAC;AAIH,UAAU,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CACxD,OAAO,gBAAgB,CAAC,OAAO,CAChC;IACC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,cAAc,yGA+CnB,CAAC;AAIF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;AACpE,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,CAAC"}
|
package/dist/tooltip.js
CHANGED
|
@@ -1,65 +1,68 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import { cn as
|
|
1
|
+
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import * as o from "@radix-ui/react-tooltip";
|
|
4
|
+
import { cn as g, FLOATING_CONTENT_ANIMATION as f } from "@brightlocal/ui-components/lib/utils";
|
|
5
5
|
function w({
|
|
6
|
-
delayDuration:
|
|
6
|
+
delayDuration: t = 0,
|
|
7
7
|
skipDelayDuration: r = 0,
|
|
8
|
-
...
|
|
8
|
+
...a
|
|
9
9
|
}) {
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
|
|
10
|
+
return /* @__PURE__ */ e(
|
|
11
|
+
o.Provider,
|
|
12
12
|
{
|
|
13
|
-
delayDuration:
|
|
13
|
+
delayDuration: t,
|
|
14
14
|
skipDelayDuration: r,
|
|
15
|
-
...
|
|
15
|
+
...a
|
|
16
16
|
}
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
...
|
|
19
|
+
function h({
|
|
20
|
+
...t
|
|
21
21
|
}) {
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ e(o.Root, { ...t });
|
|
23
23
|
}
|
|
24
|
-
const T =
|
|
25
|
-
|
|
24
|
+
const T = n.forwardRef(({ dataHook: t, trackingEl: r, trackingLabel: a, ...i }, l) => /* @__PURE__ */ e(
|
|
25
|
+
o.Trigger,
|
|
26
26
|
{
|
|
27
|
-
ref:
|
|
27
|
+
ref: l,
|
|
28
|
+
"data-hook": t,
|
|
28
29
|
"data-slot": "tooltip-trigger",
|
|
29
|
-
|
|
30
|
+
"data-tracking-el": r,
|
|
31
|
+
"data-tracking-label": a,
|
|
32
|
+
...i
|
|
30
33
|
}
|
|
31
34
|
));
|
|
32
35
|
T.displayName = "TooltipTrigger";
|
|
33
|
-
const x =
|
|
36
|
+
const x = n.forwardRef(
|
|
34
37
|
({
|
|
35
|
-
className:
|
|
38
|
+
className: t,
|
|
36
39
|
sideOffset: r = 0,
|
|
37
|
-
dataHook:
|
|
38
|
-
trackingEl:
|
|
40
|
+
dataHook: a,
|
|
41
|
+
trackingEl: i,
|
|
39
42
|
trackingLabel: l,
|
|
40
43
|
hideArrow: d = !1,
|
|
41
44
|
children: s,
|
|
42
45
|
...p
|
|
43
|
-
},
|
|
44
|
-
|
|
46
|
+
}, c) => /* @__PURE__ */ e(o.Portal, { children: /* @__PURE__ */ m(
|
|
47
|
+
o.Content,
|
|
45
48
|
{
|
|
46
|
-
ref:
|
|
47
|
-
className:
|
|
49
|
+
ref: c,
|
|
50
|
+
className: g(
|
|
48
51
|
"bg-secondary text-secondary-foreground z-50 w-max max-w-sm rounded-md px-3 py-1.5 text-xs leading-4 font-normal",
|
|
49
|
-
|
|
52
|
+
f,
|
|
50
53
|
"**:data-[slot=tooltip-arrow]:-translate-y-px",
|
|
51
|
-
|
|
54
|
+
t
|
|
52
55
|
),
|
|
53
|
-
"data-hook":
|
|
56
|
+
"data-hook": a,
|
|
54
57
|
"data-slot": "tooltip-content",
|
|
55
|
-
"data-tracking-el":
|
|
58
|
+
"data-tracking-el": i,
|
|
56
59
|
"data-tracking-label": l,
|
|
57
60
|
sideOffset: r,
|
|
58
61
|
...p,
|
|
59
62
|
children: [
|
|
60
63
|
s,
|
|
61
|
-
!d && /* @__PURE__ */
|
|
62
|
-
|
|
64
|
+
!d && /* @__PURE__ */ e(
|
|
65
|
+
o.Arrow,
|
|
63
66
|
{
|
|
64
67
|
className: "fill-secondary",
|
|
65
68
|
"data-slot": "tooltip-arrow",
|
|
@@ -73,7 +76,7 @@ const x = i.forwardRef(
|
|
|
73
76
|
);
|
|
74
77
|
x.displayName = "TooltipContent";
|
|
75
78
|
export {
|
|
76
|
-
|
|
79
|
+
h as Tooltip,
|
|
77
80
|
x as TooltipContent,
|
|
78
81
|
w as TooltipProvider,
|
|
79
82
|
T as TooltipTrigger
|
package/package.json
CHANGED
|
@@ -511,7 +511,7 @@ export function DataTable<TData>({
|
|
|
511
511
|
.rows.map((row) => <DataTableRow key={row.id} row={row} />)
|
|
512
512
|
) : (
|
|
513
513
|
<TableRow>
|
|
514
|
-
<TableCell colSpan={columnCount}>
|
|
514
|
+
<TableCell align="center" colSpan={columnCount} size="lg">
|
|
515
515
|
<div aria-live="polite" role="status">
|
|
516
516
|
{noResultsMessage}
|
|
517
517
|
</div>
|
|
@@ -778,7 +778,7 @@ export function VirtualizedDataTable<TData>({
|
|
|
778
778
|
</>
|
|
779
779
|
) : (
|
|
780
780
|
<TableRow>
|
|
781
|
-
<TableCell colSpan={columnCount}>
|
|
781
|
+
<TableCell align="center" colSpan={columnCount} size="lg">
|
|
782
782
|
<div aria-live="polite" role="status">
|
|
783
783
|
{noResultsMessage}
|
|
784
784
|
</div>
|
package/src/components/alert.tsx
CHANGED
|
@@ -9,15 +9,11 @@ const alertVariants = cva(
|
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
|
-
default:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
destructive:
|
|
18
|
-
"bg-red-300 text-red-950 dark:bg-red-950 dark:text-red-300",
|
|
19
|
-
warning:
|
|
20
|
-
"bg-orange-200 text-amber-900 dark:bg-amber-900 dark:text-orange-200",
|
|
12
|
+
default: "bg-muted text-foreground",
|
|
13
|
+
success: "bg-success-background text-success-foreground",
|
|
14
|
+
info: "bg-info-background text-info-foreground",
|
|
15
|
+
destructive: "bg-destructive text-destructive-foreground",
|
|
16
|
+
warning: "bg-warning-background text-warning-foreground",
|
|
21
17
|
},
|
|
22
18
|
},
|
|
23
19
|
defaultVariants: {
|
|
@@ -118,7 +114,7 @@ function AlertSuccess({
|
|
|
118
114
|
data-tracking-label={trackingLabel}
|
|
119
115
|
variant="success"
|
|
120
116
|
>
|
|
121
|
-
<CircleCheck className="shrink-0 translate-y-0.5
|
|
117
|
+
<CircleCheck className="text-success-foreground shrink-0 translate-y-0.5" />
|
|
122
118
|
<div className="flex min-w-0 flex-1 flex-col gap-1">
|
|
123
119
|
{title && <AlertTitle>{title}</AlertTitle>}
|
|
124
120
|
<AlertDescription>{description}</AlertDescription>
|
|
@@ -145,7 +141,7 @@ function AlertInfo({
|
|
|
145
141
|
data-tracking-label={trackingLabel}
|
|
146
142
|
variant="info"
|
|
147
143
|
>
|
|
148
|
-
<Info className="shrink-0 translate-y-0.5
|
|
144
|
+
<Info className="text-info-foreground shrink-0 translate-y-0.5" />
|
|
149
145
|
<div className="flex min-w-0 flex-1 flex-col gap-1">
|
|
150
146
|
{title && <AlertTitle>{title}</AlertTitle>}
|
|
151
147
|
<AlertDescription>{description}</AlertDescription>
|
|
@@ -172,7 +168,7 @@ function AlertDestructive({
|
|
|
172
168
|
data-tracking-label={trackingLabel}
|
|
173
169
|
variant="destructive"
|
|
174
170
|
>
|
|
175
|
-
<CircleX className="shrink-0 translate-y-0.5
|
|
171
|
+
<CircleX className="text-destructive-foreground shrink-0 translate-y-0.5" />
|
|
176
172
|
<div className="flex min-w-0 flex-1 flex-col gap-1">
|
|
177
173
|
{title && <AlertTitle>{title}</AlertTitle>}
|
|
178
174
|
<AlertDescription>{description}</AlertDescription>
|
|
@@ -199,7 +195,7 @@ function AlertWarning({
|
|
|
199
195
|
data-tracking-label={trackingLabel}
|
|
200
196
|
variant="warning"
|
|
201
197
|
>
|
|
202
|
-
<TriangleAlert className="shrink-0 translate-y-0.5
|
|
198
|
+
<TriangleAlert className="text-warning-foreground shrink-0 translate-y-0.5" />
|
|
203
199
|
<div className="flex min-w-0 flex-1 flex-col gap-1">
|
|
204
200
|
{title && <AlertTitle>{title}</AlertTitle>}
|
|
205
201
|
<AlertDescription>{description}</AlertDescription>
|
|
@@ -3,7 +3,10 @@ import * as React from "react";
|
|
|
3
3
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
4
4
|
import { Check, ChevronRight, Circle } from "@brightlocal/icons";
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
cn,
|
|
8
|
+
FLOATING_CONTENT_ANIMATION,
|
|
9
|
+
} from "@brightlocal/ui-components/lib/utils";
|
|
7
10
|
import { useOverlayPointerLock } from "@brightlocal/ui-components/hooks/use-overlay-pointer-lock";
|
|
8
11
|
|
|
9
12
|
/**
|
|
@@ -199,7 +202,8 @@ const ContextMenuSubContent = React.forwardRef<
|
|
|
199
202
|
<ContextMenuPrimitive.SubContent
|
|
200
203
|
ref={ref}
|
|
201
204
|
className={cn(
|
|
202
|
-
"border-border bg-popover text-popover-foreground
|
|
205
|
+
"border-border bg-popover text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",
|
|
206
|
+
FLOATING_CONTENT_ANIMATION,
|
|
203
207
|
className
|
|
204
208
|
)}
|
|
205
209
|
data-slot="context-menu-sub-content"
|
|
@@ -230,7 +234,8 @@ const ContextMenuContent = React.forwardRef<
|
|
|
230
234
|
<ContextMenuPrimitive.Content
|
|
231
235
|
ref={ref}
|
|
232
236
|
className={cn(
|
|
233
|
-
"border-border bg-popover text-popover-foreground
|
|
237
|
+
"border-border bg-popover text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",
|
|
238
|
+
FLOATING_CONTENT_ANIMATION,
|
|
234
239
|
className
|
|
235
240
|
)}
|
|
236
241
|
data-slot="context-menu-content"
|
|
@@ -9,7 +9,10 @@ import {
|
|
|
9
9
|
ChevronsUpDown,
|
|
10
10
|
} from "@brightlocal/icons";
|
|
11
11
|
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
cn,
|
|
14
|
+
FLOATING_CONTENT_ANIMATION,
|
|
15
|
+
} from "@brightlocal/ui-components/lib/utils";
|
|
13
16
|
import { useOverlayPointerLock } from "@brightlocal/ui-components/hooks/use-overlay-pointer-lock";
|
|
14
17
|
|
|
15
18
|
/**
|
|
@@ -125,13 +128,7 @@ const DropdownMenuContent = React.forwardRef<
|
|
|
125
128
|
"overflow-x-hidden overflow-y-auto",
|
|
126
129
|
"rounded-md border p-1 shadow-md",
|
|
127
130
|
// Animations
|
|
128
|
-
|
|
129
|
-
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
130
|
-
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
131
|
-
"data-[side=bottom]:slide-in-from-top-2",
|
|
132
|
-
"data-[side=left]:slide-in-from-right-2",
|
|
133
|
-
"data-[side=right]:slide-in-from-left-2",
|
|
134
|
-
"data-[side=top]:slide-in-from-bottom-2",
|
|
131
|
+
FLOATING_CONTENT_ANIMATION,
|
|
135
132
|
],
|
|
136
133
|
className
|
|
137
134
|
)}
|
|
@@ -545,13 +542,7 @@ const DropdownMenuSubContent = React.forwardRef<
|
|
|
545
542
|
"origin-(--radix-dropdown-menu-content-transform-origin)",
|
|
546
543
|
"overflow-hidden rounded-md border p-1 shadow-lg",
|
|
547
544
|
// Animations
|
|
548
|
-
|
|
549
|
-
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
550
|
-
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
551
|
-
"data-[side=bottom]:slide-in-from-top-2",
|
|
552
|
-
"data-[side=left]:slide-in-from-right-2",
|
|
553
|
-
"data-[side=right]:slide-in-from-left-2",
|
|
554
|
-
"data-[side=top]:slide-in-from-bottom-2",
|
|
545
|
+
FLOATING_CONTENT_ANIMATION,
|
|
555
546
|
],
|
|
556
547
|
className
|
|
557
548
|
)}
|