@spark-web/spinner 5.1.0 → 5.1.1

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 (3) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/CLAUDE.md +73 -0
  3. package/package.json +3 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @spark-web/spinner
2
2
 
3
+ ## 5.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#782](https://github.com/brighte-labs/spark-web/pull/782)
8
+ [`bb41800`](https://github.com/brighte-labs/spark-web/commit/bb418004d21165f72f4bf2456afea844ee04a21c)
9
+ Thanks [@jacobporci-brighte](https://github.com/jacobporci-brighte)! -
10
+ **docs:** add CLAUDE.md AI context files to foundation and form packages;
11
+ patch data-table with manual sort and spinner overlay patterns
12
+ - Updated dependencies
13
+ [[`bb41800`](https://github.com/brighte-labs/spark-web/commit/bb418004d21165f72f4bf2456afea844ee04a21c)]:
14
+ - @spark-web/box@6.0.1
15
+
3
16
  ## 5.1.0
4
17
 
5
18
  ### Minor Changes
package/CLAUDE.md ADDED
@@ -0,0 +1,73 @@
1
+ # @spark-web/spinner — AI Context
2
+
3
+ ## What this is
4
+
5
+ An animated circular loading indicator. Used to communicate that an async
6
+ operation is in progress. Includes a visually hidden "is loading" label for
7
+ screen readers.
8
+
9
+ ## What this is NOT
10
+
11
+ - Not a progress bar — does not communicate percentage completion
12
+ - Not the loading state for `DataTable` — use the `isLoading` prop on
13
+ `DataTable` instead of placing a `Spinner` externally alongside the table
14
+ - Not a skeleton loader — for page-level skeleton loading use placeholder shapes
15
+
16
+ ## Props interface
17
+
18
+ | Prop | Type | Default | Notes |
19
+ | ------ | ----------------------- | ----------- | -------------------------- |
20
+ | `tone` | icon tone (string) | — | Controls SVG stroke color |
21
+ | `size` | `'xxsmall' \| 'xsmall'` | `'xxsmall'` | Visual size of the spinner |
22
+ | `data` | `DataAttributeMap` | — | Test/analytics attributes |
23
+
24
+ ## Common tones
25
+
26
+ - `tone="primary"` — green on white surface (default loading state)
27
+ - `tone="neutral"` — grey, for subdued contexts
28
+ - No tone — inherits ambient foreground color
29
+
30
+ ## Common patterns
31
+
32
+ ### Inline loading overlay (not inside DataTable)
33
+
34
+ Use only when you cannot use `DataTable`'s `isLoading` prop — e.g., a full-page
35
+ overlay or a custom loading region:
36
+
37
+ ```tsx
38
+ {
39
+ isLoading && (
40
+ <Box
41
+ display="flex"
42
+ flexDirection="column"
43
+ alignItems="center"
44
+ justifyContent="center"
45
+ gap="small"
46
+ padding="xlarge"
47
+ >
48
+ <Spinner tone="primary" size="xsmall" />
49
+ <Text tone="muted">Loading</Text>
50
+ </Box>
51
+ );
52
+ }
53
+ ```
54
+
55
+ ### Inline next to text
56
+
57
+ ```tsx
58
+ <Row gap="small" alignY="center">
59
+ <Spinner tone="primary" />
60
+ <Text tone="muted">Saving…</Text>
61
+ </Row>
62
+ ```
63
+
64
+ ## Do NOTs
65
+
66
+ - NEVER render a `Spinner` outside `DataTable` to indicate table loading — use
67
+ `DataTable`'s `isLoading` prop
68
+ - NEVER use a size larger than `xsmall` — only `xxsmall` and `xsmall` are
69
+ supported
70
+ - NEVER wrap `<Spinner>` in `aria-hidden="true"` — the component includes a
71
+ built-in visually hidden `"is loading"` label for screen readers. The inner
72
+ SVG is already `aria-hidden` by the component; do not suppress the outer
73
+ element.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-web/spinner",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "homepage": "https://github.com/brighte-labs/spark-web#readme",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,6 +11,7 @@
11
11
  "module": "dist/spark-web-spinner.esm.js",
12
12
  "files": [
13
13
  "CHANGELOG.md",
14
+ "CLAUDE.md",
14
15
  "dist",
15
16
  "README.md"
16
17
  ],
@@ -18,7 +19,7 @@
18
19
  "@babel/runtime": "^7.25.0",
19
20
  "@emotion/react": "^11.14.0",
20
21
  "@spark-web/a11y": "^5.3.0",
21
- "@spark-web/box": "^6.0.0",
22
+ "@spark-web/box": "^6.0.1",
22
23
  "@spark-web/icon": "^5.1.0",
23
24
  "@spark-web/utils": "^5.1.0"
24
25
  },