@spark-web/spinner 2.0.0-rc.2 → 2.0.0-rc.20

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/CHANGELOG.md CHANGED
@@ -1,5 +1,257 @@
1
1
  # @spark-web/spinner
2
2
 
3
+ ## 2.0.0-rc.20
4
+
5
+ ### Minor Changes
6
+
7
+ - Support for component-level theming; button-level theming
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies []:
12
+ - @spark-web/utils@2.0.0-rc.20
13
+ - @spark-web/a11y@2.0.0-rc.20
14
+ - @spark-web/icon@2.0.0-rc.20
15
+ - @spark-web/box@2.0.0-rc.20
16
+
17
+ ## 2.0.0-rc.19
18
+
19
+ ### Major Changes
20
+
21
+ - test
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies []:
26
+ - @spark-web/utils@2.0.0-rc.19
27
+ - @spark-web/a11y@2.0.0-rc.19
28
+ - @spark-web/icon@2.0.0-rc.19
29
+ - @spark-web/box@2.0.0-rc.19
30
+
31
+ ## 2.0.0-rc.18
32
+
33
+ ### Major Changes
34
+
35
+ - tests
36
+
37
+ ### Patch Changes
38
+
39
+ - Updated dependencies []:
40
+ - @spark-web/utils@2.0.0-rc.18
41
+ - @spark-web/a11y@2.0.0-rc.18
42
+ - @spark-web/icon@2.0.0-rc.18
43
+ - @spark-web/box@2.0.0-rc.18
44
+
45
+ ## 2.0.0-rc.17
46
+
47
+ ### Major Changes
48
+
49
+ - test
50
+
51
+ ### Patch Changes
52
+
53
+ - Updated dependencies []:
54
+ - @spark-web/utils@2.0.0-rc.17
55
+ - @spark-web/a11y@2.0.0-rc.17
56
+ - @spark-web/icon@2.0.0-rc.17
57
+ - @spark-web/box@2.0.0-rc.17
58
+
59
+ ## 2.0.0-rc.16
60
+
61
+ ### Major Changes
62
+
63
+ - test
64
+
65
+ ### Patch Changes
66
+
67
+ - Updated dependencies []:
68
+ - @spark-web/utils@2.0.0-rc.16
69
+ - @spark-web/a11y@2.0.0-rc.16
70
+ - @spark-web/icon@2.0.0-rc.16
71
+ - @spark-web/box@2.0.0-rc.16
72
+
73
+ ## 2.0.0-rc.15
74
+
75
+ ### Major Changes
76
+
77
+ - test
78
+
79
+ ### Patch Changes
80
+
81
+ - Updated dependencies []:
82
+ - @spark-web/utils@2.0.0-rc.15
83
+ - @spark-web/a11y@2.0.0-rc.15
84
+ - @spark-web/icon@2.0.0-rc.15
85
+ - @spark-web/box@2.0.0-rc.15
86
+
87
+ ## 2.0.0-rc.14
88
+
89
+ ### Major Changes
90
+
91
+ - test
92
+
93
+ ### Patch Changes
94
+
95
+ - Updated dependencies []:
96
+ - @spark-web/utils@2.0.0-rc.14
97
+ - @spark-web/a11y@2.0.0-rc.14
98
+ - @spark-web/icon@2.0.0-rc.14
99
+ - @spark-web/box@2.0.0-rc.14
100
+
101
+ ## 2.0.0-rc.13
102
+
103
+ ### Major Changes
104
+
105
+ - test
106
+
107
+ ### Patch Changes
108
+
109
+ - Updated dependencies []:
110
+ - @spark-web/utils@2.0.0-rc.13
111
+ - @spark-web/a11y@2.0.0-rc.13
112
+ - @spark-web/icon@2.0.0-rc.13
113
+ - @spark-web/box@2.0.0-rc.13
114
+
115
+ ## 2.0.0-rc.12
116
+
117
+ ### Major Changes
118
+
119
+ - test
120
+
121
+ ### Patch Changes
122
+
123
+ - Updated dependencies []:
124
+ - @spark-web/utils@2.0.0-rc.12
125
+ - @spark-web/a11y@2.0.0-rc.12
126
+ - @spark-web/icon@2.0.0-rc.12
127
+ - @spark-web/box@2.0.0-rc.12
128
+
129
+ ## 2.0.0-rc.11
130
+
131
+ ### Major Changes
132
+
133
+ - test
134
+
135
+ ### Patch Changes
136
+
137
+ - Updated dependencies []:
138
+ - @spark-web/utils@2.0.0-rc.11
139
+ - @spark-web/a11y@2.0.0-rc.11
140
+ - @spark-web/icon@2.0.0-rc.11
141
+ - @spark-web/box@2.0.0-rc.11
142
+
143
+ ## 2.0.0-rc.10
144
+
145
+ ### Major Changes
146
+
147
+ - test
148
+
149
+ ### Patch Changes
150
+
151
+ - Updated dependencies []:
152
+ - @spark-web/utils@2.0.0-rc.10
153
+ - @spark-web/a11y@2.0.0-rc.10
154
+ - @spark-web/icon@2.0.0-rc.10
155
+ - @spark-web/box@2.0.0-rc.10
156
+
157
+ ## 2.0.0-rc.9
158
+
159
+ ### Major Changes
160
+
161
+ - test
162
+
163
+ ### Patch Changes
164
+
165
+ - Updated dependencies []:
166
+ - @spark-web/utils@2.0.0-rc.9
167
+ - @spark-web/a11y@2.0.0-rc.9
168
+ - @spark-web/icon@2.0.0-rc.9
169
+ - @spark-web/box@2.0.0-rc.9
170
+
171
+ ## 2.0.0-rc.8
172
+
173
+ ### Major Changes
174
+
175
+ - test
176
+
177
+ ### Patch Changes
178
+
179
+ - Updated dependencies []:
180
+ - @spark-web/utils@2.0.0-rc.8
181
+ - @spark-web/a11y@2.0.0-rc.8
182
+ - @spark-web/icon@2.0.0-rc.8
183
+ - @spark-web/box@2.0.0-rc.8
184
+
185
+ ## 2.0.0-rc.7
186
+
187
+ ### Major Changes
188
+
189
+ - test
190
+
191
+ ### Patch Changes
192
+
193
+ - Updated dependencies []:
194
+ - @spark-web/utils@2.0.0-rc.7
195
+ - @spark-web/a11y@2.0.0-rc.7
196
+ - @spark-web/icon@2.0.0-rc.7
197
+ - @spark-web/box@2.0.0-rc.7
198
+
199
+ ## 2.0.0-rc.6
200
+
201
+ ### Major Changes
202
+
203
+ - test
204
+
205
+ ### Patch Changes
206
+
207
+ - Updated dependencies []:
208
+ - @spark-web/utils@2.0.0-rc.6
209
+ - @spark-web/a11y@2.0.0-rc.6
210
+ - @spark-web/icon@2.0.0-rc.6
211
+ - @spark-web/box@2.0.0-rc.6
212
+
213
+ ## 2.0.0-rc.5
214
+
215
+ ### Major Changes
216
+
217
+ - test
218
+
219
+ ### Patch Changes
220
+
221
+ - Updated dependencies []:
222
+ - @spark-web/utils@2.0.0-rc.5
223
+ - @spark-web/a11y@2.0.0-rc.5
224
+ - @spark-web/icon@2.0.0-rc.5
225
+ - @spark-web/box@2.0.0-rc.5
226
+
227
+ ## 2.0.0-rc.4
228
+
229
+ ### Major Changes
230
+
231
+ - bug
232
+
233
+ ### Patch Changes
234
+
235
+ - Updated dependencies []:
236
+ - @spark-web/utils@2.0.0-rc.4
237
+ - @spark-web/a11y@2.0.0-rc.4
238
+ - @spark-web/icon@2.0.0-rc.4
239
+ - @spark-web/box@2.0.0-rc.4
240
+
241
+ ## 2.0.0-rc.3
242
+
243
+ ### Major Changes
244
+
245
+ - upgrade package
246
+
247
+ ### Patch Changes
248
+
249
+ - Updated dependencies []:
250
+ - @spark-web/utils@2.0.0-rc.3
251
+ - @spark-web/a11y@2.0.0-rc.3
252
+ - @spark-web/icon@2.0.0-rc.3
253
+ - @spark-web/box@2.0.0-rc.3
254
+
3
255
  ## 2.0.0-rc.2
