@simpli-route/apollo-ds 0.0.3 → 0.0.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.
- package/dist/index.cjs2.js +1 -1
- package/dist/index.cjs5.js +1 -1
- package/dist/index.es2.js +28 -28
- package/dist/index.es5.js +27 -2
- package/dist/style.css +25 -2
- package/package.json +1 -1
package/dist/index.cjs2.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.cjs3.js"),E=require("react-aria-components"),b=require("./index.cjs4.js"),q=require("./index.cjs5.js"),N=require("./index.cjs6.js"),p=({renderPosition:e,leftIcon:u,rightIcon:c,isLoading:n,loaderPosition:r,loaderProps:s})=>{const a=e==="left"?u:e==="right"?c:null;return a||n&&r===e?t.jsxRuntimeExports.jsx("span",{className:e==="left"?"mr-1":"ml-1",children:n&&r===e?t.jsxRuntimeExports.jsx(N.Loader,{size:"sm",...s}):a}):null},y=e=>{const{intent:u="primary",size:c="md",leftIcon:n,rightIcon:r,isDisabled:s,children:a,className:h,isLoading:i,loaderPosition:x="left",loaderProps:f,fullWidth:R=!1,unstyled:d=!1,focus:j=!0,...g}=e,v=(m,l,o)=>b.cn(d?"":q.buttonVariants({intent:u,size:c,isHovered:l||(j||!d?o:!1),isActive:m,isDisabled:s,isFocused:j||!d?o:!1,fullWidth:R,isLoading:i}),h);return t.jsxRuntimeExports.jsxs(E.Button,{"data-disabled":s||void 0,"data-loading":i||void 0,isDisabled:s,className:({isPressed:m,isHovered:l,isFocusVisible:o})=>v(m,l,o),...g,children:[t.jsxRuntimeExports.jsx(p,{renderPosition:"left",loaderPosition:x,loaderProps:f,isLoading:i,leftIcon:n}),t.jsxRuntimeExports.jsx("span",{className:"flex h-full items-center overflow-hidden whitespace-nowrap",children:a}),t.jsxRuntimeExports.jsx(p,{renderPosition:"right",loaderPosition:x,loaderProps:f,isLoading:i,rightIcon:r})]})};exports.Button=y;
|
package/dist/index.cjs5.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("class-variance-authority"),e=r.cva("inline-flex select-none items-center justify-center text-center text-base font-semibold leading-6 transition duration-150 ease-in-out focus:outline-none",{variants:{intent:{primary:"bg-primary-500 text-primary-50",secondary:"border border-primary-500 bg-primary-50 text-primary-500",tertiary:"text-primary-500",outline:"border border-primary-500 text-primary-500",success:"border border-success-800 text-success-800",error:"border border-error-800 text-error-800",orangeWarning:"border border-orange-warning-800 text-orange-warning-800",yellowWarning:"border border-yellow-warning-800 text-yellow-warning-800",info:"border border-primary-800 text-primary-800"},size:{sm:"rounded px-3 py-2",md:"rounded-lg px-4 py-3",lg:"rounded-lg px-6 py-4"},isDisabled:{true:"pointer-events-none cursor-not-allowed border-none bg-neutral-400 text-neutral-600"},isHovered:{true:""},isActive:{true:""},fullWidth:{true:"w-full",false:"w-fit"},isLoading:{true:"pointer-events-none cursor-not-allowed opacity-70"},isFocused:{true:"focus:outline-none focus:ring-2 focus:ring-sky-400 focus:ring-offset-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("class-variance-authority"),e=r.cva("inline-flex select-none items-center justify-center text-center text-base font-semibold leading-6 transition duration-150 ease-in-out focus:outline-none",{variants:{intent:{primary:"bg-primary-500 text-primary-50",secondary:"border border-primary-500 bg-primary-50 text-primary-500",tertiary:"text-primary-500",outline:"border border-primary-500 text-primary-500",success:"border border-success-800 text-success-800",error:"border border-error-800 text-error-800",orangeWarning:"border border-orange-warning-800 text-orange-warning-800",yellowWarning:"border border-yellow-warning-800 text-yellow-warning-800",info:"border border-primary-800 text-primary-800"},size:{sm:"rounded px-3 py-2",md:"rounded-lg px-4 py-3",lg:"rounded-lg px-6 py-4"},isDisabled:{true:"pointer-events-none cursor-not-allowed border-none bg-neutral-400 text-neutral-600"},isHovered:{true:""},isActive:{true:""},fullWidth:{true:"w-full",false:"w-fit"},isLoading:{true:"pointer-events-none cursor-not-allowed opacity-70"},isFocused:{true:"focus:outline-none focus:ring-2 focus:ring-sky-400 focus:ring-offset-[0.4px] border-none",false:""}},defaultVariants:{intent:"primary",size:"md"},compoundVariants:[{intent:"primary",isHovered:!0,class:"bg-primary-700"},{intent:"secondary",isHovered:!0,class:"bg-primary-200"},{intent:"tertiary",isHovered:!0,class:"bg-primary-300 text-primary-800"},{intent:"outline",isHovered:!0,class:"bg-primary-500 text-primary-50"},{intent:"success",isHovered:!0,class:"bg-success-600 text-neutral-50"},{intent:"error",isHovered:!0,class:"bg-error-600 text-neutral-50"},{intent:"orangeWarning",isHovered:!0,class:"bg-orange-warning-600 text-neutral-50"},{intent:"yellowWarning",isHovered:!0,class:"bg-yellow-warning-600 text-neutral-50"},{intent:"info",isHovered:!0,class:"bg-primary-600 text-neutral-50"},{intent:"success",isFocused:!0,class:"border-[1.5px] focus:ring-success-800"},{intent:"error",isFocused:!0,class:"border-[1.5px] focus:ring-error-800"},{intent:"orangeWarning",isFocused:!0,class:"border-[1.5px] focus:ring-orange-800"},{intent:"yellowWarning",isFocused:!0,class:"border-[1.5px] focus:ring-yellow-800"},{intent:"info",isFocused:!0,class:"border-[1.5px] focus:ring-primary-800"},{intent:"primary",isActive:!0,class:"bg-primary-900"},{intent:"secondary",isActive:!0,class:"bg-primary-300"},{intent:"tertiary",isActive:!0,class:"bg-primary-500 text-white"},{intent:"outline",isActive:!0,class:"border border-primary-500 bg-primary-300 text-primary-500"},{intent:"success",isActive:!0,class:"border border-transparent bg-success-300 text-success-600"},{intent:"error",isActive:!0,class:"border border-transparent bg-error-300 text-error-600"},{intent:"orangeWarning",isActive:!0,class:"border border-transparent bg-orange-warning-300 text-orange-warning-600"},{intent:"yellowWarning",isActive:!0,class:"border border-transparent bg-yellow-warning-300 text-yellow-warning-600"},{intent:"info",isActive:!0,class:"border border-transparent bg-primary-300 text-primary-600"}]});exports.buttonVariants=e;
|
package/dist/index.es2.js
CHANGED
|
@@ -3,44 +3,44 @@ import { Button as I } from "react-aria-components";
|
|
|
3
3
|
import { cn as b } from "./index.es4.js";
|
|
4
4
|
import { buttonVariants as w } from "./index.es5.js";
|
|
5
5
|
import { Loader as B } from "./index.es6.js";
|
|
6
|
-
const
|
|
6
|
+
const x = ({
|
|
7
7
|
renderPosition: s,
|
|
8
|
-
leftIcon:
|
|
9
|
-
rightIcon:
|
|
8
|
+
leftIcon: m,
|
|
9
|
+
rightIcon: c,
|
|
10
10
|
isLoading: r,
|
|
11
11
|
loaderPosition: l,
|
|
12
12
|
loaderProps: e
|
|
13
13
|
}) => {
|
|
14
|
-
const a = s === "left" ?
|
|
14
|
+
const a = s === "left" ? m : s === "right" ? c : null;
|
|
15
15
|
return a || r && l === s ? /* @__PURE__ */ t.jsx("span", { className: s === "left" ? "mr-1" : "ml-1", children: r && l === s ? /* @__PURE__ */ t.jsx(B, { size: "sm", ...e }) : a }) : null;
|
|
16
16
|
}, D = (s) => {
|
|
17
17
|
const {
|
|
18
|
-
intent:
|
|
19
|
-
size:
|
|
18
|
+
intent: m = "primary",
|
|
19
|
+
size: c = "md",
|
|
20
20
|
leftIcon: r,
|
|
21
21
|
rightIcon: l,
|
|
22
22
|
isDisabled: e,
|
|
23
23
|
children: a,
|
|
24
|
-
className:
|
|
24
|
+
className: j,
|
|
25
25
|
isLoading: n,
|
|
26
|
-
loaderPosition:
|
|
27
|
-
loaderProps:
|
|
28
|
-
fullWidth:
|
|
29
|
-
unstyled:
|
|
30
|
-
focus:
|
|
26
|
+
loaderPosition: u = "left",
|
|
27
|
+
loaderProps: p,
|
|
28
|
+
fullWidth: N = !1,
|
|
29
|
+
unstyled: f = !1,
|
|
30
|
+
focus: h = !0,
|
|
31
31
|
...g
|
|
32
|
-
} = s, v = (
|
|
33
|
-
|
|
34
|
-
intent:
|
|
35
|
-
size:
|
|
36
|
-
isHovered:
|
|
37
|
-
isActive:
|
|
32
|
+
} = s, v = (d, o, i) => b(
|
|
33
|
+
f ? "" : w({
|
|
34
|
+
intent: m,
|
|
35
|
+
size: c,
|
|
36
|
+
isHovered: o || (h || !f ? i : !1),
|
|
37
|
+
isActive: d,
|
|
38
38
|
isDisabled: e,
|
|
39
|
-
isFocused:
|
|
40
|
-
fullWidth:
|
|
39
|
+
isFocused: h || !f ? i : !1,
|
|
40
|
+
fullWidth: N,
|
|
41
41
|
isLoading: n
|
|
42
42
|
}),
|
|
43
|
-
|
|
43
|
+
j
|
|
44
44
|
);
|
|
45
45
|
return /* @__PURE__ */ t.jsxs(
|
|
46
46
|
I,
|
|
@@ -48,26 +48,26 @@ const h = ({
|
|
|
48
48
|
"data-disabled": e || void 0,
|
|
49
49
|
"data-loading": n || void 0,
|
|
50
50
|
isDisabled: e,
|
|
51
|
-
className: ({ isPressed:
|
|
51
|
+
className: ({ isPressed: d, isHovered: o, isFocusVisible: i }) => v(d, o, i),
|
|
52
52
|
...g,
|
|
53
53
|
children: [
|
|
54
54
|
/* @__PURE__ */ t.jsx(
|
|
55
|
-
|
|
55
|
+
x,
|
|
56
56
|
{
|
|
57
57
|
renderPosition: "left",
|
|
58
|
-
loaderPosition:
|
|
59
|
-
loaderProps:
|
|
58
|
+
loaderPosition: u,
|
|
59
|
+
loaderProps: p,
|
|
60
60
|
isLoading: n,
|
|
61
61
|
leftIcon: r
|
|
62
62
|
}
|
|
63
63
|
),
|
|
64
64
|
/* @__PURE__ */ t.jsx("span", { className: "flex h-full items-center overflow-hidden whitespace-nowrap", children: a }),
|
|
65
65
|
/* @__PURE__ */ t.jsx(
|
|
66
|
-
|
|
66
|
+
x,
|
|
67
67
|
{
|
|
68
68
|
renderPosition: "right",
|
|
69
|
-
loaderPosition:
|
|
70
|
-
loaderProps:
|
|
69
|
+
loaderPosition: u,
|
|
70
|
+
loaderProps: p,
|
|
71
71
|
isLoading: n,
|
|
72
72
|
rightIcon: l
|
|
73
73
|
}
|
package/dist/index.es5.js
CHANGED
|
@@ -36,7 +36,7 @@ const t = r(
|
|
|
36
36
|
true: "pointer-events-none cursor-not-allowed opacity-70"
|
|
37
37
|
},
|
|
38
38
|
isFocused: {
|
|
39
|
-
true: "focus:outline-none focus:ring-2 focus:ring-sky-400 focus:ring-offset-
|
|
39
|
+
true: "focus:outline-none focus:ring-2 focus:ring-sky-400 focus:ring-offset-[0.4px] border-none",
|
|
40
40
|
false: ""
|
|
41
41
|
}
|
|
42
42
|
},
|
|
@@ -91,7 +91,32 @@ const t = r(
|
|
|
91
91
|
isHovered: !0,
|
|
92
92
|
class: "bg-primary-600 text-neutral-50"
|
|
93
93
|
},
|
|
94
|
-
/* /
|
|
94
|
+
/* /Focus State */
|
|
95
|
+
{
|
|
96
|
+
intent: "success",
|
|
97
|
+
isFocused: !0,
|
|
98
|
+
class: "border-[1.5px] focus:ring-success-800"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
intent: "error",
|
|
102
|
+
isFocused: !0,
|
|
103
|
+
class: "border-[1.5px] focus:ring-error-800"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
intent: "orangeWarning",
|
|
107
|
+
isFocused: !0,
|
|
108
|
+
class: "border-[1.5px] focus:ring-orange-800"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
intent: "yellowWarning",
|
|
112
|
+
isFocused: !0,
|
|
113
|
+
class: "border-[1.5px] focus:ring-yellow-800"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
intent: "info",
|
|
117
|
+
isFocused: !0,
|
|
118
|
+
class: "border-[1.5px] focus:ring-primary-800"
|
|
119
|
+
},
|
|
95
120
|
/* Active State */
|
|
96
121
|
{
|
|
97
122
|
intent: "primary",
|
package/dist/style.css
CHANGED
|
@@ -847,6 +847,9 @@ select {
|
|
|
847
847
|
.border {
|
|
848
848
|
border-width: 1px;
|
|
849
849
|
}
|
|
850
|
+
.border-\[1\.5px\] {
|
|
851
|
+
border-width: 1.5px;
|
|
852
|
+
}
|
|
850
853
|
.border-none {
|
|
851
854
|
border-style: none;
|
|
852
855
|
}
|
|
@@ -1101,10 +1104,30 @@ select {
|
|
|
1101
1104
|
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
1102
1105
|
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
1103
1106
|
}
|
|
1107
|
+
.focus\:ring-error-800:focus {
|
|
1108
|
+
--tw-ring-opacity: 1;
|
|
1109
|
+
--tw-ring-color: rgb(94 27 20 / var(--tw-ring-opacity));
|
|
1110
|
+
}
|
|
1111
|
+
.focus\:ring-orange-800:focus {
|
|
1112
|
+
--tw-ring-opacity: 1;
|
|
1113
|
+
--tw-ring-color: rgb(154 52 18 / var(--tw-ring-opacity));
|
|
1114
|
+
}
|
|
1115
|
+
.focus\:ring-primary-800:focus {
|
|
1116
|
+
--tw-ring-opacity: 1;
|
|
1117
|
+
--tw-ring-color: rgb(23 13 108 / var(--tw-ring-opacity));
|
|
1118
|
+
}
|
|
1104
1119
|
.focus\:ring-sky-400:focus {
|
|
1105
1120
|
--tw-ring-opacity: 1;
|
|
1106
1121
|
--tw-ring-color: rgb(38 157 217 / var(--tw-ring-opacity));
|
|
1107
1122
|
}
|
|
1108
|
-
.focus\:ring-
|
|
1109
|
-
--tw-ring-
|
|
1123
|
+
.focus\:ring-success-800:focus {
|
|
1124
|
+
--tw-ring-opacity: 1;
|
|
1125
|
+
--tw-ring-color: rgb(2 96 56 / var(--tw-ring-opacity));
|
|
1126
|
+
}
|
|
1127
|
+
.focus\:ring-yellow-800:focus {
|
|
1128
|
+
--tw-ring-opacity: 1;
|
|
1129
|
+
--tw-ring-color: rgb(113 96 12 / var(--tw-ring-opacity));
|
|
1130
|
+
}
|
|
1131
|
+
.focus\:ring-offset-\[0\.4px\]:focus {
|
|
1132
|
+
--tw-ring-offset-width: 0.4px;
|
|
1110
1133
|
}
|