@koine/react 2.0.0-beta.10 → 2.0.0-beta.12
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/package.json +11 -11
- package/Alert/Alert.js +0 -33
- package/Alert/Alert.stories.js +0 -39
- package/Alert/index.js +0 -6
- package/Animations/Reveal.js +0 -53
- package/Animations/Underline.js +0 -26
- package/Animations/index.js +0 -8
- package/Animations/useReveal.js +0 -83
- package/Autocomplete/AutocompleteDownshift.js +0 -167
- package/Autocomplete/AutocompleteDownshiftMultiselect.js +0 -362
- package/Autocomplete/AutocompleteMui.js +0 -183
- package/Autocomplete/AutocompleteReach.js +0 -121
- package/Autocomplete/components.js +0 -132
- package/Autocomplete/helpers.js +0 -34
- package/Autocomplete/index.js +0 -15
- package/Bg/BgColor.js +0 -64
- package/Bg/BgPhoto.js +0 -82
- package/Bg/BgSvg.js +0 -31
- package/Bg/index.js +0 -8
- package/Breadcrumbs/Breadcrumbs.js +0 -103
- package/Breadcrumbs/index.js +0 -6
- package/Buttons/Button.js +0 -106
- package/Buttons/ButtonComposite.js +0 -116
- package/Buttons/ButtonFab.js +0 -27
- package/Buttons/ButtonLink.js +0 -29
- package/Buttons/IconButton.js +0 -41
- package/Buttons/index.js +0 -10
- package/Calendar/CalendarDaygridCell.js +0 -105
- package/Calendar/CalendarDaygridNav.js +0 -63
- package/Calendar/CalendarDaygridTable.js +0 -126
- package/Calendar/CalendarLegend.js +0 -39
- package/Calendar/calendar-api-google.js +0 -110
- package/Calendar/index.js +0 -11
- package/Calendar/types.js +0 -4
- package/Calendar/useCalendar.js +0 -235
- package/Calendar/utils.js +0 -252
- package/Carousel/Carousel.js +0 -387
- package/Carousel/CarouselCss.js +0 -64
- package/Carousel/index.js +0 -6
- package/Collapsable/Collapsable.js +0 -11
- package/Collapsable/CollapsableReach.js +0 -251
- package/Collapsable/index.js +0 -7
- package/Debug/Debug.js +0 -34
- package/Debug/index.js +0 -6
- package/Details/Details.js +0 -117
- package/Details/Details.stories.js +0 -39
- package/Details/index.js +0 -6
- package/Dialog/DialogMui.js +0 -143
- package/Dialog/DialogMui.stories.js +0 -38
- package/Dialog/css/bare.js +0 -55
- package/Dialog/css/index.stories.js +0 -93
- package/Dialog/index.js +0 -11
- package/Dialog/m/bare.js +0 -125
- package/Dialog/m/basic.js +0 -50
- package/Dialog/m/index.js +0 -14
- package/Dialog/sc/bare.js +0 -83
- package/Dialog/sc/framer.js +0 -26
- package/Dialog/sc/framerMaterial.js +0 -26
- package/Dialog/sc/index.stories.js +0 -75
- package/Dialog/sc/material.js +0 -78
- package/Dialog/tw/bare.js +0 -55
- package/Dialog/tw/elegant.js +0 -54
- package/Dialog/tw/framer.js +0 -26
- package/Dialog/tw/framerMaterial.js +0 -26
- package/Dialog/tw/index.stories.js +0 -113
- package/Dialog/tw/material.js +0 -54
- package/Editor/Editor--tiptap.js +0 -72
- package/Editor/components.js +0 -59
- package/Editor/index.js +0 -6
- package/FaviconTags.js +0 -73
- package/Form/Form.js +0 -130
- package/Form/index.js +0 -6
- package/Form/sc/bare.js +0 -55
- package/Forms/Checkbox/Checkbox.js +0 -62
- package/Forms/Checkbox/index.js +0 -6
- package/Forms/Feedback/Feedback.js +0 -25
- package/Forms/Feedback/index.js +0 -6
- package/Forms/Field/Field.js +0 -75
- package/Forms/Field/FieldControl.js +0 -69
- package/Forms/Field/FieldHint.js +0 -17
- package/Forms/Field/index.js +0 -7
- package/Forms/Input/Input.js +0 -67
- package/Forms/Input/index.js +0 -6
- package/Forms/InputGroup/InputGroup.js +0 -85
- package/Forms/InputGroup/index.js +0 -6
- package/Forms/Label/Label.js +0 -46
- package/Forms/Label/index.js +0 -6
- package/Forms/Password/Password.js +0 -72
- package/Forms/Password/index.js +0 -6
- package/Forms/Radio/Radio.js +0 -68
- package/Forms/Radio/index.js +0 -6
- package/Forms/Switch/Switch.js +0 -80
- package/Forms/Switch/index.js +0 -6
- package/Forms/Textarea/Textarea.js +0 -45
- package/Forms/Textarea/TextareaRich.js +0 -58
- package/Forms/Textarea/index.js +0 -7
- package/Forms/Toggle/Toggle-tailwind.js +0 -99
- package/Forms/Toggle/Toggle.js +0 -175
- package/Forms/Toggle/index.js +0 -6
- package/Forms/Toggle/useToggle-tailwind.js +0 -202
- package/Forms/Toggle/useToggle.js +0 -145
- package/Forms/antispam.js +0 -59
- package/Forms/helpers.js +0 -72
- package/Forms/index.js +0 -19
- package/Forms/styles.js +0 -94
- package/Gauge/Gauge.js +0 -111
- package/Grid/Grid.js +0 -106
- package/Grid/index.js +0 -6
- package/Hamburger/Hamburger.js +0 -90
- package/Hamburger/index.js +0 -6
- package/Header/index.js +0 -6
- package/Header/useHeader.js +0 -54
- package/Hidden/Hidden.js +0 -21
- package/Hidden/index.js +0 -6
- package/Img/index.js +0 -6
- package/Img/sc/bare.js +0 -43
- package/Img/types.js +0 -6
- package/Link/Link.js +0 -13
- package/Link/LinkBlank.js +0 -52
- package/Link/index.js +0 -7
- package/Menu/Menu.js +0 -22
- package/Menu/MenuMui.js +0 -165
- package/Menu/index.js +0 -6
- package/MenuItem/MenuItem.js +0 -31
- package/MenuItem/MenuItemMui.js +0 -32
- package/MenuItem/index.js +0 -6
- package/MenuItem/useMenuItem.js +0 -96
- package/Meta/Meta.js +0 -26
- package/Meta/index.js +0 -12
- package/NoJs/NoJs.js +0 -28
- package/NoJs/index.js +0 -12
- package/Pagination/PaginationNav.js +0 -126
- package/Pagination/PaginationResults.js +0 -45
- package/Pagination/index.js +0 -7
- package/Pill/Pill.js +0 -62
- package/Pill/index.js +0 -6
- package/Progress/ProgressCircular.js +0 -62
- package/Progress/ProgressLinear.js +0 -53
- package/Progress/ProgressOverlay.js +0 -75
- package/Progress/index.js +0 -8
- package/Rating/Rating.js +0 -188
- package/Rating/index.js +0 -85
- package/Select/SelectDownshift.js +0 -47
- package/Select/components.js +0 -44
- package/Select/index.js +0 -13
- package/Sidebar/Sidebar.js +0 -74
- package/Sidebar/index.js +0 -6
- package/Spacing/Spacing.js +0 -55
- package/Spacing/index.js +0 -6
- package/Sticky/Sticky.js +0 -228
- package/Sticky/StickyCss.js +0 -20
- package/Sticky/index.js +0 -19
- package/Tabs/TabsMui.js +0 -91
- package/Tabs/TabsMui.stories.js +0 -38
- package/Tabs/index.js +0 -6
- package/Tabs/sc/bare.js +0 -86
- package/Tabs/sc/index.stories.js +0 -1
- package/Tabs/tw/bare.js +0 -45
- package/Tabs/tw/index.stories.js +0 -46
- package/Tabs/tw/material.js +0 -44
- package/Tabs/useTabs.js +0 -66
- package/Typography/CopyPasteVisible.js +0 -17
- package/Typography/Native.js +0 -90
- package/Typography/ReadMore.js +0 -125
- package/Typography/TextLoop.js +0 -108
- package/Typography/TypeStairs.js +0 -71
- package/Typography/index.js +0 -10
- package/css/index.js +0 -33
- package/helpers/classed.js +0 -66
- package/helpers/classed.stories.js +0 -140
- package/helpers/createUseMediaQueryWidth.js +0 -193
- package/helpers/extend-component.js +0 -32
- package/helpers/index.js +0 -9
- package/helpers/mergeRefs.js +0 -30
- package/hooks/index.js +0 -92
- package/hooks/types.js +0 -6
- package/hooks/useAsyncFn.js +0 -56
- package/hooks/useDateLocale.js +0 -51
- package/hooks/useFirstMountState.js +0 -28
- package/hooks/useFixedOffset.js +0 -67
- package/hooks/useFocus.js +0 -30
- package/hooks/useInterval.js +0 -44
- package/hooks/useIsomorphicLayoutEffect.js +0 -23
- package/hooks/useKeyUp.js +0 -40
- package/hooks/useMeasure.js +0 -189
- package/hooks/useMountedState.js +0 -31
- package/hooks/useNavigateAway.js +0 -69
- package/hooks/usePrevious.js +0 -33
- package/hooks/usePreviousRef.js +0 -27
- package/hooks/useScrollPosition.js +0 -83
- package/hooks/useScrollThreshold.js +0 -52
- package/hooks/useScrollTo.js +0 -39
- package/hooks/useSmoothScroll.js +0 -49
- package/hooks/useSpinDelay.js +0 -59
- package/hooks/useTraceUpdate.js +0 -39
- package/hooks/useUpdateEffect.js +0 -30
- package/hooks/useWindowSize.js +0 -43
- package/index.js +0 -10
- package/m/MotionProvider.js +0 -27
- package/m/index.js +0 -10
- package/m/lite.js +0 -12
- package/m/max.js +0 -12
- package/sc/index.js +0 -49
- package/scm/index.js +0 -40
- package/shared/index.js +0 -13
- package/styles/Body.js +0 -28
- package/styles/Global.js +0 -55
- package/styles/index.js +0 -142
- package/styles/media.js +0 -139
- package/styles/spacing.js +0 -70
- package/styles/styled.js +0 -58
- package/styles/theme--vanilla.js +0 -82
- package/styles/theme.js +0 -49
- package/tw/index.js +0 -33
- package/twm/index.js +0 -33
- package/types.js +0 -4
package/MenuItem/useMenuItem.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
useMenuItem: function() {
|
|
13
|
-
return useMenuItem;
|
|
14
|
-
},
|
|
15
|
-
default: function() {
|
|
16
|
-
return _default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
-
const _useMenu = /*#__PURE__*/ _interop_require_default._(require("@mui/base/useMenu"));
|
|
21
|
-
const _useForkRef = /*#__PURE__*/ _interop_require_default._(require("@mui/utils/useForkRef"));
|
|
22
|
-
const _react = require("react");
|
|
23
|
-
function useMenuItem(props) {
|
|
24
|
-
const { disabled = false, rootRef: ref, label } = props;
|
|
25
|
-
const id = (0, _react.useId)();
|
|
26
|
-
const { contextValue, open } = (0, _useMenu.default)();
|
|
27
|
-
// const { getRootProps } = useMenuItemUnstyled(props);
|
|
28
|
-
const itemRef = (0, _react.useRef)(null);
|
|
29
|
-
const handleRef = (0, _useForkRef.default)(itemRef, ref);
|
|
30
|
-
if (contextValue === null) {
|
|
31
|
-
throw new Error("MenuItemUnstyled must be used within a MenuUnstyled");
|
|
32
|
-
}
|
|
33
|
-
const { registerItem, getItemState } = contextValue;
|
|
34
|
-
(0, _react.useEffect)(()=>{
|
|
35
|
-
registerItem(id, {
|
|
36
|
-
disabled,
|
|
37
|
-
id,
|
|
38
|
-
ref: itemRef,
|
|
39
|
-
label
|
|
40
|
-
});
|
|
41
|
-
// return () => unregisterItem(id);
|
|
42
|
-
}, [
|
|
43
|
-
id,
|
|
44
|
-
registerItem,
|
|
45
|
-
/* unregisterItem, */ disabled,
|
|
46
|
-
ref,
|
|
47
|
-
label
|
|
48
|
-
]);
|
|
49
|
-
// const { getRootProps: getButtonProps, focusVisible } = useButton({
|
|
50
|
-
// disabled,
|
|
51
|
-
// focusableWhenDisabled: true,
|
|
52
|
-
// ref: handleRef,
|
|
53
|
-
// });
|
|
54
|
-
// Ensure the menu item is focused when highlighted
|
|
55
|
-
const [focusRequested, requestFocus] = (0, _react.useState)(false);
|
|
56
|
-
const focusIfRequested = (0, _react.useCallback)(()=>{
|
|
57
|
-
if (focusRequested && itemRef.current != null) {
|
|
58
|
-
itemRef.current.focus();
|
|
59
|
-
requestFocus(false);
|
|
60
|
-
}
|
|
61
|
-
}, [
|
|
62
|
-
focusRequested
|
|
63
|
-
]);
|
|
64
|
-
(0, _react.useEffect)(()=>{
|
|
65
|
-
focusIfRequested();
|
|
66
|
-
});
|
|
67
|
-
// useDebugValue({ id, disabled, label });
|
|
68
|
-
const itemState = getItemState(id ?? "");
|
|
69
|
-
const { highlighted } = itemState ?? {
|
|
70
|
-
highlighted: false
|
|
71
|
-
};
|
|
72
|
-
(0, _react.useEffect)(()=>{
|
|
73
|
-
requestFocus(highlighted && open);
|
|
74
|
-
}, [
|
|
75
|
-
highlighted,
|
|
76
|
-
open
|
|
77
|
-
]);
|
|
78
|
-
return {
|
|
79
|
-
getRootProps: (other)=>{
|
|
80
|
-
// const optionProps = menuContext.getItemProps(id, other);
|
|
81
|
-
return {
|
|
82
|
-
...other,
|
|
83
|
-
// ...getButtonProps(other),
|
|
84
|
-
// @ ts-expect-error type from @mui/base is not specific
|
|
85
|
-
// tabIndex: optionProps.tabIndex,
|
|
86
|
-
// @ ts-expect-error type from @mui/base is not specific
|
|
87
|
-
// id: optionProps.id,
|
|
88
|
-
role: "menuitem"
|
|
89
|
-
};
|
|
90
|
-
},
|
|
91
|
-
disabled: itemState?.disabled ?? false,
|
|
92
|
-
// focusVisible,
|
|
93
|
-
ref: handleRef
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
const _default = useMenuItem;
|
package/Meta/Meta.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
Meta: function() {
|
|
13
|
-
return Meta;
|
|
14
|
-
},
|
|
15
|
-
default: function() {
|
|
16
|
-
return _default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
20
|
-
const Meta = ({ zoom })=>{
|
|
21
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)("meta", {
|
|
22
|
-
name: "viewport",
|
|
23
|
-
content: `width=device-width, initial-scale=1, maximum-scale=1${zoom ? "" : ", user-scalable=0"}`
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
const _default = Meta;
|
package/Meta/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "default", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return _Meta.Meta;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _export_star = require("@swc/helpers/_/_export_star");
|
|
12
|
-
const _Meta = _export_star._(require("./Meta"), exports);
|
package/NoJs/NoJs.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
NoJs: function() {
|
|
13
|
-
return NoJs;
|
|
14
|
-
},
|
|
15
|
-
default: function() {
|
|
16
|
-
return _default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
20
|
-
const NoJs = (_props)=>{
|
|
21
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)("script", {
|
|
22
|
-
id: "no-js",
|
|
23
|
-
dangerouslySetInnerHTML: {
|
|
24
|
-
__html: `document.querySelector("html").className=document.querySelector("html").className.replace(/no-js/,"") + "js";`
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
const _default = NoJs;
|
package/NoJs/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "default", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return _NoJs.NoJs;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _export_star = require("@swc/helpers/_/_export_star");
|
|
12
|
-
const _NoJs = _export_star._(require("./NoJs"), exports);
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "KoinePaginationNav", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return KoinePaginationNav;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
13
|
-
const _cg = require("react-icons/cg");
|
|
14
|
-
const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
15
|
-
const _ensureInt = /*#__PURE__*/ _interop_require_default._(require("@koine/utils/ensureInt"));
|
|
16
|
-
const Root = _styledcomponents.default.nav`
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
padding: 20px 0 40px;
|
|
21
|
-
font-weight: 600;
|
|
22
|
-
|
|
23
|
-
& a {
|
|
24
|
-
text-decoration: none;
|
|
25
|
-
}
|
|
26
|
-
`;
|
|
27
|
-
const item = `
|
|
28
|
-
display: block;
|
|
29
|
-
padding: 5px 10px;
|
|
30
|
-
`;
|
|
31
|
-
const ItemCurrent = _styledcomponents.default.span`
|
|
32
|
-
${item}
|
|
33
|
-
background: var(--accent400);
|
|
34
|
-
border-radius: 2px;
|
|
35
|
-
`;
|
|
36
|
-
const ItemLink = _styledcomponents.default.a`
|
|
37
|
-
${item}
|
|
38
|
-
|
|
39
|
-
${(props)=>props.prev ? "color: var(--grey100);" : ""}
|
|
40
|
-
`;
|
|
41
|
-
const DotsSeparator = _styledcomponents.default.span`
|
|
42
|
-
color: var(--grey100);
|
|
43
|
-
`;
|
|
44
|
-
const arrow = `display: flex; font-size: 20px;`;
|
|
45
|
-
const ItemPrev = _styledcomponents.default.a`
|
|
46
|
-
${arrow}
|
|
47
|
-
`;
|
|
48
|
-
const ItemNext = _styledcomponents.default.a`
|
|
49
|
-
${arrow}
|
|
50
|
-
`;
|
|
51
|
-
const KoinePaginationNav = ({ total, perPage, currentPage: _currentPage, baseUrl, showOffset = 2, currentUrl = "/", Link = "a" })=>{
|
|
52
|
-
let currentPage = (0, _ensureInt.default)(_currentPage);
|
|
53
|
-
total = (0, _ensureInt.default)(total);
|
|
54
|
-
perPage = (0, _ensureInt.default)(perPage);
|
|
55
|
-
// page 0 means 1
|
|
56
|
-
currentPage = currentPage || 1;
|
|
57
|
-
baseUrl = baseUrl || currentUrl;
|
|
58
|
-
// don't output anything if pagination is not needed
|
|
59
|
-
if (total < perPage) {
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
const firstPage = 1;
|
|
63
|
-
const lastPage = Math.ceil(total / perPage);
|
|
64
|
-
const prevPage = currentPage - 1 > firstPage ? currentPage - 1 : "";
|
|
65
|
-
const nextPage = currentPage + 1 < lastPage ? currentPage + 1 : lastPage;
|
|
66
|
-
const prevArrow = currentPage > firstPage;
|
|
67
|
-
const nextArrow = currentPage < lastPage;
|
|
68
|
-
const pages = [];
|
|
69
|
-
// fill the pages before the current
|
|
70
|
-
for(let i = currentPage - showOffset; i < currentPage; i++){
|
|
71
|
-
if (i > 1) {
|
|
72
|
-
pages.push(i);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
// add the current
|
|
76
|
-
pages.push(currentPage);
|
|
77
|
-
// fill the pages after the current
|
|
78
|
-
for(let i = currentPage + 1; i < currentPage + 1 + showOffset; i++){
|
|
79
|
-
if (i < lastPage) {
|
|
80
|
-
pages.push(i);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
const prevDots = pages[0] > firstPage + 1;
|
|
84
|
-
const nextDots = pages[pages.length - 1] < lastPage - 1;
|
|
85
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(Root, {
|
|
86
|
-
children: [
|
|
87
|
-
prevArrow && /*#__PURE__*/ (0, _jsxruntime.jsx)(ItemPrev, {
|
|
88
|
-
as: Link,
|
|
89
|
-
href: `${baseUrl}/${prevPage}`,
|
|
90
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_cg.CgArrowLeftR, {})
|
|
91
|
-
}),
|
|
92
|
-
firstPage !== currentPage && /*#__PURE__*/ (0, _jsxruntime.jsx)(ItemLink, {
|
|
93
|
-
as: Link,
|
|
94
|
-
href: `${baseUrl}`,
|
|
95
|
-
prev: true,
|
|
96
|
-
children: firstPage
|
|
97
|
-
}),
|
|
98
|
-
prevDots && /*#__PURE__*/ (0, _jsxruntime.jsx)(DotsSeparator, {
|
|
99
|
-
children: "..."
|
|
100
|
-
}),
|
|
101
|
-
pages.map((page)=>page === currentPage ? /*#__PURE__*/ (0, _jsxruntime.jsx)(ItemCurrent, {
|
|
102
|
-
children: page
|
|
103
|
-
}, page) : /*#__PURE__*/ (0, _jsxruntime.jsx)(ItemLink, {
|
|
104
|
-
as: Link,
|
|
105
|
-
href: `${baseUrl}/${page}`,
|
|
106
|
-
prev: page < currentPage,
|
|
107
|
-
next: page > currentPage,
|
|
108
|
-
children: page
|
|
109
|
-
}, `pagination-${page}`)),
|
|
110
|
-
nextDots && /*#__PURE__*/ (0, _jsxruntime.jsx)(DotsSeparator, {
|
|
111
|
-
children: "..."
|
|
112
|
-
}),
|
|
113
|
-
lastPage !== currentPage && /*#__PURE__*/ (0, _jsxruntime.jsx)(ItemLink, {
|
|
114
|
-
as: Link,
|
|
115
|
-
href: `${baseUrl}/${lastPage}`,
|
|
116
|
-
next: true,
|
|
117
|
-
children: lastPage
|
|
118
|
-
}),
|
|
119
|
-
nextArrow && /*#__PURE__*/ (0, _jsxruntime.jsx)(ItemNext, {
|
|
120
|
-
as: Link,
|
|
121
|
-
href: `${baseUrl}/${nextPage}`,
|
|
122
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_cg.CgArrowRightR, {})
|
|
123
|
-
})
|
|
124
|
-
]
|
|
125
|
-
});
|
|
126
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "PaginationResults", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return PaginationResults;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
13
|
-
const _framermotion = require("framer-motion");
|
|
14
|
-
const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
15
|
-
const Root = _styledcomponents.default.div`
|
|
16
|
-
// overflow: hidden;
|
|
17
|
-
`;
|
|
18
|
-
const Inner = (0, _styledcomponents.default)(_framermotion.m.div)``;
|
|
19
|
-
const PaginationResults = ({ children })=>{
|
|
20
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_framermotion.AnimatePresence, {
|
|
21
|
-
exitBeforeEnter: true,
|
|
22
|
-
initial: true,
|
|
23
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Root, {
|
|
24
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Inner, {
|
|
25
|
-
initial: {
|
|
26
|
-
opacity: 0,
|
|
27
|
-
x: -100
|
|
28
|
-
},
|
|
29
|
-
animate: {
|
|
30
|
-
opacity: 1,
|
|
31
|
-
x: 0
|
|
32
|
-
},
|
|
33
|
-
exit: {
|
|
34
|
-
opacity: 0,
|
|
35
|
-
x: 100
|
|
36
|
-
},
|
|
37
|
-
transition: {
|
|
38
|
-
type: "linear",
|
|
39
|
-
staggerChildren: 0.3
|
|
40
|
-
},
|
|
41
|
-
children: children
|
|
42
|
-
})
|
|
43
|
-
})
|
|
44
|
-
});
|
|
45
|
-
};
|
package/Pagination/index.js
DELETED
package/Pill/Pill.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
Pill: function() {
|
|
13
|
-
return Pill;
|
|
14
|
-
},
|
|
15
|
-
PillGreyLight: function() {
|
|
16
|
-
return PillGreyLight;
|
|
17
|
-
},
|
|
18
|
-
PillAccentLight: function() {
|
|
19
|
-
return PillAccentLight;
|
|
20
|
-
},
|
|
21
|
-
PillAccentLightOutlined: function() {
|
|
22
|
-
return PillAccentLightOutlined;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
26
|
-
const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
27
|
-
const Pill = _styledcomponents.default.div`
|
|
28
|
-
display: inline-block;
|
|
29
|
-
padding: 5px 10px;
|
|
30
|
-
margin: 0 0.5em 0.5em 0;
|
|
31
|
-
border-radius: 2px;
|
|
32
|
-
text-decoration: none;
|
|
33
|
-
font-size: 13px;
|
|
34
|
-
font-weight: 600;
|
|
35
|
-
`;
|
|
36
|
-
const PillGreyLight = (0, _styledcomponents.default)(Pill)`
|
|
37
|
-
background: var(--grey800);
|
|
38
|
-
color: var(--grey100);
|
|
39
|
-
|
|
40
|
-
&:hover {
|
|
41
|
-
color: white;
|
|
42
|
-
background: var(--grey300);
|
|
43
|
-
}
|
|
44
|
-
`;
|
|
45
|
-
const PillAccentLight = (0, _styledcomponents.default)(Pill)`
|
|
46
|
-
background: var(--accent400);
|
|
47
|
-
color: var(--grey100);
|
|
48
|
-
|
|
49
|
-
&:hover {
|
|
50
|
-
color: #fff;
|
|
51
|
-
background: var(--accent300);
|
|
52
|
-
}
|
|
53
|
-
`;
|
|
54
|
-
const PillAccentLightOutlined = (0, _styledcomponents.default)(Pill)`
|
|
55
|
-
border: 1px solid var(--accent300);
|
|
56
|
-
color: var(--accent200);
|
|
57
|
-
|
|
58
|
-
&:hover {
|
|
59
|
-
color: #fff;
|
|
60
|
-
background: var(--accent300);
|
|
61
|
-
}
|
|
62
|
-
`;
|
package/Pill/index.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "ProgressCircular", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return ProgressCircular;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
13
|
-
const _styledcomponents = /*#__PURE__*/ _interop_require_wildcard._(require("styled-components"));
|
|
14
|
-
const animationRotation = (0, _styledcomponents.keyframes)`
|
|
15
|
-
0% {
|
|
16
|
-
transform: rotate(0deg);
|
|
17
|
-
}
|
|
18
|
-
100% {
|
|
19
|
-
transform: rotate(360deg);
|
|
20
|
-
}
|
|
21
|
-
`;
|
|
22
|
-
const animationCircle = (0, _styledcomponents.keyframes)`
|
|
23
|
-
0% {
|
|
24
|
-
stroke-dasharray: 1px, 200px;
|
|
25
|
-
stroke-dashoffset: 0;
|
|
26
|
-
}
|
|
27
|
-
50% {
|
|
28
|
-
stroke-dasharray: 100px, 200px;
|
|
29
|
-
stroke-dashoffset: -15px;
|
|
30
|
-
}
|
|
31
|
-
100% {
|
|
32
|
-
stroke-dasharray: 100px, 200px;
|
|
33
|
-
stroke-dashoffset: -125px;
|
|
34
|
-
}
|
|
35
|
-
`;
|
|
36
|
-
const ProgressCircularSvg = _styledcomponents.default.svg`
|
|
37
|
-
animation: ${animationRotation} 1.5s linear infinite;
|
|
38
|
-
`;
|
|
39
|
-
const ProgressCircularCircle = _styledcomponents.default.circle`
|
|
40
|
-
animation: ${animationCircle} 1.5s linear infinite;
|
|
41
|
-
`;
|
|
42
|
-
const ProgressCircular = ({ size = "1em", thickness = 1, color = "currentColor", ...props })=>{
|
|
43
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(ProgressCircularSvg, {
|
|
44
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
45
|
-
viewBox: "0 0 44 44",
|
|
46
|
-
style: {
|
|
47
|
-
width: size,
|
|
48
|
-
height: size
|
|
49
|
-
},
|
|
50
|
-
...props,
|
|
51
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(ProgressCircularCircle, {
|
|
52
|
-
cx: "22",
|
|
53
|
-
cy: "22",
|
|
54
|
-
r: "20",
|
|
55
|
-
fill: "none",
|
|
56
|
-
strokeWidth: thickness,
|
|
57
|
-
style: {
|
|
58
|
-
stroke: color
|
|
59
|
-
}
|
|
60
|
-
})
|
|
61
|
-
});
|
|
62
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "ProgressLinear", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return ProgressLinear;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
13
|
-
const _framermotion = require("framer-motion");
|
|
14
|
-
const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
15
|
-
const ProgressLinearBg = _styledcomponents.default.span`
|
|
16
|
-
position: relative;
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
display: block;
|
|
19
|
-
height: 4px;
|
|
20
|
-
`;
|
|
21
|
-
const ProgressLinearFg = (0, _styledcomponents.default)(_framermotion.m.span)`
|
|
22
|
-
position: absolute;
|
|
23
|
-
top: 0;
|
|
24
|
-
bottom: 0;
|
|
25
|
-
left: 0;
|
|
26
|
-
width: 100%;
|
|
27
|
-
`;
|
|
28
|
-
const ProgressLinear = ({ done = false, height = "2px", bg = "transparent", fg = "currentColor", ...props })=>{
|
|
29
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(ProgressLinearBg, {
|
|
30
|
-
style: {
|
|
31
|
-
height,
|
|
32
|
-
background: bg
|
|
33
|
-
},
|
|
34
|
-
...props,
|
|
35
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(ProgressLinearFg, {
|
|
36
|
-
style: {
|
|
37
|
-
height,
|
|
38
|
-
background: fg
|
|
39
|
-
},
|
|
40
|
-
initial: {
|
|
41
|
-
x: "-100%"
|
|
42
|
-
},
|
|
43
|
-
animate: {
|
|
44
|
-
x: done ? "-100%" : "0%"
|
|
45
|
-
},
|
|
46
|
-
transition: done ? {} : {
|
|
47
|
-
repeat: Infinity,
|
|
48
|
-
repeatType: "reverse",
|
|
49
|
-
duration: 2
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
});
|
|
53
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "ProgressOverlay", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return ProgressOverlay;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
13
|
-
const _framermotion = require("framer-motion");
|
|
14
|
-
const _react = require("react");
|
|
15
|
-
const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
16
|
-
const _Header = require("../Header");
|
|
17
|
-
const _ProgressCircular = require("./ProgressCircular");
|
|
18
|
-
const _ProgressLinear = require("./ProgressLinear");
|
|
19
|
-
const ProgressOverlayWrap = (0, _styledcomponents.default)(_framermotion.m.div)`
|
|
20
|
-
z-index: 10000;
|
|
21
|
-
position: fixed;
|
|
22
|
-
top: 0;
|
|
23
|
-
left: 0;
|
|
24
|
-
right: 0;
|
|
25
|
-
bottom: 0;
|
|
26
|
-
pointer-events: none;
|
|
27
|
-
cursor: wait;
|
|
28
|
-
`;
|
|
29
|
-
const ProgressOverlayCenterer = _styledcomponents.default.div`
|
|
30
|
-
position: absolute;
|
|
31
|
-
top: 0;
|
|
32
|
-
left: 0;
|
|
33
|
-
right: 0;
|
|
34
|
-
bottom: 0;
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
justify-content: center;
|
|
38
|
-
background: var(--progress-overlay-bg);
|
|
39
|
-
`;
|
|
40
|
-
const ProgressOverlay = ({ running })=>{
|
|
41
|
-
const [, , headerHeight] = (0, _Header.useHeader)();
|
|
42
|
-
// const [progress, setProgress] = useState(0);
|
|
43
|
-
(0, _react.useEffect)(()=>{
|
|
44
|
-
document.body.style.cursor = running ? "wait" : "";
|
|
45
|
-
}, [
|
|
46
|
-
running
|
|
47
|
-
]);
|
|
48
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(ProgressOverlayWrap, {
|
|
49
|
-
animate: {
|
|
50
|
-
opacity: running ? 1 : 0
|
|
51
|
-
},
|
|
52
|
-
initial: {
|
|
53
|
-
opacity: 0
|
|
54
|
-
},
|
|
55
|
-
transition: {
|
|
56
|
-
type: "easeInOut"
|
|
57
|
-
},
|
|
58
|
-
children: [
|
|
59
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_ProgressLinear.ProgressLinear, {
|
|
60
|
-
bg: "var(--accent400)",
|
|
61
|
-
fg: "var(--accent300)",
|
|
62
|
-
done: !running
|
|
63
|
-
}),
|
|
64
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(ProgressOverlayCenterer, {
|
|
65
|
-
style: {
|
|
66
|
-
top: headerHeight + "px"
|
|
67
|
-
},
|
|
68
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_ProgressCircular.ProgressCircular, {
|
|
69
|
-
size: "50px",
|
|
70
|
-
color: "var(--accent300)"
|
|
71
|
-
})
|
|
72
|
-
})
|
|
73
|
-
]
|
|
74
|
-
});
|
|
75
|
-
};
|
package/Progress/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
-
_export_star._(require("./ProgressCircular"), exports);
|
|
7
|
-
_export_star._(require("./ProgressLinear"), exports);
|
|
8
|
-
_export_star._(require("./ProgressOverlay"), exports);
|