@blockle/blocks 0.0.6 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +43 -12
  3. package/dist/index.cjs +3136 -0
  4. package/dist/index.d.ts +1 -27
  5. package/dist/index.mjs +3136 -0
  6. package/dist/reset.css.cjs +5 -0
  7. package/dist/reset.css.d.ts +295 -0
  8. package/dist/reset.css.mjs +4 -0
  9. package/dist/side-effects/lib/css/atoms/atoms.cjs +2 -0
  10. package/dist/side-effects/lib/css/atoms/atoms.mjs +1 -0
  11. package/dist/side-effects/themes/momotaro/index.cjs +2 -0
  12. package/dist/side-effects/themes/momotaro/index.mjs +1 -0
  13. package/dist/styles/lib/css/atoms/atomicProperties.cjs +69 -0
  14. package/dist/styles/lib/css/atoms/atomicProperties.mjs +70 -0
  15. package/dist/styles/lib/css/atoms/breakpoints.cjs +11 -0
  16. package/dist/styles/lib/css/atoms/breakpoints.mjs +12 -0
  17. package/dist/styles/lib/css/atoms/sprinkles.css.cjs +45 -0
  18. package/dist/styles/lib/css/atoms/sprinkles.css.mjs +46 -0
  19. package/dist/styles/lib/css/reset/reset.css.cjs +36 -0
  20. package/dist/styles/lib/css/reset/reset.css.mjs +35 -0
  21. package/dist/styles/lib/css/theme/makeTheme.cjs +10 -0
  22. package/dist/styles/lib/css/theme/makeTheme.mjs +11 -0
  23. package/dist/styles/lib/css/theme/makeVanillaTheme.cjs +15 -0
  24. package/dist/styles/lib/css/theme/makeVanillaTheme.mjs +16 -0
  25. package/dist/styles/lib/css/theme/tokens.cjs +70 -0
  26. package/dist/styles/lib/css/theme/tokens.mjs +71 -0
  27. package/dist/styles/lib/css/theme/vars.css.cjs +9 -0
  28. package/dist/styles/lib/css/theme/vars.css.mjs +10 -0
  29. package/dist/styles/themes/momotaro/momotaroTheme.css.cjs +11 -0
  30. package/dist/styles/themes/momotaro/momotaroTheme.css.mjs +12 -0
  31. package/dist/styles/themes/momotaro/tokens.cjs +70 -0
  32. package/dist/styles/themes/momotaro/tokens.mjs +71 -0
  33. package/dist/themes/momotaro.cjs +4 -0
  34. package/dist/themes/momotaro.d.ts +1 -0
  35. package/dist/themes/momotaro.mjs +4 -0
  36. package/package.json +57 -79
  37. package/reset.css/index.d.ts +1 -0
  38. package/reset.css/package.json +5 -0
  39. package/themes/momotaro/index.d.ts +1 -0
  40. package/themes/momotaro/package.json +5 -0
  41. package/dist/Badge/Badge.d.ts +0 -7
  42. package/dist/Badge/Badge.spec.d.ts +0 -1
  43. package/dist/Badge/Badge.stories.d.ts +0 -1
  44. package/dist/Badge/index.d.ts +0 -1
  45. package/dist/Box/Box.d.ts +0 -10
  46. package/dist/Box/index.d.ts +0 -1
  47. package/dist/Button/Button.d.ts +0 -13
  48. package/dist/Button/Button.spec.d.ts +0 -1
  49. package/dist/Button/Button.stories.d.ts +0 -1
  50. package/dist/Button/index.d.ts +0 -1
  51. package/dist/Card/Card.d.ts +0 -11
  52. package/dist/Card/Card.spec.d.ts +0 -1
  53. package/dist/Card/Card.stories.d.ts +0 -1
  54. package/dist/Card/index.d.ts +0 -1
  55. package/dist/Dialog/Dialog.d.ts +0 -13
  56. package/dist/Dialog/index.d.ts +0 -1
  57. package/dist/Divider/Divider.d.ts +0 -4
  58. package/dist/Divider/index.d.ts +0 -1
  59. package/dist/Drawer/Drawer.d.ts +0 -10
  60. package/dist/Drawer/index.d.ts +0 -1
  61. package/dist/Dropdown/Dropdown.d.ts +0 -17
  62. package/dist/Dropdown/index.d.ts +0 -1
  63. package/dist/FlatButton/FlatButton.d.ts +0 -15
  64. package/dist/FlatButton/index.d.ts +0 -1
  65. package/dist/Grid/Grid.d.ts +0 -10
  66. package/dist/Grid/index.d.ts +0 -1
  67. package/dist/Icon/Icon.d.ts +0 -26
  68. package/dist/Icon/Icon.spec.d.ts +0 -1
  69. package/dist/Icon/index.d.ts +0 -1
  70. package/dist/IconButton/IconButton.d.ts +0 -12
  71. package/dist/IconButton/index.d.ts +0 -1
  72. package/dist/Inline/Inline.d.ts +0 -8
  73. package/dist/Inline/index.d.ts +0 -1
  74. package/dist/Link/Link.d.ts +0 -9
  75. package/dist/Link/index.d.ts +0 -1
  76. package/dist/Loader/Loader.d.ts +0 -4
  77. package/dist/Loader/index.d.ts +0 -1
  78. package/dist/OutlineButton/OutlineButton.d.ts +0 -12
  79. package/dist/OutlineButton/index.d.ts +0 -1
  80. package/dist/Panel/Panel.d.ts +0 -10
  81. package/dist/Panel/index.d.ts +0 -1
  82. package/dist/Paper/Paper.d.ts +0 -14
  83. package/dist/Paper/Paper.spec.d.ts +0 -1
  84. package/dist/Paper/index.d.ts +0 -1
  85. package/dist/RippleBox/RippleBox.d.ts +0 -8
  86. package/dist/RippleBox/createRipple.d.ts +0 -2
  87. package/dist/RippleBox/index.d.ts +0 -1
  88. package/dist/Stack/Stack.d.ts +0 -13
  89. package/dist/Stack/index.d.ts +0 -1
  90. package/dist/Tag/Tag.d.ts +0 -8
  91. package/dist/Tag/index.d.ts +0 -1
  92. package/dist/Text/Text.d.ts +0 -10
  93. package/dist/Text/Text.spec.d.ts +0 -1
  94. package/dist/Text/index.d.ts +0 -1
  95. package/dist/TextField/TextField.d.ts +0 -22
  96. package/dist/TextField/TextField.stories.d.ts +0 -1
  97. package/dist/TextField/index.d.ts +0 -1
  98. package/dist/blockle-blocks.esm.js +0 -807
  99. package/dist/blockle-blocks.js +0 -842
  100. package/dist/blocks.css +0 -2553
  101. package/dist/blocks.css.map +0 -1
  102. package/dist/cx.d.ts +0 -3
  103. package/dist/hooks/index.d.ts +0 -2
  104. package/dist/hooks/useAnimationState.d.ts +0 -6
  105. package/dist/hooks/useLayer.d.ts +0 -1
  106. package/dist/setupTests.d.ts +0 -1
  107. package/dist/useFlip/animate.d.ts +0 -14
  108. package/dist/useFlip/index.d.ts +0 -1
  109. package/dist/useFlip/useFlip.d.ts +0 -8
  110. package/dist/useStyles/blocks.d.ts +0 -34
  111. package/dist/useStyles/index.d.ts +0 -2
  112. package/dist/useStyles/useStyles.d.ts +0 -3
  113. package/dist/utils/animate/animateCss.d.ts +0 -11
  114. package/dist/utils/animate/index.d.ts +0 -1
  115. package/dist/utils/getEventPosition.d.ts +0 -6
  116. package/dist/utils/index.d.ts +0 -1
