@fluentui-react-native/experimental-activity-indicator 0.11.0 → 0.11.3

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 (38) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/lib/ActivityIndicator.android.d.ts +1 -1
  3. package/lib/ActivityIndicator.android.js +1 -1
  4. package/lib/ActivityIndicator.d.ts +1 -1
  5. package/lib/ActivityIndicator.ios.d.ts +1 -1
  6. package/lib/ActivityIndicator.ios.js +1 -1
  7. package/lib/ActivityIndicator.js +1 -1
  8. package/lib/ActivityIndicator.mobile.d.ts +2 -7
  9. package/lib/ActivityIndicator.mobile.js +86 -89
  10. package/lib/ActivityIndicator.mobile.js.map +1 -1
  11. package/lib/ActivityIndicator.styling.d.ts +5 -15
  12. package/lib/ActivityIndicator.styling.js +67 -76
  13. package/lib/ActivityIndicator.types.d.ts +36 -36
  14. package/lib/ActivityIndicator.types.js +1 -1
  15. package/lib/CoreActivityIndicator.d.ts +2 -7
  16. package/lib/CoreActivityIndicator.js +11 -11
  17. package/lib/index.d.ts +1 -1
  18. package/lib/index.js +1 -1
  19. package/lib-commonjs/ActivityIndicator.android.d.ts +1 -1
  20. package/lib-commonjs/ActivityIndicator.android.js +6 -11
  21. package/lib-commonjs/ActivityIndicator.d.ts +1 -1
  22. package/lib-commonjs/ActivityIndicator.ios.d.ts +1 -1
  23. package/lib-commonjs/ActivityIndicator.ios.js +6 -11
  24. package/lib-commonjs/ActivityIndicator.js +6 -11
  25. package/lib-commonjs/ActivityIndicator.mobile.d.ts +2 -7
  26. package/lib-commonjs/ActivityIndicator.mobile.js +94 -106
  27. package/lib-commonjs/ActivityIndicator.mobile.js.map +1 -1
  28. package/lib-commonjs/ActivityIndicator.styling.d.ts +5 -15
  29. package/lib-commonjs/ActivityIndicator.styling.js +76 -87
  30. package/lib-commonjs/ActivityIndicator.types.d.ts +36 -36
  31. package/lib-commonjs/ActivityIndicator.types.js +3 -3
  32. package/lib-commonjs/CoreActivityIndicator.d.ts +2 -7
  33. package/lib-commonjs/CoreActivityIndicator.js +17 -17
  34. package/lib-commonjs/index.d.ts +1 -1
  35. package/lib-commonjs/index.js +5 -10
  36. package/package.json +21 -20
  37. package/src/ActivityIndicator.mobile.tsx +2 -2
  38. package/eslint.config.js +0 -3
@@ -1,4 +1,4 @@
1
1
  import { ActivityIndicator } from './ActivityIndicator.mobile';
2
2
  export { ActivityIndicator } from './ActivityIndicator.mobile';
3
3
  export default ActivityIndicator;
4
- //# sourceMappingURL=ActivityIndicator.android.d.ts.map
4
+ //# sourceMappingURL=ActivityIndicator.android.d.ts.map
@@ -1,13 +1,8 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActivityIndicator = void 0;
4
- const ActivityIndicator_mobile_1 = require('./ActivityIndicator.mobile');
5
- const ActivityIndicator_mobile_2 = require('./ActivityIndicator.mobile');
6
- Object.defineProperty(exports, 'ActivityIndicator', {
7
- enumerable: true,
8
- get: function () {
9
- return ActivityIndicator_mobile_2.ActivityIndicator;
10
- },
11
- });
4
+ const ActivityIndicator_mobile_1 = require("./ActivityIndicator.mobile");
5
+ const ActivityIndicator_mobile_2 = require("./ActivityIndicator.mobile");
6
+ Object.defineProperty(exports, "ActivityIndicator", { enumerable: true, get: function () { return ActivityIndicator_mobile_2.ActivityIndicator; } });
12
7
  exports.default = ActivityIndicator_mobile_1.ActivityIndicator;
