Skip to content

Releases: gravity-ui/uikit

v6.1.1

26 Feb 17:40
76b7d08
Compare
Choose a tag to compare

6.1.1 (2024-02-26)

Bug Fixes

  • breadcrumbs: fix adaptive more view and define ResizeObserver in ssr apps (#1364) (dc6e514)
  • controls: allow disable input via controlProps (#1371) (3228dca)
  • CopyToClipboard: return CopyToClipboardProps type (#1367) (43599c2)

v6.1.0

21 Feb 10:46
ca6baae
Compare
Choose a tag to compare

6.1.0 (2024-02-21)

Features

  • Disclosure: possibility to use DefaultDisclosureSummary inside … (#1359) (f8b52b9)
  • Select: add useSelectOptions hook (#1356) (456ffaa)
  • Slider: introduce Slider component (#1243) (a1bf754)
  • Table: add renderRowActions property (#1353) (e074b1a)
  • withTableSettings: add the renderControls prop (#1357) (b3f0d78)

Bug Fixes

  • List: fix virtualized list items rerender (#1314) (8c45f7c)
  • Select: do not call onFilterChange on mount (#1321) (0bb7c66)
  • TextInput: unequal text alignment in textinput (#1306) (c9cdbd0)
  • TreeSelect: fix render container method (#1344) (1ab9d59)
  • TreeSelect: fixed dnd examples with selected values (#1329) (14d6ceb)
  • TreeSelect: remove default popup width (#1350) (84044f0)

v6.0.0

06 Feb 15:34
f2e4662
Compare
Choose a tag to compare

6.0.0 (2024-02-06)

⚠️ Breaking Changes

Button

  • Old "private" CSS-variables are removed: --yc-button-background-color, --yc-button-background-color-hover, --yc-button-height, --yc-button-padding, --yc-button-border-radius. Remove them or migrate to the new CSS API.

Alert

  • Removed positive theme, use success instead.

Card

  • Removed positive theme, use success instead.
  • Old "private" CSS-variables are removed: --yc-card-box-shadow, --yc-card-border-radius. Remove them or migrate to the new CSS API.

CopyToClipboard

  • CopyToClipboardStatus enum changed to union type: 'pending' | 'success' | 'error'.

ClipboardButton

  • Used icons from Gravity pack.
  • size prop accepts Button's size, not a number.

Dialog

  • Old "private" CSS-variables are removed: --yc-dialog-*

Label

  • onClose prop renamed to onCloseClick

Link

  • href prop is now required.
  • Removed normal-visitable view, use visitable prop instead.

List

  • Removed --yc-list-height and --yc-list-item-height CSS vars, use component props itemsHeight and itemHeight respectively.
  • CSS var --yc-list-margin is replaced with --g-list-item-padding from CSS API.
  • From this release we do not recommend to use this component. We're working on a new version of list component with better customization and configuration.

MobileContext

Hooks useMobile and usePlatform now return only the value, without the setter. Same is true for withMobile HOC. The only remaining way to change context values is to set props directly on the MobileContext.

Modal

  • Old "private" CSS-variables are removed: --yc-modal-margin, --yc-modal-border-radius. Remove them or migrate to the new CSS API.

Persona

  • Component refactored to be built with new Avatar component
  • Component renamed to UserLabel due to similarity with the Label
  • onClose prop renamed to onCloseClick

Popup

  • Old "private" CSS-variables are removed: --yc-popup-background-color, --yc-popup-border-color, --yc-popup-border-width. Remove them or migrate to the new CSS API.

Popover

  • Old "private" CSS-variables are removed: --yc-popover-padding, --yc-popover-max-width. Remove them or migrate to the new CSS API.

Sheet

  • Old "private" CSS-variables are removed: --yc-sheet-content-paddings. Remove them or migrate to the new CSS API.

Tabs

  • Old "private" CSS-variables are removed: --yc-tab-item-vertical-padding, --yc-tab-item-vertical-height. Remove them or migrate to the new CSS API.

Toaster

  • Old "private" CSS-variables are removed: --yc-toaster-desktop-width, --yc-toaster-margin, --yc-toaster-padding. Remove them or migrate to the new CSS API.
  • type prop renamed to theme and its value error changed to danger.
  • Type ToastType renamed to ToastTheme.

Tooltip

  • Tooltip was merged into ActionTooltip.
  • New component Tooltip was introduced as a replacement for browsers' native tooltip.

User

  • Component is now built with new Avatar component, so imgUrl prop moved to dedicated avatar prop:

    // Old
    <User imgUrl="..." />
    
    // New
    <User avatar={{imgUrl: '...'}} />

UserAvatar

  • Component removed in favor or new generic Avatar

CSS

  • Removed deprecated --yc-* CSS-variables.
  • Removed fallbacks of :focus-visible.
  • Used logical CSS-properties all over the components.
  • Prefix for all components is changed from .yc-* to .g-*.

Hooks

  • Hook useOnFocusOutside removed. Use useFocusWithin instead.
  • Type UseFileInputOutput removed. Use UseFileInputResult instead.
  • Type UseIntersection renamed to UseIntersectionProps.
  • Removed setOpen from useSelect result. Use toggleOpen instead.

Misc

  • Added imports of CSS-files to cjs modules as well. If you are using these files, ensure that you have an appropriate loader in your bundler to handle them.

🚀 Features

Avatar Component

The component's purpose is to provide a way to display generic avatars. It allows to display images via urls, initials letters from text and icon. The component has different sizes and views "out of the box", but also fully customizable. It's now used in User and Persona components.

Components CSS API

We are introducing a new CSS API for some components. It allows "low-level" customization of component's appearance via CSS-variables. Look if CSS API is available for component on docs page.

RTL Support

All components are now correctly displayed with right-to-left languages. To set direction use direction prop of ThemeProvider, values are ltr (default) and rtl. To get current direction inside your React App use useDirection hook or withDirection HOC.

Button.Icon

  • side prop now accepts start and end

Disclojure

  • arrowPosition prop now accepts start and end

Popover

  • offset prop now accepts {block: number; inline: number;}

Content overflow in Modal and Dialog

Modal and Dialog components now have prop for controlling content overflow behaviour. Prop contentOverflow has 2 values: visible (default, current behaviour) and auto. Setting auto switches scrolling to the content area.

New Table sort indicator

With withTableSorting HOC sort inidicators on sortable columns are always visible, new icons were used, arrows instead of carets.

List 2.0

  • New set of hooks and basic stateless components
  • useList, to create components based on lists of data, including tree-like ones. Keyboard support, filtering, and basic usage scenarios such as virtualization, dnd, and an endless list are implemented. For more information, see the documentation and examples in Storybook.
  • Experimental component TreeSelect based on the new functionality of the useList hook. Depending on the passed data structure, the component can be used as a regular Select, or a representation of tree-like data structures. It has support for DnD and virtualization implemented outside, so the component doesn't not depends on heavy-weight libraries anymore. See the examples in Storybook.
  • All new functionality is unstable meaning the API of the components may change based on feedback

v5.30.1

06 Feb 13:44
a1e14d4
Compare
Choose a tag to compare

5.30.1 (2024-02-06)

Bug Fixes

  • Dropdown: opening sub menus in dropdown menu with using keyboard (#1298) (1aed302)
  • MenuItem: fix non interactive MenuItem style (#1307) (b1a386d)
  • TextInput: add overflow hidden to text-input__content wrapper (#1293) (d52a7bd)

v5.30.0

01 Feb 10:57
3b3a3ff
Compare
Choose a tag to compare

5.30.0 (2024-01-31)

Features

  • Select: added errorMessage, errorPlacement and validationType props (#1291) (8f2f07b)
  • Table: added link as Table action element (#1290) (de63cef)

Bug Fixes

  • Label: missing text overflow (#1206) (60357cd)
  • List: calling onLoadMore function while using keyboard (#1284) (1760166)
  • Pagination: stories controls (#1281) (a6fac44)
  • Table: sticky column (#1283) (7366c9b)
  • Table: withTableSorting can get sort value using column's ID written as path (#640) (d5bb68b)

v5.29.0

22 Jan 09:51
bcccc6f
Compare
Choose a tag to compare

5.29.0 (2024-01-19)

Features

  • Disclosure: added qa attribute for details and summary nodes (#1253) (b1bbcd1)

Bug Fixes

  • Select: add type="button" to SelectClear (#1255) (6a9e189)

v5.28.0

18 Jan 11:48
1c551f7
Compare
Choose a tag to compare

5.28.0 (2024-01-16)

Features

Bug Fixes

v5.27.0

15 Jan 07:55
048971c
Compare
Choose a tag to compare

5.27.0 (2024-01-10)

Features

  • Disclosure: allow use React.Node as summary (#1233) (3180060)

Bug Fixes

  • Disclosure: component size should not be used for its content (#1234) (c721640)
  • Pagination: fix total page calculation (#1237) (8f1af66)
  • Select: activate first clickable item (#1228) (13b921e)
  • Select: add 100% width to default labels (#1239) (5bd5edd)
  • ThemeProvider: fix rootClassName update (#1231) (4f0f099)

v5.26.0

26 Dec 12:14
e53ea25
Compare
Choose a tag to compare

5.26.0 (2023-12-26)

Features

  • calculate body class names seperately (#1197) (3dcf03d)
  • Popup: add aria-label & aria-labelledby attributes (#1202) (f68183a)

Bug Fixes

v5.25.0

12 Dec 14:37
67ba981
Compare
Choose a tag to compare

5.25.0 (2023-12-12)

Features