@fluentui-react-native/experimental-expander 0.8.4 → 0.8.5

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 CHANGED
@@ -2,7 +2,42 @@
2
2
  "name": "@fluentui-react-native/experimental-expander",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 12 Jun 2025 03:17:20 GMT",
5
+ "date": "Thu, 10 Jul 2025 20:30:40 GMT",
6
+ "version": "0.8.5",
7
+ "tag": "@fluentui-react-native/experimental-expander_v0.8.5",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "ruaraki@microsoft.com",
12
+ "package": "@fluentui-react-native/experimental-expander",
13
+ "commit": "a245202877ef7f2be9ab5f0e1356b2270957e693",
14
+ "comment": "Run bump-versions"
15
+ },
16
+ {
17
+ "author": "jasonmo@microsoft.com",
18
+ "package": "@fluentui-react-native/experimental-expander",
19
+ "commit": "54087dca787180bbf34630470cd0d06e88366b30",
20
+ "comment": "update eslint to 9.x and use new flat config format with security rules"
21
+ },
22
+ {
23
+ "author": "4123478+tido64@users.noreply.github.com",
24
+ "package": "@fluentui-react-native/experimental-expander",
25
+ "commit": "79bb06f6bbfd0a36f9d2ef371f4857be9660f027",
26
+ "comment": "Fixed `align-deps` warnings"
27
+ }
28
+ ],
29
+ "patch": [
30
+ {
31
+ "author": "jasonmo@microsoft.com",
32
+ "package": "@fluentui-react-native/experimental-expander",
33
+ "commit": "479b93cea460a26df70c55b5d3335927ed374713",
34
+ "comment": "update builds to use node16 settings and modern export maps"
35
+ }
36
+ ]
37
+ }
38
+ },
39
+ {
40
+ "date": "Thu, 10 Jul 2025 19:20:24 GMT",
6
41
  "version": "0.8.4",
7
42
  "tag": "@fluentui-react-native/experimental-expander_v0.8.4",
8
43
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,20 @@
1
1
  # Change Log - @fluentui-react-native/experimental-expander
2
2
 
3
- <!-- This log was last generated on Thu, 12 Jun 2025 03:17:20 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Thu, 10 Jul 2025 20:30:40 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.8.5
8
+
9
+ Thu, 10 Jul 2025 20:30:40 GMT
10
+
11
+ ### Patches
12
+
13
+ - update builds to use node16 settings and modern export maps (jasonmo@microsoft.com)
14
+
7
15
  ## 0.8.4
8
16
 
9
- Thu, 12 Jun 2025 03:17:20 GMT
17
+ Thu, 10 Jul 2025 19:20:24 GMT
10
18
 
11
19
  ### Patches
12
20
 
@@ -0,0 +1,3 @@
1
+ const baseConfig = require('@fluentui-react-native/eslint-config-rules');
2
+
3
+ module.exports = baseConfig;
package/lib/Expander.js CHANGED
@@ -3,53 +3,6 @@
3
3
  * Licensed under the MIT License.
4
4
  * @format
5
5
  */
6
- var __assign = (this && this.__assign) || function () {
7
- __assign = Object.assign || function(t) {
8
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9
- s = arguments[i];
10
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
- t[p] = s[p];
12
- }
13
- return t;
14
- };
15
- return __assign.apply(this, arguments);
16
- };
17
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
- return new (P || (P = Promise))(function (resolve, reject) {
20
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
- step((generator = generator.apply(thisArg, _arguments || [])).next());
24
- });
25
- };
26
- var __generator = (this && this.__generator) || function (thisArg, body) {
27
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
- function verb(n) { return function (v) { return step([n, v]); }; }
30
- function step(op) {
31
- if (f) throw new TypeError("Generator is already executing.");
32
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
- if (y = 0, t) op = [op[0] & 2, t.value];
35
- switch (op[0]) {
36
- case 0: case 1: t = op; break;
37
- case 4: _.label++; return { value: op[1], done: false };
38
- case 5: _.label++; y = op[1]; op = [0]; continue;
39
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
- default:
41
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
- if (t[2]) _.ops.pop();
46
- _.trys.pop(); continue;
47
- }
48
- op = body.call(thisArg, _);
49
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
- }
52
- };
53
6
  /** @jsxRuntime classic */