13
- //# sourceMappingURL=ActivityIndicator.android.js.map
8
+ //# sourceMappingURL=ActivityIndicator.android.js.map
@@ -1,4 +1,4 @@
1
1
  import { ActivityIndicator } from './CoreActivityIndicator';
2
2
  export { ActivityIndicator } from './CoreActivityIndicator';
3
3
  export default ActivityIndicator;
4
- //# sourceMappingURL=ActivityIndicator.d.ts.map
4
+ //# sourceMappingURL=ActivityIndicator.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { ActivityIndicator } from './ActivityIndicator.mobile';
2
2
  export { ActivityIndicator } from './ActivityIndicator.mobile';
3
3
  export default ActivityIndicator;
4
- //# sourceMappingURL=ActivityIndicator.ios.d.ts.map
4
+ //# sourceMappingURL=ActivityIndicator.ios.d.ts.map
@@ -1,13 +1,8 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActivityIndicator = void 0;
4
- const ActivityIndicator_mobile_1 = require('./ActivityIndicator.mobile');
5
- const ActivityIndicator_mobile_2 = require('./ActivityIndicator.mobile');
6
- Object.defineProperty(exports, 'ActivityIndicator', {
7
- enumerable: true,
8
- get: function () {
9
- return ActivityIndicator_mobile_2.ActivityIndicator;
10
- },
11
- });
4
+ const ActivityIndicator_mobile_1 = require("./ActivityIndicator.mobile");
5
+ const ActivityIndicator_mobile_2 = require("./ActivityIndicator.mobile");
6
+ Object.defineProperty(exports, "ActivityIndicator", { enumerable: true, get: function () { return ActivityIndicator_mobile_2.ActivityIndicator; } });
12
7
  exports.default = ActivityIndicator_mobile_1.ActivityIndicator;
13
- //# sourceMappingURL=ActivityIndicator.ios.js.map
8
+ //# sourceMappingURL=ActivityIndicator.ios.js.map
@@ -1,13 +1,8 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActivityIndicator = void 0;
4
- const CoreActivityIndicator_1 = require('./CoreActivityIndicator');
5
- const CoreActivityIndicator_2 = require('./CoreActivityIndicator');
6
- Object.defineProperty(exports, 'ActivityIndicator', {
7
- enumerable: true,
8
- get: function () {
9
- return CoreActivityIndicator_2.ActivityIndicator;
10
- },
11
- });
4
+ const CoreActivityIndicator_1 = require("./CoreActivityIndicator");
5
+ const CoreActivityIndicator_2 = require("./CoreActivityIndicator");
6
+ Object.defineProperty(exports, "ActivityIndicator", { enumerable: true, get: function () { return CoreActivityIndicator_2.ActivityIndicator; } });
12
7
  exports.default = CoreActivityIndicator_1.ActivityIndicator;
13
- //# sourceMappingURL=ActivityIndicator.js.map
8
+ //# sourceMappingURL=ActivityIndicator.js.map
@@ -2,10 +2,5 @@ import { Animated } from 'react-native';
2
2
  import { Svg } from 'react-native-svg';
3
3
  import type { ActivityIndicatorProps } from './ActivityIndicator.types';
4
4
  export declare const AnimatedSvg: Animated.AnimatedComponent<typeof Svg>;
5
- export declare const ActivityIndicator: import('@fluentui-react-native/framework').ComposableComponent<
6
- ActivityIndicatorProps,
7
- import('./ActivityIndicator.types').FluentActivityIndicatorSlotProps,
8
- import('./ActivityIndicator.types').ActivityIndicatorTokens,
9
- import('@fluentui-react-native/framework').ObjectBase
10
- >;
11
- //# sourceMappingURL=ActivityIndicator.mobile.d.ts.map
5
+ export declare const ActivityIndicator: import("@fluentui-react-native/framework").ComposableComponent<ActivityIndicatorProps, import("./ActivityIndicator.types").FluentActivityIndicatorSlotProps, import("./ActivityIndicator.types").ActivityIndicatorTokens, import("@fluentui-react-native/framework").ObjectBase>;
6
+ //# sourceMappingURL=ActivityIndicator.mobile.d.ts.map
@@ -1,115 +1,103 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActivityIndicator = exports.AnimatedSvg = void 0;
4
- const jsx_runtime_1 = require('@fluentui-react-native/framework-base/jsx-runtime');
4
+ const jsx_runtime_1 = require("@fluentui-react-native/framework-base/jsx-runtime");
5
5
  /** @jsxImportSource @fluentui-react-native/framework-base */
