@fluentui-react-native/separator 0.19.0 → 0.19.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 (37) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/lib/Separator.d.ts +2 -7
  3. package/lib/Separator.js +9 -9
  4. package/lib/Separator.styling.d.ts +1 -1
  5. package/lib/Separator.styling.js +14 -17
  6. package/lib/Separator.types.d.ts +31 -30
  7. package/lib/Separator.types.js +1 -1
  8. package/lib/SeparatorTokens.android.d.ts +1 -1
  9. package/lib/SeparatorTokens.android.js +4 -4
  10. package/lib/SeparatorTokens.android.js.map +1 -1
  11. package/lib/SeparatorTokens.d.ts +1 -1
  12. package/lib/SeparatorTokens.js +2 -2
  13. package/lib/SeparatorTokens.js.map +1 -1
  14. package/lib/__tests__/Separator.test.d.ts +1 -1
  15. package/lib/__tests__/Separator.test.js +13 -13
  16. package/lib/index.d.ts +1 -1
  17. package/lib/index.js +1 -1
  18. package/lib-commonjs/Separator.d.ts +2 -7
  19. package/lib-commonjs/Separator.js +15 -15
  20. package/lib-commonjs/Separator.styling.d.ts +1 -1
  21. package/lib-commonjs/Separator.styling.js +20 -23
  22. package/lib-commonjs/Separator.types.d.ts +31 -30
  23. package/lib-commonjs/Separator.types.js +3 -3
  24. package/lib-commonjs/SeparatorTokens.android.d.ts +1 -1
  25. package/lib-commonjs/SeparatorTokens.android.js +7 -7
  26. package/lib-commonjs/SeparatorTokens.android.js.map +1 -1
  27. package/lib-commonjs/SeparatorTokens.d.ts +1 -1
  28. package/lib-commonjs/SeparatorTokens.js +5 -5
  29. package/lib-commonjs/SeparatorTokens.js.map +1 -1
  30. package/lib-commonjs/__tests__/Separator.test.d.ts +1 -1
  31. package/lib-commonjs/__tests__/Separator.test.js +47 -64
  32. package/lib-commonjs/index.d.ts +1 -1
  33. package/lib-commonjs/index.js +7 -17
  34. package/package.json +25 -24
  35. package/src/SeparatorTokens.android.tsx +1 -1
  36. package/src/SeparatorTokens.tsx +1 -1
  37. package/eslint.config.js +0 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # Change Log - @fluentui-react-native/separator
2
2
 
3
+ ## 0.19.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 9cf4444: Migrate from ESLint to oxlint
8
+ - Updated dependencies [9cf4444]
9
+ - @fluentui-react-native/use-styling@0.14.3
10
+ - @fluentui-react-native/theme-tokens@0.28.3
11
+ - @fluentui-react-native/framework@0.15.3
12
+
13
+ ## 0.19.2
14
+
15
+ ### Patch Changes
16
+
17
+ - 8a7b549: Update to the latest rnx-kit versions, fix some typing issues, and correct the vscode settings
18
+ - Updated dependencies [8a7b549]
19
+ - @fluentui-react-native/use-styling@0.14.2
20
+ - @fluentui-react-native/theme-tokens@0.28.2
21
+ - @fluentui-react-native/framework@0.15.2
22
+
23
+ ## 0.19.1
24
+
25
+ ### Patch Changes
26
+
27
+ - 0d6e9c1: chore: migrate to `oxfmt`
28
+ - ac6e7af: Ensure packages have a default export that references the typescript entrypoint and clean up build dependency ordering
29
+ - Updated dependencies [0d6e9c1]
30
+ - Updated dependencies [ac6e7af]
31
+ - @fluentui-react-native/use-styling@0.14.1
32
+ - @fluentui-react-native/theme-tokens@0.28.1
33
+ - @fluentui-react-native/framework@0.15.1
34
+
3
35
  ## 0.19.0
4
36
 
5
37
  ### Minor Changes
@@ -1,9 +1,4 @@
1
1
  import type { SeparatorProps } from './Separator.types';
2
- export declare const Separator: import('@fluentui-react-native/framework').ComposableComponent<
3
- SeparatorProps,
4
- import('./Separator.types').SeperatorSlotProps,
5
- import('./Separator.types').SeparatorTokens,
6
- import('@fluentui-react-native/framework-base').ObjectBase
7
- >;
2
+ export declare const Separator: import("@fluentui-react-native/framework").ComposableComponent<SeparatorProps, import("./Separator.types").SeperatorSlotProps, import("./Separator.types").SeparatorTokens, import("@fluentui-react-native/framework-base").ObjectBase>;
8
3
  export default Separator;
9
- //# sourceMappingURL=Separator.d.ts.map
4
+ //# sourceMappingURL=Separator.d.ts.map
package/lib/Separator.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 { View } from 'react-native';
4
4
  import { compose, mergeProps } from '@fluentui-react-native/framework';
@@ -6,13 +6,13 @@ import { stylingSettings } from './Separator.styling';
6
6
  import { separatorName } from './Separator.types';
