@brightlocal/ui-components 2.27.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/component-meta.json +568 -143
- package/deprecations.json +298 -1
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.d.ts +36 -0
- package/dist/accordion.d.ts.map +1 -1
- package/dist/accordion.js +74 -61
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.js +18 -18
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts +11 -1
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +31 -28
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.js +4 -4
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +15 -11
- package/dist/blocks/empty-state.cjs +1 -0
- package/dist/blocks/empty-state.d.ts +172 -0
- package/dist/blocks/empty-state.d.ts.map +1 -0
- package/dist/blocks/empty-state.js +147 -0
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +124 -108
- package/dist/blocks/progress-state.cjs +1 -0
- package/dist/blocks/{progress-screen.d.ts → progress-state.d.ts} +30 -18
- package/dist/blocks/progress-state.d.ts.map +1 -0
- package/dist/blocks/{progress-screen.js → progress-state.js} +100 -71
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +160 -161
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/button-group.cjs +1 -0
- package/dist/button-group.d.ts +36 -0
- package/dist/button-group.d.ts.map +1 -0
- package/dist/button-group.js +47 -0
- package/dist/button.cjs +1 -1
- package/dist/button.js +12 -12
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +37 -38
- package/dist/callout.cjs +1 -1
- package/dist/callout.d.ts +24 -2
- package/dist/callout.d.ts.map +1 -1
- package/dist/callout.js +57 -55
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +42 -3
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +102 -91
- package/dist/chart-empty.cjs +1 -0
- package/dist/chart-empty.d.ts +59 -0
- package/dist/chart-empty.d.ts.map +1 -0
- package/dist/chart-empty.js +29 -0
- package/dist/chart.cjs +6 -6
- package/dist/chart.d.ts +46 -13
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +172 -157
- package/dist/chip.cjs +1 -1
- package/dist/chip.d.ts +38 -4
- package/dist/chip.d.ts.map +1 -1
- package/dist/chip.js +100 -84
- package/dist/combobox.cjs +2 -2
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +81 -79
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +23 -1
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +248 -225
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.js +26 -29
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.d.ts +75 -10
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +346 -334
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.d.ts +13 -5
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +54 -53
- package/dist/description.cjs +1 -1
- package/dist/description.js +5 -5
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +20 -20
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.js +8 -11
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +17 -20
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts +8 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +96 -65
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +130 -12
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +146 -127
- package/dist/grid.cjs +1 -0
- package/dist/grid.d.ts +56 -0
- package/dist/grid.d.ts.map +1 -0
- package/dist/grid.js +32 -0
- package/dist/header.d.ts +13 -0
- package/dist/header.d.ts.map +1 -1
- package/dist/hooks/use-delayed-pending.cjs +1 -0
- package/dist/hooks/use-delayed-pending.d.ts +34 -0
- package/dist/hooks/use-delayed-pending.d.ts.map +1 -0
- package/dist/hooks/use-delayed-pending.js +17 -0
- package/dist/hooks/use-mobile.cjs +1 -0
- package/dist/hooks/use-mobile.js +8 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.js +13 -13
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +554 -527
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.js +25 -25
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.js +9 -9
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +9 -9
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.d.ts +17 -9
- package/dist/input-password.d.ts.map +1 -1
- package/dist/input-password.js +73 -72
- package/dist/input.cjs +1 -1
- package/dist/input.js +9 -9
- package/dist/label.cjs +1 -1
- package/dist/label.d.ts.map +1 -1
- package/dist/label.js +25 -28
- package/dist/lib/block-illustration.cjs +1 -0
- package/dist/lib/block-illustration.d.ts +28 -0
- package/dist/lib/block-illustration.d.ts.map +1 -0
- package/dist/lib/block-illustration.js +21 -0
- package/dist/lib/empty-canvas.cjs +1 -0
- package/dist/lib/empty-canvas.d.ts +27 -0
- package/dist/lib/empty-canvas.d.ts.map +1 -0
- package/dist/lib/empty-canvas.js +62 -0
- package/dist/lib/empty-chip.cjs +1 -0
- package/dist/lib/empty-chip.d.ts +4 -0
- package/dist/lib/empty-chip.d.ts.map +1 -0
- package/dist/lib/empty-chip.js +13 -0
- package/dist/lib/optical-center.cjs +1 -0
- package/dist/lib/optical-center.d.ts +12 -0
- package/dist/lib/optical-center.d.ts.map +1 -0
- package/dist/lib/optical-center.js +11 -0
- package/dist/lib/utils.cjs +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +28 -5
- package/dist/list.cjs +1 -1
- package/dist/list.d.ts.map +1 -1
- package/dist/list.js +62 -58
- package/dist/map.cjs +1 -1
- package/dist/map.d.ts +60 -2
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +187 -164
- package/dist/media-empty.cjs +1 -0
- package/dist/media-empty.d.ts +72 -0
- package/dist/media-empty.d.ts.map +1 -0
- package/dist/media-empty.js +45 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +17 -20
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.js +7 -7
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +130 -1
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +193 -102
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +2 -26
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +79 -118
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.d.ts +15 -6
- package/dist/scroll-area.d.ts.map +1 -1
- package/dist/scroll-area.js +38 -36
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts +13 -2
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +92 -87
- package/dist/separator.cjs +1 -1
- package/dist/separator.js +8 -8
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +38 -3
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +43 -20
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.js +26 -26
- package/dist/stepper.cjs +1 -1
- package/dist/stepper.js +40 -40
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +31 -28
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text-reveal-motion.d.ts +10 -0
- package/dist/text-reveal-motion.d.ts.map +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +11 -11
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.js +8 -8
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +8 -8
- package/dist/typography-heading.cjs +1 -0
- package/dist/typography-heading.d.ts +129 -0
- package/dist/typography-heading.d.ts.map +1 -0
- package/dist/typography-heading.js +95 -0
- package/dist/typography-text.cjs +1 -0
- package/dist/typography-text.d.ts +127 -0
- package/dist/typography-text.d.ts.map +1 -0
- package/dist/typography-text.js +92 -0
- package/dist/typography.d.ts +13 -0
- package/dist/typography.d.ts.map +1 -1
- package/package.json +35 -7
- package/src/blocks/empty-state.tsx +412 -0
- package/src/blocks/input-list.tsx +66 -36
- package/src/blocks/{progress-screen.tsx → progress-state.tsx} +154 -93
- package/src/blocks/sidebar.tsx +25 -26
- package/src/components/accordion.tsx +82 -27
- package/src/components/alert-dialog.tsx +2 -2
- package/src/components/alert.tsx +27 -13
- package/src/components/avatar.tsx +1 -1
- package/src/components/badge.tsx +8 -4
- package/src/components/breadcrumb.tsx +1 -1
- package/src/components/button-group.tsx +112 -0
- package/src/components/button.tsx +4 -4
- package/src/components/calendar.tsx +5 -6
- package/src/components/callout.tsx +48 -15
- package/src/components/card.tsx +89 -19
- package/src/components/chart-empty.tsx +116 -0
- package/src/components/chart.tsx +103 -32
- package/src/components/chip.tsx +88 -13
- package/src/components/combobox.tsx +12 -10
- package/src/components/command.tsx +64 -13
- package/src/components/context-menu.tsx +6 -9
- package/src/components/data-table.tsx +135 -20
- package/src/components/date-picker.tsx +18 -7
- package/src/components/description.tsx +1 -1
- package/src/components/dialog.tsx +2 -2
- package/src/components/drawer.tsx +2 -5
- package/src/components/dropdown-menu.tsx +8 -11
- package/src/components/field.tsx +89 -16
- package/src/components/global-layout.tsx +210 -39
- package/src/components/grid.tsx +130 -0
- package/src/components/header.tsx +13 -0
- package/src/components/hover-card.tsx +1 -1
- package/src/components/input-chip.tsx +1 -1
- package/src/components/input-group.tsx +1 -1
- package/src/components/input-otp.tsx +1 -1
- package/src/components/input-password.tsx +24 -12
- package/src/components/input.tsx +1 -1
- package/src/components/label.tsx +10 -13
- package/src/components/list.tsx +13 -9
- package/src/components/map.tsx +101 -5
- package/src/components/media-empty.tsx +156 -0
- package/src/components/menubar.tsx +7 -10
- package/src/components/navigation-menu.tsx +1 -1
- package/src/components/pagination.tsx +286 -1
- package/src/components/progress.tsx +35 -113
- package/src/components/scroll-area.tsx +23 -10
- package/src/components/select.tsx +35 -10
- package/src/components/separator.tsx +1 -1
- package/src/components/sheet.tsx +2 -2
- package/src/components/skeleton.tsx +78 -7
- package/src/components/sonner.tsx +2 -2
- package/src/components/stepper.tsx +3 -3
- package/src/components/table.tsx +6 -3
- package/src/components/tabs.tsx +1 -1
- package/src/components/text-reveal-motion.tsx +10 -0
- package/src/components/textarea.tsx +1 -1
- package/src/components/toggle.tsx +1 -1
- package/src/components/tooltip.tsx +1 -1
- package/src/components/typography-heading.tsx +253 -0
- package/src/components/typography-text.tsx +250 -0
- package/src/components/typography.tsx +13 -0
- package/src/hooks/use-delayed-pending.ts +60 -0
- package/src/index.ts +11 -1
- package/src/lib/block-illustration.tsx +88 -0
- package/src/lib/empty-canvas.tsx +128 -0
- package/src/lib/empty-chip.ts +24 -0
- package/src/lib/optical-center.tsx +45 -0
- package/src/lib/utils.ts +26 -0
- package/dist/blocks/progress-screen.cjs +0 -1
- package/dist/blocks/progress-screen.d.ts.map +0 -1
package/dist/input-password.js
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as o, jsxs as H } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import { EyeOff as
|
|
4
|
-
import { Progress as
|
|
3
|
+
import { EyeOff as L, Eye as R } from "@brightlocal/icons";
|
|
4
|
+
import { Progress as j } from "@brightlocal/ui-components/progress";
|
|
5
5
|
import { cn as x } from "@brightlocal/ui-components/lib/utils";
|
|
6
|
-
import { InputGroup as
|
|
7
|
-
const
|
|
6
|
+
import { InputGroup as M, InputGroupInput as O, InputGroupAddon as Z, InputGroupButton as V } from "@brightlocal/ui-components/input-group";
|
|
7
|
+
const _ = {
|
|
8
8
|
meter: { label: "Meter", value: 0, color: "bg-green-500" },
|
|
9
9
|
weak: { label: "Weak", value: 25, color: "bg-green-500" },
|
|
10
10
|
ok: { label: "Ok", value: 50, color: "bg-green-500" },
|
|
11
11
|
good: { label: "Good", value: 75, color: "bg-green-500" },
|
|
12
12
|
great: { label: "Great", value: 100, color: "bg-green-500" }
|
|
13
13
|
};
|
|
14
|
-
function
|
|
15
|
-
if (!
|
|
14
|
+
function B(e) {
|
|
15
|
+
if (!e || e.length === 0)
|
|
16
16
|
return "meter";
|
|
17
|
-
if (
|
|
17
|
+
if (e.length < 12)
|
|
18
18
|
return "weak";
|
|
19
|
-
let
|
|
20
|
-
return
|
|
19
|
+
let t = 0;
|
|
20
|
+
return e.length >= 16 && (t += 1), /[a-z]/.test(e) && (t += 1), /[A-Z]/.test(e) && (t += 1), /[0-9]/.test(e) && (t += 1), /[^a-zA-Z0-9]/.test(e) && (t += 1), t <= 1 ? "ok" : t <= 3 ? "good" : "great";
|
|
21
21
|
}
|
|
22
22
|
const A = s.createContext(null);
|
|
23
23
|
function S() {
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
24
|
+
const e = s.useContext(A);
|
|
25
|
+
if (!e)
|
|
26
26
|
throw new Error(
|
|
27
|
-
"InputPassword compound components must be used within
|
|
27
|
+
"InputPassword compound components must be used within InputPassword"
|
|
28
28
|
);
|
|
29
|
-
return
|
|
29
|
+
return e;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
children:
|
|
33
|
-
dataHook:
|
|
34
|
-
trackingEl:
|
|
31
|
+
function $({
|
|
32
|
+
children: e,
|
|
33
|
+
dataHook: t,
|
|
34
|
+
trackingEl: n,
|
|
35
35
|
trackingLabel: d,
|
|
36
36
|
disabled: l,
|
|
37
37
|
value: r,
|
|
38
|
-
onChange:
|
|
38
|
+
onChange: a,
|
|
39
39
|
onStrengthChange: i,
|
|
40
40
|
strengthLevels: g,
|
|
41
41
|
calculateStrength: p,
|
|
42
42
|
error: c,
|
|
43
43
|
id: h,
|
|
44
|
-
className:
|
|
44
|
+
className: w
|
|
45
45
|
}) {
|
|
46
|
-
const [
|
|
46
|
+
const [m, f] = s.useState(!1), [P, v] = s.useState(""), [k, b] = s.useState("meter"), z = s.useId(), y = h || z, I = r !== void 0 ? r : P, N = g ?? _, C = p ?? B, E = s.useCallback(
|
|
47
47
|
(u) => {
|
|
48
|
-
r === void 0 && v(u),
|
|
48
|
+
r === void 0 && v(u), a?.(u);
|
|
49
49
|
},
|
|
50
|
-
[r,
|
|
50
|
+
[r, a]
|
|
51
51
|
), G = s.useCallback(() => {
|
|
52
52
|
f((u) => !u);
|
|
53
53
|
}, []);
|
|
54
54
|
s.useEffect(() => {
|
|
55
55
|
const u = setTimeout(() => {
|
|
56
|
-
const
|
|
57
|
-
b(
|
|
56
|
+
const T = C(I);
|
|
57
|
+
b(T), i?.(T);
|
|
58
58
|
}, 180);
|
|
59
59
|
return () => clearTimeout(u);
|
|
60
60
|
}, [I, C, i]);
|
|
61
|
-
const
|
|
61
|
+
const F = s.useMemo(
|
|
62
62
|
() => ({
|
|
63
|
-
showPassword:
|
|
63
|
+
showPassword: m,
|
|
64
64
|
setShowPassword: f,
|
|
65
65
|
toggleVisibility: G,
|
|
66
66
|
password: I,
|
|
@@ -68,80 +68,80 @@ function B({
|
|
|
68
68
|
strength: k,
|
|
69
69
|
strengthLevels: N,
|
|
70
70
|
disabled: l,
|
|
71
|
-
dataHook:
|
|
72
|
-
trackingEl:
|
|
71
|
+
dataHook: t,
|
|
72
|
+
trackingEl: n,
|
|
73
73
|
trackingLabel: d,
|
|
74
74
|
inputId: y,
|
|
75
75
|
error: c
|
|
76
76
|
}),
|
|
77
77
|
[
|
|
78
|
-
|
|
78
|
+
m,
|
|
79
79
|
G,
|
|
80
80
|
I,
|
|
81
81
|
E,
|
|
82
82
|
k,
|
|
83
83
|
N,
|
|
84
84
|
l,
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
t,
|
|
86
|
+
n,
|
|
87
87
|
d,
|
|
88
88
|
y,
|
|
89
89
|
c
|
|
90
90
|
]
|
|
91
91
|
);
|
|
92
|
-
return /* @__PURE__ */ o(A.Provider, { value:
|
|
92
|
+
return /* @__PURE__ */ o(A.Provider, { value: F, children: /* @__PURE__ */ o(
|
|
93
93
|
"div",
|
|
94
94
|
{
|
|
95
|
-
className: x("w-full",
|
|
96
|
-
"data-hook":
|
|
95
|
+
className: x("w-full", w),
|
|
96
|
+
"data-hook": t,
|
|
97
97
|
"data-slot": "input-password",
|
|
98
|
-
children:
|
|
98
|
+
children: e
|
|
99
99
|
}
|
|
100
100
|
) });
|
|
101
101
|
}
|
|
102
|
-
|
|
103
|
-
const D = s.forwardRef(
|
|
104
|
-
({ className:
|
|
102
|
+
$.displayName = "InputPassword";
|
|
103
|
+
const Y = $, D = s.forwardRef(
|
|
104
|
+
({ className: e, groupClassName: t, onChange: n, showLabel: d, hideLabel: l, ...r }, a) => {
|
|
105
105
|
const {
|
|
106
106
|
showPassword: i,
|
|
107
107
|
toggleVisibility: g,
|
|
108
108
|
password: p,
|
|
109
109
|
setPassword: c,
|
|
110
110
|
disabled: h,
|
|
111
|
-
dataHook:
|
|
112
|
-
trackingEl:
|
|
111
|
+
dataHook: w,
|
|
112
|
+
trackingEl: m,
|
|
113
113
|
trackingLabel: f,
|
|
114
114
|
inputId: P,
|
|
115
115
|
error: v
|
|
116
116
|
} = S();
|
|
117
|
-
return /* @__PURE__ */
|
|
117
|
+
return /* @__PURE__ */ H(M, { className: t, dataHook: w, error: v, children: [
|
|
118
118
|
/* @__PURE__ */ o(
|
|
119
|
-
|
|
119
|
+
O,
|
|
120
120
|
{
|
|
121
|
-
ref:
|
|
122
|
-
className:
|
|
121
|
+
ref: a,
|
|
122
|
+
className: e,
|
|
123
123
|
disabled: h,
|
|
124
124
|
id: P,
|
|
125
|
-
trackingEl:
|
|
125
|
+
trackingEl: m,
|
|
126
126
|
trackingLabel: f,
|
|
127
127
|
type: i ? "text" : "password",
|
|
128
128
|
value: p,
|
|
129
129
|
onChange: (b) => {
|
|
130
|
-
c(b.target.value),
|
|
130
|
+
c(b.target.value), n?.(b);
|
|
131
131
|
},
|
|
132
132
|
...r
|
|
133
133
|
}
|
|
134
134
|
),
|
|
135
|
-
/* @__PURE__ */ o(
|
|
135
|
+
/* @__PURE__ */ o(Z, { align: "inline-end", children: /* @__PURE__ */ o(
|
|
136
136
|
V,
|
|
137
137
|
{
|
|
138
138
|
"aria-label": i ? l ?? "Hide password" : d ?? "Show password",
|
|
139
|
-
"data-hook": `${
|
|
139
|
+
"data-hook": `${w}-toggle`,
|
|
140
140
|
disabled: h,
|
|
141
141
|
size: "icon-sm",
|
|
142
142
|
variant: "ghost",
|
|
143
143
|
onClick: g,
|
|
144
|
-
children: i ? /* @__PURE__ */ o(
|
|
144
|
+
children: i ? /* @__PURE__ */ o(L, {}) : /* @__PURE__ */ o(R, {})
|
|
145
145
|
}
|
|
146
146
|
) })
|
|
147
147
|
] });
|
|
@@ -150,67 +150,68 @@ const D = s.forwardRef(
|
|
|
150
150
|
D.displayName = "InputPasswordField";
|
|
151
151
|
const U = s.forwardRef(
|
|
152
152
|
({
|
|
153
|
-
className:
|
|
154
|
-
showLabel:
|
|
155
|
-
hideLabel:
|
|
153
|
+
className: e,
|
|
154
|
+
showLabel: t,
|
|
155
|
+
hideLabel: n,
|
|
156
156
|
size: d = "icon",
|
|
157
157
|
variant: l = "ghost",
|
|
158
158
|
...r
|
|
159
|
-
},
|
|
159
|
+
}, a) => {
|
|
160
160
|
const { showPassword: i, toggleVisibility: g, disabled: p, dataHook: c } = S();
|
|
161
161
|
return /* @__PURE__ */ o(
|
|
162
162
|
V,
|
|
163
163
|
{
|
|
164
|
-
ref:
|
|
165
|
-
"aria-label": i ?
|
|
166
|
-
className:
|
|
164
|
+
ref: a,
|
|
165
|
+
"aria-label": i ? n ?? "Hide password" : t ?? "Show password",
|
|
166
|
+
className: e,
|
|
167
167
|
"data-hook": `${c}-toggle`,
|
|
168
168
|
disabled: p,
|
|
169
169
|
size: d,
|
|
170
170
|
variant: l,
|
|
171
171
|
onClick: g,
|
|
172
172
|
...r,
|
|
173
|
-
children: i ? /* @__PURE__ */ o(
|
|
173
|
+
children: i ? /* @__PURE__ */ o(L, {}) : /* @__PURE__ */ o(R, {})
|
|
174
174
|
}
|
|
175
175
|
);
|
|
176
176
|
}
|
|
177
177
|
);
|
|
178
178
|
U.displayName = "InputPasswordToggle";
|
|
179
179
|
function W({
|
|
180
|
-
className:
|
|
181
|
-
showLabel:
|
|
180
|
+
className: e,
|
|
181
|
+
showLabel: t = !0
|
|
182
182
|
}) {
|
|
183
|
-
const { strength:
|
|
184
|
-
label:
|
|
183
|
+
const { strength: n, strengthLevels: d, dataHook: l, disabled: r } = S(), a = d[n] ?? {
|
|
184
|
+
label: n,
|
|
185
185
|
value: 0,
|
|
186
186
|
color: "bg-muted"
|
|
187
187
|
};
|
|
188
|
-
return /* @__PURE__ */ o("div", { className: x("mt-1 space-y-2",
|
|
188
|
+
return /* @__PURE__ */ o("div", { className: x("mt-1 space-y-2", e), children: /* @__PURE__ */ H("div", { className: x("flex items-center gap-2", r && "opacity-50"), children: [
|
|
189
189
|
/* @__PURE__ */ o(
|
|
190
|
-
|
|
190
|
+
j,
|
|
191
191
|
{
|
|
192
192
|
className: "h-2 flex-1",
|
|
193
193
|
dataHook: `${l}-strength-progress`,
|
|
194
|
-
indicatorClassName:
|
|
195
|
-
value:
|
|
194
|
+
indicatorClassName: a.color,
|
|
195
|
+
value: a.value
|
|
196
196
|
}
|
|
197
197
|
),
|
|
198
|
-
|
|
198
|
+
t && /* @__PURE__ */ o(
|
|
199
199
|
"span",
|
|
200
200
|
{
|
|
201
|
-
className: "text-foreground w-10 shrink-0 text-right
|
|
201
|
+
className: "text-foreground text-label w-10 shrink-0 text-right whitespace-nowrap",
|
|
202
202
|
"data-hook": `${l}-strength-label`,
|
|
203
|
-
children:
|
|
203
|
+
children: a.label
|
|
204
204
|
}
|
|
205
205
|
)
|
|
206
206
|
] }) });
|
|
207
207
|
}
|
|
208
208
|
W.displayName = "InputPasswordStrength";
|
|
209
209
|
export {
|
|
210
|
-
|
|
210
|
+
_ as DEFAULT_STRENGTH_LEVELS,
|
|
211
|
+
$ as InputPassword,
|
|
211
212
|
D as InputPasswordField,
|
|
212
|
-
|
|
213
|
+
Y as InputPasswordRoot,
|
|
213
214
|
W as InputPasswordStrength,
|
|
214
215
|
U as InputPasswordToggle,
|
|
215
|
-
|
|
216
|
+
B as calculatePasswordStrength
|
|
216
217
|
};
|
package/dist/input.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),b=require("react"),p=require("class-variance-authority"),v=require("@brightlocal/ui-components/lib/utils");function g(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const h=g(b),n=p.cva(["flex w-full min-w-0 h-9","border border-input bg-background rounded-sm","outline-none transition-[border-color,box-shadow,background-color] duration-fast ease-out","text-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),b=require("react"),p=require("class-variance-authority"),v=require("@brightlocal/ui-components/lib/utils");function g(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const h=g(b),n=p.cva(["flex w-full min-w-0 h-9","border border-input bg-background rounded-sm","outline-none transition-[border-color,box-shadow,background-color] duration-fast ease-out","text-body","text-foreground","overflow-hidden text-ellipsis","focus-visible:outline-none focus-visible:border-ring focus-visible:bg-background","focus-visible:shadow-default","disabled:cursor-not-allowed disabled:opacity-50","placeholder:text-muted-foreground","placeholder:overflow-hidden placeholder:text-ellipsis","items-center px-3","[&::-webkit-calendar-picker-indicator]:hidden"],{variants:{hasIcon:{true:"pl-9",false:""},hasSecondaryIcon:{true:"pr-9",false:""}},defaultVariants:{hasIcon:!1,hasSecondaryIcon:!1}}),s=h.forwardRef(({className:e,hasIcon:r=!1,hasSecondaryIcon:t=!1,dataHook:a,error:l,trackingEl:c,trackingLabel:d,...o},u)=>{const i=l||o["aria-invalid"]===!0||o["aria-invalid"]==="true";return f.jsx("input",{ref:u,"aria-invalid":i?"true":void 0,className:v.cn(n({hasIcon:r,hasSecondaryIcon:t}),i&&"border-destructive-40 focus-visible:border-destructive-40 focus-visible:shadow-destructive",e),"data-hook":a,"data-slot":"input","data-tracking-el":c,"data-tracking-label":d,...o})});s.displayName="Input";exports.Input=s;exports.inputVariants=n;
|
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("class-variance-authority"),t=e.cva("bg-muted text-muted-foreground flex size-10 items-center justify-center rounded-full",{variants:{align:{center:"",left:"shrink-0"}},defaultVariants:{align:"center"}});exports.emptyChipStyles=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-chip.d.ts","sourceRoot":"","sources":["../../src/lib/empty-chip.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,eAAe;;8EAQ3B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { cva as e } from "class-variance-authority";
|
|
2
|
+
const r = e(
|
|
3
|
+
"bg-muted text-muted-foreground flex size-10 items-center justify-center rounded-full",
|
|
4
|
+
{
|
|
5
|
+
variants: {
|
|
6
|
+
align: { center: "", left: "shrink-0" }
|
|
7
|
+
},
|
|
8
|
+
defaultVariants: { align: "center" }
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
export {
|
|
12
|
+
r as emptyChipStyles
|
|
13
|
+
};
|
|
@@ -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"}
|