@spothero/ui 22.5.3 → 23.0.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.
- package/dist/components/Accordion/Accordion.stories.js +101 -0
- package/dist/components/Accordion/AccordionActionButton.js +32 -0
- package/dist/components/Accordion/index.js +45 -0
- package/dist/components/Accordion/styles/index.js +77 -0
- package/dist/components/Alert/Alert.js +91 -0
- package/dist/components/Alert/Alert.stories.js +64 -0
- package/dist/components/Alert/index.js +14 -0
- package/dist/components/AutoSuggestSelect/AutoSuggestSelect.js +169 -0
- package/dist/components/AutoSuggestSelect/AutoSuggestSelect.stories.js +23 -0
- package/dist/components/AutoSuggestSelect/index.js +14 -0
- package/dist/components/Badge/Badge.js +13 -0
- package/dist/components/Badge/Badge.stories.js +32 -0
- package/dist/components/Badge/styles/index.js +33 -0
- package/dist/components/Button/Button.js +54 -0
- package/dist/components/Button/Button.spec.js +25 -0
- package/dist/components/Button/Button.styles.js +166 -0
- package/dist/components/Button/button-props.js +73 -0
- package/dist/components/Button/index.js +21 -0
- package/dist/components/Button/stories/button.js +47 -0
- package/dist/components/Button/stories/index.stories.js +97 -0
- package/dist/components/Button/stories/overview.js +77 -0
- package/dist/components/Card/Card.js +28 -0
- package/dist/components/Card/Card.stories.js +33 -0
- package/dist/components/Checkbox/Checkbox.js +44 -0
- package/dist/components/Checkbox/Checkbox.stories.js +69 -0
- package/dist/components/Checkbox/index.js +14 -0
- package/dist/components/Checkbox/styles/index.js +90 -0
- package/dist/components/Container/Container.js +23 -0
- package/dist/components/Container/Container.stories.js +53 -0
- package/dist/components/Container/Container.styles.js +17 -0
- package/dist/components/CreatableSelect/CreatableSelect.js +148 -0
- package/dist/components/CreatableSelect/CreatableSelect.stories.js +69 -0
- package/dist/components/CreatableSelect/index.js +14 -0
- package/dist/components/Divider/Divider.js +34 -0
- package/dist/components/Divider/Divider.stories.js +40 -0
- package/dist/components/Divider/Divider.styles.js +21 -0
- package/dist/components/Drawer/Drawer.js +29 -0
- package/dist/components/Drawer/Drawer.stories.js +50 -0
- package/dist/components/Drawer/index.js +57 -0
- package/dist/components/Drawer/styles/index.js +108 -0
- package/dist/components/FormControl/FormControl.js +74 -0
- package/dist/components/Grid/Grid.js +35 -0
- package/dist/components/Grid/Grid.stories.js +117 -0
- package/dist/components/Grid/Grid.styles.js +18 -0
- package/dist/components/Grid/GridItem.js +23 -0
- package/dist/components/Grid/GridItem.styles.js +14 -0
- package/dist/components/Grid/index.js +21 -0
- package/dist/components/Heading/Heading.js +34 -0
- package/dist/components/Heading/Heading.stories.js +46 -0
- package/dist/components/Heading/Heading.styles.js +69 -0
- package/dist/components/Icon/Icon.js +13 -0
- package/dist/components/Icon/Icon.stories.js +40 -0
- package/dist/components/Image/Image.js +84 -0
- package/dist/components/Image/Image.spec.js +77 -0
- package/dist/components/Image/Image.stories.js +80 -0
- package/dist/components/Input/Input.js +49 -0
- package/dist/components/Input/Input.stories.js +63 -0
- package/dist/components/Input/index.js +14 -0
- package/dist/components/Input/styles/index.js +65 -0
- package/dist/components/Link/Link.js +13 -0
- package/dist/components/Link/Link.stories.js +52 -0
- package/dist/components/Link/Link.styles.js +45 -0
- package/dist/components/List/List.js +69 -0
- package/dist/components/List/List.stories.js +92 -0
- package/dist/components/List/index.js +21 -0
- package/dist/components/List/styles/index.js +17 -0
- package/dist/components/List/styles/item.styles.js +11 -0
- package/dist/components/Loader/Loader.js +53 -0
- package/dist/components/Loader/Loader.stories.js +124 -0
- package/dist/components/Menu/Menu.js +17 -0
- package/dist/components/Menu/Menu.stories.js +169 -0
- package/dist/components/Menu/Menu.styles.js +174 -0
- package/dist/components/Menu/index.js +57 -0
- package/dist/components/Modal/Modal.js +46 -0
- package/dist/components/Modal/Modal.stories.js +225 -0
- package/dist/components/Modal/index.js +33 -0
- package/dist/components/Modal/styles/body.js +39 -0
- package/dist/components/Modal/styles/closeButton.js +25 -0
- package/dist/components/Modal/styles/dialog.js +23 -0
- package/dist/components/Modal/styles/dialogContainer.js +21 -0
- package/dist/components/Modal/styles/footer.js +12 -0
- package/dist/components/Modal/styles/header.js +18 -0
- package/dist/components/Modal/styles/index.js +56 -0
- package/dist/components/Modal/styles/overlay.js +11 -0
- package/dist/components/Popover/Popover.js +34 -0
- package/dist/components/Popover/Popover.stories.js +87 -0
- package/dist/components/Popover/PopoverArrow.js +23 -0
- package/dist/components/Popover/PopoverCloseButton.js +23 -0
- package/dist/components/Popover/PopoverContent.js +42 -0
- package/dist/components/Popover/index.js +41 -0
- package/dist/components/Popover/styles/index.js +27 -0
- package/dist/components/Popover/styles/popover-arrow.js +14 -0
- package/dist/components/Popover/styles/popover-body.js +13 -0
- package/dist/components/Popover/styles/popover-close-button.js +40 -0
- package/dist/components/Popover/styles/popover-content.js +30 -0
- package/dist/components/Popover/styles/popover-header.js +12 -0
- package/dist/components/Popover/styles/popper.js +11 -0
- package/dist/components/Progress/Progress.js +42 -0
- package/dist/components/Progress/Progress.stories.js +90 -0
- package/dist/components/Progress/Progress.styles.js +107 -0
- package/dist/components/Radio/Radio.js +43 -0
- package/dist/components/Radio/Radio.stories.js +137 -0
- package/dist/components/Radio/RadioGroup.js +52 -0
- package/dist/components/Radio/index.js +21 -0
- package/dist/components/Radio/styles/index.js +119 -0
- package/dist/components/RefreshedInput/Button/Button.js +72 -0
- package/dist/components/RefreshedInput/Button/Button.stories.js +84 -0
- package/dist/components/RefreshedInput/Button/index.js +14 -0
- package/dist/components/RefreshedInput/Button/styles/index.js +34 -0
- package/dist/components/RefreshedInput/FormControl/index.js +175 -0
- package/dist/components/RefreshedInput/Input/Input.js +67 -0
- package/dist/components/RefreshedInput/Input/Input.stories.js +79 -0
- package/dist/components/RefreshedInput/Input/index.js +14 -0
- package/dist/components/RefreshedInput/Input/styles/index.js +33 -0
- package/dist/components/RefreshedInput/Select/Select.js +70 -0
- package/dist/components/RefreshedInput/Select/Select.stories.js +85 -0
- package/dist/components/RefreshedInput/Select/index.js +14 -0
- package/dist/components/RefreshedInput/Select/styles/index.js +34 -0
- package/dist/components/RefreshedInput/index.js +35 -0
- package/dist/components/RefreshedInput/storyAid/index.js +22 -0
- package/dist/components/Select/Select.js +55 -0
- package/dist/components/Select/Select.stories.js +67 -0
- package/dist/components/Select/index.js +14 -0
- package/dist/components/Select/styles/index.js +51 -0
- package/dist/components/SelectionCard/SelectionCard.js +67 -0
- package/dist/components/SelectionCard/SelectionCard.stories.js +91 -0
- package/dist/components/SelectionCard/index.js +14 -0
- package/dist/components/Skeleton/Skeleton.stories.js +31 -0
- package/dist/components/Skeleton/Skeleton.styles.js +10 -0
- package/dist/components/Skeleton/index.js +25 -0
- package/dist/components/Spinner/Spinner.js +34 -0
- package/dist/components/Spinner/Spinner.stories.js +109 -0
- package/dist/components/Spinner/Spinner.styles.js +67 -0
- package/dist/components/Switch/Switch.js +45 -0
- package/dist/components/Switch/Switch.stories.js +80 -0
- package/dist/components/Switch/index.js +14 -0
- package/dist/components/Switch/styles/index.js +42 -0
- package/dist/components/Table/Table.js +13 -0
- package/dist/components/Table/Table.stories.js +80 -0
- package/dist/components/Table/Table.styles.js +77 -0
- package/dist/components/Table/index.js +63 -0
- package/dist/components/Tabs/Tabs.js +35 -0
- package/dist/components/Tabs/Tabs.stories.js +44 -0
- package/dist/components/Tabs/combineSizeWithVariant.js +35 -0
- package/dist/components/Tabs/index.js +39 -0
- package/dist/components/Tabs/styles/index.js +71 -0
- package/dist/components/Text/Text.js +35 -0
- package/dist/components/Text/Text.stories.js +47 -0
- package/dist/components/Text/Text.styles.js +53 -0
- package/dist/components/Text/combineAsWithVariant.js +103 -0
- package/dist/components/Text/options.js +9 -0
- package/dist/components/Textarea/Textarea.js +49 -0
- package/dist/components/Textarea/Textarea.stories.js +62 -0
- package/dist/components/Textarea/index.js +14 -0
- package/dist/components/Textarea/styles/index.js +65 -0
- package/dist/components/ThemeProvider/ThemeProvider.js +47 -0
- package/dist/components/ThemeProvider/ThemeProvider.stories.js +52 -0
- package/dist/components/Toast/Toast.stories.js +84 -0
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.js +65 -0
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.stories.js +62 -0
- package/dist/components/ToggleButtonGroup/index.js +14 -0
- package/dist/components/ToggleButtonGroup/styles/index.js +48 -0
- package/dist/components/index.js +792 -0
- package/dist/components/styles.js +189 -0
- package/dist/theme/base/breakpoints.js +24 -0
- package/dist/theme/base/colors.js +144 -0
- package/dist/theme/base/index.js +80 -0
- package/dist/theme/base/notifications.js +197 -0
- package/dist/theme/base/shadows.js +16 -0
- package/dist/theme/base/sizes.js +89 -0
- package/dist/theme/base/typography.js +39 -0
- package/dist/theme/base/zindices.js +34 -0
- package/dist/theme/global.js +39 -0
- package/dist/theme/index.js +45 -0
- package/dist/utils/Spaces.js +21 -0
- package/package.json +34 -33
- package/dist/AccordionActionButton.d.ts +0 -2
- package/dist/index.cjs.js +0 -53728
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.esm.js +0 -53575
- package/dist/index.esm.js.map +0 -1
- package/dist/styles/index.d.ts +0 -68
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var container = {
|
|
9
|
+
base: '100%',
|
|
10
|
+
// 640px
|
|
11
|
+
tablet: '45rem',
|
|
12
|
+
// 720px
|
|
13
|
+
desktop: '72rem' // 1152px
|
|
14
|
+
};
|
|
15
|
+
var sizes = {
|
|
16
|
+
container: container,
|
|
17
|
+
0: '0',
|
|
18
|
+
0.5: '0.125rem',
|
|
19
|
+
// 2px
|
|
20
|
+
1: '0.25rem',
|
|
21
|
+
// 4px
|
|
22
|
+
1.5: '0.375rem',
|
|
23
|
+
// 6px
|
|
24
|
+
2: '0.5rem',
|
|
25
|
+
// 8px
|
|
26
|
+
2.5: '0.625rem',
|
|
27
|
+
// 10px
|
|
28
|
+
3: '0.75rem',
|
|
29
|
+
// 12px
|
|
30
|
+
3.5: '0.875rem',
|
|
31
|
+
// 14px
|
|
32
|
+
4: '1rem',
|
|
33
|
+
// 16px
|
|
34
|
+
5: '1.25rem',
|
|
35
|
+
// 20px
|
|
36
|
+
5.5: '1.375rem',
|
|
37
|
+
// 22px
|
|
38
|
+
6: '1.5rem',
|
|
39
|
+
// 24px
|
|
40
|
+
7: '1.75rem',
|
|
41
|
+
// 28px
|
|
42
|
+
8: '2rem',
|
|
43
|
+
// 32px
|
|
44
|
+
9: '2.25rem',
|
|
45
|
+
// 36px
|
|
46
|
+
10: '2.5rem',
|
|
47
|
+
// 40px
|
|
48
|
+
12: '3rem',
|
|
49
|
+
// 48px
|
|
50
|
+
14: '3.5rem',
|
|
51
|
+
// 56px
|
|
52
|
+
16: '4rem',
|
|
53
|
+
// 64px
|
|
54
|
+
20: '5rem',
|
|
55
|
+
// 80px
|
|
56
|
+
24: '6rem',
|
|
57
|
+
// 96px
|
|
58
|
+
28: '7rem',
|
|
59
|
+
// 112px
|
|
60
|
+
32: '8rem',
|
|
61
|
+
// 128px
|
|
62
|
+
36: '9rem',
|
|
63
|
+
// 144px
|
|
64
|
+
40: '10rem',
|
|
65
|
+
// 160px
|
|
66
|
+
44: '11rem',
|
|
67
|
+
// 176px
|
|
68
|
+
48: '12rem',
|
|
69
|
+
// 192px
|
|
70
|
+
52: '13rem',
|
|
71
|
+
// 208px
|
|
72
|
+
56: '14rem',
|
|
73
|
+
// 224px
|
|
74
|
+
60: '15rem',
|
|
75
|
+
// 240px
|
|
76
|
+
64: '16rem',
|
|
77
|
+
// 256px
|
|
78
|
+
72: '18rem',
|
|
79
|
+
// 272px
|
|
80
|
+
80: '20rem',
|
|
81
|
+
// 288px
|
|
82
|
+
96: '24rem',
|
|
83
|
+
// 384px
|
|
84
|
+
px: '1px',
|
|
85
|
+
full: '100%',
|
|
86
|
+
max: 'max-content',
|
|
87
|
+
min: 'min-content'
|
|
88
|
+
};
|
|
89
|
+
var _default = exports["default"] = sizes;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.fonts = exports.fontWeights = exports.fontSizes = void 0;
|
|
8
|
+
var fonts = exports.fonts = {
|
|
9
|
+
heading: "\"Plus Jakarta Sans\", sans-serif",
|
|
10
|
+
body: "\"Plus Jakarta Sans\", sans-serif"
|
|
11
|
+
};
|
|
12
|
+
var fontSizes = exports.fontSizes = {
|
|
13
|
+
'5xl': '3.5rem',
|
|
14
|
+
// 56px
|
|
15
|
+
'4xl': '3rem',
|
|
16
|
+
// 48px
|
|
17
|
+
'3xl': '2.5rem',
|
|
18
|
+
// 40px
|
|
19
|
+
'2xl': '2rem',
|
|
20
|
+
// 32px
|
|
21
|
+
xl: '1.5rem',
|
|
22
|
+
// 24px
|
|
23
|
+
lg: '1.25rem',
|
|
24
|
+
// 20px
|
|
25
|
+
md: '1.125rem',
|
|
26
|
+
// 18px
|
|
27
|
+
base: '1rem',
|
|
28
|
+
// 16px
|
|
29
|
+
sm: '0.875rem',
|
|
30
|
+
// 14px
|
|
31
|
+
xs: '0.75rem' // 12px
|
|
32
|
+
};
|
|
33
|
+
var fontWeights = exports.fontWeights = {
|
|
34
|
+
light: 300,
|
|
35
|
+
normal: 400,
|
|
36
|
+
medium: 500,
|
|
37
|
+
semibold: 600,
|
|
38
|
+
bold: 700
|
|
39
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var indices = {
|
|
9
|
+
hide: -100,
|
|
10
|
+
// equivalent to $z-index-negative in fe-core (https://github.com/spothero/fe-core/blob/main/utils/_defaults.scss)
|
|
11
|
+
auto: 'auto',
|
|
12
|
+
base: 0,
|
|
13
|
+
// equivalent to $z-index-back in fe-core
|
|
14
|
+
layer1: 100,
|
|
15
|
+
// equivalent to $z-index-mid in fe-core
|
|
16
|
+
layer2: 200,
|
|
17
|
+
// equivalent to $z-index-fore in fe-core
|
|
18
|
+
layer3: 300,
|
|
19
|
+
// equivalent to $z-index-layer1 in fe-core
|
|
20
|
+
layer4: 400,
|
|
21
|
+
// equivalent to $z-index-layer2 in fe-core
|
|
22
|
+
layer5: 500,
|
|
23
|
+
// equivalent to $z-index-layer3 in fe-core
|
|
24
|
+
layer6: 600,
|
|
25
|
+
// equivalent to $z-index-layer4 in fe-core
|
|
26
|
+
layer7: 700,
|
|
27
|
+
// equivalent to $z-index-modal-shim in fe-core
|
|
28
|
+
layer8: 800,
|
|
29
|
+
// equivalent to $z-index-modal in fe-core
|
|
30
|
+
layer9: 900,
|
|
31
|
+
// equivalent to $z-index-notification in fe-core
|
|
32
|
+
layer10: 1000 // equivalent to $z-index-top in fe-core
|
|
33
|
+
};
|
|
34
|
+
var _default = exports["default"] = indices;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = exports.LegacyOverrides = exports.Fonts = void 0;
|
|
9
|
+
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _react2 = require("@emotion/react");
|
|
12
|
+
var _base = require("./base");
|
|
13
|
+
var global = {
|
|
14
|
+
'html, body': {
|
|
15
|
+
color: 'text.primary.light'
|
|
16
|
+
},
|
|
17
|
+
// By default, Chakra has all svgs set to 'display: block',
|
|
18
|
+
// this breaks the layout of some older components, so now
|
|
19
|
+
// we set all svgs to 'display: inline-block;' and only set
|
|
20
|
+
// 'display: block;' on the components that need it
|
|
21
|
+
// (as of 3/9/2021 only the v1 AutoSuggestInput component
|
|
22
|
+
// needed this update)
|
|
23
|
+
svg: {
|
|
24
|
+
display: 'inline-block'
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
var _default = exports["default"] = global;
|
|
28
|
+
var Fonts = exports.Fonts = function Fonts() {
|
|
29
|
+
return /*#__PURE__*/_react["default"].createElement(_react2.Global, {
|
|
30
|
+
styles: "\n @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');\n /* latin-ext */\n @font-face {\n font-family: \"Plus Jakarta Sans\", sans-serif;\n font-style: normal;\n font-weight: 700;\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin-ext */\n @font-face {\n font-family: \"Plus Jakarta Sans\", sans-serif;\n font-style: normal;\n font-weight: 600;\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin-ext */\n @font-face {\n font-family: \"Plus Jakarta Sans\", sans-serif;\n font-style: normal;\n font-weight: 400;\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin-ext */\n @font-face {\n font-family: \"Plus Jakarta Sans\", sans-serif;\n font-style: normal;\n font-weight: 300;\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n "
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
var LegacyOverrides = exports.LegacyOverrides = function LegacyOverrides(_ref) {
|
|
34
|
+
var _context, _context2, _context3, _context4, _context5, _context6;
|
|
35
|
+
var useLegacyOverrides = _ref.useLegacyOverrides;
|
|
36
|
+
return useLegacyOverrides ? /*#__PURE__*/_react["default"].createElement(_react2.Global, {
|
|
37
|
+
styles: (0, _concat["default"])(_context = (0, _concat["default"])(_context2 = (0, _concat["default"])(_context3 = (0, _concat["default"])(_context4 = (0, _concat["default"])(_context5 = (0, _concat["default"])(_context6 = "\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-top: 0;\n font-weight: ".concat(_base.fontWeights.semibold, ";\n }\n\n .heading-sm {\n font-size: ")).call(_context6, _base.fontSizes.base, ";\n }\n .heading-md {\n font-size: ")).call(_context5, _base.fontSizes.md, ";\n }\n .heading-lg {\n font-size: ")).call(_context4, _base.fontSizes['5xl'], ";\n }\n\n p {\n line-height: 1.5;\n }\n\n a {\n outline: none;\n text-align: left;\n color: ")).call(_context3, _base.colors.primary["default"], ";\n text-decoration: none;\n\n &:active,\n &:focus {\n outline: none;\n }\n\n &:hover {\n color: ")).call(_context2, _base.colors.primary['700'], ";\n }\n }\n\n small {\n font-size: ")).call(_context, _base.fontSizes.xs, ";\n }\n\n ")
|
|
38
|
+
}) : null;
|
|
39
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
4
|
+
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
|
5
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
|
6
|
+
var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
|
7
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
8
|
+
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
|
9
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
|
10
|
+
var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
|
11
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
12
|
+
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
13
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
14
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
exports["default"] = void 0;
|
|
18
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
19
|
+
var _global = _interopRequireDefault(require("./global"));
|
|
20
|
+
var base = _interopRequireWildcard(require("./base"));
|
|
21
|
+
var _react = require("@chakra-ui/react");
|
|
22
|
+
var _theme = _interopRequireDefault(require("@chakra-ui/theme"));
|
|
23
|
+
var components = _interopRequireWildcard(require("../components/styles"));
|
|
24
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
25
|
+
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; }
|
|
26
|
+
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } // import merge from 'lodash/merge';
|
|
28
|
+
// use this to extend the base theme of chakra, this adds on top of what is defined in baseConfig
|
|
29
|
+
var extendedTheme = {
|
|
30
|
+
initialColorMode: 'light',
|
|
31
|
+
useSystemColorMode: false,
|
|
32
|
+
styles: {
|
|
33
|
+
global: _global["default"]
|
|
34
|
+
},
|
|
35
|
+
remToPixels: function remToPixels(rem) {
|
|
36
|
+
var baseSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 16;
|
|
37
|
+
return !rem ? 0 : "".concat(baseSize * Number(rem.replace('rem', '')));
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// use this to override base themes from Chakra
|
|
42
|
+
var baseConfig = _objectSpread(_objectSpread(_objectSpread({}, _theme["default"]), base), {}, {
|
|
43
|
+
components: components
|
|
44
|
+
});
|
|
45
|
+
var _default = exports["default"] = (0, _react.extendTheme)(extendedTheme, baseConfig);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
var _fill = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/fill"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var Spaces = function Spaces(_ref) {
|
|
12
|
+
var _context;
|
|
13
|
+
var _ref$spaces = _ref.spaces,
|
|
14
|
+
spaces = _ref$spaces === void 0 ? 3 : _ref$spaces;
|
|
15
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
16
|
+
dangerouslySetInnerHTML: {
|
|
17
|
+
__html: (0, _fill["default"])(_context = Array(spaces)).call(_context, ' ').join('')
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var _default = exports["default"] = Spaces;
|
package/package.json
CHANGED
|
@@ -1,20 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spothero/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.0.0",
|
|
4
4
|
"description": "SpotHero's React component UI library.",
|
|
5
|
-
"main": "./dist/index.
|
|
6
|
-
"
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"import": "./dist/index.esm.js",
|
|
10
|
-
"require": "./dist/index.cjs.js"
|
|
11
|
-
},
|
|
12
|
-
"./package.json": "./package.json"
|
|
13
|
-
},
|
|
5
|
+
"main": "./dist/components/index.js",
|
|
6
|
+
"exports": "./dist/components/index.js",
|
|
14
7
|
"repository": "https://github.com/spothero/fe-monorepo",
|
|
15
8
|
"files": [
|
|
16
9
|
"dist"
|
|
17
10
|
],
|
|
11
|
+
"babel": {
|
|
12
|
+
"presets": [
|
|
13
|
+
"@spothero/spothero"
|
|
14
|
+
],
|
|
15
|
+
"plugins": [
|
|
16
|
+
[
|
|
17
|
+
"module-resolver",
|
|
18
|
+
{
|
|
19
|
+
"alias": {
|
|
20
|
+
"components": "./src/components",
|
|
21
|
+
"theme": "./src/theme",
|
|
22
|
+
"utils": "./src/utils"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
]
|
|
27
|
+
},
|
|
18
28
|
"browserslist": {
|
|
19
29
|
"target": "web",
|
|
20
30
|
"extends": "@spothero/browserslist-config"
|
|
@@ -48,11 +58,6 @@
|
|
|
48
58
|
"@babel/cli": "7.23.9",
|
|
49
59
|
"@babel/core": "7.23.9",
|
|
50
60
|
"@babel/runtime-corejs3": "7.14.7",
|
|
51
|
-
"@emotion/is-prop-valid": "1.3.1",
|
|
52
|
-
"@rollup/plugin-babel": "6.0.4",
|
|
53
|
-
"@rollup/plugin-typescript": "12.1.2",
|
|
54
|
-
"@rollup/plugin-node-resolve": "16.0.0",
|
|
55
|
-
"@rollup/plugin-commonjs": "28.0.2",
|
|
56
61
|
"@storybook/addon-a11y": "7.6.19",
|
|
57
62
|
"@storybook/addon-actions": "7.6.19",
|
|
58
63
|
"@storybook/addon-essentials": "7.6.19",
|
|
@@ -64,8 +69,6 @@
|
|
|
64
69
|
"@testing-library/jest-dom": "5.11.9",
|
|
65
70
|
"@testing-library/react": "14.0.0",
|
|
66
71
|
"@testing-library/user-event": "12.8.1",
|
|
67
|
-
"@types/lodash": "4.14.199",
|
|
68
|
-
"@vitejs/plugin-react": "4.3.4",
|
|
69
72
|
"autoprefixer": "9.8.5",
|
|
70
73
|
"babel-jest": "29.2.2",
|
|
71
74
|
"babel-loader": "8.2.2",
|
|
@@ -92,23 +95,18 @@
|
|
|
92
95
|
"react-redux": "7.2.8",
|
|
93
96
|
"redux": "4.1.2",
|
|
94
97
|
"regenerator-runtime": "0.13.7",
|
|
95
|
-
"rollup": "4.28.1",
|
|
96
|
-
"rollup-plugin-dts": "6.1.1",
|
|
97
|
-
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
98
98
|
"sass-loader": "10.2.1",
|
|
99
99
|
"start-server-and-test": "1.12.6",
|
|
100
100
|
"storybook": "7.6.19",
|
|
101
101
|
"style-loader": "1.2.1",
|
|
102
|
-
"vite-tsconfig-paths": "5.1.4",
|
|
103
|
-
"vitest": "2.1.8",
|
|
104
102
|
"webpack-merge": "5.1.4",
|
|
103
|
+
"@spothero/babel-preset-spothero": "5.1.0",
|
|
105
104
|
"@spothero/browserslist-config": "4.0.0",
|
|
106
|
-
"@spothero/eslint-config": "6.1.0",
|
|
107
105
|
"@spothero/core": "7.0.1",
|
|
108
|
-
"@spothero/
|
|
109
|
-
"@spothero/
|
|
110
|
-
"@spothero/prettier-config": "4.0.0",
|
|
106
|
+
"@spothero/icons": "9.0.2",
|
|
107
|
+
"@spothero/eslint-config": "6.1.0",
|
|
111
108
|
"@spothero/npm-publisher": "7.0.0",
|
|
109
|
+
"@spothero/prettier-config": "4.0.0",
|
|
112
110
|
"@spothero/stylelint-config": "6.0.0"
|
|
113
111
|
},
|
|
114
112
|
"dependencies": {
|
|
@@ -124,12 +122,13 @@
|
|
|
124
122
|
"react-select": "5.4.0",
|
|
125
123
|
"regenerator-runtime": "0.13.7",
|
|
126
124
|
"ssr-window": "1.0.1",
|
|
127
|
-
"transitionEnd": "1.0.2"
|
|
125
|
+
"transitionEnd": "1.0.2",
|
|
126
|
+
"@spothero/utils": "15.0.2"
|
|
128
127
|
},
|
|
129
128
|
"peerDependencies": {
|
|
130
|
-
"classnames": "2.2.6",
|
|
129
|
+
"classnames": "^2.2.6",
|
|
131
130
|
"lodash": "4.17.21",
|
|
132
|
-
"prop-types": "15.7.2",
|
|
131
|
+
"prop-types": "^15.7.2",
|
|
133
132
|
"react": "18.2.0",
|
|
134
133
|
"react-dom": "18.2.0",
|
|
135
134
|
"react-redux": ">=7.0.0",
|
|
@@ -140,11 +139,13 @@
|
|
|
140
139
|
"lint": "eslint .storybook src --ext .jsx,.js",
|
|
141
140
|
"start": "NODE_OPTIONS=--openssl-legacy-provider storybook dev -p 6006",
|
|
142
141
|
"test": "pnpm run test:unit",
|
|
143
|
-
"test:
|
|
144
|
-
"test:unit
|
|
145
|
-
"
|
|
142
|
+
"test:template": "NODE_ENV=test jest --config ./jest.config.json --bail --silent",
|
|
143
|
+
"test:unit": "pnpm run test:template",
|
|
144
|
+
"test:unit:watch": "DEBUG_PRINT_LIMIT=-1 pnpm run test:template -- --watch",
|
|
145
|
+
"build:v2": "BABEL_ENV=production babel src -d dist",
|
|
146
|
+
"build": "pnpm run clean && pnpm run build:v2",
|
|
146
147
|
"release": "npm-release",
|
|
147
148
|
"build-storybook": "NODE_OPTIONS=--openssl-legacy-provider storybook build -o ./docs/v2",
|
|
148
|
-
"publish-storybook": "pnpm run build
|
|
149
|
+
"publish-storybook": "pnpm run build:storybook"
|
|
149
150
|
}
|
|
150
151
|
}
|