Skip to content

Commit 4a96ee7

Browse files
authored
Merge branch 'master' into eslint-react-hooks-2-rename-imports-collections
2 parents 90f690c + 791e232 commit 4a96ee7

27 files changed

+230
-230
lines changed

src/elements/Button/Button.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import {
1010
getComponentType,
1111
getUnhandledProps,
1212
SUI,
13-
useKeyOnly,
14-
useKeyOrValueAndKey,
15-
useValueAndKey,
13+
getKeyOnly,
14+
getKeyOrValueAndKey,
15+
getValueAndKey,
1616
useMergedRefs,
1717
} from '../../lib'
1818
import Icon from '../Icon/Icon'
@@ -103,24 +103,24 @@ const Button = React.forwardRef(function (props, ref) {
103103
const baseClasses = cx(
104104
color,
105105
size,
106-
useKeyOnly(active, 'active'),
107-
useKeyOnly(basic, 'basic'),
108-
useKeyOnly(circular, 'circular'),
109-
useKeyOnly(compact, 'compact'),
110-
useKeyOnly(fluid, 'fluid'),
111-
useKeyOnly(hasIconClass(props), 'icon'),
112-
useKeyOnly(inverted, 'inverted'),
113-
useKeyOnly(loading, 'loading'),
114-
useKeyOnly(negative, 'negative'),
115-
useKeyOnly(positive, 'positive'),
116-
useKeyOnly(primary, 'primary'),
117-
useKeyOnly(secondary, 'secondary'),
118-
useKeyOnly(toggle, 'toggle'),
119-
useKeyOrValueAndKey(animated, 'animated'),
120-
useKeyOrValueAndKey(attached, 'attached'),
106+
getKeyOnly(active, 'active'),
107+
getKeyOnly(basic, 'basic'),
108+
getKeyOnly(circular, 'circular'),
109+
getKeyOnly(compact, 'compact'),
110+
getKeyOnly(fluid, 'fluid'),
111+
getKeyOnly(hasIconClass(props), 'icon'),
112+
getKeyOnly(inverted, 'inverted'),
113+
getKeyOnly(loading, 'loading'),
114+
getKeyOnly(negative, 'negative'),
115+
getKeyOnly(positive, 'positive'),
116+
getKeyOnly(primary, 'primary'),
117+
getKeyOnly(secondary, 'secondary'),
118+
getKeyOnly(toggle, 'toggle'),
119+
getKeyOrValueAndKey(animated, 'animated'),
120+
getKeyOrValueAndKey(attached, 'attached'),
121121
)
122-
const labeledClasses = cx(useKeyOrValueAndKey(labelPosition || !!label, 'labeled'))
123-
const wrapperClasses = cx(useKeyOnly(disabled, 'disabled'), useValueAndKey(floated, 'floated'))
122+
const labeledClasses = cx(getKeyOrValueAndKey(labelPosition || !!label, 'labeled'))
123+
const wrapperClasses = cx(getKeyOnly(disabled, 'disabled'), getValueAndKey(floated, 'floated'))
124124

125125
const rest = getUnhandledProps(Button, props)
126126
const ElementType = getComponentType(props, {

src/elements/Button/ButtonContent.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
customPropTypes,
88
getComponentType,
99
getUnhandledProps,
10-
useKeyOnly,
10+
getKeyOnly,
1111
} from '../../lib'
1212

1313
/**
@@ -17,8 +17,8 @@ const ButtonContent = React.forwardRef(function (props, ref) {
1717
const { children, className, content, hidden, visible } = props
1818

1919
const classes = cx(
20-
useKeyOnly(visible, 'visible'),
21-
useKeyOnly(hidden, 'hidden'),
20+
getKeyOnly(visible, 'visible'),
21+
getKeyOnly(hidden, 'hidden'),
2222
'content',
2323
className,
2424
)

src/elements/Button/ButtonGroup.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import {
99
getComponentType,
1010
getUnhandledProps,
1111
SUI,
12-
useKeyOnly,
13-
useKeyOrValueAndKey,
14-
useValueAndKey,
15-
useWidthProp,
12+
getKeyOnly,
13+
getKeyOrValueAndKey,
14+
getValueAndKey,
15+
getWidthProp,
1616
} from '../../lib'
1717
import Button from './Button'
1818

@@ -48,21 +48,21 @@ const ButtonGroup = React.forwardRef(function (props, ref) {
4848
'ui',
4949
color,
5050
size,
51-
useKeyOnly(basic, 'basic'),
52-
useKeyOnly(compact, 'compact'),
53-
useKeyOnly(fluid, 'fluid'),
54-
useKeyOnly(icon, 'icon'),
55-
useKeyOnly(inverted, 'inverted'),
56-
useKeyOnly(labeled, 'labeled'),
57-
useKeyOnly(negative, 'negative'),
58-
useKeyOnly(positive, 'positive'),
59-
useKeyOnly(primary, 'primary'),
60-
useKeyOnly(secondary, 'secondary'),
61-
useKeyOnly(toggle, 'toggle'),
62-
useKeyOnly(vertical, 'vertical'),
63-
useKeyOrValueAndKey(attached, 'attached'),
64-
useValueAndKey(floated, 'floated'),
65-
useWidthProp(widths),
51+
getKeyOnly(basic, 'basic'),
52+
getKeyOnly(compact, 'compact'),
53+
getKeyOnly(fluid, 'fluid'),
54+
getKeyOnly(icon, 'icon'),
55+
getKeyOnly(inverted, 'inverted'),
56+
getKeyOnly(labeled, 'labeled'),
57+
getKeyOnly(negative, 'negative'),
58+
getKeyOnly(positive, 'positive'),
59+
getKeyOnly(primary, 'primary'),
60+
getKeyOnly(secondary, 'secondary'),
61+
getKeyOnly(toggle, 'toggle'),
62+
getKeyOnly(vertical, 'vertical'),
63+
getKeyOrValueAndKey(attached, 'attached'),
64+
getValueAndKey(floated, 'floated'),
65+
getWidthProp(widths),
6666
'buttons',
6767
className,
6868
)

src/elements/Container/Container.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import {
88
getComponentType,
99
getUnhandledProps,
1010
SUI,
11-
useKeyOnly,
12-
useTextAlignProp,
11+
getKeyOnly,
12+
getTextAlignProp,
1313
} from '../../lib'
1414

1515
/**
@@ -19,9 +19,9 @@ const Container = React.forwardRef(function (props, ref) {
1919
const { children, className, content, fluid, text, textAlign } = props
2020
const classes = cx(
2121
'ui',
22-
useKeyOnly(text, 'text'),
23-
useKeyOnly(fluid, 'fluid'),
24-
useTextAlignProp(textAlign),
22+
getKeyOnly(text, 'text'),
23+
getKeyOnly(fluid, 'fluid'),
24+
getTextAlignProp(textAlign),
2525
'container',
2626
className,
2727
)

src/elements/Divider/Divider.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
customPropTypes,
88
getComponentType,
99
getUnhandledProps,
10-
useKeyOnly,
10+
getKeyOnly,
1111
} from '../../lib'
1212

1313
/**
@@ -29,13 +29,13 @@ const Divider = React.forwardRef(function (props, ref) {
2929

3030
const classes = cx(
3131
'ui',
32-
useKeyOnly(clearing, 'clearing'),
33-
useKeyOnly(fitted, 'fitted'),
34-
useKeyOnly(hidden, 'hidden'),
35-
useKeyOnly(horizontal, 'horizontal'),
36-
useKeyOnly(inverted, 'inverted'),
37-
useKeyOnly(section, 'section'),
38-
useKeyOnly(vertical, 'vertical'),
32+
getKeyOnly(clearing, 'clearing'),
33+
getKeyOnly(fitted, 'fitted'),
34+
getKeyOnly(hidden, 'hidden'),
35+
getKeyOnly(horizontal, 'horizontal'),
36+
getKeyOnly(inverted, 'inverted'),
37+
getKeyOnly(section, 'section'),
38+
getKeyOnly(vertical, 'vertical'),
3939
'divider',
4040
className,
4141
)

src/elements/Header/Header.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import {
99
getComponentType,
1010
getUnhandledProps,
1111
SUI,
12-
useValueAndKey,
13-
useTextAlignProp,
14-
useKeyOrValueAndKey,
15-
useKeyOnly,
12+
getValueAndKey,
13+
getTextAlignProp,
14+
getKeyOrValueAndKey,
15+
getKeyOnly,
1616
} from '../../lib'
1717
import Icon from '../Icon'
1818
import Image from '../Image'
@@ -47,16 +47,16 @@ const Header = React.forwardRef(function (props, ref) {
4747
'ui',
4848
color,
4949
size,
50-
useKeyOnly(block, 'block'),
51-
useKeyOnly(disabled, 'disabled'),
52-
useKeyOnly(dividing, 'dividing'),
53-
useValueAndKey(floated, 'floated'),
54-
useKeyOnly(icon === true, 'icon'),
55-
useKeyOnly(image === true, 'image'),
56-
useKeyOnly(inverted, 'inverted'),
57-
useKeyOnly(sub, 'sub'),
58-
useKeyOrValueAndKey(attached, 'attached'),
59-
useTextAlignProp(textAlign),
50+
getKeyOnly(block, 'block'),
51+
getKeyOnly(disabled, 'disabled'),
52+
getKeyOnly(dividing, 'dividing'),
53+
getValueAndKey(floated, 'floated'),
54+
getKeyOnly(icon === true, 'icon'),
55+
getKeyOnly(image === true, 'image'),
56+
getKeyOnly(inverted, 'inverted'),
57+
getKeyOnly(sub, 'sub'),
58+
getKeyOrValueAndKey(attached, 'attached'),
59+
getTextAlignProp(textAlign),
6060
'header',
6161
className,
6262
)

src/elements/Icon/Icon.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import {
1010
getUnhandledProps,
1111
SUI,
1212
useEventCallback,
13-
useKeyOnly,
14-
useKeyOrValueAndKey,
15-
useValueAndKey,
13+
getKeyOnly,
14+
getKeyOrValueAndKey,
15+
getValueAndKey,
1616
} from '../../lib'
1717
import IconGroup from './IconGroup'
1818

@@ -59,16 +59,16 @@ const Icon = React.forwardRef(function (props, ref) {
5959
color,
6060
name,
6161
size,
62-
useKeyOnly(bordered, 'bordered'),
63-
useKeyOnly(circular, 'circular'),
64-
useKeyOnly(disabled, 'disabled'),
65-
useKeyOnly(fitted, 'fitted'),
66-
useKeyOnly(inverted, 'inverted'),
67-
useKeyOnly(link, 'link'),
68-
useKeyOnly(loading, 'loading'),
69-
useKeyOrValueAndKey(corner, 'corner'),
70-
useValueAndKey(flipped, 'flipped'),
71-
useValueAndKey(rotated, 'rotated'),
62+
getKeyOnly(bordered, 'bordered'),
63+
getKeyOnly(circular, 'circular'),
64+
getKeyOnly(disabled, 'disabled'),
65+
getKeyOnly(fitted, 'fitted'),
66+
getKeyOnly(inverted, 'inverted'),
67+
getKeyOnly(link, 'link'),
68+
getKeyOnly(loading, 'loading'),
69+
getKeyOrValueAndKey(corner, 'corner'),
70+
getValueAndKey(flipped, 'flipped'),
71+
getValueAndKey(rotated, 'rotated'),
7272
'icon',
7373
className,
7474
)

src/elements/Image/Image.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import {
1212
htmlImageProps,
1313
partitionHTMLProps,
1414
SUI,
15-
useKeyOnly,
16-
useKeyOrValueAndKey,
17-
useValueAndKey,
18-
useVerticalAlignProp,
15+
getKeyOnly,
16+
getKeyOrValueAndKey,
17+
getValueAndKey,
18+
getVerticalAlignProp,
1919
} from '../../lib'
2020
import Dimmer from '../../modules/Dimmer'
2121
import Label from '../Label/Label'
@@ -51,20 +51,20 @@ const Image = React.forwardRef(function (props, ref) {
5151
} = props
5252

5353
const classes = cx(
54-
useKeyOnly(ui, 'ui'),
54+
getKeyOnly(ui, 'ui'),
5555
size,
56-
useKeyOnly(avatar, 'avatar'),
57-
useKeyOnly(bordered, 'bordered'),
58-
useKeyOnly(circular, 'circular'),
59-
useKeyOnly(centered, 'centered'),
60-
useKeyOnly(disabled, 'disabled'),
61-
useKeyOnly(fluid, 'fluid'),
62-
useKeyOnly(hidden, 'hidden'),
63-
useKeyOnly(inline, 'inline'),
64-
useKeyOnly(rounded, 'rounded'),
65-
useKeyOrValueAndKey(spaced, 'spaced'),
66-
useValueAndKey(floated, 'floated'),
67-
useVerticalAlignProp(verticalAlign, 'aligned'),
56+
getKeyOnly(avatar, 'avatar'),
57+
getKeyOnly(bordered, 'bordered'),
58+
getKeyOnly(circular, 'circular'),
59+
getKeyOnly(centered, 'centered'),
60+
getKeyOnly(disabled, 'disabled'),
61+
getKeyOnly(fluid, 'fluid'),
62+
getKeyOnly(hidden, 'hidden'),
63+
getKeyOnly(inline, 'inline'),
64+
getKeyOnly(rounded, 'rounded'),
65+
getKeyOrValueAndKey(spaced, 'spaced'),
66+
getValueAndKey(floated, 'floated'),
67+
getVerticalAlignProp(verticalAlign, 'aligned'),
6868
'image',
6969
className,
7070
)

src/elements/Input/Input.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import {
1111
getComponentType,
1212
getUnhandledProps,
1313
partitionHTMLProps,
14-
useKeyOnly,
15-
useValueAndKey,
14+
getKeyOnly,
15+
getValueAndKey,
1616
setRef,
1717
} from '../../lib'
1818
import Button from '../Button'
@@ -95,16 +95,16 @@ const Input = React.forwardRef(function (props, ref) {
9595
const classes = cx(
9696
'ui',
9797
size,
98-
useKeyOnly(disabled, 'disabled'),
99-
useKeyOnly(error, 'error'),
100-
useKeyOnly(fluid, 'fluid'),
101-
useKeyOnly(focus, 'focus'),
102-
useKeyOnly(inverted, 'inverted'),
103-
useKeyOnly(loading, 'loading'),
104-
useKeyOnly(transparent, 'transparent'),
105-
useValueAndKey(actionPosition, 'action') || useKeyOnly(action, 'action'),
106-
useValueAndKey(iconPosition, 'icon') || useKeyOnly(icon || loading, 'icon'),
107-
useValueAndKey(labelPosition, 'labeled') || useKeyOnly(label, 'labeled'),
98+
getKeyOnly(disabled, 'disabled'),
99+
getKeyOnly(error, 'error'),
100+
getKeyOnly(fluid, 'fluid'),
101+
getKeyOnly(focus, 'focus'),
102+
getKeyOnly(inverted, 'inverted'),
103+
getKeyOnly(loading, 'loading'),
104+
getKeyOnly(transparent, 'transparent'),
105+
getValueAndKey(actionPosition, 'action') || getKeyOnly(action, 'action'),
106+
getValueAndKey(iconPosition, 'icon') || getKeyOnly(icon || loading, 'icon'),
107+
getValueAndKey(labelPosition, 'labeled') || getKeyOnly(label, 'labeled'),
108108
'input',
109109
className,
110110
)

src/elements/Label/Label.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import {
1010
getComponentType,
1111
getUnhandledProps,
1212
SUI,
13-
useKeyOnly,
14-
useKeyOrValueAndKey,
15-
useValueAndKey,
13+
getKeyOnly,
14+
getKeyOrValueAndKey,
15+
getValueAndKey,
1616
useEventCallback,
1717
} from '../../lib'
1818
import Icon from '../Icon/Icon'
@@ -59,18 +59,18 @@ const Label = React.forwardRef(function (props, ref) {
5959
color,
6060
pointingClass,
6161
size,
62-
useKeyOnly(active, 'active'),
63-
useKeyOnly(basic, 'basic'),
64-
useKeyOnly(circular, 'circular'),
65-
useKeyOnly(empty, 'empty'),
66-
useKeyOnly(floating, 'floating'),
67-
useKeyOnly(horizontal, 'horizontal'),
68-
useKeyOnly(image === true, 'image'),
69-
useKeyOnly(prompt, 'prompt'),
70-
useKeyOnly(tag, 'tag'),
71-
useKeyOrValueAndKey(corner, 'corner'),
72-
useKeyOrValueAndKey(ribbon, 'ribbon'),
73-
useValueAndKey(attached, 'attached'),
62+
getKeyOnly(active, 'active'),
63+
getKeyOnly(basic, 'basic'),
64+
getKeyOnly(circular, 'circular'),
65+
getKeyOnly(empty, 'empty'),
66+
getKeyOnly(floating, 'floating'),
67+
getKeyOnly(horizontal, 'horizontal'),
68+
getKeyOnly(image === true, 'image'),
69+
getKeyOnly(prompt, 'prompt'),
70+
getKeyOnly(tag, 'tag'),
71+
getKeyOrValueAndKey(corner, 'corner'),
72+
getKeyOrValueAndKey(ribbon, 'ribbon'),
73+
getValueAndKey(attached, 'attached'),
7474
'label',
7575
className,
7676
)

0 commit comments

Comments
 (0)