@quillsql/admin 1.3.1 → 1.3.2
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/{lib → dist}/Admin.d.ts +12 -7
- package/dist/Admin.d.ts.map +1 -0
- package/dist/Admin.js +1384 -0
- package/{lib → dist}/AdminProvider.d.ts +41 -27
- package/dist/AdminProvider.d.ts.map +1 -0
- package/{lib → dist}/AdminProvider.js +105 -89
- package/dist/api/ConnectionClient.d.ts +27 -0
- package/dist/api/ConnectionClient.d.ts.map +1 -0
- package/dist/api/ConnectionClient.js +247 -0
- package/dist/components/Banner/index.d.ts +3 -0
- package/dist/components/Banner/index.d.ts.map +1 -0
- package/dist/components/Banner/index.js +27 -0
- package/dist/components/CardSection.d.ts +3 -0
- package/dist/components/CardSection.d.ts.map +1 -0
- package/dist/components/CardSection.js +9 -0
- package/dist/components/CardTitle.d.ts +3 -0
- package/dist/components/CardTitle.d.ts.map +1 -0
- package/dist/components/CardTitle.js +11 -0
- package/dist/components/DashboardSelectPopover.d.ts +11 -0
- package/dist/components/DashboardSelectPopover.d.ts.map +1 -0
- package/dist/components/DashboardSelectPopover.js +175 -0
- package/dist/components/DatabaseSelector.d.ts +11 -0
- package/dist/components/DatabaseSelector.d.ts.map +1 -0
- package/dist/components/DatabaseSelector.js +22 -0
- package/dist/components/DeleteButton.d.ts +3 -0
- package/dist/components/DeleteButton.d.ts.map +1 -0
- package/dist/components/DeleteButton.js +10 -0
- package/{lib → dist}/components/DropDownMenu.d.ts +1 -0
- package/dist/components/DropDownMenu.d.ts.map +1 -0
- package/dist/components/DropDownMenu.js +39 -0
- package/dist/components/DropDownMenuWithLabel.d.ts +12 -0
- package/dist/components/DropDownMenuWithLabel.d.ts.map +1 -0
- package/dist/components/DropDownMenuWithLabel.js +47 -0
- package/{lib → dist}/components/EnvSelectPopover.d.ts +1 -0
- package/dist/components/EnvSelectPopover.d.ts.map +1 -0
- package/dist/components/EnvSelectPopover.js +205 -0
- package/dist/components/InputLabel.d.ts +3 -0
- package/dist/components/InputLabel.d.ts.map +1 -0
- package/dist/components/InputLabel.js +10 -0
- package/{lib → dist}/components/OrgSelect.d.ts +1 -0
- package/dist/components/OrgSelect.d.ts.map +1 -0
- package/dist/components/OrgSelect.js +193 -0
- package/dist/components/SqlViewTile.d.ts +8 -0
- package/dist/components/SqlViewTile.d.ts.map +1 -0
- package/dist/components/SqlViewTile.js +40 -0
- package/dist/components/StepDisplay.d.ts +10 -0
- package/dist/components/StepDisplay.d.ts.map +1 -0
- package/dist/components/StepDisplay.js +15 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/forms/client_onboard/ConnectDatabase.d.ts +11 -0
- package/dist/forms/client_onboard/ConnectDatabase.d.ts.map +1 -0
- package/dist/forms/client_onboard/ConnectDatabase.js +137 -0
- package/dist/forms/client_onboard/ConnectSchema.d.ts +13 -0
- package/dist/forms/client_onboard/ConnectSchema.d.ts.map +1 -0
- package/dist/forms/client_onboard/ConnectSchema.js +171 -0
- package/dist/forms/client_onboard/CreateSqlViews.d.ts +15 -0
- package/dist/forms/client_onboard/CreateSqlViews.d.ts.map +1 -0
- package/dist/forms/client_onboard/CreateSqlViews.js +202 -0
- package/dist/hooks/useItemBeingEdited.d.ts +4 -0
- package/dist/hooks/useItemBeingEdited.d.ts.map +1 -0
- package/dist/hooks/useItemBeingEdited.js +25 -0
- package/{lib → dist}/icons/ArrowDownHeadIcon.d.ts +1 -0
- package/dist/icons/ArrowDownHeadIcon.d.ts.map +1 -0
- package/dist/icons/ArrowDownHeadIcon.js +3 -0
- package/dist/icons/XMarkIcon.d.ts +3 -0
- package/dist/icons/XMarkIcon.d.ts.map +1 -0
- package/dist/icons/XMarkIcon.js +11 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/{lib/index.d.ts → dist/index.js} +1 -0
- package/{lib → dist}/modals/EditDashboardsModal.d.ts +1 -0
- package/dist/modals/EditDashboardsModal.d.ts.map +1 -0
- package/dist/modals/EditDashboardsModal.js +91 -0
- package/dist/modals/NewDashboardModal.d.ts +19 -0
- package/dist/modals/NewDashboardModal.d.ts.map +1 -0
- package/dist/modals/NewDashboardModal.js +276 -0
- package/{lib → dist}/modals/PromoteDashModal.d.ts +2 -1
- package/dist/modals/PromoteDashModal.d.ts.map +1 -0
- package/dist/modals/PromoteDashModal.js +123 -0
- package/{lib → dist}/modals/PromoteViewModal.d.ts +1 -0
- package/dist/modals/PromoteViewModal.d.ts.map +1 -0
- package/{lib → dist}/modals/PromoteViewModal.js +13 -16
- package/{lib → dist}/modals/ReorderDashboardModal.d.ts +4 -1
- package/dist/modals/ReorderDashboardModal.d.ts.map +1 -0
- package/{lib → dist}/modals/ReorderDashboardModal.js +53 -55
- package/dist/modals/index.d.ts +5 -0
- package/dist/modals/index.d.ts.map +1 -0
- package/{lib → dist}/primitives/ButtonPrimitive.d.ts +3 -0
- package/dist/primitives/ButtonPrimitive.d.ts.map +1 -0
- package/dist/primitives/ButtonPrimitive.js +47 -0
- package/{lib → dist}/primitives/HeaderPrimitive.d.ts +1 -0
- package/dist/primitives/HeaderPrimitive.d.ts.map +1 -0
- package/dist/primitives/HeaderPrimitive.js +9 -0
- package/{lib → dist}/primitives/ModalPrimitive.d.ts +3 -1
- package/dist/primitives/ModalPrimitive.d.ts.map +1 -0
- package/{lib → dist}/primitives/ModalPrimitive.js +9 -11
- package/{lib → dist}/primitives/SecondaryButtonPrimitive.d.ts +1 -0
- package/dist/primitives/SecondaryButtonPrimitive.d.ts.map +1 -0
- package/{lib → dist}/primitives/SecondaryButtonPrimitive.js +5 -8
- package/{lib → dist}/primitives/SelectPrimitive.d.ts +1 -0
- package/dist/primitives/SelectPrimitive.d.ts.map +1 -0
- package/{lib → dist}/primitives/SelectPrimitive.js +8 -11
- package/{lib → dist}/primitives/TextInputPrimitive.d.ts +2 -0
- package/dist/primitives/TextInputPrimitive.d.ts.map +1 -0
- package/dist/primitives/TextInputPrimitive.js +24 -0
- package/dist/primitives/TogglePrimitive.d.ts +6 -0
- package/dist/primitives/TogglePrimitive.d.ts.map +1 -0
- package/dist/primitives/TogglePrimitive.js +45 -0
- package/dist/primitives/index.d.ts +7 -0
- package/dist/primitives/index.d.ts.map +1 -0
- package/dist/public_components/CreateEnvironment.d.ts +6 -0
- package/dist/public_components/CreateEnvironment.d.ts.map +1 -0
- package/dist/public_components/CreateEnvironment.js +129 -0
- package/{lib → dist}/public_components/DashboardBuilder.d.ts +2 -1
- package/dist/public_components/DashboardBuilder.d.ts.map +1 -0
- package/dist/public_components/DashboardBuilder.js +192 -0
- package/{lib → dist}/public_components/DashboardManager.d.ts +2 -1
- package/dist/public_components/DashboardManager.d.ts.map +1 -0
- package/dist/public_components/DashboardManager.js +308 -0
- package/{lib → dist}/public_components/SQLViewManager.d.ts +2 -1
- package/dist/public_components/SQLViewManager.d.ts.map +1 -0
- package/dist/public_components/SQLViewManager.js +394 -0
- package/dist/utils/constants.d.ts +26 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/constants.js +13 -0
- package/dist/utils/databases.d.ts +34 -0
- package/dist/utils/databases.d.ts.map +1 -0
- package/dist/utils/databases.js +51 -0
- package/dist/utils/delay.d.ts +2 -0
- package/dist/utils/delay.d.ts.map +1 -0
- package/dist/utils/delay.js +3 -0
- package/dist/utils/schema.d.ts +22 -0
- package/dist/utils/schema.d.ts.map +1 -0
- package/dist/utils/schema.js +1 -0
- package/dist/utils/table.d.ts +9 -0
- package/dist/utils/table.d.ts.map +1 -0
- package/dist/utils/table.js +1 -0
- package/package.json +19 -26
- package/LICENSE +0 -21
- package/README.md +0 -10
- package/lib/Admin.js +0 -1573
- package/lib/Admin.js.map +0 -1
- package/lib/AdminProvider.js.map +0 -1
- package/lib/components/DashboardSelectPopover.d.ts +0 -9
- package/lib/components/DashboardSelectPopover.js +0 -187
- package/lib/components/DashboardSelectPopover.js.map +0 -1
- package/lib/components/DropDownMenu.js +0 -43
- package/lib/components/DropDownMenu.js.map +0 -1
- package/lib/components/EnvSelectPopover.js +0 -190
- package/lib/components/EnvSelectPopover.js.map +0 -1
- package/lib/components/OrgSelect.js +0 -188
- package/lib/components/OrgSelect.js.map +0 -1
- package/lib/components/index.js +0 -17
- package/lib/components/index.js.map +0 -1
- package/lib/icons/ArrowDownHeadIcon.js +0 -6
- package/lib/icons/ArrowDownHeadIcon.js.map +0 -1
- package/lib/icons/index.js +0 -9
- package/lib/icons/index.js.map +0 -1
- package/lib/index.js +0 -17
- package/lib/index.js.map +0 -1
- package/lib/modals/EditDashboardsModal.js +0 -94
- package/lib/modals/EditDashboardsModal.js.map +0 -1
- package/lib/modals/PromoteDashModal.js +0 -126
- package/lib/modals/PromoteDashModal.js.map +0 -1
- package/lib/modals/PromoteViewModal.js.map +0 -1
- package/lib/modals/ReorderDashboardModal.js.map +0 -1
- package/lib/modals/index.js +0 -15
- package/lib/modals/index.js.map +0 -1
- package/lib/primitives/ButtonPrimitive.js +0 -25
- package/lib/primitives/ButtonPrimitive.js.map +0 -1
- package/lib/primitives/HeaderPrimitive.js +0 -12
- package/lib/primitives/HeaderPrimitive.js.map +0 -1
- package/lib/primitives/ModalPrimitive.js.map +0 -1
- package/lib/primitives/SecondaryButtonPrimitive.js.map +0 -1
- package/lib/primitives/SelectPrimitive.js.map +0 -1
- package/lib/primitives/TextInputPrimitive.js +0 -26
- package/lib/primitives/TextInputPrimitive.js.map +0 -1
- package/lib/primitives/index.js +0 -19
- package/lib/primitives/index.js.map +0 -1
- package/lib/public_components/DashboardBuilder.js +0 -166
- package/lib/public_components/DashboardBuilder.js.map +0 -1
- package/lib/public_components/DashboardManager.js +0 -255
- package/lib/public_components/DashboardManager.js.map +0 -1
- package/lib/public_components/SQLViewManager.js +0 -400
- package/lib/public_components/SQLViewManager.js.map +0 -1
- /package/{lib/components/index.d.ts → dist/components/index.js} +0 -0
- /package/{lib/icons/index.d.ts → dist/icons/index.js} +0 -0
- /package/{lib/modals/index.d.ts → dist/modals/index.js} +0 -0
- /package/{lib/primitives/index.d.ts → dist/primitives/index.js} +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const react_1 = require("react");
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { theme } from "../Admin";
|
|
3
|
+
import { DropDownMenu } from "../components";
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
|
+
import { QUILL_SERVER } from "../utils/constants";
|
|
7
6
|
const createStyles = (theme) => ({
|
|
8
7
|
modalContent: {
|
|
9
8
|
display: "flex",
|
|
@@ -64,17 +63,17 @@ const createStyles = (theme) => ({
|
|
|
64
63
|
color: theme.primaryButtonTextColor,
|
|
65
64
|
},
|
|
66
65
|
});
|
|
67
|
-
function PromoteViewModal({ ModalComponent, isOpen, setIsOpen, clientId, client, clients, views, }) {
|
|
68
|
-
const [modalSelectedView, setModalSelectedView] =
|
|
69
|
-
const [selectedToClient, setSelectedToClient] =
|
|
70
|
-
|
|
66
|
+
export default function PromoteViewModal({ ModalComponent, isOpen, setIsOpen, clientId, client, clients, views, }) {
|
|
67
|
+
const [modalSelectedView, setModalSelectedView] = useState(views[0]);
|
|
68
|
+
const [selectedToClient, setSelectedToClient] = useState(clients[0]);
|
|
69
|
+
useEffect(() => {
|
|
71
70
|
setModalSelectedView(views[0]);
|
|
72
71
|
setSelectedToClient(clients[0]);
|
|
73
72
|
}, [views, clients]);
|
|
74
|
-
const styles = createStyles(
|
|
73
|
+
const styles = createStyles(theme);
|
|
75
74
|
const handlePromote = async () => {
|
|
76
75
|
try {
|
|
77
|
-
const response = await fetch(
|
|
76
|
+
const response = await fetch(`${QUILL_SERVER}/promote_view/`, {
|
|
78
77
|
method: "POST",
|
|
79
78
|
headers: {
|
|
80
79
|
"Content-Type": "application/json",
|
|
@@ -95,14 +94,12 @@ function PromoteViewModal({ ModalComponent, isOpen, setIsOpen, clientId, client,
|
|
|
95
94
|
console.error("Promotion failed:", error);
|
|
96
95
|
}
|
|
97
96
|
};
|
|
98
|
-
return ((
|
|
97
|
+
return (_jsx(ModalComponent, { isOpen: isOpen, close: () => setIsOpen(false), children: _jsxs("div", { children: [_jsx("div", { style: styles.modalContent, children: _jsx("h1", { style: styles.modalHeader, children: "Promote Changes" }) }), _jsxs("div", { style: styles.container, children: [_jsx("h1", { style: styles.header, children: "SQL View:" }), _jsx("div", { style: styles.text, children: _jsx(DropDownMenu, { items: views, setSelected: setModalSelectedView, selected: modalSelectedView, theme: theme }) })] }), _jsxs("div", { style: styles.multiContainer, children: [_jsxs("div", { style: styles.group, children: [_jsx("h1", { style: styles.header, children: "From:" }), _jsx("div", { style: styles.text, children: _jsx(DropDownMenu, { items: [client], setSelected: () => { }, selected: client, theme: theme, disabled: true }) })] }), _jsx("span", {}), _jsxs("div", { style: styles.group, children: [_jsx("h1", { style: styles.header, children: "To:" }), _jsx("div", { style: styles.text, children: _jsx(DropDownMenu, { items: clients.filter((c) => c.name !== client.name), setSelected: setSelectedToClient, selected: selectedToClient, theme: theme }) })] })] }), _jsx("div", { style: {
|
|
99
98
|
display: "flex",
|
|
100
99
|
justifyContent: "center",
|
|
101
100
|
alignItems: "center",
|
|
102
|
-
}, children: (
|
|
101
|
+
}, children: _jsx("button", { style: styles.button, onClick: () => {
|
|
103
102
|
handlePromote();
|
|
104
103
|
setIsOpen(false);
|
|
105
104
|
}, children: "Promote SQL View" }) })] }) }));
|
|
106
105
|
}
|
|
107
|
-
exports.default = PromoteViewModal;
|
|
108
|
-
//# sourceMappingURL=PromoteViewModal.js.map
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
export default function ReorderDashboardModal({ isOpen, setIsOpen, ModalComponent, ButtonComponent, selectedDashboard, organizationId, }: {
|
|
1
|
+
export default function ReorderDashboardModal({ isOpen, setIsOpen, client, onSave, ModalComponent, ButtonComponent, selectedDashboard, organizationId, }: {
|
|
2
2
|
isOpen: any;
|
|
3
3
|
setIsOpen: any;
|
|
4
|
+
client: any;
|
|
5
|
+
onSave: any;
|
|
4
6
|
ModalComponent: any;
|
|
5
7
|
ButtonComponent: any;
|
|
6
8
|
selectedDashboard: any;
|
|
7
9
|
organizationId: any;
|
|
8
10
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=ReorderDashboardModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReorderDashboardModal.d.ts","sourceRoot":"","sources":["../../src/modals/ReorderDashboardModal.tsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAC5C,MAAM,EACN,SAAS,EACT,MAAM,EACN,MAAM,EACN,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,cAAc,GACf;;;;;;;;;CAAA,2CAiMA"}
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
2
|
// @ts-nocheck
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import { useAdmin } from '../AdminProvider';
|
|
5
|
+
import { ReorderableList } from '../Admin';
|
|
6
|
+
import { QUILL_SERVER } from '../utils/constants';
|
|
7
|
+
export default function ReorderDashboardModal({ isOpen, setIsOpen, client, onSave, ModalComponent, ButtonComponent, selectedDashboard, organizationId, }) {
|
|
9
8
|
// const [client] = useContext(ClientContext);
|
|
10
|
-
const [dashboardItems, setDashboardItems] =
|
|
11
|
-
const [loading, setLoading] =
|
|
12
|
-
const [chartType, setChartType] =
|
|
13
|
-
const [doesDashboardHaveTables, setDoesDashboardHaveTables] =
|
|
14
|
-
const [doesDashboardHaveCharts, setDoesDashboardHaveCharts] =
|
|
15
|
-
const [doesDashboardHaveMetrics, setDoesDashboardHaveMetrics] =
|
|
16
|
-
const [orderArray, setOrderArray] =
|
|
17
|
-
const [itemMap, setItemMap] =
|
|
18
|
-
const { state, dispatch } =
|
|
19
|
-
|
|
9
|
+
const [dashboardItems, setDashboardItems] = useState([]);
|
|
10
|
+
const [loading, setLoading] = useState(false);
|
|
11
|
+
const [chartType, setChartType] = useState('metric');
|
|
12
|
+
const [doesDashboardHaveTables, setDoesDashboardHaveTables] = useState(false);
|
|
13
|
+
const [doesDashboardHaveCharts, setDoesDashboardHaveCharts] = useState(false);
|
|
14
|
+
const [doesDashboardHaveMetrics, setDoesDashboardHaveMetrics] = useState(false);
|
|
15
|
+
const [orderArray, setOrderArray] = useState([]);
|
|
16
|
+
const [itemMap, setItemMap] = useState(null);
|
|
17
|
+
const { state, dispatch } = useAdmin();
|
|
18
|
+
useEffect(() => {
|
|
20
19
|
async function getDashboardItems() {
|
|
21
20
|
const { _id, environment } = state.client;
|
|
22
21
|
setLoading(true);
|
|
23
|
-
const url = new URL(
|
|
22
|
+
const url = new URL(`${QUILL_SERVER}/dashconfig`);
|
|
24
23
|
// Add query parameters to the URL
|
|
25
24
|
url.search = new URLSearchParams({
|
|
26
25
|
publicKey: _id,
|
|
@@ -28,7 +27,7 @@ function ReorderDashboardModal({ isOpen, setIsOpen, ModalComponent, ButtonCompon
|
|
|
28
27
|
name: selectedDashboard,
|
|
29
28
|
}).toString();
|
|
30
29
|
const response = await fetch(url, {
|
|
31
|
-
method:
|
|
30
|
+
method: 'GET',
|
|
32
31
|
headers: {
|
|
33
32
|
environment: environment || undefined,
|
|
34
33
|
},
|
|
@@ -45,13 +44,13 @@ function ReorderDashboardModal({ isOpen, setIsOpen, ModalComponent, ButtonCompon
|
|
|
45
44
|
getDashboardItems();
|
|
46
45
|
}
|
|
47
46
|
}, [selectedDashboard, state.client]);
|
|
48
|
-
|
|
47
|
+
useEffect(() => {
|
|
49
48
|
const itemMap = new Map();
|
|
50
49
|
dashboardItems.forEach((item) => {
|
|
51
|
-
if (item.chartType ===
|
|
50
|
+
if (item.chartType === 'table') {
|
|
52
51
|
setDoesDashboardHaveTables(true);
|
|
53
52
|
}
|
|
54
|
-
else if (item.chartType ===
|
|
53
|
+
else if (item.chartType === 'metric') {
|
|
55
54
|
setDoesDashboardHaveMetrics(true);
|
|
56
55
|
}
|
|
57
56
|
else {
|
|
@@ -64,63 +63,62 @@ function ReorderDashboardModal({ isOpen, setIsOpen, ModalComponent, ButtonCompon
|
|
|
64
63
|
const closeModal = () => {
|
|
65
64
|
setIsOpen(false);
|
|
66
65
|
};
|
|
67
|
-
return ((
|
|
68
|
-
display:
|
|
69
|
-
flexDirection:
|
|
70
|
-
position:
|
|
66
|
+
return (_jsx(ModalComponent, { isOpen: isOpen, close: () => setIsOpen(false), children: _jsxs("div", { style: {
|
|
67
|
+
display: 'flex',
|
|
68
|
+
flexDirection: 'column',
|
|
69
|
+
position: 'relative',
|
|
71
70
|
minWidth: 700,
|
|
72
71
|
maxWidth: 700,
|
|
73
72
|
minHeight: 700,
|
|
73
|
+
zIndex: 100,
|
|
74
74
|
// overflowY: "scroll",
|
|
75
|
-
}, children: [loading ? (
|
|
76
|
-
? elem.chartType !==
|
|
77
|
-
: elem.chartType === chartType), ButtonComponent: ButtonComponent, closeModal: closeModal })), (
|
|
75
|
+
}, children: [loading ? _jsx("div", { children: 'Loading...' }) : null, dashboardItems.length > 0 && itemMap.size > 0 && (_jsx(ReorderableList, { itemMap: itemMap, client: client, initialItems: dashboardItems.filter((elem) => chartType === 'chart'
|
|
76
|
+
? elem.chartType !== 'metric' && elem.chartType !== 'table'
|
|
77
|
+
: elem.chartType === chartType), ButtonComponent: ButtonComponent, closeModal: closeModal, onSave: onSave })), _jsxs("div", { style: {
|
|
78
78
|
height: 80,
|
|
79
|
-
background:
|
|
79
|
+
background: 'white',
|
|
80
80
|
width: 700,
|
|
81
|
-
position:
|
|
81
|
+
position: 'absolute',
|
|
82
82
|
top: -20,
|
|
83
83
|
left: 0,
|
|
84
84
|
right: 20,
|
|
85
85
|
paddingTop: 20,
|
|
86
|
-
display:
|
|
87
|
-
flexDirection:
|
|
88
|
-
alignItems:
|
|
89
|
-
justifyContent:
|
|
90
|
-
}, children: [(
|
|
91
|
-
background:
|
|
86
|
+
display: 'flex',
|
|
87
|
+
flexDirection: 'row',
|
|
88
|
+
alignItems: 'center',
|
|
89
|
+
justifyContent: 'space-between',
|
|
90
|
+
}, children: [_jsx("h1", { style: { fontSize: 22, fontWeight: 600 }, children: "Reorder items" }), _jsxs("div", { style: {
|
|
91
|
+
background: '#f7f7f7',
|
|
92
92
|
borderRadius: 6,
|
|
93
93
|
height: 32,
|
|
94
|
-
display:
|
|
95
|
-
flexDirection:
|
|
96
|
-
alignItems:
|
|
94
|
+
display: 'flex',
|
|
95
|
+
flexDirection: 'row',
|
|
96
|
+
alignItems: 'center',
|
|
97
97
|
paddingLeft: 4,
|
|
98
98
|
paddingRight: 4,
|
|
99
|
-
}, children: [doesDashboardHaveMetrics && ((
|
|
100
|
-
background: chartType ===
|
|
101
|
-
color: chartType ===
|
|
102
|
-
fontWeight: chartType ===
|
|
99
|
+
}, children: [doesDashboardHaveMetrics && (_jsx("button", { style: {
|
|
100
|
+
background: chartType === 'metric' ? 'white' : undefined,
|
|
101
|
+
color: chartType === 'metric' ? '#384151' : '#677389',
|
|
102
|
+
fontWeight: chartType === 'metric' ? '600' : '500',
|
|
103
103
|
borderRadius: 4,
|
|
104
104
|
paddingLeft: 6,
|
|
105
105
|
paddingRight: 6,
|
|
106
106
|
fontSize: 16,
|
|
107
|
-
}, onClick: () => setChartType(
|
|
108
|
-
background: chartType ===
|
|
109
|
-
color: chartType ===
|
|
110
|
-
fontWeight: chartType ===
|
|
107
|
+
}, onClick: () => setChartType('metric'), children: "Metrics" })), doesDashboardHaveCharts && (_jsx("button", { style: {
|
|
108
|
+
background: chartType === 'chart' ? 'white' : undefined,
|
|
109
|
+
color: chartType === 'chart' ? '#384151' : '#677389',
|
|
110
|
+
fontWeight: chartType === 'chart' ? '600' : '500',
|
|
111
111
|
borderRadius: 4,
|
|
112
112
|
paddingLeft: 6,
|
|
113
113
|
paddingRight: 6,
|
|
114
114
|
fontSize: 16,
|
|
115
|
-
}, onClick: () => setChartType(
|
|
116
|
-
background: chartType ===
|
|
117
|
-
color: chartType ===
|
|
118
|
-
fontWeight: chartType ===
|
|
115
|
+
}, onClick: () => setChartType('chart'), children: "Charts" })), doesDashboardHaveTables && (_jsx("button", { style: {
|
|
116
|
+
background: chartType === 'table' ? 'white' : undefined,
|
|
117
|
+
color: chartType === 'table' ? '#384151' : '#677389',
|
|
118
|
+
fontWeight: chartType === 'table' ? '600' : '500',
|
|
119
119
|
borderRadius: 4,
|
|
120
120
|
paddingLeft: 6,
|
|
121
121
|
paddingRight: 6,
|
|
122
122
|
fontSize: 16,
|
|
123
|
-
}, onClick: () => setChartType(
|
|
123
|
+
}, onClick: () => setChartType('table'), children: "Tables" }))] })] })] }) }));
|
|
124
124
|
}
|
|
125
|
-
exports.default = ReorderDashboardModal;
|
|
126
|
-
//# sourceMappingURL=ReorderDashboardModal.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as PromoteDashModal } from './PromoteDashModal';
|
|
2
|
+
export { default as EditDashboardsModal } from './EditDashboardsModal';
|
|
3
|
+
export { default as PromoteViewModal } from './PromoteViewModal';
|
|
4
|
+
export { default as ReorderDashboardModal } from './ReorderDashboardModal';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modals/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -4,6 +4,9 @@ type ButtonPrimitiveProps = {
|
|
|
4
4
|
onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
5
5
|
label: string;
|
|
6
6
|
theme?: QuillTheme;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
variant?: 'primary' | 'secondary' | 'danger';
|
|
7
9
|
};
|
|
8
10
|
declare const ButtonPrimitive: React.FC<ButtonPrimitiveProps>;
|
|
9
11
|
export default ButtonPrimitive;
|
|
12
|
+
//# sourceMappingURL=ButtonPrimitive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonPrimitive.d.ts","sourceRoot":"","sources":["../../src/primitives/ButtonPrimitive.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAyB,MAAM,UAAU,CAAC;AAE7D,KAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;CAC9C,CAAC;AAEF,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAqEnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { theme as defaultTheme } from '../Admin';
|
|
3
|
+
const ButtonPrimitive = ({ onClick, label, theme = defaultTheme, style, variant = 'primary', }) => {
|
|
4
|
+
if (variant === 'danger') {
|
|
5
|
+
return (_jsxs("button", { style: {
|
|
6
|
+
height: 36,
|
|
7
|
+
color: 'red',
|
|
8
|
+
display: 'flex',
|
|
9
|
+
borderRadius: 6,
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
justifyContent: 'center',
|
|
12
|
+
outline: 'none',
|
|
13
|
+
cursor: 'pointer',
|
|
14
|
+
fontFamily: theme?.fontFamily,
|
|
15
|
+
fontWeight: theme?.buttonFontWeight || 600,
|
|
16
|
+
border: 'none',
|
|
17
|
+
fontSize: 14,
|
|
18
|
+
paddingLeft: 20,
|
|
19
|
+
paddingRight: 20,
|
|
20
|
+
...style,
|
|
21
|
+
}, onClick: onClick, className: "quill--danger-button", children: [_jsx("style", { children: ` .quill--danger-button { background: #e7e7e7 } .quill--danger-button:hover { background: #DCDCDC }` }), label] }));
|
|
22
|
+
}
|
|
23
|
+
return (_jsxs("button", { style: {
|
|
24
|
+
height: 36,
|
|
25
|
+
color: theme?.backgroundColor,
|
|
26
|
+
display: 'flex',
|
|
27
|
+
borderRadius: 6,
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
justifyContent: 'center',
|
|
30
|
+
outline: 'none',
|
|
31
|
+
cursor: 'pointer',
|
|
32
|
+
fontFamily: theme?.fontFamily,
|
|
33
|
+
fontWeight: theme?.buttonFontWeight || 600,
|
|
34
|
+
border: 'none',
|
|
35
|
+
fontSize: 14,
|
|
36
|
+
paddingLeft: 20,
|
|
37
|
+
paddingRight: 20,
|
|
38
|
+
...style,
|
|
39
|
+
}, onClick: onClick, className: "quill-button", children: [_jsx("style", { children: `.quill-button {
|
|
40
|
+
background: #212121;
|
|
41
|
+
color: white;
|
|
42
|
+
}
|
|
43
|
+
.quill-button:hover {
|
|
44
|
+
background: rgba(0,0,0,0.75);
|
|
45
|
+
}` }), label] }));
|
|
46
|
+
};
|
|
47
|
+
export default ButtonPrimitive;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderPrimitive.d.ts","sourceRoot":"","sources":["../../src/primitives/HeaderPrimitive.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAyB,MAAM,UAAU,CAAC;AAE7D,KAAK,oBAAoB,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,UAAU,CAAC;CACtB,CAAC;AAEF,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAcnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { theme as defaultTheme } from '../Admin';
|
|
3
|
+
const HeaderPrimitive = ({ label, theme = defaultTheme, }) => (_jsx("h1", { style: {
|
|
4
|
+
color: theme?.primaryTextColor,
|
|
5
|
+
fontFamily: theme?.fontFamily,
|
|
6
|
+
fontWeight: theme?.buttonFontWeight || 600,
|
|
7
|
+
fontSize: 24,
|
|
8
|
+
}, children: label }));
|
|
9
|
+
export default HeaderPrimitive;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
2
|
import { QuillTheme } from '../Admin';
|
|
3
3
|
type ModalPrimitiveProps = {
|
|
4
4
|
isOpen: boolean;
|
|
5
5
|
close: () => void;
|
|
6
6
|
children: React.ReactNode;
|
|
7
|
+
style?: CSSProperties;
|
|
7
8
|
theme?: QuillTheme;
|
|
8
9
|
};
|
|
9
10
|
declare const ModalPrimitive: React.FC<ModalPrimitiveProps>;
|
|
10
11
|
export default ModalPrimitive;
|
|
12
|
+
//# sourceMappingURL=ModalPrimitive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalPrimitive.d.ts","sourceRoot":"","sources":["../../src/primitives/ModalPrimitive.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAa,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,UAAU,EAAyB,MAAM,UAAU,CAAC;AAE7D,KAAK,mBAAmB,GAAG;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+DjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
const ModalPrimitive = ({ isOpen, close, children, theme = Admin_1.theme, }) => {
|
|
7
|
-
(0, react_1.useEffect)(() => {
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import { theme as defaultTheme } from '../Admin';
|
|
4
|
+
const ModalPrimitive = ({ isOpen, close, children, style, theme = defaultTheme, }) => {
|
|
5
|
+
useEffect(() => {
|
|
8
6
|
// Prevent scrolling in the background when the modal is open
|
|
9
7
|
if (isOpen) {
|
|
10
8
|
document.body.style.overflow = 'hidden';
|
|
@@ -17,7 +15,7 @@ const ModalPrimitive = ({ isOpen, close, children, theme = Admin_1.theme, }) =>
|
|
|
17
15
|
if (!isOpen) {
|
|
18
16
|
return null;
|
|
19
17
|
}
|
|
20
|
-
return ((
|
|
18
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { style: {
|
|
21
19
|
position: 'fixed',
|
|
22
20
|
top: '0',
|
|
23
21
|
right: '0',
|
|
@@ -26,7 +24,7 @@ const ModalPrimitive = ({ isOpen, close, children, theme = Admin_1.theme, }) =>
|
|
|
26
24
|
zIndex: '50',
|
|
27
25
|
backgroundColor: 'rgba(255, 255, 255, 0.8)',
|
|
28
26
|
backdropFilter: 'blur(5px)',
|
|
29
|
-
}, onClick: close }), (
|
|
27
|
+
}, onClick: close }), _jsx("div", { style: {
|
|
30
28
|
position: 'fixed',
|
|
31
29
|
left: '50%',
|
|
32
30
|
top: '50%',
|
|
@@ -43,7 +41,7 @@ const ModalPrimitive = ({ isOpen, close, children, theme = Admin_1.theme, }) =>
|
|
|
43
41
|
borderWidth: 1,
|
|
44
42
|
borderColor: '#e7e7e7',
|
|
45
43
|
padding: 30,
|
|
44
|
+
...style,
|
|
46
45
|
}, children: children })] }));
|
|
47
46
|
};
|
|
48
|
-
|
|
49
|
-
//# sourceMappingURL=ModalPrimitive.js.map
|
|
47
|
+
export default ModalPrimitive;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecondaryButtonPrimitive.d.ts","sourceRoot":"","sources":["../../src/primitives/SecondaryButtonPrimitive.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAyB,MAAM,UAAU,CAAC;AAE7D,KAAK,6BAA6B,GAAG;IACjC,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,UAAU,CAAC;CACtB,CAAC;AAEF,QAAA,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAyBrE,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
const SecondaryButtonPrimitive = ({ onClick, label, theme = Admin_1.theme }) => {
|
|
6
|
-
return ((0, jsx_runtime_1.jsx)("button", { style: {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { theme as defaultTheme } from '../Admin';
|
|
3
|
+
const SecondaryButtonPrimitive = ({ onClick, label, theme = defaultTheme }) => {
|
|
4
|
+
return (_jsx("button", { style: {
|
|
7
5
|
height: 36,
|
|
8
6
|
background: "#F9FAFB",
|
|
9
7
|
color: theme?.primaryTextColor,
|
|
@@ -21,5 +19,4 @@ const SecondaryButtonPrimitive = ({ onClick, label, theme = Admin_1.theme }) =>
|
|
|
21
19
|
paddingRight: 20,
|
|
22
20
|
}, onClick: onClick, children: label }));
|
|
23
21
|
};
|
|
24
|
-
|
|
25
|
-
//# sourceMappingURL=SecondaryButtonPrimitive.js.map
|
|
22
|
+
export default SecondaryButtonPrimitive;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectPrimitive.d.ts","sourceRoot":"","sources":["../../src/primitives/SelectPrimitive.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAyB,MAAM,UAAU,CAAC;AAE7D,KAAK,MAAM,GAAG;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAiEnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
const SelectPrimitive = ({ options, onChange, value, theme = Admin_1.theme, disabled = false, }) => {
|
|
7
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ArrowDownHeadIcon } from "../icons";
|
|
3
|
+
import { theme as defaultTheme } from "../Admin";
|
|
4
|
+
const SelectPrimitive = ({ options, onChange, value, theme = defaultTheme, disabled = false, }) => {
|
|
5
|
+
return (_jsxs("div", { style: {
|
|
8
6
|
position: "relative",
|
|
9
7
|
fontFamily: theme?.fontFamily,
|
|
10
8
|
fontSize: 14,
|
|
11
9
|
fontWeight: 500,
|
|
12
|
-
}, children: [(
|
|
10
|
+
}, children: [_jsx("select", { disabled: disabled, style: {
|
|
13
11
|
width: "100%",
|
|
14
12
|
minWidth: 230,
|
|
15
13
|
maxWidth: 230,
|
|
@@ -30,7 +28,7 @@ const SelectPrimitive = ({ options, onChange, value, theme = Admin_1.theme, disa
|
|
|
30
28
|
boxShadow: "0 1px 2px 0 rgba(0,0,0,.05)",
|
|
31
29
|
fontFamily: theme?.fontFamily,
|
|
32
30
|
}, value: value || "", onChange: (event) => onChange(event.target.value), children: options?.length > 0 &&
|
|
33
|
-
options.map((option) => ((
|
|
31
|
+
options.map((option) => (_jsx("option", { value: option.value, label: option.label }, option.value))) }), _jsx(ArrowDownHeadIcon, { style: {
|
|
34
32
|
height: "20px",
|
|
35
33
|
width: "20px",
|
|
36
34
|
flex: "none",
|
|
@@ -40,5 +38,4 @@ const SelectPrimitive = ({ options, onChange, value, theme = Admin_1.theme, disa
|
|
|
40
38
|
color: theme?.secondaryTextColor,
|
|
41
39
|
}, "aria-hidden": "true" })] }));
|
|
42
40
|
};
|
|
43
|
-
|
|
44
|
-
//# sourceMappingURL=SelectPrimitive.js.map
|
|
41
|
+
export default SelectPrimitive;
|
|
@@ -5,6 +5,8 @@ interface TextInputPrimitiveProps {
|
|
|
5
5
|
value: string;
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
theme?: QuillTheme;
|
|
8
|
+
disabled?: boolean;
|
|
8
9
|
}
|
|
9
10
|
declare const TextInputPrimitive: React.FC<TextInputPrimitiveProps>;
|
|
10
11
|
export default TextInputPrimitive;
|
|
12
|
+
//# sourceMappingURL=TextInputPrimitive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInputPrimitive.d.ts","sourceRoot":"","sources":["../../src/primitives/TextInputPrimitive.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAyB,MAAM,UAAU,CAAC;AAE7D,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAkCzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { theme as defaultTheme } from '../Admin';
|
|
3
|
+
const TextInputPrimitive = ({ onChange, value, placeholder, theme = defaultTheme, disabled = false, }) => {
|
|
4
|
+
return (_jsx("input", { style: {
|
|
5
|
+
display: 'flex',
|
|
6
|
+
flexDirection: 'row',
|
|
7
|
+
alignItems: 'center',
|
|
8
|
+
paddingLeft: '12px',
|
|
9
|
+
paddingRight: '12px',
|
|
10
|
+
fontWeight: 'medium',
|
|
11
|
+
height: 38,
|
|
12
|
+
minWidth: 250,
|
|
13
|
+
boxShadow: '0 1px 2px 0 rgba(0,0,0,.05)',
|
|
14
|
+
width: '100%',
|
|
15
|
+
backgroundColor: theme?.backgroundColor || 'white',
|
|
16
|
+
color: theme?.primaryTextColor,
|
|
17
|
+
borderWidth: '1px',
|
|
18
|
+
borderColor: theme?.borderColor || '#E7E7E7',
|
|
19
|
+
borderStyle: 'solid',
|
|
20
|
+
borderRadius: '6px',
|
|
21
|
+
fontSize: 14,
|
|
22
|
+
}, disabled: disabled, onChange: onChange, value: value, placeholder: placeholder }));
|
|
23
|
+
};
|
|
24
|
+
export default TextInputPrimitive;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TogglePrimitive.d.ts","sourceRoot":"","sources":["../../src/primitives/TogglePrimitive.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,eAAe;WAAiC,GAAG;aAAW,GAAG;6CAiEtE,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const TogglePrimitive = ({ value, onClick }) => {
|
|
3
|
+
const toggleStyle = {
|
|
4
|
+
container: {
|
|
5
|
+
display: 'inline-block',
|
|
6
|
+
position: 'relative',
|
|
7
|
+
width: '70px',
|
|
8
|
+
height: '38px',
|
|
9
|
+
borderRadius: '24px',
|
|
10
|
+
backgroundColor: value ? '#212121' : '#ccc',
|
|
11
|
+
cursor: 'pointer',
|
|
12
|
+
transition: 'background-color 0.4s',
|
|
13
|
+
},
|
|
14
|
+
circle: {
|
|
15
|
+
position: 'absolute',
|
|
16
|
+
top: '3px',
|
|
17
|
+
left: value ? '35px' : '3px',
|
|
18
|
+
width: '32px',
|
|
19
|
+
height: '32px',
|
|
20
|
+
borderRadius: '50%',
|
|
21
|
+
backgroundColor: '#FFF',
|
|
22
|
+
transition: 'left 0.4s',
|
|
23
|
+
},
|
|
24
|
+
icon: {
|
|
25
|
+
position: 'absolute',
|
|
26
|
+
top: '3px',
|
|
27
|
+
left: '3px',
|
|
28
|
+
display: 'flex',
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
justifyContent: 'center',
|
|
31
|
+
width: '20px',
|
|
32
|
+
height: '20px',
|
|
33
|
+
color: '#FFF',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
return (_jsxs("div", { style: toggleStyle.container, onClick: onClick, "aria-checked": value, role: "switch", "aria-label": "Toggle between dark and light mode", children: [_jsx("div", { style: toggleStyle.circle }), value ? (_jsx("div", { style: {
|
|
37
|
+
...toggleStyle.icon,
|
|
38
|
+
left: '35px',
|
|
39
|
+
color: '#FFC107',
|
|
40
|
+
} })) : (_jsx("div", { style: {
|
|
41
|
+
...toggleStyle.icon,
|
|
42
|
+
color: '#607D8B',
|
|
43
|
+
} }))] }));
|
|
44
|
+
};
|
|
45
|
+
export default TogglePrimitive;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as TextInputPrimitive } from './TextInputPrimitive';
|
|
2
|
+
export { default as ButtonPrimitive } from './ButtonPrimitive';
|
|
3
|
+
export { default as SecondaryButtonPrimitive } from './SecondaryButtonPrimitive';
|
|
4
|
+
export { default as ModalPrimitive } from './ModalPrimitive';
|
|
5
|
+
export { default as SelectPrimitive } from './SelectPrimitive';
|
|
6
|
+
export { default as HeaderPrimitive } from './HeaderPrimitive';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/primitives/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export default function CreateEnvironment({ navigateToDashboardManager, containerStyle, }: {
|
|
3
|
+
navigateToDashboardManager?: () => void;
|
|
4
|
+
containerStyle?: CSSProperties;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=CreateEnvironment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateEnvironment.d.ts","sourceRoot":"","sources":["../../src/public_components/CreateEnvironment.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAuB,MAAM,OAAO,CAAC;AA2ClE,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,0BAA0B,EAC1B,cAAc,GACf,EAAE;IACD,0BAA0B,CAAC,EAAE,MAAM,IAAI,CAAC;IACxC,cAAc,CAAC,EAAE,aAAa,CAAC;CAChC,2CAiLA"}
|