@fluentui-react-native/experimental-activity-indicator 0.3.25 → 0.5.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.
Files changed (62) hide show
  1. package/CHANGELOG.json +98 -1
  2. package/CHANGELOG.md +39 -2
  3. package/lib/ActivityIndicator.android.d.ts +4 -0
  4. package/lib/ActivityIndicator.android.d.ts.map +1 -0
  5. package/lib/ActivityIndicator.android.js +4 -0
  6. package/lib/ActivityIndicator.android.js.map +1 -0
  7. package/lib/ActivityIndicator.d.ts +3 -5
  8. package/lib/ActivityIndicator.d.ts.map +1 -1
  9. package/lib/ActivityIndicator.ios.d.ts +4 -0
  10. package/lib/ActivityIndicator.ios.d.ts.map +1 -0
  11. package/lib/ActivityIndicator.ios.js +4 -0
  12. package/lib/ActivityIndicator.ios.js.map +1 -0
  13. package/lib/ActivityIndicator.js +3 -90
  14. package/lib/ActivityIndicator.js.map +1 -1
  15. package/lib/ActivityIndicator.mobile.d.ts +6 -0
  16. package/lib/ActivityIndicator.mobile.d.ts.map +1 -0
  17. package/lib/ActivityIndicator.mobile.js +117 -0
  18. package/lib/ActivityIndicator.mobile.js.map +1 -0
  19. package/lib/ActivityIndicator.styling.d.ts +5 -2
  20. package/lib/ActivityIndicator.styling.d.ts.map +1 -1
  21. package/lib/ActivityIndicator.styling.js +45 -0
  22. package/lib/ActivityIndicator.styling.js.map +1 -1
  23. package/lib/ActivityIndicator.types.d.ts +17 -9
  24. package/lib/ActivityIndicator.types.d.ts.map +1 -1
  25. package/lib/CoreActivityIndicator.d.ts +8 -0
  26. package/lib/CoreActivityIndicator.d.ts.map +1 -0
  27. package/lib/CoreActivityIndicator.js +27 -0
  28. package/lib/CoreActivityIndicator.js.map +1 -0
  29. package/lib-commonjs/ActivityIndicator.android.d.ts +4 -0
  30. package/lib-commonjs/ActivityIndicator.android.d.ts.map +1 -0
  31. package/lib-commonjs/ActivityIndicator.android.js +7 -0
  32. package/lib-commonjs/ActivityIndicator.android.js.map +1 -0
  33. package/lib-commonjs/ActivityIndicator.d.ts +3 -5
  34. package/lib-commonjs/ActivityIndicator.d.ts.map +1 -1
  35. package/lib-commonjs/ActivityIndicator.ios.d.ts +4 -0
  36. package/lib-commonjs/ActivityIndicator.ios.d.ts.map +1 -0
  37. package/lib-commonjs/ActivityIndicator.ios.js +7 -0
  38. package/lib-commonjs/ActivityIndicator.ios.js.map +1 -0
  39. package/lib-commonjs/ActivityIndicator.js +4 -90
  40. package/lib-commonjs/ActivityIndicator.js.map +1 -1
  41. package/lib-commonjs/ActivityIndicator.mobile.d.ts +6 -0
  42. package/lib-commonjs/ActivityIndicator.mobile.d.ts.map +1 -0
  43. package/lib-commonjs/ActivityIndicator.mobile.js +119 -0
  44. package/lib-commonjs/ActivityIndicator.mobile.js.map +1 -0
  45. package/lib-commonjs/ActivityIndicator.styling.d.ts +5 -2
  46. package/lib-commonjs/ActivityIndicator.styling.d.ts.map +1 -1
  47. package/lib-commonjs/ActivityIndicator.styling.js +49 -0
  48. package/lib-commonjs/ActivityIndicator.styling.js.map +1 -1
  49. package/lib-commonjs/ActivityIndicator.types.d.ts +17 -9
  50. package/lib-commonjs/ActivityIndicator.types.d.ts.map +1 -1
  51. package/lib-commonjs/CoreActivityIndicator.d.ts +8 -0
  52. package/lib-commonjs/CoreActivityIndicator.d.ts.map +1 -0
  53. package/lib-commonjs/CoreActivityIndicator.js +29 -0
  54. package/lib-commonjs/CoreActivityIndicator.js.map +1 -0
  55. package/package.json +8 -7
  56. package/src/ActivityIndicator.android.tsx +3 -0
  57. package/src/ActivityIndicator.ios.tsx +3 -0
  58. package/src/ActivityIndicator.mobile.tsx +119 -0
  59. package/src/ActivityIndicator.styling.tsx +48 -3
  60. package/src/ActivityIndicator.tsx +3 -89
  61. package/src/ActivityIndicator.types.tsx +19 -10
  62. package/src/CoreActivityIndicator.tsx +22 -0
package/CHANGELOG.json CHANGED
@@ -2,7 +2,104 @@
2
2
  "name": "@fluentui-react-native/experimental-activity-indicator",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 01 Nov 2021 18:51:49 GMT",
