@spothero/ui 17.2.1 → 17.2.4

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.
@@ -18,7 +18,7 @@ const baseStyle = {
18
18
  borderStyle: 'solid',
19
19
  borderRadius: '1.25rem',
20
20
  textTransform: 'capitalize',
21
- transition: 'all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94)',
21
+ transition: 'all normal ease',
22
22
  _disabled: {
23
23
  cursor: 'not-allowed',
24
24
  opacity: 1,
@@ -12,8 +12,9 @@ const baseStyle = {
12
12
  borderWidth: 1,
13
13
  borderStyle: 'solid',
14
14
  borderImage: 'initial',
15
- borderRadius: 'var(--chakra-radii-sm)',
15
+ borderRadius: 'sm',
16
16
  borderColor: 'gray.600',
17
+ transition: 'all 150ms ease',
17
18
  _readOnly: {
18
19
  boxShadow: 'none !important',
19
20
  userSelect: 'all'
@@ -25,11 +26,11 @@ const baseStyle = {
25
26
  },
26
27
  _focus: {
27
28
  zIndex: 1,
28
- boxShadow: t => `0 0 1px 1px ${t.colors.primary['300']}`
29
+ boxShadow: 'outline'
29
30
  },
30
31
  _checked: {
31
- borderColor: 'brandBlue',
32
- backgroundColor: 'brandBlue',
32
+ borderColor: 'primary.default',
33
+ backgroundColor: 'primary.default',
33
34
  _hover: {
34
35
  borderColor: 'primary.600',
35
36
  backgroundColor: 'primary.600'
@@ -38,6 +39,9 @@ const baseStyle = {
38
39
  borderColor: 'gray.200',
39
40
  backgroundColor: 'gray.200'
40
41
  }
42
+ },
43
+ '& svg': {
44
+ filter: `drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25))`
41
45
  }
42
46
  },
43
47
  label: {
@@ -35,7 +35,7 @@ const variants = {
35
35
  fontWeight: 'normal'
36
36
  },
37
37
  _focus: {
38
- borderColor: 'brandBlue'
38
+ borderColor: 'primary.default'
39
39
  },
40
40
  _hover: {
41
41
  borderColor: 'gray.300'
@@ -1,15 +1,19 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.variants = exports.default = void 0;
8
+ var _merge = _interopRequireDefault(require("lodash/merge"));
9
+ var _theme = _interopRequireDefault(require("@chakra-ui/theme"));
7
10
  const baseStyle = {
8
- transition: `all 0.15s ease-out`,
11
+ transition: `all 0.15s ease`,
9
12
  color: 'text.link.light',
10
13
  fontWeight: 'semibold',
11
14
  _hover: {
12
- color: 'primary.600'
15
+ color: 'primary.600',
16
+ textDecoration: 'none'
13
17
  },
14
18
  _focus: {
15
19
  boxShadow: 'outline'
@@ -34,9 +38,9 @@ exports.variants = variants;
34
38
  const defaultProps = {
35
39
  variant: 'standard'
36
40
  };
37
- var _default = {
41
+ var _default = (0, _merge.default)(_theme.default.components.Link, {
38
42
  baseStyle,
39
43
  variants,
40
44
  defaultProps
41
- };
45
+ });
42
46
  exports.default = _default;
@@ -20,7 +20,10 @@ const closeButtonStyles = _ref => {
20
20
  padding: 4,
21
21
  borderTopRightRadius: 4,
22
22
  _hover: pseudoStyles(variant),
23
- _focus: pseudoStyles(variant)
23
+ _focus: {
24
+ ...pseudoStyles(variant),
25
+ boxShadow: 'outline'
26
+ }
24
27
  };
25
28
  };
26
29
  var _default = closeButtonStyles;
@@ -20,7 +20,10 @@ const popoverContentStyles = _ref => {
20
20
  borderWidth: '1px',
21
21
  borderStyle: 'solid',
22
22
  '--popper-arrow-shadow-color': t => t.colors.gray['100'],
23
- zIndex: 'layer10'
23
+ zIndex: 'layer10',
24
+ _focusVisible: {
25
+ outline: '3px solid rgba(91, 170, 250, 0.7)'
26
+ }
24
27
  };
25
28
  };
26
29
  var _default = popoverContentStyles;
@@ -14,25 +14,35 @@ const baseStyle = {
14
14
  borderWidth: '1px',
15
15
  borderColor: 'gray.dark',
16
16
  backgroundColor: 'white',
17
+ color: 'white',
17
18
  minWidth: 5,
18
19
  minHeight: 5,
19
20
  marginTop: 1,
21
+ transition: 'all 150ms ease',
22
+ _before: {
23
+ content: '""',
24
+ display: 'inline-block',
25
+ position: 'relative',
26
+ width: '0px',
27
+ height: '0px',
28
+ opacity: '0',
29
+ borderRadius: '50%',
30
+ background: 'currentcolor',
31
+ transition: 'all 150ms ease-in',
32
+ filter: `drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25))`
33
+ },
20
34
  _checked: {
21
- borderWidth: 0,
35
+ borderColor: 'primary.default',
22
36
  color: 'white',
23
37
  backgroundColor: 'primary.default',
24
38
  _before: {
25
- content: '""',
26
- display: 'inline-block',
27
- position: 'relative',
28
39
  width: 2,
29
40
  height: 2,
30
- borderRadius: '50%',
31
- background: 'currentcolor'
41
+ opacity: '1'
32
42
  }
33
43
  },
34
44
  _focus: {
35
- boxShadow: t => `0 0 1px 2px ${t.colors.primary['300']}`
45
+ boxShadow: 'outline'
36
46
  },
37
47
  _disabled: {
38
48
  borderColor: 'gray.200',
@@ -14,7 +14,15 @@ const overrides = {
14
14
  },
15
15
  baseStyle: props => (0, _merge.default)(_theme.default.components.Switch.baseStyle(props), {
16
16
  track: {
17
- bg: 'gray.medium'
17
+ bg: 'gray.medium',
18
+ overflow: 'clip'
19
+ },
20
+ thumb: {
21
+ transition: 'all 150ms ease',
22
+ boxShadow: 'base',
23
+ _hover: {
24
+ boxShadow: 'md'
25
+ }
18
26
  }
19
27
  })
20
28
  };
@@ -23,9 +23,6 @@ const variants = {
23
23
  borderColor: 'primary.default',
24
24
  fontWeight: 'semibold'
25
25
  },
26
- _focus: {
27
- boxShadow: 'none'
28
- },
29
26
  _active: {
30
27
  color: 'black',
31
28
  bg: 'transparent'
@@ -52,6 +52,12 @@ Object.defineProperty(exports, "notificationStatusStyles", {
52
52
  return _notifications.notificationStatusStyles;
53
53
  }
54
54
  });
55
+ Object.defineProperty(exports, "shadows", {
56
+ enumerable: true,
57
+ get: function () {
58
+ return _shadows.default;
59
+ }
60
+ });
55
61
  Object.defineProperty(exports, "sizes", {
56
62
  enumerable: true,
57
63
  get: function () {
@@ -66,6 +72,7 @@ Object.defineProperty(exports, "zIndices", {
66
72
  });
67
73
  var _sizes = _interopRequireDefault(require("./sizes"));
68
74
  var _colors = _interopRequireDefault(require("./colors"));
75
+ var _shadows = _interopRequireDefault(require("./shadows"));
69
76
  var _zindices = _interopRequireDefault(require("./zindices"));
70
77
  var _breakpoints = _interopRequireDefault(require("./breakpoints"));
71
78
  var _typography = require("./typography");
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _merge = _interopRequireDefault(require("lodash/merge"));
9
+ var _theme = _interopRequireDefault(require("@chakra-ui/theme"));
10
+ const shadows = {
11
+ outline: '0 0 0 3px rgba(91, 170, 250, 0.7)' // primary.400, 70% opacity
12
+ };
13
+ var _default = (0, _merge.default)(_theme.default.shadows, shadows);
14
+ exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spothero/ui",
3
- "version": "17.2.1",
3
+ "version": "17.2.4",
4
4
  "description": "SpotHero's React component UI library.",
5
5
  "main": "./dist/components/index.js",
6
6
  "exports": "./dist/components/index.js",
@@ -57,7 +57,6 @@
57
57
  "clean": "rm -rf docs v2 lib styles coverage || true",
58
58
  "lint": "eslint .storybook src --ext .jsx,.js",
59
59
  "start": "start-storybook -p 6006",
60
- "start:ci": "http-server ./docs --port 8000 --silent",
61
60
  "test": "npm run test:unit",
62
61
  "test:template": "NODE_ENV=test jest --config ./jest.config.json",
63
62
  "test:unit": "npm run test:template -- --coverage",
@@ -68,10 +67,6 @@
68
67
  "release": "npm-release",
69
68
  "publish-storybook": "npm run build:storybook && push-dir --dir=docs/v2 --branch=gh-pages --allow-unclean"
70
69
  },
71
- "engines": {
72
- "node": ">=16.14.2",
73
- "npm": ">=8.5.0"
74
- },
75
70
  "devDependencies": {
76
71
  "@babel/cli": "7.14.5",
77
72
  "@babel/core": "7.14.6",
@@ -99,7 +94,6 @@
99
94
  "classnames": "2.2.6",
100
95
  "eslint-loader": "4.0.2",
101
96
  "get-contrast-ratio": "0.2.1",
102
- "http-server": "0.12.3",
103
97
  "jest": "26.6.3",
104
98
  "jest-chain": "1.1.5",
105
99
  "jest-date-mock": "1.0.8",
@@ -146,4 +140,4 @@
146
140
  "react-redux": ">=7.0.0",
147
141
  "redux": ">=4.0.0"
148
142
  }
149
- }
143
+ }