@fluentui-react-native/use-slots 0.10.6 → 0.10.8
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 +31 -1
- package/CHANGELOG.md +18 -2
- package/lib/buildUseSlots.d.ts +1 -1
- package/lib/buildUseSlots.d.ts.map +1 -1
- package/lib/buildUseSlots.test.js +1 -1
- package/lib/buildUseSlots.test.js.map +1 -1
- package/lib/useSlots.samples.test.js +2 -2
- package/lib/useSlots.samples.test.js.map +1 -1
- package/lib-commonjs/buildUseSlots.d.ts +1 -1
- package/lib-commonjs/buildUseSlots.d.ts.map +1 -1
- package/lib-commonjs/buildUseSlots.test.js +6 -6
- package/lib-commonjs/buildUseSlots.test.js.map +1 -1
- package/lib-commonjs/useSlots.samples.test.js +32 -32
- package/lib-commonjs/useSlots.samples.test.js.map +1 -1
- package/package.json +3 -3
- package/src/buildUseSlots.test.tsx +1 -1
- package/src/buildUseSlots.ts +1 -1
- package/src/useSlots.samples.test.tsx +2 -2
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,37 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/use-slots",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Tue,
|
|
5
|
+
"date": "Tue, 22 Jul 2025 19:02:21 GMT",
|
|
6
|
+
"version": "0.10.8",
|
|
7
|
+
"tag": "@fluentui-react-native/use-slots_v0.10.8",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "jasonmo@microsoft.com",
|
|
12
|
+
"package": "@fluentui-react-native/use-slots",
|
|
13
|
+
"commit": "21e536f6875cb6fb9c33b439f0eafe1d4debc7a4",
|
|
14
|
+
"comment": "centralize jsx rendering functionality in framework-base"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Wed, 16 Jul 2025 20:06:46 GMT",
|
|
21
|
+
"version": "0.10.7",
|
|
22
|
+
"tag": "@fluentui-react-native/use-slots_v0.10.7",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "jasonmo@microsoft.com",
|
|
27
|
+
"package": "@fluentui-react-native/use-slots",
|
|
28
|
+
"commit": "6ed0a256caf94e287c6a9120ec5d0458bd5c7bfc",
|
|
29
|
+
"comment": "create common framework-base package to share common utiltities more broadly"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Tue, 15 Jul 2025 23:26:53 GMT",
|
|
6
36
|
"version": "0.10.6",
|
|
7
37
|
"tag": "@fluentui-react-native/use-slots_v0.10.6",
|
|
8
38
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/use-slots
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on Tue,
|
|
3
|
+
<!-- This log was last generated on Tue, 22 Jul 2025 19:02:21 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.10.8
|
|
8
|
+
|
|
9
|
+
Tue, 22 Jul 2025 19:02:21 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- centralize jsx rendering functionality in framework-base (jasonmo@microsoft.com)
|
|
14
|
+
|
|
15
|
+
## 0.10.7
|
|
16
|
+
|
|
17
|
+
Wed, 16 Jul 2025 20:06:46 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- create common framework-base package to share common utiltities more broadly (jasonmo@microsoft.com)
|
|
22
|
+
|
|
7
23
|
## 0.10.6
|
|
8
24
|
|
|
9
|
-
Tue, 15 Jul 2025 23:
|
|
25
|
+
Tue, 15 Jul 2025 23:26:53 GMT
|
|
10
26
|
|
|
11
27
|
### Patches
|
|
12
28
|
|
package/lib/buildUseSlots.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComposableFunction, SlotFn, NativeReactType } from '@fluentui-react-native/
|
|
1
|
+
import type { ComposableFunction, SlotFn, NativeReactType } from '@fluentui-react-native/framework-base';
|
|
2
2
|
export type Slots<TSlotProps> = {
|
|
3
3
|
[K in keyof TSlotProps]: SlotFn<TSlotProps[K]>;
|
|
4
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildUseSlots.d.ts","sourceRoot":"","sources":["../src/buildUseSlots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"buildUseSlots.d.ts","sourceRoot":"","sources":["../src/buildUseSlots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAUzG,MAAM,MAAM,KAAK,CAAC,UAAU,IAAI;KAAG,CAAC,IAAI,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAEnF,MAAM,MAAM,cAAc,CAAC,UAAU,IAAI;IACvC,KAAK,EAAE;SAAG,CAAC,IAAI,MAAM,UAAU,GAAG,eAAe,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;KAAE,CAAC;IACxF,OAAO,CAAC,EAAE;SAAG,CAAC,IAAI,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO;KAAE,CAAC;IACtE,UAAU,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,UAAU,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC;AAEtE,MAAM,MAAM,YAAY,CAAC,UAAU,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,KAAK,CAAC,UAAU,CAAC,CAAC;AAE7E,wBAAgB,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,CAkBvG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { View, Text } from 'react-native';
|
|
2
|
-
import { withSlots, stagedComponent } from '@fluentui-react-native/
|
|
2
|
+
import { withSlots, stagedComponent } from '@fluentui-react-native/framework-base';
|
|
3
3
|
import * as renderer from 'react-test-renderer';
|
|
4
4
|
import { buildUseSlots } from './buildUseSlots';
|
|
5
5
|
const useSlotsBase = buildUseSlots({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildUseSlots.test.js","sourceRoot":"","sources":["../src/buildUseSlots.test.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"buildUseSlots.test.js","sourceRoot":"","sources":["../src/buildUseSlots.test.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQhD,MAAM,YAAY,GAAG,aAAa,CAAa;IAC7C,KAAK,EAAE;QACL,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,IAAI;KACd;CACF,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAG,eAAe,CAAC,CAAC,KAAgB,EAAE,EAAE;IACpD,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IAClC,OAAO,CAAC,KAAgB,EAAE,EAAE;QAC1B,MAAM,MAAM,GAAG,EAAE,GAAG,KAAK,EAAE,GAAG,KAAK,EAAE,CAAC;QACtC,OAAO,CACL,UAAC,KAAK,CAAC,KAAK,OAAK,MAAM;YACrB,UAAC,KAAK,CAAC,KAAK,IAAC,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;gBACpE,UAAC,KAAK,CAAC,OAAO,gBAAsB,CACxB,CACF,CACf,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACjC,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,UAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,EAAE,GAAI,CAAC,CAAC,MAAM,EAAE,CAAC;QAC5H,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { mergeProps } from '@fluentui-react-native/
|
|
2
|
-
import { withSlots, stagedComponent } from '@fluentui-react-native/
|
|
1
|
+
import { mergeProps } from '@fluentui-react-native/framework-base';
|
|
2
|
+
import { withSlots, stagedComponent } from '@fluentui-react-native/framework-base';
|
|
3
3
|
import * as renderer from 'react-test-renderer';
|
|
4
4
|
import { buildUseSlots } from './buildUseSlots';
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSlots.samples.test.js","sourceRoot":"","sources":["../src/useSlots.samples.test.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useSlots.samples.test.js","sourceRoot":"","sources":["../src/useSlots.samples.test.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQhD;;;GAGG;AAEH,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;IAC/C;;;OAGG;IAEH;;;;;OAKG;IAEH,MAAM,aAAa,GAAc,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,EAAE,CAAC;IAEhE;;OAEG;IACH,MAAM,gBAAgB,GAAgE,CAAC,KAAyC,EAAE,EAAE;QAClI;;WAEG;QACH,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;QAEpC;;;WAGG;QACH,OAAO,uBAAU,UAAU,CAAC,aAAa,EAAE,IAAI,CAAC,IAAG,QAAQ,CAAQ,CAAC;IACtE,CAAC,CAAC;IACF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;IAElD;;;;;OAKG;IACH,MAAM,cAAc,GAAG,eAAe,CAAC,CAAC,KAAyC,EAAE,EAAE;QACnF;;;WAGG;QACH,OAAO,CAAC,KAAgB,EAAE,QAAyB,EAAE,EAAE;YACrD;;;eAGG;YACH,OAAO,uBAAU,UAAU,CAAC,aAAa,EAAE,KAAK,EAAE,KAAK,CAAC,IAAG,QAAQ,CAAQ,CAAC;QAC9E,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC;IAE9C,EAAE,CAAC,gEAAgE,EAAE,G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AAW,CAAiB,CAC5C,CACnB,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,qBAAqB,CAAC,WAAW,GAAG,uBAAuB,CAAC;IAE5D,EAAE,CAAC,oEAAoE,EAAE,GAAG,EAAE;QAC5E,MAAM,YAAY,GAAc,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC;QAEnG;;;WAGG;QACH,MAAM,OAAO,GAAG,QAAQ;aACrB,MAAM,CACL;YACE,0DAA4C;YAC5C,UAAC,uBAAuB,IAAC,KAAK,EAAE,YAAY,mBAAwC;YACpF,UAAC,qBAAqB,IAAC,KAAK,EAAE,YAAY,iBAAoC;YAC9E,2DAA6C;YAC7C,UAAC,uBAAuB,IAAC,KAAK,EAAE,YAAY,EAAE,WAAW,EAAC,cAAc,gCAE9C;YAC1B,UAAC,qBAAqB,IAAC,KAAK,EAAE,YAAY,EAAE,WAAW,EAAC,cAAc,8BAE9C;YACxB,8EAAgE;YAChE,UAAC,uBAAuB,IAAC,KAAK,EAAE,YAAY,EAAE,WAAW,EAAC,cAAc,EAAC,YAAY,EAAC,QAAQ,EAAC,WAAW,EAAC,KAAK,mDAEtF;YAC1B,UAAC,qBAAqB,IAAC,KAAK,EAAE,YAAY,EAAE,WAAW,EAAC,cAAc,EAAC,YAAY,EAAC,QAAQ,EAAC,WAAW,EAAC,KAAK,iDAEtF,CACpB,CACP;aACA,MAAM,EAAE,CAAC;QACZ,MAAM,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComposableFunction, SlotFn, NativeReactType } from '@fluentui-react-native/
|
|
1
|
+
import type { ComposableFunction, SlotFn, NativeReactType } from '@fluentui-react-native/framework-base';
|
|
2
2
|
export type Slots<TSlotProps> = {
|
|
3
3
|
[K in keyof TSlotProps]: SlotFn<TSlotProps[K]>;
|
|
4
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildUseSlots.d.ts","sourceRoot":"","sources":["../src/buildUseSlots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"buildUseSlots.d.ts","sourceRoot":"","sources":["../src/buildUseSlots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAUzG,MAAM,MAAM,KAAK,CAAC,UAAU,IAAI;KAAG,CAAC,IAAI,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAEnF,MAAM,MAAM,cAAc,CAAC,UAAU,IAAI;IACvC,KAAK,EAAE;SAAG,CAAC,IAAI,MAAM,UAAU,GAAG,eAAe,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;KAAE,CAAC;IACxF,OAAO,CAAC,EAAE;SAAG,CAAC,IAAI,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO;KAAE,CAAC;IACtE,UAAU,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,UAAU,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC;AAEtE,MAAM,MAAM,YAAY,CAAC,UAAU,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,KAAK,CAAC,UAAU,CAAC,CAAC;AAE7E,wBAAgB,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,CAkBvG"}
|
|
@@ -24,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
const react_native_1 = require("react-native");
|
|
27
|
-
const
|
|
27
|
+
const framework_base_1 = require("@fluentui-react-native/framework-base");
|
|
28
28
|
const renderer = __importStar(require("react-test-renderer"));
|
|
29
29
|
const buildUseSlots_1 = require("./buildUseSlots");
|
|
30
30
|
const useSlotsBase = (0, buildUseSlots_1.buildUseSlots)({
|
|
@@ -34,18 +34,18 @@ const useSlotsBase = (0, buildUseSlots_1.buildUseSlots)({
|
|
|
34
34
|
content: react_native_1.Text,
|
|
35
35
|
},
|
|
36
36
|
});
|
|
37
|
-
const CompBase = (0,
|
|
37
|
+
const CompBase = (0, framework_base_1.stagedComponent)((props) => {
|
|
38
38
|
const Slots = useSlotsBase(props);
|
|
39
39
|
return (extra) => {
|
|
40
40
|
const merged = { ...props, ...extra };
|
|
41
|
-
return ((0,
|
|
42
|
-
(0,
|
|
43
|
-
(0,
|
|
41
|
+
return ((0, framework_base_1.withSlots)(Slots.outer, { ...merged },
|
|
42
|
+
(0, framework_base_1.withSlots)(Slots.inner, { style: { backgroundColor: 'blue', width: 20, height: 10 } },
|
|
43
|
+
(0, framework_base_1.withSlots)(Slots.content, null, "Hello"))));
|
|
44
44
|
};
|
|
45
45
|
});
|
|
46
46
|
describe('buildUseSlots test suite', () => {
|
|
47
47
|
it('Simple component render', () => {
|
|
48
|
-
const tree = renderer.create((0,
|
|
48
|
+
const tree = renderer.create((0, framework_base_1.withSlots)(CompBase, { style: { width: 30, height: 20, borderColor: 'green', borderWidth: 1 } })).toJSON();
|
|
49
49
|
expect(tree).toMatchSnapshot();
|
|
50
50
|
});
|
|
51
51
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildUseSlots.test.js","sourceRoot":"","sources":["../src/buildUseSlots.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;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eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -23,8 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const
|
|
27
|
-
const
|
|
26
|
+
const framework_base_1 = require("@fluentui-react-native/framework-base");
|
|
27
|
+
const framework_base_2 = require("@fluentui-react-native/framework-base");
|
|
28
28
|
const renderer = __importStar(require("react-test-renderer"));
|
|
29
29
|
const buildUseSlots_1 = require("./buildUseSlots");
|
|
30
30
|
/**
|
|
@@ -55,7 +55,7 @@ describe('useSlots sample code test suite', () => {
|
|
|
55
55
|
* Now render the text, merging the baseProps with the style updates with the rest param. Note that this leverages the fact
|
|
56
56
|
* that mergeProps will reliably produce style objects with the same reference, given the same inputs.
|
|
57
57
|
*/
|
|
58
|
-
return (0,
|
|
58
|
+
return (0, framework_base_2.withSlots)("span", { ...(0, framework_base_1.mergeProps)(boldBaseProps, rest) }, children);
|
|
59
59
|
};
|
|
60
60
|
BoldTextStandard.displayName = 'BoldTextStandard';
|
|
61
61
|
/**
|
|
@@ -64,7 +64,7 @@ describe('useSlots sample code test suite', () => {
|
|
|
64
64
|
*
|
|
65
65
|
* The stagedComponent function takes an input function of this form and wraps it in a function component that react knows how to render
|
|
66
66
|
*/
|
|
67
|
-
const BoldTextStaged = (0,
|
|
67
|
+
const BoldTextStaged = (0, framework_base_2.stagedComponent)((props) => {
|
|
68
68
|
/**
|
|
69
69
|
* This section would be where hook/styling code would go, props here would include everything coming in from the base react tree with the
|
|
70
70
|
* exception of children, which will be passed in stage 2.
|
|
@@ -74,7 +74,7 @@ describe('useSlots sample code test suite', () => {
|
|
|
74
74
|
* extra are additional props that may be filled in by a higher order component. They should not include styling and are only props the
|
|
75
75
|
* enclosing component are passing to the JSX elements
|
|
76
76
|
*/
|
|
77
|
-
return (0,
|
|
77
|
+
return (0, framework_base_2.withSlots)("span", { ...(0, framework_base_1.mergeProps)(boldBaseProps, props, extra) }, children);
|
|
78
78
|
};
|
|
79
79
|
});
|
|
80
80
|
BoldTextStaged.displayName = 'BoldTextStaged';
|
|
@@ -84,9 +84,9 @@ describe('useSlots sample code test suite', () => {
|
|
|
84
84
|
* First render the staged component. This invokes the wrapper that was built by the stagedComponent function
|
|
85
85
|
*/
|
|
86
86
|
const wrapper = renderer
|
|
87
|
-
.create((0,
|
|
88
|
-
(0,
|
|
89
|
-
(0,
|
|
87
|
+
.create((0, framework_base_2.withSlots)("div", null,
|
|
88
|
+
(0, framework_base_2.withSlots)(BoldTextStaged, { style: styleToMerge }, "Staged component at one level"),
|
|
89
|
+
(0, framework_base_2.withSlots)(BoldTextStandard, { style: styleToMerge }, "Standard component of a single level")))
|
|
90
90
|
.toJSON();
|
|
91
91
|
expect(wrapper).toMatchSnapshot();
|
|
92
92
|
});
|
|
@@ -105,7 +105,7 @@ describe('useSlots sample code test suite', () => {
|
|
|
105
105
|
*/
|
|
106
106
|
const HeaderStandard = (props) => {
|
|
107
107
|
const { children, ...rest } = props;
|
|
108
|
-
return (0,
|
|
108
|
+
return (0, framework_base_2.withSlots)(BoldTextStandard, { ...(0, framework_base_1.mergeProps)(headerBaseProps, rest) }, children);
|
|
109
109
|
};
|
|
110
110
|
HeaderStandard.displayName = 'HeaderStandard';
|
|
111
111
|
/**
|
|
@@ -119,7 +119,7 @@ describe('useSlots sample code test suite', () => {
|
|
|
119
119
|
/**
|
|
120
120
|
* Now author the staged component using the slot hook
|
|
121
121
|
*/
|
|
122
|
-
const HeaderStaged = (0,
|
|
122
|
+
const HeaderStaged = (0, framework_base_2.stagedComponent)((props) => {
|
|
123
123
|
/**
|
|
124
124
|
* Call the slots hook (or any hook) outside of the inner closure. The useSlots hook will return an object with each slot as a renderable
|
|
125
125
|
* function. The hooks for sub-components will be called as part of this call. Props passed in at this point will be the props that appear
|
|
@@ -138,7 +138,7 @@ describe('useSlots sample code test suite', () => {
|
|
|
138
138
|
* NOTE: this requires using the withSlots helper via the jsx directive. This knows how to pick apart the entries and just call the second
|
|
139
139
|
* part of the function
|
|
140
140
|
*/
|
|
141
|
-
return (0,
|
|
141
|
+
return (0, framework_base_2.withSlots)(BoldText, { ...(0, framework_base_1.mergeProps)(headerBaseProps, props, extra) }, children);
|
|
142
142
|
};
|
|
143
143
|
});
|
|
144
144
|
HeaderStaged.displayName = 'HeaderStaged';
|
|
@@ -152,9 +152,9 @@ describe('useSlots sample code test suite', () => {
|
|
|
152
152
|
* First render the staged component. This invokes the wrapper that was built by the stagedComponent function
|
|
153
153
|
*/
|
|
154
154
|
const wrapper = renderer
|
|
155
|
-
.create((0,
|
|
156
|
-
(0,
|
|
157
|
-
(0,
|
|
155
|
+
.create((0, framework_base_2.withSlots)("div", null,
|
|
156
|
+
(0, framework_base_2.withSlots)(HeaderStaged, { style: styleToMerge }, "Staged component with two levels"),
|
|
157
|
+
(0, framework_base_2.withSlots)(HeaderStandard, { style: styleToMerge }, "Standard component with two levels")))
|
|
158
158
|
.toJSON();
|
|
159
159
|
expect(wrapper).toMatchSnapshot();
|
|
160
160
|
});
|
|
@@ -179,9 +179,9 @@ describe('useSlots sample code test suite', () => {
|
|
|
179
179
|
const { headerColor, captionColor, captionText, children, ...rest } = props;
|
|
180
180
|
const headerColorProps = getColorProps(headerColor);
|
|
181
181
|
const captionColorProps = getColorProps(captionColor);
|
|
182
|
-
return ((0,
|
|
183
|
-
(0,
|
|
184
|
-
captionText && (0,
|
|
182
|
+
return ((0, framework_base_2.withSlots)("div", { ...(0, framework_base_1.mergeProps)(containerProps, rest) },
|
|
183
|
+
(0, framework_base_2.withSlots)(HeaderStandard, { ...headerColorProps }, children),
|
|
184
|
+
captionText && (0, framework_base_2.withSlots)(BoldTextStandard, { ...captionColorProps }, captionText)));
|
|
185
185
|
};
|
|
186
186
|
CaptionedHeaderStandard.displayName = `CaptionedHeaderStandard';`;
|
|
187
187
|
/**
|
|
@@ -206,16 +206,16 @@ describe('useSlots sample code test suite', () => {
|
|
|
206
206
|
/**
|
|
207
207
|
* now use the hook to implement it as a staged component
|
|
208
208
|
*/
|
|
209
|
-
const CaptionedHeaderStaged = (0,
|
|
209
|
+
const CaptionedHeaderStaged = (0, framework_base_2.stagedComponent)((props) => {
|
|
210
210
|
// At the point where this is called the slots are initialized with the initial prop values from useStyling above
|
|
211
211
|
const Slots = useCaptionedHeaderSlots(props);
|
|
212
212
|
return (extra, children) => {
|
|
213
213
|
// merge the props together, picking out the caption text and clearing any custom values we don't want forwarded to the view
|
|
214
|
-
const { captionText, ...rest } = (0,
|
|
214
|
+
const { captionText, ...rest } = (0, framework_base_1.mergeProps)(props, extra, clearCustomProps);
|
|
215
215
|
// now render using the slots. Any values passed in via JSX will be merged with values from the slot hook above
|
|
216
|
-
return ((0,
|
|
217
|
-
(0,
|
|
218
|
-
captionText && (0,
|
|
216
|
+
return ((0, framework_base_2.withSlots)(Slots.container, { ...rest },
|
|
217
|
+
(0, framework_base_2.withSlots)(Slots.header, null, children),
|
|
218
|
+
captionText && (0, framework_base_2.withSlots)(Slots.caption, null, captionText)));
|
|
219
219
|
};
|
|
220
220
|
});
|
|
221
221
|
CaptionedHeaderStaged.displayName = 'CaptionedHeaderStaged';
|
|
@@ -226,16 +226,16 @@ describe('useSlots sample code test suite', () => {
|
|
|
226
226
|
* to add up.
|
|
227
227
|
*/
|
|
228
228
|
const wrapper = renderer
|
|
229
|
-
.create((0,
|
|
230
|
-
(0,
|
|
231
|
-
(0,
|
|
232
|
-
(0,
|
|
233
|
-
(0,
|
|
234
|
-
(0,
|
|
235
|
-
(0,
|
|
236
|
-
(0,
|
|
237
|
-
(0,
|
|
238
|
-
(0,
|
|
229
|
+
.create((0, framework_base_2.withSlots)("div", null,
|
|
230
|
+
(0, framework_base_2.withSlots)("span", null, "--- SIMPLE USAGE COMPARISON ---"),
|
|
231
|
+
(0, framework_base_2.withSlots)(CaptionedHeaderStandard, { style: styleToMerge }, "Standard HOC"),
|
|
232
|
+
(0, framework_base_2.withSlots)(CaptionedHeaderStaged, { style: styleToMerge }, "Staged HOC"),
|
|
233
|
+
(0, framework_base_2.withSlots)("span", null, "--- COMPARISON WITH CAPTIONS ---"),
|
|
234
|
+
(0, framework_base_2.withSlots)(CaptionedHeaderStandard, { style: styleToMerge, captionText: "Caption text" }, "Standard HOC with Caption"),
|
|
235
|
+
(0, framework_base_2.withSlots)(CaptionedHeaderStaged, { style: styleToMerge, captionText: "Caption text" }, "Staged HOC with Caption"),
|
|
236
|
+
(0, framework_base_2.withSlots)("span", null, "--- COMPARISON WITH CAPTIONS AND CUSTOMIZATIONS ---"),
|
|
237
|
+
(0, framework_base_2.withSlots)(CaptionedHeaderStandard, { style: styleToMerge, captionText: "Caption text", captionColor: "yellow", headerColor: "red" }, "Standard HOC with caption and customizations"),
|
|
238
|
+
(0, framework_base_2.withSlots)(CaptionedHeaderStaged, { style: styleToMerge, captionText: "Caption text", captionColor: "yellow", headerColor: "red" }, "Staged HOC with caption and customizations")))
|
|
239
239
|
.toJSON();
|
|
240
240
|
expect(wrapper).toMatchSnapshot();
|
|
241
241
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSlots.samples.test.js","sourceRoot":"","sources":["../src/useSlots.samples.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIA,
|
|
1
|
+
{"version":3,"file":"useSlots.samples.test.js","sourceRoot":"","sources":["../src/useSlots.samples.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIA,0EAAmE;AACnE,0EAAmF;AACnF,8DAAgD;AAEhD,mDAAgD;AAQhD;;;GAGG;AAEH,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;IAC/C;;;OAGG;IAEH;;;;;OAKG;IAEH,MAAM,aAAa,GAAc,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,EAAE,CAAC;IAEhE;;OAEG;IACH,MA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AAC,uBAAuB,IAAC,KAAK,EAAE,YAAY,EAAE,WAAW,EAAC,cAAc,gCAE9C;YAC1B,gCAAC,qBAAqB,IAAC,KAAK,EAAE,YAAY,EAAE,WAAW,EAAC,cAAc,8BAE9C;YACxB,oGAAgE;YAChE,gCAAC,uBAAuB,IAAC,KAAK,EAAE,YAAY,EAAE,WAAW,EAAC,cAAc,EAAC,YAAY,EAAC,QAAQ,EAAC,WAAW,EAAC,KAAK,mDAEtF;YAC1B,gCAAC,qBAAqB,IAAC,KAAK,EAAE,YAAY,EAAE,WAAW,EAAC,cAAc,EAAC,YAAY,EAAC,QAAQ,EAAC,WAAW,EAAC,KAAK,iDAEtF,CACpB,CACP;aACA,MAAM,EAAE,CAAC;QACZ,MAAM,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/use-slots",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.8",
|
|
4
4
|
"description": "Hook function to return styled slots",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"author": "",
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@fluentui-react-native/
|
|
38
|
+
"@fluentui-react-native/framework-base": "0.1.2",
|
|
39
|
+
"@fluentui-react-native/use-slot": "0.6.8"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
42
|
"@babel/core": "^7.20.0",
|
|
42
|
-
"@fluentui-react-native/merge-props": "0.9.5",
|
|
43
43
|
"@fluentui-react-native/scripts": "0.1.1",
|
|
44
44
|
"@react-native/babel-preset": "^0.74.0",
|
|
45
45
|
"@react-native/metro-config": "^0.74.0",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import type { ViewProps, TextProps } from 'react-native';
|
|
4
4
|
import { View, Text } from 'react-native';
|
|
5
5
|
|
|
6
|
-
import { withSlots, stagedComponent } from '@fluentui-react-native/
|
|
6
|
+
import { withSlots, stagedComponent } from '@fluentui-react-native/framework-base';
|
|
7
7
|
import * as renderer from 'react-test-renderer';
|
|
8
8
|
|
|
9
9
|
import { buildUseSlots } from './buildUseSlots';
|
package/src/buildUseSlots.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComposableFunction, SlotFn, NativeReactType } from '@fluentui-react-native/
|
|
1
|
+
import type { ComposableFunction, SlotFn, NativeReactType } from '@fluentui-react-native/framework-base';
|
|
2
2
|
import { useSlot } from '@fluentui-react-native/use-slot';
|
|
3
3
|
|
|
4
4
|
// type AsObject<T> = T extends object ? T : never
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/** @jsx withSlots */
|
|
3
3
|
import type { CSSProperties } from 'react';
|
|
4
4
|
|
|
5
|
-
import { mergeProps } from '@fluentui-react-native/
|
|
6
|
-
import { withSlots, stagedComponent } from '@fluentui-react-native/
|
|
5
|
+
import { mergeProps } from '@fluentui-react-native/framework-base';
|
|
6
|
+
import { withSlots, stagedComponent } from '@fluentui-react-native/framework-base';
|
|
7
7
|
import * as renderer from 'react-test-renderer';
|
|
8
8
|
|
|
9
9
|
import { buildUseSlots } from './buildUseSlots';
|