5
+ "date": "Thu, 16 Dec 2021 06:26:41 GMT",
6
+ "tag": "@fluentui-react-native/experimental-activity-indicator_v0.5.0",
7
+ "version": "0.5.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "author": "sanajmi@microsoft.com",
12
+ "package": "@fluentui-react-native/experimental-activity-indicator",
13
+ "commit": "31eb26025ce32ef4c98b4af4bdc5495a6344fbac",
14
+ "comment": "Use Core ActivityIndicator as a fallback for FluentActivityIndicator"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui-react-native/experimental-activity-indicator",
19
+ "comment": "Bump @fluentui-react-native/framework to v0.7.1",
20
+ "commit": "841d2998e8b97fabe0b6dac9c74c3d63d2b3bbd4"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Wed, 17 Nov 2021 19:28:07 GMT",
27
+ "tag": "@fluentui-react-native/experimental-activity-indicator_v0.4.0",
28
+ "version": "0.4.0",
29
+ "comments": {
30
+ "minor": [
31
+ {
32
+ "comment": "Update to react-native 0.64",
33
+ "author": "afoxman@microsoft.com",
34
+ "commit": "f16d742b5c2d5b97e49ac1ef7b740cbf89fc42e6",
35
+ "package": "@fluentui-react-native/experimental-activity-indicator"
36
+ }
37
+ ],
38
+ "patch": [
39
+ {
40
+ "comment": "Bump @fluentui-react-native/framework to v0.7.0",
41
+ "author": "afoxman@microsoft.com",
42
+ "commit": "f16d742b5c2d5b97e49ac1ef7b740cbf89fc42e6",
43
+ "package": "@fluentui-react-native/experimental-activity-indicator"
44
+ }
45
+ ]
46
+ }
47
+ },
48
+ {
49
+ "date": "Fri, 12 Nov 2021 16:07:20 GMT",
50
+ "tag": "@fluentui-react-native/experimental-activity-indicator_v0.3.27",
51
+ "version": "0.3.27",
52
+ "comments": {
53
+ "patch": [
54
+ {
55
+ "comment": "Use the native driver for the animation",
56
+ "author": "sanajmi@microsoft.com",
57
+ "commit": "9df126ca41535e2c8c1eb72084690d38ac664cff",
58
+ "package": "@fluentui-react-native/experimental-activity-indicator"
59
+ }
60
+ ],
61
+ "none": [
62
+ {
63
+ "comment": "Bump @fluentui-react-native/framework to v0.6.6",
64
+ "author": "4123478+tido64@users.noreply.github.com",
65
+ "commit": "25673699e6c6c064b41f1246c2c995baa67a74ad",
66
+ "package": "@fluentui-react-native/experimental-activity-indicator"
67
+ }
68
+ ]
69
+ }
70
+ },
71
+ {
72
+ "date": "Thu, 11 Nov 2021 23:17:41 GMT",
73
+ "tag": "@fluentui-react-native/experimental-activity-indicator_v0.3.26",
74
+ "version": "0.3.26",
75
+ "comments": {
76
+ "none": [
77
+ {
78
+ "comment": "Rename uifabricshared/eslint-config-rules to fluentui-react-native/eslint-config-rules",
79
+ "author": "ruaraki@microsoft.com",
80
+ "commit": "110fba2a1721a914501404f6040f07656307549e",
81
+ "package": "@fluentui-react-native/experimental-activity-indicator"
82
+ }
83
+ ]
84
+ }
85
+ },
86
+ {
87
+ "date": "Tue, 09 Nov 2021 23:04:33 GMT",
88
+ "tag": "@fluentui-react-native/experimental-activity-indicator_v0.3.26",
89
+ "version": "0.3.26",
90
+ "comments": {
91
+ "patch": [
92
+ {
93
+ "comment": "Bump @fluentui-react-native/framework to v0.6.6",
94
+ "author": "67026167+chiuam@users.noreply.github.com",
95
+ "commit": "8baa72ed4ec06f90a51cf757e1924e946f76a537",
96
+ "package": "@fluentui-react-native/experimental-activity-indicator"
97
+ }
98
+ ]
99
+ }
100
+ },
101
+ {
102
+ "date": "Mon, 01 Nov 2021 18:53:37 GMT",
6
103
  "tag": "@fluentui-react-native/experimental-activity-indicator_v0.3.25",
7
104
  "version": "0.3.25",
8
105
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,49 @@
1
1
  # Change Log - @fluentui-react-native/experimental-activity-indicator
2
2
 
3
- This log was last generated on Mon, 01 Nov 2021 18:51:49 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 16 Dec 2021 06:26:41 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.5.0
8
+
9
+ Thu, 16 Dec 2021 06:26:41 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - Use Core ActivityIndicator as a fallback for FluentActivityIndicator (sanajmi@microsoft.com)
14
+ - Bump @fluentui-react-native/framework to v0.7.1
15
+
16
+ ## 0.4.0
17
+
18
+ Wed, 17 Nov 2021 19:28:07 GMT
19
+
20
+ ### Minor changes
21
+
22
+ - Update to react-native 0.64 (afoxman@microsoft.com)
23
+
24
+ ### Patches
25
+
26
+ - Bump @fluentui-react-native/framework to v0.7.0 (afoxman@microsoft.com)
27
+
28
+ ## 0.3.27
29
+
30
+ Fri, 12 Nov 2021 16:07:20 GMT
31
+
32
+ ### Patches
33
+
34
+ - Use the native driver for the animation (sanajmi@microsoft.com)
35
+
36
+ ## 0.3.26
37
+
38
+ Tue, 09 Nov 2021 23:04:33 GMT
39
+
40
+ ### Patches
41
+
42
+ - Bump @fluentui-react-native/framework to v0.6.6 (67026167+chiuam@users.noreply.github.com)
43
+
7
44
  ## 0.3.25
8
45
 
9
- Mon, 01 Nov 2021 18:51:49 GMT
46
+ Mon, 01 Nov 2021 18:53:37 GMT
10
47
 
11
48
  ### Patches
12
49
 
@@ -0,0 +1,4 @@
1
+ import { ActivityIndicator } from './ActivityIndicator.mobile';
2
+ export { ActivityIndicator } from './ActivityIndicator.mobile';
3
+ export default ActivityIndicator;
4
+ //# sourceMappingURL=ActivityIndicator.android.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActivityIndicator.android.d.ts","sourceRoot":"","sources":["../src/ActivityIndicator.android.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ActivityIndicator } from './ActivityIndicator.mobile';
2
+ export { ActivityIndicator } from './ActivityIndicator.mobile';
3
+ export default ActivityIndicator;
4
+ //# sourceMappingURL=ActivityIndicator.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActivityIndicator.android.js","sourceRoot":"","sources":["../src/ActivityIndicator.android.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,eAAe,iBAAiB,CAAC"}
@@ -1,6 +1,4 @@
1
- /// <reference types="react" />
2
- import { Animated } from 'react-native';
3
- import { ActivityIndicatorProps } from './ActivityIndicator.types';
4
- export declare const AnimatedSvg: Animated.AnimatedComponent<import("react").ComponentClass<import("react-native-svg").SvgProps, any>>;
5
- export declare const ActivityIndicator: import("@fluentui-react-native/composition").ComposeFactoryComponent<ActivityIndicatorProps, import("./ActivityIndicator.types").ActivityIndicatorSlotProps, import("./ActivityIndicator.types").ActivityIndicatorTokens, import("@fluentui-react-native/framework").Theme, object>;
1
+ import { ActivityIndicator } from './CoreActivityIndicator';
2
+ export { ActivityIndicator } from './CoreActivityIndicator';
3
+ export default ActivityIndicator;
6
4
  //# sourceMappingURL=ActivityIndicator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityIndicator.d.ts","sourceRoot":"","sources":["../src/ActivityIndicator.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAgB,MAAM,cAAc,CAAC;AAGtD,OAAO,EAAyB,sBAAsB,EAAyB,MAAM,2BAA2B,CAAC;AAcjH,eAAO,MAAM,WAAW,sGAAwC,CAAC;AAEjE,eAAO,MAAM,iBAAiB,qRAmE5B,CAAC"}
1
+ {"version":3,"file":"ActivityIndicator.d.ts","sourceRoot":"","sources":["../src/ActivityIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ActivityIndicator } from './ActivityIndicator.mobile';
2
+ export { ActivityIndicator } from './ActivityIndicator.mobile';
3
+ export default ActivityIndicator;
4
+ //# sourceMappingURL=ActivityIndicator.ios.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActivityIndicator.ios.d.ts","sourceRoot":"","sources":["../src/ActivityIndicator.ios.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ActivityIndicator } from './ActivityIndicator.mobile';
2
+ export { ActivityIndicator } from './ActivityIndicator.mobile';
3
+ export default ActivityIndicator;
4
+ //# sourceMappingURL=ActivityIndicator.ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActivityIndicator.ios.js","sourceRoot":"","sources":["../src/ActivityIndicator.ios.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,eAAe,iBAAiB,CAAC"}
@@ -1,91 +1,4 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- /** @jsx withSlots */
24
- import { useRef, useEffect } from 'react';
25
- import { Animated, Easing, View } from 'react-native';
26
- import { Svg, Path } from 'react-native-svg';
27
- import { compose, mergeProps, withSlots, buildUseStyling } from '@fluentui-react-native/framework';
28
- import { activityIndicatorName } from './ActivityIndicator.types';
29
- import { diameterSizeMap, lineThicknessSizeMap, stylingSettings } from './ActivityIndicator.styling';
30
- var getActivityIndicatorPath = function (diameter, width, color) {
31
- var start = {
32
- x: width / 2,
33
- y: diameter / 2,
34
- };
35
- var innerRadius = diameter / 2 - width / 2;
36
- var path = "M" + start.x + " " + start.y + " a" + innerRadius + " " + innerRadius + " 0 1 1 " + innerRadius + " " + innerRadius;
37
- return withSlots(Path, { d: path, stroke: color, strokeWidth: width, strokeLinecap: "round" });
38
- };
39
- export var AnimatedSvg = Animated.createAnimatedComponent(Svg);
40
- var useStyling = buildUseStyling(stylingSettings);
41
- export var ActivityIndicator = compose(__assign(__assign({ displayName: activityIndicatorName }, stylingSettings), { slots: {
42
- root: View,
43
- svg: AnimatedSvg,
44
- }, render: function (props, useSlots) {
45
- var Slots = useSlots(props);
46
- var slotProps = useStyling(props);
47
- var animating = props.animating != undefined ? props.animating : true;
48
- var hidesWhenStopped = props.hidesWhenStopped != undefined ? props.hidesWhenStopped : true;
49
- // React Native ActivityIndicator still takes up space when hidden, so to perfectly match would use opacity
50
- // hiding opacity makes the screen reader on iOS and Android skip over it
51
- var hideOpacity = animating == false && hidesWhenStopped == true ? 0 : 1;
52
- var spinAnimation = useRef(new Animated.Value(0)).current;
53
- useEffect(function () {
54
- if (animating) {
55
- Animated.loop(Animated.sequence([
56
- Animated.timing(spinAnimation, {
57
- toValue: 359,
58
- duration: 750,
59
- useNativeDriver: false,
60
- easing: Easing.linear,
61
- }),
62
- ])).start();
63
- }
64
- else {
65
- spinAnimation.stopAnimation();
66
- }
67
- });
68
- var interpolateSpin = spinAnimation.interpolate({
69
- inputRange: [0, 359],
70
- outputRange: ['0deg', '359deg'],
71
- });
72
- var path = getActivityIndicatorPath(diameterSizeMap[slotProps.root.size], lineThicknessSizeMap[slotProps.root.lineThickness], slotProps.root.activityIndicatorColor);
73
- // perspective is needed for animations to work on Android. See https://reactnative.dev/docs/animations#bear-in-mind
74
- var animatedSvgProps = {
75
- style: {
76
- transform: [{ rotateZ: interpolateSpin }, { perspective: 10 }],
77
- },
78
- };
79
- var otherRootProps = {
80
- style: {
81
- opacity: hideOpacity,
82
- },
83
- accessibilityState: { busy: animating },
84
- };
85
- return function (rest) {
86
- var mergedProps = __rest(mergeProps(props, rest, otherRootProps), []);
87
- return (withSlots(Slots.root, __assign({}, mergedProps),
88
- withSlots(Slots.svg, __assign({}, animatedSvgProps), path)));
89
- };
90
- } }));
1
+ import { ActivityIndicator } from './CoreActivityIndicator';
2
+ export { ActivityIndicator } from './CoreActivityIndicator';
3
+ export default ActivityIndicator;
91
4
  //# sourceMappingURL=ActivityIndicator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityIndicator.js","sourceRoot":"","sources":["../src/ActivityIndicator.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAqB;AACrB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAY,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAC7G,OAAO,EAAE,qBAAqB,EAAiD,MAAM,2BAA2B,CAAC;AAC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ACF,CAAC;QAEF,IAAM,cAAc,GAAG;YACrB,KAAK,EAAE;gBACL,OAAO,EAAE,WAAW;aACrB;YACD,kBAAkB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;SACxC,CAAC;QACF,OAAO,UAAC,IAA4B;YAClC,IAAQ,iEAA0D,CAAC;YACnE,OAAO,CACL,UAAC,KAAK,CAAC,IAAI,eAAK,WAAW;gBACzB,UAAC,KAAK,CAAC,GAAG,eAAK,gBAAgB,GAAG,IAAI,CAAa,CACxC,CACd,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC,IACD,CAAC"}
1
+ {"version":3,"file":"ActivityIndicator.js","sourceRoot":"","sources":["../src/ActivityIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { Animated } from 'react-native';
3
+ import { ActivityIndicatorProps } from './ActivityIndicator.types';
4
+ export declare const AnimatedSvg: Animated.AnimatedComponent<import("react").ComponentClass<import("react-native-svg").SvgProps, any>>;
5
+ export declare const ActivityIndicator: import("@fluentui-react-native/composition").ComposeFactoryComponent<ActivityIndicatorProps, import("./ActivityIndicator.types").FluentActivityIndicatorSlotProps, import("./ActivityIndicator.types").ActivityIndicatorTokens, import("@fluentui-react-native/framework").Theme, object>;
6
+ //# sourceMappingURL=ActivityIndicator.mobile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActivityIndicator.mobile.d.ts","sourceRoot":"","sources":["../src/ActivityIndicator.mobile.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAgB,MAAM,cAAc,CAAC;AAGtD,OAAO,EAAyB,sBAAsB,EAA+B,MAAM,2BAA2B,CAAC;AAcvH,eAAO,MAAM,WAAW,sGAAwC,CAAC;AAEjE,eAAO,MAAM,iBAAiB,2RAiG5B,CAAC"}
@@ -0,0 +1,117 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ /** @jsx withSlots */
24
+ import { useRef, useEffect, useCallback } from 'react';
25
+ import { Animated, Easing, View } from 'react-native';
26
+ import { Svg, Path } from 'react-native-svg';
27
+ import { compose, mergeProps, withSlots, buildUseStyling } from '@fluentui-react-native/framework';
28
+ import { activityIndicatorName } from './ActivityIndicator.types';
29
+ import { diameterSizeMap, lineThicknessSizeMap, stylingSettings } from './ActivityIndicator.styling';
30
+ var getActivityIndicatorPath = function (diameter, width, color) {
31
+ var start = {
32
+ x: width / 2,
33
+ y: diameter / 2,
34
+ };
35
+ var innerRadius = diameter / 2 - width / 2;
36
+ var path = "M" + start.x + " " + start.y + " a" + innerRadius + " " + innerRadius + " 0 1 1 " + innerRadius + " " + innerRadius;
37
+ return withSlots(Path, { d: path, stroke: color, strokeWidth: width, strokeLinecap: "round" });
38
+ };
39
+ export var AnimatedSvg = Animated.createAnimatedComponent(Svg);
40
+ var useStyling = buildUseStyling(stylingSettings);
41
+ export var ActivityIndicator = compose(__assign(__assign({ displayName: activityIndicatorName }, stylingSettings), { slots: {
42
+ root: View,
43
+ svg: AnimatedSvg,
44
+ }, render: function (props, useSlots) {
45
+ var Slots = useSlots(props);
46
+ var slotProps = useStyling(props);
47
+ var animating = props.animating != undefined ? props.animating : true;
48
+ var hidesWhenStopped = props.hidesWhenStopped != undefined ? props.hidesWhenStopped : true;
49
+ // React Native ActivityIndicator still takes up space when hidden, so to perfectly match would use opacity
50
+ // hiding opacity makes the screen reader on iOS and Android skip over it
51
+ var hideOpacity = animating == false && hidesWhenStopped == true ? 0 : 1;
52
+ var rotationAngle = useRef(new Animated.Value(0)).current;
53
+ var rotationAnimation = useRef(undefined);
54
+ /**
55
+ * https://github.com/facebook/react-native/pull/29585
56
+ * For Animated.loop() to work with the native driver, React Native needs this fix.
57
+ * It's only available in React Native 0.66+, and React Native macOS 0.62+
58
+ * To workaround this, let's just rerun the loop everytime the animation finishes
59
+ */
60
+ var startRotation = useCallback(function () {
61
+ if (rotationAnimation.current) {
62
+ rotationAngle.setValue(0);
63
+ rotationAnimation.current.reset();
64
+ rotationAnimation.current.start(function (result) {
65
+ if (result.finished) {
66
+ startRotation();
67
+ }
68
+ });
69
+ }
70
+ }, [rotationAngle, animating]);
71
+ var stopRotation = function () {
72
+ if (rotationAnimation.current) {
73
+ rotationAnimation.current.stop();
74
+ }
75
+ };
76
+ useEffect(function () {
77
+ if (rotationAnimation.current === undefined) {
78
+ rotationAnimation.current = Animated.sequence([
79
+ Animated.timing(rotationAngle, {
80
+ toValue: 359,
81
+ duration: 750,
82
+ useNativeDriver: true,
83
+ easing: Easing.linear,
84
+ }),
85
+ ]);
86
+ }
87
+ if (animating) {
88
+ startRotation();
89
+ }
90
+ else {
91
+ stopRotation();
92
+ }
93
+ }, [animating, hidesWhenStopped, rotationAngle]);
94
+ var interpolateSpin = rotationAngle.interpolate({
95
+ inputRange: [0, 359],
96
+ outputRange: ['0deg', '359deg'],
97
+ });
98
+ var path = getActivityIndicatorPath(diameterSizeMap[slotProps.root.size], lineThicknessSizeMap[slotProps.root.lineThickness], slotProps.root.activityIndicatorColor);
99
+ // perspective is needed for animations to work on Android. See https://reactnative.dev/docs/animations#bear-in-mind
100
+ var animatedSvgProps = {
101
+ style: {
102
+ transform: [{ rotateZ: interpolateSpin }, { perspective: 10 }],
103
+ },
104
+ };
105
+ var otherRootProps = {
106
+ style: {
107
+ opacity: hideOpacity,
108
+ },
109
+ accessibilityState: { busy: animating },
110
+ };
111
+ return function (rest) {
112
+ var mergedProps = __rest(mergeProps(props, rest, otherRootProps), []);
113
+ return (withSlots(Slots.root, __assign({}, mergedProps),
114
+ withSlots(Slots.svg, __assign({}, animatedSvgProps), path)));
115
+ };
116
+ } }));
117
+ //# sourceMappingURL=ActivityIndicator.mobile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActivityIndicator.mobile.js","sourceRoot":"","sources":["../src/ActivityIndicator.mobile.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAqB;AACrB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAY,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAC7G,OAAO,EAAE,qBAAqB,EAAuD,MAAM,2BAA2B,CAAC;AACvH,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAErG,IAAM,wBAAwB,GAAG,UAAC,QAAgB,EAAE,KAAa,EAAE,KAAa;IAC9E,IAAM,KAAK,GAAG;QACZ,CAAC,EAAE,KAAK,GAAG,CAAC;QACZ,CAAC,EAAE,QAAQ,GAAG,CAAC;KAChB,CAAC;IACF,IAAM,WAAW,GAAG,QAAQ,GAA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CAAC;YACpB,WAAW,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;SAChC,CAAC,CAAC;QAEH,IAAM,IAAI,GAAG,wBAAwB,CACnC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EACpC,oBAAoB,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,EAClD,SAAS,CAAC,IAAI,CAAC,sBAAsB,CACtC,CAAC;QAEF,oHAAoH;QACpH,IAAM,gBAAgB,GAAG;YACvB,KAAK,EAAE;gBACL,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC;aAC/D;SACF,CAAC;QAEF,IAAM,cAAc,GAAG;YACrB,KAAK,EAAE;gBACL,OAAO,EAAE,WAAW;aACrB;YACD,kBAAkB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;SACxC,CAAC;QACF,OAAO,UAAC,IAA4B;YAClC,IAAQ,iEAA0D,CAAC;YACnE,OAAO,CACL,UAAC,KAAK,CAAC,IAAI,eAAK,WAAW;gBACzB,UAAC,KAAK,CAAC,GAAG,eAAK,gBAAgB,GAAG,IAAI,CAAa,CACxC,CACd,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC,IACD,CAAC"}
@@ -1,10 +1,13 @@
1
1
  import { UseStylingOptions } from '@fluentui-react-native/framework';
2
- import { ActivityIndicatorProps, ActivityIndicatorSlotProps, ActivityIndicatorTokens } from './ActivityIndicator.types';
2
+ import { ActivityIndicatorProps as CoreActivityIndicatorProps } from 'react-native';
3
+ import { ActivityIndicatorProps, FluentActivityIndicatorSlotProps, ActivityIndicatorTokens, CoreActivityIndicatorSlotProps, ActivityIndicatorSize } from './ActivityIndicator.types';
3
4
  export declare const diameterSizeMap: {
4
5
  [key: string]: number;
5
6
  };
6
7
  export declare const lineThicknessSizeMap: {
7
8
  [key: string]: number;
8
9
  };
9
- export declare const stylingSettings: UseStylingOptions<ActivityIndicatorProps, ActivityIndicatorSlotProps, ActivityIndicatorTokens>;
10
+ export declare function coreSizeFromFluentSize(fluentSize: ActivityIndicatorSize): CoreActivityIndicatorProps['size'];
11
+ export declare const stylingSettings: UseStylingOptions<ActivityIndicatorProps, FluentActivityIndicatorSlotProps, ActivityIndicatorTokens>;
12
+ export declare const coreStylingSettings: UseStylingOptions<ActivityIndicatorProps, CoreActivityIndicatorSlotProps, ActivityIndicatorTokens>;
10
13
  //# sourceMappingURL=ActivityIndicator.styling.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityIndicator.styling.d.ts","sourceRoot":"","sources":["../src/ActivityIndicator.styling.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAc,MAAM,kCAAkC,CAAC;AAEjF,OAAO,EAEL,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AAEnC,eAAO,MAAM,eAAe,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAMpD,CAAC;AACF,eAAO,MAAM,oBAAoB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAMzD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,sBAAsB,EAAE,0BAA0B,EAAE,uBAAuB,CAiC1H,CAAC"}
1
+ {"version":3,"file":"ActivityIndicator.styling.d.ts","sourceRoot":"","sources":["../src/ActivityIndicator.styling.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAc,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,sBAAsB,IAAI,0BAA0B,EAAc,MAAM,cAAc,CAAC;AAChG,OAAO,EAEL,sBAAsB,EACtB,gCAAgC,EAChC,uBAAuB,EACvB,8BAA8B,EAC9B,qBAAqB,EACtB,MAAM,2BAA2B,CAAC;AAGnC,eAAO,MAAM,eAAe,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAMpD,CAAC;AACF,eAAO,MAAM,oBAAoB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAMzD,CAAC;AAGF,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,qBAAqB,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAmB5G;AAED,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,sBAAsB,EAAE,gCAAgC,EAAE,uBAAuB,CAiChI,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,iBAAiB,CAAC,sBAAsB,EAAE,8BAA8B,EAAE,uBAAuB,CAiBlI,CAAC"}
@@ -1,6 +1,18 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  import { buildProps } from '@fluentui-react-native/framework';
2
13
  import { Appearance } from 'react-native';
3
14
  import { activityIndicatorName, } from './ActivityIndicator.types';
15
+ import assertNever from 'assert-never';
4
16
  export var diameterSizeMap = {
5
17
  xSmall: 12,
6
18
  small: 16,
@@ -15,6 +27,26 @@ export var lineThicknessSizeMap = {
15
27
  large: 3,
16
28
  xLarge: 4,
17
29
  };
30
+ // Size coversion ramp from the Fluent ActivityIndicator size to the RN ActivityIndicator.
31
+ export function coreSizeFromFluentSize(fluentSize) {
32
+ if (typeof fluentSize === 'undefined') {
33
+ return fluentSize;
34
+ }
35
+ switch (fluentSize) {
36
+ case 'xSmall':
37
+ return 'small';
38
+ case 'small':
39
+ return 'small';
40
+ case 'medium':
41
+ return 'small';
42
+ case 'large':
43
+ return 'large';
44
+ case 'xLarge':
45
+ return 'large';
46
+ default:
47
+ assertNever(fluentSize);
48
+ }
49
+ }
18
50
  export var stylingSettings = {
19
51
  tokens: [
20
52
  function () { return ({
@@ -43,4 +75,17 @@ export var stylingSettings = {
43
75
  }); }, ['size']),
44
76
  },
45
77
  };
78
+ // Minimal styling settings for the RN Core ActivityIndicator
79
+ export var coreStylingSettings = {
80
+ tokens: [
81
+ function () { return ({
82
+ size: 'small',
83
+ }); },
84
+ activityIndicatorName,
85
+ ],
86
+ tokensThatAreAlsoProps: 'all',
87
+ slotProps: {
88
+ root: buildProps(function (tokens) { return (__assign({ color: tokens.activityIndicatorColor }, (tokens.size && { size: coreSizeFromFluentSize(tokens.size) }))); }, ['activityIndicatorColor', 'size']),
89
+ },
90
+ };
46
91
  //# sourceMappingURL=ActivityIndicator.styling.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityIndicator.styling.js","sourceRoot":"","sources":["../src/ActivityIndicator.styling.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EACL,qBAAqB,GAItB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,CAAC,IAAM,eAAe,GAA8B;IACxD,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;CACX,CAAC;AACF,MAAM,CAAC,IAAM,oBAAoB,GAA8B;IAC7D,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;CACV,CAAC;AAEF,MAAM,CAAC,IAAM,eAAe,GAAmG;IAC7H,MAAM,EAAE;QACN,cAAM,OAAA,CAAC;YACL,sBAAsB,EAAE,UAAU,CAAC,cAAc,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;YACvF,aAAa,EAAE,QAAQ;YACvB,IAAI,EAAE,QAAQ;SACf,CAAC,EAJI,CAIJ;QACF,qBAAqB;KACtB;IACD,sBAAsB,EAAE,KAAK;IAC7B,SAAS,EAAE;QACT,IAAI,EAAE,UAAU,CACd,UAAC,MAA+B,IAAK,OAAA,CAAC;YACpC,sBAAsB,EAAE,MAAM,CAAC,sBAAsB;YACrD,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,aAAa,EAAE,MAAM,CAAC,aAAa,IAAI,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI;YACpF,kBAAkB,EAAE,aAAa;YACjC,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE;gBACL,KAAK,EAAE,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC;gBACnC,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC;aACrC;SACF,CAAC,EAVmC,CAUnC,EACF,CAAC,wBAAwB,EAAE,eAAe,EAAE,MAAM,CAAC,CACpD;QACD,GAAG,EAAE,UAAU,CACb,UAAC,MAA+B,IAAK,OAAA,CAAC;YACpC,KAAK,EAAE,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC;YACnC,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC;SACrC,CAAC,EAHmC,CAGnC,EACF,CAAC,MAAM,CAAC,CACT;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"ActivityIndicator.styling.js","sourceRoot":"","sources":["../src/ActivityIndicator.styling.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAqB,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAwD,UAAU,EAAE,MAAM,cAAc,CAAC;AAChG,OAAO,EACL,qBAAqB,GAMtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,WAAW,MAAM,cAAc,CAAC;AAEvC,MAAM,CAAC,IAAM,eAAe,GAA8B;IACxD,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,EAAE;IACT,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AI;YACpF,kBAAkB,EAAE,aAAa;YACjC,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE;gBACL,KAAK,EAAE,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC;gBACnC,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC;aACrC;SACF,CAAC,EAVmC,CAUnC,EACF,CAAC,wBAAwB,EAAE,eAAe,EAAE,MAAM,CAAC,CACpD;QACD,GAAG,EAAE,UAAU,CACb,UAAC,MAA+B,IAAK,OAAA,CAAC;YACpC,KAAK,EAAE,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC;YACnC,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC;SACrC,CAAC,EAHmC,CAGnC,EACF,CAAC,MAAM,CAAC,CACT;KACF;CACF,CAAC;AAEF,6DAA6D;AAC7D,MAAM,CAAC,IAAM,mBAAmB,GAAuG;IACrI,MAAM,EAAE;QACN,cAAM,OAAA,CAAC;YACL,IAAI,EAAE,OAAO;SACd,CAAC,EAFI,CAEJ;QACF,qBAAqB;KACtB;IACD,sBAAsB,EAAE,KAAK;IAC7B,SAAS,EAAE;QACT,IAAI,EAAE,UAAU,CACd,UAAC,MAA+B,IAAK,OAAA,YACnC,KAAK,EAAE,MAAM,CAAC,sBAAsB,IACjC,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EACjE,EAHmC,CAGnC,EACF,CAAC,wBAAwB,EAAE,MAAM,CAAC,CACnC;KACF;CACF,CAAC"}
@@ -1,8 +1,8 @@
1
- import { Animated, ViewProps } from 'react-native';
1
+ import { Animated, ActivityIndicatorProps as CoreActivityIndicatorProps } from 'react-native';
2
2
  import { SvgProps } from 'react-native-svg';
3
3
  export declare const activityIndicatorName = "ActivityIndicator";
4
4
  /**
5
- * Specifies the possible sizes of the ActivityIndicator
5
+ * Specifies the possible sizes of the ActivityIndicator.
6
6
  */
7
7
  export declare type ActivityIndicatorSize = 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge';
8
8
  export interface ActivityIndicatorTokens {
@@ -22,11 +22,7 @@ export interface ActivityIndicatorTokens {
22
22
  */
23
23
  size?: ActivityIndicatorSize;
24
24
  }
25
- export interface ActivityIndicatorSlotProps {
26
- root: ViewProps & ActivityIndicatorTokens;
27
- svg: Animated.AnimatedProps<SvgProps>;
28
- }
29
- export interface ActivityIndicatorProps extends ActivityIndicatorTokens, ViewProps {
25
+ export interface ActivityIndicatorProps extends ActivityIndicatorTokens, Omit<CoreActivityIndicatorProps, 'size'> {
30
26
  /**
31
27
  * ActivityIndicator animating or not
32
28
  * @defaultValue 'true'
@@ -38,9 +34,21 @@ export interface ActivityIndicatorProps extends ActivityIndicatorTokens, ViewPro
38
34
  */
39
35
  hidesWhenStopped?: boolean;
40
36
  }
41
- export interface ActivityIndicatorType {
37
+ export interface FluentActivityIndicatorSlotProps {
38
+ root: ActivityIndicatorProps;
39
+ svg: Animated.AnimatedProps<SvgProps>;
40
+ }
41
+ export interface FluentActivityIndicatorType {
42
+ props: ActivityIndicatorProps;
43
+ slotProps: FluentActivityIndicatorSlotProps;
44
+ tokens: ActivityIndicatorTokens;
45
+ }
46
+ export interface CoreActivityIndicatorSlotProps {
47
+ root: CoreActivityIndicatorProps;
48
+ }
49
+ export interface CoreActivityIndicatorType {
42
50
  props: ActivityIndicatorProps;
43
- slotProps: ActivityIndicatorSlotProps;
51
+ slotProps: CoreActivityIndicatorSlotProps;
44
52
  tokens: ActivityIndicatorTokens;
45
53
  }
46
54
  //# sourceMappingURL=ActivityIndicator.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityIndicator.types.d.ts","sourceRoot":"","sources":["../src/ActivityIndicator.types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAA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H,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC;;;OAGG;IACH,IAAI,CAAC,EAAE,qBAAqB,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAuB,SAAQ,uBAAuB,EAAE,IAAI,CAAC,0BAA0B,EAAE,MAAM,CAAC;IAC/G;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE,sBAAsB,CAAC;IAC7B,GAAG,EAAE,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;CACvC;AACD,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,sBAAsB,CAAC;IAC9B,SAAS,EAAE,gCAAgC,CAAC;IAC5C,MAAM,EAAE,uBAAuB,CAAC;CACjC;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,0BAA0B,CAAC;CAClC;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,sBAAsB,CAAC;IAC9B,SAAS,EAAE,8BAA8B,CAAC;IAC1C,MAAM,EAAE,uBAAuB,CAAC;CACjC"}
@@ -0,0 +1,8 @@
1
+ /** @jsx withSlots */
2
+ import { ActivityIndicatorProps } from './ActivityIndicator.types';
3
+ /**
4
+ * Wrapper around React Native Core's ActivityIndicator for platforms we do not
5
+ * have a custom FluentUI React Native ActivityIndicator defined.
6
+ */
7
+ export declare const ActivityIndicator: import("@fluentui-react-native/composition").ComposeFactoryComponent<ActivityIndicatorProps, import("./ActivityIndicator.types").CoreActivityIndicatorSlotProps, import("./ActivityIndicator.types").ActivityIndicatorTokens, import("@fluentui-react-native/framework").Theme, object>;
8
+ //# sourceMappingURL=CoreActivityIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CoreActivityIndicator.d.ts","sourceRoot":"","sources":["../src/CoreActivityIndicator.tsx"],"names":[],"mappings":"AAAA,qBAAqB;AAGrB,OAAO,EAAoD,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAIrH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,yRAU5B,CAAC"}