@automattic/vip-design-system 0.28.1 → 0.28.3
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/.storybook/decorators/withColorMode.jsx +15 -2
- package/README.md +3 -3
- package/build/system/Accordion/Accordion.js +21 -30
- package/build/system/Badge/Badge.stories.js +1 -1
- package/build/system/Dropdown/Dropdown.stories.js +9 -5
- package/build/system/Form/Radio.stories.js +1 -1
- package/build/system/NewForm/FormAutocomplete.js +12 -2
- package/build/system/NewForm/FormAutocomplete.stories.js +14 -2
- package/build/system/NewForm/FormSelect.stories.js +3 -1
- package/build/system/Notice/Notice.stories.js +13 -23
- package/build/system/Table/Table.stories.js +0 -3
- package/build/system/Tabs/Tabs.stories.js +3 -3
- package/build/system/Wizard/WizardStep.js +5 -3
- package/build/system/theme/colors.js +7 -170
- package/build/system/theme/generated/valet-theme-dark.json +2924 -0
- package/{src/system/theme/generated/valet-theme.json → build/system/theme/generated/valet-theme-light.json} +47 -8
- package/build/system/theme/getColor.js +53 -50
- package/build/system/theme/index.js +116 -147
- package/build/system/theme/textStyles.js +51 -0
- package/package.json +7 -3
- package/src/system/Accordion/Accordion.js +8 -6
- package/src/system/Badge/Badge.stories.jsx +2 -2
- package/src/system/Dropdown/Dropdown.stories.jsx +12 -10
- package/src/system/Form/Radio.stories.jsx +3 -3
- package/src/system/NewForm/FormAutocomplete.js +11 -0
- package/src/system/NewForm/FormAutocomplete.stories.jsx +13 -0
- package/src/system/NewForm/FormSelect.stories.jsx +3 -2
- package/src/system/Notice/Notice.stories.jsx +8 -12
- package/src/system/Table/Table.stories.jsx +1 -1
- package/src/system/Tabs/Tabs.stories.jsx +3 -3
- package/src/system/Wizard/WizardStep.js +9 -3
- package/src/system/theme/colors.js +5 -171
- package/src/system/theme/generated/valet-theme-dark.json +2924 -0
- package/src/system/theme/generated/valet-theme-light.json +2918 -0
- package/src/system/theme/getColor.js +46 -40
- package/src/system/theme/index.js +155 -170
- package/src/system/theme/textStyles.js +46 -0
- package/tokens/valet-core/$metadata.json +1 -0
- package/tokens/valet-core/$themes.json +0 -2
- package/tokens/valet-core/wpvip-productive-color-dark.json +946 -0
- package/tokens/valet-core/wpvip-productive-color.json +47 -8
|
@@ -1,11 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
|
|
1
5
|
import React, { useEffect } from 'react';
|
|
2
6
|
import { makeDecorator } from '@storybook/addons';
|
|
3
7
|
import { useColorMode } from 'theme-ui';
|
|
4
|
-
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Internal dependencies
|
|
11
|
+
*/
|
|
12
|
+
import ThemeBuilder from '../../src/system/theme/getColor';
|
|
13
|
+
|
|
14
|
+
import Valet from '../../src/system/theme/generated/valet-theme-light.json';
|
|
15
|
+
import ValetDark from '../../src/system/theme/generated/valet-theme-dark.json';
|
|
16
|
+
const { getColor } = ThemeBuilder( Valet );
|
|
17
|
+
const { getColor: getColorDark } = ThemeBuilder( ValetDark );
|
|
5
18
|
|
|
6
19
|
// These need to be updated to import VIP design tokens;
|
|
7
20
|
const lightBackground = getColor( 'background', 'primary' );
|
|
8
|
-
const darkBackground = '
|
|
21
|
+
const darkBackground = getColorDark( 'background', 'primary' );
|
|
9
22
|
|
|
10
23
|
export const backgrounds = {
|
|
11
24
|
default: 'Light',
|
package/README.md
CHANGED
|
@@ -49,9 +49,9 @@ You need to update the tokens once the VIP Design System updates the core files.
|
|
|
49
49
|
|
|
50
50
|
We use the VIP Design System Tokens as our base theme structure. All colors, spaces, types should come from a dynamic token system provided by the VIP Design team, currently using Figma as the design software. When the design system is updated by the Design team, they push a file to the root of this repository: `tokens/valet-core.json`.
|
|
51
51
|
|
|
52
|
-
By using the [Token Transformer](https://docs.tokens.studio/sync/github#7-how-to-use-tokens-stored-in-github-in-development) and a custom npm script, we parse this file getting only the VIP Dashboard theme we need for the react components. The theme is called: `productive-color-
|
|
52
|
+
By using the [Token Transformer](https://docs.tokens.studio/sync/github#7-how-to-use-tokens-stored-in-github-in-development) and a custom npm script, we parse this file getting only the VIP Dashboard theme we need for the react components. The light theme is called: `wpvip-productive-color`, and the dark theme is called `wpvip-productive-color-dark`.
|
|
53
53
|
|
|
54
|
-
Once the new file is updated, we need to generate a custom theme file in `src/generated/valet-theme.json`. This operation generates a small json file with the colors we need already filled in.
|
|
54
|
+
Once the new file is updated, we need to generate a custom theme file in `src/generated/valet-theme-light.json`. This operation generates a small json file with the colors we need already filled in.
|
|
55
55
|
|
|
56
56
|
Once the theme is updated, the file `src/system/theme/index.js` reads the colors and apply to all components.
|
|
57
57
|
|
|
@@ -61,7 +61,7 @@ _Important:_ If you change the `generated/valet-theme.json`, make it sure to ope
|
|
|
61
61
|
|
|
62
62
|
#### Update theme script
|
|
63
63
|
|
|
64
|
-
Run this command to update the VIP Valet Theme with the latest `tokens
|
|
64
|
+
Run this command to update the VIP Valet Theme with the latest `tokens/**` files.
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
67
|
npm run theme-update
|
|
@@ -112,16 +112,10 @@ var Trigger = /*#__PURE__*/_react["default"].forwardRef(function (_ref2, forward
|
|
|
112
112
|
fontSize: 1,
|
|
113
113
|
fontWeight: 600,
|
|
114
114
|
'&[data-state="closed"]': {
|
|
115
|
-
backgroundColor:
|
|
116
|
-
var accordion = _ref3.accordion;
|
|
117
|
-
return accordion.background.closed;
|
|
118
|
-
}
|
|
115
|
+
backgroundColor: 'accordion.background.closed'
|
|
119
116
|
},
|
|
120
117
|
'&[data-state="open"]': {
|
|
121
|
-
backgroundColor:
|
|
122
|
-
var accordion = _ref4.accordion;
|
|
123
|
-
return accordion.background.open;
|
|
124
|
-
},
|
|
118
|
+
backgroundColor: 'accordion.background.open',
|
|
125
119
|
borderBottom: '1px solid',
|
|
126
120
|
borderBottomColor: 'borders.2',
|
|
127
121
|
'.vip-accordion-trigger-indicator': {
|
|
@@ -129,10 +123,7 @@ var Trigger = /*#__PURE__*/_react["default"].forwardRef(function (_ref2, forward
|
|
|
129
123
|
}
|
|
130
124
|
},
|
|
131
125
|
'&:hover': {
|
|
132
|
-
backgroundColor:
|
|
133
|
-
var accordion = _ref5.accordion;
|
|
134
|
-
return accordion.background.hover;
|
|
135
|
-
}
|
|
126
|
+
backgroundColor: 'accordion.background.hover'
|
|
136
127
|
}
|
|
137
128
|
}, sx)
|
|
138
129
|
}, props, {
|
|
@@ -159,10 +150,10 @@ Trigger.propTypes = {
|
|
|
159
150
|
sx: _propTypes["default"].object
|
|
160
151
|
};
|
|
161
152
|
|
|
162
|
-
var TriggerWithIcon = /*#__PURE__*/_react["default"].forwardRef(function (
|
|
163
|
-
var children =
|
|
164
|
-
icon =
|
|
165
|
-
props = (0, _objectWithoutPropertiesLoose2["default"])(
|
|
153
|
+
var TriggerWithIcon = /*#__PURE__*/_react["default"].forwardRef(function (_ref3, forwardedRef) {
|
|
154
|
+
var children = _ref3.children,
|
|
155
|
+
icon = _ref3.icon,
|
|
156
|
+
props = (0, _objectWithoutPropertiesLoose2["default"])(_ref3, _excluded3);
|
|
166
157
|
return (0, _jsxRuntime.jsxs)(Trigger, (0, _extends2["default"])({}, props, {
|
|
167
158
|
ref: forwardedRef,
|
|
168
159
|
children: [(0, _jsxRuntime.jsx)("span", {
|
|
@@ -173,7 +164,7 @@ var TriggerWithIcon = /*#__PURE__*/_react["default"].forwardRef(function (_ref6,
|
|
|
173
164
|
children: icon
|
|
174
165
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
175
166
|
sx: {
|
|
176
|
-
color: '
|
|
167
|
+
color: 'accordion.trigger.text',
|
|
177
168
|
flexGrow: 1,
|
|
178
169
|
textAlign: 'left',
|
|
179
170
|
ml: 3
|
|
@@ -190,15 +181,15 @@ TriggerWithIcon.propTypes = {
|
|
|
190
181
|
icon: _propTypes["default"].node.isRequired
|
|
191
182
|
};
|
|
192
183
|
|
|
193
|
-
var Content = /*#__PURE__*/_react["default"].forwardRef(function (
|
|
194
|
-
var children =
|
|
195
|
-
|
|
196
|
-
sx =
|
|
197
|
-
props = (0, _objectWithoutPropertiesLoose2["default"])(
|
|
184
|
+
var Content = /*#__PURE__*/_react["default"].forwardRef(function (_ref4, forwardedRef) {
|
|
185
|
+
var children = _ref4.children,
|
|
186
|
+
_ref4$sx = _ref4.sx,
|
|
187
|
+
sx = _ref4$sx === void 0 ? {} : _ref4$sx,
|
|
188
|
+
props = (0, _objectWithoutPropertiesLoose2["default"])(_ref4, _excluded4);
|
|
198
189
|
return (0, _jsxRuntime.jsx)(AccordionPrimitive.Content, (0, _extends2["default"])({
|
|
199
190
|
sx: (0, _extends2["default"])({
|
|
200
|
-
backgroundColor: '
|
|
201
|
-
color: 'text',
|
|
191
|
+
backgroundColor: 'accordion.content.background',
|
|
192
|
+
color: 'accordion.content.text',
|
|
202
193
|
fontSize: 2,
|
|
203
194
|
overflow: 'hidden',
|
|
204
195
|
px: 3,
|
|
@@ -223,12 +214,12 @@ Content.propTypes = {
|
|
|
223
214
|
sx: _propTypes["default"].object
|
|
224
215
|
};
|
|
225
216
|
|
|
226
|
-
var Root = /*#__PURE__*/_react["default"].forwardRef(function (
|
|
227
|
-
var
|
|
228
|
-
sx =
|
|
229
|
-
children =
|
|
230
|
-
className =
|
|
231
|
-
props = (0, _objectWithoutPropertiesLoose2["default"])(
|
|
217
|
+
var Root = /*#__PURE__*/_react["default"].forwardRef(function (_ref5, forwardRef) {
|
|
218
|
+
var _ref5$sx = _ref5.sx,
|
|
219
|
+
sx = _ref5$sx === void 0 ? {} : _ref5$sx,
|
|
220
|
+
children = _ref5.children,
|
|
221
|
+
className = _ref5.className,
|
|
222
|
+
props = (0, _objectWithoutPropertiesLoose2["default"])(_ref5, _excluded5);
|
|
232
223
|
return (0, _jsxRuntime.jsx)(AccordionPrimitive.Root, (0, _extends2["default"])({
|
|
233
224
|
className: (0, _classnames["default"])('vip-accordion-component', className),
|
|
234
225
|
collapsible: true,
|
|
@@ -19,6 +19,10 @@ var _Button = require("../Button");
|
|
|
19
19
|
|
|
20
20
|
var NewDialog = _interopRequireWildcard(require("../NewDialog"));
|
|
21
21
|
|
|
22
|
+
var _Link = require("../Link");
|
|
23
|
+
|
|
24
|
+
var _Text = require("../Text");
|
|
25
|
+
|
|
22
26
|
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
23
27
|
|
|
24
28
|
var _excluded = ["onConfirm"];
|
|
@@ -50,8 +54,8 @@ var Default = function Default() {
|
|
|
50
54
|
}), (0, _jsxRuntime.jsx)(Dropdown.Separator, {}), (0, _jsxRuntime.jsx)(Dropdown.Item, {
|
|
51
55
|
children: "Errored"
|
|
52
56
|
})]
|
|
53
|
-
}), (0, _jsxRuntime.jsxs)(
|
|
54
|
-
children: ["This component is based on the Radix Dropdown. You can find all available options, props and features in the", ' ', (0, _jsxRuntime.jsx)(
|
|
57
|
+
}), (0, _jsxRuntime.jsxs)(_Text.Text, {
|
|
58
|
+
children: ["This component is based on the Radix Dropdown. You can find all available options, props and features in the", ' ', (0, _jsxRuntime.jsx)(_Link.Link, {
|
|
55
59
|
href: "https://www.radix-ui.com/docs/primitives/components/dropdown-menu",
|
|
56
60
|
target: "_blank",
|
|
57
61
|
rel: "noopener noreferrer",
|
|
@@ -133,8 +137,8 @@ var ComplexOptions = function ComplexOptions() {
|
|
|
133
137
|
}), "Colm Tuite"]
|
|
134
138
|
})]
|
|
135
139
|
})]
|
|
136
|
-
}), (0, _jsxRuntime.jsxs)(
|
|
137
|
-
children: ["This component is based on the Radix Dropdown. You can find all available options, props and features in the", ' ', (0, _jsxRuntime.jsx)(
|
|
140
|
+
}), (0, _jsxRuntime.jsxs)(_Text.Text, {
|
|
141
|
+
children: ["This component is based on the Radix Dropdown. You can find all available options, props and features in the", ' ', (0, _jsxRuntime.jsx)(_Link.Link, {
|
|
138
142
|
href: "https://www.radix-ui.com/docs/primitives/components/dropdown-menu",
|
|
139
143
|
target: "_blank",
|
|
140
144
|
rel: "noopener noreferrer",
|
|
@@ -175,7 +179,7 @@ var WithDialog = function WithDialog() {
|
|
|
175
179
|
};
|
|
176
180
|
|
|
177
181
|
return (0, _jsxRuntime.jsxs)("div", {
|
|
178
|
-
children: [(0, _jsxRuntime.jsx)(
|
|
182
|
+
children: [(0, _jsxRuntime.jsx)(_Text.Text, {
|
|
179
183
|
children: "This is an important example when combining the Dropdown component with the NewDialog component. In order to have the correct accessibility, there are some events you need to use. Use this example if you want to copy and paste the code."
|
|
180
184
|
}), (0, _jsxRuntime.jsxs)(Dropdown.Root, {
|
|
181
185
|
modal: !alertOpen,
|
|
@@ -41,7 +41,7 @@ var Default = function Default() {
|
|
|
41
41
|
|
|
42
42
|
return (0, _jsxRuntime.jsxs)(_2.Form.Root, {
|
|
43
43
|
children: [(0, _jsxRuntime.jsxs)("p", {
|
|
44
|
-
children: ["Per recommendation, if you have a Radio button, use a Fieldset with a legend as wrapper to your options.", ' ', (0, _jsxRuntime.jsx)(
|
|
44
|
+
children: ["Per recommendation, if you have a Radio button, use a Fieldset with a legend as wrapper to your options.", ' ', (0, _jsxRuntime.jsx)(_2.Link, {
|
|
45
45
|
href: "https://a11y-collective.github.io/demos/en/accessible-code/form-fieldsets.html",
|
|
46
46
|
children: "Reference to Form fieldsets"
|
|
47
47
|
})]
|
|
@@ -33,9 +33,11 @@ var _FormSelectLoading = require("./FormSelectLoading");
|
|
|
33
33
|
|
|
34
34
|
var _Input = require("../Form/Input.styles");
|
|
35
35
|
|
|
36
|
+
var _Form = require("../Form");
|
|
37
|
+
|
|
36
38
|
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
37
39
|
|
|
38
|
-
var _excluded = ["autoFilter", "className", "debounce", "displayMenu", "forLabel", "getOptionLabel", "getOptionValue", "id", "isInline", "label", "loading", "minLength", "noOptionsMessage", "onChange", "onInputChange", "options", "required", "searchIcon", "showAllValues", "source", "value"];
|
|
40
|
+
var _excluded = ["autoFilter", "className", "debounce", "displayMenu", "forLabel", "getOptionLabel", "getOptionValue", "id", "isInline", "label", "loading", "minLength", "noOptionsMessage", "onChange", "onInputChange", "options", "required", "searchIcon", "showAllValues", "source", "value", "hasError", "errorMessage"];
|
|
39
41
|
|
|
40
42
|
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); }
|
|
41
43
|
|
|
@@ -161,6 +163,8 @@ var FormAutocomplete = /*#__PURE__*/_react["default"].forwardRef(function (_ref,
|
|
|
161
163
|
showAllValues = _ref$showAllValues === void 0 ? true : _ref$showAllValues,
|
|
162
164
|
source = _ref.source,
|
|
163
165
|
value = _ref.value,
|
|
166
|
+
hasError = _ref.hasError,
|
|
167
|
+
errorMessage = _ref.errorMessage,
|
|
164
168
|
props = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
165
169
|
|
|
166
170
|
var _useState = (0, _react.useState)(false),
|
|
@@ -267,6 +271,10 @@ var FormAutocomplete = /*#__PURE__*/_react["default"].forwardRef(function (_ref,
|
|
|
267
271
|
tNoResults: noOptionsMessage
|
|
268
272
|
}, props)), loading && (0, _jsxRuntime.jsx)(_FormSelectLoading.FormSelectLoading, {}), (0, _jsxRuntime.jsx)(_FormSelectArrow.FormSelectArrow, {})]
|
|
269
273
|
})
|
|
274
|
+
}), hasError && errorMessage && (0, _jsxRuntime.jsx)(_Form.Validation, {
|
|
275
|
+
isValid: false,
|
|
276
|
+
describedId: forLabel,
|
|
277
|
+
children: errorMessage
|
|
270
278
|
})]
|
|
271
279
|
});
|
|
272
280
|
});
|
|
@@ -293,6 +301,8 @@ FormAutocomplete.propTypes = {
|
|
|
293
301
|
searchIcon: _propTypes["default"].bool,
|
|
294
302
|
showAllValues: _propTypes["default"].bool,
|
|
295
303
|
source: _propTypes["default"].func,
|
|
296
|
-
value: _propTypes["default"].string
|
|
304
|
+
value: _propTypes["default"].string,
|
|
305
|
+
hasError: _propTypes["default"].bool,
|
|
306
|
+
errorMessage: _propTypes["default"].string
|
|
297
307
|
};
|
|
298
308
|
FormAutocomplete.displayName = 'FormAutocomplete';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
exports.__esModule = true;
|
|
6
|
-
exports["default"] = exports.WithSearchIcon = exports.WithLoading = exports.WithDefaultValue = exports.WithDebounce = exports.WithCustomMessages = exports.Inline = exports.Default = void 0;
|
|
6
|
+
exports["default"] = exports.WithSearchIcon = exports.WithLoading = exports.WithErrors = exports.WithDefaultValue = exports.WithDebounce = exports.WithCustomMessages = exports.Inline = exports.Default = void 0;
|
|
7
7
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
|
|
@@ -166,4 +166,16 @@ var WithCustomMessages = function WithCustomMessages() {
|
|
|
166
166
|
});
|
|
167
167
|
};
|
|
168
168
|
|
|
169
|
-
exports.WithCustomMessages = WithCustomMessages;
|
|
169
|
+
exports.WithCustomMessages = WithCustomMessages;
|
|
170
|
+
|
|
171
|
+
var WithErrors = function WithErrors() {
|
|
172
|
+
var customArgs = (0, _extends2["default"])({}, args, {
|
|
173
|
+
hasError: true,
|
|
174
|
+
errorMessage: 'Please select a value'
|
|
175
|
+
});
|
|
176
|
+
return (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
177
|
+
children: (0, _jsxRuntime.jsx)(DefaultComponent, (0, _extends2["default"])({}, customArgs))
|
|
178
|
+
});
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
exports.WithErrors = WithErrors;
|
|
@@ -13,6 +13,8 @@ var _react = require("react");
|
|
|
13
13
|
|
|
14
14
|
var Form = _interopRequireWildcard(require("."));
|
|
15
15
|
|
|
16
|
+
var _Link = require("../Link");
|
|
17
|
+
|
|
16
18
|
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
17
19
|
|
|
18
20
|
var _excluded = ["label", "width", "onChange"];
|
|
@@ -76,7 +78,7 @@ var DefaultComponent = function DefaultComponent(_ref) {
|
|
|
76
78
|
children: "15 options"
|
|
77
79
|
}), ". If you need to use a auto-complete, searchable solution, please use another component with a typeahead capability."]
|
|
78
80
|
}), (0, _jsxRuntime.jsxs)("p", {
|
|
79
|
-
children: ["This component was heavily inspired by the", ' ', (0, _jsxRuntime.jsxs)(
|
|
81
|
+
children: ["This component was heavily inspired by the", ' ', (0, _jsxRuntime.jsxs)(_Link.Link, {
|
|
80
82
|
href: "https://designsystem.digital.gov/components/select/",
|
|
81
83
|
target: "_blank",
|
|
82
84
|
rel: "noreferrer",
|
|
@@ -26,22 +26,17 @@ exports["default"] = _default;
|
|
|
26
26
|
|
|
27
27
|
var Default = function Default() {
|
|
28
28
|
return (0, _jsxRuntime.jsxs)(_react["default"].Fragment, {
|
|
29
|
-
children: [(0, _jsxRuntime.
|
|
29
|
+
children: [(0, _jsxRuntime.jsxs)(_.Notice, {
|
|
30
30
|
variant: "alert",
|
|
31
31
|
headingVariant: "h2",
|
|
32
32
|
sx: {
|
|
33
33
|
mb: 4
|
|
34
34
|
},
|
|
35
35
|
title: "Your site is ready to launch!",
|
|
36
|
-
children: (0, _jsxRuntime.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
children: ["It looks like you\u2018re ready to share your", ' ', (0, _jsxRuntime.jsx)(_.Link, {
|
|
41
|
-
href: "https://google.com/",
|
|
42
|
-
children: "application with the world."
|
|
43
|
-
})]
|
|
44
|
-
})
|
|
36
|
+
children: ["It looks like you\u2018re ready to share your", ' ', (0, _jsxRuntime.jsx)(_.Link, {
|
|
37
|
+
href: "https://google.com/",
|
|
38
|
+
children: "application with the world."
|
|
39
|
+
})]
|
|
45
40
|
}), (0, _jsxRuntime.jsxs)(_.Notice, {
|
|
46
41
|
variant: "success",
|
|
47
42
|
sx: {
|
|
@@ -70,21 +65,16 @@ var Default = function Default() {
|
|
|
70
65
|
href: "https://google.com/",
|
|
71
66
|
children: "application with the world."
|
|
72
67
|
})]
|
|
73
|
-
}), (0, _jsxRuntime.
|
|
68
|
+
}), (0, _jsxRuntime.jsxs)(_.Notice, {
|
|
74
69
|
variant: "info",
|
|
75
70
|
sx: {
|
|
76
71
|
mb: 4
|
|
77
72
|
},
|
|
78
73
|
title: "Please read this first",
|
|
79
|
-
children: (0, _jsxRuntime.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
children: ["This notice has a title and children and", ' ', (0, _jsxRuntime.jsx)("a", {
|
|
84
|
-
href: "/?path=/story/avatar--default",
|
|
85
|
-
children: "A link to Avatar"
|
|
86
|
-
})]
|
|
87
|
-
})
|
|
74
|
+
children: ["This notice has a title and children and", ' ', (0, _jsxRuntime.jsx)(_.Link, {
|
|
75
|
+
href: "/?path=/story/avatar--default",
|
|
76
|
+
children: "A link to Avatar"
|
|
77
|
+
})]
|
|
88
78
|
}), (0, _jsxRuntime.jsx)(_.Notice, {
|
|
89
79
|
variant: "alert",
|
|
90
80
|
sx: {
|
|
@@ -97,17 +87,17 @@ var Default = function Default() {
|
|
|
97
87
|
mb: 0
|
|
98
88
|
},
|
|
99
89
|
children: [(0, _jsxRuntime.jsx)("li", {
|
|
100
|
-
children: (0, _jsxRuntime.jsx)(
|
|
90
|
+
children: (0, _jsxRuntime.jsx)(_.Link, {
|
|
101
91
|
href: "#name",
|
|
102
92
|
children: "Please enter your name."
|
|
103
93
|
})
|
|
104
94
|
}), (0, _jsxRuntime.jsx)("li", {
|
|
105
|
-
children: (0, _jsxRuntime.jsx)(
|
|
95
|
+
children: (0, _jsxRuntime.jsx)(_.Link, {
|
|
106
96
|
href: "#email",
|
|
107
97
|
children: "Please enter your email address."
|
|
108
98
|
})
|
|
109
99
|
}), (0, _jsxRuntime.jsx)("li", {
|
|
110
|
-
children: (0, _jsxRuntime.jsx)(
|
|
100
|
+
children: (0, _jsxRuntime.jsx)(_.Link, {
|
|
111
101
|
href: "#terms",
|
|
112
102
|
children: "Please agree to the terms."
|
|
113
103
|
})
|
|
@@ -46,9 +46,6 @@ var Default = function Default() {
|
|
|
46
46
|
gbc: true
|
|
47
47
|
}), (0, _jsxRuntime.jsxs)(_.TableRow, {
|
|
48
48
|
children: [(0, _jsxRuntime.jsx)(_.TableCell, {
|
|
49
|
-
sx: {
|
|
50
|
-
backgroundColor: 'lightgray'
|
|
51
|
-
},
|
|
52
49
|
children: (0, _jsxRuntime.jsx)(_.Flex, {
|
|
53
50
|
sx: {
|
|
54
51
|
alignItems: 'center'
|
|
@@ -46,7 +46,7 @@ var Default = function Default() {
|
|
|
46
46
|
}), (0, _jsxRuntime.jsx)(_.TabsContent, {
|
|
47
47
|
value: "all",
|
|
48
48
|
children: (0, _jsxRuntime.jsxs)(_.Text, {
|
|
49
|
-
children: ["All content ", (0, _jsxRuntime.jsx)(
|
|
49
|
+
children: ["All content ", (0, _jsxRuntime.jsx)(_.Link, {
|
|
50
50
|
href: "https://google.com",
|
|
51
51
|
children: "https://google.com"
|
|
52
52
|
})]
|
|
@@ -57,8 +57,8 @@ var Default = function Default() {
|
|
|
57
57
|
}), (0, _jsxRuntime.jsx)(_.TabsContent, {
|
|
58
58
|
value: "dev",
|
|
59
59
|
children: (0, _jsxRuntime.jsxs)(_.Text, {
|
|
60
|
-
children: ["In Development content ", (0, _jsxRuntime.jsx)(
|
|
61
|
-
|
|
60
|
+
children: ["In Development content ", (0, _jsxRuntime.jsx)(_.Button, {
|
|
61
|
+
variant: "secondary",
|
|
62
62
|
children: "Hey I am a button"
|
|
63
63
|
}), ' ']
|
|
64
64
|
})
|
|
@@ -42,7 +42,7 @@ var WizardStep = /*#__PURE__*/_react["default"].forwardRef(function (_ref, forwa
|
|
|
42
42
|
borderLeftColor = 'primary';
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
var color = '
|
|
45
|
+
var color = 'text';
|
|
46
46
|
|
|
47
47
|
if (complete) {
|
|
48
48
|
color = 'success';
|
|
@@ -84,7 +84,8 @@ var WizardStep = /*#__PURE__*/_react["default"].forwardRef(function (_ref, forwa
|
|
|
84
84
|
children: [(0, _jsxRuntime.jsx)(_md.MdCheckCircle, {
|
|
85
85
|
"aria-hidden": "true",
|
|
86
86
|
sx: {
|
|
87
|
-
mr: 2
|
|
87
|
+
mr: 2,
|
|
88
|
+
color: active ? 'icon.primary' : 'icon.disabled'
|
|
88
89
|
}
|
|
89
90
|
}), title]
|
|
90
91
|
}) : (0, _jsxRuntime.jsxs)(_.Flex, {
|
|
@@ -95,7 +96,8 @@ var WizardStep = /*#__PURE__*/_react["default"].forwardRef(function (_ref, forwa
|
|
|
95
96
|
children: [(0, _jsxRuntime.jsx)(_md.MdCheckCircle, {
|
|
96
97
|
"aria-hidden": "true",
|
|
97
98
|
sx: {
|
|
98
|
-
mr: 2
|
|
99
|
+
mr: 2,
|
|
100
|
+
color: active ? 'icon.primary' : 'icon.disabled'
|
|
99
101
|
}
|
|
100
102
|
}), title]
|
|
101
103
|
}), subTitle && active && (0, _jsxRuntime.jsx)(_.Text, {
|
|
@@ -3,183 +3,20 @@
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
exports.__esModule = true;
|
|
6
|
-
exports
|
|
6
|
+
exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
|
|
10
|
-
var _getColor = require("./getColor");
|
|
11
|
-
|
|
12
10
|
/** @jsxImportSource theme-ui */
|
|
13
11
|
|
|
14
12
|
/**
|
|
15
13
|
* External dependencies
|
|
16
14
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
brand: _getColor.ValetTheme.color.gold,
|
|
23
|
-
grey: _getColor.ValetTheme.color.gray
|
|
24
|
-
});
|
|
25
|
-
exports.light = light;
|
|
26
|
-
var dark = {
|
|
27
|
-
black: 'rgba(19, 25, 30, 1)',
|
|
28
|
-
brand: {
|
|
29
|
-
0: '#1A160F',
|
|
30
|
-
3: '#231809',
|
|
31
|
-
7: '#301F08',
|
|
32
|
-
10: '#301F08',
|
|
33
|
-
20: '#3A2406',
|
|
34
|
-
30: '#432804',
|
|
35
|
-
40: '#502E01',
|
|
36
|
-
50: '#603700',
|
|
37
|
-
60: '#774400',
|
|
38
|
-
70: '#B96B03',
|
|
39
|
-
80: '#C37A19',
|
|
40
|
-
90: '#CA8529',
|
|
41
|
-
100: '#FAF2E7'
|
|
42
|
-
},
|
|
43
|
-
grey: {
|
|
44
|
-
0: '#161615',
|
|
45
|
-
5: '#1C1C1B',
|
|
46
|
-
10: '#242221',
|
|
47
|
-
20: '#282827',
|
|
48
|
-
30: '#2F2D2C',
|
|
49
|
-
40: '#353431',
|
|
50
|
-
50: '#3F3D3B',
|
|
51
|
-
60: '#524F4C',
|
|
52
|
-
70: '#726F6A',
|
|
53
|
-
80: '#807D78',
|
|
54
|
-
90: '#A29F9B',
|
|
55
|
-
100: '#EDEDEC'
|
|
56
|
-
},
|
|
57
|
-
blue: {
|
|
58
|
-
0: '#0B1A1C',
|
|
59
|
-
5: '#062124',
|
|
60
|
-
10: '#032D31',
|
|
61
|
-
20: '#00353B',
|
|
62
|
-
30: '#003C42',
|
|
63
|
-
40: '#00444C',
|
|
64
|
-
50: '#005059',
|
|
65
|
-
60: '#00636E',
|
|
66
|
-
70: '#009FB1',
|
|
67
|
-
80: '#09BDD2',
|
|
68
|
-
90: '#2AC5D7',
|
|
69
|
-
100: '#E6F9FB'
|
|
70
|
-
},
|
|
71
|
-
green: {
|
|
72
|
-
0: '#0D1913',
|
|
73
|
-
5: '#0C1F16',
|
|
74
|
-
10: '#0F291D',
|
|
75
|
-
20: '#113122',
|
|
76
|
-
30: '#133927',
|
|
77
|
-
40: '#16442E',
|
|
78
|
-
50: '#1B5439',
|
|
79
|
-
60: '#236E4A',
|
|
80
|
-
70: '#30A46C',
|
|
81
|
-
80: '#3CB179',
|
|
82
|
-
90: '#4CC389',
|
|
83
|
-
100: '#E4FAF0'
|
|
84
|
-
},
|
|
85
|
-
pink: {
|
|
86
|
-
0: 'rgba(255, 248, 246, 1)',
|
|
87
|
-
5: 'rgba(255, 232, 230, 1)',
|
|
88
|
-
10: 'rgba(255, 214, 210, 1)',
|
|
89
|
-
15: 'rgba(255, 197, 193, 1)',
|
|
90
|
-
20: 'rgba(251, 183, 180, 1)',
|
|
91
|
-
25: 'rgba(239, 171, 168, 1)',
|
|
92
|
-
30: 'rgba(226, 158, 157, 1)',
|
|
93
|
-
35: 'rgba(212, 146, 148, 1)',
|
|
94
|
-
40: 'rgba(202, 133, 136, 1)',
|
|
95
|
-
45: 'rgba(188, 122, 126, 1)',
|
|
96
|
-
50: 'rgba(176, 109, 116, 1)',
|
|
97
|
-
55: 'rgba(163, 95, 106, 1)',
|
|
98
|
-
60: 'rgba(149, 83, 93, 1)',
|
|
99
|
-
65: 'rgba(137, 71, 85, 1)',
|
|
100
|
-
70: 'rgba(124, 57, 74, 1)',
|
|
101
|
-
75: 'rgba(109, 41, 62, 1)',
|
|
102
|
-
80: 'rgba(95, 30, 52, 1)',
|
|
103
|
-
85: 'rgba(83, 14, 43, 1)',
|
|
104
|
-
90: 'rgba(69, 0, 31, 1)',
|
|
105
|
-
95: 'rgba(53, 0, 18, 1)',
|
|
106
|
-
100: 'rgba(46, 0, 3, 1)'
|
|
107
|
-
},
|
|
108
|
-
salmon: {
|
|
109
|
-
0: 'rgba(254, 248, 248, 1)',
|
|
110
|
-
5: 'rgba(254, 233, 228, 1)',
|
|
111
|
-
10: 'rgba(254, 214, 206, 1)',
|
|
112
|
-
15: 'rgba(254, 195, 177, 1)',
|
|
113
|
-
20: 'rgba(255, 178, 150, 1)',
|
|
114
|
-
25: 'rgba(255, 163, 120, 1)',
|
|
115
|
-
30: 'rgba(249, 148, 94, 1)',
|
|
116
|
-
35: 'rgba(237, 137, 85, 1)',
|
|
117
|
-
40: 'rgba(224, 123, 77, 1)',
|
|
118
|
-
45: 'rgba(210, 113, 70, 1)',
|
|
119
|
-
50: 'rgba(197, 101, 63, 1)',
|
|
120
|
-
55: 'rgba(181, 86, 56, 1)',
|
|
121
|
-
60: 'rgba(167, 73, 48, 1)',
|
|
122
|
-
65: 'rgba(153, 60, 43, 1)',
|
|
123
|
-
70: 'rgba(137, 47, 38, 1)',
|
|
124
|
-
75: 'rgba(124, 30, 30, 1)',
|
|
125
|
-
80: 'rgba(108, 15, 23, 1)',
|
|
126
|
-
85: 'rgba(94, 0, 16, 1)',
|
|
127
|
-
90: 'rgba(78, 0, 0, 1)',
|
|
128
|
-
95: 'rgba(62, 0, 1, 1)',
|
|
129
|
-
100: 'rgba(52, 0, 2, 1)'
|
|
130
|
-
},
|
|
131
|
-
orange: {
|
|
132
|
-
0: 'rgba(255, 249, 241, 1)',
|
|
133
|
-
5: 'rgba(255, 233, 219, 1)',
|
|
134
|
-
10: 'rgba(255, 215, 189, 1)',
|
|
135
|
-
15: 'rgba(255, 195, 159, 1)',
|
|
136
|
-
20: 'rgba(255, 178, 126, 1)',
|
|
137
|
-
25: 'rgba(254, 159, 95, 1)',
|
|
138
|
-
30: 'rgba(255, 139, 64, 1)',
|
|
139
|
-
35: 'rgba(255, 123, 40, 1)',
|
|
140
|
-
40: 'rgba(244, 110, 21, 1)',
|
|
141
|
-
45: 'rgba(231, 98, 5, 1)',
|
|
142
|
-
50: 'rgba(215, 80, 1, 1)',
|
|
143
|
-
55: 'rgba(197, 73, 0, 1)',
|
|
144
|
-
60: 'rgba(180, 60, 0, 1)',
|
|
145
|
-
65: 'rgba(165, 49, 0, 1)',
|
|
146
|
-
70: 'rgba(148, 38, 1, 1)',
|
|
147
|
-
75: 'rgba(129, 23, 1, 1)',
|
|
148
|
-
80: 'rgba(111, 8, 1, 1)',
|
|
149
|
-
85: 'rgba(95, 0, 0, 1)',
|
|
150
|
-
90: 'rgba(78, 0, 0, 1)',
|
|
151
|
-
95: 'rgba(60, 0, 0, 1)',
|
|
152
|
-
100: 'rgba(50, 0, 3, 1)'
|
|
153
|
-
},
|
|
154
|
-
yellow: {
|
|
155
|
-
0: '#1F1300',
|
|
156
|
-
5: '#261700',
|
|
157
|
-
10: '#301E00',
|
|
158
|
-
20: '#3B2400',
|
|
159
|
-
30: '#462B00',
|
|
160
|
-
40: '#553400',
|
|
161
|
-
50: '#674003',
|
|
162
|
-
60: '#804F00',
|
|
163
|
-
70: '#FFB031',
|
|
164
|
-
80: '#FFC568',
|
|
165
|
-
90: '#F69E12',
|
|
166
|
-
100: '#FFF2DE'
|
|
167
|
-
},
|
|
168
|
-
red: {
|
|
169
|
-
0: '#1E1313',
|
|
170
|
-
5: '#2B1311',
|
|
171
|
-
10: '#3C1714',
|
|
172
|
-
20: '#491915',
|
|
173
|
-
30: '#561B17',
|
|
174
|
-
40: '#681E19',
|
|
175
|
-
50: '#832019',
|
|
176
|
-
60: '#AC241A',
|
|
177
|
-
70: '#F04539',
|
|
178
|
-
80: '#F6574B',
|
|
179
|
-
90: '#FA6459',
|
|
180
|
-
100: '#FFEEED'
|
|
181
|
-
}
|
|
15
|
+
var _default = function _default(theme) {
|
|
16
|
+
return (0, _extends2["default"])({}, theme.color, {
|
|
17
|
+
brand: theme.color.gold,
|
|
18
|
+
grey: theme.color.gray
|
|
19
|
+
});
|
|
182
20
|
};
|
|
183
|
-
|
|
184
|
-
var _default = light;
|
|
21
|
+
|
|
185
22
|
exports["default"] = _default;
|