@stackshift-ui/radio-group 7.0.0-beta.0 → 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/dist/chunk-VF5HEQDQ.mjs +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/radio-group.d.ts +5 -14
- package/dist/radio-group.js +2 -1
- package/dist/radio-group.mjs +2 -1
- package/package.json +4 -4
- package/dist/chunk-4DUYAL2R.mjs +0 -1
|
@@ -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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as o from"@radix-ui/react-radio-group";import{Circle as f}from"lucide-react";import*as m from"react";import{cn as n,DefaultComponent as s,useStackShiftUIComponents as p}from"@stackshift-ui/system";import{jsx as e}from"react/jsx-runtime";var c="RadioGroup",d="RadioGroupItem",u=m.forwardRef(({className:i,...t},r)=>{let{[c]:a=s}=p();return e(a,{as:o.Root,className:n("grid gap-2",i),...t,ref:r})});u.displayName=c;var R=m.forwardRef(({className:i,...t},r)=>{let{[d]:a=s}=p();return e(a,{as:o.Item,ref:r,className:n("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",i),...t,children:e(o.Indicator,{className:"flex items-center justify-center",children:e(f,{className:"h-2.5 w-2.5 fill-current text-current"})})})});R.displayName=d;export{u as a,R as b};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var
|
|
2
|
+
"use strict";var v=Object.create;var s=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var g=(o,e)=>{for(var t in e)s(o,t,{get:e[t],enumerable:!0})},c=(o,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let m of P(e))!b.call(o,m)&&m!==t&&s(o,m,{get:()=>e[m],enumerable:!(r=y(e,m))||r.enumerable});return o};var f=(o,e,t)=>(t=o!=null?v(I(o)):{},c(e||!o||!o.__esModule?s(t,"default",{value:o,enumerable:!0}):t,o)),C=o=>c(s({},"__esModule",{value:!0}),o);var N={};g(N,{RadioGroup:()=>l,RadioGroupItem:()=>G});module.exports=C(N);var a=f(require("@radix-ui/react-radio-group")),u=require("lucide-react"),p=f(require("react")),i=require("@stackshift-ui/system"),n=require("react/jsx-runtime"),d="RadioGroup",R="RadioGroupItem",l=p.forwardRef(({className:o,...e},t)=>{let{[d]:r=i.DefaultComponent}=(0,i.useStackShiftUIComponents)();return(0,n.jsx)(r,{as:a.Root,className:(0,i.cn)("grid gap-2",o),...e,ref:t})});l.displayName=d;var G=p.forwardRef(({className:o,...e},t)=>{let{[R]:r=i.DefaultComponent}=(0,i.useStackShiftUIComponents)();return(0,n.jsx)(r,{as:a.Item,ref:t,className:(0,i.cn)("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",o),...e,children:(0,n.jsx)(a.Indicator,{className:"flex items-center justify-center",children:(0,n.jsx)(u.Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})})});G.displayName=R;0&&(module.exports={RadioGroup,RadioGroupItem});
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a as e}from"./chunk-
|
|
2
|
+
"use strict";import{a as e,b as o}from"./chunk-VF5HEQDQ.mjs";export{e as RadioGroup,o as RadioGroupItem};
|
package/dist/radio-group.d.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
name: string;
|
|
7
|
-
labelClass?: string;
|
|
8
|
-
noLabel?: boolean;
|
|
9
|
-
children?: ReactNode;
|
|
10
|
-
className?: string;
|
|
11
|
-
as?: ElementType;
|
|
12
|
-
}
|
|
13
|
-
export declare const RadioGroup: React.FC<RadioGroupProps>;
|
|
14
|
-
export {};
|
|
1
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
export { RadioGroup, RadioGroupItem };
|
package/dist/radio-group.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";var v=Object.create;var s=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var g=(o,e)=>{for(var i in e)s(o,i,{get:e[i],enumerable:!0})},c=(o,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let m of P(e))!b.call(o,m)&&m!==i&&s(o,m,{get:()=>e[m],enumerable:!(r=y(e,m))||r.enumerable});return o};var d=(o,e,i)=>(i=o!=null?v(I(o)):{},c(e||!o||!o.__esModule?s(i,"default",{value:o,enumerable:!0}):i,o)),C=o=>c(s({},"__esModule",{value:!0}),o);var N={};g(N,{RadioGroup:()=>l,RadioGroupItem:()=>G});module.exports=C(N);var a=d(require("@radix-ui/react-radio-group")),f=require("lucide-react"),p=d(require("react")),t=require("@stackshift-ui/system"),n=require("react/jsx-runtime"),u="RadioGroup",R="RadioGroupItem",l=p.forwardRef(({className:o,...e},i)=>{let{[u]:r=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(r,{as:a.Root,className:(0,t.cn)("grid gap-2",o),...e,ref:i})});l.displayName=u;var G=p.forwardRef(({className:o,...e},i)=>{let{[R]:r=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(r,{as:a.Item,ref:i,className:(0,t.cn)("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",o),...e,children:(0,n.jsx)(a.Indicator,{className:"flex items-center justify-center",children:(0,n.jsx)(f.Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})})});G.displayName=R;0&&(module.exports={RadioGroup,RadioGroupItem});
|
package/dist/radio-group.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";import{a,b}from"./chunk-VF5HEQDQ.mjs";export{a as RadioGroup,b as RadioGroupItem};
|
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",
|
package/dist/chunk-4DUYAL2R.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{DefaultComponent as g,useStackShiftUIComponents as N}from"@stackshift-ui/system";import T from"classnames";import{jsx as s,jsxs as v}from"react/jsx-runtime";var a="RadioGroup",u=({variant:o="primary",label:r,name:i,labelClass:p,noLabel:l=!1,children:m,className:c,as:d,...y})=>{var n;let{[a]:f=g}=N(),t="ml-2",e=`${t}`,C=`${t} flex items-center gap-2`,R=(n={primary:e,inline:C}[o])!=null?n:e;return v("div",{children:[!l&&s("p",{className:p,children:r||i}),s(f,{as:d,className:T(R,c),...y,"data-testid":a,children:m})]})};u.displayName=a;export{u as a};
|