|
| 1 | +# Migration from 0.63.1 to 1.0.0 |
| 2 | + |
| 3 | +This will walk you through changes done from 0.63.1 to 1.0.0 |
| 4 | + |
| 5 | +## General |
| 6 | + |
| 7 | +- `size` is now `data-size` |
| 8 | + - `small`, `medium` and `large` have been removed as size keywords. Use `sm`, `md` and `lg` |
| 9 | +- `color` is now `data-color` |
| 10 | +- All `portal`-props have been removed |
| 11 | +- All `inverted`-props has been removed, use `data-color-scheme="dark"` |
| 12 | +- All `spacing`-props has been removed |
| 13 | + |
| 14 | +## Components |
| 15 | + |
| 16 | +### Accordion |
| 17 | +- Renamed to `Details` |
| 18 | +- `border` prop has been deprecated |
| 19 | + |
| 20 | +To get a bordered details, place it inside a `Card` |
| 21 | + |
| 22 | +### Alert |
| 23 | +- `elevated` prop has been removed |
| 24 | +- `iconTitle` prop has been removed |
| 25 | +- `severity` prop has been removed, use `data-color` instead |
| 26 | + |
| 27 | +### Button |
| 28 | +- `fullWidth` prop has been removed |
| 29 | + |
| 30 | +### Card |
| 31 | +- `isLink` prop has been removed, we check wether `.ds-card` has `href` |
| 32 | + |
| 33 | +### Checkbox |
| 34 | +- `Checkbox.Group` has been removed, use `Fieldset` and `useCheckboxGroup` to get the same behaviour |
| 35 | + |
| 36 | +### Chip |
| 37 | +- `Chip.Toggle` has been removed, use either `.Radio` or `.Checkbox` |
| 38 | + |
| 39 | +### Combobox |
| 40 | +This component has been deprecated, use `Suggestion` for single select or `MultiSelect` for multi select |
| 41 | + |
| 42 | +### DropdownMenu |
| 43 | +- Renamed to `Dropdown` |
| 44 | +- `Dropdown.Group` has been renamed to `Dropdown.List` |
| 45 | +- `Dropdown.Item` has been split to `.Item` and `.Button` |
| 46 | + |
| 47 | +### ErrorSummary |
| 48 | +- `ErrorSummary.Root` is now `ErrorSummary` |
| 49 | +- `ErrorSummary.Item` has been split into `.Item` and `.Link` |
| 50 | + |
| 51 | +### Fieldset |
| 52 | +- `description` prop has been removed, it is now `<Fieldset.Description>` |
| 53 | +- `legend` prop has been removed, it is now `<Fieldset.Legend>` |
| 54 | +- `error` prop has been removed |
| 55 | + |
| 56 | +### Helptext |
| 57 | +This component has been removed. You can replicate this using `Popover`. |
| 58 | +Norwegian article: [https://www.designsystemet.no/bloggen/2025/helptext-blir-fjerna-kva-gjer-du](https://www.designsystemet.no/bloggen/2025/helptext-blir-fjerna-kva-gjer-du) |
| 59 | + |
| 60 | +### Link |
| 61 | +No changes |
| 62 | + |
| 63 | +### List |
| 64 | +- `List.Root` has been removed |
| 65 | +- `List.Heading` has been removed, use `<Heading>` |
| 66 | + |
| 67 | +### Skeleton |
| 68 | +- `Skeleton.*` has been removed, use `variant="*"` |
| 69 | + |
| 70 | +### Spinner |
| 71 | +- `title` prop has been removed, use `aria-label` |
| 72 | +- `variant` prop has been removed, use `data-color="*"` or `data-color-scheme="*"` |
| 73 | + |
| 74 | +### Modal |
| 75 | +- Renamed to `Dialog` |
| 76 | +- `Modal.Header/Content/Footer` has been removed, use `Modal.Block` |
| 77 | + |
| 78 | +### NativeSelect |
| 79 | +- Renamed to `Select` |
| 80 | +- `label` prop has been removed, use `<Label>` |
| 81 | + - `hideLabel` has been removed |
| 82 | +- `description` prop has been removed, use `Field.Description` inside `<Field>` |
| 83 | +- `error` prop has been removed, use `<ValidationMessage>` inside `<Field>` |
| 84 | + |
| 85 | +### Pagination |
| 86 | +- Using only `<Pagination />` has been removed, use compound components with `usePagination` |
| 87 | +- `Pagination.Previous/Next` has been removed, use `Pagination.Button` |
| 88 | +- `Pagination.Content` has been renamed to `Pagination.List` |
| 89 | + |
| 90 | +### Popover |
| 91 | +- `Popover.Content` has been renamed to `Popover` |
| 92 | +- `onOpenChange` has been removed, use `onOpen` and `onClose` |
| 93 | +- `variant` has been removed, use `data-color` |
| 94 | + |
| 95 | +### Radio |
| 96 | +- `Radio.Group` has been removed, use `Fieldset` and `useRadioGroup` to get the same behaviour |
| 97 | + |
| 98 | +### Search |
| 99 | +- This component now uses compund components |
| 100 | + - All props have been removed from the component due to this |
| 101 | + |
| 102 | +### Skiplink |
| 103 | +No changes |
| 104 | + |
| 105 | +### Switch |
| 106 | +- `label` prop has been removed, send this as children |
| 107 | +- `position` has changed from `right/left` to `start/end` |
| 108 | + |
| 109 | +### Table |
| 110 | +- `sortable` prop has been removed on `HeaderCell`. use `sort="none/ascending/descending/none"` |
| 111 | + |
| 112 | +### Tabs |
| 113 | +- `Tabs.Content` has been renamed to `Tabs.Panel` |
| 114 | + |
| 115 | +### Tag |
| 116 | +No changes |
| 117 | + |
| 118 | +### Textarea |
| 119 | +**This is now just a native `textarea`. Use `Textfield` to get a composed component.** |
| 120 | +- All props associated with this has been moved to `Textfield` |
| 121 | +- Set `multiline={true}` on `Textfield` to get a replacement for `Textarea` |
| 122 | + |
| 123 | +### Textfield |
| 124 | +- `htmlSize` has been changed to `size` |
| 125 | +- `characterLimit` prop has been removed, use `counter`. See storybook for allowed props |
| 126 | + |
| 127 | +### ToggleGroup |
| 128 | +No changes |
| 129 | + |
| 130 | +### Tooltip |
| 131 | +- `delay` prop has been removed, set `--dsc-tooltip-transition-delay` on the tooltip css class |
| 132 | + |
| 133 | +### ErrorMessage |
| 134 | +**This component has been renamed to `ValidationMessage`** |
| 135 | +- `error` prop has been removed, change validation type with `data-color` |
| 136 | + |
| 137 | +### Heading |
| 138 | +No changes |
| 139 | + |
| 140 | +### Paragraph |
| 141 | +No changes |
| 142 | + |
| 143 | +### Label |
| 144 | +No changes |
| 145 | + |
| 146 | +### Ingress |
| 147 | +This component has been removed, use `<Paragraph variant="long" />` |
0 commit comments