@spothero/ui 22.1.0 → 22.1.2
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.
|
@@ -13,24 +13,23 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
13
13
|
// No clue how to move these into the style file so just co-located to keep from slowing down
|
|
14
14
|
// Chakra V2 will heavily impact this component
|
|
15
15
|
const labelStyle = {
|
|
16
|
-
color:
|
|
17
|
-
fontWeight:
|
|
16
|
+
color: 'gray.600',
|
|
17
|
+
fontWeight: 'semibold',
|
|
18
18
|
top: 3,
|
|
19
19
|
left: 0,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
pointerEvents: "none",
|
|
20
|
+
position: 'absolute',
|
|
21
|
+
pointerEvents: 'none',
|
|
23
22
|
padding: 'inherit',
|
|
24
23
|
marginX: 3,
|
|
25
24
|
paddingX: 1,
|
|
26
25
|
marginY: 2,
|
|
27
|
-
transformOrigin:
|
|
26
|
+
transformOrigin: 'left top',
|
|
28
27
|
// below is from chakra v2 that I'm pulling in
|
|
29
28
|
transitionProperty: 'scale translate',
|
|
30
29
|
transitionDuration: '200ms'
|
|
31
30
|
};
|
|
32
31
|
const activeLabelStyles = {
|
|
33
|
-
transform:
|
|
32
|
+
transform: 'scale(0.85) translateY(-16px)',
|
|
34
33
|
_invalid: {
|
|
35
34
|
color: 'error',
|
|
36
35
|
'& .chakra-form__required-indicator': {
|
|
@@ -39,8 +38,8 @@ const activeLabelStyles = {
|
|
|
39
38
|
}
|
|
40
39
|
};
|
|
41
40
|
const controlStyles = {
|
|
42
|
-
position:
|
|
43
|
-
borderWidth:
|
|
41
|
+
position: 'relative',
|
|
42
|
+
borderWidth: '0',
|
|
44
43
|
sx: {
|
|
45
44
|
label: labelStyle,
|
|
46
45
|
input: {
|
|
@@ -58,7 +57,7 @@ const controlStyles = {
|
|
|
58
57
|
}
|
|
59
58
|
},
|
|
60
59
|
// styles used for when we extend functionality - textarea:not(:placeholder-shown) ~ label
|
|
61
|
-
|
|
60
|
+
'input:not(:placeholder-shown) + label, .chakra-select__wrapper + label': {
|
|
62
61
|
...activeLabelStyles
|
|
63
62
|
},
|
|
64
63
|
// should be a cleaner way of doing this
|
|
@@ -78,9 +77,9 @@ const controlStyles = {
|
|
|
78
77
|
paddingLeft: 8
|
|
79
78
|
},
|
|
80
79
|
// Styling for select
|
|
81
|
-
|
|
80
|
+
'.chakra-select__wrapper + label': {
|
|
82
81
|
...activeLabelStyles,
|
|
83
|
-
transform:
|
|
82
|
+
transform: 'scale(0.85) translateY(-16px) translateX(-2px)' //X added to help align
|
|
84
83
|
},
|
|
85
84
|
'button[data-value] + label': {
|
|
86
85
|
...activeLabelStyles
|
|
@@ -95,7 +94,7 @@ const controlStyles = {
|
|
|
95
94
|
},
|
|
96
95
|
input: {
|
|
97
96
|
'&::placeholder': {
|
|
98
|
-
opacity:
|
|
97
|
+
opacity: '1'
|
|
99
98
|
}
|
|
100
99
|
}
|
|
101
100
|
}
|
|
@@ -14,11 +14,11 @@ var _Icon = _interopRequireDefault(require("../../Icon/Icon"));
|
|
|
14
14
|
var _FormControl = _interopRequireDefault(require("../FormControl"));
|
|
15
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
-
//For select left is static arrow,
|
|
17
|
+
//For select left is static arrow,
|
|
18
18
|
/**
|
|
19
19
|
* A component used in the homepage/midfunnel refresh of 2024
|
|
20
20
|
* Initially built as purpose built as possible with hopes of extending it to other systems
|
|
21
|
-
* using `<RefreshedSelect><option value="1"/>/<RefreshedSelect>` will bring in the core of this.
|
|
21
|
+
* using `<RefreshedSelect><option value="1"/>/<RefreshedSelect>` will bring in the core of this.
|
|
22
22
|
* Left arrow is static for this select. You can pass a second left element in but it will not over write the down arrow currently
|
|
23
23
|
*/
|
|
24
24
|
const Select = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
@@ -55,7 +55,7 @@ const Select = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
55
55
|
as: _chevronDown.default
|
|
56
56
|
}),
|
|
57
57
|
iconSize: 20,
|
|
58
|
-
fontWeight: "
|
|
58
|
+
fontWeight: "medium",
|
|
59
59
|
fontSize: "sm",
|
|
60
60
|
ref: ref,
|
|
61
61
|
className: classes,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spothero/ui",
|
|
3
|
-
"version": "22.1.
|
|
3
|
+
"version": "22.1.2",
|
|
4
4
|
"description": "SpotHero's React component UI library.",
|
|
5
5
|
"main": "./dist/components/index.js",
|
|
6
6
|
"exports": "./dist/components/index.js",
|
|
@@ -94,14 +94,14 @@
|
|
|
94
94
|
"webpack-merge": "5.1.4",
|
|
95
95
|
"css-loader": "5.1.3",
|
|
96
96
|
"sass-loader": "10.2.1",
|
|
97
|
+
"@spothero/babel-preset-spothero": "5.1.0",
|
|
97
98
|
"@spothero/browserslist-config": "4.0.0",
|
|
98
99
|
"@spothero/core": "7.0.1",
|
|
99
|
-
"@spothero/babel-preset-spothero": "5.1.0",
|
|
100
100
|
"@spothero/eslint-config": "6.1.0",
|
|
101
|
-
"@spothero/icons": "9.0.
|
|
101
|
+
"@spothero/icons": "9.0.1",
|
|
102
102
|
"@spothero/npm-publisher": "7.0.0",
|
|
103
|
-
"@spothero/
|
|
104
|
-
"@spothero/
|
|
103
|
+
"@spothero/prettier-config": "4.0.0",
|
|
104
|
+
"@spothero/stylelint-config": "6.0.0"
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|
|
107
107
|
"@chakra-ui/react": "1.8.8",
|