@spothero/ui 22.1.2 → 22.2.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.
@@ -117,6 +117,12 @@ const variants = exports.variants = {
117
117
  _disabled: {
118
118
  color: 'gray.dark'
119
119
  }
120
+ },
121
+ _active: {
122
+ color: 'primary.600',
123
+ _disabled: {
124
+ color: 'gray.dark'
125
+ }
120
126
  }
121
127
  },
122
128
  tertiaryOnDark: {
@@ -54,7 +54,8 @@ const Button = /*#__PURE__*/(0, _react.forwardRef)(({
54
54
  ref: ref,
55
55
  className: classes,
56
56
  variant: "refreshed",
57
- "data-value": buttonValue
57
+ "data-value": buttonValue,
58
+ paddingBottom: "2"
58
59
  }, props, {
59
60
  isDisabled: isDisabled
60
61
  }), buttonValue));
@@ -14,14 +14,13 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
14
14
  // Chakra V2 will heavily impact this component
15
15
  const labelStyle = {
16
16
  color: 'gray.600',
17
- fontWeight: 'semibold',
18
- top: 3,
17
+ fontWeight: 'normal',
18
+ top: 2,
19
19
  left: 0,
20
20
  position: 'absolute',
21
21
  pointerEvents: 'none',
22
22
  padding: 'inherit',
23
- marginX: 3,
24
- paddingX: 1,
23
+ paddingLeft: 3,
25
24
  marginY: 2,
26
25
  transformOrigin: 'left top',
27
26
  // below is from chakra v2 that I'm pulling in
@@ -29,9 +28,8 @@ const labelStyle = {
29
28
  transitionDuration: '200ms'
30
29
  };
31
30
  const activeLabelStyles = {
32
- transform: 'scale(0.85) translateY(-16px)',
31
+ transform: 'scale(0.85) translateY(-.75rem) translateX(.2rem)',
33
32
  _invalid: {
34
- color: 'error',
35
33
  '& .chakra-form__required-indicator': {
36
34
  display: 'none'
37
35
  }
@@ -50,9 +48,23 @@ const controlStyles = {
50
48
  opacity: 0
51
49
  },
52
50
  _invalid: {
51
+ '&:focus': {
52
+ borderBottomRadius: 0,
53
+ borderColor: 'primary.default'
54
+ },
55
+ '&:focus + label': {
56
+ color: 'gray.600'
57
+ },
58
+ '& + label': {
59
+ color: 'error',
60
+ transform: 'scale(0.85) translateY(-16px)'
61
+ },
53
62
  '& + label .chakra-form__required-indicator': {
54
63
  //Styling for asterisk always to be red if invalid
55
64
  color: 'error'
65
+ },
66
+ '&::placeholder': {
67
+ opacity: 1
56
68
  }
57
69
  }
58
70
  },
@@ -66,26 +78,34 @@ const controlStyles = {
66
78
  paddingRight: 8 //This should be only when there is a right element - DOM order made this a headache
67
79
  },
68
80
  '.chakra-input__group > .chakra-input__left-element ~ span select': {
69
- paddingLeft: 9,
81
+ paddingLeft: 10,
70
82
  paddingRight: 8 //This should be only when there is a right element - DOM order made this a headache
71
83
  },
72
84
  '.chakra-input__group > .chakra-input__left-element ~ span button': {
73
- paddingLeft: 10,
85
+ paddingLeft: 12,
74
86
  paddingRight: 8 //This should be only when there is a right element - DOM order made this a headache
75
87
  },
76
88
  '.chakra-input__group > .chakra-input__left-element ~ span label': {
77
- paddingLeft: 8
89
+ // transform: 'scale(0.85) translateY(-1rem) translateX(.5rem)',
90
+ paddingLeft: '2.75rem'
78
91
  },
79
92
  // Styling for select
80
93
  '.chakra-select__wrapper + label': {
81
94
  ...activeLabelStyles,
82
- transform: 'scale(0.85) translateY(-16px) translateX(-2px)' //X added to help align
95
+ transform: 'scale(0.85) translateY(-.75rem) translateX(.25rem)'
83
96
  },
84
97
  'button[data-value] + label': {
85
98
  ...activeLabelStyles
86
99
  },
87
100
  '.FormElement-contains-error': {
88
101
  borderColor: 'error'
102
+ },
103
+ '.chakra-button + label': {
104
+ display: 'flex',
105
+ alignItems: 'center',
106
+ height: '100%',
107
+ top: 0,
108
+ margin: 0
89
109
  }
90
110
  },
91
111
  _focusWithin: {
@@ -122,7 +142,7 @@ const FormControl = /*#__PURE__*/(0, _react.forwardRef)(({
122
142
  }, controlStyles), /*#__PURE__*/_react.default.createElement(_react2.InputGroup, null, leftElement && /*#__PURE__*/_react.default.createElement(_react2.InputLeftElement, (0, _extends2.default)({
123
143
  pointerEvents: "none",
124
144
  top: "52%",
125
- left: "1.5rem",
145
+ left: "1.3rem",
126
146
  transform: "translate(-50%,-50%)"
127
147
  }, leftElementStyles), leftElement), /*#__PURE__*/_react.default.createElement(_react2.Box, {
128
148
  as: "span",
@@ -28,6 +28,7 @@ const Input = /*#__PURE__*/(0, _react.forwardRef)(({
28
28
  leftElement,
29
29
  rightElementStyles,
30
30
  leftElementStyles,
31
+ placeholder = '',
31
32
  ...props
32
33
  }, ref) => {
33
34
  const classes = (0, _classnames.default)({
@@ -48,8 +49,11 @@ const Input = /*#__PURE__*/(0, _react.forwardRef)(({
48
49
  leftElementStyles: leftElementStyles,
49
50
  variant: "refreshed"
50
51
  }, /*#__PURE__*/_react.default.createElement(_react2.Input, (0, _extends2.default)({
52
+ placeholder: placeholder,
51
53
  ref: ref,
52
54
  className: classes,
55
+ paddingTop: 'var(--chakra-sizes-5-5)',
56
+ paddingBottom: "2",
53
57
  variant: "refreshed"
54
58
  }, props)));
55
59
  });
@@ -7,13 +7,14 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _merge = _interopRequireDefault(require("lodash/merge"));
9
9
  var _styles = _interopRequireDefault(require("../../../Input/styles"));
10
+ //Below isn't being used in build for some reason
10
11
  const variants = {
11
12
  refreshed: {
12
13
  field: {
13
14
  ..._styles.default.variants.outline.field,
14
15
  height: 'auto',
15
- paddingTop: 6,
16
- paddingBottom: 3
16
+ paddingTop: 8,
17
+ paddingBottom: 2
17
18
  }
18
19
  }
19
20
  };
@@ -32,6 +32,8 @@ const sizes = {
32
32
  // 16px
33
33
  5: '1.25rem',
34
34
  // 20px
35
+ 5.5: '1.375rem',
36
+ // 22px
35
37
  6: '1.5rem',
36
38
  // 24px
37
39
  7: '1.75rem',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spothero/ui",
3
- "version": "22.1.2",
3
+ "version": "22.2.1",
4
4
  "description": "SpotHero's React component UI library.",
5
5
  "main": "./dist/components/index.js",
6
6
  "exports": "./dist/components/index.js",