@@ -1,807 +0,0 @@
1
- /**
2
- * @blockle/blocks v0.0.5
3
- * (C) 2020-2020 Niek Saarberg
4
- * Released under the MIT License.
5
- */
6
- import React, { forwardRef, createElement, useState, useRef, useEffect, Children, useMemo, useLayoutEffect, useCallback } from 'react';
7
- import { createPortal } from 'react-dom';
8
- import { useField } from '@blockle/form';
9
-
10
- const Badge = ({ children }) => React.createElement("div", { className: "Badge" }, children);
11
-
12
- /*! *****************************************************************************
13
- Copyright (c) Microsoft Corporation.
14
-
15
- Permission to use, copy, modify, and/or distribute this software for any
16
- purpose with or without fee is hereby granted.
17
-
18
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
19
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
20
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
21
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
22
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
23
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
24
- PERFORMANCE OF THIS SOFTWARE.
25
- ***************************************************************************** */
26
-
27
- function __rest(s, e) {
28
- var t = {};
29
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
30
- t[p] = s[p];
31
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
32
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
33
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
34
- t[p[i]] = s[p[i]];
35
- }
36
- return t;
37
- }
38
-
39
- const cx = (...args) => args.filter((arg) => arg && typeof arg === 'string').join(' ');
40
-
41
- // bb -> blockle blocks
42
- // useStyles({ padding: 'small', background: 'card' }); -> 'bb-padding-small bb-background-card'
43
- const useStyles = (styles) => {
44
- const keys = Object.keys(styles);
45
- const classList = [];
46
- keys.forEach((key) => {
47
- const value = styles[key];
48
- if (value === undefined) {
49
- return;
50
- }
51
- if (Array.isArray(value)) {
52
- for (let i = 0; i < value.length; i++) {
53
- const val = value[i];
54
- if (i === 0) {
55
- classList.push(`bb-${key}-${val}`);
56
- }
57
- else {
58
- classList.push(`bb-${key}-${val}-bp${i}`);
59
- }
60
- }
61
- }
62
- else {
63
- classList.push(`bb-${key}-${value}`);
64
- }
65
- });
66
- return classList.join(' ');
67
- };
68
-
69
- const Box = forwardRef((_a, ref) => {
70
- var { alignItems, backgroundColor, children, className, color, component = 'div', display, flexDirection, flexGrow, flexShrink, flexWrap, fontSize, fontStyle, fontWeight, height, justifyContent, negativeMarginLeft, negativeMarginTop, overflow, overflowX, overflowY, padding, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, position, textAlign, width } = _a, restProps = __rest(_a, ["alignItems", "backgroundColor", "children", "className", "color", "component", "display", "flexDirection", "flexGrow", "flexShrink", "flexWrap", "fontSize", "fontStyle", "fontWeight", "height", "justifyContent", "negativeMarginLeft", "negativeMarginTop", "overflow", "overflowX", "overflowY", "padding", "paddingBottom", "paddingLeft", "paddingRight", "paddingTop", "paddingX", "paddingY", "position", "textAlign", "width"]);
71
- const boxStyles = useStyles({
72
- alignItems,
73
- backgroundColor,
74
- color,
75
- display,
76
- flexDirection,
77
- flexGrow,
78
- flexShrink,
79
- flexWrap,
80
- fontSize,
81
- fontStyle,
82
- fontWeight,
83
- height,
84
- justifyContent,
85
- negativeMarginLeft,
86
- negativeMarginTop,
87
- overflow,
88
- overflowX,
89
- overflowY,
90
- padding,
91
- paddingBottom,
92
- paddingLeft,
93
- paddingRight,
94
- paddingTop,
95
- paddingX,
96
- paddingY,
97
- position,
98
- textAlign,
99
- width,
100
- });
101
- return createElement(component, Object.assign({ ref, className: cx(className, boxStyles) }, restProps), children);
102
- });
103
-
104
- /* eslint-disable @typescript-eslint/ban-ts-ignore */
105
- const isTouch = 'ontouchstart' in document;
106
- const endType = isTouch ? 'touchend' : 'mouseup';
107
- function nextTick(cb) {
108
- requestAnimationFrame(() => requestAnimationFrame(cb));
109
- }
110
- function getPosition(event) {
111
- if ('touches' in event) {
112
- return {
113
- x: event.touches[0].pageX,
114
- y: event.touches[0].pageY,
115
- };
116
- }
117
- return { x: event.pageX, y: event.pageY };
118
- }
119
- function createRipple(event) {
120
- // Remove event from pool so we can hijack and set `__rippled` property
121
- event.persist();
122
- // Prevent "other" ripples to be created higher up in the dom tree
123
- // @ts-ignore
124
- if (event.__rippled) {
125
- return;
126
- }
127
- // @ts-ignore
128
- event.__rippled = true;
129
- const createdAt = Date.now();
130
- const { currentTarget } = event;
131
- const { x, y } = getPosition(event);
132
- const target = currentTarget;
133
- const rect = target.getBoundingClientRect();
134
- const size = Math.ceil(Math.max(rect.width, rect.height)) * 4;
135
- const duration = size < 600 ? 400 : 700;
136
- // Ripple element
137
- const ripple = document.createElement('div');
138
- ripple.style.position = 'absolute';
139
- ripple.style.borderRadius = '50%';
140
- ripple.style.pointerEvents = 'none';
141
- ripple.style.backgroundColor = 'currentColor';
142
- ripple.style.width = `${size}px`;
143
- ripple.style.height = `${size}px`;
144
- ripple.style.opacity = '0.2';
145
- ripple.style.transform = 'scale(0.01)';
146
- ripple.style.left = `${x - rect.left - size / 2}px`;
147
- ripple.style.top = `${y - rect.top - size / 2}px`;
148
- ripple.style.transitionProperty = 'transform, opacity';
149
- ripple.style.transitionDuration = `${duration}ms`;
150
- ripple.style.transitionTimingFunction = 'cubic-bezier(.51,.26,.84,.84)';
151
- target.appendChild(ripple);
152
- nextTick(() => {
153
- ripple.style.opacity = '0.1';
154
- ripple.style.transform = 'scale(1)';
155
- });
156
- const cleanup = () => {
157
- const diff = Date.now() - createdAt;
158
- document.removeEventListener(endType, cleanup);
159
- document.removeEventListener('touchcancel', cleanup);
160
- if (diff < duration) {
161
- ripple.style.opacity = '0';
162
- setTimeout(cleanup, duration - diff);
163
- return;
164
- }
165
- target.removeChild(ripple);
166
- };
167
- document.addEventListener(endType, cleanup);
168
- document.addEventListener('touchcancel', cleanup);
169
- }
170
-
171
- const isTouch$1 = 'ontouchstart' in document;
172
- const startType = isTouch$1 ? 'onTouchStart' : 'onMouseDown';
173
- const RippleBox = forwardRef((_a, ref) => {
174
- var { children, component = 'div', color = 'primary' } = _a, props = __rest(_a, ["children", "component", "color"]);
175
- props[startType] = createRipple;
176
- return (React.createElement(Box, Object.assign({ ref: ref, component: component, overflow: "hidden", position: "relative", color: color }, props), children));
177
- });
178
- RippleBox.displayName = 'RippleBox';
179
-
180
- const Button = ({ children, className, disabled, onClick, type = 'button', width, secondary, }) => {
181
- return (React.createElement(RippleBox, { component: "button", alignItems: "center", backgroundColor: disabled ? 'lightGray' : secondary ? 'secondary' : 'primary', className: cx('Button', disabled && 'is-disabled', className), color: "white", disabled: disabled, display: "flex", fontSize: "small", justifyContent: "center", onClick: onClick, paddingX: "large", paddingY: "xsmall", type: type, width: width }, children));
182
- };
183
-
184
- const Card = (_a) => {
185
- var { backgroundColor = 'card', children, className, onClick, shadow } = _a, boxProps = __rest(_a, ["backgroundColor", "children", "className", "onClick", "shadow"]);
186
- const props = Object.assign(Object.assign({}, boxProps), { className: cx('Card', shadow && `shadow-${shadow}`, onClick && 'is-clickable', className) });
187
- if (onClick) {
188
- return (React.createElement(RippleBox, Object.assign({ backgroundColor: backgroundColor, tabIndex: 0, role: "button", onClick: onClick, color: "primary", onKeyPress: (event) => {
189
- if (onClick && (event.key === 'Enter' || event.key === ' ')) {
190
- onClick();
191
- }
192
- } }, props), children));
193
- }
194
- return (React.createElement(Box, Object.assign({ backgroundColor: backgroundColor }, props), children));
195
- };
196
-
197
- const useAnimationState = (nextOpenState) => {
198
- const [state, setState] = useState({ open: nextOpenState, leave: false });
199
- const close = () => setState({ open: false, leave: false });
200
- let { open, leave } = state;
201
- if (nextOpenState && !open) {
202
- open = true;
203
- leave = false;
204
- setState({ open, leave });
205
- }
206
- if (!nextOpenState && open && !leave) {
207
- open = true;
208
- leave = true;
209
- setState({ open, leave });
210
- }
211
- return [{ open, leave }, close];
212
- };
213
-
214
- const useLayer = () => {
215
- const layerRef = useRef();
216
- useEffect(() => () => {
217
- if (layerRef.current) {
218
- document.body.removeChild(layerRef.current);
219
- }
220
- }, []);
221
- return () => {
222
- if (!layerRef.current) {
223
- layerRef.current = document.createElement('div');
224
- document.body.appendChild(layerRef.current);
225
- }
226
- return layerRef.current;
227
- };
228
- };
229
-
230
- function _extends() { _extends = Object.assign || 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); }
231
-
232
- var _ref = /*#__PURE__*/createElement("path", {
233
- fillRule: "evenodd",
234
- clipRule: "evenodd",
235
- d: "M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l4.293 4.293a1 1 0 010 1.414z",
236
- fill: "#4A5568"
237
- });
238
-
239
- function SvgSmArrowLeft(props) {
240
- return /*#__PURE__*/createElement("svg", _extends({
241
- width: 20,
242
- height: 20,
243
- viewBox: "0 0 20 20",
244
- fill: "none"
245
- }, props), _ref);
246
- }
247
-
248
- function _extends$1() { _extends$1 = Object.assign || 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$1.apply(this, arguments); }
249
-
250
- var _ref$1 = /*#__PURE__*/createElement("path", {
251
- fillRule: "evenodd",
252
- clipRule: "evenodd",
253
- d: "M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",
254
- fill: "#4A5568"
255
- });
256
-
257
- function SvgSmArrowRight(props) {
258
- return /*#__PURE__*/createElement("svg", _extends$1({
259
- width: 20,
260
- height: 20,
261
- viewBox: "0 0 20 20",
262
- fill: "none"
263
- }, props), _ref$1);
264
- }
265
-
266
- function _extends$2() { _extends$2 = Object.assign || 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$2.apply(this, arguments); }
267
-
268
- var _ref$2 = /*#__PURE__*/createElement("path", {
269
- fillRule: "evenodd",
270
- clipRule: "evenodd",
271
- d: "M6 6V5a3 3 0 013-3h2a3 3 0 013 3v1h2a2 2 0 012 2v3.57A22.952 22.952 0 0110 13a22.95 22.95 0 01-8-1.43V8a2 2 0 012-2h2zm2-1a1 1 0 011-1h2a1 1 0 011 1v1H8V5zm1 5a1 1 0 011-1h.01a1 1 0 110 2H10a1 1 0 01-1-1z",
272
- fill: "#4A5568"
273
- });
274
-
275
- var _ref2 = /*#__PURE__*/createElement("path", {
276
- d: "M2 13.692V16a2 2 0 002 2h12a2 2 0 002-2v-2.308A24.974 24.974 0 0110 15c-2.796 0-5.487-.46-8-1.308z",
277
- fill: "#4A5568"
278
- });
279
-
280
- function SvgSmBriefcase(props) {
281
- return /*#__PURE__*/createElement("svg", _extends$2({
282
- width: 20,
283
- height: 20,
284
- viewBox: "0 0 20 20",
285
- fill: "none"
286
- }, props), _ref$2, _ref2);
287
- }
288
-
289
- function _extends$3() { _extends$3 = Object.assign || 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$3.apply(this, arguments); }
290
-
291
- var _ref$3 = /*#__PURE__*/createElement("path", {
292
- fillRule: "evenodd",
293
- clipRule: "evenodd",
294
- d: "M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",
295
- fill: "#4A5568"
296
- });
297
-
298
- function SvgSmCalendar(props) {
299
- return /*#__PURE__*/createElement("svg", _extends$3({
300
- width: 20,
301
- height: 20,
302
- viewBox: "0 0 20 20",
303
- fill: "none"
304
- }, props), _ref$3);
305
- }
306
-
307
- function _extends$4() { _extends$4 = Object.assign || 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$4.apply(this, arguments); }
308
-
309
- var _ref$4 = /*#__PURE__*/createElement("path", {
310
- fillRule: "evenodd",
311
- clipRule: "evenodd",
312
- d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
313
- fill: "#4A5568"
314
- });
315
-
316
- function SvgSmCheck(props) {
317
- return /*#__PURE__*/createElement("svg", _extends$4({
318
- width: 20,
319
- height: 20,
320
- viewBox: "0 0 20 20",
321
- fill: "none"
322
- }, props), _ref$4);
323
- }
324
-
325
- function _extends$5() { _extends$5 = Object.assign || 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$5.apply(this, arguments); }
326
-
327
- var _ref$5 = /*#__PURE__*/createElement("path", {
328
- fillRule: "evenodd",
329
- clipRule: "evenodd",
330
- d: "M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",
331
- fill: "#4A5568"
332
- });
333
-
334
- function SvgSmCheveronLeft(props) {
335
- return /*#__PURE__*/createElement("svg", _extends$5({
336
- width: 20,
337
- height: 20,
338
- viewBox: "0 0 20 20",
339
- fill: "none"
340
- }, props), _ref$5);
341
- }
342
-
343
- function _extends$6() { _extends$6 = Object.assign || 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$6.apply(this, arguments); }
344
-
345
- var _ref$6 = /*#__PURE__*/createElement("path", {
346
- d: "M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z",
347
- fill: "#4A5568"
348
- });
349
-
350
- var _ref2$1 = /*#__PURE__*/createElement("path", {
351
- d: "M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z",
352
- fill: "#4A5568"
353
- });
354
-
355
- function SvgSmClipboard(props) {
356
- return /*#__PURE__*/createElement("svg", _extends$6({
357
- width: 20,
358
- height: 20,
359
- viewBox: "0 0 20 20",
360
- fill: "none"
361
- }, props), _ref$6, _ref2$1);
362
- }
363
-
364
- function _extends$7() { _extends$7 = Object.assign || 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$7.apply(this, arguments); }
365
-
366
- var _ref$7 = /*#__PURE__*/createElement("path", {
367
- fillRule: "evenodd",
368
- clipRule: "evenodd",
369
- d: "M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z",
370
- fill: "#4A5568"
371
- });
372
-
373
- function SvgSmCog(props) {
374
- return /*#__PURE__*/createElement("svg", _extends$7({
375
- width: 20,
376
- height: 20,
377
- viewBox: "0 0 20 20",
378
- fill: "none"
379
- }, props), _ref$7);
380
- }
381
-
382
- function _extends$8() { _extends$8 = Object.assign || 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$8.apply(this, arguments); }
383
-
384
- var _ref$8 = /*#__PURE__*/createElement("path", {
385
- fillRule: "evenodd",
386
- clipRule: "evenodd",
387
- d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
388
- fill: "#4A5568"
389
- });
390
-
391
- function SvgSmExclamation(props) {
392
- return /*#__PURE__*/createElement("svg", _extends$8({
393
- width: 20,
394
- height: 20,
395
- viewBox: "0 0 20 20",
396
- fill: "none"
397
- }, props), _ref$8);
398
- }
399
-
400
- function _extends$9() { _extends$9 = Object.assign || 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$9.apply(this, arguments); }
401
-
402
- var _ref$9 = /*#__PURE__*/createElement("path", {
403
- fillRule: "evenodd",
404
- clipRule: "evenodd",
405
- d: "M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",
406
- fill: "#4A5568"
407
- });
408
-
409
- function SvgSmPlus(props) {
410
- return /*#__PURE__*/createElement("svg", _extends$9({
411
- width: 20,
412
- height: 20,
413
- viewBox: "0 0 20 20",
414
- fill: "none"
415
- }, props), _ref$9);
416
- }
417
-
418
- function _extends$a() { _extends$a = Object.assign || 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$a.apply(this, arguments); }
419
-
420
- var _ref$a = /*#__PURE__*/createElement("path", {
421
- fillRule: "evenodd",
422
- clipRule: "evenodd",
423
- d: "M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",
424
- fill: "#4A5568"
425
- });
426
-
427
- function SvgSmSelector(props) {
428
- return /*#__PURE__*/createElement("svg", _extends$a({
429
- width: 20,
430
- height: 20,
431
- viewBox: "0 0 20 20",
432
- fill: "none"
433
- }, props), _ref$a);
434
- }
435
-
436
- function _extends$b() { _extends$b = Object.assign || 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$b.apply(this, arguments); }
437
-
438
- var _ref$b = /*#__PURE__*/createElement("path", {
439
- fillRule: "evenodd",
440
- clipRule: "evenodd",
441
- d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
442
- fill: "#4A5568"
443
- });
444
-
445
- function SvgSmX(props) {
446
- return /*#__PURE__*/createElement("svg", _extends$b({
447
- width: 20,
448
- height: 20,
449
- viewBox: "0 0 20 20",
450
- fill: "none"
451
- }, props), _ref$b);
452
- }
453
-
454
- const ICON_MAP = {
455
- arrowBack: SvgSmCheveronLeft,
456
- arrowLeft: SvgSmArrowLeft,
457
- arrowRight: SvgSmArrowRight,
458
- briefcase: SvgSmBriefcase,
459
- calendar: SvgSmCalendar,
460
- check: SvgSmCheck,
461
- clipboard: SvgSmClipboard,
462
- cog: SvgSmCog,
463
- cross: SvgSmX,
464
- exclamation: SvgSmExclamation,
465
- plus: SvgSmPlus,
466
- selector: SvgSmSelector,
467
- };
468
- const Icon = ({ className, label, name, size = 'medium', color = 'white' }) => {
469
- const iconStyles = useStyles({
470
- color,
471
- });
472
- if (!ICON_MAP[name]) {
473
- console.warn(`<Icon name="${name}" />`);
474
- return null;
475
- }
476
- return (React.createElement("span", { className: cx('Icon', `size-${size}`, className, iconStyles), title: label }, React.createElement(ICON_MAP[name], {
477
- className: 'icon-svg',
478
- 'data-testid': 'icon-svg',
479
- })));
480
- };
481
-
482
- const IconButton = ({ disabled, label, name, onClick, secondary }) => {
483
- return (React.createElement(RippleBox, { disabled: disabled, onClick: onClick, className: cx('IconButton', secondary && 'is-secondary', disabled && 'is-disabled') },
484
- React.createElement(Icon, { name: name, label: label, size: "medium", color: disabled ? 'gray' : 'black' })));
485
- };
486
-
487
- const Stack = ({ align, children, component = 'div', spacing, horizontal = false, className, }) => {
488
- const items = Children.toArray(children);
489
- return (React.createElement(Box, { className: cx('Stack', className), component: component, display: "flex", flexDirection: horizontal ? 'row' : 'column', justifyContent: horizontal ? undefined : align, alignItems: align, negativeMarginTop: horizontal ? undefined : spacing, negativeMarginLeft: horizontal ? spacing : undefined }, items.map((item, key) => (React.createElement(Box, { key: key, paddingTop: horizontal ? undefined : spacing, paddingLeft: horizontal ? spacing : undefined }, item)))));
490
- };
491
-
492
- const Dialog = ({ actions, full = false, onRequestClose, open = false, render, title = null, minHeight, }) => {
493
- const [state, close] = useAnimationState(open);
494
- const layer = useLayer();
495
- useEffect(() => {
496
- if (!state.open) {
497
- return;
498
- }
499
- const onKeyPress = (event) => {
500
- if (event.key === 'Escape') {
501
- onRequestClose();
502
- }
503
- };
504
- document.addEventListener('keydown', onKeyPress);
505
- return () => {
506
- document.removeEventListener('keydown', onKeyPress);
507
- };
508
- }, [state.open]);
509
- if (!state.open) {
510
- return null;
511
- }
512
- const onAnimationEnd = (event) => {
513
- if (event.animationName === 'DialogBack-Leave') {
514
- close();
515
- }
516
- };
517
- const dialog = (React.createElement("div", { className: "DialogContainer" },
518
- React.createElement("div", { className: cx('DialogBack', state.leave && 'is-leave'), onClick: onRequestClose, onAnimationEnd: onAnimationEnd }),
519
- React.createElement(Box, { className: cx('Dialog', state.leave && 'is-leave'), width: full ? 'full' : undefined, display: "flex", flexDirection: "column", position: "relative", paddingY: "small", style: {
520
- minHeight: `min(96%, ${minHeight}px)`,
521
- } },
522
- React.createElement(Stack, { spacing: "medium" },
523
- (title || full) && (React.createElement(Box, { display: "flex", alignItems: "center", paddingLeft: "gutter" },
524
- React.createElement(Box, { flexGrow: 1 }, title),
525
- React.createElement(IconButton, { name: "cross", label: "Close", onClick: onRequestClose }))),
526
- React.createElement(Box, { flexGrow: 1, overflow: "auto", paddingX: "gutter" }, render()),
527
- actions && (React.createElement(Box, { display: "flex", justifyContent: "flex-end", alignItems: "center", paddingX: "gutter" }, actions))))));
528
- return createPortal(dialog, layer());
529
- };
530
-
531
- const Divider = () => React.createElement("hr", { className: "Divider" });
532
-
533
- const Drawer = ({ children, onRequestClose, open, position = 'left' }) => {
534
- return (React.createElement(React.Fragment, null,
535
- React.createElement("div", { className: cx('Drawer-Back', open && 'is-open'), onClick: onRequestClose }),
536
- React.createElement("div", { className: cx('Drawer', `position-${position}`, open && 'is-open') }, children)));
537
- };
538
-
539
- const validate = ({ required }) => (value) => {
540
- if (required && !value) {
541
- return 'required';
542
- }
543
- return null;
544
- };
545
- const Dropdown = ({ name, onChange, placeholder, required, value, errorMessages = {}, children, }) => {
546
- const ref = useRef(null);
547
- const [focus, setFocus] = useState(false);
548
- const field = useField(name, {
549
- value: value || '',
550
- validate: validate({ required }),
551
- onChange,
552
- });
553
- const invalid = field.invalid && (field.dirty || field.touched);
554
- useEffect(() => {
555
- if (ref.current) {
556
- const { value } = ref.current;
557
- if (value && value !== field.value) {
558
- field.setValue(value);
559
- }
560
- }
561
- }, [children]);
562
- return (React.createElement(Box, { position: "relative", display: "inline-block", color: invalid ? 'warning' : focus ? 'primary' : 'black' },
563
- React.createElement(Box, { ref: ref, component: "select", className: cx('Dropdown-select', invalid && 'is-invalid'), color: "black", fontSize: "medium", paddingY: "xsmall", paddingLeft: "small", paddingRight: "large", name: name, id: `Dropdown-${name}`, value: field.value, onBlur: () => {
564
- setFocus(false);
565
- field.setTouched();
566
- }, onChange: (event) => {
567
- field.setValue(event.currentTarget.value);
568
- }, onFocus: () => {
569
- setFocus(true);
570
- } },
571
- placeholder && (React.createElement("option", { value: "", disabled: true }, placeholder)),
572
- children),
573
- React.createElement(Box, { className: "Dropdown-icon", paddingRight: "xsmall" },
574
- React.createElement(Icon, { name: "selector", label: "", color: "black", size: "xsmall" }))));
575
- };
576
-
577
- const FlatButton = (_a) => {
578
- var { children, className, disabled, onClick, secondary, type = 'button', width } = _a, props = __rest(_a, ["children", "className", "disabled", "onClick", "secondary", "type", "width"]);
579
- return (React.createElement(RippleBox, Object.assign({ component: "button", type: type, disabled: disabled, onClick: onClick, className: cx('FlatButton', disabled && 'is-disabled', className), width: width, paddingX: "large", paddingY: "small", fontSize: "small", color: disabled ? 'gray' : secondary ? 'secondary' : 'primary', display: "flex", justifyContent: "center", alignItems: "center", fontWeight: "bold" }, props), children));
580
- };
581
-
582
- const Grid = ({ children, className, spacing, columns }) => {
583
- const gridStyles = useStyles({
584
- display: 'grid',
585
- gridGap: spacing,
586
- });
587
- return (React.createElement("div", { className: cx(className, gridStyles), style: {
588
- gridTemplateColumns: `repeat(${columns}, 1fr)`,
589
- } }, children));
590
- };
591
-
592
- const Inline = ({ children, spacing }) => {
593
- const items = Children.toArray(children);
594
- return (React.createElement(Box, { display: "flex", flexWrap: "wrap", negativeMarginTop: spacing, negativeMarginLeft: spacing }, items.map((item, key) => {
595
- return (React.createElement(Box, { key: key, display: "inline-block", paddingTop: spacing, paddingLeft: spacing }, item));
596
- })));
597
- };
598
-
599
- const Link = ({ children, to, fontSize }) => {
600
- const linkStyles = useStyles({
601
- color: 'primary',
602
- fontSize,
603
- });
604
- return (React.createElement("a", { href: `#${to}`, className: cx('Link', linkStyles) }, children));
605
- };
606
-
607
- const Loader = () => {
608
- return (React.createElement("div", { className: "Loader" },
609
- React.createElement(Icon, { name: "briefcase", label: "Loading", color: "secondary" })));
610
- };
611
-
612
- const OutlineButton = ({ children, className, disabled, onClick, type = 'button', width, }) => {
613
- return (React.createElement(RippleBox, { component: "button", type: type, disabled: disabled, onClick: onClick, className: cx('OutlineButton', disabled && 'is-disabled', className), fontWeight: "bold", width: width, paddingX: "large", paddingY: "small", fontSize: "small", color: disabled ? 'lightGray' : 'primary', display: "flex", justifyContent: "center", alignItems: "center" }, children));
614
- };
615
-
616
- const Panel = ({ className, onRequestClose, open = false, render }) => {
617
- const [state, close] = useAnimationState(open);
618
- const layer = useLayer();
619
- if (!state.open) {
620
- return null;
621
- }
622
- const onAnimationEnd = (event) => {
623
- if (event.animationName === 'Panel-Back-Leave') {
624
- close();
625
- }
626
- };
627
- const panel = (React.createElement("div", { className: "Panel-Container" },
628
- React.createElement("div", { className: cx('Panel-Back', state.leave && 'is-leave'), onClick: onRequestClose, onAnimationEnd: onAnimationEnd }),
629
- React.createElement("div", { className: cx('Panel', state.leave && 'is-leave', className) }, render())));
630
- return createPortal(panel, layer());
631
- };
632
-
633
- const animationLeaveExpression = /^Paper-.*?Leave$/;
634
- const Paper = ({ open = false, effect = 'fade', className, transparent, shadow, render, fit, }) => {
635
- const [state, close] = useAnimationState(open);
636
- const onAnimationEnd = (event) => {
637
- if (animationLeaveExpression.test(event.animationName)) {
638
- close();
639
- }
640
- };
641
- if (!state.open) {
642
- return null;
643
- }
644
- return (React.createElement("div", { className: cx('Paper', state.leave && 'is-leave', className, `effect-${effect}`, fit && 'is-fit', transparent && 'is-transparent', shadow && 'is-shadow'), onAnimationEnd: onAnimationEnd }, render()));
645
- };
646
-
647
- const Text = ({ component = 'span', children, textAlign, fontSize = 'medium', fontWeight, color, fontStyle, className, }) => {
648
- return (React.createElement(Box, { component: component, textAlign: textAlign, fontSize: fontSize, fontWeight: fontWeight, fontStyle: fontStyle, display: "block", className: cx('Text', className), color: color }, children));
649
- };
650
-
651
- const Tag = ({ children, onClick }) => {
652
- return (React.createElement(RippleBox, { tabIndex: 0, className: "Tag", display: "flex", alignItems: "center", paddingX: "small", paddingY: "xsmall", onClick: onClick, onKeyPress: (event) => {
653
- if (event.key === ' ' || event.key === 'Enter') {
654
- onClick();
655
- }
656
- } },
657
- React.createElement(Stack, { spacing: "xsmall", horizontal: true },
658
- React.createElement(Text, { fontSize: "small", fontWeight: "bold" }, children),
659
- React.createElement(Icon, { name: "cross", label: "remove", color: "black", size: "xsmall" }))));
660
- };
661
-
662
- const validate$1 = ({ required, pattern, minLength, maxLength }) => (value) => {
663
- if (required && !value) {
664
- return 'required';
665
- }
666
- if (pattern && !pattern.test(value)) {
667
- return 'pattern';
668
- }
669
- if (minLength && value.length < minLength) {
670
- return 'minLength';
671
- }
672
- if (maxLength && value.length > maxLength) {
673
- return 'maxLength';
674
- }
675
- return null;
676
- };
677
- const TextField = ({ label, name, onChange, pattern, placeholder, required, type = 'text', value = '', errorMessages = {}, minLength, maxLength, disabled, }) => {
678
- const [focus, setFocus] = useState(false);
679
- const field = useField(name, {
680
- value,
681
- validate: validate$1({ required, pattern, minLength, maxLength }),
682
- onChange,
683
- });
684
- const invalid = field.invalid && field.touched;
685
- return (React.createElement(Box, { position: "relative", color: invalid ? 'warning' : focus ? 'primary' : 'white', paddingBottom: "large", className: cx('TextField', disabled && 'is-disabled') },
686
- React.createElement("input", { autoComplete: "off", className: cx('TextField-Input', field.value && 'is-filled', invalid && 'is-invalid'), id: `Input-${name}`, name: name, onBlur: () => {
687
- setFocus(false);
688
- field.setTouched();
689
- }, onChange: (event) => field.setValue(event.target.value), onFocus: () => {
690
- setFocus(true);
691
- }, placeholder: placeholder || label, type: type, value: field.value, disabled: disabled }),
692
- React.createElement(Box, { component: "label", display: "block", htmlFor: `Input-${name}`, color: invalid ? 'warning' : 'gray', className: cx('TextField-Label', field.value && 'is-visible'), paddingX: "xsmall", fontSize: "xsmall", paddingTop: "xsmall", backgroundColor: "white" }, label),
693
- invalid && (React.createElement(Box, { color: "warning", className: "TextField-Bottom", fontSize: "small" }, (field.validationMessage && errorMessages[field.validationMessage]) ||
694
- field.validationMessage))));
695
- };
696
-
697
- const animate = ({ element, transforms, duration = 200, timingFunction = 'ease', done, }) => {
698
- element.style.transition = '';
699
- transforms.forEach(({ property, from = '' }) => {
700
- element.style.setProperty(property, from);
701
- });
702
- const onTransitionEnd = () => {
703
- if (!element) {
704
- return;
705
- }
706
- element.removeEventListener('transitionend', onTransitionEnd);
707
- element.removeEventListener('transitioncancel', onTransitionEnd);
708
- element.style.transition = '';
709
- if (done) {
710
- done();
711
- }
712
- };
713
- element.addEventListener('transitionend', onTransitionEnd);
714
- element.addEventListener('transitioncancel', onTransitionEnd);
715
- window.requestAnimationFrame(() => {
716
- window.requestAnimationFrame(() => {
717
- element.style.transition = `transform ${duration}ms ${timingFunction}, opacity ${duration}ms ${timingFunction}`;
718
- transforms.forEach(({ property, to = '' }) => {
719
- element.style.setProperty(property, to);
720
- });
721
- });
722
- });
723
- };
724
-
725
- const getPosition$1 = (element) => {
726
- const { x, y } = element.getBoundingClientRect();
727
- const scrollLeft = document.documentElement.scrollLeft;
728
- const scrollTop = document.documentElement.scrollTop;
729
- return {
730
- x: x + scrollLeft,
731
- y: y + scrollTop,
732
- };
733
- };
734
- function getTransformValue(axis, x, y) {
735
- switch (axis) {
736
- case 'x':
737
- return `translateX(${x}px)`;
738
- case 'y':
739
- return `translateY(${y}px)`;
740
- case 'both':
741
- return `translate(${x}px, ${y}px)`;
742
- }
743
- }
744
- const useFlip = ({ axis = 'both' } = {}) => {
745
- const refs = useMemo(() => new Map(), []);
746
- const positions = useMemo(() => new Map(), []);
747
- useLayoutEffect(() => {
748
- const animations = [];
749
- Array.from(refs.entries()).forEach(([id, element]) => {
750
- if (!element) {
751
- refs.delete(id);
752
- positions.delete(id);
753
- return;
754
- }
755
- const prevPosition = positions.get(id);
756
- const position = getPosition$1(element);
757
- // Enter animation
758
- if (!prevPosition) {
759
- animations.push({
760
- element,
761
- transforms: [
762
- { property: 'transform', from: 'scale(0.8)' },
763
- { property: 'opacity', from: '0' },
764
- ],
765
- });
766
- }
767
- // Move animation
768
- if (prevPosition && (prevPosition.x !== position.x || prevPosition.y !== position.y)) {
769
- const x = prevPosition.x - position.x;
770
- const y = prevPosition.y - position.y;
771
- animations.push({
772
- element,
773
- transforms: [{ property: 'transform', from: getTransformValue(axis, x, y) }],
774
- });
775
- }
776
- positions.set(id, position);
777
- });
778
- animations.forEach(animate);
779
- });
780
- const setRef = useCallback((id) => (ref) => {
781
- refs.set(id, ref);
782
- }, []);
783
- const remove = useCallback((id, callback) => {
784
- const element = refs.get(id);
785
- if (element) {
786
- animate({
787
- element,
788
- done: callback,
789
- duration: 100,
790
- transforms: [
791
- {
792
- property: 'opacity',
793
- from: '1',
794
- to: '0',
795
- },
796
- {
797
- property: 'transform',
798
- to: 'scale(0.8)',
799
- },
800
- ],
801
- });
802
- }
803
- }, []);
804
- return { setRef, remove };
805
- };
806
-
807
- export { Badge, Box, Button, Card, Dialog, Divider, Drawer, Dropdown, FlatButton, Grid, Icon, IconButton, Inline, Link, Loader, OutlineButton, Panel, Paper, RippleBox, Stack, Tag, Text, TextField, cx, useAnimationState, useFlip, useLayer, useStyles };