@wise/wds-codemods 1.2.0-experimental-acc64af → 1.2.0-experimental-cf027a0

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.
@@ -4,9 +4,10 @@
4
4
 
5
5
  1. Remove imports: `{ ActionOption, NavigationOption, NavigationOptionList, Summary, SwitchOption, CheckboxOption, RadioOption }` from `'@transferwise/components'`
6
6
  2. Add import: `{ ListItem }` from `'@transferwise/components'`
7
- 3. For Summary with info: Add `{ Modal }` and/or `{ Popover }` from `'@transferwise/components'`
8
- 4. For Summary with info: Add `{ QuestionMarkCircle }` from `'@transferwise/icons'`
9
- 5. For Summary with info modal: Add `{ useState }` from `'react'`
7
+ 3. For `ul`/`ol` wrappers or `NavigationOptionList`: Add `{ List }` from `'@transferwise/components'`
8
+ 4. For Summary with info: Add `{ Modal }` and/or `{ Popover }` from `'@transferwise/components'`
9
+ 5. For Summary with info: Add `{ QuestionMarkCircle }` from `'@transferwise/icons'`
10
+ 6. For Summary with info modal: Add `{ useState }` from `'react'`
10
11
 
11
12
  ## Universal Rules
12
13
 
@@ -16,6 +17,21 @@
16
17
  4. `id` stays on `ListItem` (not controls)
17
18
  5. Remove deprecated props: `as`, `complex`, `showMediaAtAllSizes`, `showMediaCircle`, `isContainerAligned`
18
19
  6. Preserve string quotes exactly as they are (don't convert ``to`'`or`"`)
20
+ 7. `ListItem` renders as a `li` element by default, it doesn't need wrapping
21
+ 8. Convert `<ul>` or `<ol>` wrappers containing legacy components to `<List>` (import from `'@transferwise/components'`)
22
+
23
+ ---
24
+
25
+ ## List Wrapper Conversion
26
+
27
+ - Convert `<ul>` or `<ol>` wrappers to `<List>`
28
+ - `<List>` defaults to `ul`, but can be `ol` or `div` via the `as` property
29
+ - Use `<List as="ol">` when converting `<ol>` tags to preserve semantic HTML
30
+
31
+ ```tsx
32
+ <ul><ActionOption /></ul> → <List><ListItem /></List>
33
+ <ol><ActionOption /></ol> → <List as="ol"><ListItem /></List>
34
+ ```
19
35
 
20
36
  ---
21
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/wds-codemods",
3
- "version": "1.2.0-experimental-acc64af",
3
+ "version": "1.2.0-experimental-cf027a0",
4
4
  "license": "UNLICENSED",
5
5
  "author": "Wise Payments Ltd.",
6
6
  "repository": {