@zonos/amino 4.4.6 → 4.4.7

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.
@@ -1 +1 @@
1
- "use strict";var n=require("../../../_tslib-fe391a2e.js"),e=require("react/jsx-runtime"),r=require("react"),i=require("../../lightbox/LightBox.js"),t=require("styled-components");function o(n){return n&&n.__esModule?n:{default:n}}require("../../dialog/_BaseDialog.js"),require("framer-motion"),require("../../backdrop/Backdrop.js"),require("../../../styles/constants/theme.js");var a,d,s,l=o(t),u=l.default.div(a||(a=n.__makeTemplateObject(["\n position: relative;\n margin: 0 auto;\n display: block;\n margin: ",";\n cursor: pointer;\n width: 100%;\n\n ::after {\n content: '';\n display: ",";\n background: linear-gradient(90deg, #fdff87, #ff9b3f, #00e0ff, #83ff5f);\n position: absolute;\n bottom: 20px;\n left: -50px;\n right: -50px;\n margin: auto;\n height: 50%;\n width: 100%;\n z-index: -1;\n filter: blur(50px);\n }\n\n img {\n border-radius: 10px;\n overflow: hidden;\n }\n"],["\n position: relative;\n margin: 0 auto;\n display: block;\n margin: ",";\n cursor: pointer;\n width: 100%;\n\n ::after {\n content: '';\n display: ",";\n background: linear-gradient(90deg, #fdff87, #ff9b3f, #00e0ff, #83ff5f);\n position: absolute;\n bottom: 20px;\n left: -50px;\n right: -50px;\n margin: auto;\n height: 50%;\n width: 100%;\n z-index: -1;\n filter: blur(50px);\n }\n\n img {\n border-radius: 10px;\n overflow: hidden;\n }\n"])),(function(n){return n.addMargin&&"32px 0"}),(function(n){return n.showColor?"block":"none"})),f=l.default.div(d||(d=n.__makeTemplateObject(["\n filter: ",";\n position: ",";\n"],["\n filter: ",";\n position: ",";\n"])),(function(n){return n.showShadow&&"drop-shadow(0px 4px 6px rgba(10, 10, 11, 0.1))\n drop-shadow(0px 2px 4px rgba(10, 10, 11, 0.06))"}),(function(n){return n.showShadow&&"relative"})),p=l.default(i.LightBox)(s||(s=n.__makeTemplateObject(["\n width: 100%;\n max-width: 700px;\n margin: 32px;\n"],["\n width: 100%;\n max-width: 700px;\n margin: 32px;\n"]))),g=function(i){var t=i.addMargin,o=i.color,a=i.shadow,d=i.children,s=n.__read(r.useState(!1),2),l=s[0],g=s[1];return e.jsxs(e.Fragment,{children:[e.jsx(u,n.__assign({addMargin:t,showColor:o,onClick:function(){return g(!0)}},{children:e.jsx(f,n.__assign({showShadow:a},{children:d}))})),e.jsx(p,n.__assign({open:l,onClose:function(){return g(!1)}},{children:d}))]})};g.stableName="MdxImage",exports.MdxImage=g;
1
+ "use strict";var n=require("../../../_tslib-fe391a2e.js"),e=require("react/jsx-runtime"),r=require("react"),i=require("../../lightbox/LightBox.js"),t=require("../../../styles/constants/theme.js"),o=require("styled-components");function a(n){return n&&n.__esModule?n:{default:n}}require("../../dialog/_BaseDialog.js"),require("framer-motion"),require("../../backdrop/Backdrop.js");var d,s,u=a(o),l=u.default.div(d||(d=n.__makeTemplateObject(["\n position: relative;\n margin: 0 auto;\n display: block;\n margin: ",";\n cursor: pointer;\n width: 100%;\n\n ::after {\n content: '';\n display: ",";\n background: linear-gradient(90deg, #fdff87, #ff9b3f, #00e0ff, #83ff5f);\n position: absolute;\n bottom: 20px;\n left: -50px;\n right: -50px;\n margin: auto;\n height: 50%;\n width: 100%;\n z-index: -1;\n filter: blur(50px);\n }\n\n img {\n border-radius: 10px;\n overflow: hidden;\n box-shadow: ",";\n }\n"],["\n position: relative;\n margin: 0 auto;\n display: block;\n margin: ",";\n cursor: pointer;\n width: 100%;\n\n ::after {\n content: '';\n display: ",";\n background: linear-gradient(90deg, #fdff87, #ff9b3f, #00e0ff, #83ff5f);\n position: absolute;\n bottom: 20px;\n left: -50px;\n right: -50px;\n margin: auto;\n height: 50%;\n width: 100%;\n z-index: -1;\n filter: blur(50px);\n }\n\n img {\n border-radius: 10px;\n overflow: hidden;\n box-shadow: ",";\n }\n"])),(function(n){return n.addMargin&&"32px 0"}),(function(n){return n.showColor?"block":"none"}),(function(n){return n.shadow&&t.theme.v3ShadowLarge})),f=u.default(i.LightBox)(s||(s=n.__makeTemplateObject(["\n width: 100%;\n max-width: 700px;\n margin: 32px;\n"],["\n width: 100%;\n max-width: 700px;\n margin: 32px;\n"]))),g=function(i){var t=i.addMargin,o=i.color,a=i.shadow,d=i.children,s=n.__read(r.useState(!1),2),u=s[0],g=s[1];return e.jsxs(e.Fragment,{children:[e.jsx(l,n.__assign({addMargin:t,showColor:o,onClick:function(){return g(!0)},shadow:a},{children:d})),e.jsx(f,n.__assign({open:u,onClose:function(){return g(!1)}},{children:d}))]})};g.stableName="MdxImage",exports.MdxImage=g;
@@ -1 +1 @@
1
- "use strict";var n=require("../../_tslib-fe391a2e.js"),e=require("react/jsx-runtime"),t=require("react"),o=require("../../styles/constants/theme.js"),r=require("styled-components"),a=require("../help-text/HelpText.js");function i(n){return n&&n.__esModule?n:{default:n}}require("../text/Text.js");var s,l,d,c,h,p=i(r),u=p.default.div(s||(s=n.__makeTemplateObject(["\n border-radius: ",";\n border: ",";\n position: relative;\n &:hover {\n border: 1px solid ",";\n }\n"],["\n border-radius: ",";\n border: ",";\n position: relative;\n &:hover {\n border: 1px solid ",";\n }\n"])),o.theme.radius6,o.theme.border,o.theme.gray300),b=p.default.div(l||(l=n.__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n z-index: 1;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: ",";\n }\n"],["\n &::after {\n content: '';\n position: absolute;\n z-index: 1;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: ",";\n }\n"])),o.theme.radius6),f=p.default.label(d||(d=n.__makeTemplateObject(["\n color: ",";\n font-size: ",";\n line-height: ",";\n position: absolute;\n filter: blur(0);\n top: calc("," + 6px);\n transform-origin: left top;\n transition: ",";\n left: ",";\n z-index: 3;\n"],["\n color: ",";\n font-size: ",";\n line-height: ",";\n position: absolute;\n filter: blur(0);\n top: calc("," + 6px);\n transform-origin: left top;\n transition: ",";\n left: ",";\n z-index: 3;\n"])),o.theme.gray800,o.theme.fontSizeBase,o.theme.fontSizeBase,o.theme.fontSizeBase,o.theme.transition,o.theme.space16),m=p.default.textarea(c||(c=n.__makeTemplateObject(["\n box-sizing: border-box;\n position: relative;\n padding: 0 ",";\n padding-top: ",";\n transition: ",";\n outline: none;\n order: 2;\n width: 100%;\n border-radius: ",";\n background: ",";\n border: 0;\n font-size: ",";\n font-weight: 500;\n z-index: 2;\n display: block;\n\n :-internal-autofill-selected {\n border-radius: "," 0 0 ",";\n && + label + div {\n background-color: #e8f0fe;\n }\n }\n &.has-label {\n padding: "," 4px "," ",";\n\n &.has-content,\n &:focus {\n &::placeholder {\n opacity: 0.6;\n }\n & + "," {\n top: 11px;\n transform: scale(0.8);\n & + "," {\n &::before {\n content: '';\n position: absolute;\n z-index: 2;\n left: 0;\n top: 0;\n height: 25px;\n right: 0;\n background: ",";\n border-radius: ",";\n }\n }\n }\n }\n }\n\n ::placeholder {\n transition: ",";\n opacity: 0;\n color: ",";\n font-weight: 400;\n }\n\n :focus {\n outline: none;\n & ~ ","::after {\n box-shadow: ",";\n }\n }\n\n &.has-error ~ ","::after {\n box-shadow: ",";\n }\n"],["\n box-sizing: border-box;\n position: relative;\n padding: 0 ",";\n padding-top: ",";\n transition: ",";\n outline: none;\n order: 2;\n width: 100%;\n border-radius: ",";\n background: ",";\n border: 0;\n font-size: ",";\n font-weight: 500;\n z-index: 2;\n display: block;\n\n :-internal-autofill-selected {\n border-radius: "," 0 0 ",";\n && + label + div {\n background-color: #e8f0fe;\n }\n }\n &.has-label {\n padding: "," 4px "," ",";\n\n &.has-content,\n &:focus {\n &::placeholder {\n opacity: 0.6;\n }\n & + "," {\n top: 11px;\n transform: scale(0.8);\n & + "," {\n &::before {\n content: '';\n position: absolute;\n z-index: 2;\n left: 0;\n top: 0;\n height: 25px;\n right: 0;\n background: ",";\n border-radius: ",";\n }\n }\n }\n }\n }\n\n ::placeholder {\n transition: ",";\n opacity: 0;\n color: ",";\n font-weight: 400;\n }\n\n :focus {\n outline: none;\n & ~ ","::after {\n box-shadow: ",";\n }\n }\n\n &.has-error ~ ","::after {\n box-shadow: ",";\n }\n"])),o.theme.space16,o.theme.space8,o.theme.transition,o.theme.radius6,o.theme.inputBackground,o.theme.fontSizeBase,o.theme.radius6,o.theme.radius6,o.theme.space24,o.theme.space8,o.theme.space16,f,b,o.theme.gray0,o.theme.radius6,o.theme.transition,o.theme.gray400,b,o.theme.glowBlue,b,o.theme.glowError),x=p.default.div(h||(h=n.__makeTemplateObject(["\n position: relative;\n width: ",";\n\n &.disabled {\n * {\n cursor: not-allowed;\n }\n "," {\n opacity: 0.4;\n }\n "," {\n user-select: none;\n }\n }\n"],["\n position: relative;\n width: ",";\n\n &.disabled {\n * {\n cursor: not-allowed;\n }\n "," {\n opacity: 0.4;\n }\n "," {\n user-select: none;\n }\n }\n"])),(function(n){return n.width?"".concat(n.width,"px"):"100%"}),u,m),g=t.forwardRef((function(t,o){var r=t.className,i=t.disabled,s=t.error,l=t.helpText,d=t.label,c=t.value,h=t.rows,p=t.width,g=n.__rest(t,["className","disabled","error","helpText","label","value","rows","width"]),w=!!c;return e.jsxs(x,n.__assign({width:p,className:"amino-input-wrapper ".concat(r||""," ").concat(i?"disabled":"")},{children:[e.jsxs(u,{children:[e.jsx(m,n.__assign({className:[s?"has-error":"",d?"has-label":"",w?"has-content":""].join(" "),disabled:i,ref:o,rows:h,label:d,value:c},g)),e.jsx(f,n.__assign({"data-label":d},{children:d})),e.jsx(b,{})]}),e.jsx(a.HelpText,{error:s,helpText:l})]}))}));exports.Textarea=g;
1
+ "use strict";var n=require("../../_tslib-fe391a2e.js"),e=require("react/jsx-runtime"),t=require("react"),o=require("../../styles/constants/theme.js"),r=require("styled-components"),a=require("../help-text/HelpText.js");function i(n){return n&&n.__esModule?n:{default:n}}require("../text/Text.js");var s,l,d,c,h,p=i(r),u=p.default.div(s||(s=n.__makeTemplateObject(["\n border-radius: ",";\n border: ",";\n position: relative;\n &:hover {\n border: 1px solid ",";\n }\n"],["\n border-radius: ",";\n border: ",";\n position: relative;\n &:hover {\n border: 1px solid ",";\n }\n"])),o.theme.radius6,o.theme.border,o.theme.gray300),b=p.default.div(l||(l=n.__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n z-index: 1;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: ",";\n }\n"],["\n &::after {\n content: '';\n position: absolute;\n z-index: 1;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: ",";\n }\n"])),o.theme.radius6),f=p.default.label(d||(d=n.__makeTemplateObject(["\n color: ",";\n font-size: ",";\n line-height: ",";\n position: absolute;\n filter: blur(0);\n top: calc("," + 6px);\n transform-origin: left top;\n transition: ",";\n left: ",";\n z-index: 3;\n"],["\n color: ",";\n font-size: ",";\n line-height: ",";\n position: absolute;\n filter: blur(0);\n top: calc("," + 6px);\n transform-origin: left top;\n transition: ",";\n left: ",";\n z-index: 3;\n"])),o.theme.gray800,o.theme.fontSizeBase,o.theme.fontSizeBase,o.theme.fontSizeBase,o.theme.transition,o.theme.space16),m=p.default.textarea(c||(c=n.__makeTemplateObject(["\n box-sizing: border-box;\n position: relative;\n padding: 0 ",";\n padding-top: ",";\n transition: ",";\n outline: none;\n order: 2;\n width: 100%;\n border-radius: ",";\n background: ",";\n border: 0;\n font-size: ",";\n font-weight: 500;\n z-index: 2;\n display: block;\n\n :-internal-autofill-selected {\n border-radius: "," 0 0 ",";\n && + label + div {\n background-color: #e8f0fe;\n }\n }\n &.has-label {\n padding: "," 4px "," ",";\n\n ::placeholder {\n opacity: 0;\n }\n\n &.has-content,\n &:focus {\n &::placeholder {\n opacity: 0.6;\n }\n & + "," {\n top: 11px;\n transform: scale(0.8);\n & + "," {\n &::before {\n content: '';\n position: absolute;\n z-index: 2;\n left: 0;\n top: 0;\n height: 25px;\n right: 0;\n background: ",";\n border-radius: ",";\n }\n }\n }\n }\n }\n\n ::placeholder {\n transition: ",";\n color: ",";\n font-weight: 400;\n opacity: 0.6;\n }\n\n :focus {\n outline: none;\n & ~ ","::after {\n box-shadow: ",";\n }\n }\n\n &.has-error ~ ","::after {\n box-shadow: ",";\n }\n"],["\n box-sizing: border-box;\n position: relative;\n padding: 0 ",";\n padding-top: ",";\n transition: ",";\n outline: none;\n order: 2;\n width: 100%;\n border-radius: ",";\n background: ",";\n border: 0;\n font-size: ",";\n font-weight: 500;\n z-index: 2;\n display: block;\n\n :-internal-autofill-selected {\n border-radius: "," 0 0 ",";\n && + label + div {\n background-color: #e8f0fe;\n }\n }\n &.has-label {\n padding: "," 4px "," ",";\n\n ::placeholder {\n opacity: 0;\n }\n\n &.has-content,\n &:focus {\n &::placeholder {\n opacity: 0.6;\n }\n & + "," {\n top: 11px;\n transform: scale(0.8);\n & + "," {\n &::before {\n content: '';\n position: absolute;\n z-index: 2;\n left: 0;\n top: 0;\n height: 25px;\n right: 0;\n background: ",";\n border-radius: ",";\n }\n }\n }\n }\n }\n\n ::placeholder {\n transition: ",";\n color: ",";\n font-weight: 400;\n opacity: 0.6;\n }\n\n :focus {\n outline: none;\n & ~ ","::after {\n box-shadow: ",";\n }\n }\n\n &.has-error ~ ","::after {\n box-shadow: ",";\n }\n"])),o.theme.space16,o.theme.space8,o.theme.transition,o.theme.radius6,o.theme.inputBackground,o.theme.fontSizeBase,o.theme.radius6,o.theme.radius6,o.theme.space24,o.theme.space8,o.theme.space16,f,b,o.theme.gray0,o.theme.radius6,o.theme.transition,o.theme.gray400,b,o.theme.glowBlue,b,o.theme.glowError),x=p.default.div(h||(h=n.__makeTemplateObject(["\n position: relative;\n width: ",";\n\n &.disabled {\n * {\n cursor: not-allowed;\n }\n "," {\n opacity: 0.4;\n }\n "," {\n user-select: none;\n }\n }\n"],["\n position: relative;\n width: ",";\n\n &.disabled {\n * {\n cursor: not-allowed;\n }\n "," {\n opacity: 0.4;\n }\n "," {\n user-select: none;\n }\n }\n"])),(function(n){return n.width?"".concat(n.width,"px"):"100%"}),u,m),g=t.forwardRef((function(t,o){var r=t.className,i=t.disabled,s=t.error,l=t.helpText,d=t.label,c=t.value,h=t.rows,p=t.width,g=n.__rest(t,["className","disabled","error","helpText","label","value","rows","width"]),w=!!c;return e.jsxs(x,n.__assign({width:p,className:"amino-input-wrapper ".concat(r||""," ").concat(i?"disabled":"")},{children:[e.jsxs(u,{children:[e.jsx(m,n.__assign({className:[s?"has-error":"",d?"has-label":"",w?"has-content":""].join(" "),disabled:i,ref:o,rows:h,label:d,value:c},g)),e.jsx(f,n.__assign({"data-label":d},{children:d})),e.jsx(b,{})]}),e.jsx(a.HelpText,{error:s,helpText:l})]}))}));exports.Textarea=g;
@@ -1 +1 @@
1
- "use strict";var e=require("../../_tslib-fe391a2e.js"),n=require("react/jsx-runtime"),t=require("../../icons/custom/theme/ThemeDarkIcon.js"),i=require("../../icons/custom/theme/ThemeLightIcon.js"),r=require("../../icons/NightIcon.js"),o=require("../../icons/SunnyIcon.js"),s=require("../../styles/constants/theme.js"),a=require("../../utils/hooks/useAminoTheme.js"),c=require("styled-components"),u=require("../card/Card.js"),l=require("../select/Select.js"),d=require("../stack/HStack.js"),h=require("../text/Text.js");function m(e){return e&&e.__esModule?e:{default:e}}require("react"),require("../../icons/flag-icon/useStableUniqueId.js"),require("uuid"),require("../../icons/icon-base/_ThemeIconBase.js"),require("../../icons/icon-base/_IconBase.js"),require("../../utils/hooks/useStorage.js"),require("../../utils/storage.js"),require("swr"),require("../../utils/hooks/useSwr.js"),require("../stack/Stack.js"),require("../help-text/HelpText.js"),require("../select/_StyledReactSelect.js"),require("react-select"),require("../checkbox/Checkbox.js"),require("framer-motion"),require("../../icons/CheckmarkIcon.js"),require("../../utils/getTestId.js"),require("../../icons/CheckCircleIcon.js"),require("../../icons/DoubleChevronIcon.js"),require("../../icons/RemoveCircleIcon.js"),require("../../icons/RemoveIcon.js");var p,x,g,b,j,k,f,y=m(c),q=y.default.button(p||(p=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?s.theme.blue400:"transparent")}),(function(e){return e.isActive?s.theme.primary:s.theme.textColor}),s.theme.radius8),v=y.default(u.Card)(x||(x=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"])),s.theme.gray0,s.theme.space16,s.theme.v3ShadowLarge,s.theme.space16),_=y.default.div(g||(g=e.__makeTemplateObject(["\n background: ",";\n height: 28px;\n width: 28px;\n border-radius: 50%;\n transition: ",";\n position: absolute;\n top: 2px;\n left: ",";\n"],["\n background: ",";\n height: 28px;\n width: 28px;\n border-radius: 50%;\n transition: ",";\n position: absolute;\n top: 2px;\n left: ",";\n"])),s.theme.primary,s.theme.transition,(function(e){return e.checked?"calc(100% - 30px)":"2px"})),w=y.default(o.SunnyIcon)(b||(b=e.__makeTemplateObject(["\n position: absolute;\n top: 6px;\n right: 5.8px;\n color: ",";\n"],["\n position: absolute;\n top: 6px;\n right: 5.8px;\n color: ",";\n"])),(function(e){return e.isActive?s.theme.gray0:s.theme.gray1200})),T=y.default(r.NightIcon)(j||(j=e.__makeTemplateObject(["\n position: absolute;\n top: 6px;\n left: 6px;\n color: ",";\n"],["\n position: absolute;\n top: 6px;\n left: 6px;\n color: ",";\n"])),(function(e){return e.isActive?s.theme.gray0:s.theme.gray1200})),I=y.default.div(k||(k=e.__makeTemplateObject(["\n margin-right: ",";\n width: 62px;\n height: 32px;\n min-width: 24px;\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 margin-right: ",";\n position: relative;\n"],["\n margin-right: ",";\n width: 62px;\n height: 32px;\n min-width: 24px;\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 margin-right: ",";\n position: relative;\n"])),s.theme.space16,(function(e){return e.checked?s.theme.gray50:s.theme.gray400}),s.theme.v3ShadowInset,s.theme.space16),S=y.default.label(f||(f=e.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n cursor: pointer;\n\n &.disabled {\n "," {\n background: ",";\n }\n cursor: not-allowed;\n }\n"],["\n display: flex;\n flex-direction: row;\n cursor: pointer;\n\n &.disabled {\n "," {\n background: ",";\n }\n cursor: not-allowed;\n }\n"])),I,(function(e){return e.checked?s.theme.gray300:""})),C=[{label:"Light",value:"day"},{label:"Dark",value:"night"}];exports.ThemeSelect=function(s){var c=s.disabled,u=void 0!==c&&c,m=s.type,p=void 0===m?"select":m,x=a.useAminoTheme(),g=x.aminoTheme,b=x.setAminoTheme,j="day"===g;return n.jsxs(n.Fragment,{children:["cards"===p&&n.jsxs(d.HStack,{children:[n.jsx(q,e.__assign({onClick:function(){return b("day")},type:"button","data-theme":"day",isActive:"day"===g},{children:n.jsxs(v,{children:[n.jsx(i.ThemeLightIcon,{}),n.jsx(h.Text,e.__assign({type:"bold-label"},{children:"Light"}))]})})),n.jsx(q,e.__assign({onClick:function(){return b("night")},type:"button","data-theme":"night",isActive:"night"===g},{children:n.jsxs(v,{children:[n.jsx(t.ThemeDarkIcon,{}),n.jsx(h.Text,e.__assign({type:"bold-label"},{children:"Dark"}))]})}))]}),"select"===p&&n.jsx(l.Select,{value:C.filter((function(e){return e.value===g})),options:C,icon:function(){switch(g){case"day":default:return n.jsx(o.SunnyIcon,{});case"night":return n.jsx(r.NightIcon,{})}}(),onChange:function(e){return b((null==e?void 0:e.value)||"day")},isDisabled:u,isClearable:!1}),"toggle"===p&&n.jsx(S,e.__assign({className:u?"disabled":"",checked:j,onClick:function(){return!u&&b("day"===g?"night":"day")}},{children:n.jsxs(I,e.__assign({checked:j},{children:[n.jsx(_,{checked:j,id:"amino-theme-switch"}),n.jsx(w,{size:20,isActive:"day"===g}),n.jsx(T,{size:20,isActive:"night"===g})]}))}))]})};
1
+ "use strict";var e=require("../../_tslib-fe391a2e.js"),n=require("react/jsx-runtime"),t=require("../../icons/custom/theme/ThemeDarkIcon.js"),i=require("../../icons/custom/theme/ThemeLightIcon.js"),r=require("../../icons/NightIcon.js"),s=require("../../icons/SunnyIcon.js"),o=require("../../styles/constants/theme.js"),a=require("../../utils/hooks/useAminoTheme.js"),c=require("styled-components"),l=require("../card/Card.js"),u=require("../select/Select.js"),d=require("../stack/HStack.js"),h=require("../text/Text.js");function m(e){return e&&e.__esModule?e:{default:e}}require("react"),require("../../icons/flag-icon/useStableUniqueId.js"),require("uuid"),require("../../icons/icon-base/_ThemeIconBase.js"),require("../../icons/icon-base/_IconBase.js"),require("../../utils/hooks/useStorage.js"),require("../../utils/storage.js"),require("swr"),require("../../utils/hooks/useSwr.js"),require("../stack/Stack.js"),require("../help-text/HelpText.js"),require("../select/_StyledReactSelect.js"),require("react-select"),require("../checkbox/Checkbox.js"),require("framer-motion"),require("../../icons/CheckmarkIcon.js"),require("../../utils/getTestId.js"),require("../../icons/CheckCircleIcon.js"),require("../../icons/DoubleChevronIcon.js"),require("../../icons/RemoveCircleIcon.js"),require("../../icons/RemoveIcon.js");var p,x,g,b,j,k,f,y=m(c),q=y.default.button(p||(p=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?o.theme.blue400:"transparent")}),(function(e){return e.isActive?o.theme.primary:o.theme.textColor}),o.theme.radius8),v=y.default(l.Card)(x||(x=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"])),o.theme.gray0,o.theme.space16,o.theme.v3ShadowLarge,o.theme.space16),_=y.default.div(g||(g=e.__makeTemplateObject(["\n background: ",";\n height: 28px;\n width: 28px;\n border-radius: 50%;\n transition: ",";\n position: absolute;\n top: 2px;\n left: ",";\n"],["\n background: ",";\n height: 28px;\n width: 28px;\n border-radius: 50%;\n transition: ",";\n position: absolute;\n top: 2px;\n left: ",";\n"])),o.theme.primary,o.theme.transition,(function(e){return e.checked?"calc(100% - 30px)":"2px"})),w=y.default(s.SunnyIcon)(b||(b=e.__makeTemplateObject(["\n position: absolute;\n top: 6px;\n right: 5.8px;\n color: ",";\n"],["\n position: absolute;\n top: 6px;\n right: 5.8px;\n color: ",";\n"])),(function(e){return e.isActive?o.theme.gray0:o.theme.gray1200})),T=y.default(r.NightIcon)(j||(j=e.__makeTemplateObject(["\n position: absolute;\n top: 6px;\n left: 6px;\n color: ",";\n"],["\n position: absolute;\n top: 6px;\n left: 6px;\n color: ",";\n"])),(function(e){return e.isActive?o.theme.gray0:o.theme.gray1200})),I=y.default.div(k||(k=e.__makeTemplateObject(["\n margin-right: ",";\n width: 62px;\n height: 32px;\n min-width: 24px;\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 margin-right: ",";\n position: relative;\n"],["\n margin-right: ",";\n width: 62px;\n height: 32px;\n min-width: 24px;\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 margin-right: ",";\n position: relative;\n"])),o.theme.space16,o.theme.gray50,o.theme.v3ShadowInset,o.theme.space16),S=y.default.label(f||(f=e.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n cursor: pointer;\n\n &.disabled {\n "," {\n background: ",";\n }\n cursor: not-allowed;\n }\n"],["\n display: flex;\n flex-direction: row;\n cursor: pointer;\n\n &.disabled {\n "," {\n background: ",";\n }\n cursor: not-allowed;\n }\n"])),I,(function(e){return e.checked?o.theme.gray300:""})),C=[{label:"Light",value:"day"},{label:"Dark",value:"night"}];exports.ThemeSelect=function(o){var c=o.disabled,l=void 0!==c&&c,m=o.type,p=void 0===m?"select":m,x=a.useAminoTheme(),g=x.aminoTheme,b=x.setAminoTheme,j="day"===g;return n.jsxs(n.Fragment,{children:["cards"===p&&n.jsxs(d.HStack,{children:[n.jsx(q,e.__assign({onClick:function(){return b("day")},type:"button","data-theme":"day",isActive:"day"===g},{children:n.jsxs(v,{children:[n.jsx(i.ThemeLightIcon,{}),n.jsx(h.Text,e.__assign({type:"bold-label"},{children:"Light"}))]})})),n.jsx(q,e.__assign({onClick:function(){return b("night")},type:"button","data-theme":"night",isActive:"night"===g},{children:n.jsxs(v,{children:[n.jsx(t.ThemeDarkIcon,{}),n.jsx(h.Text,e.__assign({type:"bold-label"},{children:"Dark"}))]})}))]}),"select"===p&&n.jsx(u.Select,{value:C.filter((function(e){return e.value===g})),options:C,icon:function(){switch(g){case"day":default:return n.jsx(s.SunnyIcon,{});case"night":return n.jsx(r.NightIcon,{})}}(),onChange:function(e){return b((null==e?void 0:e.value)||"day")},isDisabled:l,isClearable:!1}),"toggle"===p&&n.jsx(S,e.__assign({className:l?"disabled":"",checked:j,onClick:function(){return!l&&b("day"===g?"night":"day")}},{children:n.jsxs(I,e.__assign({checked:j},{children:[n.jsx(_,{checked:j,id:"amino-theme-switch"}),n.jsx(w,{size:20,isActive:"day"===g}),n.jsx(T,{size:20,isActive:"night"===g})]}))}))]})};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/amino",
3
- "version": "4.4.6",
3
+ "version": "4.4.7",
4
4
  "description": "Core UI components for Amino",
