@firecms/ui 3.0.0-alpha.71 → 3.0.0-alpha.72
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/dist/components/Avatar.d.ts +2 -2
- package/dist/components/Badge.d.ts +1 -2
- package/dist/components/common/SelectInputLabel.d.ts +1 -0
- package/dist/index.es.js +32 -14
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -10
- package/src/components/Avatar.tsx +24 -6
- package/src/components/Badge.tsx +2 -2
- package/src/components/BooleanSwitch.tsx +4 -2
- package/src/components/IconButton.tsx +1 -1
- package/src/components/SearchBar.tsx +1 -1
- package/src/components/common/SelectInputLabel.tsx +1 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
interface AvatarProps {
|
|
2
|
+
export interface AvatarProps {
|
|
3
3
|
src?: string;
|
|
4
4
|
alt?: string;
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
7
8
|
}
|
|
8
9
|
export declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
-
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export type BadgeColor = "primary" | "secondary" | "error";
|
|
3
|
-
interface BadgeProps {
|
|
3
|
+
export interface BadgeProps {
|
|
4
4
|
color?: BadgeColor;
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
invisible?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare const Badge: React.FC<BadgeProps>;
|
|
9
|
-
export {};
|
package/dist/index.es.js
CHANGED
|
@@ -251,28 +251,44 @@ const Un = (n) => {
|
|
|
251
251
|
]
|
|
252
252
|
}
|
|
253
253
|
);
|
|
254
|
-
}, Qn = ({
|
|
254
|
+
}, Qn = ({
|
|
255
|
+
src: n,
|
|
256
|
+
alt: t,
|
|
257
|
+
children: r,
|
|
258
|
+
className: c,
|
|
259
|
+
style: a,
|
|
260
|
+
...i
|
|
261
|
+
}, u) => /* @__PURE__ */ e(
|
|
255
262
|
"button",
|
|
256
263
|
{
|
|
257
|
-
ref:
|
|
258
|
-
|
|
264
|
+
ref: u,
|
|
265
|
+
style: a,
|
|
266
|
+
...i,
|
|
259
267
|
className: _(
|
|
260
268
|
"rounded-full flex items-center justify-center overflow-hidden",
|
|
261
269
|
A,
|
|
262
|
-
"p-1 hover:bg-gray-200 hover:dark:bg-gray-700"
|
|
263
|
-
c
|
|
270
|
+
"p-1 hover:bg-gray-200 hover:dark:bg-gray-700 w-14 h-14"
|
|
264
271
|
),
|
|
265
272
|
children: n ? /* @__PURE__ */ e(
|
|
266
273
|
"img",
|
|
267
274
|
{
|
|
268
|
-
className:
|
|
275
|
+
className: _(
|
|
276
|
+
"bg-gray-100 dark:bg-gray-800",
|
|
277
|
+
"w-full h-full object-cover rounded-full",
|
|
278
|
+
c
|
|
279
|
+
),
|
|
269
280
|
src: n,
|
|
270
281
|
alt: t
|
|
271
282
|
}
|
|
272
283
|
) : /* @__PURE__ */ e(
|
|
273
284
|
"span",
|
|
274
285
|
{
|
|
275
|
-
className:
|
|
286
|
+
className: _(
|
|
287
|
+
"bg-gray-100 dark:bg-gray-800",
|
|
288
|
+
"flex items-center justify-center",
|
|
289
|
+
"w-full h-full py-1.5 text-lg font-medium text-gray-900 dark:text-white rounded-full",
|
|
290
|
+
c
|
|
291
|
+
),
|
|
276
292
|
children: r
|
|
277
293
|
}
|
|
278
294
|
)
|
|
@@ -298,7 +314,7 @@ const Un = (n) => {
|
|
|
298
314
|
className: _(
|
|
299
315
|
u === "small" ? "w-[38px] h-[22px] min-w-[38px] min-h-[22px]" : "w-[42px] h-[26px] min-w-[42px] min-h-[26px]",
|
|
300
316
|
"outline-none rounded-full relative shadow-sm",
|
|
301
|
-
t ? i ? "bg-white bg-opacity-54 dark:bg-gray-950" : "ring-secondary ring-1 bg-secondary dark:bg-secondary" : "bg-white bg-opacity-54 dark:bg-gray-900 ring-1 ring-gray-100 dark:ring-gray-700",
|
|
317
|
+
t ? i ? "bg-white bg-opacity-54 dark:bg-gray-950 border-gray-100 dark:border-gray-700 ring-1 ring-gray-100 dark:ring-gray-700" : "ring-secondary ring-1 bg-secondary dark:bg-secondary" : "bg-white bg-opacity-54 dark:bg-gray-900 ring-1 ring-gray-100 dark:ring-gray-700",
|
|
302
318
|
c
|
|
303
319
|
),
|
|
304
320
|
...l,
|
|
@@ -308,7 +324,7 @@ const Un = (n) => {
|
|
|
308
324
|
{
|
|
309
325
|
className: _(
|
|
310
326
|
"block rounded-full transition-transform duration-100 transform will-change-auto",
|
|
311
|
-
|
|
327
|
+
"bg-gray-400 dark:bg-gray-600",
|
|
312
328
|
{
|
|
313
329
|
"w-[21px] h-[10px]": u === "medium",
|
|
314
330
|
"w-[19px] h-[8px]": u === "small",
|
|
@@ -316,7 +332,8 @@ const Un = (n) => {
|
|
|
316
332
|
"translate-x-[9px]": u === "small"
|
|
317
333
|
}
|
|
318
334
|
)
|
|
319
|
-
}
|
|
335
|
+
},
|
|
336
|
+
"knob"
|
|
320
337
|
),
|
|
321
338
|
!(r && t == null) && /* @__PURE__ */ e(
|
|
322
339
|
"div",
|
|
@@ -331,7 +348,8 @@ const Un = (n) => {
|
|
|
331
348
|
[t ? "translate-x-[17px]" : "translate-x-[2px]"]: u === "small"
|
|
332
349
|
}
|
|
333
350
|
)
|
|
334
|
-
}
|
|
351
|
+
},
|
|
352
|
+
"knob"
|
|
335
353
|
)
|
|
336
354
|
]
|
|
337
355
|
}
|
|
@@ -14630,7 +14648,7 @@ const ue = "hover:bg-gray-200 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:ho
|
|
|
14630
14648
|
i ? "opacity-50 pointer-events-none" : "cursor-pointer",
|
|
14631
14649
|
u ? "outline outline-2 outline-primary" : "",
|
|
14632
14650
|
le,
|
|
14633
|
-
c === "ghost" ? "bg-transparent" : "bg-gray-50 dark:bg-gray-
|
|
14651
|
+
c === "ghost" ? "bg-transparent" : "bg-gray-50 dark:bg-gray-900",
|
|
14634
14652
|
_e,
|
|
14635
14653
|
ue,
|
|
14636
14654
|
fe[a],
|
|
@@ -16483,7 +16501,7 @@ function hon({
|
|
|
16483
16501
|
}, [w]);
|
|
16484
16502
|
const S = cn(() => {
|
|
16485
16503
|
t && (d(""), t(void 0));
|
|
16486
|
-
}, []);
|
|
16504
|
+
}, [t]);
|
|
16487
16505
|
return /* @__PURE__ */ y(
|
|
16488
16506
|
"div",
|
|
16489
16507
|
{
|
|
@@ -17248,7 +17266,7 @@ const Ae = `
|
|
|
17248
17266
|
/* @__PURE__ */ e(
|
|
17249
17267
|
"span",
|
|
17250
17268
|
{
|
|
17251
|
-
className: `absolute top-0 right-0 transform translate-x-1/2 -translate-y-1/2 rounded-full
|
|
17269
|
+
className: `absolute top-0.5 right-0.5 transform translate-x-1/2 -translate-y-1/2 rounded-full
|
|
17252
17270
|
${Pe(n)}
|
|
17253
17271
|
transition-all duration-200 ease-out
|
|
17254
17272
|
${t ? "w-0 h-0" : "w-2 h-2"}`
|