@carbon/upgrade 11.44.0-rc.0 → 11.45.0-rc.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/README.md CHANGED
@@ -342,6 +342,47 @@ npx @carbon/upgrade migrate slug-prop-to-decorator-prop --write
342
342
  <Component decorator="my-identifier">Content</Component>
343
343
  ```
344
344
 
345
+ ### Unstable / preview Pagination to Pagination
346
+
347
+ Migrates `unstable_Pagination` / `preview_Pagination` to the stable `Pagination`
348
+ component. Drops `PageSelector` imports and children render-props, since the
349
+ stable component renders an equivalent page-select control by default.
350
+
351
+ **Usage:**
352
+
353
+ ```bash
354
+ npx @carbon/upgrade migrate unstable-pagination-to-pagination --write
355
+ ```
356
+
357
+ **Example:**
358
+
359
+ ```jsx
360
+ // Before
361
+ import {
362
+ unstable_Pagination as Pagination,
363
+ unstable_PageSelector as PageSelector,
364
+ } from '@carbon/react';
365
+
366
+ <Pagination pageSizes={[10, 20, 30]} totalItems={100}>
367
+ {({ currentPage, onSetPage, totalPages }) => (
368
+ <PageSelector
369
+ currentPage={currentPage}
370
+ onChange={(event) => onSetPage(event.target.value)}
371
+ totalPages={totalPages}
372
+ />
373
+ )}
374
+ </Pagination>;
375
+
376
+ // After
377
+ import { Pagination } from '@carbon/react';
378
+
379
+ <Pagination pageSizes={[10, 20, 30]} totalItems={100} />;
380
+ ```
381
+
382
+ Custom page-select children are removed and a `TODO` comment is left to migrate
383
+ them with `renderPageSelect` if needed. Omit `pageSizes` to hide the items per
384
+ page selector.
385
+
345
386
  ### FeatureFlag deprecate flags prop
346
387
 
347
388
  Updates FeatureFlags component to use individual boolean props instead of the