@brightlocal/ui-components 0.1.3 → 0.1.4
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/dist/accordion.cjs +1 -1
- package/dist/accordion.js +1 -1
- package/dist/alert.cjs +1 -1
- package/dist/alert.js +1 -1
- package/dist/blocks/data-table.cjs +1 -1
- package/dist/blocks/data-table.js +1 -1
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +37 -306
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +392 -489
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts +4 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +33 -33
- package/dist/centred-layout.cjs +1 -1
- package/dist/centred-layout.d.ts +5 -18
- package/dist/centred-layout.d.ts.map +1 -1
- package/dist/centred-layout.js +21 -23
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.d.ts +9 -17
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +104 -107
- package/dist/command.cjs +1 -1
- package/dist/command.js +1 -1
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts +3 -0
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +5 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +348 -363
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +1 -1
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.js +1 -1
- package/dist/link.cjs +1 -1
- package/dist/link.js +1 -1
- package/dist/logo.cjs +1 -1
- package/dist/logo.d.ts +6 -4
- package/dist/logo.d.ts.map +1 -1
- package/dist/logo.js +18 -21
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts +3 -0
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +31 -30
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.d.ts +6 -54
- package/dist/navigation-menu.d.ts.map +1 -1
- package/dist/navigation-menu.js +73 -84
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +8 -10
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +78 -86
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.d.ts +6 -23
- package/dist/radio-group.d.ts.map +1 -1
- package/dist/radio-group.js +56 -66
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.d.ts +19 -28
- package/dist/resizable.d.ts.map +1 -1
- package/dist/resizable.js +24 -40
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/separator.cjs +1 -1
- package/dist/separator.d.ts +4 -4
- package/dist/separator.d.ts.map +1 -1
- package/dist/separator.js +19 -21
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +5 -10
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +24 -26
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts +17 -20
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.js +42 -45
- package/dist/switch.cjs +1 -1
- package/dist/switch.d.ts +2 -12
- package/dist/switch.d.ts.map +1 -1
- package/dist/switch.js +37 -41
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +16 -12
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +56 -58
- package/dist/tabs.d.ts +27 -3
- package/dist/tabs.d.ts.map +1 -1
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.d.ts +57 -7
- package/dist/toggle-group.d.ts.map +1 -1
- package/dist/toggle-group.js +60 -67
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.d.ts +12 -26
- package/dist/toggle.d.ts.map +1 -1
- package/dist/toggle.js +16 -20
- package/package.json +2 -2
- package/src/blocks/data-table.tsx +1 -1
- package/src/blocks/sidebar.tsx +157 -532
- package/src/components/accordion.tsx +1 -1
- package/src/components/alert.tsx +1 -1
- package/src/components/breadcrumb.tsx +1 -1
- package/src/components/button.tsx +1 -1
- package/src/components/calendar.tsx +6 -4
- package/src/components/centred-layout.tsx +11 -24
- package/src/components/checkbox.tsx +1 -1
- package/src/components/combobox.tsx +18 -26
- package/src/components/command.tsx +1 -1
- package/src/components/context-menu.tsx +1 -1
- package/src/components/date-picker.tsx +1 -1
- package/src/components/dialog.tsx +1 -1
- package/src/components/dropdown-menu.tsx +1 -1
- package/src/components/field.tsx +2 -0
- package/src/components/input-otp.tsx +1 -1
- package/src/components/input-password.tsx +1 -1
- package/src/components/link.tsx +1 -1
- package/src/components/logo.tsx +9 -7
- package/src/components/menubar.tsx +3 -1
- package/src/components/navigation-menu.tsx +37 -99
- package/src/components/pagination.tsx +13 -19
- package/src/components/radio-group.tsx +17 -38
- package/src/components/resizable.tsx +5 -43
- package/src/components/select.tsx +1 -1
- package/src/components/separator.tsx +5 -5
- package/src/components/sheet.tsx +6 -11
- package/src/components/sonner.tsx +24 -27
- package/src/components/switch.figma.tsx +7 -11
- package/src/components/switch.tsx +9 -19
- package/src/components/table.tsx +23 -18
- package/src/components/tabs.tsx +27 -3
- package/src/components/toggle-group.tsx +115 -86
- package/src/components/toggle.figma.tsx +13 -19
- package/src/components/toggle.tsx +20 -34
package/dist/sheet.js
CHANGED
|
@@ -2,10 +2,9 @@ import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
|
2
2
|
import * as r from "react";
|
|
3
3
|
import * as s from "@radix-ui/react-dialog";
|
|
4
4
|
import { cva as g } from "class-variance-authority";
|
|
5
|
-
import { XIcon as u } from "
|
|
5
|
+
import { XIcon as u } from "@brightlocal/icons";
|
|
6
6
|
import { cn as i } from "@brightlocal/ui-components/lib/utils";
|
|
7
|
-
|
|
8
|
-
const y = g(
|
|
7
|
+
const x = g(
|
|
9
8
|
[
|
|
10
9
|
"bg-background",
|
|
11
10
|
"data-[state=open]:animate-in",
|
|
@@ -68,11 +67,11 @@ const y = g(
|
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
69
|
);
|
|
71
|
-
function
|
|
70
|
+
function y({ ...t }) {
|
|
72
71
|
return /* @__PURE__ */ o(s.Root, { "data-slot": "sheet", modal: !0, ...t });
|
|
73
72
|
}
|
|
74
|
-
|
|
75
|
-
const
|
|
73
|
+
y.displayName = "Sheet";
|
|
74
|
+
const S = r.forwardRef(({ dataHook: t, ...e }, a) => /* @__PURE__ */ o(
|
|
76
75
|
s.Trigger,
|
|
77
76
|
{
|
|
78
77
|
ref: a,
|
|
@@ -81,9 +80,9 @@ const N = r.forwardRef(({ dataHook: t, ...e }, a) => /* @__PURE__ */ o(
|
|
|
81
80
|
...e
|
|
82
81
|
}
|
|
83
82
|
));
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
|
|
83
|
+
S.displayName = "SheetTrigger";
|
|
84
|
+
const b = r.forwardRef(({ ...t }, e) => /* @__PURE__ */ o(s.Close, { ref: e, "data-slot": "sheet-close", ...t }));
|
|
85
|
+
b.displayName = "SheetClose";
|
|
87
86
|
function n({
|
|
88
87
|
...t
|
|
89
88
|
}) {
|
|
@@ -103,7 +102,7 @@ const l = r.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
|
103
102
|
}
|
|
104
103
|
));
|
|
105
104
|
l.displayName = "SheetOverlay";
|
|
106
|
-
const
|
|
105
|
+
const N = r.forwardRef(
|
|
107
106
|
({
|
|
108
107
|
className: t,
|
|
109
108
|
children: e,
|
|
@@ -118,7 +117,7 @@ const w = r.forwardRef(
|
|
|
118
117
|
s.Content,
|
|
119
118
|
{
|
|
120
119
|
ref: p,
|
|
121
|
-
className: i(
|
|
120
|
+
className: i(x({ side: a }), t),
|
|
122
121
|
"data-hook": f,
|
|
123
122
|
"data-slot": "sheet-content",
|
|
124
123
|
"data-tracking-el": c,
|
|
@@ -135,8 +134,8 @@ const w = r.forwardRef(
|
|
|
135
134
|
)
|
|
136
135
|
] })
|
|
137
136
|
);
|
|
138
|
-
|
|
139
|
-
const
|
|
137
|
+
N.displayName = "SheetContent";
|
|
138
|
+
const v = r.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
140
139
|
"div",
|
|
141
140
|
{
|
|
142
141
|
ref: a,
|
|
@@ -145,8 +144,8 @@ const S = r.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
|
145
144
|
...e
|
|
146
145
|
}
|
|
147
146
|
));
|
|
148
|
-
|
|
149
|
-
const
|
|
147
|
+
v.displayName = "SheetHeader";
|
|
148
|
+
const w = r.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
150
149
|
"div",
|
|
151
150
|
{
|
|
152
151
|
ref: a,
|
|
@@ -158,8 +157,8 @@ const R = r.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
|
158
157
|
...e
|
|
159
158
|
}
|
|
160
159
|
));
|
|
161
|
-
|
|
162
|
-
const
|
|
160
|
+
w.displayName = "SheetFooter";
|
|
161
|
+
const R = r.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
163
162
|
s.Title,
|
|
164
163
|
{
|
|
165
164
|
ref: a,
|
|
@@ -168,7 +167,7 @@ const T = r.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
|
168
167
|
...e
|
|
169
168
|
}
|
|
170
169
|
));
|
|
171
|
-
|
|
170
|
+
R.displayName = "SheetTitle";
|
|
172
171
|
const C = r.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
173
172
|
s.Description,
|
|
174
173
|
{
|
|
@@ -180,15 +179,14 @@ const C = r.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
|
180
179
|
));
|
|
181
180
|
C.displayName = "SheetDescription";
|
|
182
181
|
export {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
182
|
+
y as Sheet,
|
|
183
|
+
b as SheetClose,
|
|
184
|
+
N as SheetContent,
|
|
186
185
|
C as SheetDescription,
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
w as SheetFooter,
|
|
187
|
+
v as SheetHeader,
|
|
189
188
|
l as SheetOverlay,
|
|
190
189
|
n as SheetPortal,
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
N as SheetTrigger
|
|
190
|
+
R as SheetTitle,
|
|
191
|
+
S as SheetTrigger
|
|
194
192
|
};
|
package/dist/sonner.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 o=require("react/jsx-runtime"),c=require("@brightlocal/icons"),u=require("class-variance-authority"),m=require("sonner"),x=require("@brightlocal/ui-components/button"),a=require("@brightlocal/ui-components/lib/utils"),b=u.cva(["flex","items-center","justify-between","w-full","md:w-auto","md:min-w-[364px]","rounded-md","border","border-border","p-4","gap-2","shadow-lg"].join(" "),{variants:{colorSchema:{default:"bg-white dark:bg-popover",success:"bg-green-200 dark:bg-popover"}},defaultVariants:{colorSchema:"default"}}),v=u.cva("text-sm leading-normal font-medium",{variants:{colorSchema:{default:"text-foreground",success:"text-green-900"}},defaultVariants:{colorSchema:"default"}}),g=u.cva("text-sm leading-normal",{variants:{colorSchema:{default:"text-muted-foreground",success:"text-green-900"}},defaultVariants:{colorSchema:"default"}}),s=u.cva("size-5",{variants:{colorSchema:{default:"text-foreground",success:"text-green-900"}},defaultVariants:{colorSchema:"default"}});function p(n,e){switch(n){case"info":return o.jsx(c.Info,{className:a.cn(s({colorSchema:e}))});case"success":return o.jsx(c.CheckCircle2,{className:a.cn(s({colorSchema:e}))});case"warning":return o.jsx(c.AlertTriangle,{className:a.cn(s({colorSchema:e}))});case"error":return o.jsx(c.XCircle,{className:a.cn(s({colorSchema:e}))});case"loading":return o.jsx(c.Loader2,{className:a.cn(s({colorSchema:e}),"animate-spin")});default:return null}}function N(n,e){const{id:r,...t}=n,d=r!=null?{...e,id:e?.id??r}:e;m.toast.custom(l=>{const f=t.button&&t.button.label?{label:t.button.label,variant:t.button.variant,onClick:()=>{t.button?.onClick&&t.button.onClick(),m.toast.dismiss(l)}}:void 0;return o.jsx(j,{button:f,colorSchema:t.colorSchema,description:t.description,icon:t.icon??void 0,id:l,title:t.title})},d)}function j(n){const{button:e,description:r,icon:t,title:d,colorSchema:l}=n,i=(S=>S==="success"?"success":"default")(l);return o.jsxs("div",{"aria-atomic":"true","aria-live":"polite",className:a.cn(b({colorSchema:i})),role:"status",children:[o.jsxs("div",{className:"flex flex-1 items-start gap-2",children:[t!=null&&p(t,i),o.jsxs("div",{className:"w-full",children:[o.jsx("p",{className:a.cn(v({colorSchema:i})),children:d}),r&&o.jsx("p",{className:a.cn(g({colorSchema:i})),children:r})]})]}),e?.label&&o.jsx(x.Button,{"aria-label":e.label,className:"min-h-6 px-2 py-0 text-xs leading-normal font-medium",dataHook:"toast-action",size:"default",variant:e.variant,onClick:e.onClick,children:e.label})]})}function h(){return o.jsx(m.Toaster,{position:"top-right"})}h.displayName="Sonner";exports.Sonner=h;exports.sonner=N;
|
package/dist/sonner.d.ts
CHANGED
|
@@ -24,18 +24,15 @@ type ToastProps = {
|
|
|
24
24
|
/** Icon to display in the toast */
|
|
25
25
|
icon?: ToastIconType | null;
|
|
26
26
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
ERROR = "error",
|
|
32
|
-
LOADING = "loading"
|
|
33
|
-
}
|
|
27
|
+
/**
|
|
28
|
+
* Icon type variants for toast notifications
|
|
29
|
+
*/
|
|
30
|
+
export type SonnerIcon = "info" | "success" | "warning" | "error" | "loading";
|
|
34
31
|
export type ToastIconType = SonnerIcon | null;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Color schema variants for toast notifications
|
|
34
|
+
*/
|
|
35
|
+
export type SonnerColorSchema = "default" | "success";
|
|
39
36
|
type SonnerCustomOptions = {
|
|
40
37
|
className?: string;
|
|
41
38
|
id?: string | number;
|
|
@@ -101,13 +98,13 @@ declare function sonner(toast: ToastInput, options?: SonnerCustomOptions): void;
|
|
|
101
98
|
*
|
|
102
99
|
* @example
|
|
103
100
|
* // Then use sonner() anywhere in your app
|
|
104
|
-
* import { sonner
|
|
101
|
+
* import { sonner } from '@brightlocal/ui-components/sonner';
|
|
105
102
|
*
|
|
106
103
|
* function MyComponent() {
|
|
107
104
|
* const handleClick = () => {
|
|
108
105
|
* sonner({
|
|
109
106
|
* title: "Success!",
|
|
110
|
-
* icon:
|
|
107
|
+
* icon: "success"
|
|
111
108
|
* });
|
|
112
109
|
* };
|
|
113
110
|
*
|
|
@@ -138,7 +135,7 @@ declare namespace Sonner {
|
|
|
138
135
|
* <Sonner />
|
|
139
136
|
*
|
|
140
137
|
* // 2. Show toasts anywhere in your app
|
|
141
|
-
* import { sonner
|
|
138
|
+
* import { sonner } from '@brightlocal/ui-components/sonner';
|
|
142
139
|
*
|
|
143
140
|
* // Simple toast
|
|
144
141
|
* sonner({ title: "Hello world" });
|
|
@@ -147,8 +144,8 @@ declare namespace Sonner {
|
|
|
147
144
|
* sonner({
|
|
148
145
|
* title: "Changes saved",
|
|
149
146
|
* description: "Your changes have been saved successfully.",
|
|
150
|
-
* icon:
|
|
151
|
-
* colorSchema:
|
|
147
|
+
* icon: "success",
|
|
148
|
+
* colorSchema: "success",
|
|
152
149
|
* button: {
|
|
153
150
|
* label: "Undo",
|
|
154
151
|
* onClick: () => undoChanges()
|
|
@@ -163,7 +160,7 @@ declare namespace Sonner {
|
|
|
163
160
|
* sonner({
|
|
164
161
|
* title: "Uploading...",
|
|
165
162
|
* description: "Please wait while we upload your file.",
|
|
166
|
-
* icon:
|
|
163
|
+
* icon: "loading",
|
|
167
164
|
* id: loadingToastId
|
|
168
165
|
* });
|
|
169
166
|
*
|
|
@@ -173,15 +170,15 @@ declare namespace Sonner {
|
|
|
173
170
|
* toast.dismiss(loadingToastId);
|
|
174
171
|
* sonner({
|
|
175
172
|
* title: "Upload complete!",
|
|
176
|
-
* icon:
|
|
177
|
-
* colorSchema:
|
|
173
|
+
* icon: "success",
|
|
174
|
+
* colorSchema: "success"
|
|
178
175
|
* });
|
|
179
176
|
* } catch (error) {
|
|
180
177
|
* toast.dismiss(loadingToastId);
|
|
181
178
|
* sonner({
|
|
182
179
|
* title: "Upload failed",
|
|
183
180
|
* description: error.message,
|
|
184
|
-
* icon:
|
|
181
|
+
* icon: "error"
|
|
185
182
|
* });
|
|
186
183
|
* }
|
|
187
184
|
* ```
|
package/dist/sonner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sonner.d.ts","sourceRoot":"","sources":["../../src/components/sonner.tsx"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,KAAK,UAAU,GAAG;IAChB,2CAA2C;IAC3C,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,MAAM,CAAC,EAAE;QACP,wBAAwB;QACxB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,mCAAmC;QACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,mCAAmC;QACnC,OAAO,CAAC,EACJ,SAAS,GACT,aAAa,GACb,SAAS,GACT,WAAW,GACX,OAAO,GACP,SAAS,CAAC;KACf,CAAC;IACF,gCAAgC;IAChC,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,mCAAmC;IACnC,IAAI,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CAC7B,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"sonner.d.ts","sourceRoot":"","sources":["../../src/components/sonner.tsx"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,KAAK,UAAU,GAAG;IAChB,2CAA2C;IAC3C,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,MAAM,CAAC,EAAE;QACP,wBAAwB;QACxB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,mCAAmC;QACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,mCAAmC;QACnC,OAAO,CAAC,EACJ,SAAS,GACT,aAAa,GACb,SAAS,GACT,WAAW,GACX,OAAO,GACP,SAAS,CAAC;KACf,CAAC;IACF,gCAAgC;IAChC,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,mCAAmC;IACnC,IAAI,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9E,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,IAAI,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,CAAC;AAEtD,KAAK,mBAAmB,GAAG;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,KAAK,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAoGpE,iBAAS,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAkCtE;AAqDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,iBAAS,MAAM,4CAEd;kBAFQ,MAAM;;;AAKf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC"}
|
package/dist/sonner.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import { Loader2 as S, XCircle as p, AlertTriangle as b, CheckCircle2 as g, Info as
|
|
2
|
+
import { Loader2 as S, XCircle as p, AlertTriangle as b, CheckCircle2 as g, Info as v } from "@brightlocal/icons";
|
|
3
3
|
import { cva as i } from "class-variance-authority";
|
|
4
|
-
import { toast as f, Toaster as
|
|
4
|
+
import { toast as f, Toaster as N } from "sonner";
|
|
5
5
|
import { Button as x } from "@brightlocal/ui-components/button";
|
|
6
|
-
import { cn as
|
|
7
|
-
|
|
8
|
-
const T = i(
|
|
6
|
+
import { cn as a } from "@brightlocal/ui-components/lib/utils";
|
|
7
|
+
const I = i(
|
|
9
8
|
[
|
|
10
9
|
"flex",
|
|
11
10
|
"items-center",
|
|
@@ -31,7 +30,7 @@ const T = i(
|
|
|
31
30
|
colorSchema: "default"
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
|
-
),
|
|
33
|
+
), T = i("text-sm leading-normal font-medium", {
|
|
35
34
|
variants: {
|
|
36
35
|
colorSchema: {
|
|
37
36
|
default: "text-foreground",
|
|
@@ -41,7 +40,7 @@ const T = i(
|
|
|
41
40
|
defaultVariants: {
|
|
42
41
|
colorSchema: "default"
|
|
43
42
|
}
|
|
44
|
-
}),
|
|
43
|
+
}), C = i("text-sm leading-normal", {
|
|
45
44
|
variants: {
|
|
46
45
|
colorSchema: {
|
|
47
46
|
default: "text-muted-foreground",
|
|
@@ -51,7 +50,7 @@ const T = i(
|
|
|
51
50
|
defaultVariants: {
|
|
52
51
|
colorSchema: "default"
|
|
53
52
|
}
|
|
54
|
-
}),
|
|
53
|
+
}), n = i("size-5", {
|
|
55
54
|
variants: {
|
|
56
55
|
colorSchema: {
|
|
57
56
|
default: "text-foreground",
|
|
@@ -62,90 +61,88 @@ const T = i(
|
|
|
62
61
|
colorSchema: "default"
|
|
63
62
|
}
|
|
64
63
|
});
|
|
65
|
-
function
|
|
66
|
-
switch (
|
|
64
|
+
function A(r, e) {
|
|
65
|
+
switch (r) {
|
|
67
66
|
case "info":
|
|
68
|
-
return /* @__PURE__ */ o(
|
|
67
|
+
return /* @__PURE__ */ o(v, { className: a(n({ colorSchema: e })) });
|
|
69
68
|
case "success":
|
|
70
|
-
return /* @__PURE__ */ o(g, { className:
|
|
69
|
+
return /* @__PURE__ */ o(g, { className: a(n({ colorSchema: e })) });
|
|
71
70
|
case "warning":
|
|
72
|
-
return /* @__PURE__ */ o(b, { className:
|
|
71
|
+
return /* @__PURE__ */ o(b, { className: a(n({ colorSchema: e })) });
|
|
73
72
|
case "error":
|
|
74
|
-
return /* @__PURE__ */ o(p, { className:
|
|
73
|
+
return /* @__PURE__ */ o(p, { className: a(n({ colorSchema: e })) });
|
|
75
74
|
case "loading":
|
|
76
75
|
return /* @__PURE__ */ o(
|
|
77
76
|
S,
|
|
78
77
|
{
|
|
79
|
-
className:
|
|
78
|
+
className: a(n({ colorSchema: e }), "animate-spin")
|
|
80
79
|
}
|
|
81
80
|
);
|
|
82
81
|
default:
|
|
83
82
|
return null;
|
|
84
83
|
}
|
|
85
84
|
}
|
|
86
|
-
function
|
|
87
|
-
const { id: c, ...
|
|
85
|
+
function E(r, e) {
|
|
86
|
+
const { id: c, ...t } = r, m = c != null ? { ...e, id: e?.id ?? c } : e;
|
|
88
87
|
f.custom((l) => {
|
|
89
|
-
const
|
|
90
|
-
label:
|
|
91
|
-
variant:
|
|
88
|
+
const u = t.button && t.button.label ? {
|
|
89
|
+
label: t.button.label,
|
|
90
|
+
variant: t.button.variant,
|
|
92
91
|
onClick: () => {
|
|
93
|
-
|
|
92
|
+
t.button?.onClick && t.button.onClick(), f.dismiss(l);
|
|
94
93
|
}
|
|
95
94
|
} : void 0;
|
|
96
95
|
return /* @__PURE__ */ o(
|
|
97
96
|
k,
|
|
98
97
|
{
|
|
99
|
-
button:
|
|
100
|
-
colorSchema:
|
|
101
|
-
description:
|
|
102
|
-
icon:
|
|
98
|
+
button: u,
|
|
99
|
+
colorSchema: t.colorSchema,
|
|
100
|
+
description: t.description,
|
|
101
|
+
icon: t.icon ?? void 0,
|
|
103
102
|
id: l,
|
|
104
|
-
title:
|
|
103
|
+
title: t.title
|
|
105
104
|
}
|
|
106
105
|
);
|
|
107
|
-
},
|
|
106
|
+
}, m);
|
|
108
107
|
}
|
|
109
|
-
function k(
|
|
110
|
-
const { button:
|
|
108
|
+
function k(r) {
|
|
109
|
+
const { button: e, description: c, icon: t, title: m, colorSchema: l } = r, s = ((h) => h === "success" ? "success" : "default")(l);
|
|
111
110
|
return /* @__PURE__ */ d(
|
|
112
111
|
"div",
|
|
113
112
|
{
|
|
114
113
|
"aria-atomic": "true",
|
|
115
114
|
"aria-live": "polite",
|
|
116
|
-
className:
|
|
115
|
+
className: a(I({ colorSchema: s })),
|
|
117
116
|
role: "status",
|
|
118
117
|
children: [
|
|
119
118
|
/* @__PURE__ */ d("div", { className: "flex flex-1 items-start gap-2", children: [
|
|
120
|
-
|
|
119
|
+
t != null && A(t, s),
|
|
121
120
|
/* @__PURE__ */ d("div", { className: "w-full", children: [
|
|
122
|
-
/* @__PURE__ */ o("p", { className:
|
|
123
|
-
c && /* @__PURE__ */ o("p", { className:
|
|
121
|
+
/* @__PURE__ */ o("p", { className: a(T({ colorSchema: s })), children: m }),
|
|
122
|
+
c && /* @__PURE__ */ o("p", { className: a(C({ colorSchema: s })), children: c })
|
|
124
123
|
] })
|
|
125
124
|
] }),
|
|
126
|
-
|
|
125
|
+
e?.label && /* @__PURE__ */ o(
|
|
127
126
|
x,
|
|
128
127
|
{
|
|
129
|
-
"aria-label":
|
|
128
|
+
"aria-label": e.label,
|
|
130
129
|
className: "min-h-6 px-2 py-0 text-xs leading-normal font-medium",
|
|
131
130
|
dataHook: "toast-action",
|
|
132
131
|
size: "default",
|
|
133
|
-
variant:
|
|
134
|
-
onClick:
|
|
135
|
-
children:
|
|
132
|
+
variant: e.variant,
|
|
133
|
+
onClick: e.onClick,
|
|
134
|
+
children: e.label
|
|
136
135
|
}
|
|
137
136
|
)
|
|
138
137
|
]
|
|
139
138
|
}
|
|
140
139
|
);
|
|
141
140
|
}
|
|
142
|
-
function
|
|
143
|
-
return /* @__PURE__ */ o(
|
|
141
|
+
function w() {
|
|
142
|
+
return /* @__PURE__ */ o(N, { position: "top-right" });
|
|
144
143
|
}
|
|
145
|
-
|
|
144
|
+
w.displayName = "Sonner";
|
|
146
145
|
export {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
C as SonnerIcon,
|
|
150
|
-
y as sonner
|
|
146
|
+
w as Sonner,
|
|
147
|
+
E as sonner
|
|
151
148
|
};
|
package/dist/switch.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 e=require("react/jsx-runtime"),g=require("react"),p=require("@radix-ui/react-switch"),w=require("class-variance-authority"),l=require("@brightlocal/ui-components/lib/utils");function f(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const a in r)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>r[a]})}}return t.default=r,Object.freeze(t)}const j=f(g),m=f(p),k=w.cva(["peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring dark:focus-visible:border-neutral-500 dark:data-[state=unchecked]:bg-input/80","inline-flex h-5 w-9 shrink-0 items-center rounded-full border-1 border-transparent shadow-xs transition-all outline-none focus-visible:shadow-default","disabled:cursor-not-allowed disabled:opacity-50","pl-[1px]"],{variants:{variant:{default:[],box:[]}},defaultVariants:{variant:"default"}}),h=j.forwardRef(({className:r,variant:t="default",dataHook:a,trackingEl:n,trackingLabel:b,label:s,description:o,side:d="right",...c},x)=>{const i=e.jsx(m.Root,{ref:x,className:l.cn(k({variant:t}),r),"data-hook":a,"data-slot":"switch","data-tracking-el":n||`switch-${t}`,"data-tracking-label":b,...c,children:e.jsx(m.Thumb,{className:l.cn("bg-background","pointer-events-none block size-4 rounded-full ring-0 transition-transform","data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"),"data-slot":"switch-thumb"})});if(t==="default")return e.jsxs("div",{className:l.cn("flex items-center gap-2",d==="left"&&"flex-row-reverse"),children:[i,s&&e.jsx("label",{className:"cursor-pointer text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",htmlFor:c.id,children:s})]});if(t==="box"){const u=e.jsxs("div",{className:"flex flex-col gap-2",children:[s&&e.jsx("label",{className:"cursor-pointer text-sm leading-none font-medium",htmlFor:c.id,children:s}),o&&e.jsx("p",{className:"text-muted-foreground text-sm leading-normal",children:o})]});return e.jsx("div",{className:"border-border flex items-center justify-between gap-4 rounded-lg border p-4",children:d==="left"?e.jsxs(e.Fragment,{children:[i,u]}):e.jsxs(e.Fragment,{children:[u,i]})})}return i});h.displayName="Switch";exports.Switch=h;
|
package/dist/switch.d.ts
CHANGED
|
@@ -4,21 +4,11 @@ import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
|
4
4
|
/**
|
|
5
5
|
* Visual style variants for Switch component
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
8
|
-
/** Default variant with inline switch and side label */
|
|
9
|
-
DEFAULT = "default",
|
|
10
|
-
/** Box variant with bordered container, label, and description */
|
|
11
|
-
BOX = "box"
|
|
12
|
-
}
|
|
7
|
+
export type SwitchVariant = "default" | "box";
|
|
13
8
|
/**
|
|
14
9
|
* Label position for switch (used in Default variant)
|
|
15
10
|
*/
|
|
16
|
-
export
|
|
17
|
-
/** Label positioned on the left side */
|
|
18
|
-
LEFT = "left",
|
|
19
|
-
/** Label positioned on the right side */
|
|
20
|
-
RIGHT = "right"
|
|
21
|
-
}
|
|
11
|
+
export type SwitchSide = "left" | "right";
|
|
22
12
|
declare const switchVariants: (props?: ({
|
|
23
13
|
variant?: "default" | "box" | null | undefined;
|
|
24
14
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
package/dist/switch.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,KAAK,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1C,QAAA,MAAM,cAAc;;8EAkBnB,CAAC;AAEF,UAAU,WACR,SACE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,EAClE,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2BAA2B;IAC3B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,QAAA,MAAM,MAAM,oGAoGX,CAAC;AAIF,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,CAAC"}
|
package/dist/switch.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as n, Fragment as c } from "react/jsx-runtime";
|
|
2
2
|
import * as x from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as m from "@radix-ui/react-switch";
|
|
4
4
|
import { cva as g } from "class-variance-authority";
|
|
5
|
-
import { cn as
|
|
6
|
-
|
|
7
|
-
const v = g(
|
|
5
|
+
import { cn as s } from "@brightlocal/ui-components/lib/utils";
|
|
6
|
+
const w = g(
|
|
8
7
|
[
|
|
9
8
|
"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring dark:focus-visible:border-neutral-500 dark:data-[state=unchecked]:bg-input/80",
|
|
10
9
|
"inline-flex h-5 w-9 shrink-0 items-center rounded-full border-1 border-transparent shadow-xs transition-all outline-none focus-visible:shadow-default",
|
|
@@ -20,35 +19,34 @@ const v = g(
|
|
|
20
19
|
},
|
|
21
20
|
defaultVariants: {
|
|
22
21
|
variant: "default"
|
|
23
|
-
/* DEFAULT */
|
|
24
22
|
}
|
|
25
23
|
}
|
|
26
|
-
),
|
|
24
|
+
), k = x.forwardRef(
|
|
27
25
|
({
|
|
28
|
-
className:
|
|
29
|
-
variant:
|
|
26
|
+
className: u,
|
|
27
|
+
variant: t = "default",
|
|
30
28
|
dataHook: f,
|
|
31
29
|
trackingEl: h,
|
|
32
30
|
trackingLabel: b,
|
|
33
31
|
label: a,
|
|
34
|
-
description:
|
|
32
|
+
description: d,
|
|
35
33
|
side: o = "right",
|
|
36
|
-
...
|
|
34
|
+
...i
|
|
37
35
|
}, p) => {
|
|
38
|
-
const
|
|
39
|
-
|
|
36
|
+
const r = /* @__PURE__ */ e(
|
|
37
|
+
m.Root,
|
|
40
38
|
{
|
|
41
39
|
ref: p,
|
|
42
|
-
className:
|
|
40
|
+
className: s(w({ variant: t }), u),
|
|
43
41
|
"data-hook": f,
|
|
44
42
|
"data-slot": "switch",
|
|
45
|
-
"data-tracking-el": h || `switch-${
|
|
43
|
+
"data-tracking-el": h || `switch-${t}`,
|
|
46
44
|
"data-tracking-label": b,
|
|
47
|
-
...
|
|
48
|
-
children: /* @__PURE__ */
|
|
49
|
-
|
|
45
|
+
...i,
|
|
46
|
+
children: /* @__PURE__ */ e(
|
|
47
|
+
m.Thumb,
|
|
50
48
|
{
|
|
51
|
-
className:
|
|
49
|
+
className: s(
|
|
52
50
|
"bg-background",
|
|
53
51
|
"pointer-events-none block size-4 rounded-full ring-0 transition-transform",
|
|
54
52
|
"data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
@@ -58,53 +56,51 @@ const v = g(
|
|
|
58
56
|
)
|
|
59
57
|
}
|
|
60
58
|
);
|
|
61
|
-
if (
|
|
62
|
-
return /* @__PURE__ */
|
|
59
|
+
if (t === "default")
|
|
60
|
+
return /* @__PURE__ */ n(
|
|
63
61
|
"div",
|
|
64
62
|
{
|
|
65
|
-
className:
|
|
63
|
+
className: s(
|
|
66
64
|
"flex items-center gap-2",
|
|
67
65
|
o === "left" && "flex-row-reverse"
|
|
68
66
|
),
|
|
69
67
|
children: [
|
|
70
|
-
|
|
71
|
-
a && /* @__PURE__ */
|
|
68
|
+
r,
|
|
69
|
+
a && /* @__PURE__ */ e(
|
|
72
70
|
"label",
|
|
73
71
|
{
|
|
74
72
|
className: "cursor-pointer text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
75
|
-
htmlFor:
|
|
73
|
+
htmlFor: i.id,
|
|
76
74
|
children: a
|
|
77
75
|
}
|
|
78
76
|
)
|
|
79
77
|
]
|
|
80
78
|
}
|
|
81
79
|
);
|
|
82
|
-
if (
|
|
83
|
-
const
|
|
84
|
-
a && /* @__PURE__ */
|
|
80
|
+
if (t === "box") {
|
|
81
|
+
const l = /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: [
|
|
82
|
+
a && /* @__PURE__ */ e(
|
|
85
83
|
"label",
|
|
86
84
|
{
|
|
87
85
|
className: "cursor-pointer text-sm leading-none font-medium",
|
|
88
|
-
htmlFor:
|
|
86
|
+
htmlFor: i.id,
|
|
89
87
|
children: a
|
|
90
88
|
}
|
|
91
89
|
),
|
|
92
|
-
|
|
90
|
+
d && /* @__PURE__ */ e("p", { className: "text-muted-foreground text-sm leading-normal", children: d })
|
|
93
91
|
] });
|
|
94
|
-
return /* @__PURE__ */
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
] }) : /* @__PURE__ */
|
|
98
|
-
|
|
99
|
-
|
|
92
|
+
return /* @__PURE__ */ e("div", { className: "border-border flex items-center justify-between gap-4 rounded-lg border p-4", children: o === "left" ? /* @__PURE__ */ n(c, { children: [
|
|
93
|
+
r,
|
|
94
|
+
l
|
|
95
|
+
] }) : /* @__PURE__ */ n(c, { children: [
|
|
96
|
+
l,
|
|
97
|
+
r
|
|
100
98
|
] }) });
|
|
101
99
|
}
|
|
102
|
-
return
|
|
100
|
+
return r;
|
|
103
101
|
}
|
|
104
102
|
);
|
|
105
|
-
|
|
103
|
+
k.displayName = "Switch";
|
|
106
104
|
export {
|
|
107
|
-
|
|
108
|
-
k as SwitchSide,
|
|
109
|
-
w as SwitchVariant
|
|
105
|
+
k as Switch
|
|
110
106
|
};
|
package/dist/table.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 l=require("react/jsx-runtime"),y=require("react"),b=require("class-variance-authority"),r=require("@brightlocal/ui-components/lib/utils");function w(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,o.get?o:{enumerable:!0,get:()=>a[e]})}}return t.default=a,Object.freeze(t)}const s=w(y),N=b.cva("align-middle bg-transparent text-foreground text-sm font-normal leading-normal break-words",{variants:{size:{default:"h-12 p-2",md:"h-16 p-2",lg:"h-24 p-2"},align:{left:"text-left",right:"text-right"}},defaultVariants:{size:"default",align:"left"}}),j=b.cva("h-10 p-2 border-b align-middle text-muted-foreground text-sm font-medium leading-normal hover:bg-muted break-words outline-none focus-visible:shadow-default transition-[background-color,box-shadow] duration-150 ease-in-out",{variants:{align:{left:"text-left",right:"text-right"}},defaultVariants:{align:"left"}}),c=s.forwardRef(({className:a,dataHook:t,trackingEl:e,trackingLabel:o,...d},n)=>l.jsx("div",{className:"relative w-full overflow-x-auto","data-slot":"table-container",children:l.jsx("table",{ref:n,className:r.cn("w-full caption-bottom text-sm",a),"data-hook":t,"data-slot":"table","data-tracking-el":e,"data-tracking-label":o,...d})}));c.displayName="Table";const f=s.forwardRef(({className:a,dataHook:t,...e},o)=>l.jsx("thead",{ref:o,className:r.cn("[&_tr]:border-b",a),"data-hook":t,"data-slot":"table-header",...e}));f.displayName="TableHeader";const u=s.forwardRef(({className:a,dataHook:t,...e},o)=>l.jsx("tbody",{ref:o,className:r.cn("[&_tr:last-child]:border-0",a),"data-hook":t,"data-slot":"table-body",...e}));u.displayName="TableBody";const m=s.forwardRef(({className:a,dataHook:t,...e},o)=>l.jsx("tfoot",{ref:o,className:r.cn("bg-muted/50 border-t [&>tr]:last:border-b-0",a),"data-hook":t,"data-slot":"table-footer",...e}));m.displayName="TableFooter";const g=s.forwardRef(({className:a,dataHook:t,...e},o)=>l.jsx("tr",{ref:o,className:r.cn("data-[state=selected]:bg-muted border-b transition-colors duration-150 ease-in-out",a),"data-hook":t,"data-slot":"table-row",...e}));g.displayName="TableRow";const h=s.forwardRef(({className:a,dataHook:t,align:e,minWidth:o,style:d,...n},i)=>l.jsx("th",{ref:i,className:r.cn(j({align:e}),a),"data-hook":t,"data-slot":"table-head",style:{minWidth:o,...d},...n}));h.displayName="TableHead";const p=s.forwardRef(({className:a,dataHook:t,size:e,align:o,minWidth:d,style:n,...i},x)=>l.jsx("td",{ref:x,className:r.cn(N({size:e,align:o}),a),"data-hook":t,"data-slot":"table-cell",style:{minWidth:d,...n},...i}));p.displayName="TableCell";const T=s.forwardRef(({className:a,dataHook:t,...e},o)=>l.jsx("caption",{ref:o,className:r.cn("text-muted-foreground mt-4 text-sm",a),"data-hook":t,"data-slot":"table-caption",...e}));T.displayName="TableCaption";exports.Table=c;exports.TableBody=u;exports.TableCaption=T;exports.TableCell=p;exports.TableFooter=m;exports.TableHead=h;exports.TableHeader=f;exports.TableRow=g;
|