@fluentui-react-native/pressable 0.12.18 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # Change Log - @fluentui-react-native/pressable
2
2
 
3
+ ## 0.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d7adbdd: # Migration from Beachball to Changesets
8
+
9
+ This changeset represents the migration from Beachball to Changesets for version management and consolidates all changes from 440+ beachball change files that were in the `change/` directory.
10
+
11
+ All 75 affected packages receive a minor version bump to acknowledge the accumulated changes from the beachball era.
12
+
13
+ ## What Changed
14
+
15
+ Going forward, all version management uses Changesets via `yarn changeset`. The following beachball infrastructure has been removed:
16
+
17
+ - ❌ 440+ beachball change files from `change/` directory
18
+ - ❌ `beachball` package dependency
19
+ - ❌ Beachball scripts from `package.json`
20
+ - ❌ `beachball.config.js` configuration file
21
+ - ❌ Beachball publish steps from Azure Pipelines
22
+
23
+ ## New Workflow
24
+
25
+ ✅ **Create changes**: Run `yarn changeset` to document changes
26
+ ✅ **Version bump PRs**: Automatically created by GitHub Actions
27
+ ✅ **Publishing**: Handled by Azure Pipelines using `changeset publish`
28
+ ✅ **Validation**: CI validates changesets and blocks major version bumps
29
+
30
+ For details, see `CHANGESETS_SETUP.md` and `CONTRIBUTING.md`.
31
+
32
+ ### Patch Changes
33
+
34
+ - d1d8c26: We were pinning @types/react and react-native-macos via resolutions. This fixes that which uncovered a bunch of type inconsistencies that needed to be addressed.
35
+ - Updated dependencies [d7adbdd]
36
+ - Updated dependencies [d1d8c26]
37
+ - Updated dependencies [d1d8c26]
38
+ - @fluentui-react-native/adapters@0.14.0
39
+ - @fluentui-react-native/interactive-hooks@0.28.0
40
+ - @uifabricshared/foundation-composable@0.14.0
41
+ - @uifabricshared/foundation-settings@0.16.0
42
+
3
43
  <!-- This log was last generated on Tue, 05 Aug 2025 18:50:41 GMT and should not be manually modified. -->
4
44
 
5
45
  <!-- Start content -->
@@ -1726,24 +1766,31 @@ Thu, 16 Apr 2020 23:57:38 GMT
1726
1766
  - publish with correct main/module references (jasonmo@microsoft.com)
1727
1767
 
1728
1768
  ## 0.2.11
1769
+
1729
1770
  Thu, 09 Apr 2020 18:39:15 GMT
1730
1771
 
1731
1772
  ### Patches
1732
1773
 
1733
1774
  - merge conflicts (ppatboyd@outlook.com)
1775
+
1734
1776
  ## 0.2.9
1777
+
1735
1778
  Fri, 03 Apr 2020 20:40:51 GMT
1736
1779
 
1737
1780
  ### Patches
1738
1781
 
1739
1782
  - switch the bin name from just-script to fluent-scripts to disambiguate names (jasonmo@microsoft.com)
1783
+
1740
1784
  ## 0.2.7
1785
+
1741
1786
  Mon, 30 Mar 2020 16:27:00 GMT
1742
1787
 
1743
1788
  ### Patches
1744
1789
 
1745
1790
  - Update main attribute to specify TypeScript index file. (kinhln@microsoft.com)
1791
+
1746
1792
  ## 0.2.0
1793
+
1747
1794
  Mon, 16 Mar 2020 23:03:24 GMT
1748
1795
 
1749
1796
  ### Minor changes
@@ -1,6 +1,13 @@
1
1
  import type { IPressableProps } from './Pressable.props';
