@hanzo/ui 4.2.5 → 4.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "4.2.5",
3
+ "version": "4.3.1",
4
4
  "description": "Library that contains shared UI primitives, support for a common design system, and other boilerplate support.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -204,6 +204,7 @@ export { default as Input } from './input'
204
204
  export { default as Label } from './label'
205
205
  export type { default as ListAdaptor } from './list-adaptor'
206
206
  export { default as ListBox } from './list-box'
207
+ export { default as LoadingSpinner } from './loading-spinner'
207
208
  export { default as Progress } from './progress'
208
209
  export { RadioGroup, RadioGroupItem } from './radio-group'
209
210
  export { ScrollArea, ScrollBar } from './scroll-area'
@@ -0,0 +1,33 @@
1
+ import { cn } from '../util'
2
+
3
+ // cf: https://github.com/shadcn-ui/ui/discussions/1694#discussioncomment-7851248
4
+ const LoadingSpinner: React.FC<
5
+ {
6
+ size?: number
7
+ className?: string
8
+ }
9
+ & React.SVGProps<SVGSVGElement>
10
+ > = ({
11
+ size = 24,
12
+ className='',
13
+ ...props
14
+ }) => {
15
+ return (
16
+ <svg
17
+ width={size}
18
+ height={size}
19
+ {...props}
20
+ viewBox="0 0 24 24"
21
+ fill="none"
22
+ stroke="currentColor"
23
+ strokeWidth="2"
24
+ strokeLinecap="round"
25
+ strokeLinejoin="round"
26
+ className={cn("animate-spin", className)}
27
+ >
28
+ <path d="M21 12a9 9 0 1 1-6.219-8.56" />
29
+ </svg>
30
+ )
31
+ }
32
+
33
+ export default LoadingSpinner
@@ -32,6 +32,7 @@ export default {
32
32
  spin: 'spin 1s linear infinite',
33
33
  ping: 'ping 1s cubic-bezier(0, 0, 0.2, 1) infinite',
34
34
  pulse: 'pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite',
35
+ reversepulse: 'pulse 2s cubic-bezier(1, 0.6, 0, 0.4) infinite',
35
36
  bounce: 'bounce 1s infinite',
36
37
  "accordion-down": "accordion-down 0.2s ease-out",
37
38
  "accordion-up": "accordion-up 0.2s ease-out",