@fluentui-react-native/experimental-shimmer 0.8.13 → 0.8.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +43 -1
- package/CHANGELOG.md +12 -2
- package/SPEC.md +324 -0
- package/assets/dark_shimmer_android.png +0 -0
- package/assets/dark_shimmer_win32.png +0 -0
- package/assets/light_shimmer_android.png +0 -0
- package/assets/light_shimmer_win32.png +0 -0
- package/lib/Shimmer.types.d.ts +20 -8
- package/lib/Shimmer.types.d.ts.map +1 -1
- package/lib-commonjs/Shimmer.types.d.ts +20 -8
- package/lib-commonjs/Shimmer.types.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/Shimmer.types.ts +20 -8
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,49 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/experimental-shimmer",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Mon, 30 Jan 2023 07:10:00 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/experimental-shimmer_v0.8.14",
|
|
7
|
+
"version": "0.8.14",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@fluentui-react-native/experimental-shimmer",
|
|
13
|
+
"comment": "Bump @fluentui-react-native/framework to v0.8.37",
|
|
14
|
+
"commit": "f6f403b2efe86a229448a618b043601ceefd9a5f"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui-react-native/experimental-shimmer",
|
|
19
|
+
"comment": "Bump @fluentui-react-native/tokens to v0.20.6",
|
|
20
|
+
"commit": "f6f403b2efe86a229448a618b043601ceefd9a5f"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui-react-native/experimental-shimmer",
|
|
25
|
+
"comment": "Bump @fluentui-react-native/theming-utils to v0.23.1",
|
|
26
|
+
"commit": "f6f403b2efe86a229448a618b043601ceefd9a5f"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"date": "Fri, 27 Jan 2023 18:54:22 GMT",
|
|
33
|
+
"tag": "@fluentui-react-native/experimental-shimmer_v0.8.13",
|
|
34
|
+
"version": "0.8.13",
|
|
35
|
+
"comments": {
|
|
36
|
+
"none": [
|
|
37
|
+
{
|
|
38
|
+
"author": "ayushsinghs@yahoo.in",
|
|
39
|
+
"package": "@fluentui-react-native/experimental-shimmer",
|
|
40
|
+
"commit": "939db0b8e93cc3d172744481f070dd15169de2d9",
|
|
41
|
+
"comment": "Update Shimmer docs"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"date": "Wed, 25 Jan 2023 21:31:18 GMT",
|
|
6
48
|
"tag": "@fluentui-react-native/experimental-shimmer_v0.8.13",
|
|
7
49
|
"version": "0.8.13",
|
|
8
50
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/experimental-shimmer
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 30 Jan 2023 07:10:00 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.8.14
|
|
8
|
+
|
|
9
|
+
Mon, 30 Jan 2023 07:10:00 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Bump @fluentui-react-native/framework to v0.8.37
|
|
14
|
+
- Bump @fluentui-react-native/tokens to v0.20.6
|
|
15
|
+
- Bump @fluentui-react-native/theming-utils to v0.23.1
|
|
16
|
+
|
|
7
17
|
## 0.8.13
|
|
8
18
|
|
|
9
|
-
Wed, 25 Jan 2023 21:
|
|
19
|
+
Wed, 25 Jan 2023 21:31:18 GMT
|
|
10
20
|
|
|
11
21
|
### Patches
|
|
12
22
|
|
package/SPEC.md
ADDED
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
# Shimmer
|
|
2
|
+
|
|
3
|
+
## Background
|
|
4
|
+
|
|
5
|
+
The `Shimmer` component is a temporary animation placeholder for when a service call takes time to return data and we don't want to block rendering the rest of the UI.
|
|
6
|
+
|
|
7
|
+
Many a time, applications must wait for content to load or perform lengthy data processing operations. During these times, it is vital to show the user that the application isn't stalled. Progress indicators like `Shimmer` are used in these cases.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
|
|
11
|
+
To work with [FURN's theming](../../../docs/pages/Theming/Basics.md), the `Shimmer` requires the use of `ThemeProvider` from `@fluentui-react-native/theme`.
|
|
12
|
+
|
|
13
|
+
Please see [this page](../../../docs/pages/Guides/UpdateThemeProvider.md) for information on updating your `ThemeProvider` if you are already using the older version from `@uifabricshared/theming-react-native`.
|
|
14
|
+
|
|
15
|
+
## Sample Code
|
|
16
|
+
|
|
17
|
+
Basic examples:
|
|
18
|
+
|
|
19
|
+
```jsx
|
|
20
|
+
function shimmerRects(): Array<ShimmerRectElement | ShimmerCircleElement> {
|
|
21
|
+
return [
|
|
22
|
+
{
|
|
23
|
+
type: 'rect',
|
|
24
|
+
borderRadiusX: 3,
|
|
25
|
+
borderRadiusY: 3,
|
|
26
|
+
width: 100,
|
|
27
|
+
height: 20,
|
|
28
|
+
x: 90,
|
|
29
|
+
y: 70,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: 'rect',
|
|
33
|
+
borderRadiusX: 3,
|
|
34
|
+
borderRadiusY: 3,
|
|
35
|
+
width: 150,
|
|
36
|
+
height: 20,
|
|
37
|
+
x: 90,
|
|
38
|
+
y: 42,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: 'rect',
|
|
42
|
+
borderRadiusX: 3,
|
|
43
|
+
borderRadiusY: 3,
|
|
44
|
+
width: 200,
|
|
45
|
+
height: 20,
|
|
46
|
+
x: 90,
|
|
47
|
+
y: 15,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: 'circle',
|
|
51
|
+
radius: 30,
|
|
52
|
+
cx: 40,
|
|
53
|
+
cy: 55,
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
<Shimmer elements={shimmerRects()} style={{ width: 300, height: 100 }} />;
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
More examples on the [Test pages for the Shimmer](../../../apps/fluent-tester/src/TestComponents/Shimmer). Instructions on running the tester app can be found [here](../../../apps/fluent-tester/README.md).
|
|
61
|
+
|
|
62
|
+
## Visual Examples
|
|
63
|
+
|
|
64
|
+
Win32:
|
|
65
|
+
|
|
66
|
+
Dark:
|
|
67
|
+

|
|
68
|
+
|
|
69
|
+
Light:
|
|
70
|
+

|
|
71
|
+
|
|
72
|
+
Android:
|
|
73
|
+
|
|
74
|
+
Dark:
|
|
75
|
+

|
|
76
|
+
|
|
77
|
+
Light:
|
|
78
|
+

|
|
79
|
+
|
|
80
|
+
## API
|
|
81
|
+
|
|
82
|
+
### Slots
|
|
83
|
+
|
|
84
|
+
The `Shimmer` component has only one slot, or part. The slot behaves as follows:
|
|
85
|
+
|
|
86
|
+
- `root` - The outer container representing the `Shimmer` itself that wraps everything passed via the `children` prop.
|
|
87
|
+
|
|
88
|
+
On Win32 though, the `Shimmer` component has four slots, or parts. The slots behave as follows:
|
|
89
|
+
|
|
90
|
+
- `root` - The outer container representing the `Shimmer` itself that wraps everything passed via the `children` prop.
|
|
91
|
+
- `shimmerWave` - The shimmer wave is rendered here.
|
|
92
|
+
- `shimmerWaveContainer` - Container of the shimmer wave. This is responsible for the animation in win32.
|
|
93
|
+
- `clippingMask` - Mask placed along with the shimmer wave to render elements passed.
|
|
94
|
+
|
|
95
|
+
The slots can be modified using the `compose` function on the `Shimmer`. For more information on using the `compose` API, please see [this page](../../framework/composition/README.md).
|
|
96
|
+
|
|
97
|
+
### Props
|
|
98
|
+
|
|
99
|
+
Below is the set of props the Shimmer supports:
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
export interface ShimmerCircleElement {
|
|
103
|
+
/**
|
|
104
|
+
* Shimmer element type.
|
|
105
|
+
*/
|
|
106
|
+
type: 'circle';
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Radius of the circle element.
|
|
110
|
+
* @defaultValue 12
|
|
111
|
+
*/
|
|
112
|
+
radius?: number;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Note: cx and cy should be optional properties [or removed], with relative positioning being the default [or only] positioning mechanism.
|
|
116
|
+
* Note: The behavior of element intersections is undefined. https://www.github.com/Microsoft/fluentui-react-native Issue #866
|
|
117
|
+
*/
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The x-axis center of the circle element in the Shimmer relative to the origin [top-left, (0,0)].
|
|
121
|
+
*/
|
|
122
|
+
cx: number;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* The y-axis center of the circle element in the Shimmer relative to the origin [top-left, (0,0)].
|
|
126
|
+
*/
|
|
127
|
+
cy: number;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Properties necessary to define a rectangular Shimmer element.
|
|
132
|
+
*/
|
|
133
|
+
export interface ShimmerRectElement {
|
|
134
|
+
/**
|
|
135
|
+
* Shimmer element type.
|
|
136
|
+
*/
|
|
137
|
+
type: 'rect';
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Width of the rect.
|
|
141
|
+
* @defaultValue 100%
|
|
142
|
+
*/
|
|
143
|
+
width?: number;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Height of the rect.
|
|
147
|
+
* @defaultValue 16
|
|
148
|
+
*/
|
|
149
|
+
height?: number;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Border radius for the x-axis of a rounded rect.
|
|
153
|
+
* @defaultValue 0
|
|
154
|
+
*/
|
|
155
|
+
borderRadiusX?: number;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Border radius for the y-axis of a rounded rect.
|
|
159
|
+
* @defaultValue 0
|
|
160
|
+
*/
|
|
161
|
+
borderRadiusY?: number;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Note: x and y should be optional properties [or removed], with relative positioning being the default [or only] positioning mechanism.
|
|
165
|
+
* Note: The behavior of element intersections is undefined. https://www.github.com/Microsoft/fluentui-react-native Issue #866
|
|
166
|
+
*/
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The x-axis position of the rect element's top-left corner in the Shimmer relative to the origin [top-left, (0,0)].
|
|
170
|
+
*/
|
|
171
|
+
x: number;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The y-axis position of the rect element's top-left corner in the Shimmer relative to the origin [top-left, (0,0)].
|
|
175
|
+
*/
|
|
176
|
+
y: number;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export type ShimmerElementTypes = ShimmerCircleElement | ShimmerRectElement;
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
```ts
|
|
183
|
+
export interface ShimmerProps extends ViewProps {
|
|
184
|
+
/**
|
|
185
|
+
* Shimmer shapes that define the masking effect of the Shimmer control.
|
|
186
|
+
*/
|
|
187
|
+
elements: Array<ShimmerElementTypes>;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Specifies the Shimmer effect angle in degrees (produced by a gradient).
|
|
191
|
+
*
|
|
192
|
+
* @defaultValue 45 on @platform Android
|
|
193
|
+
* @defaultValue 0 on other platforms.
|
|
194
|
+
*/
|
|
195
|
+
angle?: number;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Specifies the animation delay time in milliseconds.
|
|
199
|
+
*
|
|
200
|
+
* @defaultValue 500 on @platform win32
|
|
201
|
+
* @defaultValue 0 on other platforms.
|
|
202
|
+
*/
|
|
203
|
+
delay?: number;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Specifies the time required to traverse the control in milliseconds.
|
|
207
|
+
*
|
|
208
|
+
* @defaultValue 1000 on @platform Android
|
|
209
|
+
* @defaultValue 2000 on @platform win32
|
|
210
|
+
* @defaultValue 7000 on other platforms.
|
|
211
|
+
*/
|
|
212
|
+
duration?: number;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Specifies the opacity of the shimmer color.
|
|
216
|
+
* @defaultValue 1
|
|
217
|
+
*/
|
|
218
|
+
shimmerColorOpacity?: number;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Specifies the opacity of the wave color.
|
|
222
|
+
* @defaultValue 1
|
|
223
|
+
*/
|
|
224
|
+
shimmerWaveColorOpacity?: number;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Color you see when the shimmer wave is not animating.
|
|
228
|
+
*
|
|
229
|
+
* @defaultValue theme.colors.neutralStencil1 on @platform Android
|
|
230
|
+
* @defaultValue theme.colors.bodyFrameDivider on @platform win32
|
|
231
|
+
* @defaultValue #E1E1E1/#404040 for light/dark theme on other platforms.
|
|
232
|
+
*/
|
|
233
|
+
shimmerColor?: ColorValue;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Defines the tip color of the wave which has a linear gradient.
|
|
237
|
+
* from shimmerColor to shimmerWaveColor to shimmerColor.
|
|
238
|
+
*
|
|
239
|
+
* @defaultValue theme.colors.neutralStencil2 on @platform Android
|
|
240
|
+
* @defaultValue #E1E1E1 on @platform win32
|
|
241
|
+
* @defaultValue white/black for light/dark theme on other platforms.
|
|
242
|
+
*/
|
|
243
|
+
shimmerWaveColor?: ColorValue;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Width of the Shimmer wave.
|
|
247
|
+
*
|
|
248
|
+
* @defaultValue '100%' of the 'width' property
|
|
249
|
+
* @platform win32
|
|
250
|
+
*/
|
|
251
|
+
shimmerWaveWidth?: number | string;
|
|
252
|
+
}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Styling Tokens
|
|
256
|
+
|
|
257
|
+
Tokens can be used to customize the styling of the control by using the `customize` function on the `Shimmer`. For more information on using the `customize` API, please see [this page](../../framework/composition/README.md). The `Shimmer` has the following tokens:
|
|
258
|
+
|
|
259
|
+
```ts
|
|
260
|
+
export interface ShimmerTokens extends IBackgroundColorTokens {
|
|
261
|
+
/**
|
|
262
|
+
* Specifies the Shimmer effect angle in degrees (produced by a gradient)
|
|
263
|
+
* @defaultValue 45 on Android, 0 on other platforms
|
|
264
|
+
*/
|
|
265
|
+
angle?: number;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Specifies the animation delay time in milliseconds
|
|
269
|
+
* @defaultValue 500 on win32, 0 on other platforms
|
|
270
|
+
*/
|
|
271
|
+
delay?: number;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Specifies the time required to traverse the control in milliseconds
|
|
275
|
+
*
|
|
276
|
+
* @defaultValue 1000 on Android, 2000 on win32, 7000 on other platforms
|
|
277
|
+
*/
|
|
278
|
+
duration?: number;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Specifies the opacity of the shimmer color.
|
|
282
|
+
* @defaultValue 1
|
|
283
|
+
*/
|
|
284
|
+
shimmerColorOpacity?: number;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Specifies the opacity of the wave color.
|
|
288
|
+
* @defaultValue 1
|
|
289
|
+
*/
|
|
290
|
+
shimmerWaveColorOpacity?: number;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Color you see when the shimmer wave is not animating.
|
|
294
|
+
*
|
|
295
|
+
* @defaultValue theme.colors.neutralStencil1 on Android, theme.colors.bodyFrameDivider on win32, #E1E1E1/#404040 on other platforms for light/dark theme
|
|
296
|
+
*/
|
|
297
|
+
shimmerColor?: ColorValue;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Defines the tip color of the wave which has a linear gradient.
|
|
301
|
+
* from shimmerColor to shimmerWaveColor to shimmerColor.
|
|
302
|
+
*
|
|
303
|
+
* @defaultValue theme.colors.neutralStencil2 on Android, #E1E1E1 on win32, white/black on other platforms for light/dark theme
|
|
304
|
+
*/
|
|
305
|
+
shimmerWaveColor?: ColorValue;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Width of the Shimmer wave.
|
|
309
|
+
* @defaultValue '100%' of the 'width' property
|
|
310
|
+
* @platform win32
|
|
311
|
+
*/
|
|
312
|
+
shimmerWaveWidth?: number | string;
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
## Behaviors
|
|
317
|
+
|
|
318
|
+
### States
|
|
319
|
+
|
|
320
|
+
There is only one default state for `Shimmer`.
|
|
321
|
+
|
|
322
|
+
### Interaction
|
|
323
|
+
|
|
324
|
+
There are no interactions available for `Shimmer`.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/Shimmer.types.d.ts
CHANGED
|
@@ -72,19 +72,25 @@ export interface ShimmerRectElement {
|
|
|
72
72
|
export declare type ShimmerElementTypes = ShimmerCircleElement | ShimmerRectElement;
|
|
73
73
|
export interface ShimmerTokens extends IBackgroundColorTokens {
|
|
74
74
|
/**
|
|
75
|
-
* Specifies the Shimmer effect angle in degrees (produced by a gradient)
|
|
76
|
-
*
|
|
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.
|
|
77
79
|
*/
|
|
78
80
|
angle?: number;
|
|
79
81
|
/**
|
|
80
|
-
* Specifies the animation delay time in milliseconds
|
|
81
|
-
*
|
|
82
|
+
* Specifies the animation delay time in milliseconds.
|
|
83
|
+
*
|
|
84
|
+
* @defaultValue 500 on @platform win32
|
|
85
|
+
* @defaultValue 0 on other platforms.
|
|
82
86
|
*/
|
|
83
87
|
delay?: number;
|
|
84
88
|
/**
|
|
85
|
-
* Specifies the time required to traverse the control in milliseconds
|
|
89
|
+
* Specifies the time required to traverse the control in milliseconds.
|
|
86
90
|
*
|
|
87
|
-
* @defaultValue
|
|
91
|
+
* @defaultValue 1000 on @platform Android
|
|
92
|
+
* @defaultValue 2000 on @platform win32
|
|
93
|
+
* @defaultValue 7000 on other platforms.
|
|
88
94
|
*/
|
|
89
95
|
duration?: number;
|
|
90
96
|
/**
|
|
@@ -100,19 +106,25 @@ export interface ShimmerTokens extends IBackgroundColorTokens {
|
|
|
100
106
|
/**
|
|
101
107
|
* Color you see when the shimmer wave is not animating.
|
|
102
108
|
*
|
|
103
|
-
* @defaultValue theme.colors.
|
|
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.
|
|
104
112
|
*/
|
|
105
113
|
shimmerColor?: ColorValue;
|
|
106
114
|
/**
|
|
107
115
|
* Defines the tip color of the wave which has a linear gradient.
|
|
108
116
|
* from shimmerColor to shimmerWaveColor to shimmerColor.
|
|
109
117
|
*
|
|
110
|
-
* @defaultValue
|
|
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.
|
|
111
121
|
*/
|
|
112
122
|
shimmerWaveColor?: ColorValue;
|
|
113
123
|
/**
|
|
114
124
|
* Width of the Shimmer wave.
|
|
125
|
+
*
|
|
115
126
|
* @defaultValue '100%' of the 'width' property
|
|
127
|
+
* @platform win32
|
|
116
128
|
*/
|
|
117
129
|
shimmerWaveWidth?: number | string;
|
|
118
130
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Shimmer.types.d.ts","sourceRoot":"","sources":["../src/Shimmer.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,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;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IAEH;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;CACX;AAED,oBAAY,mBAAmB,GAAG,oBAAoB,GAAG,kBAAkB,CAAC;AAE5E,MAAM,WAAW,aAAc,SAAQ,sBAAsB;IAC3D
|
|
1
|
+
{"version":3,"file":"Shimmer.types.d.ts","sourceRoot":"","sources":["../src/Shimmer.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,eAAO,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E,QAAQ,CAAC;CAChB;AAED,MAAM,WAAW,YAAa,SAAQ,SAAS,EAAE,aAAa;IAC5D;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,MAAM,EAAE,aAAa,CAAC;CACvB"}
|
|
@@ -72,19 +72,25 @@ export interface ShimmerRectElement {
|
|
|
72
72
|
export declare type ShimmerElementTypes = ShimmerCircleElement | ShimmerRectElement;
|
|
73
73
|
export interface ShimmerTokens extends IBackgroundColorTokens {
|
|
74
74
|
/**
|
|
75
|
-
* Specifies the Shimmer effect angle in degrees (produced by a gradient)
|
|
76
|
-
*
|
|
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.
|
|
77
79
|
*/
|
|
78
80
|
angle?: number;
|
|
79
81
|
/**
|
|
80
|
-
* Specifies the animation delay time in milliseconds
|
|
81
|
-
*
|
|
82
|
+
* Specifies the animation delay time in milliseconds.
|
|
83
|
+
*
|
|
84
|
+
* @defaultValue 500 on @platform win32
|
|
85
|
+
* @defaultValue 0 on other platforms.
|
|
82
86
|
*/
|
|
83
87
|
delay?: number;
|
|
84
88
|
/**
|
|
85
|
-
* Specifies the time required to traverse the control in milliseconds
|
|
89
|
+
* Specifies the time required to traverse the control in milliseconds.
|
|
86
90
|
*
|
|
87
|
-
* @defaultValue
|
|
91
|
+
* @defaultValue 1000 on @platform Android
|
|
92
|
+
* @defaultValue 2000 on @platform win32
|
|
93
|
+
* @defaultValue 7000 on other platforms.
|
|
88
94
|
*/
|
|
89
95
|
duration?: number;
|
|
90
96
|
/**
|
|
@@ -100,19 +106,25 @@ export interface ShimmerTokens extends IBackgroundColorTokens {
|
|
|
100
106
|
/**
|
|
101
107
|
* Color you see when the shimmer wave is not animating.
|
|
102
108
|
*
|
|
103
|
-
* @defaultValue theme.colors.
|
|
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.
|
|
104
112
|
*/
|
|
105
113
|
shimmerColor?: ColorValue;
|
|
106
114
|
/**
|
|
107
115
|
* Defines the tip color of the wave which has a linear gradient.
|
|
108
116
|
* from shimmerColor to shimmerWaveColor to shimmerColor.
|
|
109
117
|
*
|
|
110
|
-
* @defaultValue
|
|
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.
|
|
111
121
|
*/
|
|
112
122
|
shimmerWaveColor?: ColorValue;
|
|
113
123
|
/**
|
|
114
124
|
* Width of the Shimmer wave.
|
|
125
|
+
*
|
|
115
126
|
* @defaultValue '100%' of the 'width' property
|
|
127
|
+
* @platform win32
|
|
116
128
|
*/
|
|
117
129
|
shimmerWaveWidth?: number | string;
|
|
118
130
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Shimmer.types.d.ts","sourceRoot":"","sources":["../src/Shimmer.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,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,MAA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
"description": "A cross-platform Fluent Shimmer component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"directory": "packages/experimental/Shimmer"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@fluentui-react-native/framework": "0.8.
|
|
26
|
-
"@fluentui-react-native/tokens": ">=0.20.
|
|
27
|
-
"@fluentui-react-native/theming-utils": ">=0.23.
|
|
25
|
+
"@fluentui-react-native/framework": "0.8.37",
|
|
26
|
+
"@fluentui-react-native/tokens": ">=0.20.6 <1.0.0",
|
|
27
|
+
"@fluentui-react-native/theming-utils": ">=0.23.1 <1.0.0",
|
|
28
28
|
"@fluentui-react-native/component-cache": "^1.4.2",
|
|
29
29
|
"@fluentui-react-native/use-styling": "^0.9.1",
|
|
30
30
|
"react-native-svg": "12.5.0"
|
package/src/Shimmer.types.ts
CHANGED
|
@@ -88,21 +88,27 @@ export type ShimmerElementTypes = ShimmerCircleElement | ShimmerRectElement;
|
|
|
88
88
|
|
|
89
89
|
export interface ShimmerTokens extends IBackgroundColorTokens {
|
|
90
90
|
/**
|
|
91
|
-
* Specifies the Shimmer effect angle in degrees (produced by a gradient)
|
|
92
|
-
*
|
|
91
|
+
* Specifies the Shimmer effect angle in degrees (produced by a gradient).
|
|
92
|
+
*
|
|
93
|
+
* @defaultValue 45 on @platform Android
|
|
94
|
+
* @defaultValue 0 on other platforms.
|
|
93
95
|
*/
|
|
94
96
|
angle?: number;
|
|
95
97
|
|
|
96
98
|
/**
|
|
97
|
-
* Specifies the animation delay time in milliseconds
|
|
98
|
-
*
|
|
99
|
+
* Specifies the animation delay time in milliseconds.
|
|
100
|
+
*
|
|
101
|
+
* @defaultValue 500 on @platform win32
|
|
102
|
+
* @defaultValue 0 on other platforms.
|
|
99
103
|
*/
|
|
100
104
|
delay?: number;
|
|
101
105
|
|
|
102
106
|
/**
|
|
103
|
-
* Specifies the time required to traverse the control in milliseconds
|
|
107
|
+
* Specifies the time required to traverse the control in milliseconds.
|
|
104
108
|
*
|
|
105
|
-
* @defaultValue
|
|
109
|
+
* @defaultValue 1000 on @platform Android
|
|
110
|
+
* @defaultValue 2000 on @platform win32
|
|
111
|
+
* @defaultValue 7000 on other platforms.
|
|
106
112
|
*/
|
|
107
113
|
duration?: number;
|
|
108
114
|
|
|
@@ -121,7 +127,9 @@ export interface ShimmerTokens extends IBackgroundColorTokens {
|
|
|
121
127
|
/**
|
|
122
128
|
* Color you see when the shimmer wave is not animating.
|
|
123
129
|
*
|
|
124
|
-
* @defaultValue theme.colors.
|
|
130
|
+
* @defaultValue theme.colors.neutralStencil1 on @platform Android
|
|
131
|
+
* @defaultValue theme.colors.bodyFrameDivider on @platform win32
|
|
132
|
+
* @defaultValue #E1E1E1/#404040 for light/dark theme on other platforms.
|
|
125
133
|
*/
|
|
126
134
|
shimmerColor?: ColorValue;
|
|
127
135
|
|
|
@@ -129,13 +137,17 @@ export interface ShimmerTokens extends IBackgroundColorTokens {
|
|
|
129
137
|
* Defines the tip color of the wave which has a linear gradient.
|
|
130
138
|
* from shimmerColor to shimmerWaveColor to shimmerColor.
|
|
131
139
|
*
|
|
132
|
-
* @defaultValue
|
|
140
|
+
* @defaultValue theme.colors.neutralStencil2 on @platform Android
|
|
141
|
+
* @defaultValue #E1E1E1 on @platform win32
|
|
142
|
+
* @defaultValue white/black for light/dark theme on other platforms.
|
|
133
143
|
*/
|
|
134
144
|
shimmerWaveColor?: ColorValue;
|
|
135
145
|
|
|
136
146
|
/**
|
|
137
147
|
* Width of the Shimmer wave.
|
|
148
|
+
*
|
|
138
149
|
* @defaultValue '100%' of the 'width' property
|
|
150
|
+
* @platform win32
|
|
139
151
|
*/
|
|
140
152
|
shimmerWaveWidth?: number | string;
|
|
141
153
|
}
|