Feb 22, 2024
  • Checkbox: Improve tri-state handling

    Fixes a bug in tri-state Checkbox where transitioning from mixed to checked could result in the visual presentation being out of sync with the desired state.

Apr 26, 2023
  • Hide field borders in dark containers

    Reduce visual noise when a form field is displayed in a dark container by hiding the default border. As fields are light on light backgrounds, the border is used to delineate its bounds against the container, which is not relevant in a dark container.

Apr 17, 2023
  • RadioItem, Checkbox: Fix stacking context behaviour

    A RadioItem and Checkbox previously created a new stacking context with an elevated z-index applied on hover, resulting in their labels overlaying other elements in an unpredictable ways — most noticable when toggling nested content.

    For example, toggling nested content containing an Autosuggest, would see the list of suggestions list would be overlayed by the next RadioItem on hover.

    To fix this, the z-index is no longer elevated on hover, and additionally the nested content container applies an elevated index when the field is checked.

  • Checkbox, RadioItem: Fix alignment with updated Badge layout

    Improve layout to work with updated Badge layout which is no longer driven by line height.

Feb 5, 2023
  • CheckboxStandalone: Enable alignment with Text

    Enables CheckboxStandalone to be wrapped in a Text component, ensuring it only occupies the same layout as text. This is useful for visually aligning checkboxes in a custom layout alongside other text-based components, e.g. AccordionItem.

    EXAMPLE USAGE:

    <Columns>
      <Column>
        <Text>
          <CheckboxStandalone />
        </Text>
      </Column>
      <Column>
        <AccordionItem />
      </Column>
    </Columns>
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" />
Oct 18, 2021
  • Autosuggest, Checkbox, CheckboxStandalone, Dropdown, MonthPicker, TextField, Textarea, Radio, RadioGroup: Dim the field value and label when field is disabled

Sep 30, 2021
  • Buttons, Fields, TextLinks, Toggle: Use span for field state overlays instead of div

    Produce more valid HTML as div elements are not as flexible with which elements they can be inside (from a validators perspective).

Aug 20, 2021
  • Display formAccent outline on form elements when focused

Jul 26, 2021
  • Checkbox, RadioGroup, Radio: Use atoms for label cursor styles

    Since the disabled state of a checkbox can only be changed via JavaScript, cursor styles can be toggled via Box props rather than generating additional CSS.

    While this is an improvement in and of itself, this change is being made to work around a third-party testing bug where our use of :disabled in a complex CSS selector is causing an exception to be thrown.

May 19, 2021
  • CheckboxStandalone:: Add component

    Adds support for cases where a Checkbox needs to be used without a form field style label.

    To maintain accessibility, it is required to provide either a aria-label or aria-labelledby property, to describe the field's intent.

    Given there is no visual label, the following features from a standard Checkbox cannot be supported:

    • description
    • message
    • badge
    • children (nested content)

    EXAMPLE USAGE:

    <CheckboxStandalone
      id={...}
      checked={...}
      onChange={...}
      aria-label="Label"
    />
Apr 29, 2021
  • Checkbox,RadioGroup,Toggle: Add size support to Checkbox, RadioGroup & Toggle

    Adds support for adjusting the size of a Checkbox, the RadioItems within a RadioGroup or a Toggle. Setting the size adjusts both the visual control and the text size of the label.

    EXAMPLE USAGE:

      <Checkbox size="small" label="Label" />
      <RadioGroup size="small" label="Label">
        ...
      </RadioGroup>
      <Toggle size="small" label="Label" />
Nov 30, 2020
  • Checkbox: Support inferring of tri-state checked value

    To simplify the use of tri-state checkboxes, the checked prop now supports resolving the tri-state value from an array of checked values.

    EXAMPLE USAGE:

     <Checkbox
      label="Select all"
      checked={[ true, false, false ]} // Will resolve to "mixed"
    />
Nov 9, 2020
  • Checkbox: Add support for mixed state

    A checkbox can now accept a boolean or mixed as the checked property. When mixed, the checkbox is marked as being in an indeterminate state and announced as mixed to a screen reader.

    EXAMPLE USAGE:

    <Checkbox
      checked="mixed"
      onChange={handler}
      label="Label"
    />
Nov 3, 2020
  • Checkbox,RadioGroup,Radio: Fix element type passed to onChange event

    Fixes a bug where the onChange event previously received the change event for a form element rather than an input element.

Oct 22, 2020
  • Radio,Checkbox: Apply aria-describedby only when needed

    Only apply aria-describedby when needed, e.g. either a message or description is passed.

Oct 8, 2020
  • Radio,Checkbox: Add description and badge support

    Allows a way to provide more detail about a Radio or Checkbox item using description, bringing these fields into line with the rest of the form fields in Braid. Also allows a badge to be provided to be placed alongside the label.

    EXAMPLE USAGE:

    <Radio
      label="Option"
      description="This option is your favourite"
      badge={
        <Badge tone="positive" weight="strong">
          New
        </Badge>
      }
    />

    or

    <Checkbox
      label="Option"
      description="This option is your favourite"
      badge={
        <Badge tone="positive" weight="strong">
          New
        </Badge>
      }
    />
Mar 18, 2020
  • Checkbox & Radio: Only add aria-describedby when a message is provided

    BUG FIXES

    Checkbox & Radio

    Both of these inputs were previously always adding the aria-describedby attribute, while conditionally rendering the message only when provided. This meant that elements without a message would be indicating that they are described by an element that does not exist.