@fluentui-react-native/stack 0.11.0 → 0.11.3

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/lib/Stack.d.ts +7 -13
  3. package/lib/Stack.js +44 -44
  4. package/lib/Stack.js.map +1 -1
  5. package/lib/Stack.settings.d.ts +1 -1
  6. package/lib/Stack.settings.js +51 -51
  7. package/lib/Stack.tokens.d.ts +3 -3
  8. package/lib/Stack.tokens.js +71 -70
  9. package/lib/Stack.types.d.ts +80 -79
  10. package/lib/Stack.types.js +1 -1
  11. package/lib/StackItem/StackItem.d.ts +1 -1
  12. package/lib/StackItem/StackItem.js +5 -5
  13. package/lib/StackItem/StackItem.settings.d.ts +1 -1
  14. package/lib/StackItem/StackItem.settings.js +8 -8
  15. package/lib/StackItem/StackItem.tokens.d.ts +2 -6
  16. package/lib/StackItem/StackItem.tokens.js +13 -13
  17. package/lib/StackItem/StackItem.types.d.ts +43 -43
  18. package/lib/StackItem/StackItem.types.js +1 -1
  19. package/lib/StackUtils.d.ts +4 -7
  20. package/lib/StackUtils.js +35 -33
  21. package/lib/StackUtils.test.win32.d.ts +1 -1
  22. package/lib/StackUtils.test.win32.js +50 -50
  23. package/lib/__tests__/Stack.test.d.ts +1 -1
  24. package/lib/__tests__/Stack.test.js +9 -14
  25. package/lib/index.d.ts +1 -1
  26. package/lib/index.js +1 -1
  27. package/lib-commonjs/Stack.d.ts +7 -13
  28. package/lib-commonjs/Stack.js +88 -107
  29. package/lib-commonjs/Stack.js.map +1 -1
  30. package/lib-commonjs/Stack.settings.d.ts +1 -1
  31. package/lib-commonjs/Stack.settings.js +54 -54
  32. package/lib-commonjs/Stack.tokens.d.ts +3 -3
  33. package/lib-commonjs/Stack.tokens.js +75 -74
  34. package/lib-commonjs/Stack.types.d.ts +80 -79
  35. package/lib-commonjs/Stack.types.js +3 -3
  36. package/lib-commonjs/StackItem/StackItem.d.ts +1 -1
  37. package/lib-commonjs/StackItem/StackItem.js +13 -13
  38. package/lib-commonjs/StackItem/StackItem.settings.d.ts +1 -1
  39. package/lib-commonjs/StackItem/StackItem.settings.js +11 -11
  40. package/lib-commonjs/StackItem/StackItem.tokens.d.ts +2 -6
  41. package/lib-commonjs/StackItem/StackItem.tokens.js +16 -16
  42. package/lib-commonjs/StackItem/StackItem.types.d.ts +43 -43
  43. package/lib-commonjs/StackItem/StackItem.types.js +3 -3
  44. package/lib-commonjs/StackUtils.d.ts +4 -7
  45. package/lib-commonjs/StackUtils.js +37 -35
  46. package/lib-commonjs/StackUtils.test.win32.d.ts +1 -1
  47. package/lib-commonjs/StackUtils.test.win32.js +53 -71
  48. package/lib-commonjs/__tests__/Stack.test.d.ts +1 -1
  49. package/lib-commonjs/__tests__/Stack.test.js +44 -70
  50. package/lib-commonjs/index.d.ts +1 -1
  51. package/lib-commonjs/index.js +11 -31
  52. package/package.json +30 -29
  53. package/src/Stack.tsx +1 -1
  54. package/eslint.config.js +0 -3
@@ -1,20 +1,15 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { act } from 'react';
3
3
  import { Text } from '@fluentui-react-native/text';
4
4
  import * as renderer from 'react-test-renderer';
5
5
  import { Stack } from '..';
6
6
  it('Stack with tokens', () => {
7
- let component;
8
- act(() => {
9
- component = renderer.create(
10
- _jsxs(Stack, {
11
- maxWidth: 400,
12
- gap: 8,
13
- padding: 16,
14
- children: [_jsx(Text, { children: 'Hello' }), _jsx(Text, { children: 'Hello' }), _jsx(Text, { children: 'Hello' })],
15
- }),
16
- );
17
- });
18
- expect(component.toJSON()).toMatchSnapshot();
7
+ let component;
8
+ act(() => {
9
+ component = renderer.create(_jsxs(Stack, { maxWidth: 400, gap: 8, padding: 16, children: [
10
+ _jsx(Text, { children: "Hello" }), _jsx(Text, { children: "Hello" }), _jsx(Text, { children: "Hello" })
11
+ ] }));
12
+ });
13
+ expect(component.toJSON()).toMatchSnapshot();
19
14
  });
