@fluentui-react-native/stack 0.7.59 → 0.7.60
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 +40 -1
- package/CHANGELOG.md +14 -2
- package/package.json +6 -6
- package/lib/Stack.d.ts +0 -15
- package/lib/Stack.d.ts.map +0 -1
- package/lib/Stack.js +0 -89
- package/lib/Stack.js.map +0 -1
- package/lib/Stack.settings.d.ts +0 -4
- package/lib/Stack.settings.d.ts.map +0 -1
- package/lib/Stack.settings.js +0 -60
- package/lib/Stack.settings.js.map +0 -1
- package/lib/Stack.tokens.d.ts +0 -6
- package/lib/Stack.tokens.d.ts.map +0 -1
- package/lib/Stack.tokens.js +0 -93
- package/lib/Stack.tokens.js.map +0 -1
- package/lib/Stack.types.d.ts +0 -105
- package/lib/Stack.types.d.ts.map +0 -1
- package/lib/Stack.types.js +0 -2
- package/lib/Stack.types.js.map +0 -1
- package/lib/StackItem/StackItem.d.ts +0 -5
- package/lib/StackItem/StackItem.d.ts.map +0 -1
- package/lib/StackItem/StackItem.js +0 -14
- package/lib/StackItem/StackItem.js.map +0 -1
- package/lib/StackItem/StackItem.settings.d.ts +0 -4
- package/lib/StackItem/StackItem.settings.d.ts.map +0 -1
- package/lib/StackItem/StackItem.settings.js +0 -12
- package/lib/StackItem/StackItem.settings.js.map +0 -1
- package/lib/StackItem/StackItem.tokens.d.ts +0 -6
- package/lib/StackItem/StackItem.tokens.d.ts.map +0 -1
- package/lib/StackItem/StackItem.tokens.js +0 -20
- package/lib/StackItem/StackItem.tokens.js.map +0 -1
- package/lib/StackItem/StackItem.types.d.ts +0 -52
- package/lib/StackItem/StackItem.types.d.ts.map +0 -1
- package/lib/StackItem/StackItem.types.js +0 -2
- package/lib/StackItem/StackItem.types.js.map +0 -1
- package/lib/StackUtils.d.ts +0 -26
- package/lib/StackUtils.d.ts.map +0 -1
- package/lib/StackUtils.js +0 -76
- package/lib/StackUtils.js.map +0 -1
- package/lib/StackUtils.test.win32.d.ts +0 -2
- package/lib/StackUtils.test.win32.d.ts.map +0 -1
- package/lib/StackUtils.test.win32.js +0 -88
- package/lib/StackUtils.test.win32.js.map +0 -1
- package/lib/__tests__/Stack.test.d.ts +0 -2
- package/lib/__tests__/Stack.test.d.ts.map +0 -1
- package/lib/__tests__/Stack.test.js +0 -14
- package/lib/__tests__/Stack.test.js.map +0 -1
- package/lib/index.d.ts +0 -7
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -5
- package/lib/index.js.map +0 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,46 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/stack",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Sat, 18 Mar 2023 17:18:20 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/stack_v0.7.60",
|
|
7
|
+
"version": "0.7.60",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@fluentui-react-native/stack",
|
|
13
|
+
"comment": "Bump @uifabricshared/foundation-compose to v1.13.7",
|
|
14
|
+
"commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui-react-native/stack",
|
|
19
|
+
"comment": "Bump @fluentui-react-native/framework to v0.9.7",
|
|
20
|
+
"commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui-react-native/stack",
|
|
25
|
+
"comment": "Bump @fluentui-react-native/tokens to v0.20.13",
|
|
26
|
+
"commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui-react-native/stack",
|
|
31
|
+
"comment": "Bump @uifabricshared/foundation-tokens to v0.12.30",
|
|
32
|
+
"commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui-react-native/stack",
|
|
37
|
+
"comment": "Bump @fluentui-react-native/text to v0.19.28",
|
|
38
|
+
"commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"date": "Tue, 14 Mar 2023 20:50:45 GMT",
|
|
6
45
|
"tag": "@fluentui-react-native/stack_v0.7.59",
|
|
7
46
|
"version": "0.7.59",
|
|
8
47
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/stack
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Sat, 18 Mar 2023 17:18:20 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.7.60
|
|
8
|
+
|
|
9
|
+
Sat, 18 Mar 2023 17:18:20 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Bump @uifabricshared/foundation-compose to v1.13.7
|
|
14
|
+
- Bump @fluentui-react-native/framework to v0.9.7
|
|
15
|
+
- Bump @fluentui-react-native/tokens to v0.20.13
|
|
16
|
+
- Bump @uifabricshared/foundation-tokens to v0.12.30
|
|
17
|
+
- Bump @fluentui-react-native/text to v0.19.28
|
|
18
|
+
|
|
7
19
|
## 0.7.59
|
|
8
20
|
|
|
9
|
-
Tue, 14 Mar 2023 20:
|
|
21
|
+
Tue, 14 Mar 2023 20:50:45 GMT
|
|
10
22
|
|
|
11
23
|
### Patches
|
|
12
24
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/stack",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.60",
|
|
4
4
|
"description": "A cross-platform opinionated Fluent Text component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
"directory": "packages/components/Stack"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@uifabricshared/foundation-compose": "^1.13.
|
|
25
|
+
"@uifabricshared/foundation-compose": "^1.13.7",
|
|
26
26
|
"@fluentui-react-native/adapters": ">=0.10.2 <1.0.0",
|
|
27
|
-
"@fluentui-react-native/framework": ">=0.9.
|
|
28
|
-
"@fluentui-react-native/tokens": ">=0.20.
|
|
27
|
+
"@fluentui-react-native/framework": ">=0.9.7 <1.0.0",
|
|
28
|
+
"@fluentui-react-native/tokens": ">=0.20.13 <1.0.0",
|
|
29
29
|
"@uifabricshared/foundation-composable": ">=0.11.3 <1.0.0",
|
|
30
30
|
"@uifabricshared/foundation-settings": ">=0.12.3 <1.0.0",
|
|
31
|
-
"@uifabricshared/foundation-tokens": ">=0.12.
|
|
31
|
+
"@uifabricshared/foundation-tokens": ">=0.12.30 <1.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@fluentui-react-native/eslint-config-rules": "^0.1.1",
|
|
35
35
|
"@fluentui-react-native/scripts": "^0.1.1",
|
|
36
|
-
"@fluentui-react-native/text": ">=0.19.
|
|
36
|
+
"@fluentui-react-native/text": ">=0.19.28 <1.0.0",
|
|
37
37
|
"@types/react-native": "^0.68.0",
|
|
38
38
|
"react": "17.0.2",
|
|
39
39
|
"react-native": "^0.68.0"
|
package/lib/Stack.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { IStackProps, IStackSlotProps } from './Stack.types';
|
|
2
|
-
declare global {
|
|
3
|
-
namespace NodeJS {
|
|
4
|
-
interface Global {
|
|
5
|
-
__jsiExecutorDescription: any;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
export declare const Stack: import("@uifabricshared/foundation-compose").IComposeReturnType<IStackProps, IStackSlotProps, import("./Stack.types").IStackTokens, {
|
|
10
|
-
gap: number;
|
|
11
|
-
horizontal: boolean;
|
|
12
|
-
wrap: boolean;
|
|
13
|
-
}, import("./Stack.types").IStackStatics>;
|
|
14
|
-
export default Stack;
|
|
15
|
-
//# sourceMappingURL=Stack.d.ts.map
|
package/lib/Stack.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../src/Stack.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAoB,WAAW,EAAE,eAAe,EAAc,MAAM,eAAe,CAAC;AAIhG,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,MAAM,CAAC;QACf,UAAU,MAAM;YACd,wBAAwB,EAAE,GAAG,CAAC;SAC/B;KACF;CACF;AAuCD,eAAO,MAAM,KAAK;;;;yCAsBhB,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
package/lib/Stack.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
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
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
/** @jsx withSlots */
|
|
24
|
-
import * as React from 'react';
|
|
25
|
-
import { View } from 'react-native';
|
|
26
|
-
import { filterViewProps } from '@fluentui-react-native/adapters';
|
|
27
|
-
import { backgroundColorTokens, borderTokens } from '@fluentui-react-native/tokens';
|
|
28
|
-
import { withSlots } from '@uifabricshared/foundation-composable';
|
|
29
|
-
import { compose } from '@uifabricshared/foundation-compose';
|
|
30
|
-
import { mergeSettings } from '@uifabricshared/foundation-settings';
|
|
31
|
-
import { settings } from './Stack.settings';
|
|
32
|
-
import { buildStackRootStyles, buildStackInnerStyles } from './Stack.tokens';
|
|
33
|
-
import { stackName } from './Stack.types';
|
|
34
|
-
import StackItem from './StackItem/StackItem';
|
|
35
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
36
|
-
function _mixinStyle(style, mixin) {
|
|
37
|
-
return style ? [style, mixin] : mixin;
|
|
38
|
-
}
|
|
39
|
-
var _styleKey = 'style';
|
|
40
|
-
var render = function (Slots, renderData) {
|
|
41
|
-
var children = [];
|
|
42
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
43
|
-
children[_i - 2] = arguments[_i];
|
|
44
|
-
}
|
|
45
|
-
var _a = renderData.state, gap = _a.gap, horizontal = _a.horizontal, wrap = _a.wrap;
|
|
46
|
-
if (gap && gap > 0 && children && global.__jsiExecutorDescription !== 'ChakraRuntime') {
|
|
47
|
-
var extraStyle_1 = horizontal ? { marginLeft: gap } : { marginTop: gap };
|
|
48
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
49
|
-
// @ts-ignore - TODO, fix typing error
|
|
50
|
-
children = React.Children.map(children, function (child, index) {
|
|
51
|
-
if (React.isValidElement(child) && index > 0) {
|
|
52
|
-
var childProps = child.props;
|
|
53
|
-
var extraProps = { style: _mixinStyle(childProps[_styleKey], extraStyle_1) };
|
|
54
|
-
return React.cloneElement(child, __assign(__assign({}, childProps), extraProps));
|
|
55
|
-
}
|
|
56
|
-
return child;
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
if (wrap) {
|
|
60
|
-
return (withSlots(Slots.root, null,
|
|
61
|
-
withSlots(Slots.inner, null, children)));
|
|
62
|
-
}
|
|
63
|
-
return withSlots(Slots.root, null, children);
|
|
64
|
-
};
|
|
65
|
-
export var Stack = compose({
|
|
66
|
-
displayName: stackName,
|
|
67
|
-
settings: settings,
|
|
68
|
-
statics: {
|
|
69
|
-
Item: StackItem,
|
|
70
|
-
},
|
|
71
|
-
usePrepareProps: function (props, useStyling) {
|
|
72
|
-
var gap = props.gap, horizontal = props.horizontal, wrap = props.wrap, rest = __rest(props, ["gap", "horizontal", "wrap"]);
|
|
73
|
-
return {
|
|
74
|
-
slotProps: mergeSettings(useStyling(props), { root: rest }),
|
|
75
|
-
state: { gap: gap, horizontal: horizontal, wrap: wrap },
|
|
76
|
-
};
|
|
77
|
-
},
|
|
78
|
-
render: render,
|
|
79
|
-
slots: {
|
|
80
|
-
root: { slotType: View, filter: filterViewProps },
|
|
81
|
-
inner: { slotType: View, filter: filterViewProps },
|
|
82
|
-
},
|
|
83
|
-
styles: {
|
|
84
|
-
root: [buildStackRootStyles, backgroundColorTokens, borderTokens],
|
|
85
|
-
inner: [buildStackInnerStyles],
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
export default Stack;
|
|
89
|
-
//# sourceMappingURL=Stack.js.map
|
package/lib/Stack.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.js","sourceRoot":"","sources":["../src/Stack.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,EAAE,EAAE,GAAG,KAAA,EAAE,UAAU,YAAA,EAAE,IAAI,MAAA,EAAE;SACjC,CAAC;IACJ,CAAC;IACD,MAAM,EAAE,MAAM;IACd,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE;QACjD,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE;KACnD;IACD,MAAM,EAAE;QACN,IAAI,EAAE,CAAC,oBAAoB,EAAE,qBAAqB,EAAE,YAAY,CAAC;QACjE,KAAK,EAAE,CAAC,qBAAqB,CAAC;KAC/B;CACF,CAAC,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
package/lib/Stack.settings.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.settings.d.ts","sourceRoot":"","sources":["../src/Stack.settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAyDjD,CAAC"}
|
package/lib/Stack.settings.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { stackName } from './Stack.types';
|
|
2
|
-
export var settings = [
|
|
3
|
-
{
|
|
4
|
-
root: {
|
|
5
|
-
style: {
|
|
6
|
-
display: 'flex',
|
|
7
|
-
},
|
|
8
|
-
},
|
|
9
|
-
inner: {
|
|
10
|
-
style: {
|
|
11
|
-
display: 'flex',
|
|
12
|
-
flexWrap: 'wrap',
|
|
13
|
-
overflow: 'visible',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
_overrides: {
|
|
17
|
-
horizontal: {
|
|
18
|
-
root: {
|
|
19
|
-
style: {
|
|
20
|
-
flexDirection: 'row',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
_overrides: {
|
|
24
|
-
reversed: {
|
|
25
|
-
root: {
|
|
26
|
-
style: {
|
|
27
|
-
flexDirection: 'column-reverse',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
reversed: {
|
|
34
|
-
root: {
|
|
35
|
-
style: {
|
|
36
|
-
flexDirection: 'row-reverse',
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
verticalFill: {
|
|
41
|
-
root: {
|
|
42
|
-
style: {
|
|
43
|
-
height: '100%',
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
wrap: {
|
|
48
|
-
root: {
|
|
49
|
-
style: {
|
|
50
|
-
flexWrap: 'wrap',
|
|
51
|
-
height: '100%',
|
|
52
|
-
overflow: 'visible',
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
stackName,
|
|
59
|
-
];
|
|
60
|
-
//# sourceMappingURL=Stack.settings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.settings.js","sourceRoot":"","sources":["../src/Stack.settings.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,MAAM,CAAC,IAAM,QAAQ,GAAiC;IACpD;QACE,IAAI,EAAE;YACJ,KAAK,EAAE;gBACL,OAAO,EAAE,MAAM;aAChB;SACF;QACD,KAAK,EAAE;YACL,KAAK,EAAE;gBACL,OAAO,EAAE,MAAM;gBACf,QAAQ,EAAE,MAAM;gBAChB,QAAQ,EAAE,SAAS;aACpB;SACF;QACD,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,KAAK,EAAE;wBACL,aAAa,EAAE,KAAK;qBACrB;iBACF;gBACD,UAAU,EAAE;oBACV,QAAQ,EAAE;wBACR,IAAI,EAAE;4BACJ,KAAK,EAAE;gCACL,aAAa,EAAE,gBAAgB;6BAChC;yBACF;qBACF;iBACF;aACF;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE;oBACJ,KAAK,EAAE;wBACL,aAAa,EAAE,aAAa;qBAC7B;iBACF;aACF;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE;oBACJ,KAAK,EAAE;wBACL,MAAM,EAAE,MAAM;qBACf;iBACF;aACF;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE;oBACJ,KAAK,EAAE;wBACL,QAAQ,EAAE,MAAM;wBAChB,MAAM,EAAE,MAAM;wBACd,QAAQ,EAAE,SAAS;qBACpB;iBACF;aACF;SACF;KACF;IACD,SAAS;CACV,CAAC"}
|
package/lib/Stack.tokens.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ViewProps } from 'react-native';
|
|
2
|
-
import type { Theme } from '@fluentui-react-native/framework';
|
|
3
|
-
import type { IStackTokens } from './Stack.types';
|
|
4
|
-
export declare const buildStackInnerStyles: import("@fluentui-react-native/tokens").StyleFactoryFunction<ViewProps, IStackTokens, Theme>;
|
|
5
|
-
export declare const buildStackRootStyles: import("@fluentui-react-native/tokens").StyleFactoryFunction<ViewProps, IStackTokens, Theme>;
|
|
6
|
-
//# sourceMappingURL=Stack.tokens.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.tokens.d.ts","sourceRoot":"","sources":["../src/Stack.tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAG9D,OAAO,KAAK,EAAa,YAAY,EAAE,MAAM,eAAe,CAAC;AA6D7D,eAAO,MAAM,qBAAqB,8FAAmF,CAAC;AAyCtH,eAAO,MAAM,oBAAoB,8FAA6E,CAAC"}
|
package/lib/Stack.tokens.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { styleFunction } from '@uifabricshared/foundation-tokens';
|
|
2
|
-
import { parseGap, parsePadding } from './StackUtils';
|
|
3
|
-
var nameMap = {
|
|
4
|
-
start: 'flex-start',
|
|
5
|
-
end: 'flex-end',
|
|
6
|
-
};
|
|
7
|
-
function _mapAlignment(horizontal, horizontalAlign, verticalAlign, style) {
|
|
8
|
-
var alignValue = horizontal ? verticalAlign : horizontalAlign;
|
|
9
|
-
if (alignValue) {
|
|
10
|
-
style.alignItems = (nameMap[alignValue] || alignValue);
|
|
11
|
-
}
|
|
12
|
-
var justifyValue = horizontal ? horizontalAlign : verticalAlign;
|
|
13
|
-
if (justifyValue) {
|
|
14
|
-
style.justifyContent = (nameMap[justifyValue] || justifyValue);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
var _innerKeyProps = [
|
|
18
|
-
'horizontal',
|
|
19
|
-
// 'reversed',
|
|
20
|
-
'gap',
|
|
21
|
-
'horizontalAlign',
|
|
22
|
-
'verticalAlign',
|
|
23
|
-
// 'disableShrink',
|
|
24
|
-
'childrenGap',
|
|
25
|
-
'padding',
|
|
26
|
-
];
|
|
27
|
-
function _buildInnerStyles(tokenProps, theme) {
|
|
28
|
-
var horizontal = tokenProps.horizontal, wrap = tokenProps.wrap, horizontalAlign = tokenProps.horizontalAlign, verticalAlign = tokenProps.verticalAlign, padding = tokenProps.padding;
|
|
29
|
-
var innerStyle = undefined;
|
|
30
|
-
var childrenGap = tokenProps.childrenGap || tokenProps.gap;
|
|
31
|
-
var _a = parseGap(childrenGap, theme), rowGap = _a.rowGap, columnGap = _a.columnGap;
|
|
32
|
-
var horizontalMargin = "".concat(-0.5 * columnGap.value).concat(columnGap.unit);
|
|
33
|
-
var verticalMargin = "".concat(-0.5 * rowGap.value).concat(rowGap.unit);
|
|
34
|
-
if (wrap) {
|
|
35
|
-
innerStyle = {
|
|
36
|
-
marginLeft: horizontalMargin,
|
|
37
|
-
marginRight: horizontalMargin,
|
|
38
|
-
marginTop: verticalMargin,
|
|
39
|
-
marginBottom: verticalMargin,
|
|
40
|
-
padding: parsePadding(padding, theme),
|
|
41
|
-
width: columnGap.value === 0 ? '100%' : "calc(100% + ".concat(columnGap.value).concat(columnGap.unit, ")"),
|
|
42
|
-
};
|
|
43
|
-
_mapAlignment(!!horizontal, horizontalAlign, verticalAlign, innerStyle);
|
|
44
|
-
var heightToSet = rowGap.value === 0 ? '100%' : "calc(100% + ".concat(rowGap.value).concat(rowGap.unit, ")");
|
|
45
|
-
if (horizontal) {
|
|
46
|
-
innerStyle.height = heightToSet;
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
innerStyle.maxHeight = heightToSet;
|
|
50
|
-
innerStyle.height = "calc(100% + ".concat(rowGap.value).concat(rowGap.unit, ")");
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return { style: innerStyle };
|
|
54
|
-
}
|
|
55
|
-
export var buildStackInnerStyles = styleFunction(_buildInnerStyles, _innerKeyProps);
|
|
56
|
-
function _buildRootStyles(tokenProps, theme) {
|
|
57
|
-
var grow = tokenProps.grow, horizontal = tokenProps.horizontal, horizontalAlign = tokenProps.horizontalAlign, verticalAlign = tokenProps.verticalAlign, maxHeight = tokenProps.maxHeight, maxWidth = tokenProps.maxWidth, padding = tokenProps.padding, wrap = tokenProps.wrap;
|
|
58
|
-
// const childrenGap = tokenProps.childrenGap || tokenProps.gap;
|
|
59
|
-
// const { rowGap, columnGap } = parseGap(childrenGap, theme);
|
|
60
|
-
var rootStyle = {
|
|
61
|
-
maxHeight: maxHeight,
|
|
62
|
-
maxWidth: maxWidth,
|
|
63
|
-
};
|
|
64
|
-
_mapAlignment(!!horizontal, horizontalAlign, verticalAlign, rootStyle);
|
|
65
|
-
if (grow && !wrap) {
|
|
66
|
-
rootStyle.flexGrow = typeof grow === 'boolean' ? (grow ? 1 : 0) : grow;
|
|
67
|
-
rootStyle.overflow = 'hidden';
|
|
68
|
-
}
|
|
69
|
-
if (!wrap) {
|
|
70
|
-
rootStyle.padding = parsePadding(padding, theme);
|
|
71
|
-
}
|
|
72
|
-
return { style: rootStyle };
|
|
73
|
-
// verticalFill,
|
|
74
|
-
// reversed,
|
|
75
|
-
// disableShrink,
|
|
76
|
-
}
|
|
77
|
-
var _keyProps = [
|
|
78
|
-
// 'verticalFill',
|
|
79
|
-
'horizontal',
|
|
80
|
-
// 'reversed',
|
|
81
|
-
// 'gap',
|
|
82
|
-
'grow',
|
|
83
|
-
'wrap',
|
|
84
|
-
'horizontalAlign',
|
|
85
|
-
'verticalAlign',
|
|
86
|
-
// 'disableShrink',
|
|
87
|
-
// 'childrenGap',
|
|
88
|
-
'maxHeight',
|
|
89
|
-
'maxWidth',
|
|
90
|
-
'padding',
|
|
91
|
-
];
|
|
92
|
-
export var buildStackRootStyles = styleFunction(_buildRootStyles, _keyProps);
|
|
93
|
-
//# sourceMappingURL=Stack.tokens.js.map
|
package/lib/Stack.tokens.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.tokens.js","sourceRoot":"","sources":["../src/Stack.tokens.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGlE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEtD,IAAM,OAAO,GAAiC;IAC5C,KAAK,EAAE,YAAY;IACnB,GAAG,EAAE,UAAU;CAChB,CAAC;AAEF,SAAS,aAAa,CAAC,UAAmB,EAAE,eAA0B,EAAE,aAAwB,EAAE,KAAgB;IAChH,IAAM,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC;IAChE,IAAI,UAAU,EAAE;QACd,KAAK,CAAC,UAAU,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,UAAU,CAA4B,CAAC;KACnF;IAED,IAAM,YAAY,GAAG,UAAU,CAAC,CAAC,CAAC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QAAQ,GAAG,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACvE,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC;KAC/B;IAED,IAAI,CAAC,IAAI,EAAE;QACT,SAAS,CAAC,OAAO,GAAG,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;KAClD;IACD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAC5B,gBAAgB;IAChB,YAAY;IACZ,iBAAiB;AACnB,CAAC;AACD,IAAM,SAAS,GAA2B;IACxC,kBAAkB;IAClB,YAAY;IACZ,cAAc;IACd,SAAS;IACT,MAAM;IACN,MAAM;IACN,iBAAiB;IACjB,eAAe;IACf,mBAAmB;IACnB,iBAAiB;IACjB,WAAW;IACX,UAAU;IACV,SAAS;CACV,CAAC;AAEF,MAAM,CAAC,IAAM,oBAAoB,GAAG,aAAa,CAAiC,gBAAgB,EAAE,SAAS,CAAC,CAAC"}
|
package/lib/Stack.types.d.ts
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import type { ViewStyle, ViewProps } from 'react-native';
|
|
2
|
-
import type { IBackgroundColorTokens, IBorderTokens, FontTokens } from '@fluentui-react-native/tokens';
|
|
3
|
-
import type { IRenderData } from '@uifabricshared/foundation-composable';
|
|
4
|
-
import type { IStackItemProps } from './StackItem/StackItem.types';
|
|
5
|
-
export declare const stackName = "RNFStack";
|
|
6
|
-
/**
|
|
7
|
-
* Defines a type made by the union of the different values that the align-items and justify-content flexbox
|
|
8
|
-
* properties can take.
|
|
9
|
-
*/
|
|
10
|
-
export type Alignment = ViewStyle['justifyContent'] | 'start' | 'end';
|
|
11
|
-
export interface IStackStatics {
|
|
12
|
-
Item: React.FunctionComponent<IStackItemProps>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Tokens from fabric. Right now they are embedded in the props pending discussions of whether tokens: {} is
|
|
16
|
-
* the right approach
|
|
17
|
-
*/
|
|
18
|
-
export interface IStackTokens extends FontTokens, IBackgroundColorTokens, IBorderTokens {
|
|
19
|
-
/**
|
|
20
|
-
* Defines the spacing between Stack children.
|
|
21
|
-
* The property is specified as a value for 'row gap', followed optionally by a value for 'column gap'.
|
|
22
|
-
* If 'column gap' is omitted, it's set to the same value as 'row gap'.
|
|
23
|
-
*/
|
|
24
|
-
childrenGap?: number | string;
|
|
25
|
-
/**
|
|
26
|
-
* Defines a maximum height for the Stack.
|
|
27
|
-
*/
|
|
28
|
-
maxHeight?: number | string;
|
|
29
|
-
/**
|
|
30
|
-
* Defines a maximum width for the Stack.
|
|
31
|
-
*/
|
|
32
|
-
maxWidth?: number | string;
|
|
33
|
-
/**
|
|
34
|
-
* Defines the padding to be applied to the Stack contents relative to its border.
|
|
35
|
-
*/
|
|
36
|
-
padding?: number | string;
|
|
37
|
-
/**
|
|
38
|
-
* Defines whether to render Stack children horizontally.
|
|
39
|
-
* @defaultvalue false
|
|
40
|
-
*/
|
|
41
|
-
horizontal?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Defines whether to render Stack children in the opposite direction (bottom-to-top if it's a vertical Stack and
|
|
44
|
-
* right-to-left if it's a horizontal Stack).
|
|
45
|
-
* @defaultvalue false
|
|
46
|
-
*/
|
|
47
|
-
reversed?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Defines how to align Stack children horizontally (along the x-axis).
|
|
50
|
-
*/
|
|
51
|
-
horizontalAlign?: Alignment;
|
|
52
|
-
/**
|
|
53
|
-
* Defines how to align Stack children vertically (along the y-axis).
|
|
54
|
-
*/
|
|
55
|
-
verticalAlign?: Alignment;
|
|
56
|
-
/**
|
|
57
|
-
* Defines whether the Stack should take up 100% of the height of its parent.
|
|
58
|
-
* This property is required to be set to true when using the `grow` flag on children in vertical oriented Stacks.
|
|
59
|
-
* Stacks are rendered as block elements and grow horizontally to the container already.
|
|
60
|
-
* @defaultvalue false
|
|
61
|
-
*/
|
|
62
|
-
verticalFill?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Defines whether Stack children should not shrink to fit the available space.
|
|
65
|
-
* @defaultvalue false
|
|
66
|
-
*/
|
|
67
|
-
disableShrink?: boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Defines how much to grow the Stack in proportion to its siblings.
|
|
70
|
-
*/
|
|
71
|
-
grow?: boolean | number;
|
|
72
|
-
/**
|
|
73
|
-
* Defines whether Stack children should wrap onto multiple rows or columns when they are about to overflow
|
|
74
|
-
* the size of the Stack.
|
|
75
|
-
* @defaultvalue false
|
|
76
|
-
*/
|
|
77
|
-
wrap?: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Gap between items, multiplied by theme gap spacing
|
|
80
|
-
* Does not work while running Chakra for reasons specific to that engine (refer to https://github.com/microsoft/fluentui-react-native/issues/767)
|
|
81
|
-
*/
|
|
82
|
-
gap?: number;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Base property definitions, these generally match fabric
|
|
86
|
-
*/
|
|
87
|
-
export interface IStackProps extends IStackTokens, ViewProps {
|
|
88
|
-
}
|
|
89
|
-
export type IStackSlotProps = {
|
|
90
|
-
root: ViewProps;
|
|
91
|
-
inner: ViewProps;
|
|
92
|
-
};
|
|
93
|
-
export interface IStackType {
|
|
94
|
-
props: IStackProps;
|
|
95
|
-
tokens: IStackTokens;
|
|
96
|
-
slotProps: IStackSlotProps;
|
|
97
|
-
statics: IStackStatics;
|
|
98
|
-
state: {
|
|
99
|
-
gap: IStackProps['gap'];
|
|
100
|
-
horizontal: IStackProps['horizontal'];
|
|
101
|
-
wrap: IStackProps['wrap'];
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
export type IStackRenderData = IRenderData<IStackSlotProps, IStackType['state']>;
|
|
105
|
-
//# sourceMappingURL=Stack.types.d.ts.map
|
package/lib/Stack.types.d.ts.map
DELETED
|
@@ -1 +0,0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,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAExB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,YAAY,EAAE,SAAS;CAAG;AAE/D,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,eAAe,CAAC;IAC3B,OAAO,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE;QACL,GAAG,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;QACxB,UAAU,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;QACtC,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;KAC3B,CAAC;CACH;AAED,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC,eAAe,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC"}
|
package/lib/Stack.types.js
DELETED
package/lib/Stack.types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.types.js","sourceRoot":"","sources":["../src/Stack.types.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,IAAM,SAAS,GAAG,UAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackItem.d.ts","sourceRoot":"","sources":["../../src/StackItem/StackItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AASpC,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,mBAAmB,CAAC;AAEzE,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAK7D,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { View } from 'react-native';
|
|
2
|
-
import { filterViewProps } from '@fluentui-react-native/adapters';
|
|
3
|
-
import { compose } from '@uifabricshared/foundation-compose';
|
|
4
|
-
import { settings } from './StackItem.settings';
|
|
5
|
-
import { stackItemTokenProcessor } from './StackItem.tokens';
|
|
6
|
-
import { stackItemName } from './StackItem.types';
|
|
7
|
-
export var StackItem = compose({
|
|
8
|
-
displayName: stackItemName,
|
|
9
|
-
settings: settings,
|
|
10
|
-
slots: { root: { slotType: View, filter: filterViewProps } },
|
|
11
|
-
styles: { root: [stackItemTokenProcessor] },
|
|
12
|
-
});
|
|
13
|
-
export default StackItem;
|
|
14
|
-
//# sourceMappingURL=StackItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackItem.js","sourceRoot":"","sources":["../../src/StackItem/StackItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,MAAM,CAAC,IAAM,SAAS,GAA6C,OAAO,CAAiB;IACzF,WAAW,EAAE,aAAa;IAC1B,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,EAAE;IAC5D,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,uBAAuB,CAAC,EAAE;CAC5C,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackItem.settings.d.ts","sourceRoot":"","sources":["../../src/StackItem/StackItem.settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD,eAAO,MAAM,QAAQ,EAAE,gBAAgB,CAAC,cAAc,CASrD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackItem.settings.js","sourceRoot":"","sources":["../../src/StackItem/StackItem.settings.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,CAAC,IAAM,QAAQ,GAAqC;IACxD;QACE,IAAI,EAAE;YACJ,KAAK,EAAE;gBACL,KAAK,EAAE,MAAM;aACd;SACF;KACF;IACD,aAAa;CACd,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ViewProps } from 'react-native';
|
|
2
|
-
import type { Theme } from '@fluentui-react-native/framework';
|
|
3
|
-
import type { IStackItemTokens } from './StackItem.types';
|
|
4
|
-
export declare function _processor(tokenProps: IStackItemTokens): ViewProps;
|
|
5
|
-
export declare const stackItemTokenProcessor: import("@fluentui-react-native/tokens").StyleFactoryFunction<ViewProps, IStackItemTokens, Theme>;
|
|
6
|
-
//# sourceMappingURL=StackItem.tokens.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackItem.tokens.d.ts","sourceRoot":"","sources":["../../src/StackItem/StackItem.tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAG9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAS1D,wBAAgB,UAAU,CAAC,UAAU,EAAE,gBAAgB,GAAG,SAAS,CAYlE;AAED,eAAO,MAAM,uBAAuB,kGAA2E,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { styleFunction } from '@uifabricshared/foundation-tokens';
|
|
2
|
-
var alignMap = {
|
|
3
|
-
start: 'flex-start',
|
|
4
|
-
end: 'flex-end',
|
|
5
|
-
};
|
|
6
|
-
var _keyProps = ['align', 'disableShrink', 'grow', 'margin', 'shrink', 'verticalFill'];
|
|
7
|
-
export function _processor(tokenProps) {
|
|
8
|
-
var grow = tokenProps.grow, shrink = tokenProps.shrink, disableShrink = tokenProps.disableShrink, align = tokenProps.align, verticalFill = tokenProps.verticalFill, margin = tokenProps.margin;
|
|
9
|
-
return {
|
|
10
|
-
style: {
|
|
11
|
-
margin: margin,
|
|
12
|
-
height: verticalFill ? '100%' : 'auto',
|
|
13
|
-
flexShrink: disableShrink || (!grow && !shrink) ? 0 : 1,
|
|
14
|
-
flexGrow: typeof grow === 'number' ? grow : grow ? 1 : undefined,
|
|
15
|
-
alignSelf: (align && alignMap[align]) || undefined,
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
export var stackItemTokenProcessor = styleFunction(_processor, _keyProps);
|
|
20
|
-
//# sourceMappingURL=StackItem.tokens.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackItem.tokens.js","sourceRoot":"","sources":["../../src/StackItem/StackItem.tokens.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAIlE,IAAM,QAAQ,GAA8C;IAC1D,KAAK,EAAE,YAAY;IACnB,GAAG,EAAE,UAAU;CAChB,CAAC;AAEF,IAAM,SAAS,GAA+B,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;AAErH,MAAM,UAAU,UAAU,CAAC,UAA4B;IAC7C,IAAA,IAAI,GAAyD,UAAU,KAAnE,EAAE,MAAM,GAAiD,UAAU,OAA3D,EAAE,aAAa,GAAkC,UAAU,cAA5C,EAAE,KAAK,GAA2B,UAAU,MAArC,EAAE,YAAY,GAAa,UAAU,aAAvB,EAAE,MAAM,GAAK,UAAU,OAAf,CAAgB;IAEhF,OAAO;QACL,KAAK,EAAE;YACL,MAAM,QAAA;YACN,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;YACtC,UAAU,EAAE,aAAa,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACvD,QAAQ,EAAE,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;YAChE,SAAS,EAAE,CAAC,KAAK,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,SAAS;SACnD;KACF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,IAAM,uBAAuB,GAAG,aAAa,CAAqC,UAAU,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { ViewProps } from 'react-native';
|
|
2
|
-
export declare const stackItemName = "RNFStackItem";
|
|
3
|
-
/**
|
|
4
|
-
* Stack item props
|
|
5
|
-
*/
|
|
6
|
-
export interface IStackItemTokens extends ViewProps {
|
|
7
|
-
/**
|
|
8
|
-
* Defines the margin to be applied to the StackItem relative to its container.
|
|
9
|
-
*/
|
|
10
|
-
margin?: number | string;
|
|
11
|
-
/**
|
|
12
|
-
* Defines the padding to be applied to the StackItem contents relative to its border.
|
|
13
|
-
*/
|
|
14
|
-
padding?: number | string;
|
|
15
|
-
/**
|
|
16
|
-
* Defines how much to grow the StackItem in proportion to its siblings.
|
|
17
|
-
*/
|
|
18
|
-
grow?: boolean | number | 'inherit' | 'initial' | 'unset';
|
|
19
|
-
/**
|
|
20
|
-
* Defines at what ratio should the StackItem shrink to fit the available space.
|
|
21
|
-
*/
|
|
22
|
-
shrink?: boolean | number | 'inherit' | 'initial' | 'unset';
|
|
23
|
-
/**
|
|
24
|
-
* Defines whether the StackItem should be prevented from shrinking.
|
|
25
|
-
* This can be used to prevent a StackItem from shrinking when it is inside of a Stack that has shrinking items.
|
|
26
|
-
* @defaultvalue false
|
|
27
|
-
*/
|
|
28
|
-
disableShrink?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Defines how to align the StackItem along the x-axis (for vertical Stacks) or the y-axis (for horizontal Stacks).
|
|
31
|
-
*/
|
|
32
|
-
align?: 'auto' | 'stretch' | 'baseline' | 'start' | 'center' | 'end';
|
|
33
|
-
/**
|
|
34
|
-
* Defines whether the StackItem should take up 100% of the height of its parent.
|
|
35
|
-
* @defaultvalue true
|
|
36
|
-
*/
|
|
37
|
-
verticalFill?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Defines order of the StackItem.
|
|
40
|
-
* @defaultvalue 0
|
|
41
|
-
*/
|
|
42
|
-
order?: number | string;
|
|
43
|
-
}
|
|
44
|
-
export type IStackItemProps = IStackItemTokens & ViewProps;
|
|
45
|
-
export interface IStackItemType {
|
|
46
|
-
props: IStackItemProps;
|
|
47
|
-
slotProps: {
|
|
48
|
-
root: ViewProps;
|
|
49
|
-
};
|
|
50
|
-
tokens: IStackItemTokens;
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=StackItem.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackItem.types.d.ts","sourceRoot":"","sources":["../../src/StackItem/StackItem.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAEzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAE1D;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAE5D;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAErE;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG,SAAS,CAAC;AAE3D,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,eAAe,CAAC;IACvB,SAAS,EAAE;QACT,IAAI,EAAE,SAAS,CAAC;KACjB,CAAC;IACF,MAAM,EAAE,gBAAgB,CAAC;CAC1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackItem.types.js","sourceRoot":"","sources":["../../src/StackItem/StackItem.types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAM,aAAa,GAAG,cAAc,CAAC"}
|
package/lib/StackUtils.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { Theme } from '@fluentui-react-native/framework';
|
|
2
|
-
export interface IParseGapResult {
|
|
3
|
-
rowGap: {
|
|
4
|
-
value: number;
|
|
5
|
-
unit: string;
|
|
6
|
-
};
|
|
7
|
-
columnGap: {
|
|
8
|
-
value: number;
|
|
9
|
-
unit: string;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Takes in a gap size in either a CSS-style format (e.g. 10 or "10px")
|
|
14
|
-
* or a key of a themed spacing value (e.g. "s1").
|
|
15
|
-
* Returns the separate numerical value of the padding (e.g. 10)
|
|
16
|
-
* and the CSS unit (e.g. "px").
|
|
17
|
-
*/
|
|
18
|
-
export declare function parseGap(gap: number | string | undefined, theme: Theme): IParseGapResult;
|
|
19
|
-
/**
|
|
20
|
-
* Takes in a padding in a CSS-style format (e.g. 10, "10px", "10px 10px", etc.)
|
|
21
|
-
* where the separate padding values can also be the key of a themed spacing value
|
|
22
|
-
* (e.g. "s1 m", "10px l1 20px l2", etc.).
|
|
23
|
-
* Returns a CSS-style padding.
|
|
24
|
-
*/
|
|
25
|
-
export declare function parsePadding(padding: number | string | undefined, theme: Theme): number | string | undefined;
|
|
26
|
-
//# sourceMappingURL=StackUtils.d.ts.map
|
package/lib/StackUtils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackUtils.d.ts","sourceRoot":"","sources":["../src/StackUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAkC9D,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,SAAS,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5C;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,KAAK,GAAG,eAAe,CAsBxF;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAa5G"}
|
package/lib/StackUtils.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Functions used by Stack components to simplify style-related computations
|
|
3
|
-
*/
|
|
4
|
-
// temporary hack to unblock this code while theme spacing types are agreed upon
|
|
5
|
-
var _spacingKey = 'spacing';
|
|
6
|
-
// Helper function that converts a themed spacing key (if given) to the corresponding themed spacing value.
|
|
7
|
-
var _getThemedSpacing = function (space, theme) {
|
|
8
|
-
var spacing = theme[_spacingKey];
|
|
9
|
-
if (spacing && typeof spacing === 'object') {
|
|
10
|
-
if (spacing.hasOwnProperty(space)) {
|
|
11
|
-
return spacing[space];
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return space;
|
|
15
|
-
};
|
|
16
|
-
// Helper function that takes a gap as a string and converts it into a { value, unit } representation.
|
|
17
|
-
var _getValueUnitGap = function (gap) {
|
|
18
|
-
var numericalPart = parseFloat(gap);
|
|
19
|
-
var numericalValue = isNaN(numericalPart) ? 0 : numericalPart;
|
|
20
|
-
var numericalString = isNaN(numericalPart) ? '' : numericalPart.toString();
|
|
21
|
-
var unitPart = gap.substring(numericalString.toString().length);
|
|
22
|
-
return {
|
|
23
|
-
value: numericalValue,
|
|
24
|
-
unit: unitPart || 'px',
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Takes in a gap size in either a CSS-style format (e.g. 10 or "10px")
|
|
29
|
-
* or a key of a themed spacing value (e.g. "s1").
|
|
30
|
-
* Returns the separate numerical value of the padding (e.g. 10)
|
|
31
|
-
* and the CSS unit (e.g. "px").
|
|
32
|
-
*/
|
|
33
|
-
export function parseGap(gap, theme) {
|
|
34
|
-
var result = {
|
|
35
|
-
rowGap: { value: 0, unit: 'px' },
|
|
36
|
-
columnGap: { value: 0, unit: 'px' },
|
|
37
|
-
};
|
|
38
|
-
if (gap) {
|
|
39
|
-
if (typeof gap === 'number') {
|
|
40
|
-
result.rowGap.value = gap;
|
|
41
|
-
result.columnGap.value = gap;
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
var splitGap = gap.split(' ');
|
|
45
|
-
if (splitGap.length === 2) {
|
|
46
|
-
result.rowGap = _getValueUnitGap(_getThemedSpacing(splitGap[0], theme));
|
|
47
|
-
result.columnGap = _getValueUnitGap(_getThemedSpacing(splitGap[1], theme));
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
var calculatedGap = _getValueUnitGap(_getThemedSpacing(gap, theme));
|
|
51
|
-
result.rowGap = calculatedGap;
|
|
52
|
-
result.columnGap = calculatedGap;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return result;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Takes in a padding in a CSS-style format (e.g. 10, "10px", "10px 10px", etc.)
|
|
60
|
-
* where the separate padding values can also be the key of a themed spacing value
|
|
61
|
-
* (e.g. "s1 m", "10px l1 20px l2", etc.).
|
|
62
|
-
* Returns a CSS-style padding.
|
|
63
|
-
*/
|
|
64
|
-
export function parsePadding(padding, theme) {
|
|
65
|
-
if (padding === undefined || typeof padding === 'number' || padding === '') {
|
|
66
|
-
return padding;
|
|
67
|
-
}
|
|
68
|
-
var paddingValues = padding.split(' ');
|
|
69
|
-
if (paddingValues.length < 2) {
|
|
70
|
-
return _getThemedSpacing(padding, theme);
|
|
71
|
-
}
|
|
72
|
-
return paddingValues.reduce(function (padding1, padding2) {
|
|
73
|
-
return _getThemedSpacing(padding1, theme) + ' ' + _getThemedSpacing(padding2, theme);
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=StackUtils.js.map
|
package/lib/StackUtils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackUtils.js","sourceRoot":"","sources":["../src/StackUtils.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,gFAAgF;AAChF,IAAM,WAAW,GAAG,SAAS,CAAC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}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackUtils.test.win32.d.ts","sourceRoot":"","sources":["../src/StackUtils.test.win32.ts"],"names":[],"mappings":""}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { parseGap, parsePadding } from './StackUtils';
|
|
2
|
-
describe('StackUtils', function () {
|
|
3
|
-
describe('parseGap', function () {
|
|
4
|
-
var theme = {
|
|
5
|
-
spacing: { m: '16em' },
|
|
6
|
-
};
|
|
7
|
-
it('returns a default value when given undefined', function () {
|
|
8
|
-
expect(parseGap(undefined, theme)).toEqual({ rowGap: { value: 0, unit: 'px' }, columnGap: { value: 0, unit: 'px' } });
|
|
9
|
-
});
|
|
10
|
-
it('returns a default value when given an empty string', function () {
|
|
11
|
-
expect(parseGap('', theme)).toEqual({ rowGap: { value: 0, unit: 'px' }, columnGap: { value: 0, unit: 'px' } });
|
|
12
|
-
});
|
|
13
|
-
it('returns a value with px when given a number', function () {
|
|
14
|
-
expect(parseGap(10, theme)).toEqual({ rowGap: { value: 10, unit: 'px' }, columnGap: { value: 10, unit: 'px' } });
|
|
15
|
-
});
|
|
16
|
-
it('can parse a string with px', function () {
|
|
17
|
-
expect(parseGap('32px', theme)).toEqual({ rowGap: { value: 32, unit: 'px' }, columnGap: { value: 32, unit: 'px' } });
|
|
18
|
-
});
|
|
19
|
-
it('can parse a string with a float', function () {
|
|
20
|
-
expect(parseGap('20.5px', theme)).toEqual({ rowGap: { value: 20.5, unit: 'px' }, columnGap: { value: 20.5, unit: 'px' } });
|
|
21
|
-
});
|
|
22
|
-
it('can parse a string with em', function () {
|
|
23
|
-
expect(parseGap('5em', theme)).toEqual({ rowGap: { value: 5, unit: 'em' }, columnGap: { value: 5, unit: 'em' } });
|
|
24
|
-
});
|
|
25
|
-
it('can parse a string with percentage', function () {
|
|
26
|
-
expect(parseGap('100%', theme)).toEqual({ rowGap: { value: 100, unit: '%' }, columnGap: { value: 100, unit: '%' } });
|
|
27
|
-
});
|
|
28
|
-
it('can parse a string with no numerical part', function () {
|
|
29
|
-
expect(parseGap('px', theme)).toEqual({ rowGap: { value: 0, unit: 'px' }, columnGap: { value: 0, unit: 'px' } });
|
|
30
|
-
});
|
|
31
|
-
it('defaults to px with given a string with no units', function () {
|
|
32
|
-
expect(parseGap('16', theme)).toEqual({ rowGap: { value: 16, unit: 'px' }, columnGap: { value: 16, unit: 'px' } });
|
|
33
|
-
});
|
|
34
|
-
it('parses the value from the theme when given a spacing key', function () {
|
|
35
|
-
expect(parseGap('m', theme)).toEqual({ rowGap: { value: 16, unit: 'em' }, columnGap: { value: 16, unit: 'em' } });
|
|
36
|
-
});
|
|
37
|
-
it('can parse a string with both horizontal and vertical gap', function () {
|
|
38
|
-
expect(parseGap('30px 10px', theme)).toEqual({ rowGap: { value: 30, unit: 'px' }, columnGap: { value: 10, unit: 'px' } });
|
|
39
|
-
});
|
|
40
|
-
it('can parse a string with horizontal and vertical gap with different units', function () {
|
|
41
|
-
expect(parseGap('50px 15%', theme)).toEqual({ rowGap: { value: 50, unit: 'px' }, columnGap: { value: 15, unit: '%' } });
|
|
42
|
-
});
|
|
43
|
-
it('defaults to px with a string with horizontal and vertical gap with no units', function () {
|
|
44
|
-
expect(parseGap('50 30', theme)).toEqual({ rowGap: { value: 50, unit: 'px' }, columnGap: { value: 30, unit: 'px' } });
|
|
45
|
-
});
|
|
46
|
-
it('can parse a string with horizontal and vertical gap with one of them getting value from the theme when given a spacing key', function () {
|
|
47
|
-
expect(parseGap('50px m', theme)).toEqual({ rowGap: { value: 50, unit: 'px' }, columnGap: { value: 16, unit: 'em' } });
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
describe('parsePadding', function () {
|
|
51
|
-
var theme = {
|
|
52
|
-
spacing: {
|
|
53
|
-
s2: '5px',
|
|
54
|
-
s1: '10px',
|
|
55
|
-
m: '15px',
|
|
56
|
-
l1: '20px',
|
|
57
|
-
l2: '25px',
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
it('returns its argument when given undefined, a number, or an empty string', function () {
|
|
61
|
-
expect(parsePadding(undefined, theme)).toEqual(undefined);
|
|
62
|
-
expect(parsePadding(0, theme)).toEqual(0);
|
|
63
|
-
expect(parsePadding('', theme)).toEqual('');
|
|
64
|
-
});
|
|
65
|
-
it('returns its argument when given a CSS-style padding', function () {
|
|
66
|
-
expect(parsePadding('10px', theme)).toEqual('10px');
|
|
67
|
-
expect(parsePadding('10px 20px', theme)).toEqual('10px 20px');
|
|
68
|
-
expect(parsePadding('10px 20px 30px', theme)).toEqual('10px 20px 30px');
|
|
69
|
-
expect(parsePadding('10px 20px 30px 40px', theme)).toEqual('10px 20px 30px 40px');
|
|
70
|
-
});
|
|
71
|
-
it('converts themed spacing keys to CSS-style paddings', function () {
|
|
72
|
-
expect(parsePadding('s2', theme)).toEqual('5px');
|
|
73
|
-
expect(parsePadding('s1 m', theme)).toEqual('10px 15px');
|
|
74
|
-
expect(parsePadding('m l1 l2', theme)).toEqual('15px 20px 25px');
|
|
75
|
-
expect(parsePadding('s2 s1 m l1', theme)).toEqual('5px 10px 15px 20px');
|
|
76
|
-
});
|
|
77
|
-
it('can mix and match themed and CSS-style paddings', function () {
|
|
78
|
-
expect(parsePadding('s2 10em', theme)).toEqual('5px 10em');
|
|
79
|
-
expect(parsePadding('20% s1', theme)).toEqual('20% 10px');
|
|
80
|
-
expect(parsePadding('m 5vw', theme)).toEqual('15px 5vw');
|
|
81
|
-
expect(parsePadding('l1 10vh l2', theme)).toEqual('20px 10vh 25px');
|
|
82
|
-
expect(parsePadding('20vmin s2 20vmax', theme)).toEqual('20vmin 5px 20vmax');
|
|
83
|
-
expect(parsePadding('m 5em l1 10em', theme)).toEqual('15px 5em 20px 10em');
|
|
84
|
-
expect(parsePadding('1px l2 0px s2', theme)).toEqual('1px 25px 0px 5px');
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
//# sourceMappingURL=StackUtils.test.win32.js.map
|
|
@@ -1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,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAC1D,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YACzD,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;YACpE,MAAM,CAAC,YAAY,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;YAC7E,MAAM,CAAC,YAAY,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;YAC3E,MAAM,CAAC,YAAY,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAC3E,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/Stack.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Text } from '@fluentui-react-native/text';
|
|
3
|
-
import * as renderer from 'react-test-renderer';
|
|
4
|
-
import { Stack } from '..';
|
|
5
|
-
it('Stack with tokens', function () {
|
|
6
|
-
var tree = renderer
|
|
7
|
-
.create(React.createElement(Stack, { maxWidth: 400, gap: 8, padding: 16 },
|
|
8
|
-
React.createElement(Text, null, "Hello"),
|
|
9
|
-
React.createElement(Text, null, "Hello"),
|
|
10
|
-
React.createElement(Text, null, "Hello")))
|
|
11
|
-
.toJSON();
|
|
12
|
-
expect(tree).toMatchSnapshot();
|
|
13
|
-
});
|
|
14
|
-
//# sourceMappingURL=Stack.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.test.js","sourceRoot":"","sources":["../../src/__tests__/Stack.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACnD,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAE3B,EAAE,CAAC,mBAAmB,EAAE;IACtB,IAAM,IAAI,GAAG,QAAQ;SAClB,MAAM,CACL,oBAAC,KAAK,IAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QACvC,oBAAC,IAAI,gBAAa;QAClB,oBAAC,IAAI,gBAAa;QAClB,oBAAC,IAAI,gBAAa,CACZ,CACT;SACA,MAAM,EAAE,CAAC;IACZ,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjC,CAAC,CAAC,CAAC"}
|
package/lib/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { stackItemName } from './StackItem/StackItem.types';
|
|
2
|
-
export type { IStackItemProps, IStackItemTokens, IStackItemType } from './StackItem/StackItem.types';
|
|
3
|
-
export { StackItem } from './StackItem/StackItem';
|
|
4
|
-
export { stackName } from './Stack.types';
|
|
5
|
-
export type { Alignment, IStackProps, IStackRenderData, IStackSlotProps, IStackStatics, IStackTokens, IStackType } from './Stack.types';
|
|
6
|
-
export { Stack } from './Stack';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACrG,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACxI,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
package/lib/index.js
DELETED
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|