2
- export declare const Pressable: import("@uifabricshared/foundation-composable").IWithComposable<import("react").FunctionComponent<IPressableProps<import("@fluentui-react-native/adapters").IViewProps>>, import("@uifabricshared/foundation-composable").IComposable<IPressableProps<import("@fluentui-react-native/adapters").IViewProps>, {
3
- root: import("@fluentui-react-native/adapters").IViewProps;
4
- }, object>>;
2
+ export declare const Pressable: import('@uifabricshared/foundation-composable').IWithComposable<
3
+ import('react').FunctionComponent<IPressableProps>,
4
+ import('@uifabricshared/foundation-composable').IComposable<
5
+ IPressableProps,
6
+ {
7
+ root: import('@fluentui-react-native/adapters').IViewProps;
8
+ },
9
+ object
10
+ >
11
+ >;
5
12
  export default Pressable;
6
- //# sourceMappingURL=Pressable.d.ts.map
13
+ //# sourceMappingURL=Pressable.d.ts.map
package/lib/Pressable.js CHANGED
@@ -14,17 +14,17 @@ import { useAsPressable } from '@fluentui-react-native/interactive-hooks';
14
14
  import { composable } from '@uifabricshared/foundation-composable';
15
15
  import { mergeSettings } from '@uifabricshared/foundation-settings';
16
16
  export const Pressable = composable({
17
- slots: { root: View },
18
- usePrepareProps: (userProps, useStyling) => {
19
- const { renderStyle, ...rest } = userProps;
20
- const { props, state } = useAsPressable(rest);
21
- const styleProps = useStyling(props);
22
- renderStyle && (props.style = renderStyle(state));
23
- return {
24
- slotProps: mergeSettings(styleProps, { root: props }),
25
- state: { state },
26
- };
27
- },
17
+ slots: { root: View },
18
+ usePrepareProps: (userProps, useStyling) => {
19
+ const { renderStyle, ...rest } = userProps;
20
+ const { props, state } = useAsPressable(rest);
21
+ const styleProps = useStyling(props);
22
+ renderStyle && (props.style = renderStyle(state));
23
+ return {
24
+ slotProps: mergeSettings(styleProps, { root: props }),
25
+ state: { state },
26
+ };
27
+ },
28
28
  });
29
29
  export default Pressable;
30
- //# sourceMappingURL=Pressable.js.map
30
+ //# sourceMappingURL=Pressable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Pressable.js","sourceRoot":"","sources":["../src/Pressable.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,YAAY,CAAC;AAEb,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAIpE,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAiB;IAClD,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;IACrB,eAAe,EAAE,CAAC,SAA0B,EAAE,UAAuC,EAAE,EAAE;QACvF,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,SAAS,CAAC;QAC3C,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,cAAc,CAAC,IA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ACjB,CAAC;IAAA,CACH;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import type * as React from 'react';
2
- import type { ViewStyle, StyleProp } from 'react-native';
3
- import type { IViewProps } from '@fluentui-react-native/adapters';
2
+ import type { ViewStyle } from 'react-native';
3
+ import type { IViewProps, IViewStyle } from '@fluentui-react-native/adapters';
4
4
  import type { IWithPressableOptions, IPressableState } from '@fluentui-react-native/interactive-hooks';
5
5
  type ObjectBase = {};
