@fluentui-react-native/experimental-shimmer 0.14.0 → 0.14.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 (102) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/lib/Shimmer.d.ts +2 -7
  3. package/lib/Shimmer.d.ts.map +1 -1
  4. package/lib/Shimmer.js +77 -149
  5. package/lib/Shimmer.js.map +1 -1
  6. package/lib/Shimmer.styling.d.ts +1 -1
  7. package/lib/Shimmer.styling.js +26 -29
  8. package/lib/Shimmer.styling.win32.d.ts +1 -1
  9. package/lib/Shimmer.styling.win32.js +24 -36
  10. package/lib/Shimmer.test.d.ts +1 -1
  11. package/lib/Shimmer.test.js +45 -45
  12. package/lib/Shimmer.test.js.map +1 -1
  13. package/lib/Shimmer.types.d.ts +2 -10
  14. package/lib/Shimmer.types.js +1 -1
  15. package/lib/Shimmer.types.shared.d.ts +123 -123
  16. package/lib/Shimmer.types.shared.d.ts.map +1 -1
  17. package/lib/Shimmer.types.shared.js +1 -1
  18. package/lib/Shimmer.types.win32.d.ts +26 -26
  19. package/lib/Shimmer.types.win32.js +1 -1
  20. package/lib/Shimmer.win32.d.ts +2 -7
  21. package/lib/Shimmer.win32.js +107 -137
  22. package/lib/ShimmerTokens.android.d.ts +1 -1
  23. package/lib/ShimmerTokens.android.js +8 -8
  24. package/lib/ShimmerTokens.android.js.map +1 -1
  25. package/lib/ShimmerTokens.d.ts +1 -1
  26. package/lib/ShimmerTokens.ios.d.ts +1 -1
  27. package/lib/ShimmerTokens.ios.js +8 -8
  28. package/lib/ShimmerTokens.ios.js.map +1 -1
  29. package/lib/ShimmerTokens.js +9 -9
  30. package/lib/ShimmerTokens.js.map +1 -1
  31. package/lib/ShimmerTokens.win32.d.ts +1 -1
  32. package/lib/ShimmerTokens.win32.js +10 -10
  33. package/lib/ShimmerTokens.win32.js.map +1 -1
  34. package/lib/SvgShapeToPath.d.ts +1 -1
  35. package/lib/SvgShapeToPath.js +120 -134
  36. package/lib/Win32ShimmerNativeComponent.d.ts +4 -4
  37. package/lib/Win32ShimmerNativeComponent.js +1 -1
  38. package/lib/consts.android.d.ts +1 -1
  39. package/lib/consts.android.js +1 -1
  40. package/lib/consts.d.ts +1 -1
  41. package/lib/consts.ios.d.ts +1 -1
  42. package/lib/consts.ios.js +1 -1
  43. package/lib/consts.js +1 -1
  44. package/lib/consts.win32.d.ts +1 -1
  45. package/lib/consts.win32.js +1 -1
  46. package/lib/index.d.ts +2 -10
  47. package/lib/index.js +1 -1
  48. package/lib-commonjs/Shimmer.d.ts +2 -7
  49. package/lib-commonjs/Shimmer.d.ts.map +1 -1
  50. package/lib-commonjs/Shimmer.js +89 -163
  51. package/lib-commonjs/Shimmer.js.map +1 -1
  52. package/lib-commonjs/Shimmer.styling.d.ts +1 -1
  53. package/lib-commonjs/Shimmer.styling.js +31 -34
  54. package/lib-commonjs/Shimmer.styling.win32.d.ts +1 -1
  55. package/lib-commonjs/Shimmer.styling.win32.js +29 -41
  56. package/lib-commonjs/Shimmer.test.d.ts +1 -1
  57. package/lib-commonjs/Shimmer.test.js +79 -96
  58. package/lib-commonjs/Shimmer.test.js.map +1 -1
  59. package/lib-commonjs/Shimmer.types.d.ts +2 -10
  60. package/lib-commonjs/Shimmer.types.js +5 -10
  61. package/lib-commonjs/Shimmer.types.shared.d.ts +123 -123
  62. package/lib-commonjs/Shimmer.types.shared.d.ts.map +1 -1
  63. package/lib-commonjs/Shimmer.types.shared.js +3 -3
  64. package/lib-commonjs/Shimmer.types.win32.d.ts +26 -26
  65. package/lib-commonjs/Shimmer.types.win32.js +5 -10
  66. package/lib-commonjs/Shimmer.win32.d.ts +2 -7
  67. package/lib-commonjs/Shimmer.win32.js +120 -164
  68. package/lib-commonjs/ShimmerTokens.android.d.ts +1 -1
  69. package/lib-commonjs/ShimmerTokens.android.js +11 -11
  70. package/lib-commonjs/ShimmerTokens.android.js.map +1 -1
  71. package/lib-commonjs/ShimmerTokens.d.ts +1 -1
  72. package/lib-commonjs/ShimmerTokens.ios.d.ts +1 -1
  73. package/lib-commonjs/ShimmerTokens.ios.js +11 -11
  74. package/lib-commonjs/ShimmerTokens.ios.js.map +1 -1
  75. package/lib-commonjs/ShimmerTokens.js +13 -13
  76. package/lib-commonjs/ShimmerTokens.js.map +1 -1
  77. package/lib-commonjs/ShimmerTokens.win32.d.ts +1 -1
  78. package/lib-commonjs/ShimmerTokens.win32.js +13 -13
  79. package/lib-commonjs/ShimmerTokens.win32.js.map +1 -1
  80. package/lib-commonjs/SvgShapeToPath.d.ts +1 -1
  81. package/lib-commonjs/SvgShapeToPath.js +122 -136
  82. package/lib-commonjs/Win32ShimmerNativeComponent.d.ts +4 -4
  83. package/lib-commonjs/Win32ShimmerNativeComponent.js +4 -4
  84. package/lib-commonjs/consts.android.d.ts +1 -1
  85. package/lib-commonjs/consts.android.js +3 -3
  86. package/lib-commonjs/consts.d.ts +1 -1
  87. package/lib-commonjs/consts.ios.d.ts +1 -1
  88. package/lib-commonjs/consts.ios.js +3 -3
  89. package/lib-commonjs/consts.js +3 -3
  90. package/lib-commonjs/consts.win32.d.ts +1 -1
  91. package/lib-commonjs/consts.win32.js +3 -3
  92. package/lib-commonjs/index.d.ts +2 -10
  93. package/lib-commonjs/index.js +11 -36
  94. package/package.json +26 -25
  95. package/src/Shimmer.test.tsx +1 -1
  96. package/src/Shimmer.tsx +4 -14
  97. package/src/Shimmer.types.shared.ts +1 -1
  98. package/src/ShimmerTokens.android.ts +1 -1
  99. package/src/ShimmerTokens.ios.ts +1 -1
  100. package/src/ShimmerTokens.ts +1 -1
  101. package/src/ShimmerTokens.win32.ts +1 -1
  102. package/eslint.config.js +0 -3
