Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@repay/cactus-web

repaygithub24MIT9.13.2TypeScript support: included

A UI component library for web built in React by REPAY

readme

@repay/cactus-web

UI component library build for React, used by REPAY.

Usage

For usage, see the documentation for Cactus Web

Contributing

Running storybook for local development

yarn start

Testing the build

yarn test

Creating a new component

yarn new ComponentName

This will generate skeleton files for the component, tests, story, and documentation (.mdx) using the provided ComponentName.

Usage: node make-component.js [...options] ComponentName
- component name must be the last argument, contain no spaces,
  and should be pascal case.

  Options:
  --help, -h      display this information
  --force, -f     overwrite component if it exists

Building the repository

yarn build

Running the build in watch mode which will re-build on changes

yarn dev

Best Practices

Development

Components should have associated stories so that you as a developer can test the component in an active situation. The convention is to create an primary story called "Basic Usage" which allows the user to control the required properties. Then additional stories are created for optional properties.

Components are ideally exported as a styled component. This allows them to be styled directly by a parent component such as:

import styled from 'styled-components'
import { Button } from '@repay/cactus-web'

const Container = styled.div`
  padding: ${p => p.theme.space[0]};

  ${Button} {
    margin-left: ${p => p.theme.space[4]};
  }
`

If the component is not a static tag like styled.div, you can create a "base" component and style that:

import * as React from 'react'
import styled from 'styled-components'
import CloseIcon from '@repay/cactus-icons/i/actions-close'

interface ComponentProps & React.HTMLProps<HTMLDivElement> {
  showIcon: boolean
}

const ComponentBase = ({ showIcon, children, className, ...props }) => {
  return (
    <div className={className} {...props}>
      {showIcon && <CloseIcon />}
      {children}
    </div>
  )
}

export const Component = styled(ComponentBase)`
  padding: 8px;
`

export default Component

The requirement here, is that the className prop must be provided to the element that is being styled.

Styled System

We use Styled System to help ensure theme value adherence and decrease the difficulty of proper customizations. Most components should provide the margin properties.

Writing Documentation

Stories are both for development and documentation.

Documentation can be added directly to the mdx files alongside the components. You can also use the 'website-src' source alias which will point to the source root in the website directory.

The best practices section should include information related to accessibility or other critical information when using the component. However this section can be removed if there are none.

Basic usage section should have at least one example of usage as JSX. If usage in TypeScript is complex or interesting include that as well. Ideally any code written as basic usage can be copied and used directly.

A description can be added to a property via comment above the property definition. To force the inclusion of a property in the Properties section that is not showing up, add the prop to the definition with a comment above and type !important in the comment.

Testing

Components should be tested from the perspective of the end-user as possible; this means using the user-event library in combination with fireEvent() from react-testing-library. Additionally, when a label is rendered with text, it should be used to select the input element. This will best mimic the user's actions of reading the text to find the element and clicking or typing from there and enforces best practices for accessibility.

Example:

test('should trigger onChange event', () => {
  const onChange = jest.fn()
  const { getByLabelText } = render(
    <ThemeProvider theme={cactusTheme}>
      <CheckBoxField label="Katastro" name="katastro" onChange={onChange} />
    </ThemeProvider>
  )

  // Select the checkbox by label text, and fire the click event on it.
  fireEvent.click(getByLabelText('Katastro'))
  expect(onChange).toHaveBeenCalledWith('katastro', true)
})

Also, be sure to test the negative cases alongside the positive, such as when there is a diabled property:

test('should not trigger onChange event', () => {
  const onChange = jest.fn()
  const { getByLabelText } = render(
    <ThemeProvider theme={cactusTheme}>
      <CheckBoxField label="Flow" name="flow" onChange={onChange} disabled />
    </ThemeProvider>
  )

  userEvent.click(getByLabelText('Flow'))
  expect(onChange).not.toHaveBeenCalled()
})

Accessing Local Storybooks on iOS

