LeafyGreen UI – LeafyGreen's React UI Kit
APACHE-2.0 License
Bot releases are visible (Hide)
Published by github-actions[bot] 7 months ago
LGIDS_TYPOGRAPHY
, which stores data-lgid
values.
LgIdProps
on CommonTypographyProps
.data-lgid
attribute to Label
and Description
button
default browsers styles when as="button"
LG-3665
Published by github-actions[bot] 7 months ago
DarkModeProps
from @leafygreen-ui/lib
Published by github-actions[bot] 7 months ago
27ad3121: LG-4145
aria-label
and aria-labelledby
props are passed to the input.
aria-labelledby
prop can only set the aria-labelledby
attribute on the input if label
prop is undefined. Otherwise, the generated label component id will be used for the aria-labelledby
attribute
👎 Does not use aria-labelledby prop |
👍 Does use custom aria-labelledby prop |
---|---|
<TextInput label="Label" aria-labelledby="custom-label-id" /> |
<TextInput aria-labelledby="custom-label-id" /> |
aria-label
prop can only set the aria-label
attribute on the input if both label
prop and aria-labelledby
prop are undefined
| 👎 Does not use aria-label
prop | 👎 Does not use aria-label
prop | 👍 Does use aria-label
prop |
| - | - | - |
| <TextInput label="Label" aria-label="Custom label" />
| <TextInput aria-label="Custom label" aria-labelledby="other-custom-label-id" />
| <TextInput aria-label="Custom label" />
|
FormField
styling changes apply to TextInput
. See style changes here
A default errorMessage
of 'This input needs your attention'
will render below text input when state is invalid.
A default successMessage
of 'Success'
will render when state is valid. successMessage
prop accepts a custom string.
Disabled TextInput
component no longer renders the disabled
attribute and instead relies on aria-disabled
.
The last 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
Functionally, migration should be seamless, however there may be unit/integration/e2e tests that relied on this behavior.
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 cases where a test checks expect(textInput).toBeDisabled()
, you can replace and use test harnesses.
Similar to unit tests, you should generally test functionality and not implementation details. However, to test this in Cypress replace any cy.get(textInput).should('be.disabled');
checks with cy.get(textInput).invoke('attr', 'aria-disabled').should('eq', 'true');
DarkModeProps
from @leafygreen-ui/lib
Published by github-actions[bot] 7 months ago
DarkModeProps
from @leafygreen-ui/lib
Published by github-actions[bot] 7 months ago
getTestUtils
, a util to reliably interact with LG Select
in a product test suite. For more details, check out the README LG-4129
LGIDS_SELECT
which stores data-lgid
values.role="presentation"
from WarningIcon
description
propTypePublished by github-actions[bot] 7 months ago
f630c718: LG-4152
aria-label
prop changearia-label
prop can only set the aria-label
attribute on the searchbox element if aria-labelledby
prop is undefined
| 👎 Does not use aria-label
prop | 👍 Does use aria-label
prop |
| - | - |
| <SearchInput aria-label="Label" aria-labelledby="custom-label-id" />
| <SearchInput aria-label="Label" />
|
The following styling changes are made:
xsmall
variantdefault
, small
, and large
size variantsonKeyDown
bug fixPreviously, if searchbox element had focus and was disabled, user could press keys which would trigger opening the menu element.
Now, if searchbox element has focus and is disabled, user can press keys, and they will not trigger any onKeyDown
logic.
Published by github-actions[bot] 7 months ago
black
and white
colors as const
Published by github-actions[bot] 7 months ago
LoadingIndicators.styles.ts
filePublished by github-actions[bot] 7 months ago
LogoProps
from packagePublished by github-actions[bot] 7 months ago
LgIdProps
which exports an interface to support ['data-lgid']?: string;
, which can be extended inside components props.Published by github-actions[bot] 7 months ago
'Escalation'
to glyph setPublished by github-actions[bot] 7 months ago
27ad3121: LG-4143
Optional successMessage
prop is rendered below input container when state is valid.
The following changes are made to inputProps
spread on the input component contained by FormFieldInputContainer
:
aria-label
prop is only passed to the input component with an aria-label
attribute if label
prop and aria-labelledby
prop are undefined. If either is defined, aria-label
attribute on the input component will be undefined as per best practices from aria-label MDN docs
aria-label
prop can only set the aria-label
attribute on the input if both label
prop and aria-labelledby
prop are undefined
| 👎 Does not use `aria-label` prop | 👎 Does not use `aria-label` prop | 👍 Does use `aria-label` prop |
| - | - | - |
| `<TextInput label="Label" aria-label="Custom label" />` | `<TextInput aria-label="Custom label" aria-labelledby="other-custom-label-id" />` | `<TextInput aria-label="Custom label" />` |
disabled
prop is passed to the input component with aria-disabled
attribute
aria-invalid
attribute will always be set on the input component if the parent form field is in an error state. A custom aria-invalid
prop can be used to customize this logic
The following styling changes are made:
xsmall
, small
, and large
size variantsdata-lgid
to Error
and optional
.
role="presentation"
from Checkmark
and Warning
icons and replaces it with aria-hidden
. The title
attribute is omitted when using role="presentation"
and we rely on title
to query the DOM for those icons.LGIDS_FORM_FIELD
, which stores data-lgid
values.Published by github-actions[bot] 7 months ago
27ad3121: LG-2930
FormField
styling changes apply to DatePicker
. See style changes here
Published by github-actions[bot] 7 months ago
confirm
button so that it is not enabled in a newly opened modal. LG-4011
data-testid
's to match STYLEGUIDE.md
Published by github-actions[bot] 7 months ago
Published by github-actions[bot] 7 months ago
[email protected]
Published by github-actions[bot] 7 months ago
[email protected]
Published by github-actions[bot] 7 months ago
[email protected]
Published by github-actions[bot] 7 months ago
@lg-tools/storybook-utils
(previously imported from @leafygreen-ui/lib
)[email protected]
Published by github-actions[bot] 7 months ago
@lg-tools/storybook-utils