@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.
Files changed (99) hide show
  1. package/build/system/Button/Button.js +1 -0
  2. package/build/system/Drawer/Drawer.d.ts +19 -9
  3. package/build/system/Drawer/Drawer.js +51 -9
  4. package/build/system/Drawer/Drawer.stories.d.ts +6 -2
  5. package/build/system/Drawer/Drawer.stories.js +314 -98
  6. package/build/system/Drawer/Drawer.test.js +13 -18
  7. package/build/system/Drawer/styles.d.ts +4 -3
  8. package/build/system/Drawer/styles.js +10 -4
  9. package/build/system/Form/Input.styles.d.ts +0 -2
  10. package/build/system/Form/Input.styles.js +0 -3
  11. package/build/system/Form/Toggle.js +0 -1
  12. package/build/system/Link/Link.d.ts +2 -22
  13. package/build/system/Link/Link.js +3 -3
  14. package/build/system/Nav/Nav.d.ts +1 -1
  15. package/build/system/Nav/Nav.stories.d.ts +1 -0
  16. package/build/system/Nav/Nav.stories.js +48 -28
  17. package/build/system/Nav/NavItem.d.ts +12 -8
  18. package/build/system/Nav/NavItem.js +15 -6
  19. package/build/system/Nav/NavItemGroup.js +5 -4
  20. package/build/system/Nav/styles/variants/breadcrumbs.d.ts +3 -0
  21. package/build/system/Nav/styles/variants/breadcrumbs.js +28 -0
  22. package/build/system/Nav/styles/variants/menu.d.ts +16 -0
  23. package/build/system/Nav/styles/variants/menu.js +106 -0
  24. package/build/system/Nav/styles/variants/menugroup.d.ts +6 -0
  25. package/build/system/Nav/styles/variants/menugroup.js +78 -0
  26. package/build/system/Nav/styles/variants/primary.d.ts +6 -0
  27. package/build/system/Nav/styles/variants/primary.js +55 -0
  28. package/build/system/Nav/styles/variants/tabs.d.ts +3 -0
  29. package/build/system/Nav/styles/variants/tabs.js +31 -0
  30. package/build/system/Nav/styles/variants/toolbar.d.ts +4 -0
  31. package/build/system/Nav/styles/variants/toolbar.js +47 -0
  32. package/build/system/Nav/styles.d.ts +3 -18
  33. package/build/system/Nav/styles.js +51 -272
  34. package/build/system/NewDialog/DialogClose.d.ts +6 -5
  35. package/build/system/NewDialog/DialogClose.js +44 -59
  36. package/build/system/NewDialog/DialogClose.test.js +40 -29
  37. package/build/system/NewDialog/DialogDescription.d.ts +7 -5
  38. package/build/system/NewDialog/DialogDescription.js +34 -40
  39. package/build/system/NewDialog/DialogOverlay.d.ts +9 -2
  40. package/build/system/NewDialog/DialogOverlay.js +30 -28
  41. package/build/system/NewDialog/DialogTitle.d.ts +9 -10
  42. package/build/system/NewDialog/DialogTitle.js +31 -24
  43. package/build/system/NewDialog/NewDialog.d.ts +21 -28
  44. package/build/system/NewDialog/NewDialog.js +73 -82
  45. package/build/system/NewDialog/NewDialog.stories.d.ts +1 -27
  46. package/build/system/NewDialog/NewDialog.stories.jsx +1 -1
  47. package/build/system/NewDialog/index.d.ts +8 -30
  48. package/build/system/NewDialog/index.js +10 -9
  49. package/build/system/NewDialog/styles.d.ts +3 -0
  50. package/build/system/NewDialog/styles.js +23 -0
  51. package/build/system/NewForm/FormAutocomplete.js +0 -2
  52. package/build/system/NewForm/FormAutocompleteMultiselect.js +0 -2
  53. package/build/system/Tabs/TabsTrigger.js +0 -1
  54. package/build/system/Toolbar/Logo.js +2 -1
  55. package/build/system/Toolbar/Toolbar.stories.js +3 -9
  56. package/build/system/theme/index.d.ts +46 -48
  57. package/build/system/theme/index.js +17 -1
  58. package/build/system/utils/stories/CustomLink.d.ts +2 -0
  59. package/build/system/utils/stories/CustomLink.js +16 -0
  60. package/package.json +1 -1
  61. package/src/system/Button/Button.tsx +1 -0
  62. package/src/system/Drawer/Drawer.stories.tsx +230 -61
  63. package/src/system/Drawer/Drawer.test.tsx +4 -9
  64. package/src/system/Drawer/Drawer.tsx +56 -29
  65. package/src/system/Drawer/styles.ts +11 -10
  66. package/src/system/Form/Input.styles.ts +0 -1
  67. package/src/system/Form/Toggle.js +0 -1
  68. package/src/system/Link/Link.tsx +8 -3
  69. package/src/system/Nav/Nav.stories.tsx +22 -3
  70. package/src/system/Nav/Nav.tsx +1 -1
  71. package/src/system/Nav/NavItem.tsx +20 -8
  72. package/src/system/Nav/NavItemGroup.tsx +7 -7
  73. package/src/system/Nav/styles/variants/breadcrumbs.ts +28 -0
  74. package/src/system/Nav/styles/variants/menu.ts +135 -0
  75. package/src/system/Nav/styles/variants/menugroup.ts +78 -0
  76. package/src/system/Nav/styles/variants/primary.ts +53 -0
  77. package/src/system/Nav/styles/variants/tabs.ts +27 -0
  78. package/src/system/Nav/styles/variants/toolbar.ts +48 -0
  79. package/src/system/Nav/styles.ts +67 -281
  80. package/src/system/NewDialog/{DialogClose.test.js → DialogClose.test.tsx} +3 -12
  81. package/src/system/NewDialog/DialogClose.tsx +46 -0
  82. package/src/system/NewDialog/{DialogDescription.js → DialogDescription.tsx} +6 -14
  83. package/src/system/NewDialog/DialogOverlay.tsx +34 -0
  84. package/src/system/NewDialog/{DialogTitle.js → DialogTitle.tsx} +7 -7
  85. package/src/system/NewDialog/NewDialog.stories.jsx +1 -1
  86. package/src/system/NewDialog/{NewDialog.js → NewDialog.tsx} +24 -31
  87. package/{build/system/NewDialog/DialogContent.js → src/system/NewDialog/styles.ts} +3 -1
  88. package/src/system/NewForm/FormAutocomplete.js +0 -2
  89. package/src/system/NewForm/FormAutocompleteMultiselect.js +0 -2
  90. package/src/system/Tabs/TabsTrigger.js +0 -1
  91. package/src/system/Toolbar/Logo.tsx +1 -0
  92. package/src/system/Toolbar/Toolbar.stories.tsx +1 -4
  93. package/src/system/theme/index.js +17 -1
  94. package/src/system/utils/stories/CustomLink.tsx +6 -0
  95. package/build/system/NewDialog/DialogContent.d.ts +0 -18
  96. package/src/system/NewDialog/DialogClose.js +0 -60
  97. package/src/system/NewDialog/DialogContent.js +0 -17
  98. package/src/system/NewDialog/DialogOverlay.js +0 -29
  99. /package/src/system/NewDialog/{index.js → index.ts} +0 -0
