@loja-integrada/admin-components 1.3.3 → 1.3.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.
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import t from 'react';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
var v=({label:p,id:m,name:f,onChange:s,checked:a,disabled:l,...o},k)=>{let r=m||f,[n,c]=t.useState(a||!1),d=l?"disabled":"enabled",g=n?"checked":"unchecked";t.useEffect(()=>{c(!!a);},[a]);let h=i=>{l||o.readOnly||(c(i.target.checked),s&&s(i));},b={background:{checked:{enabled:"bg-primary border-primary",disabled:"bg-base-3 border-card-stroke"},unchecked:{enabled:"bg-base-1 border-card-stroke",disabled:"bg-base-3 border-card-stroke"}},circle:{checked:{enabled:"translate-x-full ml-px bg-base-1",disabled:"translate-x-full ml-px bg-base-1"},unchecked:{enabled:"translate-x-0 bg-inverted-2",disabled:"translate-x-0 bg-base-1"}}},x=`${l?"pointer-events-none":""} relative`,C=`block border w-[53px] h-8 rounded-full ${b.background[g][d]} transition`,T=`transform ${b.circle[g][d]} absolute left-[6px] top-[6px] w-5 h-5 rounded-full transition`;return jsxs("label",{htmlFor:r,className:"inline-flex cursor-pointer items-center",children:[jsxs("div",{className:`${x}`,children:[jsx("input",{ref:k,type:"checkbox",id:r,className:"sr-only",checked:n,onChange:h,...o}),jsx("div",{className:C}),jsx("div",{className:T})]}),jsx("div",{className:"ml-2 text-inverted-1 text-f6 tracking-4 label",children:p})]})},R=t.forwardRef(v),N=t.memo(R);N.displayName="Toggle";
|
|
5
|
+
|
|
6
|
+
export { N as a };
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
var v=({label:p,id:m,name:f,onChange:s,checked:a,disabled:l,...o},k)=>{let r=m||f,[n,c]=t.useState(a||!1),d=l?"disabled":"enabled",g=n?"checked":"unchecked";t.useEffect(()=>{c(!!a);},[a]);let h=i=>{l||o.readOnly||(c(i.target.checked),s&&s(i));},b={background:{checked:{enabled:"bg-primary border-primary",disabled:"bg-base-3 border-card-stroke"},unchecked:{enabled:"bg-base-1 border-card-stroke",disabled:"bg-base-3 border-card-stroke"}},circle:{checked:{enabled:"translate-x-full ml-px bg-base-1",disabled:"translate-x-full ml-px bg-base-1"},unchecked:{enabled:"translate-x-0 bg-inverted-2",disabled:"translate-x-0 bg-base-1"}}},x=`${l?"pointer-events-none":""} relative`,C=`block border w-[53px] h-8 rounded-full ${b.background[g][d]} transition`,T=`transform ${b.circle[g][d]} absolute left-[6px] top-[6px] w-5 h-5 rounded-full transition`;return jsxs("label",{htmlFor:r,className:"inline-flex cursor-pointer items-center",children:[jsxs("div",{className:`${x}`,children:[jsx("input",{ref:k,type:"checkbox",id:r,className:"sr-only",checked:n,onChange:h,...o}),jsx("div",{className:C}),jsx("div",{className:T})]}),jsx("div",{className:"ml-2 text-inverted-1 text-f6 tracking-4 label",children:p})]})},R=t.forwardRef(v),N=t.memo(R);N.displayName="Toggle";
|
|
5
|
-
|
|
6
|
-
export { N as Toggle };
|
|
1
|
+
"use client";export { a as Toggle } from '../../chunk-K4PEKBET.js';
|
package/dist/forms/index.d.ts
CHANGED
package/dist/forms/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../chunk-
|
|
1
|
+
import '../chunk-4AI5YWIB.js';
|
|
2
2
|
export { a as TextArea } from '../chunk-7BT5L3CO.js';
|
|
3
3
|
export { b as Select, a as SelectComponent } from '../chunk-HZACKBIW.js';
|
|
4
4
|
export { a as Calendar } from '../chunk-PHVC2M6R.js';
|
|
@@ -14,6 +14,7 @@ export { a as Dropdown } from '../chunk-2K7HK2ZW.js';
|
|
|
14
14
|
export { a as InputMask } from '../chunk-NW24WOHT.js';
|
|
15
15
|
export { a as Input } from '../chunk-SJ4MATMO.js';
|
|
16
16
|
export { a as InputLabel } from '../chunk-7Z3CCBLX.js';
|
|
17
|
+
export { a as Toggle } from '../chunk-K4PEKBET.js';
|
|
17
18
|
import '../chunk-VVJUHPYS.js';
|
|
18
19
|
import '../chunk-JZ6ZGBZ4.js';
|
|
19
20
|
import '../chunk-DVFKTOCS.js';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './chunk-
|
|
1
|
+
import './chunk-4AI5YWIB.js';
|
|
2
2
|
export { a as TextArea } from './chunk-7BT5L3CO.js';
|
|
3
3
|
import './chunk-7RP4L6ZM.js';
|
|
4
4
|
import './chunk-4PUGMMDC.js';
|
|
@@ -22,6 +22,7 @@ export { a as Dropdown } from './chunk-2K7HK2ZW.js';
|
|
|
22
22
|
export { a as InputMask } from './chunk-NW24WOHT.js';
|
|
23
23
|
export { a as Input } from './chunk-SJ4MATMO.js';
|
|
24
24
|
export { a as InputLabel } from './chunk-7Z3CCBLX.js';
|
|
25
|
+
export { a as Toggle } from './chunk-K4PEKBET.js';
|
|
25
26
|
export { a as Alert } from './chunk-NGGA7AJU.js';
|
|
26
27
|
export { a as Badge } from './chunk-7NXFX6TD.js';
|
|
27
28
|
export { a as Tag } from './chunk-EUZRZJ5Q.js';
|
package/package.json
CHANGED
|
File without changes
|