@stackshift-ui/radio 7.0.0-beta.3 → 7.0.0-beta.4
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/package.json +4 -4
- package/dist/chunk-2YHUN46K.mjs +0 -1
- package/dist/chunk-WMK7EHW7.mjs +0 -56
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -2
- package/dist/index.mjs +0 -2
- package/dist/radio.d.ts +0 -16
- package/dist/radio.js +0 -1
- package/dist/radio.mjs +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/radio",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "7.0.0-beta.
|
|
4
|
+
"version": "7.0.0-beta.4",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"classnames": "^2.5.1",
|
|
37
|
-
"@stackshift-ui/scripts": "
|
|
38
|
-
"@stackshift-ui/system": "
|
|
37
|
+
"@stackshift-ui/scripts": "7.0.0-beta.3",
|
|
38
|
+
"@stackshift-ui/system": "7.0.0-beta.4"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@types/react": "16.8 - 19",
|
|
42
42
|
"next": "10 - 14",
|
|
43
43
|
"react": "16.8 - 19",
|
|
44
44
|
"react-dom": "16.8 - 19",
|
|
45
|
-
"@stackshift-ui/system": ">=
|
|
45
|
+
"@stackshift-ui/system": ">=7.0.0-beta.4"
|
|
46
46
|
},
|
|
47
47
|
"peerDependenciesMeta": {
|
|
48
48
|
"next": {
|
package/dist/chunk-2YHUN46K.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{DefaultComponent as C,useStackShiftUIComponents as R}from"@stackshift-ui/system";import o from"classnames";import{jsx as N,jsxs as T}from"react/jsx-runtime";var s="Radio",f=({name:t,ariaLabel:i,variant:l="primary",item:a,labelClass:m,onChange:p,children:h,className:c,as:y="label",...e})=>{var r;let{[s]:d=C}=R(),n="",g=(r={primary:n}[l])!=null?r:n;return T(d,{htmlFor:a,as:y,className:o("flex items-center gap-2",m),...e,children:[N("input",{onChange:p,className:o(g,c),name:t,value:a,type:"radio","aria-label":i||t,id:a,...e}),a]})};f.displayName=s;export{f as a};
|
package/dist/chunk-WMK7EHW7.mjs
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
// src/radio.tsx
|
|
2
|
-
import { DefaultComponent, useStackShiftUIComponents } from "@stackshift-ui/system";
|
|
3
|
-
import cn from "classnames";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
var displayName = "Radio";
|
|
6
|
-
var Radio = ({
|
|
7
|
-
name,
|
|
8
|
-
ariaLabel,
|
|
9
|
-
variant = "primary",
|
|
10
|
-
item,
|
|
11
|
-
labelClass,
|
|
12
|
-
onChange,
|
|
13
|
-
children,
|
|
14
|
-
className,
|
|
15
|
-
as = "label",
|
|
16
|
-
...props
|
|
17
|
-
}) => {
|
|
18
|
-
var _a;
|
|
19
|
-
const { [displayName]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
20
|
-
const commonStyle = "";
|
|
21
|
-
const primary = `${commonStyle}`;
|
|
22
|
-
const variants = {
|
|
23
|
-
primary
|
|
24
|
-
};
|
|
25
|
-
const variantClass = (_a = variants[variant]) != null ? _a : primary;
|
|
26
|
-
return /* @__PURE__ */ jsxs(
|
|
27
|
-
Component,
|
|
28
|
-
{
|
|
29
|
-
htmlFor: item,
|
|
30
|
-
as,
|
|
31
|
-
className: cn("flex items-center gap-2", labelClass),
|
|
32
|
-
...props,
|
|
33
|
-
children: [
|
|
34
|
-
/* @__PURE__ */ jsx(
|
|
35
|
-
"input",
|
|
36
|
-
{
|
|
37
|
-
onChange,
|
|
38
|
-
className: cn(variantClass, className),
|
|
39
|
-
name,
|
|
40
|
-
value: item,
|
|
41
|
-
type: "radio",
|
|
42
|
-
"aria-label": ariaLabel || name,
|
|
43
|
-
id: item,
|
|
44
|
-
...props
|
|
45
|
-
}
|
|
46
|
-
),
|
|
47
|
-
item
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
Radio.displayName = displayName;
|
|
53
|
-
|
|
54
|
-
export {
|
|
55
|
-
Radio
|
|
56
|
-
};
|
package/dist/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./radio";
|
package/dist/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";var h=Object.create;var o=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var V=(a,t)=>{for(var e in t)o(a,e,{get:t[e],enumerable:!0})},y=(a,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of v(t))!x.call(a,r)&&r!==e&&o(a,r,{get:()=>t[r],enumerable:!(n=u(t,r))||n.enumerable});return a};var b=(a,t,e)=>(e=a!=null?h(S(a)):{},y(t||!a||!a.__esModule?o(e,"default",{value:a,enumerable:!0}):e,a)),L=a=>y(o({},"__esModule",{value:!0}),a);var P={};V(P,{Radio:()=>g});module.exports=L(P);var s=require("@stackshift-ui/system"),l=b(require("classnames")),i=require("react/jsx-runtime"),d="Radio",g=({name:a,ariaLabel:t,variant:e="primary",item:n,labelClass:r,onChange:C,children:E,className:f,as:R="label",...m})=>{var c;let{[d]:N=s.DefaultComponent}=(0,s.useStackShiftUIComponents)(),p="",T=(c={primary:p}[e])!=null?c:p;return(0,i.jsxs)(N,{htmlFor:n,as:R,className:(0,l.default)("flex items-center gap-2",r),...m,children:[(0,i.jsx)("input",{onChange:C,className:(0,l.default)(T,f),name:a,value:n,type:"radio","aria-label":t||a,id:n,...m}),n]})};g.displayName=d;0&&(module.exports={Radio});
|
package/dist/index.mjs
DELETED
package/dist/radio.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ElementType, HTMLProps, ReactNode } from "react";
|
|
2
|
-
type Variant = "primary";
|
|
3
|
-
export interface RadioProps extends Omit<HTMLProps<HTMLInputElement>, "as"> {
|
|
4
|
-
name: string;
|
|
5
|
-
ariaLabel: string;
|
|
6
|
-
variant?: Variant;
|
|
7
|
-
item: string;
|
|
8
|
-
labelClass?: string;
|
|
9
|
-
onChange?: () => void;
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
children?: ReactNode;
|
|
12
|
-
className?: string;
|
|
13
|
-
as?: ElementType;
|
|
14
|
-
}
|
|
15
|
-
export declare const Radio: React.FC<RadioProps>;
|
|
16
|
-
export {};
|
package/dist/radio.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var h=Object.create;var o=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var u=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var b=(a,t)=>{for(var e in t)o(a,e,{get:t[e],enumerable:!0})},y=(a,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of S(t))!V.call(a,r)&&r!==e&&o(a,r,{get:()=>t[r],enumerable:!(n=v(t,r))||n.enumerable});return a};var x=(a,t,e)=>(e=a!=null?h(u(a)):{},y(t||!a||!a.__esModule?o(e,"default",{value:a,enumerable:!0}):e,a)),L=a=>y(o({},"__esModule",{value:!0}),a);var P={};b(P,{Radio:()=>g});module.exports=L(P);var s=require("@stackshift-ui/system"),l=x(require("classnames")),i=require("react/jsx-runtime"),d="Radio",g=({name:a,ariaLabel:t,variant:e="primary",item:n,labelClass:r,onChange:C,children:E,className:R,as:f="label",...m})=>{var c;let{[d]:N=s.DefaultComponent}=(0,s.useStackShiftUIComponents)(),p="",T=(c={primary:p}[e])!=null?c:p;return(0,i.jsxs)(N,{htmlFor:n,as:f,className:(0,l.default)("flex items-center gap-2",r),...m,children:[(0,i.jsx)("input",{onChange:C,className:(0,l.default)(T,R),name:a,value:n,type:"radio","aria-label":t||a,id:n,...m}),n]})};g.displayName=d;0&&(module.exports={Radio});
|
package/dist/radio.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-2YHUN46K.mjs";export{a as Radio};
|