@spark-web/spinner 1.0.6 → 1.0.8

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 ADDED
@@ -0,0 +1,164 @@
1
+ # @spark-web/spinner
2
+
3
+ ## 1.0.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#218](https://github.com/brighte-labs/spark-web/pull/218)
8
+ [`6fc8d1b`](https://github.com/brighte-labs/spark-web/commit/6fc8d1bc37e25d0cd622bc37f68a1d92eb5961b5)
9
+ Thanks [@nderkim](https://github.com/nderkim)! - Rename files to kebab case
10
+
11
+ - [#222](https://github.com/brighte-labs/spark-web/pull/222)
12
+ [`7f93c45`](https://github.com/brighte-labs/spark-web/commit/7f93c45bbae8c765e10df9d0dd7615473797749b)
13
+ Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update
14
+ dependencies
15
+
16
+ - [#242](https://github.com/brighte-labs/spark-web/pull/242)
17
+ [`6df05f7`](https://github.com/brighte-labs/spark-web/commit/6df05f764e4181c140d6547d6b897d0210468f6a)
18
+ Thanks [@lukebennett88](https://github.com/lukebennett88)! - - Add homepage
19
+ and repository keys to package.json
20
+ - Add CHANGELOG and README to files key in package.json
21
+ - Updated dependencies
22
+ [[`adc5e9e`](https://github.com/brighte-labs/spark-web/commit/adc5e9e6c99acd117f3261edcefdb5573132441b),
23
+ [`de99b9c`](https://github.com/brighte-labs/spark-web/commit/de99b9c7f72373bd1902cf67f5cfec9a1e1db01c),
24
+ [`6fc8d1b`](https://github.com/brighte-labs/spark-web/commit/6fc8d1bc37e25d0cd622bc37f68a1d92eb5961b5),
25
+ [`7f93c45`](https://github.com/brighte-labs/spark-web/commit/7f93c45bbae8c765e10df9d0dd7615473797749b),
26
+ [`6df05f7`](https://github.com/brighte-labs/spark-web/commit/6df05f764e4181c140d6547d6b897d0210468f6a)]:
27
+ - @spark-web/box@1.1.0
28
+ - @spark-web/icon@1.2.2
29
+ - @spark-web/a11y@1.3.2
30
+ - @spark-web/utils@1.2.3
31
+
32
+ ## 1.0.7
33
+
34
+ ### Patch Changes
35
+
36
+ - [#208](https://github.com/brighte-labs/spark-web/pull/208)
37
+ [`1ea26ef`](https://github.com/brighte-labs/spark-web/commit/1ea26ef04a3b45875ed0dd2326eeab1fbe1e4bc5)
38
+ Thanks [@lukebennett88](https://github.com/lukebennett88)! - Lower required
39
+ node version
40
+
41
+ - Updated dependencies
42
+ [[`1ea26ef`](https://github.com/brighte-labs/spark-web/commit/1ea26ef04a3b45875ed0dd2326eeab1fbe1e4bc5)]:
43
+ - @spark-web/a11y@1.3.1
44
+ - @spark-web/box@1.0.9
45
+ - @spark-web/icon@1.2.1
46
+ - @spark-web/utils@1.2.2
47
+
48
+ ## 1.0.6
49
+
50
+ ### Patch Changes
51
+
52
+ - [#197](https://github.com/brighte-labs/spark-web/pull/197)
53
+ [`94016d8`](https://github.com/brighte-labs/spark-web/commit/94016d84e26bbe55833bbcbab847a2cce6041538)
54
+ Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update packages
55
+
56
+ - Updated dependencies
57
+ [[`51b6c7a`](https://github.com/brighte-labs/spark-web/commit/51b6c7a43f441e02b90403b13af9cfa11e5438ef),
58
+ [`07286b5`](https://github.com/brighte-labs/spark-web/commit/07286b52f897909b1a806d736e1040351c93078f),
59
+ [`94016d8`](https://github.com/brighte-labs/spark-web/commit/94016d84e26bbe55833bbcbab847a2cce6041538)]:
60
+ - @spark-web/a11y@1.3.0
61
+ - @spark-web/icon@1.2.0
62
+ - @spark-web/box@1.0.8
63
+ - @spark-web/utils@1.2.1
64
+
65
+ ## 1.0.5
66
+
67
+ ### Patch Changes
68
+
69
+ - [#173](https://github.com/brighte-labs/spark-web/pull/173)
70
+ [`90b7e9c`](https://github.com/brighte-labs/spark-web/commit/90b7e9cf4eb7e864d765c74b22c3dedf3d262e25)
71
+ Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update babel
72
+ dependency
73
+
74
+ - Updated dependencies
75
+ [[`90b7e9c`](https://github.com/brighte-labs/spark-web/commit/90b7e9cf4eb7e864d765c74b22c3dedf3d262e25),
76
+ [`be99536`](https://github.com/brighte-labs/spark-web/commit/be99536abb56dd26e5c9a1703e6df9c7860b449b),
77
+ [`c3867af`](https://github.com/brighte-labs/spark-web/commit/c3867af7b77dfae3580ab63a5d5c9e8452f2da62)]:
78
+ - @spark-web/a11y@1.2.0
79
+ - @spark-web/box@1.0.7
80
+ - @spark-web/icon@1.1.5
81
+ - @spark-web/utils@1.2.0
82
+
83
+ ## 1.0.4
84
+
85
+ ### Patch Changes
86
+
87
+ - [#167](https://github.com/brighte-labs/spark-web/pull/167)
88
+ [`4f79350`](https://github.com/brighte-labs/spark-web/commit/4f793508fdb43ddd452f0d59a3126101f9fa5459)
89
+ Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update Babel
90
+
91
+ - Updated dependencies
92
+ [[`4f79350`](https://github.com/brighte-labs/spark-web/commit/4f793508fdb43ddd452f0d59a3126101f9fa5459),
93
+ [`f524009`](https://github.com/brighte-labs/spark-web/commit/f5240098cf731b0a2e351b7b585711e893a33736)]:
94
+ - @spark-web/a11y@1.1.0
95
+ - @spark-web/box@1.0.6
96
+ - @spark-web/icon@1.1.4
97
+ - @spark-web/utils@1.1.5
98
+
99
+ ## 1.0.3
100
+
101
+ ### Patch Changes
102
+
103
+ - [#142](https://github.com/brighte-labs/spark-web/pull/142)
104
+ [`500939d`](https://github.com/brighte-labs/spark-web/commit/500939de7c45c93d48078f39151035ab9eba057f)
105
+ Thanks [@clothoo](https://github.com/clothoo)! - Add role 'progressbar'
106
+
107
+ ## 1.0.2
108
+
109
+ ### Patch Changes
110
+
111
+ - [#113](https://github.com/brighte-labs/spark-web/pull/113)
112
+ [`156236d`](https://github.com/brighte-labs/spark-web/commit/156236d2474aee66a0b8e2030635f9c08a5b78ba)
113
+ Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update
114
+ dependencies
115
+
116
+ - Updated dependencies
117
+ [[`156236d`](https://github.com/brighte-labs/spark-web/commit/156236d2474aee66a0b8e2030635f9c08a5b78ba)]:
118
+ - @spark-web/box@1.0.5
119
+ - @spark-web/icon@1.1.3
120
+ - @spark-web/utils@1.1.3
121
+
122
+ ## 1.0.1
123
+
124
+ ### Patch Changes
125
+
126
+ - [#87](https://github.com/brighte-labs/spark-web/pull/87)
127
+ [`5744b68`](https://github.com/brighte-labs/spark-web/commit/5744b6820f626b93a14e11e1fbd96bcbe1b12b27)
128
+ Thanks [@ChristopherMitchell242](https://github.com/ChristopherMitchell242)! -
129
+ Data attribute added to component props to allow consumers to attach
130
+ customattributes to components
131
+
132
+ * [#52](https://github.com/brighte-labs/spark-web/pull/52)
133
+ [`82ab744`](https://github.com/brighte-labs/spark-web/commit/82ab744f198466810f3386bc459b8ab4d57c820e)
134
+ Thanks [@lukebennett88](https://github.com/lukebennett88)! - Add files array
135
+ to package.json files
136
+
137
+ - [#63](https://github.com/brighte-labs/spark-web/pull/63)
138
+ [`58a7284`](https://github.com/brighte-labs/spark-web/commit/58a728457bbbda86ac406a72d8ec4ad6c1c16630)
139
+ Thanks [@jordangeizer](https://github.com/jordangeizer)! - Patched loader
140
+ animation so that it doesn't disappear on last keyframe.
141
+
142
+ - Updated dependencies
143
+ [[`82ab744`](https://github.com/brighte-labs/spark-web/commit/82ab744f198466810f3386bc459b8ab4d57c820e),
144
+ [`df618d9`](https://github.com/brighte-labs/spark-web/commit/df618d92d534e06f06ecedc95ea6bdd51cdc906b)]:
145
+ - @spark-web/box@1.0.4
146
+ - @spark-web/icon@1.1.2
147
+ - @spark-web/utils@1.1.2
148
+
149
+ ## 1.0.0
150
+
151
+ ### Major Changes
152
+
153
+ - [#44](https://github.com/brighte-labs/spark-web/pull/44)
154
+ [`11e7365`](https://github.com/brighte-labs/spark-web/commit/11e73659ff4a01a48a8761821bff34c6ec28568b)
155
+ Thanks [@matildaPan](https://github.com/matildaPan)! - initial release of
156
+ spinner component
157
+
158
+ ### Patch Changes
159
+
160
+ - Updated dependencies
161
+ [[`11e7365`](https://github.com/brighte-labs/spark-web/commit/11e73659ff4a01a48a8761821bff34c6ec28568b),
162
+ [`11e7365`](https://github.com/brighte-labs/spark-web/commit/11e73659ff4a01a48a8761821bff34c6ec28568b)]:
163
+ - @spark-web/icon@1.1.0
164
+ - @spark-web/utils@1.1.0
package/README.md CHANGED
@@ -4,13 +4,14 @@ storybookPath: feedback-overlays-spinner--default
4
4
  isExperimentalPackage: true
5
5
  ---
6
6
 
7
- Spinner indicates users that their request is in progress
7
+ Spinner indicates to users that their request is in progress. In most cases
8
+ [you should use the `loading` prop on a Button instead of using this component directly](/package/button#loading).
8
9
 
9
10
  ## Examples
10
11
 
11
12
  ### Tones
12
13
 
13
- The appearance of Spinner can be cutomised with the tone prop.
14
+ The appearance of Spinner can be customised with the tone prop.
14
15
 
15
16
  Defaults to `primary`.
16
17
 
@@ -18,30 +19,49 @@ Defaults to `primary`.
18
19
  const tones = ['secondary', 'critical', 'positive', 'neutral'];
19
20
 
20
21
  return (
21
- <Stack align="left" gap="xxlarge">
22
- <Inline gap="xxlarge">
22
+ <Stack align="left" gap="large">
23
+ <Inline gap="large">
23
24
  {tones.map(tone => (
24
- <Button tone={tone} prominence="low" key={tone}>
25
- <Spinner />
26
- </Button>
27
- ))}
28
- </Inline>
29
- <Inline gap="xxlarge">
30
- {tones.map(tone => (
31
- <Button tone={tone} key={tone}>
32
- <Spinner />
33
- </Button>
34
- ))}
35
- </Inline>
36
- <Inline gap="xxlarge">
37
- {tones.map(tone => (
38
- <Spinner tone={tone} key={tone} />
25
+ <Spinner key={tone} tone={tone} />
39
26
  ))}
40
27
  </Inline>
41
28
  </Stack>
42
29
  );
43
30
  ```
44
31
 
32
+ ```jsx live
33
+ const backgrounds = [
34
+ // Light
35
+ ['surface', 'positiveLight', 'infoLight', 'cautionLight', 'criticalLight'],
36
+ // Dark
37
+ ['muted', 'positive', 'info', 'caution', 'critical'],
38
+ ];
39
+
40
+ return (
41
+ <Stack gap="large">
42
+ {backgrounds.map((backgroundLightness, index) => (
43
+ <Inline key={index} gap="large">
44
+ {backgroundLightness.map(background => (
45
+ <Box
46
+ key={background}
47
+ background={background}
48
+ shadow="medium"
49
+ height="medium"
50
+ width="medium"
51
+ display="flex"
52
+ flexShrink={0}
53
+ alignItems="center"
54
+ justifyContent="center"
55
+ >
56
+ <Spinner />
57
+ </Box>
58
+ ))}
59
+ </Inline>
60
+ ))}
61
+ </Stack>
62
+ );
63
+ ```
64
+
45
65
  ## Size
46
66
 
47
67
  Spinners available in two size: `xxsmall` and `xsmall`.
@@ -49,23 +69,17 @@ Spinners available in two size: `xxsmall` and `xsmall`.
49
69
  Defaults to `xsmall`.
50
70
 
51
71
  ```jsx live
52
- <Inline gap="xxlarge">
53
- <Row gap="xxlarge">
54
- <Spinner size="xxsmall" />
55
- <Spinner size="xsmall" />
56
- </Row>
57
- </Inline>
72
+ <Row gap="large">
73
+ <Spinner size="xxsmall" />
74
+ <Spinner size="xsmall" />
75
+ </Row>
58
76
  ```
59
77
 
60
78
  ## Props
61
79
 
62
80
  ### Spinner
63
81
 
64
- | Prop | Type | Default | Description |
65
- | ----- | -------------------------------------- | --------- | ----------------------------------------------------------------- |
66
- | size? | 'xxsmall' \| 'xsmall' | | The size of the nested radios. |
67
- | tone? | 'critical' \| 'positive' \| 'neutral' | 'neutral' | Provide a tone to influence elements of the field, and its input. |
68
- | data? | [DataAttributeMap][data-attribute-map] | | Sets data attributes on the component. |
82
+ <PropsTable displayName="Spinner" />
69
83
 
70
84
  [data-attribute-map]:
71
85
  https://github.com/brighte-labs/spark-web/blob/e7f6f4285b4cfd876312cc89fbdd094039aa239a/packages/utils/src/internal/buildDataAttributes.ts#L1
@@ -1,2 +1,2 @@
1
- export { Spinner } from './Spinner';
2
- export type { SpinnerProps } from './Spinner';
1
+ export { Spinner } from './spinner';
2
+ export type { SpinnerProps } from './spinner';
@@ -2,9 +2,11 @@
2
2
  import type { IconProps } from '@spark-web/icon';
3
3
  import type { DataAttributeMap } from '@spark-web/utils/internal';
4
4
  export declare type SpinnerProps = {
5
+ /** Provide a tone to influence elements of the field, and its input. */
5
6
  tone?: IconProps['tone'];
7
+ /** The size of the nested radios. */
6
8
  size?: 'xxsmall' | 'xsmall';
7
- /** Allows setting of data attributes on the underlying element. */
9
+ /** Sets data attributes for the element. */
8
10
  data?: DataAttributeMap;
9
11
  };
10
12
  export declare function Spinner({ tone, size, data }: SpinnerProps): JSX.Element;
package/package.json CHANGED
@@ -1,19 +1,26 @@
1
1
  {
2
2
  "name": "@spark-web/spinner",
3
- "version": "1.0.6",
4
- "license": "MIT",
3
+ "version": "1.0.8",
4
+ "homepage": "https://github.com/brighte-labs/spark-web#readme",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/brighte-labs/spark-web.git",
8
+ "directory": "packages/spinner"
9
+ },
5
10
  "main": "dist/spark-web-spinner.cjs.js",
6
11
  "module": "dist/spark-web-spinner.esm.js",
7
12
  "files": [
8
- "dist"
13
+ "CHANGELOG.md",
14
+ "dist",
15
+ "README.md"
9
16
  ],
10
17
  "dependencies": {
11
- "@babel/runtime": "^7.18.9",
18
+ "@babel/runtime": "^7.19.0",
12
19
  "@emotion/css": "^11.9.0",
13
- "@spark-web/a11y": "^1.3.0",
14
- "@spark-web/box": "^1.0.8",
15
- "@spark-web/icon": "^1.2.0",
16
- "@spark-web/utils": "^1.2.1"
20
+ "@spark-web/a11y": "^1.3.2",
21
+ "@spark-web/box": "^1.1.0",
22
+ "@spark-web/icon": "^1.2.2",
23
+ "@spark-web/utils": "^1.2.3"
17
24
  },
18
25
  "devDependencies": {
19
26
  "@types/react": "^17.0.12",
@@ -23,6 +30,6 @@
23
30
  "react": ">=17.0.2"
24
31
  },
25
32
  "engines": {
26
- "node": ">= 14.13"
33
+ "node": ">=14"
27
34
  }
28
35
  }