Feb 9, 2024
  • Badge: Allow Badge to take arrays of values

    Previously, Badge only accepted a string as children, to prevent the use of other components inside a Badge.

    However, when a variable is included with text inside the Badge, the children property is interpreted as an array. This prevents a very reasonable use case from being allowed:

    <Badge>{jobs.length} Jobs</Badge>
    // Error: Type '{ children: string[]; }' is not assignable to type 'BadgeProps'.

    This change allows Badge to accept a string, number, or array thereof.

Mar 31, 2023
  • Badge: Adjust height to support different typographic scales

    Adjusts the height of Badge to be driven by the capHeight of xsmall text plus vertical padding, rather than xsmall line height. This enables different typographic scales across themes, while ensuring the Badge height is relative.

  • Improve consistency of border radius usage across components

    Over time, individual components have reached for a larger radius in the scale, rather than increasing the scale at a theme level. This resulted in inconsistent use across the system, preventing uplift of the scale.

    Re-aligning all components to use the scale consistently enables themes to apply very different radius scales — enabling an upcoming design uplift theme.

Nov 9, 2022
  • Support data attribute boolean values

    The data attribute map now supports boolean values. This provides an improvement for the developer experience, no longer having to convert values to strings explicitly.

    EXAMPLE USAGE:

    <Component
      data={{
        'custom-attribute': true,
      }}
    />
    // => <div data-custom-attribute="true" />
Apr 8, 2022
  • Badge: Use span element

    As the Badge component is not used as a container element, we now use a span. This allows it to be used inside button elements, such as an AccordionItem, without producing invalid html.

Aug 20, 2021
  • Alert, Badge, Button, ButtonLink, ButtonRenderer, Card, Dialog, MenuRenderer, OverflowMenu, Pagination, TooltipRenderer, useToast: Increase border radius using updated borderRadius scale

Jun 21, 2021
  • Badge: Use correct text size for bleedY positioning

May 19, 2021
  • Add support for data attribute maps on all components.

    EXAMPLE USAGE:

    <Alert
      data={{
        testId: 'message'
      }}
    />
    
    // => <div data-testId="message" />
Feb 23, 2021
  • Badge: Add support for ref, tabIndex and aria-describedby props

  • Badge: Ensure ref, title, tabIndex and aria-describedby props are applied to the visual badge element, not its container element

Aug 27, 2020
  • Badge: Add bleedY prop

    You can now choose to allow the badge’s background colour to bleed out into the surrounding layout, making it easier to align with other elements.

    For example, we can align a badge to a Heading element using an Inline, even though the badge is actually taller than the heading. If we didn’t use the bleedY prop in this case, the badge would introduce unwanted space above and below the heading.

    <Inline alignY="center" space="xsmall">
      <Heading level="4">Heading</Heading>
      <Badge bleedY tone="positive">
        New
      </Badge>
    </Inline>
Aug 21, 2020
  • Badge: Allow custom title text

    EXAMPLE USAGE

    <Badge tone="positive" title="3 new jobs">3</Badge>