@syscore/ui-library 1.14.0 → 1.15.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.
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ import { cn } from "../../lib/utils";
3
+
4
+ interface UtilityCheckProps {
5
+ className?: string;
6
+ }
7
+
8
+ export const UtilityCheck: React.FC<UtilityCheckProps> = ({ className }) => {
9
+ return (
10
+ <div className={cn("flex items-center justify-center", className)}>
11
+ <svg
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ width="7"
14
+ height="5"
15
+ viewBox="0 0 7 5"
16
+ fill="none"
17
+ >
18
+ <path
19
+ d="M0.75 2.30556L2.30556 3.86111L5.41667 0.75"
20
+ stroke="currentColor"
21
+ strokeWidth="1.5"
22
+ strokeLinecap="round"
23
+ strokeLinejoin="round"
24
+ transform="translate(0.42, 0.19)"
25
+ />
26
+ </svg>
27
+ </div>
28
+ );
29
+ };
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
- import { Check } from "lucide-react";
3
+ import { UtilityCheck } from "../icons/UtilityCheck";
4
4
 
5
5
  import { cn } from "@/lib/utils";
6
6
 
@@ -13,9 +13,9 @@ const Checkbox = React.forwardRef<
13
13
  className={cn("checkbox", className)}
14
14
  {...props}
15
15
  >
16
- <CheckboxPrimitive.Indicator className="checkbox-indicator">
17
- <Check className="icon-4" />
18
- </CheckboxPrimitive.Indicator>
16
+ <span className="checkbox-indicator">
17
+ <UtilityCheck />
18
+ </span>
19
19
  </CheckboxPrimitive.Root>
20
20
  ));
21
21
  Checkbox.displayName = CheckboxPrimitive.Root.displayName;
package/client/global.css CHANGED
@@ -533,6 +533,7 @@ layer(base);
533
533
  --radius-lg: 12px;
534
534
  --radius-md: 8px;
535
535
  --radius-sm: 6px;
536
+ --radius-xs: 3px;
536
537
 
537
538
  /* Figma Design System Colors */
538
539
  --color-white: #fff;
@@ -1537,11 +1538,14 @@ body {
1537
1538
 
1538
1539
  /* Checkbox Styles */
1539
1540
  .checkbox {
1540
- height: 1rem;
1541
- width: 1rem;
1541
+ display: flex;
1542
+ align-items: center;
1543
+ justify-content: center;
1544
+ height: 0.875rem;
1545
+ width: 0.875rem;
1542
1546
  flex-shrink: 0;
1543
- border-radius: calc(var(--radius-sm, 6px));
1544
- border: 1px solid hsl(var(--primary));
1547
+ border-radius: var(--radius-xs, 3px);
1548
+ border: 1.5px solid var(--color-gray-400, #9fa2ab);
1545
1549
  transition: all 0.15s ease-in-out;
1546
1550
  }
1547
1551
 
@@ -1558,22 +1562,26 @@ body {
1558
1562
  }
1559
1563
 
1560
1564
  .checkbox[data-state="checked"] {
1561
- background-color: hsl(var(--primary));
1562
- color: hsl(var(--primary-foreground));
1565
+ background-color: var(--color-cyan-400, #39c9ea);
1566
+ border-color: var(--color-cyan-700, #128ba6);
1567
+ color: var(--color-white, #fff);
1568
+ }
1569
+
1570
+ .checkbox[data-state="unchecked"] {
1571
+ background-color: transparent;
1572
+ border-color: var(--color-gray-400, #9fa2ab);
1573
+ color: var(--color-gray-100, #eff1f2);
1563
1574
  }
1564
1575
 
1565
1576
  .checkbox-indicator {
1566
1577
  display: flex;
1567
1578
  align-items: center;
1568
1579
  justify-content: center;
1580
+ width: 100%;
1581
+ height: 100%;
1569
1582
  color: currentColor;
1570
1583
  }
1571
1584
 
1572
- .checkbox-indicator svg {
1573
- height: 1rem;
1574
- width: 1rem;
1575
- }
1576
-
1577
1585
  /* Alert Styles */
1578
1586
  .alert {
1579
1587
  position: relative;
@@ -2485,7 +2493,7 @@ body {
2485
2493
 
2486
2494
  .dialog-content-inner {
2487
2495
  padding: 1.5rem;
2488
- border-radius: 28px;
2496
+ border-radius: 24px;
2489
2497
  background-color: var(--color-gray-50, #f9f9fa);
2490
2498
  }
2491
2499
 
@@ -1,9 +1,9 @@
1
1
  import type { Meta, StoryObj } from "@storybook/react";
2
- import { Checkbox } from "../../components/ui/checkbox";
3
2
  import { useState } from "react";
3
+ import { Checkbox } from "../components/ui/checkbox";
4
4
 
5
5
  const meta = {
6
- title: "UI/Checkbox",
6
+ title: "Review/Checkbox",
7
7
  component: Checkbox,
8
8
  tags: ["autodocs"],
9
9
  parameters: {
@@ -18,14 +18,24 @@ type Story = StoryObj<typeof meta>;
18
18
  export const Default: Story = {
19
19
  render: () => {
20
20
  const [checked, setChecked] = useState(false);
21
- return <Checkbox checked={checked} onCheckedChange={setChecked} />;
21
+ return (
22
+ <Checkbox
23
+ checked={checked}
24
+ onCheckedChange={(value) => setChecked(value === true)}
25
+ />
26
+ );
22
27
  },
23
28
  };
24
29
 
25
30
  export const Checked: Story = {
26
31
  render: () => {
27
32
  const [checked, setChecked] = useState(true);
28
- return <Checkbox checked={checked} onCheckedChange={setChecked} />;
33
+ return (
34
+ <Checkbox
35
+ checked={checked}
36
+ onCheckedChange={(value) => setChecked(value === true)}
37
+ />
38
+ );
29
39
  },
30
40
  };
31
41
 
@@ -42,7 +52,11 @@ export const WithLabel: Story = {
42
52
  const [checked, setChecked] = useState(false);
43
53
  return (
44
54
  <div className="flex items-center space-x-2">
45
- <Checkbox id="terms" checked={checked} onCheckedChange={setChecked} />
55
+ <Checkbox
56
+ id="terms"
57
+ checked={checked}
58
+ onCheckedChange={(value) => setChecked(value === true)}
59
+ />
46
60
  <label
47
61
  htmlFor="terms"
48
62
  className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"