Sometimes it may be necessary to view the storybooks on a mobile device to test/debug features like accessibility. To do this, you can follow these steps:

  1. Plug an iPhone in to your Mac & make sure the phone is on the same network as the computer.
  2. In the iPhone's settings, navigate to Safari > Advanced and make sure "Web Inspector" is turned on.
  3. On your Mac, open Safari > Preferences > Advanced and make sure "Show develop menu in menu bar" is checked.
  4. In the Safari search bar on the iPhone, type your computer's IP address followed by the port the storybooks are running on, which defaults to 9001. (Ex: 10.1.2.345:9001)
  5. You can view the development console on Mac by clicking Develop > (your iPhone's name) > and selecting the browser window from the list of open windows on the iOS device.

Note: If you don't know your computer's IP address, you can get it by running ifconfig in your terminal. The IP address you'll want will be directly after inet in the last result returned from ifconfig.

changelog

v9.13.2 (Tue Jan 23 2024)

🐛 Bug Fix

🏠 Internal

🔩 Dependency Updates

Authors: 6


v9.13.1 (Fri Mar 03 2023)

🏠 Internal

Authors: 5


v9.13.0 (Fri Feb 03 2023)

🚀 Enhancement

🐛 Bug Fix

🔩 Dependency Updates

Authors: 3


v9.12.0 (Fri Dec 02 2022)

🚀 Enhancement

🐛 Bug Fix

🏠 Internal

Authors: 3


v9.11.1 (Fri Oct 28 2022)

🐛 Bug Fix

Authors: 2


v9.11.0 (Wed Oct 19 2022)

🚀 Enhancement

🐛 Bug Fix

🏠 Internal

Authors: 3


v9.10.0 (Mon Sep 19 2022)

🚀 Enhancement

  • CACTUS-998: support Flex gap property; add Flex.Item #795 (@wilysword)
  • CACTUS-969: add more ways of pagination to DataGrid #790 (@wilysword)

🐛 Bug Fix

🏠 Internal

Authors: 3


v9.9.0 (Thu Aug 25 2022)

🚀 Enhancement

  • CACTUS-963: add variety of text-related styling props #780 (@wilysword)

Authors: 1


v9.8.0 (Wed Jul 27 2022)

🚀 Enhancement

🐛 Bug Fix

Authors: 2


v9.7.0 (Fri Jul 15 2022)

🚀 Enhancement

  • CACTUS-942 :: Update Cactus Table component to allow for sticky right Column #766 (@daniloPenaR)
  • CACTUS-941: allow any value type in the Select component #765 (@wilysword)
  • CACTUS-926 React 18 Compatibility Updates #764 (@wilysword)

🐛 Bug Fix

🏠 Internal

Authors: 4


v9.6.0 (Tue Jun 21 2022)

🚀 Enhancement

🐛 Bug Fix

🏠 Internal

  • CACTUS-915: fix visual tests, rename Docker image tags #754 (@wilysword)

🔩 Dependency Updates

Authors: 3


v9.5.1 (Thu May 12 2022)

🐛 Bug Fix

Authors: 1


v9.5.0 (Thu Apr 21 2022)

🚀 Enhancement

🐛 Bug Fix

  • CACTUS-887 :: Fix Tooltip Scrolling/Remove @reach/tooltip #744 (@Dhalton)

🏠 Internal

Authors: 3


v9.4.0 (Mon Apr 11 2022)

🚀 Enhancement

  • CACTUS-883: add NotificationProvider and accompanying hook #734 (@wilysword)

🐛 Bug Fix

  • CACTUS-884 :: Fix <Button as={Link} /> Height #736 (@Dhalton)

🔩 Dependency Updates

Authors: 3


v9.3.0 (Thu Mar 10 2022)

🚀 Enhancement

🏠 Internal

🔩 Dependency Updates

Authors: 3


v9.2.0 (Wed Feb 16 2022)

🚀 Enhancement

Authors: 2


v9.1.0 (Wed Jan 26 2022)

🚀 Enhancement

🐛 Bug Fix

  • Add new StatusMessage info variant, allow margin props and specify foreground color #700 (@Dhalton)
  • Fix bug where profile page styles were not being displayed in the BrandBar even if isProfilePage was set to true #691 (@Dhalton)
  • Fix bug that caused the sidebar in the tablet view to close unexpectedly when closing a child menu #680 (@daniloPenaR)

🏠 Internal

🔩 Dependency Updates

Authors: 5


v9.0.0 (Mon Nov 15 2021)

💥 Breaking Change

  • Modal is no longer flex by default and does not have automatic internal scrolling. Default width has been replaced with default max-width #673 (@wilysword)
  • DataGrid now hard-codes DataGrid.Table margins to 0. Customizable margins supported on Table component. #671 (@Dhalton)
  • Default Text element changed from p to span #670 (@Dhalton)
  • When onChange is called with an invalid or partial date, event.target.value will be NaN. DateInput can now be cleared by passing a falsy value prop. #667 (@daniloPenaR @wilysword)

🚀 Enhancement

🔩 Dependency Updates

Authors: 5


v8.1.0 (Mon Sep 13 2021)

🚀 Enhancement

🐛 Bug Fix

  • Fix inconsistent heights of Select and DateInput components #653 (@Dhalton)

Authors: 2


v8.0.0 (Mon Aug 16 2021)

💥 Breaking Change

  • Redesign the Footer component #634 (@wilysword)
  • Fix the ability to override margin on components using FieldWrapper #635 (@wilysword)
    • Changed field default margin selector from & + & (adjacent sibling) to :not(:first-child). In most layouts they'll behave the same, but the new selector is significantly broader, nonetheless.
  • Require mediaQueries and breakpoints on all themes passed into StyleProvider #628 (@Dhalton)
    • StyleProvider will no longer generate these fields for you. StyleProvider will also log an error if you don't have @repay/cactus-theme >= 3.0.0
  • Make @repay/cactus-theme a peer dependency and use new non-transparent colors. #627 (@mikesoltow)
    • Your application will not work properly unless you also include @repay/cactus-theme >= 3.0.0 as a direct (non dev) dependency

🚀 Enhancement

🐛 Bug Fix

Authors: 3


v7.1.0 (Mon Jul 19 2021)

🚀 Enhancement

🐛 Bug Fix

  • Increase MenuBar dropdown min-width so that it cannot be narrower than the trigger button #621 (@daniloPenaR)

🔩 Dependency Updates

  • Upgrade Reach libraries and other various dependencies #615 (@mikesoltow)

Authors: 3


v7.0.0 (Wed Jul 07 2021)

💥 Breaking Change

  • Reduce min-width of Select component #620 (@wilysword)
  • Alter BrandMenu.UserMenuItem API to allow links to be used #597 (@daniloPenaR)
    • onSelect is no longer accepted. Use onClick instead
  • Change FileInput to synchronous event handling #604 (@wilysword)
    • Users now have to account for asynchronous file loading themselves. See FileInput docs for more info
  • Set default h1-h4 margins to 0 in the Text component #601 (@daniloPenaR)
    • You will now have to manually provide a margin if you want one
  • Various improvements to the ColorPicker component #596 (@wilysword)
    • target.value for ColorPicker events is now a single value depending on the format prop, instead of a single object with multiple color formats; the hex format is now prefixed by a "#"

🚀 Enhancement

🐛 Bug Fix

Authors: 3


v7.0.0-beta.0 (Fri Jun 11 2021)

💥 Breaking Change

  • Set default h1-h4 margins to 0 in the Text component #601 (@daniloPenaR)
    • You will now have to manually provide a margin if you want one
  • Various improvements to the ColorPicker component #596 (@wilysword)
    • target.value for ColorPicker events is now a single value depending on the format prop, instead of a single object with multiple color formats; the hex format is now prefixed by a "#"

Authors: 2


v6.5.0 (Fri Jun 11 2021)

🚀 Enhancement

  • Allow users to pass flex, flexBasis, flexGrow, and flexShrink to various components (see component docs for more) #594 (@Dhalton)
  • Add a Header.Description component to render descriptive text just below the main Header #592 (@Dhalton)

🐛 Bug Fix

  • Fix our custom polyfills so that they are compatible with Webpack 5 #603 (@mikesoltow)

Authors: 2


v6.4.0 (Thu May 20 2021)

🚀 Enhancement

  • Forward more props to the DOM for various components so that props like data-testid can be passed down #590 (@wilysword)
  • Render Breadcrumbs in ellipsis mode if there is not enough space to render the standard version #582 (@daniloPenaR)

🐛 Bug Fix

  • Fix bug where menu dropdowns were not opening on Safari #591 (@Dhalton)
  • Fix order of confirm/cancel buttons in ConfirmModal #588 (@daniloPenaR)
  • Fix infinite re-renders with useScroll inside % width containers #583 (@wilysword)

Authors: 3


v6.3.0 (Fri Apr 30 2021)

🚀 Enhancement

🐛 Bug Fix

  • Prevent scroll from propagating to the window from inside Select and DateInput dropdowns #580 (@wilysword)

🏠 Internal

Authors: 5


v6.2.0 (Fri Apr 23 2021)

🚀 Enhancement

  • Improve Header Item spacing, pass props to Header.Title #566 (@daniloPenaR)
  • Add Preview component that allows viewing of embedded images #565 (@Dhalton)
  • Allow MenuBar sub-menus to be wider than their parent #564 (@Dhalton)
  • Add mobile version of Breadcrumb component #558 (@Dhalton)

🐛 Bug Fix

🔩 Dependency Updates

Authors: 5


v6.1.1 (Mon Mar 29 2021)

🐛 Bug Fix

  • Fix bug where drop-down menu would become hidden in Safari #562 (@mikesoltow)
  • Fix bug where the MenuBar could obtain focus through a click below the menu #560 (@mikesoltow)
  • Fix an issue with Accordion text alignment in IE11 #554 (@daniloPenaR)

🏠 Internal

Authors: 2


v6.1.0 (Fri Mar 19 2021)

🚀 Enhancement

🐛 Bug Fix

  • Prevent onChange from firing on Select/SelectField when an already selected option is picked from the dropdown #549 (@mikesoltow)
  • The selected values displayed in the Select field (when multiple={true}) should now appear in the same order as the value of the Select component #548 (@Dhalton)
  • Breadcrumb and Footer links now have better contrast, improving accessibility #547 (@mikesoltow)

Authors: 3


v6.0.1 (Tue Mar 09 2021)

🐛 Bug Fix

Authors: 1


vnull (Tue Mar 09 2021)

🐛 Bug Fix

🏠 Internal

Authors: 2


v6.0.0 (Thu Mar 04 2021)

💥 Breaking Change

  • Change styling of mobile/tablet menu to use alternating colors #541 (@wilysword)
  • Add textStyle prop to TextInput and TextInputField, allowing users to control size of these components #533 (@wilysword)
    • Default height of TextInput and TextInputField components has changed
  • Redesign MenuBar and add dark variant #509 (@daniloPenaR @wilysword)
    • Appearance of MenuBar has changed significantly on desktop screens
  • Make aria-label required for ActionBar.Item #488 (@wilysword)

🚀 Enhancement

🐛 Bug Fix

🏠 Internal

🔩 Dependency Updates

  • Upgrade Jest SonarQube reporter #524 (@mikesoltow)
  • Upgrade various dependencies, including Reach libraries and build/bundling library #518 (@mikesoltow)

Authors: 4


v6.0.0-beta.0 (Thu Feb 25 2021)

💥 Breaking Change

  • Add textStyle prop to TextInput and TextInputField, allowing users to control size of these components #533 (@wilysword)
    • Default height of TextInput and TextInputField components has changed
  • Redesign MenuBar and add dark variant #509 (@daniloPenaR @wilysword)
    • Appearance of MenuBar has changed significantly on desktop screens
  • Make aria-label required for ActionBar.Item #488 (@wilysword)

🚀 Enhancement

🐛 Bug Fix

🏠 Internal

  • Migrate DescriptivePalette icon to @repay/cactus-icons #534 (@daniloPenaR)
  • Improve transition behavior for DateInput calendar #514 (@Dhalton)

🔩 Dependency Updates

  • Upgrade Jest SonarQube reporter #524 (@mikesoltow)
  • Upgrade various dependencies, including Reach libraries and build/bundling library #518 (@mikesoltow)

Authors: 4


v5.2.0 (Fri Feb 12 2021)

🚀 Enhancement

  • Add ability to customize formatting of Select options using the Select.Option component #507 (@wilysword)
  • Added a Dimmer component. Modal component now uses this for the background overlay. #502 (@daniloPenaR @Dhalton)

Authors: 3


v5.1.1 (Thu Feb 04 2021)

🐛 Bug Fix

🏠 Internal

Authors: 3


v5.1.0 (Mon Feb 01 2021)

🚀 Enhancement

🐛 Bug Fix

  • Fix bug where collapsing a sub-menu in tablet/mobile mode would close the menu panel #489 (@mikesoltow)
  • Fix content overflow bug in mobile mode #494 (@wilysword)
  • Fix Firefox bug where incorrect menu items would flash when the menu was clicked #493 (@wilysword)
  • Fix bug where loading Select options asynchronously would result in duplicate options #492 (@wilysword)

Authors: 3


v5.0.1 (Wed Jan 27 2021)

🐛 Bug Fix

🔩 Dependency Updates

Authors: 1


v5.0.0 (Fri Jan 15 2021)

💥 Breaking Change

  • Re-design DateInput component #470 (@Dhalton)
    • showMonthYear is no longer valid in the phrases prop. It has been split into showMonth and showYear, since the select month/year dropdowns are now separate.
  • Remove left padding from Breadcrumb component #477 (@Dhalton)

🚀 Enhancement

  • Add innerHeight and innerMaxHeight props to Modal component. Fix text overflow for Modal. #479 (@Dhalton)

🐛 Bug Fix

  • Fix bug where Alert close buttons were not visible in IE11 #483 (@wilysword)
  • Fix issue where logo could overflow BrandBar #481 (@wilysword)

Authors: 2


v5.0.0-beta.1 (Mon Jan 11 2021)

🐛 Bug Fix

  • Fix issue where mobile/tablet menu would scroll unexpectedly when sub-menus were expanded #474 (@wilysword)

Authors: 1


v5.0.0-beta.0 (Thu Jan 08 2021)

💥 Breaking Change

  • Remove left padding from Breadcrumb component #477 (@Dhalton)

Authors: 1


v4.4.1 (Tue Jan 12 2021)

🐛 Bug Fix

  • Fix issue where mobile/tablet menu would scroll unexpectedly when sub-menus were expanded #474 (@wilysword)

🏠 Internal

Authors: 2


v4.4.0 (Tue Jan 05 2021)

🚀 Enhancement

🐛 Bug Fix

  • Fix a bug where the page would crash after deleting Accordions #475 (@mikesoltow)

Authors: 2


v4.3.0 (Mon Dec 28 2020)

🚀 Enhancement

  • Allow devs to override default Modal widths with a width prop #469 (@Dhalton)

🐛 Bug Fix

Authors: 2


v4.2.2 (Mon Dec 21 2020)

🐛 Bug Fix

Authors: 1


v4.2.1 (Wed Dec 16 2020)

🐛 Bug Fix

  • Fix a misalignment of the Toggle checkbox when Toggles are rendered inside Tables #455 (@mikesoltow)

Authors: 1


v4.2.0 (Tue Dec 15 2020)

🚀 Enhancement

  • Change focus style on IconButtons to an outline #440 (@Dhalton)

🐛 Bug Fix

🔩 Dependency Updates

Authors: 4


v4.1.0 (Thu Dec 10 2020)

🚀 Enhancement

  • Allow Tooltips attached to form elements to be left-aligned #411 (@NicolasSimmonds)
  • The "no options available" text on the Select element can now be customized #421 (@NicolasSimmonds)
  • Allow Tooltips to be shown on click/tap in addition to hover #420 (@Dhalton)

🐛 Bug Fix

  • Fix Tooltip alignment bug in IE11 #425 (@mikesoltow)
  • Fix bug that prevented DateInputs from being used inside ActionBar Panels #409 (@wilysword)
  • Fix bug that prevented components with dropdowns from being used inside ActionBar Panels #399 (@wilysword)
  • Fix BrandBar logo stretching issue in Safari #431 (@NicolasSimmonds)

Authors: 4


v4.0.0 (Mon Nov 30 2020)

💥 Breaking Change

  • Several updates and fixes to the Breadcrumb component #358 (@mikesoltow)
    • The label prop of Breadcrumb.Item is no longer accepted. Please put the text for each Breadcrumb.Item in children instead.
    • The BreadCrumbItem component has been renamed to BreadcrumbItem for consistency.
    • The colors of the Breadcrumb.Item links now pull from the theme. In addition, the color now changes when the links are hovered, and a custom border appears when the links are focused.
    • The linkTo prop of Breadcrumb.Item no longer exists. If not using the "as" prop, then you must replace linkTo with "href".
  • Change form field event handlers for easier integration with form libraries #360 and #366 (@wilysword)
    • The onChange, onFocus, and onBlur props of the following components now use standard React change and focus event handling functions instead of custom Cactus functions: CheckBoxField, CheckBoxGroup, RadioButtonField, RadioGroup, TextAreaField, TextInputField, Toggle, and ToggleField.
    • The Toggle component now uses the checked prop instead of value.
    • The onChange, onFocus, and onBlur props of the following components now use event handling functions with custom events instead of the custom Cactus functions: DateInput, DateInputField, FileInput, FileInputField, Select, and SelectField.
  • Fix bug where aria-describedby would reference non-existent IDs in form field components #379 (@mikesoltow)
    • The ariaDescribedBy field returned by useAccessibleField will now return undefined if the DOM element should not have an aria-describedby attribute.
  • Improvements to the Footer component #369 (@NicolasSimmonds)
    • The Footer will now be placed at the bottom of the screen if there is not enough content to fill the viewport.
    • The Footer font size has been reduced from 18px to 15px.
    • The logo in the Footer now has a max height of 40px.
  • More Footer improvements #376 (@wilysword)
    • If no children are provided to the Footer, then the Footer links will now be displayed in the top section, and no bottom Footer section will be displayed.
    • The color of the Footer links has been altered to ensure accessibility if they are displayed in the top section.
    • The underline for the Footer links will now disappear when hovered.
    • The Footer will no longer be in a fixed position at any screen size.
  • Update the designs for the Table and DataGrid components #374 (@NicolasSimmonds)
    • The font within tables has been increased in size
    • The Table and DataGrid components accept a dividers prop. If true, then dividers are added between cells, including header cells.
  • Allow custom components in the BrandBar #387 (@wilysword)
    • BrandBar user menu moved to separate BrandBar.UserMenu component; related props moved to new component, with userMenuText renamed to label
  • Fix issue where certain Cactus styles were being overridden by user agent #390 (@wilysword)
    • Minor font change to several components
  • Change MenuBar scroll button visibility #397 (@wilysword)
    • MenuBar scroll buttons are now visible but styled as disabled when scolled to either end of the menu.
  • Allow more customization with placement of DataGrid sub-components. #385 (@Dhalton)
  • Upgrade @repay/cactus-theme to v2.0.0 #401 (@NicolasSimmonds)
    • If you don't pass a shape value to generateTheme, or if you use the default export from @repay/cactus-theme as your theme, then the shape of all of your components will change from round to intermediate when you upgrade.

🚀 Enhancement

  • Add disableTooltip prop to all form field components #396 (@NicolasSimmonds)
  • Prevent dismissal of Tooltip text if the user moves mouse from the icon to the text #393 (@Dhalton)- Change Accordion transition time from a dynamic value, based on Accordion height, to a static value of 200ms. #403 (@NicolasSimmonds)
  • Allow the use of controlled Accordion components, if desired. See the docs for examples of both the controlled and uncontrolled variants. #398 (@mikesoltow)

🐛 Bug Fix

Authors: 4


v4.0.0-beta.4 (Tue Nov 24 2020)

🐛 Bug Fix

  • Fix bug in Layout where nav menu would occasionally display below conent #408 (@wilysword)

Authors: 1


v4.0.0-beta.3 (Mon Nov 23 2020)

🚀 Enhancement

  • Allow the use of controlled Accordion components, if desired. See the docs for examples of both the controlled and uncontrolled variants. #398 (@mikesoltow)

Authors: 1


v4.0.0-beta.2 (Thu Nov 19 2020)

💥 Breaking Change

  • Upgrade @repay/cactus-theme to v2.0.0-beta-0 #401 (@NicolasSimmonds)
    • If you don't pass a shape value to generateTheme, or if you use the default export from @repay/cactus-theme as your theme, then the shape of all of your components will change from round to intermediate when you upgrade.

🚀 Enhancement

  • Change Accordion transition time from a dynamic value, based on Accordion height, to a static value of 200ms. #403 (@NicolasSimmonds)

Authors: 1


v4.0.0-beta.1 (Wed Nov 18 2020)

💥 Breaking Change

Authors: 1


v4.0.0-beta.0 (Fri Nov 13 2020)

💥 Breaking Change

  • Several updates and fixes to the Breadcrumb component #358 (@mikesoltow)
    • The label prop of Breadcrumb.Item is no longer accepted. Please put the text for each Breadcrumb.Item in children instead.
    • The BreadCrumbItem component has been renamed to BreadcrumbItem for consistency.
    • The colors of the Breadcrumb.Item links now pull from the theme. In addition, the color now changes when the links are hovered, and a custom border appears when the links are focused.
    • The linkTo prop of Breadcrumb.Item no longer exists. If not using the "as" prop, then you must replace linkTo with "href".
  • Change form field event handlers for easier integration with form libraries #360 and #366 (@wilysword)
    • The onChange, onFocus, and onBlur props of the following components now use standard React change and focus event handling functions instead of custom Cactus functions: CheckBoxField, CheckBoxGroup, RadioButtonField, RadioGroup, TextAreaField, TextInputField, Toggle, and ToggleField.
    • The Toggle component now uses the checked prop instead of value.
    • The onChange, onFocus, and onBlur props of the following components now use event handling functions with custom events instead of the custom Cactus functions: DateInput, DateInputField, FileInput, FileInputField, Select, and SelectField.
  • Fix bug where aria-describedby would reference non-existent IDs in form field components #379 (@mikesoltow)
    • The ariaDescribedBy field returned by useAccessibleField will now return undefined if the DOM element should not have an aria-describedby attribute.
  • Improvements to the Footer component #369 (@NicolasSimmonds)
    • The Footer will now be placed at the bottom of the screen if there is not enough content to fill the viewport.
    • The Footer font size has been reduced from 18px to 15px.
    • The logo in the Footer now has a max height of 40px.
  • More Footer improvements #376 (@wilysword)
    • If no children are provided to the Footer, then the Footer links will now be displayed in the top section, and no bottom Footer section will be displayed.
    • The color of the Footer links has been altered to ensure accessibility if they are displayed in the top section.
    • The underline for the Footer links will now disappear when hovered.
    • The Footer will no longer be in a fixed position at any screen size.
  • Update the designs for the Table and DataGrid components #374 (@NicolasSimmonds)
    • The font within tables has been increased in size
    • The Table and DataGrid components accept a dividers prop. If true, then dividers are added between cells, including header cells.
  • Allow custom components in the BrandBar #387 (@wilysword)
    • BrandBar user menu moved to separate BrandBar.UserMenu component; related props moved to new component, with userMenuText renamed to label
  • Fix issue where certain Cactus styles were being overridden by user agent #390 (@wilysword)
    • Minor font change to several components
  • Change MenuBar scroll button visibility #397 (@wilysword)
    • MenuBar scroll buttons are now visible but styled as disabled when scolled to either end of the menu.

🚀 Enhancement

  • Add disableTooltip prop to all form field components #396 (@NicolasSimmonds)
  • Prevent dismissal of Tooltip text if the user moves mouse from the icon to the text #393 (@Dhalton)

🐛 Bug Fix

Authors: 4


v3.3.2 (Wed Nov 11 2020)

🐛 Bug Fix

  • Add missing dist files

Authors: 1


v3.3.1 (Tue Nov 10 2020)

🐛 Bug Fix

  • Fix polymophism behavior for Button (i.e. you can now use <Button as={Link} to="http://www.google.com">) #375 (@Dhalton)
  • Fix issue where tooltip would cover Select dropdowns #380 (@NicolasSimmonds)
  • Fix disabled styles for the Toggle component #384 (@NicolasSimmonds)

🏠 Internal

🔩 Dependency Updates

  • Upgrade @repay/cactus-theme to v1.1.0

Authors: 4