@zonos/amino 5.1.46 → 5.1.48
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 +0 -1
- package/components/dialog/Dialog.js +1 -1
- package/components/filter/filter-amount/FilterAmount.d.ts +1 -2
- package/components/filter/filter-date/FilterDate.d.ts +2 -3
- package/components/filter/filter-multi-select/FilterMultiSelect.d.ts +1 -2
- package/components/filter/filter-select/FilterSelect.d.ts +1 -2
- package/components/rich-card-select/RichCardStateSelect.d.ts +5 -4
- package/components/rich-card-select/RichCardStateSelect.js +1 -1
- package/components/theme-select/ThemeSelect.d.ts +3 -0
- package/package.json +1 -1
- package/types/UnitedStates.d.ts +4 -4
- package/components/button/LegacyButton.d.ts +0 -43
- package/components/button/LegacyButton.js +0 -1
package/all.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ import './components/avatar/UserAvatar';
|
|
|
9
9
|
import './components/badge/Badge';
|
|
10
10
|
import './components/banner/Banner';
|
|
11
11
|
import './components/button/Button';
|
|
12
|
-
import './components/button/LegacyButton';
|
|
13
12
|
import './components/button/MenuButton';
|
|
14
13
|
import './components/button/RippleGroup';
|
|
15
14
|
import './components/button/useRipple';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react"),r=require("styled-components"),
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react"),r=require("styled-components"),a=require("../button/Button.js"),i=require("./BaseDialog.js"),l=require("../text/Text.js"),o=require("../../icons/RemoveCircleDuotoneIcon.js"),s=require("../../styles/constants/theme.js");function d(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("../../icons/icon-base/_IconBase.js");var c,u,p,f,m,h,g,x,b=d(r),j=b.default.div(c||(c=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"])),s.theme.space24,s.theme.space16,s.theme.radius12,s.theme.radius12,s.theme.space12),y=b.default.div(u||(u=e.__makeTemplateObject(["\n width: 100%;\n display: flex;\n align-items: center;\n\n > :not(button) {\n margin: 0;\n flex-grow: 1;\n }\n"],["\n width: 100%;\n display: flex;\n align-items: center;\n\n > :not(button) {\n margin: 0;\n flex-grow: 1;\n }\n"]))),v=b.default(a.Button)(p||(p=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"])),s.theme.gray200,s.theme.gray800,s.theme.gray300,s.theme.gray400),_=b.default.div(f||(f=e.__makeTemplateObject(["\n flex-grow: 1;\n display: flex;\n"],["\n flex-grow: 1;\n display: flex;\n"]))),q=b.default(_)(m||(m=e.__makeTemplateObject(["\n justify-content: flex-start;\n display: flex;\n gap: ",";\n"],["\n justify-content: flex-start;\n display: flex;\n gap: ",";\n"])),s.theme.space8),k=b.default(_)(h||(h=e.__makeTemplateObject(["\n justify-content: flex-end;\n display: flex;\n gap: ",";\n"],["\n justify-content: flex-end;\n display: flex;\n gap: ",";\n"])),s.theme.space8),w=b.default.div(g||(g=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"])),s.theme.space24,s.theme.radius12,s.theme.radius12,s.theme.space8),T=b.default.div(x||(x=e.__makeTemplateObject(["\n padding: "," ",";\n overflow-y: auto;\n flex-grow: 1;\n"],["\n padding: "," ",";\n overflow-y: auto;\n flex-grow: 1;\n"])),s.theme.space8,s.theme.space24),O=t.forwardRef((function(t,r){var a=t.actions,s=t.children,d=t.label,c=t.leftActions,u=t.onClose,p=t.subtitle,f=e.__rest(t,["actions","children","label","leftActions","onClose","subtitle"]);return n.jsxs(i.BaseDialog,e.__assign({},f,{onClose:u,children:[n.jsxs(j,{children:[n.jsxs(y,{children:[n.jsx(l.Text,{type:"title",children:d}),n.jsx(v,{icon:n.jsx(o.RemoveCircleDuotoneIcon,{size:24}),noRipple:!0,onClick:u,variant:"subtle"})]}),p&&n.jsx(l.Text,{type:"subtitle",children:p})]}),n.jsx(T,{ref:r,children:s}),(a||c)&&n.jsxs(w,{children:[c&&n.jsx(q,{children:c}),a&&n.jsx(k,{children:a})]})]}))}));exports.Dialog=O;
|
|
@@ -2,9 +2,8 @@ import { type Dispatch } from 'react';
|
|
|
2
2
|
import { type FilterAmountAction, type FilterAmountState } from "./filterAmountReducer";
|
|
3
3
|
import { type BaseFilterProps } from "../useFilterWrapper";
|
|
4
4
|
export type FilterAmountType = 'equal' | 'between' | 'greater' | 'less';
|
|
5
|
-
type FilterAmountProps = BaseFilterProps & {
|
|
5
|
+
export type FilterAmountProps = BaseFilterProps & {
|
|
6
6
|
dispatch: Dispatch<FilterAmountAction>;
|
|
7
7
|
filter: FilterAmountState;
|
|
8
8
|
};
|
|
9
9
|
export declare const FilterAmount: ({ dispatch, dropdownTitle, filter, label, }: FilterAmountProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { type Dispatch } from 'react';
|
|
2
2
|
import { type FilterDateAction, type FilterDateState } from "./filterDateReducer";
|
|
3
3
|
import { type BaseFilterProps } from "../useFilterWrapper";
|
|
4
|
-
type
|
|
4
|
+
export type FilterDateProps = BaseFilterProps & {
|
|
5
5
|
dispatch: Dispatch<FilterDateAction>;
|
|
6
6
|
filter: FilterDateState;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Assumes exclusive date range. Specific formats/ranges should be handled upstream.
|
|
10
10
|
*/
|
|
11
|
-
export declare const FilterDate: ({ dispatch, dropdownTitle, filter, label, }:
|
|
12
|
-
export {};
|
|
11
|
+
export declare const FilterDate: ({ dispatch, dropdownTitle, filter, label, }: FilterDateProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { type BaseFilterProps } from "../useFilterWrapper";
|
|
2
2
|
import type { SelectOption } from "../../../types/SelectOption";
|
|
3
|
-
type FilterMultiSelectProps<T extends string = string> = BaseFilterProps & {
|
|
3
|
+
export type FilterMultiSelectProps<T extends string = string> = BaseFilterProps & {
|
|
4
4
|
options: SelectOption<T>[];
|
|
5
5
|
value: SelectOption<T>[];
|
|
6
6
|
onChange: (value: SelectOption<T>[]) => void;
|
|
7
7
|
};
|
|
8
8
|
export declare const FilterMultiSelect: <T extends string = string>({ dropdownTitle, label, onChange, options, value, }: FilterMultiSelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { type BaseFilterProps } from "../useFilterWrapper";
|
|
2
2
|
import type { SelectOption } from "../../../types/SelectOption";
|
|
3
|
-
type FilterSelectProps<T extends string = string, O extends SelectOption<string> = SelectOption<T>> = BaseFilterProps & {
|
|
3
|
+
export type FilterSelectProps<T extends string = string, O extends SelectOption<string> = SelectOption<T>> = BaseFilterProps & {
|
|
4
4
|
options: O[];
|
|
5
5
|
value: O | null;
|
|
6
6
|
onChange: (value: O | null) => void;
|
|
7
7
|
};
|
|
8
8
|
export declare const FilterSelect: <T extends string = string, O extends SelectOption<T> = SelectOption<T>>({ onChange, options, value, ...props }: FilterSelectProps<T, O>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { BaseProps } from "../../types/BaseProps";
|
|
1
2
|
import type { UnitedState } from "../../types/UnitedStates";
|
|
2
|
-
export type RichCardStateSelectProps = {
|
|
3
|
-
states:
|
|
4
|
-
onClick: (selectedState:
|
|
3
|
+
export type RichCardStateSelectProps<T extends UnitedState = UnitedState> = BaseProps & {
|
|
4
|
+
states: T[];
|
|
5
|
+
onClick: (selectedState: T) => void;
|
|
5
6
|
};
|
|
6
|
-
export declare const RichCardStateSelect: ({ onClick, states, }: RichCardStateSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const RichCardStateSelect: <T extends UnitedState = UnitedState>({ className, onClick, states, }: RichCardStateSelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("styled-components"),
|
|
1
|
+
"use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("styled-components"),r=require("../card/Card.js"),i=require("../stack/VStack.js"),o=require("../../styles/constants/theme.js");function c(e){return e&&e.__esModule?e:{default:e}}require("../stack/HStack.js"),require("../stack/Stack.js"),require("../text/Text.js");var a,l,s,u=c(t),h=u.default.div(a||(a=e.__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"]))),d=u.default.div(l||(l=e.__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n gap: ",";\n"],["\n display: flex;\n flex-wrap: wrap;\n gap: ",";\n"])),o.theme.space8),f=u.default(r.Card)(s||(s=e.__makeTemplateObject(["\n cursor: pointer;\n width: 180px;\n display: flex;\n gap: 24px;\n height: fit-content;\n align-items: center;\n font-weight: 500;\n flex: 0 0 180px;\n font-size: ",";\n color: ",";\n background-color: ",";\n border: ",";\n\n &:hover {\n background-color: ",";\n }\n\n svg > path {\n stroke: ",";\n fill: ",";\n }\n"],["\n cursor: pointer;\n width: 180px;\n display: flex;\n gap: 24px;\n height: fit-content;\n align-items: center;\n font-weight: 500;\n flex: 0 0 180px;\n font-size: ",";\n color: ",";\n background-color: ",";\n border: ",";\n\n &:hover {\n background-color: ",";\n }\n\n svg > path {\n stroke: ",";\n fill: ",";\n }\n"])),o.theme.fontSizeS,(function(e){return e.$highlighted&&o.theme.blue600}),(function(e){return e.$highlighted&&o.theme.blue100}),(function(e){return e.$highlighted&&"2px solid ".concat(o.theme.blue400)}),(function(e){return!e.$highlighted&&o.theme.gray50}),(function(e){return e.$highlighted&&o.theme.blue600}),(function(e){return e.$highlighted&&o.theme.blue200}));exports.RichCardStateSelect=function(e){var t=e.className,r=e.onClick,o=e.states,c=Array.from(new Set(o.map((function(e){return e.region})))),a=["West","Midwest","South","Northeast"];return c.sort((function(e,n){return a.indexOf(e)-a.indexOf(n)})),n.jsx(i.VStack,{className:t,spacing:24,children:c.map((function(e){return n.jsx("div",{children:n.jsxs(i.VStack,{spacing:16,children:[n.jsx(h,{children:e}),n.jsx(d,{children:o.filter((function(n){return n.region===e})).map((function(e){return n.jsx("button",{onClick:function(){return r(e)},type:"button",children:n.jsxs(f,{$highlighted:e.highlighted,spacing:"10px",children:[e.icon,e.name]},e.code)})}))})]})},e)}))})};
|
package/package.json
CHANGED
package/types/UnitedStates.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
export type
|
|
3
|
-
type
|
|
2
|
+
export type UnitedStatesCode = 'AL' | 'AK' | 'AZ' | 'AR' | 'CA' | 'CO' | 'CT' | 'DE' | 'FL' | 'GA' | 'HI' | 'ID' | 'IL' | 'IN' | 'IA' | 'KS' | 'KY' | 'LA' | 'ME' | 'MD' | 'MA' | 'MI' | 'MN' | 'MS' | 'MO' | 'MT' | 'NE' | 'NV' | 'NH' | 'NJ' | 'NM' | 'NY' | 'NC' | 'ND' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VT' | 'VA' | 'WA' | 'WV' | 'WI' | 'WY';
|
|
3
|
+
type UnitedStatesName = 'Alabama' | 'Alaska' | 'Arizona' | 'Arkansas' | 'California' | 'Colorado' | 'Connecticut' | 'Delaware' | 'Florida' | 'Georgia' | 'Hawaii' | 'Idaho' | 'Illinois' | 'Indiana' | 'Iowa' | 'Kansas' | 'Kentucky' | 'Louisiana' | 'Maine' | 'Maryland' | 'Massachusetts' | 'Michigan' | 'Minnesota' | 'Mississippi' | 'Missouri' | 'Montana' | 'Nebraska' | 'Nevada' | 'New Hampshire' | 'New Jersey' | 'New Mexico' | 'New York' | 'North Carolina' | 'North Dakota' | 'Ohio' | 'Oklahoma' | 'Oregon' | 'Pennsylvania' | 'Rhode Island' | 'South Carolina' | 'South Dakota' | 'Tennessee' | 'Texas' | 'Utah' | 'Vermont' | 'Virginia' | 'Washington' | 'West Virginia' | 'Wisconsin' | 'Wyoming';
|
|
4
4
|
type UnitedStatesRegions = 'West' | 'Midwest' | 'South' | 'Northeast';
|
|
5
5
|
export type UnitedState = {
|
|
6
|
-
code:
|
|
6
|
+
code: UnitedStatesCode;
|
|
7
7
|
highlighted?: boolean;
|
|
8
8
|
icon: ReactNode;
|
|
9
|
-
name:
|
|
9
|
+
name: UnitedStatesName;
|
|
10
10
|
region: UnitedStatesRegions;
|
|
11
11
|
};
|
|
12
12
|
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
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 { BaseProps } from "../../types/BaseProps";
|
|
5
|
-
import type { Intent } from "../../types/Intent";
|
|
6
|
-
import type { Size } from "../../types/Size";
|
|
7
|
-
import type { Theme } from "../../types/Theme";
|
|
8
|
-
type IntentProps = 'outline' | 'subtle' | 'text' | 'link' | 'plain' | Intent;
|
|
9
|
-
type ButtonBase = BaseProps & {
|
|
10
|
-
background?: Color | 'inherit';
|
|
11
|
-
/** @param borderColor only available for intent 'outline' */
|
|
12
|
-
borderColor?: Color | 'inherit';
|
|
13
|
-
children?: ReactNode;
|
|
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 LegacyButton<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 {};
|
|
@@ -1 +0,0 @@
|
|
|
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.LegacyButton=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"]),L=N||"button",M=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]})]})},A=[l||"",u&&!c?"only-icon":"",g?"icon-right":"",u?"has-icon":"",m?"loading":"",S].filter(Boolean).join(" "),D=r.useRef(null),I=a.useRipple({disabled:s||m,rippleEnabled:!v&&!["plain","text"].includes(b),rippleRef:D}),J=I.getRippleHandlers,K=I.rippleEnabled,P={className:A,disabled:s||m,size:_},Q=n.__assign(n.__assign(n.__assign({type:F},P),H),J(H));switch(b){case"primary":return e.jsxs(j,n.__assign({as:L},Q,{children:[M(G||"white"),K&&e.jsx(t.RippleGroup,{ref:D})]}));case"subtle":return e.jsxs(O,n.__assign({as:L},Q,{children:[M(G),K&&e.jsx(t.RippleGroup,{ref:D})]}));case"outline":return e.jsxs(C,n.__assign({as:L},Q,{children:[M(G),K&&e.jsx(t.RippleGroup,{ref:D})]}));case"warning":return e.jsxs(z,n.__assign({as:L},Q,{children:[M(G||"white"),K&&e.jsx(t.RippleGroup,{ref:D})]}));case"danger":return e.jsxs(R,n.__assign({as:L},Q,{children:[M(G||"white"),K&&e.jsx(t.RippleGroup,{ref:D})]}));case"text":return e.jsx(T,n.__assign({as:L},Q,{children:M(G)}));case"link":return e.jsxs(B,n.__assign({as:L},Q,{children:[M(G),K&&e.jsx(t.RippleGroup,{ref:D})]}));case"plain":return e.jsx(q,n.__assign({as:L},Q,{children:M(G)}));default:return e.jsxs(w,n.__assign({as:L},Q,{children:[M(G),K&&e.jsx(t.RippleGroup,{ref:D})]}))}};
|