@spothero/ui 14.3.4-beta.0 → 14.3.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.
- package/CHANGELOG.md +1 -4
- package/CHANGELOG.tmp +1 -4
- package/package.json +1 -1
- package/styles/v2/components/Checkbox/Checkbox.stories.js +2 -4
- package/styles/v2/components/Container/Container.stories.js +29 -10
- package/styles/v2/components/ImageCarousel/ImageCarousel.jsx +1 -1
- package/v1/index-bundled.cjs.js +1 -1
- package/v1/index-bundled.cjs.js.map +1 -1
- package/v1/index-bundled.esm.js +1 -1
- package/v1/index-bundled.esm.js.map +1 -1
- package/v1/index-unbundled.cjs.js +35 -35
- package/v1/index-unbundled.esm.js +35 -35
- package/v2/index-bundled.cjs.js +1 -1
- package/v2/index-bundled.cjs.js.map +1 -1
- package/v2/index-bundled.esm.js +3 -3
- package/v2/index-bundled.esm.js.map +1 -1
- package/v2/index-unbundled.cjs.js +147 -147
- package/v2/index-unbundled.cjs.js.map +1 -1
- package/v2/index-unbundled.esm.js +147 -147
- package/v2/index-unbundled.esm.js.map +1 -1
package/CHANGELOG.md
CHANGED
package/CHANGELOG.tmp
CHANGED
package/package.json
CHANGED
|
@@ -11,16 +11,14 @@ export default {
|
|
|
11
11
|
},
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
const CheckboxTemplate = props => {
|
|
15
|
-
return <Component {...props} />;
|
|
16
|
-
};
|
|
14
|
+
const CheckboxTemplate = props => <Component {...props} />;
|
|
17
15
|
|
|
18
16
|
CheckboxTemplate.propTypes = {
|
|
19
17
|
isChecked: PropTypes.bool,
|
|
20
18
|
isDisabled: PropTypes.bool,
|
|
21
19
|
isIndeterminate: PropTypes.bool,
|
|
22
20
|
defaultIsChecked: PropTypes.bool,
|
|
23
|
-
size: PropTypes.
|
|
21
|
+
size: PropTypes.oneOf(['sm', 'md', 'lg']),
|
|
24
22
|
children: PropTypes.node,
|
|
25
23
|
};
|
|
26
24
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Component from './Container';
|
|
3
3
|
import {useTheme, useToken, useBreakpointValue} from '@chakra-ui/react';
|
|
4
|
+
import {createSelectControl} from 'storybook/utils/create-control';
|
|
5
|
+
import {getAllColors} from 'storybook/utils/get-all-colors';
|
|
6
|
+
import {getAllSizes} from 'storybook/utils/get-all-sizes';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
4
8
|
|
|
5
9
|
import styleProps from './Container.styles';
|
|
6
10
|
|
|
7
|
-
import Heading from 'v2/components/Heading/Heading';
|
|
8
|
-
|
|
9
11
|
export default {
|
|
10
12
|
title: 'v2/Container',
|
|
11
13
|
component: Component,
|
|
@@ -14,20 +16,37 @@ export default {
|
|
|
14
16
|
},
|
|
15
17
|
};
|
|
16
18
|
|
|
17
|
-
const
|
|
19
|
+
const ContainerTemplate = props => {
|
|
18
20
|
const {remToPixels} = useTheme();
|
|
19
21
|
const breakpoint = useBreakpointValue(styleProps.maxW);
|
|
20
22
|
const size = useToken('sizes', breakpoint);
|
|
21
|
-
const isMobile =
|
|
23
|
+
const isMobile = breakpoint?.includes('base');
|
|
22
24
|
const headingText = size
|
|
23
25
|
? `Container: ${size}${isMobile ? '' : ` - ${remToPixels(size)}px`}`
|
|
24
26
|
: '';
|
|
25
27
|
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
)
|
|
28
|
+
return <Component {...props}>{headingText}</Component>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
ContainerTemplate.propTypes = {
|
|
32
|
+
color: PropTypes.oneOf(getAllColors),
|
|
33
|
+
bg: PropTypes.oneOf(getAllColors),
|
|
34
|
+
h: PropTypes.oneOf(getAllSizes),
|
|
35
|
+
centerContent: PropTypes.bool,
|
|
36
|
+
children: PropTypes.node,
|
|
31
37
|
};
|
|
32
38
|
|
|
33
|
-
export const Container =
|
|
39
|
+
export const Container = ContainerTemplate.bind({});
|
|
40
|
+
|
|
41
|
+
Container.argTypes = {
|
|
42
|
+
...createSelectControl('color', getAllColors),
|
|
43
|
+
...createSelectControl('bg', getAllColors),
|
|
44
|
+
...createSelectControl('h', getAllSizes),
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
Container.args = {
|
|
48
|
+
color: 'white',
|
|
49
|
+
bg: 'secondary.default',
|
|
50
|
+
h: '20',
|
|
51
|
+
centerContent: true,
|
|
52
|
+
};
|
|
@@ -4,7 +4,7 @@ import {Box} from '@chakra-ui/react';
|
|
|
4
4
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
5
5
|
import IconChevronLeft from '@spothero/icons/chevron-left';
|
|
6
6
|
import IconChevronRight from '@spothero/icons/chevron-right';
|
|
7
|
-
import
|
|
7
|
+
import Button from 'v2/components/Button/Button';
|
|
8
8
|
|
|
9
9
|
const ImageCarousel = ({images, width, height, ...props}) => {
|
|
10
10
|
const imgWidth = width ? `${width}rem` : '100%';
|