@automattic/vip-design-system 1.6.3 → 1.6.5
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/build/system/Button/Button.js +1 -0
- package/build/system/Drawer/Drawer.d.ts +19 -9
- package/build/system/Drawer/Drawer.js +51 -9
- package/build/system/Drawer/Drawer.stories.d.ts +6 -2
- package/build/system/Drawer/Drawer.stories.js +314 -98
- package/build/system/Drawer/Drawer.test.js +13 -18
- package/build/system/Drawer/styles.d.ts +4 -3
- package/build/system/Drawer/styles.js +10 -4
- package/build/system/Form/Input.styles.d.ts +0 -2
- package/build/system/Form/Input.styles.js +0 -3
- package/build/system/Form/Toggle.js +0 -1
- package/build/system/Link/Link.d.ts +2 -22
- package/build/system/Link/Link.js +3 -3
- package/build/system/Nav/Nav.d.ts +1 -1
- package/build/system/Nav/Nav.stories.d.ts +1 -0
- package/build/system/Nav/Nav.stories.js +48 -28
- package/build/system/Nav/NavItem.d.ts +12 -8
- package/build/system/Nav/NavItem.js +15 -6
- package/build/system/Nav/NavItemGroup.js +5 -4
- package/build/system/Nav/styles/variants/breadcrumbs.d.ts +3 -0
- package/build/system/Nav/styles/variants/breadcrumbs.js +28 -0
- package/build/system/Nav/styles/variants/menu.d.ts +16 -0
- package/build/system/Nav/styles/variants/menu.js +106 -0
- package/build/system/Nav/styles/variants/menugroup.d.ts +6 -0
- package/build/system/Nav/styles/variants/menugroup.js +78 -0
- package/build/system/Nav/styles/variants/primary.d.ts +6 -0
- package/build/system/Nav/styles/variants/primary.js +55 -0
- package/build/system/Nav/styles/variants/tabs.d.ts +3 -0
- package/build/system/Nav/styles/variants/tabs.js +31 -0
- package/build/system/Nav/styles/variants/toolbar.d.ts +4 -0
- package/build/system/Nav/styles/variants/toolbar.js +47 -0
- package/build/system/Nav/styles.d.ts +3 -18
- package/build/system/Nav/styles.js +51 -272
- package/build/system/NewDialog/DialogClose.d.ts +6 -5
- package/build/system/NewDialog/DialogClose.js +44 -59
- package/build/system/NewDialog/DialogClose.test.js +40 -29
- package/build/system/NewDialog/DialogDescription.d.ts +7 -5
- package/build/system/NewDialog/DialogDescription.js +34 -40
- package/build/system/NewDialog/DialogOverlay.d.ts +9 -2
- package/build/system/NewDialog/DialogOverlay.js +30 -28
- package/build/system/NewDialog/DialogTitle.d.ts +9 -10
- package/build/system/NewDialog/DialogTitle.js +31 -24
- package/build/system/NewDialog/NewDialog.d.ts +21 -28
- package/build/system/NewDialog/NewDialog.js +73 -82
- package/build/system/NewDialog/NewDialog.stories.d.ts +1 -27
- package/build/system/NewDialog/NewDialog.stories.jsx +1 -1
- package/build/system/NewDialog/index.d.ts +8 -30
- package/build/system/NewDialog/index.js +10 -9
- package/build/system/NewDialog/styles.d.ts +3 -0
- package/build/system/NewDialog/styles.js +23 -0
- package/build/system/NewForm/FormAutocomplete.js +0 -2
- package/build/system/NewForm/FormAutocompleteMultiselect.js +0 -2
- package/build/system/Tabs/TabsTrigger.js +0 -1
- package/build/system/Toolbar/Logo.js +2 -1
- package/build/system/Toolbar/Toolbar.stories.js +3 -9
- package/build/system/theme/index.d.ts +46 -48
- package/build/system/theme/index.js +17 -1
- package/build/system/utils/stories/CustomLink.d.ts +2 -0
- package/build/system/utils/stories/CustomLink.js +16 -0
- package/package.json +1 -1
- package/src/system/Button/Button.tsx +1 -0
- package/src/system/Drawer/Drawer.stories.tsx +230 -61
- package/src/system/Drawer/Drawer.test.tsx +4 -9
- package/src/system/Drawer/Drawer.tsx +56 -29
- package/src/system/Drawer/styles.ts +11 -10
- package/src/system/Form/Input.styles.ts +0 -1
- package/src/system/Form/Toggle.js +0 -1
- package/src/system/Link/Link.tsx +8 -3
- package/src/system/Nav/Nav.stories.tsx +22 -3
- package/src/system/Nav/Nav.tsx +1 -1
- package/src/system/Nav/NavItem.tsx +20 -8
- package/src/system/Nav/NavItemGroup.tsx +7 -7
- package/src/system/Nav/styles/variants/breadcrumbs.ts +28 -0
- package/src/system/Nav/styles/variants/menu.ts +135 -0
- package/src/system/Nav/styles/variants/menugroup.ts +78 -0
- package/src/system/Nav/styles/variants/primary.ts +53 -0
- package/src/system/Nav/styles/variants/tabs.ts +27 -0
- package/src/system/Nav/styles/variants/toolbar.ts +48 -0
- package/src/system/Nav/styles.ts +67 -281
- package/src/system/NewDialog/{DialogClose.test.js → DialogClose.test.tsx} +3 -12
- package/src/system/NewDialog/DialogClose.tsx +46 -0
- package/src/system/NewDialog/{DialogDescription.js → DialogDescription.tsx} +6 -14
- package/src/system/NewDialog/DialogOverlay.tsx +34 -0
- package/src/system/NewDialog/{DialogTitle.js → DialogTitle.tsx} +7 -7
- package/src/system/NewDialog/NewDialog.stories.jsx +1 -1
- package/src/system/NewDialog/{NewDialog.js → NewDialog.tsx} +24 -31
- package/{build/system/NewDialog/DialogContent.js → src/system/NewDialog/styles.ts} +3 -1
- package/src/system/NewForm/FormAutocomplete.js +0 -2
- package/src/system/NewForm/FormAutocompleteMultiselect.js +0 -2
- package/src/system/Tabs/TabsTrigger.js +0 -1
- package/src/system/Toolbar/Logo.tsx +1 -0
- package/src/system/Toolbar/Toolbar.stories.tsx +1 -4
- package/src/system/theme/index.js +17 -1
- package/src/system/utils/stories/CustomLink.tsx +6 -0
- package/build/system/NewDialog/DialogContent.d.ts +0 -18
- package/src/system/NewDialog/DialogClose.js +0 -60
- package/src/system/NewDialog/DialogContent.js +0 -17
- package/src/system/NewDialog/DialogOverlay.js +0 -29
- /package/src/system/NewDialog/{index.js → index.ts} +0 -0
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
/** @jsxImportSource theme-ui */
|
|
2
2
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import React, { ReactNode } from 'react';
|
|
4
|
+
export interface DrawerContentProps extends DialogPrimitive.DialogContentProps, DrawerProps {
|
|
5
|
+
}
|
|
6
|
+
export declare const Content: React.ForwardRefExoticComponent<DrawerContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export interface DrawerProps extends DialogPrimitive.DialogProps {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
trigger?: ReactNode;
|
|
10
|
+
label?: string;
|
|
7
11
|
variant?: 'top' | 'right' | 'bottom' | 'left' | 'left-header' | 'right-header';
|
|
8
|
-
|
|
12
|
+
width?: number | string;
|
|
13
|
+
height?: number | string;
|
|
14
|
+
}
|
|
15
|
+
export declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export interface DrawerRootProps {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
trigger?: ReactNode;
|
|
9
19
|
}
|
|
10
|
-
declare const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
20
|
+
export declare const Trigger: ({ children }: {
|
|
21
|
+
children: any;
|
|
22
|
+
}) => React.JSX.Element;
|
|
23
|
+
export declare const Root: ({ children, trigger }: DrawerRootProps) => React.JSX.Element;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.Trigger = exports.Root = exports.Content = void 0;
|
|
4
|
+
exports.Trigger = exports.Root = exports.Drawer = exports.Content = void 0;
|
|
5
5
|
var DialogPrimitive = _interopRequireWildcard(require("@radix-ui/react-dialog"));
|
|
6
6
|
var _react = _interopRequireDefault(require("react"));
|
|
7
7
|
var _styles = require("./styles");
|
|
8
8
|
var _DialogClose = require("../NewDialog/DialogClose");
|
|
9
|
+
var _DialogTitle = require("../NewDialog/DialogTitle");
|
|
9
10
|
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
10
|
-
var _excluded = ["children", "
|
|
11
|
+
var _excluded = ["children", "variant", "label", "width", "height"],
|
|
12
|
+
_excluded2 = ["children", "width", "height", "variant", "trigger", "label"];
|
|
11
13
|
/** @jsxImportSource theme-ui */
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -16,19 +18,59 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
16
18
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
19
|
var Content = exports.Content = /*#__PURE__*/_react["default"].forwardRef(function (_ref, forwardedRef) {
|
|
18
20
|
var children = _ref.children,
|
|
19
|
-
sx = _ref.sx,
|
|
20
21
|
_ref$variant = _ref.variant,
|
|
21
22
|
variant = _ref$variant === void 0 ? 'left' : _ref$variant,
|
|
22
|
-
|
|
23
|
+
label = _ref.label,
|
|
24
|
+
width = _ref.width,
|
|
25
|
+
height = _ref.height,
|
|
26
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
23
27
|
return (0, _jsxRuntime.jsxs)(DialogPrimitive.Portal, {
|
|
24
28
|
children: [(0, _jsxRuntime.jsx)(DialogPrimitive.Overlay, {
|
|
25
29
|
sx: (0, _styles.drawerOverlayStyles)(variant)
|
|
26
|
-
}), (0, _jsxRuntime.jsxs)(DialogPrimitive.Content, _extends({},
|
|
27
|
-
sx:
|
|
30
|
+
}), (0, _jsxRuntime.jsxs)(DialogPrimitive.Content, _extends({}, rest, {
|
|
31
|
+
sx: (0, _styles.drawerContentStyles)(variant, width, height),
|
|
28
32
|
ref: forwardedRef,
|
|
29
|
-
children: [
|
|
33
|
+
children: [(0, _jsxRuntime.jsx)(_DialogTitle.DialogTitle, {
|
|
34
|
+
title: label,
|
|
35
|
+
hidden: true
|
|
36
|
+
}), (0, _jsxRuntime.jsx)(_DialogClose.DialogCloseDefault, {}), children]
|
|
30
37
|
}))]
|
|
31
38
|
});
|
|
32
39
|
});
|
|
33
|
-
var
|
|
34
|
-
var
|
|
40
|
+
var Drawer = exports.Drawer = /*#__PURE__*/_react["default"].forwardRef(function (_ref2, forwardedRef) {
|
|
41
|
+
var children = _ref2.children,
|
|
42
|
+
width = _ref2.width,
|
|
43
|
+
height = _ref2.height,
|
|
44
|
+
_ref2$variant = _ref2.variant,
|
|
45
|
+
variant = _ref2$variant === void 0 ? 'left' : _ref2$variant,
|
|
46
|
+
trigger = _ref2.trigger,
|
|
47
|
+
label = _ref2.label,
|
|
48
|
+
rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
49
|
+
return (0, _jsxRuntime.jsx)(Root, {
|
|
50
|
+
trigger: trigger,
|
|
51
|
+
children: (0, _jsxRuntime.jsx)(Content, _extends({
|
|
52
|
+
width: width,
|
|
53
|
+
variant: variant,
|
|
54
|
+
label: label,
|
|
55
|
+
ref: forwardedRef
|
|
56
|
+
}, rest, {
|
|
57
|
+
children: children
|
|
58
|
+
}))
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
var Trigger = exports.Trigger = function Trigger(_ref3) {
|
|
62
|
+
var children = _ref3.children;
|
|
63
|
+
return (0, _jsxRuntime.jsx)(DialogPrimitive.Trigger, {
|
|
64
|
+
asChild: true,
|
|
65
|
+
children: children
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
var Root = exports.Root = function Root(_ref4) {
|
|
69
|
+
var children = _ref4.children,
|
|
70
|
+
trigger = _ref4.trigger;
|
|
71
|
+
return (0, _jsxRuntime.jsxs)(DialogPrimitive.Root, {
|
|
72
|
+
children: [trigger && (0, _jsxRuntime.jsx)(Trigger, {
|
|
73
|
+
children: trigger
|
|
74
|
+
}), children]
|
|
75
|
+
});
|
|
76
|
+
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsxImportSource theme-ui */
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import { Drawer } from './Drawer';
|
|
2
4
|
import type { StoryObj } from '@storybook/react';
|
|
3
5
|
declare const _default: {
|
|
4
6
|
title: string;
|
|
5
|
-
component:
|
|
7
|
+
component: import("react").ForwardRefExoticComponent<import("./Drawer").DrawerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
8
|
parameters: {
|
|
7
9
|
docs: {
|
|
8
10
|
description: {
|
|
@@ -14,3 +16,5 @@ declare const _default: {
|
|
|
14
16
|
export default _default;
|
|
15
17
|
type Story = StoryObj<typeof Drawer>;
|
|
16
18
|
export declare const Default: Story;
|
|
19
|
+
export declare const ByParts: Story;
|
|
20
|
+
export declare const VIPMobileMenu: Story;
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports["default"] = exports.Default = void 0;
|
|
5
|
-
var
|
|
6
|
-
var
|
|
4
|
+
exports["default"] = exports.VIPMobileMenu = exports.Default = exports.ByParts = void 0;
|
|
5
|
+
var _ai = require("react-icons/ai");
|
|
6
|
+
var _bi = require("react-icons/bi");
|
|
7
|
+
var _md = require("react-icons/md");
|
|
8
|
+
var _Drawer = require("./Drawer");
|
|
7
9
|
var _ = require("..");
|
|
10
|
+
var _Logo = require("../Toolbar/Logo");
|
|
11
|
+
var _CustomLink = require("../utils/stories/CustomLink");
|
|
8
12
|
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
9
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
13
|
/** @jsxImportSource theme-ui */
|
|
13
14
|
var _default = exports["default"] = {
|
|
14
15
|
title: 'Drawer',
|
|
15
|
-
component: Drawer,
|
|
16
|
+
component: _Drawer.Drawer,
|
|
16
17
|
parameters: {
|
|
17
18
|
docs: {
|
|
18
19
|
description: {
|
|
19
|
-
component: "\nThe Drawer component is a navigation component that is hidden by default and can be toggled open and closed. It opens a panel that can contain any content. The base of this component is a Dialog.\n\n## Guidance\n\n### When to use the Drawer component\n\n- Use the Drawer component when you want to hide content that is not essential to the user experience. The Drawer component is a good choice for navigation menus, settings panels, and other non-essential content.\n- The VIP Dashboard uses this component to help users with some Responsive behavior.\n\n### When to consider something else\n\n- For essencial content, use other components.\n\n## Accessibility Considerations guidance\n\n- The Drawer is based on the Dialog component and inherits all of its accessibility considerations.\n- The trigger should be a button\n- The focus gets back to the trigger when the Drawer is closed\n- The Drawer should be closed when the Escape key is pressed\n- The Drawer should be closed when the overlay is clicked\n- The Drawer should be closed when the focus moves outside of the Drawer\n- The Drawer has a close button that should be used to close the Drawer\n\n## Using the component\n\n- Look at the examples below to see how the Drawer component is used.\n- You can use the `variant` prop to change the position of the
|
|
20
|
+
component: "\nThe Drawer component is a navigation component that is hidden by default and can be toggled open and closed. It opens a panel that can contain any content. The base of this component is a Dialog.\n\n## Guidance\n\n### When to use the Drawer component\n\n- Use the Drawer component when you want to hide content that is not essential to the user experience. The Drawer component is a good choice for navigation menus, settings panels, and other non-essential content.\n- The VIP Dashboard uses this component to help users with some Responsive behavior.\n\n### When to consider something else\n\n- For essencial content, use other components.\n\n## Accessibility Considerations guidance\n\n- The Drawer is based on the Dialog component and inherits all of its accessibility considerations.\n- The trigger should be a button\n- The focus gets back to the trigger when the Drawer is closed\n- The Drawer should be closed when the Escape key is pressed\n- The Drawer should be closed when the overlay is clicked\n- The Drawer should be closed when the focus moves outside of the Drawer\n- The Drawer has a close button that should be used to close the Drawer\n\n## Using the component\n\n- Look at the examples below to see how the Drawer component is used.\n- You can use the `variant` prop to change the position of the The default is `left`. Other options are: `top`, `right`, `bottom`.\n- You can pass some styles to the Drawer using the `sx` prop. It will be attached o the Content component. This is useful to change the width of the\n\n## Component Properties\n"
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
}
|
|
@@ -24,114 +25,329 @@ var _default = exports["default"] = {
|
|
|
24
25
|
var Default = exports.Default = {
|
|
25
26
|
render: function render() {
|
|
26
27
|
return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
27
|
-
children: [(0, _jsxRuntime.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
children:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
children: [(0, _jsxRuntime.jsx)(_Drawer.Drawer, {
|
|
29
|
+
label: "My XYZ Dialog",
|
|
30
|
+
trigger: (0, _jsxRuntime.jsx)(_.Button, {
|
|
31
|
+
children: "Open "
|
|
32
|
+
}),
|
|
33
|
+
width: 320,
|
|
34
|
+
children: (0, _jsxRuntime.jsx)("p", {
|
|
34
35
|
sx: {
|
|
35
|
-
|
|
36
|
+
ml: 3
|
|
36
37
|
},
|
|
37
|
-
children:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
children:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
38
|
+
children: "Hello from default"
|
|
39
|
+
})
|
|
40
|
+
}), (0, _jsxRuntime.jsx)(_Drawer.Drawer, {
|
|
41
|
+
trigger: (0, _jsxRuntime.jsx)(_.Button, {
|
|
42
|
+
children: "Top"
|
|
43
|
+
}),
|
|
44
|
+
variant: "top",
|
|
45
|
+
label: "Dialog Content",
|
|
46
|
+
children: (0, _jsxRuntime.jsx)("p", {
|
|
47
|
+
sx: {
|
|
48
|
+
ml: 3
|
|
49
|
+
},
|
|
50
|
+
children: "Hello from top"
|
|
51
|
+
})
|
|
52
|
+
}), (0, _jsxRuntime.jsx)(_Drawer.Drawer, {
|
|
53
|
+
trigger: (0, _jsxRuntime.jsx)(_.Button, {
|
|
54
|
+
children: "Right"
|
|
55
|
+
}),
|
|
56
|
+
variant: "right",
|
|
57
|
+
label: "Dialog",
|
|
58
|
+
width: 500,
|
|
59
|
+
children: (0, _jsxRuntime.jsx)("p", {
|
|
60
|
+
sx: {
|
|
61
|
+
ml: 3
|
|
62
|
+
},
|
|
63
|
+
children: "Hello from right width 500px"
|
|
64
|
+
})
|
|
65
|
+
}), (0, _jsxRuntime.jsx)(_Drawer.Drawer, {
|
|
66
|
+
trigger: (0, _jsxRuntime.jsx)(_.Button, {
|
|
67
|
+
children: "Bottom"
|
|
68
|
+
}),
|
|
69
|
+
variant: "bottom",
|
|
70
|
+
label: "Dialog",
|
|
71
|
+
height: 200,
|
|
72
|
+
children: (0, _jsxRuntime.jsx)("p", {
|
|
73
|
+
sx: {
|
|
74
|
+
ml: 3
|
|
75
|
+
},
|
|
76
|
+
children: "Hello from bottom with 200px"
|
|
77
|
+
})
|
|
78
|
+
}), (0, _jsxRuntime.jsx)(_Drawer.Drawer, {
|
|
79
|
+
trigger: (0, _jsxRuntime.jsx)(_.Button, {
|
|
80
|
+
children: "Left"
|
|
81
|
+
}),
|
|
82
|
+
variant: "left",
|
|
83
|
+
label: "Dialog",
|
|
84
|
+
width: 600,
|
|
85
|
+
children: (0, _jsxRuntime.jsx)("p", {
|
|
86
|
+
sx: {
|
|
87
|
+
ml: 3
|
|
88
|
+
},
|
|
89
|
+
children: "Hello from left width 600px"
|
|
90
|
+
})
|
|
91
|
+
}), (0, _jsxRuntime.jsx)(_Drawer.Drawer, {
|
|
92
|
+
trigger: (0, _jsxRuntime.jsx)(_.Button, {
|
|
93
|
+
children: "Left Header"
|
|
94
|
+
}),
|
|
95
|
+
variant: "left-header",
|
|
96
|
+
label: "Dialog",
|
|
97
|
+
children: (0, _jsxRuntime.jsx)("p", {
|
|
98
|
+
sx: {
|
|
99
|
+
ml: 3
|
|
100
|
+
},
|
|
101
|
+
children: "Hello from left header (VIP Dashboard needs)"
|
|
102
|
+
})
|
|
103
|
+
}), (0, _jsxRuntime.jsx)(_Drawer.Drawer, {
|
|
104
|
+
trigger: (0, _jsxRuntime.jsx)(_.Button, {
|
|
105
|
+
children: "Right Header"
|
|
106
|
+
}),
|
|
107
|
+
variant: "left-header",
|
|
108
|
+
label: "Dialog",
|
|
109
|
+
children: (0, _jsxRuntime.jsx)("p", {
|
|
110
|
+
sx: {
|
|
111
|
+
ml: 3
|
|
112
|
+
},
|
|
113
|
+
children: "Hello from right header (VIP Dashboard needs)"
|
|
114
|
+
})
|
|
115
|
+
})]
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
var ByParts = exports.ByParts = {
|
|
120
|
+
render: function render() {
|
|
121
|
+
return (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
122
|
+
children: (0, _jsxRuntime.jsxs)(_Drawer.Root, {
|
|
123
|
+
children: [(0, _jsxRuntime.jsx)(_Drawer.Trigger, {
|
|
62
124
|
children: (0, _jsxRuntime.jsx)(_.Button, {
|
|
63
|
-
children: "
|
|
125
|
+
children: "Open "
|
|
64
126
|
})
|
|
65
|
-
}), (0, _jsxRuntime.jsx)(
|
|
66
|
-
|
|
127
|
+
}), (0, _jsxRuntime.jsx)(_Drawer.Content, {
|
|
128
|
+
width: 320,
|
|
129
|
+
label: "My XYZ Dialog",
|
|
67
130
|
children: (0, _jsxRuntime.jsx)("p", {
|
|
68
131
|
sx: {
|
|
69
132
|
ml: 3
|
|
70
133
|
},
|
|
71
|
-
children: "Hello from
|
|
134
|
+
children: "Hello from default"
|
|
72
135
|
})
|
|
73
136
|
})]
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
137
|
+
})
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
var VIPMobileMenu = exports.VIPMobileMenu = {
|
|
142
|
+
render: function render() {
|
|
143
|
+
return (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
144
|
+
children: (0, _jsxRuntime.jsxs)(_Drawer.Root, {
|
|
145
|
+
children: [(0, _jsxRuntime.jsx)(_Drawer.Trigger, {
|
|
146
|
+
children: (0, _jsxRuntime.jsxs)(_.Button, {
|
|
147
|
+
type: "button",
|
|
148
|
+
variant: "tertiary",
|
|
83
149
|
sx: {
|
|
84
|
-
|
|
150
|
+
display: 'flex',
|
|
151
|
+
alignItems: 'center',
|
|
152
|
+
fontSize: 2,
|
|
153
|
+
gap: 1,
|
|
154
|
+
mx: 2
|
|
85
155
|
},
|
|
86
|
-
children: "
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
156
|
+
children: ["Menu", (0, _jsxRuntime.jsx)(_md.MdMenu, {
|
|
157
|
+
size: 24,
|
|
158
|
+
sx: {
|
|
159
|
+
mt: function mt(theme) {
|
|
160
|
+
var _theme$space;
|
|
161
|
+
return (theme == null || (_theme$space = theme.space) == null ? void 0 : _theme$space[1]) / 2 + "px";
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
})]
|
|
94
165
|
})
|
|
95
|
-
}), (0, _jsxRuntime.jsx)(
|
|
166
|
+
}), (0, _jsxRuntime.jsx)(_Drawer.Content, {
|
|
167
|
+
label: "Dialog X",
|
|
96
168
|
variant: "left",
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
ml: 3
|
|
100
|
-
},
|
|
101
|
-
children: "Hello from left"
|
|
102
|
-
})
|
|
103
|
-
})]
|
|
104
|
-
}), (0, _jsxRuntime.jsxs)(Drawer.Root, {
|
|
105
|
-
children: [(0, _jsxRuntime.jsx)(Drawer.Trigger, {
|
|
106
|
-
asChild: true,
|
|
107
|
-
children: (0, _jsxRuntime.jsx)(_.Button, {
|
|
108
|
-
children: "Left Header"
|
|
109
|
-
})
|
|
110
|
-
}), (0, _jsxRuntime.jsx)(Drawer.Content, {
|
|
111
|
-
variant: "left-header",
|
|
112
|
-
children: (0, _jsxRuntime.jsx)("p", {
|
|
113
|
-
sx: {
|
|
114
|
-
ml: 3
|
|
115
|
-
},
|
|
116
|
-
children: "Hello from left header (VIP Dashboard needs)"
|
|
117
|
-
})
|
|
118
|
-
})]
|
|
119
|
-
}), (0, _jsxRuntime.jsxs)(Drawer.Root, {
|
|
120
|
-
children: [(0, _jsxRuntime.jsx)(Drawer.Trigger, {
|
|
121
|
-
asChild: true,
|
|
122
|
-
children: (0, _jsxRuntime.jsx)(_.Button, {
|
|
123
|
-
children: "Right Header"
|
|
124
|
-
})
|
|
125
|
-
}), (0, _jsxRuntime.jsx)(Drawer.Content, {
|
|
126
|
-
variant: "left-header",
|
|
127
|
-
children: (0, _jsxRuntime.jsx)("p", {
|
|
169
|
+
width: 320,
|
|
170
|
+
children: (0, _jsxRuntime.jsxs)("div", {
|
|
128
171
|
sx: {
|
|
129
|
-
|
|
172
|
+
backgroundColor: 'toolbar.background',
|
|
173
|
+
boxShadow: 'none'
|
|
130
174
|
},
|
|
131
|
-
children:
|
|
175
|
+
children: [(0, _jsxRuntime.jsx)("div", {
|
|
176
|
+
sx: {
|
|
177
|
+
height: 56,
|
|
178
|
+
width: '100%',
|
|
179
|
+
p: 4,
|
|
180
|
+
px: 5
|
|
181
|
+
},
|
|
182
|
+
children: (0, _jsxRuntime.jsx)(_Logo.Logo, {})
|
|
183
|
+
}), (0, _jsxRuntime.jsx)("div", {
|
|
184
|
+
sx: {
|
|
185
|
+
overflowX: 'hidden',
|
|
186
|
+
overflowY: 'auto',
|
|
187
|
+
height: 'calc(100vh - 56px)',
|
|
188
|
+
display: 'flex',
|
|
189
|
+
flex: 1
|
|
190
|
+
},
|
|
191
|
+
children: (0, _jsxRuntime.jsxs)(_.Flex, {
|
|
192
|
+
sx: {
|
|
193
|
+
width: '100%',
|
|
194
|
+
flexDirection: 'column'
|
|
195
|
+
},
|
|
196
|
+
children: [(0, _jsxRuntime.jsxs)(_.Nav.Primary, {
|
|
197
|
+
label: "Main Links",
|
|
198
|
+
orientation: "vertical",
|
|
199
|
+
sx: {
|
|
200
|
+
p: 4
|
|
201
|
+
},
|
|
202
|
+
children: [(0, _jsxRuntime.jsx)(_.NavItem.MenuInverse, {
|
|
203
|
+
href: "/apps",
|
|
204
|
+
active: true,
|
|
205
|
+
as: _CustomLink.CustomLink,
|
|
206
|
+
children: "My Applications"
|
|
207
|
+
}), (0, _jsxRuntime.jsx)(_.NavItem.MenuInverse, {
|
|
208
|
+
href: "/orgs",
|
|
209
|
+
as: _CustomLink.CustomLink,
|
|
210
|
+
children: "My Organizations"
|
|
211
|
+
})]
|
|
212
|
+
}), (0, _jsxRuntime.jsx)(_.Box, {
|
|
213
|
+
sx: {
|
|
214
|
+
alignSelf: 'stretch',
|
|
215
|
+
backgroundColor: 'layer.1',
|
|
216
|
+
minHeight: "calc(100vh - 56px)",
|
|
217
|
+
pt: 2,
|
|
218
|
+
px: 4,
|
|
219
|
+
width: '100%',
|
|
220
|
+
a: {
|
|
221
|
+
border: 'none'
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
children: (0, _jsxRuntime.jsxs)(_.Nav.Menu, {
|
|
225
|
+
sx: {
|
|
226
|
+
mb: 4
|
|
227
|
+
},
|
|
228
|
+
label: "Nav Menu",
|
|
229
|
+
children: [(0, _jsxRuntime.jsx)(_.NavItem.Menu, {
|
|
230
|
+
href: "https://wordpress.com",
|
|
231
|
+
renderIcon: function renderIcon(size) {
|
|
232
|
+
return (0, _jsxRuntime.jsx)(_bi.BiGridAlt, {
|
|
233
|
+
size: size
|
|
234
|
+
});
|
|
235
|
+
},
|
|
236
|
+
as: _CustomLink.CustomLink,
|
|
237
|
+
children: "Overview"
|
|
238
|
+
}), (0, _jsxRuntime.jsx)(_.NavItem.Menu, {
|
|
239
|
+
as: _CustomLink.CustomLink,
|
|
240
|
+
href: "https://random-website.com/",
|
|
241
|
+
renderIcon: function renderIcon(size) {
|
|
242
|
+
return (0, _jsxRuntime.jsx)(_bi.BiWindows, {
|
|
243
|
+
size: size
|
|
244
|
+
});
|
|
245
|
+
},
|
|
246
|
+
children: "Network Sites"
|
|
247
|
+
}), (0, _jsxRuntime.jsx)(_.NavItem.Menu, {
|
|
248
|
+
as: _CustomLink.CustomLink,
|
|
249
|
+
href: "https://random-website.com/",
|
|
250
|
+
renderIcon: function renderIcon(size) {
|
|
251
|
+
return (0, _jsxRuntime.jsx)(_ai.AiOutlineLock, {
|
|
252
|
+
size: size
|
|
253
|
+
});
|
|
254
|
+
},
|
|
255
|
+
children: "Domains & TLS"
|
|
256
|
+
}), (0, _jsxRuntime.jsxs)(_.NavItem.MenuGroup, {
|
|
257
|
+
active: true,
|
|
258
|
+
label: "Logs",
|
|
259
|
+
renderIcon: function renderIcon(size) {
|
|
260
|
+
return (0, _jsxRuntime.jsx)(_bi.BiHistory, {
|
|
261
|
+
size: size
|
|
262
|
+
});
|
|
263
|
+
},
|
|
264
|
+
children: [(0, _jsxRuntime.jsx)(_.NavItem.Menu, {
|
|
265
|
+
active: true,
|
|
266
|
+
as: _CustomLink.CustomLink,
|
|
267
|
+
href: "https://google.com/",
|
|
268
|
+
children: "Audit"
|
|
269
|
+
}), (0, _jsxRuntime.jsx)(_.NavItem.Menu, {
|
|
270
|
+
as: _CustomLink.CustomLink,
|
|
271
|
+
href: "https://wpvip.com/",
|
|
272
|
+
children: "Runtime"
|
|
273
|
+
}), (0, _jsxRuntime.jsx)(_.NavItem.Menu, {
|
|
274
|
+
as: _CustomLink.CustomLink,
|
|
275
|
+
href: "https://dashboard.wpvip.com/",
|
|
276
|
+
children: "Slow Query"
|
|
277
|
+
})]
|
|
278
|
+
}), (0, _jsxRuntime.jsxs)(_.NavItem.MenuGroup, {
|
|
279
|
+
label: "Performance",
|
|
280
|
+
renderIcon: function renderIcon(size) {
|
|
281
|
+
return (0, _jsxRuntime.jsx)(_bi.BiTachometer, {
|
|
282
|
+
size: size
|
|
283
|
+
});
|
|
284
|
+
},
|
|
285
|
+
children: [(0, _jsxRuntime.jsx)(_.NavItem.Menu, {
|
|
286
|
+
as: _CustomLink.CustomLink,
|
|
287
|
+
href: "https://random-website.com/",
|
|
288
|
+
children: "Metrics"
|
|
289
|
+
}), (0, _jsxRuntime.jsx)(_.NavItem.Menu, {
|
|
290
|
+
as: _CustomLink.CustomLink,
|
|
291
|
+
href: "https://random-website.com/",
|
|
292
|
+
children: "Monitor"
|
|
293
|
+
}), (0, _jsxRuntime.jsx)(_.NavItem.Menu, {
|
|
294
|
+
as: _CustomLink.CustomLink,
|
|
295
|
+
href: "https://random-website.com/",
|
|
296
|
+
children: "Cache"
|
|
297
|
+
})]
|
|
298
|
+
}), (0, _jsxRuntime.jsx)(_.NavItem.Menu, {
|
|
299
|
+
as: _CustomLink.CustomLink,
|
|
300
|
+
href: "https://random-website.com/",
|
|
301
|
+
renderIcon: function renderIcon(size) {
|
|
302
|
+
return (0, _jsxRuntime.jsx)(_bi.BiCodeAlt, {
|
|
303
|
+
size: size
|
|
304
|
+
});
|
|
305
|
+
},
|
|
306
|
+
children: "Code [v]"
|
|
307
|
+
}), (0, _jsxRuntime.jsx)(_.NavItem.Menu, {
|
|
308
|
+
as: _CustomLink.CustomLink,
|
|
309
|
+
href: "https://random-website.com/",
|
|
310
|
+
renderIcon: function renderIcon(size) {
|
|
311
|
+
return (0, _jsxRuntime.jsx)(_bi.BiData, {
|
|
312
|
+
size: size
|
|
313
|
+
});
|
|
314
|
+
},
|
|
315
|
+
children: "Database [v]"
|
|
316
|
+
}), (0, _jsxRuntime.jsx)(_.NavItem.Menu, {
|
|
317
|
+
as: _CustomLink.CustomLink,
|
|
318
|
+
href: "https://random-website.com/",
|
|
319
|
+
renderIcon: function renderIcon(size) {
|
|
320
|
+
return (0, _jsxRuntime.jsx)(_md.MdOutlinePhotoLibrary, {
|
|
321
|
+
size: size
|
|
322
|
+
});
|
|
323
|
+
},
|
|
324
|
+
children: "Media [v]"
|
|
325
|
+
}), (0, _jsxRuntime.jsx)(_.NavItem.Menu, {
|
|
326
|
+
as: _CustomLink.CustomLink,
|
|
327
|
+
href: "https://random-website.com/",
|
|
328
|
+
renderIcon: function renderIcon(size) {
|
|
329
|
+
return (0, _jsxRuntime.jsx)(_bi.BiBell, {
|
|
330
|
+
size: size
|
|
331
|
+
});
|
|
332
|
+
},
|
|
333
|
+
children: "Notifications"
|
|
334
|
+
}), (0, _jsxRuntime.jsx)(_.NavItem.Menu, {
|
|
335
|
+
as: _CustomLink.CustomLink,
|
|
336
|
+
href: "https://random-website.com/",
|
|
337
|
+
renderIcon: function renderIcon(size) {
|
|
338
|
+
return (0, _jsxRuntime.jsx)(_bi.BiBulb, {
|
|
339
|
+
size: size
|
|
340
|
+
});
|
|
341
|
+
},
|
|
342
|
+
children: "Features"
|
|
343
|
+
})]
|
|
344
|
+
})
|
|
345
|
+
})]
|
|
346
|
+
})
|
|
347
|
+
})]
|
|
132
348
|
})
|
|
133
349
|
})]
|
|
134
|
-
})
|
|
350
|
+
})
|
|
135
351
|
});
|
|
136
352
|
}
|
|
137
353
|
};
|