@fluentui-react-native/framework 0.9.6 → 0.9.7
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 +22 -1
- package/CHANGELOG.md +11 -2
- package/package.json +3 -3
- package/lib/compose.d.ts +0 -35
- package/lib/compose.js +0 -6
- package/lib/compose.js.map +0 -1
- package/lib/compressible.d.ts +0 -12
- package/lib/compressible.js +0 -22
- package/lib/compressible.js.map +0 -1
- package/lib/compressible.test.d.ts +0 -1
- package/lib/compressible.test.js +0 -84
- package/lib/compressible.test.js.map +0 -1
- package/lib/index.d.ts +0 -20
- package/lib/index.js +0 -13
- package/lib/index.js.map +0 -1
- package/lib/themeHelper.d.ts +0 -3
- package/lib/themeHelper.js +0 -9
- package/lib/themeHelper.js.map +0 -1
- package/lib/useFluentTheme.d.ts +0 -7
- package/lib/useFluentTheme.js +0 -11
- package/lib/useFluentTheme.js.map +0 -1
- package/lib/useStyling.d.ts +0 -18
- package/lib/useStyling.js +0 -15
- package/lib/useStyling.js.map +0 -1
- package/lib/useTokens.d.ts +0 -6
- package/lib/useTokens.js +0 -12
- package/lib/useTokens.js.map +0 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,28 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/framework",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Sat, 18 Mar 2023 17:18:20 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/framework_v0.9.7",
|
|
7
|
+
"version": "0.9.7",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@fluentui-react-native/framework",
|
|
13
|
+
"comment": "Bump @fluentui-react-native/default-theme to v0.18.1",
|
|
14
|
+
"commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui-react-native/framework",
|
|
19
|
+
"comment": "Bump @fluentui-react-native/tokens to v0.20.13",
|
|
20
|
+
"commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"date": "Tue, 14 Mar 2023 20:50:45 GMT",
|
|
6
27
|
"tag": "@fluentui-react-native/framework_v0.9.6",
|
|
7
28
|
"version": "0.9.6",
|
|
8
29
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/framework
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Sat, 18 Mar 2023 17:18:20 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.9.7
|
|
8
|
+
|
|
9
|
+
Sat, 18 Mar 2023 17:18:20 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Bump @fluentui-react-native/default-theme to v0.18.1
|
|
14
|
+
- Bump @fluentui-react-native/tokens to v0.20.13
|
|
15
|
+
|
|
7
16
|
## 0.9.6
|
|
8
17
|
|
|
9
|
-
Tue, 14 Mar 2023 20:
|
|
18
|
+
Tue, 14 Mar 2023 20:50:45 GMT
|
|
10
19
|
|
|
11
20
|
### Patches
|
|
12
21
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/framework",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.7",
|
|
4
4
|
"description": "Component framework used by fluentui react native controls",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@fluentui-react-native/composition": ">=0.8.4 <1.0.0",
|
|
28
|
-
"@fluentui-react-native/default-theme": ">=0.18.
|
|
28
|
+
"@fluentui-react-native/default-theme": ">=0.18.1 <1.0.0",
|
|
29
29
|
"@fluentui-react-native/immutable-merge": "^1.1.8",
|
|
30
30
|
"@fluentui-react-native/merge-props": ">=0.5.3 <1.0.0",
|
|
31
31
|
"@fluentui-react-native/theme-types": ">=0.31.0 <1.0.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@fluentui-react-native/use-slots": ">=0.7.4 <1.0.0",
|
|
35
35
|
"@fluentui-react-native/use-tokens": ">=0.3.4 <1.0.0",
|
|
36
36
|
"@fluentui-react-native/memo-cache": "^1.1.8",
|
|
37
|
-
"@fluentui-react-native/tokens": ">=0.20.
|
|
37
|
+
"@fluentui-react-native/tokens": ">=0.20.13 <1.0.0",
|
|
38
38
|
"tslib": "^2.3.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
package/lib/compose.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { ComposeFactoryOptions, ComposeFactoryComponent, UseStyledSlots } from '@fluentui-react-native/composition';
|
|
2
|
-
import type { Theme } from '@fluentui-react-native/theme-types';
|
|
3
|
-
/**
|
|
4
|
-
* This is an object used purely for configuring the typings on composable. It is not necessary to define
|
|
5
|
-
* the type via the IComposableType interface, this is simply the format used to extract the type info.
|
|
6
|
-
*/
|
|
7
|
-
export interface ComposeType<TProps, TSlotProps, TTokens, TStatics = object> {
|
|
8
|
-
props: TProps;
|
|
9
|
-
slotProps: TSlotProps;
|
|
10
|
-
tokens: TTokens;
|
|
11
|
-
statics: TStatics;
|
|
12
|
-
}
|
|
13
|
-
/** fragments used in type extraction */
|
|
14
|
-
type PropsFragment<TProps> = {
|
|
15
|
-
props: TProps;
|
|
16
|
-
};
|
|
17
|
-
type SlotPropsFragment<TSlotProps> = {
|
|
18
|
-
slotProps: TSlotProps;
|
|
19
|
-
};
|
|
20
|
-
type TokensFragment<TTokens> = {
|
|
21
|
-
tokens: TTokens;
|
|
22
|
-
};
|
|
23
|
-
type StaticsFragment<TStatics extends object> = {
|
|
24
|
-
statics: TStatics;
|
|
25
|
-
};
|
|
26
|
-
/** Extraction types that get the various interface types from IComposableType */
|
|
27
|
-
export type ExtractProps<T> = T extends PropsFragment<infer U> ? U : never;
|
|
28
|
-
export type ExtractSlotProps<T> = T extends SlotPropsFragment<infer U> ? U : never;
|
|
29
|
-
export type ExtractTokens<T> = T extends TokensFragment<infer U> ? U : object;
|
|
30
|
-
export type ExtractStatics<T> = T extends StaticsFragment<infer U> ? U : object;
|
|
31
|
-
export type ComposeOptions<TProps, TSlotProps, TTokens, TStatics extends object> = ComposeFactoryOptions<TProps, TSlotProps, TTokens, Theme, TStatics>;
|
|
32
|
-
export type ComposableComponent<TProps, TSlotProps, TTokens, TStatics extends object> = ComposeFactoryComponent<TProps, TSlotProps, TTokens, Theme, TStatics>;
|
|
33
|
-
export type UseSlots<T> = UseStyledSlots<ExtractProps<T>, ExtractSlotProps<T>>;
|
|
34
|
-
export declare function compose<T>(options: ComposeOptions<ExtractProps<T>, ExtractSlotProps<T>, ExtractTokens<T>, ExtractStatics<T>>, base?: ComposableComponent<ExtractProps<T>, ExtractSlotProps<T>, ExtractTokens<T>, ExtractStatics<T>>): ComposableComponent<ExtractProps<T>, ExtractSlotProps<T>, ExtractTokens<T>, ExtractStatics<T>>;
|
|
35
|
-
export {};
|
package/lib/compose.js
DELETED
package/lib/compose.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compose.js","sourceRoot":"","sources":["../src/compose.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGpE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAoD5C,MAAM,UAAU,OAAO,CACrB,OAAkG,EAClG,IAAqG;IAErG,OAAO,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;AACpD,CAAC"}
|
package/lib/compressible.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Theme } from '@fluentui-react-native/theme-types';
|
|
2
|
-
import type { StagedRender } from '@fluentui-react-native/use-slot';
|
|
3
|
-
import type { CustomizableComponent } from '@fluentui-react-native/use-tokens';
|
|
4
|
-
import type { UseTokens } from './useTokens';
|
|
5
|
-
/**
|
|
6
|
-
* Utility function which can create function components that can be tree compressed (using the stagedRender pattern),
|
|
7
|
-
* and also have customize functionality.
|
|
8
|
-
* @param fn StagedRender function that defines your component
|
|
9
|
-
* @param useTokens a hook function to build a set of tokens from a passed in theme as well as a cache object
|
|
10
|
-
* @returns A tree compressed function component with the `.customize` method exposed to it
|
|
11
|
-
*/
|
|
12
|
-
export declare function compressible<TProps, TTokens>(fn: StagedRender<TProps>, useTokens: UseTokens<TTokens>): CustomizableComponent<TProps, TTokens, Theme>;
|
package/lib/compressible.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { stagedComponent } from '@fluentui-react-native/use-slot';
|
|
2
|
-
/**
|
|
3
|
-
* Utility function which can create function components that can be tree compressed (using the stagedRender pattern),
|
|
4
|
-
* and also have customize functionality.
|
|
5
|
-
* @param fn StagedRender function that defines your component
|
|
6
|
-
* @param useTokens a hook function to build a set of tokens from a passed in theme as well as a cache object
|
|
7
|
-
* @returns A tree compressed function component with the `.customize` method exposed to it
|
|
8
|
-
*/
|
|
9
|
-
export function compressible(fn, useTokens) {
|
|
10
|
-
var injectedWrapper = function (props) { return fn(props, useTokens); };
|
|
11
|
-
var component = stagedComponent(injectedWrapper);
|
|
12
|
-
component.customize = function () {
|
|
13
|
-
var tokens = [];
|
|
14
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
15
|
-
tokens[_i] = arguments[_i];
|
|
16
|
-
}
|
|
17
|
-
var useTokensNew = useTokens.customize.apply(useTokens, tokens);
|
|
18
|
-
return compressible(fn, useTokensNew);
|
|
19
|
-
};
|
|
20
|
-
return component;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=compressible.js.map
|
package/lib/compressible.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compressible.js","sourceRoot":"","sources":["../src/compressible.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMlE;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAC1B,EAAwB,EACxB,SAA6B;IAI7B,IAAM,eAAe,GAAG,UAAC,KAAa,IAAK,OAAA,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,EAApB,CAAoB,CAAC;IAChE,IAAM,SAAS,GAAG,eAAe,CAAC,eAAe,CAAkB,CAAC;IAEpE,SAAS,CAAC,SAAS,GAAG;QAAC,gBAAmC;aAAnC,UAAmC,EAAnC,qBAAmC,EAAnC,IAAmC;YAAnC,2BAAmC;;QACxD,IAAM,YAAY,GAAG,SAAS,CAAC,SAAS,OAAnB,SAAS,EAAc,MAAM,CAAC,CAAC;QACpD,OAAO,YAAY,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;IACxC,CAAC,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/compressible.test.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { __assign, __rest } from "tslib";
|
|
2
|
-
import { Text, View } from 'react-native';
|
|
3
|
-
import { mergeStyles } from '@fluentui-react-native/merge-props';
|
|
4
|
-
import { useSlot, withSlots } from '@fluentui-react-native/use-slot';
|
|
5
|
-
import { applyTokenLayers } from '@fluentui-react-native/use-tokens';
|
|
6
|
-
import { mount } from 'enzyme';
|
|
7
|
-
import toJson from 'enzyme-to-json';
|
|
8
|
-
import { compressible } from './compressible';
|
|
9
|
-
import { buildUseTokens } from './useTokens';
|
|
10
|
-
var useVariantTokens = buildUseTokens({
|
|
11
|
-
color: 'black',
|
|
12
|
-
fontSize: 12,
|
|
13
|
-
fontWeight: '500',
|
|
14
|
-
defaultType: 'normal',
|
|
15
|
-
header: {
|
|
16
|
-
color: 'blue',
|
|
17
|
-
fontSize: 16,
|
|
18
|
-
fontWeight: '700',
|
|
19
|
-
},
|
|
20
|
-
caption: {
|
|
21
|
-
color: 'gray',
|
|
22
|
-
fontWeight: '300',
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
var VariantText = compressible(function (props, useTokens) {
|
|
26
|
-
var _a;
|
|
27
|
-
// fake theme here
|
|
28
|
-
var theme = {};
|
|
29
|
-
// get the tokens
|
|
30
|
-
var _b = useTokens(theme), tokens = _b[0], cache = _b[1];
|
|
31
|
-
// split the props, defaulting the variant type to the default type from the tokens
|
|
32
|
-
var _c = props.variant, variant = _c === void 0 ? tokens.defaultType : _c, style = props.style, rest = __rest(props, ["variant", "style"]);
|
|
33
|
-
// now apply the alternate layer tokens as appropriate
|
|
34
|
-
_a = applyTokenLayers(tokens, ['normal', 'header', 'caption'], cache, function (layer) { return layer === variant; }), tokens = _a[0], cache = _a[1];
|
|
35
|
-
// merge styles together with what is passed in
|
|
36
|
-
var mergedStyle = mergeStyles({ color: tokens.color, fontSize: tokens.fontSize, fontWeight: tokens.fontWeight }, style);
|
|
37
|
-
// now get the slot
|
|
38
|
-
var InnerText = useSlot(Text, __assign(__assign({}, rest), { style: mergedStyle }));
|
|
39
|
-
return function (extra, children) {
|
|
40
|
-
return withSlots(InnerText, __assign({}, extra), children);
|
|
41
|
-
};
|
|
42
|
-
}, useVariantTokens);
|
|
43
|
-
var SuperHeader = VariantText.customize({ header: { fontSize: 24, color: 'purple' } });
|
|
44
|
-
var useLabelTokens = buildUseTokens({
|
|
45
|
-
headerVariant: 'header',
|
|
46
|
-
captionVariant: 'caption',
|
|
47
|
-
});
|
|
48
|
-
var Label = compressible(function (props, useTokens) {
|
|
49
|
-
var theme = {};
|
|
50
|
-
var tokens = useTokens(theme)[0];
|
|
51
|
-
var headerText = props.headerText, captionText = props.captionText, headerSlot = props.headerSlot, captionSlot = props.captionSlot;
|
|
52
|
-
var Header = useSlot(headerSlot || VariantText, { variant: tokens.headerVariant });
|
|
53
|
-
var Caption = useSlot(captionSlot || VariantText, { variant: tokens.captionVariant });
|
|
54
|
-
return function () {
|
|
55
|
-
if (captionText) {
|
|
56
|
-
return (withSlots(View, null,
|
|
57
|
-
withSlots(Header, null, headerText),
|
|
58
|
-
withSlots(Caption, null, captionText)));
|
|
59
|
-
}
|
|
60
|
-
return withSlots(Header, null, headerText);
|
|
61
|
-
};
|
|
62
|
-
}, useLabelTokens);
|
|
63
|
-
/**
|
|
64
|
-
* this wrapper solves the (so-far) inexplicable type errors from the matchers in typescript
|
|
65
|
-
*/
|
|
66
|
-
function snapshotTestTree(tree) {
|
|
67
|
-
expect(toJson(tree)).toMatchSnapshot();
|
|
68
|
-
}
|
|
69
|
-
describe('compressible tests', function () {
|
|
70
|
-
/** first render the component with no updates */
|
|
71
|
-
it('Two labels, one with caption and one without', function () {
|
|
72
|
-
var tree = mount(withSlots(View, null,
|
|
73
|
-
withSlots(Label, { headerText: "Header1" }),
|
|
74
|
-
withSlots(Label, { headerText: "Header2", captionText: "Caption2" })));
|
|
75
|
-
snapshotTestTree(tree);
|
|
76
|
-
});
|
|
77
|
-
it('Two labels, one plugging in SuperHeader instead', function () {
|
|
78
|
-
var tree = mount(withSlots(View, null,
|
|
79
|
-
withSlots(Label, { headerText: "Super Header", headerSlot: SuperHeader, captionText: "Normal caption" }),
|
|
80
|
-
withSlots(Label, { headerText: "Normal Header", captionText: "Another normal caption" })));
|
|
81
|
-
snapshotTestTree(tree);
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
//# sourceMappingURL=compressible.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compressible.test.js","sourceRoot":"","sources":["../src/compressible.test.tsx"],"names":[],"mappings":";A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1,20 +0,0 @@
|
|
|
1
|
-
export { GetMemoValue, getMemoCache, memoize } from '@fluentui-react-native/memo-cache';
|
|
2
|
-
export { StyleProp, mergeProps, mergeStyles } from '@fluentui-react-native/merge-props';
|
|
3
|
-
export { backgroundColorTokens, borderStyles, borderTokens, colorTokens, fontStyles, foregroundColorTokens, getPaletteFromTheme, layoutStyles, layoutTokens, shadowStyles, shadowTokens, textTokens, tokenBuilder, } from '@fluentui-react-native/tokens';
|
|
4
|
-
export type { FontStyleTokens, FontTokens, FontVariantTokens, IBackgroundColorTokens, IBorderTokens, IColorTokens, IForegroundColorTokens, IShadowTokens, LayoutTokens, TokenBuilder, } from '@fluentui-react-native/tokens';
|
|
5
|
-
export { renderSlot, stagedComponent, useSlot, withSlots } from '@fluentui-react-native/use-slot';
|
|
6
|
-
export type { ComposableFunction, FinalRender, NativeReactType, SlotFn, StagedRender } from '@fluentui-react-native/use-slot';
|
|
7
|
-
export { buildUseSlots } from '@fluentui-react-native/use-slots';
|
|
8
|
-
export type { GetSlotProps, Slots, UseSlotOptions, UseSlotsBase } from '@fluentui-react-native/use-slots';
|
|
9
|
-
export { immutableMerge, immutableMergeCore, processImmutable } from '@fluentui-react-native/immutable-merge';
|
|
10
|
-
export type { BuiltinRecursionHandlers, CustomRecursionHandler, MergeOptions, RecursionHandler, RecursionOption, } from '@fluentui-react-native/immutable-merge';
|
|
11
|
-
export { ThemeContext, useTheme } from '@fluentui-react-native/theme-types';
|
|
12
|
-
export type { AliasColorTokens, AppearanceOptions, Color, ControlColorTokens, FabricWebPalette, FontFamilies, FontFamily, FontFamilyValue, FontSize, FontSizeValuePoints, FontSizes, FontWeight, FontWeightValue, FontWeights, OfficePalette, Palette, PaletteBackgroundColors, PaletteTextColors, PartialPalette, PartialTheme, PartialTypography, Spacing, TextStyling, Theme, ThemeColorDefinition, ThemeOptions, Typography, Variant, VariantValue, Variants, } from '@fluentui-react-native/theme-types';
|
|
13
|
-
export { compose } from './compose';
|
|
14
|
-
export type { ComposableComponent, ComposeOptions, ComposeType, ExtractProps, ExtractSlotProps, ExtractStatics, ExtractTokens, UseSlots, } from './compose';
|
|
15
|
-
export { compressible } from './compressible';
|
|
16
|
-
export { useFluentTheme } from './useFluentTheme';
|
|
17
|
-
export { HasLayer, TokensThatAreAlsoProps, UseStyling, buildProps, buildUseStyling } from './useStyling';
|
|
18
|
-
export type { BuildProps, TokenSettings, TokensFromTheme, UseStylingOptions } from './useStyling';
|
|
19
|
-
export { applyPropsToTokens, applyTokenLayers, buildUseTokens, customizable, patchTokens } from './useTokens';
|
|
20
|
-
export type { UseTokens } from './useTokens';
|
package/lib/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { getMemoCache, memoize } from '@fluentui-react-native/memo-cache';
|
|
2
|
-
export { mergeProps, mergeStyles } from '@fluentui-react-native/merge-props';
|
|
3
|
-
export { backgroundColorTokens, borderStyles, borderTokens, colorTokens, fontStyles, foregroundColorTokens, getPaletteFromTheme, layoutStyles, layoutTokens, shadowStyles, shadowTokens, textTokens, tokenBuilder, } from '@fluentui-react-native/tokens';
|
|
4
|
-
export { renderSlot, stagedComponent, useSlot, withSlots } from '@fluentui-react-native/use-slot';
|
|
5
|
-
export { buildUseSlots } from '@fluentui-react-native/use-slots';
|
|
6
|
-
export { immutableMerge, immutableMergeCore, processImmutable } from '@fluentui-react-native/immutable-merge';
|
|
7
|
-
export { ThemeContext, useTheme } from '@fluentui-react-native/theme-types';
|
|
8
|
-
export { compose } from './compose';
|
|
9
|
-
export { compressible } from './compressible';
|
|
10
|
-
export { useFluentTheme } from './useFluentTheme';
|
|
11
|
-
export { buildProps, buildUseStyling } from './useStyling';
|
|
12
|
-
export { applyPropsToTokens, applyTokenLayers, buildUseTokens, customizable, patchTokens } from './useTokens';
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,YAAY,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAExF,OAAO,EAAa,UAAU,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAExF,OAAO,EACL,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,YAAY,GACb,MAAM,+BAA+B,CAAC;AAcvC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAGlG,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAGjE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAS9G,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAkC5E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAgD,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEzG,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
|
package/lib/themeHelper.d.ts
DELETED
package/lib/themeHelper.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { useFluentTheme } from './useFluentTheme';
|
|
2
|
-
export var themeHelper = {
|
|
3
|
-
useTheme: function () { return useFluentTheme(); },
|
|
4
|
-
getComponentInfo: function (theme, name) {
|
|
5
|
-
var components = theme.components || {};
|
|
6
|
-
return components[name];
|
|
7
|
-
},
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=themeHelper.js.map
|
package/lib/themeHelper.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"themeHelper.js","sourceRoot":"","sources":["../src/themeHelper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,IAAM,WAAW,GAAuB;IAC7C,QAAQ,EAAE,cAAM,OAAA,cAAc,EAAE,EAAhB,CAAgB;IAChC,gBAAgB,EAAE,UAAC,KAAY,EAAE,IAAY;QAC3C,IAAM,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC;QAC1C,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF,CAAC"}
|
package/lib/useFluentTheme.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Theme } from '@fluentui-react-native/theme-types';
|
|
2
|
-
/**
|
|
3
|
-
* Attempts to obtain a theme via the react context, failing that the default fluent theme will be returned. Used to ensure some theme
|
|
4
|
-
* object is provided for looking up color (and other) theme values
|
|
5
|
-
* @returns - a valid Theme object
|
|
6
|
-
*/
|
|
7
|
-
export declare function useFluentTheme(): Theme;
|
package/lib/useFluentTheme.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { defaultFluentTheme } from '@fluentui-react-native/default-theme';
|
|
2
|
-
import { useTheme } from '@fluentui-react-native/theme-types';
|
|
3
|
-
/**
|
|
4
|
-
* Attempts to obtain a theme via the react context, failing that the default fluent theme will be returned. Used to ensure some theme
|
|
5
|
-
* object is provided for looking up color (and other) theme values
|
|
6
|
-
* @returns - a valid Theme object
|
|
7
|
-
*/
|
|
8
|
-
export function useFluentTheme() {
|
|
9
|
-
return useTheme() || defaultFluentTheme;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=useFluentTheme.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFluentTheme.js","sourceRoot":"","sources":["../src/useFluentTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAE9D;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,QAAQ,EAAE,IAAI,kBAAkB,CAAC;AAC1C,CAAC"}
|
package/lib/useStyling.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Many of the types from use-styling take a theme as a type parameter. This re-exports them in such a way
|
|
3
|
-
* as to be dependent on the core theme type
|
|
4
|
-
*/
|
|
5
|
-
export { TokensThatAreAlsoProps, HasLayer, UseStyling } from '@fluentui-react-native/use-styling';
|
|
6
|
-
import type { Theme } from '@fluentui-react-native/theme-types';
|
|
7
|
-
import type { TokensFromTheme as TokensFromThemeBase, TokenSettings as TokenSettingsBase, UseStylingOptions as UseStylingOptionsBase, UseStyling, BuildPropsBase } from '@fluentui-react-native/use-styling';
|
|
8
|
-
export type BuildProps<TProps, TTokens> = BuildPropsBase<TProps, TTokens, Theme>;
|
|
9
|
-
export declare function buildProps<TProps, TTokens>(fn: (tokens: TTokens, theme: Theme) => TProps, keys?: (keyof TTokens)[]): BuildProps<TProps, TTokens>;
|
|
10
|
-
export type TokensFromTheme<TTokens> = TokensFromThemeBase<TTokens, Theme>;
|
|
11
|
-
export type TokenSettings<TTokens> = TokenSettingsBase<TTokens, Theme>;
|
|
12
|
-
export type UseStylingOptions<TProps, TSlotProps, TTokens> = UseStylingOptionsBase<TProps, TSlotProps, TTokens, Theme>;
|
|
13
|
-
/**
|
|
14
|
-
* Construct a useStyling hook which returns styled slot props based on props and tokens defined in options and in the theme
|
|
15
|
-
*
|
|
16
|
-
* @param options - options which drive behavior for the generated styling hook
|
|
17
|
-
*/
|
|
18
|
-
export declare function buildUseStyling<TProps, TSlotProps, TTokens>(options: UseStylingOptions<TProps, TSlotProps, TTokens>): UseStyling<TProps, TSlotProps>;
|
package/lib/useStyling.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { buildUseStyling as buildUseStylingBase, buildProps as buildPropsBase } from '@fluentui-react-native/use-styling';
|
|
2
|
-
import { themeHelper } from './themeHelper';
|
|
3
|
-
export function buildProps(fn, keys) {
|
|
4
|
-
return buildPropsBase(fn, keys);
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Construct a useStyling hook which returns styled slot props based on props and tokens defined in options and in the theme
|
|
8
|
-
*
|
|
9
|
-
* @param options - options which drive behavior for the generated styling hook
|
|
10
|
-
*/
|
|
11
|
-
export function buildUseStyling(options) {
|
|
12
|
-
// create a cache instance for this use styling implementation
|
|
13
|
-
return buildUseStylingBase(options, themeHelper);
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=useStyling.js.map
|
package/lib/useStyling.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useStyling.js","sourceRoot":"","sources":["../src/useStyling.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,IAAI,mBAAmB,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAE1H,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,MAAM,UAAU,UAAU,CACxB,EAA6C,EAC7C,IAAwB;IAExB,OAAO,cAAc,CAAyB,EAAE,EAAE,IAAI,CAAC,CAAC;AAC1D,CAAC;AAMD;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAuD;IAEvD,8DAA8D;IAC9D,OAAO,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AACnD,CAAC"}
|
package/lib/useTokens.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Theme } from '@fluentui-react-native/theme-types';
|
|
2
|
-
import type { UseTokens as UseTokensCore } from '@fluentui-react-native/use-tokens';
|
|
3
|
-
import type { TokenSettings } from './useStyling';
|
|
4
|
-
export { applyTokenLayers, applyPropsToTokens, customizable, patchTokens } from '@fluentui-react-native/use-tokens';
|
|
5
|
-
export type UseTokens<TTokens> = UseTokensCore<TTokens, Theme>;
|
|
6
|
-
export declare function buildUseTokens<TTokens>(...tokens: TokenSettings<TTokens>[]): UseTokens<TTokens>;
|
package/lib/useTokens.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { __spreadArray } from "tslib";
|
|
2
|
-
import { buildUseTokens as buildUseTokensCore } from '@fluentui-react-native/use-tokens';
|
|
3
|
-
import { themeHelper } from './themeHelper';
|
|
4
|
-
export { applyTokenLayers, applyPropsToTokens, customizable, patchTokens } from '@fluentui-react-native/use-tokens';
|
|
5
|
-
export function buildUseTokens() {
|
|
6
|
-
var tokens = [];
|
|
7
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
8
|
-
tokens[_i] = arguments[_i];
|
|
9
|
-
}
|
|
10
|
-
return buildUseTokensCore.apply(void 0, __spreadArray([themeHelper.getComponentInfo], tokens, false));
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=useTokens.js.map
|
package/lib/useTokens.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTokens.js","sourceRoot":"","sources":["../src/useTokens.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEzF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAKpH,MAAM,UAAU,cAAc;IAAU,gBAAmC;SAAnC,UAAmC,EAAnC,qBAAmC,EAAnC,IAAmC;QAAnC,2BAAmC;;IACzE,OAAO,kBAAkB,8BAAC,WAAW,CAAC,gBAAgB,GAAK,MAAM,UAAE;AACrE,CAAC"}
|