@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.
- package/dist/components/Button/Button.styles.js +6 -0
- package/dist/components/RefreshedInput/Button/Button.js +2 -1
- package/dist/components/RefreshedInput/FormControl/index.js +31 -11
- package/dist/components/RefreshedInput/Input/Input.js +4 -0
- package/dist/components/RefreshedInput/Input/styles/index.js +3 -2
- package/dist/theme/base/sizes.js +2 -0
- package/package.json +1 -1
|
@@ -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: '
|
|
18
|
-
top:
|
|
17
|
+
fontWeight: 'normal',
|
|
18
|
+
top: 2,
|
|
19
19
|
left: 0,
|
|
20
20
|
position: 'absolute',
|
|
21
21
|
pointerEvents: 'none',
|
|
22
22
|
padding: 'inherit',
|
|
23
|
-
|
|
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(
|
|
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:
|
|
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:
|
|
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
|
-
|
|
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(
|
|
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.
|
|
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:
|
|
16
|
-
paddingBottom:
|
|
16
|
+
paddingTop: 8,
|
|
17
|
+
paddingBottom: 2
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
};
|
package/dist/theme/base/sizes.js
CHANGED