6
- export type IPressableProps<TBase extends ObjectBase = IViewProps> = IWithPressableOptions<TBase> & {
7
- children?: IRenderChild<IPressableState>;
8
- renderStyle?: IRenderStyle<IPressableState, ViewStyle>;
6
+ export type IPressableProps = IWithPressableOptions<IViewProps> & {
7
+ children?: React.ReactNode;
8
+ renderStyle?: IRenderStyle<IPressableState, IViewStyle>;
9
9
  };
10
10
  /**
11
11
  * Used by IRenderChild, it simply describes a function that takes
@@ -24,15 +24,15 @@ export type IRenderChild<T> = IChildAsFunction<T> | React.ReactNode;
24
24
  /**
25
25
  * An IRenderStyle describes style as a function that takes the current
26
26
  * state of the parent component. It is up to the parent to invoke the function
27
- * and make proper use of the more typical StyleProp<S> object that is returned
27
+ * and make proper use of the more typical ViewStyle object that is returned
28
28
  * This is convenient for when styles need to be calculated depending on interaction states.
29
29
  */
30
- export type IRenderStyle<T, S> = (state: T) => StyleProp<S>;
30
+ export type IRenderStyle<T, S extends ViewStyle> = (state: T) => S;
31
31
  export type IPressableType<TBase extends ObjectBase = IViewProps> = {
32
- props: IPressableProps<TBase>;
33
- slotProps: {
34
- root: TBase;
35
- };
32
+ props: IPressableProps;
33
+ slotProps: {
34
+ root: TBase;
35
+ };
36
36
  };
37
37
  export {};
38
- //# sourceMappingURL=Pressable.props.d.ts.map
38
+ //# sourceMappingURL=Pressable.props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Pressable.props.d.ts","sourceRoot":"","sources":["../src/Pressable.props.ts"],"names":[],"mapp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,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAGvG,KAAK,UAAU,GAAG,EAAE,CAAC;AAErB,MAAM,MAAM,eAAe,GAAG,qBAAqB,CAAC,UAAU,CAAC,GAAG;IAChE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAQ3B,WAAW,CAAC,EAAE,YAAY,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;CACzD,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;AAEhE;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC;AAEnE,MAAM,MAAM,cAAc,CAAC,KAAK,SAAS,UAAU,GAAG,UAAU,IAAI;IAClE,KAAK,EAAE,eAAe,CAAC;IACvB,SAAS,EAAE;QACT,IAAI,EAAE,KAAK,CAAC;KACb,CAAC;CACH,CAAC"}
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=Pressable.props.js.map
2
+ //# sourceMappingURL=Pressable.props.js.map
package/lib/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export type { IChildAsFunction, IPressableProps, IPressableType, IRenderChild, IRenderStyle } from './Pressable.props';
2
2
  export { Pressable } from './Pressable';
3
- //# sourceMappingURL=index.d.ts.map
3
+ //# sourceMappingURL=index.d.ts.map
package/lib/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  export { Pressable } from './Pressable';
2
- //# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -1,6 +1,13 @@
1
1
  import type { IPressableProps } from './Pressable.props';
2
- export declare const Pressable: import("@uifabricshared/foundation-composable").IWithComposable<import("react").FunctionComponent<IPressableProps<import("@fluentui-react-native/adapters").IViewProps>>, import("@uifabricshared/foundation-composable").IComposable<IPressableProps<import("@fluentui-react-native/adapters").IViewProps>, {
3
- root: import("@fluentui-react-native/adapters").IViewProps;
4
- }, object>>;
2
+ export declare const Pressable: import('@uifabricshared/foundation-composable').IWithComposable<
3
+ import('react').FunctionComponent<IPressableProps>,
4
+ import('@uifabricshared/foundation-composable').IComposable<
5
+ IPressableProps,
6
+ {
7
+ root: import('@fluentui-react-native/adapters').IViewProps;
8
+ },
9
+ object
10
+ >
11
+ >;
5
12
  export default Pressable;
6
- //# sourceMappingURL=Pressable.d.ts.map
13
+ //# sourceMappingURL=Pressable.d.ts.map
@@ -9,24 +9,24 @@
9
9
  * provides an overview over how touchables work and interact with the gesture responder system.
10
10
  */
11
11
  'use strict';
12
- Object.defineProperty(exports, "__esModule", { value: true });
12
+ Object.defineProperty(exports, '__esModule', { value: true });
13
13
  exports.Pressable = void 0;
14
- const react_native_1 = require("react-native");
15
- const interactive_hooks_1 = require("@fluentui-react-native/interactive-hooks");
16
- const foundation_composable_1 = require("@uifabricshared/foundation-composable");
17
- const foundation_settings_1 = require("@uifabricshared/foundation-settings");
14
+ const react_native_1 = require('react-native');
15
+ const interactive_hooks_1 = require('@fluentui-react-native/interactive-hooks');
16
+ const foundation_composable_1 = require('@uifabricshared/foundation-composable');
17
+ const foundation_settings_1 = require('@uifabricshared/foundation-settings');
18
18
  exports.Pressable = (0, foundation_composable_1.composable)({
19
- slots: { root: react_native_1.View },
20
- usePrepareProps: (userProps, useStyling) => {
21
- const { renderStyle, ...rest } = userProps;
22
- const { props, state } = (0, interactive_hooks_1.useAsPressable)(rest);
23
- const styleProps = useStyling(props);
24
- renderStyle && (props.style = renderStyle(state));
25
- return {
26
- slotProps: (0, foundation_settings_1.mergeSettings)(styleProps, { root: props }),
27
- state: { state },
28
- };
29
- },
19
+ slots: { root: react_native_1.View },
20
+ usePrepareProps: (userProps, useStyling) => {
21
+ const { renderStyle, ...rest } = userProps;
22
+ const { props, state } = (0, interactive_hooks_1.useAsPressable)(rest);
23
+ const styleProps = useStyling(props);
24
+ renderStyle && (props.style = renderStyle(state));
25
+ return {
26
+ slotProps: (0, foundation_settings_1.mergeSettings)(styleProps, { root: props }),
27
+ state: { state },
28
+ };
29
+ },
30
30
  });
31
31
  exports.default = exports.Pressable;
32
- //# sourceMappingURL=Pressable.js.map
32
+ //# sourceMappingURL=Pressable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Pressable.js","sourceRoot":"","sources":["../src/Pressable.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,YAAY,CAAC;;;AAEb,+CAAoC;AAEpC,gFAA0E;AAE1E,iFAAmE;AACnE,6EAAoE;AAIvD,QAAA,SAAS,GAAG,IAAA,kCAAU,EAAiB;IAClD,KAAK,EAAE,EAAE,IAAI,EAAE,mBAAI,EAAE;IACrB,eAAe,EAAE,CAAC,SAA0B,EAAE,UAAuC,EAAE,EAAE;QACvF,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,SAAS,CAAC;QAC3C,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAA,kCAAc,EAAC,IAAI,CAAC,CAAC;QAC9C,MAAM,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QACrC,WAAW,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;QAClD,OAAO;YACL,SAAS,EAAE,IAAA,mCAAa,EAA8B,UAAU,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;YAClF,KAAK,EAAE,EAAE,KAAK,EAAE;SACjB,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,kBAAe,iBAAS,CAAC"}
1
+ {"version":3,"file":"Pressable.js","sourceRoot":"","sources":["../src/Pressable.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,YAAY,CAAC;;;AAEb,+CAAoC;AAEpC,gFAA0E;AAE1E,iFAAmE;AACnE,6EAAoE;AAIvD,QAAA,SAAS,GAAG,IAAA,kCAAU,EAAiB;IAClD,KAAK,EAAE,EAAE,IAAI,EAAE,mBAAI,EAAE;IACrB,eAAe,EAAE,CAAC,SAA0B,EAAE,UAAuC,EAAE,EAAE,CAAC;QACxF,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,SAAS,CAAC;QAC3C,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAA,kCAAc,EAAC,IAAI,CAAC,CAAC;QAC9C,MAAM,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QACrC,WAAW,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;QAClD,OAAO;YACL,SAAS,EAAE,IAAA,mCAAa,EAA8B,UAAU,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;YAClF,KAAK,EAAE,EAAE,KAAK,EAAE;SACjB,CAAC;IAAA,CACH;CACF,CAAC,CAAC;kBAEY,QAAA,SAAS"}
@@ -1,11 +1,11 @@
1
1
  import type * as React from 'react';
2
- import type { ViewStyle, StyleProp } from 'react-native';
3
- import type { IViewProps } from '@fluentui-react-native/adapters';
2
+ import type { ViewStyle } from 'react-native';
3
+ import type { IViewProps, IViewStyle } from '@fluentui-react-native/adapters';
4
4
  import type { IWithPressableOptions, IPressableState } from '@fluentui-react-native/interactive-hooks';
5
5
  type ObjectBase = {};
6
- export type IPressableProps<TBase extends ObjectBase = IViewProps> = IWithPressableOptions<TBase> & {
7
- children?: IRenderChild<IPressableState>;
8
- renderStyle?: IRenderStyle<IPressableState, ViewStyle>;
6
+ export type IPressableProps = IWithPressableOptions<IViewProps> & {
7
+ children?: React.ReactNode;
8
+ renderStyle?: IRenderStyle<IPressableState, IViewStyle>;
9
9
  };
10
10
  /**
11
11
  * Used by IRenderChild, it simply describes a function that takes
@@ -24,15 +24,15 @@ export type IRenderChild<T> = IChildAsFunction<T> | React.ReactNode;
24
24
  /**
25
25
  * An IRenderStyle describes style as a function that takes the current
26
26
  * state of the parent component. It is up to the parent to invoke the function
27
- * and make proper use of the more typical StyleProp<S> object that is returned
27
+ * and make proper use of the more typical ViewStyle object that is returned
28
28
  * This is convenient for when styles need to be calculated depending on interaction states.
29
29
  */
30
- export type IRenderStyle<T, S> = (state: T) => StyleProp<S>;
30
+ export type IRenderStyle<T, S extends ViewStyle> = (state: T) => S;
31
31
  export type IPressableType<TBase extends ObjectBase = IViewProps> = {
32
- props: IPressableProps<TBase>;
33
- slotProps: {
34
- root: TBase;
35
- };
32
+ props: IPressableProps;
33
+ slotProps: {
34
+ root: TBase;
35
+ };
36
36
  };
37
37
  export {};
38
- //# sourceMappingURL=Pressable.props.d.ts.map
38
+ //# sourceMappingURL=Pressable.props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Pressable.props.d.ts","sourceRoot":"","sources":["../src/Pressable.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAGvG,KAAK,UAAU,GAAG,EAAE,CAAC;AAErB,MAAM,MAAM,eAAe,CAAC,KAAK,SAAS,UAAU,GAAG,UAAU,IAAI,qBAAqB,CAAC,KAAK,CAAC,GAAG;IAClG,QAAQ,CAAC,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC;IAQ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,CAAC,KAAK,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;AAEhE;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC;AAEnE,MAAM,MAAM,cAAc,CAAC,KAAK,SAAS,UAAU,GAAG,UAAU,IAAI;IAClE,KAAK,EAAE,eAAe,CAAC;IACvB,SAAS,EAAE;QACT,IAAI,EAAE,KAAK,CAAC;KACb,CAAC;CACH,CAAC"}
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=Pressable.props.js.map
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
+ //# sourceMappingURL=Pressable.props.js.map
@@ -1,3 +1,3 @@
1
1
  export type { IChildAsFunction, IPressableProps, IPressableType, IRenderChild, IRenderStyle } from './Pressable.props';
2
2
  export { Pressable } from './Pressable';
3
- //# sourceMappingURL=index.d.ts.map
3
+ //# sourceMappingURL=index.d.ts.map
@@ -1,6 +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.Pressable = void 0;
4
- var Pressable_1 = require("./Pressable");
5
- Object.defineProperty(exports, "Pressable", { enumerable: true, get: function () { return Pressable_1.Pressable; } });
6
- //# sourceMappingURL=index.js.map
4
+ const Pressable_1 = require('./Pressable');
5
+ Object.defineProperty(exports, 'Pressable', {
6
+ enumerable: true,
7
+ get: function () {
8
+ return Pressable_1.Pressable;
9
+ },
10
+ });
11
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,yCAAwC;AAA/B,sGAAA,SAAS,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,2CAAwC;AAA/B,sGAAA,SAAS,OAAA"}
package/package.json CHANGED
@@ -1,96 +1,93 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/pressable",
3
- "version": "0.12.18",
3
+ "version": "0.13.0",
4
4
  "description": "A cross-platform Pressable component",
5
- "main": "lib-commonjs/index.js",
6
- "module": "lib/index.js",
7
- "react-native": "src/index.ts",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/microsoft/fluentui-react-native.git",
8
+ "directory": "packages/components/Pressable"
9
+ },
10
+ "license": "MIT",
11
+ "author": "",
8
12
  "exports": {
9
13
  ".": {
14
+ "types": "./lib/index.d.ts",
10
15
  "import": "./lib/index.js",
11
- "require": "./lib-commonjs/index.js",
12
- "types": "./lib/index.d.ts"
16
+ "require": "./lib-commonjs/index.js"
13
17
  }
14
18
  },
15
- "typings": "lib/index.d.ts",
19
+ "main": "lib-commonjs/index.js",
20
+ "module": "lib/index.js",
21
+ "types": "lib/index.d.ts",
16
22
  "scripts": {
17
23
  "build": "fluentui-scripts build",
18
- "just": "fluentui-scripts",
24
+ "build-cjs": "tsgo --outDir lib-commonjs",
25
+ "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler",
19
26
  "clean": "fluentui-scripts clean",
20
27
  "depcheck": "fluentui-scripts depcheck",
21
28
  "lint": "fluentui-scripts eslint",
22
- "test": "fluentui-scripts jest",
23
- "update-snapshots": "fluentui-scripts jest -u",
29
+ "lint-package": "fluentui-scripts lint-package",
24
30
  "prettier": "fluentui-scripts prettier",
25
- "prettier-fix": "fluentui-scripts prettier --fix true"
26
- },
27
- "repository": {
28
- "type": "git",
29
- "url": "https://github.com/microsoft/fluentui-react-native.git",
30
- "directory": "packages/components/Pressable"
31
+ "test": "fluentui-scripts jest",
32
+ "update-snapshots": "fluentui-scripts jest -u"
31
33
  },
32
34
  "dependencies": {
33
- "@fluentui-react-native/adapters": "0.13.5",
34
- "@fluentui-react-native/interactive-hooks": "0.27.18",
35
- "@uifabricshared/foundation-composable": "0.13.11",
36
- "@uifabricshared/foundation-settings": "0.15.11"
35
+ "@fluentui-react-native/adapters": "0.14.0",
36
+ "@fluentui-react-native/interactive-hooks": "0.28.0",
37
+ "@uifabricshared/foundation-composable": "0.14.0",
38
+ "@uifabricshared/foundation-settings": "0.16.0"
37
39
  },
38
40
  "devDependencies": {
39
41
  "@babel/core": "^7.20.0",
40
42
  "@fluentui-react-native/babel-config": "0.1.1",
41
43
  "@fluentui-react-native/eslint-config-rules": "0.1.1",
42
- "@fluentui-react-native/scripts": "0.1.1",
43
- "@react-native/babel-preset": "^0.74.0",
44
- "@react-native/metro-config": "^0.74.0",
45
- "@types/react": "~18.2.0",
46
- "react": "18.2.0",
47
- "react-native": "^0.74.0",
48
- "react-native-macos": "^0.74.0",
49
- "react-native-windows": "^0.74.0"
44
+ "@fluentui-react-native/kit-config": "0.1.2",
45
+ "@fluentui-react-native/scripts": "0.1.2",
46
+ "@react-native-community/cli": "^20.0.0",
47
+ "@react-native-community/cli-platform-android": "^20.0.0",
48
+ "@react-native-community/cli-platform-ios": "^20.0.0",
49
+ "@react-native/metro-config": "^0.81.0",
50
+ "@types/react": "~19.1.0",
51
+ "react": "19.1.0",
52
+ "react-native": "^0.81.0",
53
+ "react-native-macos": "^0.81.0",
54
+ "react-native-windows": "^0.81.0"
50
55
  },
51
56
  "peerDependencies": {
52
57
  "@office-iss/react-native-win32": "^0.74.0",
53
- "react": "18.2.0",
54
- "react-native": "^0.73.0 || ^0.74.0",
55
- "react-native-macos": "^0.73.0 || ^0.74.0",
56
- "react-native-windows": "^0.73.0 || ^0.74.0"
58
+ "@types/react": "~18.2.0 || ~19.0.0 || ~19.1.0",
59
+ "react": "18.2.0 || 19.0.0 || 19.1.0",
60
+ "react-native": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0",
61
+ "react-native-macos": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0",
62
+ "react-native-windows": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0"
63
+ },
64
+ "peerDependenciesMeta": {
65
+ "@office-iss/react-native-win32": {
66
+ "optional": true
67
+ },
68
+ "@types/react": {
69
+ "optional": true
70
+ },
71
+ "react-native-macos": {
72
+ "optional": true
73
+ },
74
+ "react-native-windows": {
75
+ "optional": true
76
+ }
57
77
  },
58
- "author": "",
59
- "license": "MIT",
60
78
  "rnx-kit": {
61
79
  "kitType": "library",
62
80
  "alignDeps": {
63
- "presets": [
64
- "microsoft/react-native"
65
- ],
66
- "requirements": {
67
- "development": [
68
- "react-native@0.74"
69
- ],
70
- "production": [
71
- "react-native@0.73 || 0.74"
72
- ]
73
- },
74
81
  "capabilities": [
75
- "babel-preset-react-native",
76
82
  "core",
77
83
  "core-android",
78
84
  "core-ios",
79
85
  "core-macos",
80
86
  "core-windows",
81
- "react"
87
+ "react",
88
+ "tools-core"
82
89
  ]
83
- }
84
- },
85
- "peerDependenciesMeta": {
86
- "@office-iss/react-native-win32": {
87
- "optional": true
88
90
  },
89
- "react-native-macos": {
90
- "optional": true
91
- },
92
- "react-native-windows": {
93
- "optional": true
94
- }
91
+ "extends": "@fluentui-react-native/kit-config"
95
92
  }
96
- }
93
+ }
@@ -1,22 +1,22 @@
1
1
  import type * as React from 'react';
