@fluentui-react-native/pressable 0.12.5 → 0.12.7
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.json +42 -1
- package/CHANGELOG.md +10 -2
- package/eslint.config.js +3 -0
- package/lib/Pressable.js +6 -17
- package/lib/Pressable.js.map +1 -1
- package/lib-commonjs/Pressable.js +9 -20
- package/lib-commonjs/Pressable.js.map +1 -1
- package/package.json +18 -6
- package/.eslintrc.js +0 -3
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,48 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/pressable",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Fri, 11 Jul 2025 19:50:49 GMT",
|
|
6
|
+
"version": "0.12.7",
|
|
7
|
+
"tag": "@fluentui-react-native/pressable_v0.12.7",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "jasonmo@microsoft.com",
|
|
12
|
+
"package": "@fluentui-react-native/pressable",
|
|
13
|
+
"commit": "479b93cea460a26df70c55b5d3335927ed374713",
|
|
14
|
+
"comment": "update builds to use node16 settings and modern export maps"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"none": [
|
|
18
|
+
{
|
|
19
|
+
"author": "ruaraki@microsoft.com",
|
|
20
|
+
"package": "@fluentui-react-native/pressable",
|
|
21
|
+
"commit": "a245202877ef7f2be9ab5f0e1356b2270957e693",
|
|
22
|
+
"comment": "Run bump-versions"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"author": "jasonmo@microsoft.com",
|
|
26
|
+
"package": "@fluentui-react-native/pressable",
|
|
27
|
+
"commit": "54087dca787180bbf34630470cd0d06e88366b30",
|
|
28
|
+
"comment": "update eslint to 9.x and use new flat config format with security rules"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"author": "sanajmi@microsoft.com",
|
|
32
|
+
"package": "@fluentui-react-native/pressable",
|
|
33
|
+
"commit": "405ca368dc3f2963bfc252a1952b1e14ff503499",
|
|
34
|
+
"comment": "fix: run `beachball sync` to sync package versions with NPM"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"author": "4123478+tido64@users.noreply.github.com",
|
|
38
|
+
"package": "@fluentui-react-native/pressable",
|
|
39
|
+
"commit": "79bb06f6bbfd0a36f9d2ef371f4857be9660f027",
|
|
40
|
+
"comment": "Fixed `align-deps` warnings"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"date": "Thu, 10 Jul 2025 19:20:19 GMT",
|
|
6
47
|
"version": "0.12.5",
|
|
7
48
|
"tag": "@fluentui-react-native/pressable_v0.12.5",
|
|
8
49
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/pressable
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Fri, 11 Jul 2025 19:50:49 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.12.7
|
|
8
|
+
|
|
9
|
+
Fri, 11 Jul 2025 19:50:49 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- update builds to use node16 settings and modern export maps (jasonmo@microsoft.com)
|
|
14
|
+
|
|
7
15
|
## 0.12.5
|
|
8
16
|
|
|
9
|
-
Thu,
|
|
17
|
+
Thu, 10 Jul 2025 19:20:19 GMT
|
|
10
18
|
|
|
11
19
|
### Patches
|
|
12
20
|
|
package/eslint.config.js
ADDED
package/lib/Pressable.js
CHANGED
|
@@ -9,31 +9,20 @@
|
|
|
9
9
|
* provides an overview over how touchables work and interact with the gesture responder system.
|
|
10
10
|
*/
|
|
11
11
|
'use strict';
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
12
|
import { View } from 'react-native';
|
|
24
13
|
import { useAsPressable } from '@fluentui-react-native/interactive-hooks';
|
|
25
14
|
import { composable } from '@uifabricshared/foundation-composable';
|
|
26
15
|
import { mergeSettings } from '@uifabricshared/foundation-settings';
|
|
27
|
-
export
|
|
16
|
+
export const Pressable = composable({
|
|
28
17
|
slots: { root: View },
|
|
29
|
-
usePrepareProps:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
usePrepareProps: (userProps, useStyling) => {
|
|
19
|
+
const { renderStyle, ...rest } = userProps;
|
|
20
|
+
const { props, state } = useAsPressable(rest);
|
|
21
|
+
const styleProps = useStyling(props);
|
|
33
22
|
renderStyle && (props.style = renderStyle(state));
|
|
34
23
|
return {
|
|
35
24
|
slotProps: mergeSettings(styleProps, { root: props }),
|
|
36
|
-
state: { state
|
|
25
|
+
state: { state },
|
|
37
26
|
};
|
|
38
27
|
},
|
|
39
28
|
});
|
package/lib/Pressable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.js","sourceRoot":"","sources":["../src/Pressable.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,YAAY,CAAC
|
|
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,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,aAAa,CAA8B,UAAU,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;YAClF,KAAK,EAAE,EAAE,KAAK,EAAE;SACjB,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -9,33 +9,22 @@
|
|
|
9
9
|
* provides an overview over how touchables work and interact with the gesture responder system.
|
|
10
10
|
*/
|
|
11
11
|
'use strict';
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
13
|
exports.Pressable = void 0;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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");
|
|
29
18
|
exports.Pressable = (0, foundation_composable_1.composable)({
|
|
30
19
|
slots: { root: react_native_1.View },
|
|
31
|
-
usePrepareProps:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
20
|
+
usePrepareProps: (userProps, useStyling) => {
|
|
21
|
+
const { renderStyle, ...rest } = userProps;
|
|
22
|
+
const { props, state } = (0, interactive_hooks_1.useAsPressable)(rest);
|
|
23
|
+
const styleProps = useStyling(props);
|
|
35
24
|
renderStyle && (props.style = renderStyle(state));
|
|
36
25
|
return {
|
|
37
26
|
slotProps: (0, foundation_settings_1.mergeSettings)(styleProps, { root: props }),
|
|
38
|
-
state: { state
|
|
27
|
+
state: { state },
|
|
39
28
|
};
|
|
40
29
|
},
|
|
41
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.js","sourceRoot":"","sources":["../src/Pressable.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,YAAY,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;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"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/pressable",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.7",
|
|
4
4
|
"description": "A cross-platform Pressable component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./lib/index.js",
|
|
10
|
+
"require": "./lib-commonjs/index.js",
|
|
11
|
+
"types": "./lib/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
7
14
|
"typings": "lib/index.d.ts",
|
|
8
15
|
"scripts": {
|
|
9
16
|
"build": "fluentui-scripts build",
|
|
@@ -22,10 +29,10 @@
|
|
|
22
29
|
"directory": "packages/components/Pressable"
|
|
23
30
|
},
|
|
24
31
|
"dependencies": {
|
|
25
|
-
"@fluentui-react-native/adapters": "0.13.
|
|
26
|
-
"@fluentui-react-native/interactive-hooks": "0.27.
|
|
27
|
-
"@uifabricshared/foundation-composable": "0.13.
|
|
28
|
-
"@uifabricshared/foundation-settings": "0.15.
|
|
32
|
+
"@fluentui-react-native/adapters": "0.13.3",
|
|
33
|
+
"@fluentui-react-native/interactive-hooks": "0.27.7",
|
|
34
|
+
"@uifabricshared/foundation-composable": "0.13.4",
|
|
35
|
+
"@uifabricshared/foundation-settings": "0.15.4"
|
|
29
36
|
},
|
|
30
37
|
"devDependencies": {
|
|
31
38
|
"@babel/core": "^7.20.0",
|
|
@@ -35,7 +42,9 @@
|
|
|
35
42
|
"@react-native/metro-config": "^0.74.0",
|
|
36
43
|
"@types/react": "~18.2.0",
|
|
37
44
|
"react": "18.2.0",
|
|
38
|
-
"react-native": "^0.74.0"
|
|
45
|
+
"react-native": "^0.74.0",
|
|
46
|
+
"react-native-macos": "^0.74.0",
|
|
47
|
+
"react-native-windows": "^0.74.0"
|
|
39
48
|
},
|
|
40
49
|
"peerDependencies": {
|
|
41
50
|
"@office-iss/react-native-win32": "^0.74.0",
|
|
@@ -61,9 +70,12 @@
|
|
|
61
70
|
]
|
|
62
71
|
},
|
|
63
72
|
"capabilities": [
|
|
73
|
+
"babel-preset-react-native",
|
|
64
74
|
"core",
|
|
65
75
|
"core-android",
|
|
66
76
|
"core-ios",
|
|
77
|
+
"core-macos",
|
|
78
|
+
"core-windows",
|
|
67
79
|
"react"
|
|
68
80
|
]
|
|
69
81
|
}
|
package/.eslintrc.js
DELETED