@simpli-route/apollo-ds 0.0.14 → 0.0.15
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/components/Checkbox/types.d.ts +1 -0
- package/dist/index.cjs13.js +1 -1
- package/dist/index.cjs14.js +1 -1
- package/dist/index.cjs4.js +1 -1
- package/dist/index.cjs6.js +1 -1
- package/dist/index.es13.js +9 -9
- package/dist/index.es14.js +6 -1
- package/dist/index.es4.js +24 -16
- package/dist/index.es6.js +62 -52
- package/dist/stories/Checkbox.stories.d.ts +5 -0
- package/dist/style.css +3 -0
- package/package.json +1 -1
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 s=require("./index.cjs10.js"),l=require("./index.cjs11.js"),c=o=>{const{isIndeterminate:t,isSelected:e,className:n,isHovered:i}=o,r=i&&!e&&!t?"text-neutral-500":"",a=!!(r||e);return s.jsxRuntimeExports.jsx("svg",{className:l.cn("stroke-current",r,n),viewBox:"-1 1 17 17",children:t?s.jsxRuntimeExports.jsx("line",{x1:1,y1:10,x2:14,y2:10,fill:"none",strokeWidth:2,strokeDasharray:14,strokeDashoffset:e?28:42,style:{transition:"all 400ms"}}):s.jsxRuntimeExports.jsx("polyline",{points:"1 9 7 14 15 4",fill:"none",strokeWidth:2,strokeDasharray:22,strokeDashoffset:a?44:66,style:{transition:"all 400ms"}})})};exports.MarkIcon=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("flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded border-2 border-primary-200 text-white transition duration-150 ease-in-out",{variants:{isHovered:{true:""},isSelected:{true:"border-primary-500 bg-primary-500",false:"bg-white"},isFocusVisible:{true:"border-primary-500 group-active:border-primary-500"},isDisabled:{true:"border-neutral-500"},label:{true:"mr-2"}},compoundVariants:[{isHovered:!0,isSelected:!0,class:"border-none bg-primary-600 group-active:bg-primary-600"},{isHovered:!0,isSelected:!1,isDisabled:!1,class:"border-primary-700 group-active:bg-primary-600"},{isDisabled:!0,isSelected:!0,class:"bg-neutral-500"}]});exports.checkboxVariants=r;
|
package/dist/index.cjs4.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs10.js"),l=require("react-aria-components"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs10.js"),l=require("react-aria-components"),x=require("./index.cjs11.js"),p=require("./index.cjs13.js"),b=require("./index.cjs14.js"),h=({isIndeterminate:c=!1,isDisabled:s=!1,className:u,children:r,onChange:i,isSelected:n,id:o,...m})=>{const j=(a,t)=>x.cn(b.checkboxVariants({isDisabled:s,isFocusVisible:a,isHovered:t,isSelected:n,label:!!r}));return e.jsxRuntimeExports.jsx(l.Checkbox,{className:x.cn("group flex items-center",u),isSelected:n,isDisabled:s,id:o,onChange:i,...m,children:({isFocusVisible:a,isHovered:t})=>e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{className:j(a,t),"aria-hidden":"true",children:e.jsxRuntimeExports.jsx(p.MarkIcon,{isIndeterminate:c,isHovered:t,isSelected:n,className:"size-3"})}),r&&e.jsxRuntimeExports.jsx("span",{className:x.cn("select-none text-base leading-6",s?"text-neutral-500":"text-primary-900"),id:o,children:r})]})})};exports.Checkbox=h;
|
package/dist/index.cjs6.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 n=require("./index.cjs10.js"),w=require("react-aria-components"),s=require("./index.cjs11.js"),d=require("./index.cjs15.js"),q=require("./index.cjs16.js"),y=require("./index.cjs17.js"),R=({children:a,label:i,description:o,errorMessage:x,validationState:u,size:e="md",isDisabled:t=!1,isSelected:r=!1,onChange:f,"aria-label":m,"aria-describedby":h})=>{const j=u==="invalid"&&!t,p=e==="sm"?{offLeft:3,onLeft:19}:{offLeft:4,onLeft:28};return n.jsxRuntimeExports.jsxs("label",{className:s.cn("group flex flex-row gap-2",t?"opacity-40":"opacity-100",i&&o?"items-start":"items-center"),children:[n.jsxRuntimeExports.jsx(w.Switch,{isDisabled:t,isSelected:r,"aria-checked":r,"aria-label":m,"aria-describedby":h,onChange:f,children:({isFocusVisible:l,isHovered:c})=>n.jsxRuntimeExports.jsx("div",{className:s.cn(y.switchVariants({isSelected:r,isDisabled:t,isFocusVisible:l,size:e,isHoveredWhenOff:c&&!r})),children:n.jsxRuntimeExports.jsx(q.SwitchIndicator,{isSelected:r,isDisabled:t,isHovered:c,size:e,dimensions:p})})}),n.jsxRuntimeExports.jsx(d.ContentSwitch,{label:i,description:o,errorMessage:x,isDisabled:t,isInvalid:j,children:a})]})};exports.Switch=R;
|
package/dist/index.es13.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { cn as
|
|
3
|
-
const
|
|
4
|
-
const { isIndeterminate:
|
|
5
|
-
return /* @__PURE__ */
|
|
1
|
+
import { j as e } from "./index.es10.js";
|
|
2
|
+
import { cn as l } from "./index.es11.js";
|
|
3
|
+
const m = (r) => {
|
|
4
|
+
const { isIndeterminate: t, isSelected: s, className: n, isHovered: a } = r, o = a && !s && !t ? "text-neutral-500" : "", i = !!(o || s);
|
|
5
|
+
return /* @__PURE__ */ e.jsx("svg", { className: l("stroke-current", o, n), viewBox: "-1 1 17 17", children: t ? /* @__PURE__ */ e.jsx(
|
|
6
6
|
"line",
|
|
7
7
|
{
|
|
8
8
|
x1: 1,
|
|
@@ -12,21 +12,21 @@ const l = (e) => {
|
|
|
12
12
|
fill: "none",
|
|
13
13
|
strokeWidth: 2,
|
|
14
14
|
strokeDasharray: 14,
|
|
15
|
-
strokeDashoffset:
|
|
15
|
+
strokeDashoffset: s ? 28 : 42,
|
|
16
16
|
style: { transition: "all 400ms" }
|
|
17
17
|
}
|
|
18
|
-
) : /* @__PURE__ */
|
|
18
|
+
) : /* @__PURE__ */ e.jsx(
|
|
19
19
|
"polyline",
|
|
20
20
|
{
|
|
21
21
|
points: "1 9 7 14 15 4",
|
|
22
22
|
fill: "none",
|
|
23
23
|
strokeWidth: 2,
|
|
24
24
|
strokeDasharray: 22,
|
|
25
|
-
strokeDashoffset:
|
|
25
|
+
strokeDashoffset: i ? 44 : 66,
|
|
26
26
|
style: { transition: "all 400ms" }
|
|
27
27
|
}
|
|
28
28
|
) });
|
|
29
29
|
};
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
m as MarkIcon
|
|
32
32
|
};
|
package/dist/index.es14.js
CHANGED
|
@@ -14,7 +14,7 @@ const i = r(
|
|
|
14
14
|
true: "border-primary-500 group-active:border-primary-500"
|
|
15
15
|
},
|
|
16
16
|
isDisabled: {
|
|
17
|
-
true: "border-neutral-500
|
|
17
|
+
true: "border-neutral-500"
|
|
18
18
|
},
|
|
19
19
|
label: {
|
|
20
20
|
true: "mr-2"
|
|
@@ -31,6 +31,11 @@ const i = r(
|
|
|
31
31
|
isSelected: !1,
|
|
32
32
|
isDisabled: !1,
|
|
33
33
|
class: "border-primary-700 group-active:bg-primary-600"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
isDisabled: !0,
|
|
37
|
+
isSelected: !0,
|
|
38
|
+
class: "bg-neutral-500"
|
|
34
39
|
}
|
|
35
40
|
]
|
|
36
41
|
}
|
package/dist/index.es4.js
CHANGED
|
@@ -1,44 +1,52 @@
|
|
|
1
1
|
import { j as e } from "./index.es10.js";
|
|
2
|
-
import { Checkbox as
|
|
2
|
+
import { Checkbox as h } from "react-aria-components";
|
|
3
3
|
import { cn as m } from "./index.es11.js";
|
|
4
|
-
import { MarkIcon as
|
|
4
|
+
import { MarkIcon as i } from "./index.es13.js";
|
|
5
5
|
import { checkboxVariants as j } from "./index.es14.js";
|
|
6
6
|
const g = ({
|
|
7
7
|
isIndeterminate: x = !1,
|
|
8
|
-
isDisabled:
|
|
8
|
+
isDisabled: a = !1,
|
|
9
9
|
className: c,
|
|
10
|
-
children:
|
|
10
|
+
children: t,
|
|
11
11
|
onChange: l,
|
|
12
12
|
isSelected: s,
|
|
13
13
|
id: n,
|
|
14
14
|
...p
|
|
15
15
|
}) => {
|
|
16
|
-
const f = (
|
|
16
|
+
const f = (o, r) => m(
|
|
17
17
|
j({
|
|
18
|
-
isDisabled:
|
|
19
|
-
isFocusVisible:
|
|
20
|
-
isHovered:
|
|
18
|
+
isDisabled: a,
|
|
19
|
+
isFocusVisible: o,
|
|
20
|
+
isHovered: r,
|
|
21
21
|
isSelected: s,
|
|
22
|
-
label: !!
|
|
22
|
+
label: !!t
|
|
23
23
|
})
|
|
24
24
|
);
|
|
25
25
|
return /* @__PURE__ */ e.jsx(
|
|
26
|
-
|
|
26
|
+
h,
|
|
27
27
|
{
|
|
28
28
|
className: m("group flex items-center", c),
|
|
29
29
|
isSelected: s,
|
|
30
|
-
isDisabled:
|
|
30
|
+
isDisabled: a,
|
|
31
31
|
id: n,
|
|
32
32
|
onChange: l,
|
|
33
33
|
...p,
|
|
34
|
-
children: ({ isFocusVisible:
|
|
35
|
-
/* @__PURE__ */ e.jsx("div", { className: f(
|
|
36
|
-
|
|
34
|
+
children: ({ isFocusVisible: o, isHovered: r }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
35
|
+
/* @__PURE__ */ e.jsx("div", { className: f(o, r), "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(
|
|
36
|
+
i,
|
|
37
|
+
{
|
|
38
|
+
isIndeterminate: x,
|
|
39
|
+
isHovered: r,
|
|
40
|
+
isSelected: s,
|
|
41
|
+
className: "size-3"
|
|
42
|
+
}
|
|
43
|
+
) }),
|
|
44
|
+
t && /* @__PURE__ */ e.jsx(
|
|
37
45
|
"span",
|
|
38
46
|
{
|
|
39
|
-
className: m("select-none text-base leading-6",
|
|
47
|
+
className: m("select-none text-base leading-6", a ? "text-neutral-500" : "text-primary-900"),
|
|
40
48
|
id: n,
|
|
41
|
-
children:
|
|
49
|
+
children: t
|
|
42
50
|
}
|
|
43
51
|
)
|
|
44
52
|
] })
|
package/dist/index.es6.js
CHANGED
|
@@ -1,71 +1,81 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as o } from "./index.es10.js";
|
|
2
2
|
import { Switch as d } from "react-aria-components";
|
|
3
|
-
import { cn as
|
|
3
|
+
import { cn as c } from "./index.es11.js";
|
|
4
4
|
import { ContentSwitch as y } from "./index.es15.js";
|
|
5
5
|
import { SwitchIndicator as L } from "./index.es16.js";
|
|
6
6
|
import { switchVariants as u } from "./index.es17.js";
|
|
7
7
|
const C = ({
|
|
8
|
-
children:
|
|
9
|
-
label:
|
|
8
|
+
children: i,
|
|
9
|
+
label: f,
|
|
10
10
|
description: m,
|
|
11
|
-
errorMessage:
|
|
12
|
-
validationState:
|
|
11
|
+
errorMessage: s,
|
|
12
|
+
validationState: e,
|
|
13
13
|
size: a = "md",
|
|
14
14
|
isDisabled: r = !1,
|
|
15
|
-
isSelected:
|
|
16
|
-
onChange:
|
|
17
|
-
"aria-label":
|
|
15
|
+
isSelected: t = !1,
|
|
16
|
+
onChange: h,
|
|
17
|
+
"aria-label": p,
|
|
18
18
|
"aria-describedby": x
|
|
19
19
|
}) => {
|
|
20
|
-
const
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"div",
|
|
20
|
+
const j = e === "invalid" && !r, w = a === "sm" ? { offLeft: 3, onLeft: 19 } : { offLeft: 4, onLeft: 28 };
|
|
21
|
+
return /* @__PURE__ */ o.jsxs(
|
|
22
|
+
"label",
|
|
23
|
+
{
|
|
24
|
+
className: c(
|
|
25
|
+
"group flex flex-row gap-2",
|
|
26
|
+
r ? "opacity-40" : "opacity-100",
|
|
27
|
+
f && m ? "items-start" : "items-center"
|
|
28
|
+
),
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ o.jsx(
|
|
31
|
+
d,
|
|
33
32
|
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
),
|
|
43
|
-
children: /* @__PURE__ */ t.jsx(
|
|
44
|
-
L,
|
|
33
|
+
isDisabled: r,
|
|
34
|
+
isSelected: t,
|
|
35
|
+
"aria-checked": t,
|
|
36
|
+
"aria-label": p,
|
|
37
|
+
"aria-describedby": x,
|
|
38
|
+
onChange: h,
|
|
39
|
+
children: ({ isFocusVisible: l, isHovered: n }) => /* @__PURE__ */ o.jsx(
|
|
40
|
+
"div",
|
|
45
41
|
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
className: c(
|
|
43
|
+
u({
|
|
44
|
+
isSelected: t,
|
|
45
|
+
isDisabled: r,
|
|
46
|
+
isFocusVisible: l,
|
|
47
|
+
size: a,
|
|
48
|
+
isHoveredWhenOff: n && !t
|
|
49
|
+
})
|
|
50
|
+
),
|
|
51
|
+
children: /* @__PURE__ */ o.jsx(
|
|
52
|
+
L,
|
|
53
|
+
{
|
|
54
|
+
isSelected: t,
|
|
55
|
+
isDisabled: r,
|
|
56
|
+
isHovered: n,
|
|
57
|
+
size: a,
|
|
58
|
+
dimensions: w
|
|
59
|
+
}
|
|
60
|
+
)
|
|
51
61
|
}
|
|
52
62
|
)
|
|
53
63
|
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ o.jsx(
|
|
66
|
+
y,
|
|
67
|
+
{
|
|
68
|
+
label: f,
|
|
69
|
+
description: m,
|
|
70
|
+
errorMessage: s,
|
|
71
|
+
isDisabled: r,
|
|
72
|
+
isInvalid: j,
|
|
73
|
+
children: i
|
|
74
|
+
}
|
|
54
75
|
)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
y,
|
|
59
|
-
{
|
|
60
|
-
label: i,
|
|
61
|
-
description: m,
|
|
62
|
-
errorMessage: e,
|
|
63
|
-
isDisabled: r,
|
|
64
|
-
isInvalid: l,
|
|
65
|
-
children: c
|
|
66
|
-
}
|
|
67
|
-
)
|
|
68
|
-
] });
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
);
|
|
69
79
|
};
|
|
70
80
|
export {
|
|
71
81
|
C as Switch
|
package/dist/style.css
CHANGED