@spothero/ui 21.1.1-beta.0 → 21.2.0
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,15 +13,14 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
13
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
14
|
/**
|
|
15
15
|
* @example (
|
|
16
|
-
* <
|
|
16
|
+
* <ToggleButtonGroup onChange={handleChangeValue} value={value}>
|
|
17
17
|
* <Button value={value1}>label1</Button>
|
|
18
18
|
* <Button value={value2}>label2</Button>
|
|
19
|
-
* </
|
|
19
|
+
* </ToggleButtonGroup>
|
|
20
20
|
* )
|
|
21
21
|
* @note
|
|
22
22
|
* must have multiple child elements
|
|
23
23
|
*/
|
|
24
|
-
// const ToggleButtonGroup = forwardRef(({onChange, value, children, groupProps}, ref) => {
|
|
25
24
|
const ToggleButtonGroup = /*#__PURE__*/(0, _react2.forwardRef)((props, ref) => {
|
|
26
25
|
const {
|
|
27
26
|
onChange,
|
|
@@ -38,11 +38,17 @@ const Template = props => {
|
|
|
38
38
|
onChange: onChange
|
|
39
39
|
}), /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
40
40
|
key: "single",
|
|
41
|
-
value: "single"
|
|
41
|
+
value: "single",
|
|
42
|
+
fontSize: "xs"
|
|
42
43
|
}, "Single Bookings"), /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
43
44
|
key: "multiple",
|
|
44
|
-
value: "multiple"
|
|
45
|
-
|
|
45
|
+
value: "multiple",
|
|
46
|
+
fontSize: "xs"
|
|
47
|
+
}, "Multiple Bookings"), /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
48
|
+
key: "blah",
|
|
49
|
+
value: "blah",
|
|
50
|
+
fontSize: "xs"
|
|
51
|
+
}, "Blah Bookings")));
|
|
46
52
|
};
|
|
47
53
|
const ToggleButtonGroup = Template.bind({});
|
|
48
54
|
exports.ToggleButtonGroup = ToggleButtonGroup;
|
|
@@ -7,7 +7,6 @@ exports.inactiveStyles = exports.defaultStyles = exports.buttonGroupStyles = exp
|
|
|
7
7
|
const defaultStyles = {
|
|
8
8
|
border: 0,
|
|
9
9
|
borderRadius: '4px',
|
|
10
|
-
fontSize: 'xs',
|
|
11
10
|
fontWeight: 'normal',
|
|
12
11
|
paddingX: 4,
|
|
13
12
|
paddingY: 1,
|
|
@@ -20,7 +19,7 @@ const defaultStyles = {
|
|
|
20
19
|
};
|
|
21
20
|
exports.defaultStyles = defaultStyles;
|
|
22
21
|
const inactiveStyles = {
|
|
23
|
-
color: '
|
|
22
|
+
color: 'black',
|
|
24
23
|
borderColor: 'gray.100',
|
|
25
24
|
bg: 'gray.100',
|
|
26
25
|
_hover: {
|
|
@@ -34,6 +33,7 @@ exports.inactiveStyles = inactiveStyles;
|
|
|
34
33
|
const activeStyles = {
|
|
35
34
|
color: 'black',
|
|
36
35
|
fontWeight: 'semibold',
|
|
36
|
+
boxShadow: 'sm',
|
|
37
37
|
bg: 'white',
|
|
38
38
|
_hover: {
|
|
39
39
|
bg: 'white'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spothero/ui",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.2.0",
|
|
4
4
|
"description": "SpotHero's React component UI library.",
|
|
5
5
|
"main": "./dist/components/index.js",
|
|
6
6
|
"exports": "./dist/components/index.js",
|
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"sass-loader": "10.2.1",
|
|
98
98
|
"@spothero/babel-preset-spothero": "5.0.0",
|
|
99
99
|
"@spothero/browserslist-config": "4.0.0",
|
|
100
|
-
"@spothero/eslint-config": "6.0.0",
|
|
101
100
|
"@spothero/core": "7.0.0",
|
|
101
|
+
"@spothero/eslint-config": "6.0.0",
|
|
102
102
|
"@spothero/icons": "8.0.0",
|
|
103
103
|
"@spothero/npm-publisher": "7.0.0",
|
|
104
104
|
"@spothero/prettier-config": "4.0.0",
|