54
7
  /** @jsx withSlots */
55
8
  import * as React from 'react';
@@ -57,47 +10,30 @@ import { compose, mergeProps, withSlots, buildProps } from '@fluentui-react-nati
57
10
  import { expanderName } from './Expander.types';
58
11
  import ExpanderComponent from './ExpanderNativeComponent';
59
12
  function delay(ms) {
60
- return new Promise(function (resolve) { return setTimeout(resolve, ms); });
13
+ return new Promise((resolve) => setTimeout(resolve, ms));
61
14
  }
62
- export var Expander = compose({
15
+ export const Expander = compose({
63
16
  displayName: expanderName,
64
17
  tokens: [{}, expanderName],
65
18
  slotProps: {
66
- root: buildProps(function (tokens) { return (__assign({}, tokens)); }),
19
+ root: buildProps((tokens) => ({ ...tokens })),
67
20
  },
68
21
  slots: { root: ExpanderComponent },
69
- useRender: function (userProps, useSlots) {
70
- var Root = useSlots(userProps).root;
71
- var _a = React.useState(userProps.expanded), expandedState = _a[0], setExpandedState = _a[1];
72
- var expanderHeight = expandedState ? userProps.expandedHeight : userProps.collapsedHeight;
73
- var _onCollapsing = function () { return __awaiter(void 0, void 0, void 0, function () {
74
- var _a;
75
- return __generator(this, function (_b) {
76
- switch (_b.label) {
77
- case 0:
78
- (_a = userProps.onCollapsing) === null || _a === void 0 ? void 0 : _a.call(userProps);
79
- // Need to delay the height change so that the animation runs
80
- return [4 /*yield*/, delay(175)];
81
- case 1:
82
- // Need to delay the height change so that the animation runs
83
- _b.sent();
84
- setExpandedState(false);
85
- return [2 /*return*/];
86
- }
87
- });
88
- }); };
89
- var _onExpanding = function () {
90
- var _a;
91
- setExpandedState(true);
92
- (_a = userProps.onExpanding) === null || _a === void 0 ? void 0 : _a.call(userProps);
22
+ useRender: (userProps, useSlots) => {
23
+ const Root = useSlots(userProps).root;
24
+ const [expandedState, setExpandedState] = React.useState(userProps.expanded);
25
+ const expanderHeight = expandedState ? userProps.expandedHeight : userProps.collapsedHeight;
26
+ const _onCollapsing = async () => {
27
+ userProps.onCollapsing?.();
28
+ // Need to delay the height change so that the animation runs
29
+ await delay(175);
30
+ setExpandedState(false);
93
31
  };
94
- return function (rest) {
95
- var children = [];
96
- for (var _i = 1; _i < arguments.length; _i++) {
97
- children[_i - 1] = arguments[_i];
98
- }
99
- return (withSlots(Root, __assign({}, mergeProps(userProps, rest), { height: expanderHeight, onCollapsing: _onCollapsing, onExpanding: _onExpanding }), children));
32
+ const _onExpanding = () => {
33
+ setExpandedState(true);
34
+ userProps.onExpanding?.();
100
35
  };
36
+ return (rest, ...children) => (withSlots(Root, { ...mergeProps(userProps, rest), height: expanderHeight, onCollapsing: _onCollapsing, onExpanding: _onExpanding }, children));
101
37
  },
102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//# sourceMappingURL=Expander.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Expander.types.js","sourceRoot":"","sources":["../src/Expander.types.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,IAAM,YAAY,GAAG,UAAU,CAAC"}
1
+ {"version":3,"file":"Expander.types.js","sourceRoot":"","sources":["../src/Expander.types.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC"}
@@ -4,17 +4,6 @@
4
4
  * Licensed under the MIT License.
5
5
  * @format
6
6
  */
7
- var __assign = (this && this.__assign) || function () {
8
- __assign = Object.assign || function(t) {
9
- for (var s, i = 1, n = arguments.length; i < n; i++) {
10
- s = arguments[i];
11
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
12
- t[p] = s[p];
13
- }
14
- return t;
15
- };
16
- return __assign.apply(this, arguments);
17
- };
18
7
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
19
8
  if (k2 === undefined) k2 = k;
20
9
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -38,42 +27,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
38
27
  __setModuleDefault(result, mod);
39
28
  return result;
40
29
  };
41
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
- return new (P || (P = Promise))(function (resolve, reject) {
44
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
- step((generator = generator.apply(thisArg, _arguments || [])).next());
48
- });
49
- };
50
- var __generator = (this && this.__generator) || function (thisArg, body) {
51
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
- function verb(n) { return function (v) { return step([n, v]); }; }
54
- function step(op) {
55
- if (f) throw new TypeError("Generator is already executing.");
56
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
- if (y = 0, t) op = [op[0] & 2, t.value];
59
- switch (op[0]) {
60
- case 0: case 1: t = op; break;
61
- case 4: _.label++; return { value: op[1], done: false };
62
- case 5: _.label++; y = op[1]; op = [0]; continue;
63
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
- default:
65
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
- if (t[2]) _.ops.pop();
70
- _.trys.pop(); continue;
71
- }
72
- op = body.call(thisArg, _);
73
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
- }
76
- };
77
30
  var __importDefault = (this && this.__importDefault) || function (mod) {
78
31
  return (mod && mod.__esModule) ? mod : { "default": mod };
79
32
  };
@@ -81,52 +34,35 @@ Object.defineProperty(exports, "__esModule", { value: true });
81
34
  exports.Expander = void 0;
82
35
  /** @jsxRuntime classic */
83
36
  /** @jsx withSlots */
84
- var React = __importStar(require("react"));
85
- var framework_1 = require("@fluentui-react-native/framework");
86
- var Expander_types_1 = require("./Expander.types");
87
- var ExpanderNativeComponent_1 = __importDefault(require("./ExpanderNativeComponent"));
37
+ const React = __importStar(require("react"));
38
+ const framework_1 = require("@fluentui-react-native/framework");
39
+ const Expander_types_1 = require("./Expander.types");
40
+ const ExpanderNativeComponent_1 = __importDefault(require("./ExpanderNativeComponent"));
88
41
  function delay(ms) {
89
- return new Promise(function (resolve) { return setTimeout(resolve, ms); });
42
+ return new Promise((resolve) => setTimeout(resolve, ms));
90
43
  }
91
44
  exports.Expander = (0, framework_1.compose)({
92
45
  displayName: Expander_types_1.expanderName,
93
46
  tokens: [{}, Expander_types_1.expanderName],
94
47
  slotProps: {
95
- root: (0, framework_1.buildProps)(function (tokens) { return (__assign({}, tokens)); }),
48
+ root: (0, framework_1.buildProps)((tokens) => ({ ...tokens })),
96
49
  },
97
50
  slots: { root: ExpanderNativeComponent_1.default },
98
- useRender: function (userProps, useSlots) {
99
- var Root = useSlots(userProps).root;
100
- var _a = React.useState(userProps.expanded), expandedState = _a[0], setExpandedState = _a[1];
101
- var expanderHeight = expandedState ? userProps.expandedHeight : userProps.collapsedHeight;
102
- var _onCollapsing = function () { return __awaiter(void 0, void 0, void 0, function () {
103
- var _a;
104
- return __generator(this, function (_b) {
105
- switch (_b.label) {
106
- case 0:
107
- (_a = userProps.onCollapsing) === null || _a === void 0 ? void 0 : _a.call(userProps);
108
- // Need to delay the height change so that the animation runs
109
- return [4 /*yield*/, delay(175)];
110
- case 1:
111
- // Need to delay the height change so that the animation runs
112
- _b.sent();
113
- setExpandedState(false);
114
- return [2 /*return*/];
115
- }
116
- });
117
- }); };
118
- var _onExpanding = function () {
119
- var _a;
120
- setExpandedState(true);
121
- (_a = userProps.onExpanding) === null || _a === void 0 ? void 0 : _a.call(userProps);
51
+ useRender: (userProps, useSlots) => {
52
+ const Root = useSlots(userProps).root;
53
+ const [expandedState, setExpandedState] = React.useState(userProps.expanded);
54
+ const expanderHeight = expandedState ? userProps.expandedHeight : userProps.collapsedHeight;
55
+ const _onCollapsing = async () => {
56
+ userProps.onCollapsing?.();
57
+ // Need to delay the height change so that the animation runs
58
+ await delay(175);
59
+ setExpandedState(false);
122
60
  };
123
- return function (rest) {
124
- var children = [];
125
- for (var _i = 1; _i < arguments.length; _i++) {
126
- children[_i - 1] = arguments[_i];
127
- }
128
- return ((0, framework_1.withSlots)(Root, __assign({}, (0, framework_1.mergeProps)(userProps, rest), { height: expanderHeight, onCollapsing: _onCollapsing, onExpanding: _onExpanding }), children));
61
+ const _onExpanding = () => {
62
+ setExpandedState(true);
63
+ userProps.onExpanding?.();
129
64
  };
65
+ return (rest, ...children) => ((0, framework_1.withSlots)(Root, { ...(0, framework_1.mergeProps)(userProps, rest), height: expanderHeight, onCollapsing: _onCollapsing, onExpanding: _onExpanding }, children));
130
66
  },
131
67
  });
132
68
  //# sourceMappingURL=Expander.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Expander.js","sourceRoot":"","sources":["../src/Expander.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0BAA0B;AAC1B,qBAAqB;AACrB,2CAA+B;AAG/B,8DAA8F;AAG9F,mDAAgD;AAChD,sFAA0D;AAE1D,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,IAAK,OAAA,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,EAAvB,CAAuB,CAAC,CAAC;AAC3D,CAAC;AAEY,QAAA,QAAQ,GAAG,IAAA,mBAAO,EAAe;IAC5C,WAAW,EAAE,6BAAY;IACzB,MAAM,EAAE,CAAC,EAAE,EAAE,6BAAY,CAAC;IAC1B,SAAS,EAAE;QACT,IAAI,EAAE,IAAA,sBAAU,EAAC,UAAC,MAAM,IAAK,OAAA,cAAM,MAAM,EAAG,EAAf,CAAe,CAAC;KAC9C;IACD,KAAK,EAAE,EAAE,IAAI,EAAE,iCAAiB,EAAE;IAClC,SAAS,EAAE,UAAC,SAAwB,EAAE,QAAgC;QACpE,IAAM,IAAI,GAAG,QAAQ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AE,aAAa,EAAE,WAAW,EAAE,YAAY,IAClH,QAAQ,CACJ,CACR,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -1,13 +1 @@
1
- "use strict";
2
- /**
3
- * Copyright (c) Microsoft Corporation.
4
- * Licensed under the MIT License.
5
- * @format
6
- */
7
- var __importDefault = (this && this.__importDefault) || function (mod) {
8
- return (mod && mod.__esModule) ? mod : { "default": mod };
9
- };
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- var codegenNativeComponent_1 = __importDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
12
- exports.default = (0, codegenNativeComponent_1.default)('ExpanderView');
13
- //# sourceMappingURL=ExpanderNativeComponent.js.map
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.__INTERNAL_VIEW_CONFIG=void 0;var _codegenNativeComponent=_interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));var NativeComponentRegistry=require('react-native/Libraries/NativeComponent/NativeComponentRegistry');var _require=require('react-native/Libraries/NativeComponent/ViewConfigIgnore'),ConditionallyIgnoredEventHandlers=_require.ConditionallyIgnoredEventHandlers;var nativeComponentName='ExpanderView';var __INTERNAL_VIEW_CONFIG=exports.__INTERNAL_VIEW_CONFIG={uiViewClassName:'ExpanderView',directEventTypes:{topCollapsing:{registrationName:'onCollapsing'},topExpanding:{registrationName:'onExpanding'}},validAttributes:Object.assign({expandDirection:true,expanded:true,enabled:true,width:true,height:true,contentHorizontalAlignment:true,contentVerticalAlignment:true,headerBackground:{process:require('react-native/Libraries/StyleSheet/processColor').default},headerForeground:{process:require('react-native/Libraries/StyleSheet/processColor').default},headerForegroundPointerOver:{process:require('react-native/Libraries/StyleSheet/processColor').default},headerForegroundPressed:{process:require('react-native/Libraries/StyleSheet/processColor').default},headerBorderBrush:{process:require('react-native/Libraries/StyleSheet/processColor').default},headerBorderPointerOverBrush:{process:require('react-native/Libraries/StyleSheet/processColor').default},headerBorderPressedBrush:{process:require('react-native/Libraries/StyleSheet/processColor').default},headerDisabledForeground:{process:require('react-native/Libraries/StyleSheet/processColor').default},headerDisabledBorderBrush:{process:require('react-native/Libraries/StyleSheet/processColor').default},headerBorderThickness:true,contentBackground:{process:require('react-native/Libraries/StyleSheet/processColor').default},contentBorderBrush:{process:require('react-native/Libraries/StyleSheet/processColor').default},chevronBackground:{process:require('react-native/Libraries/StyleSheet/processColor').default},chevronForeground:{process:require('react-native/Libraries/StyleSheet/processColor').default},chevronPointerOverBackground:{process:require('react-native/Libraries/StyleSheet/processColor').default},chevronPointerOverForeground:{process:require('react-native/Libraries/StyleSheet/processColor').default},chevronPressedBackground:{process:require('react-native/Libraries/StyleSheet/processColor').default},chevronPressedForeground:{process:require('react-native/Libraries/StyleSheet/processColor').default},chevronBorderThickness:true,chevronBorderBrush:{process:require('react-native/Libraries/StyleSheet/processColor').default},chevronBorderPointerOverBrush:{process:require('react-native/Libraries/StyleSheet/processColor').default},chevronBorderPressedBrush:{process:require('react-native/Libraries/StyleSheet/processColor').default}},ConditionallyIgnoredEventHandlers({onCollapsing:true,onExpanding:true}))};var _default=exports.default=NativeComponentRegistry.get(nativeComponentName,function(){return __INTERNAL_VIEW_CONFIG;});
@@ -1 +1 @@
1
- {"version":3,"file":"ExpanderNativeComponent.js","sourceRoot":"","sources":["../src/ExpanderNativeComponent.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AAKH,mHAA6F;AAqC7F,kBAAe,IAAA,gCAAsB,EACnC,cAAc,CACe,CAAC"}
1
+ {"version":3,"file":"ExpanderNativeComponent.js","sourceRoot":"","sources":["../src/ExpanderNativeComponent.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AAKH,qHAA6F;AAqC7F,kBAAe,IAAA,gCAAsB,EACnC,cAAc,CACe,CAAC"}
package/package.json CHANGED
@@ -1,12 +1,19 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/experimental-expander",
3
- "version": "0.8.4",
3
+ "version": "0.8.5",
4
4
  "description": "A cross-platform Native Expander component using the Fluent Design System. Currently only implemented on windows",
5
5
  "license": "MIT",
6
6
  "author": "Microsoft <fluentuinativeowners@microsoft.com>",
7
7
  "homepage": "https://github.com/microsoft/fluentui-react-native",
8
8
  "main": "lib-commonjs/index.js",
9
9
  "module": "lib/index.js",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./lib/index.js",
13
+ "require": "./lib-commonjs/index.js",
14
+ "types": "./lib/index.d.ts"
15
+ }
16
+ },
10
17
  "typings": "lib/index.d.ts",
11
18
  "scripts": {
12
19
  "build": "fluentui-scripts build",
@@ -26,7 +33,7 @@
26
33
  "directory": "packages/experimental/Expander"
27
34
  },
28
35
  "dependencies": {
29
- "@fluentui-react-native/framework": "0.14.3"
36
+ "@fluentui-react-native/framework": "0.14.4"
30
37
  },
31
38
  "devDependencies": {
32
39
  "@babel/core": "^7.20.0",
@@ -37,6 +44,7 @@
37
44
  "@types/react": "~18.2.0",
38
45
  "react": "18.2.0",
39
46
  "react-native": "^0.74.0",
47
+ "react-native-macos": "^0.74.0",
40
48
  "react-native-windows": "^0.74.0"
41
49
  },
42
50
  "peerDependencies": {
@@ -61,9 +69,11 @@
61
69
  ]
62
70
  },
63
71
  "capabilities": [
72
+ "babel-preset-react-native",
64
73
  "core",
65
74
  "core-android",
66
75
  "core-ios",
76
+ "core-macos",
67
77
  "core-windows",
68
78
  "react"
69
79
  ]
package/.eslintrc.js DELETED
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- extends: ['@fluentui-react-native/eslint-config-rules'],
3
- };