20
- //# sourceMappingURL=Stack.test.js.map
15
+ //# sourceMappingURL=Stack.test.js.map
package/lib/index.d.ts CHANGED
@@ -4,4 +4,4 @@ export { StackItem } from './StackItem/StackItem';
4
4
  export { stackName } from './Stack.types';
5
5
  export type { Alignment, IStackProps, IStackRenderData, IStackSlotProps, IStackStatics, IStackTokens, IStackType } from './Stack.types';
6
6
  export { Stack } from './Stack';
7
- //# sourceMappingURL=index.d.ts.map
7
+ //# sourceMappingURL=index.d.ts.map
package/lib/index.js CHANGED
@@ -2,4 +2,4 @@ export { stackItemName } from './StackItem/StackItem.types';
2
2
  export { StackItem } from './StackItem/StackItem';
3
3
  export { stackName } from './Stack.types';
4
4
  export { Stack } from './Stack';
5
- //# sourceMappingURL=index.js.map
5
+ //# sourceMappingURL=index.js.map
@@ -1,21 +1,15 @@
1
1
  import type { IStackProps, IStackSlotProps } from './Stack.types';
2
2
  declare global {
3
- namespace NodeJS {
4
- interface Global {
5
- __jsiExecutorDescription: any;
3
+ namespace NodeJS {
4
+ interface Global {
5
+ __jsiExecutorDescription: any;
6
+ }
6
7
  }
7
- }
8
8
  }
9
- export declare const Stack: import('@uifabricshared/foundation-compose').IComposeReturnType<
10
- IStackProps,
11
- IStackSlotProps,
12
- import('./Stack.types').IStackTokens,
13
- {
9
+ export declare const Stack: import("@uifabricshared/foundation-compose").IComposeReturnType<IStackProps, IStackSlotProps, import("./Stack.types").IStackTokens, {
14
10
  gap: number;
15
11
  horizontal: boolean;
16
12
  wrap: boolean;
17
- },
18
- import('./Stack.types').IStackStatics
19
- >;
13
+ }, import("./Stack.types").IStackStatics>;
20
14
  export default Stack;
21
- //# sourceMappingURL=Stack.d.ts.map
15
+ //# sourceMappingURL=Stack.d.ts.map
@@ -1,122 +1,103 @@
1
- 'use strict';
2
- var __createBinding =
3
- (this && this.__createBinding) ||
4
- (Object.create
5
- ? function (o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = {
10
- enumerable: true,
11
- get: function () {
12
- return m[k];
13
- },
14
- };
15
- }
16
- Object.defineProperty(o, k2, desc);
17
- }
18
- : function (o, m, k, k2) {
19
- if (k2 === undefined) k2 = k;
20
- o[k2] = m[k];
21
- });
22
- var __setModuleDefault =
23
- (this && this.__setModuleDefault) ||
24
- (Object.create
25
- ? function (o, v) {
26
- Object.defineProperty(o, 'default', { enumerable: true, value: v });
27
- }
28
- : function (o, v) {
29
- o['default'] = v;
30
- });
31
- var __importStar =
32
- (this && this.__importStar) ||
33
- (function () {
34
- var ownKeys = function (o) {
35
- ownKeys =
36
- Object.getOwnPropertyNames ||
37
- function (o) {
38
- var ar = [];
39
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
40
- return ar;
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;
41
24
  };
42
- return ownKeys(o);
25
+ return ownKeys(o);
43
26
  };
44
27
  return function (mod) {
45
- if (mod && mod.__esModule) return mod;
46
- var result = {};
47
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== 'default') __createBinding(result, mod, k[i]);
48
- __setModuleDefault(result, mod);
49
- return result;
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;
50
33
  };
51
- })();
52
- var __importDefault =
53
- (this && this.__importDefault) ||
54
- function (mod) {
55
- return mod && mod.__esModule ? mod : { default: mod };
56
- };
57
- Object.defineProperty(exports, '__esModule', { value: true });
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 });
58
39
  exports.Stack = void 0;
