@simpli-route/apollo-ds 0.0.11 → 0.0.12
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.cjs12.js +1 -1
- package/dist/index.cjs13.js +1 -1
- package/dist/index.cjs14.js +1 -1
- package/dist/index.cjs16.js +1 -1
- package/dist/index.cjs17.js +1 -1
- package/dist/index.cjs18.js +1 -1
- package/dist/index.cjs26.js +1 -1
- package/dist/index.cjs27.js +1 -1
- package/dist/index.cjs3.js +1 -1
- package/dist/index.cjs5.js +1 -1
- package/dist/index.cjs8.js +1 -1
- package/dist/index.es12.js +15 -10
- package/dist/index.es13.js +20 -10
- package/dist/index.es14.js +81 -20
- package/dist/index.es16.js +10 -15
- package/dist/index.es17.js +10 -20
- package/dist/index.es18.js +20 -81
- package/dist/index.es26.js +1 -1
- package/dist/index.es27.js +1 -1
- package/dist/index.es3.js +1 -1
- package/dist/index.es5.js +3 -3
- package/dist/index.es8.js +3 -3
- package/dist/stories/Switch.stories.d.ts +2 -0
- package/package.json +2 -2
package/dist/index.cjs12.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index.cjs9.js"),r=require("./index.cjs10.js"),l=({label:e,description:n,errorMessage:x,isDisabled:s,isInvalid:c,children:u})=>!e&&!n&&!u?null:t.jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[e?t.jsxRuntimeExports.jsx("p",{className:r.cn("text-sm font-semibold",s?"text-neutral-600":"text-neutral-900"),children:e}):u,n&&!x&&t.jsxRuntimeExports.jsx("p",{className:r.cn("text-xs",s?"text-neutral-600":"text-neutral-700"),children:n}),c&&x&&t.jsxRuntimeExports.jsx("p",{className:"text-sm text-red-500",children:x})]});exports.ContentSwitch=l;
|
package/dist/index.cjs13.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index.cjs9.js"),s=require("./index.cjs10.js"),a=require("./index.cjs14.js"),c=({isSelected:t,isDisabled:e,isHovered:n,size:i,dimensions:r})=>o.jsxRuntimeExports.jsx("div",{className:s.cn(a.indicatorVariants({isSelected:t,isDisabled:e,size:i,isHoveredWhenOff:n&&!t})),style:{left:t?`${r.onLeft}px`:`${r.offLeft}px`}});exports.SwitchIndicator=c;
|
package/dist/index.cjs14.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("class-variance-authority"),r=e.cva("relative rounded-full transition-colors duration-300",{variants:{isSelected:{true:"bg-primary-500",false:"bg-neutral-50 border border-primary-200"},isDisabled:{true:"cursor-not-allowed bg-neutral-400 border-none",false:"cursor-pointer"},isHoveredWhenOff:{true:"bg-neutral-200 border-primary-700",false:""},isFocusVisible:{true:"ring-2 ring-sky-400 ring-offset-2",false:""},size:{sm:"w-[42px] h-[24px]",md:"w-[56px] h-[32px]"}},defaultVariants:{size:"md",isSelected:!1,isDisabled:!1,isFocusVisible:!1,isHoveredWhenOff:!1},compoundVariants:[{isSelected:!1,isDisabled:!1,class:"hover:bg-neutral-200 hover:border-primary-700"},{isSelected:!0,isDisabled:!1,class:"hover:bg-primary-700"},{isSelected:!1,isDisabled:!0,class:"bg-neutral-400 border-none"},{isSelected:!0,isDisabled:!0,class:"bg-neutral-500"}]}),s=e.cva("absolute top-1/2 transform -translate-y-1/2 transition-all duration-300 rounded-full",{variants:{isSelected:{true:"bg-primary-50",false:"bg-primary-200 border border-primary-200"},isDisabled:{true:"bg-neutral-600 border-none",false:""},isHoveredWhenOff:{true:"bg-primary-700 border-primary-700",false:""},size:{sm:"w-[20px] h-[20px]",md:"w-[24px] h-[24px]"}},defaultVariants:{size:"md",isSelected:!1,isDisabled:!1,isHoveredWhenOff:!1},compoundVariants:[{isSelected:!0,isDisabled:!0,class:"bg-neutral-400"}]});exports.indicatorVariants=s;exports.switchVariants=r;
|
package/dist/index.cjs16.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index.cjs9.js"),m=require("react"),q=require("react-aria"),v=require("./index.cjs10.js"),x=require("./index.cjs18.js"),y=r=>{const{className:n,item:i,orientation:c,state:e,id:o=void 0}=r,{key:t,rendered:a}=i,u=e.selectedKey===t,s=m.useRef(null),{tabProps:d}=q.useTab({key:String(t)},e,s),l=v.cn(x.tabVariants({isActive:u,orientation:c}),n);return b.jsxRuntimeExports.jsx("div",{...d,ref:s,className:l,id:o,children:a})};exports.Tab=y;
|
package/dist/index.cjs17.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index.cjs9.js"),l=require("react"),u=require("react-aria"),d=require("./index.cjs10.js"),b=r=>{var t;const{className:n,state:e,...c}=r,s=l.useRef(null),{tabPanelProps:a}=u.useTabPanel(c,e,s),o=d.cn("",n);return i.jsxRuntimeExports.jsx("div",{...a,ref:s,className:o,children:(t=e.selectedItem)==null?void 0:t.props.children})};exports.TabPanel=b;
|
package/dist/index.cjs18.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("class-variance-authority"),t=r.cva("flex h-full max-h-12",{variants:{orientation:{horizontal:"flex-col",vertical:"flex-row"}}}),e=r.cva("group inline-flex cursor-pointer items-center px-4 py-3 text-base font-semibold focus-visible:outline-none",{variants:{isActive:{true:"bg-primary-50 text-primary-600 ",false:"text-neutral-500 hover:text-primary-900"},orientation:{horizontal:"border-b-2 border-transparent",vertical:"border-r-2 border-transparent"}},compoundVariants:[{isActive:!0,orientation:"horizontal",class:"border-b-2 border-primary-500"},{isActive:!1,orientation:"horizontal",class:"border-b-2 border-primary-200"},{isActive:!1,orientation:"vertical",class:"border-r-2 border-primary-200"},{isActive:!0,orientation:"vertical",class:"border-r-2 border-primary-500"}]});exports.tabVariants=e;exports.tabsVariants=t;
|
package/dist/index.cjs26.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),e=l,o=({title:r,titleId:n,...t},c)=>e.createElement("svg",Object.assign({fill:"currentColor","aria-hidden":"true",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",ref:c,"aria-labelledby":n},t),r?e.createElement("title",{id:n},r):null,e.createElement("path",{fillRule:"evenodd",d:"M2 11.85c0-.47.35-.85.783-.85h18.434c.432 0 .783.38.783.85s-.35.85-.783.85H2.783c-.432 0-.783-.38-.783-.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),e=l,o=({title:r,titleId:n,...t},c)=>e.createElement("svg",Object.assign({fill:"currentColor","aria-hidden":"true",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",ref:c,"aria-labelledby":n},t),r?e.createElement("title",{id:n},r):null,e.createElement("path",{fillRule:"evenodd",d:"M2 11.85c0-.47.35-.85.783-.85h18.434c.432 0 .783.38.783.85s-.35.85-.783.85H2.783c-.432 0-.783-.38-.783-.85",clipRule:"evenodd"})),a=e.forwardRef(o);var i=a;exports.MinusIcon_1=i;
|
package/dist/index.cjs27.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),e=n,o=({title:r,titleId:l,...t},a)=>e.createElement("svg",Object.assign({fill:"currentColor","aria-hidden":"true",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":l},t),r?e.createElement("title",{id:l},r):null,e.createElement("path",{fillRule:"evenodd",d:"M11.885 2c.433 0 .783.35.783.783v8.434h8.549a.783.783 0 1 1 0 1.566h-8.549v8.434a.783.783 0 1 1-1.567 0v-8.434H2.783a.783.783 0 1 1 0-1.566h8.318V2.783c0-.432.351-.783.784-.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),e=n,o=({title:r,titleId:l,...t},a)=>e.createElement("svg",Object.assign({fill:"currentColor","aria-hidden":"true",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":l},t),r?e.createElement("title",{id:l},r):null,e.createElement("path",{fillRule:"evenodd",d:"M11.885 2c.433 0 .783.35.783.783v8.434h8.549a.783.783 0 1 1 0 1.566h-8.549v8.434a.783.783 0 1 1-1.567 0v-8.434H2.783a.783.783 0 1 1 0-1.566h8.318V2.783c0-.432.351-.783.784-.783",clipRule:"evenodd"})),c=e.forwardRef(o);var s=c;exports.PlusIcon_1=s;
|
package/dist/index.cjs3.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.cjs9.js"),E=require("react-aria-components"),p=require("./index.cjs10.js");require("react");const N=require("./index.cjs23.js"),w=require("./index.cjs4.js");require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.cjs9.js"),E=require("react-aria-components"),p=require("./index.cjs10.js");require("react");const N=require("./index.cjs23.js"),w=require("./index.cjs4.js");require("./index.cjs14.js");require("./index.cjs15.js");const h=({renderPosition:e,leftIcon:u,rightIcon:c,isLoading:r,loaderPosition:n,loaderProps:t})=>{const i=e==="left"?u:e==="right"?c:null;return i||r&&n===e?s.jsxRuntimeExports.jsx("span",{className:e==="left"?"mr-1":"ml-1",children:r&&n===e?s.jsxRuntimeExports.jsx(w.Loader,{size:"sm",...t}):i}):null},y=e=>{const{intent:u="primary",size:c="md",leftIcon:r,rightIcon:n,isDisabled:t,children:i,className:q,isLoading:l,loaderPosition:x="left",loaderProps:f,fullWidth:R=!1,unstyled:d=!1,focus:j=!0,isMobileFullWidth:b=!1,...g}=e,v=(m,a,o)=>p.cn(d?"":N.buttonVariants({intent:u,size:c,isHovered:a||(j||!d?o:!1),isActive:m,isDisabled:t,isFocused:j||!d?o:!1,fullWidth:R,isLoading:l}),q);return s.jsxRuntimeExports.jsxs(E.Button,{"data-disabled":t||void 0,"data-loading":l||void 0,isDisabled:t,className:({isPressed:m,isHovered:a,isFocusVisible:o})=>v(m,a,o),...g,children:[s.jsxRuntimeExports.jsx(h,{renderPosition:"left",loaderPosition:x,loaderProps:f,isLoading:l,leftIcon:r}),s.jsxRuntimeExports.jsx("span",{className:p.cn("flex h-full items-center overflow-hidden whitespace-nowrap",b?"w-full":""),children:i}),s.jsxRuntimeExports.jsx(h,{renderPosition:"right",loaderPosition:x,loaderProps:f,isLoading:l,rightIcon:n})]})};exports.Button=y;
|
package/dist/index.cjs5.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index.cjs9.js"),d=require("react-aria-components"),o=require("./index.cjs10.js"),w=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index.cjs9.js"),d=require("react-aria-components"),o=require("./index.cjs10.js"),w=require("./index.cjs12.js"),q=require("./index.cjs13.js"),y=require("./index.cjs14.js"),R=({children:c,label:a,description:s,errorMessage:x,validationState:u,size:e="md",isDisabled:t=!1,isSelected:n=!1,onChange:f,"aria-label":m,"aria-describedby":h})=>{const j=u==="invalid"&&!t,l=e==="sm"?{offLeft:3,onLeft:19}:{offLeft:4,onLeft:28};return r.jsxRuntimeExports.jsxs("label",{className:o.cn("group flex flex-row items-center gap-2",t?"opacity-40":"opacity-100"),children:[r.jsxRuntimeExports.jsx(d.Switch,{isDisabled:t,isSelected:n,"aria-checked":n,"aria-label":m,"aria-describedby":h,onChange:f,children:({isFocusVisible:p,isHovered:i})=>r.jsxRuntimeExports.jsx("div",{className:o.cn(y.switchVariants({isSelected:n,isDisabled:t,isFocusVisible:p,size:e,isHoveredWhenOff:i&&!n})),children:r.jsxRuntimeExports.jsx(q.SwitchIndicator,{isSelected:n,isDisabled:t,isHovered:i,size:e,dimensions:l})})}),r.jsxRuntimeExports.jsx(w.ContentSwitch,{label:a,description:s,errorMessage:x,isDisabled:t,isInvalid:j,children:c})]})};exports.Switch=R;
|
package/dist/index.cjs8.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.cjs9.js"),j=require("react"),q=require("react-aria"),c=require("react-stately"),r=require("./index.cjs10.js"),T=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.cjs9.js"),j=require("react"),q=require("react-aria"),c=require("react-stately"),r=require("./index.cjs10.js"),T=require("./index.cjs16.js"),f=require("./index.cjs17.js"),p=require("./index.cjs18.js"),l=a=>{var i;const{rootClassName:u,tabClassName:x,tabPanelClassName:m,orientation:t="horizontal",id:b=void 0}=a,e=c.useTabListState(a),n=j.useRef(null),{tabListProps:d}=q.useTabList(a,e,n);return s.jsxRuntimeExports.jsxs("div",{className:r.cn(p.tabsVariants({orientation:t}),u),children:[s.jsxRuntimeExports.jsx("div",{...d,ref:n,className:r.cn("flex",t==="horizontal"?"flex-row flex-wrap":"flex-col"),children:[...e.collection].map(o=>s.jsxRuntimeExports.jsx(T.Tab,{item:o,state:e,orientation:t,className:x,id:b},o.key))}),s.jsxRuntimeExports.jsx(f.TabPanel,{state:e,className:r.cn("p-2",t==="horizontal"?"pl-2":"pt-2",m)},(i=e.selectedItem)==null?void 0:i.key)]})};l.Item=c.Item;exports.Tabs=l;
|
package/dist/index.es12.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { j as t } from "./index.es9.js";
|
|
2
|
+
import { cn as m } from "./index.es10.js";
|
|
3
|
+
const u = ({
|
|
4
|
+
label: x,
|
|
5
|
+
description: e,
|
|
6
|
+
errorMessage: n,
|
|
7
|
+
isDisabled: s,
|
|
8
|
+
isInvalid: r,
|
|
9
|
+
children: l
|
|
10
|
+
}) => !x && !e && !l ? null : /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col", children: [
|
|
11
|
+
x ? /* @__PURE__ */ t.jsx("p", { className: m("text-sm font-semibold", s ? "text-neutral-600" : "text-neutral-900"), children: x }) : l,
|
|
12
|
+
e && !n && /* @__PURE__ */ t.jsx("p", { className: m("text-xs", s ? "text-neutral-600" : "text-neutral-700"), children: e }),
|
|
13
|
+
r && n && /* @__PURE__ */ t.jsx("p", { className: "text-sm text-red-500", children: n })
|
|
14
|
+
] });
|
|
10
15
|
export {
|
|
11
|
-
|
|
16
|
+
u as ContentSwitch
|
|
12
17
|
};
|
package/dist/index.es13.js
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { j as i } from "./index.es9.js";
|
|
2
|
+
import { cn as m } from "./index.es10.js";
|
|
3
|
+
import { indicatorVariants as n } from "./index.es14.js";
|
|
4
|
+
const c = ({ isSelected: r, isDisabled: o, isHovered: f, size: a, dimensions: t }) => /* @__PURE__ */ i.jsx(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
className: m(
|
|
8
|
+
n({
|
|
9
|
+
isSelected: r,
|
|
10
|
+
isDisabled: o,
|
|
11
|
+
size: a,
|
|
12
|
+
isHoveredWhenOff: f && !r
|
|
13
|
+
})
|
|
14
|
+
),
|
|
15
|
+
style: {
|
|
16
|
+
left: r ? `${t.onLeft}px` : `${t.offLeft}px`
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
);
|
|
10
20
|
export {
|
|
11
|
-
|
|
21
|
+
c as SwitchIndicator
|
|
12
22
|
};
|
package/dist/index.es14.js
CHANGED
|
@@ -1,33 +1,94 @@
|
|
|
1
|
-
import { cva as
|
|
2
|
-
const
|
|
1
|
+
import { cva as e } from "class-variance-authority";
|
|
2
|
+
const s = e("relative rounded-full transition-colors duration-300", {
|
|
3
3
|
variants: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
isSelected: {
|
|
5
|
+
true: "bg-primary-500",
|
|
6
|
+
false: "bg-neutral-50 border border-primary-200"
|
|
7
|
+
},
|
|
8
|
+
isDisabled: {
|
|
9
|
+
true: "cursor-not-allowed bg-neutral-400 border-none",
|
|
10
|
+
false: "cursor-pointer"
|
|
11
|
+
},
|
|
12
|
+
isHoveredWhenOff: {
|
|
13
|
+
true: "bg-neutral-200 border-primary-700",
|
|
14
|
+
false: ""
|
|
15
|
+
},
|
|
16
|
+
isFocusVisible: {
|
|
17
|
+
true: "ring-2 ring-sky-400 ring-offset-2",
|
|
18
|
+
false: ""
|
|
19
|
+
},
|
|
20
|
+
size: {
|
|
21
|
+
sm: "w-[42px] h-[24px]",
|
|
22
|
+
md: "w-[56px] h-[32px]"
|
|
7
23
|
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
size: "md",
|
|
27
|
+
isSelected: !1,
|
|
28
|
+
isDisabled: !1,
|
|
29
|
+
isFocusVisible: !1,
|
|
30
|
+
isHoveredWhenOff: !1
|
|
31
|
+
},
|
|
32
|
+
compoundVariants: [
|
|
33
|
+
// Hover cuando el switch está apagado y no deshabilitado
|
|
34
|
+
{
|
|
35
|
+
isSelected: !1,
|
|
36
|
+
isDisabled: !1,
|
|
37
|
+
class: "hover:bg-neutral-200 hover:border-primary-700"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
isSelected: !0,
|
|
41
|
+
isDisabled: !1,
|
|
42
|
+
class: "hover:bg-primary-700"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
isSelected: !1,
|
|
46
|
+
isDisabled: !0,
|
|
47
|
+
class: "bg-neutral-400 border-none"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
isSelected: !0,
|
|
51
|
+
isDisabled: !0,
|
|
52
|
+
class: "bg-neutral-500"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}), a = e(
|
|
56
|
+
"absolute top-1/2 transform -translate-y-1/2 transition-all duration-300 rounded-full",
|
|
11
57
|
{
|
|
12
58
|
variants: {
|
|
13
|
-
|
|
14
|
-
true: "bg-primary-50
|
|
15
|
-
false: "
|
|
59
|
+
isSelected: {
|
|
60
|
+
true: "bg-primary-50",
|
|
61
|
+
false: "bg-primary-200 border border-primary-200"
|
|
62
|
+
},
|
|
63
|
+
isDisabled: {
|
|
64
|
+
true: "bg-neutral-600 border-none",
|
|
65
|
+
false: ""
|
|
16
66
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
67
|
+
isHoveredWhenOff: {
|
|
68
|
+
true: "bg-primary-700 border-primary-700",
|
|
69
|
+
false: ""
|
|
70
|
+
},
|
|
71
|
+
size: {
|
|
72
|
+
sm: "w-[20px] h-[20px]",
|
|
73
|
+
md: "w-[24px] h-[24px]"
|
|
20
74
|
}
|
|
21
75
|
},
|
|
76
|
+
defaultVariants: {
|
|
77
|
+
size: "md",
|
|
78
|
+
isSelected: !1,
|
|
79
|
+
isDisabled: !1,
|
|
80
|
+
isHoveredWhenOff: !1
|
|
81
|
+
},
|
|
22
82
|
compoundVariants: [
|
|
23
|
-
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
83
|
+
{
|
|
84
|
+
isSelected: !0,
|
|
85
|
+
isDisabled: !0,
|
|
86
|
+
class: "bg-neutral-400"
|
|
87
|
+
}
|
|
27
88
|
]
|
|
28
89
|
}
|
|
29
90
|
);
|
|
30
91
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
92
|
+
a as indicatorVariants,
|
|
93
|
+
s as switchVariants
|
|
33
94
|
};
|
package/dist/index.es16.js
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}) => !x && !e && !l ? null : /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col", children: [
|
|
11
|
-
x ? /* @__PURE__ */ t.jsx("p", { className: m("text-sm font-semibold", s ? "text-neutral-600" : "text-neutral-900"), children: x }) : l,
|
|
12
|
-
e && !n && /* @__PURE__ */ t.jsx("p", { className: m("text-xs", s ? "text-neutral-600" : "text-neutral-700"), children: e }),
|
|
13
|
-
r && n && /* @__PURE__ */ t.jsx("p", { className: "text-sm text-red-500", children: n })
|
|
14
|
-
] });
|
|
1
|
+
import { j as f } from "./index.es9.js";
|
|
2
|
+
import { useRef as l } from "react";
|
|
3
|
+
import { useTab as u } from "react-aria";
|
|
4
|
+
import { cn as b } from "./index.es10.js";
|
|
5
|
+
import { tabVariants as x } from "./index.es18.js";
|
|
6
|
+
const R = (o) => {
|
|
7
|
+
const { className: r, item: i, orientation: n, state: t, id: a = void 0 } = o, { key: s, rendered: c } = i, m = t.selectedKey === s, e = l(null), { tabProps: p } = u({ key: String(s) }, t, e), d = b(x({ isActive: m, orientation: n }), r);
|
|
8
|
+
return /* @__PURE__ */ f.jsx("div", { ...p, ref: e, className: d, id: a, children: c });
|
|
9
|
+
};
|
|
15
10
|
export {
|
|
16
|
-
|
|
11
|
+
R as Tab
|
|
17
12
|
};
|
package/dist/index.es17.js
CHANGED
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
isDisabled: o,
|
|
11
|
-
size: a,
|
|
12
|
-
isHoveredWhenOff: f && !r
|
|
13
|
-
})
|
|
14
|
-
),
|
|
15
|
-
style: {
|
|
16
|
-
left: r ? `${t.onLeft}px` : `${t.offLeft}px`
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
);
|
|
1
|
+
import { j as m } from "./index.es9.js";
|
|
2
|
+
import { useRef as l } from "react";
|
|
3
|
+
import { useTabPanel as p } from "react-aria";
|
|
4
|
+
import { cn as i } from "./index.es10.js";
|
|
5
|
+
const P = (r) => {
|
|
6
|
+
var t;
|
|
7
|
+
const { className: o, state: s, ...n } = r, e = l(null), { tabPanelProps: a } = p(n, s, e), c = i("", o);
|
|
8
|
+
return /* @__PURE__ */ m.jsx("div", { ...a, ref: e, className: c, children: (t = s.selectedItem) == null ? void 0 : t.props.children });
|
|
9
|
+
};
|
|
20
10
|
export {
|
|
21
|
-
|
|
11
|
+
P as TabPanel
|
|
22
12
|
};
|
package/dist/index.es18.js
CHANGED
|
@@ -1,94 +1,33 @@
|
|
|
1
|
-
import { cva as
|
|
2
|
-
const
|
|
1
|
+
import { cva as r } from "class-variance-authority";
|
|
2
|
+
const e = r("flex h-full max-h-12", {
|
|
3
3
|
variants: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
},
|
|
8
|
-
isDisabled: {
|
|
9
|
-
true: "cursor-not-allowed bg-neutral-400 border-none",
|
|
10
|
-
false: "cursor-pointer"
|
|
11
|
-
},
|
|
12
|
-
isHoveredWhenOff: {
|
|
13
|
-
true: "bg-neutral-200 border-primary-700",
|
|
14
|
-
false: ""
|
|
15
|
-
},
|
|
16
|
-
isFocusVisible: {
|
|
17
|
-
true: "ring-2 ring-sky-400 ring-offset-2",
|
|
18
|
-
false: ""
|
|
19
|
-
},
|
|
20
|
-
size: {
|
|
21
|
-
sm: "w-[42px] h-[24px]",
|
|
22
|
-
md: "w-[56px] h-[32px]"
|
|
4
|
+
orientation: {
|
|
5
|
+
horizontal: "flex-col",
|
|
6
|
+
vertical: "flex-row"
|
|
23
7
|
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
isSelected: !1,
|
|
28
|
-
isDisabled: !1,
|
|
29
|
-
isFocusVisible: !1,
|
|
30
|
-
isHoveredWhenOff: !1
|
|
31
|
-
},
|
|
32
|
-
compoundVariants: [
|
|
33
|
-
// Hover cuando el switch está apagado y no deshabilitado
|
|
34
|
-
{
|
|
35
|
-
isSelected: !1,
|
|
36
|
-
isDisabled: !1,
|
|
37
|
-
class: "hover:bg-neutral-200 hover:border-primary-700"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
isSelected: !0,
|
|
41
|
-
isDisabled: !1,
|
|
42
|
-
class: "hover:bg-primary-700"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
isSelected: !1,
|
|
46
|
-
isDisabled: !0,
|
|
47
|
-
class: "bg-neutral-400 border-none"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
isSelected: !0,
|
|
51
|
-
isDisabled: !0,
|
|
52
|
-
class: "bg-neutral-500"
|
|
53
|
-
}
|
|
54
|
-
]
|
|
55
|
-
}), a = e(
|
|
56
|
-
"absolute top-1/2 transform -translate-y-1/2 transition-all duration-300 rounded-full",
|
|
8
|
+
}
|
|
9
|
+
}), i = r(
|
|
10
|
+
"group inline-flex cursor-pointer items-center px-4 py-3 text-base font-semibold focus-visible:outline-none",
|
|
57
11
|
{
|
|
58
12
|
variants: {
|
|
59
|
-
|
|
60
|
-
true: "bg-primary-50",
|
|
61
|
-
false: "
|
|
62
|
-
},
|
|
63
|
-
isDisabled: {
|
|
64
|
-
true: "bg-neutral-600 border-none",
|
|
65
|
-
false: ""
|
|
13
|
+
isActive: {
|
|
14
|
+
true: "bg-primary-50 text-primary-600 ",
|
|
15
|
+
false: "text-neutral-500 hover:text-primary-900"
|
|
66
16
|
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
},
|
|
71
|
-
size: {
|
|
72
|
-
sm: "w-[20px] h-[20px]",
|
|
73
|
-
md: "w-[24px] h-[24px]"
|
|
17
|
+
orientation: {
|
|
18
|
+
horizontal: "border-b-2 border-transparent",
|
|
19
|
+
vertical: "border-r-2 border-transparent"
|
|
74
20
|
}
|
|
75
21
|
},
|
|
76
|
-
defaultVariants: {
|
|
77
|
-
size: "md",
|
|
78
|
-
isSelected: !1,
|
|
79
|
-
isDisabled: !1,
|
|
80
|
-
isHoveredWhenOff: !1
|
|
81
|
-
},
|
|
82
22
|
compoundVariants: [
|
|
83
|
-
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
23
|
+
{ isActive: !0, orientation: "horizontal", class: "border-b-2 border-primary-500" },
|
|
24
|
+
{ isActive: !1, orientation: "horizontal", class: "border-b-2 border-primary-200" },
|
|
25
|
+
{ isActive: !1, orientation: "vertical", class: "border-r-2 border-primary-200" },
|
|
26
|
+
{ isActive: !0, orientation: "vertical", class: "border-r-2 border-primary-500" }
|
|
88
27
|
]
|
|
89
28
|
}
|
|
90
29
|
);
|
|
91
30
|
export {
|
|
92
|
-
|
|
93
|
-
|
|
31
|
+
i as tabVariants,
|
|
32
|
+
e as tabsVariants
|
|
94
33
|
};
|
package/dist/index.es26.js
CHANGED
|
@@ -14,7 +14,7 @@ const e = t, a = ({
|
|
|
14
14
|
id: n
|
|
15
15
|
}, r) : null, /* @__PURE__ */ e.createElement("path", {
|
|
16
16
|
fillRule: "evenodd",
|
|
17
|
-
d: "M2 11.85c0-.47.35-.85.783-.85h18.434c.432 0 .783.38.783.85s-.35.85-.783.85H2.783c-.432 0-.783-.38-.783-.
|
|
17
|
+
d: "M2 11.85c0-.47.35-.85.783-.85h18.434c.432 0 .783.38.783.85s-.35.85-.783.85H2.783c-.432 0-.783-.38-.783-.85",
|
|
18
18
|
clipRule: "evenodd"
|
|
19
19
|
})), c = e.forwardRef(a);
|
|
20
20
|
var s = c;
|
package/dist/index.es27.js
CHANGED
|
@@ -14,7 +14,7 @@ const e = t, n = ({
|
|
|
14
14
|
id: a
|
|
15
15
|
}, r) : null, /* @__PURE__ */ e.createElement("path", {
|
|
16
16
|
fillRule: "evenodd",
|
|
17
|
-
d: "M11.885 2c.433 0 .783.35.783.783v8.434h8.549a.783.783 0 1 1 0 1.566h-8.549v8.434a.783.783 0 1 1-1.567 0v-8.434H2.783a.783.783 0 1 1 0-1.566h8.318V2.783c0-.432.351-.783.784-.
|
|
17
|
+
d: "M11.885 2c.433 0 .783.35.783.783v8.434h8.549a.783.783 0 1 1 0 1.566h-8.549v8.434a.783.783 0 1 1-1.567 0v-8.434H2.783a.783.783 0 1 1 0-1.566h8.318V2.783c0-.432.351-.783.784-.783",
|
|
18
18
|
clipRule: "evenodd"
|
|
19
19
|
})), c = e.forwardRef(n);
|
|
20
20
|
var d = c;
|
package/dist/index.es3.js
CHANGED
|
@@ -4,7 +4,7 @@ import { cn as x } from "./index.es10.js";
|
|
|
4
4
|
import "react";
|
|
5
5
|
import { buttonVariants as B } from "./index.es23.js";
|
|
6
6
|
import { Loader as y } from "./index.es4.js";
|
|
7
|
-
import "./index.
|
|
7
|
+
import "./index.es14.js";
|
|
8
8
|
import "./index.es15.js";
|
|
9
9
|
const j = ({
|
|
10
10
|
renderPosition: t,
|
package/dist/index.es5.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as t } from "./index.es9.js";
|
|
2
2
|
import { Switch as d } from "react-aria-components";
|
|
3
3
|
import { cn as f } from "./index.es10.js";
|
|
4
|
-
import { ContentSwitch as y } from "./index.
|
|
5
|
-
import { SwitchIndicator as L } from "./index.
|
|
6
|
-
import { switchVariants as u } from "./index.
|
|
4
|
+
import { ContentSwitch as y } from "./index.es12.js";
|
|
5
|
+
import { SwitchIndicator as L } from "./index.es13.js";
|
|
6
|
+
import { switchVariants as u } from "./index.es14.js";
|
|
7
7
|
const C = ({
|
|
8
8
|
children: c,
|
|
9
9
|
label: i,
|
package/dist/index.es8.js
CHANGED
|
@@ -3,9 +3,9 @@ import { useRef as x } from "react";
|
|
|
3
3
|
import { useTabList as b } from "react-aria";
|
|
4
4
|
import { useTabListState as d, Item as N } from "react-stately";
|
|
5
5
|
import { cn as e } from "./index.es10.js";
|
|
6
|
-
import { Tab as j } from "./index.
|
|
7
|
-
import { TabPanel as u } from "./index.
|
|
8
|
-
import { tabsVariants as h } from "./index.
|
|
6
|
+
import { Tab as j } from "./index.es16.js";
|
|
7
|
+
import { TabPanel as u } from "./index.es17.js";
|
|
8
|
+
import { tabsVariants as h } from "./index.es18.js";
|
|
9
9
|
const T = (a) => {
|
|
10
10
|
var m;
|
|
11
11
|
const { rootClassName: i, tabClassName: n, tabPanelClassName: c, orientation: o = "horizontal", id: f = void 0 } = a, t = d(a), r = x(null), { tabListProps: p } = b(a, t, r);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simpli-route/apollo-ds",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"react-dom": "^18.2.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@simpli-route/react-icons": "^1.0.
|
|
30
|
+
"@simpli-route/react-icons": "^1.0.11",
|
|
31
31
|
"@simpli-route/tailwind-preset": "^0.0.1",
|
|
32
32
|
"class-variance-authority": "^0.7.0",
|
|
33
33
|
"clsx": "^2.1.0",
|