@pingux/astro 1.13.0-alpha.3 → 1.13.0-alpha.6
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/lib/cjs/components/Messages/Message.js +6 -4
- package/lib/cjs/styles/Spacing.stories.js +76 -0
- package/lib/cjs/styles/Typography.stories.js +160 -0
- package/lib/cjs/styles/themes/astro-nano/astro-nano.js +165 -0
- package/lib/cjs/styles/themes/astro-nano/index.js +18 -0
- package/lib/components/Messages/Message.js +4 -3
- package/lib/styles/Spacing.stories.js +52 -0
- package/lib/styles/Typography.stories.js +136 -0
- package/lib/styles/themes/astro-nano/astro-nano.js +141 -0
- package/lib/styles/themes/astro-nano/index.js +1 -0
- package/package.json +1 -1
@@ -34,12 +34,14 @@ var _liveAnnouncer = require("@react-aria/live-announcer");
|
|
34
34
|
|
35
35
|
var _AlertCircleIcon = _interopRequireDefault(require("mdi-react/AlertCircleIcon"));
|
36
36
|
|
37
|
-
var _AlertCircleOutlineIcon = _interopRequireDefault(require("mdi-react/AlertCircleOutlineIcon"));
|
38
|
-
|
39
37
|
var _CheckCircleIcon = _interopRequireDefault(require("mdi-react/CheckCircleIcon"));
|
40
38
|
|
41
39
|
var _CloseIcon = _interopRequireDefault(require("mdi-react/CloseIcon"));
|
42
40
|
|
41
|
+
var _AlertIcon = _interopRequireDefault(require("mdi-react/AlertIcon"));
|
42
|
+
|
43
|
+
var _InformationIcon = _interopRequireDefault(require("mdi-react/InformationIcon"));
|
44
|
+
|
43
45
|
var _useStatusClasses4 = _interopRequireDefault(require("../../hooks/useStatusClasses"));
|
44
46
|
|
45
47
|
var _statuses = _interopRequireDefault(require("../../utils/devUtils/constants/statuses"));
|
@@ -61,10 +63,10 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "functi
|
|
61
63
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
62
64
|
|
63
65
|
var icons = {
|
64
|
-
"default":
|
66
|
+
"default": _InformationIcon["default"],
|
65
67
|
success: _CheckCircleIcon["default"],
|
66
68
|
error: _AlertCircleIcon["default"],
|
67
|
-
warning:
|
69
|
+
warning: _AlertIcon["default"]
|
68
70
|
};
|
69
71
|
exports.icons = icons;
|
70
72
|
|
@@ -0,0 +1,76 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
6
|
+
|
7
|
+
_Object$defineProperty(exports, "__esModule", {
|
8
|
+
value: true
|
9
|
+
});
|
10
|
+
|
11
|
+
exports["default"] = exports.Spacing = void 0;
|
12
|
+
|
13
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
14
|
+
|
15
|
+
var _entries = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/entries"));
|
16
|
+
|
17
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
18
|
+
|
19
|
+
var _react = _interopRequireDefault(require("react"));
|
20
|
+
|
21
|
+
var _Text = _interopRequireDefault(require("../components/Text"));
|
22
|
+
|
23
|
+
var _spacing = _interopRequireDefault(require("./spacing"));
|
24
|
+
|
25
|
+
var _ = require("..");
|
26
|
+
|
27
|
+
var _react2 = require("@emotion/react");
|
28
|
+
|
29
|
+
var _default = {
|
30
|
+
title: 'Design/Spacing'
|
31
|
+
};
|
32
|
+
exports["default"] = _default;
|
33
|
+
var tableBodyStyles = {
|
34
|
+
border: 'unset'
|
35
|
+
};
|
36
|
+
var tableRowStyles = {
|
37
|
+
backgroundColor: 'transparent !important'
|
38
|
+
};
|
39
|
+
|
40
|
+
var Spacing = function Spacing() {
|
41
|
+
var _context;
|
42
|
+
|
43
|
+
return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_Text["default"], {
|
44
|
+
variant: "sectionTitle"
|
45
|
+
}, "Spacing"), (0, _react2.jsx)(_.Separator, {
|
46
|
+
mb: "sm"
|
47
|
+
}), (0, _react2.jsx)(_.Table, {
|
48
|
+
width: "75%"
|
49
|
+
}, (0, _react2.jsx)(_.TableHead, null, (0, _react2.jsx)(_.TableRow, {
|
50
|
+
sx: tableRowStyles,
|
51
|
+
key: "head"
|
52
|
+
}, (0, _react2.jsx)(_.TableCell, {
|
53
|
+
isHeading: true,
|
54
|
+
key: "name"
|
55
|
+
}, "Token"), (0, _react2.jsx)(_.TableCell, {
|
56
|
+
isHeading: true,
|
57
|
+
key: "value"
|
58
|
+
}, "Size"))), (0, _map["default"])(_context = (0, _entries["default"])(_spacing["default"])).call(_context, function (_ref) {
|
59
|
+
var _ref2 = (0, _slicedToArray2["default"])(_ref, 2),
|
60
|
+
key = _ref2[0],
|
61
|
+
value = _ref2[1];
|
62
|
+
|
63
|
+
return (0, _react2.jsx)(_.TableBody, {
|
64
|
+
sx: tableBodyStyles,
|
65
|
+
key: key
|
66
|
+
}, (0, _react2.jsx)(_.TableRow, {
|
67
|
+
sx: tableRowStyles
|
68
|
+
}, (0, _react2.jsx)(_.TableCell, {
|
69
|
+
bg: "white"
|
70
|
+
}, key), (0, _react2.jsx)(_.TableCell, {
|
71
|
+
bg: "white"
|
72
|
+
}, value, "px")));
|
73
|
+
})));
|
74
|
+
};
|
75
|
+
|
76
|
+
exports.Spacing = Spacing;
|
@@ -0,0 +1,160 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
6
|
+
|
7
|
+
_Object$defineProperty(exports, "__esModule", {
|
8
|
+
value: true
|
9
|
+
});
|
10
|
+
|
11
|
+
exports["default"] = exports.TypographyTokens = void 0;
|
12
|
+
|
13
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
14
|
+
|
15
|
+
var _entries = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/entries"));
|
16
|
+
|
17
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
18
|
+
|
19
|
+
var _react = _interopRequireDefault(require("react"));
|
20
|
+
|
21
|
+
var _Text = _interopRequireDefault(require("../components/Text"));
|
22
|
+
|
23
|
+
var _ = require("..");
|
24
|
+
|
25
|
+
var _text = require("./text");
|
26
|
+
|
27
|
+
var _react2 = require("@emotion/react");
|
28
|
+
|
29
|
+
var _default = {
|
30
|
+
title: 'Design/Typography'
|
31
|
+
};
|
32
|
+
exports["default"] = _default;
|
33
|
+
var tableBodyStyles = {
|
34
|
+
border: 'unset'
|
35
|
+
};
|
36
|
+
var tableRowStyles = {
|
37
|
+
backgroundColor: 'transparent !important'
|
38
|
+
};
|
39
|
+
|
40
|
+
var TypographyTokens = function TypographyTokens() {
|
41
|
+
var _context, _context2;
|
42
|
+
|
43
|
+
return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_Text["default"], {
|
44
|
+
variant: "sectionTitle"
|
45
|
+
}, "Font Sizes"), (0, _react2.jsx)(_.Separator, {
|
46
|
+
mb: "sm"
|
47
|
+
}), (0, _react2.jsx)(_.Table, {
|
48
|
+
width: "75%"
|
49
|
+
}, (0, _react2.jsx)(_.TableHead, null, (0, _react2.jsx)(_.TableRow, {
|
50
|
+
key: "head"
|
51
|
+
}, (0, _react2.jsx)(_.TableCell, {
|
52
|
+
isHeading: true
|
53
|
+
}, "Token"), (0, _react2.jsx)(_.TableCell, {
|
54
|
+
isHeading: true
|
55
|
+
}, "Size"), (0, _react2.jsx)(_.TableCell, {
|
56
|
+
isHeading: true
|
57
|
+
}, "Example"))), (0, _map["default"])(_context = (0, _entries["default"])(_text.fontSizes)).call(_context, function (_ref) {
|
58
|
+
var _ref2 = (0, _slicedToArray2["default"])(_ref, 2),
|
59
|
+
key = _ref2[0],
|
60
|
+
value = _ref2[1];
|
61
|
+
|
62
|
+
return (0, _react2.jsx)(_.TableBody, {
|
63
|
+
sx: tableBodyStyles,
|
64
|
+
key: key
|
65
|
+
}, (0, _react2.jsx)(_.TableRow, {
|
66
|
+
sx: tableRowStyles
|
67
|
+
}, (0, _react2.jsx)(_.TableCell, null, (0, _react2.jsx)(_Text["default"], {
|
68
|
+
fontSize: value
|
69
|
+
}, key)), (0, _react2.jsx)(_.TableCell, null, (0, _react2.jsx)(_Text["default"], {
|
70
|
+
fontSize: value
|
71
|
+
}, value)), (0, _react2.jsx)(_.TableCell, null, (0, _react2.jsx)(_Text["default"], {
|
72
|
+
fontSize: value
|
73
|
+
}, "<Text fontSize={", key, "} />"))));
|
74
|
+
}))), (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_Text["default"], {
|
75
|
+
variant: "sectionTitle",
|
76
|
+
mt: "xx"
|
77
|
+
}, "Font Weights"), (0, _react2.jsx)(_.Separator, {
|
78
|
+
mb: "sm"
|
79
|
+
}), (0, _react2.jsx)(_.Table, {
|
80
|
+
width: "75%"
|
81
|
+
}, (0, _react2.jsx)(_.TableHead, null, (0, _react2.jsx)(_.TableRow, {
|
82
|
+
key: "head"
|
83
|
+
}, (0, _react2.jsx)(_.TableCell, {
|
84
|
+
isHeading: true
|
85
|
+
}, "Token"), (0, _react2.jsx)(_.TableCell, {
|
86
|
+
isHeading: true
|
87
|
+
}, "Size"), (0, _react2.jsx)(_.TableCell, {
|
88
|
+
isHeading: true
|
89
|
+
}, "Example"))), (0, _map["default"])(_context2 = (0, _entries["default"])(_text.fontWeights)).call(_context2, function (_ref3) {
|
90
|
+
var _ref4 = (0, _slicedToArray2["default"])(_ref3, 2),
|
91
|
+
key = _ref4[0],
|
92
|
+
value = _ref4[1];
|
93
|
+
|
94
|
+
return (0, _react2.jsx)(_.TableBody, {
|
95
|
+
sx: tableBodyStyles,
|
96
|
+
key: key
|
97
|
+
}, (0, _react2.jsx)(_.TableRow, {
|
98
|
+
sx: tableRowStyles
|
99
|
+
}, (0, _react2.jsx)(_.TableCell, null, (0, _react2.jsx)(_Text["default"], {
|
100
|
+
fontWeight: value
|
101
|
+
}, key)), (0, _react2.jsx)(_.TableCell, null, (0, _react2.jsx)(_Text["default"], {
|
102
|
+
fontWeight: value
|
103
|
+
}, value)), (0, _react2.jsx)(_.TableCell, null, (0, _react2.jsx)(_Text["default"], {
|
104
|
+
fontWeight: value
|
105
|
+
}, "<Text fontWeight={", key, "} />"))));
|
106
|
+
}))), (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_Text["default"], {
|
107
|
+
variant: "sectionTitle",
|
108
|
+
mt: "xx"
|
109
|
+
}, "Text Colors"), (0, _react2.jsx)(_.Separator, {
|
110
|
+
mb: "sm"
|
111
|
+
}), (0, _react2.jsx)(_.Table, {
|
112
|
+
width: "75%"
|
113
|
+
}, (0, _react2.jsx)(_.TableHead, null, (0, _react2.jsx)(_.TableRow, {
|
114
|
+
key: "head"
|
115
|
+
}, (0, _react2.jsx)(_.TableCell, {
|
116
|
+
isHeading: true
|
117
|
+
}, "Token"), (0, _react2.jsx)(_.TableCell, {
|
118
|
+
isHeading: true
|
119
|
+
}, "Color"), (0, _react2.jsx)(_.TableCell, {
|
120
|
+
isHeading: true
|
121
|
+
}, "Example"))), (0, _react2.jsx)(_.TableBody, {
|
122
|
+
sx: tableBodyStyles
|
123
|
+
}, (0, _react2.jsx)(_.TableRow, {
|
124
|
+
sx: tableRowStyles
|
125
|
+
}, (0, _react2.jsx)(_.TableCell, null, (0, _react2.jsx)(_.Box, {
|
126
|
+
isRow: true
|
127
|
+
}, (0, _react2.jsx)(_.Box, {
|
128
|
+
width: "30px",
|
129
|
+
height: "30px",
|
130
|
+
bg: "text.primary",
|
131
|
+
mr: "xs"
|
132
|
+
}), (0, _react2.jsx)(_Text["default"], {
|
133
|
+
alignSelf: "center"
|
134
|
+
}, "text.primary"))), (0, _react2.jsx)(_.TableCell, {
|
135
|
+
alignSelf: "center"
|
136
|
+
}, (0, _react2.jsx)(_Text["default"], null, "neutral.10")), (0, _react2.jsx)(_.TableCell, {
|
137
|
+
alignSelf: "center"
|
138
|
+
}, (0, _react2.jsx)(_Text["default"], {
|
139
|
+
color: "text.primary"
|
140
|
+
}, "<Text textColor={text.primary} />"))), (0, _react2.jsx)(_.TableRow, {
|
141
|
+
sx: tableRowStyles
|
142
|
+
}, (0, _react2.jsx)(_.TableCell, null, (0, _react2.jsx)(_.Box, {
|
143
|
+
isRow: true
|
144
|
+
}, (0, _react2.jsx)(_.Box, {
|
145
|
+
width: "30px",
|
146
|
+
height: "30px",
|
147
|
+
bg: "text.secondary",
|
148
|
+
mr: "xs"
|
149
|
+
}), (0, _react2.jsx)(_Text["default"], {
|
150
|
+
alignSelf: "center"
|
151
|
+
}, "text.secondary"))), (0, _react2.jsx)(_.TableCell, {
|
152
|
+
alignSelf: "center"
|
153
|
+
}, (0, _react2.jsx)(_Text["default"], null, "neutral.40")), (0, _react2.jsx)(_.TableCell, {
|
154
|
+
alignSelf: "center"
|
155
|
+
}, (0, _react2.jsx)(_Text["default"], {
|
156
|
+
color: "text.secondary"
|
157
|
+
}, "<Text color={text.secondary} />")))))));
|
158
|
+
};
|
159
|
+
|
160
|
+
exports.TypographyTokens = TypographyTokens;
|
@@ -0,0 +1,165 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
6
|
+
|
7
|
+
var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
8
|
+
|
9
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
10
|
+
|
11
|
+
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
12
|
+
|
13
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
14
|
+
|
15
|
+
var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
16
|
+
|
17
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
18
|
+
|
19
|
+
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
20
|
+
|
21
|
+
_Object$defineProperty(exports, "__esModule", {
|
22
|
+
value: true
|
23
|
+
});
|
24
|
+
|
25
|
+
exports["default"] = void 0;
|
26
|
+
|
27
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
28
|
+
|
29
|
+
var _themeUi = require("theme-ui");
|
30
|
+
|
31
|
+
var _chromaJs = _interopRequireDefault(require("chroma-js"));
|
32
|
+
|
33
|
+
var _theme = _interopRequireDefault(require("../../theme"));
|
34
|
+
|
35
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
36
|
+
|
37
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
38
|
+
|
39
|
+
var scaleFont = 1.2;
|
40
|
+
var borderRadius = 4;
|
41
|
+
var focusStyles = {
|
42
|
+
boxShadow: 'none',
|
43
|
+
outline: '1px solid #000000',
|
44
|
+
outlineOffset: 2,
|
45
|
+
outlineColor: 'active'
|
46
|
+
};
|
47
|
+
var inputFocusStyles = {
|
48
|
+
borderColor: 'active',
|
49
|
+
outline: '4px solid #000000',
|
50
|
+
outlineColor: 'accent.90'
|
51
|
+
};
|
52
|
+
var baseButton = {
|
53
|
+
borderRadius: borderRadius,
|
54
|
+
fontWeight: 400,
|
55
|
+
height: '50px',
|
56
|
+
'&.is-hovered': {
|
57
|
+
boxShadow: 'none',
|
58
|
+
color: 'white',
|
59
|
+
bg: 'activeDark'
|
60
|
+
},
|
61
|
+
'&.is-pressed': {
|
62
|
+
bg: 'activeDarker'
|
63
|
+
},
|
64
|
+
'&:focus-visible': focusStyles,
|
65
|
+
'&.is-focused': focusStyles
|
66
|
+
};
|
67
|
+
var linkStyles = {
|
68
|
+
'&.is-hovered': {
|
69
|
+
color: 'activeDark'
|
70
|
+
},
|
71
|
+
'&.is-pressed': {
|
72
|
+
color: 'activeDarker'
|
73
|
+
}
|
74
|
+
};
|
75
|
+
var modifyTheme = {
|
76
|
+
buttons: {
|
77
|
+
"default": _objectSpread({
|
78
|
+
color: 'active'
|
79
|
+
}, baseButton),
|
80
|
+
primary: _objectSpread({}, baseButton)
|
81
|
+
},
|
82
|
+
colors: {
|
83
|
+
activeDark: (0, _chromaJs["default"])(_theme["default"].colors.active).darken(0.5).hex(),
|
84
|
+
activeDarker: (0, _chromaJs["default"])(_theme["default"].colors.active).darken(1).hex()
|
85
|
+
},
|
86
|
+
fontSizes: {
|
87
|
+
xs: scaleFont * _theme["default"].fontSizes.xs,
|
88
|
+
sm: scaleFont * _theme["default"].fontSizes.sm,
|
89
|
+
md: scaleFont * _theme["default"].fontSizes.md,
|
90
|
+
lg: scaleFont * _theme["default"].fontSizes.lg,
|
91
|
+
xl: scaleFont * _theme["default"].fontSizes.xl,
|
92
|
+
xx: scaleFont * _theme["default"].fontSizes.xx,
|
93
|
+
xxx: '48px'
|
94
|
+
},
|
95
|
+
forms: {
|
96
|
+
input: {
|
97
|
+
fontSize: 'md',
|
98
|
+
borderRadius: borderRadius,
|
99
|
+
height: '50px',
|
100
|
+
'&:focus': inputFocusStyles,
|
101
|
+
primary: _objectSpread(_objectSpread({}, _theme["default"].forms.input), {}, {
|
102
|
+
borderRadius: borderRadius,
|
103
|
+
fontSize: 'xxx',
|
104
|
+
borderColor: 'neutral.60',
|
105
|
+
height: '75px',
|
106
|
+
textAlign: 'center',
|
107
|
+
letterSpacing: '12px',
|
108
|
+
fontWeight: 'bold',
|
109
|
+
'&:focus': inputFocusStyles
|
110
|
+
})
|
111
|
+
}
|
112
|
+
},
|
113
|
+
links: {
|
114
|
+
web: linkStyles,
|
115
|
+
app: linkStyles
|
116
|
+
},
|
117
|
+
text: {
|
118
|
+
title: {
|
119
|
+
fontWeight: 700
|
120
|
+
},
|
121
|
+
footer: {
|
122
|
+
color: 'text.secondary',
|
123
|
+
fontSize: 'xs'
|
124
|
+
},
|
125
|
+
label: {
|
126
|
+
color: 'text.primary'
|
127
|
+
}
|
128
|
+
},
|
129
|
+
variants: {
|
130
|
+
boxes: {
|
131
|
+
card: {
|
132
|
+
borderRadius: borderRadius,
|
133
|
+
flexGrow: [1, 0],
|
134
|
+
maxWidth: _theme["default"].breakpoints[0],
|
135
|
+
bg: 'white',
|
136
|
+
alignItems: 'stretch',
|
137
|
+
py: [0, 'xl'],
|
138
|
+
my: 'auto',
|
139
|
+
boxShadow: ['none', _theme["default"].variants.boxes.card.boxShadow],
|
140
|
+
width: ['100%', '450px'],
|
141
|
+
minHeight: 'fit-content'
|
142
|
+
},
|
143
|
+
wrapper: {
|
144
|
+
alignItems: 'center',
|
145
|
+
justifyContent: 'space-between',
|
146
|
+
bg: ['white', 'accent.99'],
|
147
|
+
py: 'lg',
|
148
|
+
gap: 'lg',
|
149
|
+
overflow: 'auto',
|
150
|
+
position: 'absolute',
|
151
|
+
top: 0,
|
152
|
+
bottom: 0,
|
153
|
+
left: 0,
|
154
|
+
right: 0
|
155
|
+
},
|
156
|
+
cardBody: {
|
157
|
+
flexGrow: [1, 0]
|
158
|
+
}
|
159
|
+
}
|
160
|
+
}
|
161
|
+
};
|
162
|
+
|
163
|
+
var _default = (0, _themeUi.merge)(_theme["default"], modifyTheme);
|
164
|
+
|
165
|
+
exports["default"] = _default;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
6
|
+
|
7
|
+
_Object$defineProperty(exports, "__esModule", {
|
8
|
+
value: true
|
9
|
+
});
|
10
|
+
|
11
|
+
_Object$defineProperty(exports, "default", {
|
12
|
+
enumerable: true,
|
13
|
+
get: function get() {
|
14
|
+
return _astroNano["default"];
|
15
|
+
}
|
16
|
+
});
|
17
|
+
|
18
|
+
var _astroNano = _interopRequireDefault(require("./astro-nano"));
|
@@ -8,9 +8,10 @@ import React, { forwardRef, useEffect, useRef, useState, useLayoutEffect } from
|
|
8
8
|
import PropTypes from 'prop-types';
|
9
9
|
import { announce } from '@react-aria/live-announcer';
|
10
10
|
import AlertCircleIcon from 'mdi-react/AlertCircleIcon';
|
11
|
-
import AlertCircleOutlineIcon from 'mdi-react/AlertCircleOutlineIcon';
|
12
11
|
import CheckCircleIcon from 'mdi-react/CheckCircleIcon';
|
13
12
|
import CloseIcon from 'mdi-react/CloseIcon';
|
13
|
+
import AlertIcon from 'mdi-react/AlertIcon';
|
14
|
+
import InformationIcon from 'mdi-react/InformationIcon';
|
14
15
|
import useStatusClasses from '../../hooks/useStatusClasses';
|
15
16
|
import statuses from '../../utils/devUtils/constants/statuses';
|
16
17
|
import Box from '../Box';
|
@@ -19,10 +20,10 @@ import IconButton from '../IconButton';
|
|
19
20
|
import Text from '../Text';
|
20
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
21
22
|
export var icons = {
|
22
|
-
"default":
|
23
|
+
"default": InformationIcon,
|
23
24
|
success: CheckCircleIcon,
|
24
25
|
error: AlertCircleIcon,
|
25
|
-
warning:
|
26
|
+
warning: AlertIcon
|
26
27
|
};
|
27
28
|
|
28
29
|
var CloseButton = function CloseButton(_ref) {
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
2
|
+
import _Object$entries from "@babel/runtime-corejs3/core-js-stable/object/entries";
|
3
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
4
|
+
import React from 'react';
|
5
|
+
import Text from '../components/Text';
|
6
|
+
import scale from './spacing';
|
7
|
+
import { Table, TableHead, TableRow, TableBody, TableCell, Separator } from '..';
|
8
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
9
|
+
export default {
|
10
|
+
title: 'Design/Spacing'
|
11
|
+
};
|
12
|
+
var tableBodyStyles = {
|
13
|
+
border: 'unset'
|
14
|
+
};
|
15
|
+
var tableRowStyles = {
|
16
|
+
backgroundColor: 'transparent !important'
|
17
|
+
};
|
18
|
+
export var Spacing = function Spacing() {
|
19
|
+
var _context;
|
20
|
+
|
21
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Text, {
|
22
|
+
variant: "sectionTitle"
|
23
|
+
}, "Spacing"), ___EmotionJSX(Separator, {
|
24
|
+
mb: "sm"
|
25
|
+
}), ___EmotionJSX(Table, {
|
26
|
+
width: "75%"
|
27
|
+
}, ___EmotionJSX(TableHead, null, ___EmotionJSX(TableRow, {
|
28
|
+
sx: tableRowStyles,
|
29
|
+
key: "head"
|
30
|
+
}, ___EmotionJSX(TableCell, {
|
31
|
+
isHeading: true,
|
32
|
+
key: "name"
|
33
|
+
}, "Token"), ___EmotionJSX(TableCell, {
|
34
|
+
isHeading: true,
|
35
|
+
key: "value"
|
36
|
+
}, "Size"))), _mapInstanceProperty(_context = _Object$entries(scale)).call(_context, function (_ref) {
|
37
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
38
|
+
key = _ref2[0],
|
39
|
+
value = _ref2[1];
|
40
|
+
|
41
|
+
return ___EmotionJSX(TableBody, {
|
42
|
+
sx: tableBodyStyles,
|
43
|
+
key: key
|
44
|
+
}, ___EmotionJSX(TableRow, {
|
45
|
+
sx: tableRowStyles
|
46
|
+
}, ___EmotionJSX(TableCell, {
|
47
|
+
bg: "white"
|
48
|
+
}, key), ___EmotionJSX(TableCell, {
|
49
|
+
bg: "white"
|
50
|
+
}, value, "px")));
|
51
|
+
})));
|
52
|
+
};
|
@@ -0,0 +1,136 @@
|
|
1
|
+
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
2
|
+
import _Object$entries from "@babel/runtime-corejs3/core-js-stable/object/entries";
|
3
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
4
|
+
import React from 'react';
|
5
|
+
import Text from '../components/Text';
|
6
|
+
import { Table, TableRow, TableBody, TableHead, TableCell, Box, Separator } from '..';
|
7
|
+
import { fontWeights, fontSizes } from './text';
|
8
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
9
|
+
export default {
|
10
|
+
title: 'Design/Typography'
|
11
|
+
};
|
12
|
+
var tableBodyStyles = {
|
13
|
+
border: 'unset'
|
14
|
+
};
|
15
|
+
var tableRowStyles = {
|
16
|
+
backgroundColor: 'transparent !important'
|
17
|
+
};
|
18
|
+
export var TypographyTokens = function TypographyTokens() {
|
19
|
+
var _context, _context2;
|
20
|
+
|
21
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Text, {
|
22
|
+
variant: "sectionTitle"
|
23
|
+
}, "Font Sizes"), ___EmotionJSX(Separator, {
|
24
|
+
mb: "sm"
|
25
|
+
}), ___EmotionJSX(Table, {
|
26
|
+
width: "75%"
|
27
|
+
}, ___EmotionJSX(TableHead, null, ___EmotionJSX(TableRow, {
|
28
|
+
key: "head"
|
29
|
+
}, ___EmotionJSX(TableCell, {
|
30
|
+
isHeading: true
|
31
|
+
}, "Token"), ___EmotionJSX(TableCell, {
|
32
|
+
isHeading: true
|
33
|
+
}, "Size"), ___EmotionJSX(TableCell, {
|
34
|
+
isHeading: true
|
35
|
+
}, "Example"))), _mapInstanceProperty(_context = _Object$entries(fontSizes)).call(_context, function (_ref) {
|
36
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
37
|
+
key = _ref2[0],
|
38
|
+
value = _ref2[1];
|
39
|
+
|
40
|
+
return ___EmotionJSX(TableBody, {
|
41
|
+
sx: tableBodyStyles,
|
42
|
+
key: key
|
43
|
+
}, ___EmotionJSX(TableRow, {
|
44
|
+
sx: tableRowStyles
|
45
|
+
}, ___EmotionJSX(TableCell, null, ___EmotionJSX(Text, {
|
46
|
+
fontSize: value
|
47
|
+
}, key)), ___EmotionJSX(TableCell, null, ___EmotionJSX(Text, {
|
48
|
+
fontSize: value
|
49
|
+
}, value)), ___EmotionJSX(TableCell, null, ___EmotionJSX(Text, {
|
50
|
+
fontSize: value
|
51
|
+
}, "<Text fontSize={", key, "} />"))));
|
52
|
+
}))), ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Text, {
|
53
|
+
variant: "sectionTitle",
|
54
|
+
mt: "xx"
|
55
|
+
}, "Font Weights"), ___EmotionJSX(Separator, {
|
56
|
+
mb: "sm"
|
57
|
+
}), ___EmotionJSX(Table, {
|
58
|
+
width: "75%"
|
59
|
+
}, ___EmotionJSX(TableHead, null, ___EmotionJSX(TableRow, {
|
60
|
+
key: "head"
|
61
|
+
}, ___EmotionJSX(TableCell, {
|
62
|
+
isHeading: true
|
63
|
+
}, "Token"), ___EmotionJSX(TableCell, {
|
64
|
+
isHeading: true
|
65
|
+
}, "Size"), ___EmotionJSX(TableCell, {
|
66
|
+
isHeading: true
|
67
|
+
}, "Example"))), _mapInstanceProperty(_context2 = _Object$entries(fontWeights)).call(_context2, function (_ref3) {
|
68
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
69
|
+
key = _ref4[0],
|
70
|
+
value = _ref4[1];
|
71
|
+
|
72
|
+
return ___EmotionJSX(TableBody, {
|
73
|
+
sx: tableBodyStyles,
|
74
|
+
key: key
|
75
|
+
}, ___EmotionJSX(TableRow, {
|
76
|
+
sx: tableRowStyles
|
77
|
+
}, ___EmotionJSX(TableCell, null, ___EmotionJSX(Text, {
|
78
|
+
fontWeight: value
|
79
|
+
}, key)), ___EmotionJSX(TableCell, null, ___EmotionJSX(Text, {
|
80
|
+
fontWeight: value
|
81
|
+
}, value)), ___EmotionJSX(TableCell, null, ___EmotionJSX(Text, {
|
82
|
+
fontWeight: value
|
83
|
+
}, "<Text fontWeight={", key, "} />"))));
|
84
|
+
}))), ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Text, {
|
85
|
+
variant: "sectionTitle",
|
86
|
+
mt: "xx"
|
87
|
+
}, "Text Colors"), ___EmotionJSX(Separator, {
|
88
|
+
mb: "sm"
|
89
|
+
}), ___EmotionJSX(Table, {
|
90
|
+
width: "75%"
|
91
|
+
}, ___EmotionJSX(TableHead, null, ___EmotionJSX(TableRow, {
|
92
|
+
key: "head"
|
93
|
+
}, ___EmotionJSX(TableCell, {
|
94
|
+
isHeading: true
|
95
|
+
}, "Token"), ___EmotionJSX(TableCell, {
|
96
|
+
isHeading: true
|
97
|
+
}, "Color"), ___EmotionJSX(TableCell, {
|
98
|
+
isHeading: true
|
99
|
+
}, "Example"))), ___EmotionJSX(TableBody, {
|
100
|
+
sx: tableBodyStyles
|
101
|
+
}, ___EmotionJSX(TableRow, {
|
102
|
+
sx: tableRowStyles
|
103
|
+
}, ___EmotionJSX(TableCell, null, ___EmotionJSX(Box, {
|
104
|
+
isRow: true
|
105
|
+
}, ___EmotionJSX(Box, {
|
106
|
+
width: "30px",
|
107
|
+
height: "30px",
|
108
|
+
bg: "text.primary",
|
109
|
+
mr: "xs"
|
110
|
+
}), ___EmotionJSX(Text, {
|
111
|
+
alignSelf: "center"
|
112
|
+
}, "text.primary"))), ___EmotionJSX(TableCell, {
|
113
|
+
alignSelf: "center"
|
114
|
+
}, ___EmotionJSX(Text, null, "neutral.10")), ___EmotionJSX(TableCell, {
|
115
|
+
alignSelf: "center"
|
116
|
+
}, ___EmotionJSX(Text, {
|
117
|
+
color: "text.primary"
|
118
|
+
}, "<Text textColor={text.primary} />"))), ___EmotionJSX(TableRow, {
|
119
|
+
sx: tableRowStyles
|
120
|
+
}, ___EmotionJSX(TableCell, null, ___EmotionJSX(Box, {
|
121
|
+
isRow: true
|
122
|
+
}, ___EmotionJSX(Box, {
|
123
|
+
width: "30px",
|
124
|
+
height: "30px",
|
125
|
+
bg: "text.secondary",
|
126
|
+
mr: "xs"
|
127
|
+
}), ___EmotionJSX(Text, {
|
128
|
+
alignSelf: "center"
|
129
|
+
}, "text.secondary"))), ___EmotionJSX(TableCell, {
|
130
|
+
alignSelf: "center"
|
131
|
+
}, ___EmotionJSX(Text, null, "neutral.40")), ___EmotionJSX(TableCell, {
|
132
|
+
alignSelf: "center"
|
133
|
+
}, ___EmotionJSX(Text, {
|
134
|
+
color: "text.secondary"
|
135
|
+
}, "<Text color={text.secondary} />")))))));
|
136
|
+
};
|
@@ -0,0 +1,141 @@
|
|
1
|
+
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
2
|
+
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
3
|
+
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
4
|
+
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
5
|
+
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
6
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
7
|
+
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
8
|
+
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
9
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
10
|
+
|
11
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
12
|
+
|
13
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
14
|
+
|
15
|
+
import { merge } from 'theme-ui';
|
16
|
+
import chroma from 'chroma-js';
|
17
|
+
import astroTheme from '../../theme';
|
18
|
+
var scaleFont = 1.2;
|
19
|
+
var borderRadius = 4;
|
20
|
+
var focusStyles = {
|
21
|
+
boxShadow: 'none',
|
22
|
+
outline: '1px solid #000000',
|
23
|
+
outlineOffset: 2,
|
24
|
+
outlineColor: 'active'
|
25
|
+
};
|
26
|
+
var inputFocusStyles = {
|
27
|
+
borderColor: 'active',
|
28
|
+
outline: '4px solid #000000',
|
29
|
+
outlineColor: 'accent.90'
|
30
|
+
};
|
31
|
+
var baseButton = {
|
32
|
+
borderRadius: borderRadius,
|
33
|
+
fontWeight: 400,
|
34
|
+
height: '50px',
|
35
|
+
'&.is-hovered': {
|
36
|
+
boxShadow: 'none',
|
37
|
+
color: 'white',
|
38
|
+
bg: 'activeDark'
|
39
|
+
},
|
40
|
+
'&.is-pressed': {
|
41
|
+
bg: 'activeDarker'
|
42
|
+
},
|
43
|
+
'&:focus-visible': focusStyles,
|
44
|
+
'&.is-focused': focusStyles
|
45
|
+
};
|
46
|
+
var linkStyles = {
|
47
|
+
'&.is-hovered': {
|
48
|
+
color: 'activeDark'
|
49
|
+
},
|
50
|
+
'&.is-pressed': {
|
51
|
+
color: 'activeDarker'
|
52
|
+
}
|
53
|
+
};
|
54
|
+
var modifyTheme = {
|
55
|
+
buttons: {
|
56
|
+
"default": _objectSpread({
|
57
|
+
color: 'active'
|
58
|
+
}, baseButton),
|
59
|
+
primary: _objectSpread({}, baseButton)
|
60
|
+
},
|
61
|
+
colors: {
|
62
|
+
activeDark: chroma(astroTheme.colors.active).darken(0.5).hex(),
|
63
|
+
activeDarker: chroma(astroTheme.colors.active).darken(1).hex()
|
64
|
+
},
|
65
|
+
fontSizes: {
|
66
|
+
xs: scaleFont * astroTheme.fontSizes.xs,
|
67
|
+
sm: scaleFont * astroTheme.fontSizes.sm,
|
68
|
+
md: scaleFont * astroTheme.fontSizes.md,
|
69
|
+
lg: scaleFont * astroTheme.fontSizes.lg,
|
70
|
+
xl: scaleFont * astroTheme.fontSizes.xl,
|
71
|
+
xx: scaleFont * astroTheme.fontSizes.xx,
|
72
|
+
xxx: '48px'
|
73
|
+
},
|
74
|
+
forms: {
|
75
|
+
input: {
|
76
|
+
fontSize: 'md',
|
77
|
+
borderRadius: borderRadius,
|
78
|
+
height: '50px',
|
79
|
+
'&:focus': inputFocusStyles,
|
80
|
+
primary: _objectSpread(_objectSpread({}, astroTheme.forms.input), {}, {
|
81
|
+
borderRadius: borderRadius,
|
82
|
+
fontSize: 'xxx',
|
83
|
+
borderColor: 'neutral.60',
|
84
|
+
height: '75px',
|
85
|
+
textAlign: 'center',
|
86
|
+
letterSpacing: '12px',
|
87
|
+
fontWeight: 'bold',
|
88
|
+
'&:focus': inputFocusStyles
|
89
|
+
})
|
90
|
+
}
|
91
|
+
},
|
92
|
+
links: {
|
93
|
+
web: linkStyles,
|
94
|
+
app: linkStyles
|
95
|
+
},
|
96
|
+
text: {
|
97
|
+
title: {
|
98
|
+
fontWeight: 700
|
99
|
+
},
|
100
|
+
footer: {
|
101
|
+
color: 'text.secondary',
|
102
|
+
fontSize: 'xs'
|
103
|
+
},
|
104
|
+
label: {
|
105
|
+
color: 'text.primary'
|
106
|
+
}
|
107
|
+
},
|
108
|
+
variants: {
|
109
|
+
boxes: {
|
110
|
+
card: {
|
111
|
+
borderRadius: borderRadius,
|
112
|
+
flexGrow: [1, 0],
|
113
|
+
maxWidth: astroTheme.breakpoints[0],
|
114
|
+
bg: 'white',
|
115
|
+
alignItems: 'stretch',
|
116
|
+
py: [0, 'xl'],
|
117
|
+
my: 'auto',
|
118
|
+
boxShadow: ['none', astroTheme.variants.boxes.card.boxShadow],
|
119
|
+
width: ['100%', '450px'],
|
120
|
+
minHeight: 'fit-content'
|
121
|
+
},
|
122
|
+
wrapper: {
|
123
|
+
alignItems: 'center',
|
124
|
+
justifyContent: 'space-between',
|
125
|
+
bg: ['white', 'accent.99'],
|
126
|
+
py: 'lg',
|
127
|
+
gap: 'lg',
|
128
|
+
overflow: 'auto',
|
129
|
+
position: 'absolute',
|
130
|
+
top: 0,
|
131
|
+
bottom: 0,
|
132
|
+
left: 0,
|
133
|
+
right: 0
|
134
|
+
},
|
135
|
+
cardBody: {
|
136
|
+
flexGrow: [1, 0]
|
137
|
+
}
|
138
|
+
}
|
139
|
+
}
|
140
|
+
};
|
141
|
+
export default merge(astroTheme, modifyTheme);
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './astro-nano';
|