@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # Change Log - @fluentui-react-native/stack
2
2
 
3
+ ## 0.11.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 9cf4444: Migrate from ESLint to oxlint
8
+ - Updated dependencies [9cf4444]
9
+ - @uifabricshared/foundation-composable@0.14.3
10
+ - @uifabricshared/foundation-settings@0.16.3
11
+ - @uifabricshared/foundation-compose@1.16.3
12
+ - @uifabricshared/foundation-tokens@0.16.3
13
+ - @fluentui-react-native/framework@0.15.3
14
+ - @fluentui-react-native/adapters@0.14.3
15
+ - @fluentui-react-native/tokens@0.24.3
16
+
17
+ ## 0.11.2
18
+
19
+ ### Patch Changes
20
+
21
+ - 8a7b549: Update to the latest rnx-kit versions, fix some typing issues, and correct the vscode settings
22
+ - Updated dependencies [8a7b549]
23
+ - @uifabricshared/foundation-composable@0.14.2
24
+ - @uifabricshared/foundation-settings@0.16.2
25
+ - @uifabricshared/foundation-compose@1.16.2
26
+ - @uifabricshared/foundation-tokens@0.16.2
27
+ - @fluentui-react-native/framework@0.15.2
28
+ - @fluentui-react-native/adapters@0.14.2
29
+ - @fluentui-react-native/tokens@0.24.2
30
+
31
+ ## 0.11.1
32
+
33
+ ### Patch Changes
34
+
35
+ - 0d6e9c1: chore: migrate to `oxfmt`
36
+ - ac6e7af: Ensure packages have a default export that references the typescript entrypoint and clean up build dependency ordering
37
+ - Updated dependencies [0d6e9c1]
38
+ - Updated dependencies [ac6e7af]
39
+ - @uifabricshared/foundation-composable@0.14.1
40
+ - @uifabricshared/foundation-settings@0.16.1
41
+ - @uifabricshared/foundation-compose@1.16.1
42
+ - @uifabricshared/foundation-tokens@0.16.1
43
+ - @fluentui-react-native/framework@0.15.1
44
+ - @fluentui-react-native/adapters@0.14.1
45
+ - @fluentui-react-native/tokens@0.24.1
46
+
3
47
  ## 0.11.0
4
48
 
5
49
  ### Minor Changes
package/lib/Stack.d.ts CHANGED
@@ -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
package/lib/Stack.js CHANGED
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from '@fluentui-react-native/framework-base/jsx-runtime';
1
+ import { jsx as _jsx } from "@fluentui-react-native/framework-base/jsx-runtime";
2
2
  /** @jsxImportSource @fluentui-react-native/framework-base */
3
3
  import * as React from 'react';
4
4
  import { View } from 'react-native';
@@ -11,54 +11,54 @@ import { buildStackRootStyles, buildStackInnerStyles } from './Stack.tokens';
11
11
  import { stackName } from './Stack.types';
12
12
  import StackItem from './StackItem/StackItem';
13
13
  function _mixinStyle(style, mixin) {
14
- return style ? [style, mixin] : mixin;
14
+ return style ? [style, mixin] : mixin;
15
15
  }
16
16
  const _styleKey = 'style';
