@brightlocal/ui-components 2.27.0 → 3.0.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 +6 -1
- package/component-meta.json +480 -126
- package/deprecations.json +189 -2
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.js +2 -2
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.js +18 -18
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts +11 -1
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +31 -28
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.js +4 -4
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +15 -11
- package/dist/blocks/empty-state.cjs +1 -0
- package/dist/blocks/empty-state.d.ts +172 -0
- package/dist/blocks/empty-state.d.ts.map +1 -0
- package/dist/blocks/empty-state.js +155 -0
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +124 -108
- package/dist/blocks/progress-state.cjs +1 -0
- package/dist/blocks/{progress-screen.d.ts → progress-state.d.ts} +30 -18
- package/dist/blocks/progress-state.d.ts.map +1 -0
- package/dist/blocks/{progress-screen.js → progress-state.js} +100 -71
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +160 -161
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +11 -11
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +37 -38
- package/dist/callout.cjs +1 -1
- package/dist/callout.d.ts +24 -2
- package/dist/callout.d.ts.map +1 -1
- package/dist/callout.js +57 -55
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +23 -2
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +94 -91
- package/dist/chart-empty.cjs +1 -0
- package/dist/chart-empty.d.ts +59 -0
- package/dist/chart-empty.d.ts.map +1 -0
- package/dist/chart-empty.js +29 -0
- package/dist/chart.cjs +6 -6
- package/dist/chart.d.ts +6 -1
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +183 -183
- package/dist/chip.cjs +1 -1
- package/dist/chip.d.ts.map +1 -1
- package/dist/chip.js +5 -3
- package/dist/combobox.cjs +2 -2
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +81 -79
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +74 -77
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.js +26 -29
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.d.ts +44 -10
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +13 -11
- package/dist/description.cjs +1 -1
- package/dist/description.js +5 -5
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +20 -20
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.js +8 -11
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +17 -20
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +29 -25
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +27 -1
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +18 -16
- package/dist/grid.cjs +1 -0
- package/dist/grid.d.ts +56 -0
- package/dist/grid.d.ts.map +1 -0
- package/dist/grid.js +32 -0
- package/dist/header.d.ts +13 -0
- package/dist/header.d.ts.map +1 -1
- package/dist/hooks/use-delayed-pending.cjs +1 -0
- package/dist/hooks/use-delayed-pending.d.ts +34 -0
- package/dist/hooks/use-delayed-pending.d.ts.map +1 -0
- package/dist/hooks/use-delayed-pending.js +17 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.js +13 -13
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +512 -494
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.js +25 -25
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.js +9 -9
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +9 -9
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.js +51 -51
- package/dist/input.cjs +1 -1
- package/dist/input.js +9 -9
- package/dist/label.cjs +1 -1
- package/dist/label.d.ts.map +1 -1
- package/dist/label.js +25 -28
- package/dist/lib/block-illustration.cjs +1 -0
- package/dist/lib/block-illustration.d.ts +28 -0
- package/dist/lib/block-illustration.d.ts.map +1 -0
- package/dist/lib/block-illustration.js +21 -0
- package/dist/lib/empty-canvas.cjs +1 -0
- package/dist/lib/empty-canvas.d.ts +27 -0
- package/dist/lib/empty-canvas.d.ts.map +1 -0
- package/dist/lib/empty-canvas.js +62 -0
- package/dist/lib/optical-center.cjs +1 -0
- package/dist/lib/optical-center.d.ts +12 -0
- package/dist/lib/optical-center.d.ts.map +1 -0
- package/dist/lib/optical-center.js +11 -0
- package/dist/lib/utils.cjs +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +28 -5
- package/dist/list.cjs +1 -1
- package/dist/list.d.ts.map +1 -1
- package/dist/list.js +62 -58
- package/dist/map.cjs +1 -1
- package/dist/map.d.ts +60 -2
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +187 -164
- package/dist/media-empty.cjs +1 -0
- package/dist/media-empty.d.ts +72 -0
- package/dist/media-empty.d.ts.map +1 -0
- package/dist/media-empty.js +45 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +17 -20
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.js +7 -7
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +127 -1
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +189 -98
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +2 -26
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +79 -118
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +19 -18
- package/dist/separator.cjs +1 -1
- package/dist/separator.js +8 -8
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +38 -3
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +43 -20
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.js +26 -26
- package/dist/stepper.cjs +1 -1
- package/dist/stepper.js +40 -40
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +31 -28
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text-reveal-motion.d.ts +10 -0
- package/dist/text-reveal-motion.d.ts.map +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +11 -11
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.js +8 -8
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +8 -8
- package/dist/typography-heading.cjs +1 -0
- package/dist/typography-heading.d.ts +116 -0
- package/dist/typography-heading.d.ts.map +1 -0
- package/dist/typography-heading.js +84 -0
- package/dist/typography-text.cjs +1 -0
- package/dist/typography-text.d.ts +113 -0
- package/dist/typography-text.d.ts.map +1 -0
- package/dist/typography-text.js +81 -0
- package/dist/typography.d.ts +13 -0
- package/dist/typography.d.ts.map +1 -1
- package/package.json +35 -7
- package/src/blocks/empty-state.tsx +424 -0
- package/src/blocks/input-list.tsx +66 -36
- package/src/blocks/{progress-screen.tsx → progress-state.tsx} +154 -93
- package/src/blocks/sidebar.tsx +25 -26
- package/src/components/accordion.tsx +2 -2
- package/src/components/alert-dialog.tsx +2 -2
- package/src/components/alert.tsx +27 -13
- package/src/components/avatar.tsx +1 -1
- package/src/components/badge.tsx +8 -4
- package/src/components/breadcrumb.tsx +1 -1
- package/src/components/button.tsx +3 -3
- package/src/components/calendar.tsx +5 -6
- package/src/components/callout.tsx +48 -15
- package/src/components/card.tsx +52 -17
- package/src/components/chart-empty.tsx +116 -0
- package/src/components/chart.tsx +43 -17
- package/src/components/chip.tsx +5 -3
- package/src/components/combobox.tsx +12 -10
- package/src/components/command.tsx +9 -10
- package/src/components/context-menu.tsx +6 -9
- package/src/components/data-table.tsx +72 -17
- package/src/components/description.tsx +1 -1
- package/src/components/dialog.tsx +2 -2
- package/src/components/drawer.tsx +2 -5
- package/src/components/dropdown-menu.tsx +8 -11
- package/src/components/field.tsx +8 -4
- package/src/components/global-layout.tsx +36 -3
- package/src/components/grid.tsx +130 -0
- package/src/components/header.tsx +13 -0
- package/src/components/hover-card.tsx +1 -1
- package/src/components/input-chip.tsx +1 -1
- package/src/components/input-group.tsx +1 -1
- package/src/components/input-otp.tsx +1 -1
- package/src/components/input-password.tsx +1 -1
- package/src/components/input.tsx +1 -1
- package/src/components/label.tsx +10 -13
- package/src/components/list.tsx +13 -9
- package/src/components/map.tsx +101 -5
- package/src/components/media-empty.tsx +156 -0
- package/src/components/menubar.tsx +7 -10
- package/src/components/navigation-menu.tsx +1 -1
- package/src/components/pagination.tsx +279 -1
- package/src/components/progress.tsx +35 -113
- package/src/components/select.tsx +5 -4
- package/src/components/separator.tsx +1 -1
- package/src/components/sheet.tsx +2 -2
- package/src/components/skeleton.tsx +78 -7
- package/src/components/sonner.tsx +2 -2
- package/src/components/stepper.tsx +3 -3
- package/src/components/table.tsx +6 -3
- package/src/components/tabs.tsx +1 -1
- package/src/components/text-reveal-motion.tsx +10 -0
- package/src/components/textarea.tsx +1 -1
- package/src/components/toggle.tsx +1 -1
- package/src/components/tooltip.tsx +1 -1
- package/src/components/typography-heading.tsx +229 -0
- package/src/components/typography-text.tsx +225 -0
- package/src/components/typography.tsx +13 -0
- package/src/hooks/use-delayed-pending.ts +60 -0
- package/src/index.ts +10 -1
- package/src/lib/block-illustration.tsx +88 -0
- package/src/lib/empty-canvas.tsx +128 -0
- package/src/lib/optical-center.tsx +45 -0
- package/src/lib/utils.ts +26 -0
- package/dist/blocks/progress-screen.cjs +0 -1
- package/dist/blocks/progress-screen.d.ts.map +0 -1
package/dist/input.js
CHANGED
|
@@ -10,7 +10,7 @@ const p = f(
|
|
|
10
10
|
"border border-input bg-background rounded-sm",
|
|
11
11
|
"outline-none transition-[border-color,box-shadow,background-color] duration-fast ease-out",
|
|
12
12
|
// Typography
|
|
13
|
-
"text-
|
|
13
|
+
"text-body",
|
|
14
14
|
"text-foreground",
|
|
15
15
|
"overflow-hidden text-ellipsis",
|
|
16
16
|
// States - Focus
|
|
@@ -43,29 +43,29 @@ const p = f(
|
|
|
43
43
|
}
|
|
44
44
|
), v = u.forwardRef(
|
|
45
45
|
({
|
|
46
|
-
className:
|
|
46
|
+
className: a,
|
|
47
47
|
hasIcon: r = !1,
|
|
48
48
|
hasSecondaryIcon: t = !1,
|
|
49
49
|
dataHook: i,
|
|
50
|
-
error:
|
|
51
|
-
trackingEl:
|
|
50
|
+
error: d,
|
|
51
|
+
trackingEl: s,
|
|
52
52
|
trackingLabel: n,
|
|
53
53
|
...e
|
|
54
54
|
}, l) => {
|
|
55
|
-
const
|
|
55
|
+
const o = d || e["aria-invalid"] === !0 || e["aria-invalid"] === "true";
|
|
56
56
|
return /* @__PURE__ */ c(
|
|
57
57
|
"input",
|
|
58
58
|
{
|
|
59
59
|
ref: l,
|
|
60
|
-
"aria-invalid":
|
|
60
|
+
"aria-invalid": o ? "true" : void 0,
|
|
61
61
|
className: b(
|
|
62
62
|
p({ hasIcon: r, hasSecondaryIcon: t }),
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
o && "border-destructive-40 focus-visible:border-destructive-40 focus-visible:shadow-destructive",
|
|
64
|
+
a
|
|
65
65
|
),
|
|
66
66
|
"data-hook": i,
|
|
67
67
|
"data-slot": "input",
|
|
68
|
-
"data-tracking-el":
|
|
68
|
+
"data-tracking-el": s,
|
|
69
69
|
"data-tracking-label": n,
|
|
70
70
|
...e
|
|
71
71
|
}
|
package/dist/label.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),p=require("react"),f=require("@radix-ui/react-label"),m=require("class-variance-authority"),g=require("@brightlocal/ui-components/lib/utils");function n(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const y=n(p),j=n(f),o=m.cva(["text-label","text-foreground"],{variants:{optional:{true:"after:ml-1 after:content-['(optional)']"},srOnly:{true:"sr-only"}},defaultVariants:{}}),l=y.forwardRef(({className:e,optional:a,srOnly:t,dataHook:r,trackingEl:i,trackingLabel:s,children:c,...u},d)=>b.jsx(j.Root,{ref:d,className:g.cn("flex items-center select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",o({optional:a,srOnly:t}),e),"data-hook":r,"data-slot":"label","data-tracking-el":i||"label","data-tracking-label":s,...u,children:c}));l.displayName="Label";exports.Label=l;exports.labelVariants=o;
|
package/dist/label.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,QAAA,MAAM,aAAa;;;
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,QAAA,MAAM,aAAa;;;8EAUjB,CAAC;AAEH,UAAU,UAAW,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,CAAC;IAClE;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,KAAK,qFAgCV,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;AAEhC,YAAY,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/label.js
CHANGED
|
@@ -1,51 +1,48 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as p from "react";
|
|
3
|
+
import * as m from "@radix-ui/react-label";
|
|
4
4
|
import { cva as c } from "class-variance-authority";
|
|
5
|
-
import { cn as
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
optional: {
|
|
11
|
-
true: "after:ml-1 after:content-['(optional)']"
|
|
12
|
-
},
|
|
13
|
-
srOnly: {
|
|
14
|
-
true: "sr-only"
|
|
15
|
-
}
|
|
5
|
+
import { cn as b } from "@brightlocal/ui-components/lib/utils";
|
|
6
|
+
const f = c(["text-label", "text-foreground"], {
|
|
7
|
+
variants: {
|
|
8
|
+
optional: {
|
|
9
|
+
true: "after:ml-1 after:content-['(optional)']"
|
|
16
10
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
srOnly: {
|
|
12
|
+
true: "sr-only"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {}
|
|
16
|
+
}), u = p.forwardRef(
|
|
20
17
|
({
|
|
21
18
|
className: a,
|
|
22
19
|
optional: e,
|
|
23
20
|
srOnly: t,
|
|
24
|
-
dataHook:
|
|
25
|
-
trackingEl:
|
|
21
|
+
dataHook: r,
|
|
22
|
+
trackingEl: o,
|
|
26
23
|
trackingLabel: l,
|
|
27
|
-
children:
|
|
28
|
-
...
|
|
24
|
+
children: i,
|
|
25
|
+
...n
|
|
29
26
|
}, s) => /* @__PURE__ */ d(
|
|
30
|
-
|
|
27
|
+
m.Root,
|
|
31
28
|
{
|
|
32
29
|
ref: s,
|
|
33
|
-
className:
|
|
30
|
+
className: b(
|
|
34
31
|
"flex items-center select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
35
|
-
|
|
32
|
+
f({ optional: e, srOnly: t }),
|
|
36
33
|
a
|
|
37
34
|
),
|
|
38
|
-
"data-hook":
|
|
35
|
+
"data-hook": r,
|
|
39
36
|
"data-slot": "label",
|
|
40
|
-
"data-tracking-el":
|
|
37
|
+
"data-tracking-el": o || "label",
|
|
41
38
|
"data-tracking-label": l,
|
|
42
|
-
...
|
|
43
|
-
children:
|
|
39
|
+
...n,
|
|
40
|
+
children: i
|
|
44
41
|
}
|
|
45
42
|
)
|
|
46
43
|
);
|
|
47
44
|
u.displayName = "Label";
|
|
48
45
|
export {
|
|
49
46
|
u as Label,
|
|
50
|
-
|
|
47
|
+
f as labelVariants
|
|
51
48
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("react");function a(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const l=a(c),u=130;function s({children:t,size:e,slot:n}){const o=l.isValidElement(t)&&typeof t.type=="function"?l.cloneElement(t,{size:e}):t;return r.jsx("div",{className:"flex shrink-0 items-center justify-center [&>*]:h-auto [&>*]:max-h-full [&>*]:max-w-full","data-slot":n,style:{width:e,height:e},children:o})}exports.BLOCK_ILLUSTRATION_SIZE=u;exports.BlockIllustration=s;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The size the design specifies for a page-scope illustration, shared by every
|
|
4
|
+
* block that draws one — `ProgressState` and `EmptyState` at page scope — so the
|
|
5
|
+
* artwork never resizes as one of those screens becomes the other.
|
|
6
|
+
*
|
|
7
|
+
* The artwork is the title's companion, not the subject of the screen: much
|
|
8
|
+
* larger and it outweighs the 24px heading under it, and the eye lands on the
|
|
9
|
+
* drawing instead of the words that say what to do next.
|
|
10
|
+
*/
|
|
11
|
+
declare const BLOCK_ILLUSTRATION_SIZE = 130;
|
|
12
|
+
/**
|
|
13
|
+
* Props for the internal BlockIllustration wrapper.
|
|
14
|
+
*/
|
|
15
|
+
interface BlockIllustrationProps {
|
|
16
|
+
/** The illustration element, exactly as the consumer passed it. */
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
/** Rendered width and height in pixels. */
|
|
19
|
+
size: number;
|
|
20
|
+
/** The owning block's slot name, e.g. `"empty-screen-illustration"`. */
|
|
21
|
+
slot: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Renders a consumer-supplied illustration at the block's own size.
|
|
25
|
+
*/
|
|
26
|
+
declare function BlockIllustration({ children, size, slot }: BlockIllustrationProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export { BlockIllustration, BLOCK_ILLUSTRATION_SIZE };
|
|
28
|
+
//# sourceMappingURL=block-illustration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-illustration.d.ts","sourceRoot":"","sources":["../../src/lib/block-illustration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgC/B;;;;;;;;GAQG;AACH,QAAA,MAAM,uBAAuB,MAAM,CAAC;AAEpC;;GAEG;AACH,UAAU,sBAAsB;IAC9B,mEAAmE;IACnE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,iBAAS,iBAAiB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,sBAAsB,2CA2B1E;AAED,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
const i = 130;
|
|
4
|
+
function m({ children: t, size: e, slot: l }) {
|
|
5
|
+
const n = o.isValidElement(t) && typeof t.type == "function" ? o.cloneElement(t, {
|
|
6
|
+
size: e
|
|
7
|
+
}) : t;
|
|
8
|
+
return /* @__PURE__ */ s(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
className: "flex shrink-0 items-center justify-center [&>*]:h-auto [&>*]:max-h-full [&>*]:max-w-full",
|
|
12
|
+
"data-slot": l,
|
|
13
|
+
style: { width: e, height: e },
|
|
14
|
+
children: n
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
i as BLOCK_ILLUSTRATION_SIZE,
|
|
20
|
+
m as BlockIllustration
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),g=require("react"),p=require("@brightlocal/ui-components/lib/utils"),f=require("../typography-text.cjs");function y(t){const a=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(a,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return a.default=t,Object.freeze(a)}const s=y(g),b=32,i=s.forwardRef(({className:t,dataHook:a,icon:e,message:r,slot:n,trackingEl:o,trackingLabel:l,...d},u)=>{const m=s.isValidElement(e)&&typeof e.type!="string"&&e.type!==s.Fragment?s.cloneElement(e,{size:b}):e;return c.jsxs("div",{ref:u,className:p.cn("bg-muted flex flex-col items-center justify-center gap-2 text-center",t),"data-hook":a,"data-slot":n,"data-tracking-el":o??n,"data-tracking-label":l,...d,children:[c.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground flex items-center justify-center [&_svg:not([class*='size-'])]:size-8","data-hook":`${a}-icon`,"data-slot":`${n}-icon`,children:m}),c.jsx(f.TypographyText,{align:"center",color:"muted","data-slot":`${n}-message`,dataHook:`${a}-message`,variant:"body-sm",children:r})]})});i.displayName="EmptyCanvas";exports.EmptyCanvas=i;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Props for the internal EmptyCanvas body.
|
|
4
|
+
*/
|
|
5
|
+
interface EmptyCanvasProps extends Omit<React.ComponentPropsWithoutRef<"div">, "children" | "title"> {
|
|
6
|
+
/** Required data-hook; the parts derive `-icon` and `-message` from it. */
|
|
7
|
+
dataHook: string;
|
|
8
|
+
/**
|
|
9
|
+
* The decorative glyph. This component owns its size — whatever the element
|
|
10
|
+
* carries is overridden — so no call site has a number to get wrong.
|
|
11
|
+
*/
|
|
12
|
+
icon: React.ReactNode;
|
|
13
|
+
/** The one line under the glyph. */
|
|
14
|
+
message: string;
|
|
15
|
+
/** The calling component's slot name, e.g. `"chart-empty"`. */
|
|
16
|
+
slot: string;
|
|
17
|
+
/** Tracking element identifier for analytics. */
|
|
18
|
+
trackingEl?: string;
|
|
19
|
+
/** Tracking label for analytics context. */
|
|
20
|
+
trackingLabel?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Renders the muted canvas surface with its glyph and line.
|
|
24
|
+
*/
|
|
25
|
+
declare const EmptyCanvas: React.ForwardRefExoticComponent<EmptyCanvasProps & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export { EmptyCanvas };
|
|
27
|
+
//# sourceMappingURL=empty-canvas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-canvas.d.ts","sourceRoot":"","sources":["../../src/lib/empty-canvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmC/B;;GAEG;AACH,UAAU,gBAAiB,SAAQ,IAAI,CACrC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EACrC,UAAU,GAAG,OAAO,CACrB;IACC,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,QAAA,MAAM,WAAW,yFA6DhB,CAAC;AAIF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsxs as p, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { cn as f } from "@brightlocal/ui-components/lib/utils";
|
|
4
|
+
import { TypographyText as g } from "../typography-text.js";
|
|
5
|
+
const y = 32, x = a.forwardRef(
|
|
6
|
+
({
|
|
7
|
+
className: n,
|
|
8
|
+
dataHook: r,
|
|
9
|
+
icon: e,
|
|
10
|
+
message: i,
|
|
11
|
+
slot: t,
|
|
12
|
+
trackingEl: m,
|
|
13
|
+
trackingLabel: o,
|
|
14
|
+
...d
|
|
15
|
+
}, c) => {
|
|
16
|
+
const l = a.isValidElement(e) && typeof e.type != "string" && e.type !== a.Fragment ? a.cloneElement(e, {
|
|
17
|
+
size: y
|
|
18
|
+
}) : e;
|
|
19
|
+
return /* @__PURE__ */ p(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
ref: c,
|
|
23
|
+
className: f(
|
|
24
|
+
"bg-muted flex flex-col items-center justify-center gap-2 text-center",
|
|
25
|
+
n
|
|
26
|
+
),
|
|
27
|
+
"data-hook": r,
|
|
28
|
+
"data-slot": t,
|
|
29
|
+
"data-tracking-el": m ?? t,
|
|
30
|
+
"data-tracking-label": o,
|
|
31
|
+
...d,
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ s(
|
|
34
|
+
"span",
|
|
35
|
+
{
|
|
36
|
+
"aria-hidden": "true",
|
|
37
|
+
className: "text-muted-foreground flex items-center justify-center [&_svg:not([class*='size-'])]:size-8",
|
|
38
|
+
"data-hook": `${r}-icon`,
|
|
39
|
+
"data-slot": `${t}-icon`,
|
|
40
|
+
children: l
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ s(
|
|
44
|
+
g,
|
|
45
|
+
{
|
|
46
|
+
align: "center",
|
|
47
|
+
color: "muted",
|
|
48
|
+
"data-slot": `${t}-message`,
|
|
49
|
+
dataHook: `${r}-message`,
|
|
50
|
+
variant: "body-sm",
|
|
51
|
+
children: i
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
x.displayName = "EmptyCanvas";
|
|
60
|
+
export {
|
|
61
|
+
x as EmptyCanvas
|
|
62
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");function r({children:t}){return e.jsxs(e.Fragment,{children:[e.jsx("div",{"aria-hidden":"true",className:"flex-1"}),t,e.jsx("div",{"aria-hidden":"true",className:"flex-[1.6]"})]})}exports.OpticalCenter=r;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface OpticalCenterProps {
|
|
3
|
+
/** The content to hold at the optical centre. */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Two flexible spacers in a 38/62 ratio around the children. The parent must
|
|
8
|
+
* be a `flex flex-1 flex-col` box for the ratio to have room to work.
|
|
9
|
+
*/
|
|
10
|
+
declare function OpticalCenter({ children }: OpticalCenterProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { OpticalCenter };
|
|
12
|
+
//# sourceMappingURL=optical-center.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optical-center.d.ts","sourceRoot":"","sources":["../../src/lib/optical-center.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyB/B,UAAU,kBAAkB;IAC1B,iDAAiD;IACjD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;GAGG;AACH,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAQtD;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsxs as a, Fragment as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
function n({ children: r }) {
|
|
3
|
+
return /* @__PURE__ */ a(i, { children: [
|
|
4
|
+
/* @__PURE__ */ e("div", { "aria-hidden": "true", className: "flex-1" }),
|
|
5
|
+
r,
|
|
6
|
+
/* @__PURE__ */ e("div", { "aria-hidden": "true", className: "flex-[1.6]" })
|
|
7
|
+
] });
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
n as OpticalCenter
|
|
11
|
+
};
|
package/dist/lib/utils.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 t=require("clsx"),a=require("tailwind-merge"),o=a.extendTailwindMerge({extend:{classGroups:{duration:[{duration:["fast","base","slow"]}],ease:[{ease:["emphasized","overshoot"]}],"font-weight":[{text:["emphasis"]}],"font-size":[{text:["display","heading-page","heading-section","heading-subsection","heading-compact","body","body-sm","body-xs","label","label-sm","metric","code","code-inline"]}]}}});function s(...e){return o(t.clsx(e))}const d="data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 duration-base ease-out data-[state=closed]:duration-fast data-[state=closed]:ease-in";exports.FLOATING_CONTENT_ANIMATION=d;exports.cn=s;
|
package/dist/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAyC7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,eAAO,MAAM,0BAA0B,0aACkY,CAAC"}
|
package/dist/lib/utils.js
CHANGED
|
@@ -1,15 +1,38 @@
|
|
|
1
|
-
import { clsx as
|
|
2
|
-
import { extendTailwindMerge as
|
|
3
|
-
const o =
|
|
1
|
+
import { clsx as e } from "clsx";
|
|
2
|
+
import { extendTailwindMerge as a } from "tailwind-merge";
|
|
3
|
+
const o = a({
|
|
4
4
|
extend: {
|
|
5
5
|
classGroups: {
|
|
6
6
|
duration: [{ duration: ["fast", "base", "slow"] }],
|
|
7
|
-
ease: [{ ease: ["emphasized", "overshoot"] }]
|
|
7
|
+
ease: [{ ease: ["emphasized", "overshoot"] }],
|
|
8
|
+
// text-emphasis sets font-weight only, so it belongs to the font-weight
|
|
9
|
+
// group (conflicts with font-bold etc.), NOT font-size — and unregistered
|
|
10
|
+
// it would be treated as a text colour and clobber color utilities.
|
|
11
|
+
"font-weight": [{ text: ["emphasis"] }],
|
|
12
|
+
"font-size": [
|
|
13
|
+
{
|
|
14
|
+
text: [
|
|
15
|
+
"display",
|
|
16
|
+
"heading-page",
|
|
17
|
+
"heading-section",
|
|
18
|
+
"heading-subsection",
|
|
19
|
+
"heading-compact",
|
|
20
|
+
"body",
|
|
21
|
+
"body-sm",
|
|
22
|
+
"body-xs",
|
|
23
|
+
"label",
|
|
24
|
+
"label-sm",
|
|
25
|
+
"metric",
|
|
26
|
+
"code",
|
|
27
|
+
"code-inline"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
8
31
|
}
|
|
9
32
|
}
|
|
10
33
|
});
|
|
11
34
|
function i(...t) {
|
|
12
|
-
return o(
|
|
35
|
+
return o(e(t));
|
|
13
36
|
}
|
|
14
37
|
const n = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 duration-base ease-out data-[state=closed]:duration-fast data-[state=closed]:ease-in";
|
|
15
38
|
export {
|
package/dist/list.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 s=require("react/jsx-runtime"),k=require("react"),h=require("@radix-ui/react-slot"),R=require("class-variance-authority"),o=require("@brightlocal/ui-components/lib/utils"),v=require("@brightlocal/ui-components/skeleton");function w(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const i=w(k),d=R.cva(["flex","items-center","gap-4","rounded-lg","py-2","pr-2","pl-4","transition-colors","duration-fast","ease-out"],{variants:{variant:{default:[],filled:["bg-card"],outline:["bg-background","border","border-border"],loading:["p-0"]}},defaultVariants:{variant:"filled"}}),c=i.forwardRef(({className:e,dataHook:a,trackingEl:t,trackingLabel:r,...n},l)=>s.jsx("ul",{ref:l,className:o.cn("flex flex-col gap-2",e),"data-hook":a,"data-slot":"list","data-tracking-el":t,"data-tracking-label":r,...n}));c.displayName="List";const m=i.forwardRef(({asChild:e=!1,className:a,variant:t,dataHook:r,trackingEl:n,trackingLabel:l,children:I,...y},N)=>{const j=e?h.Slot:"li";return s.jsx(j,{ref:N,className:o.cn(d({variant:t}),a),"data-hook":r,"data-slot":"item","data-tracking-el":n,"data-tracking-label":l,...y,children:t==="loading"?s.jsx(v.Skeleton,{className:"h-13 w-full rounded-lg"}):I})});m.displayName="Item";const f=i.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("shrink-0",e),"data-slot":"item-media",...a}));f.displayName="ItemMedia";const u=i.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("flex flex-1 flex-col gap-1",e),"data-slot":"item-content",...a}));u.displayName="ItemContent";const p=i.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("text-foreground text-body",e),"data-slot":"item-title",...a}));p.displayName="ItemTitle";const g=i.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("text-body-sm text-muted-foreground",e),"data-slot":"item-description",...a}));g.displayName="ItemDescription";const x=i.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("text-muted-foreground flex size-9 shrink-0 items-center justify-center rounded-full",e),"data-slot":"item-actions",...a}));x.displayName="ItemActions";const b=i.forwardRef(({className:e,dataHook:a,...t},r)=>s.jsx("li",{ref:r,className:o.cn("text-muted-foreground text-label-sm flex items-center pt-4 pr-2 pb-1 pl-4 first:pt-2",e),"data-hook":a,"data-slot":"item-subheader",...t}));b.displayName="ItemSubheader";exports.Item=m;exports.ItemActions=x;exports.ItemContent=u;exports.ItemDescription=g;exports.ItemMedia=f;exports.ItemSubheader=b;exports.ItemTitle=p;exports.List=c;exports.itemVariants=d;
|
package/dist/list.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/components/list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,QAAA,MAAM,YAAY;;8EA0BjB,CAAC;AAMF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IACnD;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,IAAI,iGAYT,CAAC;AAOF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IACnD;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;IACvD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,IAAI,8FAqCT,CAAC;AAOF,6EAA6E;AAC7E,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEzD;;GAEG;AACH,QAAA,MAAM,SAAS,mKASd,CAAC;AAOF,sFAAsF;AACtF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE3D;;;GAGG;AACH,QAAA,MAAM,WAAW,mKAShB,CAAC;AAOF,iFAAiF;AACjF,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEzD;;GAEG;AACH,QAAA,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/components/list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,QAAA,MAAM,YAAY;;8EA0BjB,CAAC;AAMF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IACnD;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,IAAI,iGAYT,CAAC;AAOF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IACnD;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;IACvD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,IAAI,8FAqCT,CAAC;AAOF,6EAA6E;AAC7E,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEzD;;GAEG;AACH,QAAA,MAAM,SAAS,mKASd,CAAC;AAOF,sFAAsF;AACtF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE3D;;;GAGG;AACH,QAAA,MAAM,WAAW,mKAShB,CAAC;AAOF,iFAAiF;AACjF,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEzD;;GAEG;AACH,QAAA,MAAM,SAAS,mKASd,CAAC;AAOF,uFAAuF;AACvF,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE/D;;GAEG;AACH,QAAA,MAAM,eAAe,mKASpB,CAAC;AAOF,qFAAqF;AACrF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE3D;;GAEG;AACH,QAAA,MAAM,WAAW,mKAYhB,CAAC;AAOF,iFAAiF;AACjF,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IAC5D;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,aAAa,uGAuBlB,CAAC;AAOF,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,WAAW,EACX,SAAS,EACT,eAAe,EACf,WAAW,EACX,aAAa,EACb,YAAY,GACb,CAAC"}
|
package/dist/list.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import * as r from "react";
|
|
3
3
|
import { Slot as c } from "@radix-ui/react-slot";
|
|
4
4
|
import { cva as p } from "class-variance-authority";
|
|
5
|
-
import { cn as
|
|
5
|
+
import { cn as s } from "@brightlocal/ui-components/lib/utils";
|
|
6
6
|
import { Skeleton as u } from "@brightlocal/ui-components/skeleton";
|
|
7
7
|
const g = p(
|
|
8
8
|
[
|
|
@@ -31,41 +31,41 @@ const g = p(
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
), x = r.forwardRef(
|
|
34
|
-
({ className:
|
|
34
|
+
({ className: e, dataHook: a, trackingEl: t, trackingLabel: i, ...l }, d) => /* @__PURE__ */ o(
|
|
35
35
|
"ul",
|
|
36
36
|
{
|
|
37
|
-
ref:
|
|
38
|
-
className:
|
|
37
|
+
ref: d,
|
|
38
|
+
className: s("flex flex-col gap-2", e),
|
|
39
39
|
"data-hook": a,
|
|
40
40
|
"data-slot": "list",
|
|
41
|
-
"data-tracking-el":
|
|
42
|
-
"data-tracking-label":
|
|
43
|
-
...
|
|
41
|
+
"data-tracking-el": t,
|
|
42
|
+
"data-tracking-label": i,
|
|
43
|
+
...l
|
|
44
44
|
}
|
|
45
45
|
)
|
|
46
46
|
);
|
|
47
47
|
x.displayName = "List";
|
|
48
48
|
const N = r.forwardRef(
|
|
49
49
|
({
|
|
50
|
-
asChild:
|
|
50
|
+
asChild: e = !1,
|
|
51
51
|
className: a,
|
|
52
|
-
variant:
|
|
53
|
-
dataHook:
|
|
54
|
-
trackingEl:
|
|
55
|
-
trackingLabel:
|
|
52
|
+
variant: t,
|
|
53
|
+
dataHook: i,
|
|
54
|
+
trackingEl: l,
|
|
55
|
+
trackingLabel: d,
|
|
56
56
|
children: m,
|
|
57
57
|
...n
|
|
58
58
|
}, f) => /* @__PURE__ */ o(
|
|
59
|
-
|
|
59
|
+
e ? c : "li",
|
|
60
60
|
{
|
|
61
61
|
ref: f,
|
|
62
|
-
className:
|
|
63
|
-
"data-hook":
|
|
62
|
+
className: s(g({ variant: t }), a),
|
|
63
|
+
"data-hook": i,
|
|
64
64
|
"data-slot": "item",
|
|
65
|
-
"data-tracking-el":
|
|
66
|
-
"data-tracking-label":
|
|
65
|
+
"data-tracking-el": l,
|
|
66
|
+
"data-tracking-label": d,
|
|
67
67
|
...n,
|
|
68
|
-
children:
|
|
68
|
+
children: t === "loading" ? (
|
|
69
69
|
/* One skeleton per data row, mirroring the filled row's footprint:
|
|
70
70
|
h-13 = py-2 × 2 + the size-9 actions slot that drives the row's
|
|
71
71
|
height, so nothing shifts when the content arrives. */
|
|
@@ -75,68 +75,62 @@ const N = r.forwardRef(
|
|
|
75
75
|
)
|
|
76
76
|
);
|
|
77
77
|
N.displayName = "Item";
|
|
78
|
-
const
|
|
79
|
-
({ className:
|
|
78
|
+
const b = r.forwardRef(
|
|
79
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
80
80
|
"div",
|
|
81
81
|
{
|
|
82
|
-
ref:
|
|
83
|
-
className:
|
|
82
|
+
ref: t,
|
|
83
|
+
className: s("shrink-0", e),
|
|
84
84
|
"data-slot": "item-media",
|
|
85
85
|
...a
|
|
86
86
|
}
|
|
87
87
|
)
|
|
88
88
|
);
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
({ className:
|
|
89
|
+
b.displayName = "ItemMedia";
|
|
90
|
+
const I = r.forwardRef(
|
|
91
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
92
92
|
"div",
|
|
93
93
|
{
|
|
94
|
-
ref:
|
|
95
|
-
className:
|
|
94
|
+
ref: t,
|
|
95
|
+
className: s("flex flex-1 flex-col gap-1", e),
|
|
96
96
|
"data-slot": "item-content",
|
|
97
97
|
...a
|
|
98
98
|
}
|
|
99
99
|
)
|
|
100
100
|
);
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
({ className:
|
|
101
|
+
I.displayName = "ItemContent";
|
|
102
|
+
const y = r.forwardRef(
|
|
103
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
104
104
|
"div",
|
|
105
105
|
{
|
|
106
|
-
ref:
|
|
107
|
-
className:
|
|
108
|
-
"text-foreground text-base leading-normal font-medium",
|
|
109
|
-
t
|
|
110
|
-
),
|
|
106
|
+
ref: t,
|
|
107
|
+
className: s("text-foreground text-body", e),
|
|
111
108
|
"data-slot": "item-title",
|
|
112
109
|
...a
|
|
113
110
|
}
|
|
114
111
|
)
|
|
115
112
|
);
|
|
116
|
-
|
|
117
|
-
const
|
|
118
|
-
({ className:
|
|
113
|
+
y.displayName = "ItemTitle";
|
|
114
|
+
const k = r.forwardRef(
|
|
115
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
119
116
|
"div",
|
|
120
117
|
{
|
|
121
|
-
ref:
|
|
122
|
-
className:
|
|
123
|
-
"text-muted-foreground text-sm leading-normal font-normal",
|
|
124
|
-
t
|
|
125
|
-
),
|
|
118
|
+
ref: t,
|
|
119
|
+
className: s("text-body-sm text-muted-foreground", e),
|
|
126
120
|
"data-slot": "item-description",
|
|
127
121
|
...a
|
|
128
122
|
}
|
|
129
123
|
)
|
|
130
124
|
);
|
|
131
|
-
|
|
125
|
+
k.displayName = "ItemDescription";
|
|
132
126
|
const h = r.forwardRef(
|
|
133
|
-
({ className:
|
|
127
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
134
128
|
"div",
|
|
135
129
|
{
|
|
136
|
-
ref:
|
|
137
|
-
className:
|
|
130
|
+
ref: t,
|
|
131
|
+
className: s(
|
|
138
132
|
"text-muted-foreground flex size-9 shrink-0 items-center justify-center rounded-full",
|
|
139
|
-
|
|
133
|
+
e
|
|
140
134
|
),
|
|
141
135
|
"data-slot": "item-actions",
|
|
142
136
|
...a
|
|
@@ -145,17 +139,27 @@ const h = r.forwardRef(
|
|
|
145
139
|
);
|
|
146
140
|
h.displayName = "ItemActions";
|
|
147
141
|
const w = r.forwardRef(
|
|
148
|
-
({ className:
|
|
142
|
+
({ className: e, dataHook: a, ...t }, i) => /* @__PURE__ */ o(
|
|
149
143
|
"li",
|
|
150
144
|
{
|
|
151
|
-
ref:
|
|
152
|
-
className:
|
|
153
|
-
|
|
154
|
-
|
|
145
|
+
ref: i,
|
|
146
|
+
className: s(
|
|
147
|
+
// A subheader is a caption over its group of items — the same role as a
|
|
148
|
+
// menu or sidebar group label, so text-label-sm (DS-925).
|
|
149
|
+
// Padding is deliberately asymmetric: with the old symmetric py-2 the
|
|
150
|
+
// caption sat equidistant between the previous group and its own
|
|
151
|
+
// (17px each side over the list's 8px gap), so it read as a second
|
|
152
|
+
// title rather than a label for the group below. 16px above / 4px
|
|
153
|
+
// below binds it downwards. The space above only has a job when a
|
|
154
|
+
// group precedes it, so a subheader that opens the list stays tight —
|
|
155
|
+
// that keeps compact surfaces (the Map popover, which sets gap-0
|
|
156
|
+
// inside p-3) from opening up.
|
|
157
|
+
"text-muted-foreground text-label-sm flex items-center pt-4 pr-2 pb-1 pl-4 first:pt-2",
|
|
158
|
+
e
|
|
155
159
|
),
|
|
156
160
|
"data-hook": a,
|
|
157
161
|
"data-slot": "item-subheader",
|
|
158
|
-
...
|
|
162
|
+
...t
|
|
159
163
|
}
|
|
160
164
|
)
|
|
161
165
|
);
|
|
@@ -163,11 +167,11 @@ w.displayName = "ItemSubheader";
|
|
|
163
167
|
export {
|
|
164
168
|
N as Item,
|
|
165
169
|
h as ItemActions,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
170
|
+
I as ItemContent,
|
|
171
|
+
k as ItemDescription,
|
|
172
|
+
b as ItemMedia,
|
|
169
173
|
w as ItemSubheader,
|
|
170
|
-
|
|
174
|
+
y as ItemTitle,
|
|
171
175
|
x as List,
|
|
172
176
|
g as itemVariants
|
|
173
177
|
};
|