@spothero/ui 14.6.0 → 14.7.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 CHANGED
@@ -1,3 +1,14 @@
1
+ # 14.7.1 - 05/13/2022
2
+
3
+ ## Miscellaneous Updates
4
+ * [[7141cca](https://github.com/spothero/fe-ui/commit/7141cca)] - `fix:` Kebab case style property was throwing terminal warning ([#289](https://github.com/spothero/fe-ui/pull/289)) (Mick Johnson)
5
+
6
+ # 14.7.0 - 05/12/2022
7
+
8
+ ## New Features
9
+ * [[bf20c4f](https://github.com/spothero/fe-ui/commit/bf20c4f)] - Add classname to input and select so it doesn't break in prod ([#287](https://github.com/spothero/fe-ui/pull/287)) (annaliarosed)
10
+ * `Co-authored-by:` Annalia Destefano <annalia.destefano@spothero.com>
11
+
1
12
  # 14.6.0 - 05/10/2022
2
13
 
3
14
  ## New Features
package/CHANGELOG.tmp CHANGED
@@ -1,10 +1,5 @@
1
- # 14.6.0 - 05/10/2022
1
+ # 14.7.1 - 05/13/2022
2
2
 
3
- ## New Features
4
- * [[119cc85](https://github.com/spothero/fe-ui/commit/119cc85)] - Wrap Select component in FormControl component ([#285](https://github.com/spothero/fe-ui/pull/285)) (annaliarosed)
5
- * `feat:` Wrap Select in FormControl and update stories for Select
6
- * `feat:` Update styles to match design
7
- * `chore:` Remove FormControl stories for now
8
- * `fix:` Connect label and input
9
- * `fix:` Connect label and inputCo-authored-by: Annalia Destefano <annalia.destefano@spothero.com>
3
+ ## Miscellaneous Updates
4
+ * [[7141cca](https://github.com/spothero/fe-ui/commit/7141cca)] - `fix:` Kebab case style property was throwing terminal warning ([#289](https://github.com/spothero/fe-ui/pull/289)) (Mick Johnson)
10
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spothero/ui",
3
- "version": "14.6.0",
3
+ "version": "14.7.1",
4
4
  "description": "SpotHero's React component UI library.",
5
5
  "main": "v2/index-bundled.cjs.js",
6
6
  "module": "v2/index.js",
@@ -15,7 +15,6 @@ 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'}}
19
18
  {...props}
20
19
  {...((asAnchor || props.as === 'a') && anchorProps(isExternal))}
21
20
  ref={ref}
@@ -142,6 +142,7 @@ export const variants = {
142
142
  borderRadius: 'unset',
143
143
  color: 'primary.default',
144
144
  textDecoration: 'underline',
145
+ textUnderlineOffset: '1px',
145
146
  h: 'unset',
146
147
  m: 'unset',
147
148
  minW: 'unset',
@@ -164,6 +165,7 @@ export const variants = {
164
165
  borderWidth: 'none',
165
166
  color: 'white',
166
167
  textDecoration: 'underline',
168
+ textUnderlineOffset: '1px',
167
169
  h: 'unset',
168
170
  m: 'unset',
169
171
  minW: 'unset',
@@ -1,4 +1,5 @@
1
1
  import React, {forwardRef} from 'react';
2
+ import cn from 'classnames';
2
3
  import PropTypes from 'prop-types';
3
4
  import {Input as ChakraInput} from '@chakra-ui/react';
4
5
  import FormControl from '../FormControl/FormControl';
@@ -15,19 +16,23 @@ const Input = forwardRef(
15
16
  ...props
16
17
  },
17
18
  ref
18
- ) => (
19
- <FormControl
20
- isInvalid={isInvalid}
21
- isDisabled={isDisabled}
22
- isRequired={isRequired}
23
- errorMessage={errorMessage}
24
- helperText={helperText}
25
- label={label}
26
- inputId={props.id}
27
- >
28
- <ChakraInput ref={ref} {...props} />
29
- </FormControl>
30
- )
19
+ ) => {
20
+ const classes = cn({'FormElement-contains-error': isInvalid});
21
+
22
+ return (
23
+ <FormControl
24
+ isInvalid={isInvalid}
25
+ isDisabled={isDisabled}
26
+ isRequired={isRequired}
27
+ errorMessage={errorMessage}
28
+ helperText={helperText}
29
+ label={label}
30
+ inputId={props.id}
31
+ >
32
+ <ChakraInput ref={ref} className={classes} {...props} />
33
+ </FormControl>
34
+ );
35
+ }
31
36
  );
32
37
 
33
38
  Input.propTypes = {
@@ -1,4 +1,5 @@
1
1
  import React, {forwardRef} from 'react';
2
+ import cn from 'classnames';
2
3
  import PropTypes from 'prop-types';
3
4
  import {Select as ChakraSelect} from '@chakra-ui/react';
4
5
  import FormControl from '../FormControl/FormControl';
@@ -15,24 +16,29 @@ const Select = forwardRef(
15
16
  ...props
16
17
  },
17
18
  ref
18
- ) => (
19
- <FormControl
20
- isInvalid={isInvalid}
21
- isDisabled={isDisabled}
22
- isRequired={isRequired}
23
- errorMessage={errorMessage}
24
- helperText={helperText}
25
- label={label}
26
- inputId={props.id}
27
- >
28
- <ChakraSelect
29
- fontWeight="regular"
30
- fontSize="sm"
31
- ref={ref}
32
- {...props}
33
- />
34
- </FormControl>
35
- )
19
+ ) => {
20
+ const classes = cn({'FormElement-contains-error': isInvalid});
21
+
22
+ return (
23
+ <FormControl
24
+ isInvalid={isInvalid}
25
+ isDisabled={isDisabled}
26
+ isRequired={isRequired}
27
+ errorMessage={errorMessage}
28
+ helperText={helperText}
29
+ label={label}
30
+ inputId={props.id}
31
+ >
32
+ <ChakraSelect
33
+ fontWeight="regular"
34
+ fontSize="sm"
35
+ ref={ref}
36
+ className={classes}
37
+ {...props}
38
+ />
39
+ </FormControl>
40
+ );
41
+ }
36
42
  );
37
43
 
38
44
  Select.propTypes = {