59
- const jsx_runtime_1 = require('@fluentui-react-native/framework-base/jsx-runtime');
40
+ const jsx_runtime_1 = require("@fluentui-react-native/framework-base/jsx-runtime");
60
41
  /** @jsxImportSource @fluentui-react-native/framework-base */
61
- const React = __importStar(require('react'));
62
- const react_native_1 = require('react-native');
63
- const adapters_1 = require('@fluentui-react-native/adapters');
64
- const tokens_1 = require('@fluentui-react-native/tokens');
65
- const foundation_compose_1 = require('@uifabricshared/foundation-compose');
66
- const foundation_settings_1 = require('@uifabricshared/foundation-settings');
67
- const Stack_settings_1 = require('./Stack.settings');
68
- const Stack_tokens_1 = require('./Stack.tokens');
69
- const Stack_types_1 = require('./Stack.types');
70
- const StackItem_1 = __importDefault(require('./StackItem/StackItem'));
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"));
71
52
  function _mixinStyle(style, mixin) {
72
- return style ? [style, mixin] : mixin;
53
+ return style ? [style, mixin] : mixin;
73
54
  }
74
55
  const _styleKey = 'style';
75
56
  const render = (Slots, renderData, ...children) => {
76
- const { gap, horizontal, wrap } = renderData.state;
77
- if (gap && gap > 0 && children && globalThis.__jsiExecutorDescription !== 'ChakraRuntime') {
78
- const extraStyle = horizontal ? { marginLeft: gap } : { marginTop: gap };
79
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
80
- // @ts-ignore - TODO, fix typing error
81
- children = React.Children.map(children, (child, index) => {
82
- if (React.isValidElement(child) && index > 0) {
83
- const childProps = child.props;
84
- const extraProps = { style: _mixinStyle(childProps[_styleKey], extraStyle) };
85
- return React.cloneElement(child, {
86
- ...childProps,
87
- ...extraProps,
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;
88
72
  });
89
- }
90
- return child;
91
- });
92
- }
93
- if (wrap) {
94
- return jsx_runtime_1.jsx(Slots.root, { children: jsx_runtime_1.jsx(Slots.inner, { children: children }) });
95
- }
96
- return jsx_runtime_1.jsx(Slots.root, { children: children });
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 });
97
78
  };
98
79
  exports.Stack = (0, foundation_compose_1.compose)({
99
- displayName: Stack_types_1.stackName,
100
- settings: Stack_settings_1.settings,
101
- statics: {
102
- Item: StackItem_1.default,
103
- },
104
- usePrepareProps: (props, useStyling) => {
105
- const { gap, horizontal, wrap, ...rest } = props;
106
- return {
107
- slotProps: (0, foundation_settings_1.mergeSettings)(useStyling(props), { root: rest }),
108
- state: { gap, horizontal, wrap },
109
- };
110
- },
111
- render: render,
112
- slots: {
113
- root: { slotType: react_native_1.View, filter: adapters_1.filterViewProps },
114
- inner: { slotType: react_native_1.View, filter: adapters_1.filterViewProps },
115
- },
116
- styles: {
117
- root: [Stack_tokens_1.buildStackRootStyles, tokens_1.backgroundColorTokens, tokens_1.borderTokens],
118
- inner: [Stack_tokens_1.buildStackInnerStyles],
119
- },
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
+ },
120
101
  });
121
102
  exports.default = exports.Stack;
122
- //# sourceMappingURL=Stack.js.map
103
+ //# sourceMappingURL=Stack.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"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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,4 +1,4 @@
1
1
  import type { IComposeSettings } from '@uifabricshared/foundation-compose';
2
2
  import type { IStackType } from './Stack.types';
3
3
  export declare const settings: IComposeSettings<IStackType>;