6
- const react_1 = require('react');
7
- const react_native_1 = require('react-native');
8
- const framework_1 = require('@fluentui-react-native/framework');
9
- const react_native_svg_1 = require('react-native-svg');
10
- const ActivityIndicator_styling_1 = require('./ActivityIndicator.styling');
11
- const ActivityIndicator_types_1 = require('./ActivityIndicator.types');
6
+ const react_1 = require("react");
7
+ const react_native_1 = require("react-native");
8
+ const framework_1 = require("@fluentui-react-native/framework");
9
+ const react_native_svg_1 = require("react-native-svg");
10
+ const ActivityIndicator_styling_1 = require("./ActivityIndicator.styling");
11
+ const ActivityIndicator_types_1 = require("./ActivityIndicator.types");
12
12
  const getActivityIndicatorPath = (diameter, width, color) => {
13
- const start = {
14
- x: width / 2,
15
- y: diameter / 2,
16
- };
17
- const innerRadius = diameter / 2 - width / 2;
18
- const path = `M${start.x} ${start.y} a${innerRadius} ${innerRadius} 0 1 1 ${innerRadius} ${innerRadius}`;
19
- return jsx_runtime_1.jsx(react_native_svg_1.Path, {
20
- d: path,
21
- stroke: color,
22
- strokeWidth: width,
23
- strokeLinecap: 'round',
24
- fill: 'transparent',
25
- });
13
+ const start = {
14
+ x: width / 2,
15
+ y: diameter / 2,
16
+ };
17
+ const innerRadius = diameter / 2 - width / 2;
18
+ const path = `M${start.x} ${start.y} a${innerRadius} ${innerRadius} 0 1 1 ${innerRadius} ${innerRadius}`;
19
+ return jsx_runtime_1.jsx(react_native_svg_1.Path, { d: path, stroke: color, strokeWidth: width, strokeLinecap: "round", fill: 'transparent' });
26
20
  };
27
21
  exports.AnimatedSvg = react_native_1.Animated.createAnimatedComponent(react_native_svg_1.Svg);
28
22
  const useStyling = (0, framework_1.buildUseStyling)(ActivityIndicator_styling_1.stylingSettings);
