@automattic/vip-design-system 2.10.0 → 2.10.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.
Files changed (176) hide show
  1. package/babel.config.js +23 -19
  2. package/build/declaration.d.js +0 -1
  3. package/build/system/Accordion/Accordion.js +28 -33
  4. package/build/system/Accordion/Accordion.stories.js +34 -35
  5. package/build/system/Accordion/Accordion.test.js +35 -34
  6. package/build/system/Accordion/index.js +5 -8
  7. package/build/system/Avatar/Avatar.js +13 -17
  8. package/build/system/Avatar/Avatar.stories.js +10 -12
  9. package/build/system/Avatar/Avatar.test.js +15 -14
  10. package/build/system/Avatar/index.js +4 -6
  11. package/build/system/Badge/Badge.js +9 -14
  12. package/build/system/Badge/Badge.stories.js +23 -23
  13. package/build/system/Badge/Badge.test.js +15 -14
  14. package/build/system/Badge/index.js +4 -6
  15. package/build/system/Box/Box.js +9 -13
  16. package/build/system/Box/Box.stories.js +5 -8
  17. package/build/system/Breadcrumbs/Breadcrumbs.js +34 -38
  18. package/build/system/Breadcrumbs/Breadcrumbs.stories.js +18 -21
  19. package/build/system/Breadcrumbs/Breadcrumbs.test.js +28 -30
  20. package/build/system/Breadcrumbs/styles.js +5 -9
  21. package/build/system/Button/Button.js +11 -17
  22. package/build/system/Button/Button.stories.js +34 -33
  23. package/build/system/Button/Button.test.js +17 -16
  24. package/build/system/Button/ButtonSubmit.js +12 -16
  25. package/build/system/Button/ButtonSubmit.stories.js +12 -16
  26. package/build/system/Button/ButtonSubmit.test.js +15 -14
  27. package/build/system/Button/index.js +5 -8
  28. package/build/system/Card/Card.js +12 -14
  29. package/build/system/Card/Card.stories.js +21 -24
  30. package/build/system/Card/Card.test.js +19 -18
  31. package/build/system/Card/index.js +4 -6
  32. package/build/system/Code/Code.js +19 -23
  33. package/build/system/Code/Code.stories.js +16 -18
  34. package/build/system/Code/Code.test.js +20 -19
  35. package/build/system/Code/index.js +4 -6
  36. package/build/system/Drawer/Drawer.js +25 -30
  37. package/build/system/Drawer/Drawer.stories.js +38 -39
  38. package/build/system/Drawer/Drawer.test.js +19 -18
  39. package/build/system/Drawer/styles.js +9 -11
  40. package/build/system/Dropdown/Dropdown.js +23 -26
  41. package/build/system/Dropdown/Dropdown.test.js +16 -18
  42. package/build/system/Dropdown/DropdownContent.js +14 -20
  43. package/build/system/Dropdown/DropdownItem.js +19 -25
  44. package/build/system/Dropdown/DropdownLabel.js +10 -16
  45. package/build/system/Dropdown/DropdownSeparator.js +10 -16
  46. package/build/system/Dropdown/index.js +20 -23
  47. package/build/system/FilterDropdown/FilterDropdown.js +23 -29
  48. package/build/system/FilterDropdown/FilterDropdown.stories.js +9 -11
  49. package/build/system/FilterDropdown/FilterDropdown.test.js +7 -10
  50. package/build/system/Flex/Flex.js +7 -10
  51. package/build/system/Flex/Flex.stories.js +6 -10
  52. package/build/system/Flex/index.js +4 -6
  53. package/build/system/Footer/Footer.d.ts +33 -0
  54. package/build/system/Footer/Footer.js +82 -0
  55. package/build/system/Footer/Footer.stories.d.ts +41 -0
  56. package/build/system/Footer/Footer.stories.js +53 -0
  57. package/build/system/Footer/Footer.test.d.ts +1 -0
  58. package/build/system/Footer/Footer.test.js +36 -0
  59. package/build/system/Form/Checkbox/Checkbox.js +14 -18
  60. package/build/system/Form/Checkbox/Checkbox.stories.js +47 -48
  61. package/build/system/Form/Checkbox/Checkbox.test.js +23 -21
  62. package/build/system/Form/Checkbox/styles.js +7 -10
  63. package/build/system/Form/Input.js +19 -18
  64. package/build/system/Form/Input.stories.js +16 -18
  65. package/build/system/Form/Input.styles.js +5 -9
  66. package/build/system/Form/Label.js +14 -16
  67. package/build/system/Form/Label.stories.js +15 -15
  68. package/build/system/Form/Radio/Radio.js +13 -18
  69. package/build/system/Form/Radio/Radio.stories.js +43 -43
  70. package/build/system/Form/Radio/Radio.test.js +19 -18
  71. package/build/system/Form/Radio/RadioOption.js +22 -23
  72. package/build/system/Form/Radio/styles.js +7 -10
  73. package/build/system/Form/RadioGroupChip.js +26 -29
  74. package/build/system/Form/RadioGroupChip.stories.js +12 -15
  75. package/build/system/Form/RadioGroupChip.test.js +12 -11
  76. package/build/system/Form/RequiredLabel.js +3 -7
  77. package/build/system/Form/Toggle.js +11 -16
  78. package/build/system/Form/Toggle.stories.js +25 -27
  79. package/build/system/Form/Toggle.test.js +12 -11
  80. package/build/system/Form/Validation.js +10 -12
  81. package/build/system/Form/index.d.ts +2 -1
  82. package/build/system/Form/index.js +2 -0
  83. package/build/system/Grid/Grid.js +7 -10
  84. package/build/system/Grid/Grid.stories.js +6 -10
  85. package/build/system/Grid/index.js +4 -6
  86. package/build/system/Heading/Heading.js +9 -14
  87. package/build/system/Heading/Heading.stories.js +13 -16
  88. package/build/system/Hr/Hr.js +3 -7
  89. package/build/system/Hr/Hr.stories.js +10 -11
  90. package/build/system/Hr/Hr.test.js +14 -14
  91. package/build/system/Link/Link.js +11 -14
  92. package/build/system/Link/Link.stories.js +11 -14
  93. package/build/system/Link/index.js +4 -6
  94. package/build/system/LinkExternal/LinkExternal.d.ts +23 -3
  95. package/build/system/LinkExternal/LinkExternal.js +17 -23
  96. package/build/system/LinkExternal/LinkExternal.stories.d.ts +1 -8
  97. package/build/system/LinkExternal/LinkExternal.stories.js +4 -9
  98. package/build/system/LinkExternal/LinkExternal.test.js +14 -15
  99. package/build/system/MobileMenu/MobileMenu.js +24 -29
  100. package/build/system/MobileMenu/MobileMenu.stories.js +66 -67
  101. package/build/system/MobileMenu/MobileMenu.test.js +21 -22
  102. package/build/system/Nav/Nav.js +26 -32
  103. package/build/system/Nav/Nav.stories.js +97 -99
  104. package/build/system/Nav/Nav.test.js +32 -28
  105. package/build/system/Nav/NavItem.js +40 -45
  106. package/build/system/Nav/NavItemGroup.js +34 -39
  107. package/build/system/Nav/NavItemGroup.test.js +26 -23
  108. package/build/system/Nav/styles/variants/breadcrumbs.js +4 -7
  109. package/build/system/Nav/styles/variants/menu.js +8 -12
  110. package/build/system/Nav/styles/variants/menugroup.js +7 -11
  111. package/build/system/Nav/styles/variants/primary.js +4 -8
  112. package/build/system/Nav/styles/variants/tabs.js +3 -7
  113. package/build/system/Nav/styles/variants/toolbar.js +5 -8
  114. package/build/system/Nav/styles.js +26 -29
  115. package/build/system/NewDialog/DialogClose.js +14 -18
  116. package/build/system/NewDialog/DialogClose.test.js +11 -14
  117. package/build/system/NewDialog/DialogDescription.js +9 -15
  118. package/build/system/NewDialog/DialogOverlay.js +11 -13
  119. package/build/system/NewDialog/DialogTitle.js +7 -15
  120. package/build/system/NewDialog/NewDialog.js +24 -29
  121. package/build/system/NewDialog/index.js +7 -11
  122. package/build/system/NewDialog/styles.js +1 -5
  123. package/build/system/NewForm/Fieldset.js +13 -17
  124. package/build/system/NewForm/Form.js +8 -13
  125. package/build/system/NewForm/FormAutocomplete.js +2 -2
  126. package/build/system/NewForm/Legend.js +11 -15
  127. package/build/system/Notice/Notice.js +22 -25
  128. package/build/system/Notice/Notice.stories.js +41 -43
  129. package/build/system/Notice/index.js +5 -5
  130. package/build/system/Page/Page.js +4 -8
  131. package/build/system/Page/Page.test.js +14 -14
  132. package/build/system/Progress/Progress.js +21 -24
  133. package/build/system/Progress/Progress.stories.js +9 -15
  134. package/build/system/Progress/Progress.test.js +14 -13
  135. package/build/system/Progress/index.js +4 -6
  136. package/build/system/ScreenReaderText/ScreenReaderText.js +9 -9
  137. package/build/system/Spinner/Spinner.js +9 -14
  138. package/build/system/Spinner/Spinner.stories.js +6 -10
  139. package/build/system/Spinner/Spinner.test.js +14 -13
  140. package/build/system/Spinner/index.js +1 -6
  141. package/build/system/Table/Table.js +20 -22
  142. package/build/system/Table/Table.stories.js +29 -30
  143. package/build/system/Table/TableCell.js +9 -11
  144. package/build/system/Table/TableRow.js +10 -11
  145. package/build/system/Table/index.js +6 -10
  146. package/build/system/Text/Text.js +9 -14
  147. package/build/system/Text/Text.stories.js +24 -25
  148. package/build/system/Text/index.js +4 -6
  149. package/build/system/Toolbar/Logo.js +11 -15
  150. package/build/system/Toolbar/Toolbar.js +12 -17
  151. package/build/system/Toolbar/Toolbar.stories.js +47 -50
  152. package/build/system/Toolbar/Toolbar.test.js +26 -24
  153. package/build/system/Toolbar/ToolbarUtilNav.js +9 -16
  154. package/build/system/Toolbar/index.js +10 -15
  155. package/build/system/Tooltip/Tooltip.js +9 -14
  156. package/build/system/Tooltip/Tooltip.stories.js +29 -31
  157. package/build/system/Tooltip/index.js +5 -5
  158. package/build/system/Wizard/Wizard.js +11 -18
  159. package/build/system/Wizard/Wizard.stories.js +37 -38
  160. package/build/system/Wizard/WizardStep.js +26 -32
  161. package/build/system/Wizard/index.js +6 -7
  162. package/build/system/assets/a8cLogo.d.ts +2 -0
  163. package/build/system/assets/a8cLogo.js +39 -0
  164. package/build/system/index.d.ts +2 -1
  165. package/build/system/index.js +2 -0
  166. package/build/system/theme/breakpoints.js +1 -5
  167. package/build/system/utils/stories/CustomLink.js +7 -13
  168. package/package.json +1 -1
  169. package/src/system/Footer/Footer.stories.tsx +46 -0
  170. package/src/system/Footer/Footer.test.tsx +40 -0
  171. package/src/system/Footer/Footer.tsx +120 -0
  172. package/src/system/Form/index.js +2 -0
  173. package/src/system/LinkExternal/LinkExternal.tsx +27 -8
  174. package/src/system/NewForm/FormAutocomplete.js +2 -2
  175. package/src/system/assets/a8cLogo.tsx +30 -0
  176. package/src/system/index.js +2 -0
