@mui/x-internals 8.0.0-alpha.5 → 8.0.0-alpha.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.md +206 -1
- package/esm/forwardRef/forwardRef.js +15 -0
- package/esm/forwardRef/index.js +1 -0
- package/esm/types/AppendKeys.js +1 -0
- package/esm/types/PrependKeys.js +1 -0
- package/esm/types/index.js +2 -0
- package/forwardRef/forwardRef.d.ts +4 -0
- package/forwardRef/forwardRef.js +23 -0
- package/forwardRef/index.d.ts +1 -0
- package/forwardRef/index.js +16 -0
- package/forwardRef/package.json +6 -0
- package/modern/forwardRef/forwardRef.js +15 -0
- package/modern/forwardRef/index.js +1 -0
- package/modern/types/AppendKeys.js +1 -0
- package/modern/types/PrependKeys.js +1 -0
- package/modern/types/index.js +2 -0
- package/package.json +1 -1
- package/types/AppendKeys.d.ts +13 -0
- package/types/AppendKeys.js +5 -0
- package/types/PrependKeys.d.ts +13 -0
- package/types/PrependKeys.js +5 -0
- package/types/index.d.ts +2 -0
- package/types/index.js +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,211 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.0.0-alpha.7
|
|
9
|
+
|
|
10
|
+
_Jan 9, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 📊 Charts legend is now an HTML element which can be styled more easily
|
|
15
|
+
- 💫 Support [aggregation with server-side data](/x/react-data-grid/server-side-data/aggregation/)
|
|
16
|
+
- 🏎️ Improve Data Grid aggregation performance
|
|
17
|
+
- 🌍 Add Chinese (Taiwan) (zh-TW) locale on the Date and Time Pickers
|
|
18
|
+
- 🌍 Improve Norwegian (nb-NO) locale on the Date and Time Pickers
|
|
19
|
+
- 🐞 Bugfixes
|
|
20
|
+
|
|
21
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
22
|
+
@derek-0000, @josteinjhauge, @k-rajat19, @nusr, @tomashauser.
|
|
23
|
+
Following are all team members who have contributed to this release:
|
|
24
|
+
@cherniavskii, @flaviendelangle, @JCQuintas, @LukasTy, @MBilalShafi, @arminmeh, @romgrk, @oliviertassinari.
|
|
25
|
+
|
|
26
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
27
|
+
|
|
28
|
+
### Data Grid
|
|
29
|
+
|
|
30
|
+
#### `@mui/x-data-grid@8.0.0-alpha.7`
|
|
31
|
+
|
|
32
|
+
- [DataGrid] Improve React 19 support (#15769) @LukasTy
|
|
33
|
+
- [DataGrid] Add `name` attribute to the checkbox selection column (#15178) @derek-0000
|
|
34
|
+
- [DataGrid] Fix number filter field formatting values while typing (#16062) @arminmeh
|
|
35
|
+
- [DataGrid] Fix select all checkbox state reset with server side data (#16034) @MBilalShafi
|
|
36
|
+
- [DataGrid] Refactor: create base button props (#15930) @romgrk
|
|
37
|
+
- [DataGrid] Refactor: create tooltip props (#16086) @romgrk
|
|
38
|
+
- [DataGrid] Fix TS error (#16046) @cherniavskii
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-data-grid-pro@8.0.0-alpha.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
41
|
+
|
|
42
|
+
Same changes as in `@mui/x-data-grid@8.0.0-alpha.7`.
|
|
43
|
+
|
|
44
|
+
#### `@mui/x-data-grid-premium@8.0.0-alpha.7` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
45
|
+
|
|
46
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.7`, plus:
|
|
47
|
+
|
|
48
|
+
- [DataGridPremium] Improve aggregation performance for multiple columns (#16097) @cherniavskii
|
|
49
|
+
- [DataGridPremium] Make Aggregation keyboard accessible in the column menu (#15934) @k-rajat19
|
|
50
|
+
- [DataGridPremium] Server-side aggregation with data source (#15741) @MBilalShafi
|
|
51
|
+
|
|
52
|
+
### Date and Time Pickers
|
|
53
|
+
|
|
54
|
+
#### Breaking changes
|
|
55
|
+
|
|
56
|
+
- The `date-fns` and `date-fns-jalali` date library adapters have been renamed to better align with the current stable major versions — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#✅-rename-date-fns-adapter-imports)
|
|
57
|
+
- Update default `closeOnSelect` and Action Bar `actions` values - [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#update-default-closeonselect-and-action-bar-actions-values)
|
|
58
|
+
- The component passed to the `layout` slot no longer receives the `value`, `onChange` and `onSelectShortcut` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-layout).
|
|
59
|
+
- The component passed to the `toolbar` slot no longer receives the `value`, `onChange` and `isLandscape` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-toolbar).
|
|
60
|
+
- The component passed to the `shortcuts` slot no longer receives the `onChange`, `isValid` and `isLandscape` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-shortcuts).
|
|
61
|
+
- The `PickerShortcutChangeImportance` type has been renamed `PickerChangeImportance` — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#renamed-variables-and-types).
|
|
62
|
+
- The component passed to the `layout` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-layout).
|
|
63
|
+
- The component passed to the `toolbar` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-toolbar).
|
|
64
|
+
- The component passed to the `tabs` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-tabs).
|
|
65
|
+
|
|
66
|
+
#### `@mui/x-date-pickers@8.0.0-alpha.7`
|
|
67
|
+
|
|
68
|
+
- [fields] Handle focusing container with `inputRef.current.focus` on `accessibleFieldDOMStructure` (#15985) @LukasTy
|
|
69
|
+
- [pickers] Always use `setValue` internally to update the picker value (#16056) @flaviendelangle
|
|
70
|
+
- [pickers] Create a new context to pass the range position props to the layout components and to the views (#15846) @flaviendelangle
|
|
71
|
+
- [pickers] Introduce a new concept of `manager` (#15339) @flaviendelangle
|
|
72
|
+
- [pickers] Improve React 19 support (#15769) @LukasTy
|
|
73
|
+
- [pickers] Memoize `<PickersActionBar />` (#16071) @LukasTy
|
|
74
|
+
- [pickers] Remove `NonEmptyDateRange` type (#16035) @flaviendelangle
|
|
75
|
+
- [pickers] Rename `AdapterDateFns` into `AdapterDateFnsV2` and `AdapterDateFnsV3` into `AdapterDateFns` (#16082) @LukasTy
|
|
76
|
+
- [pickers] Rename `ctx.onViewChange` to `ctx.setView` and add it to the actions context (#16044) @flaviendelangle
|
|
77
|
+
- [pickers] Support `date-fns-jalali` v4 (#16011) @LukasTy
|
|
78
|
+
- [pickers] Update `closeOnSelect` and `actionBar.actions` default values (#15944) @LukasTy
|
|
79
|
+
- [pickers] Use `usePickerContext()` and `usePickerActionsContext()` instead of passing props to the `shortcuts` and `toolbar` slots (#15948) @flaviendelangle
|
|
80
|
+
- [l10n] Add Chinese (Taiwan) (zh-TW) locale (#16033) @nusr
|
|
81
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#16089) @josteinjhauge
|
|
82
|
+
|
|
83
|
+
#### `@mui/x-date-pickers-pro@8.0.0-alpha.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
84
|
+
|
|
85
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-alpha.7`.
|
|
86
|
+
|
|
87
|
+
### Charts
|
|
88
|
+
|
|
89
|
+
#### Breaking changes
|
|
90
|
+
|
|
91
|
+
- Removed `DefaultChartsLegend` component, since it is now easier to create custom legends — [Learn more](https://next.mui.com/x/react-charts/components/#html-components).
|
|
92
|
+
- The default legend is now an HTML element and can be styled more easily.
|
|
93
|
+
- The `width` and `height` properties of the charts now only apply to the `svg` element, and not their wrappers, this might cause some layout shifts.
|
|
94
|
+
- `slotProps.legend.direction` now accepts `'horizontal' | 'vertical'` instead of `'row' | 'column'` — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#legend-direction-value-change-✅).
|
|
95
|
+
- The `getSeriesToDisplay` function was removed in favor of the `useLegend` hook. — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#the-getseriestodisplay-function-was-removed).
|
|
96
|
+
|
|
97
|
+
#### `@mui/x-charts@8.0.0-alpha.7`
|
|
98
|
+
|
|
99
|
+
- [charts] New HTML legend & styles (#15733) @JCQuintas
|
|
100
|
+
- [charts] Improve React 19 support (#15769) @LukasTy
|
|
101
|
+
- [charts] Fix 301 redirection in the API documentation @oliviertassinari
|
|
102
|
+
|
|
103
|
+
#### `@mui/x-charts-pro@8.0.0-alpha.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
104
|
+
|
|
105
|
+
Same changes as in `@mui/x-charts@8.0.0-alpha.7`.
|
|
106
|
+
|
|
107
|
+
### Tree View
|
|
108
|
+
|
|
109
|
+
#### `@mui/x-tree-view@8.0.0-alpha.7`
|
|
110
|
+
|
|
111
|
+
- [TreeView] Improve React 19 support (#15769) @LukasTy
|
|
112
|
+
|
|
113
|
+
#### `@mui/x-tree-view-pro@8.0.0-alpha.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
114
|
+
|
|
115
|
+
Same changes as in `@mui/x-tree-view@8.0.0-alpha.7`.
|
|
116
|
+
|
|
117
|
+
### Docs
|
|
118
|
+
|
|
119
|
+
- [docs] Fix `EditingWithDatePickers` demo (#15967) @k-rajat19
|
|
120
|
+
- [docs] Fix inconsistent multi input range field separators (#16043) @flaviendelangle
|
|
121
|
+
- [docs] Fix non-existing "adapter" property of `LocalizationProvider` (#16084) @tomashauser
|
|
122
|
+
- [docs] Refactor Data Grid with Date Pickers example (#15992) @LukasTy
|
|
123
|
+
- [docs] Unify the wording of the pickers slots breaking changes (#16036) @flaviendelangle
|
|
124
|
+
|
|
125
|
+
### Core
|
|
126
|
+
|
|
127
|
+
- [core] Clarify the release strategy (#16014) @MBilalShafi
|
|
128
|
+
- [core] Small fixes on docs @oliviertassinari
|
|
129
|
+
- [core] Sync with other repos @oliviertassinari
|
|
130
|
+
- [core] Update the `release:version` docs (#16038) @cherniavskii
|
|
131
|
+
- [code-infra] Add `testSkipIf` and `describeSkipIf` (#16049) @JCQuintas
|
|
132
|
+
- [test] Stabilize flaky Data Grid tests (#16053) @LukasTy
|
|
133
|
+
|
|
134
|
+
## 8.0.0-alpha.6
|
|
135
|
+
|
|
136
|
+
_Dec 26, 2024_
|
|
137
|
+
|
|
138
|
+
We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
|
|
139
|
+
|
|
140
|
+
- 🏎️ Improve Data Grid scrolling performance
|
|
141
|
+
- 🌍 Improve Dutch (nl-NL) locale on the Data Grid
|
|
142
|
+
- 🐞 Bugfixes
|
|
143
|
+
|
|
144
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
145
|
+
@JoepVerkoelen, @k-rajat19, @lauri865.
|
|
146
|
+
Following are all team members who have contributed to this release:
|
|
147
|
+
@flaviendelangle, @JCQuintas, @LukasTy, @MBilalShafi, @romgrk.
|
|
148
|
+
|
|
149
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
150
|
+
|
|
151
|
+
### Data Grid
|
|
152
|
+
|
|
153
|
+
#### Breaking changes
|
|
154
|
+
|
|
155
|
+
- The `sanitizeFilterItemValue()` utility is not exported anymore.
|
|
156
|
+
|
|
157
|
+
#### `@mui/x-data-grid@8.0.0-alpha.6`
|
|
158
|
+
|
|
159
|
+
- [DataGrid] Avoid subscribing to `renderContext` state in grid root for better scroll performance (#15986) @lauri865
|
|
160
|
+
- [DataGrid] Fix header filters showing clear button while empty (#15829) @k-rajat19
|
|
161
|
+
- [DataGrid] Improve test coverage of server side data source (#15942) @MBilalShafi
|
|
162
|
+
- [DataGrid] Move progress components to leaf import (#15914) @romgrk
|
|
163
|
+
- [DataGrid] Move skeleton to leaf import (#15931) @romgrk
|
|
164
|
+
- [DataGrid] Replace `forwardRef` with a shim for forward compatibility (#15955) @lauri865
|
|
165
|
+
- [l10n] Improve Dutch (nl-NL) locale (#15994) @JoepVerkoelen
|
|
166
|
+
|
|
167
|
+
#### `@mui/x-data-grid-pro@8.0.0-alpha.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
168
|
+
|
|
169
|
+
Same changes as in `@mui/x-data-grid@8.0.0-alpha.6`.
|
|
170
|
+
|
|
171
|
+
#### `@mui/x-data-grid-premium@8.0.0-alpha.6` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
172
|
+
|
|
173
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.6`, plus:
|
|
174
|
+
|
|
175
|
+
- [DataGridPremium] Fix column unpinning with row grouping (#15908) @k-rajat19
|
|
176
|
+
|
|
177
|
+
### Date and Time Pickers
|
|
178
|
+
|
|
179
|
+
#### `@mui/x-date-pickers@8.0.0-alpha.6`
|
|
180
|
+
|
|
181
|
+
- [pickers] Use `usePickerContext()` and `usePickerActionsContext()` to get the actions in the `actionBar` slot and in internal components (#15843) @flaviendelangle
|
|
182
|
+
- [pickers] Use `usePickerContext()` to get the view-related props in the layout, toolbar and tabs slots (#15606) @flaviendelangle
|
|
183
|
+
|
|
184
|
+
#### `@mui/x-date-pickers-pro@8.0.0-alpha.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
185
|
+
|
|
186
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-alpha.6`.
|
|
187
|
+
|
|
188
|
+
### Charts
|
|
189
|
+
|
|
190
|
+
#### `@mui/x-charts@8.0.0-alpha.6`
|
|
191
|
+
|
|
192
|
+
No changes since `@mui/x-charts@v8.0.0-alpha.5`.
|
|
193
|
+
|
|
194
|
+
#### `@mui/x-charts-pro@8.0.0-alpha.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
195
|
+
|
|
196
|
+
Same changes as in `@mui/x-charts@8.0.0-alpha.6`.
|
|
197
|
+
|
|
198
|
+
### Tree View
|
|
199
|
+
|
|
200
|
+
#### `@mui/x-tree-view@8.0.0-alpha.6`
|
|
201
|
+
|
|
202
|
+
No changes since `@mui/x-tree-view-pro@v8.0.0-alpha.5`.
|
|
203
|
+
|
|
204
|
+
#### `@mui/x-tree-view-pro@8.0.0-alpha.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
205
|
+
|
|
206
|
+
Same changes as in `@mui/x-tree-view@8.0.0-alpha.6`.
|
|
207
|
+
|
|
208
|
+
### Docs
|
|
209
|
+
|
|
210
|
+
- [docs] Remove production profiler from docs build (#15959) @lauri865
|
|
211
|
+
- [code-infra] Add new `next-env.d.ts` changes (#15947) @JCQuintas
|
|
212
|
+
|
|
8
213
|
## 8.0.0-alpha.5
|
|
9
214
|
|
|
10
215
|
_Dec 19, 2024_
|
|
@@ -25,7 +230,7 @@ Following are all team members who have contributed to this release:
|
|
|
25
230
|
|
|
26
231
|
#### Breaking changes
|
|
27
232
|
|
|
28
|
-
- Passing additional props (like `data-*`, `aria-*`) directly on the Data Grid component is no longer supported. To pass the props, use `slotProps
|
|
233
|
+
- Passing additional props (like `data-*`, `aria-*`) directly on the Data Grid component is no longer supported. To pass the props, use `slotProps`:
|
|
29
234
|
|
|
30
235
|
- For `.root` element, use `slotProps.root`.
|
|
31
236
|
- For `.main` element (the one with `role="grid"`), use `slotProps.main`.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import reactMajor from "../reactMajor.js";
|
|
3
|
+
|
|
4
|
+
// Compatibility shim that ensures stable props object for forwardRef components
|
|
5
|
+
// Fixes https://github.com/facebook/react/issues/31613
|
|
6
|
+
// We ensure that the ref is always present in the props object (even if that's not the case for older versions of React) to avoid the footgun of spreading props over the ref in the newer versions of React.
|
|
7
|
+
// Footgun: <Component ref={ref} {...props} /> will break past React 19, but the types will now warn us that we should use <Component {...props} ref={ref} /> instead.
|
|
8
|
+
export const forwardRef = render => {
|
|
9
|
+
if (reactMajor >= 19) {
|
|
10
|
+
const Component = props => render(props, props.ref ?? null);
|
|
11
|
+
Component.displayName = render.displayName ?? render.name;
|
|
12
|
+
return Component;
|
|
13
|
+
}
|
|
14
|
+
return /*#__PURE__*/React.forwardRef(render);
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./forwardRef.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/types/index.js
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const forwardRef: <T, P = {}>(render: React.ForwardRefRenderFunction<T, P & {
|
|
3
|
+
ref: React.Ref<T>;
|
|
4
|
+
}>) => React.ForwardRefExoticComponent<P> | React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<T>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.forwardRef = void 0;
|
|
9
|
+
var React = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _reactMajor = _interopRequireDefault(require("../reactMajor"));
|
|
11
|
+
// Compatibility shim that ensures stable props object for forwardRef components
|
|
12
|
+
// Fixes https://github.com/facebook/react/issues/31613
|
|
13
|
+
// We ensure that the ref is always present in the props object (even if that's not the case for older versions of React) to avoid the footgun of spreading props over the ref in the newer versions of React.
|
|
14
|
+
// Footgun: <Component ref={ref} {...props} /> will break past React 19, but the types will now warn us that we should use <Component {...props} ref={ref} /> instead.
|
|
15
|
+
const forwardRef = render => {
|
|
16
|
+
if (_reactMajor.default >= 19) {
|
|
17
|
+
const Component = props => render(props, props.ref ?? null);
|
|
18
|
+
Component.displayName = render.displayName ?? render.name;
|
|
19
|
+
return Component;
|
|
20
|
+
}
|
|
21
|
+
return /*#__PURE__*/React.forwardRef(render);
|
|
22
|
+
};
|
|
23
|
+
exports.forwardRef = forwardRef;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './forwardRef';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _forwardRef = require("./forwardRef");
|
|
7
|
+
Object.keys(_forwardRef).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _forwardRef[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _forwardRef[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import reactMajor from "../reactMajor.js";
|
|
3
|
+
|
|
4
|
+
// Compatibility shim that ensures stable props object for forwardRef components
|
|
5
|
+
// Fixes https://github.com/facebook/react/issues/31613
|
|
6
|
+
// We ensure that the ref is always present in the props object (even if that's not the case for older versions of React) to avoid the footgun of spreading props over the ref in the newer versions of React.
|
|
7
|
+
// Footgun: <Component ref={ref} {...props} /> will break past React 19, but the types will now warn us that we should use <Component {...props} ref={ref} /> instead.
|
|
8
|
+
export const forwardRef = render => {
|
|
9
|
+
if (reactMajor >= 19) {
|
|
10
|
+
const Component = props => render(props, props.ref ?? null);
|
|
11
|
+
Component.displayName = render.displayName ?? render.name;
|
|
12
|
+
return Component;
|
|
13
|
+
}
|
|
14
|
+
return /*#__PURE__*/React.forwardRef(render);
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./forwardRef.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/modern/types/index.js
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type CapitalizeFirstLetter<S extends string> = S extends `${infer First}${infer Rest}` ? `${Uppercase<First>}${Rest}` : S;
|
|
2
|
+
/**
|
|
3
|
+
* Append string P to all keys in T.
|
|
4
|
+
* If K is provided, only append P to keys in K.
|
|
5
|
+
*
|
|
6
|
+
* @template T - The type to append keys to.
|
|
7
|
+
* @template P - The string to append.
|
|
8
|
+
* @template K - The keys to append P to.
|
|
9
|
+
*/
|
|
10
|
+
export type AppendKeys<T, P extends string, K extends string = string> = {
|
|
11
|
+
[key in keyof T as key extends K ? `${key}${CapitalizeFirstLetter<P>}` : key]: T[key];
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type CapitalizeFirstLetter<S extends string> = S extends `${infer First}${infer Rest}` ? `${Uppercase<First>}${Rest}` : S;
|
|
2
|
+
/**
|
|
3
|
+
* Prepend string P to all keys in T.
|
|
4
|
+
* If K is provided, only prepend P to keys in K.
|
|
5
|
+
*
|
|
6
|
+
* @template T - The type to prepend keys to.
|
|
7
|
+
* @template P - The string to prepend.
|
|
8
|
+
* @template K - The keys to prepend P to.
|
|
9
|
+
*/
|
|
10
|
+
export type PrependKeys<T, P extends string, K extends string = string> = {
|
|
11
|
+
[key in keyof T as key extends K ? `${P}${CapitalizeFirstLetter<key>}` : key]: T[key];
|
|
12
|
+
};
|
|
13
|
+
export {};
|
package/types/index.d.ts
CHANGED
package/types/index.js
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
var _AppendKeys = require("./AppendKeys");
|
|
7
|
+
Object.keys(_AppendKeys).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _AppendKeys[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _AppendKeys[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
6
17
|
var _DefaultizedProps = require("./DefaultizedProps");
|
|
7
18
|
Object.keys(_DefaultizedProps).forEach(function (key) {
|
|
8
19
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -36,6 +47,17 @@ Object.keys(_MakeRequired).forEach(function (key) {
|
|
|
36
47
|
}
|
|
37
48
|
});
|
|
38
49
|
});
|
|
50
|
+
var _PrependKeys = require("./PrependKeys");
|
|
51
|
+
Object.keys(_PrependKeys).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _PrependKeys[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _PrependKeys[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
39
61
|
var _SlotComponentPropsFromProps = require("./SlotComponentPropsFromProps");
|
|
40
62
|
Object.keys(_SlotComponentPropsFromProps).forEach(function (key) {
|
|
41
63
|
if (key === "default" || key === "__esModule") return;
|