@@ -52,6 +52,7 @@ var Button = exports.Button = /*#__PURE__*/(0, _react.forwardRef)(function (_ref
52
52
  '&:hover': {
53
53
  textDecoration: 'none'
54
54
  },
55
+ '&:focus': 'none',
55
56
  '&:focus-visible': function focusVisible(theme) {
56
57
  return theme.outline;
57
58
  },
@@ -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
- import { ThemeUIStyleObject } from 'theme-ui';
5
- export interface DrawerContentProps extends DialogPrimitive.DialogContentProps {
6
- children?: React.ReactNode;
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
- sx?: ThemeUIStyleObject;
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 Content: React.ForwardRefExoticComponent<DrawerContentProps & React.RefAttributes<HTMLDivElement>>;
11
- declare const Root: React.FC<DialogPrimitive.DialogProps>;
12
- declare const Trigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
13
- export { Root, Trigger, Content };
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", "sx", "variant"];
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
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
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({}, props, {
27
- sx: _extends({}, (0, _styles.drawerContentStyles)(variant), sx),
30
+ }), (0, _jsxRuntime.jsxs)(DialogPrimitive.Content, _extends({}, rest, {
31
+ sx: (0, _styles.drawerContentStyles)(variant, width, height),
28
32
  ref: forwardedRef,
29
- children: [children, (0, _jsxRuntime.jsx)(_DialogClose.DialogCloseDefault, {})]
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 Root = exports.Root = DialogPrimitive.Root;
34
- var Trigger = exports.Trigger = DialogPrimitive.Trigger;
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
- import * as Drawer from './Drawer';
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: typeof Drawer;
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 _react = _interopRequireDefault(require("react"));
6
- var Drawer = _interopRequireWildcard(require("./Drawer"));
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 Drawer. 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 Drawer.\n\n## Component Properties\n"
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.jsxs)(Drawer.Root, {
28
- children: [(0, _jsxRuntime.jsx)(Drawer.Trigger, {
29
- asChild: true,
30
- children: (0, _jsxRuntime.jsx)(_.Button, {
31
- children: "Open Drawer."
32
- })
33
- }), (0, _jsxRuntime.jsx)(Drawer.Content, {
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
- width: 320
36
+ ml: 3
36
37
  },
37
- children: (0, _jsxRuntime.jsx)("p", {
38
- sx: {
39
- ml: 3
40
- },
41
- children: "Hello from default"
42
- })
43
- })]
44
- }), (0, _jsxRuntime.jsxs)(Drawer.Root, {
45
- children: [(0, _jsxRuntime.jsx)(Drawer.Trigger, {
46
- asChild: true,
47
- children: (0, _jsxRuntime.jsx)(_.Button, {
48
- children: "Top"
49
- })
50
- }), (0, _jsxRuntime.jsx)(Drawer.Content, {
51
- variant: "top",
52
- children: (0, _jsxRuntime.jsx)("p", {
53
- sx: {
54
- ml: 3
55
- },
56
- children: "Hello from top"
57
- })
58
- })]
59
- }), (0, _jsxRuntime.jsxs)(Drawer.Root, {
60
- children: [(0, _jsxRuntime.jsx)(Drawer.Trigger, {
61
- asChild: true,
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: "Right"
125
+ children: "Open "
64
126
  })
65
- }), (0, _jsxRuntime.jsx)(Drawer.Content, {
66
- variant: "right",
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 right"
134
+ children: "Hello from default"
72
135
  })
73
136
  })]
74
- }), (0, _jsxRuntime.jsxs)(Drawer.Root, {
75
- children: [(0, _jsxRuntime.jsx)(Drawer.Trigger, {
76
- asChild: true,
77
- children: (0, _jsxRuntime.jsx)(_.Button, {
78
- children: "Bottom"
79
- })
80
- }), (0, _jsxRuntime.jsx)(Drawer.Content, {
81
- variant: "bottom",
82
- children: (0, _jsxRuntime.jsx)("p", {
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
- ml: 3
150
+ display: 'flex',
151
+ alignItems: 'center',
152
+ fontSize: 2,
153
+ gap: 1,
154
+ mx: 2
85
155
  },
86
- children: "Hello from bottom"
87
- })
88
- })]
89
- }), (0, _jsxRuntime.jsxs)(Drawer.Root, {
90
- children: [(0, _jsxRuntime.jsx)(Drawer.Trigger, {
91
- asChild: true,
92
- children: (0, _jsxRuntime.jsx)(_.Button, {
93
- children: "Left"
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)(Drawer.Content, {
166
+ }), (0, _jsxRuntime.jsx)(_Drawer.Content, {
167
+ label: "Dialog X",
96
168
  variant: "left",
97
- children: (0, _jsxRuntime.jsx)("p", {
98
- sx: {
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
- ml: 3
172
+ backgroundColor: 'toolbar.background',
173
+ boxShadow: 'none'
130
174
  },
131
- children: "Hello from right header (VIP Dashboard needs)"
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
  };