@adaptavant/core@0.0.15

This release is our sixth (and hopefully final) Release Candidate for Earth 1.0.

At this stage, the next release will be marked as 1.0.0, so please test out this release thoroughly and give us your feedback before the upcoming stable release.

Here are the highlights for 0.0.15:

Renamed variants

We have made changes to the available variants for Button, ButtonLink, IconButton, and IconLink:

  • Renamed the "primary" variant to "accentPrimary."
  • Renamed the "secondary" variant to "accentSecondary."
  • Added a new variant called "neutralPrimary."

TextLink has also undergone variant updates:

  • Renamed the "primary" variant to "neutralPrimary."
  • Renamed the "secondary" variant to "neutralSecondary."
  • Added new variants called "accentPrimary" and "regular."

Loading has also renamed tones:

  • Renamed the "accent" tone to "accentPrimary."
  • Renamed the "primary" tone to "neutralPrimary."
  • Renamed the "critical" tone to "criticalPrimary."

Similarly, we have renamed the tones for Icons:

  • Renamed the "primary" tone to "neutralPrimary."
  • Renamed the "secondary" tone to "neutralSecondary."
  • Renamed the "tertiary" tone to "neutralTertiary."
  • Renamed the "accent" tone to "accentPrimary."
  • Renamed the "critical" tone to "criticalPrimary."

Icons

In addition to the renamed tones, we have made two more small updates to the icon components in this release. We have deleted the unused createIcon function and updated the ShareIcon to be styled more like iOS.

Tokens

We’ve made the following breaking changes to our tokens:

  • Removed the border["status"] token. To check if you were using this token, search for the following Tailwind classes: border-status, divide-status, ring-status.
  • Removed the background["avatar-secondary"] token. To check if you were using this token, search for the following Tailwind class: bg-avatar-secondary.
  • Updated the background["canvas"] token for the setmore-black brand.
  • Updated the background["avatar"] tokens in all brands.

We’ve also added new tokens for background["avatar-hover"] and status["border"], and wired up the background-canvas-secondary Tailwind class.

Badge

This newly added component was added by new Design System team member Nandhini 🎉.

RadioGroup

The isDisabled prop now accepts a function that receives the value prop for the Radio you want to disable. This allows you to disable individual Radios within a RadioGroup. You can continue to use a boolean as a prop to disable/enable the entire RadioGroup.

const pokemon = ["Bulbasaur", "Charmander", "Squirtle", "Magikarp"];
const [selected, setSelected] = React.useState(pokemon[0]);

return (
  <RadioGroup
    legend="Pokémon"
    description="Choose your starter"
    name="starter"
    onChange={setSelected}
    value={selected}
    isDisabled={(value) => value === "Magikarp"}
    >
    {pokemon.map((p) => (
      <Radio label={p} value={p} />
    ))}
  </RadioGroup>
);

We also updated the RadioPrimitive (as well as CheckboxPrimitive and TogglePrimitive) to cancel onChange events when they are disabled.

Textarea

The Textarea component has been updated to support a "subtle" appearance when wrapped in the InlineField component.

Symbols

We’ve split up the icons and symbols in the codebase and added a new entrypoint that you can import them from (@adaptavant/core/symbols).

Tooltip

We’ve added a TooltipProvider into the Root component so we can detect when a tooltip is showing. If multiple tooltips are triggered, we will dismiss the oldest one first to ensure they do not overlap.


Here is the full changelog with links to commits where changes were introduced:

Patch Changes

  • 24ceb4c: Update TextLink component:
    • added 2 new variants: accent, default
    • update styling in existing variants: primary, secondary
  • a59b512: Add color-scheme to Tailwind color plugin
  • cc4fc43: Textarea: Supports subtle appearance
  • 1417d3b: Add new entrypoint for symbols
  • 4162d58: - Loading: update tone prop
    • accent ⇒ accentPrimary
    • primary ⇒ neutralPrimary
    • onPrimary stays the same
    • critical ⇒ criticalPrimary
  • 411c383: - RadioGroup: Accept function for isDisabled prop as well as a boolean
    • useRadioGroupItemProps: allow disabling a single item when used in a RadioGroup
    • useRadioGroupState provide default value of false for isDisabled prop
    • CheckboxPrimitive: Cancel onChange events when disabled
    • RadioPrimitive: Cancel onChange events when disabled
    • TogglePrimitive: Cancel onChange events when disabled
  • 315dd14: - Button:
    • Rename "primary" variant to "accentPrimary"
    • Rename "secondary" variant to "accentSecondary"
    • Add new "neutralPrimary" variant
    • IconButton
      • Rename "primary" variant to "accentPrimary"
      • Rename "secondary" variant to "accentSecondary"
      • Add new "neutralPrimary" variant
    • ButtonLink
      • Rename "primary" variant to "accentPrimary"
      • Rename "secondary" variant to "accentSecondary"
      • Add new "neutralPrimary" variant
    • IconLink
      • Rename "primary" variant to "accentPrimary"
      • Rename "secondary" variant to "accentSecondary"
      • Add new "neutralPrimary" variant
  • f6bcf5d: - Added Badge Component
  • 0d054c4: Only allow one Tooltip to be shown at a time
  • 4e3f180: Rename useStyleProps to getStyleProps and update return type to be a function instead of an object with a .dom method.
  • 0d792a2: Update share icon
  • 7e3a909: Added an optional isToday prop that can alter the today’s date calculation (for example to take timezones into account, since ReactDayPicker by default only works with system/browser timezone)
  • 3f6b585: TextLink update variant prop
    • accent ⇒ accentPrimary
    • primary ⇒ neutralPrimary
    • secondary ⇒ neutralSecondary
    • default deleted
    • regular added
  • 66e2b3b: - DropdownMenu: Removed className, classNames, style and styles props
  • 3768758: Avatar:
    • make avatar not accentable
    • update status badge borders
  • Tokens:
    • remove border["status"]
    • remove background["avatar-secondary"] token
    • add background["avatar-hover"] token
  • 8dc9956: Field: remove "wrapper" part and use negative margin to move description closer to label
  • d392d6a: Added primitive and types exports for Toggle, Radio, Checkbox components
  • 0bb2ce2: - Icons:
    • Update tone prop:
      • primary ⇒ neutralPrimary
      • secondary ⇒ neutralSecondary
      • tertiary ⇒ neutralTertiary
      • accent ⇒ accentPrimary
      • critical ⇒ criticalPrimary
    • Delete unused createIcon function
  • 89fdc49: Token updates:
    • Added background-canvas-secondary to tailwind colors
    • Updated canvas token in dark mode for Setmore Black theme