@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.
- package/babel.config.js +23 -19
- package/build/declaration.d.js +0 -1
- package/build/system/Accordion/Accordion.js +28 -33
- package/build/system/Accordion/Accordion.stories.js +34 -35
- package/build/system/Accordion/Accordion.test.js +35 -34
- package/build/system/Accordion/index.js +5 -8
- package/build/system/Avatar/Avatar.js +13 -17
- package/build/system/Avatar/Avatar.stories.js +10 -12
- package/build/system/Avatar/Avatar.test.js +15 -14
- package/build/system/Avatar/index.js +4 -6
- package/build/system/Badge/Badge.js +9 -14
- package/build/system/Badge/Badge.stories.js +23 -23
- package/build/system/Badge/Badge.test.js +15 -14
- package/build/system/Badge/index.js +4 -6
- package/build/system/Box/Box.js +9 -13
- package/build/system/Box/Box.stories.js +5 -8
- package/build/system/Breadcrumbs/Breadcrumbs.js +34 -38
- package/build/system/Breadcrumbs/Breadcrumbs.stories.js +18 -21
- package/build/system/Breadcrumbs/Breadcrumbs.test.js +28 -30
- package/build/system/Breadcrumbs/styles.js +5 -9
- package/build/system/Button/Button.js +11 -17
- package/build/system/Button/Button.stories.js +34 -33
- package/build/system/Button/Button.test.js +17 -16
- package/build/system/Button/ButtonSubmit.js +12 -16
- package/build/system/Button/ButtonSubmit.stories.js +12 -16
- package/build/system/Button/ButtonSubmit.test.js +15 -14
- package/build/system/Button/index.js +5 -8
- package/build/system/Card/Card.js +12 -14
- package/build/system/Card/Card.stories.js +21 -24
- package/build/system/Card/Card.test.js +19 -18
- package/build/system/Card/index.js +4 -6
- package/build/system/Code/Code.js +19 -23
- package/build/system/Code/Code.stories.js +16 -18
- package/build/system/Code/Code.test.js +20 -19
- package/build/system/Code/index.js +4 -6
- package/build/system/Drawer/Drawer.js +25 -30
- package/build/system/Drawer/Drawer.stories.js +38 -39
- package/build/system/Drawer/Drawer.test.js +19 -18
- package/build/system/Drawer/styles.js +9 -11
- package/build/system/Dropdown/Dropdown.js +23 -26
- package/build/system/Dropdown/Dropdown.test.js +16 -18
- package/build/system/Dropdown/DropdownContent.js +14 -20
- package/build/system/Dropdown/DropdownItem.js +19 -25
- package/build/system/Dropdown/DropdownLabel.js +10 -16
- package/build/system/Dropdown/DropdownSeparator.js +10 -16
- package/build/system/Dropdown/index.js +20 -23
- package/build/system/FilterDropdown/FilterDropdown.js +23 -29
- package/build/system/FilterDropdown/FilterDropdown.stories.js +9 -11
- package/build/system/FilterDropdown/FilterDropdown.test.js +7 -10
- package/build/system/Flex/Flex.js +7 -10
- package/build/system/Flex/Flex.stories.js +6 -10
- package/build/system/Flex/index.js +4 -6
- package/build/system/Footer/Footer.d.ts +33 -0
- package/build/system/Footer/Footer.js +82 -0
- package/build/system/Footer/Footer.stories.d.ts +41 -0
- package/build/system/Footer/Footer.stories.js +53 -0
- package/build/system/Footer/Footer.test.d.ts +1 -0
- package/build/system/Footer/Footer.test.js +36 -0
- package/build/system/Form/Checkbox/Checkbox.js +14 -18
- package/build/system/Form/Checkbox/Checkbox.stories.js +47 -48
- package/build/system/Form/Checkbox/Checkbox.test.js +23 -21
- package/build/system/Form/Checkbox/styles.js +7 -10
- package/build/system/Form/Input.js +19 -18
- package/build/system/Form/Input.stories.js +16 -18
- package/build/system/Form/Input.styles.js +5 -9
- package/build/system/Form/Label.js +14 -16
- package/build/system/Form/Label.stories.js +15 -15
- package/build/system/Form/Radio/Radio.js +13 -18
- package/build/system/Form/Radio/Radio.stories.js +43 -43
- package/build/system/Form/Radio/Radio.test.js +19 -18
- package/build/system/Form/Radio/RadioOption.js +22 -23
- package/build/system/Form/Radio/styles.js +7 -10
- package/build/system/Form/RadioGroupChip.js +26 -29
- package/build/system/Form/RadioGroupChip.stories.js +12 -15
- package/build/system/Form/RadioGroupChip.test.js +12 -11
- package/build/system/Form/RequiredLabel.js +3 -7
- package/build/system/Form/Toggle.js +11 -16
- package/build/system/Form/Toggle.stories.js +25 -27
- package/build/system/Form/Toggle.test.js +12 -11
- package/build/system/Form/Validation.js +10 -12
- package/build/system/Form/index.d.ts +2 -1
- package/build/system/Form/index.js +2 -0
- package/build/system/Grid/Grid.js +7 -10
- package/build/system/Grid/Grid.stories.js +6 -10
- package/build/system/Grid/index.js +4 -6
- package/build/system/Heading/Heading.js +9 -14
- package/build/system/Heading/Heading.stories.js +13 -16
- package/build/system/Hr/Hr.js +3 -7
- package/build/system/Hr/Hr.stories.js +10 -11
- package/build/system/Hr/Hr.test.js +14 -14
- package/build/system/Link/Link.js +11 -14
- package/build/system/Link/Link.stories.js +11 -14
- package/build/system/Link/index.js +4 -6
- package/build/system/LinkExternal/LinkExternal.d.ts +23 -3
- package/build/system/LinkExternal/LinkExternal.js +17 -23
- package/build/system/LinkExternal/LinkExternal.stories.d.ts +1 -8
- package/build/system/LinkExternal/LinkExternal.stories.js +4 -9
- package/build/system/LinkExternal/LinkExternal.test.js +14 -15
- package/build/system/MobileMenu/MobileMenu.js +24 -29
- package/build/system/MobileMenu/MobileMenu.stories.js +66 -67
- package/build/system/MobileMenu/MobileMenu.test.js +21 -22
- package/build/system/Nav/Nav.js +26 -32
- package/build/system/Nav/Nav.stories.js +97 -99
- package/build/system/Nav/Nav.test.js +32 -28
- package/build/system/Nav/NavItem.js +40 -45
- package/build/system/Nav/NavItemGroup.js +34 -39
- package/build/system/Nav/NavItemGroup.test.js +26 -23
- package/build/system/Nav/styles/variants/breadcrumbs.js +4 -7
- package/build/system/Nav/styles/variants/menu.js +8 -12
- package/build/system/Nav/styles/variants/menugroup.js +7 -11
- package/build/system/Nav/styles/variants/primary.js +4 -8
- package/build/system/Nav/styles/variants/tabs.js +3 -7
- package/build/system/Nav/styles/variants/toolbar.js +5 -8
- package/build/system/Nav/styles.js +26 -29
- package/build/system/NewDialog/DialogClose.js +14 -18
- package/build/system/NewDialog/DialogClose.test.js +11 -14
- package/build/system/NewDialog/DialogDescription.js +9 -15
- package/build/system/NewDialog/DialogOverlay.js +11 -13
- package/build/system/NewDialog/DialogTitle.js +7 -15
- package/build/system/NewDialog/NewDialog.js +24 -29
- package/build/system/NewDialog/index.js +7 -11
- package/build/system/NewDialog/styles.js +1 -5
- package/build/system/NewForm/Fieldset.js +13 -17
- package/build/system/NewForm/Form.js +8 -13
- package/build/system/NewForm/FormAutocomplete.js +2 -2
- package/build/system/NewForm/Legend.js +11 -15
- package/build/system/Notice/Notice.js +22 -25
- package/build/system/Notice/Notice.stories.js +41 -43
- package/build/system/Notice/index.js +5 -5
- package/build/system/Page/Page.js +4 -8
- package/build/system/Page/Page.test.js +14 -14
- package/build/system/Progress/Progress.js +21 -24
- package/build/system/Progress/Progress.stories.js +9 -15
- package/build/system/Progress/Progress.test.js +14 -13
- package/build/system/Progress/index.js +4 -6
- package/build/system/ScreenReaderText/ScreenReaderText.js +9 -9
- package/build/system/Spinner/Spinner.js +9 -14
- package/build/system/Spinner/Spinner.stories.js +6 -10
- package/build/system/Spinner/Spinner.test.js +14 -13
- package/build/system/Spinner/index.js +1 -6
- package/build/system/Table/Table.js +20 -22
- package/build/system/Table/Table.stories.js +29 -30
- package/build/system/Table/TableCell.js +9 -11
- package/build/system/Table/TableRow.js +10 -11
- package/build/system/Table/index.js +6 -10
- package/build/system/Text/Text.js +9 -14
- package/build/system/Text/Text.stories.js +24 -25
- package/build/system/Text/index.js +4 -6
- package/build/system/Toolbar/Logo.js +11 -15
- package/build/system/Toolbar/Toolbar.js +12 -17
- package/build/system/Toolbar/Toolbar.stories.js +47 -50
- package/build/system/Toolbar/Toolbar.test.js +26 -24
- package/build/system/Toolbar/ToolbarUtilNav.js +9 -16
- package/build/system/Toolbar/index.js +10 -15
- package/build/system/Tooltip/Tooltip.js +9 -14
- package/build/system/Tooltip/Tooltip.stories.js +29 -31
- package/build/system/Tooltip/index.js +5 -5
- package/build/system/Wizard/Wizard.js +11 -18
- package/build/system/Wizard/Wizard.stories.js +37 -38
- package/build/system/Wizard/WizardStep.js +26 -32
- package/build/system/Wizard/index.js +6 -7
- package/build/system/assets/a8cLogo.d.ts +2 -0
- package/build/system/assets/a8cLogo.js +39 -0
- package/build/system/index.d.ts +2 -1
- package/build/system/index.js +2 -0
- package/build/system/theme/breakpoints.js +1 -5
- package/build/system/utils/stories/CustomLink.js +7 -13
- package/package.json +1 -1
- package/src/system/Footer/Footer.stories.tsx +46 -0
- package/src/system/Footer/Footer.test.tsx +40 -0
- package/src/system/Footer/Footer.tsx +120 -0
- package/src/system/Form/index.js +2 -0
- package/src/system/LinkExternal/LinkExternal.tsx +27 -8
- package/src/system/NewForm/FormAutocomplete.js +2 -2
- package/src/system/assets/a8cLogo.tsx +30 -0
- package/src/system/index.js +2 -0
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports["default"] = exports.Container = exports.Basic = void 0;
|
|
5
|
-
var _ = require("..");
|
|
6
|
-
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
7
1
|
/**
|
|
8
2
|
* Internal dependencies
|
|
9
3
|
*/
|
|
10
|
-
|
|
4
|
+
import { Tooltip, Button, Heading, Text, Link, Box } from '..';
|
|
5
|
+
import { jsx as _jsx } from "theme-ui/jsx-runtime";
|
|
6
|
+
import { jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
7
|
+
import { Fragment as _Fragment } from "theme-ui/jsx-runtime";
|
|
8
|
+
export default {
|
|
11
9
|
title: 'Tooltip',
|
|
12
|
-
component:
|
|
10
|
+
component: Tooltip,
|
|
13
11
|
parameters: {
|
|
14
12
|
docs: {
|
|
15
13
|
description: {
|
|
@@ -18,17 +16,17 @@ var _default = exports["default"] = {
|
|
|
18
16
|
}
|
|
19
17
|
}
|
|
20
18
|
};
|
|
21
|
-
var Basic =
|
|
22
|
-
return (
|
|
23
|
-
children: [(
|
|
19
|
+
export var Basic = function Basic() {
|
|
20
|
+
return _jsxs(_Fragment, {
|
|
21
|
+
children: [_jsx(Heading, {
|
|
24
22
|
variant: "h2",
|
|
25
23
|
children: "Basic Usage"
|
|
26
|
-
}), (
|
|
27
|
-
children: ["Pass a trigger and title, the trigger component will be cloned and injected with a", ' ', (
|
|
24
|
+
}), _jsxs(Text, {
|
|
25
|
+
children: ["Pass a trigger and title, the trigger component will be cloned and injected with a", ' ', _jsx("code", {
|
|
28
26
|
children: "[vip-tooltip]"
|
|
29
27
|
}), " HTML attribute."]
|
|
30
|
-
}), (
|
|
31
|
-
trigger: (
|
|
28
|
+
}), _jsx(Tooltip, {
|
|
29
|
+
trigger: _jsx(Button, {
|
|
32
30
|
sx: {
|
|
33
31
|
mr: 3
|
|
34
32
|
},
|
|
@@ -36,8 +34,8 @@ var Basic = exports.Basic = function Basic() {
|
|
|
36
34
|
}),
|
|
37
35
|
title: "On the top",
|
|
38
36
|
position: "top"
|
|
39
|
-
}), (
|
|
40
|
-
trigger: (
|
|
37
|
+
}), _jsx(Tooltip, {
|
|
38
|
+
trigger: _jsx(Button, {
|
|
41
39
|
sx: {
|
|
42
40
|
mr: 3
|
|
43
41
|
},
|
|
@@ -45,8 +43,8 @@ var Basic = exports.Basic = function Basic() {
|
|
|
45
43
|
}),
|
|
46
44
|
title: "On the Bottom",
|
|
47
45
|
position: "bottom"
|
|
48
|
-
}), (
|
|
49
|
-
trigger: (
|
|
46
|
+
}), _jsx(Tooltip, {
|
|
47
|
+
trigger: _jsx(Button, {
|
|
50
48
|
sx: {
|
|
51
49
|
mr: 3
|
|
52
50
|
},
|
|
@@ -54,8 +52,8 @@ var Basic = exports.Basic = function Basic() {
|
|
|
54
52
|
}),
|
|
55
53
|
title: "On the Left",
|
|
56
54
|
position: "left"
|
|
57
|
-
}), (
|
|
58
|
-
trigger: (
|
|
55
|
+
}), _jsx(Tooltip, {
|
|
56
|
+
trigger: _jsx(Button, {
|
|
59
57
|
children: "Button with right tooltip"
|
|
60
58
|
}),
|
|
61
59
|
title: "On the Right",
|
|
@@ -63,30 +61,30 @@ var Basic = exports.Basic = function Basic() {
|
|
|
63
61
|
})]
|
|
64
62
|
});
|
|
65
63
|
};
|
|
66
|
-
var Container =
|
|
67
|
-
return (
|
|
68
|
-
children: [(
|
|
64
|
+
export var Container = function Container() {
|
|
65
|
+
return _jsxs("div", {
|
|
66
|
+
children: [_jsx(Heading, {
|
|
69
67
|
variant: "h2",
|
|
70
68
|
children: "Container Usage"
|
|
71
|
-
}), (
|
|
72
|
-
children: ["You can also wrap a component with the ", (
|
|
69
|
+
}), _jsxs(Text, {
|
|
70
|
+
children: ["You can also wrap a component with the ", _jsx("code", {
|
|
73
71
|
children: "Tooltip"
|
|
74
|
-
}), " component. To use tooltips you can simply pass ", (
|
|
72
|
+
}), " component. To use tooltips you can simply pass ", _jsx("code", {
|
|
75
73
|
children: "data-vip-tooltip"
|
|
76
74
|
}), " as an HTML attribute to your component."]
|
|
77
|
-
}), (
|
|
75
|
+
}), _jsx(Box, {
|
|
78
76
|
sx: {
|
|
79
77
|
backgroundColor: 'red'
|
|
80
78
|
},
|
|
81
|
-
children: (
|
|
82
|
-
children: [(
|
|
79
|
+
children: _jsxs(Tooltip, {
|
|
80
|
+
children: [_jsx(Button, {
|
|
83
81
|
"data-vip-tooltip-position": "top",
|
|
84
82
|
"data-vip-tooltip": "Test test",
|
|
85
83
|
sx: {
|
|
86
84
|
ml: 3
|
|
87
85
|
},
|
|
88
86
|
children: "This is another way"
|
|
89
|
-
}), (
|
|
87
|
+
}), _jsx("br", {}), _jsx("br", {}), _jsx("br", {}), _jsx(Link, {
|
|
90
88
|
href: "http://google.com",
|
|
91
89
|
"data-vip-tooltip-position": "right",
|
|
92
90
|
"data-vip-tooltip": "is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { Tooltip } from './Tooltip';
|
|
5
|
+
export { Tooltip };
|
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.Wizard = void 0;
|
|
5
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
6
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
7
|
-
var _ = require("..");
|
|
8
|
-
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
9
|
-
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); }
|
|
10
|
-
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; }
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
1
|
/** @jsxImportSource theme-ui */
|
|
13
2
|
|
|
14
3
|
/**
|
|
15
4
|
* External dependencies
|
|
16
5
|
*/
|
|
6
|
+
import classNames from 'classnames';
|
|
7
|
+
import React, { useLayoutEffect, useState } from 'react';
|
|
17
8
|
|
|
18
9
|
/**
|
|
19
10
|
* Internal dependencies
|
|
20
11
|
*/
|
|
21
12
|
|
|
22
|
-
|
|
13
|
+
import { Box, WizardStep } from '..';
|
|
14
|
+
import { jsx as _jsx } from "theme-ui/jsx-runtime";
|
|
15
|
+
export var Wizard = /*#__PURE__*/React.forwardRef(function (_ref, forwardRef) {
|
|
23
16
|
var steps = _ref.steps,
|
|
24
17
|
activeStep = _ref.activeStep,
|
|
25
18
|
_ref$completed = _ref.completed,
|
|
@@ -30,20 +23,20 @@ var Wizard = exports.Wizard = /*#__PURE__*/_react["default"].forwardRef(function
|
|
|
30
23
|
className = _ref$className === void 0 ? null : _ref$className,
|
|
31
24
|
_ref$titleAutofocus = _ref.titleAutofocus,
|
|
32
25
|
titleAutofocus = _ref$titleAutofocus === void 0 ? false : _ref$titleAutofocus;
|
|
33
|
-
var _useState =
|
|
26
|
+
var _useState = useState(false),
|
|
34
27
|
didMount = _useState[0],
|
|
35
28
|
setDidMount = _useState[1];
|
|
36
|
-
var _useState2 =
|
|
29
|
+
var _useState2 = useState(activeStep),
|
|
37
30
|
initialStep = _useState2[0];
|
|
38
31
|
// didMount helps us to track the initial render, so we can focus the title only subsequent renders
|
|
39
32
|
// to avoid stealing the focus from the page we're in.
|
|
40
|
-
|
|
33
|
+
useLayoutEffect(function () {
|
|
41
34
|
if (!didMount && activeStep !== initialStep) {
|
|
42
35
|
setDidMount(true);
|
|
43
36
|
}
|
|
44
37
|
}, [initialStep, activeStep, didMount, setDidMount]);
|
|
45
|
-
return (
|
|
46
|
-
className: (
|
|
38
|
+
return _jsx(Box, {
|
|
39
|
+
className: classNames('vip-wizard-component', className),
|
|
47
40
|
ref: forwardRef,
|
|
48
41
|
children: steps.map(function (_ref2, index) {
|
|
49
42
|
var title = _ref2.title,
|
|
@@ -52,7 +45,7 @@ var Wizard = exports.Wizard = /*#__PURE__*/_react["default"].forwardRef(function
|
|
|
52
45
|
titleVariant = _ref2.titleVariant,
|
|
53
46
|
summary = _ref2.summary,
|
|
54
47
|
onChange = _ref2.onChange;
|
|
55
|
-
return (
|
|
48
|
+
return _jsx(WizardStep, {
|
|
56
49
|
active: index === activeStep,
|
|
57
50
|
complete: completed.includes(index),
|
|
58
51
|
skipped: skipped.includes(index),
|
|
@@ -1,33 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports["default"] = exports.WithTitleAutoFocus = exports.Default = void 0;
|
|
5
|
-
var _react = _interopRequireDefault(require("react"));
|
|
6
|
-
var _ = require("..");
|
|
7
|
-
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
1
|
/** @jsxImportSource theme-ui */
|
|
2
|
+
|
|
10
3
|
/**
|
|
11
4
|
* External dependencies
|
|
12
5
|
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
13
8
|
/**
|
|
14
9
|
* Internal dependencies
|
|
15
10
|
*/
|
|
16
|
-
|
|
11
|
+
|
|
12
|
+
import { Wizard, Box, Label, Input, Button, Checkbox, Flex } from '..';
|
|
13
|
+
import { jsx as _jsx } from "theme-ui/jsx-runtime";
|
|
14
|
+
import { jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
15
|
+
export default {
|
|
17
16
|
title: 'Navigation/Wizard',
|
|
18
|
-
component:
|
|
17
|
+
component: Wizard
|
|
19
18
|
};
|
|
20
|
-
var Default =
|
|
19
|
+
export var Default = function Default() {
|
|
21
20
|
var steps = [{
|
|
22
21
|
title: 'Choose Domain',
|
|
23
22
|
titleVariant: 'h2',
|
|
24
23
|
subTitle: 'You can bring a domain name you already own, or buy a new one.',
|
|
25
|
-
children: (
|
|
26
|
-
children: [(
|
|
24
|
+
children: _jsxs(Box, {
|
|
25
|
+
children: [_jsx(Label, {
|
|
27
26
|
children: "Domain"
|
|
28
|
-
}), (
|
|
27
|
+
}), _jsx(Input, {
|
|
29
28
|
placeholder: "yourdomain.com"
|
|
30
|
-
}), (
|
|
29
|
+
}), _jsx(Button, {
|
|
31
30
|
sx: {
|
|
32
31
|
mt: 3
|
|
33
32
|
},
|
|
@@ -44,10 +43,10 @@ var Default = exports.Default = function Default() {
|
|
|
44
43
|
title: 'Verify Domain',
|
|
45
44
|
titleVariant: 'h2'
|
|
46
45
|
}];
|
|
47
|
-
return (
|
|
48
|
-
children: (
|
|
46
|
+
return _jsx(React.Fragment, {
|
|
47
|
+
children: _jsx(Box, {
|
|
49
48
|
mt: 4,
|
|
50
|
-
children: (
|
|
49
|
+
children: _jsx(Wizard, {
|
|
51
50
|
activeStep: 0,
|
|
52
51
|
steps: steps,
|
|
53
52
|
completed: [1],
|
|
@@ -56,11 +55,11 @@ var Default = exports.Default = function Default() {
|
|
|
56
55
|
})
|
|
57
56
|
});
|
|
58
57
|
};
|
|
59
|
-
var WithTitleAutoFocus =
|
|
60
|
-
var _React$useState =
|
|
58
|
+
export var WithTitleAutoFocus = function WithTitleAutoFocus() {
|
|
59
|
+
var _React$useState = React.useState(0),
|
|
61
60
|
activeStep = _React$useState[0],
|
|
62
61
|
setActiveStep = _React$useState[1];
|
|
63
|
-
var _React$useState2 =
|
|
62
|
+
var _React$useState2 = React.useState(true),
|
|
64
63
|
autoFocus = _React$useState2[0],
|
|
65
64
|
setAutoFocus = _React$useState2[1];
|
|
66
65
|
var steps = [{
|
|
@@ -73,12 +72,12 @@ var WithTitleAutoFocus = exports.WithTitleAutoFocus = function WithTitleAutoFocu
|
|
|
73
72
|
onChange: function onChange() {
|
|
74
73
|
return setActiveStep(0);
|
|
75
74
|
},
|
|
76
|
-
children: (
|
|
77
|
-
children: [(
|
|
75
|
+
children: _jsxs(Box, {
|
|
76
|
+
children: [_jsx(Label, {
|
|
78
77
|
children: "Domain"
|
|
79
|
-
}), (
|
|
78
|
+
}), _jsx(Input, {
|
|
80
79
|
placeholder: "yourdomain.com"
|
|
81
|
-
}), (
|
|
80
|
+
}), _jsx(Button, {
|
|
82
81
|
sx: {
|
|
83
82
|
mt: 3
|
|
84
83
|
},
|
|
@@ -94,10 +93,10 @@ var WithTitleAutoFocus = exports.WithTitleAutoFocus = function WithTitleAutoFocu
|
|
|
94
93
|
onChange: function onChange() {
|
|
95
94
|
return setActiveStep(1);
|
|
96
95
|
},
|
|
97
|
-
children: (
|
|
98
|
-
children: [(
|
|
96
|
+
children: _jsxs(Box, {
|
|
97
|
+
children: [_jsx(Label, {
|
|
99
98
|
children: "DNS"
|
|
100
|
-
}), (
|
|
99
|
+
}), _jsx(Button, {
|
|
101
100
|
sx: {
|
|
102
101
|
mt: 3
|
|
103
102
|
},
|
|
@@ -117,10 +116,10 @@ var WithTitleAutoFocus = exports.WithTitleAutoFocus = function WithTitleAutoFocu
|
|
|
117
116
|
onChange: function onChange() {
|
|
118
117
|
return setActiveStep(2);
|
|
119
118
|
},
|
|
120
|
-
children: (
|
|
121
|
-
children: [(
|
|
119
|
+
children: _jsxs(Box, {
|
|
120
|
+
children: [_jsx(Label, {
|
|
122
121
|
children: "Certificate validation"
|
|
123
|
-
}), (
|
|
122
|
+
}), _jsx(Button, {
|
|
124
123
|
sx: {
|
|
125
124
|
mt: 3
|
|
126
125
|
},
|
|
@@ -128,10 +127,10 @@ var WithTitleAutoFocus = exports.WithTitleAutoFocus = function WithTitleAutoFocu
|
|
|
128
127
|
})]
|
|
129
128
|
})
|
|
130
129
|
}];
|
|
131
|
-
return (
|
|
132
|
-
children: [(
|
|
130
|
+
return _jsxs(React.Fragment, {
|
|
131
|
+
children: [_jsx(Box, {
|
|
133
132
|
mt: 4,
|
|
134
|
-
children: (
|
|
133
|
+
children: _jsx(Wizard, {
|
|
135
134
|
completed: [0, 1],
|
|
136
135
|
skipped: [2],
|
|
137
136
|
activeStep: activeStep,
|
|
@@ -139,20 +138,20 @@ var WithTitleAutoFocus = exports.WithTitleAutoFocus = function WithTitleAutoFocu
|
|
|
139
138
|
titleAutofocus: autoFocus,
|
|
140
139
|
className: "vip-wizard-xyz"
|
|
141
140
|
})
|
|
142
|
-
}), (
|
|
141
|
+
}), _jsx(Box, {
|
|
143
142
|
mt: 4,
|
|
144
|
-
children: (
|
|
143
|
+
children: _jsxs(Flex, {
|
|
145
144
|
sx: {
|
|
146
145
|
alignItems: 'center'
|
|
147
146
|
},
|
|
148
|
-
children: [(
|
|
147
|
+
children: [_jsx(Checkbox, {
|
|
149
148
|
id: "wizard-autofocus",
|
|
150
149
|
checked: autoFocus,
|
|
151
150
|
"aria-labelledby": "label-check1",
|
|
152
151
|
onCheckedChange: function onCheckedChange(e) {
|
|
153
152
|
setAutoFocus(e === true);
|
|
154
153
|
}
|
|
155
|
-
}), (
|
|
154
|
+
}), _jsx(Label, {
|
|
156
155
|
sx: {
|
|
157
156
|
m: 0,
|
|
158
157
|
ml: 2
|
|
@@ -1,25 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.WizardStep = void 0;
|
|
5
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
-
var _bs = require("react-icons/bs");
|
|
7
|
-
var _ = require("..");
|
|
8
|
-
var _ScreenReaderText = require("../ScreenReaderText");
|
|
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
1
|
/** @jsxImportSource theme-ui */
|
|
13
2
|
|
|
14
3
|
/**
|
|
15
4
|
* External dependencies
|
|
16
5
|
*/
|
|
6
|
+
import React, { useLayoutEffect } from 'react';
|
|
7
|
+
import { BsCircleFill, BsFillCheckCircleFill } from 'react-icons/bs';
|
|
17
8
|
|
|
18
9
|
/**
|
|
19
10
|
* Internal dependencies
|
|
20
11
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
import { Card, Heading, Text, Flex, Table, TableRow, TableCell, Button } from '..';
|
|
13
|
+
import { ScreenReaderText } from '../ScreenReaderText';
|
|
14
|
+
import { jsx as _jsx } from "theme-ui/jsx-runtime";
|
|
15
|
+
import { jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
16
|
+
export var WizardStep = /*#__PURE__*/React.forwardRef(function (_ref, forwardRef) {
|
|
23
17
|
var title = _ref.title,
|
|
24
18
|
subTitle = _ref.subTitle,
|
|
25
19
|
_ref$skipped = _ref.skipped,
|
|
@@ -35,7 +29,7 @@ var WizardStep = exports.WizardStep = /*#__PURE__*/_react["default"].forwardRef(
|
|
|
35
29
|
titleVariant = _ref$titleVariant === void 0 ? 'h3' : _ref$titleVariant,
|
|
36
30
|
summary = _ref.summary,
|
|
37
31
|
onChange = _ref.onChange;
|
|
38
|
-
var titleRef =
|
|
32
|
+
var titleRef = React.useRef(null);
|
|
39
33
|
var status = 'inactive';
|
|
40
34
|
var statusText = 'Step not completed';
|
|
41
35
|
if (active) {
|
|
@@ -60,12 +54,12 @@ var WizardStep = exports.WizardStep = /*#__PURE__*/_react["default"].forwardRef(
|
|
|
60
54
|
color: statusIconColor
|
|
61
55
|
};
|
|
62
56
|
var headingColor = "wizard.step.heading." + status;
|
|
63
|
-
|
|
57
|
+
useLayoutEffect(function () {
|
|
64
58
|
if (active && titleRef != null && titleRef.current && shouldFocusTitle) {
|
|
65
59
|
titleRef.current.focus();
|
|
66
60
|
}
|
|
67
61
|
}, [active, shouldFocusTitle]);
|
|
68
|
-
return (
|
|
62
|
+
return _jsxs(Card, {
|
|
69
63
|
as: "section",
|
|
70
64
|
sx: {
|
|
71
65
|
boxShadow: active ? 'low' : 'none',
|
|
@@ -85,12 +79,12 @@ var WizardStep = exports.WizardStep = /*#__PURE__*/_react["default"].forwardRef(
|
|
|
85
79
|
"data-active": active || undefined,
|
|
86
80
|
className: "wizard-step-" + status,
|
|
87
81
|
ref: forwardRef,
|
|
88
|
-
children: [(
|
|
82
|
+
children: [_jsxs(Flex, {
|
|
89
83
|
sx: {
|
|
90
84
|
alignItems: 'flex-end',
|
|
91
85
|
mb: 2
|
|
92
86
|
},
|
|
93
|
-
children: [(
|
|
87
|
+
children: [_jsxs(Heading, {
|
|
94
88
|
variant: titleVariant,
|
|
95
89
|
sx: {
|
|
96
90
|
mb: 1,
|
|
@@ -102,25 +96,25 @@ var WizardStep = exports.WizardStep = /*#__PURE__*/_react["default"].forwardRef(
|
|
|
102
96
|
ref: titleRef,
|
|
103
97
|
tabIndex: shouldFocusTitle ? -1 : undefined,
|
|
104
98
|
"aria-current": active ? 'step' : undefined,
|
|
105
|
-
children: [(
|
|
99
|
+
children: [_jsx(Text, {
|
|
106
100
|
sx: {
|
|
107
101
|
color: 'wizard.step.number.color'
|
|
108
102
|
},
|
|
109
103
|
"aria-hidden": "true",
|
|
110
104
|
children: stepText
|
|
111
|
-
}), (
|
|
105
|
+
}), _jsxs(Flex, {
|
|
112
106
|
as: "span",
|
|
113
107
|
sx: {
|
|
114
108
|
mt: 3,
|
|
115
109
|
alignItems: 'center'
|
|
116
110
|
},
|
|
117
111
|
"aria-hidden": "true",
|
|
118
|
-
children: [complete ? (
|
|
112
|
+
children: [complete ? _jsx(BsFillCheckCircleFill, {
|
|
119
113
|
sx: statusIconStyles
|
|
120
|
-
}) : (
|
|
114
|
+
}) : _jsx(BsCircleFill, {
|
|
121
115
|
sx: statusIconStyles
|
|
122
116
|
}), title]
|
|
123
|
-
}), (
|
|
117
|
+
}), _jsx(ScreenReaderText, {
|
|
124
118
|
children:
|
|
125
119
|
/**
|
|
126
120
|
* we are adding the composed title here so that it's announced correctly by the voiceover
|
|
@@ -128,18 +122,18 @@ var WizardStep = exports.WizardStep = /*#__PURE__*/_react["default"].forwardRef(
|
|
|
128
122
|
**/
|
|
129
123
|
stepText + ": " + (title == null ? void 0 : title.toString()) + ". " + statusText
|
|
130
124
|
})]
|
|
131
|
-
}), !active && (complete || skipped) && onChange && (
|
|
125
|
+
}), !active && (complete || skipped) && onChange && _jsxs(Button, {
|
|
132
126
|
variant: "text",
|
|
133
127
|
onClick: onChange,
|
|
134
128
|
sx: {
|
|
135
129
|
height: 'auto',
|
|
136
130
|
alignSelf: 'flex-end'
|
|
137
131
|
},
|
|
138
|
-
children: ["Change ", (
|
|
132
|
+
children: ["Change ", _jsx(ScreenReaderText, {
|
|
139
133
|
children: "the " + (title == null ? void 0 : title.toString()) + " step"
|
|
140
134
|
})]
|
|
141
135
|
})]
|
|
142
|
-
}), !active && (complete || skipped) && summary && summary.length > 0 && (
|
|
136
|
+
}), !active && (complete || skipped) && summary && summary.length > 0 && _jsx(Table, {
|
|
143
137
|
caption: "Summary of " + (title == null ? void 0 : title.toString()),
|
|
144
138
|
sx: {
|
|
145
139
|
width: 'auto',
|
|
@@ -155,10 +149,10 @@ var WizardStep = exports.WizardStep = /*#__PURE__*/_react["default"].forwardRef(
|
|
|
155
149
|
}
|
|
156
150
|
}
|
|
157
151
|
},
|
|
158
|
-
children: (
|
|
152
|
+
children: _jsx("tbody", {
|
|
159
153
|
children: summary.map(function (item, index) {
|
|
160
|
-
return (
|
|
161
|
-
children: [(
|
|
154
|
+
return _jsxs(TableRow, {
|
|
155
|
+
children: [_jsxs(TableCell, {
|
|
162
156
|
as: "th",
|
|
163
157
|
scope: "row",
|
|
164
158
|
sx: {
|
|
@@ -167,18 +161,18 @@ var WizardStep = exports.WizardStep = /*#__PURE__*/_react["default"].forwardRef(
|
|
|
167
161
|
pr: 1
|
|
168
162
|
},
|
|
169
163
|
children: [item.label, item.value ? ':' : '']
|
|
170
|
-
}), (
|
|
164
|
+
}), _jsx(TableCell, {
|
|
171
165
|
sx: {
|
|
172
166
|
color: 'text'
|
|
173
167
|
},
|
|
174
|
-
children: (
|
|
168
|
+
children: _jsx("strong", {
|
|
175
169
|
children: item.value
|
|
176
170
|
})
|
|
177
171
|
})]
|
|
178
172
|
}, "summary_tb_" + index);
|
|
179
173
|
})
|
|
180
174
|
})
|
|
181
|
-
}), subTitle && active && (
|
|
175
|
+
}), subTitle && active && _jsx(Text, {
|
|
182
176
|
sx: {
|
|
183
177
|
mb: 3,
|
|
184
178
|
mt: 2
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.WizardStep = _WizardStep.WizardStep;
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { Wizard } from './Wizard';
|
|
5
|
+
import { WizardStep } from './WizardStep';
|
|
6
|
+
export { Wizard, WizardStep };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { translate } from 'i18n-calypso';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { LinkExternal } from '../LinkExternal/LinkExternal';
|
|
10
|
+
import { Text } from '../Text';
|
|
11
|
+
import { jsx as _jsx } from "theme-ui/jsx-runtime";
|
|
12
|
+
import { jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
13
|
+
export var a8cLogo = _jsxs(Text, {
|
|
14
|
+
as: "span",
|
|
15
|
+
sx: {
|
|
16
|
+
display: 'inline-flex',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
gap: 2,
|
|
19
|
+
mb: 0
|
|
20
|
+
},
|
|
21
|
+
children: [translate('An'), _jsx(LinkExternal, {
|
|
22
|
+
href: "https://automattic.com",
|
|
23
|
+
showExternalIcon: false,
|
|
24
|
+
screenReaderText: translate('Automattic'),
|
|
25
|
+
children: _jsxs("svg", {
|
|
26
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
27
|
+
viewBox: "0 0 200 15.4",
|
|
28
|
+
style: {
|
|
29
|
+
minWidth: 100
|
|
30
|
+
},
|
|
31
|
+
children: [_jsx("path", {
|
|
32
|
+
d: "M72.5 15.4c-5.1 0-8.4-3.7-8.4-7.5v-.4c0-3.9 3.3-7.5 8.4-7.5 5.1 0 8.4 3.6 8.4 7.5V8c0 3.8-3.3 7.4-8.4 7.4zm5.7-7.9c0-2.8-2-5.3-5.7-5.3s-5.7 2.5-5.7 5.3v.3c0 2.8 2 5.3 5.7 5.3s5.7-2.5 5.7-5.3v-.3z",
|
|
33
|
+
fill: "#3298CB"
|
|
34
|
+
}), _jsx("path", {
|
|
35
|
+
d: "M15 14.9l-1.9-3.6H4.7l-1.8 3.6H0L7.8.5H10l7.9 14.4H15zM8.8 3.3l-3.1 6h6.4l-3.3-6zm21.4 12.1c-5.2 0-7.6-2.8-7.6-6.5V.5h2.7V9c0 2.7 1.7 4.2 5.1 4.2 3.4 0 4.8-1.6 4.8-4.2V.5h2.7v8.4c0 3.6-2.3 6.5-7.7 6.5zM52.9 2.8v12.1h-2.7V2.8h-6.3V.5h15.3v2.2h-6.3zM105 14.9V3.5l-.7 1.3-6 10.1H97L91 4.8l-.7-1.3v11.4h-2.6V.5h3.7l5.7 9.9.7 1.2.7-1.2 5.6-9.9h3.7v14.4H105zm23.1 0l-1.9-3.6h-8.4l-1.8 3.6h-3L120.8.5h2.2l7.9 14.4h-2.8zm-6.2-11.6l-3.1 6h6.4l-3.3-6zm19.9-.5v12.1h-2.7V2.8h-6.3V.5h15.3v2.2h-6.3zm19.8 0v12.1h-2.7V2.8h-6.3V.5h15.3v2.2h-6.3zm12.9 12.1v-13c1.1 0 1.5-.6 1.5-1.4h1.1v14.4h-2.6zm23.8-10.3c-1.3-1.2-3.2-2.3-5.8-2.3-3.8 0-6 2.6-6 5.4V8c0 2.7 2.2 5.3 6.2 5.3 2.4 0 4.4-1.1 5.6-2.3l1.6 1.7c-1.6 1.6-4.3 2.9-7.4 2.9-5.4 0-8.7-3.5-8.7-7.4v-.6c0-3.9 3.6-7.6 8.9-7.6 3 0 5.8 1.3 7.3 2.9l-1.7 1.7zM74.3 5c.5.3.6 1 .3 1.5l-2.5 3.8c-.3.5-1 .6-1.5.3s-.6-1-.3-1.5l2.5-3.8c.4-.5 1-.6 1.5-.3z"
|
|
36
|
+
})]
|
|
37
|
+
})
|
|
38
|
+
}), translate('Creation')]
|
|
39
|
+
});
|
package/build/system/index.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ import { Link } from './Link';
|
|
|
44
44
|
import LinkExternal from './LinkExternal/LinkExternal';
|
|
45
45
|
import { Radio } from './Form';
|
|
46
46
|
import { RadioBoxGroup } from './Form';
|
|
47
|
+
import { RadioGroupChip } from './Form';
|
|
47
48
|
import { Textarea } from './Form';
|
|
48
49
|
import { Progress } from './Progress';
|
|
49
50
|
import { Text } from './Text';
|
|
@@ -60,4 +61,4 @@ import { Validation } from './Form';
|
|
|
60
61
|
import { Wizard } from './Wizard';
|
|
61
62
|
import { WizardStep } from './Wizard';
|
|
62
63
|
import theme from './theme';
|
|
63
|
-
export { Accordion, Avatar, Badge, Box, Breadcrumbs, Button, ButtonSubmit, ButtonVariant, Card, Checkbox, Code, Dialog, NewDialog, Form, Drawer, Dropdown, DialogButton, DialogMenu, DialogMenuItem, DialogDivider, DialogContent, DialogTrigger, ConfirmationDialog, MobileMenu, MobileMenuTrigger, MobileMenuWrapper, NewConfirmationDialog, Grid, FilterDropdown, Flex, Notice, OptionRow, Heading, Hr, Input, Label, ScreenReaderText, Spinner, Table, TableRow, TableCell, Tooltip, Link, LinkExternal, Radio, RadioBoxGroup, Textarea, Progress, Text, Tabs, Nav, NavItem, TabsTrigger, TabsContent, TabsList, Toggle, ToggleRow, Toolbar, Validation, Wizard, WizardStep, theme };
|
|
64
|
+
export { Accordion, Avatar, Badge, Box, Breadcrumbs, Button, ButtonSubmit, ButtonVariant, Card, Checkbox, Code, Dialog, NewDialog, Form, Drawer, Dropdown, DialogButton, DialogMenu, DialogMenuItem, DialogDivider, DialogContent, DialogTrigger, ConfirmationDialog, MobileMenu, MobileMenuTrigger, MobileMenuWrapper, NewConfirmationDialog, Grid, FilterDropdown, Flex, Notice, OptionRow, Heading, Hr, Input, Label, ScreenReaderText, Spinner, Table, TableRow, TableCell, Tooltip, Link, LinkExternal, Radio, RadioBoxGroup, RadioGroupChip, Textarea, Progress, Text, Tabs, Nav, NavItem, TabsTrigger, TabsContent, TabsList, Toggle, ToggleRow, Toolbar, Validation, Wizard, WizardStep, theme };
|
package/build/system/index.js
CHANGED
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
Validation,
|
|
32
32
|
Radio,
|
|
33
33
|
RadioBoxGroup,
|
|
34
|
+
RadioGroupChip,
|
|
34
35
|
Textarea,
|
|
35
36
|
Checkbox,
|
|
36
37
|
} from './Form';
|
|
@@ -105,6 +106,7 @@ export {
|
|
|
105
106
|
LinkExternal,
|
|
106
107
|
Radio,
|
|
107
108
|
RadioBoxGroup,
|
|
109
|
+
RadioGroupChip,
|
|
108
110
|
Textarea,
|
|
109
111
|
Progress,
|
|
110
112
|
Text,
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.generateBreakpoints = void 0;
|
|
5
|
-
var generateBreakpoints = exports.generateBreakpoints = function generateBreakpoints(breakpoints) {
|
|
1
|
+
export var generateBreakpoints = function generateBreakpoints(breakpoints) {
|
|
6
2
|
var values = Object.values(breakpoints);
|
|
7
3
|
return values.map(function (bp, index) {
|
|
8
4
|
if (index === 0) {
|
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.CustomLinkComponentized = exports.CustomLink = void 0;
|
|
5
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
-
var _Link = require("../../Link/Link");
|
|
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
|
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); }
|
|
11
|
-
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
import { Link } from '../../Link/Link';
|
|
4
|
+
import { jsx as _jsx } from "theme-ui/jsx-runtime";
|
|
5
|
+
export var CustomLink = /*#__PURE__*/forwardRef(
|
|
12
6
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
13
7
|
function (props, ref) {
|
|
14
|
-
return (
|
|
8
|
+
return _jsx("a", _extends({}, props, {
|
|
15
9
|
ref: ref
|
|
16
10
|
}));
|
|
17
11
|
});
|
|
18
|
-
var CustomLinkComponentized =
|
|
19
|
-
return (
|
|
12
|
+
export var CustomLinkComponentized = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
13
|
+
return _jsx(Link, _extends({}, props, {
|
|
20
14
|
ref: ref
|
|
21
15
|
}));
|
|
22
16
|
});
|