Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Releases: smooth-code/smooth-ui

v10.0.1

21 Mar 13:28
Compare
Choose a tag to compare

Bug Fixes

v10.0.0

20 Mar 17:26
Compare
Choose a tag to compare

Features

  • popover, tooltips, responsive grid, hooks (#122) (7bc0b8c)

BREAKING CHANGES

React v16.8+ is now required

The library now uses hooks inside, hooks required React v16.8+.

Grid gutter is now based on system

Components Grid, Row and Col accepts a gutter property since a long time... But this prop was not accepting responsive and all system based utilities. It is now completely based on system.

// In v9, gutter will be "8px"
// In v10, gutter will be "40px", to fix it use `gutter="8px"` or better `gutter={1}`
<Grid gutter={8} />

Same behaviour for Row an Col components.

Toggler render props is now an array

Toggler now returns an array instead of an object. It allows better renaming and it is aligned with useState signature.

// v9
<Toggler>{({ toggled, onToggle }) => { /* ... */ }</Toggler>
// v10
<Toggler>{([toggled, onToggle]) => { /* ... */ }</Toggler>

v9.1.0

07 Mar 17:32
Compare
Choose a tag to compare

Bug Fixes

Features

v9.0.2

20 Feb 16:55
Compare
Choose a tag to compare

Bug Fixes

  • fix Label component style (9806ae6)

v9.0.1

04 Feb 13:24
Compare
Choose a tag to compare

Bug Fixes

  • augment system specificity (f6aace4)

v9.0.0

04 Feb 10:28
Compare
Choose a tag to compare

Bug Fixes

Features

  • simplify API & fixes theme bugs (3ac41ec)
  • simplify core & remove theme dependency (cec1029)

BREAKING CHANGES

  • uiAs prop & helper have been removed
  • prop utility has been removed
  • Undocumented utilities are no longer exported
  • controlFocus has been renamed baseFocus, controlFocus is only
    for controls (when control prop is true)
  • mixin function is no longer available, also mixins have changed
  • Select no longer accepts options prop

uiAs

uiAs was confusing, it has been completely removed. You can now use native methods provided by emotion and styled-components.

// smooth-ui v8
<Button uiAs="div" />

// smooth-ui v9
<Button as="div" />
// smooth-ui v8
import { uiAs } from '@smooth-ui/core-sc'
const DivButton = uiAs(Button, 'div')

// smooth-ui v9
const DivButton = Button.withComponent('div')

Mixins

Previously mixins were called using mixin helper:

import { styled, mixin } from '@smooth-ui/core-sc'

const Styled = styled.div`
  color: ${mixin('colorLevel', 'red', 5)};
`

All mixins are now exported:

import { styled, colorLevel } from '@smooth-ui/core-sc'

const Styled = styled.div`
  color: ${colorLevel('red', 5)};
`

Theme

Theme is no longer required, Smooth UI will work well without theme and
you can override only needed properties without having to load the
entire theme.

The benefit from that approach is that code splitting is fully
efficient, if you use only one component in Smooth UI you will load only
theme primitives of this component.

The size of a result bundle that is using only a Button:

 202K  bundle-smooth-ui-v8.js
 194K  bundle-smooth-ui-v9.js
  65K  bundle-smooth-ui-v8.js.gz
  63K  bundle-smooth-ui-v9.js.gz

As you can see the bundle has been reduced of 8K (no gzip) and of 2K
(gzip).

v8.1.0

22 Jan 08:27
Compare
Choose a tag to compare

Bug Fixes

  • modal: prevent injecting __scTheme in DOM props (2dad70f), closes #99

Features

v8.0.1

17 Jan 11:18
Compare
Choose a tag to compare

Bug Fixes

  • system: fix issue with space utilities (#97) (192a3aa)
  • types: replace TS definition globalStyle by Normalize (#95) (ea162a3)

v8.0.0

16 Jan 13:25
Compare
Choose a tag to compare

Bug Fixes

Features

  • support emotion 10 & remove hacks (#93) (d311640)
  • system: add textTransform (753eecd)

BREAKING CHANGES

  • OriginalComponent.withComponent(NewComponent) is replaced by uiAs(OriginalComponent, NewComponent)

  • as={NewComponent} is replaced by uiAs={NewComponent}

  • globalStyle() is now replaced by Normalize component

Migration from Smooth UI v7

v7.1.1

11 Jan 13:52
Compare
Choose a tag to compare

Bug Fixes