@spothero/ui 14.5.0 → 14.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/CHANGELOG.tmp +3 -22
- package/package.json +1 -1
- package/styles/v2/components/Button/Button.jsx +1 -0
- package/styles/v2/components/Button/Button.styles.js +63 -1
- package/styles/v2/components/Button/stories/index.stories.js +17 -2
- package/v2/index-bundled.cjs.js +1 -1
- package/v2/index-bundled.cjs.js.map +1 -1
- package/v2/index-bundled.esm.js +1 -1
- package/v2/index-bundled.esm.js.map +1 -1
- package/v2/index-unbundled.cjs.js +63 -3
- package/v2/index-unbundled.cjs.js.map +1 -1
- package/v2/index-unbundled.esm.js +63 -3
- package/v2/index-unbundled.esm.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# 14.5.1 - 05/05/2022
|
|
2
|
+
## Miscellaneous Updates
|
|
3
|
+
* [[87e838a](https://github.com/spothero/fe-ui/commit/87e838a)] - `feature:` FED 321 secondary button updates, add tertiary and destructive buttons ([#284](https://github.com/spothero/fe-ui/pull/284)) (Mick Johnson)
|
|
4
|
+
|
|
1
5
|
# 14.5.0 - 05/03/2022
|
|
2
6
|
|
|
3
7
|
## New Features
|
package/CHANGELOG.tmp
CHANGED
|
@@ -1,23 +1,4 @@
|
|
|
1
|
-
# 14.5.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* [[173526f](https://github.com/spothero/fe-ui/commit/173526f)] - FED-354 feat: adds Input component ([#283](https://github.com/spothero/fe-ui/pull/283)) (annaliarosed)
|
|
5
|
-
* `feat:` Set up TextInput component
|
|
6
|
-
* `refactor:` Rename component and set up styles
|
|
7
|
-
* `feat:` Unlabeled, placeholder styles added
|
|
8
|
-
* `feat:` Unlabeled, value styles added
|
|
9
|
-
* `feat:` Unlabeled, focus styles added
|
|
10
|
-
* `feat:` Unlabeled, error and disabled styles added
|
|
11
|
-
* `feat:` Add label prop and styles
|
|
12
|
-
* `feat:` Add helperText prop and styles
|
|
13
|
-
* `feat:` Add errorMessage prop and styles
|
|
14
|
-
* `feat:` Add isReadOnly prop to stories
|
|
15
|
-
* `fix:` Clean up
|
|
16
|
-
* `fix:` Change value color when isInvalid
|
|
17
|
-
* `fix:` Add missing ref
|
|
18
|
-
* `refactor:` Extract FormControl
|
|
19
|
-
* `fix:` Remove imported interfaces
|
|
20
|
-
* `fix:` Pass only isInvalid prop to FormControl
|
|
21
|
-
* `fix:` Pass only isDisabled and isRequired prop to FormControl
|
|
22
|
-
* `fix:` Pass forgotten propsCo-authored-by: Annalia Destefano <annalia.destefano@spothero.com>
|
|
1
|
+
# 14.5.1 - 05/05/2022
|
|
2
|
+
## Miscellaneous Updates
|
|
3
|
+
* [[87e838a](https://github.com/spothero/fe-ui/commit/87e838a)] - `feature:` FED 321 secondary button updates, add tertiary and destructive buttons ([#284](https://github.com/spothero/fe-ui/pull/284)) (Mick Johnson)
|
|
23
4
|
|
package/package.json
CHANGED
|
@@ -15,6 +15,7 @@ const anchorProps = (isExternal = false) => ({
|
|
|
15
15
|
const Button = forwardRef(({asAnchor, isExternal, ...props}, ref) => (
|
|
16
16
|
<ChakraButton
|
|
17
17
|
iconSpacing={2}
|
|
18
|
+
sx={{'text-underline-offset': '1px'}}
|
|
18
19
|
{...props}
|
|
19
20
|
{...((asAnchor || props.as === 'a') && anchorProps(isExternal))}
|
|
20
21
|
ref={ref}
|
|
@@ -32,6 +32,17 @@ const disabledButtonHoverStyle = {
|
|
|
32
32
|
},
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
+
const destructiveButtonStyles = {
|
|
36
|
+
bg: 'white',
|
|
37
|
+
borderColor: 'red.default',
|
|
38
|
+
color: 'red.default',
|
|
39
|
+
_hover: {
|
|
40
|
+
borderColor: 'red.800',
|
|
41
|
+
color: 'red.800',
|
|
42
|
+
...disabledButtonHoverStyle,
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
35
46
|
export const variants = {
|
|
36
47
|
primary: {
|
|
37
48
|
bg: 'primary.default',
|
|
@@ -63,7 +74,7 @@ export const variants = {
|
|
|
63
74
|
borderColor: 'gray.medium',
|
|
64
75
|
color: 'primary.default',
|
|
65
76
|
_hover: {
|
|
66
|
-
borderColor: 'primary.
|
|
77
|
+
borderColor: 'primary.600',
|
|
67
78
|
color: 'primary.600',
|
|
68
79
|
...disabledButtonHoverStyle,
|
|
69
80
|
},
|
|
@@ -125,6 +136,57 @@ export const variants = {
|
|
|
125
136
|
},
|
|
126
137
|
},
|
|
127
138
|
},
|
|
139
|
+
tertiary: {
|
|
140
|
+
bg: 'none',
|
|
141
|
+
borderWidth: 'none',
|
|
142
|
+
borderRadius: 'unset',
|
|
143
|
+
color: 'primary.default',
|
|
144
|
+
textDecoration: 'underline',
|
|
145
|
+
h: 'unset',
|
|
146
|
+
m: 'unset',
|
|
147
|
+
minW: 'unset',
|
|
148
|
+
p: 'unset',
|
|
149
|
+
lineHeight: 1,
|
|
150
|
+
_disabled: {
|
|
151
|
+
bg: 'none',
|
|
152
|
+
color: 'gray.dark',
|
|
153
|
+
},
|
|
154
|
+
_hover: {
|
|
155
|
+
color: 'primary.600',
|
|
156
|
+
_disabled: {
|
|
157
|
+
color: 'gray.dark',
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
tertiaryOnDark: {
|
|
162
|
+
bg: 'none',
|
|
163
|
+
borderRadius: 'unset',
|
|
164
|
+
borderWidth: 'none',
|
|
165
|
+
color: 'white',
|
|
166
|
+
textDecoration: 'underline',
|
|
167
|
+
h: 'unset',
|
|
168
|
+
m: 'unset',
|
|
169
|
+
minW: 'unset',
|
|
170
|
+
p: 'unset',
|
|
171
|
+
_disabled: {
|
|
172
|
+
bg: 'none',
|
|
173
|
+
color: 'white',
|
|
174
|
+
opacity: '.7',
|
|
175
|
+
},
|
|
176
|
+
_hover: {
|
|
177
|
+
color: 'white',
|
|
178
|
+
opacity: '.8',
|
|
179
|
+
_disabled: {
|
|
180
|
+
opacity: '.7',
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
destructive: {
|
|
185
|
+
...destructiveButtonStyles,
|
|
186
|
+
},
|
|
187
|
+
destructiveOnDark: {
|
|
188
|
+
...destructiveButtonStyles,
|
|
189
|
+
},
|
|
128
190
|
};
|
|
129
191
|
|
|
130
192
|
const defaultProps = {
|
|
@@ -58,8 +58,23 @@ Tertiary.argTypes = {
|
|
|
58
58
|
onClick: {action: 'clicked'},
|
|
59
59
|
};
|
|
60
60
|
Tertiary.args = {
|
|
61
|
-
children: '
|
|
62
|
-
variant: '
|
|
61
|
+
children: 'tertiary',
|
|
62
|
+
variant: 'tertiary',
|
|
63
|
+
isDisabled: false,
|
|
64
|
+
isLoading: false,
|
|
65
|
+
loadingText: 'Loading',
|
|
66
|
+
isFullWidth: false,
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const Destructive = ButtonTemplate.bind({});
|
|
70
|
+
Destructive.argTypes = {
|
|
71
|
+
...createSelectControl('type', ['button', 'reset', 'submit']),
|
|
72
|
+
...disableArgs('variant'),
|
|
73
|
+
onClick: {action: 'clicked'},
|
|
74
|
+
};
|
|
75
|
+
Destructive.args = {
|
|
76
|
+
children: 'destructive',
|
|
77
|
+
variant: 'destructive',
|
|
63
78
|
isDisabled: false,
|
|
64
79
|
isLoading: false,
|
|
65
80
|
loadingText: 'Loading',
|