@stackshift-ui/switch 1.0.0-beta.5 → 1.0.0-beta.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.
@@ -0,0 +1 @@
1
+ import*as t from"@radix-ui/react-switch";import{cn as e,DefaultComponent as s,useStackShiftUIComponents as c}from"@stackshift-ui/system";import{jsx as a}from"react/jsx-runtime";var i="Switch";function d({className:o,...n}){let{[i]:r=s}=c();return a(r,{as:t.Root,"data-slot":"switch",className:e("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",o),...n,children:a(t.Thumb,{"data-slot":"switch-thumb",className:e("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}d.displayName=i;export{d as a};
@@ -0,0 +1 @@
1
+ export * from "./switch";
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";var u=Object.create;var n=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var a in e)n(t,a,{get:e[a],enumerable:!0})},d=(t,e,a,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of h(e))!f.call(t,o)&&o!==a&&n(t,o,{get:()=>e[o],enumerable:!(c=p(e,o))||c.enumerable});return t};var k=(t,e,a)=>(a=t!=null?u(b(t)):{},d(e||!t||!t.__esModule?n(a,"default",{value:t,enumerable:!0}):a,t)),w=t=>d(n({},"__esModule",{value:!0}),t);var v={};g(v,{Switch:()=>m});module.exports=w(v);var r=k(require("@radix-ui/react-switch")),i=require("@stackshift-ui/system"),s=require("react/jsx-runtime"),l="Switch";function m({className:t,...e}){let{[l]:a=i.DefaultComponent}=(0,i.useStackShiftUIComponents)();return(0,s.jsx)(a,{as:r.Root,"data-slot":"switch",className:(0,i.cn)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:(0,s.jsx)(r.Thumb,{"data-slot":"switch-thumb",className:(0,i.cn)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}m.displayName=l;0&&(module.exports={Switch});
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";import{a as e}from"./chunk-TPKR47KO.mjs";export{e as Switch};
@@ -0,0 +1,7 @@
1
+ import * as SwitchPrimitive from "@radix-ui/react-switch";
2
+ import * as React from "react";
3
+ declare function Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare namespace Switch {
5
+ var displayName: string;
6
+ }
7
+ export { Switch };
package/dist/switch.js ADDED
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";var u=Object.create;var n=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var a in e)n(t,a,{get:e[a],enumerable:!0})},d=(t,e,a,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of h(e))!f.call(t,o)&&o!==a&&n(t,o,{get:()=>e[o],enumerable:!(c=p(e,o))||c.enumerable});return t};var k=(t,e,a)=>(a=t!=null?u(b(t)):{},d(e||!t||!t.__esModule?n(a,"default",{value:t,enumerable:!0}):a,t)),w=t=>d(n({},"__esModule",{value:!0}),t);var v={};g(v,{Switch:()=>m});module.exports=w(v);var r=k(require("@radix-ui/react-switch")),i=require("@stackshift-ui/system"),s=require("react/jsx-runtime"),l="Switch";function m({className:t,...e}){let{[l]:a=i.DefaultComponent}=(0,i.useStackShiftUIComponents)();return(0,s.jsx)(a,{as:r.Root,"data-slot":"switch",className:(0,i.cn)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:(0,s.jsx)(r.Thumb,{"data-slot":"switch-thumb",className:(0,i.cn)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}m.displayName=l;0&&(module.exports={Switch});
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";import{a}from"./chunk-TPKR47KO.mjs";export{a as Switch};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stackshift-ui/switch",
3
3
  "description": "A control that allows the user to toggle between checked and not checked.",
4
- "version": "1.0.0-beta.5",
4
+ "version": "1.0.0-beta.7",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -35,11 +35,11 @@
35
35
  "dependencies": {
36
36
  "@radix-ui/react-switch": "^1.2.5",
37
37
  "classnames": "^2.5.1",
38
- "@stackshift-ui/scripts": "7.0.0-beta.3",
39
- "@stackshift-ui/system": "7.0.0-beta.4"
38
+ "@stackshift-ui/scripts": "7.0.0-beta.5",
39
+ "@stackshift-ui/system": "7.0.0-beta.6"
40
40
  },
41
41
  "peerDependencies": {
42
- "@stackshift-ui/system": ">=7.0.0-beta.4",
42
+ "@stackshift-ui/system": ">=7.0.0-beta.6",
43
43
  "@types/react": "16.8 - 19",
44
44
  "next": "10 - 14",
45
45
  "react": "16.8 - 19",