@jamsrui/switch 0.0.2 → 0.0.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/index.mjs +1 -1
- package/dist/styles.mjs +1 -1
- package/dist/switch-config.mjs +1 -1
- package/dist/switch-context.mjs +1 -1
- package/dist/switch-description.mjs +1 -1
- package/dist/switch-label.mjs +1 -1
- package/dist/switch-thumb.mjs +1 -1
- package/dist/switch-track.mjs +1 -1
- package/dist/switch-wrapper.mjs +1 -1
- package/dist/switch.mjs +1 -1
- package/dist/swith-content.mjs +1 -1
- package/dist/swith-error-message.mjs +1 -1
- package/dist/use-switch.mjs +1 -1
- package/package.json +4 -4
- package/dist/chunk-2LZJ7NTE.js +0 -1
- package/dist/chunk-3QVJWFDR.mjs +0 -1
- package/dist/chunk-3TCAATGI.mjs +0 -1
- package/dist/chunk-6KHD65QK.mjs +0 -1
- package/dist/chunk-BCSK4AAO.mjs +0 -1
- package/dist/chunk-BEV2H3PO.js +0 -1
- package/dist/chunk-BUBGL4JZ.mjs +0 -1
- package/dist/chunk-CABIUVTY.js +0 -1
- package/dist/chunk-CLFHT656.js +0 -1
- package/dist/chunk-D3VTNGLC.js +0 -1
- package/dist/chunk-DDA54MYZ.mjs +0 -1
- package/dist/chunk-DHSJ6D3Y.js +0 -1
- package/dist/chunk-HSHMMCEU.mjs +0 -1
- package/dist/chunk-IGNAWQUV.mjs +0 -1
- package/dist/chunk-KK3YODKW.mjs +0 -1
- package/dist/chunk-MDPXI2FD.mjs +0 -1
- package/dist/chunk-OIF5SWKN.mjs +0 -1
- package/dist/chunk-Q5HFLFKD.js +0 -1
- package/dist/chunk-TEP4KR32.js +0 -1
- package/dist/chunk-UP35U2LS.js +0 -1
- package/dist/chunk-W374VGMM.js +0 -1
- package/dist/chunk-XO5NKDV5.js +0 -1
- package/dist/chunk-ZMFP3ZII.mjs +0 -1
- package/dist/chunk-ZU4NB4BT.js +0 -1
- package/dist/index.d.ts +0 -14
- package/dist/index.js +0 -1
- package/dist/styles.d.ts +0 -204
- package/dist/styles.js +0 -1
- package/dist/switch-config.d.ts +0 -24
- package/dist/switch-config.js +0 -1
- package/dist/switch-context.d.ts +0 -21
- package/dist/switch-context.js +0 -1
- package/dist/switch-description.d.ts +0 -10
- package/dist/switch-description.js +0 -1
- package/dist/switch-label.d.ts +0 -10
- package/dist/switch-label.js +0 -1
- package/dist/switch-rDfweH_z.d.ts +0 -54
- package/dist/switch-thumb.d.ts +0 -10
- package/dist/switch-thumb.js +0 -1
- package/dist/switch-track.d.ts +0 -10
- package/dist/switch-track.js +0 -1
- package/dist/switch-wrapper.d.ts +0 -10
- package/dist/switch-wrapper.js +0 -1
- package/dist/switch.d.ts +0 -12
- package/dist/switch.js +0 -1
- package/dist/swith-content.d.ts +0 -10
- package/dist/swith-content.js +0 -1
- package/dist/swith-error-message.d.ts +0 -10
- package/dist/swith-error-message.js +0 -1
- package/dist/use-switch.d.ts +0 -12
- package/dist/use-switch.js +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{Switch as t}from"./switch";import{SwitchConfig as c,useSwitchConfig as f}from"./switch-config";export{t as Switch,c as SwitchConfig,f as useSwitchConfig};
|
package/dist/styles.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{focusVisibleClasses as e,tv as r}from"@jamsrui/utils";const s="",a=r({slots:{root:"group flex flex-col gap-2",track:[...e,"flex cursor-pointer shrink-0 items-center rounded-full bg-surface-secondary p-1","uig-disabled:cursor-not-allowed uig-disabled:opacity-60","cursor-default ui-interactive:cursor-pointer ui-interactive:hover:opacity-95","justify-start uig-checked:justify-end"],thumb:"size-8 rounded-full bg-white shadow-md",label:"text-sm uig-interactive:cursor-pointer",description:"text-xs text-foreground-500",content:"grid grow gap-1",wrapper:"flex items-center justify-between gap-2",errorMessage:"text-danger text-xs"},variants:{isInvalid:{true:{}},color:{default:{track:"uig-checked:bg-default"},primary:{track:"uig-checked:bg-primary"},secondary:{track:"uig-checked:bg-secondary"},success:{track:"uig-checked:bg-success"},warning:{track:"uig-checked:bg-warning"},danger:{track:"uig-checked:bg-danger"}},size:{xs:{track:"h-4 w-7 px-0.5",thumb:"size-3"},sm:{track:"h-6 w-10",thumb:"size-4"},md:{track:"mr-2 h-7 w-12",thumb:"size-5"},lg:{track:"mr-2 h-8 w-14",thumb:"size-6"}},labelPlacement:{start:{wrapper:"flex-row"},end:{wrapper:"flex-row-reverse"},top:{wrapper:"flex-col"},bottom:{wrapper:"flex-col-reverse"}}},defaultVariants:{size:"md",color:"success",labelPlacement:"start"}});export{a as switchVariants,s as test};
|
package/dist/switch-config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createConfigContext as o}from"@jamsrui/utils";const[t,r]=o({displayName:"SwitchConfig"});export{t as SwitchConfig,r as useSwitchConfig};
|
package/dist/switch-context.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createContext as e,use as o}from"react";const n=e(null),c=()=>{const t=o(n);if(!t)throw new Error("useSwitchContext must be used within SwitchContext");return t};export{n as SwitchContext,c as useSwitchContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useRenderElement as t}from"@jamsrui/hooks";import{useSwitchContext as o}from"./switch-context";const n=e=>{const{getDescriptionProps:r}=o();return t("div",{props:[r(e)]})};export{n as SwitchDescription};
|
package/dist/switch-label.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useRenderElement as l}from"@jamsrui/hooks";import{useSwitchContext as n}from"./switch-context";const i=r=>{const{getLabelProps:t,label:e}=n(),o=l("label",{props:[t(r),{children:e}]});return e?o:null};export{i as SwitchLabel};
|
package/dist/switch-thumb.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useRenderElement as t}from"@jamsrui/hooks";import{useSwitchContext as o}from"./switch-context";const n=e=>{const{getThumbProps:r}=o();return t("div",{props:[r(e)]})};export{n as SwitchThumb};
|
package/dist/switch-track.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useRenderElement as e}from"@jamsrui/hooks";import{useSwitchContext as o}from"./switch-context";const c=r=>{const{getTrackProps:t}=o();return e("button",{props:[t(r)]})};export{c as SwitchTrack};
|
package/dist/switch-wrapper.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useRenderElement as t}from"@jamsrui/hooks";import{useSwitchContext as p}from"./switch-context";const i=r=>{const{getWrapperProps:e}=p();return t("div",{props:[e(r)]})};export{i as SwitchWrapper};
|
package/dist/switch.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useRenderElement as s}from"@jamsrui/hooks";import{mergeConfigProps as h}from"@jamsrui/utils";import{useSwitchConfig as w}from"./switch-config";import{SwitchContext as S}from"./switch-context";import{SwitchDescription as f}from"./switch-description";import{SwitchLabel as a}from"./switch-label";import{SwitchThumb as d}from"./switch-thumb";import{SwitchTrack as C}from"./switch-track";import{SwitchWrapper as g}from"./switch-wrapper";import{SwitchContent as l}from"./swith-content";import{SwitchErrorMessage as u}from"./swith-error-message";import{useSwitch as x}from"./use-switch";const q=t=>{const{children:o}=t,r=w(),i=h(r,r,t),e=x(i),{getRootProps:c,hasContent:n}=e,m=React.createElement(React.Fragment,null,React.createElement(g,null,!!n&&React.createElement(l,null,React.createElement(a,null),!!o&&React.createElement(f,null,o)),React.createElement(C,null,React.createElement(d,null))),React.createElement(u,null)),p=s("div",{props:[c({}),{children:m}]});return React.createElement(S,{value:e},p)};export{q as Switch};
|
package/dist/swith-content.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useRenderElement as r}from"@jamsrui/hooks";import{useSwitchContext as o}from"./switch-context";const i=t=>{const{getContentProps:e}=o();return r("div",{props:[e(t)]})};export{i as SwitchContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useRenderElement as o}from"@jamsrui/hooks";import{useSwitchContext as t}from"./switch-context";const i=r=>{const{getErrorMessageProps:e,errorMessage:s}=t();return o("span",{props:[e(r),{children:s}]})};export{i as SwitchErrorMessage};
|
package/dist/use-switch.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"
|
|
1
|
+
import{useCallback as a,useMemo as M}from"react";import{cn as o,dataAttrDev as g,mapPropsVariants as T,mergeProps as c}from"@jamsrui/utils";import{switchVariants as u}from"./styles";const I=k=>{const[f,C]=T(k,u.variantKeys),s=u(C),{classNames:r,slotProps:e,label:i,errorMessage:l,children:y,isChecked:G,defaultChecked:v,onCheckedChange:D,isDisabled:x,isReadonly:E,...p}=f,n=a(()=>({...p,"data-slot":g("root"),"data-component":g("switch"),className:s.root({className:o(r?.root,p.className)})}),[r?.root,p,s]),m=a(t=>({...c(e?.thumb,t),"data-slot":"thumb",className:s.thumb({className:o(e?.thumb?.className,r?.thumb,t.className)})}),[r?.thumb,e?.thumb,s]),h=a(t=>({...c(e?.label,t),"data-slot":"label",className:s.label({className:o(e?.label?.className,r?.label,t.className)})}),[r?.label,e?.label,s]),w=a(t=>({...c(e?.description,t),"data-slot":"description",className:s.description({className:o(e?.description?.className,r?.description,t.className)})}),[r?.description,e?.description,s]),P=a(t=>({...c(e?.content,t),"data-slot":"content",className:s.content({className:o(e?.content?.className,r?.content,t.className)})}),[r?.content,e?.content,s]),b=a(t=>({...c(e?.wrapper,t),"data-slot":"wrapper",className:s.wrapper({className:o(e?.wrapper?.className,r?.wrapper,t.className)})}),[r?.wrapper,e?.wrapper,s]),d=a(t=>({...c(e?.track,t),"data-slot":"track",className:s.track({className:o(e?.track?.className,r?.track,t.className)})}),[r?.track,e?.track,s]),N=a(t=>({...c(e?.errorMessage,t),"data-slot":"error-message",className:s.errorMessage({className:o(e?.errorMessage?.className,r?.errorMessage,t.className)})}),[r?.errorMessage,e?.errorMessage,s]),S=!!i||!!y;return M(()=>({getRootProps:n,getThumbProps:m,getLabelProps:h,getDescriptionProps:w,getContentProps:P,getWrapperProps:b,getTrackProps:d,getErrorMessageProps:N,label:i,errorMessage:l,hasContent:S}),[n,m,h,w,P,b,d,N,i,l,S])};export{I as useSwitch};
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamsrui/switch",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"motion": ">=12",
|
|
6
6
|
"react": ">=19"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@jamsrui/hooks": "^0.0.
|
|
10
|
-
"@jamsrui/core": "^0.0.
|
|
11
|
-
"@jamsrui/utils": "^0.0.
|
|
9
|
+
"@jamsrui/hooks": "^0.0.3",
|
|
10
|
+
"@jamsrui/core": "^0.0.3",
|
|
11
|
+
"@jamsrui/utils": "^0.0.3"
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
package/dist/chunk-2LZJ7NTE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _react = require('react');var n=_react.createContext.call(void 0, null),c= exports.b =()=>{let t=_react.use.call(void 0, n);if(!t)throw new Error("useSwitchContext must be used within SwitchContext");return t};exports.a = n; exports.b = c;
|
package/dist/chunk-3QVJWFDR.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./chunk-ZMFP3ZII.mjs";import{useRenderElement as n}from"@jamsrui/hooks";var i=t=>{let{getLabelProps:o,label:e}=r(),l=n("label",{props:[o(t),{children:e}]});return e?l:null};export{i as a};
|
package/dist/chunk-3TCAATGI.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-ZMFP3ZII.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var n=r=>{let{getDescriptionProps:t}=e();return o("div",{props:[t(r)]})};export{n as a};
|
package/dist/chunk-6KHD65QK.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./chunk-ZMFP3ZII.mjs";import{useRenderElement as p}from"@jamsrui/hooks";var i=e=>{let{getWrapperProps:t}=r();return p("div",{props:[t(e)]})};export{i as a};
|
package/dist/chunk-BCSK4AAO.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{focusVisibleClasses as e,tv as r}from"@jamsrui/utils";var s="",a=r({slots:{root:"group flex flex-col gap-2",track:[...e,"flex cursor-pointer shrink-0 items-center rounded-full bg-surface-secondary p-1","uig-disabled:cursor-not-allowed uig-disabled:opacity-60","cursor-default ui-interactive:cursor-pointer ui-interactive:hover:opacity-95","justify-start uig-checked:justify-end"],thumb:"size-8 rounded-full bg-white shadow-md",label:"text-sm uig-interactive:cursor-pointer",description:"text-xs text-foreground-500",content:"grid grow gap-1",wrapper:"flex items-center justify-between gap-2",errorMessage:"text-danger text-xs"},variants:{isInvalid:{true:{}},color:{default:{track:"uig-checked:bg-default"},primary:{track:"uig-checked:bg-primary"},secondary:{track:"uig-checked:bg-secondary"},success:{track:"uig-checked:bg-success"},warning:{track:"uig-checked:bg-warning"},danger:{track:"uig-checked:bg-danger"}},size:{xs:{track:"h-4 w-7 px-0.5",thumb:"size-3"},sm:{track:"h-6 w-10",thumb:"size-4"},md:{track:"mr-2 h-7 w-12",thumb:"size-5"},lg:{track:"mr-2 h-8 w-14",thumb:"size-6"}},labelPlacement:{start:{wrapper:"flex-row"},end:{wrapper:"flex-row-reverse"},top:{wrapper:"flex-col"},bottom:{wrapper:"flex-col-reverse"}}},defaultVariants:{size:"md",color:"success",labelPlacement:"start"}});export{s as a,a as b};
|
package/dist/chunk-BEV2H3PO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2LZJ7NTEjs = require('./chunk-2LZJ7NTE.js');var _hooks = require('@jamsrui/hooks');var n=r=>{let{getDescriptionProps:t}=_chunk2LZJ7NTEjs.b.call(void 0, );return _hooks.useRenderElement.call(void 0, "div",{props:[t(r)]})};exports.a = n;
|
package/dist/chunk-BUBGL4JZ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as h}from"./chunk-6KHD65QK.mjs";import{a as w}from"./chunk-KK3YODKW.mjs";import{a as S}from"./chunk-MDPXI2FD.mjs";import{a as f}from"./chunk-OIF5SWKN.mjs";import{b as i}from"./chunk-IGNAWQUV.mjs";import{a as n}from"./chunk-3TCAATGI.mjs";import{a as m}from"./chunk-3QVJWFDR.mjs";import{a as p}from"./chunk-DDA54MYZ.mjs";import{a as s}from"./chunk-HSHMMCEU.mjs";import{a as c}from"./chunk-ZMFP3ZII.mjs";import{useRenderElement as u}from"@jamsrui/hooks";import{mergeConfigProps as x}from"@jamsrui/utils";var q=t=>{let{children:o}=t,r=i(),a=x(r,r,t),e=f(a),{getRootProps:d,hasContent:C}=e,g=React.createElement(React.Fragment,null,React.createElement(h,null,!!C&&React.createElement(w,null,React.createElement(m,null),!!o&&React.createElement(n,null,o)),React.createElement(s,null,React.createElement(p,null))),React.createElement(S,null)),l=u("div",{props:[d({}),{children:g}]});return React.createElement(c,{value:e},l)};export{q as a};
|
package/dist/chunk-CABIUVTY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2LZJ7NTEjs = require('./chunk-2LZJ7NTE.js');var _hooks = require('@jamsrui/hooks');var i=e=>{let{getContentProps:r}=_chunk2LZJ7NTEjs.b.call(void 0, );return _hooks.useRenderElement.call(void 0, "div",{props:[r(e)]})};exports.a = i;
|
package/dist/chunk-CLFHT656.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2LZJ7NTEjs = require('./chunk-2LZJ7NTE.js');var _hooks = require('@jamsrui/hooks');var i=e=>{let{getErrorMessageProps:s,errorMessage:o}=_chunk2LZJ7NTEjs.b.call(void 0, );return _hooks.useRenderElement.call(void 0, "span",{props:[s(e),{children:o}]})};exports.a = i;
|
package/dist/chunk-D3VTNGLC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _utils = require('@jamsrui/utils');var[t,r]=_utils.createConfigContext.call(void 0, {displayName:"SwitchConfig"});exports.a = t; exports.b = r;
|
package/dist/chunk-DDA54MYZ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-ZMFP3ZII.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var n=r=>{let{getThumbProps:t}=e();return o("div",{props:[t(r)]})};export{n as a};
|
package/dist/chunk-DHSJ6D3Y.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2LZJ7NTEjs = require('./chunk-2LZJ7NTE.js');var _hooks = require('@jamsrui/hooks');var i=t=>{let{getLabelProps:o,label:e}=_chunk2LZJ7NTEjs.b.call(void 0, ),l=_hooks.useRenderElement.call(void 0, "label",{props:[o(t),{children:e}]});return e?l:null};exports.a = i;
|
package/dist/chunk-HSHMMCEU.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./chunk-ZMFP3ZII.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var c=t=>{let{getTrackProps:e}=r();return o("button",{props:[e(t)]})};export{c as a};
|
package/dist/chunk-IGNAWQUV.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createConfigContext as o}from"@jamsrui/utils";var[t,r]=o({displayName:"SwitchConfig"});export{t as a,r as b};
|
package/dist/chunk-KK3YODKW.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as t}from"./chunk-ZMFP3ZII.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var i=e=>{let{getContentProps:r}=t();return o("div",{props:[r(e)]})};export{i as a};
|
package/dist/chunk-MDPXI2FD.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./chunk-ZMFP3ZII.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var i=e=>{let{getErrorMessageProps:s,errorMessage:o}=r();return t("span",{props:[s(e),{children:o}]})};export{i as a};
|
package/dist/chunk-OIF5SWKN.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as l}from"./chunk-BCSK4AAO.mjs";import{useCallback as a,useMemo as M}from"react";import{cn as o,dataAttrDev as u,mapPropsVariants as T,mergeProps as c}from"@jamsrui/utils";var I=k=>{let[f,C]=T(k,l.variantKeys),s=l(C),{classNames:r,slotProps:e,label:i,errorMessage:n,children:y,isChecked:G,defaultChecked:v,onCheckedChange:D,isDisabled:x,isReadonly:E,...p}=f,m=a(()=>({...p,"data-slot":u("root"),"data-component":u("switch"),className:s.root({className:o(r?.root,p.className)})}),[r?.root,p,s]),h=a(t=>({...c(e?.thumb,t),"data-slot":"thumb",className:s.thumb({className:o(e?.thumb?.className,r?.thumb,t.className)})}),[r?.thumb,e?.thumb,s]),w=a(t=>({...c(e?.label,t),"data-slot":"label",className:s.label({className:o(e?.label?.className,r?.label,t.className)})}),[r?.label,e?.label,s]),P=a(t=>({...c(e?.description,t),"data-slot":"description",className:s.description({className:o(e?.description?.className,r?.description,t.className)})}),[r?.description,e?.description,s]),b=a(t=>({...c(e?.content,t),"data-slot":"content",className:s.content({className:o(e?.content?.className,r?.content,t.className)})}),[r?.content,e?.content,s]),d=a(t=>({...c(e?.wrapper,t),"data-slot":"wrapper",className:s.wrapper({className:o(e?.wrapper?.className,r?.wrapper,t.className)})}),[r?.wrapper,e?.wrapper,s]),N=a(t=>({...c(e?.track,t),"data-slot":"track",className:s.track({className:o(e?.track?.className,r?.track,t.className)})}),[r?.track,e?.track,s]),S=a(t=>({...c(e?.errorMessage,t),"data-slot":"error-message",className:s.errorMessage({className:o(e?.errorMessage?.className,r?.errorMessage,t.className)})}),[r?.errorMessage,e?.errorMessage,s]),g=!!i||!!y;return M(()=>({getRootProps:m,getThumbProps:h,getLabelProps:w,getDescriptionProps:P,getContentProps:b,getWrapperProps:d,getTrackProps:N,getErrorMessageProps:S,label:i,errorMessage:n,hasContent:g}),[m,h,w,P,b,d,N,S,i,n,g])};export{I as a};
|
package/dist/chunk-Q5HFLFKD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2LZJ7NTEjs = require('./chunk-2LZJ7NTE.js');var _hooks = require('@jamsrui/hooks');var n=r=>{let{getThumbProps:t}=_chunk2LZJ7NTEjs.b.call(void 0, );return _hooks.useRenderElement.call(void 0, "div",{props:[t(r)]})};exports.a = n;
|
package/dist/chunk-TEP4KR32.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _utils = require('@jamsrui/utils');var s="",a= exports.b =_utils.tv.call(void 0, {slots:{root:"group flex flex-col gap-2",track:[..._utils.focusVisibleClasses,"flex cursor-pointer shrink-0 items-center rounded-full bg-surface-secondary p-1","uig-disabled:cursor-not-allowed uig-disabled:opacity-60","cursor-default ui-interactive:cursor-pointer ui-interactive:hover:opacity-95","justify-start uig-checked:justify-end"],thumb:"size-8 rounded-full bg-white shadow-md",label:"text-sm uig-interactive:cursor-pointer",description:"text-xs text-foreground-500",content:"grid grow gap-1",wrapper:"flex items-center justify-between gap-2",errorMessage:"text-danger text-xs"},variants:{isInvalid:{true:{}},color:{default:{track:"uig-checked:bg-default"},primary:{track:"uig-checked:bg-primary"},secondary:{track:"uig-checked:bg-secondary"},success:{track:"uig-checked:bg-success"},warning:{track:"uig-checked:bg-warning"},danger:{track:"uig-checked:bg-danger"}},size:{xs:{track:"h-4 w-7 px-0.5",thumb:"size-3"},sm:{track:"h-6 w-10",thumb:"size-4"},md:{track:"mr-2 h-7 w-12",thumb:"size-5"},lg:{track:"mr-2 h-8 w-14",thumb:"size-6"}},labelPlacement:{start:{wrapper:"flex-row"},end:{wrapper:"flex-row-reverse"},top:{wrapper:"flex-col"},bottom:{wrapper:"flex-col-reverse"}}},defaultVariants:{size:"md",color:"success",labelPlacement:"start"}});exports.a = s; exports.b = a;
|
package/dist/chunk-UP35U2LS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkW374VGMMjs = require('./chunk-W374VGMM.js');var _chunkCABIUVTYjs = require('./chunk-CABIUVTY.js');var _chunkCLFHT656js = require('./chunk-CLFHT656.js');var _chunkXO5NKDV5js = require('./chunk-XO5NKDV5.js');var _chunkD3VTNGLCjs = require('./chunk-D3VTNGLC.js');var _chunkBEV2H3POjs = require('./chunk-BEV2H3PO.js');var _chunkDHSJ6D3Yjs = require('./chunk-DHSJ6D3Y.js');var _chunkQ5HFLFKDjs = require('./chunk-Q5HFLFKD.js');var _chunkZU4NB4BTjs = require('./chunk-ZU4NB4BT.js');var _chunk2LZJ7NTEjs = require('./chunk-2LZJ7NTE.js');var _hooks = require('@jamsrui/hooks');var _utils = require('@jamsrui/utils');var q=t=>{let{children:o}=t,r=_chunkD3VTNGLCjs.b.call(void 0, ),a=_utils.mergeConfigProps.call(void 0, r,r,t),e=_chunkXO5NKDV5js.a.call(void 0, a),{getRootProps:d,hasContent:C}=e,g=React.createElement(React.Fragment,null,React.createElement(_chunkW374VGMMjs.a,null,!!C&&React.createElement(_chunkCABIUVTYjs.a,null,React.createElement(_chunkDHSJ6D3Yjs.a,null),!!o&&React.createElement(_chunkBEV2H3POjs.a,null,o)),React.createElement(_chunkZU4NB4BTjs.a,null,React.createElement(_chunkQ5HFLFKDjs.a,null))),React.createElement(_chunkCLFHT656js.a,null)),l=_hooks.useRenderElement.call(void 0, "div",{props:[d({}),{children:g}]});return React.createElement(_chunk2LZJ7NTEjs.a,{value:e},l)};exports.a = q;
|
package/dist/chunk-W374VGMM.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2LZJ7NTEjs = require('./chunk-2LZJ7NTE.js');var _hooks = require('@jamsrui/hooks');var i=e=>{let{getWrapperProps:t}=_chunk2LZJ7NTEjs.b.call(void 0, );return _hooks.useRenderElement.call(void 0, "div",{props:[t(e)]})};exports.a = i;
|
package/dist/chunk-XO5NKDV5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkTEP4KR32js = require('./chunk-TEP4KR32.js');var _react = require('react');var _utils = require('@jamsrui/utils');var I=k=>{let[f,C]=_utils.mapPropsVariants.call(void 0, k,_chunkTEP4KR32js.b.variantKeys),s=_chunkTEP4KR32js.b.call(void 0, C),{classNames:r,slotProps:e,label:i,errorMessage:n,children:y,isChecked:G,defaultChecked:v,onCheckedChange:D,isDisabled:x,isReadonly:E,...p}=f,m=_react.useCallback.call(void 0, ()=>({...p,"data-slot":_utils.dataAttrDev.call(void 0, "root"),"data-component":_utils.dataAttrDev.call(void 0, "switch"),className:s.root({className:_utils.cn.call(void 0, _optionalChain([r, 'optionalAccess', _ => _.root]),p.className)})}),[_optionalChain([r, 'optionalAccess', _2 => _2.root]),p,s]),h=_react.useCallback.call(void 0, t=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _3 => _3.thumb]),t),"data-slot":"thumb",className:s.thumb({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _4 => _4.thumb, 'optionalAccess', _5 => _5.className]),_optionalChain([r, 'optionalAccess', _6 => _6.thumb]),t.className)})}),[_optionalChain([r, 'optionalAccess', _7 => _7.thumb]),_optionalChain([e, 'optionalAccess', _8 => _8.thumb]),s]),w=_react.useCallback.call(void 0, t=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _9 => _9.label]),t),"data-slot":"label",className:s.label({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _10 => _10.label, 'optionalAccess', _11 => _11.className]),_optionalChain([r, 'optionalAccess', _12 => _12.label]),t.className)})}),[_optionalChain([r, 'optionalAccess', _13 => _13.label]),_optionalChain([e, 'optionalAccess', _14 => _14.label]),s]),P=_react.useCallback.call(void 0, t=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _15 => _15.description]),t),"data-slot":"description",className:s.description({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _16 => _16.description, 'optionalAccess', _17 => _17.className]),_optionalChain([r, 'optionalAccess', _18 => _18.description]),t.className)})}),[_optionalChain([r, 'optionalAccess', _19 => _19.description]),_optionalChain([e, 'optionalAccess', _20 => _20.description]),s]),b=_react.useCallback.call(void 0, t=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _21 => _21.content]),t),"data-slot":"content",className:s.content({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _22 => _22.content, 'optionalAccess', _23 => _23.className]),_optionalChain([r, 'optionalAccess', _24 => _24.content]),t.className)})}),[_optionalChain([r, 'optionalAccess', _25 => _25.content]),_optionalChain([e, 'optionalAccess', _26 => _26.content]),s]),d=_react.useCallback.call(void 0, t=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _27 => _27.wrapper]),t),"data-slot":"wrapper",className:s.wrapper({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _28 => _28.wrapper, 'optionalAccess', _29 => _29.className]),_optionalChain([r, 'optionalAccess', _30 => _30.wrapper]),t.className)})}),[_optionalChain([r, 'optionalAccess', _31 => _31.wrapper]),_optionalChain([e, 'optionalAccess', _32 => _32.wrapper]),s]),N=_react.useCallback.call(void 0, t=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _33 => _33.track]),t),"data-slot":"track",className:s.track({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _34 => _34.track, 'optionalAccess', _35 => _35.className]),_optionalChain([r, 'optionalAccess', _36 => _36.track]),t.className)})}),[_optionalChain([r, 'optionalAccess', _37 => _37.track]),_optionalChain([e, 'optionalAccess', _38 => _38.track]),s]),S=_react.useCallback.call(void 0, t=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _39 => _39.errorMessage]),t),"data-slot":"error-message",className:s.errorMessage({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _40 => _40.errorMessage, 'optionalAccess', _41 => _41.className]),_optionalChain([r, 'optionalAccess', _42 => _42.errorMessage]),t.className)})}),[_optionalChain([r, 'optionalAccess', _43 => _43.errorMessage]),_optionalChain([e, 'optionalAccess', _44 => _44.errorMessage]),s]),g=!!i||!!y;return _react.useMemo.call(void 0, ()=>({getRootProps:m,getThumbProps:h,getLabelProps:w,getDescriptionProps:P,getContentProps:b,getWrapperProps:d,getTrackProps:N,getErrorMessageProps:S,label:i,errorMessage:n,hasContent:g}),[m,h,w,P,b,d,N,S,i,n,g])};exports.a = I;
|
package/dist/chunk-ZMFP3ZII.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContext as e,use as o}from"react";var n=e(null),c=()=>{let t=o(n);if(!t)throw new Error("useSwitchContext must be used within SwitchContext");return t};export{n as a,c as b};
|
package/dist/chunk-ZU4NB4BT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2LZJ7NTEjs = require('./chunk-2LZJ7NTE.js');var _hooks = require('@jamsrui/hooks');var c=t=>{let{getTrackProps:e}=_chunk2LZJ7NTEjs.b.call(void 0, );return _hooks.useRenderElement.call(void 0, "button",{props:[e(t)]})};exports.a = c;
|
package/dist/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export { S as Switch } from './switch-rDfweH_z.js';
|
|
2
|
-
export { SwitchConfig, useSwitchConfig } from './switch-config.js';
|
|
3
|
-
import 'react';
|
|
4
|
-
import '@jamsrui/utils';
|
|
5
|
-
import './styles.js';
|
|
6
|
-
import 'tailwind-variants';
|
|
7
|
-
import './switch-description.js';
|
|
8
|
-
import './switch-label.js';
|
|
9
|
-
import './switch-thumb.js';
|
|
10
|
-
import './switch-track.js';
|
|
11
|
-
import './switch-wrapper.js';
|
|
12
|
-
import './swith-content.js';
|
|
13
|
-
import './swith-error-message.js';
|
|
14
|
-
import '@jamsrui/core';
|
package/dist/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkUP35U2LSjs = require('./chunk-UP35U2LS.js');require('./chunk-W374VGMM.js');require('./chunk-CABIUVTY.js');require('./chunk-CLFHT656.js');require('./chunk-XO5NKDV5.js');require('./chunk-TEP4KR32.js');var _chunkD3VTNGLCjs = require('./chunk-D3VTNGLC.js');require('./chunk-BEV2H3PO.js');require('./chunk-DHSJ6D3Y.js');require('./chunk-Q5HFLFKD.js');require('./chunk-ZU4NB4BT.js');require('./chunk-2LZJ7NTE.js');exports.Switch = _chunkUP35U2LSjs.a; exports.SwitchConfig = _chunkD3VTNGLCjs.a; exports.useSwitchConfig = _chunkD3VTNGLCjs.b;
|
package/dist/styles.d.ts
DELETED
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
-
import { VariantProps } from '@jamsrui/utils';
|
|
3
|
-
|
|
4
|
-
declare const test = "";
|
|
5
|
-
declare const switchVariants: tailwind_variants.TVReturnType<{
|
|
6
|
-
isInvalid: {
|
|
7
|
-
true: {};
|
|
8
|
-
};
|
|
9
|
-
color: {
|
|
10
|
-
default: {
|
|
11
|
-
track: string;
|
|
12
|
-
};
|
|
13
|
-
primary: {
|
|
14
|
-
track: string;
|
|
15
|
-
};
|
|
16
|
-
secondary: {
|
|
17
|
-
track: string;
|
|
18
|
-
};
|
|
19
|
-
success: {
|
|
20
|
-
track: string;
|
|
21
|
-
};
|
|
22
|
-
warning: {
|
|
23
|
-
track: string;
|
|
24
|
-
};
|
|
25
|
-
danger: {
|
|
26
|
-
track: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
size: {
|
|
30
|
-
xs: {
|
|
31
|
-
track: string;
|
|
32
|
-
thumb: string;
|
|
33
|
-
};
|
|
34
|
-
sm: {
|
|
35
|
-
track: string;
|
|
36
|
-
thumb: string;
|
|
37
|
-
};
|
|
38
|
-
md: {
|
|
39
|
-
track: string;
|
|
40
|
-
thumb: string;
|
|
41
|
-
};
|
|
42
|
-
lg: {
|
|
43
|
-
track: string;
|
|
44
|
-
thumb: string;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
labelPlacement: {
|
|
48
|
-
start: {
|
|
49
|
-
wrapper: string;
|
|
50
|
-
};
|
|
51
|
-
end: {
|
|
52
|
-
wrapper: string;
|
|
53
|
-
};
|
|
54
|
-
top: {
|
|
55
|
-
wrapper: string;
|
|
56
|
-
};
|
|
57
|
-
bottom: {
|
|
58
|
-
wrapper: string;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
}, {
|
|
62
|
-
root: string;
|
|
63
|
-
track: string[];
|
|
64
|
-
thumb: string;
|
|
65
|
-
label: string;
|
|
66
|
-
description: string;
|
|
67
|
-
content: string;
|
|
68
|
-
wrapper: string;
|
|
69
|
-
errorMessage: string;
|
|
70
|
-
}, undefined, {
|
|
71
|
-
isInvalid: {
|
|
72
|
-
true: {};
|
|
73
|
-
};
|
|
74
|
-
color: {
|
|
75
|
-
default: {
|
|
76
|
-
track: string;
|
|
77
|
-
};
|
|
78
|
-
primary: {
|
|
79
|
-
track: string;
|
|
80
|
-
};
|
|
81
|
-
secondary: {
|
|
82
|
-
track: string;
|
|
83
|
-
};
|
|
84
|
-
success: {
|
|
85
|
-
track: string;
|
|
86
|
-
};
|
|
87
|
-
warning: {
|
|
88
|
-
track: string;
|
|
89
|
-
};
|
|
90
|
-
danger: {
|
|
91
|
-
track: string;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
size: {
|
|
95
|
-
xs: {
|
|
96
|
-
track: string;
|
|
97
|
-
thumb: string;
|
|
98
|
-
};
|
|
99
|
-
sm: {
|
|
100
|
-
track: string;
|
|
101
|
-
thumb: string;
|
|
102
|
-
};
|
|
103
|
-
md: {
|
|
104
|
-
track: string;
|
|
105
|
-
thumb: string;
|
|
106
|
-
};
|
|
107
|
-
lg: {
|
|
108
|
-
track: string;
|
|
109
|
-
thumb: string;
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
labelPlacement: {
|
|
113
|
-
start: {
|
|
114
|
-
wrapper: string;
|
|
115
|
-
};
|
|
116
|
-
end: {
|
|
117
|
-
wrapper: string;
|
|
118
|
-
};
|
|
119
|
-
top: {
|
|
120
|
-
wrapper: string;
|
|
121
|
-
};
|
|
122
|
-
bottom: {
|
|
123
|
-
wrapper: string;
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
}, {
|
|
127
|
-
root: string;
|
|
128
|
-
track: string[];
|
|
129
|
-
thumb: string;
|
|
130
|
-
label: string;
|
|
131
|
-
description: string;
|
|
132
|
-
content: string;
|
|
133
|
-
wrapper: string;
|
|
134
|
-
errorMessage: string;
|
|
135
|
-
}, tailwind_variants.TVReturnType<{
|
|
136
|
-
isInvalid: {
|
|
137
|
-
true: {};
|
|
138
|
-
};
|
|
139
|
-
color: {
|
|
140
|
-
default: {
|
|
141
|
-
track: string;
|
|
142
|
-
};
|
|
143
|
-
primary: {
|
|
144
|
-
track: string;
|
|
145
|
-
};
|
|
146
|
-
secondary: {
|
|
147
|
-
track: string;
|
|
148
|
-
};
|
|
149
|
-
success: {
|
|
150
|
-
track: string;
|
|
151
|
-
};
|
|
152
|
-
warning: {
|
|
153
|
-
track: string;
|
|
154
|
-
};
|
|
155
|
-
danger: {
|
|
156
|
-
track: string;
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
size: {
|
|
160
|
-
xs: {
|
|
161
|
-
track: string;
|
|
162
|
-
thumb: string;
|
|
163
|
-
};
|
|
164
|
-
sm: {
|
|
165
|
-
track: string;
|
|
166
|
-
thumb: string;
|
|
167
|
-
};
|
|
168
|
-
md: {
|
|
169
|
-
track: string;
|
|
170
|
-
thumb: string;
|
|
171
|
-
};
|
|
172
|
-
lg: {
|
|
173
|
-
track: string;
|
|
174
|
-
thumb: string;
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
labelPlacement: {
|
|
178
|
-
start: {
|
|
179
|
-
wrapper: string;
|
|
180
|
-
};
|
|
181
|
-
end: {
|
|
182
|
-
wrapper: string;
|
|
183
|
-
};
|
|
184
|
-
top: {
|
|
185
|
-
wrapper: string;
|
|
186
|
-
};
|
|
187
|
-
bottom: {
|
|
188
|
-
wrapper: string;
|
|
189
|
-
};
|
|
190
|
-
};
|
|
191
|
-
}, {
|
|
192
|
-
root: string;
|
|
193
|
-
track: string[];
|
|
194
|
-
thumb: string;
|
|
195
|
-
label: string;
|
|
196
|
-
description: string;
|
|
197
|
-
content: string;
|
|
198
|
-
wrapper: string;
|
|
199
|
-
errorMessage: string;
|
|
200
|
-
}, undefined, unknown, unknown, undefined>>;
|
|
201
|
-
type SwitchVariants = VariantProps<typeof switchVariants>;
|
|
202
|
-
type SwitchSlots = keyof ReturnType<typeof switchVariants>;
|
|
203
|
-
|
|
204
|
-
export { type SwitchSlots, type SwitchVariants, switchVariants, test };
|
package/dist/styles.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTEP4KR32js = require('./chunk-TEP4KR32.js');exports.switchVariants = _chunkTEP4KR32js.b; exports.test = _chunkTEP4KR32js.a;
|
package/dist/switch-config.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { S as Switch } from './switch-rDfweH_z.js';
|
|
2
|
-
import * as react from 'react';
|
|
3
|
-
import { GlobalConfigProps } from '@jamsrui/core';
|
|
4
|
-
import '@jamsrui/utils';
|
|
5
|
-
import './styles.js';
|
|
6
|
-
import 'tailwind-variants';
|
|
7
|
-
import './switch-description.js';
|
|
8
|
-
import './switch-label.js';
|
|
9
|
-
import './switch-thumb.js';
|
|
10
|
-
import './switch-track.js';
|
|
11
|
-
import './switch-wrapper.js';
|
|
12
|
-
import './swith-content.js';
|
|
13
|
-
import './swith-error-message.js';
|
|
14
|
-
|
|
15
|
-
declare const useSwitchConfig: () => SwitchConfig.Props;
|
|
16
|
-
declare const SwitchConfig: (props: SwitchConfig.Props & {
|
|
17
|
-
merge?: boolean;
|
|
18
|
-
}) => react.JSX.Element;
|
|
19
|
-
declare namespace SwitchConfig {
|
|
20
|
-
interface Props extends Switch.Props, GlobalConfigProps<Switch.Props> {
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { SwitchConfig, useSwitchConfig };
|
package/dist/switch-config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkD3VTNGLCjs = require('./chunk-D3VTNGLC.js');exports.SwitchConfig = _chunkD3VTNGLCjs.a; exports.useSwitchConfig = _chunkD3VTNGLCjs.b;
|
package/dist/switch-context.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { u as useSwitch } from './switch-rDfweH_z.js';
|
|
3
|
-
import '@jamsrui/utils';
|
|
4
|
-
import './styles.js';
|
|
5
|
-
import 'tailwind-variants';
|
|
6
|
-
import './switch-description.js';
|
|
7
|
-
import './switch-label.js';
|
|
8
|
-
import './switch-thumb.js';
|
|
9
|
-
import './switch-track.js';
|
|
10
|
-
import './switch-wrapper.js';
|
|
11
|
-
import './swith-content.js';
|
|
12
|
-
import './swith-error-message.js';
|
|
13
|
-
|
|
14
|
-
declare const useSwitchContext: () => SwitchContext.Props;
|
|
15
|
-
declare const SwitchContext: react.Context<SwitchContext.Props | null>;
|
|
16
|
-
declare namespace SwitchContext {
|
|
17
|
-
interface Props extends ReturnType<typeof useSwitch> {
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { SwitchContext, useSwitchContext };
|
package/dist/switch-context.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2LZJ7NTEjs = require('./chunk-2LZJ7NTE.js');exports.SwitchContext = _chunk2LZJ7NTEjs.a; exports.useSwitchContext = _chunk2LZJ7NTEjs.b;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { UIProps } from '@jamsrui/utils';
|
|
3
|
-
|
|
4
|
-
declare const SwitchDescription: (props: SwitchDescription.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
|
-
declare namespace SwitchDescription {
|
|
6
|
-
interface Props extends UIProps<"div"> {
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { SwitchDescription };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBEV2H3POjs = require('./chunk-BEV2H3PO.js');require('./chunk-2LZJ7NTE.js');exports.SwitchDescription = _chunkBEV2H3POjs.a;
|
package/dist/switch-label.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { UIProps } from '@jamsrui/utils';
|
|
3
|
-
|
|
4
|
-
declare const SwitchLabel: (props: SwitchLabel.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
|
|
5
|
-
declare namespace SwitchLabel {
|
|
6
|
-
interface Props extends UIProps<"label"> {
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { SwitchLabel };
|
package/dist/switch-label.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDHSJ6D3Yjs = require('./chunk-DHSJ6D3Y.js');require('./chunk-2LZJ7NTE.js');exports.SwitchLabel = _chunkDHSJ6D3Yjs.a;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { PropGetter, UIProps, SlotsToClassNames } from '@jamsrui/utils';
|
|
3
|
-
import { SwitchVariants, SwitchSlots } from './styles.js';
|
|
4
|
-
import { SwitchDescription } from './switch-description.js';
|
|
5
|
-
import { SwitchLabel } from './switch-label.js';
|
|
6
|
-
import { SwitchThumb } from './switch-thumb.js';
|
|
7
|
-
import { SwitchTrack } from './switch-track.js';
|
|
8
|
-
import { SwitchWrapper } from './switch-wrapper.js';
|
|
9
|
-
import { SwitchContent } from './swith-content.js';
|
|
10
|
-
import { SwitchErrorMessage } from './swith-error-message.js';
|
|
11
|
-
|
|
12
|
-
declare const useSwitch: (props: useSwitch.Props) => {
|
|
13
|
-
getRootProps: PropGetter<Switch.Props>;
|
|
14
|
-
getThumbProps: PropGetter<SwitchThumb.Props>;
|
|
15
|
-
getLabelProps: PropGetter<SwitchLabel.Props>;
|
|
16
|
-
getDescriptionProps: PropGetter<SwitchDescription.Props>;
|
|
17
|
-
getContentProps: PropGetter<SwitchContent.Props>;
|
|
18
|
-
getWrapperProps: PropGetter<SwitchWrapper.Props>;
|
|
19
|
-
getTrackProps: PropGetter<SwitchTrack.Props>;
|
|
20
|
-
getErrorMessageProps: PropGetter<SwitchErrorMessage.Props>;
|
|
21
|
-
label: string | undefined;
|
|
22
|
-
errorMessage: string | undefined;
|
|
23
|
-
hasContent: boolean;
|
|
24
|
-
};
|
|
25
|
-
declare namespace useSwitch {
|
|
26
|
-
interface Props extends SwitchVariants, UIProps<"div"> {
|
|
27
|
-
label?: string;
|
|
28
|
-
errorMessage?: string;
|
|
29
|
-
classNames?: SlotsToClassNames<SwitchSlots>;
|
|
30
|
-
slotProps?: {
|
|
31
|
-
track?: SwitchTrack.Props;
|
|
32
|
-
thumb?: SwitchThumb.Props;
|
|
33
|
-
label?: SwitchLabel.Props;
|
|
34
|
-
description?: SwitchDescription.Props;
|
|
35
|
-
content?: SwitchContent.Props;
|
|
36
|
-
wrapper?: SwitchWrapper.Props;
|
|
37
|
-
errorMessage?: SwitchErrorMessage.Props;
|
|
38
|
-
};
|
|
39
|
-
isReadonly?: boolean;
|
|
40
|
-
isDisabled?: boolean;
|
|
41
|
-
isChecked?: boolean;
|
|
42
|
-
onCheckedChange?: (value: boolean) => void;
|
|
43
|
-
defaultChecked?: boolean;
|
|
44
|
-
isInvalid?: boolean;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
declare const Switch: (props: Switch.Props) => react.JSX.Element;
|
|
49
|
-
declare namespace Switch {
|
|
50
|
-
interface Props extends useSwitch.Props {
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export { Switch as S, useSwitch as u };
|
package/dist/switch-thumb.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { UIProps } from '@jamsrui/utils';
|
|
3
|
-
|
|
4
|
-
declare const SwitchThumb: (props: SwitchThumb.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
|
-
declare namespace SwitchThumb {
|
|
6
|
-
interface Props extends UIProps<"div"> {
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { SwitchThumb };
|
package/dist/switch-thumb.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkQ5HFLFKDjs = require('./chunk-Q5HFLFKD.js');require('./chunk-2LZJ7NTE.js');exports.SwitchThumb = _chunkQ5HFLFKDjs.a;
|
package/dist/switch-track.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { UIProps } from '@jamsrui/utils';
|
|
3
|
-
|
|
4
|
-
declare const SwitchTrack: (props: SwitchTrack.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
|
-
declare namespace SwitchTrack {
|
|
6
|
-
interface Props extends UIProps<"button"> {
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { SwitchTrack };
|
package/dist/switch-track.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZU4NB4BTjs = require('./chunk-ZU4NB4BT.js');require('./chunk-2LZJ7NTE.js');exports.SwitchTrack = _chunkZU4NB4BTjs.a;
|
package/dist/switch-wrapper.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { UIProps } from '@jamsrui/utils';
|
|
3
|
-
|
|
4
|
-
declare const SwitchWrapper: (props: SwitchWrapper.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
|
-
declare namespace SwitchWrapper {
|
|
6
|
-
interface Props extends UIProps<"div"> {
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { SwitchWrapper };
|
package/dist/switch-wrapper.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkW374VGMMjs = require('./chunk-W374VGMM.js');require('./chunk-2LZJ7NTE.js');exports.SwitchWrapper = _chunkW374VGMMjs.a;
|
package/dist/switch.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import 'react';
|
|
2
|
-
export { S as Switch } from './switch-rDfweH_z.js';
|
|
3
|
-
import '@jamsrui/utils';
|
|
4
|
-
import './styles.js';
|
|
5
|
-
import 'tailwind-variants';
|
|
6
|
-
import './switch-description.js';
|
|
7
|
-
import './switch-label.js';
|
|
8
|
-
import './switch-thumb.js';
|
|
9
|
-
import './switch-track.js';
|
|
10
|
-
import './switch-wrapper.js';
|
|
11
|
-
import './swith-content.js';
|
|
12
|
-
import './swith-error-message.js';
|
package/dist/switch.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUP35U2LSjs = require('./chunk-UP35U2LS.js');require('./chunk-W374VGMM.js');require('./chunk-CABIUVTY.js');require('./chunk-CLFHT656.js');require('./chunk-XO5NKDV5.js');require('./chunk-TEP4KR32.js');require('./chunk-D3VTNGLC.js');require('./chunk-BEV2H3PO.js');require('./chunk-DHSJ6D3Y.js');require('./chunk-Q5HFLFKD.js');require('./chunk-ZU4NB4BT.js');require('./chunk-2LZJ7NTE.js');exports.Switch = _chunkUP35U2LSjs.a;
|
package/dist/swith-content.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { UIProps } from '@jamsrui/utils';
|
|
3
|
-
|
|
4
|
-
declare const SwitchContent: (props: SwitchContent.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
|
-
declare namespace SwitchContent {
|
|
6
|
-
interface Props extends UIProps<"div"> {
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { SwitchContent };
|
package/dist/swith-content.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkCABIUVTYjs = require('./chunk-CABIUVTY.js');require('./chunk-2LZJ7NTE.js');exports.SwitchContent = _chunkCABIUVTYjs.a;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { UIProps } from '@jamsrui/utils';
|
|
3
|
-
|
|
4
|
-
declare const SwitchErrorMessage: (props: SwitchErrorMessage.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
|
-
declare namespace SwitchErrorMessage {
|
|
6
|
-
interface Props extends UIProps<"span"> {
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { SwitchErrorMessage };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkCLFHT656js = require('./chunk-CLFHT656.js');require('./chunk-2LZJ7NTE.js');exports.SwitchErrorMessage = _chunkCLFHT656js.a;
|
package/dist/use-switch.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import '@jamsrui/utils';
|
|
2
|
-
import './styles.js';
|
|
3
|
-
export { u as useSwitch } from './switch-rDfweH_z.js';
|
|
4
|
-
import './switch-description.js';
|
|
5
|
-
import './switch-label.js';
|
|
6
|
-
import './switch-thumb.js';
|
|
7
|
-
import './switch-track.js';
|
|
8
|
-
import './switch-wrapper.js';
|
|
9
|
-
import './swith-content.js';
|
|
10
|
-
import './swith-error-message.js';
|
|
11
|
-
import 'tailwind-variants';
|
|
12
|
-
import 'react';
|
package/dist/use-switch.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXO5NKDV5js = require('./chunk-XO5NKDV5.js');require('./chunk-TEP4KR32.js');exports.useSwitch = _chunkXO5NKDV5js.a;
|