@brightlocal/ui-components 1.4.0 → 1.4.1
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 +10 -11
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts +104 -56
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +182 -173
- package/dist/index.cjs +1 -1
- package/dist/index.js +128 -124
- package/dist/list.cjs +1 -1
- package/dist/list.d.ts +5 -0
- package/dist/list.d.ts.map +1 -1
- package/dist/list.js +62 -60
- package/package.json +1 -1
- package/src/blocks/input-list.tsx +341 -233
- package/src/components/list.tsx +32 -21
package/dist/list.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as p, Fragment as g } from "react/jsx-runtime";
|
|
2
2
|
import * as i from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Slot as u } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva as x } from "class-variance-authority";
|
|
4
5
|
import { cn as l } from "@brightlocal/ui-components/lib/utils";
|
|
5
6
|
import { Skeleton as m } from "@brightlocal/ui-components/skeleton";
|
|
6
|
-
const
|
|
7
|
+
const N = x(
|
|
7
8
|
[
|
|
8
9
|
"flex",
|
|
9
10
|
"items-center",
|
|
@@ -21,125 +22,126 @@ const u = g(
|
|
|
21
22
|
variant: {
|
|
22
23
|
filled: ["bg-card"],
|
|
23
24
|
outline: ["bg-background", "border", "border-border"],
|
|
24
|
-
loading: ["flex-col", "gap-2", "px-0", "pt-0", "pb-
|
|
25
|
+
loading: ["flex-col", "gap-2", "px-0", "pt-0", "pb-3"]
|
|
25
26
|
}
|
|
26
27
|
},
|
|
27
28
|
defaultVariants: {
|
|
28
29
|
variant: "filled"
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
|
-
),
|
|
32
|
-
({ className: e, dataHook:
|
|
32
|
+
), I = i.forwardRef(
|
|
33
|
+
({ className: e, dataHook: a, trackingEl: t, trackingLabel: r, ...s }, d) => /* @__PURE__ */ o(
|
|
33
34
|
"ul",
|
|
34
35
|
{
|
|
35
36
|
ref: d,
|
|
36
37
|
className: l("flex flex-col gap-2", e),
|
|
37
|
-
"data-hook":
|
|
38
|
+
"data-hook": a,
|
|
38
39
|
"data-slot": "list",
|
|
39
|
-
"data-tracking-el":
|
|
40
|
-
"data-tracking-label":
|
|
41
|
-
...
|
|
40
|
+
"data-tracking-el": t,
|
|
41
|
+
"data-tracking-label": r,
|
|
42
|
+
...s
|
|
42
43
|
}
|
|
43
44
|
)
|
|
44
45
|
);
|
|
45
|
-
|
|
46
|
-
const
|
|
46
|
+
I.displayName = "List";
|
|
47
|
+
const b = i.forwardRef(
|
|
47
48
|
({
|
|
48
|
-
|
|
49
|
+
asChild: e = !1,
|
|
50
|
+
className: a,
|
|
49
51
|
variant: t,
|
|
50
|
-
dataHook:
|
|
52
|
+
dataHook: r,
|
|
51
53
|
trackingEl: s,
|
|
52
|
-
trackingLabel:
|
|
53
|
-
children:
|
|
54
|
-
...
|
|
55
|
-
},
|
|
56
|
-
"li",
|
|
54
|
+
trackingLabel: d,
|
|
55
|
+
children: n,
|
|
56
|
+
...c
|
|
57
|
+
}, f) => /* @__PURE__ */ o(
|
|
58
|
+
e ? u : "li",
|
|
57
59
|
{
|
|
58
|
-
ref:
|
|
59
|
-
className: l(
|
|
60
|
-
"data-hook":
|
|
60
|
+
ref: f,
|
|
61
|
+
className: l(N({ variant: t }), a),
|
|
62
|
+
"data-hook": r,
|
|
61
63
|
"data-slot": "item",
|
|
62
64
|
"data-tracking-el": s,
|
|
63
|
-
"data-tracking-label":
|
|
64
|
-
...
|
|
65
|
-
children: t === "loading" ? /* @__PURE__ */
|
|
65
|
+
"data-tracking-label": d,
|
|
66
|
+
...c,
|
|
67
|
+
children: t === "loading" ? /* @__PURE__ */ p(g, { children: [
|
|
66
68
|
/* @__PURE__ */ o(m, { className: "h-4 w-full" }),
|
|
67
69
|
/* @__PURE__ */ o(m, { className: "h-4 w-full" })
|
|
68
|
-
] }) :
|
|
70
|
+
] }) : n
|
|
69
71
|
}
|
|
70
72
|
)
|
|
71
73
|
);
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
({ className: e, ...
|
|
74
|
+
b.displayName = "Item";
|
|
75
|
+
const k = i.forwardRef(
|
|
76
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
75
77
|
"div",
|
|
76
78
|
{
|
|
77
|
-
ref:
|
|
79
|
+
ref: t,
|
|
78
80
|
className: l("shrink-0", e),
|
|
79
81
|
"data-slot": "item-media",
|
|
80
|
-
...
|
|
82
|
+
...a
|
|
81
83
|
}
|
|
82
84
|
)
|
|
83
85
|
);
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
({ className: e, ...
|
|
86
|
+
k.displayName = "ItemMedia";
|
|
87
|
+
const w = i.forwardRef(
|
|
88
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
87
89
|
"div",
|
|
88
90
|
{
|
|
89
|
-
ref:
|
|
91
|
+
ref: t,
|
|
90
92
|
className: l("flex flex-1 flex-col gap-1", e),
|
|
91
93
|
"data-slot": "item-content",
|
|
92
|
-
...
|
|
94
|
+
...a
|
|
93
95
|
}
|
|
94
96
|
)
|
|
95
97
|
);
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
({ className: e, ...
|
|
98
|
+
w.displayName = "ItemContent";
|
|
99
|
+
const y = i.forwardRef(
|
|
100
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
99
101
|
"div",
|
|
100
102
|
{
|
|
101
|
-
ref:
|
|
103
|
+
ref: t,
|
|
102
104
|
className: l("text-foreground text-lg font-medium", e),
|
|
103
105
|
"data-slot": "item-title",
|
|
104
|
-
...
|
|
106
|
+
...a
|
|
105
107
|
}
|
|
106
108
|
)
|
|
107
109
|
);
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
({ className: e, ...
|
|
110
|
+
y.displayName = "ItemTitle";
|
|
111
|
+
const h = i.forwardRef(
|
|
112
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
111
113
|
"div",
|
|
112
114
|
{
|
|
113
|
-
ref:
|
|
115
|
+
ref: t,
|
|
114
116
|
className: l("text-muted-foreground text-base", e),
|
|
115
117
|
"data-slot": "item-description",
|
|
116
|
-
...
|
|
118
|
+
...a
|
|
117
119
|
}
|
|
118
120
|
)
|
|
119
121
|
);
|
|
120
|
-
|
|
121
|
-
const
|
|
122
|
-
({ className: e, ...
|
|
122
|
+
h.displayName = "ItemDescription";
|
|
123
|
+
const v = i.forwardRef(
|
|
124
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
123
125
|
"div",
|
|
124
126
|
{
|
|
125
|
-
ref:
|
|
127
|
+
ref: t,
|
|
126
128
|
className: l(
|
|
127
129
|
"text-muted-foreground flex size-9 shrink-0 items-center justify-center rounded-full",
|
|
128
130
|
e
|
|
129
131
|
),
|
|
130
132
|
"data-slot": "item-actions",
|
|
131
|
-
...
|
|
133
|
+
...a
|
|
132
134
|
}
|
|
133
135
|
)
|
|
134
136
|
);
|
|
135
|
-
|
|
137
|
+
v.displayName = "ItemActions";
|
|
136
138
|
export {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
139
|
+
b as Item,
|
|
140
|
+
v as ItemActions,
|
|
141
|
+
w as ItemContent,
|
|
142
|
+
h as ItemDescription,
|
|
143
|
+
k as ItemMedia,
|
|
144
|
+
y as ItemTitle,
|
|
145
|
+
I as List,
|
|
146
|
+
N as itemVariants
|
|
145
147
|
};
|