@fluentui-react-native/stack 0.11.3 → 0.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cache/tsconfig.tsbuildinfo +1 -0
- package/CHANGELOG.md +23 -0
- package/jest.config.cjs +1 -0
- package/lib/Stack.d.ts +3 -3
- package/lib/Stack.d.ts.map +1 -1
- package/lib/Stack.js.map +1 -1
- package/lib/Stack.tokens.js.map +1 -1
- package/lib/StackItem/StackItem.d.ts.map +1 -1
- package/lib/StackItem/StackItem.tokens.js.map +1 -1
- package/lib/StackUtils.js.map +1 -1
- package/lib/StackUtils.test.win32.js.map +1 -1
- package/lib/__tests__/Stack.test.js +1 -3
- package/lib/__tests__/Stack.test.js.map +1 -1
- package/package.json +20 -25
- package/tsconfig.json +38 -3
- package/babel.config.js +0 -1
- package/jest.config.js +0 -2
- package/lib-commonjs/Stack.d.ts +0 -15
- package/lib-commonjs/Stack.d.ts.map +0 -1
- package/lib-commonjs/Stack.js +0 -103
- package/lib-commonjs/Stack.js.map +0 -1
- package/lib-commonjs/Stack.settings.d.ts +0 -4
- package/lib-commonjs/Stack.settings.d.ts.map +0 -1
- package/lib-commonjs/Stack.settings.js +0 -63
- package/lib-commonjs/Stack.settings.js.map +0 -1
- package/lib-commonjs/Stack.tokens.d.ts +0 -6
- package/lib-commonjs/Stack.tokens.d.ts.map +0 -1
- package/lib-commonjs/Stack.tokens.js +0 -91
- package/lib-commonjs/Stack.tokens.js.map +0 -1
- package/lib-commonjs/Stack.types.d.ts +0 -108
- package/lib-commonjs/Stack.types.d.ts.map +0 -1
- package/lib-commonjs/Stack.types.js +0 -5
- package/lib-commonjs/Stack.types.js.map +0 -1
- package/lib-commonjs/StackItem/StackItem.d.ts +0 -5
- package/lib-commonjs/StackItem/StackItem.d.ts.map +0 -1
- package/lib-commonjs/StackItem/StackItem.js +0 -17
- package/lib-commonjs/StackItem/StackItem.js.map +0 -1
- package/lib-commonjs/StackItem/StackItem.settings.d.ts +0 -4
- package/lib-commonjs/StackItem/StackItem.settings.d.ts.map +0 -1
- package/lib-commonjs/StackItem/StackItem.settings.js +0 -15
- package/lib-commonjs/StackItem/StackItem.settings.js.map +0 -1
- package/lib-commonjs/StackItem/StackItem.tokens.d.ts +0 -6
- package/lib-commonjs/StackItem/StackItem.tokens.d.ts.map +0 -1
- package/lib-commonjs/StackItem/StackItem.tokens.js +0 -24
- package/lib-commonjs/StackItem/StackItem.tokens.js.map +0 -1
- package/lib-commonjs/StackItem/StackItem.types.d.ts +0 -52
- package/lib-commonjs/StackItem/StackItem.types.d.ts.map +0 -1
- package/lib-commonjs/StackItem/StackItem.types.js +0 -5
- package/lib-commonjs/StackItem/StackItem.types.js.map +0 -1
- package/lib-commonjs/StackUtils.d.ts +0 -20
- package/lib-commonjs/StackUtils.d.ts.map +0 -1
- package/lib-commonjs/StackUtils.js +0 -63
- package/lib-commonjs/StackUtils.js.map +0 -1
- package/lib-commonjs/StackUtils.test.win32.d.ts +0 -2
- package/lib-commonjs/StackUtils.test.win32.d.ts.map +0 -1
- package/lib-commonjs/StackUtils.test.win32.js +0 -56
- package/lib-commonjs/StackUtils.test.win32.js.map +0 -1
- package/lib-commonjs/__tests__/Stack.test.d.ts +0 -2
- package/lib-commonjs/__tests__/Stack.test.d.ts.map +0 -1
- package/lib-commonjs/__tests__/Stack.test.js +0 -50
- package/lib-commonjs/__tests__/Stack.test.js.map +0 -1
- package/lib-commonjs/index.d.ts +0 -7
- package/lib-commonjs/index.d.ts.map +0 -1
- package/lib-commonjs/index.js +0 -12
- package/lib-commonjs/index.js.map +0 -1
package/lib-commonjs/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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../src/Stack.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAoB,WAAW,EAAE,eAAe,EAAc,MAAM,eAAe,CAAC;AAIhG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEd,UAAU,MAAM,CAAC,CAAC;QAChB,UAAU,MAAM;YACd,wBAAwB,EAAE,GAAG,CAAC;SAC/B;KACF;CACF;AAyCD,eAAO,MAAM,KAAK;;;;yCAsBhB,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
package/lib-commonjs/Stack.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.Stack = void 0;
|
|
40
|
-
const jsx_runtime_1 = require("@fluentui-react-native/framework-base/jsx-runtime");
|
|
41
|
-
/** @jsxImportSource @fluentui-react-native/framework-base */
|
|
42
|
-
const React = __importStar(require("react"));
|
|
43
|
-
const react_native_1 = require("react-native");
|
|
44
|
-
const adapters_1 = require("@fluentui-react-native/adapters");
|
|
45
|
-
const tokens_1 = require("@fluentui-react-native/tokens");
|
|
46
|
-
const foundation_compose_1 = require("@uifabricshared/foundation-compose");
|
|
47
|
-
const foundation_settings_1 = require("@uifabricshared/foundation-settings");
|
|
48
|
-
const Stack_settings_1 = require("./Stack.settings");
|
|
49
|
-
const Stack_tokens_1 = require("./Stack.tokens");
|
|
50
|
-
const Stack_types_1 = require("./Stack.types");
|
|
51
|
-
const StackItem_1 = __importDefault(require("./StackItem/StackItem"));
|
|
52
|
-
function _mixinStyle(style, mixin) {
|
|
53
|
-
return style ? [style, mixin] : mixin;
|
|
54
|
-
}
|
|
55
|
-
const _styleKey = 'style';
|
|
56
|
-
const render = (Slots, renderData, ...children) => {
|
|
57
|
-
const { gap, horizontal, wrap } = renderData.state;
|
|
58
|
-
if (gap && gap > 0 && children && globalThis.__jsiExecutorDescription !== 'ChakraRuntime') {
|
|
59
|
-
const extraStyle = horizontal ? { marginLeft: gap } : { marginTop: gap };
|
|
60
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
61
|
-
// @ts-expect-error - TODO, fix typing error
|
|
62
|
-
children = React.Children.map(children, (child, index) => {
|
|
63
|
-
if (React.isValidElement(child) && index > 0) {
|
|
64
|
-
const childProps = child.props;
|
|
65
|
-
const extraProps = { style: _mixinStyle(childProps[_styleKey], extraStyle) };
|
|
66
|
-
return React.cloneElement(child, {
|
|
67
|
-
...childProps,
|
|
68
|
-
...extraProps,
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
return child;
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
if (wrap) {
|
|
75
|
-
return (jsx_runtime_1.jsx(Slots.root, { children: jsx_runtime_1.jsx(Slots.inner, { children: children }) }));
|
|
76
|
-
}
|
|
77
|
-
return jsx_runtime_1.jsx(Slots.root, { children: children });
|
|
78
|
-
};
|
|
79
|
-
exports.Stack = (0, foundation_compose_1.compose)({
|
|
80
|
-
displayName: Stack_types_1.stackName,
|
|
81
|
-
settings: Stack_settings_1.settings,
|
|
82
|
-
statics: {
|
|
83
|
-
Item: StackItem_1.default,
|
|
84
|
-
},
|
|
85
|
-
usePrepareProps: (props, useStyling) => {
|
|
86
|
-
const { gap, horizontal, wrap, ...rest } = props;
|
|
87
|
-
return {
|
|
88
|
-
slotProps: (0, foundation_settings_1.mergeSettings)(useStyling(props), { root: rest }),
|
|
89
|
-
state: { gap, horizontal, wrap },
|
|
90
|
-
};
|
|
91
|
-
},
|
|
92
|
-
render: render,
|
|
93
|
-
slots: {
|
|
94
|
-
root: { slotType: react_native_1.View, filter: adapters_1.filterViewProps },
|
|
95
|
-
inner: { slotType: react_native_1.View, filter: adapters_1.filterViewProps },
|
|
96
|
-
},
|
|
97
|
-
styles: {
|
|
98
|
-
root: [Stack_tokens_1.buildStackRootStyles, tokens_1.backgroundColorTokens, tokens_1.borderTokens],
|
|
99
|
-
inner: [Stack_tokens_1.buildStackInnerStyles],
|
|
100
|
-
},
|
|
101
|
-
});
|
|
102
|
-
exports.default = exports.Stack;
|
|
103
|
-
//# sourceMappingURL=Stack.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.js","sourceRoot":"","sources":["../src/Stack.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAA6D;AAC7D,MAAY,KAAK,kCAAc;AAC/B,+CAAoC;AAGpC,8DAAkE;AAClE,0DAAoF;AAGpF,2EAA6D;AAC7D,6EAAoE;AAEpE,qDAA4C;AAC5C,iDAA6E;AAC7E,+CAA0C;AAE1C,sEAA8C;AAe9C,SAAS,WAAW,CAAC,KAAwC,EAAE,KAAiB,EAAyB;IACvG,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAAA,CACvC;AAED,MAAM,SAAS,GAAG,OAAO,CAAC;AAE1B,MAAM,MAAM,GAAG,CAAC,KAA8B,EAAE,UAA4B,EAAE,GAAG,QAA2B,EAAqB,EAAE,CAAC;IAClI,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,KAAM,CAAC;IAEpD,IAAI,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,QAAQ,IAAI,UAAU,CAAC,wBAAwB,KAAK,eAAe,EAAE,CAAC;QAC1F,MAAM,UAAU,GAAc,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC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AAI,EAAE,CAAC;YACpF,KAAK,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE;SACjC,CAAC;IAAA,CACH;IACD,MAAM,EAAE,MAAM;IACd,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,QAAQ,EAAE,mBAAI,EAAE,MAAM,EAAE,0BAAe,EAAE;QACjD,KAAK,EAAE,EAAE,QAAQ,EAAE,mBAAI,EAAE,MAAM,EAAE,0BAAe,EAAE;KACnD;IACD,MAAM,EAAE;QACN,IAAI,EAAE,CAAC,mCAAoB,EAAE,8BAAqB,EAAE,qBAAY,CAAC;QACjE,KAAK,EAAE,CAAC,oCAAqB,CAAC;KAC/B;CACF,CAAC,CAAC;kBAEY,QAAA,KAAK"}
|
|
@@ -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"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.settings = void 0;
|
|
4
|
-
const Stack_types_1 = require("./Stack.types");
|
|
5
|
-
exports.settings = [
|
|
6
|
-
{
|
|
7
|
-
root: {
|
|
8
|
-
style: {
|
|
9
|
-
display: 'flex',
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
inner: {
|
|
13
|
-
style: {
|
|
14
|
-
display: 'flex',
|
|
15
|
-
flexWrap: 'wrap',
|
|
16
|
-
overflow: 'visible',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
_overrides: {
|
|
20
|
-
horizontal: {
|
|
21
|
-
root: {
|
|
22
|
-
style: {
|
|
23
|
-
flexDirection: 'row',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
_overrides: {
|
|
27
|
-
reversed: {
|
|
28
|
-
root: {
|
|
29
|
-
style: {
|
|
30
|
-
flexDirection: 'column-reverse',
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
reversed: {
|
|
37
|
-
root: {
|
|
38
|
-
style: {
|
|
39
|
-
flexDirection: 'row-reverse',
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
verticalFill: {
|
|
44
|
-
root: {
|
|
45
|
-
style: {
|
|
46
|
-
height: '100%',
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
wrap: {
|
|
51
|
-
root: {
|
|
52
|
-
style: {
|
|
53
|
-
flexWrap: 'wrap',
|
|
54
|
-
height: '100%',
|
|
55
|
-
overflow: 'visible',
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
Stack_types_1.stackName,
|
|
62
|
-
];
|
|
63
|
-
//# sourceMappingURL=Stack.settings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.settings.js","sourceRoot":"","sources":["../src/Stack.settings.ts"],"names":[],"mappings":";;;AAGA,+CAA0C;AAE7B,QAAA,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,uBAAS;CACV,CAAC"}
|
|
@@ -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;AAwD7D,eAAO,MAAM,qBAAqB,8FAAmF,CAAC;AAyCtH,eAAO,MAAM,oBAAoB,8FAA6E,CAAC"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildStackRootStyles = exports.buildStackInnerStyles = void 0;
|
|
4
|
-
const foundation_tokens_1 = require("@uifabricshared/foundation-tokens");
|
|
5
|
-
const StackUtils_1 = require("./StackUtils");
|
|
6
|
-
const nameMap = {
|
|
7
|
-
start: 'flex-start',
|
|
8
|
-
end: 'flex-end',
|
|
9
|
-
};
|
|
10
|
-
function _mapAlignment(horizontal, horizontalAlign, verticalAlign, style) {
|
|
11
|
-
const alignValue = horizontal ? verticalAlign : horizontalAlign;
|
|
12
|
-
if (alignValue) {
|
|
13
|
-
style.alignItems = (nameMap[alignValue] || alignValue);
|
|
14
|
-
}
|
|
15
|
-
const justifyValue = horizontal ? horizontalAlign : verticalAlign;
|
|
16
|
-
if (justifyValue) {
|
|
17
|
-
style.justifyContent = (nameMap[justifyValue] || justifyValue);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
const _innerKeyProps = [
|
|
21
|
-
'horizontal',
|
|
22
|
-
// 'reversed',
|
|
23
|
-
'gap',
|
|
24
|
-
'horizontalAlign',
|
|
25
|
-
'verticalAlign',
|
|
26
|
-
// 'disableShrink',
|
|
27
|
-
'childrenGap',
|
|
28
|
-
'padding',
|
|
29
|
-
];
|
|
30
|
-
function _buildInnerStyles(tokenProps, theme) {
|
|
31
|
-
const { horizontal, wrap, horizontalAlign, verticalAlign, padding } = tokenProps;
|
|
32
|
-
let innerStyle = undefined;
|
|
33
|
-
const childrenGap = tokenProps.childrenGap || tokenProps.gap;
|
|
34
|
-
const { rowGap, columnGap } = (0, StackUtils_1.parseGap)(childrenGap, theme);
|
|
35
|
-
if (wrap) {
|
|
36
|
-
innerStyle = {
|
|
37
|
-
rowGap: rowGap,
|
|
38
|
-
columnGap: columnGap,
|
|
39
|
-
padding: (0, StackUtils_1.parsePadding)(padding, theme),
|
|
40
|
-
width: '100%',
|
|
41
|
-
};
|
|
42
|
-
_mapAlignment(!!horizontal, horizontalAlign, verticalAlign, innerStyle);
|
|
43
|
-
if (horizontal) {
|
|
44
|
-
innerStyle.height = '100%';
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
innerStyle.maxHeight = '100%';
|
|
48
|
-
innerStyle.height = '100%';
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return { style: innerStyle };
|
|
52
|
-
}
|
|
53
|
-
exports.buildStackInnerStyles = (0, foundation_tokens_1.styleFunction)(_buildInnerStyles, _innerKeyProps);
|
|
54
|
-
function _buildRootStyles(tokenProps, theme) {
|
|
55
|
-
const { grow, horizontal, horizontalAlign, verticalAlign, maxHeight, maxWidth, padding, wrap } = tokenProps;
|
|
56
|
-
// const childrenGap = tokenProps.childrenGap || tokenProps.gap;
|
|
57
|
-
// const { rowGap, columnGap } = parseGap(childrenGap, theme);
|
|
58
|
-
const rootStyle = {
|
|
59
|
-
maxHeight,
|
|
60
|
-
maxWidth,
|
|
61
|
-
};
|
|
62
|
-
_mapAlignment(!!horizontal, horizontalAlign, verticalAlign, rootStyle);
|
|
63
|
-
if (grow && !wrap) {
|
|
64
|
-
rootStyle.flexGrow = typeof grow === 'boolean' ? (grow ? 1 : 0) : grow;
|
|
65
|
-
rootStyle.overflow = 'hidden';
|
|
66
|
-
}
|
|
67
|
-
if (!wrap) {
|
|
68
|
-
rootStyle.padding = (0, StackUtils_1.parsePadding)(padding, theme);
|
|
69
|
-
}
|
|
70
|
-
return { style: rootStyle };
|
|
71
|
-
// verticalFill,
|
|
72
|
-
// reversed,
|
|
73
|
-
// disableShrink,
|
|
74
|
-
}
|
|
75
|
-
const _keyProps = [
|
|
76
|
-
// 'verticalFill',
|
|
77
|
-
'horizontal',
|
|
78
|
-
// 'reversed',
|
|
79
|
-
// 'gap',
|
|
80
|
-
'grow',
|
|
81
|
-
'wrap',
|
|
82
|
-
'horizontalAlign',
|
|
83
|
-
'verticalAlign',
|
|
84
|
-
// 'disableShrink',
|
|
85
|
-
// 'childrenGap',
|
|
86
|
-
'maxHeight',
|
|
87
|
-
'maxWidth',
|
|
88
|
-
'padding',
|
|
89
|
-
];
|
|
90
|
-
exports.buildStackRootStyles = (0, foundation_tokens_1.styleFunction)(_buildRootStyles, _keyProps);
|
|
91
|
-
//# sourceMappingURL=Stack.tokens.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.tokens.js","sourceRoot":"","sources":["../src/Stack.tokens.ts"],"names":[],"mappings":";;;AAGA,yEAAkE;AAGlE,6CAAsD;AAEtD,MAAM,OAAO,GAAiC;IAC5C,KAAK,EAAE,YAAY;IACnB,GAAG,EAAE,UAAU;CAChB,CAAC;AAEF,SAAS,aAAa,CAAC,UAAmB,EAAE,eAA0B,EAAE,aAAwB,EAAE,KAAgB,EAAQ;IACxH,MAAM,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC;IAChE,IAAI,UAAU,EAAE,CAAC;QACf,KAAK,CAAC,UAAU,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,UAAU,CAA4B,CAAC;IACpF,CAAC;IAED,MAAM,YAAY,GAAG,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa,CAAC;IAClE,IAAI,YAAY,EAAE,CAAC;QACjB,KAAK,CAAC,cAAc,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,YAAY,CAAgC,CAAC;IAChG,CAAC;AAAA,CACF;AAED,MAAM,cAAc,GAA2B;IAC7C,YAAY;IACZ,cAAc;IACd,KAAK;IACL,iBAAiB;IACjB,eAAe;IACf,mBAAmB;IACnB,aAAa;IACb,SAAS;CACV,CAAC;AAEF,SAAS,iBAAiB,CAAC,UAAwB,EAAE,KAAY,EAAa;IAC5E,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,EAAE,aAAa,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC;IAEjF,IAAI,UAAU,GA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C,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;IAChC,CAAC;IAED,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,SAAS,CAAC,OAAO,GAAG,IAAA,yBAAY,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAC5B,gBAAgB;IAChB,YAAY;IACZ,iBAAiB;AAHW,CAI7B;AACD,MAAM,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;AAEW,QAAA,oBAAoB,GAAG,IAAA,iCAAa,EAAiC,gBAAgB,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import type { ViewStyle, ViewProps, DimensionValue } from 'react-native';
|
|
2
|
-
import type { Spacing } from '@fluentui-react-native/framework';
|
|
3
|
-
import type { IBackgroundColorTokens, IBorderTokens, FontTokens } from '@fluentui-react-native/tokens';
|
|
4
|
-
import type { IRenderData } from '@uifabricshared/foundation-composable';
|
|
5
|
-
import type { IStackItemProps } from './StackItem/StackItem.types';
|
|
6
|
-
export declare const stackName = "RNFStack";
|
|
7
|
-
/**
|
|
8
|
-
* Defines a type made by the union of the different values that the align-items and justify-content flexbox
|
|
9
|
-
* properties can take.
|
|
10
|
-
*/
|
|
11
|
-
export type Alignment = ViewStyle['justifyContent'] | 'start' | 'end';
|
|
12
|
-
export interface IStackStatics {
|
|
13
|
-
Item: React.FunctionComponent<IStackItemProps>;
|
|
14
|
-
}
|
|
15
|
-
type SpacingGapValue = `${number}px` | `${number}` | keyof Spacing;
|
|
16
|
-
/**
|
|
17
|
-
* Tokens from fabric. Right now they are embedded in the props pending discussions of whether tokens: {} is
|
|
18
|
-
* the right approach
|
|
19
|
-
*/
|
|
20
|
-
export interface IStackTokens extends FontTokens, IBackgroundColorTokens, IBorderTokens {
|
|
21
|
-
/**
|
|
22
|
-
* Defines the spacing between Stack children.
|
|
23
|
-
* The property is specified as a value for 'row gap', followed optionally by a value for 'column gap'.
|
|
24
|
-
* If 'column gap' is omitted, it's set to the same value as 'row gap'.
|
|
25
|
-
*/
|
|
26
|
-
childrenGap?: number | SpacingGapValue | `${SpacingGapValue} ${SpacingGapValue}`;
|
|
27
|
-
/**
|
|
28
|
-
* Defines a maximum height for the Stack.
|
|
29
|
-
*/
|
|
30
|
-
maxHeight?: DimensionValue;
|
|
31
|
-
/**
|
|
32
|
-
* Defines a maximum width for the Stack.
|
|
33
|
-
*/
|
|
34
|
-
maxWidth?: DimensionValue;
|
|
35
|
-
/**
|
|
36
|
-
* Defines the padding to be applied to the Stack contents relative to its border.
|
|
37
|
-
*/
|
|
38
|
-
padding?: number | `${number}px` | keyof Spacing;
|
|
39
|
-
/**
|
|
40
|
-
* Defines whether to render Stack children horizontally.
|
|
41
|
-
* @defaultvalue false
|
|
42
|
-
*/
|
|
43
|
-
horizontal?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Defines whether to render Stack children in the opposite direction (bottom-to-top if it's a vertical Stack and
|
|
46
|
-
* right-to-left if it's a horizontal Stack).
|
|
47
|
-
* @defaultvalue false
|
|
48
|
-
*/
|
|
49
|
-
reversed?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Defines how to align Stack children horizontally (along the x-axis).
|
|
52
|
-
*/
|
|
53
|
-
horizontalAlign?: Alignment;
|
|
54
|
-
/**
|
|
55
|
-
* Defines how to align Stack children vertically (along the y-axis).
|
|
56
|
-
*/
|
|
57
|
-
verticalAlign?: Alignment;
|
|
58
|
-
/**
|
|
59
|
-
* Defines whether the Stack should take up 100% of the height of its parent.
|
|
60
|
-
* This property is required to be set to true when using the `grow` flag on children in vertical oriented Stacks.
|
|
61
|
-
* Stacks are rendered as block elements and grow horizontally to the container already.
|
|
62
|
-
* @defaultvalue false
|
|
63
|
-
*/
|
|
64
|
-
verticalFill?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Defines whether Stack children should not shrink to fit the available space.
|
|
67
|
-
* @defaultvalue false
|
|
68
|
-
*/
|
|
69
|
-
disableShrink?: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Defines how much to grow the Stack in proportion to its siblings.
|
|
72
|
-
*/
|
|
73
|
-
grow?: boolean | number;
|
|
74
|
-
/**
|
|
75
|
-
* Defines whether Stack children should wrap onto multiple rows or columns when they are about to overflow
|
|
76
|
-
* the size of the Stack.
|
|
77
|
-
* @defaultvalue false
|
|
78
|
-
*/
|
|
79
|
-
wrap?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Gap between items, multiplied by theme gap spacing
|
|
82
|
-
* Does not work while running Chakra for reasons specific to that engine (refer to https://github.com/microsoft/fluentui-react-native/issues/767)
|
|
83
|
-
*/
|
|
84
|
-
gap?: number;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Base property definitions, these generally match fabric
|
|
88
|
-
*/
|
|
89
|
-
export interface IStackProps extends IStackTokens, ViewProps {
|
|
90
|
-
}
|
|
91
|
-
export type IStackSlotProps = {
|
|
92
|
-
root: ViewProps;
|
|
93
|
-
inner: ViewProps;
|
|
94
|
-
};
|
|
95
|
-
export interface IStackType {
|
|
96
|
-
props: IStackProps;
|
|
97
|
-
tokens: IStackTokens;
|
|
98
|
-
slotProps: IStackSlotProps;
|
|
99
|
-
statics: IStackStatics;
|
|
100
|
-
state: {
|
|
101
|
-
gap: IStackProps['gap'];
|
|
102
|
-
horizontal: IStackProps['horizontal'];
|
|
103
|
-
wrap: IStackProps['wrap'];
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
export type IStackRenderData = IRenderData<IStackSlotProps, IStackType['state']>;
|
|
107
|
-
export {};
|
|
108
|
-
//# sourceMappingURL=Stack.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.types.d.ts","sourceRoot":"","sources":["../src/Stack.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AACvG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAEnE,eAAO,MAAM,SAAS,aAAa,CAAC;AAEpC;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,CAAC,gBAAgB,CAAC,GAAG,OAAO,GAAG,KAAK,CAAC;AAEtE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;CAChD;AAED,KAAK,eAAe,GAAG,GAAG,MAAM,IAAI,GAAG,GAAG,MAAM,EAAE,GAAG,MAAM,OAAO,CAAC;AAEnE;;;GAGG;AACH,MAAM,WAAW,YAAa,SAAQ,UAAU,EAAE,sBAAsB,EAAE,aAAa;IACrF;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,eAAe,GAAG,GAAG,eAAe,IAAI,eAAe,EAAE,CAAC;IAEjF;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,GAAG,MAAM,IA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|
@@ -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,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StackItem = void 0;
|
|
4
|
-
const react_native_1 = require("react-native");
|
|
5
|
-
const adapters_1 = require("@fluentui-react-native/adapters");
|
|
6
|
-
const foundation_compose_1 = require("@uifabricshared/foundation-compose");
|
|
7
|
-
const StackItem_settings_1 = require("./StackItem.settings");
|
|
8
|
-
const StackItem_tokens_1 = require("./StackItem.tokens");
|
|
9
|
-
const StackItem_types_1 = require("./StackItem.types");
|
|
10
|
-
exports.StackItem = (0, foundation_compose_1.compose)({
|
|
11
|
-
displayName: StackItem_types_1.stackItemName,
|
|
12
|
-
settings: StackItem_settings_1.settings,
|
|
13
|
-
slots: { root: { slotType: react_native_1.View, filter: adapters_1.filterViewProps } },
|
|
14
|
-
styles: { root: [StackItem_tokens_1.stackItemTokenProcessor] },
|
|
15
|
-
});
|
|
16
|
-
exports.default = exports.StackItem;
|
|
17
|
-
//# sourceMappingURL=StackItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackItem.js","sourceRoot":"","sources":["../../src/StackItem/StackItem.tsx"],"names":[],"mappings":";;;AACA,+CAAoC;AAEpC,8DAAkE;AAClE,2EAA6D;AAE7D,6DAAgD;AAChD,yDAA6D;AAC7D,uDAAkD;AAGrC,QAAA,SAAS,GAA6C,IAAA,4BAAO,EAAiB;IACzF,WAAW,EAAE,+BAAa;IAC1B,QAAQ,EAAE,6BAAQ;IAClB,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,mBAAI,EAAE,MAAM,EAAE,0BAAe,EAAE,EAAE;IAC5D,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,0CAAuB,CAAC,EAAE;CAC5C,CAAC,CAAC;kBAEY,QAAA,SAAS"}
|
|
@@ -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,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.settings = void 0;
|
|
4
|
-
const StackItem_types_1 = require("./StackItem.types");
|
|
5
|
-
exports.settings = [
|
|
6
|
-
{
|
|
7
|
-
root: {
|
|
8
|
-
style: {
|
|
9
|
-
width: 'auto',
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
StackItem_types_1.stackItemName,
|
|
14
|
-
];
|
|
15
|
-
//# sourceMappingURL=StackItem.settings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackItem.settings.js","sourceRoot":"","sources":["../../src/StackItem/StackItem.settings.ts"],"names":[],"mappings":";;;AAGA,uDAAkD;AAErC,QAAA,QAAQ,GAAqC;IACxD;QACE,IAAI,EAAE;YACJ,KAAK,EAAE;gBACL,KAAK,EAAE,MAAM;aACd;SACF;KACF;IACD,+BAAa;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,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stackItemTokenProcessor = void 0;
|
|
4
|
-
exports._processor = _processor;
|
|
5
|
-
const foundation_tokens_1 = require("@uifabricshared/foundation-tokens");
|
|
6
|
-
const alignMap = {
|
|
7
|
-
start: 'flex-start',
|
|
8
|
-
end: 'flex-end',
|
|
9
|
-
};
|
|
10
|
-
const _keyProps = ['align', 'disableShrink', 'grow', 'margin', 'shrink', 'verticalFill'];
|
|
11
|
-
function _processor(tokenProps) {
|
|
12
|
-
const { grow, shrink, disableShrink, align, verticalFill, margin } = tokenProps;
|
|
13
|
-
return {
|
|
14
|
-
style: {
|
|
15
|
-
margin,
|
|
16
|
-
height: verticalFill ? '100%' : 'auto',
|
|
17
|
-
flexShrink: disableShrink || (!grow && !shrink) ? 0 : 1,
|
|
18
|
-
flexGrow: typeof grow === 'number' ? grow : grow ? 1 : undefined,
|
|
19
|
-
alignSelf: (align && alignMap[align]) || undefined,
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
exports.stackItemTokenProcessor = (0, foundation_tokens_1.styleFunction)(_processor, _keyProps);
|
|
24
|
-
//# 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,yEAAkE;AAIlE,MAAM,QAAQ,GAA8C;IAC1D,KAAK,EAAE,YAAY;IACnB,GAAG,EAAE,UAAU;CAChB,CAAC;AAEF,MAAM,SAAS,GAA+B,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;AAErH,oBAA2B,UAA4B,EAAa;IAClE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC;IAEhF,OAAO;QACL,KAAK,EAAE;YACL,MAAM;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;AAAA,CACH;AAEY,QAAA,uBAAuB,GAAG,IAAA,iCAAa,EAAqC,UAAU,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { DimensionValue, 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?: DimensionValue;
|
|
11
|
-
/**
|
|
12
|
-
* Defines the padding to be applied to the StackItem contents relative to its border.
|
|
13
|
-
*/
|
|
14
|
-
padding?: DimensionValue;
|
|
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,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9D,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IAExB;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB;;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,QAAA,aAAa,GAAG,cAAc,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Spacing, Theme } from '@fluentui-react-native/framework';
|
|
2
|
-
export interface IParseGapResult {
|
|
3
|
-
rowGap: number;
|
|
4
|
-
columnGap: number;
|
|
5
|
-
}
|
|
6
|
-
type SpacingGapValue = `${number}px` | `${number}` | keyof Spacing;
|
|
7
|
-
/**
|
|
8
|
-
* Takes in a gap size in either a CSS-style format (e.g. 10 or "10px")
|
|
9
|
-
* or a key of a themed spacing value (e.g. "s1").
|
|
10
|
-
* Returns the separate numerical value of the padding (e.g. 10)
|
|
11
|
-
* and the CSS unit (e.g. "px").
|
|
12
|
-
*/
|
|
13
|
-
export declare function parseGap(gap: number | SpacingGapValue | `${SpacingGapValue} ${SpacingGapValue}` | undefined, theme: Theme): IParseGapResult;
|
|
14
|
-
/**
|
|
15
|
-
* Takes in a padding in a CSS-style format (e.g. 10, "10px"), or a key of a themed spacing value
|
|
16
|
-
* (e.g. "s1")
|
|
17
|
-
*/
|
|
18
|
-
export declare function parsePadding(padding: keyof Spacing | number | `${number}px` | undefined, theme: Theme): number | undefined;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=StackUtils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackUtils.d.ts","sourceRoot":"","sources":["../src/StackUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAuBvE,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,KAAK,eAAe,GAAG,GAAG,MAAM,IAAI,GAAG,GAAG,MAAM,EAAE,GAAG,MAAM,OAAO,CAAC;AAEnE;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,GAAG,EAAE,MAAM,GAAG,eAAe,GAAG,GAAG,eAAe,IAAI,eAAe,EAAE,GAAG,SAAS,EACnF,KAAK,EAAE,KAAK,GACX,eAAe,CAsBjB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,OAAO,GAAG,MAAM,GAAG,GAAG,MAAM,IAAI,GAAG,SAAS,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAM1H"}
|