@zonos/amino 5.1.50 → 5.1.52
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/all.d.ts +1 -0
- package/components/button/Button.js +1 -1
- package/components/button/ButtonIcon.d.ts +5 -0
- package/components/button/ButtonIcon.js +1 -0
- package/components/button/MenuButton.js +1 -1
- package/components/dialog/Dialog.d.ts +2 -2
- package/components/dialog/Dialog.js +1 -1
- package/components/drop-zone/DropZone.js +1 -1
- package/components/file-upload/FileUpload.js +1 -1
- package/components/rest-state/RestState.d.ts +1 -1
- package/package.json +1 -1
- package/styles/constants/theme.d.ts +2 -0
- package/styles/constants/theme.js +1 -1
- package/theme.css +6 -0
- package/types/ConfirmDialogOpts.d.ts +2 -1
- package/utils/hooks/useDropdown.d.ts +6 -1
- package/utils/hooks/useDropdown.js +1 -1
package/all.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import './components/avatar/UserAvatar';
|
|
|
9
9
|
import './components/badge/Badge';
|
|
10
10
|
import './components/banner/Banner';
|
|
11
11
|
import './components/button/Button';
|
|
12
|
+
import './components/button/ButtonIcon';
|
|
12
13
|
import './components/button/MenuButton';
|
|
13
14
|
import './components/button/RippleGroup';
|
|
14
15
|
import './components/button/useRipple';
|
|
@@ -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,v=u(o),k=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=v.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),_=v.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 text-shadow:\n 0px 2px 4px rgba(0, 0, 0, 0.02),\n 0px 1px 2px rgba(0, 0, 0, 0.04);\n\n svg path:not([data-is-secondary-color]) {\n fill: currentColor;\n }\n\n .text {\n padding: 0 ",";\n }\n\n &.only-icon {\n width: ",";\n padding: 0;\n }\n\n &.only-icon .text {\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 &.loading .content {\n visibility: hidden;\n }\n\n &:not(.only-icon).has-icon {\n &.icon-right {\n svg:not(.amino-spinner) {\n margin-left: 2px;\n margin-right: 0;\n opacity: 80%;\n }\n }\n svg:not(.amino-spinner) {\n margin-right: 2px;\n margin-left: 0;\n opacity: 80%;\n }\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 text-shadow:\n 0px 2px 4px rgba(0, 0, 0, 0.02),\n 0px 1px 2px rgba(0, 0, 0, 0.04);\n\n svg path:not([data-is-secondary-color]) {\n fill: currentColor;\n }\n\n .text {\n padding: 0 ",";\n }\n\n &.only-icon {\n width: ",";\n padding: 0;\n }\n\n &.only-icon .text {\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 &.loading .content {\n visibility: hidden;\n }\n\n &:not(.only-icon).has-icon {\n &.icon-right {\n svg:not(.amino-spinner) {\n margin-left: 2px;\n margin-right: 0;\n opacity: 80%;\n }\n }\n svg:not(.amino-spinner) {\n margin-right: 2px;\n margin-left: 0;\n opacity: 80%;\n }\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"}),c.theme.space4,(function(n){return"var(--amino-size-".concat(n.size,")")}),(function(n){return n.outline?.6:1})),j=v.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 k(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 k(n.background)||n.outline?"transparent":c.theme.primary}),(function(n){return k(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=v.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 k(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 k(n.background)||n.outline?"transparent":c.theme.success}),(function(n){return k(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=v.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 k(n.color)||c.theme.textColor}),(function(n){return n.outline?"transparent":k(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 k(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=v.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 k(n.background)||n.outline?"transparent":c.theme.danger}),(function(n){return k(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 k(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=v.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 k(n.background)||n.outline?"transparent":c.theme.warning}),(function(n){return k(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 k(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=v.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 k(n.background)||"none"}),(function(n){return k(n.color)||c.theme.textColorSecondary}),(function(n){return k(n.hoverBackground)||c.theme.gray100}),c.theme.gray200,c.theme.buttonFocusRing),T=v.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 k(n.color)||c.theme.primary}),(function(n){return k(n.hoverBackground)||c.theme.blue100}),c.theme.blue200,c.theme.buttonFocusRing),q=v.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,v=void 0===x?"sm":x,k=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 text",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(v)}),p]})]})},P=["amino-button",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:v},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(k||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(k||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(k||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(k||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(k||"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(k||"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(k)}));case"text":return e.jsx(q,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:E(k)}));default:return e.jsxs(B,n.__assign({as:D,tabIndex:"div"===D?0:void 0},Q,{children:[E(k||"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,v=u(o),k=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=v.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),_=v.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 text-shadow:\n 0px 2px 4px rgba(0, 0, 0, 0.02),\n 0px 1px 2px rgba(0, 0, 0, 0.04);\n\n svg path:not([data-is-secondary-color]) {\n fill: currentColor;\n }\n\n .text {\n padding: 0 ",";\n }\n\n &.only-icon {\n width: ",";\n padding: 0;\n }\n\n &.only-icon .text {\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:not([disabled]) {\n transform: scale(0.99);\n }\n\n &.loading .content {\n visibility: hidden;\n }\n\n &:not(.only-icon).has-icon {\n &.icon-right {\n svg:not(.amino-spinner) {\n margin-left: 2px;\n margin-right: 0;\n opacity: 80%;\n }\n }\n svg:not(.amino-spinner) {\n margin-right: 2px;\n margin-left: 0;\n opacity: 80%;\n }\n }\n\n &[disabled] {\n cursor: not-allowed;\n opacity: ",";\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 text-shadow:\n 0px 2px 4px rgba(0, 0, 0, 0.02),\n 0px 1px 2px rgba(0, 0, 0, 0.04);\n\n svg path:not([data-is-secondary-color]) {\n fill: currentColor;\n }\n\n .text {\n padding: 0 ",";\n }\n\n &.only-icon {\n width: ",";\n padding: 0;\n }\n\n &.only-icon .text {\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:not([disabled]) {\n transform: scale(0.99);\n }\n\n &.loading .content {\n visibility: hidden;\n }\n\n &:not(.only-icon).has-icon {\n &.icon-right {\n svg:not(.amino-spinner) {\n margin-left: 2px;\n margin-right: 0;\n opacity: 80%;\n }\n }\n svg:not(.amino-spinner) {\n margin-right: 2px;\n margin-left: 0;\n opacity: 80%;\n }\n }\n\n &[disabled] {\n cursor: not-allowed;\n opacity: ",";\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"}),c.theme.space4,(function(n){return"var(--amino-size-".concat(n.size,")")}),(function(n){return n.outline?.6:1})),j=v.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 k(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 k(n.background)||n.outline?"transparent":c.theme.primary}),(function(n){return k(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.gray400}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.primary," inset"):c.theme.shadowButtonDisabled}),y,(function(n){return n.outline?"transparent":c.theme.primary})),B=v.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 k(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 k(n.background)||n.outline?"transparent":c.theme.success}),(function(n){return k(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.gray400}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.success," inset"):c.theme.shadowButtonDisabled}),y,(function(n){return n.outline?"transparent":c.theme.success})),R=v.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 k(n.color)||c.theme.textColor}),(function(n){return n.outline?"transparent":k(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 k(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=v.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 k(n.background)||n.outline?"transparent":c.theme.danger}),(function(n){return k(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 k(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.gray400}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.danger," inset"):c.theme.shadowButtonDisabled}),y,(function(n){return n.outline?"transparent":c.theme.danger})),C=v.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 k(n.background)||n.outline?"transparent":c.theme.warning}),(function(n){return k(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 k(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.gray400}),(function(n){return n.outline?"0px 0px 0px 1px ".concat(c.theme.warning," inset"):c.theme.shadowButtonDisabled}),y,(function(n){return n.outline?"transparent":c.theme.warning})),O=v.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 k(n.background)||"none"}),(function(n){return k(n.color)||c.theme.textColorSecondary}),(function(n){return k(n.hoverBackground)||c.theme.gray100}),c.theme.gray200,c.theme.buttonFocusRing),T=v.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 k(n.color)||c.theme.primary}),(function(n){return k(n.hoverBackground)||c.theme.blue100}),c.theme.blue200,c.theme.buttonFocusRing),q=v.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.gray500}),(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,v=void 0===x?"sm":x,k=o.spinnerColor,_=o.tag,I=o.themeOverride,G=o.type,D=void 0===G?"button":G,F=o.variant,H=void 0===F?"standard":F,N=n.__rest(o,["children","className","disabled","icon","iconRight","loading","loadingText","noRipple","size","spinnerColor","tag","themeOverride","type","variant"]),W=_||"button",E=function(n){return e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"content",children:!h&&l}),e.jsx("div",{className:"content text",children:c}),e.jsx("span",{className:"content",children:h&&l}),"plain"!==H&&"text"!==H&&b&&e.jsxs(y,{children:[e.jsx(i.Spinner,{color:n,size:w(v)}),p]})]})},P=["amino-button",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(H),rippleRef:M}),J=A.getRippleHandlers,K=A.rippleEnabled,L={className:P,disabled:d||b,size:v},Q=n.__assign(n.__assign(n.__assign({type:D},L),N),J(N));switch(H){case"primary":return e.jsxs(j,n.__assign({as:W,tabIndex:"div"===W?0:void 0},Q,{children:[E(k||Q.outline?"info":"white"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"success":return e.jsxs(B,n.__assign({as:W,tabIndex:"div"===W?0:void 0},Q,{children:[E(k||Q.outline?"success":"white"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"warning":return e.jsxs(C,n.__assign({as:W,tabIndex:"div"===W?0:void 0},Q,{children:[E(k||Q.outline?"warning":"white"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"danger":return e.jsxs(z,n.__assign({as:W,tabIndex:"div"===W?0:void 0},Q,{children:[E(k||Q.outline?"danger":"white"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"subtle":return e.jsxs(O,n.__assign({as:W,tabIndex:"div"===W?0:void 0},Q,{children:[E(k||"black"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"link":return e.jsxs(T,n.__assign({as:W,tabIndex:"div"===W?0:void 0},Q,{children:[E(k||"info"),K&&e.jsx(r.RippleGroup,{ref:M})]}));case"plain":return e.jsx(S,n.__assign({as:W,tabIndex:"div"===W?0:void 0},Q,{children:E(k)}));case"text":return e.jsx(q,n.__assign({as:W,tabIndex:"div"===W?0:void 0},Q,{children:E(k)}));default:return e.jsxs(R,n.__assign({as:W,tabIndex:"div"===W?0:void 0},Q,{children:[E(k||"black"),K&&e.jsx(r.RippleGroup,{ref:M})]}))}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("styled-components"),r=require("./Button.js"),a=require("../../styles/constants/theme.js");function t(n){return n&&n.__esModule?n:{default:n}}require("react/jsx-runtime"),require("react"),require("./RippleGroup.js"),require("framer-motion"),require("uuid"),require("./_Ripple.js"),require("./useRipple.js"),require("../spinner/Spinner.js");var o,i=t(e).default(r.Button)(o||(o=n.__makeTemplateObject(["\n padding: 0;\n path[data-is-secondary-color] {\n fill: ",";\n }\n\n && {\n &,\n &:focus,\n &:hover,\n &:active {\n color: ",";\n background: transparent;\n }\n &:hover {\n path[data-is-secondary-color] {\n fill: ",";\n }\n }\n &:active,\n &:focus {\n path[data-is-secondary-color] {\n fill: ",";\n }\n }\n }\n"],["\n padding: 0;\n path[data-is-secondary-color] {\n fill: ",";\n }\n\n && {\n &,\n &:focus,\n &:hover,\n &:active {\n color: ",";\n background: transparent;\n }\n &:hover {\n path[data-is-secondary-color] {\n fill: ",";\n }\n }\n &:active,\n &:focus {\n path[data-is-secondary-color] {\n fill: ",";\n }\n }\n }\n"])),a.theme.gray200,a.theme.gray800,a.theme.gray300,a.theme.gray400);exports.ButtonIcon=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime");require("react");var i=require("styled-components"),t=require("../../animations/DropdownAnimation.js"),o=require("../../styles/constants/theme.js"),a=require("../../utils/hooks/useDropdown.js");function s(e){return e&&e.__esModule?e:{default:e}}require("@floating-ui/react");var r,l,
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime");require("react");var i=require("styled-components"),t=require("../../animations/DropdownAnimation.js"),o=require("../../styles/constants/theme.js"),a=require("../../utils/hooks/useDropdown.js");function s(e){return e&&e.__esModule?e:{default:e}}require("@floating-ui/react");var r,d,l,u=s(i),c=u.default.div(r||(r=e.__makeTemplateObject(["\n position: relative;\n display: inline-flex;\n"],["\n position: relative;\n display: inline-flex;\n"]))),m=u.default.div(d||(d=e.__makeTemplateObject(["\n z-index: 10;\n min-width: 100%;\n"],["\n z-index: 10;\n min-width: 100%;\n"]))),f=u.default.div(l||(l=e.__makeTemplateObject(["\n background: ",";\n border-radius: ",";\n box-shadow: ",";\n animation: "," 250ms ease-in-out;\n animation-fill-mode: both;\n padding: ",";\n margin-top: ",";\n right: 0;\n min-width: 100%;\n width: max-content;\n"],["\n background: ",";\n border-radius: ",";\n box-shadow: ",";\n animation: "," 250ms ease-in-out;\n animation-fill-mode: both;\n padding: ",";\n margin-top: ",";\n right: 0;\n min-width: 100%;\n width: max-content;\n"])),o.theme.surfaceColor,o.theme.radius12,o.theme.v3ShadowLarge,t.DropdownAnimation,o.theme.space8,o.theme.space4);exports.MenuButton=function(i){var t=i.action,o=i.children,s=i.className,r=i.closeOnMouseLeave,d=void 0===r||r,l=i.closeOnSelect,u=void 0===l||l,h=a.useDropdown({offsetCrossAxis:0,offsetMainAxis:0}),p=h.floatingStyles,b=h.refs,v=h.setVisible,x=h.visibility,w=h.visible,g=h.wrapperRef,_=function(){u&&v(!1)};return n.jsxs(c,{ref:g,className:s,onMouseLeave:function(){d&&v(!1)},children:[n.jsx("div",{ref:b.setReference,onClick:function(e){e.stopPropagation(),v(!0)},onKeyDown:function(e){"Enter"===e.key&&v(!0)},role:"button",tabIndex:0,children:t}),n.jsx(m,{ref:b.setFloating,style:e.__assign(e.__assign({},p),{visibility:x}),children:w&&n.jsx(f,{onClick:_,onKeyDown:function(e){"Enter"===e.key&&_()},role:"button",tabIndex:-1,children:o})})]})};
|
|
@@ -4,7 +4,7 @@ export type DialogProps = BaseDialogProps & {
|
|
|
4
4
|
actions?: ReactNode;
|
|
5
5
|
label?: ReactNode;
|
|
6
6
|
leftActions?: ReactNode;
|
|
7
|
-
subtitle?:
|
|
7
|
+
subtitle?: ReactNode;
|
|
8
8
|
onClose: () => void;
|
|
9
9
|
};
|
|
10
10
|
export declare const Dialog: import("react").ForwardRefExoticComponent<import("../../types/BaseProps").BaseProps & {
|
|
@@ -22,6 +22,6 @@ export declare const Dialog: import("react").ForwardRefExoticComponent<import(".
|
|
|
22
22
|
actions?: ReactNode;
|
|
23
23
|
label?: ReactNode;
|
|
24
24
|
leftActions?: ReactNode;
|
|
25
|
-
subtitle?:
|
|
25
|
+
subtitle?: ReactNode;
|
|
26
26
|
onClose: () => void;
|
|
27
27
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react"),
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react"),i=require("styled-components"),r=require("../button/ButtonIcon.js"),a=require("./BaseDialog.js"),s=require("../text/Text.js"),l=require("../../icons/RemoveCircleDuotoneIcon.js"),o=require("../../styles/constants/theme.js");function d(e){return e&&e.__esModule?e:{default:e}}require("../button/Button.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("react-dom"),require("../../icons/icon-base/_IconBase.js");var u,c,p,f,m,x,g,b=d(i),j=b.default.div(u||(u=e.__makeTemplateObject(["\n padding: ",";\n padding-bottom: ",";\n border-top-left-radius: ",";\n border-top-right-radius: ",";\n display: flex;\n flex-direction: column;\n gap: ",";\n"],["\n padding: ",";\n padding-bottom: ",";\n border-top-left-radius: ",";\n border-top-right-radius: ",";\n display: flex;\n flex-direction: column;\n gap: ",";\n"])),o.theme.space24,o.theme.space16,o.theme.radius12,o.theme.radius12,o.theme.space12),h=b.default.div(c||(c=e.__makeTemplateObject(["\n width: 100%;\n display: flex;\n align-items: center;\n\n > :not(button) {\n margin: 0;\n flex-grow: 1;\n }\n"],["\n width: 100%;\n display: flex;\n align-items: center;\n\n > :not(button) {\n margin: 0;\n flex-grow: 1;\n }\n"]))),_=b.default.div(p||(p=e.__makeTemplateObject(["\n flex-grow: 1;\n display: flex;\n"],["\n flex-grow: 1;\n display: flex;\n"]))),y=b.default(_)(f||(f=e.__makeTemplateObject(["\n justify-content: flex-start;\n display: flex;\n gap: ",";\n"],["\n justify-content: flex-start;\n display: flex;\n gap: ",";\n"])),o.theme.space8),q=b.default(_)(m||(m=e.__makeTemplateObject(["\n justify-content: flex-end;\n display: flex;\n gap: ",";\n"],["\n justify-content: flex-end;\n display: flex;\n gap: ",";\n"])),o.theme.space8),v=b.default.div(x||(x=e.__makeTemplateObject(["\n padding: ",";\n display: flex;\n align-items: center;\n border-bottom-left-radius: ",";\n border-bottom-right-radius: ",";\n\n & > div + div {\n margin-left: ",";\n }\n"],["\n padding: ",";\n display: flex;\n align-items: center;\n border-bottom-left-radius: ",";\n border-bottom-right-radius: ",";\n\n & > div + div {\n margin-left: ",";\n }\n"])),o.theme.space24,o.theme.radius12,o.theme.radius12,o.theme.space8),w=b.default.div(g||(g=e.__makeTemplateObject(["\n padding: "," ",";\n overflow-y: auto;\n flex-grow: 1;\n"],["\n padding: "," ",";\n overflow-y: auto;\n flex-grow: 1;\n"])),o.theme.space8,o.theme.space24),T=t.forwardRef((function(t,i){var o=t.actions,d=t.children,u=t.label,c=t.leftActions,p=t.onClose,f=t.subtitle,m=e.__rest(t,["actions","children","label","leftActions","onClose","subtitle"]);return n.jsxs(a.BaseDialog,e.__assign({},m,{onClose:p,children:[n.jsxs(j,{children:[n.jsxs(h,{children:[n.jsx(s.Text,{type:"title",children:u}),n.jsx(r.ButtonIcon,{icon:n.jsx(l.RemoveCircleDuotoneIcon,{size:24}),noRipple:!0,onClick:p,variant:"text"})]}),f&&n.jsx(s.Text,{type:"subtitle",children:f})]}),n.jsx(w,{ref:i,children:d}),(o||c)&&n.jsxs(v,{children:[c&&n.jsx(y,{children:c}),o&&n.jsx(q,{children:o})]})]}))}));exports.Dialog=T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),i=require("react-dropzone"),r=require("styled-components"),t=require("../avatar/ImageAvatar.js"),o=require("../button/
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),i=require("react-dropzone"),r=require("styled-components"),t=require("../avatar/ImageAvatar.js"),o=require("../button/ButtonIcon.js"),l=require("../spinner/Spinner.js"),a=require("../text/Text.js"),s=require("../thumbnail/Thumbnail.js"),d=require("../../icons/FileDuotoneIcon.js"),c=require("../../icons/FileUploadDuotoneIcon.js"),u=require("../../icons/RemoveCircleDuotoneIcon.js"),p=require("../../styles/constants/theme.js");function m(e){return e&&e.__esModule?e:{default:e}}require("../avatar/AvatarBase.js"),require("../button/Button.js"),require("react"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../../icons/icon-base/_IconBase.js");var x,j,f,b,h,g,y,_,v,q=m(r),T=q.default.div(x||(x=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: ",";\n opacity: ",";\n cursor: ",";\n"],["\n display: flex;\n flex-direction: column;\n gap: ",";\n opacity: ",";\n cursor: ",";\n"])),p.theme.space16,(function(e){return e.$disabled?.5:1}),(function(e){return e.$disabled?"not-allowed":"auto"})),I=q.default.div(j||(j=e.__makeTemplateObject(["\n border: 2px dashed;\n border-color: ",";\n border-radius: ",";\n display: flex;\n flex-direction: column;\n align-items: center;\n"],["\n border: 2px dashed;\n border-color: ",";\n border-radius: ",";\n display: flex;\n flex-direction: column;\n align-items: center;\n"])),(function(e){return e.$error?p.theme.danger:p.theme.borderColor}),p.theme.radius12),k=q.default.div(f||(f=e.__makeTemplateObject(["\n padding: ",";\n outline: none;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: ",";\n width: 100%;\n height: 100%;\n"],["\n padding: ",";\n outline: none;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: ",";\n width: 100%;\n height: 100%;\n"])),p.theme.space16,p.theme.space12),O=q.default.div(b||(b=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: ",";\n align-items: center;\n"],["\n display: flex;\n flex-direction: column;\n gap: ",";\n align-items: center;\n"])),p.theme.space4),D=q.default.button(h||(h=e.__makeTemplateObject(["\n display: inline;\n"],["\n display: inline;\n"]))),F=q.default(o.ButtonIcon)(g||(g=e.__makeTemplateObject(["\n margin-left: auto;\n"],["\n margin-left: auto;\n"]))),z=q.default.div(y||(y=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: ",";\n"],["\n display: flex;\n flex-direction: column;\n gap: ",";\n"])),p.theme.space4),R=q.default.div(_||(_=e.__makeTemplateObject(["\n border: ",";\n border-radius: ",";\n padding: ",";\n display: flex;\n justify-content: flex-start;\n gap: ",";\n"],["\n border: ",";\n border-radius: ",";\n padding: ",";\n display: flex;\n justify-content: flex-start;\n gap: ",";\n"])),p.theme.border,p.theme.space12,p.theme.space16,p.theme.space12),C=q.default.div(v||(v=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"])));exports.DropZone=function(r){var o=r.className,p=r.disabled,m=void 0!==p&&p,x=r.dropzoneOptions,j=r.error,f=void 0!==j&&j,b=r.helpText,h=r.instructionText,g=void 0===h?"Drop your file(s) here":h,y=r.loading,_=r.loadingText,v=void 0===_?"Uploading file(s)...":_,q=r.noIcon,U=void 0!==q&&q,B=r.onRemoveFile,$=r.uploadedFiles,w=x.maxFiles||0,A=i.useDropzone(e.__assign(e.__assign({},x),{disabled:m,noClick:!0,noKeyboard:!0})),N=A.getInputProps,P=A.getRootProps,S=A.open,G=0!==w&&$.length>=w;return n.jsx(T,{$disabled:m,className:o,children:y?n.jsx(I,{children:n.jsxs(k,{children:[n.jsx(l.Spinner,{}),n.jsx(a.Text,{color:"gray800",type:"label",children:v})]})}):n.jsxs(n.Fragment,{children:[!G&&n.jsx(I,{$error:f,children:n.jsxs(k,e.__assign({},P(),{role:void 0,children:[n.jsx("input",e.__assign({},N())),!U&&n.jsx(s.Thumbnail,{icon:n.jsx(c.FileUploadDuotoneIcon,{}),size:40}),n.jsxs(O,{children:[n.jsxs(a.Text,{type:"label",children:[g," or"," ",n.jsx(D,{disabled:m,onClick:S,type:"button",children:n.jsx(a.Text,{color:"blue600",type:"label",children:"browse"})})]}),b&&n.jsx(a.Text,{type:"caption",children:b})]})]}))}),!!$.length&&n.jsx(z,{children:$.map((function(e,i){return n.jsxs(R,{children:[e.imageUrl?n.jsx(t.ImageAvatar,{imageUrl:e.imageUrl,shape:"rounded"}):n.jsx(d.FileDuotoneIcon,{}),n.jsxs(C,{children:[n.jsx(a.Text,{color:"gray1200",type:"label",children:e.name}),e.size&&n.jsx(a.Text,{color:"gray700",type:"caption",children:e.size})]}),B&&n.jsx(F,{icon:n.jsx(u.RemoveCircleDuotoneIcon,{size:20}),onClick:function(){return B(i)},variant:"text"})]},e.name)}))})]})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react-dropzone"),r=require("styled-components"),i=require("../button/Button.js"),o=require("../button/ButtonIcon.js"),s=require("../text/Text.js"),l=require("../../icons/RemoveCircleDuotoneIcon.js"),a=require("../../styles/constants/theme.js");function u(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("../../icons/icon-base/_IconBase.js");var c,d,p,m,f,x=u(r),j=x.default.div(c||(c=e.__makeTemplateObject(["\n display: flex;\n justify-content: flex-start;\n padding: "," ",";\n border-radius: ",";\n border: ",";\n border-color: ",";\n\n opacity: ",";\n cursor: ",";\n"],["\n display: flex;\n justify-content: flex-start;\n padding: "," ",";\n border-radius: ",";\n border: ",";\n border-color: ",";\n\n opacity: ",";\n cursor: ",";\n"])),a.theme.space8,a.theme.space12,a.theme.radius10,a.theme.border,(function(e){return e.error?a.theme.danger:a.theme.borderColor}),(function(e){return e.disabled?.5:1}),(function(e){return e.disabled?"not-allowed":"auto"})),g=x.default.div(d||(d=e.__makeTemplateObject(["\n outline: none;\n text-align: center;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n"],["\n outline: none;\n text-align: center;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n"]))),b=x.default.div(p||(p=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: ",";\n"],["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: ",";\n"])),a.theme.space12),y=x.default.div(m||(m=e.__makeTemplateObject(["\n display: flex;\n gap: ",";\n align-items: center;\n"],["\n display: flex;\n gap: ",";\n align-items: center;\n"])),a.theme.space4),_=x.default(o.ButtonIcon)(f||(f=e.__makeTemplateObject(["\n margin-left: auto;\n"],["\n margin-left: auto;\n"])));exports.FileUpload=function(r){var o=r.className,a=r.disabled,u=void 0!==a&&a,c=r.dropzoneOptions,d=r.error,p=void 0!==d&&d,m=r.instructionText,f=void 0===m?"or drag your file here":m,x=r.loading,h=r.loadingText,q=void 0===h?"Uploading...":h,v=r.onRemoveFile,T=r.uploadedFile,k=t.useDropzone(e.__assign(e.__assign({},c),{disabled:u,multiple:!1,noClick:!0,noKeyboard:!0})),C=k.getInputProps,R=k.getRootProps,B=k.open,I=function(){return x?n.jsx(s.Text,{children:q}):T?function(){if(T){var e=T.name,t=T.size;return n.jsxs(y,{children:[n.jsx(s.Text,{color:"gray1200",type:"label",children:e}),t&&n.jsx(s.Text,{color:"gray700",type:"caption",children:t})]})}return null}():n.jsx(s.Text,{color:"gray600",children:f})};return n.jsxs(j,{className:o,disabled:u,error:p,children:[n.jsxs(g,e.__assign({},R(),{children:[n.jsx("input",e.__assign({},C())),n.jsxs(b,{children:[n.jsx(i.Button,{loading:x,onClick:B,spinnerColor:"black",children:"Browse"}),I()]})]})),v&&T&&n.jsx(_,{icon:n.jsx(l.RemoveCircleDuotoneIcon,{size:20}),onClick:function(){return v()},variant:"text"})]})};
|
|
@@ -4,6 +4,6 @@ export type RestStateProps = {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
icon?: string;
|
|
6
6
|
label: string;
|
|
7
|
-
subtitle?:
|
|
7
|
+
subtitle?: ReactNode;
|
|
8
8
|
};
|
|
9
9
|
export declare const RestState: ({ action, className, icon, label, subtitle, }: RestStateProps) => import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -209,6 +209,8 @@ export declare const theme: {
|
|
|
209
209
|
readonly buttonFocusRing: "var(--amino-button-focus-ring)";
|
|
210
210
|
/** @info 0px 1px 3px 0px rgba(110, 110, 120, 0.12), 0px -1px 1px 1px rgba(0, 0, 0, 0.08) inset, 0px 0px 0px 1px rgba(106, 109, 119, 0.12) inset */
|
|
211
211
|
readonly shadowButtonStandard: "var(--amino-shadow-button-standard)";
|
|
212
|
+
/** @info 0px 1px 3px 0px rgba(16, 17, 22, 0.2), 0px -1px 1px 1px rgba(0, 0, 0, 0.08) inset */
|
|
213
|
+
readonly shadowButtonDisabled: "var(--amino-shadow-button-disabled)";
|
|
212
214
|
/** @info space-negative-80: -5rem (-80px) */
|
|
213
215
|
readonly spaceNegative80: "var(--amino-space-negative-80)";
|
|
214
216
|
/** @info space-negative-76: -4.75rem (-76px) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.theme={transition:"var(--amino-transition)",typeScaleBase:"var(--amino-type-scale-base)",glass0:"var(--amino-glass-0)",glass50:"var(--amino-glass-50)",glass100:"var(--amino-glass-100)",glass200:"var(--amino-glass-200)",glass300:"var(--amino-glass-300)",glass400:"var(--amino-glass-400)",glass500:"var(--amino-glass-500)",glass600:"var(--amino-glass-600)",glass700:"var(--amino-glass-700)",glass800:"var(--amino-glass-800)",glass900:"var(--amino-glass-900)",glass1000:"var(--amino-glass-1000)",glass1100:"var(--amino-glass-1100)",glass1200:"var(--amino-glass-1200)",gray0:"var(--amino-gray-0)",gray50:"var(--amino-gray-50)",gray100:"var(--amino-gray-100)",gray200:"var(--amino-gray-200)",gray300:"var(--amino-gray-300)",gray400:"var(--amino-gray-400)",gray500:"var(--amino-gray-500)",gray600:"var(--amino-gray-600)",gray700:"var(--amino-gray-700)",gray800:"var(--amino-gray-800)",gray900:"var(--amino-gray-900)",gray1000:"var(--amino-gray-1000)",gray1100:"var(--amino-gray-1100)",gray1200:"var(--amino-gray-1200)",blue100:"var(--amino-blue-100)",blue200:"var(--amino-blue-200)",blue300:"var(--amino-blue-300)",blue400:"var(--amino-blue-400)",blue500:"var(--amino-blue-500)",blue600:"var(--amino-blue-600)",blue700:"var(--amino-blue-700)",blue800:"var(--amino-blue-800)",blue900:"var(--amino-blue-900)",blue1000:"var(--amino-blue-1000)",cyan100:"var(--amino-cyan-100)",cyan200:"var(--amino-cyan-200)",cyan300:"var(--amino-cyan-300)",cyan400:"var(--amino-cyan-400)",cyan500:"var(--amino-cyan-500)",cyan600:"var(--amino-cyan-600)",cyan700:"var(--amino-cyan-700)",cyan800:"var(--amino-cyan-800)",cyan900:"var(--amino-cyan-900)",cyan1000:"var(--amino-cyan-1000)",red100:"var(--amino-red-100)",red200:"var(--amino-red-200)",red300:"var(--amino-red-300)",red400:"var(--amino-red-400)",red500:"var(--amino-red-500)",red600:"var(--amino-red-600)",red700:"var(--amino-red-700)",red800:"var(--amino-red-800)",red900:"var(--amino-red-900)",red1000:"var(--amino-red-1000)",orange100:"var(--amino-orange-100)",orange200:"var(--amino-orange-200)",orange300:"var(--amino-orange-300)",orange400:"var(--amino-orange-400)",orange500:"var(--amino-orange-500)",orange600:"var(--amino-orange-600)",orange700:"var(--amino-orange-700)",orange800:"var(--amino-orange-800)",orange900:"var(--amino-orange-900)",orange1000:"var(--amino-orange-1000)",green100:"var(--amino-green-100)",green200:"var(--amino-green-200)",green300:"var(--amino-green-300)",green400:"var(--amino-green-400)",green500:"var(--amino-green-500)",green600:"var(--amino-green-600)",green700:"var(--amino-green-700)",green800:"var(--amino-green-800)",green900:"var(--amino-green-900)",green1000:"var(--amino-green-1000)",purple100:"var(--amino-purple-100)",purple200:"var(--amino-purple-200)",purple300:"var(--amino-purple-300)",purple400:"var(--amino-purple-400)",purple500:"var(--amino-purple-500)",purple600:"var(--amino-purple-600)",purple700:"var(--amino-purple-700)",purple800:"var(--amino-purple-800)",purple900:"var(--amino-purple-900)",purple1000:"var(--amino-purple-1000)",transparentWhite:"var(--amino-transparent-white)",transparentBlack:"var(--amino-transparent-black)",transparentGray600:"var(--amino-transparent-gray-600)",v3ShadowBase:"var(--amino-v3-shadow-base)",v3ShadowMedium:"var(--amino-v3-shadow-medium)",v3ShadowLarge:"var(--amino-v3-shadow-large)",v3ShadowXl:"var(--amino-v3-shadow-xl)",v3ShadowXxl:"var(--amino-v3-shadow-xxl)",v3ShadowInset:"var(--amino-v3-shadow-inset)",shadowButtonPrimary:"var(--amino-shadow-button-primary)",shadowButtonSuccess:"var(--amino-shadow-button-success)",shadowButtonDanger:"var(--amino-shadow-button-danger)",shadowButtonWarning:"var(--amino-shadow-button-warning)",buttonFocusRing:"var(--amino-button-focus-ring)",shadowButtonStandard:"var(--amino-shadow-button-standard)",spaceNegative80:"var(--amino-space-negative-80)",spaceNegative76:"var(--amino-space-negative-76)",spaceNegative72:"var(--amino-space-negative-72)",spaceNegative68:"var(--amino-space-negative-68)",spaceNegative64:"var(--amino-space-negative-64)",spaceNegative60:"var(--amino-space-negative-60)",spaceNegative56:"var(--amino-space-negative-56)",spaceNegative52:"var(--amino-space-negative-52)",spaceNegative48:"var(--amino-space-negative-48)",spaceNegative44:"var(--amino-space-negative-44)",spaceNegative40:"var(--amino-space-negative-40)",spaceNegative36:"var(--amino-space-negative-36)",spaceNegative32:"var(--amino-space-negative-32)",spaceNegative28:"var(--amino-space-negative-28)",spaceNegative24:"var(--amino-space-negative-24)",spaceNegative20:"var(--amino-space-negative-20)",spaceNegative16:"var(--amino-space-negative-16)",spaceNegative12:"var(--amino-space-negative-12)",spaceNegative8:"var(--amino-space-negative-8)",spaceNegative4:"var(--amino-space-negative-4)",space0:"var(--amino-space-0)",space4:"var(--amino-space-4)",space8:"var(--amino-space-8)",space12:"var(--amino-space-12)",space16:"var(--amino-space-16)",space20:"var(--amino-space-20)",space24:"var(--amino-space-24)",space28:"var(--amino-space-28)",space32:"var(--amino-space-32)",space36:"var(--amino-space-36)",space40:"var(--amino-space-40)",space44:"var(--amino-space-44)",space48:"var(--amino-space-48)",space52:"var(--amino-space-52)",space56:"var(--amino-space-56)",space60:"var(--amino-space-60)",space64:"var(--amino-space-64)",space68:"var(--amino-space-68)",space72:"var(--amino-space-72)",space76:"var(--amino-space-76)",space80:"var(--amino-space-80)",border:"var(--amino-border)",borderBlue:"var(--amino-border-blue)",borderRed:"var(--amino-border-red)",borderCyan:"var(--amino-border-cyan)",borderOrange:"var(--amino-border-orange)",borderGreen:"var(--amino-border-green)",borderPurple:"var(--amino-border-purple)",borderAmber:"var(--amino-border-amber)",borderTransparent:"var(--amino-border-transparent)",sidebarColor:"var(--amino-sidebar-color)",headerColor:"var(--amino-header-color)",danger:"var(--amino-danger)",dangerDark:"var(--amino-danger-dark)",error:"var(--amino-error)",primary:"var(--amino-primary)",primaryLight:"var(--amino-primary-light)",primaryDark:"var(--amino-primary-dark)",success:"var(--amino-success)",successDark:"var(--amino-success-dark)",warning:"var(--amino-warning)",warningDark:"var(--amino-warning-dark)",glowError:"var(--amino-glow-error)",glowBlue:"var(--amino-glow-blue)",glowCyan:"var(--amino-glow-cyan)",glowRed:"var(--amino-glow-red)",glowOrange:"var(--amino-glow-orange)",glowGreen:"var(--amino-glow-green)",glowPurple:"var(--amino-glow-purple)",pageBackground:"var(--amino-page-background)",borderColor:"var(--amino-border-color)",hoverColor:"var(--amino-hover-color)",textColor:"var(--amino-text-color)",textColorSecondary:"var(--amino-text-color-secondary)",focusButtonStandard:"var(--amino-focus-button-standard)",focusButton:"var(--amino-focus-button)",surfaceColor:"var(--amino-surface-color)",surfaceColorSecondary:"var(--amino-surface-color-secondary)",backdropColor:"var(--amino-backdrop-color)",buttonPrimaryHover:"var(--amino-button-primary-hover)",buttonSuccessHover:"var(--amino-button-success-hover)",buttonDangerHover:"var(--amino-button-danger-hover)",buttonWarningHover:"var(--amino-button-warning-hover)",buttonStandardHover:"var(--amino-button-standard-hover)",spinnerTrackBlack:"var(--amino-spinner-track-black)",spinnerStrokeBlack:"var(--amino-spinner-stroke-black)",spinnerTrackWhite:"var(--amino-spinner-track-white)",spinnerStrokeWhite:"var(--amino-spinner-stroke-white)",appbarHeight:"var(--amino-appbar-height)",sidebarWidth:"var(--amino-sidebar-width)",elevation0:"var(--amino-elevation-0)",elevation100:"var(--amino-elevation-100)",elevation200:"var(--amino-elevation-200)",elevation300:"var(--amino-elevation-300)",elevation400:"var(--amino-elevation-400)",elevation500:"var(--amino-elevation-500)",dialogElevation:"var(--amino-dialog-elevation)",toastElevation:"var(--amino-toast-elevation)",appbarElevation:"var(--amino-appbar-elevation)",sizeXl:"var(--amino-size-xl)",sizeLg:"var(--amino-size-lg)",sizeMd:"var(--amino-size-md)",sizeSm:"var(--amino-size-sm)",radius4:"var(--amino-radius-4)",radius6:"var(--amino-radius-6)",radius8:"var(--amino-radius-8)",radius10:"var(--amino-radius-10)",radius12:"var(--amino-radius-12)",fontSize3xl:"var(--amino-font-size-3xl)",fontSize2xl:"var(--amino-font-size-2xl)",fontSizeXl:"var(--amino-font-size-xl)",fontSizeL:"var(--amino-font-size-l)",fontSizeBaseDocs:"var(--amino-font-size-base-docs)",fontSizeBase:"var(--amino-font-size-base)",fontSizeS:"var(--amino-font-size-s)",fontSizeXs:"var(--amino-font-size-xs)",lineHeight3xl:"var(--amino-line-height-3xl)",lineHeight2xl:"var(--amino-line-height-2xl)",lineHeightXl:"var(--amino-line-height-xl)",lineHeightL:"var(--amino-line-height-l)",lineHeightBase:"var(--amino-line-height-base)",lineHeightS:"var(--amino-line-height-s)",lineHeightXs:"var(--amino-line-height-xs)",fontSans:"var(--amino-font-sans)",fontMono:"var(--amino-font-mono)",fontHarmonizedCodes:"var(--amino-font-harmonized-codes)",inputBackground:"var(--amino-input-background)"};
|
|
1
|
+
"use strict";exports.theme={transition:"var(--amino-transition)",typeScaleBase:"var(--amino-type-scale-base)",glass0:"var(--amino-glass-0)",glass50:"var(--amino-glass-50)",glass100:"var(--amino-glass-100)",glass200:"var(--amino-glass-200)",glass300:"var(--amino-glass-300)",glass400:"var(--amino-glass-400)",glass500:"var(--amino-glass-500)",glass600:"var(--amino-glass-600)",glass700:"var(--amino-glass-700)",glass800:"var(--amino-glass-800)",glass900:"var(--amino-glass-900)",glass1000:"var(--amino-glass-1000)",glass1100:"var(--amino-glass-1100)",glass1200:"var(--amino-glass-1200)",gray0:"var(--amino-gray-0)",gray50:"var(--amino-gray-50)",gray100:"var(--amino-gray-100)",gray200:"var(--amino-gray-200)",gray300:"var(--amino-gray-300)",gray400:"var(--amino-gray-400)",gray500:"var(--amino-gray-500)",gray600:"var(--amino-gray-600)",gray700:"var(--amino-gray-700)",gray800:"var(--amino-gray-800)",gray900:"var(--amino-gray-900)",gray1000:"var(--amino-gray-1000)",gray1100:"var(--amino-gray-1100)",gray1200:"var(--amino-gray-1200)",blue100:"var(--amino-blue-100)",blue200:"var(--amino-blue-200)",blue300:"var(--amino-blue-300)",blue400:"var(--amino-blue-400)",blue500:"var(--amino-blue-500)",blue600:"var(--amino-blue-600)",blue700:"var(--amino-blue-700)",blue800:"var(--amino-blue-800)",blue900:"var(--amino-blue-900)",blue1000:"var(--amino-blue-1000)",cyan100:"var(--amino-cyan-100)",cyan200:"var(--amino-cyan-200)",cyan300:"var(--amino-cyan-300)",cyan400:"var(--amino-cyan-400)",cyan500:"var(--amino-cyan-500)",cyan600:"var(--amino-cyan-600)",cyan700:"var(--amino-cyan-700)",cyan800:"var(--amino-cyan-800)",cyan900:"var(--amino-cyan-900)",cyan1000:"var(--amino-cyan-1000)",red100:"var(--amino-red-100)",red200:"var(--amino-red-200)",red300:"var(--amino-red-300)",red400:"var(--amino-red-400)",red500:"var(--amino-red-500)",red600:"var(--amino-red-600)",red700:"var(--amino-red-700)",red800:"var(--amino-red-800)",red900:"var(--amino-red-900)",red1000:"var(--amino-red-1000)",orange100:"var(--amino-orange-100)",orange200:"var(--amino-orange-200)",orange300:"var(--amino-orange-300)",orange400:"var(--amino-orange-400)",orange500:"var(--amino-orange-500)",orange600:"var(--amino-orange-600)",orange700:"var(--amino-orange-700)",orange800:"var(--amino-orange-800)",orange900:"var(--amino-orange-900)",orange1000:"var(--amino-orange-1000)",green100:"var(--amino-green-100)",green200:"var(--amino-green-200)",green300:"var(--amino-green-300)",green400:"var(--amino-green-400)",green500:"var(--amino-green-500)",green600:"var(--amino-green-600)",green700:"var(--amino-green-700)",green800:"var(--amino-green-800)",green900:"var(--amino-green-900)",green1000:"var(--amino-green-1000)",purple100:"var(--amino-purple-100)",purple200:"var(--amino-purple-200)",purple300:"var(--amino-purple-300)",purple400:"var(--amino-purple-400)",purple500:"var(--amino-purple-500)",purple600:"var(--amino-purple-600)",purple700:"var(--amino-purple-700)",purple800:"var(--amino-purple-800)",purple900:"var(--amino-purple-900)",purple1000:"var(--amino-purple-1000)",transparentWhite:"var(--amino-transparent-white)",transparentBlack:"var(--amino-transparent-black)",transparentGray600:"var(--amino-transparent-gray-600)",v3ShadowBase:"var(--amino-v3-shadow-base)",v3ShadowMedium:"var(--amino-v3-shadow-medium)",v3ShadowLarge:"var(--amino-v3-shadow-large)",v3ShadowXl:"var(--amino-v3-shadow-xl)",v3ShadowXxl:"var(--amino-v3-shadow-xxl)",v3ShadowInset:"var(--amino-v3-shadow-inset)",shadowButtonPrimary:"var(--amino-shadow-button-primary)",shadowButtonSuccess:"var(--amino-shadow-button-success)",shadowButtonDanger:"var(--amino-shadow-button-danger)",shadowButtonWarning:"var(--amino-shadow-button-warning)",buttonFocusRing:"var(--amino-button-focus-ring)",shadowButtonStandard:"var(--amino-shadow-button-standard)",shadowButtonDisabled:"var(--amino-shadow-button-disabled)",spaceNegative80:"var(--amino-space-negative-80)",spaceNegative76:"var(--amino-space-negative-76)",spaceNegative72:"var(--amino-space-negative-72)",spaceNegative68:"var(--amino-space-negative-68)",spaceNegative64:"var(--amino-space-negative-64)",spaceNegative60:"var(--amino-space-negative-60)",spaceNegative56:"var(--amino-space-negative-56)",spaceNegative52:"var(--amino-space-negative-52)",spaceNegative48:"var(--amino-space-negative-48)",spaceNegative44:"var(--amino-space-negative-44)",spaceNegative40:"var(--amino-space-negative-40)",spaceNegative36:"var(--amino-space-negative-36)",spaceNegative32:"var(--amino-space-negative-32)",spaceNegative28:"var(--amino-space-negative-28)",spaceNegative24:"var(--amino-space-negative-24)",spaceNegative20:"var(--amino-space-negative-20)",spaceNegative16:"var(--amino-space-negative-16)",spaceNegative12:"var(--amino-space-negative-12)",spaceNegative8:"var(--amino-space-negative-8)",spaceNegative4:"var(--amino-space-negative-4)",space0:"var(--amino-space-0)",space4:"var(--amino-space-4)",space8:"var(--amino-space-8)",space12:"var(--amino-space-12)",space16:"var(--amino-space-16)",space20:"var(--amino-space-20)",space24:"var(--amino-space-24)",space28:"var(--amino-space-28)",space32:"var(--amino-space-32)",space36:"var(--amino-space-36)",space40:"var(--amino-space-40)",space44:"var(--amino-space-44)",space48:"var(--amino-space-48)",space52:"var(--amino-space-52)",space56:"var(--amino-space-56)",space60:"var(--amino-space-60)",space64:"var(--amino-space-64)",space68:"var(--amino-space-68)",space72:"var(--amino-space-72)",space76:"var(--amino-space-76)",space80:"var(--amino-space-80)",border:"var(--amino-border)",borderBlue:"var(--amino-border-blue)",borderRed:"var(--amino-border-red)",borderCyan:"var(--amino-border-cyan)",borderOrange:"var(--amino-border-orange)",borderGreen:"var(--amino-border-green)",borderPurple:"var(--amino-border-purple)",borderAmber:"var(--amino-border-amber)",borderTransparent:"var(--amino-border-transparent)",sidebarColor:"var(--amino-sidebar-color)",headerColor:"var(--amino-header-color)",danger:"var(--amino-danger)",dangerDark:"var(--amino-danger-dark)",error:"var(--amino-error)",primary:"var(--amino-primary)",primaryLight:"var(--amino-primary-light)",primaryDark:"var(--amino-primary-dark)",success:"var(--amino-success)",successDark:"var(--amino-success-dark)",warning:"var(--amino-warning)",warningDark:"var(--amino-warning-dark)",glowError:"var(--amino-glow-error)",glowBlue:"var(--amino-glow-blue)",glowCyan:"var(--amino-glow-cyan)",glowRed:"var(--amino-glow-red)",glowOrange:"var(--amino-glow-orange)",glowGreen:"var(--amino-glow-green)",glowPurple:"var(--amino-glow-purple)",pageBackground:"var(--amino-page-background)",borderColor:"var(--amino-border-color)",hoverColor:"var(--amino-hover-color)",textColor:"var(--amino-text-color)",textColorSecondary:"var(--amino-text-color-secondary)",focusButtonStandard:"var(--amino-focus-button-standard)",focusButton:"var(--amino-focus-button)",surfaceColor:"var(--amino-surface-color)",surfaceColorSecondary:"var(--amino-surface-color-secondary)",backdropColor:"var(--amino-backdrop-color)",buttonPrimaryHover:"var(--amino-button-primary-hover)",buttonSuccessHover:"var(--amino-button-success-hover)",buttonDangerHover:"var(--amino-button-danger-hover)",buttonWarningHover:"var(--amino-button-warning-hover)",buttonStandardHover:"var(--amino-button-standard-hover)",spinnerTrackBlack:"var(--amino-spinner-track-black)",spinnerStrokeBlack:"var(--amino-spinner-stroke-black)",spinnerTrackWhite:"var(--amino-spinner-track-white)",spinnerStrokeWhite:"var(--amino-spinner-stroke-white)",appbarHeight:"var(--amino-appbar-height)",sidebarWidth:"var(--amino-sidebar-width)",elevation0:"var(--amino-elevation-0)",elevation100:"var(--amino-elevation-100)",elevation200:"var(--amino-elevation-200)",elevation300:"var(--amino-elevation-300)",elevation400:"var(--amino-elevation-400)",elevation500:"var(--amino-elevation-500)",dialogElevation:"var(--amino-dialog-elevation)",toastElevation:"var(--amino-toast-elevation)",appbarElevation:"var(--amino-appbar-elevation)",sizeXl:"var(--amino-size-xl)",sizeLg:"var(--amino-size-lg)",sizeMd:"var(--amino-size-md)",sizeSm:"var(--amino-size-sm)",radius4:"var(--amino-radius-4)",radius6:"var(--amino-radius-6)",radius8:"var(--amino-radius-8)",radius10:"var(--amino-radius-10)",radius12:"var(--amino-radius-12)",fontSize3xl:"var(--amino-font-size-3xl)",fontSize2xl:"var(--amino-font-size-2xl)",fontSizeXl:"var(--amino-font-size-xl)",fontSizeL:"var(--amino-font-size-l)",fontSizeBaseDocs:"var(--amino-font-size-base-docs)",fontSizeBase:"var(--amino-font-size-base)",fontSizeS:"var(--amino-font-size-s)",fontSizeXs:"var(--amino-font-size-xs)",lineHeight3xl:"var(--amino-line-height-3xl)",lineHeight2xl:"var(--amino-line-height-2xl)",lineHeightXl:"var(--amino-line-height-xl)",lineHeightL:"var(--amino-line-height-l)",lineHeightBase:"var(--amino-line-height-base)",lineHeightS:"var(--amino-line-height-s)",lineHeightXs:"var(--amino-line-height-xs)",fontSans:"var(--amino-font-sans)",fontMono:"var(--amino-font-mono)",fontHarmonizedCodes:"var(--amino-font-harmonized-codes)",inputBackground:"var(--amino-input-background)"};
|
package/theme.css
CHANGED
|
@@ -120,6 +120,8 @@
|
|
|
120
120
|
--amino-shadow-button-standard: 0px 1px 3px 0px rgba(110, 110, 120, 0.12),
|
|
121
121
|
0px -1px 1px 1px rgba(0, 0, 0, 0.08) inset,
|
|
122
122
|
0px 0px 0px 1px rgba(106, 109, 119, 0.12) inset;
|
|
123
|
+
--amino-shadow-button-disabled: 0px 1px 3px 0px rgba(16, 17, 22, 0.2),
|
|
124
|
+
0px -1px 1px 1px rgba(0, 0, 0, 0.08) inset;
|
|
123
125
|
--amino-space-negative-80: -5rem;
|
|
124
126
|
--amino-space-negative-76: -4.75rem;
|
|
125
127
|
--amino-space-negative-72: -4.5rem;
|
|
@@ -404,6 +406,10 @@
|
|
|
404
406
|
0px 0px 2px 1px rgba(255, 255, 255, 0.08) inset,
|
|
405
407
|
0px 1px 3px 0px rgba(0, 0, 0, 0.8),
|
|
406
408
|
0px 0px 0px 1px rgba(148, 150, 158, 0.12) inset;
|
|
409
|
+
--amino-shadow-button-disabled: 0px 0px 0px 1px #000,
|
|
410
|
+
0px -1px 1px 0px rgba(0, 0, 0, 0.2) inset,
|
|
411
|
+
0px 0px 0px 1px rgba(255, 255, 255, 0.08) inset,
|
|
412
|
+
0px 1px 3px 0px rgba(255, 255, 255, 0);
|
|
407
413
|
--amino-border: 1px solid var(--amino-border-color);
|
|
408
414
|
--amino-border-blue: 1px solid var(--amino-blue-500);
|
|
409
415
|
--amino-border-red: 1px solid var(--amino-red-400);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
import type { Intent } from "./Intent";
|
|
2
3
|
export type ConfirmDialogOpts = {
|
|
3
4
|
confirmText: string;
|
|
4
5
|
dismissText: string;
|
|
5
6
|
intent: Intent;
|
|
6
7
|
label: string;
|
|
7
|
-
subtitle?:
|
|
8
|
+
subtitle?: ReactNode;
|
|
8
9
|
onConfirm: (ok: boolean) => void;
|
|
9
10
|
};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { type ExtendedRefs, type Placement } from '@floating-ui/react';
|
|
2
|
+
import { type ExtendedRefs, type Placement, type UseFloatingOptions } from '@floating-ui/react';
|
|
3
3
|
type Params = {
|
|
4
|
+
/**
|
|
5
|
+
* Passed to `useFloating`.
|
|
6
|
+
* @link https://floating-ui.com/docs/useFloating
|
|
7
|
+
*/
|
|
8
|
+
floatingOptions?: Partial<UseFloatingOptions>;
|
|
4
9
|
/**
|
|
5
10
|
* @default 0
|
|
6
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),t=require("react"),i=require("@floating-ui/react");exports.useDropdown=function(n){var o=null!=n?n:{},s=o.
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),t=require("react"),i=require("@floating-ui/react");exports.useDropdown=function(n){var o=null!=n?n:{},s=o.floatingOptions,r=void 0===s?{}:s,u=o.offsetCrossAxis,a=void 0===u?0:u,l=o.offsetMainAxis,d=void 0===l?0:l,f=o.placement,c=void 0===f?"bottom-start":f,v=e.__read(t.useState(!1),2),m=v[0],p=v[1],b=m?"visible":"hidden",g=t.useRef(null),w=i.useFloating(e.__assign({middleware:[i.shift(),i.offset({crossAxis:a,mainAxis:d})],placement:c,whileElementsMounted:i.autoUpdate},r)),x=w.floatingStyles,y=w.refs,_=t.useCallback((function(e){var t,i=e.target;m&&0===e.button&&((null===(t=null==g?void 0:g.current)||void 0===t?void 0:t.contains(i))||(e.preventDefault(),e.stopPropagation(),p(!1)))}),[m]);return t.useEffect((function(){return"undefined"!=typeof document&&document.addEventListener("mousedown",_),function(){"undefined"!=typeof document&&document.removeEventListener("mousedown",_)}}),[_]),{floatingStyles:x,refs:y,setVisible:p,visibility:b,visible:m,wrapperRef:g}};
|