@zonos/amino 5.0.10 → 5.1.0
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/alert-dialog/AlertContext.js +1 -1
- package/components/alert-dialog/AlertDialog.js +1 -1
- package/components/alert-dialog/useAlert.js +1 -1
- package/components/banner/Banner.js +1 -1
- package/components/button/Button.d.ts +5 -5
- package/components/button/Button.js +1 -1
- package/components/button/LegacyButton.d.ts +43 -0
- package/components/button/LegacyButton.js +1 -0
- package/components/confirm-dialog/ConfirmContext.js +1 -1
- package/components/confirm-dialog/ConfirmDialog.js +1 -1
- package/components/confirm-dialog/useConfirm.js +1 -1
- package/components/cover-sheet/CoverSheet.js +1 -1
- 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/graph-matrix/GraphMatrix.js +1 -1
- package/components/input/Input.js +1 -1
- package/components/nested-data-table/NestedDataTable.js +1 -1
- package/components/nested-data-table/NestedDataTableHasura.js +1 -1
- package/components/nested-data-table/_TableData.js +1 -1
- package/components/section/HSection.js +1 -1
- package/components/spinner/Spinner.js +1 -1
- package/components/table/TableRowCollapse.js +1 -1
- package/package.json +1 -1
- package/styles/constants/theme.d.ts +33 -3
- package/styles/constants/theme.js +1 -1
- package/theme.css +84 -6
- package/types/Variant.d.ts +1 -0
package/all.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import './components/backdrop/Backdrop';
|
|
|
10
10
|
import './components/badge/Badge';
|
|
11
11
|
import './components/banner/Banner';
|
|
12
12
|
import './components/button/Button';
|
|
13
|
+
import './components/button/LegacyButton';
|
|
13
14
|
import './components/button/MenuButton';
|
|
14
15
|
import './components/button/RippleGroup';
|
|
15
16
|
import './components/button/useRipple';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),r=require("react/jsx-runtime"),i=require("react"),t=require("./AlertDialog.js");require("styled-components"),require("../button/
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),r=require("react/jsx-runtime"),i=require("react"),t=require("./AlertDialog.js");require("styled-components"),require("../button/LegacyButton.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../../styles/constants/theme.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("../dialog/_BaseDialog.js"),require("react-dom"),require("../backdrop/Backdrop.js"),require("../rounded-icon/RoundedIcon.js"),require("../stack/VStack.js"),require("../stack/Stack.js"),require("../text/Text.js"),require("../../icons/ExclamationMarkIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../icons/HelpIcon.js"),require("../../icons/WarningIcon.js"),require("../../Theme-61f4342c.js"),require("zod");var s=i.createContext((function(e){}));exports.AlertContext=s,exports.AlertContextProvider=function(n){var u=n.children,o=e.__read(i.useState(),2),a=o[0],c=o[1],l=e.__read(i.useState(!1),2),q=l[0],j=l[1],d=i.useCallback((function(e){c(e),j(!0)}),[]);return r.jsxs(s.Provider,{value:d,children:[u,a&&r.jsx(t.AlertDialog,{dismissAction:function(){j(!1),a.onDismiss()},dismissText:a.dismissText,intent:a.intent,label:a.label,open:q,subtitle:a.subtitle})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("styled-components"),i=require("../button/
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("styled-components"),i=require("../button/LegacyButton.js"),r=require("../dialog/_BaseDialog.js"),s=require("../rounded-icon/RoundedIcon.js"),a=require("../stack/VStack.js"),c=require("../text/Text.js"),o=require("../../icons/ExclamationMarkIcon.js"),u=require("../../icons/HelpIcon.js"),l=require("../../icons/WarningIcon.js"),d=require("../../styles/constants/theme.js");function j(e){return e&&e.__esModule?e:{default:e}}require("../../Theme-61f4342c.js"),require("react"),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("../backdrop/Backdrop.js"),require("../stack/Stack.js"),require("../../icons/icon-base/_IconBase.js"),require("zod");var p,m,x,q=j(t),g=q.default.div(p||(p=e.__makeTemplateObject(["\n padding: ",";\n\n & > div {\n text-align: center;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n"],["\n padding: ",";\n\n & > div {\n text-align: center;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n"])),d.theme.space24),f=q.default.div(m||(m=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: ",";\n\n & > button + button {\n margin-left: ",";\n }\n\n button {\n flex: 1;\n }\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: ",";\n\n & > button + button {\n margin-left: ",";\n }\n\n button {\n flex: 1;\n }\n"])),d.theme.space24,d.theme.space8),h=q.default.span(x||(x=e.__makeTemplateObject(["\n opacity: 0.5;\n"],["\n opacity: 0.5;\n"]))),b=function(e){switch(e){case"danger":return n.jsx(o.ExclamationMarkIcon,{});case"warning":return n.jsx(l.WarningIcon,{});default:return n.jsx(u.HelpIcon,{})}};exports.AlertDialog=function(e){var t=e.dismissAction,o=e.dismissText,u=e.intent,l=e.label,d=e.open,j=e.subtitle,p=e.themeOverride;return n.jsx(r.BaseDialog,{"data-theme":p,onClose:t,open:d,width:350,children:n.jsx(g,{children:n.jsxs(a.VStack,{spacing:16,children:[n.jsx(s.RoundedIcon,{intent:u,children:b(u)}),n.jsxs("div",{children:[n.jsx(c.Text,{type:"title",children:l}),n.jsx(h,{children:j})]}),n.jsx(f,{children:n.jsx(i.Button,{intent:u,onClick:t,children:o})})]})})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react"),r=require("./AlertContext.js");require("../../_tslib-ccfac372.js"),require("react/jsx-runtime"),require("./AlertDialog.js"),require("styled-components"),require("../button/
|
|
1
|
+
"use strict";var e=require("react"),r=require("./AlertContext.js");require("../../_tslib-ccfac372.js"),require("react/jsx-runtime"),require("./AlertDialog.js"),require("styled-components"),require("../button/LegacyButton.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../../styles/constants/theme.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("../dialog/_BaseDialog.js"),require("react-dom"),require("../backdrop/Backdrop.js"),require("../rounded-icon/RoundedIcon.js"),require("../stack/VStack.js"),require("../stack/Stack.js"),require("../text/Text.js"),require("../../icons/ExclamationMarkIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../icons/HelpIcon.js"),require("../../icons/WarningIcon.js"),require("../../Theme-61f4342c.js"),require("zod");exports.useAlert=function(){return e.useContext(r.AlertContext)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),r=require("styled-components"),o=require("../button/
|
|
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.Button)(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),W=T.default(O)(I||(I=e.__makeTemplateObject(["\n background: ",";\n color: ",";\n"],["\n background: ",";\n color: ",";\n"])),d.theme.blue100,d.theme.blue700),G=T.default(O)(C||(C=e.__makeTemplateObject(["\n background: ",";\n color: ",";\n"],["\n background: ",";\n color: ",";\n"])),d.theme.green100,d.theme.green700),L=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(W,{className:m,children:h({intentIcon:n.jsx(c.CheckCircleDuotoneIcon,{color:"blue800",secondaryColor:"blue300",size:20}),removeIconColor:"blue800"})});case"success":return n.jsx(G,{className:m,children:h({intentIcon:n.jsx(c.CheckCircleDuotoneIcon,{color:"green800",secondaryColor:"green300",size:20}),removeIconColor:"green800"})});case"warning":return n.jsx(L,{className:m,children:h({intentIcon:n.jsx(u.WarningDuotoneIcon,{color:"orange800",secondaryColor:"orange300",size:20}),removeIconColor:"orange800"})});case"error":return n.jsx(M,{className:m,children:h({intentIcon:n.jsx(l.RemoveCircleDuotoneIcon,{color:"red800",secondaryColor:"red300",size:20}),removeIconColor:"red800"})});default:return n.jsx(A,{className:m,children:h({intentIcon:n.jsx(i.InfoDuotoneIcon,{color:"gray800",secondaryColor:"gray300",size:20}),removeIconColor:"gray800"})})}};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef, type MouseEventHandler, type ReactNode } from 'react';
|
|
2
2
|
import { type SpinnerProps } from "../spinner/Spinner";
|
|
3
3
|
import type { Color } from "../../types";
|
|
4
|
-
import type { Intent } from "../../types/Intent";
|
|
5
4
|
import type { Size } from "../../types/Size";
|
|
6
5
|
import type { Theme } from "../../types/Theme";
|
|
7
|
-
type
|
|
6
|
+
import type { Variant } from "../../types/Variant";
|
|
8
7
|
type ButtonBase = {
|
|
9
8
|
background?: Color | 'inherit';
|
|
10
9
|
/** @param borderColor only available for intent 'outline' */
|
|
@@ -16,8 +15,6 @@ type ButtonBase = {
|
|
|
16
15
|
hoverBackground?: Color | 'inherit';
|
|
17
16
|
icon?: ReactNode;
|
|
18
17
|
iconRight?: boolean;
|
|
19
|
-
/** @default 'secondary' */
|
|
20
|
-
intent?: IntentProps;
|
|
21
18
|
/** @default false */
|
|
22
19
|
loading?: boolean;
|
|
23
20
|
loadingText?: string;
|
|
@@ -26,12 +23,15 @@ type ButtonBase = {
|
|
|
26
23
|
* @default false
|
|
27
24
|
*/
|
|
28
25
|
noRipple?: boolean;
|
|
26
|
+
outline?: boolean;
|
|
29
27
|
size?: Size;
|
|
30
28
|
/** Color for the spinner when in a loading state */
|
|
31
29
|
spinnerColor?: SpinnerProps['color'];
|
|
32
30
|
tabIndex?: number;
|
|
33
31
|
themeOverride?: Theme;
|
|
34
32
|
type?: 'button' | 'reset' | 'submit';
|
|
33
|
+
/** @default 'standard' */
|
|
34
|
+
variant?: Variant;
|
|
35
35
|
};
|
|
36
36
|
export type GroupTag = 'div' | 'a' | 'button';
|
|
37
37
|
type MyHtmlElement<T extends GroupTag> = T extends 'a' ? HTMLAnchorElement : T extends 'div' ? HTMLDivElement : HTMLButtonElement;
|
|
@@ -39,5 +39,5 @@ export type ButtonProps<T extends GroupTag = 'button'> = ButtonBase & Omit<Compo
|
|
|
39
39
|
onClick?: MouseEventHandler<MyHtmlElement<T>>;
|
|
40
40
|
tag?: T;
|
|
41
41
|
};
|
|
42
|
-
export declare function Button<T extends GroupTag = 'button'>({ children, className, disabled, icon, iconRight,
|
|
42
|
+
export declare function Button<T extends GroupTag = 'button'>({ children, className, disabled, icon, iconRight, loading, loadingText, noRipple, size, spinnerColor, tag: _tag, themeOverride, type, variant, ...props }: ButtonProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
43
43
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),r=require("react"),o=require("styled-components"),t=require("./RippleGroup.js"),a=require("./useRipple.js"),i=require("../spinner/Spinner.js"),c=require("../../styles/constants/theme.js");function l(n){return n&&n.__esModule?n:{default:n}}require("framer-motion"),require("uuid"),require("./_Ripple.js");var s,d,u,g,h,b,p,m,f,k,v=l(o),y=function(n){return"inherit"===n?"inherit":n?c.theme[n]:void 0},x=function(n){switch(n){case"sm":return 16;case"lg":case"xl":return 24;default:return 20}},_=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.radius4,c.theme.space8),j=v.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 font-weight: 500;\n user-select: none;\n font-family: ",";\n letter-spacing: normal;\n cursor: pointer;\n white-space: nowrap;\n padding: ",";\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 outline: none;\n svg path:not([data-is-secondary-color]) {\n fill: currentColor;\n }\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\n &[disabled] {\n box-shadow: none;\n &:not(.loading) {\n opacity: 0.5;\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 font-weight: 500;\n user-select: none;\n font-family: ",";\n letter-spacing: normal;\n cursor: pointer;\n white-space: nowrap;\n padding: ",";\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 outline: none;\n svg path:not([data-is-secondary-color]) {\n fill: currentColor;\n }\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\n &[disabled] {\n box-shadow: none;\n &:not(.loading) {\n opacity: 0.5;\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"var(--amino-size-".concat(n.size,")")}),c.theme.space8,c.theme.space8),w=v.default(j)(u||(u=n.__makeTemplateObject(["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active,\n &:focus {\n background: ",";\n color: ",";\n }\n }\n\n "," {\n background: ",";\n }\n"],["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active,\n &:focus {\n background: ",";\n color: ",";\n }\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return y(n.background)||c.theme.primary}),(function(n){return y(n.color)||c.theme.gray0}),(function(n){return y(n.hoverBackground)||c.theme.blue400}),c.theme.blue700,c.theme.gray0,_,c.theme.primary),R=v.default(j)(g||(g=n.__makeTemplateObject(["\n color: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n color: ",";\n svg path {\n fill: currentColor;\n }\n }\n }\n\n "," {\n background: ",";\n }\n\n /** Night mode */\n &.night {\n color: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active,\n &:focus {\n background: ",";\n color: ",";\n svg path {\n fill: currentColor;\n }\n }\n }\n\n "," {\n background: ",";\n }\n }\n"],["\n color: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n color: ",";\n svg path {\n fill: currentColor;\n }\n }\n }\n\n "," {\n background: ",";\n }\n\n /** Night mode */\n &.night {\n color: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active,\n &:focus {\n background: ",";\n color: ",";\n svg path {\n fill: currentColor;\n }\n }\n }\n\n "," {\n background: ",";\n }\n }\n"])),(function(n){return y(n.color)||c.theme.textColor}),(function(n){return y(n.background)||c.theme.gray100}),(function(n){return y(n.hoverBackground)||c.theme.gray200}),c.theme.blue100,c.theme.blue600,_,c.theme.gray100,c.theme.gray0,c.theme.gray1000,(function(n){return y(n.hoverBackground)||c.theme.gray900}),c.theme.blue1000,c.theme.blue300,_,c.theme.gray1000),z=v.default(j)(h||(h=n.__makeTemplateObject(["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n "," {\n background: ",";\n }\n"],["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return y(n.background)||c.theme.red600}),(function(n){return y(n.color)||c.theme.gray0}),(function(n){return y(n.hoverBackground)||c.theme.red400}),c.theme.red700,_,c.theme.red600),C=v.default(j)(b||(b=n.__makeTemplateObject(["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n "," {\n background: ",";\n }\n"],["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return y(n.background)||c.theme.orange600}),(function(n){return y(n.color)||c.theme.gray0}),(function(n){return y(n.hoverBackground)||c.theme.orange400}),c.theme.orange700,_,c.theme.orange600),O=v.default(j)(p||(p=n.__makeTemplateObject(["\n color: ",";\n border: 1px solid ",";\n\n &:not([disabled]) {\n &:hover {\n background: linear-gradient(\n 180deg,\n "," 12.5%,\n "," 87.5%\n );\n background: ",";\n border: 1px solid ",";\n }\n &:active {\n background: ",";\n color: ",";\n border: 1px solid ",";\n }\n }\n\n "," {\n background: ",";\n }\n"],["\n color: ",";\n border: 1px solid ",";\n\n &:not([disabled]) {\n &:hover {\n background: linear-gradient(\n 180deg,\n "," 12.5%,\n "," 87.5%\n );\n background: ",";\n border: 1px solid ",";\n }\n &:active {\n background: ",";\n color: ",";\n border: 1px solid ",";\n }\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return y(n.color)||c.theme.textColor}),(function(n){return y(n.borderColor)||c.theme.gray200}),c.theme.gray0,c.theme.gray100,(function(n){return n.hoverBackground&&y(n.hoverBackground)}),c.theme.gray200,c.theme.blue100,c.theme.blue600,c.theme.blue300,_,c.theme.gray0),T=v.default(j)(m||(m=n.__makeTemplateObject(["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n color: ",";\n }\n }\n\n &.loading {\n color: transparent;\n }\n"],["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n color: ",";\n }\n }\n\n &.loading {\n color: transparent;\n }\n"])),(function(n){return y(n.background)||"none"}),(function(n){return y(n.color)||c.theme.gray800}),(function(n){return y(n.hoverBackground)||c.theme.gray100}),c.theme.blue100,c.theme.blue600),q=v.default(j)(f||(f=n.__makeTemplateObject(["\n color: ",";\n height: 20px;\n line-height: 20px;\n\n &[disabled] {\n color: ",";\n &:not(.loading) {\n opacity: inherit;\n }\n }\n\n &:not([disabled]) {\n &:hover {\n color: ",";\n }\n &:active {\n color: ",";\n }\n }\n\n &.loading {\n color: transparent;\n }\n"],["\n color: ",";\n height: 20px;\n line-height: 20px;\n\n &[disabled] {\n color: ",";\n &:not(.loading) {\n opacity: inherit;\n }\n }\n\n &:not([disabled]) {\n &:hover {\n color: ",";\n }\n &:active {\n color: ",";\n }\n }\n\n &.loading {\n color: transparent;\n }\n"])),(function(n){return y(n.color)||c.theme.gray800}),c.theme.gray400,c.theme.gray700,c.theme.gray1200),B=j,G=v.default(j)(k||(k=n.__makeTemplateObject(["\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n color: ",";\n }\n }\n\n "," {\n background: ",";\n }\n"],["\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n color: ",";\n }\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return y(n.color)||c.theme.blue600}),(function(n){return y(n.hoverBackground)||c.theme.gray100}),c.theme.blue100,c.theme.blue800,_,c.theme.gray0);exports.Button=function(o){var c=o.children,l=o.className,s=o.disabled,d=void 0!==s&&s,u=o.icon,g=o.iconRight,h=o.intent,b=void 0===h?"secondary":h,p=o.loading,m=void 0!==p&&p,f=o.loadingText,k=o.noRipple,v=void 0!==k&&k,y=o.size,j=void 0===y?"sm":y,N=o.spinnerColor,S=o.tag,E=o.themeOverride,F=o.type,H=void 0===F?"button":F,M=n.__rest(o,["children","className","disabled","icon","iconRight","intent","loading","loadingText","noRipple","size","spinnerColor","tag","themeOverride","type"]),A=S||"button",D=function(n){return e.jsxs(e.Fragment,{children:[!g&&u,c,g&&u,"plain"!==b&&m&&e.jsxs(_,{children:[e.jsx(i.Spinner,{color:n,size:x(j)}),f]})]})},I=[l||"",u&&!c?"only-icon":"",g?"icon-right":"",u?"has-icon":"",m?"loading":"",E].filter(Boolean).join(" "),J=r.useRef(null),K=a.useRipple({disabled:d||m,rippleEnabled:!v&&!["plain","text"].includes(b),rippleRef:J}),L=K.getRippleHandlers,P=K.rippleEnabled,Q={className:I,disabled:d||m,size:j},U=n.__assign(n.__assign(n.__assign({type:H},Q),M),L(M));switch(b){case"primary":return e.jsxs(w,n.__assign({as:A},U,{children:[D(N||"white"),P&&e.jsx(t.RippleGroup,{ref:J})]}));case"subtle":return e.jsxs(T,n.__assign({as:A},U,{children:[D(N),P&&e.jsx(t.RippleGroup,{ref:J})]}));case"outline":return e.jsxs(O,n.__assign({as:A},U,{children:[D(N),P&&e.jsx(t.RippleGroup,{ref:J})]}));case"warning":return e.jsxs(C,n.__assign({as:A},U,{children:[D(N||"white"),P&&e.jsx(t.RippleGroup,{ref:J})]}));case"danger":return e.jsxs(z,n.__assign({as:A},U,{children:[D(N||"white"),P&&e.jsx(t.RippleGroup,{ref:J})]}));case"text":return e.jsx(q,n.__assign({as:A},U,{children:D(N)}));case"link":return e.jsxs(G,n.__assign({as:A},U,{children:[D(N),P&&e.jsx(t.RippleGroup,{ref:J})]}));case"plain":return e.jsx(B,n.__assign({as:A},U,{children:D(N)}));default:return e.jsxs(R,n.__assign({as:A},U,{children:[D(N),P&&e.jsx(t.RippleGroup,{ref:J})]}))}};
|
|
1
|
+
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),o=require("react"),t=require("styled-components"),r=require("./RippleGroup.js"),i=require("./useRipple.js"),a=require("../spinner/Spinner.js"),u=require("../../styles/constants/theme.js");function c(n){return n&&n.__esModule?n:{default:n}}require("framer-motion"),require("uuid"),require("./_Ripple.js");var l,s,d,g,h,b,m,p,f,k=c(t),v=function(n){return"inherit"===n?"inherit":n?u.theme[n]:void 0},x=function(n){switch(n){case"sm":return 16;case"lg":case"xl":return 24;default:return 20}},y=k.default.span(l||(l=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"])),u.theme.radius6,u.theme.space8),_=k.default.button(s||(s=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 outline: 1px solid transparent;\n transition: ",";\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\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 box-shadow: ",";\n outline: 1px solid ",";\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\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 outline: 1px solid transparent;\n transition: ",";\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\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 box-shadow: ",";\n outline: 1px solid ",";\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\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,")")}),u.theme.space16,u.theme.radius6,u.theme.transition,u.theme.fontSans,(function(n){return function(n){switch(n){case"sm":return"".concat(u.theme.space4," ").concat(u.theme.space8);case"lg":case"xl":return"".concat(u.theme.space12," ").concat(u.theme.space24);default:return"".concat(u.theme.space8," ").concat(u.theme.space16)}}(n.size)}),(function(n){return"var(--amino-size-".concat(n.size,")")}),u.theme.buttonFocusRing,(function(n){return n.outline?"":u.theme.gray0}),u.theme.space8,u.theme.space8,(function(n){return n.outline?.6:1})),w=k.default(_)(d||(d=n.__makeTemplateObject(["\n color: ",";\n box-shadow: ",";\n background: ",";\n outline-color: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n &[disabled] {\n background: ",";\n outline-color: ",";\n }\n\n "," {\n background: ",";\n }\n"],["\n color: ",";\n box-shadow: ",";\n background: ",";\n outline-color: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n &[disabled] {\n background: ",";\n outline-color: ",";\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return v(n.color)||n.outline?u.theme.primary:u.theme.gray0}),(function(n){return n.outline?"none":u.theme.shadowButtonPrimary}),(function(n){return v(n.background)||n.outline?u.theme.gray0:u.theme.primary}),(function(n){return v(n.background)||n.outline?u.theme.primary:"transparent"}),(function(n){return v(n.hoverBackground)||n.outline?u.theme.blue100:""}),(function(n){return n.outline?"":u.theme.buttonPrimaryHover}),(function(n){return n.outline?u.theme.blue200:u.theme.blue700}),(function(n){return n.outline?u.theme.gray0:u.theme.blue400}),u.theme.blue400,y,(function(n){return n.outline?u.theme.gray0:u.theme.primary})),j=k.default(_)(g||(g=n.__makeTemplateObject(["\n color: ",";\n box-shadow: ",";\n outline-color: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n &:active {\n background: ",";\n }\n }\n }\n &[disabled] {\n background: ",";\n outline-color: ",";\n }\n\n "," {\n background: ",";\n }\n"],["\n color: ",";\n box-shadow: ",";\n outline-color: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n &:active {\n background: ",";\n }\n }\n }\n &[disabled] {\n background: ",";\n outline-color: ",";\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return v(n.color)||n.outline?u.theme.success:u.theme.gray0}),(function(n){return n.outline?"none":u.theme.shadowButtonSuccess}),(function(n){return v(n.background)||n.outline?u.theme.success:"transparent"}),(function(n){return v(n.background)||n.outline?u.theme.gray0:u.theme.success}),(function(n){return v(n.hoverBackground)||n.outline?u.theme.green100:""}),(function(n){return n.outline?"":u.theme.buttonSuccessHover}),(function(n){return n.outline?u.theme.green200:u.theme.green700}),(function(n){return n.outline?u.theme.gray0:u.theme.green400}),u.theme.green400,y,(function(n){return n.outline?u.theme.gray0:u.theme.success})),R=k.default(_)(h||(h=n.__makeTemplateObject(["\n color: ",";\n background: ",";\n outline: 1px solid\n ",";\n box-shadow: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n &:focus {\n outline-color: ",";\n }\n\n &[disabled] {\n .content {\n opacity: 0.6;\n }\n }\n\n "," {\n background: ",";\n }\n"],["\n color: ",";\n background: ",";\n outline: 1px solid\n ",";\n box-shadow: ",";\n\n &:not([disabled]) {\n &:hover {\n background-color: ",";\n background-image: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n &:focus {\n outline-color: ",";\n }\n\n &[disabled] {\n .content {\n opacity: 0.6;\n }\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return v(n.color)||u.theme.textColor}),(function(n){return v(n.background)||u.theme.surfaceColor}),(function(n){return n.outline?u.theme.gray300:"rgba(106, 109, 119, 0.12)"}),(function(n){return n.outline?"none":u.theme.shadowButtonStandard}),(function(n){return v(n.hoverBackground)||n.outline?u.theme.gray100:""}),(function(n){return n.outline?"":u.theme.buttonStandardHover}),(function(n){return n.outline?u.theme.gray200:u.theme.gray100}),(function(n){return n.outline?u.theme.gray300:u.theme.gray100}),y,u.theme.surfaceColor),z=k.default(_)(b||(b=n.__makeTemplateObject(["\n outline-color: ",";\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 }\n &[disabled] {\n background: ",";\n outline-color: ",";\n }\n\n "," {\n background: ",";\n }\n"],["\n outline-color: ",";\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 }\n &[disabled] {\n background: ",";\n outline-color: ",";\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return v(n.background)||n.outline?u.theme.danger:"transparent"}),(function(n){return v(n.background)||n.outline?u.theme.gray0:u.theme.danger}),(function(n){return v(n.color)||n.outline?u.theme.danger:u.theme.gray0}),(function(n){return n.outline?"none":u.theme.shadowButtonDanger}),(function(n){return v(n.hoverBackground)||n.outline?u.theme.red100:""}),(function(n){return n.outline?"":u.theme.buttonDangerHover}),(function(n){return n.outline?u.theme.red200:u.theme.red700}),(function(n){return n.outline?u.theme.gray0:u.theme.red400}),u.theme.red400,y,(function(n){return n.outline?u.theme.gray0:u.theme.red600})),B=k.default(_)(m||(m=n.__makeTemplateObject(["\n outline-color: ",";\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 }\n\n &[disabled] {\n background: ",";\n border-color: ",";\n }\n\n "," {\n background: ",";\n }\n"],["\n outline-color: ",";\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 }\n\n &[disabled] {\n background: ",";\n border-color: ",";\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return v(n.background)||n.outline?u.theme.warning:"transparent"}),(function(n){return v(n.background)||n.outline?u.theme.gray0:u.theme.warning}),(function(n){return v(n.color)||n.outline?u.theme.warning:u.theme.gray0}),(function(n){return n.outline?"none":u.theme.shadowButtonWarning}),(function(n){return v(n.hoverBackground)||n.outline?u.theme.orange100:""}),(function(n){return n.outline?"":u.theme.buttonWarningHover}),(function(n){return n.outline?u.theme.orange200:u.theme.orange700}),(function(n){return n.outline?u.theme.gray0:u.theme.orange400}),u.theme.orange400,y,(function(n){return n.outline?u.theme.gray0:u.theme.orange600})),q=k.default(_)(p||(p=n.__makeTemplateObject(["\n background: ",";\n color: ",";\n outline-color: transparent;\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n &.loading {\n color: transparent;\n }\n\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px ",";\n }\n\n &[disabled] {\n .content {\n opacity: 0.6;\n }\n }\n"],["\n background: ",";\n color: ",";\n outline-color: transparent;\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n &.loading {\n color: transparent;\n }\n\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px ",";\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)||u.theme.textColorSecondary}),(function(n){return v(n.hoverBackground)||u.theme.gray100}),u.theme.gray200,u.theme.blue600),O=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 outline: none;\n box-shadow: 0 0 0 2px ",";\n }\n\n &.loading {\n color: transparent;\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 outline: none;\n box-shadow: 0 0 0 2px ",";\n }\n\n &.loading {\n color: transparent;\n }\n\n &[disabled] {\n .content {\n opacity: 0.6;\n }\n }\n"])),(function(n){return v(n.color)||u.theme.primary}),(function(n){return v(n.hoverBackground)||u.theme.blue100}),u.theme.blue200,u.theme.blue600),T=_;exports.Button=function(t){var u=t.children,c=t.className,l=t.disabled,s=void 0!==l&&l,d=t.icon,g=t.iconRight,h=t.loading,b=void 0!==h&&h,m=t.loadingText,p=t.noRipple,f=void 0!==p&&p,k=t.size,v=void 0===k?"sm":k,_=t.spinnerColor,C=t.tag,G=t.themeOverride,I=t.type,S=void 0===I?"button":I,H=t.variant,N=void 0===H?"standard":H,D=n.__rest(t,["children","className","disabled","icon","iconRight","loading","loadingText","noRipple","size","spinnerColor","tag","themeOverride","type","variant"]),E=C||"button",F=function(n){return e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"content",children:!g&&d}),e.jsx("div",{className:"content",children:u}),e.jsx("span",{className:"content",children:g&&d}),"plain"!==N&&b&&e.jsxs(y,{children:[e.jsx(a.Spinner,{color:n,size:x(v)}),m]})]})},P=[c||"",d&&!u?"only-icon":"",g?"icon-right":"",d?"has-icon":"",b?"loading":"",G].filter(Boolean).join(" "),W=o.useRef(null),M=i.useRipple({disabled:s||b,rippleEnabled:!f&&!["plain","text"].includes(N),rippleRef:W}),A=M.getRippleHandlers,J=M.rippleEnabled,K={className:P,disabled:s||b,size:v},L=n.__assign(n.__assign(n.__assign({type:S},K),D),A(D));switch(N){case"primary":return e.jsxs(w,n.__assign({as:E,tabIndex:"div"===E?0:void 0},L,{children:[F(_||L.outline?"info":"white"),J&&e.jsx(r.RippleGroup,{ref:W})]}));case"success":return e.jsxs(j,n.__assign({as:E,tabIndex:"div"===E?0:void 0},L,{children:[F(_||L.outline?"success":"white"),J&&e.jsx(r.RippleGroup,{ref:W})]}));case"warning":return e.jsxs(B,n.__assign({as:E,tabIndex:"div"===E?0:void 0},L,{children:[F(_||L.outline?"warning":"white"),J&&e.jsx(r.RippleGroup,{ref:W})]}));case"danger":return e.jsxs(z,n.__assign({as:E,tabIndex:"div"===E?0:void 0},L,{children:[F(_||L.outline?"danger":"white"),J&&e.jsx(r.RippleGroup,{ref:W})]}));case"subtle":return e.jsxs(q,n.__assign({as:E,tabIndex:"div"===E?0:void 0},L,{children:[F(_||"black"),J&&e.jsx(r.RippleGroup,{ref:W})]}));case"link":return e.jsxs(O,n.__assign({as:E,tabIndex:"div"===E?0:void 0},L,{children:[F(_||"info"),J&&e.jsx(r.RippleGroup,{ref:W})]}));case"plain":return e.jsx(T,n.__assign({as:E,tabIndex:"div"===E?0:void 0},L,{children:F(_)}));default:return e.jsxs(R,n.__assign({as:E,tabIndex:"div"===E?0:void 0},L,{children:[F(_||"black"),J&&e.jsx(r.RippleGroup,{ref:W})]}))}};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type MouseEventHandler, type ReactNode } from 'react';
|
|
2
|
+
import { type SpinnerProps } from "../spinner/Spinner";
|
|
3
|
+
import type { Color } from "../../types";
|
|
4
|
+
import type { Intent } from "../../types/Intent";
|
|
5
|
+
import type { Size } from "../../types/Size";
|
|
6
|
+
import type { Theme } from "../../types/Theme";
|
|
7
|
+
type IntentProps = 'outline' | 'subtle' | 'text' | 'link' | 'plain' | Intent;
|
|
8
|
+
type ButtonBase = {
|
|
9
|
+
background?: Color | 'inherit';
|
|
10
|
+
/** @param borderColor only available for intent 'outline' */
|
|
11
|
+
borderColor?: Color | 'inherit';
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
color?: Color | 'inherit';
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
hoverBackground?: Color | 'inherit';
|
|
17
|
+
icon?: ReactNode;
|
|
18
|
+
iconRight?: boolean;
|
|
19
|
+
/** @default 'secondary' */
|
|
20
|
+
intent?: IntentProps;
|
|
21
|
+
/** @default false */
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
loadingText?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Disable ripple effect
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
noRipple?: boolean;
|
|
29
|
+
size?: Size;
|
|
30
|
+
/** Color for the spinner when in a loading state */
|
|
31
|
+
spinnerColor?: SpinnerProps['color'];
|
|
32
|
+
tabIndex?: number;
|
|
33
|
+
themeOverride?: Theme;
|
|
34
|
+
type?: 'button' | 'reset' | 'submit';
|
|
35
|
+
};
|
|
36
|
+
export type GroupTag = 'div' | 'a' | 'button';
|
|
37
|
+
type MyHtmlElement<T extends GroupTag> = T extends 'a' ? HTMLAnchorElement : T extends 'div' ? HTMLDivElement : HTMLButtonElement;
|
|
38
|
+
export type ButtonProps<T extends GroupTag = 'button'> = ButtonBase & Omit<ComponentPropsWithoutRef<T>, keyof ButtonBase | 'onClick'> & {
|
|
39
|
+
onClick?: MouseEventHandler<MyHtmlElement<T>>;
|
|
40
|
+
tag?: T;
|
|
41
|
+
};
|
|
42
|
+
export declare function Button<T extends GroupTag = 'button'>({ children, className, disabled, icon, iconRight, intent, loading, loadingText, noRipple, size, spinnerColor, tag: _tag, themeOverride, type, ...props }: ButtonProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),r=require("react"),o=require("styled-components"),t=require("./RippleGroup.js"),a=require("./useRipple.js"),i=require("../spinner/Spinner.js"),c=require("../../styles/constants/theme.js");function l(n){return n&&n.__esModule?n:{default:n}}require("framer-motion"),require("uuid"),require("./_Ripple.js");var d,s,u,g,h,b,p,m,f,k,v=l(o),y=function(n){return"inherit"===n?"inherit":n?c.theme[n]:void 0},x=v.default.span(d||(d=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.radius4,c.theme.space8),_=v.default.button(s||(s=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 font-weight: 500;\n user-select: none;\n font-family: ",";\n letter-spacing: normal;\n cursor: pointer;\n white-space: nowrap;\n padding: ",";\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 outline: none;\n svg path:not([data-is-secondary-color]) {\n fill: currentColor;\n }\n }\n\n &:active {\n transform: scale(0.99);\n }\n\n &:not(.only-icon).has-icon {\n &.icon-right {\n svg {\n margin-left: ",";\n margin-right: 0;\n }\n }\n svg {\n margin-right: ",";\n margin-left: 0;\n }\n }\n\n &[disabled] {\n box-shadow: none;\n &:not(.loading) {\n opacity: 0.5;\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 font-weight: 500;\n user-select: none;\n font-family: ",";\n letter-spacing: normal;\n cursor: pointer;\n white-space: nowrap;\n padding: ",";\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 outline: none;\n svg path:not([data-is-secondary-color]) {\n fill: currentColor;\n }\n }\n\n &:active {\n transform: scale(0.99);\n }\n\n &:not(.only-icon).has-icon {\n &.icon-right {\n svg {\n margin-left: ",";\n margin-right: 0;\n }\n }\n svg {\n margin-right: ",";\n margin-left: 0;\n }\n }\n\n &[disabled] {\n box-shadow: none;\n &:not(.loading) {\n opacity: 0.5;\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"var(--amino-size-".concat(n.size,")")}),c.theme.space8,c.theme.space8),j=v.default(_)(u||(u=n.__makeTemplateObject(["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active,\n &:focus {\n background: ",";\n color: ",";\n }\n }\n\n "," {\n background: ",";\n }\n"],["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active,\n &:focus {\n background: ",";\n color: ",";\n }\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return y(n.background)||c.theme.primary}),(function(n){return y(n.color)||c.theme.gray0}),(function(n){return y(n.hoverBackground)||c.theme.blue400}),c.theme.blue700,c.theme.gray0,x,c.theme.primary),w=v.default(_)(g||(g=n.__makeTemplateObject(["\n color: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n color: ",";\n svg path {\n fill: currentColor;\n }\n }\n }\n\n "," {\n background: ",";\n }\n\n /** Night mode */\n &.night {\n color: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active,\n &:focus {\n background: ",";\n color: ",";\n svg path {\n fill: currentColor;\n }\n }\n }\n\n "," {\n background: ",";\n }\n }\n"],["\n color: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n color: ",";\n svg path {\n fill: currentColor;\n }\n }\n }\n\n "," {\n background: ",";\n }\n\n /** Night mode */\n &.night {\n color: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active,\n &:focus {\n background: ",";\n color: ",";\n svg path {\n fill: currentColor;\n }\n }\n }\n\n "," {\n background: ",";\n }\n }\n"])),(function(n){return y(n.color)||c.theme.textColor}),(function(n){return y(n.background)||c.theme.gray100}),(function(n){return y(n.hoverBackground)||c.theme.gray200}),c.theme.blue100,c.theme.blue600,x,c.theme.gray100,c.theme.gray0,c.theme.gray1000,(function(n){return y(n.hoverBackground)||c.theme.gray900}),c.theme.blue1000,c.theme.blue300,x,c.theme.gray1000),R=v.default(_)(h||(h=n.__makeTemplateObject(["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n "," {\n background: ",";\n }\n"],["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return y(n.background)||c.theme.red600}),(function(n){return y(n.color)||c.theme.gray0}),(function(n){return y(n.hoverBackground)||c.theme.red400}),c.theme.red700,x,c.theme.red600),z=v.default(_)(b||(b=n.__makeTemplateObject(["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n "," {\n background: ",";\n }\n"],["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return y(n.background)||c.theme.orange600}),(function(n){return y(n.color)||c.theme.gray0}),(function(n){return y(n.hoverBackground)||c.theme.orange400}),c.theme.orange700,x,c.theme.orange600),C=v.default(_)(p||(p=n.__makeTemplateObject(["\n color: ",";\n border: 1px solid ",";\n\n &:not([disabled]) {\n &:hover {\n background: linear-gradient(\n 180deg,\n "," 12.5%,\n "," 87.5%\n );\n background: ",";\n border: 1px solid ",";\n }\n &:active {\n background: ",";\n color: ",";\n border: 1px solid ",";\n }\n }\n\n "," {\n background: ",";\n }\n"],["\n color: ",";\n border: 1px solid ",";\n\n &:not([disabled]) {\n &:hover {\n background: linear-gradient(\n 180deg,\n "," 12.5%,\n "," 87.5%\n );\n background: ",";\n border: 1px solid ",";\n }\n &:active {\n background: ",";\n color: ",";\n border: 1px solid ",";\n }\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return y(n.color)||c.theme.textColor}),(function(n){return y(n.borderColor)||c.theme.gray200}),c.theme.gray0,c.theme.gray100,(function(n){return n.hoverBackground&&y(n.hoverBackground)}),c.theme.gray200,c.theme.blue100,c.theme.blue600,c.theme.blue300,x,c.theme.gray0),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 color: ",";\n }\n }\n\n &.loading {\n color: transparent;\n }\n"],["\n background: ",";\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n color: ",";\n }\n }\n\n &.loading {\n color: transparent;\n }\n"])),(function(n){return y(n.background)||"none"}),(function(n){return y(n.color)||c.theme.gray800}),(function(n){return y(n.hoverBackground)||c.theme.gray100}),c.theme.blue100,c.theme.blue600),T=v.default(_)(f||(f=n.__makeTemplateObject(["\n color: ",";\n height: 20px;\n line-height: 20px;\n\n &[disabled] {\n color: ",";\n &:not(.loading) {\n opacity: inherit;\n }\n }\n\n &:not([disabled]) {\n &:hover {\n color: ",";\n }\n &:active {\n color: ",";\n }\n }\n\n &.loading {\n color: transparent;\n }\n"],["\n color: ",";\n height: 20px;\n line-height: 20px;\n\n &[disabled] {\n color: ",";\n &:not(.loading) {\n opacity: inherit;\n }\n }\n\n &:not([disabled]) {\n &:hover {\n color: ",";\n }\n &:active {\n color: ",";\n }\n }\n\n &.loading {\n color: transparent;\n }\n"])),(function(n){return y(n.color)||c.theme.gray800}),c.theme.gray400,c.theme.gray700,c.theme.gray1200),q=_,B=v.default(_)(k||(k=n.__makeTemplateObject(["\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n color: ",";\n }\n }\n\n "," {\n background: ",";\n }\n"],["\n color: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n color: ",";\n }\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return y(n.color)||c.theme.blue600}),(function(n){return y(n.hoverBackground)||c.theme.gray100}),c.theme.blue100,c.theme.blue800,x,c.theme.gray0);exports.Button=function(o){var c=o.children,l=o.className,d=o.disabled,s=void 0!==d&&d,u=o.icon,g=o.iconRight,h=o.intent,b=void 0===h?"secondary":h,p=o.loading,m=void 0!==p&&p,f=o.loadingText,k=o.noRipple,v=void 0!==k&&k,y=o.size,_=void 0===y?"sm":y,G=o.spinnerColor,N=o.tag,S=o.themeOverride,E=o.type,F=void 0===E?"button":E,H=n.__rest(o,["children","className","disabled","icon","iconRight","intent","loading","loadingText","noRipple","size","spinnerColor","tag","themeOverride","type"]),M=N||"button",A=function(n){return e.jsxs(e.Fragment,{children:[!g&&u,c,g&&u,"plain"!==b&&m&&e.jsxs(x,{children:[e.jsx(i.Spinner,{color:n,size:16}),f]})]})},D=[l||"",u&&!c?"only-icon":"",g?"icon-right":"",u?"has-icon":"",m?"loading":"",S].filter(Boolean).join(" "),I=r.useRef(null),J=a.useRipple({disabled:s||m,rippleEnabled:!v&&!["plain","text"].includes(b),rippleRef:I}),K=J.getRippleHandlers,L=J.rippleEnabled,P={className:D,disabled:s||m,size:_},Q=n.__assign(n.__assign(n.__assign({type:F},P),H),K(H));switch(b){case"primary":return e.jsxs(j,n.__assign({as:M},Q,{children:[A(G||"white"),L&&e.jsx(t.RippleGroup,{ref:I})]}));case"subtle":return e.jsxs(O,n.__assign({as:M},Q,{children:[A(G),L&&e.jsx(t.RippleGroup,{ref:I})]}));case"outline":return e.jsxs(C,n.__assign({as:M},Q,{children:[A(G),L&&e.jsx(t.RippleGroup,{ref:I})]}));case"warning":return e.jsxs(z,n.__assign({as:M},Q,{children:[A(G||"white"),L&&e.jsx(t.RippleGroup,{ref:I})]}));case"danger":return e.jsxs(R,n.__assign({as:M},Q,{children:[A(G||"white"),L&&e.jsx(t.RippleGroup,{ref:I})]}));case"text":return e.jsx(T,n.__assign({as:M},Q,{children:A(G)}));case"link":return e.jsxs(B,n.__assign({as:M},Q,{children:[A(G),L&&e.jsx(t.RippleGroup,{ref:I})]}));case"plain":return e.jsx(q,n.__assign({as:M},Q,{children:A(G)}));default:return e.jsxs(w,n.__assign({as:M},Q,{children:[A(G),L&&e.jsx(t.RippleGroup,{ref:I})]}))}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),r=require("react/jsx-runtime"),i=require("react"),n=require("./ConfirmDialog.js");require("styled-components"),require("../button/
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),r=require("react/jsx-runtime"),i=require("react"),n=require("./ConfirmDialog.js");require("styled-components"),require("../button/LegacyButton.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../../styles/constants/theme.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("../dialog/_BaseDialog.js"),require("react-dom"),require("../backdrop/Backdrop.js"),require("../rounded-icon/RoundedIcon.js"),require("../stack/VStack.js"),require("../stack/Stack.js"),require("../text/Text.js"),require("../../icons/ExclamationMarkDuotoneIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../icons/HelpDuotoneIcon.js"),require("../../icons/WarningDuotoneIcon.js");var t=i.createContext((function(e){}));exports.ConfirmContext=t,exports.ConfirmContextProvider=function(o){var s=o.children,u=e.__read(i.useState(),2),c=u[0],a=u[1],q=e.__read(i.useState(!1),2),l=q[0],j=q[1],d=i.useCallback((function(e){a(e),j(!0)}),[]);return r.jsxs(t.Provider,{value:d,children:[s,c&&r.jsx(n.ConfirmDialog,{confirmAction:function(){j(!1),c.onConfirm(!0)},confirmText:c.confirmText,dismissAction:function(){j(!1),c.onConfirm(!1)},dismissText:c.dismissText,intent:c.intent,label:c.label,open:l,subtitle:c.subtitle})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("styled-components"),r=require("../button/
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("styled-components"),r=require("../button/LegacyButton.js"),i=require("../dialog/_BaseDialog.js"),o=require("../rounded-icon/RoundedIcon.js"),s=require("../stack/VStack.js"),c=require("../text/Text.js"),a=require("../../icons/ExclamationMarkDuotoneIcon.js"),u=require("../../icons/HelpDuotoneIcon.js"),l=require("../../icons/WarningDuotoneIcon.js"),d=require("../../styles/constants/theme.js");function j(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("react-dom"),require("../backdrop/Backdrop.js"),require("../stack/Stack.js"),require("../../icons/icon-base/_IconBase.js");var m,p,x=j(t),g=x.default.div(m||(m=e.__makeTemplateObject(["\n padding: ",";\n\n & > div {\n text-align: center;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n"],["\n padding: ",";\n\n & > div {\n text-align: center;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n"])),d.theme.space24),f=x.default.div(p||(p=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: ",";\n\n & > button + button {\n margin-left: ",";\n }\n\n button {\n flex: 1;\n }\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: ",";\n\n & > button + button {\n margin-left: ",";\n }\n\n button {\n flex: 1;\n }\n"])),d.theme.space24,d.theme.space8),q=function(e){switch(e){case"danger":return n.jsx(a.ExclamationMarkDuotoneIcon,{color:"red800",secondaryColor:"red400"});case"warning":return n.jsx(l.WarningDuotoneIcon,{color:"orange800",secondaryColor:"orange400"});default:return n.jsx(u.HelpDuotoneIcon,{color:"blue800",secondaryColor:"blue400"})}};exports.ConfirmDialog=function(e){var t=e.confirmAction,a=e.confirmText,u=e.dismissAction,l=e.dismissText,d=e.intent,j=e.label,m=e.open,p=e.subtitle,x=e.themeOverride;return n.jsx(i.BaseDialog,{"data-theme":x,open:m,width:350,children:n.jsx(g,{children:n.jsxs(s.VStack,{spacing:16,children:[n.jsx(o.RoundedIcon,{intent:d,children:q(d)}),n.jsxs(s.VStack,{spacing:8,children:[n.jsx(c.Text,{type:"subheader",children:j}),p&&n.jsx(c.Text,{color:"gray800",type:"body",children:p})]}),n.jsxs(f,{children:[n.jsx(r.Button,{intent:"outline",onClick:u,size:"md",children:l}),n.jsx(r.Button,{intent:d,onClick:t,size:"md",children:a})]})]})})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react"),r=require("./ConfirmContext.js");require("../../_tslib-ccfac372.js"),require("react/jsx-runtime"),require("./ConfirmDialog.js"),require("styled-components"),require("../button/
|
|
1
|
+
"use strict";var e=require("react"),r=require("./ConfirmContext.js");require("../../_tslib-ccfac372.js"),require("react/jsx-runtime"),require("./ConfirmDialog.js"),require("styled-components"),require("../button/LegacyButton.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../../styles/constants/theme.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("../dialog/_BaseDialog.js"),require("react-dom"),require("../backdrop/Backdrop.js"),require("../rounded-icon/RoundedIcon.js"),require("../stack/VStack.js"),require("../stack/Stack.js"),require("../text/Text.js"),require("../../icons/ExclamationMarkDuotoneIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../icons/HelpDuotoneIcon.js"),require("../../icons/WarningDuotoneIcon.js");exports.useConfirm=function(){return e.useContext(r.ConfirmContext)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react"),i=require("react-dom"),o=require("framer-motion"),r=require("styled-components"),s=require("../button/
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react"),i=require("react-dom"),o=require("framer-motion"),r=require("styled-components"),s=require("../button/LegacyButton.js"),a=require("./CoverSheetActions.js"),u=require("../text/Text.js"),c=require("../../icons/RemoveIcon.js"),d=require("../../styles/constants/theme.js"),l=require("../../utils/hooks/useAminoTheme.js");function h(e){return e&&e.__esModule?e:{default:e}}require("../button/RippleGroup.js"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("../stack/HStack.js"),require("../stack/Stack.js"),require("../../icons/icon-base/_IconBase.js"),require("../../Theme-61f4342c.js"),require("zod"),require("../../utils/hooks/useStorage.js"),require("../../utils/hooks/useSwr.js"),require("swr"),require("../../utils/storage.js");var m,p,b,g,j,f=h(r),v=f.default(o.motion.div)(m||(m=e.__makeTemplateObject(["\n z-index: 990;\n outline: none;\n overflow-y: auto;\n box-sizing: border-box;\n overscroll-behavior: contain;\n background: ",";\n position: fixed;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n color: ",";\n\n @media print {\n height: unset;\n min-height: 100vh;\n position: absolute;\n }\n"],["\n z-index: 990;\n outline: none;\n overflow-y: auto;\n box-sizing: border-box;\n overscroll-behavior: contain;\n background: ",";\n position: fixed;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n color: ",";\n\n @media print {\n height: unset;\n min-height: 100vh;\n position: absolute;\n }\n"])),d.theme.pageBackground,d.theme.textColor),x=f.default(s.Button)(p||(p=e.__makeTemplateObject(["\n margin-right: ",";\n"],["\n margin-right: ",";\n"])),d.theme.space24),q=f.default(u.Text)(b||(b=e.__makeTemplateObject(["\n flex-grow: 1;\n"],["\n flex-grow: 1;\n"]))),y=f.default.header(g||(g=e.__makeTemplateObject(["\n border-bottom: ",";\n padding: "," ",";\n display: flex;\n align-items: center;\n height: 64px;\n position: sticky;\n top: 0;\n z-index: 99;\n background-color: ",";\n\n @media print {\n display: none;\n }\n"],["\n border-bottom: ",";\n padding: "," ",";\n display: flex;\n align-items: center;\n height: 64px;\n position: sticky;\n top: 0;\n z-index: 99;\n background-color: ",";\n\n @media print {\n display: none;\n }\n"])),d.theme.border,d.theme.space16,d.theme.space24,d.theme.pageBackground),k=f.default.div(j||(j=e.__makeTemplateObject(["\n padding: ",";\n"],["\n padding: ",";\n"])),d.theme.space24);exports.CoverSheet=function(e){var r=e.actions,s=e.actionWrapperId,u=void 0===s?"__cover-sheet-actions":s,d=e.children,h=e.className,m=e.label,p=e.onClose,b=e.open,g=e.themeOverride,j=l.useAminoTheme().aminoTheme;if(t.useEffect((function(){"undefined"!=typeof document&&document.querySelectorAll("[id='".concat(u,"']")).length>1&&console.error('Duplicate id "'.concat(u,'" detected in "CoverSheet" component. Please set "actionWrapperId" to a unique id.'))}),[u]),t.useEffect((function(){(null===document||void 0===document?void 0:document.body)&&(document.body.style.overflow=b?"hidden":"auto")}),[b]),"undefined"!=typeof document){var f=document.querySelector("body");if(f)return i.createPortal(n.jsx(o.AnimatePresence,{children:b&&n.jsxs(v,{animate:{opacity:1,translateY:0},className:h,"data-theme":g||j,exit:{opacity:0,translateY:5},initial:{opacity:0,translateY:10},transition:{duration:.35,ease:[.4,0,.2,1]},children:[n.jsxs(y,{children:[n.jsx(x,{icon:n.jsx(c.RemoveIcon,{size:20}),onClick:p}),n.jsx(q,{type:"header",children:m}),n.jsx("div",{id:u,children:r&&n.jsx(a.CoverSheetActions,{coverSheetActionId:u,children:r})})]}),n.jsx(k,{children:d})]})}),f)}return null};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react"),a=require("styled-components"),r=require("../button/
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react"),a=require("styled-components"),r=require("../button/LegacyButton.js"),i=require("./_BaseDialog.js"),o=require("../text/Text.js"),s=require("../../icons/RemoveCircleDuotoneIcon.js"),l=require("../../styles/constants/theme.js");function c(e){return e&&e.__esModule?e:{default:e}}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("../backdrop/Backdrop.js"),require("../../icons/icon-base/_IconBase.js");var d=c(a),h=d.default.div(k||(k=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"])),l.theme.space24,l.theme.space16,l.theme.radius12,l.theme.radius12,l.theme.space12),m=d.default.div(v||(v=e.__makeTemplateObject(["\n width: 100%;\n display: flex;\n align-items: center;\n\n > :not(button) {\n margin: 0;\n flex-grow: 1;\n font-weight: 700;\n }\n"],["\n width: 100%;\n display: flex;\n align-items: center;\n\n > :not(button) {\n margin: 0;\n flex-grow: 1;\n font-weight: 700;\n }\n"]))),p=d.default(r.Button)(w||(w=e.__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"])),l.theme.gray200,l.theme.gray800,l.theme.gray300,l.theme.gray400),u=d.default.div(x||(x=e.__makeTemplateObject(["\n flex-grow: 1;\n display: flex;\n"],["\n flex-grow: 1;\n display: flex;\n"]))),g=d.default(u)(y||(y=e.__makeTemplateObject(["\n justify-content: flex-start;\n display: flex;\n gap: ",";\n"],["\n justify-content: flex-start;\n display: flex;\n gap: ",";\n"])),l.theme.space8),f=d.default(u)(j||(j=e.__makeTemplateObject(["\n justify-content: flex-end;\n display: flex;\n gap: ",";\n"],["\n justify-content: flex-end;\n display: flex;\n gap: ",";\n"])),l.theme.space8),b=d.default.div(T||(T=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"])),l.theme.space24,l.theme.radius12,l.theme.radius12,l.theme.space8);a.css(_||(_=e.__makeTemplateObject(["\n overscroll-behavior: contain;\n /* scroll bar width, for use in mask calculations */\n --scrollbar-width: 8px;\n\n /* mask fade distance, for use in mask calculations */\n --mask-height: 32px;\n\n /* If content exceeds height of container, overflow! */\n overflow-y: auto;\n\n padding-bottom: var(--mask-height);\n /* The CSS mask */\n\n /* The content mask is a linear gradient from top to bottom */\n --mask-image-content: linear-gradient(\n to bottom,\n transparent,\n black var(--mask-height),\n black calc(100% - var(--mask-height)),\n transparent\n );\n /* Here we scale the content gradient to the width of the container\nminus the scrollbar width. The height is the full container height */\n --mask-size-content: calc(100% - var(--scrollbar-width)) 100%;\n\n /* The scrollbar mask is a black pixel */\n --mask-image-scrollbar: linear-gradient(black, black);\n\n /* The width of our black pixel is the width of the scrollbar.\nThe height is the full container height */\n --mask-size-scrollbar: var(--scrollbar-width) 100%;\n\n /* Apply the mask image and mask size variables */\n mask-image: var(--mask-image-content), var(--mask-image-scrollbar);\n mask-size: var(--mask-size-content), var(--mask-size-scrollbar);\n\n /* Position the content gradient in the top left, and the\nscroll gradient in the top right */\n mask-position:\n 0 0,\n 100% 0;\n\n /* We don't repeat our mask images */\n mask-repeat: no-repeat, no-repeat;\n"],["\n overscroll-behavior: contain;\n /* scroll bar width, for use in mask calculations */\n --scrollbar-width: 8px;\n\n /* mask fade distance, for use in mask calculations */\n --mask-height: 32px;\n\n /* If content exceeds height of container, overflow! */\n overflow-y: auto;\n\n padding-bottom: var(--mask-height);\n /* The CSS mask */\n\n /* The content mask is a linear gradient from top to bottom */\n --mask-image-content: linear-gradient(\n to bottom,\n transparent,\n black var(--mask-height),\n black calc(100% - var(--mask-height)),\n transparent\n );\n /* Here we scale the content gradient to the width of the container\nminus the scrollbar width. The height is the full container height */\n --mask-size-content: calc(100% - var(--scrollbar-width)) 100%;\n\n /* The scrollbar mask is a black pixel */\n --mask-image-scrollbar: linear-gradient(black, black);\n\n /* The width of our black pixel is the width of the scrollbar.\nThe height is the full container height */\n --mask-size-scrollbar: var(--scrollbar-width) 100%;\n\n /* Apply the mask image and mask size variables */\n mask-image: var(--mask-image-content), var(--mask-image-scrollbar);\n mask-size: var(--mask-size-content), var(--mask-size-scrollbar);\n\n /* Position the content gradient in the top left, and the\nscroll gradient in the top right */\n mask-position:\n 0 0,\n 100% 0;\n\n /* We don't repeat our mask images */\n mask-repeat: no-repeat, no-repeat;\n"])));var k,v,w,x,y,j,T,_,q,O=d.default.div(q||(q=e.__makeTemplateObject(["\n padding: "," ",";\n overflow-y: auto;\n flex-grow: 1;\n /**\n * Current overflow is not working well with react-tooltip.\n * Temporary remove gradient overflow until having new tooltip library to use\n */\n // gradientOverflow\n"],["\n padding: "," ",";\n overflow-y: auto;\n flex-grow: 1;\n /**\n * Current overflow is not working well with react-tooltip.\n * Temporary remove gradient overflow until having new tooltip library to use\n */\n // gradientOverflow\n"])),l.theme.space8,l.theme.space24),z=t.forwardRef((function(e,t){var a=e.actions,r=e.children,l=e.className,c=e.closeOnBlur,d=e.closeOnEsc,u=e.label,k=e.leftActions,v=e.noBorder,w=e.onClose,x=e.open,y=e.subtitle,j=e.themeOverride,T=e.width;return n.jsxs(i.BaseDialog,{className:l,closeOnBlur:c,closeOnEsc:d,"data-theme":j,noBorder:v,onClose:w,open:x,width:T,children:[n.jsxs(h,{children:[n.jsxs(m,{children:[n.jsx(o.Text,{type:"title",children:u}),n.jsx(p,{icon:n.jsx(s.RemoveCircleDuotoneIcon,{size:24}),noRipple:!0,onClick:w})]}),y&&n.jsx(o.Text,{type:"subtitle",children:y})]}),n.jsx(O,{ref:t,children:r}),(a||k)&&n.jsxs(b,{children:[k&&n.jsx(g,{children:k}),a&&n.jsx(f,{children:a})]})]})}));exports.Dialog=z;
|
|
@@ -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/LegacyButton.js"),a=require("../spinner/Spinner.js"),l=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("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,f,h,g,j,b,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"})),k=q.default.div(f||(f=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),I=q.default.div(h||(h=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(g||(g=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(j||(j=e.__makeTemplateObject(["\n display: inline;\n"],["\n display: inline;\n"]))),F=q.default(o.Button)(b||(b=e.__makeTemplateObject(["\n margin-left: auto;\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 :active,\n :focus {\n outline: none;\n box-shadow: unset;\n }\n"],["\n margin-left: auto;\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 :active,\n :focus {\n outline: none;\n box-shadow: unset;\n }\n"])),p.theme.gray200,p.theme.gray800,p.theme.gray300,p.theme.gray400),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(v||(v=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),w=q.default.div(_||(_=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,f=r.error,h=void 0!==f&&f,g=r.helpText,j=r.instructionText,b=void 0===j?"Drop your file(s) here":j,y=r.loading,v=r.loadingText,_=void 0===v?"Uploading file(s)...":v,q=r.noIcon,C=void 0!==q&&q,U=r.onRemoveFile,B=r.uploadedFiles,A=x.maxFiles||0,N=i.useDropzone(e.__assign(e.__assign({},x),{disabled:m,noClick:!0,noKeyboard:!0})),P=N.getInputProps,S=N.getRootProps,G=N.open,K=0!==A&&B.length>=A;return n.jsx(T,{className:o,disabled:m,children:y?n.jsx(k,{children:n.jsxs(I,{children:[n.jsx(a.Spinner,{}),n.jsx(l.Text,{color:"gray800",type:"label",children:_})]})}):n.jsxs(n.Fragment,{children:[!K&&n.jsx(k,{error:h,children:n.jsxs(I,e.__assign({},S(),{role:void 0,children:[n.jsx("input",e.__assign({},P())),!C&&n.jsx(s.Thumbnail,{icon:n.jsx(c.FileUploadDuotoneIcon,{}),size:40}),n.jsxs(O,{children:[n.jsxs(l.Text,{type:"label",children:[b," or"," ",n.jsx(D,{disabled:m,onClick:G,type:"button",children:n.jsx(l.Text,{color:"blue600",type:"label",children:"browse"})})]}),g&&n.jsx(l.Text,{type:"caption",children:g})]})]}))}),!!B.length&&n.jsx(z,{children:B.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(w,{children:[n.jsx(l.Text,{color:"gray1200",type:"label",children:e.name}),e.size&&n.jsx(l.Text,{color:"gray700",type:"caption",children:e.size})]}),U&&n.jsx(F,{onClick:function(){return U(i)},children:n.jsx(u.RemoveCircleDuotoneIcon,{size:20})})]},e.name)}))})]})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),t=require("react-dropzone"),r=require("styled-components"),o=require("../button/
|
|
1
|
+
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),t=require("react-dropzone"),r=require("styled-components"),o=require("../button/LegacyButton.js"),i=require("../text/Text.js"),a=require("../../icons/RemoveCircleDuotoneIcon.js"),s=require("../../styles/constants/theme.js");function l(n){return n&&n.__esModule?n:{default:n}}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,u,p,f,m=l(r),g=m.default.div(c||(c=n.__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"])),s.theme.space8,s.theme.space12,s.theme.radius10,s.theme.border,(function(n){return n.error?s.theme.danger:s.theme.borderColor}),(function(n){return n.disabled?.5:1}),(function(n){return n.disabled?"not-allowed":"auto"})),x=m.default.div(d||(d=n.__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"]))),h=m.default.div(u||(u=n.__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"])),s.theme.space12),y=m.default.div(p||(p=n.__makeTemplateObject(["\n display: flex;\n gap: ",";\n align-items: center;\n"],["\n display: flex;\n gap: ",";\n align-items: center;\n"])),s.theme.space4),j=m.default(o.Button)(f||(f=n.__makeTemplateObject(["\n margin-left: auto;\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 :active,\n :focus {\n outline: none;\n box-shadow: unset;\n }\n"],["\n margin-left: auto;\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 :active,\n :focus {\n outline: none;\n box-shadow: unset;\n }\n"])),s.theme.gray200,s.theme.gray800,s.theme.gray300,s.theme.gray400);exports.FileUpload=function(r){var s=r.className,l=r.disabled,c=void 0!==l&&l,d=r.dropzoneOptions,u=r.error,p=void 0!==u&&u,f=r.instructionText,m=void 0===f?"or drag your file here":f,b=r.loading,v=r.loadingText,_=void 0===v?"Uploading...":v,q=r.onRemoveFile,T=r.uploadedFile,k=t.useDropzone(n.__assign(n.__assign({},d),{disabled:c,multiple:!1,noClick:!0,noKeyboard:!0})),C=k.getInputProps,R=k.getRootProps,O=k.open,z=function(){return b?e.jsx(i.Text,{children:_}):T?function(){if(T){var n=T.name,t=T.size;return e.jsxs(y,{children:[e.jsx(i.Text,{color:"gray1200",type:"label",children:n}),t&&e.jsx(i.Text,{color:"gray700",type:"caption",children:t})]})}return null}():e.jsx(i.Text,{color:"gray600",children:m})};return e.jsxs(g,{className:s,disabled:c,error:p,children:[e.jsxs(x,n.__assign({},R(),{children:[e.jsx("input",n.__assign({},C())),e.jsxs(h,{children:[e.jsx(o.Button,{loading:b,onClick:O,spinnerColor:"black",children:"Browse"}),z()]})]})),q&&T&&e.jsx(j,{onClick:function(){return q()},children:e.jsx(a.RemoveCircleDuotoneIcon,{size:20})})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),r=require("react/jsx-runtime"),t=require("react"),i=require("@graphiql/react"),n=require("graphiql");require("graphql");var o=require("styled-components"),s=require("./_GraphiqlContextWrapper.js"),a=require("./_LoadingIcon.js"),u=require("../nested-data-table/NestedDataTable.js"),l=require("../split-panel/SplitPanel.js"),c=require("../../icons/EyeIcon.js"),h=require("../../icons/EyeOffIcon.js"),p=require("../../styles/constants/theme.js"),q=require("../../utils/hooks/_useGraphiqlExplorer.js"),d=require("../../utils/hooks/_useGraphiqlFetcher.js"),j=require("../../utils/hooks/_useGraphiqlStorage.js");function g(e){return e&&e.__esModule?e:{default:e}}require("../text/Text.js"),require("../../icons/custom/ZonosLogoIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../button/
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),r=require("react/jsx-runtime"),t=require("react"),i=require("@graphiql/react"),n=require("graphiql");require("graphql");var o=require("styled-components"),s=require("./_GraphiqlContextWrapper.js"),a=require("./_LoadingIcon.js"),u=require("../nested-data-table/NestedDataTable.js"),l=require("../split-panel/SplitPanel.js"),c=require("../../icons/EyeIcon.js"),h=require("../../icons/EyeOffIcon.js"),p=require("../../styles/constants/theme.js"),q=require("../../utils/hooks/_useGraphiqlExplorer.js"),d=require("../../utils/hooks/_useGraphiqlFetcher.js"),j=require("../../utils/hooks/_useGraphiqlStorage.js");function g(e){return e&&e.__esModule?e:{default:e}}require("../text/Text.js"),require("../../icons/custom/ZonosLogoIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../button/LegacyButton.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("../nested-data-table/_TableData.js"),require("../nested-data-table/_Filter.js"),require("../select/MultiSelect.js"),require("../checkbox/Checkbox.js"),require("../../icons/CheckmarkIcon.js"),require("../../utils/getTestId.js"),require("../help-text/HelpText.js"),require("../select/_StyledReactSelect.js"),require("react-select"),require("../../icons/CheckCircleIcon.js"),require("../../icons/DoubleChevronIcon.js"),require("../../icons/RemoveCircleIcon.js"),require("../../icons/RemoveIcon.js"),require("../../icons/FilterIcon.js"),require("../../utils/hooks/useDropdown.js"),require("@floating-ui/react-dom"),require("../pivot-table/PivotTable.js"),require("react-data-grid"),require("../../icons/ChevronDownIcon.js"),require("../../icons/ChevronUpIcon.js"),require("../../utils/addIndex.js"),require("../tooltip/Tooltip.js"),require("@mui/material/styles"),require("@mui/material/Tooltip"),require("../stack/VStack.js"),require("../stack/Stack.js"),require("../../utils/hooks/useAminoTheme.js"),require("../../Theme-61f4342c.js"),require("zod"),require("../../utils/hooks/useStorage.js"),require("../../utils/hooks/useSwr.js"),require("swr"),require("../../utils/storage.js"),require("../../icons/ChevronRightCircleIcon.js"),require("../../utils/flattenRow.js"),require("../../utils/setupNestedData.js"),require("../../utils/truncateText.js"),require("../rest-state/RestState.js"),require("react-split-it"),require("@graphiql/plugin-explorer"),require("../../utils/_graphiqlFetcher.js"),require("../../utils/handleFetch.js"),require("lodash/kebabCase"),require("../../utils/hooks/useCurrentShema.js");var m,b,x,_=g(o),f=_.default.div(m||(m=e.__makeTemplateObject(["\n height: 100%;\n .graphiql-tab > .graphiql-tab-button {\n outline: none;\n }\n .docExplorerWrap {\n /* Built-in plugin height is set to 100% which prevents the plugin bar scrolling */\n height: auto !important;\n /* Don't cap explorer width */\n width: auto !important;\n }\n .graphiql-explorer-graphql-arguments {\n svg {\n display: inline-block;\n }\n }\n\n .graphiql-explorer-root > div {\n overflow: auto !important;\n }\n"],["\n height: 100%;\n .graphiql-tab > .graphiql-tab-button {\n outline: none;\n }\n .docExplorerWrap {\n /* Built-in plugin height is set to 100% which prevents the plugin bar scrolling */\n height: auto !important;\n /* Don't cap explorer width */\n width: auto !important;\n }\n .graphiql-explorer-graphql-arguments {\n svg {\n display: inline-block;\n }\n }\n\n .graphiql-explorer-root > div {\n overflow: auto !important;\n }\n"]))),v=_.default.div(b||(b=e.__makeTemplateObject(["\n height: 100%;\n"],["\n height: 100%;\n"]))),S=_.default.div(x||(x=e.__makeTemplateObject(["\n height: 100vh;\n overflow: auto;\n padding: 0 ",";\n display: flex;\n flex-direction: column;\n"],["\n height: 100vh;\n overflow: auto;\n padding: 0 ",";\n display: flex;\n flex-direction: column;\n"])),p.theme.space12),k=function(o){var p=o.customToolbar,g=o.fetcher,m=o.loadingComponent,b=o.onEditQuery,x=o.onEditVariables,_=o.onResultData,k=o.query,y=void 0===k?"":k,T=o.schema,C=o.schemaName,E=o.url,I=o.variables,w=void 0===I?"":I,F=e.__read(t.useState(null),2),D=F[0],G=F[1],R=e.__read(t.useState(null),2)[1],B=e.__read(t.useState(!1),2),L=B[0],O=B[1],N=e.__read(t.useState("first-time"),1)[0],A=e.__read(t.useState(!1),2),P=A[0],Q=A[1],W=e.__read(t.useState([1,0]),2),z=W[0],M=W[1],V=e.__read(t.useState(!1),2),H=V[0],K=V[1],U=e.__read(t.useState(""),2),Z=U[0],J=U[1],X=d.useGraphiqlFetcher({cachingKey:N,customFetcher:g||null,operationName:Z,query:y,url:E}),Y=X.graphiqlFetcher,$=X.isLoading,ee=X.resultData,re=j.useGraphiqlStorage({defaultSchema:C});t.useEffect((function(){K(!0)}),[]),t.useEffect((function(){O(!!(null==D?void 0:D.isFetching)||$)}),[null==D?void 0:D.isFetching,O,$]),t.useEffect((function(){ee&&_&&_(ee)}),[_,ee]);var te=q.useGraphiqlExplorer({});if(!T)return r.jsx(r.Fragment,{children:m||r.jsx(a.Loading,{})});var ie,ne;return r.jsx(f,{children:r.jsxs(l.SplitPanel,{collapseAll:!P,onSetSizes:M,sizes:z,children:[r.jsx(v,{children:H&&r.jsx(n.GraphiQL,{fetcher:Y,onEditOperationName:J,onEditQuery:b,onEditVariables:x,plugins:[te],query:y,schema:T,storage:re,toolbar:{additionalContent:r.jsxs(i.Tooltip.Provider,{children:[r.jsx(i.ToolbarButton,{label:P?"Hide table":"Show table",onClick:function(){return Q(!P)},children:P?r.jsx(h.EyeOffIcon,{color:"red600"}):r.jsx(c.EyeIcon,{color:"gray400"})}),p]})},variables:w,children:r.jsx(s.GraphiqlContextWrapper,{setExecutionContext:G,setResponseEditorContext:R,children:r.jsx(n.GraphiQL.Footer,{})})})}),(ie=null!==ee?ee.data:ee,ne=ie?Object.entries(ie):null,ne?r.jsx(S,{children:ne.map((function(t){var i=e.__read(t,2),n=i[0],o=i[1];return Array.isArray(o)||o?r.jsx(u.NestedDataTable,{isFetching:L,tableData:o,title:n},n):null}))}):null)]})})};k.ToolbarButton=i.ToolbarButton,exports.GraphMatrix=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),r=require("react/jsx-runtime"),n=require("styled-components"),i=require("../help-text/HelpText.js"),a=require("./input-type/_DateInput.js"),t=require("./input-type/_FloatLabelInput.js"),s=require("./input-type/_NumberInput.js"),u=require("./input-type/_PasswordInput.js"),o=require("./input-type/_TimeInput.js"),l=require("../../styles/constants/theme.js");function d(e){return e&&e.__esModule?e:{default:e}}require("../text/Text.js"),require("react"),require("../../icons/CalendarIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../utils/getTestId.js"),require("../../icons/ChevronDownIcon.js"),require("../../icons/ChevronUpIcon.js"),require("../../icons/EyeIcon.js"),require("../../icons/EyeOffIcon.js"),require("../../icons/ClockIcon.js");var p,c,x=d(n),f=x.default.div(p||(p=e.__makeTemplateObject(["\n border-radius: ",";\n border: ",";\n &:hover {\n border: 1px solid ",";\n }\n"],["\n border-radius: ",";\n border: ",";\n &:hover {\n border: 1px solid ",";\n }\n"])),l.theme.radius6,l.theme.border,l.theme.gray300),b=x.default.div(c||(c=e.__makeTemplateObject(["\n position: relative;\n width: ",";\n\n & > div {\n flex-direction: row;\n align-items: center;\n display: flex;\n }\n\n &.disabled {\n opacity: 0.4;\n }\n"],["\n position: relative;\n width: ",";\n\n & > div {\n flex-direction: row;\n align-items: center;\n display: flex;\n }\n\n &.disabled {\n opacity: 0.4;\n }\n"])),(function(e){return e.width?"".concat(e.width,"px"):"100%"}));exports.Input=function(n){var l=n.autoFocus,d=n.className,p=n.disabled,c=n.error,x=n.helpText,h=n.inputMode,y=n.inputPrefix,j=n.inputSuffix,m=n.label,q=n.onChange,v=n.onKeyDown,I=n.pattern,_=n.placeholder,w=n.prefix,g=n.readOnly,C=n.required,P=n.size,T=n.suffix,D=n.tabIndex,N=n.type,O=n.value,F=n.valuePrefix,M=n.width,z=e.__rest(n,["autoFocus","className","disabled","error","helpText","inputMode","inputPrefix","inputSuffix","label","onChange","onKeyDown","pattern","placeholder","prefix","readOnly","required","size","suffix","tabIndex","type","value","valuePrefix","width"]);return r.jsxs(b,{className:"amino-input-wrapper ".concat(p?"disabled":""),width:M,children:[r.jsx(f,{children:function(){switch(N){case"password":return r.jsx(u.PasswordInput,e.__assign({autoFocus:l,className:d,disabled:p,error:c,inputMode:h,label:m,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||y,readOnly:g,required:C,size:P,suffix:T||j,tabIndex:D,value:O||"",valuePrefix:F},z));case"date":case"datetime-local":return r.jsx(a.DateInput,e.__assign({autoFocus:l,className:d,disabled:p,error:c,inputMode:h,label:m,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||y,readOnly:g,required:C,size:P,suffix:T||j,tabIndex:D,type:N,value:O||"",valuePrefix:F},z));case"number":return r.jsx(s.NumberInput,e.__assign({autoFocus:l,className:d,disabled:p,error:c,inputMode:h,label:m,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||y,readOnly:g,required:C,size:P,suffix:T||j,tabIndex:D,value:O||"",valuePrefix:F},z));case"time":return r.jsx(o.TimeInput,e.__assign({autoFocus:l,className:d,disabled:p,error:c,inputMode:h,label:m,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||y,readOnly:g,required:C,size:P,suffix:T||j,tabIndex:D,value:O||"",valuePrefix:F},z));default:return r.jsx(t.FloatLabelInput,e.__assign({autoFocus:l,className:d,disabled:p,error:c,inputMode:h,label:m,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||y,readOnly:g,required:C,size:P,suffix:T||j,tabIndex:D,type:N,value:O||"",valuePrefix:F},z))}}()}),r.jsx(i.HelpText,{error:c,helpText:x})]})};
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),r=require("react/jsx-runtime"),n=require("styled-components"),i=require("../help-text/HelpText.js"),a=require("./input-type/_DateInput.js"),t=require("./input-type/_FloatLabelInput.js"),s=require("./input-type/_NumberInput.js"),u=require("./input-type/_PasswordInput.js"),o=require("./input-type/_TimeInput.js"),l=require("../../styles/constants/theme.js");function d(e){return e&&e.__esModule?e:{default:e}}require("../text/Text.js"),require("react"),require("../../icons/CalendarIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../utils/getTestId.js"),require("../../icons/ChevronDownIcon.js"),require("../../icons/ChevronUpIcon.js"),require("../../icons/EyeIcon.js"),require("../../icons/EyeOffIcon.js"),require("../../icons/ClockIcon.js");var p,c,x=d(n),f=x.default.div(p||(p=e.__makeTemplateObject(["\n border-radius: ",";\n border: ",";\n &:hover {\n border: 1px solid ",";\n }\n"],["\n border-radius: ",";\n border: ",";\n &:hover {\n border: 1px solid ",";\n }\n"])),l.theme.radius6,l.theme.border,l.theme.gray300),b=x.default.div(c||(c=e.__makeTemplateObject(["\n position: relative;\n width: ",";\n\n & > div {\n flex-direction: row;\n align-items: center;\n display: flex;\n }\n\n &.disabled {\n opacity: 0.4;\n }\n"],["\n position: relative;\n width: ",";\n\n & > div {\n flex-direction: row;\n align-items: center;\n display: flex;\n }\n\n &.disabled {\n opacity: 0.4;\n }\n"])),(function(e){return e.width?"".concat(e.width,"px"):"100%"}));exports.Input=function(n){var l=n.autoFocus,d=n.className,p=n.disabled,c=n.error,x=n.helpText,h=n.inputMode,y=n.inputPrefix,j=n.inputSuffix,m=n.label,q=n.onChange,v=n.onKeyDown,I=n.pattern,_=n.placeholder,w=n.prefix,g=n.readOnly,C=n.required,P=n.size,T=n.suffix,D=n.tabIndex,N=n.type,O=n.value,F=n.valuePrefix,M=n.width,z=e.__rest(n,["autoFocus","className","disabled","error","helpText","inputMode","inputPrefix","inputSuffix","label","onChange","onKeyDown","pattern","placeholder","prefix","readOnly","required","size","suffix","tabIndex","type","value","valuePrefix","width"]);return r.jsxs(b,{className:"amino-input-wrapper ".concat(p?"disabled":""),width:M,children:[r.jsx(f,{children:function(){switch(N){case"password":return r.jsx(u.PasswordInput,e.__assign({autoFocus:l,className:d,disabled:p,error:c,inputMode:h,label:m,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||y,readOnly:g,required:C,size:P,suffix:T||j,tabIndex:D,value:O||"",valuePrefix:F},z));case"date":case"datetime-local":return r.jsx(a.DateInput,e.__assign({autoFocus:l,className:d,disabled:p,error:c,inputMode:h,label:m,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||y,readOnly:g,required:C,size:P,suffix:T||j,tabIndex:D,type:N,value:O||"",valuePrefix:F},z));case"number":return r.jsx(s.NumberInput,e.__assign({autoFocus:l,className:d,disabled:p,error:c,inputMode:h,label:m,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||y,readOnly:g,required:C,size:P,suffix:null===T?null:T||j,tabIndex:D,value:O||"",valuePrefix:F},z));case"time":return r.jsx(o.TimeInput,e.__assign({autoFocus:l,className:d,disabled:p,error:c,inputMode:h,label:m,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||y,readOnly:g,required:C,size:P,suffix:T||j,tabIndex:D,value:O||"",valuePrefix:F},z));default:return r.jsx(t.FloatLabelInput,e.__assign({autoFocus:l,className:d,disabled:p,error:c,inputMode:h,label:m,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||y,readOnly:g,required:C,size:P,suffix:T||j,tabIndex:D,type:N,value:O||"",valuePrefix:F},z))}}()}),r.jsx(i.HelpText,{error:c,helpText:x})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),t=require("react/jsx-runtime"),r=require("react"),i=require("styled-components"),s=require("../button/
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),t=require("react/jsx-runtime"),r=require("react"),i=require("styled-components"),s=require("../button/LegacyButton.js"),n=require("./_TableData.js"),u=require("../rest-state/RestState.js"),a=require("../text/Text.js"),l=require("../../styles/constants/theme.js");function o(e){return e&&e.__esModule?e:{default:e}}require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("./_Filter.js"),require("../select/MultiSelect.js"),require("../checkbox/Checkbox.js"),require("../../icons/CheckmarkIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../utils/getTestId.js"),require("../help-text/HelpText.js"),require("../select/_StyledReactSelect.js"),require("react-select"),require("../../icons/CheckCircleIcon.js"),require("../../icons/DoubleChevronIcon.js"),require("../../icons/RemoveCircleIcon.js"),require("../../icons/RemoveIcon.js"),require("../../icons/FilterIcon.js"),require("../../utils/hooks/useDropdown.js"),require("@floating-ui/react-dom"),require("../pivot-table/PivotTable.js"),require("react-data-grid"),require("../../icons/ChevronDownIcon.js"),require("../../icons/ChevronUpIcon.js"),require("../../utils/addIndex.js"),require("../tooltip/Tooltip.js"),require("@mui/material/styles"),require("@mui/material/Tooltip"),require("../stack/VStack.js"),require("../stack/Stack.js"),require("../../utils/hooks/useAminoTheme.js"),require("../../Theme-61f4342c.js"),require("zod"),require("../../utils/hooks/useStorage.js"),require("../../utils/hooks/useSwr.js"),require("swr"),require("../../utils/storage.js"),require("../../icons/ChevronRightCircleIcon.js"),require("../../utils/flattenRow.js"),require("../../utils/setupNestedData.js"),require("../../utils/truncateText.js");var c,j,q,d=o(i),h=d.default.div(c||(c=e.__makeTemplateObject(["\n height: 100%;\n"],["\n height: 100%;\n"]))),m=d.default.div(j||(j=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: ",";\n"],["\n display: flex;\n align-items: center;\n padding: ",";\n"])),l.theme.space8),p=d.default.div(q||(q=e.__makeTemplateObject(["\n display: flex;\n flex: 1;\n justify-content: flex-end;\n align-items: center;\n gap: ",";\n"],["\n display: flex;\n flex: 1;\n justify-content: flex-end;\n align-items: center;\n gap: ",";\n"])),l.theme.space8);exports.NestedDataTable=function(e){var i=e.currentPage,l=e.customColumnCells,o=e.customFlattenRow,c=e.handlePagination,j=e.hasNextPage,q=e.hasPreviousPage,d=e.isFetching,x=e.loadingComponent,g=e.restState,b=e.tableData,f=e.title,k=r.useMemo((function(){return Array.isArray(b)?b:[b]}),[b]),v=!!c&&!!i&&b.length;return t.jsxs(h,{children:[t.jsxs(m,{children:[!!f&&t.jsx(a.Text,{type:"header",children:f}),!!v&&t.jsxs(p,{children:[t.jsx(s.Button,{disabled:1===i||!q,intent:"outline",onClick:function(){q&&c(i-1)},children:"Previous page"}),i,t.jsx(s.Button,{disabled:!j,intent:"outline",onClick:function(){j&&c(i+1)},children:"Next page"})]})]}),d?x?t.jsx(t.Fragment,{children:x}):t.jsx(u.RestState,{label:"Loading..."}):0===k.length?g?t.jsx(t.Fragment,{children:g}):t.jsx(u.RestState,{label:"No data available."}):t.jsx(n.TableData,{customColumnCells:l,customFlattenRow:o,tableDataArr:k})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./NestedDataTable.js");require("../../_tslib-ccfac372.js");var i=require("../../utils/hooks/action-pivot-table/useHasuraGqlPagination.js");require("styled-components"),require("../button/
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./NestedDataTable.js");require("../../_tslib-ccfac372.js");var i=require("../../utils/hooks/action-pivot-table/useHasuraGqlPagination.js");require("styled-components"),require("../button/LegacyButton.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../../styles/constants/theme.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("./_TableData.js"),require("./_Filter.js"),require("../select/MultiSelect.js"),require("../checkbox/Checkbox.js"),require("../text/Text.js"),require("../../icons/CheckmarkIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../utils/getTestId.js"),require("../help-text/HelpText.js"),require("../select/_StyledReactSelect.js"),require("react-select"),require("../../icons/CheckCircleIcon.js"),require("../../icons/DoubleChevronIcon.js"),require("../../icons/RemoveCircleIcon.js"),require("../../icons/RemoveIcon.js"),require("../../icons/FilterIcon.js"),require("../../utils/hooks/useDropdown.js"),require("@floating-ui/react-dom"),require("../pivot-table/PivotTable.js"),require("react-data-grid"),require("../../icons/ChevronDownIcon.js"),require("../../icons/ChevronUpIcon.js"),require("../../utils/addIndex.js"),require("../tooltip/Tooltip.js"),require("@mui/material/styles"),require("@mui/material/Tooltip"),require("../stack/VStack.js"),require("../stack/Stack.js"),require("../../utils/hooks/useAminoTheme.js"),require("../../Theme-61f4342c.js"),require("zod"),require("../../utils/hooks/useStorage.js"),require("../../utils/hooks/useSwr.js"),require("swr"),require("../../utils/storage.js"),require("../../icons/ChevronRightCircleIcon.js"),require("../../utils/flattenRow.js"),require("../../utils/setupNestedData.js"),require("../../utils/truncateText.js"),require("../rest-state/RestState.js"),require("../../utils/_extractQueryParams.js");exports.NestedDataTableHasura=function(s){var u=s.customFlattenRow,a=s.isFetching,o=s.query,n=s.setCachingKey,c=s.setQuery,q=s.tableData,l=s.title,j=r.useMemo((function(){return Array.isArray(q)?q:[q]}),[q]),h=i.useHasuraGqlPagination({actionName:l,query:o,setCachingKey:n,setQuery:c}),m=h.currentPage,p=h.handlePagination;return e.jsx(t.NestedDataTable,{currentPage:m,customFlattenRow:u,handlePagination:p,isFetching:a,tableData:j,title:l})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react"),r=require("styled-components"),i=require("../button/
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react"),r=require("styled-components"),i=require("../button/LegacyButton.js"),s=require("./_Filter.js"),a=require("../pivot-table/PivotTable.js"),o=require("../tooltip/Tooltip.js"),u=require("../../icons/ChevronRightCircleIcon.js"),l=require("../../styles/constants/theme.js"),c=require("../../utils/flattenRow.js"),d=require("../../utils/setupNestedData.js"),p=require("../../utils/truncateText.js");function m(e){return e&&e.__esModule?e:{default:e}}require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("../select/MultiSelect.js"),require("../checkbox/Checkbox.js"),require("../text/Text.js"),require("../../icons/CheckmarkIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../utils/getTestId.js"),require("../help-text/HelpText.js"),require("../select/_StyledReactSelect.js"),require("react-select"),require("../../icons/CheckCircleIcon.js"),require("../../icons/DoubleChevronIcon.js"),require("../../icons/RemoveCircleIcon.js"),require("../../icons/RemoveIcon.js"),require("../../icons/FilterIcon.js"),require("../../utils/hooks/useDropdown.js"),require("@floating-ui/react-dom"),require("react-data-grid"),require("../../icons/ChevronDownIcon.js"),require("../../icons/ChevronUpIcon.js"),require("../../utils/addIndex.js"),require("@mui/material/styles"),require("@mui/material/Tooltip"),require("../stack/VStack.js"),require("../stack/Stack.js"),require("../../utils/hooks/useAminoTheme.js"),require("../../Theme-61f4342c.js"),require("zod"),require("../../utils/hooks/useStorage.js"),require("../../utils/hooks/useSwr.js"),require("swr"),require("../../utils/storage.js");var j,f,g,h=m(r),q=h.default.div(j||(j=e.__makeTemplateObject(["\n display: flex;\n justify-content: flex-end;\n align-items: center;\n margin-bottom: var(--amino-space-12);\n"],["\n display: flex;\n justify-content: flex-end;\n align-items: center;\n margin-bottom: var(--amino-space-12);\n"]))),x=h.default.div(f||(f=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n height: 100%;\n svg {\n transition: 0.3s all ease;\n }\n .expanding-button {\n svg {\n transform: rotate(90deg);\n }\n }\n"],["\n display: flex;\n align-items: center;\n height: 100%;\n svg {\n transition: 0.3s all ease;\n }\n .expanding-button {\n svg {\n transform: rotate(90deg);\n }\n }\n"]))),_=h.default.div(g||(g=e.__makeTemplateObject(["\n .expanding {\n background-color: ",";\n }\n & & {\n padding: "," "," ",";\n }\n"],["\n .expanding {\n background-color: ",";\n }\n & & {\n padding: "," "," ",";\n }\n"])),l.theme.gray50,l.theme.space4,l.theme.space12,l.theme.space24),v=function(r){var l=r.customColumnCells,m=r.customFlattenRow,j=r.noFilter,f=r.tableDataArr,g=m||c.flattenRow,h=e.__read(t.useState([]),2),b=h[0],y=h[1],k=t.useCallback((function(){return f.map((function(e){var n=Object.entries(e).reduce((function(e,n){return g({currentVal:n,prev:e})}),{});return d.setupNestedData(n)}))}),[g,f]),C=e.__read(t.useState(k()),2),T=C[0],w=C[1];t.useEffect((function(){f&&w(k())}),[k,f]);var D=t.useCallback((function(t){var r=t.column,s=t.onRowChange,a=t.row,c=a[r.key];if(Array.isArray(c)){var d=0===c.length,j=a._expandedKey===r.key;return n.jsx(x,{children:n.jsx(o.Tooltip,{showTooltip:d,subtitle:"This list has no items.",children:n.jsx(i.Button,{className:j?"expanding-button":"",disabled:d,icon:n.jsx(u.ChevronRightCircleIcon,{}),intent:"subtle",onClick:function(){return s(e.__assign(e.__assign({},a),{_expandedKey:j?"":r.key}))}})})})}return a._expandedData&&a._expandedData.length>0?n.jsx(v,{customColumnCells:l,customFlattenRow:m,noFilter:!0,tableDataArr:a._expandedData}):"string"==typeof c?p.truncateText({addEllipsis:!0,length:40,text:c}):c}),[l,m]),R=t.useMemo((function(){return Object.entries(T.find(Boolean)||{}).filter((function(n){var t=e.__read(n,1)[0];return"key"!==t&&!t.startsWith("_")})).flatMap((function(n){var t=e.__read(n,1)[0];return[{key:t,name:t,renderCell:(null==l?void 0:l[t])||D}]}))}),[l,D,T]),I=t.useMemo((function(){var n=R.filter((function(e){return!b.includes(e.key)}));return n.map((function(t){return e.__assign(e.__assign({},t),{cellClass:function(e){return e._expandedKey===t.key||e._expandedData.length>0?"expanding":""},colSpan:function(e){return"ROW"===e.type&&e.row._expandedData.length>0?n.filter((function(e){return!e.key.startsWith("_")})).length:void 0}})}))}),[R,b]);return n.jsxs(_,{children:[n.jsx(q,{children:!j&&n.jsx(s.Filter,{columns:R,hiddenColumns:b,setHiddenColumns:y})}),n.jsx(a.PivotTable,{columns:I,defaultColumnOptions:{resizable:!0,sortable:!1},headerRowHeight:40,onRowsChange:function(e,n){var t=n.indexes[0],r=void 0!==t?e[t]:null;if(r&&void 0!==t){var i=r[r._expandedKey];if(i&&Array.isArray(i)){var s=e[t+1],a=(null==s?void 0:s._expandedData)&&s._expandedData.length>0,o=i[0],u="object"==typeof o&&o?i:i.map((function(e){return{item:e}}));e.splice(t+1,a?1:0,{_expandedData:u,_expandedKey:""})}else e.splice(t+1,1);w(e)}},rowHeight:function(e){var n,t;return"ROW"===e.type&&(null===(t=null===(n=e.row)||void 0===n?void 0:n._expandedData)||void 0===t?void 0:t.length)>0?300:45},rows:T,tableHeight:"100%"})]})};exports.TableData=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react"),r=require("styled-components"),a=require("../button/
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react"),r=require("styled-components"),a=require("../button/LegacyButton.js"),i=require("../collapse/Collapse.js"),s=require("./_SectionInnerWrapper.js"),l=require("./_SectionSubheader.js"),o=require("../stack/HStack.js"),c=require("../text/Text.js"),u=require("../../icons/ChevronUpIcon.js"),d=require("../../styles/constants/theme.js");function p(e){return e&&e.__esModule?e:{default:e}}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 m,f,j,h,b=p(r),x=b.default(o.HStack)(m||(m=e.__makeTemplateObject(["\n padding: ",";\n margin-bottom: ",";\n grid-template-columns: 1fr 2fr;\n"],["\n padding: ",";\n margin-bottom: ",";\n grid-template-columns: 1fr 2fr;\n"])),d.theme.space8,d.theme.space40),v=b.default(a.Button)(f||(f=e.__makeTemplateObject(["\n position: relative;\n margin-left: ",";\n transition: 0.2s all ease;\n background: transparent;\n\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 &:active,\n &:focus,\n &:hover {\n background: transparent;\n color: ",";\n }\n\n &.collapsed {\n transform: rotate(90deg);\n }\n }\n"],["\n position: relative;\n margin-left: ",";\n transition: 0.2s all ease;\n background: transparent;\n\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 &:active,\n &:focus,\n &:hover {\n background: transparent;\n color: ",";\n }\n\n &.collapsed {\n transform: rotate(90deg);\n }\n }\n"])),d.theme.space4,d.theme.gray300,d.theme.gray400,d.theme.gray800),g=b.default.div(j||(j=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"]))),q=b.default.div(h||(h=e.__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));exports.HSection=function(r){var a=r.children,o=r.className,d=r.collapseByDefault,p=void 0!==d&&d,m=r.collapsible,f=void 0!==m&&m,j=r.label,h=r.sublabel,b=void 0===h?"":h,y=e.__read(t.useState(p),2),_=y[0],k=y[1];return n.jsxs(x,{className:o||"",children:[j&&n.jsx(s.SectionInnerWrapper,{children:n.jsxs(g,{children:[f?n.jsxs(q,{onClick:function(){return k(!_)},onKeyDown:function(){return null},role:"button",tabIndex:0,children:[n.jsx(c.Text,{type:"title",children:j}),n.jsx(v,{className:_?"collapsed":"",icon:n.jsx(u.ChevronUpIcon,{}),intent:"plain",onClick:function(){return k(!_)},size:"sm"})]}):n.jsx(c.Text,{type:"title",children:j}),b&&n.jsx(l.SectionSubheader,{children:b})]})}),f?n.jsx(i.Collapse,{collapsed:_,children:a}):n.jsx("div",{children:a})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),r=require("styled-components"),t=require("../../styles/constants/theme.js");function s(n){return n&&n.__esModule?n:{default:n}}var i,a,o=s(r),c=o.default.div(i||(i=n.__makeTemplateObject(["\n position: relative;\n overflow: hidden;\n width: ","px;\n height: ","px;\n"],["\n position: relative;\n overflow: hidden;\n width: ","px;\n height: ","px;\n"])),(function(n){return n.size}),(function(n){return n.size})),k=o.default.svg(a||(a=n.__makeTemplateObject(["\n position: absolute;\n width: ","px;\n height: ","px;\n\n stroke: ",";\n\n circle.track {\n stroke: ",";\n }\n\n &.black {\n stroke: ",";\n\n circle.track {\n stroke:
|
|
1
|
+
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),r=require("styled-components"),t=require("../../styles/constants/theme.js");function s(n){return n&&n.__esModule?n:{default:n}}var i,a,o=s(r),c=o.default.div(i||(i=n.__makeTemplateObject(["\n position: relative;\n overflow: hidden;\n width: ","px;\n height: ","px;\n"],["\n position: relative;\n overflow: hidden;\n width: ","px;\n height: ","px;\n"])),(function(n){return n.size}),(function(n){return n.size})),k=o.default.svg(a||(a=n.__makeTemplateObject(["\n position: absolute;\n width: ","px;\n height: ","px;\n\n stroke: ",";\n\n circle.track {\n stroke: ",";\n }\n\n &.black {\n stroke: ",";\n\n circle.track {\n stroke: ",";\n }\n }\n &.white {\n stroke: ",";\n\n circle.track {\n stroke: ",";\n }\n }\n &.info {\n stroke: ",";\n circle.track {\n stroke: ",";\n }\n }\n &.success {\n stroke: ",";\n circle.track {\n stroke: ",";\n }\n }\n &.danger {\n stroke: ",";\n circle.track {\n stroke: ",";\n }\n }\n &.warning {\n stroke: ",";\n circle.track {\n stroke: ",";\n }\n }\n\n @keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n }\n\n @keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n }\n\n animation: rotate 2s linear infinite;\n\n circle:not(.track) {\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n }\n"],["\n position: absolute;\n width: ","px;\n height: ","px;\n\n stroke: ",";\n\n circle.track {\n stroke: ",";\n }\n\n &.black {\n stroke: ",";\n\n circle.track {\n stroke: ",";\n }\n }\n &.white {\n stroke: ",";\n\n circle.track {\n stroke: ",";\n }\n }\n &.info {\n stroke: ",";\n circle.track {\n stroke: ",";\n }\n }\n &.success {\n stroke: ",";\n circle.track {\n stroke: ",";\n }\n }\n &.danger {\n stroke: ",";\n circle.track {\n stroke: ",";\n }\n }\n &.warning {\n stroke: ",";\n circle.track {\n stroke: ",";\n }\n }\n\n @keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n }\n\n @keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n }\n\n animation: rotate 2s linear infinite;\n\n circle:not(.track) {\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n }\n"])),(function(n){return n.size}),(function(n){return n.size}),t.theme.blue600,t.theme.gray200,t.theme.spinnerStrokeBlack,t.theme.spinnerTrackBlack,t.theme.spinnerStrokeWhite,t.theme.spinnerTrackWhite,t.theme.blue600,t.theme.blue100,t.theme.green600,t.theme.green100,t.theme.red600,t.theme.red100,t.theme.orange600,t.theme.orange100);exports.Spinner=function(n){var r=n.className,t=n.color,s=void 0===t?"primary":t,i=n.size,a=void 0===i?32:i;return e.jsx(c,{size:a,children:e.jsxs(k,{className:[r,s,"amino-spinner"].join(" "),size:a,viewBox:"0 0 50 50",children:[e.jsx("circle",{className:"track",cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20",strokeWidth:"5"}),e.jsx("circle",{cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20",strokeWidth:"5"})]})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("styled-components"),r=require("../button/
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("styled-components"),r=require("../button/LegacyButton.js"),o=require("../collapse/Collapse.js"),l=require("./TableCell.js"),s=require("./TableRow.js"),i=require("../../icons/ChevronUpIcon.js"),a=require("../../styles/constants/theme.js");function c(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 u,d,p,b,m,j,h=c(t),q=h.default(s.TableRow)(p||(p=e.__makeTemplateObject(["\n ","\n ","\n"],["\n ","\n ","\n"])),(function(n){return!n.collapsed&&t.css(u||(u=e.__makeTemplateObject(["\n td {\n border-bottom: 0;\n }\n "],["\n td {\n border-bottom: 0;\n }\n "])))}),(function(n){return n.collapsible&&t.css(d||(d=e.__makeTemplateObject(["\n cursor: pointer;\n "],["\n cursor: pointer;\n "])))})),_=h.default(o.Collapse)(b||(b=e.__makeTemplateObject(["\n > div {\n padding-bottom: ",";\n }\n"],["\n > div {\n padding-bottom: ",";\n }\n"])),a.theme.space16),f=h.default(l.TableCell)(m||(m=e.__makeTemplateObject(["\n border-bottom: ",";\n && {\n height: ",";\n }\n > div {\n width: 100%;\n }\n"],["\n border-bottom: ",";\n && {\n height: ",";\n }\n > div {\n width: 100%;\n }\n"])),(function(e){return e.collapsed?0:"inherit"}),(function(e){return e.collapsed?0:"inherit"})),g=h.default(r.Button)(j||(j=e.__makeTemplateObject(["\n svg {\n transition: ",";\n\n &.collapsed {\n transform: rotate(180deg);\n }\n }\n"],["\n svg {\n transition: ",";\n\n &.collapsed {\n transform: rotate(180deg);\n }\n }\n"])),a.theme.transition);exports.TableRowCollapse=function(e){var t=e.children,r=e.className,o=e.collapsed,a=void 0!==o&&o,c=e.onToggleCollapse,u=e.rowContent,d=!!t;return n.jsxs(n.Fragment,{children:[n.jsxs(q,{className:r,collapsed:a,collapsible:d,onClick:function(e){return d&&c(e)},withHover:d,children:[u,n.jsx(l.TableCell,{align:"right",children:d&&n.jsx(g,{icon:n.jsx(i.ChevronUpIcon,{className:a?"collapsed":""}),intent:"plain"})})]}),d&&n.jsx(s.TableRow,{children:n.jsx(f,{collapsed:a,colSpan:100,children:n.jsx(_,{collapsed:a,children:t})})})]})};
|
package/package.json
CHANGED
|
@@ -195,6 +195,18 @@ export declare const theme: {
|
|
|
195
195
|
readonly v3ShadowXxl: "var(--amino-v3-shadow-xxl)";
|
|
196
196
|
/** @info 0px 1px 0px #FFFFFF, 0px 2px 4px rgba(0, 0, 0, 0.04), inset 0px 1px 1px rgba(0, 0, 0, 0.04), inset 0px 2px 4px rgba(0, 0, 0, 0.04), inset 0px 0px 0px 0.5px rgba(0, 0, 0, 0.06), inset 0px 0px 8px rgba(0, 0, 0, 0.02) */
|
|
197
197
|
readonly v3ShadowInset: "var(--amino-v3-shadow-inset)";
|
|
198
|
+
/** @info 0px -1px 1px 0px rgba(0, 0, 0, 0.20) inset, 0px 1px 3px 0px rgba(68, 94, 238, 0.40) */
|
|
199
|
+
readonly shadowButtonPrimary: "var(--amino-shadow-button-primary)";
|
|
200
|
+
/** @info 0px -1px 1px 0px rgba(0, 0, 0, 0.20) inset, 0px 1px 3px 0px rgba(43, 156, 77, 0.40) */
|
|
201
|
+
readonly shadowButtonSuccess: "var(--amino-shadow-button-success)";
|
|
202
|
+
/** @info 0px -1px 1px 0px rgba(0, 0, 0, 0.20) inset, 0px 1px 3px 0px rgba(217, 33, 65, 0.40) */
|
|
203
|
+
readonly shadowButtonDanger: "var(--amino-shadow-button-danger)";
|
|
204
|
+
/** @info 0px -1px 1px 0px rgba(0, 0, 0, 0.20) inset, 0px 1px 3px 0px rgba(229, 89, 26, 0.40) */
|
|
205
|
+
readonly shadowButtonWarning: "var(--amino-shadow-button-warning)";
|
|
206
|
+
/** @info 0 0 0 3px var(--amino-blue-600) */
|
|
207
|
+
readonly buttonFocusRing: "var(--amino-button-focus-ring)";
|
|
208
|
+
/** @info 0px 1px 3px 0px rgba(110, 110, 120, 0.12), 0px -2px 1px 1px rgba(0, 0, 0, 0.08) inset */
|
|
209
|
+
readonly shadowButtonStandard: "var(--amino-shadow-button-standard)";
|
|
198
210
|
/** @info space-negative-80: -5rem (-80px) */
|
|
199
211
|
readonly spaceNegative80: "var(--amino-space-negative-80)";
|
|
200
212
|
/** @info space-negative-76: -4.75rem (-76px) */
|
|
@@ -311,13 +323,13 @@ export declare const theme: {
|
|
|
311
323
|
readonly primaryLight: "var(--amino-primary-light)";
|
|
312
324
|
/** @info var(--amino-blue-800) */
|
|
313
325
|
readonly primaryDark: "var(--amino-primary-dark)";
|
|
314
|
-
/** @info var(--amino-green-
|
|
326
|
+
/** @info var(--amino-green-600) */
|
|
315
327
|
readonly success: "var(--amino-success)";
|
|
316
328
|
/** @info var(--amino-green-700) */
|
|
317
329
|
readonly successDark: "var(--amino-success-dark)";
|
|
318
|
-
/** @info var(--amino-
|
|
330
|
+
/** @info var(--amino-orange-600) */
|
|
319
331
|
readonly warning: "var(--amino-warning)";
|
|
320
|
-
/** @info var(--amino-
|
|
332
|
+
/** @info var(--amino-orange-600) */
|
|
321
333
|
readonly warningDark: "var(--amino-warning-dark)";
|
|
322
334
|
/** @info 0 0 0 1px var(--amino-red-600) */
|
|
323
335
|
readonly glowError: "var(--amino-glow-error)";
|
|
@@ -349,6 +361,24 @@ export declare const theme: {
|
|
|
349
361
|
readonly surfaceColorSecondary: "var(--amino-surface-color-secondary)";
|
|
350
362
|
/** @info var(--amino-gray-1200) */
|
|
351
363
|
readonly backdropColor: "var(--amino-backdrop-color)";
|
|
364
|
+
/** @info linear-gradient(180deg, #445EEE 0%, #364BD4 100%) */
|
|
365
|
+
readonly buttonPrimaryHover: "var(--amino-button-primary-hover)";
|
|
366
|
+
/** @info linear-gradient(180deg, #2B9C4D 0%, #298549 100%) */
|
|
367
|
+
readonly buttonSuccessHover: "var(--amino-button-success-hover)";
|
|
368
|
+
/** @info linear-gradient(180deg, #D92141 0%, #B4223D 100%) */
|
|
369
|
+
readonly buttonDangerHover: "var(--amino-button-danger-hover)";
|
|
370
|
+
/** @info linear-gradient(180deg, #E5591A 0%, #B6471B 100%) */
|
|
371
|
+
readonly buttonWarningHover: "var(--amino-button-warning-hover)";
|
|
372
|
+
/** @info linear-gradient(180deg, #FFF 0%, #EAEBED 100%) */
|
|
373
|
+
readonly buttonStandardHover: "var(--amino-button-standard-hover)";
|
|
374
|
+
/** @info rgba(0, 0, 0, 0.3) */
|
|
375
|
+
readonly spinnerTrackBlack: "var(--amino-spinner-track-black)";
|
|
376
|
+
/** @info #0c0c0c */
|
|
377
|
+
readonly spinnerStrokeBlack: "var(--amino-spinner-stroke-black)";
|
|
378
|
+
/** @info rgba(255, 255, 255, 0.3) */
|
|
379
|
+
readonly spinnerTrackWhite: "var(--amino-spinner-track-white)";
|
|
380
|
+
/** @info #FFFFFF */
|
|
381
|
+
readonly spinnerStrokeWhite: "var(--amino-spinner-stroke-white)";
|
|
352
382
|
/** @info 55px */
|
|
353
383
|
readonly appbarHeight: "var(--amino-appbar-height)";
|
|
354
384
|
/** @info 232px */
|
|
@@ -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)",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)",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)",surfaceColor:"var(--amino-surface-color)",surfaceColorSecondary:"var(--amino-surface-color-secondary)",backdropColor:"var(--amino-backdrop-color)",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)",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)",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)",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)",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
|
@@ -106,6 +106,17 @@
|
|
|
106
106
|
inset 0px 1px 1px rgba(0, 0, 0, 0.04), inset 0px 2px 4px rgba(0, 0, 0, 0.04),
|
|
107
107
|
inset 0px 0px 0px 0.5px rgba(0, 0, 0, 0.06),
|
|
108
108
|
inset 0px 0px 8px rgba(0, 0, 0, 0.02);
|
|
109
|
+
--amino-shadow-button-primary: 0px -1px 1px 0px rgba(0, 0, 0, 0.2) inset,
|
|
110
|
+
0px 1px 3px 0px rgba(68, 94, 238, 0.4);
|
|
111
|
+
--amino-shadow-button-success: 0px -1px 1px 0px rgba(0, 0, 0, 0.2) inset,
|
|
112
|
+
0px 1px 3px 0px rgba(43, 156, 77, 0.4);
|
|
113
|
+
--amino-shadow-button-danger: 0px -1px 1px 0px rgba(0, 0, 0, 0.2) inset,
|
|
114
|
+
0px 1px 3px 0px rgba(217, 33, 65, 0.4);
|
|
115
|
+
--amino-shadow-button-warning: 0px -1px 1px 0px rgba(0, 0, 0, 0.2) inset,
|
|
116
|
+
0px 1px 3px 0px rgba(229, 89, 26, 0.4);
|
|
117
|
+
--amino-button-focus-ring: 0 0 0 3px var(--amino-blue-600);
|
|
118
|
+
--amino-shadow-button-standard: 0px 1px 3px 0px rgba(110, 110, 120, 0.12),
|
|
119
|
+
0px -2px 1px 1px rgba(0, 0, 0, 0.08) inset;
|
|
109
120
|
--amino-space-negative-80: -5rem;
|
|
110
121
|
--amino-space-negative-76: -4.75rem;
|
|
111
122
|
--amino-space-negative-72: -4.5rem;
|
|
@@ -164,10 +175,10 @@
|
|
|
164
175
|
--amino-primary: var(--amino-blue-600);
|
|
165
176
|
--amino-primary-light: var(--amino-blue-500);
|
|
166
177
|
--amino-primary-dark: var(--amino-blue-800);
|
|
167
|
-
--amino-success: var(--amino-green-
|
|
178
|
+
--amino-success: var(--amino-green-600);
|
|
168
179
|
--amino-success-dark: var(--amino-green-700);
|
|
169
|
-
--amino-warning: var(--amino-
|
|
170
|
-
--amino-warning-dark: var(--amino-
|
|
180
|
+
--amino-warning: var(--amino-orange-600);
|
|
181
|
+
--amino-warning-dark: var(--amino-orange-600);
|
|
171
182
|
--amino-glow-error: 0 0 0 1px var(--amino-red-600);
|
|
172
183
|
--amino-glow-blue: 0 0 0 1px var(--amino-primary);
|
|
173
184
|
--amino-glow-cyan: 0 0 0 1px var(--amino-cyan-600);
|
|
@@ -183,6 +194,31 @@
|
|
|
183
194
|
--amino-surface-color: var(--amino-gray-0);
|
|
184
195
|
--amino-surface-color-secondary: var(--amino-gray-50);
|
|
185
196
|
--amino-backdrop-color: var(--amino-gray-1200);
|
|
197
|
+
--amino-button-primary-hover: linear-gradient(
|
|
198
|
+
180deg,
|
|
199
|
+
#445eee 0%,
|
|
200
|
+
#364bd4 100%
|
|
201
|
+
);
|
|
202
|
+
--amino-button-success-hover: linear-gradient(
|
|
203
|
+
180deg,
|
|
204
|
+
#2b9c4d 0%,
|
|
205
|
+
#298549 100%
|
|
206
|
+
);
|
|
207
|
+
--amino-button-danger-hover: linear-gradient(
|
|
208
|
+
180deg,
|
|
209
|
+
#d92141 0%,
|
|
210
|
+
#b4223d 100%
|
|
211
|
+
);
|
|
212
|
+
--amino-button-warning-hover: linear-gradient(
|
|
213
|
+
180deg,
|
|
214
|
+
#e5591a 0%,
|
|
215
|
+
#b6471b 100%
|
|
216
|
+
);
|
|
217
|
+
--amino-button-standard-hover: linear-gradient(180deg, #fff 0%, #eaebed 100%);
|
|
218
|
+
--amino-spinner-track-black: rgba(0, 0, 0, 0.3);
|
|
219
|
+
--amino-spinner-stroke-black: #0c0c0c;
|
|
220
|
+
--amino-spinner-track-white: rgba(255, 255, 255, 0.3);
|
|
221
|
+
--amino-spinner-stroke-white: #ffffff;
|
|
186
222
|
--amino-appbar-height: 55px;
|
|
187
223
|
--amino-sidebar-width: 232px;
|
|
188
224
|
--amino-elevation-0: 0;
|
|
@@ -335,6 +371,19 @@
|
|
|
335
371
|
inset 0px 2px 4px rgba(0, 0, 0, 0.24),
|
|
336
372
|
inset 0px 0px 0px 0.5px rgba(0, 0, 0, 0.24),
|
|
337
373
|
inset 0px 0px 8px rgba(0, 0, 0, 0.16);
|
|
374
|
+
--amino-shadow-button-primary: 0px -1px 1px 0px rgba(0, 0, 0, 0.2) inset,
|
|
375
|
+
0px 0px 0px 0.5px #000, 0px 1px 3px 0px rgba(95, 146, 246, 0.4);
|
|
376
|
+
--amino-shadow-button-success: 0px -1px 1px 0px rgba(0, 0, 0, 0.2) inset,
|
|
377
|
+
0px 0px 0px 1px rgba(255, 255, 255, 0.08) inset, 0px 0px 0px 0.5px #000,
|
|
378
|
+
0px 1px 3px 0px rgba(86, 199, 111, 0.6);
|
|
379
|
+
--amino-shadow-button-danger: 0px -1px 1px 0px rgba(0, 0, 0, 0.2) inset,
|
|
380
|
+
0px 1px 3px 0px rgba(217, 33, 65, 0.4);
|
|
381
|
+
--amino-shadow-button-warning: 0px -1px 1px 0px rgba(0, 0, 0, 0.2) inset,
|
|
382
|
+
0px 1px 3px 0px rgba(229, 89, 26, 0.4);
|
|
383
|
+
--amino-button-focus-ring: 0 0 0 3px var(--amino-blue-600);
|
|
384
|
+
--amino-shadow-button-standard: 0px -1px 1px 0px rgba(0, 0, 0, 0.4) inset,
|
|
385
|
+
0px 0px 2px 1px rgba(255, 255, 255, 0.08) inset,
|
|
386
|
+
0px 1px 3px 0px rgba(0, 0, 0, 0.8);
|
|
338
387
|
--amino-border: 1px solid var(--amino-border-color);
|
|
339
388
|
--amino-border-blue: 1px solid var(--amino-blue-500);
|
|
340
389
|
--amino-border-red: 1px solid var(--amino-red-400);
|
|
@@ -352,10 +401,10 @@
|
|
|
352
401
|
--amino-primary: var(--amino-blue-600);
|
|
353
402
|
--amino-primary-light: var(--amino-blue-500);
|
|
354
403
|
--amino-primary-dark: var(--amino-blue-800);
|
|
355
|
-
--amino-success: var(--amino-green-
|
|
404
|
+
--amino-success: var(--amino-green-600);
|
|
356
405
|
--amino-success-dark: var(--amino-green-700);
|
|
357
|
-
--amino-warning: var(--amino-
|
|
358
|
-
--amino-warning-dark: var(--amino-
|
|
406
|
+
--amino-warning: var(--amino-orange-600);
|
|
407
|
+
--amino-warning-dark: var(--amino-orange-600);
|
|
359
408
|
--amino-glow-error: 0 0 0 1px var(--amino-red-600);
|
|
360
409
|
--amino-glow-blue: 0 0 0 1px var(--amino-primary);
|
|
361
410
|
--amino-glow-cyan: 0 0 0 1px var(--amino-cyan-600);
|
|
@@ -371,6 +420,35 @@
|
|
|
371
420
|
--amino-surface-color: var(--amino-gray-50);
|
|
372
421
|
--amino-surface-color-secondary: var(--amino-gray-100);
|
|
373
422
|
--amino-backdrop-color: var(--amino-gray-0);
|
|
423
|
+
--amino-button-primary-hover: linear-gradient(
|
|
424
|
+
180deg,
|
|
425
|
+
#5f92f6 0%,
|
|
426
|
+
#89b2fa 100%
|
|
427
|
+
);
|
|
428
|
+
--amino-button-success-hover: linear-gradient(
|
|
429
|
+
180deg,
|
|
430
|
+
#56c76f 0%,
|
|
431
|
+
#7de490 100%
|
|
432
|
+
);
|
|
433
|
+
--amino-button-danger-hover: linear-gradient(
|
|
434
|
+
180deg,
|
|
435
|
+
#f95c67 0%,
|
|
436
|
+
#fa8b8b 100%
|
|
437
|
+
);
|
|
438
|
+
--amino-button-warning-hover: linear-gradient(
|
|
439
|
+
180deg,
|
|
440
|
+
#f88c53 0%,
|
|
441
|
+
#fca975 100%
|
|
442
|
+
);
|
|
443
|
+
--amino-button-standard-hover: linear-gradient(
|
|
444
|
+
180deg,
|
|
445
|
+
#1e1f26 0%,
|
|
446
|
+
#2e3038 100%
|
|
447
|
+
);
|
|
448
|
+
--amino-spinner-track-black: rgba(255, 255, 255, 0.3);
|
|
449
|
+
--amino-spinner-stroke-black: #ffffff;
|
|
450
|
+
--amino-spinner-track-white: rgba(0, 0, 0, 0.3);
|
|
451
|
+
--amino-spinner-stroke-white: #0c0c0c;
|
|
374
452
|
|
|
375
453
|
/* Fix for dark mode surface hover color. Dark mode surfaces have a lighter color than day mode inverted to see shadows better. */
|
|
376
454
|
.elevated {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Variant = 'standard' | 'primary' | 'success' | 'warning' | 'danger' | 'subtle' | 'link' | 'plain';
|