@@ -1,109 +1,92 @@
1
- 'use strict';
2
- var __createBinding =
3
- (this && this.__createBinding) ||
4
- (Object.create
5
- ? function (o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = {
10
- enumerable: true,
11
- get: function () {
12
- return m[k];
13
- },
14
- };
15
- }
16
- Object.defineProperty(o, k2, desc);
17
- }
18
- : function (o, m, k, k2) {
19
- if (k2 === undefined) k2 = k;
20
- o[k2] = m[k];
21
- });
22
- var __setModuleDefault =
23
- (this && this.__setModuleDefault) ||
24
- (Object.create
25
- ? function (o, v) {
26
- Object.defineProperty(o, 'default', { enumerable: true, value: v });
27
- }
28
- : function (o, v) {
29
- o['default'] = v;
30
- });
31
- var __importStar =
32
- (this && this.__importStar) ||
33
- (function () {
34
- var ownKeys = function (o) {
35
- ownKeys =
36
- Object.getOwnPropertyNames ||
37
- function (o) {
38
- var ar = [];
39
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
40
- return ar;
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
41
24
  };
42
- return ownKeys(o);
25
+ return ownKeys(o);
43
26
  };
44
27
  return function (mod) {
45
- if (mod && mod.__esModule) return mod;
46
- var result = {};
47
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== 'default') __createBinding(result, mod, k[i]);
48
- __setModuleDefault(result, mod);
49
- return result;
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
50
33
  };
51
- })();
52
- Object.defineProperty(exports, '__esModule', { value: true });
53
- const jsx_runtime_1 = require('react/jsx-runtime');
54
- const react_1 = require('react');
55
- const renderer = __importStar(require('react-test-renderer'));
56
- const Shimmer_1 = require('./Shimmer');
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ const jsx_runtime_1 = require("react/jsx-runtime");
37
+ const react_1 = require("react");
38
+ const renderer = __importStar(require("react-test-renderer"));
39
+ const Shimmer_1 = require("./Shimmer");
57
40
  function shimmerRects() {
58
- return [
59
- {
60
- type: 'rect',
61
- borderRadiusX: 3,
62
- borderRadiusY: 3,
63
- width: 100,
64
- height: 20,
65
- x: 90,
66
- y: 70,
67
- },
68
- {
69
- type: 'rect',
70
- borderRadiusX: 3,
71
- borderRadiusY: 3,
72
- width: 150,
73
- height: 20,
74
- x: 90,
75
- y: 42,
76
- },
77
- {
78
- type: 'rect',
79
- borderRadiusX: 3,
80
- borderRadiusY: 3,
81
- width: 200,
82
- height: 20,
83
- x: 90,
84
- y: 15,
85
- },
86
- ];
41
+ return [
42
+ {
43
+ type: 'rect',
44
+ borderRadiusX: 3,
45
+ borderRadiusY: 3,
46
+ width: 100,
47
+ height: 20,
48
+ x: 90,
49
+ y: 70,
50
+ },
51
+ {
52
+ type: 'rect',
53
+ borderRadiusX: 3,
54
+ borderRadiusY: 3,
55
+ width: 150,
56
+ height: 20,
57
+ x: 90,
58
+ y: 42,
59
+ },
60
+ {
61
+ type: 'rect',
62
+ borderRadiusX: 3,
63
+ borderRadiusY: 3,
64
+ width: 200,
65
+ height: 20,
66
+ x: 90,
67
+ y: 15,
68
+ },
69
+ ];
87
70
  }
