@brightlocal/ui-components 2.9.2 → 2.11.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 +3 -1
- package/component-meta.json +41 -9
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +42 -25
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +1 -3
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +46 -49
- package/dist/browser-entry.d.ts +17 -0
- package/dist/browser-entry.d.ts.map +1 -0
- package/dist/button.cjs +1 -1
- package/dist/button.js +25 -25
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +10 -1
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +85 -82
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +13 -1
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +196 -150
- package/dist/combobox.cjs +3 -3
- package/dist/combobox.d.ts +3 -3
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +480 -440
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +101 -1
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +383 -119
- package/dist/hooks/use-breakpoint.cjs +1 -1
- package/dist/hooks/use-breakpoint.d.ts.map +1 -1
- package/dist/hooks/use-breakpoint.js +10 -10
- 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 +402 -391
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.d.ts +1 -4
- package/dist/input-chip.d.ts.map +1 -1
- package/dist/input-chip.js +163 -170
- package/dist/map.cjs +1 -0
- package/dist/map.d.ts +192 -0
- package/dist/map.d.ts.map +1 -0
- package/dist/map.js +250 -0
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.js +32 -30
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.d.ts +4 -0
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.js +101 -52
- package/package.json +4 -1
- package/src/blocks/sidebar.tsx +21 -26
- package/src/browser-entry.ts +89 -0
- package/src/browser-tokens.css +1 -0
- package/src/components/badge.tsx +22 -5
- package/src/components/button.tsx +13 -13
- package/src/components/card.tsx +35 -19
- package/src/components/carousel.tsx +101 -9
- package/src/components/combobox.tsx +106 -28
- package/src/components/command.tsx +637 -16
- package/src/components/input-chip.tsx +102 -65
- package/src/components/map.tsx +574 -0
- package/src/components/sonner.tsx +9 -3
- package/src/components/tabs.tsx +118 -22
- package/src/hooks/use-breakpoint.ts +2 -3
- package/src/index.ts +1 -0
package/dist/blocks/sidebar.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as r, jsxs as k } from "react/jsx-runtime";
|
|
|
2
2
|
import * as s from "react";
|
|
3
3
|
import { Slot as N } from "@radix-ui/react-slot";
|
|
4
4
|
import { cva as I } from "class-variance-authority";
|
|
5
|
-
import { ChevronRight as M, Ellipsis as H, Minus as F, Plus as
|
|
5
|
+
import { ChevronRight as M, Ellipsis as H, Minus as F, Plus as E, ChevronsUpDown as G, ChevronDown as O, Menu as K, PanelLeft as U } from "@brightlocal/icons";
|
|
6
6
|
import { cn as d } from "@brightlocal/ui-components/lib/utils";
|
|
7
7
|
import { Button as j } from "../button.js";
|
|
8
8
|
import { Input as $ } from "../input.js";
|
|
@@ -11,10 +11,10 @@ import { Sheet as X, SheetContent as q, SheetTitle as V, SheetDescription as Y }
|
|
|
11
11
|
import { Accordion as Z, AccordionItem as J, AccordionContent as Q } from "../accordion.js";
|
|
12
12
|
import * as ee from "@radix-ui/react-accordion";
|
|
13
13
|
import { ScrollArea as ae } from "../scroll-area.js";
|
|
14
|
-
import { Skeleton as
|
|
14
|
+
import { Skeleton as A } from "../skeleton.js";
|
|
15
15
|
import { Tooltip as te, TooltipTrigger as re, TooltipContent as oe, TooltipProvider as ie } from "../tooltip.js";
|
|
16
16
|
import { useIsBelowBreakpoint as se } from "../hooks/use-breakpoint.js";
|
|
17
|
-
var ne = /* @__PURE__ */ ((e) => (e.LEFT = "left", e))(ne || {}), de = /* @__PURE__ */ ((e) => (e.SIDEBAR = "sidebar", e))(de || {}), le = /* @__PURE__ */ ((e) => (e.OFFCANVAS = "offcanvas", e.ICON = "icon", e.NONE = "none", e))(le || {}), ce = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.XS = "xs", e))(ce || {}), ue = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.COLLAPSIBLE = "collapsible", e.ACTION = "action", e))(ue || {}), be = /* @__PURE__ */ ((e) => (e.SIMPLE = "simple", e.COLLAPSIBLE = "collapsible", e.DROPDOWN = "dropdown", e.
|
|
17
|
+
var ne = /* @__PURE__ */ ((e) => (e.LEFT = "left", e))(ne || {}), de = /* @__PURE__ */ ((e) => (e.SIDEBAR = "sidebar", e))(de || {}), le = /* @__PURE__ */ ((e) => (e.OFFCANVAS = "offcanvas", e.ICON = "icon", e.NONE = "none", e))(le || {}), ce = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.XS = "xs", e))(ce || {}), ue = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.COLLAPSIBLE = "collapsible", e.ACTION = "action", e))(ue || {}), be = /* @__PURE__ */ ((e) => (e.SIMPLE = "simple", e.COLLAPSIBLE = "collapsible", e.DROPDOWN = "dropdown", e.BADGE = "badge", e.BIG_ICON = "bigIcon", e.CHECKBOX = "checkbox", e))(be || {}), pe = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.LG = "lg", e))(pe || {}), fe = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.BORDER = "border", e.INDENT = "indent", e))(fe || {}), me = /* @__PURE__ */ ((e) => (e.SM = "sm", e.MD = "md", e))(me || {}), ge = /* @__PURE__ */ ((e) => (e.CARET = "caret", e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e.UP_DOWN = "upDown", e.PLUS_MINUS = "plusMinus", e.DOTS = "dots", e))(ge || {});
|
|
18
18
|
const he = "sidebar:state", ve = 3600 * 24 * 7, xe = "224px", we = "336px", ke = "48px", Ne = "b", T = s.createContext(null);
|
|
19
19
|
function S() {
|
|
20
20
|
const e = s.useContext(T);
|
|
@@ -106,7 +106,7 @@ const ye = s.forwardRef(
|
|
|
106
106
|
{
|
|
107
107
|
ref: b,
|
|
108
108
|
className: d(
|
|
109
|
-
"text-sidebar-foreground flex h-full w-
|
|
109
|
+
"text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
|
|
110
110
|
g
|
|
111
111
|
),
|
|
112
112
|
"data-hook": e,
|
|
@@ -119,7 +119,7 @@ const ye = s.forwardRef(
|
|
|
119
119
|
) : h ? /* @__PURE__ */ r(X, { open: R, onOpenChange: w, children: /* @__PURE__ */ k(
|
|
120
120
|
q,
|
|
121
121
|
{
|
|
122
|
-
className: "bg-sidebar-background text-sidebar-foreground w-
|
|
122
|
+
className: "bg-sidebar-background text-sidebar-foreground w-(--sidebar-width) p-6",
|
|
123
123
|
"data-hook": `${e}-mobile-content`,
|
|
124
124
|
"data-mobile": "true",
|
|
125
125
|
"data-sidebar": "sidebar",
|
|
@@ -139,8 +139,8 @@ const ye = s.forwardRef(
|
|
|
139
139
|
ref: b,
|
|
140
140
|
className: d(
|
|
141
141
|
"group text-sidebar-foreground flex h-full shrink-0 flex-col overflow-hidden transition-[width] duration-200 ease-linear",
|
|
142
|
-
p === "expanded" && "w-
|
|
143
|
-
n === "icon" && p === "collapsed" && "w-
|
|
142
|
+
p === "expanded" && "w-(--sidebar-width)",
|
|
143
|
+
n === "icon" && p === "collapsed" && "w-(--sidebar-width-icon)",
|
|
144
144
|
n === "offcanvas" && p === "collapsed" && "w-0",
|
|
145
145
|
g
|
|
146
146
|
),
|
|
@@ -195,11 +195,11 @@ const Ce = s.forwardRef(
|
|
|
195
195
|
ref: t,
|
|
196
196
|
"aria-label": "Toggle Sidebar",
|
|
197
197
|
className: d(
|
|
198
|
-
"hover:after:bg-sidebar-border absolute inset-y-0 -right-4 z-20 hidden w-4 -translate-x-1/2 transition-transform ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-
|
|
198
|
+
"hover:after:bg-sidebar-border absolute inset-y-0 -right-4 z-20 hidden w-4 -translate-x-1/2 transition-transform ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-0.5 sm:flex",
|
|
199
199
|
"cursor-w-resize",
|
|
200
|
-
"
|
|
200
|
+
"in-data-[state=collapsed]:cursor-e-resize",
|
|
201
201
|
"group-data-[collapsible=offcanvas]:hover:bg-sidebar-background group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
|
|
202
|
-
"
|
|
202
|
+
"in-data-[collapsible=offcanvas]:-right-2",
|
|
203
203
|
e
|
|
204
204
|
),
|
|
205
205
|
"data-slot": "sidebar-rail",
|
|
@@ -273,20 +273,20 @@ const De = s.forwardRef(
|
|
|
273
273
|
)
|
|
274
274
|
);
|
|
275
275
|
De.displayName = "SidebarFooter";
|
|
276
|
-
const
|
|
276
|
+
const Ae = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ r(
|
|
277
277
|
W,
|
|
278
278
|
{
|
|
279
279
|
ref: t,
|
|
280
280
|
className: d(
|
|
281
|
-
"bg-sidebar-border mx-2 my-
|
|
281
|
+
"bg-sidebar-border mx-2 my-5 w-auto group-data-[collapsible=icon]:mx-0",
|
|
282
282
|
e
|
|
283
283
|
),
|
|
284
284
|
"data-slot": "sidebar-separator",
|
|
285
285
|
...a
|
|
286
286
|
}
|
|
287
287
|
));
|
|
288
|
-
|
|
289
|
-
const
|
|
288
|
+
Ae.displayName = "SidebarSeparator";
|
|
289
|
+
const Ee = s.forwardRef(
|
|
290
290
|
({ className: e, dataHook: a, ariaLabel: t = "Sidebar", children: o, ...i }, n) => {
|
|
291
291
|
const { isMobile: l } = S();
|
|
292
292
|
return /* @__PURE__ */ r(
|
|
@@ -294,7 +294,7 @@ const Ae = s.forwardRef(
|
|
|
294
294
|
{
|
|
295
295
|
ref: n,
|
|
296
296
|
className: d(
|
|
297
|
-
"min-h-0 flex-1 group-data-[collapsible=icon]:overflow-hidden [
|
|
297
|
+
"min-h-0 flex-1 group-data-[collapsible=icon]:overflow-hidden *:data-[slot=scroll-area-viewport]:p-0 [&_[data-slot=scroll-area-viewport]>div]:block!",
|
|
298
298
|
e
|
|
299
299
|
),
|
|
300
300
|
dataHook: a ?? "sidebar-content-scroll",
|
|
@@ -313,7 +313,7 @@ const Ae = s.forwardRef(
|
|
|
313
313
|
);
|
|
314
314
|
}
|
|
315
315
|
);
|
|
316
|
-
|
|
316
|
+
Ee.displayName = "SidebarContent";
|
|
317
317
|
const Oe = s.forwardRef(
|
|
318
318
|
({ className: e, dataHook: a, ...t }, o) => /* @__PURE__ */ r(
|
|
319
319
|
"div",
|
|
@@ -390,14 +390,14 @@ const Te = I(
|
|
|
390
390
|
size: 16
|
|
391
391
|
}
|
|
392
392
|
),
|
|
393
|
-
i === "action" && /* @__PURE__ */ r(
|
|
393
|
+
i === "action" && /* @__PURE__ */ r(E, { className: "shrink-0", size: 16 })
|
|
394
394
|
]
|
|
395
395
|
}
|
|
396
396
|
);
|
|
397
397
|
}
|
|
398
398
|
);
|
|
399
399
|
ze.displayName = "SidebarGroupLabel";
|
|
400
|
-
const
|
|
400
|
+
const Le = s.forwardRef(({ className: e, asChild: a = !1, ...t }, o) => /* @__PURE__ */ r(
|
|
401
401
|
a ? N : "button",
|
|
402
402
|
{
|
|
403
403
|
ref: o,
|
|
@@ -412,8 +412,8 @@ const _e = s.forwardRef(({ className: e, asChild: a = !1, ...t }, o) => /* @__PU
|
|
|
412
412
|
...t
|
|
413
413
|
}
|
|
414
414
|
));
|
|
415
|
-
|
|
416
|
-
const
|
|
415
|
+
Le.displayName = "SidebarGroupAction";
|
|
416
|
+
const _e = s.forwardRef(({ className: e, dataHook: a, ...t }, o) => /* @__PURE__ */ r(
|
|
417
417
|
"div",
|
|
418
418
|
{
|
|
419
419
|
ref: o,
|
|
@@ -423,7 +423,7 @@ const Le = s.forwardRef(({ className: e, dataHook: a, ...t }, o) => /* @__PURE__
|
|
|
423
423
|
...t
|
|
424
424
|
}
|
|
425
425
|
));
|
|
426
|
-
|
|
426
|
+
_e.displayName = "SidebarGroupContent";
|
|
427
427
|
const Be = s.forwardRef(
|
|
428
428
|
({ className: e, dataHook: a, ...t }, o) => /* @__PURE__ */ r(
|
|
429
429
|
"ul",
|
|
@@ -437,7 +437,7 @@ const Be = s.forwardRef(
|
|
|
437
437
|
)
|
|
438
438
|
);
|
|
439
439
|
Be.displayName = "SidebarMenu";
|
|
440
|
-
const
|
|
440
|
+
const L = s.forwardRef(
|
|
441
441
|
({ className: e, dataHook: a, ...t }, o) => /* @__PURE__ */ r(
|
|
442
442
|
"li",
|
|
443
443
|
{
|
|
@@ -449,7 +449,7 @@ const _ = s.forwardRef(
|
|
|
449
449
|
}
|
|
450
450
|
)
|
|
451
451
|
);
|
|
452
|
-
|
|
452
|
+
L.displayName = "SidebarMenuItem";
|
|
453
453
|
const Pe = s.forwardRef(
|
|
454
454
|
({
|
|
455
455
|
type: e = "caret",
|
|
@@ -475,7 +475,7 @@ const Pe = s.forwardRef(
|
|
|
475
475
|
case "upDown":
|
|
476
476
|
return /* @__PURE__ */ r(G, { ...n });
|
|
477
477
|
case "plusMinus":
|
|
478
|
-
return a ? /* @__PURE__ */ r(F, { ...n }) : /* @__PURE__ */ r(
|
|
478
|
+
return a ? /* @__PURE__ */ r(F, { ...n }) : /* @__PURE__ */ r(E, { ...n });
|
|
479
479
|
case "dots":
|
|
480
480
|
return /* @__PURE__ */ r(H, { ...n });
|
|
481
481
|
default:
|
|
@@ -485,7 +485,7 @@ const Pe = s.forwardRef(
|
|
|
485
485
|
);
|
|
486
486
|
Pe.displayName = "SidebarCollapseIcon";
|
|
487
487
|
const He = I(
|
|
488
|
-
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-full px-6 py-2 text-left text-sm font-medium outline-none ring-sidebar-ring transition-[color,background-color,border-color,box-shadow,opacity,width,height,padding] duration-150 ease-in-out hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-semibold data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 group-data-[collapsible=icon]:rounded-md [&>span:last-
|
|
488
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-full px-6 py-2 text-left text-sm font-medium outline-none ring-sidebar-ring transition-[color,background-color,border-color,box-shadow,opacity,width,height,padding] duration-150 ease-in-out hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-semibold data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 group-data-[collapsible=icon]:rounded-md [&>span:last-of-type]:truncate [&>svg]:shrink-0 [&>svg]:opacity-70 data-[active=true]:[&>svg]:opacity-100 group-data-[collapsible=icon]:[&>span]:hidden group-data-[collapsible=icon]:[&>div]:hidden",
|
|
489
489
|
{
|
|
490
490
|
variants: {
|
|
491
491
|
variant: {
|
|
@@ -495,14 +495,12 @@ const He = I(
|
|
|
495
495
|
collapsible: "[&>[data-collapse-icon]]:ml-auto [&>[data-collapse-icon]]:transition-transform data-[state=open]:[&>[data-collapse-icon]]:rotate-90",
|
|
496
496
|
// Dropdown - has action menu (dots) on hover
|
|
497
497
|
dropdown: "group-has-[[data-sidebar=menu-action]]/menu-item:pr-8",
|
|
498
|
-
// Tree - has a chevron for tree navigation
|
|
499
|
-
tree: "[&>[data-tree-icon]]:size-4 [&>[data-tree-icon]]:shrink-0 [&>[data-tree-icon]]:opacity-70 [&>[data-tree-icon]]:transition-transform data-[state=open]:[&>[data-tree-icon]]:rotate-90 group-data-[collapsible=icon]:[&>[data-tree-icon]]:hidden",
|
|
500
498
|
// Badge - has a number badge on the right (handled via SidebarMenuBadge)
|
|
501
499
|
badge: "group-has-[[data-sidebar=menu-badge]]/menu-item:pr-16",
|
|
502
500
|
// Big Icon - larger icon with title and subtitle
|
|
503
501
|
bigIcon: "h-auto flex-col items-start gap-1 rounded-lg p-3 [&>svg]:size-6 [&>svg]:rounded-md [&>svg]:bg-sidebar-foreground [&>svg]:p-1 [&>svg]:text-sidebar-background [&>svg]:opacity-100 hover:[&>svg]:bg-sidebar-foreground hover:[&>svg]:text-sidebar-background group-data-[collapsible=icon]:!size-10 group-data-[collapsible=icon]:!p-2 group-data-[collapsible=icon]:items-center group-data-[collapsible=icon]:[&>svg]:size-6",
|
|
504
502
|
// Checkbox - has a checkbox indicator
|
|
505
|
-
checkbox: "[&>[data-checkbox]]:size-4 [&>[data-checkbox]]:shrink-0 [&>[data-checkbox]]:rounded [&>[data-checkbox]]:border [&>[data-checkbox]]:border-sidebar-foreground/30 data-[checked=true]:[&>[data-checkbox]]:bg-primary data-[checked=true]:[&>[data-checkbox]]:border-primary data-[checked=true]:[&>[data-checkbox]]:text-primary-foreground"
|
|
503
|
+
checkbox: "px-3 [&>[data-checkbox]]:size-4 [&>[data-checkbox]]:shrink-0 [&>[data-checkbox]]:rounded [&>[data-checkbox]]:border [&>[data-checkbox]]:border-sidebar-foreground/30 data-[checked=true]:[&>[data-checkbox]]:bg-primary data-[checked=true]:[&>[data-checkbox]]:border-primary data-[checked=true]:[&>[data-checkbox]]:text-primary-foreground"
|
|
506
504
|
},
|
|
507
505
|
size: {
|
|
508
506
|
default: "h-12 text-sm/4",
|
|
@@ -515,7 +513,7 @@ const He = I(
|
|
|
515
513
|
size: "default"
|
|
516
514
|
}
|
|
517
515
|
}
|
|
518
|
-
),
|
|
516
|
+
), _ = s.forwardRef(
|
|
519
517
|
({
|
|
520
518
|
asChild: e = !1,
|
|
521
519
|
isActive: a = !1,
|
|
@@ -562,7 +560,7 @@ const He = I(
|
|
|
562
560
|
] })) : b;
|
|
563
561
|
}
|
|
564
562
|
);
|
|
565
|
-
|
|
563
|
+
_.displayName = "SidebarMenuButton";
|
|
566
564
|
const Fe = s.forwardRef(({ className: e, asChild: a = !1, showOnHover: t = !1, ...o }, i) => /* @__PURE__ */ r(
|
|
567
565
|
a ? N : "button",
|
|
568
566
|
{
|
|
@@ -575,7 +573,6 @@ const Fe = s.forwardRef(({ className: e, asChild: a = !1, showOnHover: t = !1, .
|
|
|
575
573
|
"peer-data-[size=default]/menu-button:top-1.5",
|
|
576
574
|
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
577
575
|
"peer-data-[size=bigIcon]/menu-button:top-2.5",
|
|
578
|
-
"peer-data-[size=tree]/menu-button:top-1.5",
|
|
579
576
|
"group-data-[collapsible=icon]:hidden",
|
|
580
577
|
t && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
|
|
581
578
|
e
|
|
@@ -616,14 +613,14 @@ const Ke = s.forwardRef(({ className: e, showIcon: a = !1, ...t }, o) => {
|
|
|
616
613
|
...t,
|
|
617
614
|
children: [
|
|
618
615
|
a && /* @__PURE__ */ r(
|
|
619
|
-
|
|
616
|
+
A,
|
|
620
617
|
{
|
|
621
618
|
className: "size-4 rounded-md",
|
|
622
619
|
"data-slot": "sidebar-menu-skeleton-icon"
|
|
623
620
|
}
|
|
624
621
|
),
|
|
625
622
|
/* @__PURE__ */ r(
|
|
626
|
-
|
|
623
|
+
A,
|
|
627
624
|
{
|
|
628
625
|
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
629
626
|
"data-slot": "sidebar-menu-skeleton-text",
|
|
@@ -638,13 +635,13 @@ const Ke = s.forwardRef(({ className: e, showIcon: a = !1, ...t }, o) => {
|
|
|
638
635
|
});
|
|
639
636
|
Ke.displayName = "SidebarMenuSkeleton";
|
|
640
637
|
const Ue = I(
|
|
641
|
-
"
|
|
638
|
+
"flex min-w-0 flex-col items-start gap-1 px-10 py-0.5 group-data-[collapsible=icon]:hidden",
|
|
642
639
|
{
|
|
643
640
|
variants: {
|
|
644
641
|
variant: {
|
|
645
642
|
default: "",
|
|
646
|
-
border: "border-l border-sidebar-border",
|
|
647
|
-
indent: "
|
|
643
|
+
border: "[&>li]:border-l [&>li]:border-sidebar-border",
|
|
644
|
+
indent: "border-l-0"
|
|
648
645
|
}
|
|
649
646
|
},
|
|
650
647
|
defaultVariants: {
|
|
@@ -687,7 +684,7 @@ const $e = s.forwardRef(
|
|
|
687
684
|
{
|
|
688
685
|
ref: l,
|
|
689
686
|
className: d(
|
|
690
|
-
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-foreground flex h-7 min-w-0
|
|
687
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-foreground flex h-7 min-w-0 items-center gap-2 overflow-hidden rounded-md px-2 transition-[color,background-color,box-shadow,opacity] duration-150 ease-in-out outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-of-type]:truncate [&>svg]:shrink-0",
|
|
691
688
|
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
692
689
|
a === "sm" && "text-xs",
|
|
693
690
|
a === "md" && "text-sm",
|
|
@@ -711,7 +708,7 @@ function We({
|
|
|
711
708
|
open: i,
|
|
712
709
|
onOpenChange: n
|
|
713
710
|
}) {
|
|
714
|
-
return /* @__PURE__ */ r(
|
|
711
|
+
return /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(
|
|
715
712
|
Z,
|
|
716
713
|
{
|
|
717
714
|
collapsible: !0,
|
|
@@ -727,22 +724,22 @@ function We({
|
|
|
727
724
|
}
|
|
728
725
|
We.displayName = "SidebarMenuCollapsible";
|
|
729
726
|
const Xe = s.forwardRef(({ children: e, className: a, ...t }, o) => /* @__PURE__ */ r(ee.Trigger, { asChild: !0, children: /* @__PURE__ */ k(
|
|
730
|
-
|
|
727
|
+
_,
|
|
731
728
|
{
|
|
732
729
|
ref: o,
|
|
733
|
-
className:
|
|
730
|
+
className: a,
|
|
734
731
|
variant: "collapsible",
|
|
735
732
|
...t,
|
|
736
733
|
children: [
|
|
734
|
+
e,
|
|
737
735
|
/* @__PURE__ */ r(
|
|
738
736
|
M,
|
|
739
737
|
{
|
|
740
738
|
"data-collapse-icon": !0,
|
|
741
|
-
className: "
|
|
739
|
+
className: "opacity-100! transition-transform duration-200 ease-out group-data-[collapsible=icon]:hidden",
|
|
742
740
|
size: 12
|
|
743
741
|
}
|
|
744
|
-
)
|
|
745
|
-
e
|
|
742
|
+
)
|
|
746
743
|
]
|
|
747
744
|
}
|
|
748
745
|
) }));
|
|
@@ -778,12 +775,12 @@ export {
|
|
|
778
775
|
Pe as SidebarCollapseIcon,
|
|
779
776
|
ge as SidebarCollapseIconType,
|
|
780
777
|
le as SidebarCollapsible,
|
|
781
|
-
|
|
778
|
+
Ee as SidebarContent,
|
|
782
779
|
Ve as SidebarDrawer,
|
|
783
780
|
De as SidebarFooter,
|
|
784
781
|
Oe as SidebarGroup,
|
|
785
|
-
|
|
786
|
-
|
|
782
|
+
Le as SidebarGroupAction,
|
|
783
|
+
_e as SidebarGroupContent,
|
|
787
784
|
ze as SidebarGroupLabel,
|
|
788
785
|
ce as SidebarGroupLabelSize,
|
|
789
786
|
ue as SidebarGroupLabelVariant,
|
|
@@ -793,13 +790,13 @@ export {
|
|
|
793
790
|
Be as SidebarMenu,
|
|
794
791
|
Fe as SidebarMenuAction,
|
|
795
792
|
Ge as SidebarMenuBadge,
|
|
796
|
-
|
|
793
|
+
_ as SidebarMenuButton,
|
|
797
794
|
pe as SidebarMenuButtonSize,
|
|
798
795
|
be as SidebarMenuButtonVariant,
|
|
799
796
|
We as SidebarMenuCollapsible,
|
|
800
797
|
qe as SidebarMenuCollapsibleContent,
|
|
801
798
|
Xe as SidebarMenuCollapsibleTrigger,
|
|
802
|
-
|
|
799
|
+
L as SidebarMenuItem,
|
|
803
800
|
Ke as SidebarMenuSkeleton,
|
|
804
801
|
B as SidebarMenuSub,
|
|
805
802
|
$e as SidebarMenuSubButton,
|
|
@@ -808,7 +805,7 @@ export {
|
|
|
808
805
|
fe as SidebarMenuSubVariant,
|
|
809
806
|
Se as SidebarProvider,
|
|
810
807
|
Ce as SidebarRail,
|
|
811
|
-
|
|
808
|
+
Ae as SidebarSeparator,
|
|
812
809
|
ne as SidebarSide,
|
|
813
810
|
z as SidebarTrigger,
|
|
814
811
|
de as SidebarVariant,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as ReactDOM from "react-dom";
|
|
3
|
+
export * from './index';
|
|
4
|
+
export { React, ReactDOM };
|
|
5
|
+
export declare const h: typeof React.createElement;
|
|
6
|
+
export declare const useState: typeof React.useState;
|
|
7
|
+
export declare const useEffect: typeof React.useEffect;
|
|
8
|
+
export declare const useMemo: typeof React.useMemo;
|
|
9
|
+
export declare const useCallback: typeof React.useCallback;
|
|
10
|
+
export declare const useRef: typeof React.useRef;
|
|
11
|
+
export declare const useContext: typeof React.useContext;
|
|
12
|
+
export declare const useReducer: typeof React.useReducer;
|
|
13
|
+
export declare const useLayoutEffect: typeof React.useLayoutEffect;
|
|
14
|
+
export declare const Fragment: React.ExoticComponent<React.FragmentProps>;
|
|
15
|
+
export declare function mount(name: string, container: HTMLElement, props?: Record<string, unknown>): () => void;
|
|
16
|
+
export declare function render(element: React.ReactNode, container: HTMLElement): () => void;
|
|
17
|
+
//# sourceMappingURL=browser-entry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-entry.d.ts","sourceRoot":"","sources":["../src/browser-entry.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AAKtC,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAE3B,eAAO,MAAM,CAAC,4BAAsB,CAAC;AACrC,eAAO,MAAM,QAAQ,uBAAiB,CAAC;AACvC,eAAO,MAAM,SAAS,wBAAkB,CAAC;AACzC,eAAO,MAAM,OAAO,sBAAgB,CAAC;AACrC,eAAO,MAAM,WAAW,0BAAoB,CAAC;AAC7C,eAAO,MAAM,MAAM,qBAAe,CAAC;AACnC,eAAO,MAAM,UAAU,yBAAmB,CAAC;AAC3C,eAAO,MAAM,UAAU,yBAAmB,CAAC;AAC3C,eAAO,MAAM,eAAe,8BAAwB,CAAC;AACrD,eAAO,MAAM,QAAQ,4CAAiB,CAAC;AAmBvC,wBAAgB,KAAK,CACnB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,WAAW,EACtB,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAClC,MAAM,IAAI,CA0BZ;AAED,wBAAgB,MAAM,CACpB,OAAO,EAAE,KAAK,CAAC,SAAS,EACxB,SAAS,EAAE,WAAW,GACrB,MAAM,IAAI,CAaZ"}
|
package/dist/button.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),O=require("react"),_=require("@radix-ui/react-slot"),z=require("class-variance-authority"),q=require("@brightlocal/icons"),x=require("@brightlocal/ui-components/lib/utils");function B(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const c=B(O),P=16,b=z.cva(["rounded-full","inline-flex","font-semibold","items-center","justify-center","gap-2","whitespace-nowrap","transition-[color,background-color,border-color,box-shadow,opacity]","duration-150","ease-in-out","cursor-pointer","disabled:pointer-events-none","disabled:cursor-not-allowed","disabled:opacity-50","aria-disabled:opacity-50","[&_svg]:pointer-events-none","[&_svg]:shrink-0","shrink-0","outline-none","aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40","aria-invalid:border-destructive"],{variants:{variant:{primary:["bg-primary","dark:bg-green-400","text-primary-foreground","dark:text-[var(--ds-colors-primary-foreground-light)]","hover:bg-primary/90","focus-visible:shadow-default"],destructive:["bg-destructive","dark:bg-red-400/90","hover:bg-destructive/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),O=require("react"),_=require("@radix-ui/react-slot"),z=require("class-variance-authority"),q=require("@brightlocal/icons"),x=require("@brightlocal/ui-components/lib/utils");function B(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const c=B(O),P=16,b=z.cva(["rounded-full","inline-flex","font-semibold","items-center","justify-center","gap-2","whitespace-nowrap","transition-[color,background-color,border-color,box-shadow,opacity]","duration-150","ease-in-out","cursor-pointer","disabled:pointer-events-none","disabled:cursor-not-allowed","disabled:opacity-50","aria-disabled:opacity-50","[&_svg]:pointer-events-none","[&_svg]:shrink-0","shrink-0","outline-none","aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40","aria-invalid:border-destructive"],{variants:{variant:{primary:["bg-primary","dark:bg-green-400","text-primary-foreground","dark:text-[var(--ds-colors-primary-foreground-light)]","hover:bg-primary/90","focus-visible:shadow-default"],secondary:["bg-secondary","text-secondary-foreground","hover:bg-secondary/80","focus-visible:shadow-default"],warning:["bg-warning-background","hover:bg-warning-background/80","text-warning-foreground","focus-visible:shadow-default"],destructive:["bg-destructive","dark:bg-red-400/90","hover:bg-destructive/80","dark:hover:bg-red-400/90","text-destructive-foreground","dark:text-red-950","focus-visible:shadow-destructive"],outline:["border","border-border","border-solid","bg-background","hover:bg-accent","hover:text-accent-foreground","dark:bg-input/30","dark:border-input","dark:hover:bg-input/80","dark:hover:border-input","focus-visible:shadow-default","focus-visible:border-ring"],ghost:["bg-transparent","text-foreground","hover:bg-accent","data-[state=open]:bg-accent","focus-visible:shadow-default"]},size:{default:"px-4 py-2 h-9 text-sm",sm:"py-2 px-3 h-8 text-xs",lg:"py-2 px-8 h-10 text-sm [&_svg:not([class*='size-'])]:size-5"},state:{default:"",loading:"pointer-events-none",disabled:"pointer-events-none opacity-50"},fullWidth:{false:"",true:"w-full"}},defaultVariants:{variant:"primary",size:"default",state:"default",fullWidth:!1}}),k=c.forwardRef(({className:e,variant:t="primary",size:r="default",fullWidth:o=!1,asChild:l=!1,dataHook:f,trackingEl:g,trackingLabel:v,iconOnly:w=!1,loading:n=!1,ariaLabel:j,disabled:p=!1,children:a,...u},y)=>{const h=l?_.Slot:"button",m=p||n;let i=w;!i&&c.Children.count(a)===1&&c.isValidElement(a)&&(i=a.props?.children==null);const S=n&&!l;let s="default";n?s="loading":p&&(s="disabled");const N=j??(n?`Loading: ${a||"Please wait"}`:void 0);return l?d.jsx(h,{ref:y,className:x.cn(b({variant:t,size:r,state:s,fullWidth:o}),i&&"size-9 p-0",e),"data-hook":f,"data-slot":"button","data-tracking-el":g||`button-${t}`,"data-tracking-label":v,...u,children:a}):d.jsxs(h,{ref:y,"aria-busy":n?"true":void 0,"aria-disabled":m?"true":void 0,"aria-label":N,className:x.cn(b({variant:t,size:r,state:s,fullWidth:o}),i&&"size-9 p-0",e),"data-hook":f,"data-slot":"button","data-tracking-el":g||`button-${t}`,"data-tracking-label":v,disabled:m,type:u.type??"button",...u,children:[S&&d.jsx("div",{className:"pointer-events-none flex items-center justify-center","data-slot":"button-loading-icon",children:d.jsx(q.Loader2,{className:"animate-spin",size:P})}),a]})});k.displayName="Button";exports.Button=k;exports.ButtonVariants=b;
|
package/dist/button.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as s, jsxs as S } from "react/jsx-runtime";
|
|
2
2
|
import * as d from "react";
|
|
3
3
|
import { Slot as _ } from "@radix-ui/react-slot";
|
|
4
4
|
import { cva as j } from "class-variance-authority";
|
|
@@ -40,10 +40,22 @@ const I = 16, x = j(
|
|
|
40
40
|
"hover:bg-primary/90",
|
|
41
41
|
"focus-visible:shadow-default"
|
|
42
42
|
],
|
|
43
|
+
secondary: [
|
|
44
|
+
"bg-secondary",
|
|
45
|
+
"text-secondary-foreground",
|
|
46
|
+
"hover:bg-secondary/80",
|
|
47
|
+
"focus-visible:shadow-default"
|
|
48
|
+
],
|
|
49
|
+
warning: [
|
|
50
|
+
"bg-warning-background",
|
|
51
|
+
"hover:bg-warning-background/80",
|
|
52
|
+
"text-warning-foreground",
|
|
53
|
+
"focus-visible:shadow-default"
|
|
54
|
+
],
|
|
43
55
|
destructive: [
|
|
44
56
|
"bg-destructive",
|
|
45
57
|
"dark:bg-red-400/90",
|
|
46
|
-
"hover:bg-destructive/
|
|
58
|
+
"hover:bg-destructive/80",
|
|
47
59
|
"dark:hover:bg-red-400/90",
|
|
48
60
|
"text-destructive-foreground",
|
|
49
61
|
"dark:text-red-950",
|
|
@@ -63,24 +75,12 @@ const I = 16, x = j(
|
|
|
63
75
|
"focus-visible:shadow-default",
|
|
64
76
|
"focus-visible:border-ring"
|
|
65
77
|
],
|
|
66
|
-
secondary: [
|
|
67
|
-
"bg-secondary",
|
|
68
|
-
"text-secondary-foreground",
|
|
69
|
-
"hover:bg-secondary/80",
|
|
70
|
-
"focus-visible:shadow-default"
|
|
71
|
-
],
|
|
72
78
|
ghost: [
|
|
73
79
|
"bg-transparent",
|
|
74
80
|
"text-foreground",
|
|
75
81
|
"hover:bg-accent",
|
|
76
82
|
"data-[state=open]:bg-accent",
|
|
77
83
|
"focus-visible:shadow-default"
|
|
78
|
-
],
|
|
79
|
-
warning: [
|
|
80
|
-
"bg-warning-light",
|
|
81
|
-
"text-warning-foreground",
|
|
82
|
-
"hover:bg-warning-light/90",
|
|
83
|
-
"focus-visible:shadow-default"
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
86
|
size: {
|
|
@@ -115,21 +115,21 @@ const I = 16, x = j(
|
|
|
115
115
|
dataHook: b,
|
|
116
116
|
trackingEl: f,
|
|
117
117
|
trackingLabel: g,
|
|
118
|
-
iconOnly:
|
|
118
|
+
iconOnly: k = !1,
|
|
119
119
|
loading: t = !1,
|
|
120
|
-
ariaLabel:
|
|
120
|
+
ariaLabel: w,
|
|
121
121
|
disabled: p = !1,
|
|
122
122
|
children: e,
|
|
123
|
-
...
|
|
123
|
+
...n
|
|
124
124
|
}, v) => {
|
|
125
125
|
const m = i ? _ : "button", h = p || t;
|
|
126
|
-
let a =
|
|
126
|
+
let a = k;
|
|
127
127
|
!a && d.Children.count(e) === 1 && d.isValidElement(e) && (a = e.props?.children == null);
|
|
128
128
|
const N = t && !i;
|
|
129
129
|
let o = "default";
|
|
130
130
|
t ? o = "loading" : p && (o = "disabled");
|
|
131
|
-
const z =
|
|
132
|
-
return i ? /* @__PURE__ */
|
|
131
|
+
const z = w ?? (t ? `Loading: ${e || "Please wait"}` : void 0);
|
|
132
|
+
return i ? /* @__PURE__ */ s(
|
|
133
133
|
m,
|
|
134
134
|
{
|
|
135
135
|
ref: v,
|
|
@@ -147,7 +147,7 @@ const I = 16, x = j(
|
|
|
147
147
|
"data-slot": "button",
|
|
148
148
|
"data-tracking-el": f || `button-${r}`,
|
|
149
149
|
"data-tracking-label": g,
|
|
150
|
-
...
|
|
150
|
+
...n,
|
|
151
151
|
children: e
|
|
152
152
|
}
|
|
153
153
|
) : /* @__PURE__ */ S(
|
|
@@ -172,15 +172,15 @@ const I = 16, x = j(
|
|
|
172
172
|
"data-tracking-el": f || `button-${r}`,
|
|
173
173
|
"data-tracking-label": g,
|
|
174
174
|
disabled: h,
|
|
175
|
-
type:
|
|
176
|
-
...
|
|
175
|
+
type: n.type ?? "button",
|
|
176
|
+
...n,
|
|
177
177
|
children: [
|
|
178
|
-
N && /* @__PURE__ */
|
|
178
|
+
N && /* @__PURE__ */ s(
|
|
179
179
|
"div",
|
|
180
180
|
{
|
|
181
181
|
className: "pointer-events-none flex items-center justify-center",
|
|
182
182
|
"data-slot": "button-loading-icon",
|
|
183
|
-
children: /* @__PURE__ */
|
|
183
|
+
children: /* @__PURE__ */ s(B, { className: "animate-spin", size: I })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
186
|
e
|
package/dist/card.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"),R=require("react"),O=require("class-variance-authority"),s=require("@brightlocal/ui-components/lib/utils");function D(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const d=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,d.get?d:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const r=D(R),i=r.createContext({flush:!1,density:"default"});function l(t,e){return!t&&(e==="condensed"?"px-3":"px-section-md")}const P=O.cva(["flex","flex-col","rounded-xl","transition-colors","w-full"],{variants:{variant:{filled:["bg-card","text-card-foreground","border","border-card-border"],transparent:["bg-transparent","text-foreground"],border:["bg-transparent","text-foreground","border","border-border"],"transparent-flush":["bg-transparent","text-foreground"]},density:{default:["gap-8","py-section-md"],condensed:["gap-3","py-3"]}},defaultVariants:{variant:"filled",density:"default"}}),f=r.forwardRef(({className:t,variant:e="filled",density:a="default",dataHook:d,trackingEl:n,trackingLabel:y,maxWidth:c="400px",children:b,style:j,...v},N)=>{const w=e==="transparent-flush",h=c!==void 0?{maxWidth:typeof c=="number"?`${c}px`:c}:void 0;return o.jsx(i.Provider,{value:{flush:w,density:a},children:o.jsx("div",{ref:N,className:s.cn(P({variant:e,density:a}),t),"data-density":a,"data-hook":d,"data-slot":"card","data-tracking-el":n||`card-${e}`,"data-tracking-label":y,style:{...h,...j},...v,children:b})})});f.displayName="Card";const u=r.forwardRef(({className:t,...e},a)=>{const{flush:d,density:n}=r.useContext(i);return o.jsx("div",{ref:a,className:s.cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 has-data-[slot=card-action]:grid-cols-[1fr_auto]",l(d,n),t),"data-slot":"card-header",...e})});u.displayName="CardHeader";const p=r.forwardRef(({className:t,...e},a)=>o.jsx("div",{ref:a,className:s.cn("font-display text-2xl font-medium",t),"data-slot":"card-title",...e}));p.displayName="CardTitle";const m=r.forwardRef(({className:t,...e},a)=>o.jsx("div",{ref:a,className:s.cn("text-muted-foreground text-sm leading-normal font-normal",t),"data-slot":"card-description",...e}));m.displayName="CardDescription";const C=r.forwardRef(({className:t,...e},a)=>o.jsx("div",{ref:a,className:s.cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end",t),"data-slot":"card-action",...e}));C.displayName="CardAction";const x=r.forwardRef(({className:t,...e},a)=>{const{flush:d,density:n}=r.useContext(i);return o.jsx("div",{ref:a,className:s.cn(l(d,n),t),"data-slot":"card-content",...e})});x.displayName="CardContent";const g=r.forwardRef(({className:t,...e},a)=>{const{flush:d,density:n}=r.useContext(i);return o.jsx("div",{ref:a,className:s.cn("flex items-center",l(d,n),t),"data-slot":"card-footer",...e})});g.displayName="CardFooter";exports.Card=f;exports.CardAction=C;exports.CardContent=x;exports.CardDescription=m;exports.CardFooter=g;exports.CardHeader=u;exports.CardTitle=p;
|
package/dist/card.d.ts
CHANGED
|
@@ -3,6 +3,10 @@ import * as React from "react";
|
|
|
3
3
|
* Card variant type
|
|
4
4
|
*/
|
|
5
5
|
type CardVariant = "filled" | "transparent" | "border" | "transparent-flush";
|
|
6
|
+
/**
|
|
7
|
+
* Card density type
|
|
8
|
+
*/
|
|
9
|
+
type CardDensity = "default" | "condensed";
|
|
6
10
|
/**
|
|
7
11
|
* Props for the Card component
|
|
8
12
|
*/
|
|
@@ -12,6 +16,11 @@ type CardProps = React.ComponentProps<"div"> & {
|
|
|
12
16
|
* @default "filled"
|
|
13
17
|
*/
|
|
14
18
|
variant?: CardVariant;
|
|
19
|
+
/**
|
|
20
|
+
* Spacing density of the card
|
|
21
|
+
* @default "default"
|
|
22
|
+
*/
|
|
23
|
+
density?: CardDensity;
|
|
15
24
|
/**
|
|
16
25
|
* Data hook for automated testing (required)
|
|
17
26
|
*/
|
|
@@ -73,5 +82,5 @@ declare const CardContent: React.ForwardRefExoticComponent<Omit<CardSubComponent
|
|
|
73
82
|
*/
|
|
74
83
|
declare const CardFooter: React.ForwardRefExoticComponent<Omit<CardSubComponentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
75
84
|
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
|
|
76
|
-
export type { CardProps, CardSubComponentProps, CardVariant };
|
|
85
|
+
export type { CardProps, CardSubComponentProps, CardVariant, CardDensity };
|
|
77
86
|
//# sourceMappingURL=card.d.ts.map
|
package/dist/card.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;GAEG;AACH,KAAK,WAAW,GAAG,QAAQ,GAAG,aAAa,GAAG,QAAQ,GAAG,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;GAEG;AACH,KAAK,WAAW,GAAG,QAAQ,GAAG,aAAa,GAAG,QAAQ,GAAG,mBAAmB,CAAC;AAE7E;;GAEG;AACH,KAAK,WAAW,GAAG,SAAS,GAAG,WAAW,CAAC;AA8C3C;;GAEG;AACH,KAAK,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC7C;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,IAAI,+FA2CT,CAAC;AAIF;;GAEG;AACH,KAAK,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACzD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,UAAU,2GAgBf,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,SAAS,2GASd,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,eAAe,2GAYpB,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,UAAU,2GAYf,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,WAAW,2GAYhB,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,UAAU,2GAgBf,CAAC;AAGF,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,GACZ,CAAC;AAEF,YAAY,EAAE,SAAS,EAAE,qBAAqB,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
|