@brightlocal/ui-components 0.4.0 → 0.5.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 +2 -1
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.js +2 -2
- package/dist/alert.cjs +1 -1
- package/dist/alert.js +64 -64
- package/dist/blocks/data-table.cjs +1 -1
- package/dist/blocks/data-table.js +47 -47
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +27 -26
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +34 -34
- package/dist/button.cjs +1 -1
- package/dist/button.d.ts.map +1 -1
- package/dist/button.js +58 -57
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +19 -37
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +5 -0
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +49 -36
- package/dist/centred-layout.cjs +1 -1
- package/dist/centred-layout.d.ts +3 -8
- package/dist/centred-layout.d.ts.map +1 -1
- package/dist/centred-layout.js +33 -48
- package/dist/chart.cjs +2 -2
- package/dist/chart.d.ts +3 -1
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +21 -21
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +9 -9
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.d.ts +6 -1
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +126 -116
- package/dist/command.cjs +1 -1
- package/dist/command.js +35 -35
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.js +3 -3
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.js +7 -7
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +22 -22
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +47 -52
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +50 -49
- 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 +334 -319
- package/dist/input-chip.d.ts.map +1 -1
- package/dist/input-chip.js +18 -25
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.js +10 -10
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +6 -6
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.d.ts.map +1 -1
- package/dist/input-password.js +56 -56
- package/dist/input.cjs +1 -1
- package/dist/input.js +9 -9
- package/dist/label.cjs +1 -1
- package/dist/label.js +1 -1
- package/dist/link.cjs +1 -1
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js +1 -8
- package/dist/logo.cjs +1 -1
- package/dist/logo.d.ts.map +1 -1
- package/dist/logo.js +30 -17
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.js +13 -13
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.d.ts.map +1 -1
- package/dist/navigation-menu.js +2 -1
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +28 -28
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +3 -3
- package/dist/rating.cjs +1 -1
- package/dist/rating.js +8 -8
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.d.ts +1 -1
- package/dist/resizable.js +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.d.ts +1 -1
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +40 -44
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +1 -1
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +19 -19
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.js +1 -1
- package/dist/switch.cjs +1 -1
- package/dist/switch.js +28 -28
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.js +10 -12
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.js +9 -9
- package/dist/typography.cjs +1 -0
- package/dist/typography.d.ts +176 -0
- package/dist/typography.d.ts.map +1 -0
- package/dist/typography.js +331 -0
- package/package.json +2 -2
- package/src/blocks/data-table.tsx +10 -10
- package/src/blocks/sidebar.tsx +16 -15
- package/src/components/accordion.tsx +2 -2
- package/src/components/alert.tsx +10 -10
- package/src/components/breadcrumb.tsx +3 -3
- package/src/components/button.tsx +7 -7
- package/src/components/calendar.tsx +4 -19
- package/src/components/card.tsx +24 -1
- package/src/components/centred-layout.tsx +6 -29
- package/src/components/chart.tsx +5 -5
- package/src/components/checkbox.tsx +3 -3
- package/src/components/combobox.tsx +20 -8
- package/src/components/command.tsx +5 -5
- package/src/components/context-menu.tsx +3 -3
- package/src/components/date-picker.tsx +1 -1
- package/src/components/dialog.tsx +3 -3
- package/src/components/dropdown-menu.tsx +7 -12
- package/src/components/field.tsx +36 -33
- package/src/components/input-chip.tsx +1 -4
- package/src/components/input-group.tsx +1 -1
- package/src/components/input-otp.tsx +3 -3
- package/src/components/input-password.tsx +2 -10
- package/src/components/input.tsx +1 -1
- package/src/components/label.tsx +1 -1
- package/src/components/link.tsx +1 -5
- package/src/components/logo.tsx +16 -9
- package/src/components/menubar.tsx +3 -3
- package/src/components/navigation-menu.tsx +2 -1
- package/src/components/pagination.tsx +4 -8
- package/src/components/radio-group.tsx +2 -2
- package/src/components/rating.tsx +2 -2
- package/src/components/resizable.tsx +1 -1
- package/src/components/select.tsx +8 -12
- package/src/components/sheet.tsx +5 -5
- package/src/components/sonner.tsx +1 -1
- package/src/components/switch.tsx +1 -1
- package/src/components/tabs.tsx +0 -2
- package/src/components/toggle.tsx +1 -1
- package/src/components/typography.tsx +678 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import { Slot as p } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva as g } from "class-variance-authority";
|
|
5
|
+
import { cn as c } from "@brightlocal/ui-components/lib/utils";
|
|
6
|
+
const i = g(
|
|
7
|
+
"self-stretch text-foreground text-4xl font-extrabold font-sans leading-10 lg:text-5xl lg:font-medium lg:font-display lg:leading-12"
|
|
8
|
+
), y = d.forwardRef(
|
|
9
|
+
({
|
|
10
|
+
className: a,
|
|
11
|
+
asChild: t = !1,
|
|
12
|
+
dataHook: o,
|
|
13
|
+
trackingEl: e,
|
|
14
|
+
trackingLabel: r,
|
|
15
|
+
...n
|
|
16
|
+
}, s) => /* @__PURE__ */ l(
|
|
17
|
+
t ? p : "h1",
|
|
18
|
+
{
|
|
19
|
+
ref: s,
|
|
20
|
+
className: c(i(), a),
|
|
21
|
+
"data-hook": o,
|
|
22
|
+
"data-slot": "typography-h1",
|
|
23
|
+
"data-tracking-el": e,
|
|
24
|
+
"data-tracking-label": r,
|
|
25
|
+
...n
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
);
|
|
29
|
+
y.displayName = "TypographyH1";
|
|
30
|
+
const f = g(
|
|
31
|
+
"text-foreground text-3xl font-semibold font-sans leading-9"
|
|
32
|
+
), h = d.forwardRef(
|
|
33
|
+
({
|
|
34
|
+
className: a,
|
|
35
|
+
asChild: t = !1,
|
|
36
|
+
dataHook: o,
|
|
37
|
+
trackingEl: e,
|
|
38
|
+
trackingLabel: r,
|
|
39
|
+
...n
|
|
40
|
+
}, s) => /* @__PURE__ */ l(
|
|
41
|
+
t ? p : "h2",
|
|
42
|
+
{
|
|
43
|
+
ref: s,
|
|
44
|
+
className: c(f(), a),
|
|
45
|
+
"data-hook": o,
|
|
46
|
+
"data-slot": "typography-h2",
|
|
47
|
+
"data-tracking-el": e,
|
|
48
|
+
"data-tracking-label": r,
|
|
49
|
+
...n
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
);
|
|
53
|
+
h.displayName = "TypographyH2";
|
|
54
|
+
const u = g(
|
|
55
|
+
"text-foreground text-2xl font-semibold font-sans leading-8"
|
|
56
|
+
), k = d.forwardRef(
|
|
57
|
+
({
|
|
58
|
+
className: a,
|
|
59
|
+
asChild: t = !1,
|
|
60
|
+
dataHook: o,
|
|
61
|
+
trackingEl: e,
|
|
62
|
+
trackingLabel: r,
|
|
63
|
+
...n
|
|
64
|
+
}, s) => /* @__PURE__ */ l(
|
|
65
|
+
t ? p : "h3",
|
|
66
|
+
{
|
|
67
|
+
ref: s,
|
|
68
|
+
className: c(u(), a),
|
|
69
|
+
"data-hook": o,
|
|
70
|
+
"data-slot": "typography-h3",
|
|
71
|
+
"data-tracking-el": e,
|
|
72
|
+
"data-tracking-label": r,
|
|
73
|
+
...n
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
);
|
|
77
|
+
k.displayName = "TypographyH3";
|
|
78
|
+
const x = g(
|
|
79
|
+
"text-foreground text-xl font-semibold font-sans leading-7"
|
|
80
|
+
), b = d.forwardRef(
|
|
81
|
+
({
|
|
82
|
+
className: a,
|
|
83
|
+
asChild: t = !1,
|
|
84
|
+
dataHook: o,
|
|
85
|
+
trackingEl: e,
|
|
86
|
+
trackingLabel: r,
|
|
87
|
+
...n
|
|
88
|
+
}, s) => /* @__PURE__ */ l(
|
|
89
|
+
t ? p : "h4",
|
|
90
|
+
{
|
|
91
|
+
ref: s,
|
|
92
|
+
className: c(x(), a),
|
|
93
|
+
"data-hook": o,
|
|
94
|
+
"data-slot": "typography-h4",
|
|
95
|
+
"data-tracking-el": e,
|
|
96
|
+
"data-tracking-label": r,
|
|
97
|
+
...n
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
);
|
|
101
|
+
b.displayName = "TypographyH4";
|
|
102
|
+
const C = g("text-foreground text-base font-normal font-sans"), N = d.forwardRef(
|
|
103
|
+
({
|
|
104
|
+
className: a,
|
|
105
|
+
asChild: t = !1,
|
|
106
|
+
dataHook: o,
|
|
107
|
+
trackingEl: e,
|
|
108
|
+
trackingLabel: r,
|
|
109
|
+
...n
|
|
110
|
+
}, s) => /* @__PURE__ */ l(
|
|
111
|
+
t ? p : "p",
|
|
112
|
+
{
|
|
113
|
+
ref: s,
|
|
114
|
+
className: c(C(), a),
|
|
115
|
+
"data-hook": o,
|
|
116
|
+
"data-slot": "typography-p",
|
|
117
|
+
"data-tracking-el": e,
|
|
118
|
+
"data-tracking-label": r,
|
|
119
|
+
...n
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
);
|
|
123
|
+
N.displayName = "TypographyP";
|
|
124
|
+
const T = g(
|
|
125
|
+
"mt-6 border-l-2 pl-6 text-foreground text-base font-normal font-sans"
|
|
126
|
+
), w = d.forwardRef(
|
|
127
|
+
({
|
|
128
|
+
className: a,
|
|
129
|
+
asChild: t = !1,
|
|
130
|
+
dataHook: o,
|
|
131
|
+
trackingEl: e,
|
|
132
|
+
trackingLabel: r,
|
|
133
|
+
...n
|
|
134
|
+
}, s) => /* @__PURE__ */ l(
|
|
135
|
+
t ? p : "blockquote",
|
|
136
|
+
{
|
|
137
|
+
ref: s,
|
|
138
|
+
className: c(T(), a),
|
|
139
|
+
"data-hook": o,
|
|
140
|
+
"data-slot": "typography-blockquote",
|
|
141
|
+
"data-tracking-el": e,
|
|
142
|
+
"data-tracking-label": r,
|
|
143
|
+
...n
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
);
|
|
147
|
+
w.displayName = "TypographyBlockquote";
|
|
148
|
+
const R = g(
|
|
149
|
+
"self-stretch ml-6 list-disc text-foreground text-base font-normal font-sans leading-6"
|
|
150
|
+
), V = d.forwardRef(
|
|
151
|
+
({
|
|
152
|
+
className: a,
|
|
153
|
+
asChild: t = !1,
|
|
154
|
+
dataHook: o,
|
|
155
|
+
trackingEl: e,
|
|
156
|
+
trackingLabel: r,
|
|
157
|
+
...n
|
|
158
|
+
}, s) => /* @__PURE__ */ l(
|
|
159
|
+
t ? p : "ul",
|
|
160
|
+
{
|
|
161
|
+
ref: s,
|
|
162
|
+
className: c(R(), a),
|
|
163
|
+
"data-hook": o,
|
|
164
|
+
"data-slot": "typography-list",
|
|
165
|
+
"data-tracking-el": e,
|
|
166
|
+
"data-tracking-label": r,
|
|
167
|
+
...n
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
);
|
|
171
|
+
V.displayName = "TypographyList";
|
|
172
|
+
const H = g(
|
|
173
|
+
"inline-flex justify-center items-center gap-2 bg-muted rounded-md px-[4.80px] py-[3.20px] text-foreground text-sm font-normal font-mono leading-5"
|
|
174
|
+
), L = d.forwardRef(
|
|
175
|
+
({
|
|
176
|
+
className: a,
|
|
177
|
+
asChild: t = !1,
|
|
178
|
+
dataHook: o,
|
|
179
|
+
trackingEl: e,
|
|
180
|
+
trackingLabel: r,
|
|
181
|
+
...n
|
|
182
|
+
}, s) => /* @__PURE__ */ l(
|
|
183
|
+
t ? p : "code",
|
|
184
|
+
{
|
|
185
|
+
ref: s,
|
|
186
|
+
className: c(H(), a),
|
|
187
|
+
"data-hook": o,
|
|
188
|
+
"data-slot": "typography-inline-code",
|
|
189
|
+
"data-tracking-el": e,
|
|
190
|
+
"data-tracking-label": r,
|
|
191
|
+
...n
|
|
192
|
+
}
|
|
193
|
+
)
|
|
194
|
+
);
|
|
195
|
+
L.displayName = "TypographyInlineCode";
|
|
196
|
+
const q = g(
|
|
197
|
+
"block w-full p-4 bg-zinc-900 rounded-lg border border-border text-white/50 text-base font-normal font-mono leading-6 overflow-x-auto"
|
|
198
|
+
), v = d.forwardRef(
|
|
199
|
+
({
|
|
200
|
+
className: a,
|
|
201
|
+
asChild: t = !1,
|
|
202
|
+
dataHook: o,
|
|
203
|
+
trackingEl: e,
|
|
204
|
+
trackingLabel: r,
|
|
205
|
+
...n
|
|
206
|
+
}, s) => /* @__PURE__ */ l(
|
|
207
|
+
t ? p : "pre",
|
|
208
|
+
{
|
|
209
|
+
ref: s,
|
|
210
|
+
className: c(q(), a),
|
|
211
|
+
"data-hook": o,
|
|
212
|
+
"data-slot": "typography-code",
|
|
213
|
+
"data-tracking-el": e,
|
|
214
|
+
"data-tracking-label": r,
|
|
215
|
+
...n
|
|
216
|
+
}
|
|
217
|
+
)
|
|
218
|
+
);
|
|
219
|
+
v.displayName = "TypographyCode";
|
|
220
|
+
const S = g(
|
|
221
|
+
"text-muted-foreground text-xl font-normal font-sans leading-7"
|
|
222
|
+
), j = d.forwardRef(
|
|
223
|
+
({
|
|
224
|
+
className: a,
|
|
225
|
+
asChild: t = !1,
|
|
226
|
+
dataHook: o,
|
|
227
|
+
trackingEl: e,
|
|
228
|
+
trackingLabel: r,
|
|
229
|
+
...n
|
|
230
|
+
}, s) => /* @__PURE__ */ l(
|
|
231
|
+
t ? p : "p",
|
|
232
|
+
{
|
|
233
|
+
ref: s,
|
|
234
|
+
className: c(S(), a),
|
|
235
|
+
"data-hook": o,
|
|
236
|
+
"data-slot": "typography-lead",
|
|
237
|
+
"data-tracking-el": e,
|
|
238
|
+
"data-tracking-label": r,
|
|
239
|
+
...n
|
|
240
|
+
}
|
|
241
|
+
)
|
|
242
|
+
);
|
|
243
|
+
j.displayName = "TypographyLead";
|
|
244
|
+
const B = g(
|
|
245
|
+
"text-foreground text-lg font-semibold font-sans leading-7"
|
|
246
|
+
), I = d.forwardRef(
|
|
247
|
+
({
|
|
248
|
+
className: a,
|
|
249
|
+
asChild: t = !1,
|
|
250
|
+
dataHook: o,
|
|
251
|
+
trackingEl: e,
|
|
252
|
+
trackingLabel: r,
|
|
253
|
+
...n
|
|
254
|
+
}, s) => /* @__PURE__ */ l(
|
|
255
|
+
t ? p : "div",
|
|
256
|
+
{
|
|
257
|
+
ref: s,
|
|
258
|
+
className: c(B(), a),
|
|
259
|
+
"data-hook": o,
|
|
260
|
+
"data-slot": "typography-large",
|
|
261
|
+
"data-tracking-el": e,
|
|
262
|
+
"data-tracking-label": r,
|
|
263
|
+
...n
|
|
264
|
+
}
|
|
265
|
+
)
|
|
266
|
+
);
|
|
267
|
+
I.displayName = "TypographyLarge";
|
|
268
|
+
const M = g(
|
|
269
|
+
"text-foreground text-sm font-medium font-sans leading-5"
|
|
270
|
+
), P = d.forwardRef(
|
|
271
|
+
({
|
|
272
|
+
className: a,
|
|
273
|
+
asChild: t = !1,
|
|
274
|
+
dataHook: o,
|
|
275
|
+
trackingEl: e,
|
|
276
|
+
trackingLabel: r,
|
|
277
|
+
...n
|
|
278
|
+
}, s) => /* @__PURE__ */ l(
|
|
279
|
+
t ? p : "small",
|
|
280
|
+
{
|
|
281
|
+
ref: s,
|
|
282
|
+
className: c(M(), a),
|
|
283
|
+
"data-hook": o,
|
|
284
|
+
"data-slot": "typography-small",
|
|
285
|
+
"data-tracking-el": e,
|
|
286
|
+
"data-tracking-label": r,
|
|
287
|
+
...n
|
|
288
|
+
}
|
|
289
|
+
)
|
|
290
|
+
);
|
|
291
|
+
P.displayName = "TypographySmall";
|
|
292
|
+
const z = g(
|
|
293
|
+
"text-muted-foreground text-sm font-medium font-sans leading-5"
|
|
294
|
+
), A = d.forwardRef(
|
|
295
|
+
({
|
|
296
|
+
className: a,
|
|
297
|
+
asChild: t = !1,
|
|
298
|
+
dataHook: o,
|
|
299
|
+
trackingEl: e,
|
|
300
|
+
trackingLabel: r,
|
|
301
|
+
...n
|
|
302
|
+
}, s) => /* @__PURE__ */ l(
|
|
303
|
+
t ? p : "p",
|
|
304
|
+
{
|
|
305
|
+
ref: s,
|
|
306
|
+
className: c(z(), a),
|
|
307
|
+
"data-hook": o,
|
|
308
|
+
"data-slot": "typography-muted",
|
|
309
|
+
"data-tracking-el": e,
|
|
310
|
+
"data-tracking-label": r,
|
|
311
|
+
...n
|
|
312
|
+
}
|
|
313
|
+
)
|
|
314
|
+
);
|
|
315
|
+
A.displayName = "TypographyMuted";
|
|
316
|
+
export {
|
|
317
|
+
w as TypographyBlockquote,
|
|
318
|
+
v as TypographyCode,
|
|
319
|
+
y as TypographyH1,
|
|
320
|
+
h as TypographyH2,
|
|
321
|
+
k as TypographyH3,
|
|
322
|
+
b as TypographyH4,
|
|
323
|
+
L as TypographyInlineCode,
|
|
324
|
+
I as TypographyLarge,
|
|
325
|
+
j as TypographyLead,
|
|
326
|
+
V as TypographyList,
|
|
327
|
+
A as TypographyMuted,
|
|
328
|
+
N as TypographyP,
|
|
329
|
+
P as TypographySmall,
|
|
330
|
+
T as blockquoteVariants
|
|
331
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightlocal/ui-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "BrightLocal Design System UI Components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"sonner": "^2.0.7",
|
|
153
153
|
"tailwind-merge": "^3.4.0",
|
|
154
154
|
"vaul": "^1.1.2",
|
|
155
|
-
"@brightlocal/icons": "0.
|
|
155
|
+
"@brightlocal/icons": "0.2.0"
|
|
156
156
|
},
|
|
157
157
|
"size-limit": [
|
|
158
158
|
{
|
|
@@ -27,11 +27,11 @@ import {
|
|
|
27
27
|
Row,
|
|
28
28
|
} from "@tanstack/react-table";
|
|
29
29
|
import {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
ArrowDown,
|
|
31
|
+
ArrowUp,
|
|
32
|
+
ArrowUpDown,
|
|
33
|
+
Ellipsis,
|
|
34
|
+
Search,
|
|
35
35
|
} from "@brightlocal/icons";
|
|
36
36
|
|
|
37
37
|
import { cn } from "@brightlocal/ui-components/lib/utils";
|
|
@@ -700,11 +700,11 @@ function DataTableColumnHeader<TData, TValue>({
|
|
|
700
700
|
className="flex size-3 items-center justify-center"
|
|
701
701
|
>
|
|
702
702
|
{sortState === "desc" ? (
|
|
703
|
-
<
|
|
703
|
+
<ArrowDown size={12} />
|
|
704
704
|
) : sortState === "asc" ? (
|
|
705
|
-
<
|
|
705
|
+
<ArrowUp size={12} />
|
|
706
706
|
) : (
|
|
707
|
-
<
|
|
707
|
+
<ArrowUpDown size={12} />
|
|
708
708
|
)}
|
|
709
709
|
</span>
|
|
710
710
|
</Button>
|
|
@@ -749,7 +749,7 @@ function DataTableRowActions<TData>({
|
|
|
749
749
|
trackingLabel={trackingLabel}
|
|
750
750
|
variant="ghost"
|
|
751
751
|
>
|
|
752
|
-
<
|
|
752
|
+
<Ellipsis />
|
|
753
753
|
</Button>
|
|
754
754
|
</DropdownMenuTrigger>
|
|
755
755
|
<DropdownMenuContent align="end" dataHook={`${dataHook}-menu`}>
|
|
@@ -967,7 +967,7 @@ function DataTableSearch<TData>({
|
|
|
967
967
|
onChange={(event) => handleFilterChange(event.target.value)}
|
|
968
968
|
/>
|
|
969
969
|
<InputGroupAddon className="pr-3">
|
|
970
|
-
<
|
|
970
|
+
<Search />
|
|
971
971
|
</InputGroupAddon>
|
|
972
972
|
</InputGroup>
|
|
973
973
|
</div>
|
package/src/blocks/sidebar.tsx
CHANGED
|
@@ -510,7 +510,7 @@ const SidebarRail = React.forwardRef<HTMLButtonElement, SidebarRailProps>(
|
|
|
510
510
|
ref={ref}
|
|
511
511
|
aria-label="Toggle Sidebar"
|
|
512
512
|
className={cn(
|
|
513
|
-
"hover:after:bg-sidebar-border absolute inset-y-0 -right-4 z-20 hidden w-4 -translate-x-1/2 transition-
|
|
513
|
+
"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-[2px] sm:flex",
|
|
514
514
|
"cursor-w-resize",
|
|
515
515
|
"[[data-state=collapsed]_&]:cursor-e-resize",
|
|
516
516
|
"group-data-[collapsible=offcanvas]:hover:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
|
|
@@ -711,7 +711,7 @@ const SidebarGroup = React.forwardRef<HTMLDivElement, SidebarGroupProps>(
|
|
|
711
711
|
SidebarGroup.displayName = "SidebarGroup";
|
|
712
712
|
|
|
713
713
|
const sidebarGroupLabelVariants = cva(
|
|
714
|
-
"flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:
|
|
714
|
+
"flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:shrink-0 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
715
715
|
{
|
|
716
716
|
variants: {
|
|
717
717
|
size: {
|
|
@@ -739,8 +739,8 @@ const sidebarGroupLabelVariants = cva(
|
|
|
739
739
|
*/
|
|
740
740
|
interface SidebarGroupLabelProps
|
|
741
741
|
extends
|
|
742
|
-
|
|
743
|
-
|
|
742
|
+
React.ComponentProps<"div">,
|
|
743
|
+
VariantProps<typeof sidebarGroupLabelVariants> {
|
|
744
744
|
/** Data hook for automated testing */
|
|
745
745
|
dataHook?: string;
|
|
746
746
|
/**
|
|
@@ -832,13 +832,14 @@ const SidebarGroupLabel = React.forwardRef<
|
|
|
832
832
|
{variant === SidebarGroupLabelVariant.COLLAPSIBLE && (
|
|
833
833
|
<ChevronDown
|
|
834
834
|
className={cn(
|
|
835
|
-
"
|
|
835
|
+
"shrink-0 transition-transform duration-200",
|
|
836
836
|
isOpen && "rotate-180"
|
|
837
837
|
)}
|
|
838
|
+
size={16}
|
|
838
839
|
/>
|
|
839
840
|
)}
|
|
840
841
|
{variant === SidebarGroupLabelVariant.ACTION && (
|
|
841
|
-
<Plus className="
|
|
842
|
+
<Plus className="shrink-0" size={16} />
|
|
842
843
|
)}
|
|
843
844
|
</Comp>
|
|
844
845
|
);
|
|
@@ -866,7 +867,7 @@ const SidebarGroupAction = React.forwardRef<
|
|
|
866
867
|
<Comp
|
|
867
868
|
ref={ref}
|
|
868
869
|
className={cn(
|
|
869
|
-
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:
|
|
870
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:shrink-0",
|
|
870
871
|
// Increases the hit area of the button on mobile.
|
|
871
872
|
"after:absolute after:-inset-2 after:md:hidden",
|
|
872
873
|
"group-data-[collapsible=icon]:hidden",
|
|
@@ -974,7 +975,7 @@ const SidebarCollapseIcon = React.forwardRef<
|
|
|
974
975
|
const iconProps = {
|
|
975
976
|
ref,
|
|
976
977
|
className: cn(
|
|
977
|
-
"
|
|
978
|
+
"shrink-0 transition-transform",
|
|
978
979
|
isActive && type === SidebarCollapseIconType.CARET && "rotate-90",
|
|
979
980
|
className
|
|
980
981
|
),
|
|
@@ -1042,8 +1043,8 @@ const sidebarMenuButtonVariants = cva(
|
|
|
1042
1043
|
*/
|
|
1043
1044
|
interface SidebarMenuButtonProps
|
|
1044
1045
|
extends
|
|
1045
|
-
|
|
1046
|
-
|
|
1046
|
+
React.ComponentProps<"button">,
|
|
1047
|
+
VariantProps<typeof sidebarMenuButtonVariants> {
|
|
1047
1048
|
/** Data hook for automated testing */
|
|
1048
1049
|
dataHook?: string;
|
|
1049
1050
|
/**
|
|
@@ -1159,7 +1160,7 @@ const SidebarMenuAction = React.forwardRef<
|
|
|
1159
1160
|
<Comp
|
|
1160
1161
|
ref={ref}
|
|
1161
1162
|
className={cn(
|
|
1162
|
-
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:
|
|
1163
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:shrink-0",
|
|
1163
1164
|
// Increases the hit area of the button on mobile.
|
|
1164
1165
|
"after:absolute after:-inset-2 after:md:hidden",
|
|
1165
1166
|
"peer-data-[size=sm]/menu-button:top-1",
|
|
@@ -1169,7 +1170,7 @@ const SidebarMenuAction = React.forwardRef<
|
|
|
1169
1170
|
"peer-data-[size=tree]/menu-button:top-1.5",
|
|
1170
1171
|
"group-data-[collapsible=icon]:hidden",
|
|
1171
1172
|
showOnHover &&
|
|
1172
|
-
|
|
1173
|
+
"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",
|
|
1173
1174
|
className
|
|
1174
1175
|
)}
|
|
1175
1176
|
data-slot="sidebar-menu-action"
|
|
@@ -1281,8 +1282,8 @@ const sidebarMenuSubVariants = cva(
|
|
|
1281
1282
|
*/
|
|
1282
1283
|
interface SidebarMenuSubProps
|
|
1283
1284
|
extends
|
|
1284
|
-
|
|
1285
|
-
|
|
1285
|
+
React.ComponentProps<"ul">,
|
|
1286
|
+
VariantProps<typeof sidebarMenuSubVariants> {
|
|
1286
1287
|
/** Data hook for automated testing */
|
|
1287
1288
|
dataHook?: string;
|
|
1288
1289
|
/**
|
|
@@ -1371,7 +1372,7 @@ const SidebarMenuSubButton = React.forwardRef<
|
|
|
1371
1372
|
<Comp
|
|
1372
1373
|
ref={ref}
|
|
1373
1374
|
className={cn(
|
|
1374
|
-
"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 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:
|
|
1375
|
+
"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 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0",
|
|
1375
1376
|
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
1376
1377
|
size === SidebarMenuSubButtonSize.SM && "text-xs",
|
|
1377
1378
|
size === SidebarMenuSubButtonSize.MD && "text-sm",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
5
|
-
import {
|
|
5
|
+
import { ChevronDown } from "@brightlocal/icons";
|
|
6
6
|
|
|
7
7
|
import { cn } from "@brightlocal/ui-components/lib/utils";
|
|
8
8
|
|
|
@@ -185,7 +185,7 @@ const AccordionTrigger = React.forwardRef<
|
|
|
185
185
|
{...props}
|
|
186
186
|
>
|
|
187
187
|
{children}
|
|
188
|
-
<
|
|
188
|
+
<ChevronDown className="text-muted-foreground pointer-events-none shrink-0 translate-y-0.5 transition-transform duration-200" />
|
|
189
189
|
</AccordionPrimitive.Trigger>
|
|
190
190
|
</AccordionPrimitive.Header>
|
|
191
191
|
));
|
package/src/components/alert.tsx
CHANGED
|
@@ -5,19 +5,19 @@ import { CircleCheck, Info, CircleX, TriangleAlert } from "@brightlocal/icons";
|
|
|
5
5
|
import { cn } from "@brightlocal/ui-components/lib/utils";
|
|
6
6
|
|
|
7
7
|
const alertVariants = cva(
|
|
8
|
-
"relative w-full rounded-lg px-4 py-3 text-sm flex gap-3 items-start
|
|
8
|
+
"relative w-full rounded-lg px-4 py-3 text-sm flex gap-3 items-start",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
12
|
default:
|
|
13
|
-
"bg-neutral-100 text-neutral-900
|
|
13
|
+
"bg-neutral-100 text-neutral-900 dark:bg-neutral-800 dark:text-neutral-100",
|
|
14
14
|
success:
|
|
15
|
-
"bg-green-200 text-green-900
|
|
16
|
-
info: "bg-cyan-200 text-cyan-900
|
|
15
|
+
"bg-green-200 text-green-900 dark:bg-green-950 dark:text-green-200",
|
|
16
|
+
info: "bg-cyan-200 text-cyan-900 dark:bg-cyan-900 dark:text-cyan-200",
|
|
17
17
|
destructive:
|
|
18
|
-
"bg-red-300 text-red-950
|
|
18
|
+
"bg-red-300 text-red-950 dark:bg-red-950 dark:text-red-300",
|
|
19
19
|
warning:
|
|
20
|
-
"bg-orange-200 text-amber-900
|
|
20
|
+
"bg-orange-200 text-amber-900 dark:bg-amber-900 dark:text-orange-200",
|
|
21
21
|
},
|
|
22
22
|
},
|
|
23
23
|
defaultVariants: {
|
|
@@ -118,7 +118,7 @@ function AlertSuccess({
|
|
|
118
118
|
data-tracking-label={trackingLabel}
|
|
119
119
|
variant="success"
|
|
120
120
|
>
|
|
121
|
-
<CircleCheck />
|
|
121
|
+
<CircleCheck className="shrink-0 translate-y-0.5 text-green-900 dark:text-green-200" />
|
|
122
122
|
<div className="flex min-w-0 flex-1 flex-col gap-1">
|
|
123
123
|
{title && <AlertTitle>{title}</AlertTitle>}
|
|
124
124
|
<AlertDescription>{description}</AlertDescription>
|
|
@@ -145,7 +145,7 @@ function AlertInfo({
|
|
|
145
145
|
data-tracking-label={trackingLabel}
|
|
146
146
|
variant="info"
|
|
147
147
|
>
|
|
148
|
-
<Info />
|
|
148
|
+
<Info className="shrink-0 translate-y-0.5 text-cyan-900 dark:text-cyan-200" />
|
|
149
149
|
<div className="flex min-w-0 flex-1 flex-col gap-1">
|
|
150
150
|
{title && <AlertTitle>{title}</AlertTitle>}
|
|
151
151
|
<AlertDescription>{description}</AlertDescription>
|
|
@@ -172,7 +172,7 @@ function AlertDestructive({
|
|
|
172
172
|
data-tracking-label={trackingLabel}
|
|
173
173
|
variant="destructive"
|
|
174
174
|
>
|
|
175
|
-
<CircleX />
|
|
175
|
+
<CircleX className="shrink-0 translate-y-0.5 text-red-950 dark:text-red-300" />
|
|
176
176
|
<div className="flex min-w-0 flex-1 flex-col gap-1">
|
|
177
177
|
{title && <AlertTitle>{title}</AlertTitle>}
|
|
178
178
|
<AlertDescription>{description}</AlertDescription>
|
|
@@ -199,7 +199,7 @@ function AlertWarning({
|
|
|
199
199
|
data-tracking-label={trackingLabel}
|
|
200
200
|
variant="warning"
|
|
201
201
|
>
|
|
202
|
-
<TriangleAlert />
|
|
202
|
+
<TriangleAlert className="shrink-0 translate-y-0.5 text-amber-900 dark:text-orange-200" />
|
|
203
203
|
<div className="flex min-w-0 flex-1 flex-col gap-1">
|
|
204
204
|
{title && <AlertTitle>{title}</AlertTitle>}
|
|
205
205
|
<AlertDescription>{description}</AlertDescription>
|
|
@@ -141,12 +141,12 @@ const BreadcrumbSeparator = React.forwardRef<
|
|
|
141
141
|
<li
|
|
142
142
|
ref={ref}
|
|
143
143
|
aria-hidden="true"
|
|
144
|
-
className={
|
|
144
|
+
className={className}
|
|
145
145
|
data-slot="breadcrumb-separator"
|
|
146
146
|
role="presentation"
|
|
147
147
|
{...props}
|
|
148
148
|
>
|
|
149
|
-
{children ?? <ChevronRight />}
|
|
149
|
+
{children ?? <ChevronRight size={14} />}
|
|
150
150
|
</li>
|
|
151
151
|
));
|
|
152
152
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
@@ -167,7 +167,7 @@ const BreadcrumbEllipsis = React.forwardRef<
|
|
|
167
167
|
role="presentation"
|
|
168
168
|
{...props}
|
|
169
169
|
>
|
|
170
|
-
<MoreHorizontal
|
|
170
|
+
<MoreHorizontal />
|
|
171
171
|
<span className="sr-only">More</span>
|
|
172
172
|
</span>
|
|
173
173
|
));
|
|
@@ -39,7 +39,7 @@ const ButtonVariants = cva(
|
|
|
39
39
|
"justify-center",
|
|
40
40
|
"gap-2",
|
|
41
41
|
"whitespace-nowrap",
|
|
42
|
-
"transition-[color,background-color,border-color,box-shadow]",
|
|
42
|
+
"transition-[color,background-color,border-color,box-shadow,opacity]",
|
|
43
43
|
"duration-150",
|
|
44
44
|
"ease-in-out",
|
|
45
45
|
"cursor-pointer",
|
|
@@ -48,6 +48,7 @@ const ButtonVariants = cva(
|
|
|
48
48
|
"disabled:opacity-50",
|
|
49
49
|
"aria-disabled:opacity-50",
|
|
50
50
|
"[&_svg]:pointer-events-none",
|
|
51
|
+
"[&_svg]:shrink-0",
|
|
51
52
|
"shrink-0",
|
|
52
53
|
"outline-none",
|
|
53
54
|
"aria-invalid:ring-destructive/20",
|
|
@@ -108,8 +109,8 @@ const ButtonVariants = cva(
|
|
|
108
109
|
],
|
|
109
110
|
},
|
|
110
111
|
size: {
|
|
111
|
-
default: "px-4 py-2 h-9 text-sm
|
|
112
|
-
sm: "py-2 px-3 h-8 text-xs
|
|
112
|
+
default: "px-4 py-2 h-9 text-sm",
|
|
113
|
+
sm: "py-2 px-3 h-8 text-xs",
|
|
113
114
|
lg: "py-2 px-8 h-10 text-sm [&_svg:not([class*='size-'])]:size-5",
|
|
114
115
|
},
|
|
115
116
|
state: {
|
|
@@ -178,8 +179,6 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
178
179
|
// Determine actual disabled state
|
|
179
180
|
const isDisabled = disabled || loading;
|
|
180
181
|
|
|
181
|
-
// Determine content to display
|
|
182
|
-
const displayChildren = children;
|
|
183
182
|
let isSingleIconOnly = iconOnly;
|
|
184
183
|
if (
|
|
185
184
|
!isSingleIconOnly &&
|
|
@@ -191,6 +190,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
191
190
|
}>;
|
|
192
191
|
isSingleIconOnly = onlyChild.props?.children == null;
|
|
193
192
|
}
|
|
193
|
+
|
|
194
194
|
const showLoadingSpinner = loading && !asChild;
|
|
195
195
|
|
|
196
196
|
// Compute visual state class via CVA
|
|
@@ -201,7 +201,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
201
201
|
// Ensure we always have an accessible label
|
|
202
202
|
const effectiveAriaLabel =
|
|
203
203
|
ariaLabel ??
|
|
204
|
-
(loading ? `Loading: ${
|
|
204
|
+
(loading ? `Loading: ${children || "Please wait"}` : undefined);
|
|
205
205
|
|
|
206
206
|
// When asChild is used, render a simplified version that only forwards props
|
|
207
207
|
if (asChild) {
|
|
@@ -262,7 +262,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
262
262
|
<Loader2 className="animate-spin" size={BUTTON_SPINNER_SIZE} />
|
|
263
263
|
</div>
|
|
264
264
|
)}
|
|
265
|
-
{
|
|
265
|
+
{children}
|
|
266
266
|
</Comp>
|
|
267
267
|
);
|
|
268
268
|
}
|