2
- import type { ViewStyle, StyleProp } from 'react-native';
2
+ import type { ViewStyle } from 'react-native';
3
3
 
4
- import type { IViewProps } from '@fluentui-react-native/adapters';
4
+ import type { IViewProps, IViewStyle } from '@fluentui-react-native/adapters';
5
5
  import type { IWithPressableOptions, IPressableState } from '@fluentui-react-native/interactive-hooks';
6
6
 
7
7
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
8
8
  type ObjectBase = {};
9
9
 
10
- export type IPressableProps<TBase extends ObjectBase = IViewProps> = IWithPressableOptions<TBase> & {
11
- children?: IRenderChild<IPressableState>;
10
+ export type IPressableProps = IWithPressableOptions<IViewProps> & {
11
+ children?: React.ReactNode;
12
12
 
13
13
  // Typescript will not allow an extension of the IView* interface
14
14
  // that allows style to take on a function value. This is not a problem
15
15
  // with children, presumably because function components are valid as children.
16
16
  // As such, a renderStyle prop that takes a function value is provided
17
- // instead, in conjunction with the base style prop (StyleProp<ViewStyle>).
17
+ // instead, in conjunction with the base style prop (ViewStyle).
18
18
  // The style prop will only be used if a renderStyle is not provided.
19
- renderStyle?: IRenderStyle<IPressableState, ViewStyle>;
19
+ renderStyle?: IRenderStyle<IPressableState, IViewStyle>;
20
20
  };
21
21
 
22
22
  /**
@@ -38,13 +38,13 @@ export type IRenderChild<T> = IChildAsFunction<T> | React.ReactNode;
38
38
  /**
39
39
  * An IRenderStyle describes style as a function that takes the current
40
40
  * state of the parent component. It is up to the parent to invoke the function
41
- * and make proper use of the more typical StyleProp<S> object that is returned
41
+ * and make proper use of the more typical ViewStyle object that is returned
42
42
  * This is convenient for when styles need to be calculated depending on interaction states.
43
43
  */
44
- export type IRenderStyle<T, S> = (state: T) => StyleProp<S>;
44
+ export type IRenderStyle<T, S extends ViewStyle> = (state: T) => S;
45
45
 
46
46
  export type IPressableType<TBase extends ObjectBase = IViewProps> = {
47
- props: IPressableProps<TBase>;
47
+ props: IPressableProps;
48
48
  slotProps: {
49
49
  root: TBase;
50
50
  };