@spothero/ui 13.5.0-beta.2 → 13.5.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 +12 -12
- package/CHANGELOG.tmp +5 -3
- package/backlog/GooglePlacesSearchInput/GooglePlacesSearchInput.js +2 -8
- package/package.json +1 -1
- package/styles/GooglePlacesSearchInput/GooglePlacesSearchInput.jsx +1 -11
- package/styles/v2/components/Button/Button.jsx +1 -1
- package/styles/v2/components/Button/Button.styles.js +13 -5
- package/styles/v2/components/Button/stories/button.js +50 -3
- package/styles/v2/components/Button/stories/index.stories.js +37 -94
- package/styles/v2/components/Button/stories/overview.js +0 -5
- package/v1/index-bundled-cjs/index.js +1 -1
- package/v1/index-bundled-cjs/index.js.map +1 -1
- package/v1/index-bundled-esm/index.js +1 -1
- package/v1/index-bundled-esm/index.js.map +1 -1
- package/v1/index-unbundled-cjs/index.js +35 -35
- package/v1/index-unbundled-esm/index.js +35 -35
- package/v2/index-bundled-cjs/{ImageCarousel-82cdeedd.js → ImageCarousel-cb8be109.js} +2 -2
- package/v2/index-bundled-cjs/{ImageCarousel-82cdeedd.js.map → ImageCarousel-cb8be109.js.map} +1 -1
- package/v2/index-bundled-cjs/{index-fdeca92b.js → index-2b46a27c.js} +2 -2
- package/v2/index-bundled-cjs/{index-fdeca92b.js.map → index-2b46a27c.js.map} +1 -1
- package/v2/index-bundled-cjs/index.js +1 -1
- package/v2/index-bundled-esm/{ImageCarousel-78ce05c7.js → ImageCarousel-cede66f0.js} +2 -2
- package/v2/index-bundled-esm/{ImageCarousel-78ce05c7.js.map → ImageCarousel-cede66f0.js.map} +1 -1
- package/v2/index-bundled-esm/{index-ce0805d9.js → index-30020bd8.js} +4 -4
- package/v2/index-bundled-esm/{index-ce0805d9.js.map → index-30020bd8.js.map} +1 -1
- package/v2/index-bundled-esm/index.js +1 -1
- package/v2/index-unbundled-cjs/{ImageCarousel-0d0a4e89.js → ImageCarousel-530bfa91.js} +4 -4
- package/v2/index-unbundled-cjs/{ImageCarousel-0d0a4e89.js.map → ImageCarousel-530bfa91.js.map} +1 -1
- package/v2/index-unbundled-cjs/{index-0958c0e9.js → index-b03d22dd.js} +135 -127
- package/v2/{index-unbundled-esm/index-3c6b5223.js.map → index-unbundled-cjs/index-b03d22dd.js.map} +1 -1
- package/v2/index-unbundled-cjs/index.js +1 -1
- package/v2/index-unbundled-esm/{ImageCarousel-76e27aed.js → ImageCarousel-251c63f3.js} +4 -4
- package/v2/index-unbundled-esm/{ImageCarousel-76e27aed.js.map → ImageCarousel-251c63f3.js.map} +1 -1
- package/v2/index-unbundled-esm/{index-3c6b5223.js → index-007402a4.js} +135 -127
- package/v2/{index-unbundled-cjs/index-0958c0e9.js.map → index-unbundled-esm/index-007402a4.js.map} +1 -1
- package/v2/index-unbundled-esm/index.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
# 13.5.
|
|
2
|
-
|
|
3
|
-
## Miscellaneous Updates
|
|
4
|
-
* [[322a2c4](https://github.com/spothero/fe-ui/commit/322a2c4)] - `chore:` Added radius value for location biased suggestions (Nathan)
|
|
5
|
-
|
|
6
|
-
# 13.5.0-beta.1 - 12/15/2021
|
|
7
|
-
|
|
1
|
+
# 13.5.1 - 12/17/2021
|
|
8
2
|
## Miscellaneous Updates
|
|
9
|
-
* [[
|
|
10
|
-
*
|
|
11
|
-
*
|
|
3
|
+
* [[95aca21](https://github.com/spothero/fe-ui/commit/95aca21)] - Fixed backlog loader export ([#257](https://github.com/spothero/fe-ui/pull/257)) (Nathan Caraker)
|
|
4
|
+
* `fix:` Fixed backlog loader export
|
|
5
|
+
* `chore:` Added a missed backlog export
|
|
6
|
+
* `chore:` Last fix for backlog export
|
|
12
7
|
|
|
13
|
-
# 13.5.0
|
|
8
|
+
# 13.5.0 - 12/17/2021
|
|
14
9
|
|
|
15
10
|
## New Features
|
|
16
|
-
* [[
|
|
11
|
+
* [[0a4397e](https://github.com/spothero/fe-ui/commit/0a4397e)] - FED-320 Primary Button Design System Updates ([#258](https://github.com/spothero/fe-ui/pull/258)) (Mick Johnson)
|
|
12
|
+
* `squash:` Initial styling changes
|
|
13
|
+
* `squash:` Story styling changes
|
|
14
|
+
* `squash:` Fix button stories to change when dark does + styling notes
|
|
15
|
+
* `squash:` More design tweaks after fedback + make it possible to link to chakra docs from story
|
|
16
|
+
* `squash:` Make chakra link inline block, last button style changes, make textbutton lineHeight of 1 for now until we work on it and decide what it should be
|
|
17
17
|
|
|
18
18
|
# 13.4.0 - 12/14/2021
|
|
19
19
|
|
package/CHANGELOG.tmp
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
# 13.5.
|
|
2
|
-
|
|
1
|
+
# 13.5.1 - 12/17/2021
|
|
3
2
|
## Miscellaneous Updates
|
|
4
|
-
* [[
|
|
3
|
+
* [[95aca21](https://github.com/spothero/fe-ui/commit/95aca21)] - Fixed backlog loader export ([#257](https://github.com/spothero/fe-ui/pull/257)) (Nathan Caraker)
|
|
4
|
+
* `fix:` Fixed backlog loader export
|
|
5
|
+
* `chore:` Added a missed backlog export
|
|
6
|
+
* `chore:` Last fix for backlog export
|
|
5
7
|
|
|
@@ -148,11 +148,10 @@ var GooglePlacesSearchInput = /*#__PURE__*/function (_Component) {
|
|
|
148
148
|
var _this$props = _this.props,
|
|
149
149
|
country = _this$props.country,
|
|
150
150
|
types = _this$props.types,
|
|
151
|
-
bounds = _this$props.bounds
|
|
152
|
-
location = _this$props.location;
|
|
151
|
+
bounds = _this$props.bounds;
|
|
153
152
|
var autocompleteSessionToken = _this.state.autocompleteSessionToken;
|
|
154
153
|
|
|
155
|
-
var options = _objectSpread(_objectSpread(_objectSpread(_objectSpread(
|
|
154
|
+
var options = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
156
155
|
input: value
|
|
157
156
|
}, bounds && {
|
|
158
157
|
bounds: bounds
|
|
@@ -162,15 +161,10 @@ var GooglePlacesSearchInput = /*#__PURE__*/function (_Component) {
|
|
|
162
161
|
}
|
|
163
162
|
}), types && {
|
|
164
163
|
types: types
|
|
165
|
-
}), location && {
|
|
166
|
-
location: location,
|
|
167
|
-
radius: 8000
|
|
168
164
|
}), {}, {
|
|
169
165
|
sessionToken: autocompleteSessionToken
|
|
170
166
|
});
|
|
171
167
|
|
|
172
|
-
console.log('GPSI', options);
|
|
173
|
-
|
|
174
168
|
_this._autocompleteService.getPlacePredictions(options, function (suggestions) {
|
|
175
169
|
if (suggestions) {
|
|
176
170
|
(0, _map.default)(suggestions).call(suggestions, function (suggestion) {
|
package/package.json
CHANGED
|
@@ -27,13 +27,6 @@ export default class GooglePlacesSearchInput extends Component {
|
|
|
27
27
|
googleMaps: PropTypes.object,
|
|
28
28
|
/** A custom element (typically a PoweredByGoogle component) to display at the bottom of the suggestion list. */
|
|
29
29
|
poweredByGoogleFooter: PropTypes.element.isRequired,
|
|
30
|
-
/** Location for prediction biasing.
|
|
31
|
-
* @see https://developers.google.com/maps/documentation/javascript/reference/places-autocomplete-service#AutocompletionRequest.location
|
|
32
|
-
*/
|
|
33
|
-
location: PropTypes.shape({
|
|
34
|
-
lat: PropTypes.number,
|
|
35
|
-
lng: PropTypes.number,
|
|
36
|
-
}),
|
|
37
30
|
};
|
|
38
31
|
static defaultProps = {
|
|
39
32
|
placeholder: 'Search Address or Venue',
|
|
@@ -121,7 +114,7 @@ export default class GooglePlacesSearchInput extends Component {
|
|
|
121
114
|
};
|
|
122
115
|
|
|
123
116
|
_searchSuggestions = value => {
|
|
124
|
-
const {country, types, bounds
|
|
117
|
+
const {country, types, bounds} = this.props;
|
|
125
118
|
const {autocompleteSessionToken} = this.state;
|
|
126
119
|
|
|
127
120
|
const options = {
|
|
@@ -133,12 +126,9 @@ export default class GooglePlacesSearchInput extends Component {
|
|
|
133
126
|
},
|
|
134
127
|
}),
|
|
135
128
|
...(types && {types}),
|
|
136
|
-
...(location && {location, radius: 8000}),
|
|
137
129
|
sessionToken: autocompleteSessionToken,
|
|
138
130
|
};
|
|
139
131
|
|
|
140
|
-
console.log('GPSI', options);
|
|
141
|
-
|
|
142
132
|
this._autocompleteService.getPlacePredictions(options, suggestions => {
|
|
143
133
|
if (suggestions) {
|
|
144
134
|
suggestions.map(suggestion => {
|
|
@@ -14,7 +14,7 @@ const anchorProps = (isExternal = false) => ({
|
|
|
14
14
|
|
|
15
15
|
const Button = forwardRef(({asAnchor, isExternal, ...props}, ref) => (
|
|
16
16
|
<ChakraButton
|
|
17
|
-
iconSpacing={
|
|
17
|
+
iconSpacing={2}
|
|
18
18
|
{...props}
|
|
19
19
|
{...((asAnchor || props.as === 'a') && anchorProps(isExternal))}
|
|
20
20
|
ref={ref}
|
|
@@ -3,20 +3,21 @@ import chakraDefaultTheme from '@chakra-ui/theme';
|
|
|
3
3
|
|
|
4
4
|
const baseStyle = {
|
|
5
5
|
px: 8,
|
|
6
|
-
py:
|
|
6
|
+
py: 3,
|
|
7
7
|
fontSize: 'base',
|
|
8
|
-
lineHeight:
|
|
8
|
+
lineHeight: 0.875,
|
|
9
9
|
fontWeight: 'semibold',
|
|
10
10
|
borderWidth: '1px',
|
|
11
11
|
borderStyle: 'solid',
|
|
12
|
-
borderRadius: '
|
|
12
|
+
borderRadius: '1.25rem',
|
|
13
|
+
textTransform: 'capitalize',
|
|
13
14
|
transition: 'all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94)',
|
|
14
15
|
_disabled: {
|
|
15
16
|
cursor: 'not-allowed',
|
|
16
17
|
opacity: 1,
|
|
17
18
|
bg: 'gray.medium',
|
|
18
19
|
borderColor: 'gray.medium',
|
|
19
|
-
color: '
|
|
20
|
+
color: 'gray.dark',
|
|
20
21
|
},
|
|
21
22
|
'& svg': {
|
|
22
23
|
display: 'block',
|
|
@@ -27,7 +28,7 @@ const disabledButtonHoverStyle = {
|
|
|
27
28
|
_disabled: {
|
|
28
29
|
bg: 'gray.medium',
|
|
29
30
|
borderColor: 'gray.medium',
|
|
30
|
-
color: '
|
|
31
|
+
color: 'gray.dark',
|
|
31
32
|
},
|
|
32
33
|
};
|
|
33
34
|
|
|
@@ -53,6 +54,9 @@ export const variants = {
|
|
|
53
54
|
color: 'black',
|
|
54
55
|
...disabledButtonHoverStyle,
|
|
55
56
|
},
|
|
57
|
+
_focus: {
|
|
58
|
+
boxShadow: '0 0 0 3px rgba(255, 255, 255, 0.7)',
|
|
59
|
+
},
|
|
56
60
|
},
|
|
57
61
|
secondary: {
|
|
58
62
|
bg: 'white',
|
|
@@ -74,6 +78,9 @@ export const variants = {
|
|
|
74
78
|
color: 'black',
|
|
75
79
|
...disabledButtonHoverStyle,
|
|
76
80
|
},
|
|
81
|
+
_focus: {
|
|
82
|
+
boxShadow: '0 0 0 3px rgba(255, 255, 255, 0.7)',
|
|
83
|
+
},
|
|
77
84
|
},
|
|
78
85
|
textButton: {
|
|
79
86
|
bg: 'none',
|
|
@@ -84,6 +91,7 @@ export const variants = {
|
|
|
84
91
|
m: 'unset',
|
|
85
92
|
minW: 'unset',
|
|
86
93
|
p: 'unset',
|
|
94
|
+
lineHeight: 1,
|
|
87
95
|
_disabled: {
|
|
88
96
|
bg: 'none',
|
|
89
97
|
color: 'gray.dark',
|
|
@@ -1,11 +1,58 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import capitalize from 'lodash/capitalize';
|
|
3
|
+
import {Box, Text} from '@chakra-ui/react';
|
|
4
|
+
import IconCheck from '@spothero/icons/check';
|
|
2
5
|
|
|
3
6
|
import Component from '../Button';
|
|
4
7
|
import ButtonProps from 'v2/components/Button/button-props';
|
|
5
8
|
|
|
6
|
-
const ButtonTemplate = props =>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
const ButtonTemplate = (props, {hasDarkBackground}) => {
|
|
10
|
+
const variant = `${props.variant}${hasDarkBackground ? 'OnDark' : ''}`;
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<Box>
|
|
14
|
+
<Box mb={4}>
|
|
15
|
+
<Text
|
|
16
|
+
mb="2"
|
|
17
|
+
color={
|
|
18
|
+
hasDarkBackground
|
|
19
|
+
? 'text.primary.dark'
|
|
20
|
+
: 'text.primary.light'
|
|
21
|
+
}
|
|
22
|
+
>
|
|
23
|
+
{capitalize(props.variant)}:
|
|
24
|
+
</Text>
|
|
25
|
+
<Box>
|
|
26
|
+
<Component {...props} variant={variant} mr={4} mb={4}>
|
|
27
|
+
{props.variant} Variant
|
|
28
|
+
</Component>
|
|
29
|
+
|
|
30
|
+
<Component
|
|
31
|
+
leftIcon={<IconCheck width="1rem" />}
|
|
32
|
+
{...props}
|
|
33
|
+
variant={variant}
|
|
34
|
+
mr={4}
|
|
35
|
+
mb={4}
|
|
36
|
+
>
|
|
37
|
+
{props.variant} With Icon
|
|
38
|
+
</Component>
|
|
39
|
+
|
|
40
|
+
<Component
|
|
41
|
+
{...props}
|
|
42
|
+
variant={variant}
|
|
43
|
+
as="a"
|
|
44
|
+
href="http://spothero.com"
|
|
45
|
+
isExternal={false}
|
|
46
|
+
mr={4}
|
|
47
|
+
mb={4}
|
|
48
|
+
>
|
|
49
|
+
As Anchor
|
|
50
|
+
</Component>
|
|
51
|
+
</Box>
|
|
52
|
+
</Box>
|
|
53
|
+
</Box>
|
|
54
|
+
);
|
|
55
|
+
};
|
|
9
56
|
|
|
10
57
|
ButtonTemplate.propTypes = ButtonProps;
|
|
11
58
|
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
1
|
import ButtonTemplate from './button';
|
|
4
2
|
import OverviewTemplate from './overview';
|
|
5
|
-
import IconCheck from '@spothero/icons/check';
|
|
6
3
|
|
|
7
4
|
import Button from '../Button';
|
|
8
|
-
import {variants} from '../Button.styles';
|
|
9
5
|
import disableArgs from 'storybook/utils/disable-args';
|
|
10
|
-
import {
|
|
11
|
-
createSelectControl,
|
|
12
|
-
createRangeControl,
|
|
13
|
-
} from 'storybook/utils/create-control';
|
|
14
|
-
|
|
15
|
-
const variantControl = createSelectControl('variant', Object.keys(variants));
|
|
16
|
-
const spacingControl = createRangeControl({name: 'iconSpacing', max: 5});
|
|
6
|
+
import {createSelectControl} from 'storybook/utils/create-control';
|
|
17
7
|
|
|
18
8
|
export default {
|
|
19
9
|
title: 'v2/Button',
|
|
@@ -21,6 +11,7 @@ export default {
|
|
|
21
11
|
parameters: {
|
|
22
12
|
importBy: 'Button',
|
|
23
13
|
removeBaseHtmlClass: true,
|
|
14
|
+
chakraLink: 'https://chakra-ui.com/docs/form/button',
|
|
24
15
|
},
|
|
25
16
|
argTypes: {
|
|
26
17
|
...disableArgs('children'),
|
|
@@ -30,95 +21,47 @@ export default {
|
|
|
30
21
|
|
|
31
22
|
export const Overview = OverviewTemplate.bind({});
|
|
32
23
|
|
|
33
|
-
export const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export const Disabled = ButtonTemplate.bind({});
|
|
41
|
-
Disabled.argTypes = {
|
|
42
|
-
...variantControl,
|
|
43
|
-
...disableArgs('isDisabled'),
|
|
44
|
-
};
|
|
45
|
-
Disabled.args = {
|
|
46
|
-
isDisabled: true,
|
|
47
|
-
variant: 'primary',
|
|
48
|
-
children: 'primary',
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export const Loading = ButtonTemplate.bind({});
|
|
52
|
-
Loading.argTypes = {
|
|
53
|
-
...variantControl,
|
|
54
|
-
...disableArgs('isLoading'),
|
|
24
|
+
export const Primary = ButtonTemplate.bind({});
|
|
25
|
+
Primary.argTypes = {
|
|
26
|
+
...createSelectControl('type', ['button', 'reset', 'submit']),
|
|
27
|
+
...disableArgs('variant'),
|
|
28
|
+
onClick: {action: 'clicked'},
|
|
55
29
|
};
|
|
56
|
-
|
|
57
|
-
|
|
30
|
+
Primary.args = {
|
|
31
|
+
children: 'Primary',
|
|
58
32
|
variant: 'primary',
|
|
59
|
-
|
|
33
|
+
isDisabled: false,
|
|
34
|
+
isLoading: false,
|
|
60
35
|
loadingText: 'Loading',
|
|
36
|
+
isFullWidth: false,
|
|
61
37
|
};
|
|
62
38
|
|
|
63
|
-
export const
|
|
64
|
-
|
|
65
|
-
...
|
|
66
|
-
...
|
|
67
|
-
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
variant: '
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
export const RightIcon = ButtonTemplate.bind({});
|
|
77
|
-
RightIcon.argTypes = {
|
|
78
|
-
...variantControl,
|
|
79
|
-
...spacingControl,
|
|
80
|
-
...disableArgs('rightIcon'),
|
|
81
|
-
};
|
|
82
|
-
RightIcon.args = {
|
|
83
|
-
rightIcon: <IconCheck width="0.875rem" />,
|
|
84
|
-
variant: 'primary',
|
|
85
|
-
children: 'primary',
|
|
86
|
-
iconSpacing: 3,
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export const FullWidth = ButtonTemplate.bind({});
|
|
90
|
-
FullWidth.argTypes = {
|
|
91
|
-
...variantControl,
|
|
92
|
-
...disableArgs('isFullWidth'),
|
|
93
|
-
};
|
|
94
|
-
FullWidth.args = {
|
|
95
|
-
variant: 'primary',
|
|
96
|
-
children: 'primary',
|
|
97
|
-
isFullWidth: true,
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export const AsAnchor = ButtonTemplate.bind({});
|
|
101
|
-
AsAnchor.argTypes = {
|
|
102
|
-
...variantControl,
|
|
103
|
-
...disableArgs(['asAnchor', 'as']),
|
|
104
|
-
};
|
|
105
|
-
AsAnchor.args = {
|
|
106
|
-
variant: 'primary',
|
|
107
|
-
children: 'primary',
|
|
108
|
-
as: 'a',
|
|
109
|
-
href: 'http://spothero.com',
|
|
110
|
-
isExternal: false,
|
|
39
|
+
export const Secondary = ButtonTemplate.bind({});
|
|
40
|
+
Secondary.argTypes = {
|
|
41
|
+
...createSelectControl('type', ['button', 'reset', 'submit']),
|
|
42
|
+
...disableArgs('variant'),
|
|
43
|
+
onClick: {action: 'clicked'},
|
|
44
|
+
};
|
|
45
|
+
Secondary.args = {
|
|
46
|
+
children: 'Secondary',
|
|
47
|
+
variant: 'secondary',
|
|
48
|
+
isDisabled: false,
|
|
49
|
+
isLoading: false,
|
|
50
|
+
loadingText: 'Loading',
|
|
51
|
+
isFullWidth: false,
|
|
111
52
|
};
|
|
112
53
|
|
|
113
|
-
export const
|
|
114
|
-
|
|
115
|
-
Type.argTypes = {
|
|
54
|
+
export const Tertiary = ButtonTemplate.bind({});
|
|
55
|
+
Tertiary.argTypes = {
|
|
116
56
|
...createSelectControl('type', ['button', 'reset', 'submit']),
|
|
117
|
-
...
|
|
118
|
-
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
variant: '
|
|
123
|
-
|
|
57
|
+
...disableArgs('variant'),
|
|
58
|
+
onClick: {action: 'clicked'},
|
|
59
|
+
};
|
|
60
|
+
Tertiary.args = {
|
|
61
|
+
children: 'textButton',
|
|
62
|
+
variant: 'textButton',
|
|
63
|
+
isDisabled: false,
|
|
64
|
+
isLoading: false,
|
|
65
|
+
loadingText: 'Loading',
|
|
66
|
+
isFullWidth: false,
|
|
124
67
|
};
|
|
@@ -32,11 +32,6 @@ const variationsArray = ({baseVariantName, hasDarkBackground}) => {
|
|
|
32
32
|
children: `leftIcon`,
|
|
33
33
|
leftIcon: <IconCheck width="1rem" />,
|
|
34
34
|
},
|
|
35
|
-
{
|
|
36
|
-
variant,
|
|
37
|
-
children: `rightIcon`,
|
|
38
|
-
rightIcon: <IconCheck width="1rem" />,
|
|
39
|
-
},
|
|
40
35
|
{
|
|
41
36
|
variant,
|
|
42
37
|
children: `${variant} asAnchor`,
|