leafygreen-ui

LeafyGreen UI – LeafyGreen's React UI Kit

APACHE-2.0 License

Downloads
8.8M
Stars
217
Committers
47

Bot releases are visible (Hide)

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Major Changes

  • 7a0ff1be: LG-4126

    Disabled Checkbox, RadioBox, and Radio components no longer render the disabled attribute, but rely on aria-disabled instead.

    This change is made to ensure that disabled components are still focusable to users using keyboard navigation.

    For more on aria-disabled see the documentation on MDN

    Additionally, styling changes are made to ensure consistent implementation of disabled state styles.

    Migration guide

    Functionally, migration should be seamless, however there may be unit/integration/e2e tests that relied on this behavior.

    Jest/RTL

    Generally, only this repo should need to test that these components have a specific attribute. We recommend updating unit tests to check that some event was or was not called.

    However, there are cases where this may still need to be tested. In these cases, replace any expect(checkbox).toBeDisabled() with an explicit check for expect(checkbox).toHaveAttribute("aria-disabled", "true").

    Cypress

    Similar to unit tests, you should generally test functionality and not implementation details. However, to test this in Cypress replace any cy.get(checkbox).should('be.disabled'); checks with cy.get(checkbox).invoke('attr', 'aria-disabled').should('eq', 'true');

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Major Changes

  • 7a0ff1be: LG-4126

    Disabled Checkbox, RadioBox, and Radio components no longer render the disabled attribute, but rely on aria-disabled instead.

    This change is made to ensure that disabled components are still focusable to users using keyboard navigation.

    For more on aria-disabled see the documentation on MDN

    Additionally, styling changes are made to ensure consistent implementation of disabled state styles.

    Migration guide

    Functionally, migration should be seamless, however there may be unit/integration/e2e tests that relied on this behavior.

    Jest/RTL

    Generally, only this repo should need to test that these components have a specific attribute. We recommend updating unit tests to check that some event was or was not called.

    However, there are cases where this may still need to be tested. In these cases, replace any expect(checkbox).toBeDisabled() with an explicit check for expect(checkbox).toHaveAttribute("aria-disabled", "true").

    Cypress

    Similar to unit tests, you should generally test functionality and not implementation details. However, to test this in Cypress replace any cy.get(checkbox).should('be.disabled'); checks with cy.get(checkbox).invoke('attr', 'aria-disabled').should('eq', 'true');

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

leafygreen-ui - @leafygreen-ui/[email protected]

Published by github-actions[bot] 7 months ago

Patch Changes

Package Rankings
Top 1.98% on Npmjs.org
Badges
Extracted from project README
version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version version