29
23
  exports.ActivityIndicator = (0, framework_1.compose)({
30
- displayName: ActivityIndicator_types_1.activityIndicatorName,
31
- ...ActivityIndicator_styling_1.stylingSettings,
32
- slots: {
33
- root: react_native_1.View,
34
- svg: exports.AnimatedSvg,
35
- },
36
- useRender: (props, useSlots) => {
37
- const Slots = useSlots(props);
38
- const slotProps = useStyling(props);
39
- const animating = props.animating != undefined ? props.animating : true;
40
- const hidesWhenStopped = props.hidesWhenStopped != undefined ? props.hidesWhenStopped : true;
41
- // React Native ActivityIndicator still takes up space when hidden, so to perfectly match would use opacity
42
- // hiding opacity makes the screen reader on iOS and Android skip over it
43
- const hideOpacity = animating == false && hidesWhenStopped == true ? 0 : 1;
44
- const rotationAngle = (0, react_1.useRef)(new react_native_1.Animated.Value(0)).current;
45
- const rotationAnimation = (0, react_1.useRef)(undefined);
46
- /**
47
- * https://github.com/facebook/react-native/pull/29585
48
- * For Animated.loop() to work with the native driver, React Native needs this fix.
49
- * It's only available in React Native 0.66+, and React Native macOS 0.62+
50
- * To workaround this, let's just rerun the loop everytime the animation finishes
51
- */
52
- const startRotation = (0, react_1.useCallback)(() => {
53
- if (rotationAnimation.current) {
54
- rotationAngle.setValue(0);
55
- rotationAnimation.current.reset();
56
- rotationAnimation.current.start((result) => {
57
- if (result.finished) {
58
- startRotation();
59
- }
24
+ displayName: ActivityIndicator_types_1.activityIndicatorName,
25
+ ...ActivityIndicator_styling_1.stylingSettings,
26
+ slots: {
27
+ root: react_native_1.View,
28
+ svg: exports.AnimatedSvg,
29
+ },
30
+ useRender: (props, useSlots) => {
31
+ const Slots = useSlots(props);
32
+ const slotProps = useStyling(props);
33
+ const animating = props.animating != undefined ? props.animating : true;
34
+ const hidesWhenStopped = props.hidesWhenStopped != undefined ? props.hidesWhenStopped : true;
35
+ // React Native ActivityIndicator still takes up space when hidden, so to perfectly match would use opacity
36
+ // hiding opacity makes the screen reader on iOS and Android skip over it
37
+ const hideOpacity = animating == false && hidesWhenStopped == true ? 0 : 1;
38
+ const rotationAngle = (0, react_1.useRef)(new react_native_1.Animated.Value(0)).current;
39
+ const rotationAnimation = (0, react_1.useRef)(undefined);
40
+ /**
41
+ * https://github.com/facebook/react-native/pull/29585
42
+ * For Animated.loop() to work with the native driver, React Native needs this fix.
43
+ * It's only available in React Native 0.66+, and React Native macOS 0.62+
44
+ * To workaround this, let's just rerun the loop everytime the animation finishes
45
+ */
46
+ const startRotation = (0, react_1.useCallback)(() => {
47
+ if (rotationAnimation.current) {
48
+ rotationAngle.setValue(0);
49
+ rotationAnimation.current.reset();
50
+ rotationAnimation.current.start((result) => {
51
+ if (result.finished) {
52
+ startRotation();
53
+ }
54
+ });
55
+ }
56
+ }, [rotationAngle]);
57
+ const stopRotation = () => {
58
+ if (rotationAnimation.current) {
59
+ rotationAnimation.current.stop();
60
+ }
61
+ };
62
+ (0, react_1.useEffect)(() => {
63
+ if (rotationAnimation.current === undefined) {
64
+ rotationAnimation.current = react_native_1.Animated.sequence([
65
+ react_native_1.Animated.timing(rotationAngle, {
66
+ toValue: 359,
67
+ duration: 750,
68
+ useNativeDriver: true,
69
+ easing: react_native_1.Easing.linear,
70
+ }),
71
+ ]);
72
+ }
73
+ if (animating) {
74
+ startRotation();
75
+ }
76
+ else {
77
+ stopRotation();
78
+ }
79
+ }, [animating, rotationAngle, startRotation]);
80
+ const interpolateSpin = rotationAngle.interpolate({
81
+ inputRange: [0, 359],
82
+ outputRange: ['0deg', '359deg'],
60
83
  });
61
- }
62
- }, [rotationAngle, animating]);
63
- const stopRotation = () => {
64
- if (rotationAnimation.current) {
65
- rotationAnimation.current.stop();
66
- }
67
- };
68
- (0, react_1.useEffect)(() => {
69
- if (rotationAnimation.current === undefined) {
70
- rotationAnimation.current = react_native_1.Animated.sequence([
71
- react_native_1.Animated.timing(rotationAngle, {
72
- toValue: 359,
73
- duration: 750,
74
- useNativeDriver: true,
75
- easing: react_native_1.Easing.linear,
76
- }),
77
- ]);
78
- }
79
- if (animating) {
80
- startRotation();
81
- } else {
82
- stopRotation();
83
- }
84
- }, [animating, hidesWhenStopped, rotationAngle]);
85
- const interpolateSpin = rotationAngle.interpolate({
86
- inputRange: [0, 359],
87
- outputRange: ['0deg', '359deg'],
88
- });
89
- const path = getActivityIndicatorPath(
90
- ActivityIndicator_styling_1.diameterSizeMap[slotProps.root.size],
91
- ActivityIndicator_styling_1.lineThicknessSizeMap[slotProps.root.lineThickness],
92
- slotProps.root.activityIndicatorColor,
93
- );
94
- // perspective is needed for animations to work on Android. See https://reactnative.dev/docs/animations#bear-in-mind
95
- const animatedSvgProps = {
96
- style: {
97
- transform: [{ rotateZ: interpolateSpin }, { perspective: 10 }],
98
- },
99
- };
100
- const otherRootProps = {
101
- style: {
102
- opacity: hideOpacity,
103
- },
104
- accessibilityState: { busy: animating },
105
- };
106
- return (rest) => {
107
- const { ...mergedProps } = (0, framework_1.mergeProps)(props, rest, otherRootProps);
108
- return jsx_runtime_1.jsx(Slots.root, {
109
- ...mergedProps,
110
- children: jsx_runtime_1.jsx(Slots.svg, { ...animatedSvgProps, children: path }),
111
- });
112
- };
113
- },
84
+ const path = getActivityIndicatorPath(ActivityIndicator_styling_1.diameterSizeMap[slotProps.root.size], ActivityIndicator_styling_1.lineThicknessSizeMap[slotProps.root.lineThickness], slotProps.root.activityIndicatorColor);
85
+ // perspective is needed for animations to work on Android. See https://reactnative.dev/docs/animations#bear-in-mind
86
+ const animatedSvgProps = {
87
+ style: {
88
+ transform: [{ rotateZ: interpolateSpin }, { perspective: 10 }],
89
+ },
90
+ };
91
+ const otherRootProps = {
92
+ style: {
93
+ opacity: hideOpacity,
94
+ },
95
+ accessibilityState: { busy: animating },
96
+ };
97
+ return (rest) => {
98
+ const { ...mergedProps } = (0, framework_1.mergeProps)(props, rest, otherRootProps);
99
+ return (jsx_runtime_1.jsx(Slots.root, { ...mergedProps, children: jsx_runtime_1.jsx(Slots.svg, { ...animatedSvgProps, children: path }) }));
100
+ };
101
+ },
114
102
  });
115
- //# sourceMappingURL=ActivityIndicator.mobile.js.map
103
+ //# sourceMappingURL=ActivityIndicator.mobile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityIndicator.mobile.js","sourceRoot":"","sources":["../src/ActivityIndicator.mobile.tsx"],"names":[],"mappings":";;;;AAAA,6DAA6D;AAC7D,iCAAuD;AACvD,+CAAsD;AAGtD,gEAAwF;AACxF,uDAA6C;AAG7C,2EAAqG;AAErG,uEAAkE;AAElE,MAAM,wBAAwB,GAAG,CAAC,QAAgB,EAAE,KAAa,EAAE,KAAa,EAAE,EAAE,CAAC;IACnF,MAAM,KAAK,GAAG;QACZ,CAAC,EAAE,KAAK,GAAG,CAAC;QACZ,CAAC,EAAE,QAAQ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C;YACvC,MAAM,EAAE,GAAG,WAAW,EAAE,GAAG,IAAA,sBAAU,EAAC,KAAK,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;YACnE,OAAO,CACL,kBAAC,KAAK,CAAC,IAAI,OAAK,WAAW,YACzB,kBAAC,KAAK,CAAC,GAAG,OAAK,gBAAgB,YAAG,IAAI,GAAa,GACxC,CACd,CAAC;QAAA,CACH,CAAC;IAAA,CACH;CACF,CAAC,CAAC"}
@@ -1,23 +1,13 @@
1
1
  import type { ActivityIndicatorProps as CoreActivityIndicatorProps } from 'react-native';
2
2
  import type { UseStylingOptions } from '@fluentui-react-native/framework';
3
- import type {
4
- ActivityIndicatorProps,
5
- FluentActivityIndicatorSlotProps,
6
- ActivityIndicatorTokens,
7
- CoreActivityIndicatorSlotProps,
8
- ActivityIndicatorSize,
9
- } from './ActivityIndicator.types';
3
+ import type { ActivityIndicatorProps, FluentActivityIndicatorSlotProps, ActivityIndicatorTokens, CoreActivityIndicatorSlotProps, ActivityIndicatorSize } from './ActivityIndicator.types';
10
4
  export declare const diameterSizeMap: {
11
- [key: string]: number;
5
+ [key: string]: number;
12
6
  };
13
7
  export declare const lineThicknessSizeMap: {
14
- [key: string]: number;
8
+ [key: string]: number;
15
9
  };
16
10
  export declare function coreSizeFromFluentSize(fluentSize: ActivityIndicatorSize): CoreActivityIndicatorProps['size'];
17
11
  export declare const stylingSettings: UseStylingOptions<ActivityIndicatorProps, FluentActivityIndicatorSlotProps, ActivityIndicatorTokens>;
18
- export declare const coreStylingSettings: UseStylingOptions<
19
- ActivityIndicatorProps,
20
- CoreActivityIndicatorSlotProps,
21
- ActivityIndicatorTokens
22
- >;
23
- //# sourceMappingURL=ActivityIndicator.styling.d.ts.map
12
+ export declare const coreStylingSettings: UseStylingOptions<ActivityIndicatorProps, CoreActivityIndicatorSlotProps, ActivityIndicatorTokens>;
13
+ //# sourceMappingURL=ActivityIndicator.styling.d.ts.map
@@ -1,101 +1,90 @@
1
- 'use strict';
2
- var __importDefault =
3
- (this && this.__importDefault) ||
4
- function (mod) {
5
- return mod && mod.__esModule ? mod : { default: mod };
6
- };
7
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
8
6
  exports.coreStylingSettings = exports.stylingSettings = exports.lineThicknessSizeMap = exports.diameterSizeMap = void 0;
9
7
  exports.coreSizeFromFluentSize = coreSizeFromFluentSize;
10
- const react_native_1 = require('react-native');
11
- const framework_1 = require('@fluentui-react-native/framework');
12
- const assert_never_1 = __importDefault(require('assert-never'));
13
- const ActivityIndicator_types_1 = require('./ActivityIndicator.types');
8
+ const react_native_1 = require("react-native");
9
+ const framework_1 = require("@fluentui-react-native/framework");
10
+ const assert_never_1 = __importDefault(require("assert-never"));
11
+ const ActivityIndicator_types_1 = require("./ActivityIndicator.types");
14
12
  exports.diameterSizeMap = {
15
- xSmall: 12,
16
- small: 16,
17
- medium: 24,
18
- large: 32,
19
- xLarge: 36,
13
+ xSmall: 12,
14
+ small: 16,
15
+ medium: 24,
16
+ large: 32,
17
+ xLarge: 36,
20
18
  };
21
19
  exports.lineThicknessSizeMap = {
22
- xSmall: 1,
23
- small: 1,
24
- medium: 2,
25
- large: 3,
26
- xLarge: 4,
20
+ xSmall: 1,
21
+ small: 1,
22
+ medium: 2,
23
+ large: 3,
24
+ xLarge: 4,
27
25
  };
28
26
  // Size coversion ramp from the Fluent ActivityIndicator size to the RN ActivityIndicator.
29
27
  function coreSizeFromFluentSize(fluentSize) {
30
- if (typeof fluentSize === 'undefined') {
31
- return fluentSize;
32
- }
33
- switch (fluentSize) {
34
- case 'xSmall':
35
- return 'small';
36
- case 'small':
37
- return 'small';
38
- case 'medium':
39
- return 'small';
40
- case 'large':
41
- return 'large';
42
- case 'xLarge':
43
- return 'large';
44
- default:
45
- (0, assert_never_1.default)(fluentSize);
46
- }
28
+ if (typeof fluentSize === 'undefined') {
29
+ return fluentSize;
30
+ }
31
+ switch (fluentSize) {
32
+ case 'xSmall':
33
+ return 'small';
34
+ case 'small':
35
+ return 'small';
36
+ case 'medium':
37
+ return 'small';
38
+ case 'large':
39
+ return 'large';
40
+ case 'xLarge':
41
+ return 'large';
42
+ default:
43
+ (0, assert_never_1.default)(fluentSize);
44
+ }
47
45
  }
48
46
  exports.stylingSettings = {
49
- tokens: [
50
- () => ({
51
- activityIndicatorColor: react_native_1.Appearance.getColorScheme() === 'light' ? '#BDBDBD' : '#666666',
52
- lineThickness: 'medium',
53
- size: 'medium',
54
- }),
55
- ActivityIndicator_types_1.activityIndicatorName,
56
- ],
57
- tokensThatAreAlsoProps: 'all',
58
- slotProps: {
59
- root: (0, framework_1.buildProps)(
60
- (tokens) => ({
61
- activityIndicatorColor: tokens.activityIndicatorColor,
62
- size: tokens.size,
63
- lineThickness: tokens.lineThickness != 'medium' ? tokens.lineThickness : tokens.size,
64
- accessibilityLabel: 'progressbar',
65
- accessible: true,
66
- style: {
67
- width: exports.diameterSizeMap[tokens.size],
68
- height: exports.diameterSizeMap[tokens.size],
69
- },
70
- }),
71
- ['activityIndicatorColor', 'lineThickness', 'size'],
72
- ),
73
- svg: (0, framework_1.buildProps)(
74
- (tokens) => ({
75
- width: exports.diameterSizeMap[tokens.size],
76
- height: exports.diameterSizeMap[tokens.size],
77
- }),
78
- ['size'],
79
- ),
80
- },
47
+ tokens: [
48
+ () => ({
49
+ activityIndicatorColor: react_native_1.Appearance.getColorScheme() === 'light' ? '#BDBDBD' : '#666666',
50
+ lineThickness: 'medium',
51
+ size: 'medium',
52
+ }),
53
+ ActivityIndicator_types_1.activityIndicatorName,
54
+ ],
55
+ tokensThatAreAlsoProps: 'all',
56
+ slotProps: {
57
+ root: (0, framework_1.buildProps)((tokens) => ({
58
+ activityIndicatorColor: tokens.activityIndicatorColor,
59
+ size: tokens.size,
60
+ lineThickness: tokens.lineThickness != 'medium' ? tokens.lineThickness : tokens.size,
61
+ accessibilityLabel: 'progressbar',
62
+ accessible: true,
63
+ style: {
64
+ width: exports.diameterSizeMap[tokens.size],
65
+ height: exports.diameterSizeMap[tokens.size],
66
+ },
67
+ }), ['activityIndicatorColor', 'lineThickness', 'size']),
68
+ svg: (0, framework_1.buildProps)((tokens) => ({
69
+ width: exports.diameterSizeMap[tokens.size],
70
+ height: exports.diameterSizeMap[tokens.size],
71
+ }), ['size']),
72
+ },
81
73
  };
82
74
  // Minimal styling settings for the RN Core ActivityIndicator
83
75
  exports.coreStylingSettings = {
84
- tokens: [
85
- () => ({
86
- size: 'small',
87
- }),
88
- ActivityIndicator_types_1.activityIndicatorName,
89
- ],
90
- tokensThatAreAlsoProps: 'all',
91
- slotProps: {
92
- root: (0, framework_1.buildProps)(
93
- (tokens) => ({
94
- color: tokens.activityIndicatorColor,
95
- ...(tokens.size && { size: coreSizeFromFluentSize(tokens.size) }), // Only pass in the prop if defined
96
- }),
97
- ['activityIndicatorColor', 'size'],
98
- ),
99
- },
76
+ tokens: [
77
+ () => ({
78
+ size: 'small',
79
+ }),
80
+ ActivityIndicator_types_1.activityIndicatorName,
81
+ ],
82
+ tokensThatAreAlsoProps: 'all',
83
+ slotProps: {
84
+ root: (0, framework_1.buildProps)((tokens) => ({
85
+ color: tokens.activityIndicatorColor,
86
+ ...(tokens.size && { size: coreSizeFromFluentSize(tokens.size) }), // Only pass in the prop if defined
87
+ }), ['activityIndicatorColor', 'size']),
88
+ },
100
89
  };
101
- //# sourceMappingURL=ActivityIndicator.styling.js.map
90
+ //# sourceMappingURL=ActivityIndicator.styling.js.map
@@ -1,54 +1,54 @@
1
1
  import type { Animated, ActivityIndicatorProps as CoreActivityIndicatorProps } from 'react-native';
2
2
  import type { SvgProps } from 'react-native-svg';
3
- export declare const activityIndicatorName = 'ActivityIndicator';
3
+ export declare const activityIndicatorName = "ActivityIndicator";
4
4
  /**
5
5
  * Specifies the possible sizes of the ActivityIndicator.
6
6
  */
7
7
  export type ActivityIndicatorSize = 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge';
8
8
  export interface ActivityIndicatorTokens {
9
- /**
10
- * ActivityIndicator element color
11
- * @defaultValue 'BDBDBD' for light mode, '666666' for dark mode
12
- */
13
- activityIndicatorColor?: string;
14
- /**
15
- * Line thickness of the ActivityIndicator
16
- * @defaultValue 'medium' or what size is set to
17
- */
18
- lineThickness?: ActivityIndicatorSize;
19
- /**
20
- * Size of the ActivityIndicator view
21
- * @defaultValue 'medium'
22
- */
23
- size?: ActivityIndicatorSize;
9
+ /**
10
+ * ActivityIndicator element color
11
+ * @defaultValue 'BDBDBD' for light mode, '666666' for dark mode
12
+ */
13
+ activityIndicatorColor?: string;
14
+ /**
15
+ * Line thickness of the ActivityIndicator
16
+ * @defaultValue 'medium' or what size is set to
17
+ */
18
+ lineThickness?: ActivityIndicatorSize;
19
+ /**
20
+ * Size of the ActivityIndicator view
21
+ * @defaultValue 'medium'
22
+ */
23
+ size?: ActivityIndicatorSize;
24
24
  }
25
25
  export interface ActivityIndicatorProps extends ActivityIndicatorTokens, Omit<CoreActivityIndicatorProps, 'size'> {
26
- /**
27
- * ActivityIndicator animating or not
28
- * @defaultValue 'true'
29
- */
30
- animating?: boolean;
31
- /**
32
- * ActivityIndicator hidden when not animating or not hidden
33
- * @defaultValue 'true'
34
- */
35
- hidesWhenStopped?: boolean;
26
+ /**
27
+ * ActivityIndicator animating or not
28
+ * @defaultValue 'true'
29
+ */
30
+ animating?: boolean;
31
+ /**
32
+ * ActivityIndicator hidden when not animating or not hidden
33
+ * @defaultValue 'true'
34
+ */
35
+ hidesWhenStopped?: boolean;
36
36
  }
37
37
  export interface FluentActivityIndicatorSlotProps {
38
- root: ActivityIndicatorProps;
39
- svg: Animated.AnimatedProps<SvgProps>;
38
+ root: ActivityIndicatorProps;
39
+ svg: Animated.AnimatedProps<SvgProps>;
40
40
  }
41
41
  export interface FluentActivityIndicatorType {
42
- props: ActivityIndicatorProps;
43
- slotProps: FluentActivityIndicatorSlotProps;
44
- tokens: ActivityIndicatorTokens;
42
+ props: ActivityIndicatorProps;
43
+ slotProps: FluentActivityIndicatorSlotProps;
44
+ tokens: ActivityIndicatorTokens;
45
45
  }
46
46
  export interface CoreActivityIndicatorSlotProps {
47
- root: CoreActivityIndicatorProps;
47
+ root: CoreActivityIndicatorProps;
48
48
  }
49
49
  export interface CoreActivityIndicatorType {
50
- props: ActivityIndicatorProps;
51
- slotProps: CoreActivityIndicatorSlotProps;
52
- tokens: ActivityIndicatorTokens;
50
+ props: ActivityIndicatorProps;
51
+ slotProps: CoreActivityIndicatorSlotProps;
52
+ tokens: ActivityIndicatorTokens;
53
53
  }
54
- //# sourceMappingURL=ActivityIndicator.types.d.ts.map
54
+ //# sourceMappingURL=ActivityIndicator.types.d.ts.map
@@ -1,5 +1,5 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.activityIndicatorName = void 0;
4
4
  exports.activityIndicatorName = 'ActivityIndicator';
5
- //# sourceMappingURL=ActivityIndicator.types.js.map
5
+ //# sourceMappingURL=ActivityIndicator.types.js.map