4
256
 
5
257
  ### Major Changes
@@ -1,2 +1,2 @@
1
- export * from "./declarations/src/index";
2
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bhcmstd2ViLXNwaW5uZXIuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuL2RlY2xhcmF0aW9ucy9zcmMvaW5kZXguZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9
1
+ export * from "../src/index";
2
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bhcmstd2ViLXNwaW5uZXIuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==
@@ -1,7 +1,16 @@
1
- 'use strict';
1
+ "use strict";
2
+ // this file might look strange and you might be wondering what it's for
3
+ // it's lets you import your source files by importing this entrypoint
4
+ // as you would import it if it was built with preconstruct build
5
+ // this file is slightly different to some others though
6
+ // it has a require hook which compiles your code with Babel
7
+ // this means that you don't have to set up @babel/register or anything like that
8
+ // but you can still require this module and it'll be compiled
2
9
 
3
- if (process.env.NODE_ENV === "production") {
4
- module.exports = require("./spark-web-spinner.cjs.prod.js");
5
- } else {
6
- module.exports = require("./spark-web-spinner.cjs.dev.js");
7
- }
10
+ // this bit of code imports the require hook and registers it
11
+ let unregister = require("../../../node_modules/@preconstruct/hook").___internalHook(typeof __dirname === 'undefined' ? undefined : __dirname, "../../..", "..");
12
+
13
+ // this re-exports the source file
14
+ module.exports = require("../src/index.ts");
15
+
16
+ unregister();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-web/spinner",
3
- "version": "2.0.0-rc.2",
3
+ "version": "2.0.0-rc.20",
4
4
  "homepage": "https://github.com/brighte-labs/spark-web#readme",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,11 +16,11 @@
