@youversion/design-system-components 0.13.5 → 0.14.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.
- package/CHANGELOG.md +6 -0
- package/dist/LoadingSpinner/LoadingSpinner.d.ts +55 -0
- package/dist/LoadingSpinner/LoadingSpinner.d.ts.map +1 -0
- package/dist/LoadingSpinner/index.d.ts +2 -0
- package/dist/LoadingSpinner/index.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +187 -173
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import SpinnerIcon from '@youversion/design-system-icons/lib/Spinner';
|
|
2
|
+
type LoadingSpinnerProps = {
|
|
3
|
+
/** Accessibility label. Default `Loading…`. */
|
|
4
|
+
'aria-label'?: string;
|
|
5
|
+
/** Optional className. Should not conflict with `width, height, color` props. */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** The icon color (tailwind class). Default `text-gray-15`. */
|
|
8
|
+
color?: string;
|
|
9
|
+
/** Number of seconds for the animation to take. Default `0.9`. */
|
|
10
|
+
duration?: number;
|
|
11
|
+
/** Height of the container (tailwind classes). Default `h-full`. */
|
|
12
|
+
height?: string;
|
|
13
|
+
/** Any additionally permitted icon props. */
|
|
14
|
+
iconProps?: Omit<Parameters<typeof SpinnerIcon>[0], 'dur' | 'height' | 'width' | 'aria-label' | 'color'>;
|
|
15
|
+
/** The size of the icon. Defaults to the icon's base size. Default `40px`. */
|
|
16
|
+
iconSize?: string | number;
|
|
17
|
+
/** Width of the container (tailwind classes). Default `w-full`. */
|
|
18
|
+
width?: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Reusable animated version of the Loading icon.
|
|
22
|
+
*
|
|
23
|
+
* Accepts {@link LoadingSpinnerProps}.
|
|
24
|
+
*
|
|
25
|
+
* @returns Renders a spinning Loading icon in a box.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* Default usage.
|
|
29
|
+
* ```tsx
|
|
30
|
+
* import { LoadingSpinner } from '@youversion/design-system-components';
|
|
31
|
+
*
|
|
32
|
+
* function MyComponent() {
|
|
33
|
+
* return (
|
|
34
|
+
* <LoadingSpinner />
|
|
35
|
+
* );
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* Complex Tailwind width & height.
|
|
40
|
+
* ```tsx
|
|
41
|
+
* import { LoadingSpinner } from '@youversion/design-system-components';
|
|
42
|
+
*
|
|
43
|
+
* function MyComponent() {
|
|
44
|
+
* return (
|
|
45
|
+
* <LoadingSpinner
|
|
46
|
+
* width='w-full sm:w-8 md:w-12 md:dark:w-10'
|
|
47
|
+
* height='h-2 sm:h-8'
|
|
48
|
+
* />
|
|
49
|
+
* );
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare function LoadingSpinner({ 'aria-label': ariaLabel, duration, iconSize, className, color, height, width, iconProps, }: LoadingSpinnerProps): JSX.Element;
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=LoadingSpinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingSpinner.d.ts","sourceRoot":"","sources":["../../../src/LoadingSpinner/LoadingSpinner.tsx"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,6CAA6C,CAAC;AAKtE,KAAK,mBAAmB,GAAG;IACzB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,OAAO,CAAC,CAAC;IACzG,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EAAE,SAAsB,EACpC,QAAc,EACd,QAAiB,EACjB,SAAS,EACT,KAAsB,EACtB,MAAiB,EACjB,KAAgB,EAChB,SAAc,GACf,EAAE,mBAAmB,eAOrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/LoadingSpinner/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from './ListItem';
|
|
|
18
18
|
export * from './ListItemActions';
|
|
19
19
|
export * from './ListItemContent';
|
|
20
20
|
export * from './ListItemText';
|
|
21
|
+
export * from './LoadingSpinner';
|
|
21
22
|
export * from './Popover';
|
|
22
23
|
export * from './PopoverBody';
|
|
23
24
|
export * from './PopoverTrigger';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAA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