@fluentui-react-native/framework 0.15.3 → 0.16.1
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/.cache/tsconfig.tsbuildinfo +1 -0
- package/CHANGELOG.md +46 -0
- package/jest.config.cjs +1 -0
- package/lib/compose.js +1 -1
- package/lib/compose.js.map +1 -1
- package/lib/compressible.d.ts +1 -1
- package/lib/compressible.d.ts.map +1 -1
- package/lib/compressible.js.map +1 -1
- package/lib/compressible.test.js +5 -11
- package/lib/compressible.test.js.map +1 -1
- package/lib/index.d.ts +9 -9
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -5
- package/lib/index.js.map +1 -1
- package/lib/themeHelper.js +1 -1
- package/lib/themeHelper.js.map +1 -1
- package/lib/useFluentTheme.js.map +1 -1
- package/lib/useStyling.js +1 -1
- package/lib/useStyling.js.map +1 -1
- package/lib/useTokens.d.ts +1 -1
- package/lib/useTokens.d.ts.map +1 -1
- package/lib/useTokens.js +1 -1
- package/lib/useTokens.js.map +1 -1
- package/package.json +22 -27
- package/src/compose.ts +1 -1
- package/src/compressible.test.tsx +3 -3
- package/src/compressible.ts +2 -2
- package/src/index.ts +9 -9
- package/src/themeHelper.ts +1 -1
- package/src/useStyling.ts +1 -1
- package/src/useTokens.ts +2 -2
- package/babel.config.js +0 -4
- package/lib-commonjs/compose.d.ts +0 -37
- package/lib-commonjs/compose.d.ts.map +0 -1
- package/lib-commonjs/compose.js +0 -9
- package/lib-commonjs/compose.js.map +0 -1
- package/lib-commonjs/compressible.d.ts +0 -13
- package/lib-commonjs/compressible.d.ts.map +0 -1
- package/lib-commonjs/compressible.js +0 -21
- package/lib-commonjs/compressible.js.map +0 -1
- package/lib-commonjs/compressible.test.d.ts +0 -2
- package/lib-commonjs/compressible.test.d.ts.map +0 -1
- package/lib-commonjs/compressible.test.js +0 -117
- package/lib-commonjs/compressible.test.js.map +0 -1
- package/lib-commonjs/index.d.ts +0 -25
- package/lib-commonjs/index.d.ts.map +0 -1
- package/lib-commonjs/index.js +0 -55
- package/lib-commonjs/index.js.map +0 -1
- package/lib-commonjs/themeHelper.d.ts +0 -4
- package/lib-commonjs/themeHelper.d.ts.map +0 -1
- package/lib-commonjs/themeHelper.js +0 -12
- package/lib-commonjs/themeHelper.js.map +0 -1
- package/lib-commonjs/useFluentTheme.d.ts +0 -8
- package/lib-commonjs/useFluentTheme.d.ts.map +0 -1
- package/lib-commonjs/useFluentTheme.js +0 -14
- package/lib-commonjs/useFluentTheme.js.map +0 -1
- package/lib-commonjs/useStyling.d.ts +0 -19
- package/lib-commonjs/useStyling.d.ts.map +0 -1
- package/lib-commonjs/useStyling.js +0 -19
- package/lib-commonjs/useStyling.js.map +0 -1
- package/lib-commonjs/useTokens.d.ts +0 -8
- package/lib-commonjs/useTokens.d.ts.map +0 -1
- package/lib-commonjs/useTokens.js +0 -15
- package/lib-commonjs/useTokens.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Component framework used by fluentui react native controls",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "",
|
|
@@ -9,55 +9,49 @@
|
|
|
9
9
|
"url": "https://github.com/microsoft/fluentui-react-native.git",
|
|
10
10
|
"directory": "packages/framework/framework"
|
|
11
11
|
},
|
|
12
|
-
"
|
|
13
|
-
"
|
|
12
|
+
"type": "module",
|
|
13
|
+
"main": "./lib/index.js",
|
|
14
|
+
"module": "./lib/index.js",
|
|
14
15
|
"types": "lib/index.d.ts",
|
|
15
16
|
"exports": {
|
|
16
17
|
".": {
|
|
17
18
|
"types": "./lib/index.d.ts",
|
|
19
|
+
"react-native": "./src/index.ts",
|
|
18
20
|
"import": "./lib/index.js",
|
|
19
|
-
"require": "./lib-commonjs/index.js",
|
|
20
21
|
"default": "./src/index.ts"
|
|
21
22
|
}
|
|
22
23
|
},
|
|
23
24
|
"scripts": {
|
|
24
|
-
"build": "
|
|
25
|
-
"build-cjs": "tsgo --outDir lib-commonjs",
|
|
26
|
-
"build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler",
|
|
25
|
+
"build": "tsgo -b",
|
|
27
26
|
"clean": "fluentui-scripts clean",
|
|
28
27
|
"depcheck": "fluentui-scripts depcheck",
|
|
29
28
|
"format": "fluentui-scripts format",
|
|
30
29
|
"lint": "fluentui-scripts lint",
|
|
31
|
-
"lint-package": "fluentui-scripts lint-package",
|
|
32
30
|
"start-test": "fluentui-scripts jest-watch",
|
|
33
31
|
"start:tester": "rnx-cli start",
|
|
34
32
|
"test": "fluentui-scripts jest",
|
|
35
33
|
"update-snapshots": "fluentui-scripts jest -u"
|
|
36
34
|
},
|
|
37
35
|
"dependencies": {
|
|
38
|
-
"@fluentui-react-native/composition": "0.
|
|
39
|
-
"@fluentui-react-native/default-theme": "0.27.
|
|
40
|
-
"@fluentui-react-native/framework-base": "0.
|
|
41
|
-
"@fluentui-react-native/theme-types": "0.44.
|
|
42
|
-
"@fluentui-react-native/tokens": "0.24.
|
|
43
|
-
"@fluentui-react-native/use-slot": "0.
|
|
44
|
-
"@fluentui-react-native/use-slots": "0.
|
|
45
|
-
"@fluentui-react-native/use-styling": "0.
|
|
46
|
-
"@fluentui-react-native/use-tokens": "0.
|
|
36
|
+
"@fluentui-react-native/composition": "0.13.1",
|
|
37
|
+
"@fluentui-react-native/default-theme": "0.27.5",
|
|
38
|
+
"@fluentui-react-native/framework-base": "0.4.1",
|
|
39
|
+
"@fluentui-react-native/theme-types": "0.44.5",
|
|
40
|
+
"@fluentui-react-native/tokens": "0.24.5",
|
|
41
|
+
"@fluentui-react-native/use-slot": "0.8.1",
|
|
42
|
+
"@fluentui-react-native/use-slots": "0.12.1",
|
|
43
|
+
"@fluentui-react-native/use-styling": "0.15.1",
|
|
44
|
+
"@fluentui-react-native/use-tokens": "0.8.1"
|
|
47
45
|
},
|
|
48
46
|
"devDependencies": {
|
|
49
47
|
"@babel/core": "^7.20.0",
|
|
50
|
-
"@fluentui-react-native/babel-config": "0.1.1",
|
|
51
|
-
"@fluentui-react-native/jest-config": "0.1.0",
|
|
52
|
-
"@fluentui-react-native/kit-config": "0.1.2",
|
|
53
|
-
"@fluentui-react-native/lint-config-rules": "0.1.3",
|
|
54
48
|
"@fluentui-react-native/scripts": "0.1.0",
|
|
55
49
|
"@react-native-community/cli": "^20.0.0",
|
|
56
50
|
"@react-native-community/cli-platform-android": "^20.0.0",
|
|
57
51
|
"@react-native-community/cli-platform-ios": "^20.0.0",
|
|
58
52
|
"@react-native/babel-preset": "^0.81.0",
|
|
59
53
|
"@react-native/metro-config": "^0.81.0",
|
|
60
|
-
"@rnx-kit/cli": "^
|
|
54
|
+
"@rnx-kit/cli": "^2.0.1",
|
|
61
55
|
"@types/react": "~19.1.4",
|
|
62
56
|
"@types/react-test-renderer": "^19.1.0",
|
|
63
57
|
"react": "19.1.4",
|
|
@@ -67,7 +61,7 @@
|
|
|
67
61
|
"react-test-renderer": "19.1.4"
|
|
68
62
|
},
|
|
69
63
|
"peerDependencies": {
|
|
70
|
-
"@office-iss/react-native-win32": "^0.74.0",
|
|
64
|
+
"@office-iss/react-native-win32": "^0.74.0 || ^0.81.0",
|
|
71
65
|
"@types/react": "~18.2.0 || ~19.0.0 || ~19.1.4",
|
|
72
66
|
"react": "18.2.0 || 19.0.0 || 19.1.4",
|
|
73
67
|
"react-native": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.6",
|
|
@@ -88,6 +82,9 @@
|
|
|
88
82
|
"optional": true
|
|
89
83
|
}
|
|
90
84
|
},
|
|
85
|
+
"furn": {
|
|
86
|
+
"jestPlatform": "android"
|
|
87
|
+
},
|
|
91
88
|
"rnx-kit": {
|
|
92
89
|
"kitType": "library",
|
|
93
90
|
"alignDeps": {
|
|
@@ -99,11 +96,9 @@
|
|
|
99
96
|
"core-macos",
|
|
100
97
|
"core-windows",
|
|
101
98
|
"react",
|
|
102
|
-
"react-test-renderer"
|
|
103
|
-
"tools-core",
|
|
104
|
-
"tools-jest"
|
|
99
|
+
"react-test-renderer"
|
|
105
100
|
]
|
|
106
101
|
},
|
|
107
|
-
"extends": "@fluentui-react-native/kit-config"
|
|
102
|
+
"extends": "@fluentui-react-native/scripts/kit-config"
|
|
108
103
|
}
|
|
109
104
|
}
|
package/src/compose.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { composeFactory } from '@fluentui-react-native/composition';
|
|
|
3
3
|
import type { Theme } from '@fluentui-react-native/theme-types';
|
|
4
4
|
import type { ObjectBase } from '@fluentui-react-native/framework-base';
|
|
5
5
|
|
|
6
|
-
import { themeHelper } from './themeHelper';
|
|
6
|
+
import { themeHelper } from './themeHelper.ts';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* This is an object used purely for configuring the typings on composable. It is not necessary to define
|
|
@@ -10,9 +10,9 @@ import { useSlot } from '@fluentui-react-native/use-slot';
|
|
|
10
10
|
import { applyTokenLayers } from '@fluentui-react-native/use-tokens';
|
|
11
11
|
import * as renderer from 'react-test-renderer';
|
|
12
12
|
|
|
13
|
-
import { compressible } from './compressible';
|
|
14
|
-
import { buildUseTokens } from './useTokens';
|
|
15
|
-
import type { UseTokens } from './useTokens';
|
|
13
|
+
import { compressible } from './compressible.ts';
|
|
14
|
+
import { buildUseTokens } from './useTokens.ts';
|
|
15
|
+
import type { UseTokens } from './useTokens.ts';
|
|
16
16
|
|
|
17
17
|
type Variant = 'normal' | 'header' | 'caption';
|
|
18
18
|
interface VariantTextTokens {
|
package/src/compressible.ts
CHANGED
|
@@ -3,8 +3,8 @@ import type { StagedRender } from '@fluentui-react-native/framework-base';
|
|
|
3
3
|
import { stagedComponent } from '@fluentui-react-native/framework-base';
|
|
4
4
|
import type { CustomizableComponent } from '@fluentui-react-native/use-tokens';
|
|
5
5
|
|
|
6
|
-
import type { TokenSettings } from './useStyling';
|
|
7
|
-
import type { UseTokens } from './useTokens';
|
|
6
|
+
import type { TokenSettings } from './useStyling.ts';
|
|
7
|
+
import type { UseTokens } from './useTokens.ts';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Utility function which can create function components that can be tree compressed (using the stagedRender pattern),
|
package/src/index.ts
CHANGED
|
@@ -81,7 +81,7 @@ export type {
|
|
|
81
81
|
Variants,
|
|
82
82
|
} from '@fluentui-react-native/theme-types';
|
|
83
83
|
|
|
84
|
-
export { compose } from './compose';
|
|
84
|
+
export { compose } from './compose.ts';
|
|
85
85
|
export type {
|
|
86
86
|
ComposableComponent,
|
|
87
87
|
ComposeOptions,
|
|
@@ -91,11 +91,11 @@ export type {
|
|
|
91
91
|
ExtractStatics,
|
|
92
92
|
ExtractTokens,
|
|
93
93
|
UseSlots,
|
|
94
|
-
} from './compose';
|
|
95
|
-
export { compressible } from './compressible';
|
|
96
|
-
export { useFluentTheme } from './useFluentTheme';
|
|
97
|
-
export type { HasLayer, TokensThatAreAlsoProps, UseStyling } from './useStyling';
|
|
98
|
-
export { buildProps, buildUseStyling } from './useStyling';
|
|
99
|
-
export type { BuildProps, TokenSettings, TokensFromTheme, UseStylingOptions } from './useStyling';
|
|
100
|
-
export { applyPropsToTokens, applyTokenLayers, buildUseTokens, customizable, patchTokens } from './useTokens';
|
|
101
|
-
export type { UseTokens, CustomizableComponent } from './useTokens';
|
|
94
|
+
} from './compose.ts';
|
|
95
|
+
export { compressible } from './compressible.ts';
|
|
96
|
+
export { useFluentTheme } from './useFluentTheme.ts';
|
|
97
|
+
export type { HasLayer, TokensThatAreAlsoProps, UseStyling } from './useStyling.ts';
|
|
98
|
+
export { buildProps, buildUseStyling } from './useStyling.ts';
|
|
99
|
+
export type { BuildProps, TokenSettings, TokensFromTheme, UseStylingOptions } from './useStyling.ts';
|
|
100
|
+
export { applyPropsToTokens, applyTokenLayers, buildUseTokens, customizable, patchTokens } from './useTokens.ts';
|
|
101
|
+
export type { UseTokens, CustomizableComponent } from './useTokens.ts';
|
package/src/themeHelper.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Theme } from '@fluentui-react-native/theme-types';
|
|
2
2
|
import type { ThemeHelper } from '@fluentui-react-native/use-styling';
|
|
3
3
|
|
|
4
|
-
import { useFluentTheme } from './useFluentTheme';
|
|
4
|
+
import { useFluentTheme } from './useFluentTheme.ts';
|
|
5
5
|
|
|
6
6
|
export const themeHelper: ThemeHelper<Theme> = {
|
|
7
7
|
useTheme: () => useFluentTheme(),
|
package/src/useStyling.ts
CHANGED
|
@@ -13,7 +13,7 @@ import type {
|
|
|
13
13
|
} from '@fluentui-react-native/use-styling';
|
|
14
14
|
import { buildUseStyling as buildUseStylingBase, buildProps as buildPropsBase } from '@fluentui-react-native/use-styling';
|
|
15
15
|
|
|
16
|
-
import { themeHelper } from './themeHelper';
|
|
16
|
+
import { themeHelper } from './themeHelper.ts';
|
|
17
17
|
|
|
18
18
|
export type BuildProps<TProps, TTokens> = BuildPropsBase<TProps, TTokens, Theme>;
|
|
19
19
|
|
package/src/useTokens.ts
CHANGED
|
@@ -2,8 +2,8 @@ import type { Theme } from '@fluentui-react-native/theme-types';
|
|
|
2
2
|
import type { UseTokens as UseTokensCore } from '@fluentui-react-native/use-tokens';
|
|
3
3
|
import { buildUseTokens as buildUseTokensCore } from '@fluentui-react-native/use-tokens';
|
|
4
4
|
|
|
5
|
-
import { themeHelper } from './themeHelper';
|
|
6
|
-
import type { TokenSettings } from './useStyling';
|
|
5
|
+
import { themeHelper } from './themeHelper.ts';
|
|
6
|
+
import type { TokenSettings } from './useStyling.ts';
|
|
7
7
|
|
|
8
8
|
export { applyTokenLayers, applyPropsToTokens, customizable, patchTokens } from '@fluentui-react-native/use-tokens';
|
|
9
9
|
|
package/babel.config.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { ComposeFactoryOptions, ComposeFactoryComponent, UseStyledSlots } from '@fluentui-react-native/composition';
|
|
2
|
-
import type { Theme } from '@fluentui-react-native/theme-types';
|
|
3
|
-
import type { ObjectBase } from '@fluentui-react-native/framework-base';
|
|
4
|
-
/**
|
|
5
|
-
* This is an object used purely for configuring the typings on composable. It is not necessary to define
|
|
6
|
-
* the type via the IComposableType interface, this is simply the format used to extract the type info.
|
|
7
|
-
*/
|
|
8
|
-
export interface ComposeType<TProps, TSlotProps, TTokens, TStatics = ObjectBase> {
|
|
9
|
-
props: TProps;
|
|
10
|
-
slotProps: TSlotProps;
|
|
11
|
-
tokens: TTokens;
|
|
12
|
-
statics: TStatics;
|
|
13
|
-
}
|
|
14
|
-
/** fragments used in type extraction */
|
|
15
|
-
type PropsFragment<TProps> = {
|
|
16
|
-
props: TProps;
|
|
17
|
-
};
|
|
18
|
-
type SlotPropsFragment<TSlotProps> = {
|
|
19
|
-
slotProps: TSlotProps;
|
|
20
|
-
};
|
|
21
|
-
type TokensFragment<TTokens> = {
|
|
22
|
-
tokens: TTokens;
|
|
23
|
-
};
|
|
24
|
-
type StaticsFragment<TStatics extends ObjectBase> = {
|
|
25
|
-
statics: TStatics;
|
|
26
|
-
};
|
|
27
|
-
/** Extraction types that get the various interface types from IComposableType */
|
|
28
|
-
export type ExtractProps<T> = T extends PropsFragment<infer U> ? U : never;
|
|
29
|
-
export type ExtractSlotProps<T> = T extends SlotPropsFragment<infer U> ? U : never;
|
|
30
|
-
export type ExtractTokens<T> = T extends TokensFragment<infer U> ? U : ObjectBase;
|
|
31
|
-
export type ExtractStatics<T> = T extends StaticsFragment<infer U> ? U : ObjectBase;
|
|
32
|
-
export type ComposeOptions<TProps, TSlotProps, TTokens, TStatics extends ObjectBase> = ComposeFactoryOptions<TProps, TSlotProps, TTokens, Theme, TStatics>;
|
|
33
|
-
export type ComposableComponent<TProps, TSlotProps, TTokens, TStatics extends ObjectBase> = ComposeFactoryComponent<TProps, TSlotProps, TTokens, Theme, TStatics>;
|
|
34
|
-
export type UseSlots<T> = UseStyledSlots<ExtractProps<T>, ExtractSlotProps<T>>;
|
|
35
|
-
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>>;
|
|
36
|
-
export {};
|
|
37
|
-
//# sourceMappingURL=compose.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../src/compose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAIxE;;;GAGG;AACH,MAAM,WAAW,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,GAAG,UAAU;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,UAAU,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,QAAQ,CAAC;CACnB;AAED,wCAAwC;AACxC,KAAK,aAAa,CAAC,MAAM,IAAI;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAC/C,KAAK,iBAAiB,CAAC,UAAU,IAAI;IAAE,SAAS,EAAE,UAAU,CAAA;CAAE,CAAC;AAC/D,KAAK,cAAc,CAAC,OAAO,IAAI;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AAEnD,KAAK,eAAe,CAAC,QAAQ,SAAS,UAAU,IAAI;IAAE,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;AAE1E,iFAAiF;AACjF,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,aAAa,CAAC,MAAM,CAA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CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAEhG"}
|
package/lib-commonjs/compose.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.compose = compose;
|
|
4
|
-
const composition_1 = require("@fluentui-react-native/composition");
|
|
5
|
-
const themeHelper_1 = require("./themeHelper");
|
|
6
|
-
function compose(options, base) {
|
|
7
|
-
return (0, composition_1.composeFactory)(options, themeHelper_1.themeHelper, base);
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=compose.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compose.js","sourceRoot":"","sources":["../src/compose.ts"],"names":[],"mappings":";;;AACA,oEAAoE;AAIpE,+CAA4C;AA8C5C,iBACE,OAAkG,EAClG,IAAqG,EACL;IAChG,OAAO,IAAA,4BAAc,EAAC,OAAO,EAAE,yBAAW,EAAE,IAAI,CAAC,CAAC;AAAA,CACnD"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Theme } from '@fluentui-react-native/theme-types';
|
|
2
|
-
import type { StagedRender } from '@fluentui-react-native/framework-base';
|
|
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>;
|
|
13
|
-
//# sourceMappingURL=compressible.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compressible.d.ts","sourceRoot":"","sources":["../src/compressible.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAG/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,EAC1C,EAAE,EAAE,YAAY,CAAC,MAAM,CAAC,EACxB,SAAS,EAAE,SAAS,CAAC,OAAO,CAAC,GAC5B,qBAAqB,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAY/C"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.compressible = compressible;
|
|
4
|
-
const framework_base_1 = require("@fluentui-react-native/framework-base");
|
|
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
|
-
function compressible(fn, useTokens) {
|
|
13
|
-
const injectedWrapper = (props) => fn(props, useTokens);
|
|
14
|
-
const component = (0, framework_base_1.stagedComponent)(injectedWrapper);
|
|
15
|
-
component.customize = (...tokens) => {
|
|
16
|
-
const useTokensNew = useTokens.customize(...tokens);
|
|
17
|
-
return compressible(fn, useTokensNew);
|
|
18
|
-
};
|
|
19
|
-
return component;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=compressible.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compressible.js","sourceRoot":"","sources":["../src/compressible.ts"],"names":[],"mappings":";;;AAEA,0EAAwE;AAMxE;;;;;;GAMG;AACH,sBACE,EAAwB,EACxB,SAA6B,EACkB;IAG/C,MAAM,eAAe,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAChE,MAAM,SAAS,GAAG,IAAA,gCAAe,EAAC,eAAe,CAAkB,CAAC;IAEpE,SAAS,CAAC,SAAS,GAAG,CAAC,GAAG,MAAgC,EAAE,EAAE,CAAC;QAC7D,MAAM,YAAY,GAAG,SAAS,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,CAAC;QACpD,OAAO,YAAY,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;IAAA,CACvC,CAAC;IAEF,OAAO,SAAS,CAAC;AAAA,CAClB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compressible.test.d.ts","sourceRoot":"","sources":["../src/compressible.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const jsx_runtime_1 = require("@fluentui-react-native/framework-base/jsx-runtime");
|
|
37
|
-
const react_1 = require("react");
|
|
38
|
-
const react_native_1 = require("react-native");
|
|
39
|
-
const framework_base_1 = require("@fluentui-react-native/framework-base");
|
|
40
|
-
const use_slot_1 = require("@fluentui-react-native/use-slot");
|
|
41
|
-
const use_tokens_1 = require("@fluentui-react-native/use-tokens");
|
|
42
|
-
const renderer = __importStar(require("react-test-renderer"));
|
|
43
|
-
const compressible_1 = require("./compressible");
|
|
44
|
-
const useTokens_1 = require("./useTokens");
|
|
45
|
-
const useVariantTokens = (0, useTokens_1.buildUseTokens)({
|
|
46
|
-
color: 'black',
|
|
47
|
-
fontSize: 12,
|
|
48
|
-
fontWeight: '500',
|
|
49
|
-
defaultType: 'normal',
|
|
50
|
-
header: {
|
|
51
|
-
color: 'blue',
|
|
52
|
-
fontSize: 16,
|
|
53
|
-
fontWeight: '700',
|
|
54
|
-
},
|
|
55
|
-
caption: {
|
|
56
|
-
color: 'gray',
|
|
57
|
-
fontWeight: '300',
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
const VariantText = (0, compressible_1.compressible)((props, useTokens) => {
|
|
61
|
-
// fake theme here
|
|
62
|
-
const theme = {};
|
|
63
|
-
// get the tokens
|
|
64
|
-
let [tokens, cache] = useTokens(theme);
|
|
65
|
-
// split the props, defaulting the variant type to the default type from the tokens
|
|
66
|
-
const { variant = tokens.defaultType, style, ...rest } = props;
|
|
67
|
-
// now apply the alternate layer tokens as appropriate
|
|
68
|
-
[tokens, cache] = (0, use_tokens_1.applyTokenLayers)(tokens, ['normal', 'header', 'caption'], cache, (layer) => layer === variant);
|
|
69
|
-
// merge styles together with what is passed in
|
|
70
|
-
const mergedStyle = (0, framework_base_1.mergeStyles)({ color: tokens.color, fontSize: tokens.fontSize, fontWeight: tokens.fontWeight }, style);
|
|
71
|
-
// now get the slot
|
|
72
|
-
const InnerText = (0, use_slot_1.useSlot)(react_native_1.Text, { ...rest, style: mergedStyle });
|
|
73
|
-
return (extra, children) => {
|
|
74
|
-
return jsx_runtime_1.jsx(InnerText, { ...extra, children: children });
|
|
75
|
-
};
|
|
76
|
-
}, useVariantTokens);
|
|
77
|
-
const SuperHeader = VariantText.customize({ header: { fontSize: 24, color: 'purple' } });
|
|
78
|
-
const useLabelTokens = (0, useTokens_1.buildUseTokens)({
|
|
79
|
-
headerVariant: 'header',
|
|
80
|
-
captionVariant: 'caption',
|
|
81
|
-
});
|
|
82
|
-
const Label = (0, compressible_1.compressible)((props, useTokens) => {
|
|
83
|
-
const theme = {};
|
|
84
|
-
const [tokens] = useTokens(theme);
|
|
85
|
-
const { headerText, captionText, headerSlot, captionSlot } = props;
|
|
86
|
-
const Header = (0, use_slot_1.useSlot)(headerSlot || VariantText, { variant: tokens.headerVariant });
|
|
87
|
-
const Caption = (0, use_slot_1.useSlot)(captionSlot || VariantText, { variant: tokens.captionVariant });
|
|
88
|
-
return () => {
|
|
89
|
-
if (captionText) {
|
|
90
|
-
return (jsx_runtime_1.jsxs(react_native_1.View, { children: [
|
|
91
|
-
jsx_runtime_1.jsx(Header, { children: headerText }), jsx_runtime_1.jsx(Caption, { children: captionText })
|
|
92
|
-
] }));
|
|
93
|
-
}
|
|
94
|
-
return jsx_runtime_1.jsx(Header, { children: headerText });
|
|
95
|
-
};
|
|
96
|
-
}, useLabelTokens);
|
|
97
|
-
describe('compressible tests', () => {
|
|
98
|
-
it('Two labels, one with caption and one without', () => {
|
|
99
|
-
let component;
|
|
100
|
-
(0, react_1.act)(() => {
|
|
101
|
-
component = renderer.create(jsx_runtime_1.jsxs(react_native_1.View, { children: [
|
|
102
|
-
jsx_runtime_1.jsx(Label, { headerText: "Header1" }), jsx_runtime_1.jsx(Label, { headerText: "Header2", captionText: "Caption2" })
|
|
103
|
-
] }));
|
|
104
|
-
});
|
|
105
|
-
expect(component.toJSON()).toMatchSnapshot();
|
|
106
|
-
});
|
|
107
|
-
it('Two labels, one plugging in SuperHeader instead', () => {
|
|
108
|
-
let component;
|
|
109
|
-
(0, react_1.act)(() => {
|
|
110
|
-
component = renderer.create(jsx_runtime_1.jsxs(react_native_1.View, { children: [
|
|
111
|
-
jsx_runtime_1.jsx(Label, { headerText: "Super Header", headerSlot: SuperHeader, captionText: "Normal caption" }), jsx_runtime_1.jsx(Label, { headerText: "Normal Header", captionText: "Another normal caption" })
|
|
112
|
-
] }));
|
|
113
|
-
});
|
|
114
|
-
expect(component.toJSON()).toMatchSnapshot();
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
//# sourceMappingURL=compressible.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compressible.test.js","sourceRoot":"","sources":["../src/compressible.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,iCAA4B;AAE5B,+CAA0C;AAE1C,0EAAoE;AAEpE,8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AC,MAAM,cAAE,UAAU,GAAU,CAAC;IAAA,CACtC,CAAC;AAAA,CACH,EAAE,cAAc,CAAC,CAAC;AAEnB,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE,CAAC;IACnC,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE,CAAC;QACvD,IAAI,SAAqC,CAAC;QAC1C,IAAA,WAAG,EAAC,GAAG,EAAE,CAAC;YACR,SAAS,GAAG,QAAQ,CAAC,MAAM,CACzB,mBAAC,mBAAI;oBACH,kBAAC,KAAK,IAAC,UAAU,EAAC,SAAS,GAAG,EAC9B,kBAAC,KAAK,IAAC,UAAU,EAAC,SAAS,EAAC,WAAW,EAAC,UAAU,GAAG;oBAChD,CACR,CAAC;QAAA,CACH,CAAC,CAAC;QACH,MAAM,CAAC,SAAU,CAAC,MAAM,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;IAAA,CAC/C,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE,CAAC;QAC1D,IAAI,SAAqC,CAAC;QAC1C,IAAA,WAAG,EAAC,GAAG,EAAE,CAAC;YACR,SAAS,GAAG,QAAQ,CAAC,MAAM,CACzB,mBAAC,mBAAI;oBACH,kBAAC,KAAK,IAAC,UAAU,EAAC,cAAc,EAAC,UAAU,EAAE,WAAW,EAAE,WAAW,EAAC,gBAAgB,GAAG,EACzF,kBAAC,KAAK,IAAC,UAAU,EAAC,eAAe,EAAC,WAAW,EAAC,wBAAwB,GAAG;oBACpE,CACR,CAAC;QAAA,CACH,CAAC,CAAC;QACH,MAAM,CAAC,SAAU,CAAC,MAAM,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;IAAA,CAC/C,CAAC,CAAC;AAAA,CACJ,CAAC,CAAC"}
|
package/lib-commonjs/index.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export type { GetMemoValue, GetTypedMemoValue } from '@fluentui-react-native/framework-base';
|
|
2
|
-
export { getMemoCache, getTypedMemoCache, memoize } from '@fluentui-react-native/framework-base';
|
|
3
|
-
export type { StyleProp } from '@fluentui-react-native/framework-base';
|
|
4
|
-
export { mergeProps, mergeStyles } from '@fluentui-react-native/framework-base';
|
|
5
|
-
export { backgroundColorTokens, borderStyles, borderTokens, colorTokens, fontStyles, foregroundColorTokens, getPaletteFromTheme, layoutStyles, layoutTokens, shadowStyles, shadowTokens, textTokens, tokenBuilder, } from '@fluentui-react-native/tokens';
|
|
6
|
-
export type { FontStyleTokens, FontTokens, FontVariantTokens, IBackgroundColorTokens, IBorderTokens, IColorTokens, IForegroundColorTokens, IShadowTokens, LayoutTokens, TokenBuilder, } from '@fluentui-react-native/tokens';
|
|
7
|
-
export { useSlot } from '@fluentui-react-native/use-slot';
|
|
8
|
-
export { renderSlot, stagedComponent, withSlots } from '@fluentui-react-native/framework-base';
|
|
9
|
-
export type { ComposableFunction, FinalRender, NativeReactType, SlotFn, StagedRender } from '@fluentui-react-native/framework-base';
|
|
10
|
-
export { buildUseSlots } from '@fluentui-react-native/use-slots';
|
|
11
|
-
export type { GetSlotProps, Slots, UseSlotOptions, UseSlotsBase } from '@fluentui-react-native/use-slots';
|
|
12
|
-
export { immutableMerge, immutableMergeCore, processImmutable } from '@fluentui-react-native/framework-base';
|
|
13
|
-
export type { BuiltinRecursionHandlers, CustomRecursionHandler, MergeOptions, ObjectBase, RecursionHandler, RecursionOption, } from '@fluentui-react-native/framework-base';
|
|
14
|
-
export { ThemeContext, useTheme } from '@fluentui-react-native/theme-types';
|
|
15
|
-
export type { AliasColorTokens, AppearanceOptions, Color, 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';
|
|
16
|
-
export { compose } from './compose';
|
|
17
|
-
export type { ComposableComponent, ComposeOptions, ComposeType, ExtractProps, ExtractSlotProps, ExtractStatics, ExtractTokens, UseSlots, } from './compose';
|
|
18
|
-
export { compressible } from './compressible';
|
|
19
|
-
export { useFluentTheme } from './useFluentTheme';
|
|
20
|
-
export type { HasLayer, TokensThatAreAlsoProps, UseStyling } from './useStyling';
|
|
21
|
-
export { buildProps, buildUseStyling } from './useStyling';
|
|
22
|
-
export type { BuildProps, TokenSettings, TokensFromTheme, UseStylingOptions } from './useStyling';
|
|
23
|
-
export { applyPropsToTokens, applyTokenLayers, buildUseTokens, customizable, patchTokens } from './useTokens';
|
|
24
|
-
export type { UseTokens, CustomizableComponent } from './useTokens';
|
|
25
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAEjG,YAAY,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEhF,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,YAAY,EACV,eAAe,EACf,UAAU,EACV,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,YAAY,GACb,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC1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AClD,YAAY,EAAE,QAAQ,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAClG,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC9G,YAAY,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC"}
|
package/lib-commonjs/index.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.patchTokens = exports.customizable = exports.buildUseTokens = exports.applyTokenLayers = exports.applyPropsToTokens = exports.buildUseStyling = exports.buildProps = exports.useFluentTheme = exports.compressible = exports.compose = exports.useTheme = exports.ThemeContext = exports.processImmutable = exports.immutableMergeCore = exports.immutableMerge = exports.buildUseSlots = exports.withSlots = exports.stagedComponent = exports.renderSlot = exports.useSlot = exports.tokenBuilder = exports.textTokens = exports.shadowTokens = exports.shadowStyles = exports.layoutTokens = exports.layoutStyles = exports.getPaletteFromTheme = exports.foregroundColorTokens = exports.fontStyles = exports.colorTokens = exports.borderTokens = exports.borderStyles = exports.backgroundColorTokens = exports.mergeStyles = exports.mergeProps = exports.memoize = exports.getTypedMemoCache = exports.getMemoCache = void 0;
|
|
4
|
-
const framework_base_1 = require("@fluentui-react-native/framework-base");
|
|
5
|
-
Object.defineProperty(exports, "getMemoCache", { enumerable: true, get: function () { return framework_base_1.getMemoCache; } });
|
|
6
|
-
Object.defineProperty(exports, "getTypedMemoCache", { enumerable: true, get: function () { return framework_base_1.getTypedMemoCache; } });
|
|
7
|
-
Object.defineProperty(exports, "memoize", { enumerable: true, get: function () { return framework_base_1.memoize; } });
|
|
8
|
-
const framework_base_2 = require("@fluentui-react-native/framework-base");
|
|
9
|
-
Object.defineProperty(exports, "mergeProps", { enumerable: true, get: function () { return framework_base_2.mergeProps; } });
|
|
10
|
-
Object.defineProperty(exports, "mergeStyles", { enumerable: true, get: function () { return framework_base_2.mergeStyles; } });
|
|
11
|
-
const tokens_1 = require("@fluentui-react-native/tokens");
|
|
12
|
-
Object.defineProperty(exports, "backgroundColorTokens", { enumerable: true, get: function () { return tokens_1.backgroundColorTokens; } });
|
|
13
|
-
Object.defineProperty(exports, "borderStyles", { enumerable: true, get: function () { return tokens_1.borderStyles; } });
|
|
14
|
-
Object.defineProperty(exports, "borderTokens", { enumerable: true, get: function () { return tokens_1.borderTokens; } });
|
|
15
|
-
Object.defineProperty(exports, "colorTokens", { enumerable: true, get: function () { return tokens_1.colorTokens; } });
|
|
16
|
-
Object.defineProperty(exports, "fontStyles", { enumerable: true, get: function () { return tokens_1.fontStyles; } });
|
|
17
|
-
Object.defineProperty(exports, "foregroundColorTokens", { enumerable: true, get: function () { return tokens_1.foregroundColorTokens; } });
|
|
18
|
-
Object.defineProperty(exports, "getPaletteFromTheme", { enumerable: true, get: function () { return tokens_1.getPaletteFromTheme; } });
|
|
19
|
-
Object.defineProperty(exports, "layoutStyles", { enumerable: true, get: function () { return tokens_1.layoutStyles; } });
|
|
20
|
-
Object.defineProperty(exports, "layoutTokens", { enumerable: true, get: function () { return tokens_1.layoutTokens; } });
|
|
21
|
-
Object.defineProperty(exports, "shadowStyles", { enumerable: true, get: function () { return tokens_1.shadowStyles; } });
|
|
22
|
-
Object.defineProperty(exports, "shadowTokens", { enumerable: true, get: function () { return tokens_1.shadowTokens; } });
|
|
23
|
-
Object.defineProperty(exports, "textTokens", { enumerable: true, get: function () { return tokens_1.textTokens; } });
|
|
24
|
-
Object.defineProperty(exports, "tokenBuilder", { enumerable: true, get: function () { return tokens_1.tokenBuilder; } });
|
|
25
|
-
const use_slot_1 = require("@fluentui-react-native/use-slot");
|
|
26
|
-
Object.defineProperty(exports, "useSlot", { enumerable: true, get: function () { return use_slot_1.useSlot; } });
|
|
27
|
-
const framework_base_3 = require("@fluentui-react-native/framework-base");
|
|
28
|
-
Object.defineProperty(exports, "renderSlot", { enumerable: true, get: function () { return framework_base_3.renderSlot; } });
|
|
29
|
-
Object.defineProperty(exports, "stagedComponent", { enumerable: true, get: function () { return framework_base_3.stagedComponent; } });
|
|
30
|
-
Object.defineProperty(exports, "withSlots", { enumerable: true, get: function () { return framework_base_3.withSlots; } });
|
|
31
|
-
const use_slots_1 = require("@fluentui-react-native/use-slots");
|
|
32
|
-
Object.defineProperty(exports, "buildUseSlots", { enumerable: true, get: function () { return use_slots_1.buildUseSlots; } });
|
|
33
|
-
const framework_base_4 = require("@fluentui-react-native/framework-base");
|
|
34
|
-
Object.defineProperty(exports, "immutableMerge", { enumerable: true, get: function () { return framework_base_4.immutableMerge; } });
|
|
35
|
-
Object.defineProperty(exports, "immutableMergeCore", { enumerable: true, get: function () { return framework_base_4.immutableMergeCore; } });
|
|
36
|
-
Object.defineProperty(exports, "processImmutable", { enumerable: true, get: function () { return framework_base_4.processImmutable; } });
|
|
37
|
-
const theme_types_1 = require("@fluentui-react-native/theme-types");
|
|
38
|
-
Object.defineProperty(exports, "ThemeContext", { enumerable: true, get: function () { return theme_types_1.ThemeContext; } });
|
|
39
|
-
Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return theme_types_1.useTheme; } });
|
|
40
|
-
const compose_1 = require("./compose");
|
|
41
|
-
Object.defineProperty(exports, "compose", { enumerable: true, get: function () { return compose_1.compose; } });
|
|
42
|
-
const compressible_1 = require("./compressible");
|
|
43
|
-
Object.defineProperty(exports, "compressible", { enumerable: true, get: function () { return compressible_1.compressible; } });
|
|
44
|
-
const useFluentTheme_1 = require("./useFluentTheme");
|
|
45
|
-
Object.defineProperty(exports, "useFluentTheme", { enumerable: true, get: function () { return useFluentTheme_1.useFluentTheme; } });
|
|
46
|
-
const useStyling_1 = require("./useStyling");
|
|
47
|
-
Object.defineProperty(exports, "buildProps", { enumerable: true, get: function () { return useStyling_1.buildProps; } });
|
|
48
|
-
Object.defineProperty(exports, "buildUseStyling", { enumerable: true, get: function () { return useStyling_1.buildUseStyling; } });
|
|
49
|
-
const useTokens_1 = require("./useTokens");
|
|
50
|
-
Object.defineProperty(exports, "applyPropsToTokens", { enumerable: true, get: function () { return useTokens_1.applyPropsToTokens; } });
|
|
51
|
-
Object.defineProperty(exports, "applyTokenLayers", { enumerable: true, get: function () { return useTokens_1.applyTokenLayers; } });
|
|
52
|
-
Object.defineProperty(exports, "buildUseTokens", { enumerable: true, get: function () { return useTokens_1.buildUseTokens; } });
|
|
53
|
-
Object.defineProperty(exports, "customizable", { enumerable: true, get: function () { return useTokens_1.customizable; } });
|
|
54
|
-
Object.defineProperty(exports, "patchTokens", { enumerable: true, get: function () { return useTokens_1.patchTokens; } });
|
|
55
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"themeHelper.d.ts","sourceRoot":"","sources":["../src/themeHelper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAItE,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,KAAK,CAM1C,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.themeHelper = void 0;
|
|
4
|
-
const useFluentTheme_1 = require("./useFluentTheme");
|
|
5
|
-
exports.themeHelper = {
|
|
6
|
-
useTheme: () => (0, useFluentTheme_1.useFluentTheme)(),
|
|
7
|
-
getComponentInfo: (theme, name) => {
|
|
8
|
-
const components = theme.components || {};
|
|
9
|
-
return components[name];
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=themeHelper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,8 +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;
|
|
8
|
-
//# sourceMappingURL=useFluentTheme.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFluentTheme.d.ts","sourceRoot":"","sources":["../src/useFluentTheme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAGhE;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,KAAK,CAEtC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
/**
|
|
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
|
-
* object is provided for looking up color (and other) theme values
|
|
9
|
-
* @returns - a valid Theme object
|
|
10
|
-
*/
|
|
11
|
-
function useFluentTheme() {
|
|
12
|
-
return (0, theme_types_1.useTheme)() || default_theme_1.defaultFluentTheme;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=useFluentTheme.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|