@fluentui-react-native/separator 0.13.9 → 0.14.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/CHANGELOG.json +49 -1
- package/CHANGELOG.md +21 -2
- package/lib/Separator.d.ts +2 -5
- package/lib/Separator.d.ts.map +1 -1
- package/lib/Separator.js +5 -15
- package/lib/Separator.js.map +1 -1
- package/lib/Separator.styling.d.ts +4 -0
- package/lib/Separator.styling.d.ts.map +1 -0
- package/lib/Separator.styling.js +29 -0
- package/lib/Separator.styling.js.map +1 -0
- package/lib/Separator.types.d.ts +17 -5
- package/lib/Separator.types.d.ts.map +1 -1
- package/lib/Separator.types.js +2 -1
- package/lib/Separator.types.js.map +1 -1
- package/lib/SeparatorTokens.android.d.ts +5 -0
- package/lib/SeparatorTokens.android.d.ts.map +1 -0
- package/lib/SeparatorTokens.android.js +9 -0
- package/lib/SeparatorTokens.android.js.map +1 -0
- package/lib/SeparatorTokens.d.ts +5 -0
- package/lib/SeparatorTokens.d.ts.map +1 -0
- package/lib/SeparatorTokens.js +7 -0
- package/lib/SeparatorTokens.js.map +1 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Separator.d.ts +2 -5
- package/lib-commonjs/Separator.d.ts.map +1 -1
- package/lib-commonjs/Separator.js +5 -15
- package/lib-commonjs/Separator.js.map +1 -1
- package/lib-commonjs/Separator.styling.d.ts +4 -0
- package/lib-commonjs/Separator.styling.d.ts.map +1 -0
- package/lib-commonjs/Separator.styling.js +32 -0
- package/lib-commonjs/Separator.styling.js.map +1 -0
- package/lib-commonjs/Separator.types.d.ts +17 -5
- package/lib-commonjs/Separator.types.d.ts.map +1 -1
- package/lib-commonjs/Separator.types.js +3 -0
- package/lib-commonjs/Separator.types.js.map +1 -1
- package/lib-commonjs/SeparatorTokens.android.d.ts +5 -0
- package/lib-commonjs/SeparatorTokens.android.d.ts.map +1 -0
- package/lib-commonjs/SeparatorTokens.android.js +13 -0
- package/lib-commonjs/SeparatorTokens.android.js.map +1 -0
- package/lib-commonjs/SeparatorTokens.d.ts +5 -0
- package/lib-commonjs/SeparatorTokens.d.ts.map +1 -0
- package/lib-commonjs/SeparatorTokens.js +11 -0
- package/lib-commonjs/SeparatorTokens.js.map +1 -0
- package/lib-commonjs/index.d.ts +2 -2
- package/lib-commonjs/index.d.ts.map +1 -1
- package/lib-commonjs/index.js +1 -2
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +4 -2
- package/src/Separator.styling.tsx +25 -0
- package/src/Separator.tsx +4 -16
- package/src/Separator.types.ts +22 -4
- package/src/SeparatorTokens.android.tsx +11 -0
- package/src/SeparatorTokens.tsx +9 -0
- package/src/index.ts +2 -2
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,55 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/separator",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 27 Dec 2022 22:18:36 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/separator_v0.14.1",
|
|
7
|
+
"version": "0.14.1",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@fluentui-react-native/separator",
|
|
13
|
+
"comment": "Bump @fluentui-react-native/framework to v0.8.28",
|
|
14
|
+
"commit": "9877f2f456807b697afd5aefce756a493a607746"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui-react-native/separator",
|
|
19
|
+
"comment": "Bump @fluentui-react-native/theme-tokens to v0.22.4",
|
|
20
|
+
"commit": "9877f2f456807b697afd5aefce756a493a607746"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"date": "Tue, 27 Dec 2022 10:18:14 GMT",
|
|
27
|
+
"tag": "@fluentui-react-native/separator_v0.14.0",
|
|
28
|
+
"version": "0.14.0",
|
|
29
|
+
"comments": {
|
|
30
|
+
"minor": [
|
|
31
|
+
{
|
|
32
|
+
"author": "rohanpd.work@gmail.com",
|
|
33
|
+
"package": "@fluentui-react-native/separator",
|
|
34
|
+
"commit": "e34a93726a72d32cf3886a4027ddade9cab099ff",
|
|
35
|
+
"comment": "android seperator implem , tester app changes"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"author": "beachball",
|
|
39
|
+
"package": "@fluentui-react-native/separator",
|
|
40
|
+
"comment": "Bump @fluentui-react-native/framework to v0.8.27",
|
|
41
|
+
"commit": "19c7982576e025a7601af0fb727ae6850b8d4aea"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"author": "beachball",
|
|
45
|
+
"package": "@fluentui-react-native/separator",
|
|
46
|
+
"comment": "Bump @fluentui-react-native/theme-tokens to v0.22.3",
|
|
47
|
+
"commit": "19c7982576e025a7601af0fb727ae6850b8d4aea"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"date": "Thu, 15 Dec 2022 14:50:50 GMT",
|
|
6
54
|
"tag": "@fluentui-react-native/separator_v0.13.9",
|
|
7
55
|
"version": "0.13.9",
|
|
8
56
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/separator
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 27 Dec 2022 22:18:36 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.14.1
|
|
8
|
+
|
|
9
|
+
Tue, 27 Dec 2022 22:18:36 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Bump @fluentui-react-native/framework to v0.8.28
|
|
14
|
+
- Bump @fluentui-react-native/theme-tokens to v0.22.4
|
|
15
|
+
|
|
16
|
+
## 0.14.0
|
|
17
|
+
|
|
18
|
+
Tue, 27 Dec 2022 10:18:14 GMT
|
|
19
|
+
|
|
20
|
+
### Minor changes
|
|
21
|
+
|
|
22
|
+
- android seperator implem , tester app changes (rohanpd.work@gmail.com)
|
|
23
|
+
- Bump @fluentui-react-native/framework to v0.8.27
|
|
24
|
+
- Bump @fluentui-react-native/theme-tokens to v0.22.3
|
|
25
|
+
|
|
7
26
|
## 0.13.9
|
|
8
27
|
|
|
9
|
-
Thu, 15 Dec 2022 14:
|
|
28
|
+
Thu, 15 Dec 2022 14:50:50 GMT
|
|
10
29
|
|
|
11
30
|
### Patches
|
|
12
31
|
|
package/lib/Separator.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { SeparatorProps
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const Separator: import("@fluentui-react-native/framework").ComposableComponent<SeparatorProps, {
|
|
4
|
-
root: import("react-native").ViewProps;
|
|
5
|
-
}, SeparatorTokens, object>;
|
|
1
|
+
import { SeparatorProps } from './Separator.types';
|
|
2
|
+
export declare const Separator: import("@fluentui-react-native/framework").ComposableComponent<SeparatorProps, import("./Separator.types").SeperatorSlotProps, import("./Separator.types").SeparatorTokens, object>;
|
|
6
3
|
export default Separator;
|
|
7
4
|
//# sourceMappingURL=Separator.d.ts.map
|
package/lib/Separator.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../src/Separator.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../src/Separator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAiB,cAAc,EAAiB,MAAM,mBAAmB,CAAC;AAMjF,eAAO,MAAM,SAAS,qLAQpB,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
package/lib/Separator.js
CHANGED
|
@@ -11,23 +11,13 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
/** @jsx withSlots */
|
|
13
13
|
import { View } from 'react-native';
|
|
14
|
-
import {
|
|
15
|
-
|
|
14
|
+
import { separatorName } from './Separator.types';
|
|
15
|
+
import { compose, withSlots, mergeProps } from '@fluentui-react-native/framework';
|
|
16
|
+
import { stylingSettings } from './Separator.styling';
|
|
16
17
|
var propMask = { vertical: undefined };
|
|
17
|
-
export var Separator = compose({
|
|
18
|
-
displayName: separatorName,
|
|
19
|
-
tokens: [{ separatorWidth: 1 }, separatorName],
|
|
20
|
-
tokensThatAreAlsoProps: ['vertical'],
|
|
21
|
-
slotProps: {
|
|
22
|
-
root: buildProps(function (tokens) { return ({
|
|
23
|
-
style: __assign(__assign({}, (tokens.vertical ? { borderLeftWidth: tokens.separatorWidth } : { borderTopWidth: tokens.separatorWidth })), (tokens.color && { borderColor: tokens.color })),
|
|
24
|
-
}); }, ['color', 'vertical', 'separatorWidth']),
|
|
25
|
-
},
|
|
26
|
-
slots: { root: View },
|
|
27
|
-
useRender: function (props, useSlots) {
|
|
18
|
+
export var Separator = compose(__assign(__assign({ displayName: separatorName }, stylingSettings), { slots: { root: View }, useRender: function (props, useSlots) {
|
|
28
19
|
var Root = useSlots(props).root;
|
|
29
20
|
return function (rest, children) { return withSlots(Root, __assign({}, mergeProps(props, rest, propMask)), children); };
|
|
30
|
-
}
|
|
31
|
-
});
|
|
21
|
+
} }));
|
|
32
22
|
export default Separator;
|
|
33
23
|
//# 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":";;;;;;;;;;;AAAA,qBAAqB;AACrB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Separator.js","sourceRoot":"","sources":["../src/Separator.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,qBAAqB;AACrB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,aAAa,EAAiC,MAAM,mBAAmB,CAAC;AACjF,OAAO,EAAE,OAAO,EAAY,SAAS,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,IAAM,QAAQ,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AAEzC,MAAM,CAAC,IAAM,SAAS,GAAG,OAAO,qBAC9B,WAAW,EAAE,aAAa,IACvB,eAAe,KAClB,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EACrB,SAAS,EAAE,UAAC,KAAqB,EAAE,QAAiC;QAClE,IAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;QAClC,OAAO,UAAC,IAAoB,EAAE,QAAyB,IAAK,OAAA,UAAC,IAAI,eAAK,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAQ,EAA9D,CAA8D,CAAC;IAC7H,CAAC,IACD,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SeparatorProps, SeparatorTokens, SeperatorSlotProps } from './Separator.types';
|
|
2
|
+
import { UseStylingOptions } from '@fluentui-react-native/framework';
|
|
3
|
+
export declare const stylingSettings: UseStylingOptions<SeparatorProps, SeperatorSlotProps, SeparatorTokens>;
|
|
4
|
+
//# sourceMappingURL=Separator.styling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Separator.styling.d.ts","sourceRoot":"","sources":["../src/Separator.styling.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAuB,eAAe,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5H,OAAO,EAAE,iBAAiB,EAAc,MAAM,kCAAkC,CAAC;AAMjF,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,cAAc,EAAE,kBAAkB,EAAE,eAAe,CAiBlG,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
import { separatorName } from './Separator.types';
|
|
13
|
+
import { buildProps } from '@fluentui-react-native/framework';
|
|
14
|
+
import { defaultSeparatorTokens } from './SeparatorTokens';
|
|
15
|
+
import { Platform } from 'react-native';
|
|
16
|
+
var isMobile = Platform.OS === 'android' || Platform.OS === 'ios';
|
|
17
|
+
var tokensThatAreAlsoProps = ['vertical', 'insetSpacing'];
|
|
18
|
+
export var stylingSettings = {
|
|
19
|
+
tokens: [defaultSeparatorTokens, separatorName],
|
|
20
|
+
tokensThatAreAlsoProps: tokensThatAreAlsoProps,
|
|
21
|
+
slotProps: {
|
|
22
|
+
root: buildProps(function (tokens) {
|
|
23
|
+
return {
|
|
24
|
+
style: __assign(__assign(__assign({}, (tokens.vertical ? { borderLeftWidth: tokens.separatorWidth } : { borderTopWidth: tokens.separatorWidth })), (tokens.color && { borderColor: tokens.color })), (isMobile && { marginStart: tokens.insetSpacing })),
|
|
25
|
+
};
|
|
26
|
+
}, ['color', 'vertical', 'separatorWidth', 'insetSpacing']),
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=Separator.styling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Separator.styling.js","sourceRoot":"","sources":["../src/Separator.styling.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAA4E,MAAM,mBAAmB,CAAC;AAC5H,OAAO,EAAqB,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,IAAM,QAAQ,GAAG,QAAQ,CAAC,EAAE,KAAK,SAAS,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAC;AACpE,IAAM,sBAAsB,GAAkC,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;AAC3F,MAAM,CAAC,IAAM,eAAe,GAA2E;IACrG,MAAM,EAAE,CAAC,sBAAsB,EAAE,aAAa,CAAC;IAC/C,sBAAsB,wBAAA;IACtB,SAAS,EAAE;QACT,IAAI,EAAE,UAAU,CACd,UAAC,MAAuB;YACtB,OAAO;gBACL,KAAK,iCACA,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,GAC1G,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,GAC/C,CAAC,QAAQ,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CACtD;aACF,CAAC;QACJ,CAAC,EACD,CAAC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,CAAC,CACxD;KACF;CACF,CAAC"}
|
package/lib/Separator.types.d.ts
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import { ViewProps, ColorValue } from 'react-native';
|
|
2
|
-
|
|
2
|
+
export declare const separatorName = "Separator";
|
|
3
|
+
export declare const SeparatorInsetSpacings: readonly [0, 16, 56, 68, 72, 108];
|
|
4
|
+
export declare type SeparatorInsetSpacing = typeof SeparatorInsetSpacings[number];
|
|
5
|
+
export interface SeparatorPropTokens {
|
|
3
6
|
/**
|
|
4
7
|
* Specifies whether the separator is vertical or horizontal. If true, then it's vertical.
|
|
5
8
|
* @defaultValue 'false'
|
|
6
9
|
*/
|
|
7
10
|
vertical?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Inset Spacing in 'dp' (density-independent pixels) on Android and 'points' on iOS.
|
|
13
|
+
*
|
|
14
|
+
* Inset Spacing is restricted to a limited set of supported values recommended for most uses (see `SeparatorInsetSpacing`) and
|
|
15
|
+
* based on design guidelines for the Separator control.
|
|
16
|
+
* @platform Android iOS
|
|
17
|
+
* @defaultvalue 0
|
|
18
|
+
*/
|
|
19
|
+
insetSpacing?: SeparatorInsetSpacing;
|
|
8
20
|
}
|
|
9
21
|
export interface SeparatorTokens extends SeparatorPropTokens {
|
|
10
22
|
/**
|
|
@@ -19,12 +31,12 @@ export interface SeparatorTokens extends SeparatorPropTokens {
|
|
|
19
31
|
}
|
|
20
32
|
export interface SeparatorProps extends ViewProps, SeparatorPropTokens {
|
|
21
33
|
}
|
|
34
|
+
export interface SeperatorSlotProps {
|
|
35
|
+
root: ViewProps;
|
|
36
|
+
}
|
|
22
37
|
export interface SeparatorType {
|
|
23
38
|
props: SeparatorProps;
|
|
24
|
-
slotProps:
|
|
25
|
-
root: ViewProps;
|
|
26
|
-
};
|
|
39
|
+
slotProps: SeperatorSlotProps;
|
|
27
40
|
tokens: SeparatorTokens;
|
|
28
41
|
}
|
|
29
|
-
export {};
|
|
30
42
|
//# sourceMappingURL=Separator.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.types.d.ts","sourceRoot":"","sources":["../src/Separator.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAErD,
|
|
1
|
+
{"version":3,"file":"Separator.types.d.ts","sourceRoot":"","sources":["../src/Separator.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC,eAAO,MAAM,sBAAsB,mCAAoC,CAAC;AAExE,oBAAY,qBAAqB,GAAG,OAAO,sBAAsB,CAAC,MAAM,CAAC,CAAC;AAE1E,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,qBAAqB,CAAC;CACtC;AAED,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,cAAe,SAAQ,SAAS,EAAE,mBAAmB;CAOrE;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,cAAc,CAAC;IACtB,SAAS,EAAE,kBAAkB,CAAC;IAC9B,MAAM,EAAE,eAAe,CAAC;CACzB"}
|
package/lib/Separator.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.types.js","sourceRoot":"","sources":["../src/Separator.types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Separator.types.js","sourceRoot":"","sources":["../src/Separator.types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAM,aAAa,GAAG,WAAW,CAAC;AAEzC,MAAM,CAAC,IAAM,sBAAsB,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAU,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Theme } from '@fluentui-react-native/framework';
|
|
2
|
+
import { TokenSettings } from '@fluentui-react-native/use-styling';
|
|
3
|
+
import { SeparatorTokens } from './Separator.types';
|
|
4
|
+
export declare const defaultSeparatorTokens: TokenSettings<SeparatorTokens, Theme>;
|
|
5
|
+
//# sourceMappingURL=SeparatorTokens.android.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SeparatorTokens.android.d.ts","sourceRoot":"","sources":["../src/SeparatorTokens.android.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,eAAe,EAAE,KAAK,CAKlD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
2
|
+
export var defaultSeparatorTokens = function (t) {
|
|
3
|
+
return ({
|
|
4
|
+
color: t.colors.neutralStroke2,
|
|
5
|
+
separatorWidth: globalTokens.stroke.width10,
|
|
6
|
+
insetSpacing: 0,
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=SeparatorTokens.android.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SeparatorTokens.android.js","sourceRoot":"","sources":["../src/SeparatorTokens.android.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAInE,MAAM,CAAC,IAAM,sBAAsB,GAA0C,UAAC,CAAQ;IACpF,OAAA,CAAC;QACC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc;QAC9B,cAAc,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO;QAC3C,YAAY,EAAE,CAAC;KACI,CAAA;AAJrB,CAIqB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Theme } from '@fluentui-react-native/framework';
|
|
2
|
+
import { TokenSettings } from '@fluentui-react-native/use-styling';
|
|
3
|
+
import { SeparatorTokens } from './Separator.types';
|
|
4
|
+
export declare const defaultSeparatorTokens: TokenSettings<SeparatorTokens, Theme>;
|
|
5
|
+
//# sourceMappingURL=SeparatorTokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SeparatorTokens.d.ts","sourceRoot":"","sources":["../src/SeparatorTokens.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,eAAe,EAAE,KAAK,CAGlD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SeparatorTokens.js","sourceRoot":"","sources":["../src/SeparatorTokens.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAEnE,MAAM,CAAC,IAAM,sBAAsB,GAA0C;IAC3E,OAAA,CAAC;QACC,cAAc,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO;KACxB,CAAA;AAFrB,CAEqB,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { SeparatorProps, SeparatorTokens, SeparatorType } from './Separator.types';
|
|
2
|
-
export { Separator
|
|
1
|
+
export type { SeparatorProps, SeparatorTokens, SeparatorType, separatorName } from './Separator.types';
|
|
2
|
+
export { Separator } from './Separator';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvG,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Separator
|
|
1
|
+
export { Separator } from './Separator';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { SeparatorProps
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const Separator: import("@fluentui-react-native/framework").ComposableComponent<SeparatorProps, {
|
|
4
|
-
root: import("react-native").ViewProps;
|
|
5
|
-
}, SeparatorTokens, object>;
|
|
1
|
+
import { SeparatorProps } from './Separator.types';
|
|
2
|
+
export declare const Separator: import("@fluentui-react-native/framework").ComposableComponent<SeparatorProps, import("./Separator.types").SeperatorSlotProps, import("./Separator.types").SeparatorTokens, object>;
|
|
6
3
|
export default Separator;
|
|
7
4
|
//# sourceMappingURL=Separator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../src/Separator.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../src/Separator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAiB,cAAc,EAAiB,MAAM,mBAAmB,CAAC;AAMjF,eAAO,MAAM,SAAS,qLAQpB,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -11,26 +11,16 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.Separator =
|
|
14
|
+
exports.Separator = void 0;
|
|
15
15
|
/** @jsx withSlots */
|
|
16
16
|
var react_native_1 = require("react-native");
|
|
17
|
+
var Separator_types_1 = require("./Separator.types");
|
|
17
18
|
var framework_1 = require("@fluentui-react-native/framework");
|
|
18
|
-
|
|
19
|
+
var Separator_styling_1 = require("./Separator.styling");
|
|
19
20
|
var propMask = { vertical: undefined };
|
|
20
|
-
exports.Separator = (0, framework_1.compose)({
|
|
21
|
-
displayName: exports.separatorName,
|
|
22
|
-
tokens: [{ separatorWidth: 1 }, exports.separatorName],
|
|
23
|
-
tokensThatAreAlsoProps: ['vertical'],
|
|
24
|
-
slotProps: {
|
|
25
|
-
root: (0, framework_1.buildProps)(function (tokens) { return ({
|
|
26
|
-
style: __assign(__assign({}, (tokens.vertical ? { borderLeftWidth: tokens.separatorWidth } : { borderTopWidth: tokens.separatorWidth })), (tokens.color && { borderColor: tokens.color })),
|
|
27
|
-
}); }, ['color', 'vertical', 'separatorWidth']),
|
|
28
|
-
},
|
|
29
|
-
slots: { root: react_native_1.View },
|
|
30
|
-
useRender: function (props, useSlots) {
|
|
21
|
+
exports.Separator = (0, framework_1.compose)(__assign(__assign({ displayName: Separator_types_1.separatorName }, Separator_styling_1.stylingSettings), { slots: { root: react_native_1.View }, useRender: function (props, useSlots) {
|
|
31
22
|
var Root = useSlots(props).root;
|
|
32
23
|
return function (rest, children) { return (0, framework_1.withSlots)(Root, __assign({}, (0, framework_1.mergeProps)(props, rest, propMask)), children); };
|
|
33
|
-
}
|
|
34
|
-
});
|
|
24
|
+
} }));
|
|
35
25
|
exports.default = exports.Separator;
|
|
36
26
|
//# sourceMappingURL=Separator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.js","sourceRoot":"","sources":["../src/Separator.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qBAAqB;AACrB,6CAAoC;
|
|
1
|
+
{"version":3,"file":"Separator.js","sourceRoot":"","sources":["../src/Separator.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qBAAqB;AACrB,6CAAoC;AACpC,qDAAiF;AACjF,8DAA4F;AAC5F,yDAAsD;AAEtD,IAAM,QAAQ,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AAE5B,QAAA,SAAS,GAAG,IAAA,mBAAO,sBAC9B,WAAW,EAAE,+BAAa,IACvB,mCAAe,KAClB,KAAK,EAAE,EAAE,IAAI,EAAE,mBAAI,EAAE,EACrB,SAAS,EAAE,UAAC,KAAqB,EAAE,QAAiC;QAClE,IAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;QAClC,OAAO,UAAC,IAAoB,EAAE,QAAyB,IAAK,OAAA,2BAAC,IAAI,eAAK,IAAA,sBAAU,EAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAQ,EAA9D,CAA8D,CAAC;IAC7H,CAAC,IACD,CAAC;AAEH,kBAAe,iBAAS,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SeparatorProps, SeparatorTokens, SeperatorSlotProps } from './Separator.types';
|
|
2
|
+
import { UseStylingOptions } from '@fluentui-react-native/framework';
|
|
3
|
+
export declare const stylingSettings: UseStylingOptions<SeparatorProps, SeperatorSlotProps, SeparatorTokens>;
|
|
4
|
+
//# sourceMappingURL=Separator.styling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Separator.styling.d.ts","sourceRoot":"","sources":["../src/Separator.styling.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAuB,eAAe,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5H,OAAO,EAAE,iBAAiB,EAAc,MAAM,kCAAkC,CAAC;AAMjF,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,cAAc,EAAE,kBAAkB,EAAE,eAAe,CAiBlG,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.stylingSettings = void 0;
|
|
15
|
+
var Separator_types_1 = require("./Separator.types");
|
|
16
|
+
var framework_1 = require("@fluentui-react-native/framework");
|
|
17
|
+
var SeparatorTokens_1 = require("./SeparatorTokens");
|
|
18
|
+
var react_native_1 = require("react-native");
|
|
19
|
+
var isMobile = react_native_1.Platform.OS === 'android' || react_native_1.Platform.OS === 'ios';
|
|
20
|
+
var tokensThatAreAlsoProps = ['vertical', 'insetSpacing'];
|
|
21
|
+
exports.stylingSettings = {
|
|
22
|
+
tokens: [SeparatorTokens_1.defaultSeparatorTokens, Separator_types_1.separatorName],
|
|
23
|
+
tokensThatAreAlsoProps: tokensThatAreAlsoProps,
|
|
24
|
+
slotProps: {
|
|
25
|
+
root: (0, framework_1.buildProps)(function (tokens) {
|
|
26
|
+
return {
|
|
27
|
+
style: __assign(__assign(__assign({}, (tokens.vertical ? { borderLeftWidth: tokens.separatorWidth } : { borderTopWidth: tokens.separatorWidth })), (tokens.color && { borderColor: tokens.color })), (isMobile && { marginStart: tokens.insetSpacing })),
|
|
28
|
+
};
|
|
29
|
+
}, ['color', 'vertical', 'separatorWidth', 'insetSpacing']),
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=Separator.styling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Separator.styling.js","sourceRoot":"","sources":["../src/Separator.styling.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qDAA4H;AAC5H,8DAAiF;AACjF,qDAA2D;AAC3D,6CAAwC;AAExC,IAAM,QAAQ,GAAG,uBAAQ,CAAC,EAAE,KAAK,SAAS,IAAI,uBAAQ,CAAC,EAAE,KAAK,KAAK,CAAC;AACpE,IAAM,sBAAsB,GAAkC,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;AAC9E,QAAA,eAAe,GAA2E;IACrG,MAAM,EAAE,CAAC,wCAAsB,EAAE,+BAAa,CAAC;IAC/C,sBAAsB,wBAAA;IACtB,SAAS,EAAE;QACT,IAAI,EAAE,IAAA,sBAAU,EACd,UAAC,MAAuB;YACtB,OAAO;gBACL,KAAK,iCACA,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,GAC1G,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,GAC/C,CAAC,QAAQ,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CACtD;aACF,CAAC;QACJ,CAAC,EACD,CAAC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,CAAC,CACxD;KACF;CACF,CAAC"}
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import { ViewProps, ColorValue } from 'react-native';
|
|
2
|
-
|
|
2
|
+
export declare const separatorName = "Separator";
|
|
3
|
+
export declare const SeparatorInsetSpacings: readonly [0, 16, 56, 68, 72, 108];
|
|
4
|
+
export declare type SeparatorInsetSpacing = typeof SeparatorInsetSpacings[number];
|
|
5
|
+
export interface SeparatorPropTokens {
|
|
3
6
|
/**
|
|
4
7
|
* Specifies whether the separator is vertical or horizontal. If true, then it's vertical.
|
|
5
8
|
* @defaultValue 'false'
|
|
6
9
|
*/
|
|
7
10
|
vertical?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Inset Spacing in 'dp' (density-independent pixels) on Android and 'points' on iOS.
|
|
13
|
+
*
|
|
14
|
+
* Inset Spacing is restricted to a limited set of supported values recommended for most uses (see `SeparatorInsetSpacing`) and
|
|
15
|
+
* based on design guidelines for the Separator control.
|
|
16
|
+
* @platform Android iOS
|
|
17
|
+
* @defaultvalue 0
|
|
18
|
+
*/
|
|
19
|
+
insetSpacing?: SeparatorInsetSpacing;
|
|
8
20
|
}
|
|
9
21
|
export interface SeparatorTokens extends SeparatorPropTokens {
|
|
10
22
|
/**
|
|
@@ -19,12 +31,12 @@ export interface SeparatorTokens extends SeparatorPropTokens {
|
|
|
19
31
|
}
|
|
20
32
|
export interface SeparatorProps extends ViewProps, SeparatorPropTokens {
|
|
21
33
|
}
|
|
34
|
+
export interface SeperatorSlotProps {
|
|
35
|
+
root: ViewProps;
|
|
36
|
+
}
|
|
22
37
|
export interface SeparatorType {
|
|
23
38
|
props: SeparatorProps;
|
|
24
|
-
slotProps:
|
|
25
|
-
root: ViewProps;
|
|
26
|
-
};
|
|
39
|
+
slotProps: SeperatorSlotProps;
|
|
27
40
|
tokens: SeparatorTokens;
|
|
28
41
|
}
|
|
29
|
-
export {};
|
|
30
42
|
//# sourceMappingURL=Separator.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.types.d.ts","sourceRoot":"","sources":["../src/Separator.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAErD,
|
|
1
|
+
{"version":3,"file":"Separator.types.d.ts","sourceRoot":"","sources":["../src/Separator.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC,eAAO,MAAM,sBAAsB,mCAAoC,CAAC;AAExE,oBAAY,qBAAqB,GAAG,OAAO,sBAAsB,CAAC,MAAM,CAAC,CAAC;AAE1E,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,qBAAqB,CAAC;CACtC;AAED,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,cAAe,SAAQ,SAAS,EAAE,mBAAmB;CAOrE;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,cAAc,CAAC;IACtB,SAAS,EAAE,kBAAkB,CAAC;IAC9B,MAAM,EAAE,eAAe,CAAC;CACzB"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SeparatorInsetSpacings = exports.separatorName = void 0;
|
|
4
|
+
exports.separatorName = 'Separator';
|
|
5
|
+
exports.SeparatorInsetSpacings = [0, 16, 56, 68, 72, 108];
|
|
3
6
|
//# sourceMappingURL=Separator.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.types.js","sourceRoot":"","sources":["../src/Separator.types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Separator.types.js","sourceRoot":"","sources":["../src/Separator.types.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAAG,WAAW,CAAC;AAE5B,QAAA,sBAAsB,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAU,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Theme } from '@fluentui-react-native/framework';
|
|
2
|
+
import { TokenSettings } from '@fluentui-react-native/use-styling';
|
|
3
|
+
import { SeparatorTokens } from './Separator.types';
|
|
4
|
+
export declare const defaultSeparatorTokens: TokenSettings<SeparatorTokens, Theme>;
|
|
5
|
+
//# sourceMappingURL=SeparatorTokens.android.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SeparatorTokens.android.d.ts","sourceRoot":"","sources":["../src/SeparatorTokens.android.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,eAAe,EAAE,KAAK,CAKlD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultSeparatorTokens = void 0;
|
|
4
|
+
var theme_tokens_1 = require("@fluentui-react-native/theme-tokens");
|
|
5
|
+
var defaultSeparatorTokens = function (t) {
|
|
6
|
+
return ({
|
|
7
|
+
color: t.colors.neutralStroke2,
|
|
8
|
+
separatorWidth: theme_tokens_1.globalTokens.stroke.width10,
|
|
9
|
+
insetSpacing: 0,
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
exports.defaultSeparatorTokens = defaultSeparatorTokens;
|
|
13
|
+
//# sourceMappingURL=SeparatorTokens.android.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SeparatorTokens.android.js","sourceRoot":"","sources":["../src/SeparatorTokens.android.tsx"],"names":[],"mappings":";;;AACA,oEAAmE;AAI5D,IAAM,sBAAsB,GAA0C,UAAC,CAAQ;IACpF,OAAA,CAAC;QACC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc;QAC9B,cAAc,EAAE,2BAAY,CAAC,MAAM,CAAC,OAAO;QAC3C,YAAY,EAAE,CAAC;KACI,CAAA;AAJrB,CAIqB,CAAC;AALX,QAAA,sBAAsB,0BAKX"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Theme } from '@fluentui-react-native/framework';
|
|
2
|
+
import { TokenSettings } from '@fluentui-react-native/use-styling';
|
|
3
|
+
import { SeparatorTokens } from './Separator.types';
|
|
4
|
+
export declare const defaultSeparatorTokens: TokenSettings<SeparatorTokens, Theme>;
|
|
5
|
+
//# sourceMappingURL=SeparatorTokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SeparatorTokens.d.ts","sourceRoot":"","sources":["../src/SeparatorTokens.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,eAAe,EAAE,KAAK,CAGlD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultSeparatorTokens = void 0;
|
|
4
|
+
var theme_tokens_1 = require("@fluentui-react-native/theme-tokens");
|
|
5
|
+
var defaultSeparatorTokens = function () {
|
|
6
|
+
return ({
|
|
7
|
+
separatorWidth: theme_tokens_1.globalTokens.stroke.width10,
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
exports.defaultSeparatorTokens = defaultSeparatorTokens;
|
|
11
|
+
//# sourceMappingURL=SeparatorTokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SeparatorTokens.js","sourceRoot":"","sources":["../src/SeparatorTokens.tsx"],"names":[],"mappings":";;;AAGA,oEAAmE;AAE5D,IAAM,sBAAsB,GAA0C;IAC3E,OAAA,CAAC;QACC,cAAc,EAAE,2BAAY,CAAC,MAAM,CAAC,OAAO;KACxB,CAAA;AAFrB,CAEqB,CAAC;AAHX,QAAA,sBAAsB,0BAGX"}
|
package/lib-commonjs/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { SeparatorProps, SeparatorTokens, SeparatorType } from './Separator.types';
|
|
2
|
-
export { Separator
|
|
1
|
+
export type { SeparatorProps, SeparatorTokens, SeparatorType, separatorName } from './Separator.types';
|
|
2
|
+
export { Separator } from './Separator';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvG,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Separator = void 0;
|
|
4
4
|
var Separator_1 = require("./Separator");
|
|
5
5
|
Object.defineProperty(exports, "Separator", { enumerable: true, get: function () { return Separator_1.Separator; } });
|
|
6
|
-
Object.defineProperty(exports, "separatorName", { enumerable: true, get: function () { return Separator_1.separatorName; } });
|
|
7
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,yCAAwC;AAA/B,sGAAA,SAAS,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/separator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.1",
|
|
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",
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
"directory": "packages/components/Separator"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@fluentui-react-native/framework": ">=0.8.
|
|
25
|
+
"@fluentui-react-native/framework": ">=0.8.28 <1.0.0",
|
|
26
|
+
"@fluentui-react-native/theme-tokens": "^0.22.4",
|
|
27
|
+
"@fluentui-react-native/use-styling": "^0.9.1"
|
|
26
28
|
},
|
|
27
29
|
"devDependencies": {
|
|
28
30
|
"@fluentui-react-native/eslint-config-rules": "^0.1.1",
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { separatorName, SeparatorProps, SeparatorPropTokens, SeparatorTokens, SeperatorSlotProps } from './Separator.types';
|
|
2
|
+
import { UseStylingOptions, buildProps } from '@fluentui-react-native/framework';
|
|
3
|
+
import { defaultSeparatorTokens } from './SeparatorTokens';
|
|
4
|
+
import { Platform } from 'react-native';
|
|
5
|
+
|
|
6
|
+
const isMobile = Platform.OS === 'android' || Platform.OS === 'ios';
|
|
7
|
+
const tokensThatAreAlsoProps: (keyof SeparatorPropTokens)[] = ['vertical', 'insetSpacing'];
|
|
8
|
+
export const stylingSettings: UseStylingOptions<SeparatorProps, SeperatorSlotProps, SeparatorTokens> = {
|
|
9
|
+
tokens: [defaultSeparatorTokens, separatorName],
|
|
10
|
+
tokensThatAreAlsoProps,
|
|
11
|
+
slotProps: {
|
|
12
|
+
root: buildProps(
|
|
13
|
+
(tokens: SeparatorTokens) => {
|
|
14
|
+
return {
|
|
15
|
+
style: {
|
|
16
|
+
...(tokens.vertical ? { borderLeftWidth: tokens.separatorWidth } : { borderTopWidth: tokens.separatorWidth }),
|
|
17
|
+
...(tokens.color && { borderColor: tokens.color }),
|
|
18
|
+
...(isMobile && { marginStart: tokens.insetSpacing }),
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
['color', 'vertical', 'separatorWidth', 'insetSpacing'],
|
|
23
|
+
),
|
|
24
|
+
},
|
|
25
|
+
};
|
package/src/Separator.tsx
CHANGED
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
/** @jsx withSlots */
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import {
|
|
4
|
-
import { compose, UseSlots,
|
|
3
|
+
import { separatorName, SeparatorProps, SeparatorType } from './Separator.types';
|
|
4
|
+
import { compose, UseSlots, withSlots, mergeProps } from '@fluentui-react-native/framework';
|
|
5
|
+
import { stylingSettings } from './Separator.styling';
|
|
5
6
|
|
|
6
|
-
export const separatorName = 'Separator';
|
|
7
7
|
const propMask = { vertical: undefined };
|
|
8
8
|
|
|
9
9
|
export const Separator = compose<SeparatorType>({
|
|
10
10
|
displayName: separatorName,
|
|
11
|
-
|
|
12
|
-
tokensThatAreAlsoProps: ['vertical'],
|
|
13
|
-
slotProps: {
|
|
14
|
-
root: buildProps(
|
|
15
|
-
(tokens: SeparatorTokens) => ({
|
|
16
|
-
style: {
|
|
17
|
-
...(tokens.vertical ? { borderLeftWidth: tokens.separatorWidth } : { borderTopWidth: tokens.separatorWidth }),
|
|
18
|
-
...(tokens.color && { borderColor: tokens.color }),
|
|
19
|
-
},
|
|
20
|
-
}),
|
|
21
|
-
['color', 'vertical', 'separatorWidth'],
|
|
22
|
-
),
|
|
23
|
-
},
|
|
11
|
+
...stylingSettings,
|
|
24
12
|
slots: { root: View },
|
|
25
13
|
useRender: (props: SeparatorProps, useSlots: UseSlots<SeparatorType>) => {
|
|
26
14
|
const Root = useSlots(props).root;
|
package/src/Separator.types.ts
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
import { ViewProps, ColorValue } from 'react-native';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
export const separatorName = 'Separator';
|
|
4
|
+
|
|
5
|
+
export const SeparatorInsetSpacings = [0, 16, 56, 68, 72, 108] as const;
|
|
6
|
+
|
|
7
|
+
export type SeparatorInsetSpacing = typeof SeparatorInsetSpacings[number];
|
|
8
|
+
|
|
9
|
+
export interface SeparatorPropTokens {
|
|
4
10
|
/**
|
|
5
11
|
* Specifies whether the separator is vertical or horizontal. If true, then it's vertical.
|
|
6
12
|
* @defaultValue 'false'
|
|
7
13
|
*/
|
|
8
14
|
vertical?: boolean;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Inset Spacing in 'dp' (density-independent pixels) on Android and 'points' on iOS.
|
|
18
|
+
*
|
|
19
|
+
* Inset Spacing is restricted to a limited set of supported values recommended for most uses (see `SeparatorInsetSpacing`) and
|
|
20
|
+
* based on design guidelines for the Separator control.
|
|
21
|
+
* @platform Android iOS
|
|
22
|
+
* @defaultvalue 0
|
|
23
|
+
*/
|
|
24
|
+
insetSpacing?: SeparatorInsetSpacing;
|
|
9
25
|
}
|
|
10
26
|
|
|
11
27
|
export interface SeparatorTokens extends SeparatorPropTokens {
|
|
@@ -30,10 +46,12 @@ export interface SeparatorProps extends ViewProps, SeparatorPropTokens {
|
|
|
30
46
|
// alignContent?: 'start' | 'center' | 'end';
|
|
31
47
|
}
|
|
32
48
|
|
|
49
|
+
export interface SeperatorSlotProps {
|
|
50
|
+
root: ViewProps;
|
|
51
|
+
}
|
|
52
|
+
|
|
33
53
|
export interface SeparatorType {
|
|
34
54
|
props: SeparatorProps;
|
|
35
|
-
slotProps:
|
|
36
|
-
root: ViewProps;
|
|
37
|
-
};
|
|
55
|
+
slotProps: SeperatorSlotProps;
|
|
38
56
|
tokens: SeparatorTokens;
|
|
39
57
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Theme } from '@fluentui-react-native/framework';
|
|
2
|
+
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
3
|
+
import { TokenSettings } from '@fluentui-react-native/use-styling';
|
|
4
|
+
import { SeparatorTokens } from './Separator.types';
|
|
5
|
+
|
|
6
|
+
export const defaultSeparatorTokens: TokenSettings<SeparatorTokens, Theme> = (t: Theme) =>
|
|
7
|
+
({
|
|
8
|
+
color: t.colors.neutralStroke2,
|
|
9
|
+
separatorWidth: globalTokens.stroke.width10,
|
|
10
|
+
insetSpacing: 0,
|
|
11
|
+
} as SeparatorTokens);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Theme } from '@fluentui-react-native/framework';
|
|
2
|
+
import { TokenSettings } from '@fluentui-react-native/use-styling';
|
|
3
|
+
import { SeparatorTokens } from './Separator.types';
|
|
4
|
+
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
5
|
+
|
|
6
|
+
export const defaultSeparatorTokens: TokenSettings<SeparatorTokens, Theme> = () =>
|
|
7
|
+
({
|
|
8
|
+
separatorWidth: globalTokens.stroke.width10,
|
|
9
|
+
} as SeparatorTokens);
|
package/src/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { SeparatorProps, SeparatorTokens, SeparatorType } from './Separator.types';
|
|
2
|
-
export { Separator
|
|
1
|
+
export type { SeparatorProps, SeparatorTokens, SeparatorType, separatorName } from './Separator.types';
|
|
2
|
+
export { Separator } from './Separator';
|