Skip to content

Commit 6f3d9bf

Browse files
committed
feat: removes @zendeskgarden/react-utilities
1 parent 4931e6c commit 6f3d9bf

File tree

13 files changed

+315
-557
lines changed

13 files changed

+315
-557
lines changed

docs/migration.md

Lines changed: 6 additions & 299 deletions
Original file line numberDiff line numberDiff line change
@@ -1,307 +1,14 @@
11
# Garden Migration Guide
22

3-
## v8
4-
5-
### Overview
6-
7-
The upgrade to Garden v8 is designed to allow you to upgrade each package individually. It is not
8-
necessary to upgrade all Garden packages to v8 at once. Each upgrade step can be completed in
9-
isolation.
10-
11-
### Upgrade Steps
12-
13-
- Upgrade all existing Garden React dependencies to their [latest `v7`](https://github.com/zendeskgarden/react-components/blob/main/docs/changelogs/v7.md#v700-2019-10-17)
14-
version.
15-
- Upgrade `@zendeskgarden/react-theming` to `v8`.
16-
- `react-theming@v8` includes breaking changes. Refer to the
17-
[Breaking Changes](#breaking-changes) section for specific upgrade instructions.
18-
- `react-theming@v8` is a valid peerDependency for all `v7` packages.
19-
- Upgrade all other `@zendeskgarden/react-*` packages to `v8` individually.
20-
- These upgrades included several breaking changes. Refer to the [Breaking Changes](#breaking-changes)
21-
section for specific upgrade instructions.
3+
## v9
224

235
### Breaking Changes
246

25-
#### All packages
26-
27-
- Garden v8 packages use CSS-in-JS and no longer provide CSS files.
28-
- Remove all Garden React CSS imports.
29-
- i.e `@zendeskgarden/react-buttons/dist/styles.css`
30-
- All themable component IDs (`data-garden-id` attributes) have been renamed for consistency across
31-
all packages.
32-
- Any custom theming provided to the `ThemeProvider` component should be checked for accuracy.
33-
- Garden v8 packages no longer provide UMD bundles.
34-
35-
#### @zendeskgarden/react-avatars
36-
37-
- The `Text` component has been removed.
38-
- Use `Avatar.Text` instead.
39-
- New props to ease color control: `surfaceColor`, `backgroundColor`, and `foregroundColor`.
40-
41-
#### @zendeskgarden/react-breadcrumbs
42-
43-
- The `Item` component has been removed.
44-
- Instead of passing `Item` components as children to `Breadcrumb`, consumers can now pass any
45-
inline elements of their choice.
46-
- For example, a child of `Breadcrumb` can be a `<span>` or a component that renders an `<a>`.
47-
48-
#### @zendeskgarden/react-buttons
49-
50-
- The following props have been renamed:
51-
- `Button`
52-
- `basic` -> `isBasic`
53-
- `danger` -> `isDanger`
54-
- `external` -> `isExternal`
55-
- `link` -> `isLink`
56-
- `pill` -> `isPill`
57-
- `primary` -> `isPrimary`
58-
- `stretched` -> `isStretched`
59-
- `muted` -> removed (use theming to adjust `primaryHue`)
60-
- `ButtonGroup`
61-
- `selectedKey` -> `selectedItem`
62-
- `onStateChange` -> `onSelect`
63-
- The `onSelect` callback passes `selectedItem` directly rather than nesting it in an object.
64-
- The `ButtonGroupView` component has been removed.
65-
- The `Icon` component has been removed.
66-
- Use an `IconButton` with a modified `isRotated` prop instead.
67-
- The `ButtonGroup` component now requires its children to contain a `value` prop which is returned
68-
when selected.
69-
- Buttons no longer provide a minimum width.
70-
71-
#### @zendeskgarden/react-chrome
72-
73-
- The following props have been renamed:
74-
- `Header`
75-
- `standalone` -> `isStandalone`
76-
- `HeaderItem`
77-
- `isRound` -> `isRound`
78-
- `logo` -> `hasLogo`
79-
- `HeaderItemText`
80-
- `clipped` -> `isClipped`
81-
- `Nav`
82-
- `expanded` -> `isExpanded`
83-
- `NavItem`
84-
- `logo` -> `hasLogo`
85-
- `brandmark` -> `hasBrandmark`
86-
- `current` -> `isCurrent`
87-
- `CollapsibleSubNavItem`
88-
- `expanded` -> `isExpanded`
89-
- `SubNavItem`
90-
- `current` -> `isCurrent`
91-
- The `Nav` component no longer takes a `dark` or `light` prop.
92-
- Use the `Chrome` component’s `hue` prop to apply a custom color.
93-
- All themed components will dynamically change styling to create an accessible contrast level.
94-
- All state and styling props such as `active`, `focused`, ‘hover` etc. have been removed.
95-
96-
#### @zendeskgarden/react-datepickers
97-
98-
- The following props have been renamed:
99-
- `Datepicker`
100-
- `small` -> `isCompact`
101-
- `animated` -> `isAnimated`
102-
- `DatepickerRange`
103-
- `small` -> `isCompact`
104-
105-
#### @zendeskgarden/react-dropdowns
106-
107-
- The following props have been renamed or removed:
108-
- `Autocomplete`, `MultiSelect`, `Select`
109-
- `small` -> `isCompact`
110-
- `bare` -> `isBare`
111-
- `open` -> `isOpen`
112-
- `focused` -> removed
113-
- `hovered` -> removed
114-
- `Label`
115-
- `regular` -> `isRegular`
116-
- `small` -> removed
117-
- `Hint`
118-
- `small`-> removed
119-
- `Menu`
120-
- `animate` -> `isAnimated`
121-
- `small` -> `isCompact`
122-
- `hidden` -> `isHidden`
123-
- `arrow` -> `hasArrow`
124-
- `AddItem`, `HeaderItem`, `Item`, `MediaItem`, `NextItem`, `PreviousItem`
125-
- `active` -> removed
126-
- `focused` -> removed
127-
- `hovered` -> removed
128-
129-
#### @zendeskgarden/react-forms
130-
131-
- The following props have been renamed or removed:
132-
- The following props have been removed from all components:
133-
- `focused`
134-
- `hovered`
135-
- `mediaLayout`
136-
- `open`
137-
- `select`
138-
- `tagLayout`
139-
- Field
140-
- `inline` -> removed
141-
- Inline layouts can now be achieved with custom styling.
142-
- Hint
143-
- `small` -> removed
144-
- Use `isCompact` on the `Input` component instead.
145-
- Label
146-
- `regular` -> `isRegular`
147-
- `hidden` -> removed
148-
- `indeterminate` -> removed
149-
- All attributes should be applied to the corresponding `<input>` component (checked, disabled, indeterminate).
150-
- `Input`, `Textarea`, `FauxInput`
151-
- `bare` -> `isBare`
152-
- `small` -> `isCompact`
153-
- `TextArea`
154-
- `resizable` -> `isResizable`
155-
- Checkbox now uses the `indeterminate` prop which was previously obfuscated under the `Label` component.
156-
157-
#### @zendeskgarden/react-grid
158-
159-
- The following props have been renamed or removed:
160-
- `Grid`
161-
- `fluid` -> removed (which now defaults to `true`)
162-
- Garden does not have an opinion re: non-fluid maximum container widths per breakpoint. If
163-
you need these four `max-width` CSS properties across the small, medium, large, and
164-
extra-large breakpoints, either use Bootstrap's `.container` or add them to your
165-
application.
166-
- `Row`
167-
- `gutters` -> removed
168-
- Use `<Grid gutters={false}>` instead
169-
- `Col`
170-
- `justifyContent` -> removed
171-
- Row component’s `justifyContent` prop can be used for alignment.
172-
- New features and fixes include:
173-
- Ability to resize gutters (default = 20px).
174-
- Ability to set number of columns (default = 12).
175-
- Added Col `offset` and fixed RTL across all offsets.
176-
- Added Row `alignContent` prop.
177-
- Most Row/Col props accept responsive variants for targeting screen size breakpoints.
178-
179-
#### @zendeskgarden/react-loaders
180-
181-
- The following props have been renamed or removed:
182-
- `Dots`
183-
- `velocity` -> removed
184-
- Use `duration` instead which accepts milliseconds. The default is 1250ms.
185-
- `Skeleton`
186-
- `dark` -> `isLight`
187-
188-
#### @zendeskgarden/react-modals
189-
190-
- The following props have been renamed or removed:
191-
- `Modal`
192-
- `animate` -> `isAnimated`
193-
- `center` -> `isCentered`
194-
- `large` -> `isLarge`
195-
- `Header`
196-
- `danger` -> `isDanger`
197-
- `Close`
198-
- `focus` -> removed
199-
- `hovered` -> removed
200-
- The `Backdrop` and `ModalView` components have been removed.
201-
202-
#### @zendeskgarden/react-notifications
203-
204-
- The following props have been renamed:
205-
- `Well`
206-
- `floating` -> `isFloating`
207-
- `recessed` -> `isRecessed`
208-
209-
#### @zendeskgarden/react-pagination
210-
211-
- The following components have been removed:
212-
- `Gap`
213-
- `NextPage`
214-
- `Page`
215-
- `PaginationView`
216-
- `PreviousPage`
217-
- A new `pageGap` prop has been added.
218-
- It is used to modify the gap display positioning.
219-
220-
#### @zendeskgarden/react-tables
221-
222-
- All components in this package now use native `<table>` styling.
223-
- Previous implementations may have hard-coded column widths. This may no longer be necessary.
224-
- All state and styling props such as `active`, `focused`, ‘hover` etc. have been removed.
225-
- The following props have been renamed:
226-
- `Cell`
227-
- `minimum` -> `isMinimum`
228-
- `truncate` -> `isTruncated`
229-
- `menu` -> `hasOverflow`
230-
- `Row`
231-
- `striped` -> `isStriped`
232-
- `selected` -> `isSelected`
233-
234-
#### @zendeskgarden/react-tabs
235-
236-
- A new structure is required for the `Tabs` component.
237-
- This new structure allows consumers to style individual tags if necessary.
238-
239-
```jsx
240-
<Tabs>
241-
<TabList>
242-
<Tab item="tab-1">Tab 1</Tab>
243-
</TabList>
244-
<TabPanel item="tab-1">Content</TabPanel>
245-
</Tabs>
246-
```
247-
248-
- All state and styling props such as `active`, `focused`, `hover`, `selected`, etc. have been removed.
249-
- The `vertical` prop has been renamed to `isVertical`.
250-
251-
#### @zendeskgarden/react-tags
252-
253-
- Child component exports `Avatar` and `Close` have been removed.
254-
- Use `Tag.Avatar` and `Tag.Close` instead.
255-
- The following props have been renamed:
256-
- `Tag`
257-
- `pill` -> `isPill`
258-
- `round` -> `isRound`
259-
- `type` -> `hue`
260-
261-
#### @zendeskgarden/react-theming
262-
263-
- `retrieveTheme` has been renamed to `retrieveComponentStyles`.
264-
- All theming is now provided through a single `theme` prop.
265-
- RTL notation
266-
- Previously `<ThemeProvider rtl>`
267-
- Currently `<ThemeProvider theme={{ ...DEFAULT_THEME, rtl: true }}>`
268-
- Custom `document` object
269-
- Previously `<ThemeProvider document={doc}>`
270-
- Currently `<ThemeProvider theme={{ ...DEFAULT_THEME, document: doc }}>`
271-
- Per component styles
272-
- Previously `theme[COMPONENT_ID]`
273-
- Currently `theme.components[COMPONENT_ID]`.
274-
275-
#### @zendeskgarden/react-tooltips
276-
277-
- The following exports have been removed:
278-
- `LightTooltip`
279-
- `TooltipView`
280-
- `GARDEN_PLACEMENTS`
281-
- `POPPER_PLACEMENTS`
282-
- `getPopperPlacement`
283-
- `getRtlPopperPlacement`
284-
- The following props have been renamed or removed:
285-
- `delayMilliseconds` -> `delayMS`
286-
- `arrow` -> `hasArrow`
287-
- `appendToBody` -> `appendToNode`
288-
- It is required to pass the HTML element which the tooltip should append to.
289-
- `trigger` -> removed
290-
- Tooltip `children` now accepts a single element which acts as the triggering element
291-
- Tooltip `content` prop now accepts Tooltip content (previous `children`)
292-
- The Tooltip trigger no longer has a wrapping `<div>` element
293-
- An optional `refKey` prop has been added for retrieving the ref from the triggering element.
294-
295-
#### @zendeskgarden/react-typography
296-
297-
- The following props have been renamed:
7+
#### @zendeskgarden/react-utilities
2988

299-
- `Code`
300-
- `type` -> `hue`
301-
- `Typography`, `MD`, `LG`, `SM`,
302-
- `monospace` -> `isMonospace`
9+
- This package has been removed. Migrate to `@zendeskgarden/container-utilities` to continue
10+
receiving updates.
30311

304-
#### @zendeskgarden/react-utilities
12+
## v8
30513

306-
- This package has been deprecated and will be removed in a future major release.
307-
- Migrate to `@zendeskgarden/container-utilities` to continue receiving updates.
14+
[Migration Guide](https://github.com/zendeskgarden/react-components/blob/next/docs/migrations/v8.md)

0 commit comments

Comments
 (0)