@stackshift-ui/radio-group 7.0.0-beta.1 → 7.0.0-beta.3
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/chunk-QCXEGLNT.mjs +43 -0
- package/package.json +4 -4
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// src/radio-group.tsx
|
|
2
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
3
|
+
import { Circle } from "lucide-react";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cn, DefaultComponent, useStackShiftUIComponents } from "@stackshift-ui/system";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var displayName = "RadioGroup";
|
|
8
|
+
var displayNameItem = "RadioGroupItem";
|
|
9
|
+
var RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
|
|
10
|
+
const { [displayName]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
Component,
|
|
13
|
+
{
|
|
14
|
+
as: RadioGroupPrimitive.Root,
|
|
15
|
+
className: cn("grid gap-2", className),
|
|
16
|
+
...props,
|
|
17
|
+
ref
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
});
|
|
21
|
+
RadioGroup.displayName = displayName;
|
|
22
|
+
var RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
23
|
+
const { [displayNameItem]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
Component,
|
|
26
|
+
{
|
|
27
|
+
as: RadioGroupPrimitive.Item,
|
|
28
|
+
ref,
|
|
29
|
+
className: cn(
|
|
30
|
+
"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
31
|
+
className
|
|
32
|
+
),
|
|
33
|
+
...props,
|
|
34
|
+
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(Circle, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
});
|
|
38
|
+
RadioGroupItem.displayName = displayNameItem;
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
RadioGroup,
|
|
42
|
+
RadioGroupItem
|
|
43
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/radio-group",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "7.0.0-beta.
|
|
4
|
+
"version": "7.0.0-beta.3",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"@radix-ui/react-radio-group": "^1.3.7",
|
|
37
37
|
"classnames": "^2.5.1",
|
|
38
38
|
"lucide-react": "^0.468.0",
|
|
39
|
-
"@stackshift-ui/scripts": "6.1.0-beta.
|
|
40
|
-
"@stackshift-ui/system": "6.1.0-beta.
|
|
39
|
+
"@stackshift-ui/scripts": "6.1.0-beta.2",
|
|
40
|
+
"@stackshift-ui/system": "6.1.0-beta.3"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@stackshift-ui/system": ">=6.1.0-beta.
|
|
43
|
+
"@stackshift-ui/system": ">=6.1.0-beta.3",
|
|
44
44
|
"@types/react": "16.8 - 19",
|
|
45
45
|
"next": "10 - 14",
|
|
46
46
|
"react": "16.8 - 19",
|