88
71
  const style = { width: 300, height: 100 };
89
72
  // mocks out setTimeout and other timer functions with mock functions, test will fail without this as we're using Animated API
90
73
  jest.useFakeTimers();
91
74
  describe('Shimmer component tests', () => {
92
- it('Shimmer default', async () => {
93
- let component;
94
- (0, react_1.act)(() => {
95
- component = renderer.create(jsx_runtime_1.jsx(Shimmer_1.Shimmer, { elements: shimmerRects() }));
75
+ it('Shimmer default', async () => {
76
+ let component;
77
+ (0, react_1.act)(() => {
78
+ component = renderer.create(jsx_runtime_1.jsx(Shimmer_1.Shimmer, { elements: shimmerRects() }));
79
+ });
80
+ expect(component.toJSON()).toMatchSnapshot();
81
+ await (0, react_1.act)(async () => null);
96
82
  });
97
- expect(component.toJSON()).toMatchSnapshot();
98
- await (0, react_1.act)(async () => null);
99
- });
100
- it('Shimmer with style prop', async () => {
101
- let component;
102
- (0, react_1.act)(() => {
103
- component = renderer.create(jsx_runtime_1.jsx(Shimmer_1.Shimmer, { elements: shimmerRects(), style: style }));
83
+ it('Shimmer with style prop', async () => {
84
+ let component;
85
+ (0, react_1.act)(() => {
86
+ component = renderer.create(jsx_runtime_1.jsx(Shimmer_1.Shimmer, { elements: shimmerRects(), style: style }));
87
+ });
88
+ expect(component.toJSON()).toMatchSnapshot();
89
+ await (0, react_1.act)(async () => null);
104
90
  });
105
- expect(component.toJSON()).toMatchSnapshot();
106
- await (0, react_1.act)(async () => null);
107
- });
108
91
  });
109
- //# sourceMappingURL=Shimmer.test.js.map
92
+ //# sourceMappingURL=Shimmer.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Shimmer.test.js","sourceRoot":"","sources":["../src/Shimmer.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA4B;AAE5B,MAAY,QAAQ,gDAA4B;AAEhD,uCAAoC;AAGpC,SAAS,YAAY,GAAqD;IACxE,OA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AE,CAAC;AAE1C,8HAA8H;AAC9H,IAAI,CAAC,aAAa,EAAE,CAAC;AAErB,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE,CAAC;IACxC,EAAE,CAAC,iBAAiB,EAAE,KAAK,IAAI,EAAE,CAAC;QAChC,IAAI,SAAqC,CAAC;QAC1C,IAAA,WAAG,EAAC,GAAG,EAAE,CAAC;YACR,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,kBAAC,iBAAO,IAAC,QAAQ,EAAE,YAAY,EAAE,GAAI,CAAC,CAAC;QAAA,CACpE,CAAC,CAAC;QACH,MAAM,CAAC,SAAU,CAAC,MAAM,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;QAC9C,MAAM,IAAA,WAAG,EAAC,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC;IAAA,CAC7B,CAAC,CAAC;IAEH,EAAE,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE,CAAC;QACxC,IAAI,SAAqC,CAAC;QAC1C,IAAA,WAAG,EAAC,GAAG,EAAE,CAAC;YACR,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,kBAAC,iBAAO,IAAC,QAAQ,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC;QAAA,CAClF,CAAC,CAAC;QACH,MAAM,CAAC,SAAU,CAAC,MAAM,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;QAC9C,MAAM,IAAA,WAAG,EAAC,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC;IAAA,CAC7B,CAAC,CAAC;AAAA,CACJ,CAAC,CAAC"}
@@ -1,11 +1,3 @@
1
- export type {
2
- ShimmerCircleElement,
3
- ShimmerRectElement,
4
- ShimmerElementTypes,
5
- ShimmerTokens,
6
- ShimmerSlotProps,
7
- ShimmerProps,
8
- ShimmerType,
9
- } from './Shimmer.types.shared';
1
+ export type { ShimmerCircleElement, ShimmerRectElement, ShimmerElementTypes, ShimmerTokens, ShimmerSlotProps, ShimmerProps, ShimmerType, } from './Shimmer.types.shared';
10
2
  export { shimmerName } from './Shimmer.types.shared';
11
- //# sourceMappingURL=Shimmer.types.d.ts.map
3
+ //# sourceMappingURL=Shimmer.types.d.ts.map
@@ -1,11 +1,6 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.shimmerName = void 0;
4
- const Shimmer_types_shared_1 = require('./Shimmer.types.shared');
5
- Object.defineProperty(exports, 'shimmerName', {
6
- enumerable: true,
7
- get: function () {
8
- return Shimmer_types_shared_1.shimmerName;
9
- },
10
- });
11
- //# sourceMappingURL=Shimmer.types.js.map
4
+ const Shimmer_types_shared_1 = require("./Shimmer.types.shared");
5
+ Object.defineProperty(exports, "shimmerName", { enumerable: true, get: function () { return Shimmer_types_shared_1.shimmerName; } });
6
+ //# sourceMappingURL=Shimmer.types.js.map
@@ -1,145 +1,145 @@
1
1
  import type { ColorValue, ViewProps } from 'react-native';
2
2
  import type { IBackgroundColorTokens } from '@fluentui-react-native/tokens';
3
3
  import type { SvgProps } from 'react-native-svg';
4
- export declare const shimmerName = 'Shimmer';
4
+ export declare const shimmerName = "Shimmer";
5
5
  /**
6
6
  * Properties necessary to define a circular Shimmer element.
7
7
  */
8
8
  export interface ShimmerCircleElement {
9
- /**
10
- * Shimmer element type.
11
- */
12
- type: 'circle';
13
- /**
14
- * Radius of the circle element.
15
- * @defaultValue 12
16
- */
17
- radius?: number;
18
- /**
19
- * Note: cx and cy should be optional properties [or removed], with relative positioning being the default [or only] positioning mechanism.
20
- * Note: The behavior of element intersections is undefined. https://www.github.com/Microsoft/fluentui-react-native Issue #866
21
- */
22
- /**
23
- * The x-axis center of the circle element in the Shimmer relative to the origin [top-left, (0,0)].
24
- */
25
- cx: number;
26
- /**
27
- * The y-axis center of the circle element in the Shimmer relative to the origin [top-left, (0,0)].
28
- */
29
- cy: number;
9
+ /**
10
+ * Shimmer element type.
11
+ */
12
+ type: 'circle';
13
+ /**
14
+ * Radius of the circle element.
15
+ * @defaultValue 12
16
+ */
17
+ radius?: number;
18
+ /**
19
+ * Note: cx and cy should be optional properties [or removed], with relative positioning being the default [or only] positioning mechanism.
20
+ * Note: The behavior of element intersections is undefined. https://www.github.com/Microsoft/fluentui-react-native Issue #866
21
+ */
22
+ /**
23
+ * The x-axis center of the circle element in the Shimmer relative to the origin [top-left, (0,0)].
24
+ */
25
+ cx: number;
26
+ /**
27
+ * The y-axis center of the circle element in the Shimmer relative to the origin [top-left, (0,0)].
28
+ */
29
+ cy: number;
30
30
  }
31
31
  /**
32
32
  * Properties necessary to define a rectangular Shimmer element.
33
33
  */
34
34
  export interface ShimmerRectElement {
35
- /**
36
- * Shimmer element type.
37
- */
38
- type: 'rect';
39
- /**
40
- * Width of the rect.
41
- * @defaultValue 100%
42
- */
43
- width?: number;
44
- /**
45
- * Height of the rect.
46
- * @defaultValue 16
47
- */
48
- height?: number;
49
- /**
50
- * Border radius for the x-axis of a rounded rect.
51
- * @defaultValue 0
52
- */
53
- borderRadiusX?: number;
54
- /**
55
- * Border radius for the y-axis of a rounded rect.
56
- * @defaultValue 0
57
- */
58
- borderRadiusY?: number;
59
- /**
60
- * Note: x and y should be optional properties [or removed], with relative positioning being the default [or only] positioning mechanism.
61
- * Note: The behavior of element intersections is undefined. https://www.github.com/Microsoft/fluentui-react-native Issue #866
62
- */
63
- /**
64
- * The x-axis position of the rect element's top-left corner in the Shimmer relative to the origin [top-left, (0,0)].
65
- */
66
- x: number;
67
- /**
68
- * The y-axis position of the rect element's top-left corner in the Shimmer relative to the origin [top-left, (0,0)].
69
- */
70
- y: number;
35
+ /**
36
+ * Shimmer element type.
37
+ */
38
+ type: 'rect';
39
+ /**
40
+ * Width of the rect.
41
+ * @defaultValue 100%
42
+ */
43
+ width?: number;
44
+ /**
45
+ * Height of the rect.
46
+ * @defaultValue 16
47
+ */
48
+ height?: number;
49
+ /**
50
+ * Border radius for the x-axis of a rounded rect.
51
+ * @defaultValue 0
52
+ */
53
+ borderRadiusX?: number;
54
+ /**
55
+ * Border radius for the y-axis of a rounded rect.
56
+ * @defaultValue 0
57
+ */
58
+ borderRadiusY?: number;
59
+ /**
60
+ * Note: x and y should be optional properties [or removed], with relative positioning being the default [or only] positioning mechanism.
61
+ * Note: The behavior of element intersections is undefined. https://www.github.com/Microsoft/fluentui-react-native Issue #866
62
+ */
63
+ /**
64
+ * The x-axis position of the rect element's top-left corner in the Shimmer relative to the origin [top-left, (0,0)].
65
+ */
66
+ x: number;
67
+ /**
68
+ * The y-axis position of the rect element's top-left corner in the Shimmer relative to the origin [top-left, (0,0)].
69
+ */
70
+ y: number;
71
71
  }
72
72
  export type ShimmerElementTypes = ShimmerCircleElement | ShimmerRectElement;
73
73
  export interface ShimmerTokens extends IBackgroundColorTokens {
74
- /**
75
- * Specifies the Shimmer effect angle in degrees (produced by a gradient).
76
- *
77
- * @defaultValue 45 on @platform Android
78
- * @defaultValue 0 on other platforms.
79
- */
80
- angle?: number;
81
- /**
82
- * Specifies the animation delay time in milliseconds.
83
- *
84
- * @defaultValue 500 on @platform win32
85
- * @defaultValue 0 on other platforms.
86
- */
87
- delay?: number;
88
- /**
89
- * Specifies the time required to traverse the control in milliseconds.
90
- *
91
- * @defaultValue 1000 on @platform Android
92
- * @defaultValue 2000 on @platform win32
93
- * @defaultValue 7000 on other platforms.
94
- */
95
- duration?: number;
96
- /**
97
- * Specifies the opacity of the shimmer color.
98
- * @defaultValue 1
99
- */
100
- shimmerColorOpacity?: number;
101
- /**
102
- * Specifies the opacity of the wave color.
103
- * @defaultValue 1
104
- */
105
- shimmerWaveColorOpacity?: number;
106
- /**
107
- * Color you see when the shimmer wave is not animating.
108
- *
109
- * @defaultValue theme.colors.neutralStencil1 on @platform Android
110
- * @defaultValue theme.colors.bodyFrameDivider on @platform win32
111
- * @defaultValue #E1E1E1/#404040 for light/dark theme on other platforms.
112
- */
113
- shimmerColor?: ColorValue;
114
- /**
115
- * Defines the tip color of the wave which has a linear gradient.
116
- * from shimmerColor to shimmerWaveColor to shimmerColor.
117
- *
118
- * @defaultValue theme.colors.neutralStencil2 on @platform Android
119
- * @defaultValue #E1E1E1 on @platform win32
120
- * @defaultValue white/black for light/dark theme on other platforms.
121
- */
122
- shimmerWaveColor?: ColorValue;
123
- /**
124
- * Width of the Shimmer wave.
125
- *
126
- * @defaultValue '100%' of the 'width' property
127
- * @platform win32
128
- */
129
- shimmerWaveWidth?: number | string;
74
+ /**
75
+ * Specifies the Shimmer effect angle in degrees (produced by a gradient).
76
+ *
77
+ * @defaultValue 45 on @platform Android
78
+ * @defaultValue 0 on other platforms.
79
+ */
80
+ angle?: number;
81
+ /**
82
+ * Specifies the animation delay time in milliseconds.
83
+ *
84
+ * @defaultValue 500 on @platform win32
85
+ * @defaultValue 0 on other platforms.
86
+ */
87
+ delay?: number;
88
+ /**
89
+ * Specifies the time required to traverse the control in milliseconds.
90
+ *
91
+ * @defaultValue 1000 on @platform Android
92
+ * @defaultValue 2000 on @platform win32
93
+ * @defaultValue 7000 on other platforms.
94
+ */
95
+ duration?: number;
96
+ /**
97
+ * Specifies the opacity of the shimmer color.
98
+ * @defaultValue 1
99
+ */
100
+ shimmerColorOpacity?: number;
101
+ /**
102
+ * Specifies the opacity of the wave color.
103
+ * @defaultValue 1
104
+ */
105
+ shimmerWaveColorOpacity?: number;
106
+ /**
107
+ * Color you see when the shimmer wave is not animating.
108
+ *
109
+ * @defaultValue theme.colors.neutralStencil1 on @platform Android
110
+ * @defaultValue theme.colors.bodyFrameDivider on @platform win32
111
+ * @defaultValue #E1E1E1/#404040 for light/dark theme on other platforms.
112
+ */
113
+ shimmerColor?: ColorValue;
114
+ /**
115
+ * Defines the tip color of the wave which has a linear gradient.
116
+ * from shimmerColor to shimmerWaveColor to shimmerColor.
117
+ *
118
+ * @defaultValue theme.colors.neutralStencil2 on @platform Android
119
+ * @defaultValue #E1E1E1 on @platform win32
120
+ * @defaultValue white/black for light/dark theme on other platforms.
121
+ */
122
+ shimmerWaveColor?: ColorValue;
123
+ /**
124
+ * Width of the Shimmer wave.
125
+ *
126
+ * @defaultValue '100%' of the 'width' property
127
+ * @platform win32
128
+ */
129
+ shimmerWaveWidth?: number | string;
130
130
  }
131
131
  export interface ShimmerSlotProps {
132
- root: SvgProps;
132
+ root: SvgProps;
133
133
  }
134
134
  export interface ShimmerProps extends ViewProps, ShimmerTokens {
135
- /**
136
- * Shimmer shapes that define the masking effect of the Shimmer control.
137
- */
138
- elements: Array<ShimmerElementTypes>;
135
+ /**
136
+ * Shimmer shapes that define the masking effect of the Shimmer control.
137
+ */
138
+ elements: ShimmerElementTypes[];
139
139
  }
140
140
  export interface ShimmerType {
141
- props: ShimmerProps;
142
- slotProps: ShimmerSlotProps;
143
- tokens: ShimmerTokens;
141
+ props: ShimmerProps;
142
+ slotProps: ShimmerSlotProps;
143
+ tokens: ShimmerTokens;
144
144
  }
145
- //# sourceMappingURL=Shimmer.types.shared.d.ts.map
145
+ //# sourceMappingURL=Shimmer.types.shared.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Shimmer.types.shared.d.ts","sourceRoot":"","sources":["../src/Shimmer.types.shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,WAAW,YAAY,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;IAEf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IAEH;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;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E,MAAM,CAAC;IAE7B;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAEjC;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC;IAE1B;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAE9B;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACpC;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,WAAW,YAAa,SAAQ,SAAS,EAAE,aAAa;IAC5D;;OAEG;IACH,QAAQ,EAAE,mBAAmB,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,MAAM,EAAE,aAAa,CAAC;CACvB"}
@@ -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.shimmerName = void 0;
4
4
  exports.shimmerName = 'Shimmer';
5
- //# sourceMappingURL=Shimmer.types.shared.js.map
5
+ //# sourceMappingURL=Shimmer.types.shared.js.map
@@ -4,36 +4,36 @@ export type { ShimmerProps, ShimmerTokens };
4
4
  export type { ShimmerRectElement, ShimmerElementTypes, ShimmerCircleElement } from './Shimmer.types.shared';
5
5
  export { shimmerName } from './Shimmer.types.shared';
6
6
  export interface ClippingMaskProps extends ShimmerTokens {
7
- /**
8
- * Extra parameter necessary to provide the mask effect generated from the provided ShimmerElements.
9
- *
10
- * @defaultValue null
11
- */
12
- clipPath?: string;
13
- /**
14
- * The height and width of the viewBox are internal props used by the SVG to size themselves and
15
- * set up their viewBox to establish coordinate space for DPI scaling purposes.
16
- */
17
- viewBoxHeight: number;
18
- viewBoxWidth: number;
7
+ /**
8
+ * Extra parameter necessary to provide the mask effect generated from the provided ShimmerElements.
9
+ *
10
+ * @defaultValue null
11
+ */
12
+ clipPath?: string;
13
+ /**
14
+ * The height and width of the viewBox are internal props used by the SVG to size themselves and
15
+ * set up their viewBox to establish coordinate space for DPI scaling purposes.
16
+ */
17
+ viewBoxHeight: number;
18
+ viewBoxWidth: number;
19
19
  }
20
20
  export interface ShimmerWaveProps extends ShimmerTokens {
21
- /**
22
- * The height and width of the viewBox are internal props used by the SVG to size themselves and
23
- * set up their viewBox to establish coordinate space for DPI scaling purposes.
24
- */
25
- viewBoxHeight: number;
26
- viewBoxWidth: number;
21
+ /**
22
+ * The height and width of the viewBox are internal props used by the SVG to size themselves and
23
+ * set up their viewBox to establish coordinate space for DPI scaling purposes.
24
+ */
25
+ viewBoxHeight: number;
26
+ viewBoxWidth: number;
27
27
  }
28
28
  export interface ShimmerSlotProps {
29
- root: ViewProps;
30
- clippingMask: ClippingMaskProps;
31
- shimmerWave: ShimmerWaveProps;
32
- shimmerWaveContainer: React.PropsWithChildren<ShimmerWaveProps>;
29
+ root: ViewProps;
30
+ clippingMask: ClippingMaskProps;
31
+ shimmerWave: ShimmerWaveProps;
32
+ shimmerWaveContainer: React.PropsWithChildren<ShimmerWaveProps>;
33
33
  }
34
34
  export interface ShimmerType {
35
- props: ShimmerProps;
36
- slotProps: ShimmerSlotProps;
37
- tokens: ShimmerTokens;
35
+ props: ShimmerProps;
36
+ slotProps: ShimmerSlotProps;
37
+ tokens: ShimmerTokens;
38
38
  }
39
- //# sourceMappingURL=Shimmer.types.win32.d.ts.map
39
+ //# sourceMappingURL=Shimmer.types.win32.d.ts.map
@@ -1,11 +1,6 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.shimmerName = void 0;
4
- const Shimmer_types_shared_1 = require('./Shimmer.types.shared');
5
- Object.defineProperty(exports, 'shimmerName', {
6
- enumerable: true,
7
- get: function () {
8
- return Shimmer_types_shared_1.shimmerName;
9
- },
10
- });
11
- //# sourceMappingURL=Shimmer.types.win32.js.map
4
+ const Shimmer_types_shared_1 = require("./Shimmer.types.shared");
5
+ Object.defineProperty(exports, "shimmerName", { enumerable: true, get: function () { return Shimmer_types_shared_1.shimmerName; } });
6
+ //# sourceMappingURL=Shimmer.types.win32.js.map
@@ -5,10 +5,5 @@
5
5
  */
6
6
  import type { ShimmerProps, ShimmerCircleElement, ShimmerRectElement } from './Shimmer.types.shared';
7
7
  export type { ShimmerCircleElement, ShimmerRectElement };
8
- export declare const Shimmer: import('@fluentui-react-native/framework').ComposableComponent<
9
- ShimmerProps,
10
- import('./Shimmer.types.win32').ShimmerSlotProps,
11
- import('./Shimmer.types.shared').ShimmerTokens,
12
- import('@fluentui-react-native/framework').ObjectBase
13
- >;
14
- //# sourceMappingURL=Shimmer.win32.d.ts.map
8
+ export declare const Shimmer: import("@fluentui-react-native/framework").ComposableComponent<ShimmerProps, import("./Shimmer.types.win32").ShimmerSlotProps, import("./Shimmer.types.shared").ShimmerTokens, import("@fluentui-react-native/framework").ObjectBase>;
9
+ //# sourceMappingURL=Shimmer.win32.d.ts.map