@fluentui-react-native/separator 0.18.3 → 0.18.5
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 +42 -1
- package/CHANGELOG.md +10 -2
- package/eslint.config.js +3 -0
- package/lib/Separator.js +10 -16
- package/lib/Separator.js.map +1 -1
- package/lib/Separator.styling.js +10 -17
- package/lib/Separator.styling.js.map +1 -1
- package/lib/Separator.types.js +2 -2
- package/lib/Separator.types.js.map +1 -1
- package/lib/SeparatorTokens.android.js +5 -7
- package/lib/SeparatorTokens.android.js.map +1 -1
- package/lib/SeparatorTokens.js +3 -5
- package/lib/SeparatorTokens.js.map +1 -1
- package/lib/__tests__/Separator.test.js +5 -5
- package/lib/__tests__/Separator.test.js.map +1 -1
- package/lib-commonjs/Separator.js +14 -20
- package/lib-commonjs/Separator.js.map +1 -1
- package/lib-commonjs/Separator.styling.js +13 -20
- package/lib-commonjs/Separator.styling.js.map +1 -1
- package/lib-commonjs/SeparatorTokens.android.js +6 -8
- package/lib-commonjs/SeparatorTokens.android.js.map +1 -1
- package/lib-commonjs/SeparatorTokens.js +4 -6
- package/lib-commonjs/SeparatorTokens.js.map +1 -1
- package/lib-commonjs/__tests__/Separator.test.js +8 -8
- package/lib-commonjs/__tests__/Separator.test.js.map +1 -1
- package/package.json +17 -5
- package/.eslintrc.js +0 -3
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,48 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/separator",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Fri, 11 Jul 2025 19:50:45 GMT",
|
|
6
|
+
"version": "0.18.5",
|
|
7
|
+
"tag": "@fluentui-react-native/separator_v0.18.5",
|
|
8
|
+
"comments": {
|
|
9
|
+
"none": [
|
|
10
|
+
{
|
|
11
|
+
"author": "ruaraki@microsoft.com",
|
|
12
|
+
"package": "@fluentui-react-native/separator",
|
|
13
|
+
"commit": "a245202877ef7f2be9ab5f0e1356b2270957e693",
|
|
14
|
+
"comment": "Run bump-versions"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "sanajmi@microsoft.com",
|
|
18
|
+
"package": "@fluentui-react-native/separator",
|
|
19
|
+
"commit": "405ca368dc3f2963bfc252a1952b1e14ff503499",
|
|
20
|
+
"comment": "fix: run `beachball sync` to sync package versions with NPM"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "4123478+tido64@users.noreply.github.com",
|
|
24
|
+
"package": "@fluentui-react-native/separator",
|
|
25
|
+
"commit": "79bb06f6bbfd0a36f9d2ef371f4857be9660f027",
|
|
26
|
+
"comment": "Fixed `align-deps` warnings"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "jasonmo@microsoft.com",
|
|
30
|
+
"package": "@fluentui-react-native/separator",
|
|
31
|
+
"commit": "54087dca787180bbf34630470cd0d06e88366b30",
|
|
32
|
+
"comment": "update eslint to 9.x and use new flat config format with security rules"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"patch": [
|
|
36
|
+
{
|
|
37
|
+
"author": "jasonmo@microsoft.com",
|
|
38
|
+
"package": "@fluentui-react-native/separator",
|
|
39
|
+
"commit": "479b93cea460a26df70c55b5d3335927ed374713",
|
|
40
|
+
"comment": "update builds to use node16 settings and modern export maps"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"date": "Thu, 10 Jul 2025 19:20:18 GMT",
|
|
6
47
|
"version": "0.18.3",
|
|
7
48
|
"tag": "@fluentui-react-native/separator_v0.18.3",
|
|
8
49
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/separator
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Fri, 11 Jul 2025 19:50:45 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.18.5
|
|
8
|
+
|
|
9
|
+
Fri, 11 Jul 2025 19:50:45 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- update builds to use node16 settings and modern export maps (jasonmo@microsoft.com)
|
|
14
|
+
|
|
7
15
|
## 0.18.3
|
|
8
16
|
|
|
9
|
-
Thu,
|
|
17
|
+
Thu, 10 Jul 2025 19:20:18 GMT
|
|
10
18
|
|
|
11
19
|
### Patches
|
|
12
20
|
|
package/eslint.config.js
ADDED
package/lib/Separator.js
CHANGED
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
/** @jsxRuntime classic */
|
|
13
2
|
/** @jsx withSlots */
|
|
14
3
|
import { View } from 'react-native';
|
|
15
4
|
import { compose, withSlots, mergeProps } from '@fluentui-react-native/framework';
|
|
16
5
|
import { stylingSettings } from './Separator.styling';
|
|
17
6
|
import { separatorName } from './Separator.types';
|
|
18
|
-
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
const propMask = { vertical: undefined };
|
|
8
|
+
export const Separator = compose({
|
|
9
|
+
displayName: separatorName,
|
|
10
|
+
...stylingSettings,
|
|
11
|
+
slots: { root: View },
|
|
12
|
+
useRender: (props, useSlots) => {
|
|
13
|
+
const Root = useSlots(props).root;
|
|
14
|
+
return (rest, children) => withSlots(Root, { ...mergeProps(props, rest, propMask) }, children);
|
|
15
|
+
},
|
|
16
|
+
});
|
|
23
17
|
export default Separator;
|
|
24
18
|
//# sourceMappingURL=Separator.js.map
|
package/lib/Separator.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.js","sourceRoot":"","sources":["../src/Separator.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Separator.js","sourceRoot":"","sources":["../src/Separator.tsx"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,qBAAqB;AACrB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,QAAQ,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AAEzC,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAgB;IAC9C,WAAW,EAAE,aAAa;IAC1B,GAAG,eAAe;IAClB,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;IACrB,SAAS,EAAE,CAAC,KAAqB,EAAE,QAAiC,EAAE,EAAE;QACtE,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;QAClC,OAAO,CAAC,IAAoB,EAAE,QAAyB,EAAE,EAAE,CAAC,UAAC,IAAI,OAAK,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAG,QAAQ,CAAQ,CAAC;IAC7H,CAAC;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
package/lib/Separator.styling.js
CHANGED
|
@@ -1,27 +1,20 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { Platform } from 'react-native';
|
|
13
2
|
import { buildProps } from '@fluentui-react-native/framework';
|
|
14
3
|
import { separatorName } from './Separator.types';
|
|
15
4
|
import { defaultSeparatorTokens } from './SeparatorTokens';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export
|
|
5
|
+
const isMobile = Platform.OS === 'android' || Platform.OS === 'ios';
|
|
6
|
+
const tokensThatAreAlsoProps = ['vertical', 'insetSpacing'];
|
|
7
|
+
export const stylingSettings = {
|
|
19
8
|
tokens: [defaultSeparatorTokens, separatorName],
|
|
20
|
-
tokensThatAreAlsoProps
|
|
9
|
+
tokensThatAreAlsoProps,
|
|
21
10
|
slotProps: {
|
|
22
|
-
root: buildProps(
|
|
11
|
+
root: buildProps((tokens) => {
|
|
23
12
|
return {
|
|
24
|
-
style:
|
|
13
|
+
style: {
|
|
14
|
+
...(tokens.vertical ? { borderLeftWidth: tokens.separatorWidth } : { borderTopWidth: tokens.separatorWidth }),
|
|
15
|
+
...(tokens.color && { borderColor: tokens.color }),
|
|
16
|
+
...(isMobile && { marginStart: tokens.insetSpacing }),
|
|
17
|
+
},
|
|
25
18
|
};
|
|
26
19
|
}, ['color', 'vertical', 'separatorWidth', 'insetSpacing']),
|
|
27
20
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.styling.js","sourceRoot":"","sources":["../src/Separator.styling.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Separator.styling.js","sourceRoot":"","sources":["../src/Separator.styling.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxC,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAG9D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,QAAQ,GAAG,QAAQ,CAAC,EAAE,KAAK,SAAS,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAC;AACpE,MAAM,sBAAsB,GAAkC,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;AAC3F,MAAM,CAAC,MAAM,eAAe,GAA2E;IACrG,MAAM,EAAE,CAAC,sBAAsB,EAAE,aAAa,CAAC;IAC/C,sBAAsB;IACtB,SAAS,EAAE;QACT,IAAI,EAAE,UAAU,CACd,CAAC,MAAuB,EAAE,EAAE;YAC1B,OAAO;gBACL,KAAK,EAAE;oBACL,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC;oBAC7G,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;oBAClD,GAAG,CAAC,QAAQ,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC;iBACtD;aACF,CAAC;QACJ,CAAC,EACD,CAAC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,CAAC,CACxD;KACF;CACF,CAAC"}
|
package/lib/Separator.types.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export const separatorName = 'Separator';
|
|
2
|
+
export const SeparatorInsetSpacings = [0, 16, 56, 68, 72, 108];
|
|
3
3
|
//# sourceMappingURL=Separator.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.types.js","sourceRoot":"","sources":["../src/Separator.types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"Separator.types.js","sourceRoot":"","sources":["../src/Separator.types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;AAEzC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAU,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
};
|
|
2
|
+
export const defaultSeparatorTokens = (t) => ({
|
|
3
|
+
color: t.colors.neutralStroke2,
|
|
4
|
+
separatorWidth: globalTokens.stroke.width10,
|
|
5
|
+
insetSpacing: 0,
|
|
6
|
+
});
|
|
9
7
|
//# sourceMappingURL=SeparatorTokens.android.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SeparatorTokens.android.js","sourceRoot":"","sources":["../src/SeparatorTokens.android.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKnE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"SeparatorTokens.android.js","sourceRoot":"","sources":["../src/SeparatorTokens.android.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKnE,MAAM,CAAC,MAAM,sBAAsB,GAA0C,CAAC,CAAQ,EAAE,EAAE,CACxF,CAAC;IACC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc;IAC9B,cAAc,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO;IAC3C,YAAY,EAAE,CAAC;CACI,CAAA,CAAC"}
|
package/lib/SeparatorTokens.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
};
|
|
2
|
+
export const defaultSeparatorTokens = () => ({
|
|
3
|
+
separatorWidth: globalTokens.stroke.width10,
|
|
4
|
+
});
|
|
7
5
|
//# sourceMappingURL=SeparatorTokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SeparatorTokens.js","sourceRoot":"","sources":["../src/SeparatorTokens.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKnE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"SeparatorTokens.js","sourceRoot":"","sources":["../src/SeparatorTokens.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKnE,MAAM,CAAC,MAAM,sBAAsB,GAA0C,GAAG,EAAE,CAChF,CAAC;IACC,cAAc,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO;CACxB,CAAA,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as renderer from 'react-test-renderer';
|
|
3
3
|
import { Separator } from '..';
|
|
4
|
-
it('Separator default',
|
|
5
|
-
|
|
4
|
+
it('Separator default', () => {
|
|
5
|
+
const tree = renderer.create(React.createElement(Separator, null)).toJSON();
|
|
6
6
|
expect(tree).toMatchSnapshot();
|
|
7
7
|
});
|
|
8
|
-
it('Separator all props & tokens',
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
it('Separator all props & tokens', () => {
|
|
9
|
+
const CustomSeparator = Separator.customize({ separatorWidth: 15, color: 'red' });
|
|
10
|
+
const tree = renderer.create(React.createElement(CustomSeparator, { vertical: true })).toJSON();
|
|
11
11
|
expect(tree).toMatchSnapshot();
|
|
12
12
|
});
|
|
13
13
|
//# sourceMappingURL=Separator.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.test.js","sourceRoot":"","sources":["../../src/__tests__/Separator.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAE/B,EAAE,CAAC,mBAAmB,EAAE;
|
|
1
|
+
{"version":3,"file":"Separator.test.js","sourceRoot":"","sources":["../../src/__tests__/Separator.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAE/B,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAC3B,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,oBAAC,SAAS,OAAG,CAAC,CAAC,MAAM,EAAE,CAAC;IACrD,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjC,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;IACtC,MAAM,eAAe,GAAG,SAAS,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAClF,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,oBAAC,eAAe,IAAC,QAAQ,SAAG,CAAC,CAAC,MAAM,EAAE,CAAC;IACpE,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjC,CAAC,CAAC,CAAC"}
|
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.Separator = void 0;
|
|
15
4
|
/** @jsxRuntime classic */
|
|
16
5
|
/** @jsx withSlots */
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
exports.Separator = (0, framework_1.compose)(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
6
|
+
const react_native_1 = require("react-native");
|
|
7
|
+
const framework_1 = require("@fluentui-react-native/framework");
|
|
8
|
+
const Separator_styling_1 = require("./Separator.styling");
|
|
9
|
+
const Separator_types_1 = require("./Separator.types");
|
|
10
|
+
const propMask = { vertical: undefined };
|
|
11
|
+
exports.Separator = (0, framework_1.compose)({
|
|
12
|
+
displayName: Separator_types_1.separatorName,
|
|
13
|
+
...Separator_styling_1.stylingSettings,
|
|
14
|
+
slots: { root: react_native_1.View },
|
|
15
|
+
useRender: (props, useSlots) => {
|
|
16
|
+
const Root = useSlots(props).root;
|
|
17
|
+
return (rest, children) => (0, framework_1.withSlots)(Root, { ...(0, framework_1.mergeProps)(props, rest, propMask) }, children);
|
|
18
|
+
},
|
|
19
|
+
});
|
|
26
20
|
exports.default = exports.Separator;
|
|
27
21
|
//# sourceMappingURL=Separator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.js","sourceRoot":"","sources":["../src/Separator.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Separator.js","sourceRoot":"","sources":["../src/Separator.tsx"],"names":[],"mappings":";;;AAAA,0BAA0B;AAC1B,qBAAqB;AACrB,+CAAoC;AAGpC,gEAAkF;AAElF,2DAAsD;AAEtD,uDAAkD;AAElD,MAAM,QAAQ,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AAE5B,QAAA,SAAS,GAAG,IAAA,mBAAO,EAAgB;IAC9C,WAAW,EAAE,+BAAa;IAC1B,GAAG,mCAAe;IAClB,KAAK,EAAE,EAAE,IAAI,EAAE,mBAAI,EAAE;IACrB,SAAS,EAAE,CAAC,KAAqB,EAAE,QAAiC,EAAE,EAAE;QACtE,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;QAClC,OAAO,CAAC,IAAoB,EAAE,QAAyB,EAAE,EAAE,CAAC,2BAAC,IAAI,OAAK,IAAA,sBAAU,EAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAG,QAAQ,CAAQ,CAAC;IAC7H,CAAC;CACF,CAAC,CAAC;AAEH,kBAAe,iBAAS,CAAC"}
|
|
@@ -1,30 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.stylingSettings = void 0;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
4
|
+
const react_native_1 = require("react-native");
|
|
5
|
+
const framework_1 = require("@fluentui-react-native/framework");
|
|
6
|
+
const Separator_types_1 = require("./Separator.types");
|
|
7
|
+
const SeparatorTokens_1 = require("./SeparatorTokens");
|
|
8
|
+
const isMobile = react_native_1.Platform.OS === 'android' || react_native_1.Platform.OS === 'ios';
|
|
9
|
+
const tokensThatAreAlsoProps = ['vertical', 'insetSpacing'];
|
|
21
10
|
exports.stylingSettings = {
|
|
22
11
|
tokens: [SeparatorTokens_1.defaultSeparatorTokens, Separator_types_1.separatorName],
|
|
23
|
-
tokensThatAreAlsoProps
|
|
12
|
+
tokensThatAreAlsoProps,
|
|
24
13
|
slotProps: {
|
|
25
|
-
root: (0, framework_1.buildProps)(
|
|
14
|
+
root: (0, framework_1.buildProps)((tokens) => {
|
|
26
15
|
return {
|
|
27
|
-
style:
|
|
16
|
+
style: {
|
|
17
|
+
...(tokens.vertical ? { borderLeftWidth: tokens.separatorWidth } : { borderTopWidth: tokens.separatorWidth }),
|
|
18
|
+
...(tokens.color && { borderColor: tokens.color }),
|
|
19
|
+
...(isMobile && { marginStart: tokens.insetSpacing }),
|
|
20
|
+
},
|
|
28
21
|
};
|
|
29
22
|
}, ['color', 'vertical', 'separatorWidth', 'insetSpacing']),
|
|
30
23
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.styling.js","sourceRoot":"","sources":["../src/Separator.styling.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Separator.styling.js","sourceRoot":"","sources":["../src/Separator.styling.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,gEAA8D;AAG9D,uDAAkD;AAClD,uDAA2D;AAE3D,MAAM,QAAQ,GAAG,uBAAQ,CAAC,EAAE,KAAK,SAAS,IAAI,uBAAQ,CAAC,EAAE,KAAK,KAAK,CAAC;AACpE,MAAM,sBAAsB,GAAkC,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;AAC9E,QAAA,eAAe,GAA2E;IACrG,MAAM,EAAE,CAAC,wCAAsB,EAAE,+BAAa,CAAC;IAC/C,sBAAsB;IACtB,SAAS,EAAE;QACT,IAAI,EAAE,IAAA,sBAAU,EACd,CAAC,MAAuB,EAAE,EAAE;YAC1B,OAAO;gBACL,KAAK,EAAE;oBACL,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC;oBAC7G,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;oBAClD,GAAG,CAAC,QAAQ,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC;iBACtD;aACF,CAAC;QACJ,CAAC,EACD,CAAC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,CAAC,CACxD;KACF;CACF,CAAC"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultSeparatorTokens = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
});
|
|
11
|
-
};
|
|
4
|
+
const theme_tokens_1 = require("@fluentui-react-native/theme-tokens");
|
|
5
|
+
const defaultSeparatorTokens = (t) => ({
|
|
6
|
+
color: t.colors.neutralStroke2,
|
|
7
|
+
separatorWidth: theme_tokens_1.globalTokens.stroke.width10,
|
|
8
|
+
insetSpacing: 0,
|
|
9
|
+
});
|
|
12
10
|
exports.defaultSeparatorTokens = defaultSeparatorTokens;
|
|
13
11
|
//# sourceMappingURL=SeparatorTokens.android.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SeparatorTokens.android.js","sourceRoot":"","sources":["../src/SeparatorTokens.android.tsx"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"SeparatorTokens.android.js","sourceRoot":"","sources":["../src/SeparatorTokens.android.tsx"],"names":[],"mappings":";;;AACA,sEAAmE;AAK5D,MAAM,sBAAsB,GAA0C,CAAC,CAAQ,EAAE,EAAE,CACxF,CAAC;IACC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc;IAC9B,cAAc,EAAE,2BAAY,CAAC,MAAM,CAAC,OAAO;IAC3C,YAAY,EAAE,CAAC;CACI,CAAA,CAAC;AALX,QAAA,sBAAsB,0BAKX"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultSeparatorTokens = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
});
|
|
9
|
-
};
|
|
4
|
+
const theme_tokens_1 = require("@fluentui-react-native/theme-tokens");
|
|
5
|
+
const defaultSeparatorTokens = () => ({
|
|
6
|
+
separatorWidth: theme_tokens_1.globalTokens.stroke.width10,
|
|
7
|
+
});
|
|
10
8
|
exports.defaultSeparatorTokens = defaultSeparatorTokens;
|
|
11
9
|
//# sourceMappingURL=SeparatorTokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SeparatorTokens.js","sourceRoot":"","sources":["../src/SeparatorTokens.tsx"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"SeparatorTokens.js","sourceRoot":"","sources":["../src/SeparatorTokens.tsx"],"names":[],"mappings":";;;AACA,sEAAmE;AAK5D,MAAM,sBAAsB,GAA0C,GAAG,EAAE,CAChF,CAAC;IACC,cAAc,EAAE,2BAAY,CAAC,MAAM,CAAC,OAAO;CACxB,CAAA,CAAC;AAHX,QAAA,sBAAsB,0BAGX"}
|
|
@@ -23,16 +23,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
it('Separator default',
|
|
30
|
-
|
|
26
|
+
const React = __importStar(require("react"));
|
|
27
|
+
const renderer = __importStar(require("react-test-renderer"));
|
|
28
|
+
const __1 = require("..");
|
|
29
|
+
it('Separator default', () => {
|
|
30
|
+
const tree = renderer.create(React.createElement(__1.Separator, null)).toJSON();
|
|
31
31
|
expect(tree).toMatchSnapshot();
|
|
32
32
|
});
|
|
33
|
-
it('Separator all props & tokens',
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
it('Separator all props & tokens', () => {
|
|
34
|
+
const CustomSeparator = __1.Separator.customize({ separatorWidth: 15, color: 'red' });
|
|
35
|
+
const tree = renderer.create(React.createElement(CustomSeparator, { vertical: true })).toJSON();
|
|
36
36
|
expect(tree).toMatchSnapshot();
|
|
37
37
|
});
|
|
38
38
|
//# sourceMappingURL=Separator.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.test.js","sourceRoot":"","sources":["../../src/__tests__/Separator.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"Separator.test.js","sourceRoot":"","sources":["../../src/__tests__/Separator.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B,8DAAgD;AAEhD,0BAA+B;AAE/B,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAC3B,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,oBAAC,aAAS,OAAG,CAAC,CAAC,MAAM,EAAE,CAAC;IACrD,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjC,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;IACtC,MAAM,eAAe,GAAG,aAAS,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAClF,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,oBAAC,eAAe,IAAC,QAAQ,SAAG,CAAC,CAAC,MAAM,EAAE,CAAC;IACpE,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjC,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/separator",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.5",
|
|
4
4
|
"description": "A cross-platform Separator component using the Fluent Design System",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./lib/index.js",
|
|
10
|
+
"require": "./lib-commonjs/index.js",
|
|
11
|
+
"types": "./lib/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
7
14
|
"typings": "lib/index.d.ts",
|
|
8
15
|
"scripts": {
|
|
9
16
|
"build": "fluentui-scripts build",
|
|
@@ -22,9 +29,9 @@
|
|
|
22
29
|
"directory": "packages/components/Separator"
|
|
23
30
|
},
|
|
24
31
|
"dependencies": {
|
|
25
|
-
"@fluentui-react-native/framework": "0.14.
|
|
26
|
-
"@fluentui-react-native/theme-tokens": "0.27.
|
|
27
|
-
"@fluentui-react-native/use-styling": "0.13.
|
|
32
|
+
"@fluentui-react-native/framework": "0.14.5",
|
|
33
|
+
"@fluentui-react-native/theme-tokens": "0.27.4",
|
|
34
|
+
"@fluentui-react-native/use-styling": "0.13.5"
|
|
28
35
|
},
|
|
29
36
|
"devDependencies": {
|
|
30
37
|
"@babel/core": "^7.20.0",
|
|
@@ -35,7 +42,9 @@
|
|
|
35
42
|
"@react-native/metro-config": "^0.74.0",
|
|
36
43
|
"@types/react": "~18.2.0",
|
|
37
44
|
"react": "18.2.0",
|
|
38
|
-
"react-native": "^0.74.0"
|
|
45
|
+
"react-native": "^0.74.0",
|
|
46
|
+
"react-native-macos": "^0.74.0",
|
|
47
|
+
"react-native-windows": "^0.74.0"
|
|
39
48
|
},
|
|
40
49
|
"peerDependencies": {
|
|
41
50
|
"@office-iss/react-native-win32": "^0.74.0",
|
|
@@ -61,9 +70,12 @@
|
|
|
61
70
|
]
|
|
62
71
|
},
|
|
63
72
|
"capabilities": [
|
|
73
|
+
"babel-preset-react-native",
|
|
64
74
|
"core",
|
|
65
75
|
"core-android",
|
|
66
76
|
"core-ios",
|
|
77
|
+
"core-macos",
|
|
78
|
+
"core-windows",
|
|
67
79
|
"react"
|
|
68
80
|
]
|
|
69
81
|
}
|
package/.eslintrc.js
DELETED