16
16
  ],
17
17
  "dependencies": {
18
18
  "@babel/runtime": "^7.25.0",
19
- "@emotion/react": "^11.13.5",
20
- "@spark-web/a11y": "^2.0.0-rc.2",
21
- "@spark-web/box": "^2.0.0-rc.2",
22
- "@spark-web/icon": "^2.0.0-rc.2",
23
- "@spark-web/utils": "^2.0.0-rc.2"
19
+ "@emotion/react": "^11.14.0",
20
+ "@spark-web/a11y": "^2.0.0-rc.20",
21
+ "@spark-web/box": "^2.0.0-rc.20",
22
+ "@spark-web/icon": "^2.0.0-rc.20",
23
+ "@spark-web/utils": "^2.0.0-rc.20"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/react": "^18.2.0",
@@ -1,2 +0,0 @@
1
- export { Spinner } from "./spinner.js";
2
- export type { SpinnerProps } from "./spinner.js";
@@ -1,14 +0,0 @@
1
- import type { IconProps } from '@spark-web/icon';
2
- import type { DataAttributeMap } from '@spark-web/utils/internal';
3
- export declare type SpinnerProps = {
4
- /** Provide a tone to influence elements of the field, and its input. */
5
- tone?: IconProps['tone'];
6
- /** The size of the nested radios. */
7
- size?: 'xxsmall' | 'xsmall';
8
- /** Sets data attributes for the element. */
9
- data?: DataAttributeMap;
10
- };
11
- export declare function Spinner({ tone, size, data }: SpinnerProps): import("@emotion/react/jsx-runtime").JSX.Element;
12
- export declare namespace Spinner {
13
- var displayName: string;
14
- }
@@ -1,73 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var react = require('@emotion/react');
6
- var a11y = require('@spark-web/a11y');
7
- var box = require('@spark-web/box');
8
- var icon = require('@spark-web/icon');
9
- var utils = require('@spark-web/utils');
10
- var jsxRuntime = require('@emotion/react/jsx-runtime');
11
-
12
- function Spinner(_ref) {
13
- var tone = _ref.tone,
14
- _ref$size = _ref.size,
15
- size = _ref$size === void 0 ? 'xxsmall' : _ref$size,
16
- data = _ref.data;
17
- var spinAnimationRef = utils.useSynchronizedAnimation(spinAnimation);
18
- var strokeAnimationRef = utils.useSynchronizedAnimation(strokeDashAnimation);
19
- var styles = useSpinnerStyles();
20
- return jsxRuntime.jsxs(box.Box, {
21
- as: "span",
22
- ref: spinAnimationRef,
23
- css: react.css(styles),
24
- height: size,
25
- width: size,
26
- display: "inline-flex",
27
- alignItems: "center",
28
- justifyContent: "center",
29
- data: data,
30
- children: [jsxRuntime.jsx(a11y.VisuallyHidden, {
31
- children: "Image of a partial circle indicating \"loading\"."
32
- }), jsxRuntime.jsx(SpinnerIcon, {
33
- size: size,
34
- tone: tone,
35
- ref: strokeAnimationRef,
36
- "aria-hidden": "true"
37
- })]
38
- });
39
- }
40
- Spinner.displayName = 'Spinner';
41
- var SpinnerIcon = icon.createIcon(jsxRuntime.jsx("circle", {
42
- cx: 12,
43
- cy: 12,
44
- r: 9
45
- }), 'SpinnerIcon');
46
- var spinAnimation = react.keyframes({
47
- from: {
48
- transform: 'rotate(0deg)'
49
- },
50
- to: {
51
- transform: 'rotate(360deg)'
52
- }
53
- });
54
- var strokeDashAnimation = react.keyframes({
55
- '0%': {
56
- strokeDasharray: '1px, 200px',
57
- strokeDashoffset: 0
58
- },
59
- '100%': {
60
- strokeDasharray: '200px, 200px',
61
- strokeDashoffset: '-55px'
62
- }
63
- });
64
- function useSpinnerStyles() {
65
- return {
66
- animation: "".concat(spinAnimation, " 1.4s linear infinite"),
67
- '& circle': {
68
- animation: "".concat(strokeDashAnimation, " 1.6s cubic-bezier(0.47, 0, 0.75, 0.72) infinite")
69
- }
70
- };
71
- }
72
-
73
- exports.Spinner = Spinner;
@@ -1,73 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var react = require('@emotion/react');
6
- var a11y = require('@spark-web/a11y');
7
- var box = require('@spark-web/box');
8
- var icon = require('@spark-web/icon');
9
- var utils = require('@spark-web/utils');
10
- var jsxRuntime = require('@emotion/react/jsx-runtime');
11
-
12
- function Spinner(_ref) {
13
- var tone = _ref.tone,
14
- _ref$size = _ref.size,
15
- size = _ref$size === void 0 ? 'xxsmall' : _ref$size,
16
- data = _ref.data;
17
- var spinAnimationRef = utils.useSynchronizedAnimation(spinAnimation);
18
- var strokeAnimationRef = utils.useSynchronizedAnimation(strokeDashAnimation);
19
- var styles = useSpinnerStyles();
20
- return jsxRuntime.jsxs(box.Box, {
21
- as: "span",
22
- ref: spinAnimationRef,
23
- css: react.css(styles),
24
- height: size,
25
- width: size,
26
- display: "inline-flex",
27
- alignItems: "center",
28
- justifyContent: "center",
29
- data: data,
30
- children: [jsxRuntime.jsx(a11y.VisuallyHidden, {
31
- children: "Image of a partial circle indicating \"loading\"."
32
- }), jsxRuntime.jsx(SpinnerIcon, {
33
- size: size,
34
- tone: tone,
35
- ref: strokeAnimationRef,
36
- "aria-hidden": "true"
37
- })]
38
- });
39
- }
40
- Spinner.displayName = 'Spinner';
41
- var SpinnerIcon = icon.createIcon(jsxRuntime.jsx("circle", {
42
- cx: 12,
43
- cy: 12,
44
- r: 9
45
- }), 'SpinnerIcon');
46
- var spinAnimation = react.keyframes({
47
- from: {
48
- transform: 'rotate(0deg)'
49
- },
50
- to: {
51
- transform: 'rotate(360deg)'
52
- }
53
- });
54
- var strokeDashAnimation = react.keyframes({
55
- '0%': {
56
- strokeDasharray: '1px, 200px',
57
- strokeDashoffset: 0
58
- },
59
- '100%': {
60
- strokeDasharray: '200px, 200px',
61
- strokeDashoffset: '-55px'
62
- }
63
- });
64
- function useSpinnerStyles() {
65
- return {
66
- animation: "".concat(spinAnimation, " 1.4s linear infinite"),
67
- '& circle': {
68
- animation: "".concat(strokeDashAnimation, " 1.6s cubic-bezier(0.47, 0, 0.75, 0.72) infinite")
69
- }
70
- };
71
- }
72
-
73
- exports.Spinner = Spinner;
@@ -1,69 +0,0 @@
1
- import { keyframes, css } from '@emotion/react';
2
- import { VisuallyHidden } from '@spark-web/a11y';
3
- import { Box } from '@spark-web/box';
4
- import { createIcon } from '@spark-web/icon';
5
- import { useSynchronizedAnimation } from '@spark-web/utils';
6
- import { jsx, jsxs } from '@emotion/react/jsx-runtime';
7
-
8
- function Spinner(_ref) {
9
- var tone = _ref.tone,
10
- _ref$size = _ref.size,
11
- size = _ref$size === void 0 ? 'xxsmall' : _ref$size,
12
- data = _ref.data;
13
- var spinAnimationRef = useSynchronizedAnimation(spinAnimation);
14
- var strokeAnimationRef = useSynchronizedAnimation(strokeDashAnimation);
15
- var styles = useSpinnerStyles();
16
- return jsxs(Box, {
17
- as: "span",
18
- ref: spinAnimationRef,
19
- css: css(styles),
20
- height: size,
21
- width: size,
22
- display: "inline-flex",
23
- alignItems: "center",
24
- justifyContent: "center",
25
- data: data,
26
- children: [jsx(VisuallyHidden, {
27
- children: "Image of a partial circle indicating \"loading\"."
28
- }), jsx(SpinnerIcon, {
29
- size: size,
30
- tone: tone,
31
- ref: strokeAnimationRef,
32
- "aria-hidden": "true"
33
- })]
34
- });
35
- }
36
- Spinner.displayName = 'Spinner';
37
- var SpinnerIcon = createIcon(jsx("circle", {
38
- cx: 12,
39
- cy: 12,
40
- r: 9
41
- }), 'SpinnerIcon');
42
- var spinAnimation = keyframes({
43
- from: {
44
- transform: 'rotate(0deg)'
45
- },
46
- to: {
47
- transform: 'rotate(360deg)'
48
- }
49
- });
50
- var strokeDashAnimation = keyframes({
51
- '0%': {
52
- strokeDasharray: '1px, 200px',
53
- strokeDashoffset: 0
54
- },
55
- '100%': {
56
- strokeDasharray: '200px, 200px',
57
- strokeDashoffset: '-55px'
58
- }
59
- });
60
- function useSpinnerStyles() {
61
- return {
62
- animation: "".concat(spinAnimation, " 1.4s linear infinite"),
63
- '& circle': {
64
- animation: "".concat(strokeDashAnimation, " 1.6s cubic-bezier(0.47, 0, 0.75, 0.72) infinite")
65
- }
66
- };
67
- }
68
-
69
- export { Spinner };