@brightlocal/ui-components 0.4.0 → 0.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/dist/accordion.cjs +1 -1
- package/dist/accordion.js +1 -1
- package/dist/blocks/data-table.cjs +1 -1
- package/dist/blocks/data-table.js +30 -30
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +4 -3
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +10 -10
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +6 -3
- 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/checkbox.cjs +1 -1
- package/dist/checkbox.js +7 -7
- 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 +116 -103
- package/dist/command.cjs +1 -1
- package/dist/command.js +3 -3
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.js +3 -3
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.js +10 -10
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +12 -19
- package/dist/header.d.ts.map +1 -1
- package/dist/header.js +4 -1
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.js +63 -63
- package/dist/link.cjs +1 -1
- package/dist/link.js +2 -2
- package/dist/logo.cjs +1 -1
- package/dist/logo.d.ts.map +1 -1
- package/dist/logo.js +17 -16
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.js +3 -3
- 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.js +16 -16
- 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.js +20 -20
- package/dist/sheet.d.ts +1 -1
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.js +9 -8
- package/package.json +1 -1
- package/src/blocks/data-table.tsx +5 -5
- package/src/blocks/sidebar.tsx +3 -2
- package/src/components/accordion.tsx +1 -1
- package/src/components/breadcrumb.tsx +1 -1
- package/src/components/calendar.tsx +6 -3
- package/src/components/card.tsx +24 -1
- package/src/components/centred-layout.tsx +6 -29
- package/src/components/checkbox.tsx +1 -1
- package/src/components/combobox.tsx +21 -5
- package/src/components/command.tsx +3 -3
- package/src/components/context-menu.tsx +3 -3
- package/src/components/dropdown-menu.tsx +4 -4
- package/src/components/field.tsx +9 -14
- package/src/components/header.tsx +4 -1
- package/src/components/input-password.tsx +4 -4
- package/src/components/link.tsx +1 -1
- package/src/components/logo.tsx +10 -9
- package/src/components/menubar.tsx +3 -3
- package/src/components/navigation-menu.tsx +2 -1
- package/src/components/pagination.tsx +3 -3
- package/src/components/rating.tsx +2 -2
- package/src/components/resizable.tsx +1 -1
- package/src/components/select.tsx +4 -4
- package/src/components/sonner.tsx +6 -5
package/src/components/field.tsx
CHANGED
|
@@ -89,14 +89,9 @@ const fieldVariants = cva("group/field flex w-full gap-2", {
|
|
|
89
89
|
* Props for the Field component
|
|
90
90
|
*/
|
|
91
91
|
interface FieldProps
|
|
92
|
-
extends React.ComponentProps<"div">,
|
|
93
|
-
VariantProps<typeof fieldVariants> {}
|
|
92
|
+
extends React.ComponentProps<"div">, VariantProps<typeof fieldVariants> {}
|
|
94
93
|
|
|
95
|
-
function Field({
|
|
96
|
-
className,
|
|
97
|
-
orientation = "vertical",
|
|
98
|
-
...props
|
|
99
|
-
}: FieldProps) {
|
|
94
|
+
function Field({ className, orientation = "vertical", ...props }: FieldProps) {
|
|
100
95
|
return (
|
|
101
96
|
<div
|
|
102
97
|
className={cn(fieldVariants({ orientation }), className)}
|
|
@@ -195,7 +190,10 @@ interface FieldErrorItem {
|
|
|
195
190
|
/**
|
|
196
191
|
* Props for the FieldError component
|
|
197
192
|
*/
|
|
198
|
-
interface FieldErrorProps extends Omit<
|
|
193
|
+
interface FieldErrorProps extends Omit<
|
|
194
|
+
React.ComponentProps<"div">,
|
|
195
|
+
"children"
|
|
196
|
+
> {
|
|
199
197
|
/**
|
|
200
198
|
* Data hook for automated testing (REQUIRED)
|
|
201
199
|
*/
|
|
@@ -251,10 +249,7 @@ function FieldErrorIcon({
|
|
|
251
249
|
return (
|
|
252
250
|
<Icon
|
|
253
251
|
aria-hidden="true"
|
|
254
|
-
className={cn(
|
|
255
|
-
"inline-block size-4 shrink-0 align-text-bottom",
|
|
256
|
-
className
|
|
257
|
-
)}
|
|
252
|
+
className={cn("inline-block shrink-0 align-text-bottom", className)}
|
|
258
253
|
{...props}
|
|
259
254
|
/>
|
|
260
255
|
);
|
|
@@ -297,8 +292,8 @@ function FieldError({
|
|
|
297
292
|
...props
|
|
298
293
|
}: FieldErrorProps) {
|
|
299
294
|
// Filter out undefined errors and those without messages
|
|
300
|
-
const errorMessages = errors?.filter(
|
|
301
|
-
|
|
295
|
+
const errorMessages = errors?.filter((e): e is FieldErrorItem =>
|
|
296
|
+
Boolean(e?.message)
|
|
302
297
|
);
|
|
303
298
|
|
|
304
299
|
// If no children and no valid errors, don't render anything
|
|
@@ -49,7 +49,10 @@ const Header = React.forwardRef<HTMLElement, HeaderProps>(
|
|
|
49
49
|
return (
|
|
50
50
|
<header
|
|
51
51
|
ref={ref}
|
|
52
|
-
className={cn(
|
|
52
|
+
className={cn(
|
|
53
|
+
"flex items-center",
|
|
54
|
+
className
|
|
55
|
+
)}
|
|
53
56
|
data-hook={dataHook}
|
|
54
57
|
data-slot="header"
|
|
55
58
|
data-tracking-el={trackingEl}
|
|
@@ -382,9 +382,9 @@ const InputPasswordField = React.forwardRef<
|
|
|
382
382
|
onClick={toggleVisibility}
|
|
383
383
|
>
|
|
384
384
|
{showPassword ? (
|
|
385
|
-
<EyeOff
|
|
385
|
+
<EyeOff size={16} />
|
|
386
386
|
) : (
|
|
387
|
-
<Eye
|
|
387
|
+
<Eye size={16} />
|
|
388
388
|
)}
|
|
389
389
|
</InputGroupButton>
|
|
390
390
|
</InputGroupAddon>
|
|
@@ -449,9 +449,9 @@ const InputPasswordToggle = React.forwardRef<
|
|
|
449
449
|
{...props}
|
|
450
450
|
>
|
|
451
451
|
{showPassword ? (
|
|
452
|
-
<EyeOff
|
|
452
|
+
<EyeOff size={16} />
|
|
453
453
|
) : (
|
|
454
|
-
<Eye
|
|
454
|
+
<Eye size={16} />
|
|
455
455
|
)}
|
|
456
456
|
</InputGroupButton>
|
|
457
457
|
);
|
package/src/components/link.tsx
CHANGED
package/src/components/logo.tsx
CHANGED
|
@@ -22,8 +22,8 @@ const logoVariants = cva("inline-flex [&_path]:fill-brand-primary-foreground", {
|
|
|
22
22
|
|
|
23
23
|
interface LogoProps
|
|
24
24
|
extends
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
Omit<React.HTMLAttributes<HTMLDivElement>, "children">,
|
|
26
|
+
VariantProps<typeof logoVariants> {
|
|
27
27
|
/**
|
|
28
28
|
* Required data-hook attribute for testing and component identification
|
|
29
29
|
*/
|
|
@@ -54,23 +54,24 @@ function Logo({
|
|
|
54
54
|
data-slot="logo"
|
|
55
55
|
data-tracking-el={trackingEl}
|
|
56
56
|
data-tracking-label={trackingLabel}
|
|
57
|
+
data-variant={variant}
|
|
57
58
|
role="img"
|
|
58
59
|
{...props}
|
|
59
60
|
>
|
|
60
61
|
{variant === "logotype" && (
|
|
61
62
|
<svg
|
|
62
63
|
fill="none"
|
|
63
|
-
height="
|
|
64
|
-
viewBox="0 0
|
|
65
|
-
width="
|
|
64
|
+
height="24"
|
|
65
|
+
viewBox="0 0 128 24.1509"
|
|
66
|
+
width="128"
|
|
66
67
|
xmlns="http://www.w3.org/2000/svg"
|
|
67
68
|
>
|
|
68
|
-
<g clipPath="url(#
|
|
69
|
-
<path d="
|
|
69
|
+
<g clipPath="url(#clip0_18315_468855)">
|
|
70
|
+
<path d="M53.8012 6.13184C55.2785 6.13191 56.4277 6.69033 57.3579 7.75H57.4126V6.2998H60.7505V18.2354C60.7505 20.0759 60.1485 21.5262 58.9995 22.5859C57.8506 23.6455 56.3185 24.1473 54.4585 24.1475C51.5584 24.1475 49.588 23.0319 48.5483 20.7451L51.23 19.1279C51.8866 20.4664 52.9265 21.1357 54.3491 21.1357C56.0997 21.1355 57.3032 20.187 57.3032 18.3467V16.5625H57.2485C56.4278 17.622 55.333 18.124 53.9106 18.124C52.2693 18.124 50.9014 17.5657 49.8618 16.3945C48.8223 15.2791 48.275 13.8293 48.2749 12.1562C48.2749 10.5945 48.7675 9.14395 49.8071 7.97266C50.8467 6.74577 52.1599 6.13189 53.8012 6.13184ZM93.7456 6.07617C95.4964 6.07624 97.0292 6.69017 98.2329 7.86133C99.4366 9.03255 100.093 10.4829 100.093 12.2676C100.093 14.0523 99.4912 15.5582 98.2329 16.7295C96.9744 17.9007 95.4965 18.5146 93.6909 18.5146C91.8855 18.5146 90.4083 17.9564 89.1499 16.7295C87.9461 15.5582 87.2895 14.108 87.2895 12.3232C87.3443 10.5386 87.9461 9.03255 89.2046 7.86133C90.4629 6.63457 91.9949 6.07627 93.7456 6.07617ZM106.879 6.13184C109.506 6.13207 111.64 7.4711 112.406 9.81348L109.396 11.0957C108.904 9.92489 108.028 9.31177 106.879 9.31152C105.293 9.31152 104.088 10.4826 104.088 12.3232C104.088 14.108 105.238 15.335 106.879 15.335C108.083 15.3347 108.958 14.7766 109.451 13.5498L112.46 14.833C111.585 17.2311 109.451 18.5144 106.825 18.5146C105.019 18.4589 103.541 17.9007 102.337 16.7295C101.134 15.5582 100.586 14.108 100.586 12.3232C100.586 10.5384 101.188 9.08828 102.447 7.91699C103.651 6.69002 105.183 6.13184 106.879 6.13184ZM25.4555 7.75293H25.5649C26.4404 6.63751 27.6442 6.0791 29.1216 6.0791C30.7628 6.07926 32.0762 6.69291 33.1157 7.97559C34.1553 9.20262 34.6479 10.6531 34.6479 12.2705C34.6479 13.8879 34.1005 15.3384 33.061 16.5654C31.9668 17.7922 30.6533 18.4617 29.0122 18.4619C27.4802 18.4619 26.2763 17.9034 25.4555 16.7881H25.3999V18.2383H22.063V0.0556641H25.4555V7.75293ZM118.424 6.02051C121.488 6.02061 123.513 7.69329 123.513 10.8164V18.1787H120.34V16.7295H120.286C119.52 17.8449 118.315 18.4579 116.783 18.458C115.689 18.4022 114.759 18.1232 113.993 17.4541C113.227 16.7848 112.843 15.9483 112.843 14.8887V14.833C112.843 13.4388 113.5 12.379 114.594 11.877C115.688 11.3751 116.783 11.1514 118.041 11.1514H119.191C119.793 11.1512 120.121 10.8722 120.121 10.2588C120.12 9.42233 119.464 8.80869 118.26 8.80859C117.111 8.8087 116.236 9.3672 115.689 10.4268L113.062 8.86426C114.047 6.96816 115.853 6.02061 118.424 6.02051ZM78.9184 6.2998H81.8188V9.31152H78.9184V13.4385C78.9184 14.777 79.6299 15.3349 80.9428 15.335C81.2163 15.335 81.4907 15.3351 81.7094 15.2236V18.124C81.2171 18.2913 80.6696 18.3467 80.1225 18.3467C77.0583 18.3467 75.4712 16.6736 75.4712 13.8848V9.31152H73.3921V6.2998H75.5259V2.5625H78.9184V6.2998ZM65.3481 7.69336C65.7858 7.07999 66.2786 6.63424 66.8803 6.41113C67.5368 6.18809 68.0843 6.07617 68.5219 6.07617C69.9445 6.07623 70.9845 6.52258 71.6958 7.4707C72.4069 8.36306 72.7895 9.47894 72.7895 10.8174V18.2354H69.4526V11.5977C69.4525 10.2592 68.7402 9.25503 67.4272 9.25488C66.0595 9.25506 65.3482 10.2593 65.3481 11.542V18.1797H61.9555V0.0527344H65.3481V7.69336ZM47.2329 18.1826H43.7856V6.30273H47.2329V18.1826ZM42.1469 6.1875C42.4203 6.1875 42.6391 6.18837 42.8032 6.2998V9.69336C42.548 9.64804 42.2928 9.64649 42.0376 9.64648C39.8488 9.64648 38.8637 11.0407 38.8637 13.1602V18.1797H35.4712V6.2998H38.8637V8.13965C39.3563 7.02434 40.615 6.18751 42.1469 6.1875ZM86.3598 18.1797H82.9126V0.0527344H86.3598V18.1797ZM128 18.1797H124.553V0.0527344H128V18.1797ZM8.71433 18.0176C8.80009 18.0818 8.88699 18.1279 8.98484 18.1279H8.76609C8.74808 18.1279 8.73185 18.0857 8.71433 18.0176ZM13.0337 2.56641C14.6751 2.56649 16.3174 3.51474 17.2475 4.96484C18.1773 6.52641 18.2321 8.64568 17.2475 10.1514C16.7552 10.932 16.0983 11.5458 15.4419 12.1592C13.4173 14.1671 11.2828 16.0636 9.20359 17.96L9.1489 18.0156C9.0396 18.0713 8.93008 18.0712 8.82078 18.0156C8.73907 17.9739 8.69483 17.901 8.67234 17.8115C8.68532 17.8928 8.70051 17.9637 8.71433 18.0176C8.60851 17.9382 8.50302 17.8297 8.3823 17.7373C6.4126 15.8969 4.44282 14.0554 2.47312 12.1592C1.5978 11.267 0.667749 10.4298 0.229957 9.20312C-0.371808 7.30683 0.230178 5.02011 1.81687 3.7373C2.69222 3.01247 3.78622 2.62215 4.93504 2.62207C6.51656 2.62215 8.04402 3.45333 8.97507 4.78418C9.826 3.47781 11.3626 2.61666 13.0337 2.56641ZM4.88035 3.68164C3.45778 3.68176 2.08968 4.5189 1.37839 5.85742C0.722236 7.14009 0.776662 8.81333 1.70652 9.98438C2.25364 10.7093 2.91135 11.3231 3.56785 11.9365C5.09973 13.4422 6.68635 14.8928 8.27293 16.3428L8.54636 16.6221C8.54827 16.6481 8.59438 17.2709 8.65574 17.707C8.64361 17.5769 8.65668 17.4271 8.65671 17.291C8.49257 14.3351 8.27397 11.3787 8.16453 8.47852C8.12122 7.59564 8.14647 6.71234 8.43015 5.88477C8.41595 5.8552 8.38255 5.84458 8.3823 5.80078C7.72563 4.51826 6.35747 3.68173 4.93504 3.68164H4.88035ZM118.041 13.3271C117.057 13.3272 116.291 13.7729 116.291 14.665C116.291 15.4459 116.893 15.8926 117.768 15.8926C119.245 15.8924 120.121 14.8882 120.121 13.6055V13.3271H118.041ZM28.355 9.20312C27.5344 9.20317 26.8776 9.48152 26.3305 10.0391C25.7834 10.5968 25.5102 11.3224 25.5102 12.2148C25.4556 13.1071 25.7835 13.8319 26.3305 14.4453C26.8777 15.0029 27.589 15.2822 28.4096 15.2822C29.2303 15.2822 29.9416 15.003 30.4887 14.4453C31.0358 13.8876 31.31 13.1071 31.31 12.2148C31.31 11.3225 31.0359 10.5968 30.4341 10.0391C29.887 9.48158 29.1755 9.20319 28.355 9.20312ZM93.6909 9.14453C92.8704 9.14463 92.2135 9.42379 91.6665 10.0371C91.1195 10.5948 90.8462 11.3197 90.8462 12.2119C90.7914 13.1043 91.1193 13.8298 91.6665 14.4434C92.2135 15.0009 92.9251 15.2792 93.7456 15.2793C95.387 15.2791 96.5913 13.9966 96.5913 12.2119C96.5913 11.3198 96.3178 10.5948 95.771 10.0371C95.2238 9.47942 94.5116 9.14461 93.6909 9.14453ZM54.5132 9.2002C52.9265 9.2002 51.6677 10.4266 51.6675 12.0996C51.6675 13.8844 52.8716 15.0566 54.5132 15.0566C56.0997 15.0563 57.3579 13.8842 57.3579 12.0996C57.3577 10.4268 56.1542 9.20052 54.5132 9.2002ZM4.88035 5.29883C5.70098 5.29892 6.46705 5.80143 6.85007 6.52637C7.1781 7.19544 7.17914 7.92078 6.90574 8.58984C6.46795 9.48199 5.42758 10.0402 4.44285 9.87305C3.51289 9.70573 2.74691 8.86878 2.63718 7.9209C2.52778 7.19605 2.80129 6.41509 3.34812 5.91309C3.78578 5.52274 4.33328 5.29892 4.88035 5.29883ZM42.8579 9.70215H42.8032V9.69336C42.8212 9.69655 42.8398 9.69847 42.8579 9.70215ZM13.0337 5.74512C11.9943 5.74536 11.228 6.58213 11.228 7.58594C11.283 8.53376 12.0491 9.31512 12.979 9.37109C13.9636 9.4267 14.7854 8.58961 14.8403 7.58594C14.8403 6.58206 14.0185 5.74525 13.0337 5.74512ZM4.88035 6.30273C4.33328 6.30292 3.78664 6.74998 3.67722 7.30762C3.51371 8.08833 4.22486 9.03641 5.15476 8.86914C5.64674 8.75746 6.08412 8.31104 6.19382 7.80957C6.24854 7.08456 5.6463 6.30289 4.88035 6.30273ZM45.4819 0C46.6853 0.000335991 47.6155 0.948173 47.6157 2.1748C47.6157 3.34589 46.6854 4.29459 45.4819 4.29492C44.3328 4.29492 43.4018 3.3461 43.4018 2.1748C43.4021 1.00371 44.3877 0 45.4819 0Z" />
|
|
70
71
|
</g>
|
|
71
72
|
<defs>
|
|
72
|
-
<clipPath id="
|
|
73
|
-
<rect fill="white" height="
|
|
73
|
+
<clipPath id="clip0_18315_468855">
|
|
74
|
+
<rect fill="white" height="24.1509" width="128" />
|
|
74
75
|
</clipPath>
|
|
75
76
|
</defs>
|
|
76
77
|
</svg>
|
|
@@ -207,7 +207,7 @@ function MenubarCheckboxItem({
|
|
|
207
207
|
>
|
|
208
208
|
<span className="absolute left-2 flex size-4 items-center justify-center">
|
|
209
209
|
<MenubarPrimitive.ItemIndicator>
|
|
210
|
-
<Check className="text-foreground size
|
|
210
|
+
<Check className="text-foreground" size={16} />
|
|
211
211
|
</MenubarPrimitive.ItemIndicator>
|
|
212
212
|
</span>
|
|
213
213
|
{children}
|
|
@@ -284,7 +284,7 @@ function MenubarRadioItem({
|
|
|
284
284
|
>
|
|
285
285
|
<span className="absolute left-3 flex size-2 items-center justify-center">
|
|
286
286
|
<MenubarPrimitive.ItemIndicator>
|
|
287
|
-
<Circle className="fill-foreground size
|
|
287
|
+
<Circle className="fill-foreground" size={8} />
|
|
288
288
|
</MenubarPrimitive.ItemIndicator>
|
|
289
289
|
</span>
|
|
290
290
|
{children}
|
|
@@ -391,7 +391,7 @@ function MenubarSubTrigger({
|
|
|
391
391
|
{...props}
|
|
392
392
|
>
|
|
393
393
|
{children}
|
|
394
|
-
<ChevronRight className="ml-auto size
|
|
394
|
+
<ChevronRight className="ml-auto" size={16} />
|
|
395
395
|
</MenubarPrimitive.SubTrigger>
|
|
396
396
|
);
|
|
397
397
|
}
|
|
@@ -113,7 +113,8 @@ const NavigationMenuTrigger = React.forwardRef<
|
|
|
113
113
|
{children}
|
|
114
114
|
<ChevronDown
|
|
115
115
|
aria-hidden="true"
|
|
116
|
-
className="relative top-[1px] ml-1
|
|
116
|
+
className="relative top-[1px] ml-1 transition duration-300 group-data-[state=open]:rotate-180"
|
|
117
|
+
size={12}
|
|
117
118
|
/>
|
|
118
119
|
</NavigationMenuPrimitive.Trigger>
|
|
119
120
|
));
|
|
@@ -270,7 +270,7 @@ const PaginationPrevious = React.forwardRef<
|
|
|
270
270
|
variant="previous"
|
|
271
271
|
{...props}
|
|
272
272
|
>
|
|
273
|
-
<ChevronLeftIcon
|
|
273
|
+
<ChevronLeftIcon size={16} />
|
|
274
274
|
</PaginationButton>
|
|
275
275
|
);
|
|
276
276
|
});
|
|
@@ -294,7 +294,7 @@ const PaginationNext = React.forwardRef<HTMLButtonElement, PaginationNextProps>(
|
|
|
294
294
|
variant="next"
|
|
295
295
|
{...props}
|
|
296
296
|
>
|
|
297
|
-
<ChevronRightIcon
|
|
297
|
+
<ChevronRightIcon size={16} />
|
|
298
298
|
</PaginationButton>
|
|
299
299
|
);
|
|
300
300
|
}
|
|
@@ -337,7 +337,7 @@ function PaginationEllipsis({
|
|
|
337
337
|
data-slot="pagination-ellipsis"
|
|
338
338
|
{...props}
|
|
339
339
|
>
|
|
340
|
-
<MoreHorizontalIcon
|
|
340
|
+
<MoreHorizontalIcon size={16} />
|
|
341
341
|
<span className="sr-only">More pages</span>
|
|
342
342
|
</span>
|
|
343
343
|
);
|
|
@@ -60,7 +60,7 @@ const Rating = React.forwardRef<HTMLDivElement, RatingProps>(
|
|
|
60
60
|
<div key={index} className="relative" data-slot="rating-star">
|
|
61
61
|
{/* Base star (empty/outline) */}
|
|
62
62
|
<StarRating
|
|
63
|
-
className="fill-muted stroke-muted
|
|
63
|
+
className="fill-muted stroke-muted"
|
|
64
64
|
data-slot="rating-star-base"
|
|
65
65
|
/>
|
|
66
66
|
|
|
@@ -74,7 +74,7 @@ const Rating = React.forwardRef<HTMLDivElement, RatingProps>(
|
|
|
74
74
|
width: `${fillPercentage}%`,
|
|
75
75
|
}}
|
|
76
76
|
>
|
|
77
|
-
<StarRating className="
|
|
77
|
+
<StarRating className="fill-yellow-400 stroke-yellow-400" />
|
|
78
78
|
</div>
|
|
79
79
|
)}
|
|
80
80
|
</div>
|
|
@@ -98,7 +98,7 @@ function ResizableHandle({
|
|
|
98
98
|
>
|
|
99
99
|
{withHandle && (
|
|
100
100
|
<div className="border-border bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border">
|
|
101
|
-
<GripVertical
|
|
101
|
+
<GripVertical size={10} />
|
|
102
102
|
</div>
|
|
103
103
|
)}
|
|
104
104
|
</ResizablePrimitive.PanelResizeHandle>
|
|
@@ -168,7 +168,7 @@ function SelectTrigger({
|
|
|
168
168
|
|
|
169
169
|
{/* Dropdown chevron (right side) */}
|
|
170
170
|
<SelectPrimitive.Icon asChild>
|
|
171
|
-
<ChevronDownIcon className="text-muted-foreground size
|
|
171
|
+
<ChevronDownIcon className="text-muted-foreground" size={16} />
|
|
172
172
|
</SelectPrimitive.Icon>
|
|
173
173
|
</SelectPrimitive.Trigger>
|
|
174
174
|
);
|
|
@@ -310,7 +310,7 @@ function SelectItem({
|
|
|
310
310
|
>
|
|
311
311
|
<span className="absolute right-2 flex size-4 items-center justify-center">
|
|
312
312
|
<SelectPrimitive.ItemIndicator>
|
|
313
|
-
<CheckIcon
|
|
313
|
+
<CheckIcon size={16} />
|
|
314
314
|
</SelectPrimitive.ItemIndicator>
|
|
315
315
|
</span>
|
|
316
316
|
|
|
@@ -355,7 +355,7 @@ function SelectScrollUpButton({
|
|
|
355
355
|
data-slot="select-scroll-up-button"
|
|
356
356
|
{...props}
|
|
357
357
|
>
|
|
358
|
-
<ChevronUpIcon
|
|
358
|
+
<ChevronUpIcon size={16} />
|
|
359
359
|
</SelectPrimitive.ScrollUpButton>
|
|
360
360
|
);
|
|
361
361
|
}
|
|
@@ -378,7 +378,7 @@ function SelectScrollDownButton({
|
|
|
378
378
|
data-slot="select-scroll-down-button"
|
|
379
379
|
{...props}
|
|
380
380
|
>
|
|
381
|
-
<ChevronDownIcon
|
|
381
|
+
<ChevronDownIcon size={16} />
|
|
382
382
|
</SelectPrimitive.ScrollDownButton>
|
|
383
383
|
);
|
|
384
384
|
}
|
|
@@ -121,7 +121,7 @@ const DESCRIPTION_VARIANTS = cva("text-sm leading-normal", {
|
|
|
121
121
|
},
|
|
122
122
|
});
|
|
123
123
|
|
|
124
|
-
const ICON_VARIANTS = cva("
|
|
124
|
+
const ICON_VARIANTS = cva("", {
|
|
125
125
|
variants: {
|
|
126
126
|
colorSchema: {
|
|
127
127
|
default: "text-foreground",
|
|
@@ -144,21 +144,22 @@ const ICON_VARIANTS = cva("size-5", {
|
|
|
144
144
|
function renderToastIcon(type: ToastIconType, schema: "default" | "success") {
|
|
145
145
|
switch (type) {
|
|
146
146
|
case "info":
|
|
147
|
-
return <Info className={cn(ICON_VARIANTS({ colorSchema: schema }))} />;
|
|
147
|
+
return <Info className={cn(ICON_VARIANTS({ colorSchema: schema }))} size={20} />;
|
|
148
148
|
case "success":
|
|
149
149
|
return (
|
|
150
|
-
<CheckCircle2 className={cn(ICON_VARIANTS({ colorSchema: schema }))} />
|
|
150
|
+
<CheckCircle2 className={cn(ICON_VARIANTS({ colorSchema: schema }))} size={20} />
|
|
151
151
|
);
|
|
152
152
|
case "warning":
|
|
153
153
|
return (
|
|
154
|
-
<AlertTriangle className={cn(ICON_VARIANTS({ colorSchema: schema }))} />
|
|
154
|
+
<AlertTriangle className={cn(ICON_VARIANTS({ colorSchema: schema }))} size={20} />
|
|
155
155
|
);
|
|
156
156
|
case "error":
|
|
157
|
-
return <XCircle className={cn(ICON_VARIANTS({ colorSchema: schema }))} />;
|
|
157
|
+
return <XCircle className={cn(ICON_VARIANTS({ colorSchema: schema }))} size={20} />;
|
|
158
158
|
case "loading":
|
|
159
159
|
return (
|
|
160
160
|
<Loader2
|
|
161
161
|
className={cn(ICON_VARIANTS({ colorSchema: schema }), "animate-spin")}
|
|
162
|
+
size={20}
|
|
162
163
|
/>
|
|
163
164
|
);
|
|
164
165
|
default:
|