5
5
  "repository": "git@github.com:Zonos/amino.git",
6
6
  "license": "MIT",
@@ -153,7 +153,7 @@ export declare const theme: {
153
153
  readonly purple1000: "var(--amino-purple-1000)";
154
154
  /** @info #FFFFFFBB */
155
155
  readonly transparentWhite: "var(--amino-transparent-white)";
156
- /** @info #000000BB */
156
+ /** @info #101116BB */
157
157
  readonly transparentBlack: "var(--amino-transparent-black)";
158
158
  /** @info 0px 0px 0px 1px rgba(110, 110, 120, 0.1), 0px 1px 2px rgba(10, 10, 11, 0.06), 0px 1px 3px rgba(10, 10, 11, 0.1) */
159
159
  readonly v3ShadowBase: "var(--amino-v3-shadow-base)";
package/theme.css CHANGED
@@ -77,7 +77,7 @@
77
77
  --amino-purple-900: #54206a;
78
78
  --amino-purple-1000: #3b1948;
79
79
  --amino-transparent-white: #ffffffbb;
80
- --amino-transparent-black: #000000bb;
80
+ --amino-transparent-black: #101116bb;
81
81
  --amino-v3-shadow-base: 0px 0px 0px 1px rgba(110, 110, 120, 0.1),
82
82
  0px 1px 2px rgba(10, 10, 11, 0.06), 0px 1px 3px rgba(10, 10, 11, 0.1);
83
83
  --amino-v3-shadow-medium: 0px 0px 0px 1px rgba(110, 110, 120, 0.1),
@@ -288,7 +288,7 @@
288
288
  --amino-purple-800: #ddc5fc;
289
289
  --amino-purple-900: #e7d8fd;
290
290
  --amino-purple-1000: #f4eeff;
291
- --amino-transparent-white: #000000bb;
291
+ --amino-transparent-white: #101116bb;
292
292
  --amino-transparent-black: #ffffffbb;
293
293
  --amino-v3-shadow-base: 0px 0px 0px 1px rgba(255, 255, 255, 0.12),
294
294
  0px 1px 3px rgba(0, 0, 0, 0.9), 0px 1px 2px rgba(0, 0, 0, 0.8);