@zonos/amino 5.1.16 → 5.1.18
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/button/Button.js +1 -1
- package/components/rich-radio/RichRadio.js +1 -1
- package/components/text/Text.d.ts +3 -3
- package/components/text/Text.js +1 -1
- package/components/thumbnail/Thumbnail.js +1 -1
- package/package.json +1 -1
- package/theme.css +17 -9
|
@@ -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 n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),t=require("react"),o=require("styled-components"),r=require("./RippleGroup.js"),a=require("./useRipple.js"),i=require("../spinner/Spinner.js"),c=require("../../styles/constants/theme.js");function u(n){return n&&n.__esModule?n:{default:n}}require("framer-motion"),require("uuid"),require("./_Ripple.js");var s,d,l,h,g,b,p,m,f,x,k=u(o),v=function(n){return"inherit"===n?"inherit":n?c.theme[n]:void 0},w=function(n){switch(n){case"sm":return 16;case"lg":case"xl":return 24;default:return 20}},y=k.default.span(s||(s=n.__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: ",";\n gap: ",";\n"],["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: ",";\n gap: ",";\n"])),c.theme.radius6,c.theme.space8),_=k.default.button(d||(d=n.__makeTemplateObject(["\n position: relative;\n outline: none;\n height: ",";\n line-height: ",";\n font-size: 14px;\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n padding: 0 ",";\n border-radius: ",";\n transition:\n ",",\n visibility 0;\n font-weight: 500;\n user-select: none;\n font-family: ",";\n letter-spacing: normal;\n cursor: pointer;\n white-space: nowrap;\n padding: ",";\n width: ",";\n\n svg path:not([data-is-secondary-color]) {\n fill: currentColor;\n }\n\n &.only-icon {\n width: ",";\n padding: 0;\n }\n\n &:active,\n &:focus {\n svg path:not([data-is-secondary-color]) {\n fill: currentColor;\n }\n }\n\n &:focus {\n outline: none;\n }\n\n &:active {\n transform: scale(0.99);\n }\n\n &:not(.only-icon).has-icon {\n &.icon-right {\n svg:not(.amino-spinner) {\n margin-left: ",";\n margin-right: 0;\n }\n }\n svg:not(.amino-spinner) {\n margin-right: ",";\n margin-left: 0;\n }\n }\n &.loading {\n color: transparent;\n }\n\n &[disabled] {\n cursor: not-allowed;\n .content {\n opacity: ",";\n }\n }\n"],["\n position: relative;\n outline: none;\n height: ",";\n line-height: ",";\n font-size: 14px;\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n padding: 0 ",";\n border-radius: ",";\n transition:\n ",",\n visibility 0;\n font-weight: 500;\n user-select: none;\n font-family: ",";\n letter-spacing: normal;\n cursor: pointer;\n white-space: nowrap;\n padding: ",";\n width: ",";\n\n svg path:not([data-is-secondary-color]) {\n fill: currentColor;\n }\n\n &.only-icon {\n width: ",";\n padding: 0;\n }\n\n &:active,\n &:focus {\n svg path:not([data-is-secondary-color]) {\n fill: currentColor;\n }\n }\n\n &:focus {\n outline: none;\n }\n\n &:active {\n transform: scale(0.99);\n }\n\n &:not(.only-icon).has-icon {\n &.icon-right {\n svg:not(.amino-spinner) {\n margin-left: ",";\n margin-right: 0;\n }\n }\n svg:not(.amino-spinner) {\n margin-right: ",";\n margin-left: 0;\n }\n }\n &.loading {\n color: transparent;\n }\n\n &[disabled] {\n cursor: not-allowed;\n .content {\n opacity: ",";\n }\n }\n"])),(function(n){return"var(--amino-size-".concat(n.size,")")}),(function(n){return"var(--amino-size-".concat(n.size,")")}),c.theme.space16,c.theme.radius6,c.theme.transition,c.theme.fontSans,(function(n){return function(n){switch(n){case"sm":return"".concat(c.theme.space4," ").concat(c.theme.space8);case"lg":case"xl":return"".concat(c.theme.space12," ").concat(c.theme.space24);default:return"".concat(c.theme.space8," ").concat(c.theme.space16)}}(n.size)}),(function(n){return n.fitContentWidth&&"fit-content"}),(function(n){return"var(--amino-size-".concat(n.size,")")}),c.theme.space8,c.theme.space8,(function(n){return n.outline?.6:1})),j=k.default(_)(l||(l=n.__makeTemplateObject(["\n color: ",";\n box-shadow: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n }\n\n &[disabled] {\n background: ",";\n box-shadow: ",";\n }\n\n "," {\n background: ",";\n }\n"],["\n color: ",";\n box-shadow: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n }\n\n &[disabled] {\n background: ",";\n box-shadow: ",";\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return v(n.color)||n.outline?c.theme.primary:c.theme.gray0}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.primary," inset"):c.theme.shadowButtonPrimary}),(function(n){return v(n.background)||n.outline?"transparent":c.theme.primary}),(function(n){return v(n.hoverBackground)||n.outline?c.theme.blue100:""}),(function(n){return n.outline?"":c.theme.buttonPrimaryHover}),(function(n){return n.outline?c.theme.blue200:c.theme.blue700}),c.theme.focusButton,(function(n){return n.outline?"transparent":c.theme.blue400}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.blue400):""}),y,(function(n){return n.outline?"transparent":c.theme.primary})),R=k.default(_)(h||(h=n.__makeTemplateObject(["\n color: ",";\n box-shadow: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n &:active {\n background: ",";\n }\n }\n &:focus {\n box-shadow: ",";\n }\n }\n &[disabled] {\n background: ",";\n box-shadow: ",";\n }\n\n "," {\n background: ",";\n }\n"],["\n color: ",";\n box-shadow: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n &:active {\n background: ",";\n }\n }\n &:focus {\n box-shadow: ",";\n }\n }\n &[disabled] {\n background: ",";\n box-shadow: ",";\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return v(n.color)||n.outline?c.theme.success:c.theme.gray0}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.success):c.theme.shadowButtonSuccess}),(function(n){return v(n.background)||n.outline?"transparent":c.theme.success}),(function(n){return v(n.hoverBackground)||n.outline?c.theme.green100:""}),(function(n){return n.outline?"":c.theme.buttonSuccessHover}),(function(n){return n.outline?c.theme.green200:c.theme.green700}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.success," inset, ").concat(c.theme.buttonFocusRing):c.theme.focusButton}),(function(n){return n.outline?"transparent":c.theme.green400}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.green400):""}),y,(function(n){return n.outline?"transparent":c.theme.success})),B=k.default(_)(g||(g=n.__makeTemplateObject(["\n color: ",";\n background: ",";\n box-shadow: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n }\n\n &[disabled] {\n .content {\n opacity: 0.6;\n }\n }\n\n "," {\n background: ",";\n }\n"],["\n color: ",";\n background: ",";\n box-shadow: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n }\n\n &[disabled] {\n .content {\n opacity: 0.6;\n }\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return v(n.color)||c.theme.textColor}),(function(n){return n.outline?"transparent":v(n.background)||c.theme.surfaceColor}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.gray300," inset"):c.theme.shadowButtonStandard}),(function(n){return v(n.hoverBackground)||n.outline?c.theme.gray100:""}),(function(n){return n.outline?"":c.theme.buttonStandardHover}),(function(n){return n.outline?c.theme.gray200:c.theme.gray100}),c.theme.focusButtonStandard,y,(function(n){return n.outline?"transparent":c.theme.surfaceColor})),z=k.default(_)(b||(b=n.__makeTemplateObject(["\n background: ",";\n color: ",";\n box-shadow: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n }\n &[disabled] {\n background: ",";\n box-shadow: ",";\n }\n\n "," {\n background: ",";\n }\n"],["\n background: ",";\n color: ",";\n box-shadow: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n }\n &[disabled] {\n background: ",";\n box-shadow: ",";\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return v(n.background)||n.outline?"transparent":c.theme.danger}),(function(n){return v(n.color)||n.outline?c.theme.danger:c.theme.gray0}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.danger):c.theme.shadowButtonDanger}),(function(n){return v(n.hoverBackground)||n.outline?c.theme.red100:""}),(function(n){return n.outline?"":c.theme.buttonDangerHover}),(function(n){return n.outline?c.theme.red200:c.theme.red700}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.danger," inset, ").concat(c.theme.buttonFocusRing):c.theme.focusButton}),(function(n){return n.outline?"transparent":c.theme.red400}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.red400):""}),y,(function(n){return n.outline?"transparent":c.theme.danger})),C=k.default(_)(p||(p=n.__makeTemplateObject(["\n background: ",";\n color: ",";\n box-shadow: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n }\n\n &[disabled] {\n background: ",";\n box-shadow: ",";\n }\n\n "," {\n background: ",";\n }\n"],["\n background: ",";\n color: ",";\n box-shadow: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n }\n\n &[disabled] {\n background: ",";\n box-shadow: ",";\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return v(n.background)||n.outline?"transparent":c.theme.warning}),(function(n){return v(n.color)||n.outline?c.theme.warning:c.theme.gray0}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.warning):c.theme.shadowButtonWarning}),(function(n){return v(n.hoverBackground)||n.outline?c.theme.orange100:""}),(function(n){return n.outline?"":c.theme.buttonWarningHover}),(function(n){return n.outline?c.theme.orange200:c.theme.orange700}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.warning," inset, ").concat(c.theme.buttonFocusRing):c.theme.focusButton}),(function(n){return n.outline?"transparent":c.theme.orange400}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.orange400):""}),y,(function(n){return n.outline?"transparent":c.theme.warning})),O=k.default(_)(m||(m=n.__makeTemplateObject(["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n &:focus {\n box-shadow: ",";\n }\n\n &[disabled] {\n .content {\n opacity: 0.6;\n }\n }\n"],["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n &:focus {\n box-shadow: ",";\n }\n\n &[disabled] {\n .content {\n opacity: 0.6;\n }\n }\n"])),(function(n){return v(n.background)||"none"}),(function(n){return v(n.color)||c.theme.textColorSecondary}),(function(n){return v(n.hoverBackground)||c.theme.gray100}),c.theme.gray200,c.theme.buttonFocusRing),T=k.default(_)(f||(f=n.__makeTemplateObject(["\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n &:focus {\n box-shadow: ",";\n }\n\n &[disabled] {\n .content {\n opacity: 0.6;\n }\n }\n"],["\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n &:focus {\n box-shadow: ",";\n }\n\n &[disabled] {\n .content {\n opacity: 0.6;\n }\n }\n"])),(function(n){return v(n.color)||c.theme.primary}),(function(n){return v(n.hoverBackground)||c.theme.blue100}),c.theme.blue200,c.theme.buttonFocusRing),q=k.default(_)(x||(x=n.__makeTemplateObject(["\n color: ",";\n &:not([disabled]) {\n &:hover {\n color: ",";\n }\n }\n &[disabled] {\n color: ",";\n }\n &.loading {\n color: transparent;\n }\n"],["\n color: ",";\n &:not([disabled]) {\n &:hover {\n color: ",";\n }\n }\n &[disabled] {\n color: ",";\n }\n &.loading {\n color: transparent;\n }\n"])),(function(n){return n.href?c.theme.primary:c.theme.textColorSecondary}),(function(n){return n.href?c.theme.blue500:c.theme.gray700}),(function(n){return n.href?c.theme.blue300:c.theme.gray300})),S=_;exports.Button=function(o){var c=o.children,u=o.className,s=o.disabled,d=void 0!==s&&s,l=o.icon,h=o.iconRight,g=o.loading,b=void 0!==g&&g,p=o.loadingText,m=o.noRipple,f=void 0!==m&&m,x=o.size,k=void 0===x?"sm":x,v=o.spinnerColor,_=o.tag,I=o.themeOverride,G=o.type,F=void 0===G?"button":G,H=o.variant,N=void 0===H?"standard":H,W=n.__rest(o,["children","className","disabled","icon","iconRight","loading","loadingText","noRipple","size","spinnerColor","tag","themeOverride","type","variant"]),D=_||"button",E=function(n){return e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"content",children:!h&&l}),e.jsx("div",{className:"content",children:c}),e.jsx("span",{className:"content",children:h&&l}),"plain"!==N&&"text"!==N&&b&&e.jsxs(y,{children:[e.jsx(i.Spinner,{color:n,size:w(k)}),p]})]})},P=[u||"",l&&!c?"only-icon":"",h?"icon-right":"",l?"has-icon":"",b?"loading":"",I].filter(Boolean).join(" "),M=t.useRef(null),A=a.useRipple({disabled:d||b,rippleEnabled:!f&&!["plain","text"].includes(N),rippleRef:M}),J=A.getRippleHandlers,K=A.rippleEnabled,L={className:P,disabled:d||b,size:k},Q=n.__assign(n.__assign(n.__assign({type:F},L),W),J(W));switch(N){case"primary":return e.jsxs(j,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:[E(v||Q.outline?"info":"white"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"success":return e.jsxs(R,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:[E(v||Q.outline?"success":"white"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"warning":return e.jsxs(C,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:[E(v||Q.outline?"warning":"white"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"danger":return e.jsxs(z,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:[E(v||Q.outline?"danger":"white"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"subtle":return e.jsxs(O,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:[E(v||"black"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"link":return e.jsxs(T,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:[E(v||"info"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"plain":return e.jsx(S,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:E(v)}));case"text":return e.jsx(q,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:E(v)}));default:return e.jsxs(B,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:[E(v||"black"),K&&e.jsx(r.RippleGroup,{ref:M})]}))}};
|
|
1
|
+
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),t=require("react"),o=require("styled-components"),r=require("./RippleGroup.js"),a=require("./useRipple.js"),i=require("../spinner/Spinner.js"),c=require("../../styles/constants/theme.js");function u(n){return n&&n.__esModule?n:{default:n}}require("framer-motion"),require("uuid"),require("./_Ripple.js");var s,d,l,h,g,b,p,m,f,x,k=u(o),v=function(n){return"inherit"===n?"inherit":n?c.theme[n]:void 0},w=function(n){switch(n){case"sm":return 16;case"lg":case"xl":return 24;default:return 20}},y=k.default.span(s||(s=n.__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: ",";\n gap: ",";\n"],["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: ",";\n gap: ",";\n"])),c.theme.radius6,c.theme.space8),_=k.default.button(d||(d=n.__makeTemplateObject(["\n position: relative;\n outline: none;\n height: ",";\n line-height: ",";\n font-size: ",";\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n padding: 0 ",";\n border-radius: ",";\n transition:\n ",",\n visibility 0;\n font-weight: ",";\n user-select: none;\n font-family: ",";\n letter-spacing: normal;\n cursor: pointer;\n white-space: nowrap;\n padding: ",";\n width: ",";\n\n svg path:not([data-is-secondary-color]) {\n fill: currentColor;\n }\n\n &.only-icon {\n width: ",";\n padding: 0;\n }\n\n &:active,\n &:focus {\n svg path:not([data-is-secondary-color]) {\n fill: currentColor;\n }\n }\n\n &:focus {\n outline: none;\n }\n\n &:active {\n transform: scale(0.99);\n }\n\n &:not(.only-icon).has-icon {\n &.icon-right {\n svg:not(.amino-spinner) {\n margin-left: ",";\n margin-right: 0;\n }\n }\n svg:not(.amino-spinner) {\n margin-right: ",";\n margin-left: 0;\n }\n }\n &.loading {\n color: transparent;\n }\n\n &[disabled] {\n cursor: not-allowed;\n .content {\n opacity: ",";\n }\n }\n"],["\n position: relative;\n outline: none;\n height: ",";\n line-height: ",";\n font-size: ",";\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n padding: 0 ",";\n border-radius: ",";\n transition:\n ",",\n visibility 0;\n font-weight: ",";\n user-select: none;\n font-family: ",";\n letter-spacing: normal;\n cursor: pointer;\n white-space: nowrap;\n padding: ",";\n width: ",";\n\n svg path:not([data-is-secondary-color]) {\n fill: currentColor;\n }\n\n &.only-icon {\n width: ",";\n padding: 0;\n }\n\n &:active,\n &:focus {\n svg path:not([data-is-secondary-color]) {\n fill: currentColor;\n }\n }\n\n &:focus {\n outline: none;\n }\n\n &:active {\n transform: scale(0.99);\n }\n\n &:not(.only-icon).has-icon {\n &.icon-right {\n svg:not(.amino-spinner) {\n margin-left: ",";\n margin-right: 0;\n }\n }\n svg:not(.amino-spinner) {\n margin-right: ",";\n margin-left: 0;\n }\n }\n &.loading {\n color: transparent;\n }\n\n &[disabled] {\n cursor: not-allowed;\n .content {\n opacity: ",";\n }\n }\n"])),(function(n){return"var(--amino-size-".concat(n.size,")")}),(function(n){return"var(--amino-size-".concat(n.size,")")}),c.theme.fontSizeBase,c.theme.space16,(function(n){return function(n){switch(n){case"sm":return"".concat(c.theme.radius6);case"lg":case"xl":return"".concat(c.theme.radius10);default:return"".concat(c.theme.radius8)}}(n.size)}),c.theme.transition,(function(n){return function(n){switch(n){case"lg":case"xl":return 600;default:return 500}}(n.size)}),c.theme.fontSans,(function(n){return function(n){switch(n){case"sm":return"".concat(c.theme.space4," ").concat(c.theme.space8);case"lg":case"xl":return"".concat(c.theme.space12," ").concat(c.theme.space24);default:return"".concat(c.theme.space8," ").concat(c.theme.space16)}}(n.size)}),(function(n){return n.fitContentWidth&&"fit-content"}),(function(n){return"var(--amino-size-".concat(n.size,")")}),c.theme.space8,c.theme.space8,(function(n){return n.outline?.6:1})),j=k.default(_)(l||(l=n.__makeTemplateObject(["\n color: ",";\n box-shadow: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n }\n\n &[disabled] {\n background: ",";\n box-shadow: ",";\n }\n\n "," {\n background: ",";\n }\n"],["\n color: ",";\n box-shadow: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n }\n\n &[disabled] {\n background: ",";\n box-shadow: ",";\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return v(n.color)||n.outline?c.theme.primary:c.theme.gray0}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.primary," inset"):c.theme.shadowButtonPrimary}),(function(n){return v(n.background)||n.outline?"transparent":c.theme.primary}),(function(n){return v(n.hoverBackground)||n.outline?c.theme.blue100:""}),(function(n){return n.outline?"":c.theme.buttonPrimaryHover}),(function(n){return n.outline?c.theme.blue200:c.theme.blue700}),c.theme.focusButton,(function(n){return n.outline?"transparent":c.theme.blue400}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.blue400):""}),y,(function(n){return n.outline?"transparent":c.theme.primary})),R=k.default(_)(h||(h=n.__makeTemplateObject(["\n color: ",";\n box-shadow: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n &:active {\n background: ",";\n }\n }\n &:focus {\n box-shadow: ",";\n }\n }\n &[disabled] {\n background: ",";\n box-shadow: ",";\n }\n\n "," {\n background: ",";\n }\n"],["\n color: ",";\n box-shadow: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n &:active {\n background: ",";\n }\n }\n &:focus {\n box-shadow: ",";\n }\n }\n &[disabled] {\n background: ",";\n box-shadow: ",";\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return v(n.color)||n.outline?c.theme.success:c.theme.gray0}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.success):c.theme.shadowButtonSuccess}),(function(n){return v(n.background)||n.outline?"transparent":c.theme.success}),(function(n){return v(n.hoverBackground)||n.outline?c.theme.green100:""}),(function(n){return n.outline?"":c.theme.buttonSuccessHover}),(function(n){return n.outline?c.theme.green200:c.theme.green700}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.success," inset, ").concat(c.theme.buttonFocusRing):c.theme.focusButton}),(function(n){return n.outline?"transparent":c.theme.green400}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.green400):""}),y,(function(n){return n.outline?"transparent":c.theme.success})),B=k.default(_)(g||(g=n.__makeTemplateObject(["\n color: ",";\n background: ",";\n box-shadow: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n }\n\n &[disabled] {\n .content {\n opacity: 0.6;\n }\n }\n\n "," {\n background: ",";\n }\n"],["\n color: ",";\n background: ",";\n box-shadow: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n }\n\n &[disabled] {\n .content {\n opacity: 0.6;\n }\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return v(n.color)||c.theme.textColor}),(function(n){return n.outline?"transparent":v(n.background)||c.theme.surfaceColor}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.gray300," inset"):c.theme.shadowButtonStandard}),(function(n){return v(n.hoverBackground)||n.outline?c.theme.gray100:""}),(function(n){return n.outline?"":c.theme.buttonStandardHover}),(function(n){return n.outline?c.theme.gray200:c.theme.gray100}),c.theme.focusButtonStandard,y,(function(n){return n.outline?"transparent":c.theme.surfaceColor})),z=k.default(_)(b||(b=n.__makeTemplateObject(["\n background: ",";\n color: ",";\n box-shadow: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n }\n &[disabled] {\n background: ",";\n box-shadow: ",";\n }\n\n "," {\n background: ",";\n }\n"],["\n background: ",";\n color: ",";\n box-shadow: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n }\n &[disabled] {\n background: ",";\n box-shadow: ",";\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return v(n.background)||n.outline?"transparent":c.theme.danger}),(function(n){return v(n.color)||n.outline?c.theme.danger:c.theme.gray0}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.danger):c.theme.shadowButtonDanger}),(function(n){return v(n.hoverBackground)||n.outline?c.theme.red100:""}),(function(n){return n.outline?"":c.theme.buttonDangerHover}),(function(n){return n.outline?c.theme.red200:c.theme.red700}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.danger," inset, ").concat(c.theme.buttonFocusRing):c.theme.focusButton}),(function(n){return n.outline?"transparent":c.theme.red400}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.red400):""}),y,(function(n){return n.outline?"transparent":c.theme.danger})),C=k.default(_)(p||(p=n.__makeTemplateObject(["\n background: ",";\n color: ",";\n box-shadow: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n }\n\n &[disabled] {\n background: ",";\n box-shadow: ",";\n }\n\n "," {\n background: ",";\n }\n"],["\n background: ",";\n color: ",";\n box-shadow: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n }\n\n &[disabled] {\n background: ",";\n box-shadow: ",";\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return v(n.background)||n.outline?"transparent":c.theme.warning}),(function(n){return v(n.color)||n.outline?c.theme.warning:c.theme.gray0}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.warning):c.theme.shadowButtonWarning}),(function(n){return v(n.hoverBackground)||n.outline?c.theme.orange100:""}),(function(n){return n.outline?"":c.theme.buttonWarningHover}),(function(n){return n.outline?c.theme.orange200:c.theme.orange700}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.warning," inset, ").concat(c.theme.buttonFocusRing):c.theme.focusButton}),(function(n){return n.outline?"transparent":c.theme.orange400}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.orange400):""}),y,(function(n){return n.outline?"transparent":c.theme.warning})),O=k.default(_)(m||(m=n.__makeTemplateObject(["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n &:focus {\n box-shadow: ",";\n }\n\n &[disabled] {\n .content {\n opacity: 0.6;\n }\n }\n"],["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n &:focus {\n box-shadow: ",";\n }\n\n &[disabled] {\n .content {\n opacity: 0.6;\n }\n }\n"])),(function(n){return v(n.background)||"none"}),(function(n){return v(n.color)||c.theme.textColorSecondary}),(function(n){return v(n.hoverBackground)||c.theme.gray100}),c.theme.gray200,c.theme.buttonFocusRing),T=k.default(_)(f||(f=n.__makeTemplateObject(["\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n &:focus {\n box-shadow: ",";\n }\n\n &[disabled] {\n .content {\n opacity: 0.6;\n }\n }\n"],["\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n &:focus {\n box-shadow: ",";\n }\n\n &[disabled] {\n .content {\n opacity: 0.6;\n }\n }\n"])),(function(n){return v(n.color)||c.theme.primary}),(function(n){return v(n.hoverBackground)||c.theme.blue100}),c.theme.blue200,c.theme.buttonFocusRing),q=k.default(_)(x||(x=n.__makeTemplateObject(["\n color: ",";\n &:not([disabled]) {\n &:hover {\n color: ",";\n }\n }\n &[disabled] {\n color: ",";\n }\n &.loading {\n color: transparent;\n }\n"],["\n color: ",";\n &:not([disabled]) {\n &:hover {\n color: ",";\n }\n }\n &[disabled] {\n color: ",";\n }\n &.loading {\n color: transparent;\n }\n"])),(function(n){return n.href?c.theme.primary:c.theme.textColorSecondary}),(function(n){return n.href?c.theme.blue500:c.theme.gray700}),(function(n){return n.href?c.theme.blue300:c.theme.gray300})),S=_;exports.Button=function(o){var c=o.children,u=o.className,s=o.disabled,d=void 0!==s&&s,l=o.icon,h=o.iconRight,g=o.loading,b=void 0!==g&&g,p=o.loadingText,m=o.noRipple,f=void 0!==m&&m,x=o.size,k=void 0===x?"sm":x,v=o.spinnerColor,_=o.tag,I=o.themeOverride,G=o.type,F=void 0===G?"button":G,H=o.variant,N=void 0===H?"standard":H,W=n.__rest(o,["children","className","disabled","icon","iconRight","loading","loadingText","noRipple","size","spinnerColor","tag","themeOverride","type","variant"]),D=_||"button",E=function(n){return e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"content",children:!h&&l}),e.jsx("div",{className:"content",children:c}),e.jsx("span",{className:"content",children:h&&l}),"plain"!==N&&"text"!==N&&b&&e.jsxs(y,{children:[e.jsx(i.Spinner,{color:n,size:w(k)}),p]})]})},P=[u||"",l&&!c?"only-icon":"",h?"icon-right":"",l?"has-icon":"",b?"loading":"",I].filter(Boolean).join(" "),M=t.useRef(null),A=a.useRipple({disabled:d||b,rippleEnabled:!f&&!["plain","text"].includes(N),rippleRef:M}),J=A.getRippleHandlers,K=A.rippleEnabled,L={className:P,disabled:d||b,size:k},Q=n.__assign(n.__assign(n.__assign({type:F},L),W),J(W));switch(N){case"primary":return e.jsxs(j,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:[E(v||Q.outline?"info":"white"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"success":return e.jsxs(R,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:[E(v||Q.outline?"success":"white"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"warning":return e.jsxs(C,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:[E(v||Q.outline?"warning":"white"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"danger":return e.jsxs(z,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:[E(v||Q.outline?"danger":"white"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"subtle":return e.jsxs(O,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:[E(v||"black"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"link":return e.jsxs(T,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:[E(v||"info"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"plain":return e.jsx(S,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:E(v)}));case"text":return e.jsx(q,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:E(v)}));default:return e.jsxs(B,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:[E(v||"black"),K&&e.jsx(r.RippleGroup,{ref:M})]}))}};
|
|
@@ -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)}))})};
|
|
@@ -7,13 +7,13 @@ export declare const textOptions: readonly [{
|
|
|
7
7
|
readonly size: "3xl";
|
|
8
8
|
readonly tag: "h2";
|
|
9
9
|
readonly type: "page-header";
|
|
10
|
-
readonly weight:
|
|
10
|
+
readonly weight: 700;
|
|
11
11
|
}, {
|
|
12
12
|
readonly label: "Header (2XL) · 28px (1.75rem)";
|
|
13
13
|
readonly size: "2xl";
|
|
14
14
|
readonly tag: "h3";
|
|
15
15
|
readonly type: "header";
|
|
16
|
-
readonly weight:
|
|
16
|
+
readonly weight: 600;
|
|
17
17
|
}, {
|
|
18
18
|
readonly label: "Description Header (2XL) · 28px (1.75rem)";
|
|
19
19
|
readonly size: "2xl";
|
|
@@ -25,7 +25,7 @@ export declare const textOptions: readonly [{
|
|
|
25
25
|
readonly size: "xl";
|
|
26
26
|
readonly tag: "h4";
|
|
27
27
|
readonly type: "title";
|
|
28
|
-
readonly weight:
|
|
28
|
+
readonly weight: 600;
|
|
29
29
|
}, {
|
|
30
30
|
readonly label: "Bold Subheader (L) • 18px (1.125rem)";
|
|
31
31
|
readonly size: "l";
|
package/components/text/Text.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),t=require("react/jsx-runtime"),i=require("styled-components"),a=require("../../styles/constants/theme.js");function s(e){return e&&e.__esModule?e:{default:e}}var n,r,l,h=s(i),o=h.default.span(n||(n=e.__makeTemplateObject(["\n font-size: ",";\n line-height: 16px;\n color: ",";\n"],["\n font-size: ",";\n line-height: 16px;\n color: ",";\n"])),a.theme.fontSizeS,a.theme.gray900),p=h.default.span(r||(r=e.__makeTemplateObject(["\n color: ",";\n display: block;\n font-family: ",";\n font-size: 14px;\n font-weight: 400;\n line-height: 16px;\n margin-bottom: ",";\n"],["\n color: ",";\n display: block;\n font-family: ",";\n font-size: 14px;\n font-weight: 400;\n line-height: 16px;\n margin-bottom: ",";\n"])),a.theme.gray1200,a.theme.fontSans,a.theme.space8),g=[{label:"Page Header (3XL) · 34px (2.125rem)",size:"3xl",tag:"h2",type:"page-header",weight:
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),t=require("react/jsx-runtime"),i=require("styled-components"),a=require("../../styles/constants/theme.js");function s(e){return e&&e.__esModule?e:{default:e}}var n,r,l,h=s(i),o=h.default.span(n||(n=e.__makeTemplateObject(["\n font-size: ",";\n line-height: 16px;\n color: ",";\n"],["\n font-size: ",";\n line-height: 16px;\n color: ",";\n"])),a.theme.fontSizeS,a.theme.gray900),p=h.default.span(r||(r=e.__makeTemplateObject(["\n color: ",";\n display: block;\n font-family: ",";\n font-size: 14px;\n font-weight: 400;\n line-height: 16px;\n margin-bottom: ",";\n"],["\n color: ",";\n display: block;\n font-family: ",";\n font-size: 14px;\n font-weight: 400;\n line-height: 16px;\n margin-bottom: ",";\n"])),a.theme.gray1200,a.theme.fontSans,a.theme.space8),g=[{label:"Page Header (3XL) · 34px (2.125rem)",size:"3xl",tag:"h2",type:"page-header",weight:700},{label:"Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",type:"header",weight:600},{label:"Description Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",type:"description-header",weight:700},{label:"Title (XL) • 22px (1.375rem)",size:"xl",tag:"h4",type:"title",weight:600},{label:"Bold Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",type:"bold-subheader",weight:700},{label:"Semi Bold Subheader (L / H4) • 18px (1.125rem)",size:"l",tag:"h5",type:"semi-bold-subheader",weight:600},{label:"Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",type:"subheader",weight:500},{label:"Bold Label (Base) • 14px (.875rem)",size:"base",tag:"span",type:"bold-label",weight:700},{label:"Label (Base) • 14px (.875rem)",size:"base",tag:"span",type:"label",weight:500},{label:"Body (Base) • 14px (.875rem)",size:"base",tag:"span",type:"body",weight:400},{label:"Small header (S) • 12px (.75rem)",size:"s",tag:"span",type:"small-header",weight:600},{label:"Caption (S) • 12px (.75rem)",size:"s",tag:"span",type:"caption",weight:400},{label:"Hint text (XS) • 10px (.625rem)",size:"xs",tag:"span",type:"hint-text",weight:400}],c=e.__read(g,13),d=c[0],u=c[1],z=c[2],b=c[3],f=c[4],m=c[5],x=c[6],w=c[7],y=c[8],U=c[9],W=c[10],S=c[11],_=c[12],v=h.default.h1(l||(l=e.__makeTemplateObject(["\n font-size: ",";\n font-weight: ",";\n line-height: ",";\n margin: 0;\n color: ",";\n text-transform: ",";\n\n svg {\n display: inline-block;\n vertical-align: middle;\n }\n"],["\n font-size: ",";\n font-weight: ",";\n line-height: ",";\n margin: 0;\n color: ",";\n text-transform: ",";\n\n svg {\n display: inline-block;\n vertical-align: middle;\n }\n"])),(function(e){return"var(--amino-font-size-".concat(e.fontSize||e.size,")")}),(function(e){return e.fontWeight}),(function(e){return"var(--amino-line-height-".concat(e.lineHeight||e.size,")")}),(function(e){return e.color&&a.theme[e.color]}),(function(e){return e.isUppercase&&"uppercase"}));exports.Text=function(e){var i=e.children,a=e.className,s=e.color,n=e.fontSize,r=e.fontWeight,l=e.isUppercase,h=e.lineHeight,g=e.tag,c=e.title,j=function(e){var r=e.as,l=e.fontWeight,o=e.isUppercase,p=e.size;return t.jsx(v,{as:r,className:a,color:s,fontSize:n,fontWeight:l,isUppercase:!!o,lineHeight:h,size:p,title:c,children:i})};switch(e.type){case"page-header":return j({as:g||d.tag,fontWeight:r||d.weight,isUppercase:l,size:d.size});case"header":return j({as:g||u.tag,fontWeight:r||u.weight,isUppercase:l,size:u.size});case"description-header":return j({as:g||z.tag,fontWeight:r||z.weight,isUppercase:l,size:z.size});case"title":return j({as:g||b.tag,fontWeight:r||b.weight,isUppercase:l,size:b.size});case"bold-subheader":return j({as:g||f.tag,fontWeight:r||f.weight,isUppercase:l,size:f.size});case"semi-bold-subheader":return j({as:g||m.tag,fontWeight:r||m.weight,isUppercase:l,size:m.size});case"subheader":return j({as:g||x.tag,fontWeight:r||x.weight,isUppercase:l,size:x.size});case"bold-label":return j({as:g||w.tag,fontWeight:r||w.weight,isUppercase:l,size:w.size});case"label":return j({as:g||y.tag,fontWeight:r||y.weight,isUppercase:l,size:y.size});case"small-header":return j({as:g||W.tag,fontWeight:r||W.weight,isUppercase:"boolean"!=typeof l||l,size:W.size});case"caption":return j({as:g||S.tag,fontWeight:r||S.weight,isUppercase:l,size:S.size});case"hint-text":return j({as:g||_.tag,fontWeight:r||_.weight,isUppercase:l,size:_.size});case"subtitle":return t.jsx(o,{className:a,title:c,children:i});case"input-label":return t.jsx(p,{className:a,title:c,children:i});default:return j({as:g||U.tag,fontWeight:r||U.weight,isUppercase:l,size:U.size})}},exports.textOptions=g,exports.textOthers=["code","subtitle","small-header","input-label"];
|
|
@@ -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
package/theme.css
CHANGED
|
@@ -382,17 +382,25 @@
|
|
|
382
382
|
inset 0px 2px 4px rgba(0, 0, 0, 0.24),
|
|
383
383
|
inset 0px 0px 0px 0.5px rgba(0, 0, 0, 0.24),
|
|
384
384
|
inset 0px 0px 8px rgba(0, 0, 0, 0.16);
|
|
385
|
-
--amino-shadow-button-primary: 0px
|
|
386
|
-
0px
|
|
387
|
-
|
|
388
|
-
0px
|
|
385
|
+
--amino-shadow-button-primary: 0px 0px 0px 1px #000,
|
|
386
|
+
0px -1px 1px 0px rgba(0, 0, 0, 0.2) inset,
|
|
387
|
+
0px 0px 0px 1px rgba(255, 255, 255, 0.08) inset,
|
|
388
|
+
0px 1px 3px 0px rgba(95, 146, 246, 0.4);
|
|
389
|
+
--amino-shadow-button-success: 0px 0px 0px 1px #000,
|
|
390
|
+
0px -1px 1px 0px rgba(0, 0, 0, 0.2) inset,
|
|
391
|
+
0px 0px 0px 1px rgba(255, 255, 255, 0.08) inset,
|
|
389
392
|
0px 1px 3px 0px rgba(86, 199, 111, 0.6);
|
|
390
|
-
--amino-shadow-button-danger: 0px
|
|
391
|
-
0px 1px
|
|
392
|
-
|
|
393
|
-
0px 1px 3px 0px rgba(
|
|
393
|
+
--amino-shadow-button-danger: 0px 0px 0px 1px #000,
|
|
394
|
+
0px -1px 1px 0px rgba(0, 0, 0, 0.2) inset,
|
|
395
|
+
0px 0px 0px 1px rgba(255, 255, 255, 0.08) inset,
|
|
396
|
+
0px 1px 3px 0px rgba(249, 92, 103, 0.6);
|
|
397
|
+
--amino-shadow-button-warning: 0px 0px 0px 1px #000,
|
|
398
|
+
0px -1px 1px 0px rgba(0, 0, 0, 0.2) inset,
|
|
399
|
+
0px 0px 0px 1px rgba(255, 255, 255, 0.08) inset,
|
|
400
|
+
0px 1px 3px 0px rgba(248, 140, 83, 0.6);
|
|
394
401
|
--amino-button-focus-ring: 0 0 0 2px var(--amino-blue-600);
|
|
395
|
-
--amino-shadow-button-standard: 0px
|
|
402
|
+
--amino-shadow-button-standard: 0px 0px 0px 1px #000,
|
|
403
|
+
0px -1px 1px 0px rgba(0, 0, 0, 0.4) inset,
|
|
396
404
|
0px 0px 2px 1px rgba(255, 255, 255, 0.08) inset,
|
|
397
405
|
0px 1px 3px 0px rgba(0, 0, 0, 0.8),
|
|
398
406
|
0px 0px 0px 1px rgba(148, 150, 158, 0.12) inset;
|