7
7
  const propMask = { vertical: undefined };
8
8
  export const Separator = compose({
9
- displayName: separatorName,
10
- ...stylingSettings,
11
- slots: { root: View },
12
- useRender: (props, useSlots) => {
13
- const Root = useSlots(props).root;
14
- return (rest, children) => _jsx(Root, { ...mergeProps(props, rest, propMask), children: children });
15
- },
9
+ displayName: separatorName,
10
+ ...stylingSettings,
11
+ slots: { root: View },
12
+ useRender: (props, useSlots) => {
13
+ const Root = useSlots(props).root;
14
+ return (rest, children) => _jsx(Root, { ...mergeProps(props, rest, propMask), children: children });
15
+ },
16
16
  });
17
17
  export default Separator;
18
- //# sourceMappingURL=Separator.js.map
18
+ //# sourceMappingURL=Separator.js.map
@@ -1,4 +1,4 @@
1
1
  import type { UseStylingOptions } from '@fluentui-react-native/framework';
2
2
  import type { SeparatorProps, SeparatorTokens, SeperatorSlotProps } from './Separator.types';
3
3
  export declare const stylingSettings: UseStylingOptions<SeparatorProps, SeperatorSlotProps, SeparatorTokens>;
4
- //# sourceMappingURL=Separator.styling.d.ts.map
4
+ //# sourceMappingURL=Separator.styling.d.ts.map
@@ -5,21 +5,18 @@ import { defaultSeparatorTokens } from './SeparatorTokens';
5
5
  const isMobile = Platform.OS === 'android' || Platform.OS === 'ios';
6
6
  const tokensThatAreAlsoProps = ['vertical', 'insetSpacing'];
7
7
  export const stylingSettings = {
8
- tokens: [defaultSeparatorTokens, separatorName],
9
- tokensThatAreAlsoProps,
10
- slotProps: {
11
- root: buildProps(
12
- (tokens) => {
13
- return {
14
- style: {
15
- ...(tokens.vertical ? { borderLeftWidth: tokens.separatorWidth } : { borderTopWidth: tokens.separatorWidth }),
16
- ...(tokens.color && { borderColor: tokens.color }),
17
- ...(isMobile && { marginStart: tokens.insetSpacing }),
18
- },
19
- };
20
- },
21
- ['color', 'vertical', 'separatorWidth', 'insetSpacing'],
22
- ),
23
- },
8
+ tokens: [defaultSeparatorTokens, separatorName],
9
+ tokensThatAreAlsoProps,
10
+ slotProps: {
11
+ root: buildProps((tokens) => {
12
+ return {
13
+ style: {
14
+ ...(tokens.vertical ? { borderLeftWidth: tokens.separatorWidth } : { borderTopWidth: tokens.separatorWidth }),
15
+ ...(tokens.color && { borderColor: tokens.color }),
16
+ ...(isMobile && { marginStart: tokens.insetSpacing }),
17
+ },
18
+ };
19
+ }, ['color', 'vertical', 'separatorWidth', 'insetSpacing']),
20
+ },
24
21
  };
25
- //# sourceMappingURL=Separator.styling.js.map
22
+ //# sourceMappingURL=Separator.styling.js.map
@@ -1,41 +1,42 @@
1
1
  import type { ViewProps, ColorValue } from 'react-native';
2
- export declare const separatorName = 'Separator';
2
+ export declare const separatorName = "Separator";
3
3
  export declare const SeparatorInsetSpacings: readonly [0, 16, 56, 68, 72, 108];
4
4
  export type SeparatorInsetSpacing = (typeof SeparatorInsetSpacings)[number];
5
5
  export interface SeparatorPropTokens {
6
- /**
7
- * Specifies whether the separator is vertical or horizontal. If true, then it's vertical.
8
- * @defaultValue 'false'
9
- */
10
- vertical?: boolean;
11
- /**
12
- * Inset Spacing in 'dp' (density-independent pixels) on Android and 'points' on iOS.
13
- *
14
- * Inset Spacing is restricted to a limited set of supported values recommended for most uses (see `SeparatorInsetSpacing`) and
15
- * based on design guidelines for the Separator control.
16
- * @platform Android iOS
17
- * @defaultvalue 0
18
- */
19
- insetSpacing?: SeparatorInsetSpacing;
6
+ /**
7
+ * Specifies whether the separator is vertical or horizontal. If true, then it's vertical.
8
+ * @defaultValue 'false'
9
+ */
10
+ vertical?: boolean;
11
+ /**
12
+ * Inset Spacing in 'dp' (density-independent pixels) on Android and 'points' on iOS.
13
+ *
14
+ * Inset Spacing is restricted to a limited set of supported values recommended for most uses (see `SeparatorInsetSpacing`) and
15
+ * based on design guidelines for the Separator control.
16
+ * @platform Android iOS
17
+ * @defaultvalue 0
18
+ */
19
+ insetSpacing?: SeparatorInsetSpacing;
20
20
  }
