Skip to content

Releases: gravity-ui/uikit

v6.41.0

16 Jan 15:51
3fdc5bb
Compare
Choose a tag to compare

6.41.0 (2025-01-16)

Features

Bug Fixes

  • NumberInput: disable rounding decimal to integer without passed step (#2037) (3a6a6bc)
  • NumberInput: zero min/max props (#2046) (255aa9d)

v7.0.0-beta.5

15 Jan 16:49
94cdce6
Compare
Choose a tag to compare
v7.0.0-beta.5 Pre-release
Pre-release

⚠️ Breaking Changes

  • Migrate Popup, Modal and other overlay components to use floating-ui instead of popper.js.
  • Built JS files are now in ES2022

Button

  • Rename CSS API: --g-button-icon-size--g-button-icon-space.
  • Component now accepts any properties from the <button/> or <a/> element.
  • Deprecate extraProps property.

Link

  • Component now accepts any properties from the <a/> element.
  • Deprecate extraProps property.

RadioButton

  • Rename component to SegmentedRadioGroup.
  • No value is checked by default now (before, the first one was checked if no value has been provided).

RadioGroup

  • No value is checked by default now (before, the first one was checked if no value has been provided).

Slider

  • Remove deprecated debounceDelay property.

NumberInput

Component moved to the main entrypoint.

Breadcrumbs

Breadcrumbs is swapped with the component from the lab entrypoint.

The old component has beed moved to the legacy entrypoint, marked as deprecated and will be removed in v8:

import {Breadcrumbs as LegacyBreadcrumbs} from '@gravity-ui/uikit/legacy'; // <-- Old Breadcrumbs
import {Breadcrumbs} from '@gravity-ui/uikit'; // <-- New Breadcrumbs

Popup

  • Change offset property type to number | {mainAxis?: number; crossAxis?: number}.
  • Remove disableLayer and type properties. Floating elements are no longer attached to the "layer" context.
  • Remove modifiers property. Use floatingMiddlewares instead, check the Floating UI docs for more info.

    ⚠️ Providing own middlewares will replace the defaults. Before, with modifires from popper.js it was adding to the defaults

  • Remove altBoundary property. It now applies automatically when disablePortal is true.
  • Remove deprecated onClick property.
  • Remove onMouseEnter and onMouseLeave properties.
  • Remove onFocus and onBlur properties.
  • Remove container property. If you need to override Portal container, wrap Popup with PortalProvider.
  • Remove contentClassName property. There is no more content element.
  • Replace restoreFocus and restoreFocusRef properties with returnFocus?: boolean | React.Ref<HTMLElement>.
  • Rename property: onTransitionEnteronTransitionIn.
  • Rename property: onTransitionEnteredonTransitionInComplete.
  • Rename property: onTransitionExitonTransitionOut.
  • Rename property: onTransitionExitedonTransitionOutComplete.
  • Deprecate anchorRef property. Use anchorElement instead.
  • Deprecate onClose, onEscapeKeyDown and onOutsideClick callback. Use onOpenChange instead.

Popover

Popover is reworked to be a "low-level" component with built-in interactivity and simplier API. See README for details.

The old component has beed moved to the legacy entrypoint, marked as deprecated and will be removed in v8:

import {Popover as LegacyPopover} from '@gravity-ui/uikit/legacy'; // <-- Old Popover
import {Popover} from '@gravity-ui/uikit'; // <-- New Popover

Tooltip

  • Remove id property. Tooltip sets it automatically now to connect the reference via a11y attributes.
  • Remove contentClassName property. There is no more content element.
  • Remove disablePortal property.

ActionTooltip

  • Update open/close animation.
  • Remove id property. ActionTooltip sets it automatically now to connect the reference via a11y attributes.
  • Remove contentClassName property. There is no more content element.
  • Remove disablePortal property.

Dialog

  • Remove listenKeyEnter property from Dialog.Footer.

List

  • Remove ListWrapper component.

Menu

  • Remove icon property from Menu.Item. Use iconStart instead.

Select

  • Change renderControl signature: onKeyDown, onClick, popupId, selectId, activeIndex are replaced by single triggerProps object.

Sheet

  • Remove extra wrapper around the content.

FilePreview

  • Remove fullscreen mobile image preview.

HelpMark

  • Remove placement property. Use new popoverProps property to pass any prop to Popover.
  • Remove buttonProps property. All "top-level" props are now passed to the button element.
  • Remove buttonRef property. Use normal ref instead,

TextInput

  • Remove leftContent property. Use startContent instead.
  • Remove rightContent property. Use endContent instead.

Avatar

  • One of the following properties is now required: imgUrl, icon or text.
  • Change font size of the text in s size.
  • Change border width in 2xs size.
  • Rename CSS API: --g-avatar-color--g-avatar-text-color.

User

  • Change the gap between the avatar and the text in m size.
  • Change font size in xl size.
  • Rework CSS API (replace all the variables with new ones).

UserLabel

  • Replace children property with text property.
  • Change spacing between elements and font sizes.
  • Add a border for avatar.
  • Rework CSS API (replace all the variables with new ones).

useFocusWithin

  • Remove FocusWithinProps type, use UseFocusWithinProps instead.

Layout

  • RemoveLayoutProvider component. Use layout prop from the ThemeProvider instead.

Styles

  • Update default monospace font family: prioritize Liberation Mono over Ubuntu Mono.
  • Remove scrollbars styling.
  • Update text offset in Checkbox, Radio and Switch.
  • New appearance of disabled state in Checkbox and Radio.

🚀 Features

Popup

  • Add modalFocus property which controls whether focus should be trapped inside the floating element.
  • Add initialFocus property which moves focus to the specified element when autoFocus is true. It can be number (nth tabbable) or React.Ref.
  • Add disableFocusVisuallyHiddenDismiss property which disables adding hidden controls for accessibility purposes when autoFocus is true.
  • Add zIndex property

Tooltip

  • children property can be a function that returns ReactElement.
  • Add open and onOpenChange for controlled state.
  • Add trigger property. See README for details.
  • Add role property which can be either tooltip or label. See README for details.

ActionTooltip

  • children property can be a function that returns ReactElement.
  • Add open and onOpenChange for controlled state.
  • Add trigger property. See README for details.

Avatar

  • Add 3xs size.
  • Support all AriaLabelingProps.
  • Add --g-avatar-border-width, --g-avatar-inner-border-width and --g-avatar-font-weight to CSS API.

User

  • Add 3xs size.
  • Support all AriaLabelingProps.
  • Support string in avatar property.

UserLabel

  • Add 3xs and 2xs sizes.
  • Add description property.

v6.40.0

24 Dec 12:30
13ab300
Compare
Choose a tag to compare

6.40.0 (2024-12-24)

Features

v6.39.0

20 Dec 13:42
a0920c8
Compare
Choose a tag to compare

6.39.0 (2024-12-19)

Features

Bug Fixes

  • Icon: remove redundant color:inherit style (#1999) (d6cda6e)
  • Sheet: remove animation lags when closing in some browsers (#1984) (555b186)

v6.38.0

09 Dec 12:38
7a6f596
Compare
Choose a tag to compare

6.38.0 (2024-12-06)

Features

Bug Fixes

  • PinInput: remove height glitch in Safari (#1938) (d6cb1cf)
  • TextInput: share font styles between error and note blocks in OuterAdditionalContent (#1970) (55737b5)

v6.37.0

27 Nov 09:49
8772d1a
Compare
Choose a tag to compare

6.37.0 (2024-11-27)

Features

  • Breadcrunbs: allow items to be disabled independently (#1962) (301e4ab)
  • Select: new label and value resize behaviour (#1896) (2be5eb8)

v6.36.0

26 Nov 11:05
1ffa460
Compare
Choose a tag to compare

6.36.0 (2024-11-25)

Features

Bug Fixes

  • Select: do not reserve space for clear if empty (#1956) (11dd537)
  • Toc: correctly display content of no items.length and add event forward (#1939) (8d456c3)

v6.35.2

14 Nov 15:51
bc87468
Compare
Choose a tag to compare

6.35.2 (2024-11-14)

Bug Fixes

  • PlaceholderContainer: remove href attribute fallback in actions (#1947) (60a8b92)
  • useBodyScrollLock: correctly restore styles (#1950) (b41a53a)

v6.35.1

13 Nov 15:26
6a09bbc
Compare
Choose a tag to compare

6.35.1 (2024-11-13)

Bug Fixes

v6.35.0

13 Nov 12:22
0ebf4cd
Compare
Choose a tag to compare

6.35.0 (2024-11-11)

Features

Bug Fixes

  • PlaceholderContainer: add component to index file (#1924) (cdce171)
  • Popover: use visible title for popup a11y label (#1941) (f9d75e8)
  • Toaster: reveal animation lag (#1927) (e16fa1c)