@fluentui-react-native/framework 0.14.17 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/babel.config.js +1 -1
- package/lib/compose.d.ts +27 -12
- package/lib/compose.js +2 -2
- package/lib/compose.js.map +1 -1
- package/lib/compressible.d.ts +5 -2
- package/lib/compressible.js +8 -8
- package/lib/compressible.js.map +1 -1
- package/lib/compressible.test.d.ts +1 -1
- package/lib/compressible.test.js +67 -59
- package/lib/compressible.test.js.map +1 -1
- package/lib/index.d.ts +76 -6
- package/lib/index.js +16 -2
- package/lib/themeHelper.d.ts +1 -1
- package/lib/themeHelper.js +6 -6
- package/lib/themeHelper.js.map +1 -1
- package/lib/useFluentTheme.d.ts +1 -1
- package/lib/useFluentTheme.js +2 -2
- package/lib/useFluentTheme.js.map +1 -1
- package/lib/useStyling.d.ts +15 -4
- package/lib/useStyling.js +4 -4
- package/lib/useStyling.js.map +1 -1
- package/lib/useTokens.d.ts +1 -1
- package/lib/useTokens.js +2 -2
- package/lib/useTokens.js.map +1 -1
- package/lib-commonjs/compose.d.ts +27 -12
- package/lib-commonjs/compose.js +7 -8
- package/lib-commonjs/compose.js.map +1 -1
- package/lib-commonjs/compressible.d.ts +5 -2
- package/lib-commonjs/compressible.js +12 -13
- package/lib-commonjs/compressible.js.map +1 -1
- package/lib-commonjs/compressible.test.d.ts +1 -1
- package/lib-commonjs/compressible.test.js +134 -91
- package/lib-commonjs/compressible.test.js.map +1 -1
- package/lib-commonjs/index.d.ts +76 -6
- package/lib-commonjs/index.js +283 -55
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/themeHelper.d.ts +1 -1
- package/lib-commonjs/themeHelper.js +9 -9
- package/lib-commonjs/themeHelper.js.map +1 -1
- package/lib-commonjs/useFluentTheme.d.ts +1 -1
- package/lib-commonjs/useFluentTheme.js +7 -8
- package/lib-commonjs/useFluentTheme.js.map +1 -1
- package/lib-commonjs/useStyling.d.ts +15 -4
- package/lib-commonjs/useStyling.js +10 -11
- package/lib-commonjs/useStyling.js.map +1 -1
- package/lib-commonjs/useTokens.d.ts +1 -1
- package/lib-commonjs/useTokens.js +33 -13
- package/lib-commonjs/useTokens.js.map +1 -1
- package/package.json +68 -66
- package/src/compressible.test.tsx +15 -14
package/lib-commonjs/index.js
CHANGED
|
@@ -1,55 +1,283 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
3
|
-
exports.patchTokens =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Object.defineProperty(exports,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
+
exports.patchTokens =
|
|
4
|
+
exports.customizable =
|
|
5
|
+
exports.buildUseTokens =
|
|
6
|
+
exports.applyTokenLayers =
|
|
7
|
+
exports.applyPropsToTokens =
|
|
8
|
+
exports.buildUseStyling =
|
|
9
|
+
exports.buildProps =
|
|
10
|
+
exports.useFluentTheme =
|
|
11
|
+
exports.compressible =
|
|
12
|
+
exports.compose =
|
|
13
|
+
exports.useTheme =
|
|
14
|
+
exports.ThemeContext =
|
|
15
|
+
exports.processImmutable =
|
|
16
|
+
exports.immutableMergeCore =
|
|
17
|
+
exports.immutableMerge =
|
|
18
|
+
exports.buildUseSlots =
|
|
19
|
+
exports.withSlots =
|
|
20
|
+
exports.stagedComponent =
|
|
21
|
+
exports.renderSlot =
|
|
22
|
+
exports.useSlot =
|
|
23
|
+
exports.tokenBuilder =
|
|
24
|
+
exports.textTokens =
|
|
25
|
+
exports.shadowTokens =
|
|
26
|
+
exports.shadowStyles =
|
|
27
|
+
exports.layoutTokens =
|
|
28
|
+
exports.layoutStyles =
|
|
29
|
+
exports.getPaletteFromTheme =
|
|
30
|
+
exports.foregroundColorTokens =
|
|
31
|
+
exports.fontStyles =
|
|
32
|
+
exports.colorTokens =
|
|
33
|
+
exports.borderTokens =
|
|
34
|
+
exports.borderStyles =
|
|
35
|
+
exports.backgroundColorTokens =
|
|
36
|
+
exports.mergeStyles =
|
|
37
|
+
exports.mergeProps =
|
|
38
|
+
exports.memoize =
|
|
39
|
+
exports.getTypedMemoCache =
|
|
40
|
+
exports.getMemoCache =
|
|
41
|
+
void 0;
|
|
42
|
+
const framework_base_1 = require('@fluentui-react-native/framework-base');
|
|
43
|
+
Object.defineProperty(exports, 'getMemoCache', {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return framework_base_1.getMemoCache;
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, 'getTypedMemoCache', {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () {
|
|
52
|
+
return framework_base_1.getTypedMemoCache;
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, 'memoize', {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () {
|
|
58
|
+
return framework_base_1.memoize;
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
const framework_base_2 = require('@fluentui-react-native/framework-base');
|
|
62
|
+
Object.defineProperty(exports, 'mergeProps', {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function () {
|
|
65
|
+
return framework_base_2.mergeProps;
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, 'mergeStyles', {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function () {
|
|
71
|
+
return framework_base_2.mergeStyles;
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
const tokens_1 = require('@fluentui-react-native/tokens');
|
|
75
|
+
Object.defineProperty(exports, 'backgroundColorTokens', {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function () {
|
|
78
|
+
return tokens_1.backgroundColorTokens;
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
Object.defineProperty(exports, 'borderStyles', {
|
|
82
|
+
enumerable: true,
|
|
83
|
+
get: function () {
|
|
84
|
+
return tokens_1.borderStyles;
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(exports, 'borderTokens', {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function () {
|
|
90
|
+
return tokens_1.borderTokens;
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
Object.defineProperty(exports, 'colorTokens', {
|
|
94
|
+
enumerable: true,
|
|
95
|
+
get: function () {
|
|
96
|
+
return tokens_1.colorTokens;
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
Object.defineProperty(exports, 'fontStyles', {
|
|
100
|
+
enumerable: true,
|
|
101
|
+
get: function () {
|
|
102
|
+
return tokens_1.fontStyles;
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
Object.defineProperty(exports, 'foregroundColorTokens', {
|
|
106
|
+
enumerable: true,
|
|
107
|
+
get: function () {
|
|
108
|
+
return tokens_1.foregroundColorTokens;
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
Object.defineProperty(exports, 'getPaletteFromTheme', {
|
|
112
|
+
enumerable: true,
|
|
113
|
+
get: function () {
|
|
114
|
+
return tokens_1.getPaletteFromTheme;
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
Object.defineProperty(exports, 'layoutStyles', {
|
|
118
|
+
enumerable: true,
|
|
119
|
+
get: function () {
|
|
120
|
+
return tokens_1.layoutStyles;
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
Object.defineProperty(exports, 'layoutTokens', {
|
|
124
|
+
enumerable: true,
|
|
125
|
+
get: function () {
|
|
126
|
+
return tokens_1.layoutTokens;
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
Object.defineProperty(exports, 'shadowStyles', {
|
|
130
|
+
enumerable: true,
|
|
131
|
+
get: function () {
|
|
132
|
+
return tokens_1.shadowStyles;
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
Object.defineProperty(exports, 'shadowTokens', {
|
|
136
|
+
enumerable: true,
|
|
137
|
+
get: function () {
|
|
138
|
+
return tokens_1.shadowTokens;
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
Object.defineProperty(exports, 'textTokens', {
|
|
142
|
+
enumerable: true,
|
|
143
|
+
get: function () {
|
|
144
|
+
return tokens_1.textTokens;
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
Object.defineProperty(exports, 'tokenBuilder', {
|
|
148
|
+
enumerable: true,
|
|
149
|
+
get: function () {
|
|
150
|
+
return tokens_1.tokenBuilder;
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
const use_slot_1 = require('@fluentui-react-native/use-slot');
|
|
154
|
+
Object.defineProperty(exports, 'useSlot', {
|
|
155
|
+
enumerable: true,
|
|
156
|
+
get: function () {
|
|
157
|
+
return use_slot_1.useSlot;
|
|
158
|
+
},
|
|
159
|
+
});
|
|
160
|
+
const framework_base_3 = require('@fluentui-react-native/framework-base');
|
|
161
|
+
Object.defineProperty(exports, 'renderSlot', {
|
|
162
|
+
enumerable: true,
|
|
163
|
+
get: function () {
|
|
164
|
+
return framework_base_3.renderSlot;
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
Object.defineProperty(exports, 'stagedComponent', {
|
|
168
|
+
enumerable: true,
|
|
169
|
+
get: function () {
|
|
170
|
+
return framework_base_3.stagedComponent;
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
Object.defineProperty(exports, 'withSlots', {
|
|
174
|
+
enumerable: true,
|
|
175
|
+
get: function () {
|
|
176
|
+
return framework_base_3.withSlots;
|
|
177
|
+
},
|
|
178
|
+
});
|
|
179
|
+
const use_slots_1 = require('@fluentui-react-native/use-slots');
|
|
180
|
+
Object.defineProperty(exports, 'buildUseSlots', {
|
|
181
|
+
enumerable: true,
|
|
182
|
+
get: function () {
|
|
183
|
+
return use_slots_1.buildUseSlots;
|
|
184
|
+
},
|
|
185
|
+
});
|
|
186
|
+
const framework_base_4 = require('@fluentui-react-native/framework-base');
|
|
187
|
+
Object.defineProperty(exports, 'immutableMerge', {
|
|
188
|
+
enumerable: true,
|
|
189
|
+
get: function () {
|
|
190
|
+
return framework_base_4.immutableMerge;
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
Object.defineProperty(exports, 'immutableMergeCore', {
|
|
194
|
+
enumerable: true,
|
|
195
|
+
get: function () {
|
|
196
|
+
return framework_base_4.immutableMergeCore;
|
|
197
|
+
},
|
|
198
|
+
});
|
|
199
|
+
Object.defineProperty(exports, 'processImmutable', {
|
|
200
|
+
enumerable: true,
|
|
201
|
+
get: function () {
|
|
202
|
+
return framework_base_4.processImmutable;
|
|
203
|
+
},
|
|
204
|
+
});
|
|
205
|
+
const theme_types_1 = require('@fluentui-react-native/theme-types');
|
|
206
|
+
Object.defineProperty(exports, 'ThemeContext', {
|
|
207
|
+
enumerable: true,
|
|
208
|
+
get: function () {
|
|
209
|
+
return theme_types_1.ThemeContext;
|
|
210
|
+
},
|
|
211
|
+
});
|
|
212
|
+
Object.defineProperty(exports, 'useTheme', {
|
|
213
|
+
enumerable: true,
|
|
214
|
+
get: function () {
|
|
215
|
+
return theme_types_1.useTheme;
|
|
216
|
+
},
|
|
217
|
+
});
|
|
218
|
+
const compose_1 = require('./compose');
|
|
219
|
+
Object.defineProperty(exports, 'compose', {
|
|
220
|
+
enumerable: true,
|
|
221
|
+
get: function () {
|
|
222
|
+
return compose_1.compose;
|
|
223
|
+
},
|
|
224
|
+
});
|
|
225
|
+
const compressible_1 = require('./compressible');
|
|
226
|
+
Object.defineProperty(exports, 'compressible', {
|
|
227
|
+
enumerable: true,
|
|
228
|
+
get: function () {
|
|
229
|
+
return compressible_1.compressible;
|
|
230
|
+
},
|
|
231
|
+
});
|
|
232
|
+
const useFluentTheme_1 = require('./useFluentTheme');
|
|
233
|
+
Object.defineProperty(exports, 'useFluentTheme', {
|
|
234
|
+
enumerable: true,
|
|
235
|
+
get: function () {
|
|
236
|
+
return useFluentTheme_1.useFluentTheme;
|
|
237
|
+
},
|
|
238
|
+
});
|
|
239
|
+
const useStyling_1 = require('./useStyling');
|
|
240
|
+
Object.defineProperty(exports, 'buildProps', {
|
|
241
|
+
enumerable: true,
|
|
242
|
+
get: function () {
|
|
243
|
+
return useStyling_1.buildProps;
|
|
244
|
+
},
|
|
245
|
+
});
|
|
246
|
+
Object.defineProperty(exports, 'buildUseStyling', {
|
|
247
|
+
enumerable: true,
|
|
248
|
+
get: function () {
|
|
249
|
+
return useStyling_1.buildUseStyling;
|
|
250
|
+
},
|
|
251
|
+
});
|
|
252
|
+
const useTokens_1 = require('./useTokens');
|
|
253
|
+
Object.defineProperty(exports, 'applyPropsToTokens', {
|
|
254
|
+
enumerable: true,
|
|
255
|
+
get: function () {
|
|
256
|
+
return useTokens_1.applyPropsToTokens;
|
|
257
|
+
},
|
|
258
|
+
});
|
|
259
|
+
Object.defineProperty(exports, 'applyTokenLayers', {
|
|
260
|
+
enumerable: true,
|
|
261
|
+
get: function () {
|
|
262
|
+
return useTokens_1.applyTokenLayers;
|
|
263
|
+
},
|
|
264
|
+
});
|
|
265
|
+
Object.defineProperty(exports, 'buildUseTokens', {
|
|
266
|
+
enumerable: true,
|
|
267
|
+
get: function () {
|
|
268
|
+
return useTokens_1.buildUseTokens;
|
|
269
|
+
},
|
|
270
|
+
});
|
|
271
|
+
Object.defineProperty(exports, 'customizable', {
|
|
272
|
+
enumerable: true,
|
|
273
|
+
get: function () {
|
|
274
|
+
return useTokens_1.customizable;
|
|
275
|
+
},
|
|
276
|
+
});
|
|
277
|
+
Object.defineProperty(exports, 'patchTokens', {
|
|
278
|
+
enumerable: true,
|
|
279
|
+
get: function () {
|
|
280
|
+
return useTokens_1.patchTokens;
|
|
281
|
+
},
|
|
282
|
+
});
|
|
283
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,0EAAiG;AAAxF,8GAAA,YAAY,OAAA;AAAE,mHAAA,iBAAiB,OAAA;AAAE,yGAAA,OAAO,OAAA;AAGjD,0EAAgF;AAAvE,4GAAA,UAAU,OAAA;AAAE,6GAAA,WAAW,OAAA;AAEhC,0DAcuC;AAbrC,+GAAA,qBAAqB,OAAA;AACrB,sGAAA,YAAY,OAAA;AACZ,sGAAA,YAAY,OAAA;AACZ,qGAAA,WAAW,OAAA;AACX,oGAAA,UAAU,OAAA;AACV,+GAAA,qBAAqB,OAAA;AACrB,6GAAA,mBAAmB,OAAA;AACnB,sGAAA,YAAY,OAAA;AACZ,sGAAA,YAAY,OAAA;AACZ,sGAAA,YAAY,OAAA;AACZ,sGAAA,YAAY,OAAA;AACZ,oGAAA,UAAU,OAAA;AACV,sGAAA,YAAY,OAAA;AAed,8DAA0D;AAAjD,mGAAA,OAAO,OAAA;AAChB,0EAA+F;AAAtF,4GAAA,UAAU,OAAA;AAAE,iHAAA,eAAe,OAAA;AAAE,2GAAA,SAAS,OAAA;AAG/C,gEAAiE;AAAxD,0GAAA,aAAa,OAAA;AAGtB,0EAA6G;AAApG,gHAAA,cAAc,OAAA;AAAE,oHAAA,kBAAkB,OAAA;AAAE,kHAAA,gBAAgB,OAAA;AAU7D,oEAA4E;AAAnE,2GAAA,YAAY,OAAA;AAAE,uGAAA,QAAQ,OAAA;AAgC/B,uCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAWhB,iDAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,qDAAkD;AAAzC,gHAAA,cAAc,OAAA;AAEvB,6CAA2D;AAAlD,wGAAA,UAAU,OAAA;AAAE,6GAAA,eAAe,OAAA;AAEpC,2CAA8G;AAArG,+GAAA,kBAAkB,OAAA;AAAE,6GAAA,gBAAgB,OAAA;AAAE,2GAAA,cAAc,OAAA;AAAE,yGAAA,YAAY,OAAA;AAAE,wGAAA,WAAW,OAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Theme } from '@fluentui-react-native/theme-types';
|
|
2
2
|
import type { ThemeHelper } from '@fluentui-react-native/use-styling';
|
|
3
3
|
export declare const themeHelper: ThemeHelper<Theme>;
|
|
4
|
-
//# sourceMappingURL=themeHelper.d.ts.map
|
|
4
|
+
//# sourceMappingURL=themeHelper.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.themeHelper = void 0;
|
|
4
|
-
const useFluentTheme_1 = require(
|
|
4
|
+
const useFluentTheme_1 = require('./useFluentTheme');
|
|
5
5
|
exports.themeHelper = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
useTheme: () => (0, useFluentTheme_1.useFluentTheme)(),
|
|
7
|
+
getComponentInfo: (theme, name) => {
|
|
8
|
+
const components = theme.components || {};
|
|
9
|
+
return components[name];
|
|
10
|
+
},
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=themeHelper.js.map
|
|
12
|
+
//# sourceMappingURL=themeHelper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themeHelper.js","sourceRoot":"","sources":["../src/themeHelper.ts"],"names":[],"mappings":";;;AAGA,qDAAkD;AAErC,QAAA,WAAW,GAAuB;IAC7C,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAA,+BAAc,GAAE;IAChC,gBAAgB,EAAE,CAAC,KAAY,EAAE,IAAY,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"themeHelper.js","sourceRoot":"","sources":["../src/themeHelper.ts"],"names":[],"mappings":";;;AAGA,qDAAkD;AAErC,QAAA,WAAW,GAAuB;IAC7C,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAA,+BAAc,GAAE;IAChC,gBAAgB,EAAE,CAAC,KAAY,EAAE,IAAY,EAAE,EAAE,CAAC;QAChD,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC;QAC1C,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;IAAA,CACzB;CACF,CAAC"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
3
|
-
exports.useFluentTheme =
|
|
4
|
-
const default_theme_1 = require(
|
|
5
|
-
const theme_types_1 = require(
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
+
exports.useFluentTheme = useFluentTheme;
|
|
4
|
+
const default_theme_1 = require('@fluentui-react-native/default-theme');
|
|
5
|
+
const theme_types_1 = require('@fluentui-react-native/theme-types');
|
|
6
6
|
/**
|
|
7
7
|
* Attempts to obtain a theme via the react context, failing that the default fluent theme will be returned. Used to ensure some theme
|
|
8
8
|
* object is provided for looking up color (and other) theme values
|
|
9
9
|
* @returns - a valid Theme object
|
|
10
10
|
*/
|
|
11
11
|
function useFluentTheme() {
|
|
12
|
-
|
|
12
|
+
return (0, theme_types_1.useTheme)() || default_theme_1.defaultFluentTheme;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=useFluentTheme.js.map
|
|
14
|
+
//# sourceMappingURL=useFluentTheme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFluentTheme.js","sourceRoot":"","sources":["../src/useFluentTheme.ts"],"names":[],"mappings":";;;AAAA,wEAA0E;AAE1E,oEAA8D;AAE9D;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"useFluentTheme.js","sourceRoot":"","sources":["../src/useFluentTheme.ts"],"names":[],"mappings":";;;AAAA,wEAA0E;AAE1E,oEAA8D;AAE9D;;;;GAIG;AACH,0BAAwC;IACtC,OAAO,IAAA,sBAAQ,GAAE,IAAI,kCAAkB,CAAC;AAAA,CACzC"}
|
|
@@ -4,9 +4,18 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export type { TokensThatAreAlsoProps, HasLayer, UseStyling } from '@fluentui-react-native/use-styling';
|
|
6
6
|
import type { Theme } from '@fluentui-react-native/theme-types';
|
|
7
|
-
import type {
|
|
7
|
+
import type {
|
|
8
|
+
TokensFromTheme as TokensFromThemeBase,
|
|
9
|
+
TokenSettings as TokenSettingsBase,
|
|
10
|
+
UseStylingOptions as UseStylingOptionsBase,
|
|
11
|
+
UseStyling,
|
|
12
|
+
BuildPropsBase,
|
|
13
|
+
} from '@fluentui-react-native/use-styling';
|
|
8
14
|
export type BuildProps<TProps, TTokens> = BuildPropsBase<TProps, TTokens, Theme>;
|
|
9
|
-
export declare function buildProps<TProps, TTokens>(
|
|
15
|
+
export declare function buildProps<TProps, TTokens>(
|
|
16
|
+
fn: (tokens: TTokens, theme: Theme) => TProps,
|
|
17
|
+
keys?: (keyof TTokens)[],
|
|
18
|
+
): BuildProps<TProps, TTokens>;
|
|
10
19
|
export type TokensFromTheme<TTokens> = TokensFromThemeBase<TTokens, Theme>;
|
|
11
20
|
export type TokenSettings<TTokens> = TokenSettingsBase<TTokens, Theme>;
|
|
12
21
|
export type UseStylingOptions<TProps, TSlotProps, TTokens> = UseStylingOptionsBase<TProps, TSlotProps, TTokens, Theme>;
|
|
@@ -15,5 +24,7 @@ export type UseStylingOptions<TProps, TSlotProps, TTokens> = UseStylingOptionsBa
|
|
|
15
24
|
*
|
|
16
25
|
* @param options - options which drive behavior for the generated styling hook
|
|
17
26
|
*/
|
|
18
|
-
export declare function buildUseStyling<TProps, TSlotProps, TTokens>(
|
|
19
|
-
|
|
27
|
+
export declare function buildUseStyling<TProps, TSlotProps, TTokens>(
|
|
28
|
+
options: UseStylingOptions<TProps, TSlotProps, TTokens>,
|
|
29
|
+
): UseStyling<TProps, TSlotProps>;
|
|
30
|
+
//# sourceMappingURL=useStyling.d.ts.map
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
const
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
+
exports.buildProps = buildProps;
|
|
4
|
+
exports.buildUseStyling = buildUseStyling;
|
|
5
|
+
const use_styling_1 = require('@fluentui-react-native/use-styling');
|
|
6
|
+
const themeHelper_1 = require('./themeHelper');
|
|
6
7
|
function buildProps(fn, keys) {
|
|
7
|
-
|
|
8
|
+
return (0, use_styling_1.buildProps)(fn, keys);
|
|
8
9
|
}
|
|
9
|
-
exports.buildProps = buildProps;
|
|
10
10
|
/**
|
|
11
11
|
* Construct a useStyling hook which returns styled slot props based on props and tokens defined in options and in the theme
|
|
12
12
|
*
|
|
13
13
|
* @param options - options which drive behavior for the generated styling hook
|
|
14
14
|
*/
|
|
15
15
|
function buildUseStyling(options) {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
// create a cache instance for this use styling implementation
|
|
17
|
+
return (0, use_styling_1.buildUseStyling)(options, themeHelper_1.themeHelper);
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=useStyling.js.map
|
|
19
|
+
//# sourceMappingURL=useStyling.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStyling.js","sourceRoot":"","sources":["../src/useStyling.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useStyling.js","sourceRoot":"","sources":["../src/useStyling.ts"],"names":[],"mappings":";;;;AAaA,oEAA0H;AAE1H,+CAA4C;AAI5C,oBACE,EAA6C,EAC7C,IAAwB,EACK;IAC7B,OAAO,IAAA,wBAAc,EAAyB,EAAE,EAAE,IAAI,CAAC,CAAC;AAAA,CACzD;AAMD;;;;GAIG;AACH,yBACE,OAAuD,EACvB;IAChC,8DAA8D;IAC9D,OAAO,IAAA,6BAAmB,EAAC,OAAO,EAAE,yBAAW,CAAC,CAAC;AAAA,CAClD"}
|
|
@@ -5,4 +5,4 @@ export { applyTokenLayers, applyPropsToTokens, customizable, patchTokens } from
|
|
|
5
5
|
export type UseTokens<TTokens> = UseTokensCore<TTokens, Theme>;
|
|
6
6
|
export type { CustomizableComponent } from '@fluentui-react-native/use-tokens';
|
|
7
7
|
export declare function buildUseTokens<TTokens>(...tokens: TokenSettings<TTokens>[]): UseTokens<TTokens>;
|
|
8
|
-
//# sourceMappingURL=useTokens.d.ts.map
|
|
8
|
+
//# sourceMappingURL=useTokens.d.ts.map
|
|
@@ -1,15 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Object.defineProperty(exports,
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
+
exports.patchTokens = exports.customizable = exports.applyPropsToTokens = exports.applyTokenLayers = void 0;
|
|
4
|
+
exports.buildUseTokens = buildUseTokens;
|
|
5
|
+
const use_tokens_1 = require('@fluentui-react-native/use-tokens');
|
|
6
|
+
const themeHelper_1 = require('./themeHelper');
|
|
7
|
+
const use_tokens_2 = require('@fluentui-react-native/use-tokens');
|
|
8
|
+
Object.defineProperty(exports, 'applyTokenLayers', {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () {
|
|
11
|
+
return use_tokens_2.applyTokenLayers;
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, 'applyPropsToTokens', {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () {
|
|
17
|
+
return use_tokens_2.applyPropsToTokens;
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, 'customizable', {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () {
|
|
23
|
+
return use_tokens_2.customizable;
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, 'patchTokens', {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () {
|
|
29
|
+
return use_tokens_2.patchTokens;
|
|
30
|
+
},
|
|
31
|
+
});
|
|
11
32
|
function buildUseTokens(...tokens) {
|
|
12
|
-
|
|
33
|
+
return (0, use_tokens_1.buildUseTokens)(themeHelper_1.themeHelper.getComponentInfo, ...tokens);
|
|
13
34
|
}
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=useTokens.js.map
|
|
35
|
+
//# sourceMappingURL=useTokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTokens.js","sourceRoot":"","sources":["../src/useTokens.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTokens.js","sourceRoot":"","sources":["../src/useTokens.ts"],"names":[],"mappings":";;;;AAEA,kEAAyF;AAEzF,+CAA4C;AAG5C,kEAAoH;AAA3G,8GAAA,gBAAgB,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AAAE,0GAAA,YAAY,OAAA;AAAE,yGAAA,WAAW,OAAA;AAMxE,wBAAwC,GAAG,MAAgC,EAAsB;IAC/F,OAAO,IAAA,2BAAkB,EAAC,yBAAW,CAAC,gBAAgB,EAAE,GAAG,MAAM,CAAC,CAAC;AAAA,CACpE"}
|