@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.
- package/CHANGELOG.md +35 -0
- package/lib/Shimmer.d.ts +2 -7
- package/lib/Shimmer.d.ts.map +1 -1
- package/lib/Shimmer.js +77 -149
- package/lib/Shimmer.js.map +1 -1
- package/lib/Shimmer.styling.d.ts +1 -1
- package/lib/Shimmer.styling.js +26 -29
- package/lib/Shimmer.styling.win32.d.ts +1 -1
- package/lib/Shimmer.styling.win32.js +24 -36
- package/lib/Shimmer.test.d.ts +1 -1
- package/lib/Shimmer.test.js +45 -45
- package/lib/Shimmer.test.js.map +1 -1
- package/lib/Shimmer.types.d.ts +2 -10
- package/lib/Shimmer.types.js +1 -1
- package/lib/Shimmer.types.shared.d.ts +123 -123
- package/lib/Shimmer.types.shared.d.ts.map +1 -1
- package/lib/Shimmer.types.shared.js +1 -1
- package/lib/Shimmer.types.win32.d.ts +26 -26
- package/lib/Shimmer.types.win32.js +1 -1
- package/lib/Shimmer.win32.d.ts +2 -7
- package/lib/Shimmer.win32.js +107 -137
- package/lib/ShimmerTokens.android.d.ts +1 -1
- package/lib/ShimmerTokens.android.js +8 -8
- package/lib/ShimmerTokens.android.js.map +1 -1
- package/lib/ShimmerTokens.d.ts +1 -1
- package/lib/ShimmerTokens.ios.d.ts +1 -1
- package/lib/ShimmerTokens.ios.js +8 -8
- package/lib/ShimmerTokens.ios.js.map +1 -1
- package/lib/ShimmerTokens.js +9 -9
- package/lib/ShimmerTokens.js.map +1 -1
- package/lib/ShimmerTokens.win32.d.ts +1 -1
- package/lib/ShimmerTokens.win32.js +10 -10
- package/lib/ShimmerTokens.win32.js.map +1 -1
- package/lib/SvgShapeToPath.d.ts +1 -1
- package/lib/SvgShapeToPath.js +120 -134
- package/lib/Win32ShimmerNativeComponent.d.ts +4 -4
- package/lib/Win32ShimmerNativeComponent.js +1 -1
- package/lib/consts.android.d.ts +1 -1
- package/lib/consts.android.js +1 -1
- package/lib/consts.d.ts +1 -1
- package/lib/consts.ios.d.ts +1 -1
- package/lib/consts.ios.js +1 -1
- package/lib/consts.js +1 -1
- package/lib/consts.win32.d.ts +1 -1
- package/lib/consts.win32.js +1 -1
- package/lib/index.d.ts +2 -10
- package/lib/index.js +1 -1
- package/lib-commonjs/Shimmer.d.ts +2 -7
- package/lib-commonjs/Shimmer.d.ts.map +1 -1
- package/lib-commonjs/Shimmer.js +89 -163
- package/lib-commonjs/Shimmer.js.map +1 -1
- package/lib-commonjs/Shimmer.styling.d.ts +1 -1
- package/lib-commonjs/Shimmer.styling.js +31 -34
- package/lib-commonjs/Shimmer.styling.win32.d.ts +1 -1
- package/lib-commonjs/Shimmer.styling.win32.js +29 -41
- package/lib-commonjs/Shimmer.test.d.ts +1 -1
- package/lib-commonjs/Shimmer.test.js +79 -96
- package/lib-commonjs/Shimmer.test.js.map +1 -1
- package/lib-commonjs/Shimmer.types.d.ts +2 -10
- package/lib-commonjs/Shimmer.types.js +5 -10
- package/lib-commonjs/Shimmer.types.shared.d.ts +123 -123
- package/lib-commonjs/Shimmer.types.shared.d.ts.map +1 -1
- package/lib-commonjs/Shimmer.types.shared.js +3 -3
- package/lib-commonjs/Shimmer.types.win32.d.ts +26 -26
- package/lib-commonjs/Shimmer.types.win32.js +5 -10
- package/lib-commonjs/Shimmer.win32.d.ts +2 -7
- package/lib-commonjs/Shimmer.win32.js +120 -164
- package/lib-commonjs/ShimmerTokens.android.d.ts +1 -1
- package/lib-commonjs/ShimmerTokens.android.js +11 -11
- package/lib-commonjs/ShimmerTokens.android.js.map +1 -1
- package/lib-commonjs/ShimmerTokens.d.ts +1 -1
- package/lib-commonjs/ShimmerTokens.ios.d.ts +1 -1
- package/lib-commonjs/ShimmerTokens.ios.js +11 -11
- package/lib-commonjs/ShimmerTokens.ios.js.map +1 -1
- package/lib-commonjs/ShimmerTokens.js +13 -13
- package/lib-commonjs/ShimmerTokens.js.map +1 -1
- package/lib-commonjs/ShimmerTokens.win32.d.ts +1 -1
- package/lib-commonjs/ShimmerTokens.win32.js +13 -13
- package/lib-commonjs/ShimmerTokens.win32.js.map +1 -1
- package/lib-commonjs/SvgShapeToPath.d.ts +1 -1
- package/lib-commonjs/SvgShapeToPath.js +122 -136
- package/lib-commonjs/Win32ShimmerNativeComponent.d.ts +4 -4
- package/lib-commonjs/Win32ShimmerNativeComponent.js +4 -4
- package/lib-commonjs/consts.android.d.ts +1 -1
- package/lib-commonjs/consts.android.js +3 -3
- package/lib-commonjs/consts.d.ts +1 -1
- package/lib-commonjs/consts.ios.d.ts +1 -1
- package/lib-commonjs/consts.ios.js +3 -3
- package/lib-commonjs/consts.js +3 -3
- package/lib-commonjs/consts.win32.d.ts +1 -1
- package/lib-commonjs/consts.win32.js +3 -3
- package/lib-commonjs/index.d.ts +2 -10
- package/lib-commonjs/index.js +11 -36
- package/package.json +26 -25
- package/src/Shimmer.test.tsx +1 -1
- package/src/Shimmer.tsx +4 -14
- package/src/Shimmer.types.shared.ts +1 -1
- package/src/ShimmerTokens.android.ts +1 -1
- package/src/ShimmerTokens.ios.ts +1 -1
- package/src/ShimmerTokens.ts +1 -1
- package/src/ShimmerTokens.win32.ts +1 -1
- package/eslint.config.js +0 -3
|
@@ -1,179 +1,135 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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.Shimmer = void 0;
|
|
9
|
-
const jsx_runtime_1 = require(
|
|
7
|
+
const jsx_runtime_1 = require("@fluentui-react-native/framework-base/jsx-runtime");
|
|
10
8
|
/**
|
|
11
9
|
* Copyright (c) Microsoft Corporation.
|
|
12
10
|
* Licensed under the MIT License.
|
|
13
11
|
* @format
|
|
14
12
|
*/
|
|
15
13
|
/** @jsxImportSource @fluentui-react-native/framework-base */
|
|
16
|
-
const react_native_1 = require(
|
|
17
|
-
const framework_1 = require(
|
|
18
|
-
const assert_never_1 = require(
|
|
19
|
-
const react_native_svg_1 = require(
|
|
20
|
-
const Shimmer_styling_win32_1 = require(
|
|
21
|
-
const Shimmer_types_shared_1 = require(
|
|
22
|
-
const SvgShapeToPath_1 = require(
|
|
23
|
-
const Win32ShimmerNativeComponent_1 = __importDefault(require(
|
|
14
|
+
const react_native_1 = require("react-native");
|
|
15
|
+
const framework_1 = require("@fluentui-react-native/framework");
|
|
16
|
+
const assert_never_1 = require("assert-never");
|
|
17
|
+
const react_native_svg_1 = require("react-native-svg");
|
|
18
|
+
const Shimmer_styling_win32_1 = require("./Shimmer.styling.win32");
|
|
19
|
+
const Shimmer_types_shared_1 = require("./Shimmer.types.shared");
|
|
20
|
+
const SvgShapeToPath_1 = require("./SvgShapeToPath");
|
|
21
|
+
const Win32ShimmerNativeComponent_1 = __importDefault(require("./Win32ShimmerNativeComponent"));
|
|
24
22
|
const clippingMask = (props) => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
jsx_runtime_1.jsx(react_native_svg_1.Defs, {
|
|
42
|
-
children: jsx_runtime_1.jsx(react_native_svg_1.ClipPath, {
|
|
43
|
-
id: 'shimmerCuts',
|
|
44
|
-
children: jsx_runtime_1.jsx(react_native_svg_1.Path, { d: props.clipPath, clipRule: 'evenodd' }),
|
|
45
|
-
}),
|
|
46
|
-
}),
|
|
47
|
-
jsx_runtime_1.jsx(react_native_svg_1.Rect, { width: '100%', height: '100%', fill: backgroundColor, clipPath: 'url(#shimmerCuts)' }),
|
|
48
|
-
],
|
|
49
|
-
});
|
|
23
|
+
/**
|
|
24
|
+
* Absolute positioning is used to overlay the clipping mask on top of the shimmer wave.
|
|
25
|
+
*
|
|
26
|
+
* preserveAspectRatio = 'xMinYMin slice' asks the SVG to scale the viewBox up to fit the
|
|
27
|
+
* viewPort, starting from the origin of the viewPort and minimum coordinates of the viewBox.
|
|
28
|
+
* 'slice' removes the unnecessary remainder.
|
|
29
|
+
*/
|
|
30
|
+
const { backgroundColor, viewBoxHeight, viewBoxWidth } = props;
|
|
31
|
+
const svgProps = {
|
|
32
|
+
style: { position: 'absolute', height: viewBoxHeight, width: viewBoxWidth },
|
|
33
|
+
viewBox: '0 0 ' + viewBoxWidth + ' ' + viewBoxHeight,
|
|
34
|
+
preserveAspectRatio: 'xMinYMin slice',
|
|
35
|
+
};
|
|
36
|
+
return (jsx_runtime_1.jsxs(react_native_svg_1.Svg, { ...svgProps, children: [
|
|
37
|
+
jsx_runtime_1.jsx(react_native_svg_1.Defs, { children: jsx_runtime_1.jsx(react_native_svg_1.ClipPath, { id: "shimmerCuts", children: jsx_runtime_1.jsx(react_native_svg_1.Path, { d: props.clipPath, clipRule: "evenodd" }) }) }), jsx_runtime_1.jsx(react_native_svg_1.Rect, { width: "100%", height: "100%", fill: backgroundColor, clipPath: "url(#shimmerCuts)" })
|
|
38
|
+
] }));
|
|
50
39
|
};
|
|
51
40
|
const wave = (props) => {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
stopColor: shimmerWaveColor,
|
|
82
|
-
stopOpacity: shimmerWaveColorOpacity,
|
|
83
|
-
}),
|
|
84
|
-
jsx_runtime_1.jsx(react_native_svg_1.Stop, { offset: '40%', stopColor: shimmerColor, stopOpacity: shimmerColorOpacity }),
|
|
85
|
-
],
|
|
86
|
-
}),
|
|
87
|
-
jsx_runtime_1.jsx(react_native_svg_1.Rect, { width: props.shimmerWaveWidth, height: '100%', fill: 'url(#gradient)' }),
|
|
88
|
-
],
|
|
89
|
-
});
|
|
90
|
-
} else {
|
|
91
|
-
// The unexpected path where either of the provided shimmer colors are OpaqueColorValues.
|
|
92
|
-
// scaleX is used to mimic the gradient occupying 40% of the fill since we don't know the provided width of the
|
|
93
|
-
// shimmer wave.
|
|
94
|
-
return jsx_runtime_1.jsx(react_native_svg_1.Svg, {
|
|
95
|
-
...svgProps,
|
|
96
|
-
children: jsx_runtime_1.jsx(react_native_svg_1.Rect, {
|
|
97
|
-
width: props.shimmerWaveWidth,
|
|
98
|
-
height: '100%',
|
|
99
|
-
fill: shimmerWaveColor,
|
|
100
|
-
fillOpacity: shimmerWaveColorOpacity,
|
|
101
|
-
scaleX: '0.4',
|
|
102
|
-
}),
|
|
103
|
-
});
|
|
104
|
-
}
|
|
41
|
+
const { shimmerColor, shimmerColorOpacity, shimmerWaveColor, shimmerWaveColorOpacity, viewBoxHeight, viewBoxWidth } = props;
|
|
42
|
+
/**
|
|
43
|
+
* See the comment above for an explanation of preserveAspectRatio.
|
|
44
|
+
*/
|
|
45
|
+
const svgProps = {
|
|
46
|
+
style: { height: viewBoxHeight, width: viewBoxWidth },
|
|
47
|
+
viewBox: '0 0 ' + viewBoxWidth + ' ' + viewBoxHeight,
|
|
48
|
+
preserveAspectRatio: 'xMinYMin slice',
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* React-Native-SVG doesn't process opaque color values correctly for gradients, directly invoking `processColor`
|
|
52
|
+
* and squashing in the opacity value of the color stop. This handling scheme is incompatible with OpaqueColorValue type
|
|
53
|
+
* colors e.g. PlatformColor, and will show nothing. As a short-term solution, provide alternate non-gradient handling
|
|
54
|
+
* of the wave color as a solid color.
|
|
55
|
+
*/
|
|
56
|
+
if (typeof (0, react_native_1.processColor)(shimmerWaveColor) !== 'object' && typeof (0, react_native_1.processColor)(shimmerColor) !== 'object') {
|
|
57
|
+
// The typical path where the provided shimmer colors are not OpaqueColorValues.
|
|
58
|
+
return (jsx_runtime_1.jsxs(react_native_svg_1.Svg, { ...svgProps, children: [
|
|
59
|
+
jsx_runtime_1.jsxs(react_native_svg_1.LinearGradient, { id: "gradient", children: [
|
|
60
|
+
jsx_runtime_1.jsx(react_native_svg_1.Stop, { stopColor: shimmerColor, stopOpacity: shimmerColorOpacity }), jsx_runtime_1.jsx(react_native_svg_1.Stop, { offset: "20%", stopColor: shimmerWaveColor, stopOpacity: shimmerWaveColorOpacity }), jsx_runtime_1.jsx(react_native_svg_1.Stop, { offset: "40%", stopColor: shimmerColor, stopOpacity: shimmerColorOpacity })
|
|
61
|
+
] }), jsx_runtime_1.jsx(react_native_svg_1.Rect, { width: props.shimmerWaveWidth, height: "100%", fill: "url(#gradient)" })
|
|
62
|
+
] }));
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
// The unexpected path where either of the provided shimmer colors are OpaqueColorValues.
|
|
66
|
+
// scaleX is used to mimic the gradient occupying 40% of the fill since we don't know the provided width of the
|
|
67
|
+
// shimmer wave.
|
|
68
|
+
return (jsx_runtime_1.jsx(react_native_svg_1.Svg, { ...svgProps, children: jsx_runtime_1.jsx(react_native_svg_1.Rect, { width: props.shimmerWaveWidth, height: "100%", fill: shimmerWaveColor, fillOpacity: shimmerWaveColorOpacity, scaleX: "0.4" }) }));
|
|
69
|
+
}
|
|
105
70
|
};
|
|
106
71
|
const waveContainer = (props) => {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
...props,
|
|
110
|
-
style: { backgroundColor: shimmerColor, height: viewBoxHeight, width: viewBoxWidth, overflow: 'hidden' },
|
|
111
|
-
});
|
|
72
|
+
const { shimmerColor, viewBoxHeight, viewBoxWidth } = props;
|
|
73
|
+
return (jsx_runtime_1.jsx(Win32ShimmerNativeComponent_1.default, { ...props, style: { backgroundColor: shimmerColor, height: viewBoxHeight, width: viewBoxWidth, overflow: 'hidden' } }));
|
|
112
74
|
};
|
|
113
75
|
exports.Shimmer = (0, framework_1.compose)({
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}),
|
|
173
|
-
jsx_runtime_1.jsx(Slots.clippingMask, { clipPath: mergedClipPath, viewBoxHeight: yMax, viewBoxWidth: xMax }),
|
|
174
|
-
],
|
|
175
|
-
});
|
|
176
|
-
};
|
|
177
|
-
},
|
|
76
|
+
displayName: Shimmer_types_shared_1.shimmerName,
|
|
77
|
+
...Shimmer_styling_win32_1.stylingSettings,
|
|
78
|
+
slots: {
|
|
79
|
+
root: react_native_1.View,
|
|
80
|
+
clippingMask: clippingMask,
|
|
81
|
+
shimmerWave: wave,
|
|
82
|
+
shimmerWaveContainer: waveContainer,
|
|
83
|
+
},
|
|
84
|
+
useRender: (props, useSlots) => {
|
|
85
|
+
const Slots = useSlots(props);
|
|
86
|
+
return (rest) => {
|
|
87
|
+
const { elements, ...mergedProps } = (0, framework_1.mergeProps)(props, rest);
|
|
88
|
+
/**
|
|
89
|
+
* Generate a clip path from the provided element shapes, with their path parameter strings generated from their corresponding properties.
|
|
90
|
+
* Ideally this would be better possible with functions from the shape elements themselves and not to rely on our own calculations.
|
|
91
|
+
*
|
|
92
|
+
* One nuanced consideration is scaling the SVG with DPI. Without specifying a viewBox, points are considered to be pixels on an SVG canvas.
|
|
93
|
+
* When the native control is scaled the SVG canvas will scale up -- but pixel coordinates will not, changing the visual for different pixel densities.
|
|
94
|
+
* By providing a viewBox appropriate for our SVG the viewBox containing the graphics will be scaled up to fit the viewPort.
|
|
95
|
+
* Since we're programmatically generating the visual, we can assert our viewBox is `0 0 xMax yMax` where xMax and yMax are the greatest
|
|
96
|
+
* X and Y points used by a shape.
|
|
97
|
+
*/
|
|
98
|
+
let clipPathsAsMask = [];
|
|
99
|
+
let xMax = 0;
|
|
100
|
+
let yMax = 0;
|
|
101
|
+
if (elements) {
|
|
102
|
+
elements.forEach((element) => {
|
|
103
|
+
if (element.type == 'circle') {
|
|
104
|
+
clipPathsAsMask = clipPathsAsMask.concat((0, SvgShapeToPath_1.convertCircleToSvgPath)(element));
|
|
105
|
+
const xMaxCandidate = element.cx + element.radius;
|
|
106
|
+
const yMaxCandidate = element.cy + element.radius;
|
|
107
|
+
xMax = xMax >= xMaxCandidate ? xMax : xMaxCandidate;
|
|
108
|
+
yMax = yMax >= yMaxCandidate ? yMax : yMaxCandidate;
|
|
109
|
+
}
|
|
110
|
+
else if (element.type == 'rect') {
|
|
111
|
+
clipPathsAsMask = clipPathsAsMask.concat((0, SvgShapeToPath_1.convertRectToSvgPath)(element));
|
|
112
|
+
const xMaxCandidate = element.x + element.width;
|
|
113
|
+
const yMaxCandidate = element.y + element.height;
|
|
114
|
+
xMax = xMax >= xMaxCandidate ? xMax : xMaxCandidate;
|
|
115
|
+
yMax = yMax >= yMaxCandidate ? yMax : yMaxCandidate;
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
(0, assert_never_1.assertNever)(element);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Win32 D2D1 doesn't directly support SVG mask elements, so we're going to generate a mask
|
|
124
|
+
* by manipulating our clip path for the same effect. We do so utilizing the clip-rule='evenodd'
|
|
125
|
+
* and drawing a rectangle around the entire svg viewBox, causing all inner elements to be "clipped out"
|
|
126
|
+
* instead of "clipped around," generating the visual we desire with the linear gradient below the mask.
|
|
127
|
+
*/
|
|
128
|
+
const mergedClipPath = clipPathsAsMask.join(' ').concat('M 0 0 h ' + xMax + ' v ' + yMax + ' h -' + xMax + ' z ');
|
|
129
|
+
return (jsx_runtime_1.jsxs(Slots.root, { ...mergedProps, children: [
|
|
130
|
+
jsx_runtime_1.jsx(Slots.shimmerWaveContainer, { viewBoxHeight: yMax, viewBoxWidth: xMax, children: jsx_runtime_1.jsx(Slots.shimmerWave, { viewBoxHeight: yMax, viewBoxWidth: xMax }) }), jsx_runtime_1.jsx(Slots.clippingMask, { clipPath: mergedClipPath, viewBoxHeight: yMax, viewBoxWidth: xMax })
|
|
131
|
+
] }));
|
|
132
|
+
};
|
|
133
|
+
},
|
|
178
134
|
});
|
|
179
|
-
//# sourceMappingURL=Shimmer.win32.js.map
|
|
135
|
+
//# sourceMappingURL=Shimmer.win32.js.map
|
|
@@ -2,4 +2,4 @@ import type { Theme } from '@fluentui-react-native/framework';
|
|
|
2
2
|
import type { TokenSettings } from '@fluentui-react-native/use-styling';
|
|
3
3
|
import type { ShimmerTokens } from './Shimmer.types';
|
|
4
4
|
export declare const defaultShimmerTokens: TokenSettings<ShimmerTokens, Theme>;
|
|
5
|
-
//# sourceMappingURL=ShimmerTokens.android.d.ts.map
|
|
5
|
+
//# sourceMappingURL=ShimmerTokens.android.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultShimmerTokens = void 0;
|
|
4
|
-
const consts_1 = require(
|
|
4
|
+
const consts_1 = require("./consts");
|
|
5
5
|
const defaultShimmerTokens = (theme) => ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
angle: consts_1.shimmerDefaultAngle,
|
|
7
|
+
delay: consts_1.shimmerDefaultDelay,
|
|
8
|
+
duration: consts_1.shimmerDefaultDuration,
|
|
9
|
+
shimmerColor: theme.colors.neutralStencil1,
|
|
10
|
+
shimmerColorOpacity: 1,
|
|
11
|
+
shimmerWaveColor: theme.colors.neutralStencil2,
|
|
12
|
+
shimmerWaveColorOpacity: 1,
|
|
13
13
|
});
|
|
14
14
|
exports.defaultShimmerTokens = defaultShimmerTokens;
|
|
15
|
-
//# sourceMappingURL=ShimmerTokens.android.js.map
|
|
15
|
+
//# sourceMappingURL=ShimmerTokens.android.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShimmerTokens.android.js","sourceRoot":"","sources":["../src/ShimmerTokens.android.ts"],"names":[],"mappings":";;;AAGA,qCAA4F;AAGrF,MAAM,oBAAoB,GAAwC,CAAC,KAAY,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"ShimmerTokens.android.js","sourceRoot":"","sources":["../src/ShimmerTokens.android.ts"],"names":[],"mappings":";;;AAGA,qCAA4F;AAGrF,MAAM,oBAAoB,GAAwC,CAAC,KAAY,EAAE,EAAE,CACxF,CAAC;IACC,KAAK,EAAE,4BAAmB;IAC1B,KAAK,EAAE,4BAAmB;IAC1B,QAAQ,EAAE,+BAAsB;IAChC,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,eAAe;IAC1C,mBAAmB,EAAE,CAAC;IACtB,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,eAAe;IAC9C,uBAAuB,EAAE,CAAC;CAC3B,CAAkB,CAAC;AATT,QAAA,oBAAoB,GAApB,oBAAoB,CASX"}
|
|
@@ -2,4 +2,4 @@ import type { Theme } from '@fluentui-react-native/framework';
|
|
|
2
2
|
import type { TokenSettings } from '@fluentui-react-native/use-styling';
|
|
3
3
|
import type { ShimmerTokens } from './Shimmer.types';
|
|
4
4
|
export declare const defaultShimmerTokens: TokenSettings<ShimmerTokens, Theme>;
|
|
5
|
-
//# sourceMappingURL=ShimmerTokens.d.ts.map
|
|
5
|
+
//# sourceMappingURL=ShimmerTokens.d.ts.map
|
|
@@ -2,4 +2,4 @@ import type { Theme } from '@fluentui-react-native/framework';
|
|
|
2
2
|
import type { TokenSettings } from '@fluentui-react-native/use-styling';
|
|
3
3
|
import type { ShimmerTokens } from './Shimmer.types';
|
|
4
4
|
export declare const defaultShimmerTokens: TokenSettings<ShimmerTokens, Theme>;
|
|
5
|
-
//# sourceMappingURL=ShimmerTokens.ios.d.ts.map
|
|
5
|
+
//# sourceMappingURL=ShimmerTokens.ios.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultShimmerTokens = void 0;
|
|
4
|
-
const consts_1 = require(
|
|
4
|
+
const consts_1 = require("./consts");
|
|
5
5
|
const defaultShimmerTokens = (theme) => ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
angle: consts_1.shimmerDefaultAngle,
|
|
7
|
+
delay: consts_1.shimmerDefaultDelay,
|
|
8
|
+
duration: consts_1.shimmerDefaultDuration,
|
|
9
|
+
shimmerColor: theme.colors.neutralStencil1,
|
|
10
|
+
shimmerColorOpacity: 1,
|
|
11
|
+
shimmerWaveColor: theme.colors.neutralStencil2,
|
|
12
|
+
shimmerWaveColorOpacity: 1,
|
|
13
13
|
});
|
|
14
14
|
exports.defaultShimmerTokens = defaultShimmerTokens;
|
|
15
|
-
//# sourceMappingURL=ShimmerTokens.ios.js.map
|
|
15
|
+
//# sourceMappingURL=ShimmerTokens.ios.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShimmerTokens.ios.js","sourceRoot":"","sources":["../src/ShimmerTokens.ios.ts"],"names":[],"mappings":";;;AAGA,qCAA4F;AAGrF,MAAM,oBAAoB,GAAwC,CAAC,KAAY,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"ShimmerTokens.ios.js","sourceRoot":"","sources":["../src/ShimmerTokens.ios.ts"],"names":[],"mappings":";;;AAGA,qCAA4F;AAGrF,MAAM,oBAAoB,GAAwC,CAAC,KAAY,EAAE,EAAE,CACxF,CAAC;IACC,KAAK,EAAE,4BAAmB;IAC1B,KAAK,EAAE,4BAAmB;IAC1B,QAAQ,EAAE,+BAAsB;IAChC,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,eAAe;IAC1C,mBAAmB,EAAE,CAAC;IACtB,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,eAAe;IAC9C,uBAAuB,EAAE,CAAC;CAC3B,CAAkB,CAAC;AATT,QAAA,oBAAoB,GAApB,oBAAoB,CASX"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultShimmerTokens = void 0;
|
|
4
|
-
const theming_utils_1 = require(
|
|
5
|
-
const consts_1 = require(
|
|
4
|
+
const theming_utils_1 = require("@fluentui-react-native/theming-utils");
|
|
5
|
+
const consts_1 = require("./consts");
|
|
6
6
|
const defaultShimmerTokens = (theme) => ({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
angle: consts_1.shimmerDefaultAngle,
|
|
8
|
+
backgroundColor: theme.colors.transparentBackground,
|
|
9
|
+
delay: consts_1.shimmerDefaultDelay,
|
|
10
|
+
duration: consts_1.shimmerDefaultDuration,
|
|
11
|
+
shimmerColor: (0, theming_utils_1.getCurrentAppearance)(theme.host.appearance, 'light') === 'light' ? '#E1E1E1' : '#404040',
|
|
12
|
+
shimmerColorOpacity: 1,
|
|
13
|
+
shimmerWaveColor: (0, theming_utils_1.getCurrentAppearance)(theme.host.appearance, 'light') === 'light' ? 'white' : 'black',
|
|
14
|
+
shimmerWaveColorOpacity: 1,
|
|
15
15
|
});
|
|
16
16
|
exports.defaultShimmerTokens = defaultShimmerTokens;
|
|
17
|
-
//# sourceMappingURL=ShimmerTokens.js.map
|
|
17
|
+
//# sourceMappingURL=ShimmerTokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShimmerTokens.js","sourceRoot":"","sources":["../src/ShimmerTokens.ts"],"names":[],"mappings":";;;AACA,wEAA4E;AAG5E,qCAA4F;AAGrF,MAAM,oBAAoB,GAAwC,CAAC,KAAY,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"ShimmerTokens.js","sourceRoot":"","sources":["../src/ShimmerTokens.ts"],"names":[],"mappings":";;;AACA,wEAA4E;AAG5E,qCAA4F;AAGrF,MAAM,oBAAoB,GAAwC,CAAC,KAAY,EAAE,EAAE,CACxF,CAAC;IACC,KAAK,EAAE,4BAAmB;IAC1B,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,qBAAqB;IACnD,KAAK,EAAE,4BAAmB;IAC1B,QAAQ,EAAE,+BAAsB;IAChC,YAAY,EAAE,IAAA,oCAAoB,EAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;IACtG,mBAAmB,EAAE,CAAC;IACtB,gBAAgB,EAAE,IAAA,oCAAoB,EAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;IACtG,uBAAuB,EAAE,CAAC;CAC3B,CAAkB,CAAC;AAVT,QAAA,oBAAoB,GAApB,oBAAoB,CAUX"}
|
|
@@ -2,4 +2,4 @@ import type { Theme } from '@fluentui-react-native/framework';
|
|
|
2
2
|
import type { TokenSettings } from '@fluentui-react-native/use-styling';
|
|
3
3
|
import type { ShimmerTokens } from './Shimmer.types';
|
|
4
4
|
export declare const defaultShimmerTokens: TokenSettings<ShimmerTokens, Theme>;
|
|
5
|
-
//# sourceMappingURL=ShimmerTokens.win32.d.ts.map
|
|
5
|
+
//# sourceMappingURL=ShimmerTokens.win32.d.ts.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultShimmerTokens = void 0;
|
|
4
|
-
const consts_1 = require(
|
|
4
|
+
const consts_1 = require("./consts");
|
|
5
5
|
const defaultShimmerTokens = (theme) => ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
angle: consts_1.shimmerDefaultAngle,
|
|
7
|
+
backgroundColor: theme.colors.background,
|
|
8
|
+
delay: consts_1.shimmerDefaultDelay,
|
|
9
|
+
duration: consts_1.shimmerDefaultDuration,
|
|
10
|
+
shimmerColor: theme.colors.bodyFrameDivider,
|
|
11
|
+
shimmerColorOpacity: 1,
|
|
12
|
+
shimmerWaveColor: '#E1E1E1',
|
|
13
|
+
shimmerWaveColorOpacity: 1,
|
|
14
|
+
shimmerWaveWidth: '100%',
|
|
15
15
|
});
|
|
16
16
|
exports.defaultShimmerTokens = defaultShimmerTokens;
|
|
17
|
-
//# sourceMappingURL=ShimmerTokens.win32.js.map
|
|
17
|
+
//# sourceMappingURL=ShimmerTokens.win32.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShimmerTokens.win32.js","sourceRoot":"","sources":["../src/ShimmerTokens.win32.ts"],"names":[],"mappings":";;;AAGA,qCAA4F;AAGrF,MAAM,oBAAoB,GAAwC,CAAC,KAAY,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"ShimmerTokens.win32.js","sourceRoot":"","sources":["../src/ShimmerTokens.win32.ts"],"names":[],"mappings":";;;AAGA,qCAA4F;AAGrF,MAAM,oBAAoB,GAAwC,CAAC,KAAY,EAAE,EAAE,CACxF,CAAC;IACC,KAAK,EAAE,4BAAmB;IAC1B,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU;IACxC,KAAK,EAAE,4BAAmB;IAC1B,QAAQ,EAAE,+BAAsB;IAChC,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,gBAAgB;IAC3C,mBAAmB,EAAE,CAAC;IACtB,gBAAgB,EAAE,SAAS;IAC3B,uBAAuB,EAAE,CAAC;IAC1B,gBAAgB,EAAE,MAAM;CACzB,CAAkB,CAAC;AAXT,QAAA,oBAAoB,GAApB,oBAAoB,CAWX"}
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
import type { ShimmerCircleElement, ShimmerRectElement } from './Shimmer.types';
|
|
16
16
|
export declare function convertRectToSvgPath(rectShape: ShimmerRectElement): string;
|
|
17
17
|
export declare function convertCircleToSvgPath(circleShape: ShimmerCircleElement): string;
|
|
18
|
-
//# sourceMappingURL=SvgShapeToPath.d.ts.map
|
|
18
|
+
//# sourceMappingURL=SvgShapeToPath.d.ts.map
|