@jcsoftdev/ui 0.1.6 → 0.1.7

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.
@@ -8,11 +8,11 @@ function Checkbox({ className, ...props }) {
8
8
  CheckboxPrimitive.Root,
9
9
  {
10
10
  className: cn(
11
- "inline-flex size-10 shrink-0 items-center justify-center in-data-[density=touch]:size-11",
11
+ "group inline-flex size-10 shrink-0 items-center justify-center in-data-[density=touch]:size-11",
12
12
  className
13
13
  ),
14
14
  ...props,
15
- children: /* @__PURE__ */ jsx("span", { className: "grid size-[18px] place-items-center rounded-pill border-[1.5px] border-line-strong data-[state=checked]:border-success data-[state=checked]:bg-success", children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { children: /* @__PURE__ */ jsx(Check, { "aria-hidden": "true", className: "size-[11px] stroke-[3] text-on-accent" }) }) })
15
+ children: /* @__PURE__ */ jsx("span", { className: "grid size-[18px] place-items-center rounded-pill border-[1.5px] border-line-strong group-data-[state=checked]:border-success group-data-[state=checked]:bg-success group-data-[state=indeterminate]:border-success group-data-[state=indeterminate]:bg-success", children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { children: /* @__PURE__ */ jsx(Check, { "aria-hidden": "true", className: "size-[11px] stroke-[3] text-on-accent" }) }) })
16
16
  }
17
17
  );
18
18
  }
@@ -7,11 +7,11 @@ function Switch({ className, ...props }) {
7
7
  SwitchPrimitive.Root,
8
8
  {
9
9
  className: cn(
10
- "inline-flex size-10 shrink-0 items-center justify-center in-data-[density=touch]:size-11",
10
+ "group inline-flex size-10 shrink-0 items-center justify-center in-data-[density=touch]:size-11",
11
11
  className
12
12
  ),
13
13
  ...props,
14
- children: /* @__PURE__ */ jsx("span", { className: "relative block h-5 w-[34px] rounded-pill bg-line-strong transition-colors data-[state=checked]:bg-accent", children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, { className: "absolute top-[3px] left-[3px] block size-3.5 rounded-pill bg-surface transition-transform data-[state=checked]:translate-x-3.5" }) })
14
+ children: /* @__PURE__ */ jsx("span", { className: "relative block h-5 w-[34px] rounded-pill bg-line-strong transition-colors group-data-[state=checked]:bg-accent", children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, { className: "absolute top-[3px] left-[3px] block size-3.5 rounded-pill bg-surface transition-transform data-[state=checked]:translate-x-3.5" }) })
15
15
  }
16
16
  );
17
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jcsoftdev/ui",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Token-driven React component library: React 19, Radix, Tailwind v4.",
5
5
  "author": "jcsoftdev",
6
6
  "license": "MIT",
@@ -11,12 +11,12 @@ export function Checkbox({ className, ...props }: CheckboxProps) {
11
11
  return (
12
12
  <CheckboxPrimitive.Root
13
13
  className={cn(
14
- "inline-flex size-10 shrink-0 items-center justify-center in-data-[density=touch]:size-11",
14
+ "group inline-flex size-10 shrink-0 items-center justify-center in-data-[density=touch]:size-11",
15
15
  className,
16
16
  )}
17
17
  {...props}
18
18
  >
19
- <span className="grid size-[18px] place-items-center rounded-pill border-[1.5px] border-line-strong data-[state=checked]:border-success data-[state=checked]:bg-success">
19
+ <span className="grid size-[18px] place-items-center rounded-pill border-[1.5px] border-line-strong group-data-[state=checked]:border-success group-data-[state=checked]:bg-success group-data-[state=indeterminate]:border-success group-data-[state=indeterminate]:bg-success">
20
20
  <CheckboxPrimitive.Indicator>
21
21
  <Check aria-hidden="true" className="size-[11px] stroke-[3] text-on-accent" />
22
22
  </CheckboxPrimitive.Indicator>
@@ -10,12 +10,12 @@ export function Switch({ className, ...props }: SwitchProps) {
10
10
  return (
11
11
  <SwitchPrimitive.Root
12
12
  className={cn(
13
- "inline-flex size-10 shrink-0 items-center justify-center in-data-[density=touch]:size-11",
13
+ "group inline-flex size-10 shrink-0 items-center justify-center in-data-[density=touch]:size-11",
14
14
  className,
15
15
  )}
16
16
  {...props}
17
17
  >
18
- <span className="relative block h-5 w-[34px] rounded-pill bg-line-strong transition-colors data-[state=checked]:bg-accent">
18
+ <span className="relative block h-5 w-[34px] rounded-pill bg-line-strong transition-colors group-data-[state=checked]:bg-accent">
19
19
  <SwitchPrimitive.Thumb className="absolute top-[3px] left-[3px] block size-3.5 rounded-pill bg-surface transition-transform data-[state=checked]:translate-x-3.5" />
20
20
  </span>
21
21
  </SwitchPrimitive.Root>