17
17
  const render = (Slots, renderData, ...children) => {
18
- const { gap, horizontal, wrap } = renderData.state;
19
- if (gap && gap > 0 && children && globalThis.__jsiExecutorDescription !== 'ChakraRuntime') {
20
- const extraStyle = horizontal ? { marginLeft: gap } : { marginTop: gap };
21
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
22
- // @ts-ignore - TODO, fix typing error
23
- children = React.Children.map(children, (child, index) => {
24
- if (React.isValidElement(child) && index > 0) {
25
- const childProps = child.props;
26
- const extraProps = { style: _mixinStyle(childProps[_styleKey], extraStyle) };
27
- return React.cloneElement(child, {
28
- ...childProps,
29
- ...extraProps,
18
+ const { gap, horizontal, wrap } = renderData.state;
19
+ if (gap && gap > 0 && children && globalThis.__jsiExecutorDescription !== 'ChakraRuntime') {
20
+ const extraStyle = horizontal ? { marginLeft: gap } : { marginTop: gap };
21
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
22
+ // @ts-expect-error - TODO, fix typing error
23
+ children = React.Children.map(children, (child, index) => {
24
+ if (React.isValidElement(child) && index > 0) {
25
+ const childProps = child.props;
26
+ const extraProps = { style: _mixinStyle(childProps[_styleKey], extraStyle) };
27
+ return React.cloneElement(child, {
28
+ ...childProps,
29
+ ...extraProps,
30
+ });
31
+ }
32
+ return child;
30
33
  });
31
- }
32
- return child;
33
- });
34
- }
35
- if (wrap) {
36
- return _jsx(Slots.root, { children: _jsx(Slots.inner, { children: children }) });
37
- }
38
- return _jsx(Slots.root, { children: children });
34
+ }
35
+ if (wrap) {
36
+ return (_jsx(Slots.root, { children: _jsx(Slots.inner, { children: children }) }));
37
+ }
38
+ return _jsx(Slots.root, { children: children });
39
39
  };
40
40
  export const Stack = compose({
41
- displayName: stackName,
42
- settings,
43
- statics: {
44
- Item: StackItem,
45
- },
46
- usePrepareProps: (props, useStyling) => {
47
- const { gap, horizontal, wrap, ...rest } = props;
48
- return {
49
- slotProps: mergeSettings(useStyling(props), { root: rest }),
50
- state: { gap, horizontal, wrap },
51
- };
52
- },
53
- render: render,
54
- slots: {
55
- root: { slotType: View, filter: filterViewProps },
56
- inner: { slotType: View, filter: filterViewProps },
57
- },
58
- styles: {
59
- root: [buildStackRootStyles, backgroundColorTokens, borderTokens],
60
- inner: [buildStackInnerStyles],
61
- },
41
+ displayName: stackName,
42
+ settings,
43
+ statics: {
44
+ Item: StackItem,
45
+ },
46
+ usePrepareProps: (props, useStyling) => {
47
+ const { gap, horizontal, wrap, ...rest } = props;
48
+ return {
49
+ slotProps: mergeSettings(useStyling(props), { root: rest }),
50
+ state: { gap, horizontal, wrap },
51
+ };
52
+ },
53
+ render: render,
54
+ slots: {
55
+ root: { slotType: View, filter: filterViewProps },
56
+ inner: { slotType: View, filter: filterViewProps },
57
+ },
58
+ styles: {
59
+ root: [buildStackRootStyles, backgroundColorTokens, borderTokens],
60
+ inner: [buildStackInnerStyles],
61
+ },
62
62
  });
63
63
  export default Stack;
64
- //# sourceMappingURL=Stack.js.map
64
+ //# sourceMappingURL=Stack.js.map
package/lib/Stack.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Stack.js","sourceRoot":"","sources":["../src/Stack.tsx"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAE,eAAe,EAAE,MAAM,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AAO;YACL,SAAS,EAAE,aAAa,CAA0B,UAAU,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,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,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"}
@@ -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,60 +1,60 @@
1
1
  import { stackName } from './Stack.types';
2
2
  export const 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: {
3
+ {
18
4
  root: {
19
- style: {
20
- flexDirection: 'row',
21
- },
22
- },
23
- _overrides: {
24
- reversed: {
25
- root: {
26
- style: {
27
- flexDirection: 'column-reverse',
28
- },
5
+ style: {
6
+ display: 'flex',
29
7
  },
30
- },
31
8
  },
32
- },
33
- reversed: {
34
- root: {
35
- style: {
36
- flexDirection: 'row-reverse',
37
- },
38
- },
39
- },
40
- verticalFill: {
41
- root: {
42
- style: {
43
- height: '100%',
44
- },
9
+ inner: {
10
+ style: {
11
+ display: 'flex',
12
+ flexWrap: 'wrap',
13
+ overflow: 'visible',
14
+ },
45
15
  },
46
- },
47
- wrap: {
48
- root: {
49
- style: {
50
- flexWrap: 'wrap',
51
- height: '100%',
52
- overflow: 'visible',
53
- },
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
+ },
54
56
  },
55
- },
56
57
  },
57
- },
58
- stackName,
58
+ stackName,
59
59
  ];
60
- //# sourceMappingURL=Stack.settings.js.map
60
+ //# 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,87 +1,88 @@
1
1
  import { styleFunction } from '@uifabricshared/foundation-tokens';
2
2
  import { parseGap, parsePadding } from './StackUtils';
3
3
  const nameMap = {
4
- start: 'flex-start',
5
- end: 'flex-end',
4
+ start: 'flex-start',
5
+ end: 'flex-end',
6
6
  };
7
7
  function _mapAlignment(horizontal, horizontalAlign, verticalAlign, style) {
8
- const alignValue = horizontal ? verticalAlign : horizontalAlign;
9
- if (alignValue) {
10
- style.alignItems = nameMap[alignValue] || alignValue;
11
- }
12
- const justifyValue = horizontal ? horizontalAlign : verticalAlign;
13
- if (justifyValue) {
14
- style.justifyContent = nameMap[justifyValue] || justifyValue;
15
- }
8
+ const alignValue = horizontal ? verticalAlign : horizontalAlign;
9
+ if (alignValue) {
10
+ style.alignItems = (nameMap[alignValue] || alignValue);
11
+ }
12
+ const justifyValue = horizontal ? horizontalAlign : verticalAlign;
13
+ if (justifyValue) {
14
+ style.justifyContent = (nameMap[justifyValue] || justifyValue);
15
+ }
16
16
  }
17
17
  const _innerKeyProps = [
18
- 'horizontal',
19
- // 'reversed',
20
- 'gap',
21
- 'horizontalAlign',
22
- 'verticalAlign',
23
- // 'disableShrink',
24
- 'childrenGap',
25
- 'padding',
18
+ 'horizontal',
19
+ // 'reversed',
20
+ 'gap',
21
+ 'horizontalAlign',
22
+ 'verticalAlign',
23
+ // 'disableShrink',
24
+ 'childrenGap',
25
+ 'padding',
26
26
  ];