21
21
  export interface SeparatorTokens extends SeparatorPropTokens {
22
- /**
23
- * Specifies the width of the separator. This will be interpreted as DIPs on Windows and Android, but as points on Mac and iOS.
24
- * @defaultValue 1
25
- */
26
- separatorWidth?: number;
27
- /**
28
- * Specifies the color of the separator
29
- */
30
- color?: ColorValue;
22
+ /**
23
+ * Specifies the width of the separator. This will be interpreted as DIPs on Windows and Android, but as points on Mac and iOS.
24
+ * @defaultValue 1
25
+ */
26
+ separatorWidth?: number;
27
+ /**
28
+ * Specifies the color of the separator
29
+ */
30
+ color?: ColorValue;
31
+ }
32
+ export interface SeparatorProps extends ViewProps, SeparatorPropTokens {
31
33
  }
32
- export interface SeparatorProps extends ViewProps, SeparatorPropTokens {}
33
34
  export interface SeperatorSlotProps {
34
- root: ViewProps;
35
+ root: ViewProps;
35
36
  }
36
37
  export interface SeparatorType {
37
- props: SeparatorProps;
38
- slotProps: SeperatorSlotProps;
39
- tokens: SeparatorTokens;
38
+ props: SeparatorProps;
39
+ slotProps: SeperatorSlotProps;
40
+ tokens: SeparatorTokens;
40
41
  }
41
- //# sourceMappingURL=Separator.types.d.ts.map
42
+ //# sourceMappingURL=Separator.types.d.ts.map
@@ -1,3 +1,3 @@
1
1
  export const separatorName = 'Separator';
2
2
  export const SeparatorInsetSpacings = [0, 16, 56, 68, 72, 108];
3
- //# sourceMappingURL=Separator.types.js.map
3
+ //# sourceMappingURL=Separator.types.js.map
@@ -2,4 +2,4 @@ import type { Theme } from '@fluentui-react-native/framework';
2
2
  import type { TokenSettings } from '@fluentui-react-native/use-styling';
3
3
  import type { SeparatorTokens } from './Separator.types';
4
4
  export declare const defaultSeparatorTokens: TokenSettings<SeparatorTokens, Theme>;
5
- //# sourceMappingURL=SeparatorTokens.android.d.ts.map
5
+ //# sourceMappingURL=SeparatorTokens.android.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { globalTokens } from '@fluentui-react-native/theme-tokens';
2
2
  export const defaultSeparatorTokens = (t) => ({
3
- color: t.colors.neutralStroke2,
4
- separatorWidth: globalTokens.stroke.width10,
5
- insetSpacing: 0,
3
+ color: t.colors.neutralStroke2,
4
+ separatorWidth: globalTokens.stroke.width10,
5
+ insetSpacing: 0,
6
6
  });
