@zonos/amino 4.3.3 → 4.4.1
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 +3 -1
- package/amino.css +0 -1
- package/components/alert-dialog/AlertContext.js +1 -1
- package/components/alert-dialog/AlertDialog.d.ts +4 -4
- package/components/alert-dialog/AlertDialog.js +1 -1
- package/components/alert-dialog/useAlert.js +1 -1
- package/components/badge/Badge.js +1 -1
- package/components/button/Button.d.ts +2 -2
- package/components/button/Button.js +1 -1
- package/components/checkbox/Checkbox.js +1 -1
- package/components/collapse/Collapse.js +1 -1
- package/components/confirm-dialog/ConfirmContext.js +1 -1
- package/components/confirm-dialog/ConfirmDialog.d.ts +3 -3
- package/components/confirm-dialog/ConfirmDialog.js +1 -1
- package/components/confirm-dialog/useConfirm.js +1 -1
- package/components/cover-sheet/CoverSheet.d.ts +1 -1
- package/components/cover-sheet/CoverSheet.js +1 -1
- package/components/currency/Currency.js +1 -1
- package/components/dialog/Dialog.d.ts +2 -2
- package/components/dialog/Dialog.js +1 -1
- package/components/dialog/_BaseDialog.d.ts +3 -3
- package/components/dialog/_BaseDialog.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/graph-matrix/_LoadingIcon.js +1 -1
- package/components/input/input-type/_FloatLabelInput.js +1 -1
- package/components/layout/Layout.js +1 -1
- package/components/layout/NavigationGroup.js +1 -1
- package/components/lightbox/LightBox.d.ts +3 -3
- package/components/lightbox/LightBox.js +1 -1
- package/components/list-item/ListItem.js +1 -1
- package/components/mdx/mdx-button/MdxButton.js +1 -1
- package/components/mdx/mdx-card/MdxCard.js +1 -1
- package/components/mdx/mdx-code-block/MdxCodeBlock.d.ts +4 -3
- package/components/mdx/mdx-code-block/MdxCodeBlock.js +1 -1
- package/components/mdx/mdx-image/MdxImage.js +1 -1
- package/components/mdx/mdx-related-content/MdxRelatedContent.js +1 -1
- package/components/mdx/mdx-table/MdxTable.js +1 -1
- package/components/mdx/mdx-video-guide/MdxVideoGuide.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/night-mode-wrapper/NightModeWrapper.d.ts +5 -0
- package/components/night-mode-wrapper/NightModeWrapper.js +1 -0
- package/components/ownership-block/OwnershipBlock.d.ts +3 -1
- package/components/ownership-block/OwnershipBlock.js +1 -1
- package/components/pivot-table/PivotTable.js +1 -1
- package/components/profile-icon/ProfileIcon.d.ts +2 -1
- package/components/profile-icon/ProfileIcon.js +1 -1
- package/components/radio/Radio.js +1 -1
- package/components/rich-checkbox/RichCheckbox.js +1 -1
- package/components/rich-radio/RichRadio.js +1 -1
- package/components/select/ThemeSelect.d.ts +2 -0
- package/components/select/ThemeSelect.js +1 -0
- package/components/select/_StyledReactSelect.js +1 -1
- package/components/slide-over/SlideOver.d.ts +4 -4
- package/components/slide-over/SlideOver.js +1 -1
- package/components/slider/Slider.js +1 -1
- package/components/spinner/Spinner.js +1 -1
- package/components/styles/ColorPalette.js +1 -1
- package/components/styles/Shadow.js +1 -1
- package/components/switch/Switch.js +1 -1
- package/components/text/LegacyText.js +1 -1
- package/components/text/Text.js +1 -1
- package/components/textarea/Textarea.js +1 -1
- package/components/tooltip/Tooltip.d.ts +3 -2
- package/components/tooltip/Tooltip.js +1 -1
- package/icons/ArrowDownDuotoneIcon.js +1 -1
- package/icons/ArrowLeftDuotoneIcon.js +1 -1
- package/icons/ArrowRightDuotoneIcon.js +1 -1
- package/icons/ArrowSwapDuotoneIcon.js +1 -1
- package/icons/ArrowUpDuotoneIcon.js +1 -1
- package/icons/BagDuotoneIcon.js +1 -1
- package/icons/BankDuotoneIcon.js +1 -1
- package/icons/BellDuotoneIcon.js +1 -1
- package/icons/BellOffDuotoneIcon.js +1 -1
- package/icons/BookDuotoneIcon.js +1 -1
- package/icons/BookmarkAddDuotoneIcon.js +1 -1
- package/icons/BookmarkCheckDuotoneIcon.js +1 -1
- package/icons/BookmarkDuotoneIcon.js +1 -1
- package/icons/BookmarkOffDuotoneIcon.js +1 -1
- package/icons/BookmarkRemoveDuotoneIcon.js +1 -1
- package/icons/BookmarkSubtractDuotoneIcon.js +1 -1
- package/icons/BoxesDuotoneIcon.js +1 -1
- package/icons/BufferDuotoneIcon.js +1 -1
- package/icons/CalculatorDuotoneIcon.js +1 -1
- package/icons/CalendarDuotoneIcon.js +1 -1
- package/icons/CardDuotoneIcon.js +1 -1
- package/icons/CaretDownDuotoneIcon.js +1 -1
- package/icons/CaretLeftDuotoneIcon.js +1 -1
- package/icons/CaretRightDuotoneIcon.js +1 -1
- package/icons/CaretUpDuotoneIcon.js +1 -1
- package/icons/CartDuotoneIcon.js +1 -1
- package/icons/ChartDuotoneIcon.js +1 -1
- package/icons/CheckCircleDuotoneIcon.js +1 -1
- package/icons/CheckmarkDuotoneIcon.js +1 -1
- package/icons/CheckoutDuotoneIcon.js +1 -1
- package/icons/ChevronDownCircleDuotoneIcon.js +1 -1
- package/icons/ChevronDownDuotoneIcon.js +1 -1
- package/icons/ChevronLeftCircleDuotoneIcon.js +1 -1
- package/icons/ChevronLeftDuotoneIcon.js +1 -1
- package/icons/ChevronRightCircleDuotoneIcon.js +1 -1
- package/icons/ChevronRightDuotoneIcon.js +1 -1
- package/icons/ChevronUpCircleDuotoneIcon.js +1 -1
- package/icons/ChevronUpDuotoneIcon.js +1 -1
- package/icons/CircleDuotoneIcon.js +1 -1
- package/icons/ClassifyDuotoneIcon.js +1 -1
- package/icons/ClearDuotoneIcon.js +1 -1
- package/icons/ClockDuotoneIcon.js +1 -1
- package/icons/CodeCircleDuotoneIcon.js +1 -1
- package/icons/CodeDuotoneIcon.js +1 -1
- package/icons/CoinsDuotoneIcon.js +1 -1
- package/icons/CommentDuotoneIcon.js +1 -1
- package/icons/CopyDuotoneIcon.js +1 -1
- package/icons/CubeDuotoneIcon.js +1 -1
- package/icons/DashboardDuotoneIcon.js +1 -1
- package/icons/DiamondDuotoneIcon.js +1 -1
- package/icons/DislikeDuotoneIcon.js +1 -1
- package/icons/DocsDuotoneIcon.js +1 -1
- package/icons/DollarDuotoneIcon.js +1 -1
- package/icons/DoubleChevronDuotoneIcon.js +1 -1
- package/icons/DragDuotoneIcon.js +1 -1
- package/icons/EditDuotoneIcon.js +1 -1
- package/icons/ExclamationMarkDuotoneIcon.js +1 -1
- package/icons/ExportDuotoneIcon.js +1 -1
- package/icons/ExternalDuotoneIcon.js +1 -1
- package/icons/EyeDuotoneIcon.js +1 -1
- package/icons/EyeOffDuotoneIcon.js +1 -1
- package/icons/FileDuotoneIcon.js +1 -1
- package/icons/FileUploadDuotoneIcon.js +1 -1
- package/icons/FilterDuotoneIcon.js +1 -1
- package/icons/FolderListDuotoneIcon.js +1 -1
- package/icons/FolderUploadDuotoneIcon.js +1 -1
- package/icons/GridDuotoneIcon.js +1 -1
- package/icons/HelloDuotoneIcon.js +1 -1
- package/icons/HelpDuotoneIcon.js +1 -1
- package/icons/HexagonDuotoneIcon.js +1 -1
- package/icons/HomeDuotoneIcon.js +1 -1
- package/icons/IconIndex.d.ts +1 -0
- package/icons/IconIndex.js +1 -1
- package/icons/ImageDuotoneIcon.js +1 -1
- package/icons/ImportDuotoneIcon.js +1 -1
- package/icons/InfoDuotoneIcon.js +1 -1
- package/icons/IntegrationDuotoneIcon.js +1 -1
- package/icons/LandedCostDuotoneIcon.js +1 -1
- package/icons/LaptopDuotoneIcon.js +1 -1
- package/icons/LightDuotoneIcon.js +1 -1
- package/icons/LikeDuotoneIcon.js +1 -1
- package/icons/LineDownDuotoneIcon.js +1 -1
- package/icons/LineUpDuotoneIcon.js +1 -1
- package/icons/LinkDuotoneIcon.js +1 -1
- package/icons/LocationDuotoneIcon.js +1 -1
- package/icons/LockDuotoneIcon.js +1 -1
- package/icons/LoginDuotoneIcon.js +1 -1
- package/icons/LogoutDuotoneIcon.js +1 -1
- package/icons/MailDuotoneIcon.js +1 -1
- package/icons/MenuDuotoneIcon.js +1 -1
- package/icons/MinusCircleDuotoneIcon.js +1 -1
- package/icons/MinusDuotoneIcon.js +1 -1
- package/icons/MobileDuotoneIcon.js +1 -1
- package/icons/MoneyDuotoneIcon.js +1 -1
- package/icons/MonitorDuotoneIcon.js +1 -1
- package/icons/NightDuotoneIcon.js +1 -1
- package/icons/PauseCircleDuotoneIcon.js +1 -1
- package/icons/PercentBadgeDuotoneIcon.js +1 -1
- package/icons/PercentDuotoneIcon.js +1 -1
- package/icons/PlayCircleDuotoneIcon.js +1 -1
- package/icons/PlayDuotoneIcon.js +1 -1
- package/icons/PlusCircleDuotoneIcon.js +1 -1
- package/icons/PlusDuotoneIcon.js +1 -1
- package/icons/PrinterDuotoneIcon.js +1 -1
- package/icons/RateDuotoneIcon.js +1 -1
- package/icons/ReceiptDuotoneIcon.js +1 -1
- package/icons/RefreshDuotoneIcon.js +1 -1
- package/icons/RemoveCircleDuotoneIcon.js +1 -1
- package/icons/RemoveDuotoneIcon.js +1 -1
- package/icons/RestrictDuotoneIcon.js +1 -1
- package/icons/RocketDuotoneIcon.js +1 -1
- package/icons/ScanDuotoneIcon.js +1 -1
- package/icons/ScreenDuotoneIcon.js +1 -1
- package/icons/SearchDuotoneIcon.js +1 -1
- package/icons/SendDuotoneIcon.js +1 -1
- package/icons/SettingsDuotoneIcon.js +1 -1
- package/icons/ShoppingListDuotoneIcon.js +1 -1
- package/icons/ShoppingTagDuotoneIcon.js +1 -1
- package/icons/SquareDuotoneIcon.js +1 -1
- package/icons/StarDuotoneIcon.js +1 -1
- package/icons/StarOffDuotoneIcon.js +1 -1
- package/icons/StarsDuotoneIcon.js +1 -1
- package/icons/SunnyDuotoneIcon.js +1 -1
- package/icons/TagDuotoneIcon.js +1 -1
- package/icons/ThreeDotDuotoneIcon.js +1 -1
- package/icons/TotalLandedCostDuotoneIcon.js +1 -1
- package/icons/TrashCanDuotoneIcon.js +1 -1
- package/icons/TriangleDuotoneIcon.js +1 -1
- package/icons/TruckDuotoneIcon.js +1 -1
- package/icons/UserDuotoneIcon.js +1 -1
- package/icons/UtahDuotoneIcon.js +1 -1
- package/icons/WarningDuotoneIcon.js +1 -1
- package/icons/custom/ZonosLogoIcon.d.ts +2 -6
- package/icons/custom/ZonosLogoIcon.js +1 -1
- package/package.json +2 -2
- package/reset.css +1 -1
- package/styles/constants/theme.d.ts +102 -110
- package/styles/constants/theme.js +1 -1
- package/theme.css +190 -153
- package/types/Color.d.ts +1 -1
- package/types/Theme.d.ts +1 -1
- package/types/index.d.ts +1 -1
- package/utils/handleFetch.js +1 -1
- package/utils/hooks/useAminoTheme.d.ts +5 -0
- package/utils/hooks/useAminoTheme.js +1 -0
- package/components/dark-mode-wrapper/DarkModeWrapper.d.ts +0 -5
- package/components/dark-mode-wrapper/DarkModeWrapper.js +0 -1
- package/types/IAminoTheme.d.ts +0 -1
package/all.d.ts
CHANGED
|
@@ -24,7 +24,6 @@ import './components/cover-sheet/CoverSheetActions';
|
|
|
24
24
|
import './components/currency/Currency';
|
|
25
25
|
import './components/currency/DualCurrency';
|
|
26
26
|
import './components/danger-zone/DangerZone';
|
|
27
|
-
import './components/dark-mode-wrapper/DarkModeWrapper';
|
|
28
27
|
import './components/dialog/Dialog';
|
|
29
28
|
import './components/divider/Divider';
|
|
30
29
|
import './components/drop-zone/DropZone';
|
|
@@ -64,6 +63,7 @@ import './components/menu/Menu';
|
|
|
64
63
|
import './components/menu/MenuItem';
|
|
65
64
|
import './components/nested-data-table/NestedDataTable';
|
|
66
65
|
import './components/nested-data-table/NestedDataTableHasura';
|
|
66
|
+
import './components/night-mode-wrapper/NightModeWrapper';
|
|
67
67
|
import './components/ownership-block/OwnershipBlock';
|
|
68
68
|
import './components/pivot-table/PivotTable';
|
|
69
69
|
import './components/profile-icon/ProfileIcon';
|
|
@@ -80,6 +80,7 @@ import './components/select/CountryPhoneSelect';
|
|
|
80
80
|
import './components/select/CountrySelect';
|
|
81
81
|
import './components/select/MultiSelect';
|
|
82
82
|
import './components/select/Select';
|
|
83
|
+
import './components/select/ThemeSelect';
|
|
83
84
|
import './components/skeleton/Skeleton';
|
|
84
85
|
import './components/slide-over/SlideOver';
|
|
85
86
|
import './components/slider/Slider';
|
|
@@ -778,6 +779,7 @@ import './utils/getProductDetails';
|
|
|
778
779
|
import './utils/getTestId';
|
|
779
780
|
import './utils/handleFetch';
|
|
780
781
|
import './utils/hooks/action-pivot-table/useHasuraGqlPagination';
|
|
782
|
+
import './utils/hooks/useAminoTheme';
|
|
781
783
|
import './utils/hooks/useCurrentShema';
|
|
782
784
|
import './utils/hooks/useDropdown';
|
|
783
785
|
import './utils/hooks/useNotify';
|
package/amino.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-fe391a2e.js"),r=require("react/jsx-runtime"),i=require("react"),t=require("./AlertDialog.js");require("../button/Button.js"),require("../spinner/Spinner.js"),require("../../styles/constants/theme.js"),require("styled-components"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../dialog/_BaseDialog.js"),require("
|
|
1
|
+
"use strict";var e=require("../../_tslib-fe391a2e.js"),r=require("react/jsx-runtime"),i=require("react"),t=require("./AlertDialog.js");require("../button/Button.js"),require("../spinner/Spinner.js"),require("../../styles/constants/theme.js"),require("styled-components"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../dialog/_BaseDialog.js"),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");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,e.__assign({value:d},{children:[u,a&&r.jsx(t.AlertDialog,{open:q,label:a.label,subtitle:a.subtitle,intent:a.intent,dismissText:a.dismissText,dismissAction:function(){j(!1),a.onDismiss()}})]}))};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import type
|
|
2
|
+
import { type Intent } from "../../types/Intent";
|
|
3
|
+
import { type Theme } from "../../types/Theme";
|
|
4
4
|
export type AlertDialogProps = {
|
|
5
5
|
open: boolean;
|
|
6
6
|
label: string;
|
|
7
|
-
|
|
7
|
+
themeOverride?: Theme;
|
|
8
8
|
subtitle: ReactNode;
|
|
9
9
|
intent: Intent;
|
|
10
10
|
dismissText: string;
|
|
11
11
|
dismissAction: () => void;
|
|
12
12
|
};
|
|
13
|
-
export declare const AlertDialog: ({
|
|
13
|
+
export declare const AlertDialog: ({ themeOverride, open, label, intent, subtitle, dismissText, dismissAction, }: AlertDialogProps) => JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-fe391a2e.js"),n=require("react/jsx-runtime"),t=require("../button/Button.js"),i=require("../dialog/_BaseDialog.js"),r=require("../rounded-icon/RoundedIcon.js"),s=require("../stack/VStack.js"),a=require("../text/Text.js"),c=require("../../icons/ExclamationMarkIcon.js"),o=require("../../icons/HelpIcon.js"),u=require("../../icons/WarningIcon.js"),l=require("../../styles/constants/theme.js"),d=require("styled-components");function p(e){return e&&e.__esModule?e:{default:e}}require("react"),require("../spinner/Spinner.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("
|
|
1
|
+
"use strict";var e=require("../../_tslib-fe391a2e.js"),n=require("react/jsx-runtime"),t=require("../button/Button.js"),i=require("../dialog/_BaseDialog.js"),r=require("../rounded-icon/RoundedIcon.js"),s=require("../stack/VStack.js"),a=require("../text/Text.js"),c=require("../../icons/ExclamationMarkIcon.js"),o=require("../../icons/HelpIcon.js"),u=require("../../icons/WarningIcon.js"),l=require("../../styles/constants/theme.js"),d=require("styled-components");function p(e){return e&&e.__esModule?e:{default:e}}require("react"),require("../spinner/Spinner.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../backdrop/Backdrop.js"),require("../stack/Stack.js"),require("../../icons/icon-base/_IconBase.js");var j,m,x,g=p(d),q=g.default.div(j||(j=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"])),l.theme.space24),_=g.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"])),l.theme.space24,l.theme.space8),f=g.default.span(x||(x=e.__makeTemplateObject(["\n opacity: 0.5;\n"],["\n opacity: 0.5;\n"]))),h=function(e){switch(e){case"danger":return n.jsx(c.ExclamationMarkIcon,{});case"warning":return n.jsx(u.WarningIcon,{});default:return n.jsx(o.HelpIcon,{})}};exports.AlertDialog=function(c){var o=c.themeOverride,u=c.open,l=c.label,d=c.intent,p=c.subtitle,j=c.dismissText,m=c.dismissAction;return n.jsx(i.BaseDialog,e.__assign({width:350,"data-theme":o,open:u,onClose:m},{children:n.jsx(q,{children:n.jsxs(s.VStack,e.__assign({spacing:16},{children:[n.jsx(r.RoundedIcon,e.__assign({intent:d},{children:h(d)})),n.jsxs("div",{children:[n.jsx(a.Text,e.__assign({type:"title"},{children:l})),n.jsx(f,{children:p})]}),n.jsx(_,{children:n.jsx(t.Button,e.__assign({onClick:m,intent:d},{children:j}))})]}))})}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react"),r=require("./AlertContext.js");require("../../_tslib-fe391a2e.js"),require("react/jsx-runtime"),require("./AlertDialog.js"),require("../button/Button.js"),require("../spinner/Spinner.js"),require("../../styles/constants/theme.js"),require("styled-components"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../dialog/_BaseDialog.js"),require("
|
|
1
|
+
"use strict";var e=require("react"),r=require("./AlertContext.js");require("../../_tslib-fe391a2e.js"),require("react/jsx-runtime"),require("./AlertDialog.js"),require("../button/Button.js"),require("../spinner/Spinner.js"),require("../../styles/constants/theme.js"),require("styled-components"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../dialog/_BaseDialog.js"),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");exports.useAlert=function(){return e.useContext(r.AlertContext)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var n=require("../../_tslib-fe391a2e.js"),o=require("react/jsx-runtime"),e=require("../../styles/constants/theme.js");function r(n){return n&&n.__esModule?n:{default:n}}var c,l,
|
|
1
|
+
"use strict";var n=require("../../_tslib-fe391a2e.js"),o=require("react/jsx-runtime"),e=require("../../styles/constants/theme.js");function r(n){return n&&n.__esModule?n:{default:n}}var c,l,g=r(require("styled-components")),d=g.default.div(c||(c=n.__makeTemplateObject(["\n display: inline-block;\n"],["\n display: inline-block;\n"]))),i=g.default.div(l||(l=n.__makeTemplateObject(["\n display: flex;\n gap: ",";\n font-size: ",";\n padding: 2px 6px;\n text-align: center;\n border-radius: ",";\n background-color: ",";\n color: ",";\n align-items: center;\n\n p {\n margin: 0;\n font-weight: ",";\n line-height: 16px;\n }\n svg {\n order: ",";\n }\n\n &.bold {\n // bold config default (gray)\n background-color: ",";\n color: ",";\n & svg {\n color: ",";\n }\n }\n\n // size\n &.large {\n padding: 4px 8px;\n }\n\n &.blue {\n // color config\n background-color: ",";\n color: ",";\n &.bold {\n // bold config\n background-color: ",";\n color: ",";\n & svg {\n color: ",";\n }\n }\n }\n\n &.green {\n // color config\n background-color: ",";\n color: ",";\n &.bold {\n // bold config\n background-color: ",";\n color: ",";\n & svg {\n color: ",";\n }\n }\n }\n\n &.red {\n // color config\n background-color: ",";\n color: ",";\n &.bold {\n // bold config\n background-color: ",";\n color: ",";\n & svg {\n color: ",";\n }\n }\n }\n\n &.orange {\n // color config\n background-color: ",";\n color: ",";\n &.bold {\n // bold config\n background-color: ",";\n color: ",";\n & svg {\n color: ",";\n }\n }\n }\n\n &.purple {\n // color config\n background-color: ",";\n color: ",";\n &.bold {\n // bold config\n background-color: ",";\n color: ",";\n & svg {\n color: ",";\n }\n }\n }\n\n &.cyan {\n // color config\n background-color: ",";\n color: ",";\n &.bold {\n // bold config\n background-color: ",";\n color: ",";\n }\n }\n"],["\n display: flex;\n gap: ",";\n font-size: ",";\n padding: 2px 6px;\n text-align: center;\n border-radius: ",";\n background-color: ",";\n color: ",";\n align-items: center;\n\n p {\n margin: 0;\n font-weight: ",";\n line-height: 16px;\n }\n svg {\n order: ",";\n }\n\n &.bold {\n // bold config default (gray)\n background-color: ",";\n color: ",";\n & svg {\n color: ",";\n }\n }\n\n // size\n &.large {\n padding: 4px 8px;\n }\n\n &.blue {\n // color config\n background-color: ",";\n color: ",";\n &.bold {\n // bold config\n background-color: ",";\n color: ",";\n & svg {\n color: ",";\n }\n }\n }\n\n &.green {\n // color config\n background-color: ",";\n color: ",";\n &.bold {\n // bold config\n background-color: ",";\n color: ",";\n & svg {\n color: ",";\n }\n }\n }\n\n &.red {\n // color config\n background-color: ",";\n color: ",";\n &.bold {\n // bold config\n background-color: ",";\n color: ",";\n & svg {\n color: ",";\n }\n }\n }\n\n &.orange {\n // color config\n background-color: ",";\n color: ",";\n &.bold {\n // bold config\n background-color: ",";\n color: ",";\n & svg {\n color: ",";\n }\n }\n }\n\n &.purple {\n // color config\n background-color: ",";\n color: ",";\n &.bold {\n // bold config\n background-color: ",";\n color: ",";\n & svg {\n color: ",";\n }\n }\n }\n\n &.cyan {\n // color config\n background-color: ",";\n color: ",";\n &.bold {\n // bold config\n background-color: ",";\n color: ",";\n }\n }\n"])),e.theme.space8,e.theme.fontSizeS,(function(n){return n.rounded?"20px":e.theme.radius6}),e.theme.gray100,e.theme.gray800,(function(n){return n.fontWeight||"600"}),(function(n){return n.iconRight?"2":""}),e.theme.gray600,e.theme.gray100,e.theme.gray100,e.theme.blue100,e.theme.blue800,e.theme.blue600,e.theme.blue100,e.theme.blue100,e.theme.green100,e.theme.green800,e.theme.green600,e.theme.green100,e.theme.green100,e.theme.red100,e.theme.red800,e.theme.red600,e.theme.red100,e.theme.red100,e.theme.orange100,e.theme.orange800,e.theme.orange600,e.theme.orange100,e.theme.orange100,e.theme.purple100,e.theme.purple800,e.theme.purple600,e.theme.purple100,e.theme.purple100,e.theme.cyan100,e.theme.cyan800,e.theme.cyan600,e.theme.cyan100);exports.Badge=function(e){var r=e.children,c=e.className,l=e.color,g=void 0===l?"gray":l,t=e.fontWeight,a=e.icon,b=e.iconRight,u=e.bold,s=e.rounded,h=void 0!==s&&s,m=e.size,f=void 0===m?"large":m;return o.jsx(d,n.__assign({className:c},{children:o.jsxs(i,n.__assign({rounded:h,bold:!!u,fontWeight:t,iconRight:b,color:g,size:f,className:[g,f,u?"bold":""].join(" ")},{children:[a,o.jsx("p",{children:r})]}))}))};
|
|
@@ -29,7 +29,7 @@ type ButtonBase = {
|
|
|
29
29
|
/** Color for the spinner when in a loading state */
|
|
30
30
|
spinnerColor?: SpinnerProps['color'];
|
|
31
31
|
tabIndex?: number;
|
|
32
|
-
|
|
32
|
+
themeOverride?: Theme;
|
|
33
33
|
type?: 'button' | 'reset' | 'submit';
|
|
34
34
|
};
|
|
35
35
|
export type GroupTag = 'div' | 'a' | 'button';
|
|
@@ -38,5 +38,5 @@ export type ButtonProps<T extends GroupTag = 'button'> = ButtonBase & Omit<Compo
|
|
|
38
38
|
onClick?: MouseEventHandler<MyHtmlElement<T>>;
|
|
39
39
|
tag?: T;
|
|
40
40
|
};
|
|
41
|
-
export declare function Button<T extends GroupTag = 'button'>({ children, className, disabled, icon, iconRight, intent, loading, loadingText, noRipple, size, spinnerColor, tag: _tag,
|
|
41
|
+
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>): JSX.Element;
|
|
42
42
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var n=require("../../_tslib-fe391a2e.js"),e=require("react/jsx-runtime"),r=require("react"),o=require("../spinner/Spinner.js"),t=require("../../styles/constants/theme.js"),a=require("styled-components"),i=require("./RippleGroup.js"),c=require("./useRipple.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(a),x=function(n){return"inherit"===n?"inherit":n?t.theme[n]:void 0},_=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"])),t.theme.radius4,t.theme.space8),y=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,")")}),t.theme.space16,t.theme.radius6,t.theme.transition,t.theme.fontSans,(function(n){return function(n){switch(n){case"sm":return"6px 10px";case"lg":return"14px 18px";default:return"10px 14px"}}(n.size)}),(function(n){return"var(--amino-size-".concat(n.size,")")}),t.theme.space8,t.theme.space8),j=v.default(y)(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: white;\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: white;\n }\n }\n\n "," {\n background: ",";\n }\n"])),(function(n){return x(n.background)||t.theme.primary}),(function(n){return x(n.color)||t.theme.textLight}),t.theme.blue400,t.theme.blue700,_,t.theme.primary),w=v.default(y)(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 /** Dark mode */\n &.dark {\n color: white;\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 /** Dark mode */\n &.dark {\n color: white;\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 x(n.color)||t.theme.textColor}),(function(n){return x(n.background)||t.theme.gray100}),t.theme.gray200,t.theme.blue100,t.theme.blue600,_,t.theme.gray100,t.theme.gray1000,t.theme.gray900,t.theme.blue1000,t.theme.blue300,_,t.theme.gray1000),R=v.default(y)(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 x(n.background)||t.theme.red600}),(function(n){return x(n.color)||"white"}),t.theme.red400,t.theme.red700,_,t.theme.red600),z=v.default(y)(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 x(n.background)||t.theme.orange600}),(function(n){return x(n.color)||"white"}),t.theme.orange400,t.theme.orange700,_,t.theme.orange600),C=v.default(y)(p||(p=n.__makeTemplateObject(["\n background: ",";\n color: ",";\n border: 1px solid ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n border: 1px solid ",";\n }\n &:active {\n background: ",";\n color: ",";\n border: 1px solid ",";\n }\n }\n\n "," {\n background: white;\n }\n"],["\n background: ",";\n color: ",";\n border: 1px solid ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n border: 1px solid ",";\n }\n &:active {\n background: ",";\n color: ",";\n border: 1px solid ",";\n }\n }\n\n "," {\n background: white;\n }\n"])),(function(n){return x(n.background)||"white"}),(function(n){return x(n.color)||t.theme.textColor}),(function(n){return x(n.borderColor)||t.theme.gray200}),t.theme.gray100,t.theme.gray200,t.theme.blue100,t.theme.blue600,t.theme.blue300,_),T=v.default(y)(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 x(n.background)||"none"}),(function(n){return x(n.color)||t.theme.gray800}),t.theme.gray100,t.theme.blue100,t.theme.blue600),q=v.default(y)(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 x(n.color)||t.theme.gray800}),t.theme.gray400,t.theme.gray700,t.theme.black),O=y,G=v.default(y)(k||(k=n.__makeTemplateObject(["\n color: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n color: ",";\n }\n }\n\n "," {\n background: white;\n }\n"],["\n color: ",";\n background: ",";\n\n &:not([disabled]) {\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n color: ",";\n }\n }\n\n "," {\n background: white;\n }\n"])),(function(n){return x(n.color)||t.theme.blue600}),(function(n){return x(n.background)||"white"}),t.theme.gray100,t.theme.blue100,t.theme.blue800,_);exports.Button=function(t){var a=t.children,l=t.className,d=t.disabled,s=void 0!==d&&d,u=t.icon,g=t.iconRight,h=t.intent,b=void 0===h?"secondary":h,p=t.loading,m=void 0!==p&&p,f=t.loadingText,k=t.noRipple,v=void 0!==k&&k,x=t.size,y=void 0===x?"sm":x,N=t.spinnerColor,S=t.tag,B=t.theme,D=t.type,E=void 0===D?"button":D,F=n.__rest(t,["children","className","disabled","icon","iconRight","intent","loading","loadingText","noRipple","size","spinnerColor","tag","theme","type"]),H=S||"button",L=function(n){return e.jsxs(e.Fragment,{children:[!g&&u,a,g&&u,"plain"!==b&&m&&e.jsxs(_,{children:[e.jsx(o.Spinner,{size:16,color:n}),f]})]})},M=[l||"",u&&!a?"only-icon":"",g?"icon-right":"",u?"has-icon":"",m?"loading":"",B].filter(Boolean).join(" "),A=r.useRef(null),I=c.useRipple({rippleRef:A,rippleEnabled:!v&&!["plain","text"].includes(b),disabled:s||m}),J=I.rippleEnabled,K=I.getRippleHandlers,P={className:M,disabled:s||m,size:y},Q=n.__assign(n.__assign(n.__assign({type:E},P),F),K(F));switch(b){case"primary":return e.jsxs(j,n.__assign({as:H},Q,{children:[L(N||"white"),J&&e.jsx(i.RippleGroup,{ref:A})]}));case"subtle":return e.jsxs(T,n.__assign({as:H},Q,{children:[L(N),J&&e.jsx(i.RippleGroup,{ref:A})]}));case"outline":return e.jsxs(C,n.__assign({as:H},Q,{children:[L(N),J&&e.jsx(i.RippleGroup,{ref:A})]}));case"warning":return e.jsxs(z,n.__assign({as:H},Q,{children:[L(N||"white"),J&&e.jsx(i.RippleGroup,{ref:A})]}));case"danger":return e.jsxs(R,n.__assign({as:H},Q,{children:[L(N||"white"),J&&e.jsx(i.RippleGroup,{ref:A})]}));case"text":return e.jsx(q,n.__assign({as:H},Q,{children:L(N)}));case"link":return e.jsxs(G,n.__assign({as:H},Q,{children:[L(N),J&&e.jsx(i.RippleGroup,{ref:A})]}));case"plain":return e.jsx(O,n.__assign({as:H},Q,{children:L(N)}));default:return e.jsxs(w,n.__assign({as:H},Q,{children:[L(N),J&&e.jsx(i.RippleGroup,{ref:A})]}))}};
|
|
1
|
+
"use strict";var n=require("../../_tslib-fe391a2e.js"),e=require("react/jsx-runtime"),r=require("react"),o=require("../spinner/Spinner.js"),t=require("../../styles/constants/theme.js"),a=require("styled-components"),i=require("./RippleGroup.js"),c=require("./useRipple.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(a),x=function(n){return"inherit"===n?"inherit":n?t.theme[n]:void 0},y=v.default.span(s||(s=n.__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: ",";\n gap: ",";\n"],["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: ",";\n gap: ",";\n"])),t.theme.radius4,t.theme.space8),_=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 {\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,")")}),t.theme.space16,t.theme.radius6,t.theme.transition,t.theme.fontSans,(function(n){return function(n){switch(n){case"sm":return"6px 10px";case"lg":return"14px 18px";default:return"10px 14px"}}(n.size)}),(function(n){return"var(--amino-size-".concat(n.size,")")}),t.theme.space8,t.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 x(n.background)||t.theme.primary}),(function(n){return x(n.color)||t.theme.gray0}),t.theme.blue400,t.theme.blue700,t.theme.gray0,y,t.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 x(n.color)||t.theme.textColor}),(function(n){return x(n.background)||t.theme.gray100}),t.theme.gray200,t.theme.blue100,t.theme.blue600,y,t.theme.gray100,t.theme.gray0,t.theme.gray1000,t.theme.gray900,t.theme.blue1000,t.theme.blue300,y,t.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 x(n.background)||t.theme.red600}),(function(n){return x(n.color)||t.theme.gray0}),t.theme.red400,t.theme.red700,y,t.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 x(n.background)||t.theme.orange600}),(function(n){return x(n.color)||t.theme.gray0}),t.theme.orange400,t.theme.orange700,y,t.theme.orange600),C=v.default(_)(p||(p=n.__makeTemplateObject(["\n color: ",";\n border: 1px solid ",";\n\n &:not([disabled]) {\n &:hover {\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: ",";\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 x(n.color)||t.theme.textColor}),(function(n){return x(n.borderColor)||t.theme.gray200}),t.theme.gray100,t.theme.gray200,t.theme.blue100,t.theme.blue600,t.theme.blue300,y,t.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 x(n.background)||"none"}),(function(n){return x(n.color)||t.theme.gray800}),t.theme.gray100,t.theme.blue100,t.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 x(n.color)||t.theme.gray800}),t.theme.gray400,t.theme.gray700,t.theme.gray1200),q=_,G=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 x(n.color)||t.theme.blue600}),t.theme.gray100,t.theme.blue100,t.theme.blue800,y,t.theme.gray0);exports.Button=function(t){var a=t.children,l=t.className,s=t.disabled,d=void 0!==s&&s,u=t.icon,g=t.iconRight,h=t.intent,b=void 0===h?"secondary":h,p=t.loading,m=void 0!==p&&p,f=t.loadingText,k=t.noRipple,v=void 0!==k&&k,x=t.size,_=void 0===x?"sm":x,N=t.spinnerColor,S=t.tag,B=t.themeOverride,E=t.type,F=void 0===E?"button":E,H=n.__rest(t,["children","className","disabled","icon","iconRight","intent","loading","loadingText","noRipple","size","spinnerColor","tag","themeOverride","type"]),M=S||"button",A=function(n){return e.jsxs(e.Fragment,{children:[!g&&u,a,g&&u,"plain"!==b&&m&&e.jsxs(y,{children:[e.jsx(o.Spinner,{size:16,color:n}),f]})]})},D=[l||"",u&&!a?"only-icon":"",g?"icon-right":"",u?"has-icon":"",m?"loading":"",B].filter(Boolean).join(" "),I=r.useRef(null),J=c.useRipple({rippleRef:I,rippleEnabled:!v&&!["plain","text"].includes(b),disabled:d||m}),K=J.rippleEnabled,L=J.getRippleHandlers,P={className:D,disabled:d||m,size:_},Q=n.__assign(n.__assign(n.__assign({type:F},P),H),L(H));switch(b){case"primary":return e.jsxs(j,n.__assign({as:M},Q,{children:[A(N||"white"),K&&e.jsx(i.RippleGroup,{ref:I})]}));case"subtle":return e.jsxs(O,n.__assign({as:M},Q,{children:[A(N),K&&e.jsx(i.RippleGroup,{ref:I})]}));case"outline":return e.jsxs(C,n.__assign({as:M},Q,{children:[A(N),K&&e.jsx(i.RippleGroup,{ref:I})]}));case"warning":return e.jsxs(z,n.__assign({as:M},Q,{children:[A(N||"white"),K&&e.jsx(i.RippleGroup,{ref:I})]}));case"danger":return e.jsxs(R,n.__assign({as:M},Q,{children:[A(N||"white"),K&&e.jsx(i.RippleGroup,{ref:I})]}));case"text":return e.jsx(T,n.__assign({as:M},Q,{children:A(N)}));case"link":return e.jsxs(G,n.__assign({as:M},Q,{children:[A(N),K&&e.jsx(i.RippleGroup,{ref:I})]}));case"plain":return e.jsx(q,n.__assign({as:M},Q,{children:A(N)}));default:return e.jsxs(w,n.__assign({as:M},Q,{children:[A(N),K&&e.jsx(i.RippleGroup,{ref:I})]}))}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var n=require("../../_tslib-fe391a2e.js"),e=require("react/jsx-runtime"),t=require("react"),i=require("framer-motion"),r=require("../text/Text.js"),
|
|
1
|
+
"use strict";var n=require("../../_tslib-fe391a2e.js"),e=require("react/jsx-runtime"),t=require("react"),i=require("framer-motion"),r=require("../text/Text.js"),a=require("../../icons/CheckmarkIcon.js"),o=require("../../styles/constants/theme.js"),s=require("../../utils/getTestId.js"),c=require("styled-components");function l(n){return n&&n.__esModule?n:{default:n}}require("../../icons/icon-base/_IconBase.js");var d,h,u,m,p,x,g=l(c),b=i.motion(a.CheckmarkIcon),f=g.default.div(d||(d=n.__makeTemplateObject(["\n width: 16px;\n height: 16px;\n min-width: 16px;\n min-height: 16px;\n line-height: 16px;\n border-radius: ",";\n background: ",";\n border: ",";\n transition: all 150ms ease-in-out;\n display: flex;\n align-items: center;\n justify-content: center;\n user-select: none;\n margin-right: 8px;\n\n &:active {\n box-shadow: ",";\n }\n\n svg {\n color: ",";\n box-shadow: ",";\n width: 14px;\n height: 14px;\n }\n"],["\n width: 16px;\n height: 16px;\n min-width: 16px;\n min-height: 16px;\n line-height: 16px;\n border-radius: ",";\n background: ",";\n border: ",";\n transition: all 150ms ease-in-out;\n display: flex;\n align-items: center;\n justify-content: center;\n user-select: none;\n margin-right: 8px;\n\n &:active {\n box-shadow: ",";\n }\n\n svg {\n color: ",";\n box-shadow: ",";\n width: 14px;\n height: 14px;\n }\n"])),o.theme.radius4,(function(n){return n.checked?o.theme.primary:o.theme.inputBackground}),(function(n){return n.checked?"none":"1.5px solid ".concat(o.theme.gray400)}),o.theme.glowBlue,o.theme.gray0,o.theme.v3ShadowBase),k=g.default(r.Text)(h||(h=n.__makeTemplateObject([""],[""]))),j=g.default.span(u||(u=n.__makeTemplateObject(["\n margin-left: 4px;\n color: ",";\n"],["\n margin-left: 4px;\n color: ",";\n"])),o.theme.gray600),y=g.default(r.Text)(m||(m=n.__makeTemplateObject(["\n margin-bottom: 0;\n"],["\n margin-bottom: 0;\n"]))),_=g.default.div(p||(p=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n line-height: 16px;\n\n svg {\n margin-right: 4px;\n }\n"],["\n display: flex;\n align-items: center;\n line-height: 16px;\n\n svg {\n margin-right: 4px;\n }\n"]))),w=g.default.label(x||(x=n.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n user-select: none;\n cursor: pointer;\n\n &.disabled {\n "," {\n background: ",";\n border: ",";\n &:active {\n box-shadow: none;\n }\n }\n "," {\n color: ",";\n }\n "," {\n color: ",";\n }\n "," {\n svg {\n opacity: 0.6;\n }\n }\n\n cursor: not-allowed;\n }\n"],["\n display: flex;\n flex-direction: row;\n user-select: none;\n cursor: pointer;\n\n &.disabled {\n "," {\n background: ",";\n border: ",";\n &:active {\n box-shadow: none;\n }\n }\n "," {\n color: ",";\n }\n "," {\n color: ",";\n }\n "," {\n svg {\n opacity: 0.6;\n }\n }\n\n cursor: not-allowed;\n }\n"])),f,(function(n){return n.checked?o.theme.blue200:""}),(function(n){return n.checked?"2px solid ".concat(o.theme.blue200):"1.5px solid ".concat(o.theme.gray300)}),y,o.theme.gray600,k,o.theme.gray400,_);exports.Checkbox=function(r){var a=r.checked,o=void 0!==a&&a,c=r.disabled,l=r.icon,d=r.label,h=r.labelComponent,u=r.labelDescription,m=r.onChange,p=r.subtitle,x=t.useMemo((function(){return s.getTestId({componentName:"checkbox",name:d})}),[d]);return e.jsxs(w,n.__assign({"data-testid":x,className:["amino-input-wrapper",c?"disabled":""].join(" "),checked:o,htmlFor:d,onClick:function(n){return!c&&m(!o,n)}},{children:[e.jsx(f,n.__assign({checked:o,id:d},{children:e.jsx(i.AnimatePresence,{children:o&&e.jsx(b,{transition:{ease:[.4,0,.2,1],duration:.35},initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1}},"checkbox")})})),h||e.jsxs("div",{children:[e.jsxs(_,{children:[l,e.jsxs(y,n.__assign({type:"input-label"},{children:[d,u&&e.jsx(j,{children:u})]}))]}),p&&e.jsx(k,n.__assign({type:"subtitle"},{children:p}))]})]}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-fe391a2e.js"),
|
|
1
|
+
"use strict";var e=require("../../_tslib-fe391a2e.js"),t=require("react/jsx-runtime"),i=require("react");function n(e){return e&&e.__esModule?e:{default:e}}var r,o=n(require("styled-components")).default.div(r||(r=e.__makeTemplateObject(["\n position: relative;\n transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n overflow: ",";\n visibility: ",";\n height: ",";\n"],["\n position: relative;\n transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n overflow: ",";\n visibility: ",";\n height: ",";\n"])),(function(e){return e.hideOverflow?"hidden":void 0}),(function(e){return e.completelyCollapsed?"hidden":void 0}),(function(e){return e.currentlyCollapsed?"".concat(e.collapseSize,"px"):"".concat(e.$height,"px")}));exports.Collapse=function(n){var r=n.className,l=n.children,s=n.collapsed,a=void 0!==s&&s,c=n.collapseSize,u=void 0===c?0:c,d=e.__read(i.useState(a),2),p=d[0],h=d[1],f=e.__read(i.useState(a),2),v=f[0],m=f[1],_=e.__read(i.useState(),2),g=_[0],b=_[1],y=i.useRef(null),S=function(){if(null!==y.current){var e=window.getComputedStyle(y.current);return parseFloat(e.height)+parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth)+parseFloat(e.marginTop)+parseFloat(e.marginBottom)}};i.useEffect((function(){b(S())}),[]),i.useEffect((function(){m(!0),a||h(!1)}),[a]);return t.jsx(o,e.__assign({className:r,currentlyCollapsed:a,completelyCollapsed:p,hideOverflow:v,onTransitionEnd:function(){a?(m(!0),h(!0)):(m(!1),h(!1),b(S()))},$height:g,collapseSize:u},{children:t.jsx("div",e.__assign({style:{position:"relative"},ref:y},{children:l}))}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-fe391a2e.js"),r=require("react/jsx-runtime"),i=require("react"),n=require("./ConfirmDialog.js");require("../button/Button.js"),require("../spinner/Spinner.js"),require("../../styles/constants/theme.js"),require("styled-components"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../dialog/_BaseDialog.js"),require("
|
|
1
|
+
"use strict";var e=require("../../_tslib-fe391a2e.js"),r=require("react/jsx-runtime"),i=require("react"),n=require("./ConfirmDialog.js");require("../button/Button.js"),require("../spinner/Spinner.js"),require("../../styles/constants/theme.js"),require("styled-components"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../dialog/_BaseDialog.js"),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");var t=i.createContext((function(e){}));exports.ConfirmContext=t,exports.ConfirmContextProvider=function(s){var o=s.children,u=e.__read(i.useState(),2),c=u[0],a=u[1],l=e.__read(i.useState(!1),2),q=l[0],j=l[1],d=i.useCallback((function(e){a(e),j(!0)}),[]);return r.jsxs(t.Provider,e.__assign({value:d},{children:[o,c&&r.jsx(n.ConfirmDialog,{open:q,label:c.label,subtitle:c.subtitle,intent:c.intent,dismissText:c.dismissText,confirmText:c.confirmText,dismissAction:function(){j(!1),c.onConfirm(!1)},confirmAction:function(){j(!1),c.onConfirm(!0)}})]}))};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { IAminoTheme } from "../../types/IAminoTheme";
|
|
3
2
|
import type { Intent } from "../../types/Intent";
|
|
3
|
+
import type { Theme } from "../../types/Theme";
|
|
4
4
|
export type ConfirmDialogProps = {
|
|
5
5
|
open: boolean;
|
|
6
6
|
label: string;
|
|
7
|
-
|
|
7
|
+
themeOverride?: Theme;
|
|
8
8
|
subtitle?: ReactNode;
|
|
9
9
|
intent: Intent;
|
|
10
10
|
confirmText?: string;
|
|
@@ -12,4 +12,4 @@ export type ConfirmDialogProps = {
|
|
|
12
12
|
confirmAction: () => void;
|
|
13
13
|
dismissAction: () => void;
|
|
14
14
|
};
|
|
15
|
-
export declare const ConfirmDialog: ({
|
|
15
|
+
export declare const ConfirmDialog: ({ themeOverride, open, label, intent, subtitle, confirmText, dismissText, confirmAction, dismissAction, }: ConfirmDialogProps) => JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-fe391a2e.js"),n=require("react/jsx-runtime"),t=require("../button/Button.js"),i=require("../dialog/_BaseDialog.js"),r=require("../rounded-icon/RoundedIcon.js"),s=require("../stack/VStack.js"),a=require("../text/Text.js"),c=require("../../icons/ExclamationMarkIcon.js"),o=require("../../icons/HelpIcon.js"),u=require("../../icons/WarningIcon.js"),l=require("../../styles/constants/theme.js"),d=require("styled-components");function j(e){return e&&e.__esModule?e:{default:e}}require("react"),require("../spinner/Spinner.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("
|
|
1
|
+
"use strict";var e=require("../../_tslib-fe391a2e.js"),n=require("react/jsx-runtime"),t=require("../button/Button.js"),i=require("../dialog/_BaseDialog.js"),r=require("../rounded-icon/RoundedIcon.js"),s=require("../stack/VStack.js"),a=require("../text/Text.js"),c=require("../../icons/ExclamationMarkIcon.js"),o=require("../../icons/HelpIcon.js"),u=require("../../icons/WarningIcon.js"),l=require("../../styles/constants/theme.js"),d=require("styled-components");function j(e){return e&&e.__esModule?e:{default:e}}require("react"),require("../spinner/Spinner.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../backdrop/Backdrop.js"),require("../stack/Stack.js"),require("../../icons/icon-base/_IconBase.js");var p,m,x,g=j(d),f=g.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"])),l.theme.space24),_=g.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"])),l.theme.space24,l.theme.space8),q=g.default.span(x||(x=e.__makeTemplateObject(["\n opacity: 0.5;\n"],["\n opacity: 0.5;\n"]))),h=function(e){switch(e){case"danger":return n.jsx(c.ExclamationMarkIcon,{});case"warning":return n.jsx(u.WarningIcon,{});default:return n.jsx(o.HelpIcon,{})}};exports.ConfirmDialog=function(c){var o=c.themeOverride,u=c.open,l=c.label,d=c.intent,j=c.subtitle,p=c.confirmText,m=c.dismissText,x=c.confirmAction,g=c.dismissAction;return n.jsx(i.BaseDialog,e.__assign({width:350,"data-theme":o,open:u},{children:n.jsx(f,{children:n.jsxs(s.VStack,e.__assign({spacing:16},{children:[n.jsx(r.RoundedIcon,e.__assign({intent:d},{children:h(d)})),n.jsxs("div",{children:[n.jsx(a.Text,e.__assign({type:"title"},{children:l})),j&&n.jsx(q,{children:j})]}),n.jsxs(_,{children:[n.jsx(t.Button,e.__assign({size:"md",onClick:g,intent:"outline"},{children:m})),n.jsx(t.Button,e.__assign({size:"md",onClick:x,intent:d},{children:p}))]})]}))})}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react"),r=require("./ConfirmContext.js");require("../../_tslib-fe391a2e.js"),require("react/jsx-runtime"),require("./ConfirmDialog.js"),require("../button/Button.js"),require("../spinner/Spinner.js"),require("../../styles/constants/theme.js"),require("styled-components"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../dialog/_BaseDialog.js"),require("
|
|
1
|
+
"use strict";var e=require("react"),r=require("./ConfirmContext.js");require("../../_tslib-fe391a2e.js"),require("react/jsx-runtime"),require("./ConfirmDialog.js"),require("../button/Button.js"),require("../spinner/Spinner.js"),require("../../styles/constants/theme.js"),require("styled-components"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../dialog/_BaseDialog.js"),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");exports.useConfirm=function(){return e.useContext(r.ConfirmContext)};
|
|
@@ -9,4 +9,4 @@ export type CoverSheetProps = {
|
|
|
9
9
|
actionWrapperId?: string;
|
|
10
10
|
actions?: ReactNode;
|
|
11
11
|
};
|
|
12
|
-
export declare const CoverSheet: ({ className, open, label, onClose, children, actionWrapperId, actions, }: CoverSheetProps) =>
|
|
12
|
+
export declare const CoverSheet: ({ className, open, label, onClose, children, actionWrapperId, actions, }: CoverSheetProps) => JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-fe391a2e.js"),n=require("react/jsx-runtime"),t=require("react"),i=require("
|
|
1
|
+
"use strict";var e=require("../../_tslib-fe391a2e.js"),n=require("react/jsx-runtime"),t=require("react"),i=require("framer-motion"),o=require("../text/Text.js"),r=require("../../icons/RemoveIcon.js"),a=require("../../styles/constants/theme.js"),s=require("styled-components"),c=require("../button/Button.js"),d=require("./CoverSheetActions.js");function u(e){return e&&e.__esModule?e:{default:e}}require("../../icons/icon-base/_IconBase.js"),require("../spinner/Spinner.js"),require("../button/RippleGroup.js"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("react-dom"),require("../stack/HStack.js"),require("../stack/Stack.js");var l,p,h,m,g,b=u(s),x=b.default(i.motion.div)(l||(l=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\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\n @media print {\n height: unset;\n min-height: 100vh;\n position: absolute;\n }\n"])),a.theme.pageBackground),f=b.default(c.Button)(p||(p=e.__makeTemplateObject(["\n margin-right: ",";\n"],["\n margin-right: ",";\n"])),a.theme.space24),j=b.default(o.Text)(h||(h=e.__makeTemplateObject(["\n flex-grow: 1;\n"],["\n flex-grow: 1;\n"]))),v=b.default.header(m||(m=e.__makeTemplateObject(["\n background: ",";\n border-bottom: ",";\n\n padding: "," ",";\n display: flex;\n align-items: center;\n height: 64px;\n position: sticky;\n top: 0;\n z-index: 99;\n\n @media print {\n display: none;\n }\n"],["\n background: ",";\n border-bottom: ",";\n\n padding: "," ",";\n display: flex;\n align-items: center;\n height: 64px;\n position: sticky;\n top: 0;\n z-index: 99;\n\n @media print {\n display: none;\n }\n"])),a.theme.surfaceColor,a.theme.border,a.theme.space16,a.theme.space24),_=b.default.div(g||(g=e.__makeTemplateObject(["\n padding: ",";\n"],["\n padding: ",";\n"])),a.theme.space24);exports.CoverSheet=function(o){var a=o.className,s=o.open,c=o.label,u=o.onClose,l=o.children,p=o.actionWrapperId,h=void 0===p?"__cover-sheet-actions":p,m=o.actions,g=e.__read(t.useState(!1),2),b=g[0],q=g[1];return t.useEffect((function(){q(!0)}),[]),t.useEffect((function(){"undefined"!=typeof document&&document.querySelectorAll("[id='".concat(h,"']")).length>1&&console.error('Duplicate id "'.concat(h,'" detected in "CoverSheet" component. Please set "actionWrapperId" to a unique id.'))}),[h]),b?n.jsx(i.AnimatePresence,{children:s&&n.jsxs(x,e.__assign({className:a,transition:{ease:[.4,0,.2,1],duration:.35},initial:{opacity:0,translateY:10},animate:{opacity:1,translateY:0},exit:{opacity:0,translateY:5}},{children:[n.jsxs(v,{children:[n.jsx(f,{icon:n.jsx(r.RemoveIcon,{size:20}),onClick:u}),n.jsx(j,e.__assign({type:"header"},{children:c})),n.jsx("div",e.__assign({id:h},{children:m&&n.jsx(d.CoverSheetActions,e.__assign({coverSheetActionId:h},{children:m}))}))]}),n.jsx(_,{children:l})]}))}):null};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-fe391a2e.js"),n=require("react/jsx-runtime"),t=require("../../styles/constants/theme.js"),r=require("styled-components"),s=require("../text/Text.js");function a(e){return e&&e.__esModule?e:{default:e}}var i,l=a(r).default.span(i||(i=e.__makeTemplateObject(["\n font-feature-settings: 'tnum' 1;\n /** Make it not break line */\n white-space: nowrap;\n display: flex;\n gap: ",";\n"],["\n font-feature-settings: 'tnum' 1;\n /** Make it not break line */\n white-space: nowrap;\n display: flex;\n gap: ",";\n"])),t.theme.space4);exports.Currency=function(t){var r=t.amount,a=t.className,i=t.code,c=new Intl.NumberFormat("en-US",{style:"currency",currency:i}).format(r).replace(/[^0-9.-]+/g,""),u=r<0;return n.jsxs(l,e.__assign({className:a},{children:[n.jsx(s.Text,e.__assign({type:"label",color:u?"red600":"
|
|
1
|
+
"use strict";var e=require("../../_tslib-fe391a2e.js"),n=require("react/jsx-runtime"),t=require("../../styles/constants/theme.js"),r=require("styled-components"),s=require("../text/Text.js");function a(e){return e&&e.__esModule?e:{default:e}}var i,l=a(r).default.span(i||(i=e.__makeTemplateObject(["\n font-feature-settings: 'tnum' 1;\n /** Make it not break line */\n white-space: nowrap;\n display: flex;\n gap: ",";\n"],["\n font-feature-settings: 'tnum' 1;\n /** Make it not break line */\n white-space: nowrap;\n display: flex;\n gap: ",";\n"])),t.theme.space4);exports.Currency=function(t){var r=t.amount,a=t.className,i=t.code,c=new Intl.NumberFormat("en-US",{style:"currency",currency:i}).format(r).replace(/[^0-9.-]+/g,""),u=r<0;return n.jsxs(l,e.__assign({className:a},{children:[n.jsx(s.Text,e.__assign({type:"label",color:u?"red600":"gray1200"},{children:c})),n.jsx(s.Text,e.__assign({color:u?"red400":"gray700"},{children:i.toUpperCase()}))]}))};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Theme } from "../../types/Theme";
|
|
3
3
|
export type DialogProps = {
|
|
4
4
|
actions?: ReactNode;
|
|
5
5
|
className?: string;
|
|
@@ -9,7 +9,7 @@ export type DialogProps = {
|
|
|
9
9
|
leftActions?: ReactNode;
|
|
10
10
|
onClose: () => void;
|
|
11
11
|
open: boolean;
|
|
12
|
-
|
|
12
|
+
themeOverride?: Theme;
|
|
13
13
|
width?: number;
|
|
14
14
|
/** Close when clicking outside dialog (on the backdrop)
|
|
15
15
|
* @default true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-fe391a2e.js"),n=require("react/jsx-runtime"),t=require("react"),a=require("../text/Text.js"),r=require("../../icons/RemoveCircleDuotoneIcon.js"),i=require("../../styles/constants/theme.js"),o=require("styled-components"),s=require("../button/Button.js"),l=require("./_BaseDialog.js");function c(e){return e&&e.__esModule?e:{default:e}}require("../../icons/icon-base/_IconBase.js"),require("../spinner/Spinner.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("
|
|
1
|
+
"use strict";var e=require("../../_tslib-fe391a2e.js"),n=require("react/jsx-runtime"),t=require("react"),a=require("../text/Text.js"),r=require("../../icons/RemoveCircleDuotoneIcon.js"),i=require("../../styles/constants/theme.js"),o=require("styled-components"),s=require("../button/Button.js"),l=require("./_BaseDialog.js");function c(e){return e&&e.__esModule?e:{default:e}}require("../../icons/icon-base/_IconBase.js"),require("../spinner/Spinner.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../backdrop/Backdrop.js");var d=c(o),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"])),i.theme.space24,i.theme.space16,i.theme.radius12,i.theme.radius12,i.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(s.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"])),i.theme.gray200,i.theme.gray800,i.theme.gray300,i.theme.gray400),g=d.default.div(x||(x=e.__makeTemplateObject(["\n flex-grow: 1;\n display: flex;\n"],["\n flex-grow: 1;\n display: flex;\n"]))),u=d.default(g)(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"])),i.theme.space8),f=d.default(g)(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"])),i.theme.space8),b=d.default.div(_||(_=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"])),i.theme.space24,i.theme.radius12,i.theme.radius12,i.theme.space8);o.css(T||(T=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: 0 0, 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: 0 0, 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"])),i.theme.space8,i.theme.space24),z=t.forwardRef((function(t,i){var o=t.actions,s=t.children,c=t.className,d=t.label,g=t.subtitle,k=t.leftActions,v=t.onClose,w=t.open,x=t.themeOverride,y=t.width,j=t.closeOnBlur,_=t.closeOnEsc,T=t.noBorder;return n.jsxs(l.BaseDialog,e.__assign({className:c,"data-theme":x,open:w,width:y,onClose:v,closeOnBlur:j,closeOnEsc:_,noBorder:T},{children:[n.jsxs(h,{children:[n.jsxs(m,{children:[n.jsx(a.Text,e.__assign({type:"title"},{children:d})),n.jsx(p,{noRipple:!0,onClick:v,icon:n.jsx(r.RemoveCircleDuotoneIcon,{size:24})})]}),g&&n.jsx(a.Text,e.__assign({type:"subtitle"},{children:g}))]}),n.jsx(O,e.__assign({ref:i},{children:s})),(o||k)&&n.jsxs(b,{children:[k&&n.jsx(u,{children:k}),o&&n.jsx(f,{children:o})]})]}))}));exports.Dialog=z;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Theme } from "../../types/Theme";
|
|
3
3
|
export type BaseDialogProps = {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
className?: string;
|
|
6
6
|
open: boolean;
|
|
7
|
-
|
|
7
|
+
themeOverride?: Theme;
|
|
8
8
|
width?: number;
|
|
9
9
|
onClose?: () => void;
|
|
10
10
|
closeOnBlur?: boolean;
|
|
11
11
|
closeOnEsc?: boolean;
|
|
12
12
|
noBorder?: boolean;
|
|
13
13
|
};
|
|
14
|
-
export declare const BaseDialog: ({ children, className, open,
|
|
14
|
+
export declare const BaseDialog: ({ children, className, open, themeOverride, width, onClose, closeOnBlur, closeOnEsc, noBorder, }: BaseDialogProps) => JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-fe391a2e.js"),n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";var e=require("../../_tslib-fe391a2e.js"),n=require("react/jsx-runtime"),i=require("react"),t=require("framer-motion"),o=require("../backdrop/Backdrop.js"),r=require("../../styles/constants/theme.js");function a(e){return e&&e.__esModule?e:{default:e}}var d,s,c=a(require("styled-components")),l=c.default.div(d||(d=e.__makeTemplateObject(["\n width: 100vw;\n height: 100vh;\n left: 0;\n top: 0;\n z-index: 1000;\n position: fixed;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ",";\n"],["\n width: 100vw;\n height: 100vh;\n left: 0;\n top: 0;\n z-index: 1000;\n position: fixed;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ",";\n"])),r.theme.textColor),u=c.default(t.motion.div)(s||(s=e.__makeTemplateObject(["\n position: fixed;\n z-index: 1001;\n background: ",";\n width: ","px;\n max-height: 90vh;\n border-radius: ",";\n outline: none;\n box-shadow: ",";\n border: ",";\n overflow: hidden;\n display: flex;\n flex-direction: column;\n"],["\n position: fixed;\n z-index: 1001;\n background: ",";\n width: ","px;\n max-height: 90vh;\n border-radius: ",";\n outline: none;\n box-shadow: ",";\n border: ",";\n overflow: hidden;\n display: flex;\n flex-direction: column;\n"])),r.theme.surfaceColor,(function(e){return e.width}),r.theme.radius12,r.theme.v3ShadowXxl,(function(e){return!e.noBorder&&r.theme.border}));exports.BaseDialog=function(r){var a=r.children,d=r.className,s=r.open,c=r.themeOverride,h=r.width,f=r.onClose,x=r.closeOnBlur,p=void 0===x||x,m=r.closeOnEsc,v=void 0===m||m,y=r.noBorder,b=void 0!==y&&y,w=e.__read(i.useState(!1),2),g=w[0],_=w[1];i.useEffect((function(){_(!0)}),[]);return g?n.jsxs(t.AnimatePresence,{children:[s&&n.jsx(o.Backdrop,{initial:{opacity:0},animate:{opacity:.65},exit:{opacity:0},transition:{duration:.3},"data-theme":c},"dialog-backdrop"),s&&n.jsx(l,e.__assign({"data-theme":c,onClick:function(){return f&&p&&f()},onKeyDown:function(e){f&&v&&"Escape"===e.key&&f()},tabIndex:-1},{children:n.jsx(u,e.__assign({className:d,transition:{ease:[.4,0,.2,1],duration:.3},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},width:h||444,noBorder:b,onClick:function(e){e.stopPropagation()}},{children:a}),"dialog")}))]}):null};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-fe391a2e.js"),n=require("react/jsx-runtime"),i=require("react-dropzone"),r=require("../../icons/FileDuotoneIcon.js"),t=require("../../icons/FileUploadDuotoneIcon.js"),o=require("../../icons/RemoveCircleDuotoneIcon.js"),a=require("../../styles/constants/theme.js"),l=require("styled-components"),s=require("../button/Button.js"),c=require("../spinner/Spinner.js"),d=require("../text/Text.js"),u=require("../thumbnail/Thumbnail.js");function p(e){return e&&e.__esModule?e:{default:e}}require("react"),require("../../icons/icon-base/_IconBase.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js");var m,x,f,g,h,j,_,b,y,v=p(l),T=v.default.div(m||(m=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"])),a.theme.space16,(function(e){return e.disabled?.5:1}),(function(e){return e.disabled?"not-allowed":"auto"})),q=v.default.div(x||(x=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?a.theme.danger:a.theme.borderColor}),a.theme.radius12),k=v.default.div(f||(f=e.__makeTemplateObject(["\n padding: ",";\n outline: none;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: ",";\n"],["\n padding: ",";\n outline: none;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: ",";\n"])),a.theme.space16,a.theme.space12),O=v.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"])),a.theme.space4),D=v.default.button(h||(h=e.__makeTemplateObject(["\n display: inline;\n"],["\n display: inline;\n"]))),I=v.default(s.Button)(j||(j=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"])),a.theme.gray200,a.theme.gray800,a.theme.gray300,a.theme.gray400),F=v.default.div(_||(_=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: ",";\n"],["\n display: flex;\n flex-direction: column;\n gap: ",";\n"])),a.theme.space4),z=v.default.div(b||(b=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"])),a.theme.border,a.theme.space12,a.theme.space16,a.theme.space12),R=v.default.div(y||(y=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"])));exports.DropZone=function(a){var l=a.className,s=a.dropzoneOptions,p=a.disabled,m=void 0!==p&&p,x=a.instructionText,f=void 0===x?"Drop your file(s) here":x,g=a.helpText,h=a.noIcon,j=void 0!==h&&h,_=a.uploadedFiles,b=a.onRemoveFile,y=a.error,v=void 0!==y&&y,C=a.loading,w=a.loadingText,B=void 0===w?"Uploading file(s)...":w,U=s.maxFiles||0,N=i.useDropzone(e.__assign(e.__assign({},s),{disabled:m,noClick:!0,noKeyboard:!0})),P=N.getRootProps,S=N.getInputProps,G=N.open,K=0!==U&&_.length>=U;return n.jsx(T,e.__assign({disabled:m,className:l},{children:C?n.jsx(q,{children:n.jsxs(k,{children:[n.jsx(c.Spinner,{}),n.jsx(d.Text,e.__assign({type:"label",color:"gray800"},{children:B}))]})}):n.jsxs(n.Fragment,{children:[!K&&n.jsx(q,e.__assign({error:v},{children:n.jsxs(k,e.__assign({},P(),{role:void 0},{children:[n.jsx("input",e.__assign({},S())),!j&&n.jsx(u.Thumbnail,{size:40,icon:n.jsx(t.FileUploadDuotoneIcon,{})}),n.jsxs(O,{children:[n.jsxs(d.Text,e.__assign({type:"label"},{children:[f," or"," ",n.jsx(D,e.__assign({type:"button",onClick:G,disabled:m},{children:n.jsx(d.Text,e.__assign({type:"label",color:"blue600"},{children:"browse"}))}))]})),g&&n.jsx(d.Text,e.__assign({type:"caption"},{children:g}))]})]}))})),!!_.length&&n.jsx(F,{children:_.map((function(i,t){return n.jsxs(z,{children:[n.jsx(r.FileDuotoneIcon,{}),n.jsxs(R,{children:[n.jsx(d.Text,e.__assign({type:"label",color:"
|
|
1
|
+
"use strict";var e=require("../../_tslib-fe391a2e.js"),n=require("react/jsx-runtime"),i=require("react-dropzone"),r=require("../../icons/FileDuotoneIcon.js"),t=require("../../icons/FileUploadDuotoneIcon.js"),o=require("../../icons/RemoveCircleDuotoneIcon.js"),a=require("../../styles/constants/theme.js"),l=require("styled-components"),s=require("../button/Button.js"),c=require("../spinner/Spinner.js"),d=require("../text/Text.js"),u=require("../thumbnail/Thumbnail.js");function p(e){return e&&e.__esModule?e:{default:e}}require("react"),require("../../icons/icon-base/_IconBase.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js");var m,x,f,g,h,j,_,b,y,v=p(l),T=v.default.div(m||(m=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"])),a.theme.space16,(function(e){return e.disabled?.5:1}),(function(e){return e.disabled?"not-allowed":"auto"})),q=v.default.div(x||(x=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?a.theme.danger:a.theme.borderColor}),a.theme.radius12),k=v.default.div(f||(f=e.__makeTemplateObject(["\n padding: ",";\n outline: none;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: ",";\n"],["\n padding: ",";\n outline: none;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: ",";\n"])),a.theme.space16,a.theme.space12),O=v.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"])),a.theme.space4),D=v.default.button(h||(h=e.__makeTemplateObject(["\n display: inline;\n"],["\n display: inline;\n"]))),I=v.default(s.Button)(j||(j=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"])),a.theme.gray200,a.theme.gray800,a.theme.gray300,a.theme.gray400),F=v.default.div(_||(_=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: ",";\n"],["\n display: flex;\n flex-direction: column;\n gap: ",";\n"])),a.theme.space4),z=v.default.div(b||(b=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"])),a.theme.border,a.theme.space12,a.theme.space16,a.theme.space12),R=v.default.div(y||(y=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"])));exports.DropZone=function(a){var l=a.className,s=a.dropzoneOptions,p=a.disabled,m=void 0!==p&&p,x=a.instructionText,f=void 0===x?"Drop your file(s) here":x,g=a.helpText,h=a.noIcon,j=void 0!==h&&h,_=a.uploadedFiles,b=a.onRemoveFile,y=a.error,v=void 0!==y&&y,C=a.loading,w=a.loadingText,B=void 0===w?"Uploading file(s)...":w,U=s.maxFiles||0,N=i.useDropzone(e.__assign(e.__assign({},s),{disabled:m,noClick:!0,noKeyboard:!0})),P=N.getRootProps,S=N.getInputProps,G=N.open,K=0!==U&&_.length>=U;return n.jsx(T,e.__assign({disabled:m,className:l},{children:C?n.jsx(q,{children:n.jsxs(k,{children:[n.jsx(c.Spinner,{}),n.jsx(d.Text,e.__assign({type:"label",color:"gray800"},{children:B}))]})}):n.jsxs(n.Fragment,{children:[!K&&n.jsx(q,e.__assign({error:v},{children:n.jsxs(k,e.__assign({},P(),{role:void 0},{children:[n.jsx("input",e.__assign({},S())),!j&&n.jsx(u.Thumbnail,{size:40,icon:n.jsx(t.FileUploadDuotoneIcon,{})}),n.jsxs(O,{children:[n.jsxs(d.Text,e.__assign({type:"label"},{children:[f," or"," ",n.jsx(D,e.__assign({type:"button",onClick:G,disabled:m},{children:n.jsx(d.Text,e.__assign({type:"label",color:"blue600"},{children:"browse"}))}))]})),g&&n.jsx(d.Text,e.__assign({type:"caption"},{children:g}))]})]}))})),!!_.length&&n.jsx(F,{children:_.map((function(i,t){return n.jsxs(z,{children:[n.jsx(r.FileDuotoneIcon,{}),n.jsxs(R,{children:[n.jsx(d.Text,e.__assign({type:"label",color:"gray1200"},{children:i.name})),i.size&&n.jsx(d.Text,e.__assign({type:"caption",color:"gray700"},{children:i.size}))]}),b&&n.jsx(I,e.__assign({onClick:function(){return b(t)}},{children:n.jsx(o.RemoveCircleDuotoneIcon,{size:20})}))]},i.name)}))})]})}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var n=require("../../_tslib-fe391a2e.js"),e=require("react/jsx-runtime"),t=require("react-dropzone"),r=require("../text/Text.js"),o=require("../../icons/RemoveCircleDuotoneIcon.js"),i=require("../../styles/constants/theme.js"),a=require("styled-components"),s=require("../button/Button.js");function l(n){return n&&n.__esModule?n:{default:n}}require("react"),require("../../icons/icon-base/_IconBase.js"),require("../spinner/Spinner.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js");var c,d,u,p,f,g=l(a),m=g.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"])),i.theme.space8,i.theme.space12,i.theme.radius10,i.theme.border,(function(n){return n.error?i.theme.danger:i.theme.borderColor}),(function(n){return n.disabled?.5:1}),(function(n){return n.disabled?"not-allowed":"auto"})),x=g.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=g.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"])),i.theme.space12),y=g.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"])),i.theme.space4),_=g.default(s.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"])),i.theme.gray200,i.theme.gray800,i.theme.gray300,i.theme.gray400);exports.FileUpload=function(i){var a=i.className,l=i.dropzoneOptions,c=i.disabled,d=void 0!==c&&c,u=i.error,p=void 0!==u&&u,f=i.onRemoveFile,g=i.uploadedFile,j=i.instructionText,b=void 0===j?"or drag your file here":j,v=i.loading,q=i.loadingText,T=void 0===q?"Uploading...":q,k=t.useDropzone(n.__assign(n.__assign({},l),{disabled:d,noClick:!0,noKeyboard:!0,multiple:!1})),C=k.getRootProps,R=k.getInputProps,O=k.open,z=function(){return v?e.jsx(r.Text,{children:T}):g?function(){if(g){var t=g.name,o=g.size;return e.jsxs(y,{children:[e.jsx(r.Text,n.__assign({type:"label",color:"
|
|
1
|
+
"use strict";var n=require("../../_tslib-fe391a2e.js"),e=require("react/jsx-runtime"),t=require("react-dropzone"),r=require("../text/Text.js"),o=require("../../icons/RemoveCircleDuotoneIcon.js"),i=require("../../styles/constants/theme.js"),a=require("styled-components"),s=require("../button/Button.js");function l(n){return n&&n.__esModule?n:{default:n}}require("react"),require("../../icons/icon-base/_IconBase.js"),require("../spinner/Spinner.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js");var c,d,u,p,f,g=l(a),m=g.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"])),i.theme.space8,i.theme.space12,i.theme.radius10,i.theme.border,(function(n){return n.error?i.theme.danger:i.theme.borderColor}),(function(n){return n.disabled?.5:1}),(function(n){return n.disabled?"not-allowed":"auto"})),x=g.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=g.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"])),i.theme.space12),y=g.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"])),i.theme.space4),_=g.default(s.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"])),i.theme.gray200,i.theme.gray800,i.theme.gray300,i.theme.gray400);exports.FileUpload=function(i){var a=i.className,l=i.dropzoneOptions,c=i.disabled,d=void 0!==c&&c,u=i.error,p=void 0!==u&&u,f=i.onRemoveFile,g=i.uploadedFile,j=i.instructionText,b=void 0===j?"or drag your file here":j,v=i.loading,q=i.loadingText,T=void 0===q?"Uploading...":q,k=t.useDropzone(n.__assign(n.__assign({},l),{disabled:d,noClick:!0,noKeyboard:!0,multiple:!1})),C=k.getRootProps,R=k.getInputProps,O=k.open,z=function(){return v?e.jsx(r.Text,{children:T}):g?function(){if(g){var t=g.name,o=g.size;return e.jsxs(y,{children:[e.jsx(r.Text,n.__assign({type:"label",color:"gray1200"},{children:t})),o&&e.jsx(r.Text,n.__assign({type:"caption",color:"gray700"},{children:o}))]})}return null}():e.jsx(r.Text,n.__assign({color:"gray600"},{children:b}))};return e.jsxs(m,n.__assign({disabled:d,error:p,className:a},{children:[e.jsxs(x,n.__assign({},C(),{children:[e.jsx("input",n.__assign({},R())),e.jsxs(h,{children:[e.jsx(s.Button,n.__assign({onClick:O,loading:v,spinnerColor:"black"},{children:"Browse"})),z()]})]})),f&&g&&e.jsx(_,n.__assign({onClick:function(){return f()}},{children:e.jsx(o.RemoveCircleDuotoneIcon,{size:20})}))]}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-fe391a2e.js"),r=require("react/jsx-runtime"),t=require("react"),i=require("@graphiql/react"),n=require("graphiql");require("graphql");var s=require("../../icons/EyeIcon.js"),a=require("../../icons/EyeOffIcon.js"),o=require("../../styles/constants/theme.js"),l=require("../../utils/hooks/_useGraphiqlExplorer.js"),u=require("../../utils/hooks/_useGraphiqlFetcher.js"),c=require("../../utils/hooks/_useGraphiqlStorage.js"),h=require("styled-components"),p=require("../nested-data-table/NestedDataTable.js"),q=require("../split-panel/SplitPanel.js"),d=require("./_GraphiqlContextWrapper.js"),j=require("./_LoadingIcon.js");function g(e){return e&&e.__esModule?e:{default:e}}require("../../icons/icon-base/_IconBase.js"),require("@graphiql/plugin-explorer"),require("swr"),require("../../utils/_graphiqlFetcher.js"),require("../../utils/handleFetch.js"),require("../../utils/hooks/useSwr.js"),require("lodash/kebabCase"),require("../../utils/hooks/useCurrentShema.js"),require("../../utils/hooks/useStorage.js"),require("../../utils/storage.js"),require("../button/Button.js"),require("../spinner/Spinner.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../rest-state/RestState.js"),require("../text/Text.js"),require("../nested-data-table/_TableData.js"),require("../../icons/ChevronRightCircleIcon.js"),require("../../utils/flattenRow.js"),require("../../utils/setupNestedData.js"),require("../../utils/truncateText.js"),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("../nested-data-table/_Filter.js"),require("../../icons/FilterIcon.js"),require("../../utils/hooks/useDropdown.js"),require("@floating-ui/react-dom"),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("react-split-it"),require("../../icons/custom/ZonosLogoIcon.js");var b,
|
|
1
|
+
"use strict";var e=require("../../_tslib-fe391a2e.js"),r=require("react/jsx-runtime"),t=require("react"),i=require("@graphiql/react"),n=require("graphiql");require("graphql");var s=require("../../icons/EyeIcon.js"),a=require("../../icons/EyeOffIcon.js"),o=require("../../styles/constants/theme.js"),l=require("../../utils/hooks/_useGraphiqlExplorer.js"),u=require("../../utils/hooks/_useGraphiqlFetcher.js"),c=require("../../utils/hooks/_useGraphiqlStorage.js"),h=require("styled-components"),p=require("../nested-data-table/NestedDataTable.js"),q=require("../split-panel/SplitPanel.js"),d=require("./_GraphiqlContextWrapper.js"),j=require("./_LoadingIcon.js");function g(e){return e&&e.__esModule?e:{default:e}}require("../../icons/icon-base/_IconBase.js"),require("@graphiql/plugin-explorer"),require("swr"),require("../../utils/_graphiqlFetcher.js"),require("../../utils/handleFetch.js"),require("../../utils/hooks/useSwr.js"),require("lodash/kebabCase"),require("../../utils/hooks/useCurrentShema.js"),require("../../utils/hooks/useStorage.js"),require("../../utils/storage.js"),require("../button/Button.js"),require("../spinner/Spinner.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../rest-state/RestState.js"),require("../text/Text.js"),require("../nested-data-table/_TableData.js"),require("../../icons/ChevronRightCircleIcon.js"),require("../../utils/flattenRow.js"),require("../../utils/setupNestedData.js"),require("../../utils/truncateText.js"),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("../nested-data-table/_Filter.js"),require("../../icons/FilterIcon.js"),require("../../utils/hooks/useDropdown.js"),require("@floating-ui/react-dom"),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("react-split-it"),require("../../icons/custom/ZonosLogoIcon.js");var m,b,x,_=g(h),v=_.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"]))),f=_.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"])),o.theme.space12),k=function(o){var h=o.fetcher,g=o.loadingComponent,m=o.onEditQuery,b=o.onEditVariables,x=o.onResultData,_=o.query,k=void 0===_?"":_,y=o.schema,C=o.schemaName,E=o.url,I=o.variables,T=void 0===I?"":I,w=o.customToolbar,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),O=B[0],L=B[1],N=e.__read(t.useState("first-time"),1)[0],A=e.__read(t.useState(!1),2),Q=A[0],W=A[1],M=e.__read(t.useState([1,0]),2),P=M[0],V=M[1],z=e.__read(t.useState(""),2),H=z[0],K=z[1],U=u.useGraphiqlFetcher({cachingKey:N,url:E,query:k,customFetcher:h||null,operationName:H}),Z=U.graphiqlFetcher,J=U.resultData,X=U.isLoading,Y=c.useGraphiqlStorage({defaultSchema:C});t.useEffect((function(){L(!!(null==D?void 0:D.isFetching)||X)}),[null==D?void 0:D.isFetching,L,X]),t.useEffect((function(){J&&x&&x(J)}),[x,J]);var $=l.useGraphiqlExplorer({onEdit:m,query:k});if(!y)return r.jsx(r.Fragment,{children:g||r.jsx(j.Loading,{})});var ee,re;return r.jsx(v,{children:r.jsxs(q.SplitPanel,e.__assign({sizes:P,onSetSizes:V,collapseAll:!Q},{children:[r.jsx(f,{children:r.jsx(n.GraphiQL,e.__assign({fetcher:Z,onEditOperationName:K,onEditQuery:m,onEditVariables:b,plugins:[$],query:k,variables:T,schema:y,toolbar:{additionalContent:r.jsxs(r.Fragment,{children:[r.jsx(i.ToolbarButton,e.__assign({label:Q?"Hide table":"Show table",onClick:function(){return W(!Q)}},{children:Q?r.jsx(a.EyeOffIcon,{color:"red600"}):r.jsx(s.EyeIcon,{color:"gray400"})})),w]})},storage:Y},{children:r.jsx(d.GraphiqlContextWrapper,e.__assign({setExecutionContext:G,setResponseEditorContext:R},{children:r.jsx(n.GraphiQL.Footer,{})}))}))}),(ee=null!==J?J.data:J,re=ee?Object.entries(ee):null,re?r.jsx(S,{children:re.map((function(t){var i=e.__read(t,2),n=i[0],s=i[1];return Array.isArray(s)||s?r.jsx(p.NestedDataTable,{isFetching:O,tableData:s,title:n},n):null}))}):null)]}))})};k.ToolbarButton=i.ToolbarButton,exports.GraphMatrix=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var n=require("../../_tslib-fe391a2e.js"),e=require("react/jsx-runtime"),t=require("../../icons/custom/ZonosLogoIcon.js"),
|
|
1
|
+
"use strict";var n=require("../../_tslib-fe391a2e.js"),e=require("react/jsx-runtime"),t=require("../../icons/custom/ZonosLogoIcon.js"),i=require("../../styles/constants/theme.js"),o=require("styled-components"),s=require("../text/Text.js");function r(n){return n&&n.__esModule?n:{default:n}}require("react"),require("../../icons/icon-base/_IconBase.js");var a,c,l,m,f=r(o),d=f.default.div(a||(a=n.__makeTemplateObject(["\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: ",";\n"],["\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: ",";\n"])),i.theme.space12),u=o.keyframes(c||(c=n.__makeTemplateObject(["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"],["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"]))),p=f.default(t.ZonosLogoIcon)(l||(l=n.__makeTemplateObject(["\n animation: "," 2s linear infinite;\n"],["\n animation: "," 2s linear infinite;\n"])),u),g=f.default(s.Text)(m||(m=n.__makeTemplateObject(["\n position: relative;\n\n &:after {\n position: absolute;\n animation: dots 1200ms linear infinite;\n content: '';\n }\n\n @keyframes dots {\n 0%,\n 20% {\n content: '.';\n }\n 40% {\n content: '..';\n }\n 60% {\n content: '...';\n }\n 90%,\n 100% {\n content: '';\n }\n }\n"],["\n position: relative;\n\n &:after {\n position: absolute;\n animation: dots 1200ms linear infinite;\n content: '';\n }\n\n @keyframes dots {\n 0%,\n 20% {\n content: '.';\n }\n 40% {\n content: '..';\n }\n 60% {\n content: '...';\n }\n 90%,\n 100% {\n content: '';\n }\n }\n"])));exports.Loading=function(){return e.jsxs(d,{children:[e.jsx(p,{size:64}),e.jsx(g,n.__assign({type:"bold-subheader"},{children:"Loading"}))]})};
|