27
27
  function _buildInnerStyles(tokenProps, theme) {
28
- const { horizontal, wrap, horizontalAlign, verticalAlign, padding } = tokenProps;
29
- let innerStyle = undefined;
30
- const childrenGap = tokenProps.childrenGap || tokenProps.gap;
31
- const { rowGap, columnGap } = parseGap(childrenGap, theme);
32
- if (wrap) {
33
- innerStyle = {
34
- rowGap: rowGap,
35
- columnGap: columnGap,
36
- padding: parsePadding(padding, theme),
37
- width: '100%',
38
- };
39
- _mapAlignment(!!horizontal, horizontalAlign, verticalAlign, innerStyle);
40
- if (horizontal) {
41
- innerStyle.height = '100%';
42
- } else {
43
- innerStyle.maxHeight = '100%';
44
- innerStyle.height = '100%';
28
+ const { horizontal, wrap, horizontalAlign, verticalAlign, padding } = tokenProps;
29
+ let innerStyle = undefined;
30
+ const childrenGap = tokenProps.childrenGap || tokenProps.gap;
31
+ const { rowGap, columnGap } = parseGap(childrenGap, theme);
32
+ if (wrap) {
33
+ innerStyle = {
34
+ rowGap: rowGap,
35
+ columnGap: columnGap,
36
+ padding: parsePadding(padding, theme),
37
+ width: '100%',
38
+ };
39
+ _mapAlignment(!!horizontal, horizontalAlign, verticalAlign, innerStyle);
40
+ if (horizontal) {
41
+ innerStyle.height = '100%';
42
+ }
43
+ else {
44
+ innerStyle.maxHeight = '100%';
45
+ innerStyle.height = '100%';
46
+ }
45
47
  }
46
- }
47
- return { style: innerStyle };
48
+ return { style: innerStyle };
48
49
  }
49
50
  export const buildStackInnerStyles = styleFunction(_buildInnerStyles, _innerKeyProps);
50
51
  function _buildRootStyles(tokenProps, theme) {
51
- const { grow, horizontal, horizontalAlign, verticalAlign, maxHeight, maxWidth, padding, wrap } = tokenProps;
52
- // const childrenGap = tokenProps.childrenGap || tokenProps.gap;
53
- // const { rowGap, columnGap } = parseGap(childrenGap, theme);
54
- const rootStyle = {
55
- maxHeight,
56
- maxWidth,
57
- };
58
- _mapAlignment(!!horizontal, horizontalAlign, verticalAlign, rootStyle);
59
- if (grow && !wrap) {
60
- rootStyle.flexGrow = typeof grow === 'boolean' ? (grow ? 1 : 0) : grow;
61
- rootStyle.overflow = 'hidden';
62
- }
63
- if (!wrap) {
64
- rootStyle.padding = parsePadding(padding, theme);
65
- }
66
- return { style: rootStyle };
67
- // verticalFill,
68
- // reversed,
69
- // disableShrink,
52
+ const { grow, horizontal, horizontalAlign, verticalAlign, maxHeight, maxWidth, padding, wrap } = tokenProps;
53
+ // const childrenGap = tokenProps.childrenGap || tokenProps.gap;
54
+ // const { rowGap, columnGap } = parseGap(childrenGap, theme);
55
+ const rootStyle = {
56
+ maxHeight,
57
+ maxWidth,
58
+ };
59
+ _mapAlignment(!!horizontal, horizontalAlign, verticalAlign, rootStyle);
60
+ if (grow && !wrap) {
61
+ rootStyle.flexGrow = typeof grow === 'boolean' ? (grow ? 1 : 0) : grow;
62
+ rootStyle.overflow = 'hidden';
63
+ }
64
+ if (!wrap) {
65
+ rootStyle.padding = parsePadding(padding, theme);
66
+ }
67
+ return { style: rootStyle };
68
+ // verticalFill,
69
+ // reversed,
70
+ // disableShrink,
70
71
  }
71
72
  const _keyProps = [
72
- // 'verticalFill',
73
- 'horizontal',
74
- // 'reversed',
75
- // 'gap',
76
- 'grow',
77
- 'wrap',
78
- 'horizontalAlign',
79
- 'verticalAlign',
80
- // 'disableShrink',
81
- // 'childrenGap',
82
- 'maxHeight',
83
- 'maxWidth',
84
- 'padding',
73
+ // 'verticalFill',
74
+ 'horizontal',
75
+ // 'reversed',
76
+ // 'gap',
77
+ 'grow',
78
+ 'wrap',
79
+ 'horizontalAlign',
80
+ 'verticalAlign',
81
+ // 'disableShrink',
82
+ // 'childrenGap',
83
+ 'maxHeight',
84
+ 'maxWidth',
85
+ 'padding',
85
86
  ];
86
87
  export const buildStackRootStyles = styleFunction(_buildRootStyles, _keyProps);
87
- //# sourceMappingURL=Stack.tokens.js.map
88
+ //# sourceMappingURL=Stack.tokens.js.map