4
- //# sourceMappingURL=Stack.settings.d.ts.map
4
+ //# sourceMappingURL=Stack.settings.d.ts.map
@@ -1,63 +1,63 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.settings = void 0;
4
- const Stack_types_1 = require('./Stack.types');
4
+ const Stack_types_1 = require("./Stack.types");
5
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: {
6
+ {
21
7
  root: {
22
- style: {
23
- flexDirection: 'row',
24
- },
25
- },
26
- _overrides: {
27
- reversed: {
28
- root: {
29
- style: {
30
- flexDirection: 'column-reverse',
31
- },
8
+ style: {
9
+ display: 'flex',
32
10
  },
33
- },
34
11
  },
35
- },
36
- reversed: {
37
- root: {
38
- style: {
39
- flexDirection: 'row-reverse',
40
- },
41
- },
42
- },
43
- verticalFill: {
44
- root: {
45
- style: {
46
- height: '100%',
47
- },
12
+ inner: {
13
+ style: {
14
+ display: 'flex',
15
+ flexWrap: 'wrap',
16
+ overflow: 'visible',
17
+ },
48
18
  },
49
- },
50
- wrap: {
51
- root: {
52
- style: {
53
- flexWrap: 'wrap',
54
- height: '100%',
55
- overflow: 'visible',
56
- },
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
+ },
57
59
  },
58
- },
59
60
  },
60
- },
61
- Stack_types_1.stackName,
61
+ Stack_types_1.stackName,
62
62
  ];
63
- //# sourceMappingURL=Stack.settings.js.map
63
+ //# sourceMappingURL=Stack.settings.js.map
@@ -1,6 +1,6 @@
1
1
  import type { ViewProps } from 'react-native';
2
2
  import type { Theme } from '@fluentui-react-native/framework';
3
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
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,90 +1,91 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildStackRootStyles = exports.buildStackInnerStyles = void 0;
4
- const foundation_tokens_1 = require('@uifabricshared/foundation-tokens');
5
- const StackUtils_1 = require('./StackUtils');
4
+ const foundation_tokens_1 = require("@uifabricshared/foundation-tokens");
5
+ const StackUtils_1 = require("./StackUtils");
6
6
  const nameMap = {
7
- start: 'flex-start',
8
- end: 'flex-end',
7
+ start: 'flex-start',
8
+ end: 'flex-end',
9
9
  };
10
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
- }
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
19
  }
20
20
  const _innerKeyProps = [
21
- 'horizontal',
22
- // 'reversed',
23
- 'gap',
24
- 'horizontalAlign',
25
- 'verticalAlign',
26
- // 'disableShrink',
27
- 'childrenGap',
28
- 'padding',
21
+ 'horizontal',
22
+ // 'reversed',
23
+ 'gap',
24
+ 'horizontalAlign',
25
+ 'verticalAlign',
26
+ // 'disableShrink',
27
+ 'childrenGap',
28
+ 'padding',
29
29
  ];
30
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
- } else {
46
- innerStyle.maxHeight = '100%';
47
- innerStyle.height = '100%';
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
+ }
48
50
  }
49
- }
50
- return { style: innerStyle };
51
+ return { style: innerStyle };
51
52
  }
52
53
  exports.buildStackInnerStyles = (0, foundation_tokens_1.styleFunction)(_buildInnerStyles, _innerKeyProps);
53
54
  function _buildRootStyles(tokenProps, theme) {
54
- const { grow, horizontal, horizontalAlign, verticalAlign, maxHeight, maxWidth, padding, wrap } = tokenProps;
55
- // const childrenGap = tokenProps.childrenGap || tokenProps.gap;
56
- // const { rowGap, columnGap } = parseGap(childrenGap, theme);
57
- const rootStyle = {
58
- maxHeight,
59
- maxWidth,
60
- };
61
- _mapAlignment(!!horizontal, horizontalAlign, verticalAlign, rootStyle);
62
- if (grow && !wrap) {
63
- rootStyle.flexGrow = typeof grow === 'boolean' ? (grow ? 1 : 0) : grow;
64
- rootStyle.overflow = 'hidden';
65
- }
66
- if (!wrap) {
67
- rootStyle.padding = (0, StackUtils_1.parsePadding)(padding, theme);
68
- }
69
- return { style: rootStyle };
70
- // verticalFill,
71
- // reversed,
72
- // disableShrink,
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,
73
74
  }
74
75
  const _keyProps = [
75
- // 'verticalFill',
76
- 'horizontal',
77
- // 'reversed',
78
- // 'gap',
79
- 'grow',
80
- 'wrap',
81
- 'horizontalAlign',
82
- 'verticalAlign',
83
- // 'disableShrink',
84
- // 'childrenGap',
85
- 'maxHeight',
86
- 'maxWidth',
87
- 'padding',
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',
88
89
  ];
89
90
  exports.buildStackRootStyles = (0, foundation_tokens_1.styleFunction)(_buildRootStyles, _keyProps);
90
- //# sourceMappingURL=Stack.tokens.js.map
91
+ //# sourceMappingURL=Stack.tokens.js.map