@spaced-out/ui-design-system 0.1.27 → 0.1.29
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/.cspell/custom-words.txt +4 -0
- package/.storybook/main.js +30 -0
- package/.storybook/manager-head.html +4 -0
- package/.storybook/preview-head.html +17 -0
- package/CHANGELOG.md +28 -0
- package/lib/components/Badge/Badge.js +3 -1
- package/lib/components/Badge/Badge.js.flow +2 -2
- package/lib/components/Checkbox/Checkbox.js +3 -7
- package/lib/components/Checkbox/Checkbox.js.flow +3 -8
- package/lib/components/Pagination/Pagination.js +2 -2
- package/lib/components/Pagination/Pagination.js.flow +1 -1
- package/lib/hooks/useCopyToClipboard/index.js +16 -0
- package/lib/hooks/useCopyToClipboard/index.js.flow +3 -0
- package/lib/hooks/useInputState/index.js +16 -0
- package/lib/hooks/useInputState/index.js.flow +3 -0
- package/lib/hooks/useLockedBody/index.js +16 -0
- package/lib/hooks/useLockedBody/index.js.flow +3 -0
- package/lib/hooks/usePagination/index.js +16 -0
- package/lib/hooks/usePagination/index.js.flow +3 -0
- package/lib/hooks/{usePagination.js → usePagination/usePagination.js} +5 -4
- package/lib/hooks/{usePagination.js.flow → usePagination/usePagination.js.flow} +7 -5
- package/lib/hooks/useToastPortal/index.js +16 -0
- package/lib/hooks/useToastPortal/index.js.flow +3 -0
- package/lib/hooks/{useToastPortal.js → useToastPortal/useToastPortal.js} +2 -2
- package/lib/hooks/{useToastPortal.js.flow → useToastPortal/useToastPortal.js.flow} +2 -2
- package/lib/hooks/useToggle/index.js +16 -0
- package/lib/hooks/useToggle/index.js.flow +3 -0
- package/lib/hooks/useWindowSize/index.js +16 -0
- package/lib/hooks/useWindowSize/index.js.flow +3 -0
- package/lib/utils/{click-away.js → click-away/click-away.js} +1 -1
- package/lib/utils/{click-away.js.flow → click-away/click-away.js.flow} +1 -1
- package/lib/utils/click-away/index.js +16 -0
- package/lib/utils/click-away/index.js.flow +3 -0
- package/lib/utils/dom/index.js +16 -0
- package/lib/utils/dom/index.js.flow +3 -0
- package/lib/utils/helpers/index.js +16 -0
- package/lib/utils/helpers/index.js.flow +3 -0
- package/lib/utils/makeClassNameComponent/index.js +16 -0
- package/lib/utils/makeClassNameComponent/index.js.flow +3 -0
- package/lib/utils/{makeClassNameComponent.js → makeClassNameComponent/makeClassNameComponent.js} +1 -1
- package/lib/utils/{makeClassNameComponent.js.flow → makeClassNameComponent/makeClassNameComponent.js.flow} +1 -1
- package/lib/utils/menu/index.js +16 -0
- package/lib/utils/menu/index.js.flow +3 -0
- package/lib/utils/{menu.js → menu/menu.js} +1 -1
- package/lib/utils/{menu.js.flow → menu/menu.js.flow} +2 -3
- package/lib/utils/merge-refs/index.js +16 -0
- package/lib/utils/merge-refs/index.js.flow +3 -0
- package/lib/utils/string/index.js +16 -0
- package/lib/utils/string/index.js.flow +3 -0
- package/lib/utils/tokens/index.js +16 -0
- package/lib/utils/tokens/index.js.flow +3 -0
- package/lib/utils/tokens/tokens.js +154 -0
- package/lib/utils/tokens/tokens.js.flow +228 -0
- package/package.json +2 -1
- package/lib/utils/tokens.js +0 -74
- package/lib/utils/tokens.js.flow +0 -82
- /package/lib/hooks/{useCopyToClipboard.js → useCopyToClipboard/useCopyToClipboard.js} +0 -0
- /package/lib/hooks/{useCopyToClipboard.js.flow → useCopyToClipboard/useCopyToClipboard.js.flow} +0 -0
- /package/lib/hooks/{useInputState.js → useInputState/useInputState.js} +0 -0
- /package/lib/hooks/{useInputState.js.flow → useInputState/useInputState.js.flow} +0 -0
- /package/lib/hooks/{useLockedBody.js → useLockedBody/useLockedBody.js} +0 -0
- /package/lib/hooks/{useLockedBody.js.flow → useLockedBody/useLockedBody.js.flow} +0 -0
- /package/lib/hooks/{useMountTransition.js → useMountTransition/index.js} +0 -0
- /package/lib/hooks/{useMountTransition.js.flow → useMountTransition/index.js.flow} +0 -0
- /package/lib/hooks/{useToggle.js → useToggle/useToggle.js} +0 -0
- /package/lib/hooks/{useToggle.js.flow → useToggle/useToggle.js.flow} +0 -0
- /package/lib/hooks/{useWindowSize.js → useWindowSize/useWindowSize.js} +0 -0
- /package/lib/hooks/{useWindowSize.js.flow → useWindowSize/useWindowSize.js.flow} +0 -0
- /package/lib/utils/{classify.js → classify/index.js} +0 -0
- /package/lib/utils/{classify.js.flow → classify/index.js.flow} +0 -0
- /package/lib/utils/{dom.js → dom/dom.js} +0 -0
- /package/lib/utils/{dom.js.flow → dom/dom.js.flow} +0 -0
- /package/lib/utils/{helpers.js → helpers/helpers.js} +0 -0
- /package/lib/utils/{helpers.js.flow → helpers/helpers.js.flow} +0 -0
- /package/lib/utils/{merge-refs.js → merge-refs/merge-refs.js} +0 -0
- /package/lib/utils/{merge-refs.js.flow → merge-refs/merge-refs.js.flow} +0 -0
- /package/lib/utils/{string.js → string/string.js} +0 -0
- /package/lib/utils/{string.js.flow → string/string.js.flow} +0 -0
package/.cspell/custom-words.txt
CHANGED
|
@@ -18,6 +18,7 @@ fontawesome
|
|
|
18
18
|
framename
|
|
19
19
|
Gaurav
|
|
20
20
|
innerref
|
|
21
|
+
interdimensional
|
|
21
22
|
Lipsey
|
|
22
23
|
Neue
|
|
23
24
|
Nishant
|
|
@@ -28,14 +29,17 @@ noopener
|
|
|
28
29
|
noreferrer
|
|
29
30
|
OPACITYS
|
|
30
31
|
partialformat
|
|
32
|
+
pocus
|
|
31
33
|
premajor
|
|
32
34
|
preminor
|
|
33
35
|
prepatch
|
|
34
36
|
rgba
|
|
35
37
|
sbdocs
|
|
36
38
|
Stapleton
|
|
39
|
+
storysource
|
|
37
40
|
superrover
|
|
38
41
|
systemjs
|
|
42
|
+
tablist
|
|
39
43
|
tabout
|
|
40
44
|
testid
|
|
41
45
|
tnum
|
package/.storybook/main.js
CHANGED
|
@@ -22,6 +22,36 @@ module.exports = {
|
|
|
22
22
|
'@storybook/testing-react',
|
|
23
23
|
// 'storybook-vscode-component/register', This is not supported in storybook 7
|
|
24
24
|
'@storybook/addon-mdx-gfm',
|
|
25
|
+
{
|
|
26
|
+
name: '@storybook/addon-storysource',
|
|
27
|
+
options: {
|
|
28
|
+
loaderOptions: {
|
|
29
|
+
injectStoryParameters: false,
|
|
30
|
+
prettierConfig: {
|
|
31
|
+
singleQuote: true,
|
|
32
|
+
trailingComma: 'all',
|
|
33
|
+
printWidth: 80,
|
|
34
|
+
tabWidth: 2,
|
|
35
|
+
bracketSpacing: false,
|
|
36
|
+
endOfLine: 'lf',
|
|
37
|
+
overrides: [
|
|
38
|
+
{
|
|
39
|
+
files: ['*.js', '*.jsx'],
|
|
40
|
+
options: {
|
|
41
|
+
parser: 'babel-flow',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
files: ['*.css'],
|
|
46
|
+
options: {
|
|
47
|
+
parser: 'css',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
25
55
|
],
|
|
26
56
|
babel: async (options) => ({
|
|
27
57
|
...options,
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<meta
|
|
2
|
+
name="viewport"
|
|
3
|
+
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
|
|
4
|
+
/>
|
|
1
5
|
<style type="text/css">
|
|
2
6
|
@font-face {
|
|
3
7
|
font-family: 'Centra No 2';
|
|
@@ -136,5 +140,18 @@
|
|
|
136
140
|
|
|
137
141
|
code {
|
|
138
142
|
white-space: pre-wrap !important;
|
|
143
|
+
background-color: #f1f1f5 !important;
|
|
144
|
+
border-color: #d3d2e0 !important;
|
|
145
|
+
color: #17172a !important;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.docblock-source {
|
|
149
|
+
background-color: #f1f1f5 !important;
|
|
150
|
+
box-shadow: none !important;
|
|
151
|
+
border-color: #d3d2e0 !important;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
a.sbdocs {
|
|
155
|
+
color: #5c34cd !important;
|
|
139
156
|
}
|
|
140
157
|
</style>
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.29](https://github.com/spaced-out/ui-design-system/compare/v0.1.28...v0.1.29) (2023-06-01)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* add classnames support for text in badge ([#119](https://github.com/spaced-out/ui-design-system/issues/119)) ([f044fb6](https://github.com/spaced-out/ui-design-system/commit/f044fb682079cb62d5fa82fea0d4884d5512995c))
|
|
11
|
+
* changed folder structure for hooks and utils ([6bc1693](https://github.com/spaced-out/ui-design-system/commit/6bc1693cbe338ee7ad3f0ffe82e5caaf7ff2ef28))
|
|
12
|
+
* changed position of hooks ([a3f14a4](https://github.com/spaced-out/ui-design-system/commit/a3f14a478999a4124eb08a7052031b9fa2891363))
|
|
13
|
+
|
|
14
|
+
### [0.1.28](https://github.com/spaced-out/ui-design-system/compare/v0.1.27...v0.1.28) (2023-05-26)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* added @storybook/addon-storysource ([b25a7f7](https://github.com/spaced-out/ui-design-system/commit/b25a7f787fbfe366ba9ec7f96a48096cbcdb24f1))
|
|
20
|
+
* tokens page now support search ([bae8e7f](https://github.com/spaced-out/ui-design-system/commit/bae8e7fac06ee31cb0e4ea390e0709a4d51a171d))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* added fun entries missing messages ([eabe577](https://github.com/spaced-out/ui-design-system/commit/eabe5772da715d9066794ff99aa76b39a2e8f847))
|
|
26
|
+
* checkbox onChange getting triggered twice ([#118](https://github.com/spaced-out/ui-design-system/issues/118)) ([79f01fd](https://github.com/spaced-out/ui-design-system/commit/79f01fd80d11bc3c22280e3432dc05567c680830))
|
|
27
|
+
* fixed broken links in docs ([faf1301](https://github.com/spaced-out/ui-design-system/commit/faf1301dbc6285d49a1c3c5ead91fc493df47b96))
|
|
28
|
+
* no scaling on iPhones ([11556c0](https://github.com/spaced-out/ui-design-system/commit/11556c006e73c3d067e9c7187ac72d41617c3349))
|
|
29
|
+
* story style fixes ([3ef77e7](https://github.com/spaced-out/ui-design-system/commit/3ef77e77ca2fe2fcc0d08a6baf7ef079bc3c8dab))
|
|
30
|
+
* style fixes for sb ([14900e9](https://github.com/spaced-out/ui-design-system/commit/14900e995e43673fea0b744b22a1e064f81ae16d))
|
|
31
|
+
* style fixes for sb ([2672025](https://github.com/spaced-out/ui-design-system/commit/2672025e2bd214b035ae89eafbb004bd1663958f))
|
|
32
|
+
|
|
5
33
|
### [0.1.27](https://github.com/spaced-out/ui-design-system/compare/v0.1.26...v0.1.27) (2023-05-17)
|
|
6
34
|
|
|
7
35
|
|
|
@@ -37,6 +37,8 @@ const Badge = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
37
37
|
backgroundColor: BADGE_COLOR[fill]
|
|
38
38
|
},
|
|
39
39
|
ref: ref
|
|
40
|
-
}, /*#__PURE__*/React.createElement(_Text.ButtonTextSmall,
|
|
40
|
+
}, /*#__PURE__*/React.createElement(_Text.ButtonTextSmall, {
|
|
41
|
+
className: classNames?.text
|
|
42
|
+
}, text));
|
|
41
43
|
});
|
|
42
44
|
exports.Badge = Badge;
|
|
@@ -16,7 +16,7 @@ import {ButtonTextSmall} from '../Text/Text';
|
|
|
16
16
|
import css from './Badge.module.css';
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
type ClassNames = $ReadOnly<{wrapper?: string}>;
|
|
19
|
+
type ClassNames = $ReadOnly<{wrapper?: string, text?: string}>;
|
|
20
20
|
|
|
21
21
|
export const BADGE_COLOR = Object.freeze({
|
|
22
22
|
gray: colorGrayLightest,
|
|
@@ -52,7 +52,7 @@ export const Badge: React$AbstractComponent<BadgeProps, HTMLDivElement> =
|
|
|
52
52
|
}}
|
|
53
53
|
ref={ref}
|
|
54
54
|
>
|
|
55
|
-
<ButtonTextSmall>{text}</ButtonTextSmall>
|
|
55
|
+
<ButtonTextSmall className={classNames?.text}>{text}</ButtonTextSmall>
|
|
56
56
|
</div>
|
|
57
57
|
),
|
|
58
58
|
);
|
|
@@ -30,7 +30,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, forwardRef) => {
|
|
|
30
30
|
} = _ref;
|
|
31
31
|
const checkboxInput = /*#__PURE__*/React.createRef();
|
|
32
32
|
React.useImperativeHandle(forwardRef, () => checkboxInput.current);
|
|
33
|
-
const
|
|
33
|
+
const handleOnClick = () => {
|
|
34
34
|
if (!disabled) {
|
|
35
35
|
onChange && onChange({
|
|
36
36
|
value,
|
|
@@ -51,9 +51,6 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, forwardRef) => {
|
|
|
51
51
|
checkboxInput.current.indeterminate = false;
|
|
52
52
|
}
|
|
53
53
|
}, [indeterminate]);
|
|
54
|
-
const onClickHandler = () => {
|
|
55
|
-
checkboxInput.current?.click();
|
|
56
|
-
};
|
|
57
54
|
return /*#__PURE__*/React.createElement("div", {
|
|
58
55
|
"data-testid": "checkbox",
|
|
59
56
|
className: (0, _classify.default)(_CheckboxModule.default.checkboxContainer, {
|
|
@@ -61,7 +58,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, forwardRef) => {
|
|
|
61
58
|
[_CheckboxModule.default.horizontalCheckbox]: align === 'horizontal-fixed',
|
|
62
59
|
[_CheckboxModule.default.fluidCheckbox]: align === 'horizontal-fluid'
|
|
63
60
|
}, classNames?.wrapper),
|
|
64
|
-
onClick:
|
|
61
|
+
onClick: handleOnClick
|
|
65
62
|
}, /*#__PURE__*/React.createElement("span", {
|
|
66
63
|
className: (0, _classify.default)(_CheckboxModule.default.checkboxSquare, {
|
|
67
64
|
[_CheckboxModule.default.disabled]: disabled
|
|
@@ -69,10 +66,9 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, forwardRef) => {
|
|
|
69
66
|
}, /*#__PURE__*/React.createElement("input", {
|
|
70
67
|
tabIndex: disabled ? -1 : tabIndex,
|
|
71
68
|
type: "checkbox",
|
|
72
|
-
value: value,
|
|
73
69
|
checked: checked,
|
|
70
|
+
readOnly: true,
|
|
74
71
|
ref: checkboxInput,
|
|
75
|
-
onChange: handleOnChange,
|
|
76
72
|
className: (0, _classify.default)(_CheckboxModule.default.inputCheckbox),
|
|
77
73
|
disabled: disabled,
|
|
78
74
|
name: name,
|
|
@@ -61,7 +61,7 @@ export const Checkbox: React$AbstractComponent<
|
|
|
61
61
|
const checkboxInput = React.createRef<HTMLInputElement>();
|
|
62
62
|
React.useImperativeHandle(forwardRef, () => checkboxInput.current);
|
|
63
63
|
|
|
64
|
-
const
|
|
64
|
+
const handleOnClick = () => {
|
|
65
65
|
if (!disabled) {
|
|
66
66
|
onChange &&
|
|
67
67
|
onChange({
|
|
@@ -86,10 +86,6 @@ export const Checkbox: React$AbstractComponent<
|
|
|
86
86
|
}
|
|
87
87
|
}, [indeterminate]);
|
|
88
88
|
|
|
89
|
-
const onClickHandler = () => {
|
|
90
|
-
checkboxInput.current?.click();
|
|
91
|
-
};
|
|
92
|
-
|
|
93
89
|
return (
|
|
94
90
|
<div
|
|
95
91
|
data-testid="checkbox"
|
|
@@ -102,7 +98,7 @@ export const Checkbox: React$AbstractComponent<
|
|
|
102
98
|
},
|
|
103
99
|
classNames?.wrapper,
|
|
104
100
|
)}
|
|
105
|
-
onClick={
|
|
101
|
+
onClick={handleOnClick}
|
|
106
102
|
>
|
|
107
103
|
<span
|
|
108
104
|
className={classify(
|
|
@@ -116,10 +112,9 @@ export const Checkbox: React$AbstractComponent<
|
|
|
116
112
|
<input
|
|
117
113
|
tabIndex={disabled ? -1 : tabIndex}
|
|
118
114
|
type="checkbox"
|
|
119
|
-
value={value}
|
|
120
115
|
checked={checked}
|
|
116
|
+
readOnly
|
|
121
117
|
ref={checkboxInput}
|
|
122
|
-
onChange={handleOnChange}
|
|
123
118
|
className={classify(css.inputCheckbox)}
|
|
124
119
|
disabled={disabled}
|
|
125
120
|
name={name}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.Pagination = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _usePagination =
|
|
8
|
+
var _usePagination = require("../../hooks/usePagination");
|
|
9
9
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
10
10
|
var _helpers = require("../../utils/helpers");
|
|
11
11
|
var _Dropdown = require("../Dropdown");
|
|
@@ -30,7 +30,7 @@ const Pagination = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
30
30
|
} = props;
|
|
31
31
|
const {
|
|
32
32
|
items
|
|
33
|
-
} = (0, _usePagination.
|
|
33
|
+
} = (0, _usePagination.usePagination)({
|
|
34
34
|
style,
|
|
35
35
|
showFirstButton,
|
|
36
36
|
showLastButton,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
|
|
5
|
-
import usePagination from '../../hooks/usePagination';
|
|
5
|
+
import {usePagination} from '../../hooks/usePagination';
|
|
6
6
|
import classify from '../../utils/classify';
|
|
7
7
|
import {range} from '../../utils/helpers';
|
|
8
8
|
import {Dropdown} from '../Dropdown';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _useCopyToClipboard = require("./useCopyToClipboard");
|
|
7
|
+
Object.keys(_useCopyToClipboard).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _useCopyToClipboard[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _useCopyToClipboard[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _useInputState = require("./useInputState");
|
|
7
|
+
Object.keys(_useInputState).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _useInputState[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _useInputState[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _useLockedBody = require("./useLockedBody");
|
|
7
|
+
Object.keys(_useLockedBody).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _useLockedBody[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _useLockedBody[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _usePagination = require("./usePagination");
|
|
7
|
+
Object.keys(_usePagination).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _usePagination[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _usePagination[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
var _helpers = require("
|
|
6
|
+
exports.usePagination = void 0;
|
|
7
|
+
var _helpers = require("../../utils/helpers");
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
const usePagination = props => {
|
|
10
10
|
const {
|
|
11
11
|
boundaryCount = 1,
|
|
12
12
|
totalPages = 1,
|
|
@@ -99,4 +99,5 @@ function usePagination(props) {
|
|
|
99
99
|
return {
|
|
100
100
|
items
|
|
101
101
|
};
|
|
102
|
-
}
|
|
102
|
+
};
|
|
103
|
+
exports.usePagination = usePagination;
|
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
import type {
|
|
4
4
|
PaginationBaseProps,
|
|
5
5
|
PaginationItemProps,
|
|
6
|
-
} from '
|
|
7
|
-
import {range} from '
|
|
6
|
+
} from '../../components/Pagination';
|
|
7
|
+
import {range} from '../../utils/helpers';
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
export
|
|
10
|
+
export const usePagination = (
|
|
11
|
+
props: PaginationBaseProps,
|
|
12
|
+
): {
|
|
11
13
|
items: ?(PaginationItemProps[]),
|
|
12
|
-
} {
|
|
14
|
+
} => {
|
|
13
15
|
const {
|
|
14
16
|
boundaryCount = 1,
|
|
15
17
|
totalPages = 1,
|
|
@@ -150,4 +152,4 @@ export default function usePagination(props: PaginationBaseProps): {
|
|
|
150
152
|
return {
|
|
151
153
|
items,
|
|
152
154
|
};
|
|
153
|
-
}
|
|
155
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _useToastPortal = require("./useToastPortal");
|
|
7
|
+
Object.keys(_useToastPortal).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _useToastPortal[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _useToastPortal[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useToastPortal = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var _elevation = require("
|
|
9
|
-
var _space = require("
|
|
8
|
+
var _elevation = require("../../styles/variables/_elevation");
|
|
9
|
+
var _space = require("../../styles/variables/_space");
|
|
10
10
|
|
|
11
11
|
const useToastPortal = _ref => {
|
|
12
12
|
let {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @flow strict
|
|
2
2
|
import {useEffect, useState} from 'react';
|
|
3
3
|
|
|
4
|
-
import {elevationToast} from '
|
|
5
|
-
import {spaceMedium} from '
|
|
4
|
+
import {elevationToast} from '../../styles/variables/_elevation';
|
|
5
|
+
import {spaceMedium} from '../../styles/variables/_space';
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
type UseToastPortal = {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _useToggle = require("./useToggle");
|
|
7
|
+
Object.keys(_useToggle).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _useToggle[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _useToggle[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _useWindowSize = require("./useWindowSize");
|
|
7
|
+
Object.keys(_useWindowSize).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _useWindowSize[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _useWindowSize[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ClickAway = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _invariant = _interopRequireDefault(require("invariant"));
|
|
9
|
-
var _dom = require("
|
|
9
|
+
var _dom = require("../dom");
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
12
|
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; }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _clickAway = require("./click-away");
|
|
7
|
+
Object.keys(_clickAway).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _clickAway[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _clickAway[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _dom = require("./dom");
|
|
7
|
+
Object.keys(_dom).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _dom[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _dom[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _helpers = require("./helpers");
|
|
7
|
+
Object.keys(_helpers).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _helpers[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _helpers[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _makeClassNameComponent = require("./makeClassNameComponent");
|
|
7
|
+
Object.keys(_makeClassNameComponent).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _makeClassNameComponent[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _makeClassNameComponent[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
package/lib/utils/{makeClassNameComponent.js → makeClassNameComponent/makeClassNameComponent.js}
RENAMED
|
@@ -7,7 +7,7 @@ exports.makeClassNameComponent = makeClassNameComponent;
|
|
|
7
7
|
exports.makeClassNameComponentCustom = makeClassNameComponentCustom;
|
|
8
8
|
exports.nameHoc = nameHoc;
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _classify = _interopRequireDefault(require("
|
|
10
|
+
var _classify = _interopRequireDefault(require("../classify"));
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
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; }
|