@zonos/amino 5.1.15 → 5.1.17
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/components/banner/Banner.js +1 -1
- package/components/rich-radio/RichRadio.js +1 -1
- package/components/switch/Switch.d.ts +5 -2
- package/components/switch/Switch.js +1 -1
- package/components/theme-select/ThemeSelect.js +1 -1
- package/components/thumbnail/Thumbnail.js +1 -1
- package/package.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),r=require("styled-components"),o=require("../button/LegacyButton.js"),t=require("../stack/HStack.js"),a=require("../text/Text.js"),c=require("../../icons/CheckCircleDuotoneIcon.js"),i=require("../../icons/InfoDuotoneIcon.js"),l=require("../../icons/RemoveCircleDuotoneIcon.js"),s=require("../../icons/RemoveIcon.js"),u=require("../../icons/WarningDuotoneIcon.js"),d=require("../../styles/constants/theme.js");function m(e){return e&&e.__esModule?e:{default:e}}require("react"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("../stack/Stack.js"),require("../../icons/icon-base/_IconBase.js");var j,p,g,f,x,h,b,_,k,y,I,C,q,v,T=m(r),O=T.default.div(j||(j=e.__makeTemplateObject(["\n border-radius: ",";\n padding: ",";\n"],["\n border-radius: ",";\n padding: ",";\n"])),d.theme.radius6,d.theme.space16),D=T.default.div(p||(p=e.__makeTemplateObject(["\n display: grid;\n align-items: ",";\n grid-template-areas:\n 'icon header close'\n '. content .';\n grid-template-columns: 32px auto ",";\n"],["\n display: grid;\n align-items: ",";\n grid-template-areas:\n 'icon header close'\n '. content .';\n grid-template-columns: 32px auto ",";\n"])),(function(e){return e.onlyContent?"start":"center"}),(function(e){return e.withoutCloseButton?"0px":"32px"})),w=T.default.div(g||(g=e.__makeTemplateObject(["\n grid-area: icon;\n justify-self: start;\n"],["\n grid-area: icon;\n justify-self: start;\n"]))),B=T.default.div(f||(f=e.__makeTemplateObject(["\n grid-area: close;\n justify-self: end;\n"],["\n grid-area: close;\n justify-self: end;\n"]))),R=T.default(o.LegacyButton)(x||(x=e.__makeTemplateObject(["\n && {\n width: 20px;\n }\n"],["\n && {\n width: 20px;\n }\n"]))),z=T.default.div(h||(h=e.__makeTemplateObject(["\n grid-area: header;\n color: ",";\n"],["\n grid-area: header;\n color: ",";\n"])),(function(e){return d.theme[e.color]})),N=T.default.div(b||(b=e.__makeTemplateObject(["\n grid-area: content;\n margin-top: 8px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n"],["\n grid-area: content;\n margin-top: 8px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n"]))),S=T.default.header(_||(_=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n"]))),H=T.default.footer(k||(k=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"]))),A=T.default(O)(y||(y=e.__makeTemplateObject(["\n background: ",";\n color: ",";\n"],["\n background: ",";\n color: ",";\n"])),d.theme.gray100,d.theme.gray700),L=T.default(O)(I||(I=e.__makeTemplateObject(["\n background: ",";\n color: ",";\n"],["\n background: ",";\n color: ",";\n"])),d.theme.blue100,d.theme.blue700),W=T.default(O)(C||(C=e.__makeTemplateObject(["\n background: ",";\n color: ",";\n"],["\n background: ",";\n color: ",";\n"])),d.theme.green100,d.theme.green700),G=T.default(O)(q||(q=e.__makeTemplateObject(["\n background: ",";\n color: ",";\n"],["\n background: ",";\n color: ",";\n"])),d.theme.orange100,d.theme.orange700),M=T.default(O)(v||(v=e.__makeTemplateObject(["\n background: ",";\n color: ",";\n"],["\n background: ",";\n color: ",";\n"])),d.theme.red100,d.theme.red700);exports.Banner=function(r){var o=r.children,d=r.className,m=void 0===d?"":d,j=r.footerActions,p=r.headerActions,g=r.intent,f=r.onClose,x=r.title,h=function(r){var c=r.intentIcon,i=r.removeIconColor,l=!!o&&!x&&!j,u=e.__read([x&&n.jsxs(S,{children:[n.jsx(a.Text,{color:i,type:"label",children:x}),p&&n.jsx(t.HStack,{spacing:8,children:p})]}),o,j&&n.jsx(H,{children:n.jsx(t.HStack,{spacing:8,children:j})})].filter(Boolean),3),d=u[0],m=u[1],g=u[2];return n.jsxs(D,{onlyContent:l,withoutCloseButton:!f,children:[n.jsx(w,{children:c}),f&&n.jsx(B,{children:n.jsx(R,{icon:n.jsx(s.RemoveIcon,{color:i,size:20}),intent:"text",onClick:f})}),n.jsx(z,{color:i,children:d}),m&&n.jsxs(N,{children:[m,g]})]})};switch(g){case"info":return n.jsx(L,{className:m,children:h({intentIcon:n.jsx(c.CheckCircleDuotoneIcon,{color:"blue800",secondaryColor:"
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),r=require("styled-components"),o=require("../button/LegacyButton.js"),t=require("../stack/HStack.js"),a=require("../text/Text.js"),c=require("../../icons/CheckCircleDuotoneIcon.js"),i=require("../../icons/InfoDuotoneIcon.js"),l=require("../../icons/RemoveCircleDuotoneIcon.js"),s=require("../../icons/RemoveIcon.js"),u=require("../../icons/WarningDuotoneIcon.js"),d=require("../../styles/constants/theme.js");function m(e){return e&&e.__esModule?e:{default:e}}require("react"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("../stack/Stack.js"),require("../../icons/icon-base/_IconBase.js");var j,p,g,f,x,h,b,_,k,y,I,C,q,v,T=m(r),O=T.default.div(j||(j=e.__makeTemplateObject(["\n border-radius: ",";\n padding: ",";\n"],["\n border-radius: ",";\n padding: ",";\n"])),d.theme.radius6,d.theme.space16),D=T.default.div(p||(p=e.__makeTemplateObject(["\n display: grid;\n align-items: ",";\n grid-template-areas:\n 'icon header close'\n '. content .';\n grid-template-columns: 32px auto ",";\n"],["\n display: grid;\n align-items: ",";\n grid-template-areas:\n 'icon header close'\n '. content .';\n grid-template-columns: 32px auto ",";\n"])),(function(e){return e.onlyContent?"start":"center"}),(function(e){return e.withoutCloseButton?"0px":"32px"})),w=T.default.div(g||(g=e.__makeTemplateObject(["\n grid-area: icon;\n justify-self: start;\n"],["\n grid-area: icon;\n justify-self: start;\n"]))),B=T.default.div(f||(f=e.__makeTemplateObject(["\n grid-area: close;\n justify-self: end;\n"],["\n grid-area: close;\n justify-self: end;\n"]))),R=T.default(o.LegacyButton)(x||(x=e.__makeTemplateObject(["\n && {\n width: 20px;\n }\n"],["\n && {\n width: 20px;\n }\n"]))),z=T.default.div(h||(h=e.__makeTemplateObject(["\n grid-area: header;\n color: ",";\n"],["\n grid-area: header;\n color: ",";\n"])),(function(e){return d.theme[e.color]})),N=T.default.div(b||(b=e.__makeTemplateObject(["\n grid-area: content;\n margin-top: 8px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n"],["\n grid-area: content;\n margin-top: 8px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n"]))),S=T.default.header(_||(_=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n"]))),H=T.default.footer(k||(k=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"]))),A=T.default(O)(y||(y=e.__makeTemplateObject(["\n background: ",";\n color: ",";\n"],["\n background: ",";\n color: ",";\n"])),d.theme.gray100,d.theme.gray700),L=T.default(O)(I||(I=e.__makeTemplateObject(["\n background: ",";\n color: ",";\n"],["\n background: ",";\n color: ",";\n"])),d.theme.blue100,d.theme.blue700),W=T.default(O)(C||(C=e.__makeTemplateObject(["\n background: ",";\n color: ",";\n"],["\n background: ",";\n color: ",";\n"])),d.theme.green100,d.theme.green700),G=T.default(O)(q||(q=e.__makeTemplateObject(["\n background: ",";\n color: ",";\n"],["\n background: ",";\n color: ",";\n"])),d.theme.orange100,d.theme.orange700),M=T.default(O)(v||(v=e.__makeTemplateObject(["\n background: ",";\n color: ",";\n"],["\n background: ",";\n color: ",";\n"])),d.theme.red100,d.theme.red700);exports.Banner=function(r){var o=r.children,d=r.className,m=void 0===d?"":d,j=r.footerActions,p=r.headerActions,g=r.intent,f=r.onClose,x=r.title,h=function(r){var c=r.intentIcon,i=r.removeIconColor,l=!!o&&!x&&!j,u=e.__read([x&&n.jsxs(S,{children:[n.jsx(a.Text,{color:i,type:"label",children:x}),p&&n.jsx(t.HStack,{spacing:8,children:p})]}),o,j&&n.jsx(H,{children:n.jsx(t.HStack,{spacing:8,children:j})})].filter(Boolean),3),d=u[0],m=u[1],g=u[2];return n.jsxs(D,{onlyContent:l,withoutCloseButton:!f,children:[n.jsx(w,{children:c}),f&&n.jsx(B,{children:n.jsx(R,{icon:n.jsx(s.RemoveIcon,{color:i,size:20}),intent:"text",onClick:f})}),n.jsx(z,{color:i,children:d}),m&&n.jsxs(N,{children:[m,g]})]})};switch(g){case"info":return n.jsx(L,{className:m,children:h({intentIcon:n.jsx(c.CheckCircleDuotoneIcon,{color:"blue800",secondaryColor:"blue400",size:20}),removeIconColor:"blue800"})});case"success":return n.jsx(W,{className:m,children:h({intentIcon:n.jsx(c.CheckCircleDuotoneIcon,{color:"green800",secondaryColor:"green400",size:20}),removeIconColor:"green800"})});case"warning":return n.jsx(G,{className:m,children:h({intentIcon:n.jsx(u.WarningDuotoneIcon,{color:"orange800",secondaryColor:"orange400",size:20}),removeIconColor:"orange800"})});case"error":return n.jsx(M,{className:m,children:h({intentIcon:n.jsx(l.RemoveCircleDuotoneIcon,{color:"red800",secondaryColor:"red400",size:20}),removeIconColor:"red800"})});default:return n.jsx(A,{className:m,children:h({intentIcon:n.jsx(i.InfoDuotoneIcon,{color:"gray800",secondaryColor:"gray400",size:20}),removeIconColor:"gray800"})})}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react"),a=require("react-tooltip"),r=require("styled-components"),o=require("../stack/VStack.js"),i=require("../text/Text.js"),d=require("../../icons/CheckmarkIcon.js"),l=require("../../styles/constants/theme.js");function c(e){return e&&e.__esModule?e:{default:e}}require("../stack/Stack.js"),require("../../icons/icon-base/_IconBase.js");var s,u,p,h,x,b,m,g=c(a),f=c(r),k=f.default.div(s||(s=e.__makeTemplateObject(["\n position: absolute;\n content: ' ';\n right: ",";\n background: ",";\n border-radius: 50px;\n padding: 5px;\n svg {\n color: ",";\n }\n"],["\n position: absolute;\n content: ' ';\n right: ",";\n background: ",";\n border-radius: 50px;\n padding: 5px;\n svg {\n color: ",";\n }\n"])),l.theme.space16,l.theme.gray400,l.theme.gray0),j=f.default.div(u||(u=e.__makeTemplateObject(["\n position: absolute;\n right: ",";\n background: ",";\n content: ' ';\n border-radius: 50px;\n padding:
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react"),a=require("react-tooltip"),r=require("styled-components"),o=require("../stack/VStack.js"),i=require("../text/Text.js"),d=require("../../icons/CheckmarkIcon.js"),l=require("../../styles/constants/theme.js");function c(e){return e&&e.__esModule?e:{default:e}}require("../stack/Stack.js"),require("../../icons/icon-base/_IconBase.js");var s,u,p,h,x,b,m,g=c(a),f=c(r),k=f.default.div(s||(s=e.__makeTemplateObject(["\n position: absolute;\n content: ' ';\n right: ",";\n background: ",";\n border-radius: 50px;\n padding: 5px;\n svg {\n color: ",";\n }\n"],["\n position: absolute;\n content: ' ';\n right: ",";\n background: ",";\n border-radius: 50px;\n padding: 5px;\n svg {\n color: ",";\n }\n"])),l.theme.space16,l.theme.gray400,l.theme.gray0),j=f.default.div(u||(u=e.__makeTemplateObject(["\n position: absolute;\n right: ",";\n background: ",";\n content: ' ';\n border-radius: 50px;\n padding: 2px;\n display: flex;\n align-items: center;\n justify-content: center;\n"],["\n position: absolute;\n right: ",";\n background: ",";\n content: ' ';\n border-radius: 50px;\n padding: 2px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])),l.theme.space16,l.theme.blue600),v=f.default.button(p||(p=e.__makeTemplateObject(["\n position: relative;\n appearance: none;\n background: ",";\n padding: ",";\n padding-right: calc("," + 10px);\n border: ",";\n border-radius: ",";\n text-align: left;\n transition: all 150ms ease-in-out;\n display: flex;\n flex-direction: row;\n align-items: center;\n height: ","px;\n &:hover {\n background: ",";\n border: 1px solid ",";\n "," {\n background: ",";\n }\n }\n\n &:focus {\n outline: none;\n border: 1px solid ",";\n box-shadow: 0 0 0 1px ",";\n }\n > div {\n display: flex;\n flex-direction: column;\n flex: 1;\n }\n"],["\n position: relative;\n appearance: none;\n background: ",";\n padding: ",";\n padding-right: calc("," + 10px);\n border: ",";\n border-radius: ",";\n text-align: left;\n transition: all 150ms ease-in-out;\n display: flex;\n flex-direction: row;\n align-items: center;\n height: ","px;\n &:hover {\n background: ",";\n border: 1px solid ",";\n "," {\n background: ",";\n }\n }\n\n &:focus {\n outline: none;\n border: 1px solid ",";\n box-shadow: 0 0 0 1px ",";\n }\n > div {\n display: flex;\n flex-direction: column;\n flex: 1;\n }\n"])),l.theme.gray0,l.theme.space16,l.theme.space40,l.theme.border,l.theme.radius6,(function(e){return e.itemHeight}),l.theme.gray100,l.theme.gray200,k,l.theme.gray600,l.theme.blue400,l.theme.blue400),y=f.default(i.Text)(h||(h=e.__makeTemplateObject([""],[""]))),_=f.default(i.Text)(x||(x=e.__makeTemplateObject(["\n color: ",";\n line-height: 24px;\n [data-state='checked'] & {\n color: ",";\n }\n"],["\n color: ",";\n line-height: 24px;\n [data-state='checked'] & {\n color: ",";\n }\n"])),l.theme.textColor,l.theme.primary),q=f.default(o.VStack)(b||(b=e.__makeTemplateObject(["\n ","[data-state='checked'] {\n background: ",";\n border: 1px solid ",";\n box-shadow: 0 0 0 1px ",";\n color: ",";\n "," {\n color: ",";\n }\n }\n svg {\n color: ",";\n width: 16px;\n height: 16px;\n }\n"],["\n ","[data-state='checked'] {\n background: ",";\n border: 1px solid ",";\n box-shadow: 0 0 0 1px ",";\n color: ",";\n "," {\n color: ",";\n }\n }\n svg {\n color: ",";\n width: 16px;\n height: 16px;\n }\n"])),v,l.theme.blue100,l.theme.blue400,l.theme.blue400,l.theme.blue700,y,l.theme.blue600,l.theme.gray0),w=f.default(g.default)(m||(m=e.__makeTemplateObject(["\n && {\n max-width: 350px;\n border-radius: 10px;\n }\n"],["\n && {\n max-width: 350px;\n border-radius: 10px;\n }\n"])));exports.RichRadio=function(a){var r=a.activeIcon,o=a.className,i=a.icon,l=a.itemHeight,c=void 0===l?64:l,s=a.items,u=a.onChange,p=a.renderCustomText,h=a.value,x=e.__read(t.useState(h),2),b=x[0],m=x[1];t.useEffect((function(){m(h)}),[h]);return n.jsx(q,{className:o,spacing:16,children:s.map((function(t){return n.jsxs(v,{"data-disabled":t.disabled,"data-state":t.value===b?"checked":"","data-tip":t.tooltip,itemHeight:c,onClick:function(){var e;e=t.value,m(e),u(e)},type:"button",children:[t.tooltip&&n.jsx(w,e.__assign({arrowColor:"transparent",effect:"solid"},t.tooltipSetting)),p?p(t):n.jsxs("div",{children:[n.jsx(_,{type:"label",children:t.label}),t.subtitle&&n.jsx(y,{color:"gray900",type:"body",children:t.subtitle})]}),!!i&&n.jsx(k,{children:i||n.jsx(d.CheckmarkIcon,{})}),t.value===b&&n.jsx(j,{children:r||n.jsx(d.CheckmarkIcon,{})})]},t.value)}))})};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
export type SwitchProps = {
|
|
3
3
|
checked: boolean;
|
|
4
|
+
className?: string;
|
|
4
5
|
disabled?: boolean;
|
|
5
|
-
icon?: ReactNode;
|
|
6
6
|
label?: string;
|
|
7
7
|
labelDescription?: string;
|
|
8
|
+
labelIcon?: ReactNode;
|
|
8
9
|
subtitle?: string;
|
|
10
|
+
switchIconLeft?: ReactNode;
|
|
11
|
+
switchIconRight?: ReactNode;
|
|
9
12
|
onChange: (checked: boolean) => void;
|
|
10
13
|
};
|
|
11
|
-
export declare const Switch: ({ checked,
|
|
14
|
+
export declare const Switch: ({ checked, className, disabled, label, labelDescription, labelIcon, onChange, subtitle, switchIconLeft, switchIconRight, }: SwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),t=require("styled-components"),
|
|
1
|
+
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),t=require("clsx"),i=require("styled-components"),a=require("../text/Text.js"),r=require("../../styles/constants/theme.js");function p(n){return n&&n.__esModule?n:{default:n}}var o,l,x,h,c,d,s,u,g,m,b=p(t),f=p(i),k=f.default.div(o||(o=n.__makeTemplateObject(["\n background: ",";\n box-shadow: ",";\n height: 14px;\n width: 14px;\n border-radius: 50%;\n transition: ",";\n position: absolute;\n top: 1px;\n left: ",";\n [data-theme='night'] & {\n background: ",";\n }\n"],["\n background: ",";\n box-shadow: ",";\n height: 14px;\n width: 14px;\n border-radius: 50%;\n transition: ",";\n position: absolute;\n top: 1px;\n left: ",";\n [data-theme='night'] & {\n background: ",";\n }\n"])),r.theme.gray0,(function(n){return n.checked?"0px -1px 1px 0px rgba(68, 94, 238, 0.08) inset, 0px 1px 3px 0px rgba(0, 0, 0, 0.20)":"0px -1px 1px 0px rgba(0, 0, 0, 0.08) inset, 0px 1px 3px 0px rgba(0, 0, 0, 0.20)"}),r.theme.transition,(function(n){return n.checked?"calc(100% - 15px)":"1px"}),r.theme.gray200),w=f.default(k)(l||(l=n.__makeTemplateObject(["\n height: 28px;\n width: 28px;\n top: 2px;\n left: ",";\n box-shadow:\n 0px -1px 1px 0px rgba(0, 0, 0, 0.2) inset,\n 0px 1px 3px 0px rgba(0, 0, 0, 0.4);\n"],["\n height: 28px;\n width: 28px;\n top: 2px;\n left: ",";\n box-shadow:\n 0px -1px 1px 0px rgba(0, 0, 0, 0.2) inset,\n 0px 1px 3px 0px rgba(0, 0, 0, 0.4);\n"])),(function(n){return n.checked?"calc(100% - 30px)":"2px"})),j=f.default.div(x||(x=n.__makeTemplateObject(["\n margin-right: ",";\n width: 32px;\n height: 16px;\n min-width: 32px;\n min-height: 16px;\n line-height: 16px;\n border-radius: 20px;\n background: ",";\n box-shadow: ",";\n display: block;\n user-select: none;\n position: relative;\n"],["\n margin-right: ",";\n width: 32px;\n height: 16px;\n min-width: 32px;\n min-height: 16px;\n line-height: 16px;\n border-radius: 20px;\n background: ",";\n box-shadow: ",";\n display: block;\n user-select: none;\n position: relative;\n"])),r.theme.space16,(function(n){return n.checked?r.theme.gray0:r.theme.gray100}),r.theme.v3ShadowInset),_=f.default(j)(h||(h=n.__makeTemplateObject(["\n width: 62px;\n height: 32px;\n min-width: 24px;\n background: ",";\n"],["\n width: 62px;\n height: 32px;\n min-width: 24px;\n background: ",";\n"])),r.theme.gray50),y=f.default(a.Text)(c||(c=n.__makeTemplateObject(["\n margin-bottom: 0;\n"],["\n margin-bottom: 0;\n"]))),v=f.default(a.Text)(d||(d=n.__makeTemplateObject([""],[""]))),T=f.default.span(s||(s=n.__makeTemplateObject(["\n margin-left: 4px;\n color: ",";\n"],["\n margin-left: 4px;\n color: ",";\n"])),r.theme.gray600),O=f.default.div(u||(u=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n line-height: 16px;\n\n svg {\n margin-right: 4px;\n }\n"],["\n display: flex;\n align-items: center;\n line-height: 16px;\n\n svg {\n margin-right: 4px;\n }\n"]))),q=f.default.label(g||(g=n.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n cursor: pointer;\n\n &.disabled {\n "," {\n opacity: 0.6;\n }\n "," {\n opacity: 0.95;\n }\n "," {\n color: ",";\n }\n "," {\n color: ",";\n }\n\n cursor: not-allowed;\n }\n"],["\n display: flex;\n flex-direction: row;\n cursor: pointer;\n\n &.disabled {\n "," {\n opacity: 0.6;\n }\n "," {\n opacity: 0.95;\n }\n "," {\n color: ",";\n }\n "," {\n color: ",";\n }\n\n cursor: not-allowed;\n }\n"])),j,k,y,r.theme.gray600,v,r.theme.gray400),I=f.default.div(m||(m=n.__makeTemplateObject(["\n position: absolute;\n top: 6px;\n left: ",";\n right: ",";\n svg {\n height: 20px;\n width: 20px;\n }\n"],["\n position: absolute;\n top: 6px;\n left: ",";\n right: ",";\n svg {\n height: 20px;\n width: 20px;\n }\n"])),(function(n){return n.left?"5.8px":"auto"}),(function(n){return n.left?"auto":"5.6px"}));exports.Switch=function(n){var t=n.checked,i=n.className,a=n.disabled,r=n.label,p=n.labelDescription,o=n.labelIcon,l=n.onChange,x=n.subtitle,h=n.switchIconLeft,c=n.switchIconRight,d=null==r?void 0:r.replace(/\s/g,"-").toLowerCase(),s=Boolean(h||c);return e.jsxs(q,{checked:t,className:b.default(i,{disabled:a}),htmlFor:d,onClick:function(){return!a&&l(!t)},children:[s?e.jsxs(_,{checked:t,children:[e.jsx(w,{checked:t,id:d}),e.jsx(I,{left:!0,children:h}),e.jsx(I,{children:c})]}):e.jsx(j,{checked:t,children:e.jsx(k,{checked:t,id:d})}),e.jsxs("div",{children:[e.jsxs(O,{children:[o,e.jsxs(y,{type:"input-label",children:[r,p&&e.jsx(T,{children:p})]})]}),x&&e.jsx(v,{type:"subtitle",children:x})]})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),r=require("styled-components"),t=require("../card/Card.js"),i=require("../select/Select.js"),s=require("../stack/HStack.js"),c=require("../switch/Switch.js"),o=require("../text/Text.js"),a=require("../../icons/custom/theme/ThemeDarkIcon.js"),u=require("../../icons/custom/theme/ThemeLightIcon.js"),l=require("../../icons/NightIcon.js"),d=require("../../icons/SunnyIcon.js"),h=require("../../styles/constants/theme.js"),m=require("../../utils/hooks/useAminoTheme.js");function j(e){return e&&e.__esModule?e:{default:e}}require("../help-text/HelpText.js"),require("../select/_StyledReactSelect.js"),require("react"),require("react-select"),require("../checkbox/Checkbox.js"),require("framer-motion"),require("../../icons/CheckmarkIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../utils/getTestId.js"),require("../../icons/CheckCircleIcon.js"),require("../../icons/DoubleChevronIcon.js"),require("../../icons/RemoveCircleIcon.js"),require("../../icons/RemoveIcon.js"),require("../stack/Stack.js"),require("clsx"),require("../../icons/flag-icon/useStableUniqueId.js"),require("uuid"),require("../../icons/icon-base/_ThemeIconBase.js"),require("../../Theme-61f4342c.js"),require("zod"),require("../../utils/hooks/useStorage.js"),require("../../utils/storage.js"),require("swr");var x,q,g=j(r),b=g.default.button(x||(x=e.__makeTemplateObject(["\n border: ",";\n color: ",";\n border-radius: ",";\n\n &:not([disabled]) {\n &:active,\n &:focus {\n outline: none;\n }\n }\n"],["\n border: ",";\n color: ",";\n border-radius: ",";\n\n &:not([disabled]) {\n &:active,\n &:focus {\n outline: none;\n }\n }\n"])),(function(e){return"2px solid ".concat(e.isActive?h.theme.blue400:"transparent")}),(function(e){return e.isActive?h.theme.primary:h.theme.textColor}),h.theme.radius8),p=g.default(t.Card)(q||(q=e.__makeTemplateObject(["\n background: ",";\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: ",";\n\n svg {\n height: 64px;\n width: 110px;\n box-shadow: ",";\n margin-bottom: ",";\n }\n"],["\n background: ",";\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: ",";\n\n svg {\n height: 64px;\n width: 110px;\n box-shadow: ",";\n margin-bottom: ",";\n }\n"])),h.theme.gray0,h.theme.space16,h.theme.v3ShadowLarge,h.theme.space16),f=[{label:"Light",value:"day"},{label:"Dark",value:"night"}];exports.ThemeSelect=function(e){var r=e.className,t=e.disabled,h=void 0!==t&&t,j=e.type,x=void 0===j?"select":j,q=m.useAminoTheme(),g=q.aminoTheme,y=q.setAminoTheme,k="day"===g;return n.jsxs(n.Fragment,{children:["cards"===x&&n.jsxs(s.HStack,{className:r,children:[n.jsx(b,{"data-theme":"day",isActive:"day"===g,onClick:function(){return y("day")},type:"button",children:n.jsxs(p,{children:[n.jsx(u.ThemeLightIcon,{}),n.jsx(o.Text,{type:"bold-label",children:"Light"})]})}),n.jsx(b,{"data-theme":"night",isActive:"night"===g,onClick:function(){return y("night")},type:"button",children:n.jsxs(p,{children:[n.jsx(a.ThemeDarkIcon,{}),n.jsx(o.Text,{type:"bold-label",children:"Dark"})]})})]}),"select"===x&&n.jsx(i.Select,{className:r,icon:function(){switch(g){case"day":default:return n.jsx(d.SunnyIcon,{});case"night":return n.jsx(l.NightIcon,{})}}(),isClearable:!1,isDisabled:h,onChange:function(e){return y((null==e?void 0:e.value)||"day")},options:f,value:f.filter((function(e){return e.value===g}))}),"toggle"===x&&n.jsx(c.Switch,{checked:k,className:r,disabled:h,onChange:function(){return!h&&y("day"===g?"night":"day")},switchIconLeft:n.jsx(l.NightIcon,{}),switchIconRight:n.jsx(d.SunnyIcon,{})})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),t=require("styled-components"),r=require("../../styles/constants/theme.js");function o(n){return n&&n.__esModule?n:{default:n}}var i,c={round:"50%",rounded:"20%",square:"0px"},a=o(t).default.div(i||(i=n.__makeTemplateObject(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: ",";\n height: ",";\n border-radius: ",";\n border: ",";\n border: ",";\n box-sizing: content-box;\n background-color: ",";\n\n svg {\n color: ",";\n\n width: 50%;\n height: 50%;\n\n path[data-is-secondary-color] {\n fill: ",";\n }\n }\n"],["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: ",";\n height: ",";\n border-radius: ",";\n border: ",";\n border: ",";\n box-sizing: content-box;\n background-color: ",";\n\n svg {\n color: ",";\n\n width: 50%;\n height: 50%;\n\n path[data-is-secondary-color] {\n fill: ",";\n }\n }\n"])),(function(n){return"".concat(n.size,"px")}),(function(n){return"".concat(n.size,"px")}),(function(n){return c[n.shape]}),(function(n){return"bordered"===n.intent&&"".concat(n.size/16,"px solid ").concat(r.theme.gray0)}),(function(n){return"outline"===n.intent&&"1px solid ".concat(r.theme.gray200)}),(function(n){return"outline"===n.intent?"transparent":r.theme["".concat(n.color,"100")]}),(function(n){return r.theme["".concat(n.color,"800")]}),(function(n){return r.theme["".concat(n.color,"
|
|
1
|
+
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),t=require("styled-components"),r=require("../../styles/constants/theme.js");function o(n){return n&&n.__esModule?n:{default:n}}var i,c={round:"50%",rounded:"20%",square:"0px"},a=o(t).default.div(i||(i=n.__makeTemplateObject(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: ",";\n height: ",";\n border-radius: ",";\n border: ",";\n border: ",";\n box-sizing: content-box;\n background-color: ",";\n\n svg {\n color: ",";\n\n width: 50%;\n height: 50%;\n\n path[data-is-secondary-color] {\n fill: ",";\n }\n }\n"],["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: ",";\n height: ",";\n border-radius: ",";\n border: ",";\n border: ",";\n box-sizing: content-box;\n background-color: ",";\n\n svg {\n color: ",";\n\n width: 50%;\n height: 50%;\n\n path[data-is-secondary-color] {\n fill: ",";\n }\n }\n"])),(function(n){return"".concat(n.size,"px")}),(function(n){return"".concat(n.size,"px")}),(function(n){return c[n.shape]}),(function(n){return"bordered"===n.intent&&"".concat(n.size/16,"px solid ").concat(r.theme.gray0)}),(function(n){return"outline"===n.intent&&"1px solid ".concat(r.theme.gray200)}),(function(n){return"outline"===n.intent?"transparent":r.theme["".concat(n.color,"100")]}),(function(n){return r.theme["".concat(n.color,"800")]}),(function(n){return r.theme["".concat(n.color,"400")]}));exports.Thumbnail=function(n){var t=n.color,r=void 0===t?"gray":t,o=n.icon,i=n.intent,c=void 0===i?"full":i,s=n.shape,u=void 0===s?"round":s,d=n.size,l=void 0===d?32:d;return e.jsx(a,{color:r,intent:c,shape:u,size:l,children:o})};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zonos/amino",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.17",
|
|
4
4
|
"description": "Core UI components for Amino",
|
|
5
5
|
"repository": "git@github.com:Zonos/amino.git",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"@mui/material": "^5.14.0",
|
|
22
22
|
"@radix-ui/react-slider": "^1.1.2",
|
|
23
23
|
"@types/topojson-client": "^3.1.1",
|
|
24
|
+
"clsx": "^2.0.0",
|
|
24
25
|
"d3-geo": "^2.0.2",
|
|
25
26
|
"fuse.js": "^6.6.2",
|
|
26
27
|
"highlight.js": "^11.8.0",
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
"@emotion/styled": "^11.x",
|
|
42
43
|
"@graphiql/plugin-explorer": "^0.3",
|
|
43
44
|
"@graphiql/react": "^0.19",
|
|
45
|
+
"dayjs": "*",
|
|
44
46
|
"framer-motion": "^10.x",
|
|
45
47
|
"graphiql": "^3.0.1",
|
|
46
48
|
"graphql": "^16.x",
|
|
@@ -50,8 +52,7 @@
|
|
|
50
52
|
"react-dom": "^17.x || ^18.x",
|
|
51
53
|
"react-tooltip": "^4.x",
|
|
52
54
|
"styled-components": "^5.x",
|
|
53
|
-
"swr": "2.x"
|
|
54
|
-
"dayjs": "*"
|
|
55
|
+
"swr": "2.x"
|
|
55
56
|
},
|
|
56
57
|
"types": "all.d.ts"
|
|
57
58
|
}
|