@simpli-route/apollo-ds 0.0.3 → 0.0.5
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/Button/types.d.ts +1 -1
- package/dist/components/Button/variants.d.ts +1 -1
- 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 +28 -2
- package/dist/style.css +29 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const buttonVariants: (props?: ({
|
|
2
2
|
intent?: "primary" | "secondary" | "tertiary" | "outline" | "success" | "error" | "orangeWarning" | "yellowWarning" | "info" | null | undefined;
|
|
3
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
3
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
4
4
|
isDisabled?: boolean | null | undefined;
|
|
5
5
|
isHovered?: boolean | null | undefined;
|
|
6
6
|
isActive?: boolean | null | undefined;
|
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:{xs:"rounded px-3 py-1",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
|
@@ -15,6 +15,7 @@ const t = r(
|
|
|
15
15
|
info: "border border-primary-800 text-primary-800"
|
|
16
16
|
},
|
|
17
17
|
size: {
|
|
18
|
+
xs: "rounded px-3 py-1",
|
|
18
19
|
sm: "rounded px-3 py-2",
|
|
19
20
|
md: "rounded-lg px-4 py-3",
|
|
20
21
|
lg: "rounded-lg px-6 py-4"
|
|
@@ -36,7 +37,7 @@ const t = r(
|
|
|
36
37
|
true: "pointer-events-none cursor-not-allowed opacity-70"
|
|
37
38
|
},
|
|
38
39
|
isFocused: {
|
|
39
|
-
true: "focus:outline-none focus:ring-2 focus:ring-sky-400 focus:ring-offset-
|
|
40
|
+
true: "focus:outline-none focus:ring-2 focus:ring-sky-400 focus:ring-offset-[0.4px] border-none",
|
|
40
41
|
false: ""
|
|
41
42
|
}
|
|
42
43
|
},
|
|
@@ -91,7 +92,32 @@ const t = r(
|
|
|
91
92
|
isHovered: !0,
|
|
92
93
|
class: "bg-primary-600 text-neutral-50"
|
|
93
94
|
},
|
|
94
|
-
/* /
|
|
95
|
+
/* /Focus State */
|
|
96
|
+
{
|
|
97
|
+
intent: "success",
|
|
98
|
+
isFocused: !0,
|
|
99
|
+
class: "border-[1.5px] focus:ring-success-800"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
intent: "error",
|
|
103
|
+
isFocused: !0,
|
|
104
|
+
class: "border-[1.5px] focus:ring-error-800"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
intent: "orangeWarning",
|
|
108
|
+
isFocused: !0,
|
|
109
|
+
class: "border-[1.5px] focus:ring-orange-800"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
intent: "yellowWarning",
|
|
113
|
+
isFocused: !0,
|
|
114
|
+
class: "border-[1.5px] focus:ring-yellow-800"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
intent: "info",
|
|
118
|
+
isFocused: !0,
|
|
119
|
+
class: "border-[1.5px] focus:ring-primary-800"
|
|
120
|
+
},
|
|
95
121
|
/* Active State */
|
|
96
122
|
{
|
|
97
123
|
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
|
}
|
|
@@ -956,6 +959,10 @@ select {
|
|
|
956
959
|
padding-left: 1.5rem;
|
|
957
960
|
padding-right: 1.5rem;
|
|
958
961
|
}
|
|
962
|
+
.py-1 {
|
|
963
|
+
padding-top: 0.25rem;
|
|
964
|
+
padding-bottom: 0.25rem;
|
|
965
|
+
}
|
|
959
966
|
.py-2 {
|
|
960
967
|
padding-top: 0.5rem;
|
|
961
968
|
padding-bottom: 0.5rem;
|
|
@@ -1101,10 +1108,30 @@ select {
|
|
|
1101
1108
|
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
1102
1109
|
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
1103
1110
|
}
|
|
1111
|
+
.focus\:ring-error-800:focus {
|
|
1112
|
+
--tw-ring-opacity: 1;
|
|
1113
|
+
--tw-ring-color: rgb(94 27 20 / var(--tw-ring-opacity));
|
|
1114
|
+
}
|
|
1115
|
+
.focus\:ring-orange-800:focus {
|
|
1116
|
+
--tw-ring-opacity: 1;
|
|
1117
|
+
--tw-ring-color: rgb(154 52 18 / var(--tw-ring-opacity));
|
|
1118
|
+
}
|
|
1119
|
+
.focus\:ring-primary-800:focus {
|
|
1120
|
+
--tw-ring-opacity: 1;
|
|
1121
|
+
--tw-ring-color: rgb(23 13 108 / var(--tw-ring-opacity));
|
|
1122
|
+
}
|
|
1104
1123
|
.focus\:ring-sky-400:focus {
|
|
1105
1124
|
--tw-ring-opacity: 1;
|
|
1106
1125
|
--tw-ring-color: rgb(38 157 217 / var(--tw-ring-opacity));
|
|
1107
1126
|
}
|
|
1108
|
-
.focus\:ring-
|
|
1109
|
-
--tw-ring-
|
|
1127
|
+
.focus\:ring-success-800:focus {
|
|
1128
|
+
--tw-ring-opacity: 1;
|
|
1129
|
+
--tw-ring-color: rgb(2 96 56 / var(--tw-ring-opacity));
|
|
1130
|
+
}
|
|
1131
|
+
.focus\:ring-yellow-800:focus {
|
|
1132
|
+
--tw-ring-opacity: 1;
|
|
1133
|
+
--tw-ring-color: rgb(113 96 12 / var(--tw-ring-opacity));
|
|
1134
|
+
}
|
|
1135
|
+
.focus\:ring-offset-\[0\.4px\]:focus {
|
|
1136
|
+
--tw-ring-offset-width: 0.4px;
|
|
1110
1137
|
}
|