@@ -1,93 +1,92 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports["default"] = exports.Default = void 0;
5
- var _ = require("..");
6
- var _jsxRuntime = require("theme-ui/jsx-runtime");
7
1
  /** @jsxImportSource theme-ui */
8
2
  // we'll need jsxImportSource for the sx prop when used with html elements
3
+
9
4
  /**
10
5
  * Internal dependencies
11
6
  */
12
- var _default = exports["default"] = {
7
+ import { Text } from '..';
8
+ import { jsxs as _jsxs } from "theme-ui/jsx-runtime";
9
+ import { jsx as _jsx } from "theme-ui/jsx-runtime";
10
+ import { Fragment as _Fragment } from "theme-ui/jsx-runtime";
11
+ export default {
13
12
  title: 'Text',
14
- component: _.Text
13
+ component: Text
15
14
  };
16
- var Default = exports.Default = function Default() {
17
- return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
18
- children: [(0, _jsxRuntime.jsxs)(_.Text, {
15
+ export var Default = function Default() {
16
+ return _jsxs(_Fragment, {
17
+ children: [_jsxs(Text, {
19
18
  children: ["Apparently we had reached a great height in the atmosphere, for the sky was a dead black, and the stars had ceased to twinkle. By the same illusion which lifts the horizon of the sea to the level of the spectator on a hillside, the sable cloud beneath was dished out, and the car seemed to float in the middle of an immense dark sphere, whose upper half was strewn with silver.", ' ']
20
- }), (0, _jsxRuntime.jsx)(_.Text, {
19
+ }), _jsx(Text, {
21
20
  sx: {
22
21
  color: 'texts.accent'
23
22
  },
24
23
  children: "Text Accent"
25
- }), (0, _jsxRuntime.jsx)(_.Text, {
24
+ }), _jsx(Text, {
26
25
  sx: {
27
26
  color: 'texts.helper'
28
27
  },
29
28
  children: "Text Helper"
30
- }), (0, _jsxRuntime.jsx)(_.Text, {
29
+ }), _jsx(Text, {
31
30
  sx: {
32
31
  color: 'texts.helper',
33
32
  fontWeight: 'body'
34
33
  },
35
34
  children: "Text Helper"
36
- }), (0, _jsxRuntime.jsx)(_.Text, {
35
+ }), _jsx(Text, {
37
36
  sx: {
38
37
  color: 'texts.helper',
39
38
  fontWeight: 'heading'
40
39
  },
41
40
  children: "Text Helper"
42
- }), (0, _jsxRuntime.jsx)(_.Text, {
41
+ }), _jsx(Text, {
43
42
  sx: {
44
43
  color: 'texts.helper',
45
44
  fontWeight: 'regular'
46
45
  },
47
46
  children: "Text Helper"
48
- }), (0, _jsxRuntime.jsx)(_.Text, {
47
+ }), _jsx(Text, {
49
48
  sx: {
50
49
  color: 'texts.helper',
51
50
  fontWeight: 'medium'
52
51
  },
53
52
  children: "Text Helper"
54
- }), (0, _jsxRuntime.jsx)(_.Text, {
53
+ }), _jsx(Text, {
55
54
  sx: {
56
55
  color: 'texts.helper',
57
56
  fontWeight: 'bold'
58
57
  },
59
58
  children: "Text Helper"
60
- }), (0, _jsxRuntime.jsx)(_.Text, {
59
+ }), _jsx(Text, {
61
60
  sx: {
62
61
  color: 'texts.helper',
63
62
  fontWeight: 'light'
64
63
  },
65
64
  children: "Text Helper"
66
- }), (0, _jsxRuntime.jsx)(_.Text, {
65
+ }), _jsx(Text, {
67
66
  sx: {
68
67
  color: 'texts.secondary'
69
68
  },
70
69
  children: "Text Secondary"
71
- }), (0, _jsxRuntime.jsx)(_.Text, {
70
+ }), _jsx(Text, {
72
71
  sx: {
73
72
  color: 'texts.primary'
74
73
  },
75
74
  children: "Text Primary"
76
- }), (0, _jsxRuntime.jsx)(_.Text, {
75
+ }), _jsx(Text, {
77
76
  sx: {
78
77
  color: 'texts.placeholder'
79
78
  },
80
79
  children: "Text placeholder"
81
- }), (0, _jsxRuntime.jsx)(_.Text, {
80
+ }), _jsx(Text, {
82
81
  sx: {
83
82
  color: 'texts.disabled'
84
83
  },
85
84
  children: "Text disabled"
86
- }), (0, _jsxRuntime.jsx)("div", {
85
+ }), _jsx("div", {
87
86
  sx: {
88
87
  bg: 'layer.inverse'
89
88
  },
90
- children: (0, _jsxRuntime.jsx)(_.Text, {
89
+ children: _jsx(Text, {
91
90
  sx: {
92
91
  color: 'texts.inverse'
93
92
  },
@@ -1,6 +1,4 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.Text = void 0;
5
- var _Text = require("./Text");
6
- exports.Text = _Text.Text;
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ export { Text } from './Text';
@@ -1,27 +1,23 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.Logo = void 0;
5
- var _classnames = _interopRequireDefault(require("classnames"));
6
- var _react = _interopRequireDefault(require("react"));
7
- var _themeUi = require("theme-ui");
8
- var _jsxRuntime = require("theme-ui/jsx-runtime");
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
1
  /** @jsxImportSource theme-ui */
11
2
 
12
3
  /**
13
4
  * External dependencies
14
5
  */
6
+ import classNames from 'classnames';
7
+ import React from 'react';
8
+ import { Link } from 'theme-ui';
15
9
 
16
10
  /**
17
11
  * Internal dependencies
18
- */var VIP_LOGO = 'vip-logo-component';
19
- var Logo = exports.Logo = function Logo(_ref) {
12
+ */
13
+ import { jsx as _jsx } from "theme-ui/jsx-runtime";
14
+ var VIP_LOGO = 'vip-logo-component';
15
+ export var Logo = function Logo(_ref) {
20
16
  var className = _ref.className,
21
17
  _ref$as = _ref.as,
22
18
  as = _ref$as === void 0 ? 'a' : _ref$as,
23
19
  href = _ref.href;
24
- return (0, _jsxRuntime.jsx)(_themeUi.Link, {
20
+ return _jsx(Link, {
25
21
  sx: {
26
22
  width: 54,
27
23
  color: 'toolbar.brand',
@@ -30,13 +26,13 @@ var Logo = exports.Logo = function Logo(_ref) {
30
26
  },
31
27
  href: href,
32
28
  as: as,
33
- children: (0, _jsxRuntime.jsx)("svg", {
34
- className: (0, _classnames["default"])(VIP_LOGO, className),
29
+ children: _jsx("svg", {
30
+ className: classNames(VIP_LOGO, className),
35
31
  xmlns: "http://www.w3.org/2000/svg",
36
32
  viewBox: "0 0 55 24",
37
33
  role: "img",
38
34
  "aria-label": "WordPress VIP Logo",
39
- children: (0, _jsxRuntime.jsx)("path", {
35
+ children: _jsx("path", {
40
36
  d: "m12.014 0c-6.6103 0-12.014 5.3911-12.014 11.986 0 6.6226 5.4034 12.014 12.014 12.014 6.6377 0 12.041-5.3911 12.041-12.014 0-6.5952-5.4035-11.986-12.041-11.986zm-10.807 11.986c0-1.5598 0.32914-3.0376 0.93257-4.3786l5.1566 14.094c-3.5931-1.7515-6.0891-5.4459-6.0891-9.715zm10.807 10.782c-1.0697 0-2.0846-0.1642-3.0446-0.4378l3.2366-9.4139 3.3189 9.0855c0.0274 0.0547 0.0548 0.1094 0.0823 0.1368-1.1246 0.4105-2.3315 0.6294-3.5932 0.6294zm1.5086-15.818c0.6583-0.02737 1.2343-0.10946 1.2343-0.10946 0.576-0.0821 0.5211-0.93045-0.0823-0.87572 0 0-1.7554 0.13683-2.88 0.13683-1.0697 0-2.8526-0.13683-2.8526-0.13683-0.576-0.02736-0.65828 0.84835-0.05485 0.87572 0 0 0.54857 0.05473 1.1245 0.10946l1.6732 4.5975-2.3589 7.0604-3.9223-11.658c0.65828-0.02737 1.2343-0.10946 1.2343-0.10946 0.576-0.0821 0.52115-0.93045-0.08228-0.87572 0 0-1.7554 0.13683-2.88 0.13683h-0.68572c1.9474-2.9555 5.2663-4.8985 9.024-4.8985 2.8252 0 5.376 1.0673 7.296 2.8187h-0.1371c-1.0697 0-1.8103 0.93044-1.8103 1.9156 0 0.87571 0.5211 1.642 1.0697 2.5177 0.4114 0.71152 0.8777 1.642 0.8777 2.9829 0 0.9304-0.2743 2.0798-0.8228 3.4755l-1.0698 3.5849-3.8948-11.548zm3.9223 14.367l3.2914-9.5233c0.6034-1.5325 0.8229-2.764 0.8229-3.8586 0-0.41049-0.0275-0.76625-0.0823-1.122 0.8503 1.5325 1.3165 3.3113 1.3165 5.1722 0.0275 3.9955-2.112 7.4709-5.3485 9.3318zm17.472-14.86l-2.4412 7.1425c-0.2468 0.8757-0.4663 1.6967-0.5485 2.463h-0.0549c-0.0549-0.7663-0.2743-1.6146-0.5486-2.463l-2.4411-7.1425h-3.2092l4.608 12.068h3.2915l4.608-12.068h-3.264zm4.8548 0l-0.9051 2.3808v9.6602h3.2366v-12.041h-2.3315zm13.879 1.423c-0.7954-1.0946-1.92-1.642-3.3463-1.642-1.5086 0-2.5509 0.60206-3.3189 1.7788h-0.1645l-0.4663-1.5599h-2.6332v17.542h3.2366v-5.0627c0-0.1642-0.0548-0.7389-0.1646-1.7514h0.1646c0.7954 1.0399 1.8103 1.5325 3.2366 1.5325 0.9326 0 1.7554-0.2463 2.4686-0.7389 0.6857-0.4926 1.2342-1.2315 1.6182-2.1619 0.384-0.9579 0.576-2.0799 0.576-3.3661 0-1.9429-0.4114-3.4754-1.2068-4.5701zm-4.2514 8.1825c-0.8229 0-1.4538-0.2737-1.8378-0.8484-0.384-0.5473-0.576-1.4778-0.576-2.7913v-0.3558c0.0275-1.1494 0.2195-1.9703 0.576-2.4629 0.384-0.49259 0.96-0.73888 1.7829-0.73888 0.768 0 1.344 0.30103 1.7006 0.90308 0.3565 0.60203 0.5485 1.4777 0.5485 2.6818 0.0275 2.3809-0.7131 3.6124-2.1942 3.6124z"
41
37
  })
42
38
  })
@@ -1,22 +1,17 @@
1
- "use strict";
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ /** @jsxImportSource theme-ui */
2
3
 
3
- exports.__esModule = true;
4
- exports.ToolbarPrimary = void 0;
5
- var _classnames = _interopRequireDefault(require("classnames"));
6
- var _react = _interopRequireWildcard(require("react"));
7
- var _index = require("./index");
8
- var _ = require("..");
9
- var _jsxRuntime = require("theme-ui/jsx-runtime");
10
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
11
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /** @jsxImportSource theme-ui */
14
- var Toolbar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
4
+ import classNames from 'classnames';
5
+ import React, { forwardRef } from 'react';
6
+ import { VIP_TOOLBAR } from './index';
7
+ import { Flex } from '..';
8
+ import { jsx as _jsx } from "theme-ui/jsx-runtime";
9
+ var Toolbar = /*#__PURE__*/forwardRef(function (_ref, ref) {
15
10
  var className = _ref.className,
16
11
  children = _ref.children;
17
- return (0, _jsxRuntime.jsx)(_.Flex, {
12
+ return _jsx(Flex, {
18
13
  ref: ref,
19
- className: (0, _classnames["default"])(_index.VIP_TOOLBAR, className),
14
+ className: classNames(VIP_TOOLBAR, className),
20
15
  as: "header",
21
16
  role: "banner",
22
17
  sx: {
@@ -32,8 +27,8 @@ var Toolbar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
32
27
  });
33
28
 
34
29
  // Variant: Primary (TODO)
35
- var ToolbarPrimary = exports.ToolbarPrimary = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
36
- return (0, _jsxRuntime.jsx)(Toolbar, _extends({}, props, {
30
+ export var ToolbarPrimary = /*#__PURE__*/forwardRef(function (props, ref) {
31
+ return _jsx(Toolbar, _extends({}, props, {
37
32
  ref: ref
38
33
  }));
39
34
  });
@@ -1,18 +1,15 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports["default"] = exports.VIPDashboardLike = exports.RawBar = exports.Default = void 0;
5
- var _bi = require("react-icons/bi");
6
- var _ = require(".");
7
- var _system = require("../../system");
8
- var _ScreenReaderText = _interopRequireDefault(require("../ScreenReaderText"));
9
- var _CustomLink = require("../utils/stories/CustomLink");
10
- var _jsxRuntime = require("theme-ui/jsx-runtime");
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
1
  /** @jsxImportSource theme-ui */
13
- var _default = exports["default"] = {
2
+ import { BiSolidHelpCircle, BiSolidBell } from 'react-icons/bi';
3
+ import { Toolbar } from '.';
4
+ import { Text, Avatar, Nav, NavItem, Flex, Toggle, Label } from '../../system';
5
+ import ScreenReaderText from '../ScreenReaderText';
6
+ import { CustomLink } from '../utils/stories/CustomLink';
7
+ import { jsx as _jsx } from "theme-ui/jsx-runtime";
8
+ import { jsxs as _jsxs } from "theme-ui/jsx-runtime";
9
+ import { Fragment as _Fragment } from "theme-ui/jsx-runtime";
10
+ export default {
14
11
  title: 'Navigation/Toolbar',
15
- component: _.Toolbar,
12
+ component: Toolbar,
16
13
  parameters: {
17
14
  docs: {
18
15
  description: {
@@ -21,86 +18,86 @@ var _default = exports["default"] = {
21
18
  }
22
19
  }
23
20
  };
24
- var Default = exports.Default = {
21
+ export var Default = {
25
22
  render: function render() {
26
- return (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
27
- children: (0, _jsxRuntime.jsxs)(_.Toolbar.Primary, {
28
- children: [(0, _jsxRuntime.jsx)(_.Toolbar.Logo, {
23
+ return _jsx(_Fragment, {
24
+ children: _jsxs(Toolbar.Primary, {
25
+ children: [_jsx(Toolbar.Logo, {
29
26
  href: "https://wpvip.com/"
30
- }), (0, _jsxRuntime.jsxs)(_system.Nav.Toolbar, {
27
+ }), _jsxs(Nav.Toolbar, {
31
28
  label: "Main",
32
- children: [(0, _jsxRuntime.jsx)(_system.NavItem.Toolbar, {
29
+ children: [_jsx(NavItem.Toolbar, {
33
30
  active: true,
34
31
  href: "https://googles.com",
35
32
  children: "My Applications"
36
- }), (0, _jsxRuntime.jsx)(_system.NavItem.Toolbar, {
33
+ }), _jsx(NavItem.Toolbar, {
37
34
  href: "https://google.com",
38
35
  children: "My Organization"
39
36
  })]
40
- }), (0, _jsxRuntime.jsxs)(_.Toolbar.UtilNav, {
41
- children: [(0, _jsxRuntime.jsx)(_system.Text, {
37
+ }), _jsxs(Toolbar.UtilNav, {
38
+ children: [_jsx(Text, {
42
39
  sx: {
43
40
  color: 'toolbar.text.default',
44
41
  mb: 0
45
42
  },
46
43
  children: "Utility Item"
47
- }), (0, _jsxRuntime.jsx)(_.Toolbar.IconHolder, {
48
- children: (0, _jsxRuntime.jsx)(_bi.BiSolidBell, {})
44
+ }), _jsx(Toolbar.IconHolder, {
45
+ children: _jsx(BiSolidBell, {})
49
46
  })]
50
47
  })]
51
48
  })
52
49
  });
53
50
  }
54
51
  };
55
- var RawBar = exports.RawBar = {
52
+ export var RawBar = {
56
53
  render: function render() {
57
- return (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
58
- children: (0, _jsxRuntime.jsxs)(_.Toolbar.Primary, {
59
- children: [(0, _jsxRuntime.jsx)(_.Toolbar.Logo, {
54
+ return _jsx(_Fragment, {
55
+ children: _jsxs(Toolbar.Primary, {
56
+ children: [_jsx(Toolbar.Logo, {
60
57
  href: "https://wpvip.com/"
61
- }), (0, _jsxRuntime.jsx)(_system.Nav.Toolbar, {
58
+ }), _jsx(Nav.Toolbar, {
62
59
  label: "Main"
63
60
  })]
64
61
  })
65
62
  });
66
63
  }
67
64
  };
68
- var VIPDashboardLike = exports.VIPDashboardLike = {
65
+ export var VIPDashboardLike = {
69
66
  render: function render() {
70
- return (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
71
- children: (0, _jsxRuntime.jsxs)(_.Toolbar.Primary, {
72
- children: [(0, _jsxRuntime.jsx)(_.Toolbar.Logo, {
73
- as: _CustomLink.CustomLink
74
- }), (0, _jsxRuntime.jsxs)(_system.Nav.Toolbar, {
67
+ return _jsx(_Fragment, {
68
+ children: _jsxs(Toolbar.Primary, {
69
+ children: [_jsx(Toolbar.Logo, {
70
+ as: CustomLink
71
+ }), _jsxs(Nav.Toolbar, {
75
72
  label: "Main",
76
- children: [(0, _jsxRuntime.jsx)(_system.NavItem.Toolbar, {
73
+ children: [_jsx(NavItem.Toolbar, {
77
74
  href: "https://googles.com",
78
75
  children: "My Applications"
79
- }), (0, _jsxRuntime.jsx)(_system.NavItem.Toolbar, {
76
+ }), _jsx(NavItem.Toolbar, {
80
77
  active: true,
81
78
  href: "https://google.com",
82
- as: _CustomLink.CustomLink,
79
+ as: CustomLink,
83
80
  children: "My Organizations"
84
81
  })]
85
- }), (0, _jsxRuntime.jsxs)(_.Toolbar.UtilNav, {
86
- children: [(0, _jsxRuntime.jsxs)(_system.Flex, {
82
+ }), _jsxs(Toolbar.UtilNav, {
83
+ children: [_jsxs(Flex, {
87
84
  sx: {
88
85
  gap: 2,
89
86
  minHeight: 64,
90
87
  alignItems: 'center'
91
88
  },
92
- children: [(0, _jsxRuntime.jsxs)(_system.Flex, {
89
+ children: [_jsxs(Flex, {
93
90
  sx: {
94
91
  alignItems: 'center'
95
92
  },
96
- children: [(0, _jsxRuntime.jsx)(_system.Toggle, {
93
+ children: [_jsx(Toggle, {
97
94
  checked: true,
98
95
  onChange: function onChange() {},
99
96
  name: "viptogglefeaure",
100
97
  id: "viptogglefeaure",
101
98
  variant: "warning",
102
99
  "aria-label": "Vip features toggle"
103
- }), (0, _jsxRuntime.jsx)(_system.Label, {
100
+ }), _jsx(Label, {
104
101
  htmlFor: "viptogglefeaure",
105
102
  sx: {
106
103
  color: 'toolbar.text.default',
@@ -109,7 +106,7 @@ var VIPDashboardLike = exports.VIPDashboardLike = {
109
106
  },
110
107
  children: "VIP"
111
108
  })]
112
- }), (0, _jsxRuntime.jsx)("a", {
109
+ }), _jsx("a", {
113
110
  href: "/",
114
111
  sx: {
115
112
  color: 'icon.inverse',
@@ -118,11 +115,11 @@ var VIPDashboardLike = exports.VIPDashboardLike = {
118
115
  display: 'flex'
119
116
  },
120
117
  "aria-label": "Help center",
121
- children: (0, _jsxRuntime.jsx)(_bi.BiSolidHelpCircle, {
118
+ children: _jsx(BiSolidHelpCircle, {
122
119
  width: 16,
123
120
  height: 16
124
121
  })
125
- }), (0, _jsxRuntime.jsx)("a", {
122
+ }), _jsx("a", {
126
123
  href: "/",
127
124
  sx: {
128
125
  color: 'icon.inverse',
@@ -131,17 +128,17 @@ var VIPDashboardLike = exports.VIPDashboardLike = {
131
128
  display: 'flex'
132
129
  },
133
130
  "aria-label": "Help center",
134
- children: (0, _jsxRuntime.jsx)(_bi.BiSolidBell, {
131
+ children: _jsx(BiSolidBell, {
135
132
  width: 16,
136
133
  height: 16
137
134
  })
138
135
  })]
139
- }), (0, _jsxRuntime.jsx)(_.Toolbar.Separator, {}), (0, _jsxRuntime.jsxs)("a", {
136
+ }), _jsx(Toolbar.Separator, {}), _jsxs("a", {
140
137
  href: "/",
141
- children: [(0, _jsxRuntime.jsx)(_system.Avatar, {
138
+ children: [_jsx(Avatar, {
142
139
  name: "John Doe",
143
140
  src: "https://i.pravatar.cc/80"
144
- }), (0, _jsxRuntime.jsx)(_ScreenReaderText["default"], {
141
+ }), _jsx(ScreenReaderText, {
145
142
  children: "John Doe"
146
143
  })]
147
144
  })]
@@ -1,37 +1,39 @@
1
- "use strict";
2
-
3
- var _react = require("@testing-library/react");
4
- var _jestAxe = require("jest-axe");
5
- var _themeUi = require("theme-ui");
6
- var _system = require("../../system");
7
- var _jsxRuntime = require("theme-ui/jsx-runtime");
8
1
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
9
2
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
10
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } // TODO: Fix this
11
- /* eslint-disable @typescript-eslint/ban-ts-comment */ // @ts-nocheck
3
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
4
+ // TODO: Fix this
5
+ /* eslint-disable @typescript-eslint/ban-ts-comment */
6
+ // @ts-nocheck
12
7
  /** @jsxImportSource theme-ui */
8
+
9
+ import { render, screen } from '@testing-library/react';
10
+ import { axe } from 'jest-axe';
11
+ import { ThemeUIProvider } from 'theme-ui';
12
+ import { Toolbar, Nav, NavItem, Text, theme } from '../../system';
13
+ import { jsx as _jsx } from "theme-ui/jsx-runtime";
14
+ import { jsxs as _jsxs } from "theme-ui/jsx-runtime";
13
15
  var renderWithTheme = function renderWithTheme(children) {
14
- return (0, _react.render)((0, _jsxRuntime.jsx)(_themeUi.ThemeUIProvider, {
15
- theme: _system.theme,
16
+ return render(_jsx(ThemeUIProvider, {
17
+ theme: theme,
16
18
  children: children
17
19
  }));
18
20
  };
19
21
  var renderComponent = function renderComponent() {
20
- return renderWithTheme((0, _jsxRuntime.jsxs)(_system.Toolbar.Primary, {
21
- children: [(0, _jsxRuntime.jsx)(_system.Toolbar.Logo, {
22
+ return renderWithTheme(_jsxs(Toolbar.Primary, {
23
+ children: [_jsx(Toolbar.Logo, {
22
24
  href: "https://wpvip.com/"
23
- }), (0, _jsxRuntime.jsxs)(_system.Nav.Toolbar, {
25
+ }), _jsxs(Nav.Toolbar, {
24
26
  label: "Main links",
25
- children: [(0, _jsxRuntime.jsx)(_system.NavItem.Toolbar, {
27
+ children: [_jsx(NavItem.Toolbar, {
26
28
  active: true,
27
29
  href: "https://googles.com",
28
30
  children: "My Applications"
29
- }), (0, _jsxRuntime.jsx)(_system.NavItem.Toolbar, {
31
+ }), _jsx(NavItem.Toolbar, {
30
32
  href: "https://google.com",
31
33
  children: "My Organization"
32
34
  })]
33
- }), (0, _jsxRuntime.jsx)(_system.Toolbar.UtilNav, {
34
- children: (0, _jsxRuntime.jsx)(_system.Text, {
35
+ }), _jsx(Toolbar.UtilNav, {
36
+ children: _jsx(Text, {
35
37
  children: "Utility content"
36
38
  })
37
39
  })]
@@ -44,22 +46,22 @@ describe('<Toolbar />', function () {
44
46
  while (1) switch (_context.prev = _context.next) {
45
47
  case 0:
46
48
  _renderComponent = renderComponent(), container = _renderComponent.container; // Should find the toolbar main nav label
47
- expect(_react.screen.getByLabelText('Main links')).toBeInTheDocument();
49
+ expect(screen.getByLabelText('Main links')).toBeInTheDocument();
48
50
 
49
51
  // Should find all links
50
- expect(_react.screen.queryByText('My Applications')).toBeInTheDocument();
51
- expect(_react.screen.queryByText('My Organization')).toBeInTheDocument();
52
+ expect(screen.queryByText('My Applications')).toBeInTheDocument();
53
+ expect(screen.queryByText('My Organization')).toBeInTheDocument();
52
54
 
53
55
  // Renders utility nav
54
- expect(_react.screen.getByLabelText('Utility')).toBeInTheDocument();
56
+ expect(screen.getByLabelText('Utility')).toBeInTheDocument();
55
57
 
56
58
  // Renders utility content
57
- expect(_react.screen.queryByText('Utility content')).toBeInTheDocument();
59
+ expect(screen.queryByText('Utility content')).toBeInTheDocument();
58
60
 
59
61
  // Check for accessibility issues
60
62
  _context.t0 = expect;
61
63
  _context.next = 9;
62
- return (0, _jestAxe.axe)(container);
64
+ return axe(container);
63
65
  case 9:
64
66
  _context.t1 = _context.sent;
65
67
  (0, _context.t0)(_context.t1).toHaveNoViolations();
@@ -1,19 +1,12 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.ToolbarUtilNavSeparator = exports.ToolbarUtilNav = exports.ToolbarIconHolder = void 0;
5
- var _react = _interopRequireWildcard(require("react"));
6
- var _ = require("..");
7
- var _jsxRuntime = require("theme-ui/jsx-runtime");
8
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
9
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
10
1
  /** @jsxImportSource theme-ui */
11
-
12
- var ToolbarUtilNav = exports.ToolbarUtilNav = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
2
+ import React, { forwardRef } from 'react';
3
+ import { Flex } from '..';
4
+ import { jsx as _jsx } from "theme-ui/jsx-runtime";
5
+ export var ToolbarUtilNav = /*#__PURE__*/forwardRef(function (_ref, ref) {
13
6
  var _ref$label = _ref.label,
14
7
  label = _ref$label === void 0 ? 'Utility' : _ref$label,
15
8
  children = _ref.children;
16
- return (0, _jsxRuntime.jsx)("nav", {
9
+ return _jsx("nav", {
17
10
  "aria-label": label,
18
11
  ref: ref,
19
12
  sx: {
@@ -26,9 +19,9 @@ var ToolbarUtilNav = exports.ToolbarUtilNav = /*#__PURE__*/(0, _react.forwardRef
26
19
  children: children
27
20
  });
28
21
  });
29
- var ToolbarIconHolder = exports.ToolbarIconHolder = function ToolbarIconHolder(_ref2) {
22
+ export var ToolbarIconHolder = function ToolbarIconHolder(_ref2) {
30
23
  var children = _ref2.children;
31
- return (0, _jsxRuntime.jsx)(_.Flex, {
24
+ return _jsx(Flex, {
32
25
  sx: {
33
26
  width: 38,
34
27
  height: 38,
@@ -42,8 +35,8 @@ var ToolbarIconHolder = exports.ToolbarIconHolder = function ToolbarIconHolder(_
42
35
  children: children
43
36
  });
44
37
  };
45
- var ToolbarUtilNavSeparator = exports.ToolbarUtilNavSeparator = function ToolbarUtilNavSeparator() {
46
- return (0, _jsxRuntime.jsx)("span", {
38
+ export var ToolbarUtilNavSeparator = function ToolbarUtilNavSeparator() {
39
+ return _jsx("span", {
47
40
  "aria-hidden": "true",
48
41
  sx: {
49
42
  display: ['block', 'none', 'none', 'block', 'block'],
@@ -1,19 +1,14 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.VIP_TOOLBAR = exports.Toolbar = void 0;
5
- var _Logo = require("./Logo");
6
- var _Toolbar = require("./Toolbar");
7
- var _ToolbarUtilNav = require("./ToolbarUtilNav");
8
1
  /**
9
2
  * Internal dependencies
10
3
  */
11
-
12
- var VIP_TOOLBAR = exports.VIP_TOOLBAR = 'vip-toolbar-component';
13
- var Toolbar = exports.Toolbar = {
14
- Logo: _Logo.Logo,
15
- Primary: _Toolbar.ToolbarPrimary,
16
- Separator: _ToolbarUtilNav.ToolbarUtilNavSeparator,
17
- UtilNav: _ToolbarUtilNav.ToolbarUtilNav,
18
- IconHolder: _ToolbarUtilNav.ToolbarIconHolder
4
+ import { Logo } from './Logo';
5
+ import { ToolbarPrimary as Primary } from './Toolbar';
6
+ import { ToolbarUtilNav as UtilNav, ToolbarUtilNavSeparator as Separator, ToolbarIconHolder as IconHolder } from './ToolbarUtilNav';
7
+ export var VIP_TOOLBAR = 'vip-toolbar-component';
8
+ export var Toolbar = {
9
+ Logo: Logo,
10
+ Primary: Primary,
11
+ Separator: Separator,
12
+ UtilNav: UtilNav,
13
+ IconHolder: IconHolder
19
14
  };
@@ -1,32 +1,27 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.Tooltip = void 0;
5
- var _react = require("react");
6
- var _Tooltip = _interopRequireDefault(require("./Tooltip.css"));
7
- exports.css = _Tooltip["default"];
8
- var _jsxRuntime = require("theme-ui/jsx-runtime");
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
1
  /**
11
2
  * External dependencies
12
3
  */
4
+ import { cloneElement } from 'react';
5
+ import css from './Tooltip.css';
13
6
 
14
7
  /**
15
8
  * Internal dependencies
16
9
  */
17
-
18
- var Tooltip = exports.Tooltip = function Tooltip(_ref) {
10
+ import { Fragment as _Fragment } from "theme-ui/jsx-runtime";
11
+ import { jsxs as _jsxs } from "theme-ui/jsx-runtime";
12
+ var Tooltip = function Tooltip(_ref) {
19
13
  var title = _ref.title,
20
14
  trigger = _ref.trigger,
21
15
  children = _ref.children,
22
16
  _ref$position = _ref.position,
23
17
  position = _ref$position === void 0 ? 'top' : _ref$position;
24
- var triggerCloned = trigger ? /*#__PURE__*/(0, _react.cloneElement)(trigger, {
18
+ var triggerCloned = trigger ? /*#__PURE__*/cloneElement(trigger, {
25
19
  'data-vip-tooltip': title,
26
20
  'aria-label': title,
27
21
  'data-vip-tooltip-position': position
28
22
  }) : null;
29
- return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
23
+ return _jsxs(_Fragment, {
30
24
  children: [triggerCloned, children]
31
25
  });
32
- };
26
+ };
27
+ export { Tooltip, css };