7
- //# sourceMappingURL=SeparatorTokens.android.js.map
7
+ //# sourceMappingURL=SeparatorTokens.android.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SeparatorTokens.android.js","sourceRoot":"","sources":["../src/SeparatorTokens.android.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKnE,MAAM,CAAC,MAAM,sBAAsB,GAA0C,CAAC,CAAQ,EAAE,EAAE,EACvF;IACC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc;IAC9B,cAAc,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO;IAC3C,YAAY,EAAE,CAAC;CACI,CAAA,CAAC"}
1
+ {"version":3,"file":"SeparatorTokens.android.js","sourceRoot":"","sources":["../src/SeparatorTokens.android.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKnE,MAAM,CAAC,MAAM,sBAAsB,GAA0C,CAAC,CAAQ,EAAE,EAAE,CACxF,CAAC;IACC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc;IAC9B,cAAc,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO;IAC3C,YAAY,EAAE,CAAC;CAChB,CAAoB,CAAC"}
@@ -2,4 +2,4 @@ import type { Theme } from '@fluentui-react-native/framework';
2
2
  import type { TokenSettings } from '@fluentui-react-native/use-styling';
3
3
  import type { SeparatorTokens } from './Separator.types';
4
4
  export declare const defaultSeparatorTokens: TokenSettings<SeparatorTokens, Theme>;
5
- //# sourceMappingURL=SeparatorTokens.d.ts.map
5
+ //# sourceMappingURL=SeparatorTokens.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { globalTokens } from '@fluentui-react-native/theme-tokens';
2
2
  export const defaultSeparatorTokens = () => ({
3
- separatorWidth: globalTokens.stroke.width10,
3
+ separatorWidth: globalTokens.stroke.width10,
4
4
  });
5
- //# sourceMappingURL=SeparatorTokens.js.map
5
+ //# sourceMappingURL=SeparatorTokens.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SeparatorTokens.js","sourceRoot":"","sources":["../src/SeparatorTokens.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKnE,MAAM,CAAC,MAAM,sBAAsB,GAA0C,GAAG,EAAE,EAC/E;IACC,cAAc,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO;CACxB,CAAA,CAAC"}
1
+ {"version":3,"file":"SeparatorTokens.js","sourceRoot":"","sources":["../src/SeparatorTokens.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKnE,MAAM,CAAC,MAAM,sBAAsB,GAA0C,GAAG,EAAE,CAChF,CAAC;IACC,cAAc,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO;CAC5C,CAAoB,CAAC"}
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=Separator.test.d.ts.map
2
+ //# sourceMappingURL=Separator.test.d.ts.map
@@ -1,20 +1,20 @@
1
- import { jsx as _jsx } from 'react/jsx-runtime';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { act } from 'react';
3
3
  import * as renderer from 'react-test-renderer';
4
4
  import { Separator } from '..';
5
5
  it('Separator default', () => {
6
- let component;
7
- act(() => {
8
- component = renderer.create(_jsx(Separator, {}));
9
- });
10
- expect(component.toJSON()).toMatchSnapshot();
6
+ let component;
7
+ act(() => {
8
+ component = renderer.create(_jsx(Separator, {}));
9
+ });
10
+ expect(component.toJSON()).toMatchSnapshot();
11
11
  });
12
12
  it('Separator all props & tokens', () => {
13
- const CustomSeparator = Separator.customize({ separatorWidth: 15, color: 'red' });
14
- let component;
15
- act(() => {
16
- component = renderer.create(_jsx(CustomSeparator, { vertical: true }));
17
- });
18
- expect(component.toJSON()).toMatchSnapshot();
13
+ const CustomSeparator = Separator.customize({ separatorWidth: 15, color: 'red' });
14
+ let component;
15
+ act(() => {
16
+ component = renderer.create(_jsx(CustomSeparator, { vertical: true }));
17
+ });
18
+ expect(component.toJSON()).toMatchSnapshot();
19
19
  });
20
- //# sourceMappingURL=Separator.test.js.map
20
+ //# sourceMappingURL=Separator.test.js.map
package/lib/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export type { SeparatorProps, SeparatorTokens, SeparatorType } from './Separator.types';
2
2
  export { separatorName } from './Separator.types';
3
3
  export { Separator } from './Separator';
4
- //# sourceMappingURL=index.d.ts.map
4
+ //# sourceMappingURL=index.d.ts.map
package/lib/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export { separatorName } from './Separator.types';
2
2
  export { Separator } from './Separator';
3
- //# sourceMappingURL=index.js.map
3
+ //# sourceMappingURL=index.js.map
@@ -1,9 +1,4 @@
1
1
  import type { SeparatorProps } from './Separator.types';
2
- export declare const Separator: import('@fluentui-react-native/framework').ComposableComponent<
3
- SeparatorProps,
4
- import('./Separator.types').SeperatorSlotProps,
5
- import('./Separator.types').SeparatorTokens,
6
- import('@fluentui-react-native/framework').ObjectBase
7
- >;
2
+ export declare const Separator: import("@fluentui-react-native/framework").ComposableComponent<SeparatorProps, import("./Separator.types").SeperatorSlotProps, import("./Separator.types").SeparatorTokens, import("@fluentui-react-native/framework").ObjectBase>;
8
3
  export default Separator;
9
- //# sourceMappingURL=Separator.d.ts.map
4
+ //# sourceMappingURL=Separator.d.ts.map
@@ -1,21 +1,21 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Separator = void 0;
4
- const jsx_runtime_1 = require('@fluentui-react-native/framework-base/jsx-runtime');
4
+ const jsx_runtime_1 = require("@fluentui-react-native/framework-base/jsx-runtime");
5
5
  /** @jsxImportSource @fluentui-react-native/framework-base */
6
- const react_native_1 = require('react-native');
7
- const framework_1 = require('@fluentui-react-native/framework');
8
- const Separator_styling_1 = require('./Separator.styling');
9
- const Separator_types_1 = require('./Separator.types');
6
+ const react_native_1 = require("react-native");
7
+ const framework_1 = require("@fluentui-react-native/framework");
8
+ const Separator_styling_1 = require("./Separator.styling");
9
+ const Separator_types_1 = require("./Separator.types");
10
10
  const propMask = { vertical: undefined };
11
11
  exports.Separator = (0, framework_1.compose)({
12
- displayName: Separator_types_1.separatorName,
13
- ...Separator_styling_1.stylingSettings,
14
- slots: { root: react_native_1.View },
15
- useRender: (props, useSlots) => {
16
- const Root = useSlots(props).root;
17
- return (rest, children) => jsx_runtime_1.jsx(Root, { ...(0, framework_1.mergeProps)(props, rest, propMask), children: children });
18
- },
12
+ displayName: Separator_types_1.separatorName,
13
+ ...Separator_styling_1.stylingSettings,
14
+ slots: { root: react_native_1.View },
15
+ useRender: (props, useSlots) => {
16
+ const Root = useSlots(props).root;
17
+ return (rest, children) => jsx_runtime_1.jsx(Root, { ...(0, framework_1.mergeProps)(props, rest, propMask), children: children });
18
+ },
19
19
  });
20
20
  exports.default = exports.Separator;
21
- //# sourceMappingURL=Separator.js.map
21
+ //# sourceMappingURL=Separator.js.map
@@ -1,4 +1,4 @@
1
1
  import type { UseStylingOptions } from '@fluentui-react-native/framework';
2
2
  import type { SeparatorProps, SeparatorTokens, SeperatorSlotProps } from './Separator.types';
3
3
  export declare const stylingSettings: UseStylingOptions<SeparatorProps, SeperatorSlotProps, SeparatorTokens>;
4
- //# sourceMappingURL=Separator.styling.d.ts.map
4
+ //# sourceMappingURL=Separator.styling.d.ts.map
@@ -1,28 +1,25 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.stylingSettings = void 0;
4
- const react_native_1 = require('react-native');
5
- const framework_1 = require('@fluentui-react-native/framework');
6
- const Separator_types_1 = require('./Separator.types');
7
- const SeparatorTokens_1 = require('./SeparatorTokens');
4
+ const react_native_1 = require("react-native");
5
+ const framework_1 = require("@fluentui-react-native/framework");
6
+ const Separator_types_1 = require("./Separator.types");
7
+ const SeparatorTokens_1 = require("./SeparatorTokens");
8
8
  const isMobile = react_native_1.Platform.OS === 'android' || react_native_1.Platform.OS === 'ios';
9
9
  const tokensThatAreAlsoProps = ['vertical', 'insetSpacing'];
10
10
  exports.stylingSettings = {
11
- tokens: [SeparatorTokens_1.defaultSeparatorTokens, Separator_types_1.separatorName],
12
- tokensThatAreAlsoProps,
13
- slotProps: {
14
- root: (0, framework_1.buildProps)(
15
- (tokens) => {
16
- return {
17
- style: {
18
- ...(tokens.vertical ? { borderLeftWidth: tokens.separatorWidth } : { borderTopWidth: tokens.separatorWidth }),
19
- ...(tokens.color && { borderColor: tokens.color }),
20
- ...(isMobile && { marginStart: tokens.insetSpacing }),
21
- },
22
- };
23
- },
24
- ['color', 'vertical', 'separatorWidth', 'insetSpacing'],
25
- ),
26
- },
11
+ tokens: [SeparatorTokens_1.defaultSeparatorTokens, Separator_types_1.separatorName],
12
+ tokensThatAreAlsoProps,
13
+ slotProps: {
14
+ root: (0, framework_1.buildProps)((tokens) => {
15
+ return {
16
+ style: {
17
+ ...(tokens.vertical ? { borderLeftWidth: tokens.separatorWidth } : { borderTopWidth: tokens.separatorWidth }),
18
+ ...(tokens.color && { borderColor: tokens.color }),
19
+ ...(isMobile && { marginStart: tokens.insetSpacing }),
20
+ },
21
+ };
22
+ }, ['color', 'vertical', 'separatorWidth', 'insetSpacing']),
23
+ },
27
24
  };
28
- //# sourceMappingURL=Separator.styling.js.map
25
+ //# sourceMappingURL=Separator.styling.js.map
@@ -1,41 +1,42 @@
1
1
  import type { ViewProps, ColorValue } from 'react-native';
2
- export declare const separatorName = 'Separator';
2
+ export declare const separatorName = "Separator";
3
3
  export declare const SeparatorInsetSpacings: readonly [0, 16, 56, 68, 72, 108];
4
4
  export type SeparatorInsetSpacing = (typeof SeparatorInsetSpacings)[number];
5
5
  export interface SeparatorPropTokens {
6
- /**
7
- * Specifies whether the separator is vertical or horizontal. If true, then it's vertical.
8
- * @defaultValue 'false'
9
- */
10
- vertical?: boolean;
11
- /**
12
- * Inset Spacing in 'dp' (density-independent pixels) on Android and 'points' on iOS.
13
- *
14
- * Inset Spacing is restricted to a limited set of supported values recommended for most uses (see `SeparatorInsetSpacing`) and
15
- * based on design guidelines for the Separator control.
16
- * @platform Android iOS
17
- * @defaultvalue 0
18
- */
19
- insetSpacing?: SeparatorInsetSpacing;
6
+ /**
7
+ * Specifies whether the separator is vertical or horizontal. If true, then it's vertical.
8
+ * @defaultValue 'false'
9
+ */
10
+ vertical?: boolean;
11
+ /**
12
+ * Inset Spacing in 'dp' (density-independent pixels) on Android and 'points' on iOS.
13
+ *
14
+ * Inset Spacing is restricted to a limited set of supported values recommended for most uses (see `SeparatorInsetSpacing`) and
15
+ * based on design guidelines for the Separator control.
16
+ * @platform Android iOS
17
+ * @defaultvalue 0
18
+ */
19
+ insetSpacing?: SeparatorInsetSpacing;
20
20
  }
21
21
  export interface SeparatorTokens extends SeparatorPropTokens {
22
- /**
23
- * Specifies the width of the separator. This will be interpreted as DIPs on Windows and Android, but as points on Mac and iOS.
24
- * @defaultValue 1
25
- */
26
- separatorWidth?: number;
27
- /**
28
- * Specifies the color of the separator
29
- */
30
- color?: ColorValue;
22
+ /**
23
+ * Specifies the width of the separator. This will be interpreted as DIPs on Windows and Android, but as points on Mac and iOS.
24
+ * @defaultValue 1
25
+ */
26
+ separatorWidth?: number;
27
+ /**
28
+ * Specifies the color of the separator
29
+ */
30
+ color?: ColorValue;
31
+ }
32
+ export interface SeparatorProps extends ViewProps, SeparatorPropTokens {
31
33
  }
32
- export interface SeparatorProps extends ViewProps, SeparatorPropTokens {}
33
34
  export interface SeperatorSlotProps {
34
- root: ViewProps;
35
+ root: ViewProps;
35
36
  }
36
37
  export interface SeparatorType {
37
- props: SeparatorProps;
38
- slotProps: SeperatorSlotProps;
39
- tokens: SeparatorTokens;
38
+ props: SeparatorProps;
39
+ slotProps: SeperatorSlotProps;
40
+ tokens: SeparatorTokens;
40
41
  }
41
- //# sourceMappingURL=Separator.types.d.ts.map
42
+ //# sourceMappingURL=Separator.types.d.ts.map
@@ -1,6 +1,6 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SeparatorInsetSpacings = exports.separatorName = void 0;
4
4
  exports.separatorName = 'Separator';
5
5
  exports.SeparatorInsetSpacings = [0, 16, 56, 68, 72, 108];
6
- //# sourceMappingURL=Separator.types.js.map
6
+ //# sourceMappingURL=Separator.types.js.map
@@ -2,4 +2,4 @@ import type { Theme } from '@fluentui-react-native/framework';
2
2
  import type { TokenSettings } from '@fluentui-react-native/use-styling';
3
3
  import type { SeparatorTokens } from './Separator.types';
4
4
  export declare const defaultSeparatorTokens: TokenSettings<SeparatorTokens, Theme>;
5
- //# sourceMappingURL=SeparatorTokens.android.d.ts.map
5
+ //# sourceMappingURL=SeparatorTokens.android.d.ts.map
@@ -1,11 +1,11 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defaultSeparatorTokens = void 0;
4
- const theme_tokens_1 = require('@fluentui-react-native/theme-tokens');
4
+ const theme_tokens_1 = require("@fluentui-react-native/theme-tokens");
5
5
  const defaultSeparatorTokens = (t) => ({
6
- color: t.colors.neutralStroke2,
7
- separatorWidth: theme_tokens_1.globalTokens.stroke.width10,
8
- insetSpacing: 0,
6
+ color: t.colors.neutralStroke2,
7
+ separatorWidth: theme_tokens_1.globalTokens.stroke.width10,
8
+ insetSpacing: 0,
9
9
  });
10
10
  exports.defaultSeparatorTokens = defaultSeparatorTokens;
11
- //# sourceMappingURL=SeparatorTokens.android.js.map
11
+ //# sourceMappingURL=SeparatorTokens.android.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SeparatorTokens.android.js","sourceRoot":"","sources":["../src/SeparatorTokens.android.tsx"],"names":[],"mappings":";;;AACA,sEAAmE;AAK5D,MAAM,sBAAsB,GAA0C,CAAC,CAAQ,EAAE,EAAE,EACvF;IACC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc;IAC9B,cAAc,EAAE,2BAAY,CAAC,MAAM,CAAC,OAAO;IAC3C,YAAY,EAAE,CAAC;CACI,CAAA,CAAC;AALX,QAAA,sBAAsB,GAAtB,sBAAsB,CAKX"}
1
+ {"version":3,"file":"SeparatorTokens.android.js","sourceRoot":"","sources":["../src/SeparatorTokens.android.tsx"],"names":[],"mappings":";;;AACA,sEAAmE;AAK5D,MAAM,sBAAsB,GAA0C,CAAC,CAAQ,EAAE,EAAE,CACxF,CAAC;IACC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc;IAC9B,cAAc,EAAE,2BAAY,CAAC,MAAM,CAAC,OAAO;IAC3C,YAAY,EAAE,CAAC;CAChB,CAAoB,CAAC;AALX,QAAA,sBAAsB,GAAtB,sBAAsB,CAKX"}
@@ -2,4 +2,4 @@ import type { Theme } from '@fluentui-react-native/framework';
2
2
  import type { TokenSettings } from '@fluentui-react-native/use-styling';
3
3
  import type { SeparatorTokens } from './Separator.types';
4
4
  export declare const defaultSeparatorTokens: TokenSettings<SeparatorTokens, Theme>;
5
- //# sourceMappingURL=SeparatorTokens.d.ts.map
5
+ //# sourceMappingURL=SeparatorTokens.d.ts.map
@@ -1,9 +1,9 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defaultSeparatorTokens = void 0;
4
- const theme_tokens_1 = require('@fluentui-react-native/theme-tokens');
4
+ const theme_tokens_1 = require("@fluentui-react-native/theme-tokens");
5
5
  const defaultSeparatorTokens = () => ({
6
- separatorWidth: theme_tokens_1.globalTokens.stroke.width10,
6
+ separatorWidth: theme_tokens_1.globalTokens.stroke.width10,
7
7
  });
8
8
  exports.defaultSeparatorTokens = defaultSeparatorTokens;
9
- //# sourceMappingURL=SeparatorTokens.js.map
9
+ //# sourceMappingURL=SeparatorTokens.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SeparatorTokens.js","sourceRoot":"","sources":["../src/SeparatorTokens.tsx"],"names":[],"mappings":";;;AACA,sEAAmE;AAK5D,MAAM,sBAAsB,GAA0C,GAAG,EAAE,EAC/E;IACC,cAAc,EAAE,2BAAY,CAAC,MAAM,CAAC,OAAO;CACxB,CAAA,CAAC;AAHX,QAAA,sBAAsB,GAAtB,sBAAsB,CAGX"}
1
+ {"version":3,"file":"SeparatorTokens.js","sourceRoot":"","sources":["../src/SeparatorTokens.tsx"],"names":[],"mappings":";;;AACA,sEAAmE;AAK5D,MAAM,sBAAsB,GAA0C,GAAG,EAAE,CAChF,CAAC;IACC,cAAc,EAAE,2BAAY,CAAC,MAAM,CAAC,OAAO;CAC5C,CAAoB,CAAC;AAHX,QAAA,sBAAsB,GAAtB,sBAAsB,CAGX"}
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=Separator.test.d.ts.map
2
+ //# sourceMappingURL=Separator.test.d.ts.map
@@ -1,72 +1,55 @@
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
- Object.defineProperty(exports, '__esModule', { value: true });
53
- const jsx_runtime_1 = require('react/jsx-runtime');
54
- const react_1 = require('react');
55
- const renderer = __importStar(require('react-test-renderer'));
56
- const __1 = require('..');
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ const jsx_runtime_1 = require("react/jsx-runtime");
37
+ const react_1 = require("react");
38
+ const renderer = __importStar(require("react-test-renderer"));
39
+ const __1 = require("..");
57
40
  it('Separator default', () => {
58
- let component;
59
- (0, react_1.act)(() => {
60
- component = renderer.create(jsx_runtime_1.jsx(__1.Separator, {}));
61
- });
62
- expect(component.toJSON()).toMatchSnapshot();
41
+ let component;
42
+ (0, react_1.act)(() => {
43
+ component = renderer.create(jsx_runtime_1.jsx(__1.Separator, {}));
44
+ });
45
+ expect(component.toJSON()).toMatchSnapshot();
63
46
  });
64
47
  it('Separator all props & tokens', () => {
65
- const CustomSeparator = __1.Separator.customize({ separatorWidth: 15, color: 'red' });
66
- let component;
67
- (0, react_1.act)(() => {
68
- component = renderer.create(jsx_runtime_1.jsx(CustomSeparator, { vertical: true }));
69
- });
70
- expect(component.toJSON()).toMatchSnapshot();
48
+ const CustomSeparator = __1.Separator.customize({ separatorWidth: 15, color: 'red' });
49
+ let component;
50
+ (0, react_1.act)(() => {
51
+ component = renderer.create(jsx_runtime_1.jsx(CustomSeparator, { vertical: true }));
52
+ });
53
+ expect(component.toJSON()).toMatchSnapshot();
71
54
  });
72
- //# sourceMappingURL=Separator.test.js.map
55
+ //# sourceMappingURL=Separator.test.js.map
@@ -1,4 +1,4 @@
1
1
  export type { SeparatorProps, SeparatorTokens, SeparatorType } from './Separator.types';
2
2
  export { separatorName } from './Separator.types';
3
3
  export { Separator } from './Separator';
4
- //# sourceMappingURL=index.d.ts.map
4
+ //# sourceMappingURL=index.d.ts.map
@@ -1,18 +1,8 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Separator = exports.separatorName = void 0;
4
- const Separator_types_1 = require('./Separator.types');
5
- Object.defineProperty(exports, 'separatorName', {
6
- enumerable: true,
7
- get: function () {
8
- return Separator_types_1.separatorName;
9
- },
10
- });
11
- const Separator_1 = require('./Separator');
12
- Object.defineProperty(exports, 'Separator', {
13
- enumerable: true,
14
- get: function () {
15
- return Separator_1.Separator;
16
- },
17
- });
18
- //# sourceMappingURL=index.js.map
4
+ const Separator_types_1 = require("./Separator.types");
5
+ Object.defineProperty(exports, "separatorName", { enumerable: true, get: function () { return Separator_types_1.separatorName; } });
6
+ const Separator_1 = require("./Separator");
7
+ Object.defineProperty(exports, "Separator", { enumerable: true, get: function () { return Separator_1.Separator; } });
8
+ //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,68 +1,69 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/separator",
3
- "version": "0.19.0",
3
+ "version": "0.19.3",
4
4
  "description": "A cross-platform Separator component using the Fluent Design System",
5
+ "license": "MIT",
6
+ "author": "",
5
7
  "repository": {
6
8
  "type": "git",
7
9
  "url": "https://github.com/microsoft/fluentui-react-native.git",
8
10
  "directory": "packages/components/Separator"
9
11
  },
10
- "license": "MIT",
11
- "author": "",
12
+ "main": "lib-commonjs/index.js",
13
+ "module": "lib/index.js",
14
+ "types": "lib/index.d.ts",
12
15
  "exports": {
13
16
  ".": {
14
17
  "types": "./lib/index.d.ts",
15
18
  "import": "./lib/index.js",
16
- "require": "./lib-commonjs/index.js"
19
+ "require": "./lib-commonjs/index.js",
20
+ "default": "./src/index.ts"
17
21
  }
18
22
  },
19
- "main": "lib-commonjs/index.js",
20
- "module": "lib/index.js",
21
- "types": "lib/index.d.ts",
22
23
  "scripts": {
23
24
  "build": "fluentui-scripts build",
24
25
  "build-cjs": "tsgo --outDir lib-commonjs",
25
- "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler",
26
+ "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler",
26
27
  "clean": "fluentui-scripts clean",
27
28
  "depcheck": "fluentui-scripts depcheck",
28
- "lint": "fluentui-scripts eslint",
29
+ "format": "fluentui-scripts format",
30
+ "lint": "fluentui-scripts lint",
29
31
  "lint-package": "fluentui-scripts lint-package",
30
- "prettier": "fluentui-scripts prettier",
31
32
  "test": "fluentui-scripts jest",
32
33
  "update-snapshots": "fluentui-scripts jest -u"
33
34
  },
34
35
  "dependencies": {
35
- "@fluentui-react-native/framework": "0.15.0",
36
- "@fluentui-react-native/theme-tokens": "0.28.0",
37
- "@fluentui-react-native/use-styling": "0.14.0"
36
+ "@fluentui-react-native/framework": "0.15.3",
37
+ "@fluentui-react-native/theme-tokens": "0.28.3",
38
+ "@fluentui-react-native/use-styling": "0.14.3"
38
39
  },
39
40
  "devDependencies": {
40
41
  "@babel/core": "^7.20.0",
41
42
  "@fluentui-react-native/babel-config": "0.1.1",
42
- "@fluentui-react-native/eslint-config-rules": "0.1.1",
43
- "@fluentui-react-native/framework-base": "0.3.0",
44
- "@fluentui-react-native/jest-config": "0.1.1",
43
+ "@fluentui-react-native/framework-base": "0.3.3",
44
+ "@fluentui-react-native/jest-config": "0.1.0",
45
45
  "@fluentui-react-native/kit-config": "0.1.2",
46
- "@fluentui-react-native/scripts": "0.1.2",
46
+ "@fluentui-react-native/lint-config-rules": "0.1.3",
47
+ "@fluentui-react-native/scripts": "0.1.0",
47
48
  "@office-iss/react-native-win32": "^0.74.0",
48
49
  "@react-native-community/cli": "^20.0.0",
49
50
  "@react-native-community/cli-platform-android": "^20.0.0",
50
51
  "@react-native-community/cli-platform-ios": "^20.0.0",
51
52
  "@react-native/babel-preset": "^0.81.0",
52
53
  "@react-native/metro-config": "^0.81.0",
53
- "@types/react": "~19.1.0",
54
+ "@types/react": "~19.1.4",
54
55
  "@types/react-test-renderer": "^19.1.0",
55
- "react": "19.1.0",
56
- "react-native": "^0.81.0",
56
+ "react": "19.1.4",
57
+ "react-native": "^0.81.6",
57
58
  "react-native-macos": "^0.81.0",
58
59
  "react-native-windows": "^0.81.0",
59
- "react-test-renderer": "19.1.0"
60
+ "react-test-renderer": "19.1.4"
60
61
  },
61
62
  "peerDependencies": {
62
63
  "@office-iss/react-native-win32": "^0.74.0",
63
- "@types/react": "~18.2.0 || ~19.0.0 || ~19.1.0",
64
- "react": "18.2.0 || 19.0.0 || 19.1.0",
65
- "react-native": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0",
64
+ "@types/react": "~18.2.0 || ~19.0.0 || ~19.1.4",
65
+ "react": "18.2.0 || 19.0.0 || 19.1.4",
66
+ "react-native": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.6",
66
67
  "react-native-macos": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0",
67
68
  "react-native-windows": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0"
68
69
  },
@@ -9,4 +9,4 @@ export const defaultSeparatorTokens: TokenSettings<SeparatorTokens, Theme> = (t:
9
9
  color: t.colors.neutralStroke2,
10
10
  separatorWidth: globalTokens.stroke.width10,
11
11
  insetSpacing: 0,
12
- } as SeparatorTokens);
12
+ }) as SeparatorTokens;
@@ -7,4 +7,4 @@ import type { SeparatorTokens } from './Separator.types';
7
7
  export const defaultSeparatorTokens: TokenSettings<SeparatorTokens, Theme> = () =>
8
8
  ({
9
9
  separatorWidth: globalTokens.stroke.width10,
10
- } as SeparatorTokens);
10
+ }) as SeparatorTokens;
package/eslint.config.js DELETED
@@ -1,3 +0,0 @@
1
- const baseConfig = require('@fluentui-react-native/eslint-config-rules');
2
-
3
- module.exports = baseConfig;