@koine/react 1.0.11 → 1.0.14
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/Alert/Alert.js +7 -13
- package/Animations/Reveal.js +12 -10
- package/Animations/Underline.js +3 -13
- package/Animations/useReveal.js +18 -17
- package/Autocomplete/AutocompleteDownshift.js +1 -1
- package/Autocomplete/AutocompleteDownshiftMultiselect.js +1 -1
- package/Autocomplete/AutocompleteMui.js +61 -56
- package/Autocomplete/AutocompleteReach.js +1 -1
- package/Autocomplete/components.js +17 -72
- package/Autocomplete/helpers.js +1 -1
- package/Bg/BgColor.js +14 -24
- package/Bg/BgPhoto.js +11 -54
- package/Bg/BgSvg.js +6 -9
- package/Breadcrumbs/Breadcrumbs.js +14 -54
- package/Buttons/Button.js +8 -73
- package/Buttons/ButtonComposite.js +20 -41
- package/Buttons/ButtonFab.js +4 -6
- package/Buttons/ButtonLink.js +7 -6
- package/Buttons/IconButton.js +5 -17
- package/Calendar/CalendarDaygridCell.js +20 -14
- package/Calendar/CalendarDaygridNav.js +10 -9
- package/Calendar/CalendarDaygridTable.js +32 -30
- package/Calendar/CalendarLegend.js +7 -2
- package/Calendar/calendar-api-google.js +101 -68
- package/Calendar/useCalendar.js +114 -113
- package/Calendar/utils.js +73 -74
- package/Carousel/Carousel.js +1 -1
- package/Carousel/CarouselCss.js +12 -26
- package/Collapsable/Collapsable.js +1 -1
- package/Debug/Debug.js +5 -17
- package/Details/Details.js +30 -27
- package/Dialog/DialogMui.js +22 -20
- package/Dialog/css/bare.js +17 -15
- package/Dialog/m/bare.js +17 -13
- package/Dialog/m/basic.js +2 -2
- package/Dialog/m/index.js +4 -4
- package/Dialog/sc/bare.js +25 -43
- package/Dialog/sc/framer.js +6 -6
- package/Dialog/sc/framerMaterial.js +6 -6
- package/Dialog/sc/material.js +17 -37
- package/Dialog/tw/bare.js +25 -19
- package/Dialog/tw/elegant.js +17 -15
- package/Dialog/tw/framer.js +6 -6
- package/Dialog/tw/framerMaterial.js +6 -6
- package/Dialog/tw/material.js +17 -15
- package/Editor/Editor--tiptap.js +14 -11
- package/Editor/components.js +6 -24
- package/Favicon/FaviconTags.js +2 -1
- package/Form/Form.js +30 -28
- package/Form/sc/bare.js +9 -18
- package/Forms/Checkbox/Checkbox.js +9 -15
- package/Forms/Feedback/Feedback.js +6 -7
- package/Forms/Field/Field.js +15 -26
- package/Forms/Field/FieldControl.js +19 -15
- package/Forms/Field/FieldHint.js +3 -5
- package/Forms/Input/Input.js +10 -16
- package/Forms/InputGroup/InputGroup.js +9 -36
- package/Forms/Label/Label.js +5 -23
- package/Forms/Password/Password.js +10 -23
- package/Forms/Radio/Radio.js +15 -18
- package/Forms/Switch/Switch.js +9 -39
- package/Forms/Textarea/Textarea.js +6 -7
- package/Forms/Textarea/TextareaRich.js +10 -24
- package/Forms/Toggle/Toggle.js +19 -67
- package/Forms/Toggle/useToggle.d.ts +1 -1
- package/Forms/Toggle/useToggle.js +30 -30
- package/Forms/antispam.js +12 -12
- package/Forms/helpers.js +7 -6
- package/Forms/styles.js +12 -43
- package/Gauge/Gauge.js +1 -1
- package/Grid/Grid.js +25 -51
- package/Hamburger/Hamburger.js +35 -47
- package/Header/useHeader.js +12 -12
- package/Hidden/Hidden.js +9 -13
- package/Img/sc/bare.js +3 -1
- package/Link/Link.js +3 -1
- package/Link/LinkBlank.js +8 -17
- package/Menu/Menu.js +3 -10
- package/MenuItem/MenuItem.js +3 -19
- package/Meta/Meta.js +3 -2
- package/NoJs/NoJs.js +2 -2
- package/Pagination/PaginationNav.js +26 -48
- package/Pagination/PaginationResults.js +7 -6
- package/Pill/Pill.js +6 -36
- package/Progress/ProgressCircular.js +9 -30
- package/Progress/ProgressLinear.js +8 -16
- package/Progress/ProgressOverlay.js +11 -27
- package/Rating/Rating.js +24 -44
- package/Rating/index.js +19 -15
- package/Select/SelectDownshift.js +1 -1
- package/Select/components.js +6 -12
- package/Sidebar/Sidebar.js +13 -38
- package/Spacing/Spacing.js +12 -12
- package/Sticky/Sticky.js +1 -1
- package/Sticky/StickyCss.js +4 -2
- package/Tabs/TabsMui.js +19 -16
- package/Tabs/tw/bare.js +13 -11
- package/Tabs/tw/material.js +15 -11
- package/Tabs/useTabs.js +16 -16
- package/Typography/CopyPasteVisible.js +3 -5
- package/Typography/Native.js +12 -45
- package/Typography/ReadMore.js +25 -51
- package/Typography/TextLoop.js +19 -22
- package/Typography/TypeStairs.js +20 -16
- package/helpers/classed.js +21 -18
- package/helpers/extend-component.js +6 -6
- package/hooks/useAsyncFn.js +18 -11
- package/hooks/useDateLocale.js +22 -13
- package/hooks/useEffectOnce.js +1 -1
- package/hooks/useFirstMountState.js +1 -1
- package/hooks/useFocus.js +3 -3
- package/hooks/useId.js +3 -2
- package/hooks/useIsomorphicLayoutEffect.js +1 -1
- package/hooks/useMount.js +2 -2
- package/hooks/useMountedState.js +4 -4
- package/hooks/usePrevious.js +2 -2
- package/hooks/useScrollPosition.js +20 -15
- package/hooks/useScrollTo.js +7 -5
- package/hooks/useTraceUpdate.js +4 -3
- package/hooks/useUpdateEffect.js +3 -3
- package/hooks/useWindowSize.js +3 -3
- package/m/MotionProvider.js +4 -2
- package/package.json +8 -7
- package/styles/Body.js +4 -8
- package/styles/Global.js +4 -36
- package/styles/media.js +41 -36
- package/styles/spacing.js +15 -16
- package/styles/styled.js +7 -21
- package/styles/theme--vanilla.js +20 -18
- package/styles/theme.js +11 -11
- package/node/Alert/Alert.js +0 -21
- package/node/Alert/index.js +0 -4
- package/node/Animations/Reveal.js +0 -19
- package/node/Animations/Underline.js +0 -19
- package/node/Animations/index.js +0 -6
- package/node/Animations/useReveal.js +0 -74
- package/node/Autocomplete/AutocompleteDownshift.js +0 -161
- package/node/Autocomplete/AutocompleteDownshiftMultiselect.js +0 -356
- package/node/Autocomplete/AutocompleteMui.js +0 -175
- package/node/Autocomplete/AutocompleteReach.js +0 -115
- package/node/Autocomplete/components.js +0 -93
- package/node/Autocomplete/helpers.js +0 -32
- package/node/Autocomplete/index.js +0 -7
- package/node/Bg/BgColor.js +0 -36
- package/node/Bg/BgPhoto.js +0 -64
- package/node/Bg/BgSvg.js +0 -20
- package/node/Bg/index.js +0 -6
- package/node/Breadcrumbs/Breadcrumbs.js +0 -72
- package/node/Breadcrumbs/index.js +0 -4
- package/node/Buttons/Button.js +0 -83
- package/node/Buttons/ButtonComposite.js +0 -54
- package/node/Buttons/ButtonFab.js +0 -12
- package/node/Buttons/ButtonLink.js +0 -15
- package/node/Buttons/IconButton.js +0 -23
- package/node/Buttons/index.js +0 -8
- package/node/Calendar/CalendarDaygridCell.js +0 -55
- package/node/Calendar/CalendarDaygridNav.js +0 -27
- package/node/Calendar/CalendarDaygridTable.js +0 -60
- package/node/Calendar/CalendarLegend.js +0 -15
- package/node/Calendar/calendar-api-google.js +0 -99
- package/node/Calendar/index.js +0 -9
- package/node/Calendar/types.js +0 -2
- package/node/Calendar/useCalendar.js +0 -186
- package/node/Calendar/utils.js +0 -217
- package/node/Carousel/Carousel.js +0 -381
- package/node/Carousel/CarouselCss.js +0 -42
- package/node/Carousel/index.js +0 -4
- package/node/Collapsable/Collapsable.js +0 -4
- package/node/Collapsable/CollapsableReach.js +0 -253
- package/node/Collapsable/index.js +0 -5
- package/node/Debug/Debug.js +0 -26
- package/node/Debug/index.js +0 -4
- package/node/Details/Details.js +0 -65
- package/node/Details/index.js +0 -4
- package/node/Dialog/DialogMui.js +0 -82
- package/node/Dialog/css/bare.js +0 -23
- package/node/Dialog/index.js +0 -5
- package/node/Dialog/m/bare.js +0 -51
- package/node/Dialog/m/basic.js +0 -35
- package/node/Dialog/m/index.js +0 -8
- package/node/Dialog/sc/bare.js +0 -65
- package/node/Dialog/sc/framer.js +0 -19
- package/node/Dialog/sc/framerMaterial.js +0 -19
- package/node/Dialog/sc/material.js +0 -45
- package/node/Dialog/tw/bare.js +0 -40
- package/node/Dialog/tw/elegant.js +0 -21
- package/node/Dialog/tw/framer.js +0 -19
- package/node/Dialog/tw/framerMaterial.js +0 -19
- package/node/Dialog/tw/material.js +0 -21
- package/node/Editor/Editor--tiptap.js +0 -29
- package/node/Editor/components.js +0 -34
- package/node/Editor/index.js +0 -4
- package/node/Favicon/FaviconTags.js +0 -18
- package/node/Favicon/index.js +0 -4
- package/node/Form/Form.js +0 -63
- package/node/Form/index.js +0 -4
- package/node/Form/sc/bare.js +0 -33
- package/node/Forms/Checkbox/Checkbox.js +0 -28
- package/node/Forms/Checkbox/index.js +0 -4
- package/node/Forms/Feedback/Feedback.js +0 -15
- package/node/Forms/Feedback/index.js +0 -4
- package/node/Forms/Field/Field.js +0 -64
- package/node/Forms/Field/FieldControl.js +0 -47
- package/node/Forms/Field/FieldHint.js +0 -10
- package/node/Forms/Field/index.js +0 -5
- package/node/Forms/Input/Input.js +0 -27
- package/node/Forms/Input/index.js +0 -4
- package/node/Forms/InputGroup/InputGroup.js +0 -47
- package/node/Forms/InputGroup/index.js +0 -4
- package/node/Forms/Label/Label.js +0 -28
- package/node/Forms/Label/index.js +0 -4
- package/node/Forms/Password/Password.js +0 -34
- package/node/Forms/Password/index.js +0 -4
- package/node/Forms/Radio/Radio.js +0 -32
- package/node/Forms/Radio/index.js +0 -4
- package/node/Forms/Switch/Switch.js +0 -54
- package/node/Forms/Switch/index.js +0 -4
- package/node/Forms/Textarea/Textarea.js +0 -17
- package/node/Forms/Textarea/TextareaRich.js +0 -46
- package/node/Forms/Textarea/index.js +0 -5
- package/node/Forms/Toggle/Toggle.js +0 -86
- package/node/Forms/Toggle/index.js +0 -4
- package/node/Forms/Toggle/useToggle.js +0 -149
- package/node/Forms/antispam.js +0 -61
- package/node/Forms/helpers.js +0 -51
- package/node/Forms/index.js +0 -19
- package/node/Forms/styles.js +0 -64
- package/node/Gauge/Gauge.js +0 -106
- package/node/Grid/Grid.js +0 -83
- package/node/Grid/index.js +0 -4
- package/node/Hamburger/Hamburger.js +0 -69
- package/node/Hamburger/index.js +0 -4
- package/node/Header/index.js +0 -4
- package/node/Header/useHeader.js +0 -34
- package/node/Hidden/Hidden.js +0 -18
- package/node/Hidden/index.js +0 -4
- package/node/Img/index.js +0 -4
- package/node/Img/sc/bare.js +0 -41
- package/node/Img/types.js +0 -2
- package/node/Link/Link.js +0 -6
- package/node/Link/LinkBlank.js +0 -31
- package/node/Link/index.js +0 -5
- package/node/Menu/Menu.js +0 -15
- package/node/Menu/index.js +0 -4
- package/node/MenuItem/MenuItem.js +0 -24
- package/node/MenuItem/index.js +0 -4
- package/node/Meta/Meta.js +0 -8
- package/node/Meta/index.js +0 -4
- package/node/NoJs/NoJs.js +0 -10
- package/node/NoJs/index.js +0 -4
- package/node/Pagination/PaginationNav.js +0 -88
- package/node/Pagination/PaginationResults.js +0 -15
- package/node/Pagination/index.js +0 -5
- package/node/Pill/Pill.js +0 -41
- package/node/Pill/index.js +0 -4
- package/node/Progress/ProgressCircular.js +0 -41
- package/node/Progress/ProgressLinear.js +0 -37
- package/node/Progress/ProgressOverlay.js +0 -45
- package/node/Progress/index.js +0 -6
- package/node/Rating/Rating.js +0 -97
- package/node/Rating/index.js +0 -53
- package/node/Select/SelectDownshift.js +0 -41
- package/node/Select/components.js +0 -22
- package/node/Select/index.js +0 -7
- package/node/Sidebar/Sidebar.js +0 -53
- package/node/Sidebar/index.js +0 -4
- package/node/Spacing/Spacing.js +0 -50
- package/node/Spacing/index.js +0 -4
- package/node/Sticky/Sticky.js +0 -222
- package/node/Sticky/StickyCss.js +0 -8
- package/node/Sticky/index.js +0 -4
- package/node/Tabs/TabsMui.js +0 -47
- package/node/Tabs/index.js +0 -4
- package/node/Tabs/sc/bare.js +0 -87
- package/node/Tabs/tw/bare.js +0 -19
- package/node/Tabs/tw/material.js +0 -17
- package/node/Tabs/useTabs.js +0 -48
- package/node/Typography/CopyPasteVisible.js +0 -10
- package/node/Typography/Native.js +0 -51
- package/node/Typography/ReadMore.js +0 -74
- package/node/Typography/TextLoop.js +0 -54
- package/node/Typography/TypeStairs.js +0 -49
- package/node/Typography/index.js +0 -8
- package/node/css/index.js +0 -36
- package/node/helpers/classed.js +0 -69
- package/node/helpers/extend-component.js +0 -16
- package/node/helpers/index.js +0 -5
- package/node/hooks/index.js +0 -18
- package/node/hooks/types.js +0 -2
- package/node/hooks/useAsyncFn.js +0 -33
- package/node/hooks/useDateLocale.js +0 -56
- package/node/hooks/useEffectOnce.js +0 -12
- package/node/hooks/useFirstMountState.js +0 -16
- package/node/hooks/useFocus.js +0 -15
- package/node/hooks/useId.js +0 -11
- package/node/hooks/useIsomorphicLayoutEffect.js +0 -11
- package/node/hooks/useMount.js +0 -13
- package/node/hooks/useMountedState.js +0 -19
- package/node/hooks/usePrevious.js +0 -12
- package/node/hooks/useScrollPosition.js +0 -79
- package/node/hooks/useScrollTo.js +0 -23
- package/node/hooks/useTraceUpdate.js +0 -24
- package/node/hooks/useUpdateEffect.js +0 -18
- package/node/hooks/useWindowSize.js +0 -17
- package/node/index.js +0 -8
- package/node/m/MotionProvider.js +0 -41
- package/node/m/index.js +0 -9
- package/node/m/lite.js +0 -4
- package/node/m/max.js +0 -4
- package/node/sc/index.js +0 -37
- package/node/scm/index.js +0 -36
- package/node/shared/index.js +0 -11
- package/node/styles/Body.js +0 -21
- package/node/styles/Global.js +0 -53
- package/node/styles/index.js +0 -10
- package/node/styles/media.js +0 -156
- package/node/styles/spacing.js +0 -53
- package/node/styles/styled.js +0 -31
- package/node/styles/theme--vanilla.js +0 -59
- package/node/styles/theme.js +0 -45
- package/node/tw/index.js +0 -36
- package/node/twm/index.js +0 -36
- package/node/types.js +0 -2
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.useDateLocale = void 0;
|
|
27
|
-
const react_1 = require("react");
|
|
28
|
-
/**
|
|
29
|
-
* Dynamically import the date-fns correct locale
|
|
30
|
-
*
|
|
31
|
-
* Inspired by:
|
|
32
|
-
* @see https://robertmarshall.dev/blog/dynamically-import-datefns-locale-mui-datepicker-localization/
|
|
33
|
-
*/
|
|
34
|
-
function useDateLocale(locale, defaultLocale = "en") {
|
|
35
|
-
const [data, setData] = (0, react_1.useState)();
|
|
36
|
-
const [current, setCurrent] = (0, react_1.useState)(defaultLocale);
|
|
37
|
-
// const [ready, setReady] = useState(false);
|
|
38
|
-
// If the user changes the locale listen to the change and import the locale that is now required.
|
|
39
|
-
(0, react_1.useEffect)(() => {
|
|
40
|
-
const importLocaleFile = async () => {
|
|
41
|
-
// This webpack option stops all of the date-fns files being imported and chunked.
|
|
42
|
-
const localeToSet = await Promise.resolve().then(() => __importStar(require(
|
|
43
|
-
/* webpackMode: "lazy", webpackChunkName: "df-[index]", webpackExclude: /_lib/ */
|
|
44
|
-
`date-fns/locale/${locale}/index.js`)));
|
|
45
|
-
setCurrent(locale || current);
|
|
46
|
-
setData(localeToSet.default);
|
|
47
|
-
// setReady(true);
|
|
48
|
-
};
|
|
49
|
-
// If the locale has not yet been loaded.
|
|
50
|
-
if (locale !== current) {
|
|
51
|
-
importLocaleFile();
|
|
52
|
-
}
|
|
53
|
-
}, [locale, current]);
|
|
54
|
-
return data;
|
|
55
|
-
}
|
|
56
|
-
exports.useDateLocale = useDateLocale;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useEffectOnce = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
/**
|
|
6
|
-
* @borrows [streamich/react-use](https://github.com/streamich/react-use/blob/master/src/useEffectOnce.ts)
|
|
7
|
-
*/
|
|
8
|
-
const useEffectOnce = (effect) => {
|
|
9
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
10
|
-
(0, react_1.useEffect)(effect, []);
|
|
11
|
-
};
|
|
12
|
-
exports.useEffectOnce = useEffectOnce;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useFirstMountState = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
/**
|
|
6
|
-
* @borrows [streamich/react-use](https://github.com/streamich/react-use/blob/master/src/useFirstMountState.ts)
|
|
7
|
-
*/
|
|
8
|
-
function useFirstMountState() {
|
|
9
|
-
const isFirst = (0, react_1.useRef)(true);
|
|
10
|
-
if (isFirst.current) {
|
|
11
|
-
isFirst.current = false;
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
return isFirst.current;
|
|
15
|
-
}
|
|
16
|
-
exports.useFirstMountState = useFirstMountState;
|
package/node/hooks/useFocus.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useFocus = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
/**
|
|
6
|
-
* @see https://stackoverflow.com/a/54159564/1938970
|
|
7
|
-
*/
|
|
8
|
-
const useFocus = () => {
|
|
9
|
-
const element = (0, react_1.useRef)(null);
|
|
10
|
-
const setFocus = () => {
|
|
11
|
-
element.current && element.current.focus();
|
|
12
|
-
};
|
|
13
|
-
return [element, setFocus];
|
|
14
|
-
};
|
|
15
|
-
exports.useFocus = useFocus;
|
package/node/hooks/useId.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useId = void 0;
|
|
4
|
-
const utils_1 = require("@koine/utils");
|
|
5
|
-
/**
|
|
6
|
-
* FIXME: once we can move to react 18 just replace this import with `{ useId } from "react";`
|
|
7
|
-
*/
|
|
8
|
-
function useId(prefix = "uid") {
|
|
9
|
-
return `${prefix}-${(0, utils_1.uid)()}`;
|
|
10
|
-
}
|
|
11
|
-
exports.useId = useId;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useIsomorphicLayoutEffect = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const utils_1 = require("@koine/utils");
|
|
6
|
-
/**
|
|
7
|
-
* @borrows [streamich/react-use](https://github.com/streamich/react-use/blob/master/src/useFirstMountState.ts)
|
|
8
|
-
*/
|
|
9
|
-
exports.useIsomorphicLayoutEffect = utils_1.isBrowser
|
|
10
|
-
? react_1.useLayoutEffect
|
|
11
|
-
: react_1.useEffect;
|
package/node/hooks/useMount.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useMount = void 0;
|
|
4
|
-
const useEffectOnce_1 = require("./useEffectOnce");
|
|
5
|
-
/**
|
|
6
|
-
* @borrows [streamich/react-use](https://github.com/streamich/react-use/blob/master/src/useMount.ts)
|
|
7
|
-
*/
|
|
8
|
-
const useMount = (fn) => {
|
|
9
|
-
(0, useEffectOnce_1.useEffectOnce)(() => {
|
|
10
|
-
fn();
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
exports.useMount = useMount;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useMountedState = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
/**
|
|
6
|
-
* @borrows [streamich/react-use](https://github.com/streamich/react-use/blob/master/src/useMountedState.ts)
|
|
7
|
-
*/
|
|
8
|
-
function useMountedState() {
|
|
9
|
-
const mountedRef = (0, react_1.useRef)(false);
|
|
10
|
-
const get = (0, react_1.useCallback)(() => mountedRef.current, []);
|
|
11
|
-
(0, react_1.useEffect)(() => {
|
|
12
|
-
mountedRef.current = true;
|
|
13
|
-
return () => {
|
|
14
|
-
mountedRef.current = false;
|
|
15
|
-
};
|
|
16
|
-
}, []);
|
|
17
|
-
return get;
|
|
18
|
-
}
|
|
19
|
-
exports.useMountedState = useMountedState;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.usePrevious = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
function usePrevious(value) {
|
|
6
|
-
const ref = (0, react_1.useRef)();
|
|
7
|
-
(0, react_1.useEffect)(() => {
|
|
8
|
-
ref.current = value;
|
|
9
|
-
});
|
|
10
|
-
return ref.current;
|
|
11
|
-
}
|
|
12
|
-
exports.usePrevious = usePrevious;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useScrollPosition = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const utils_1 = require("@koine/utils");
|
|
6
|
-
const useIsomorphicLayoutEffect_1 = require("./useIsomorphicLayoutEffect");
|
|
7
|
-
const zeroPosition = { x: 0, y: 0 };
|
|
8
|
-
const getClientRect = (element) => element?.getBoundingClientRect();
|
|
9
|
-
const getScrollPosition = (element, useWindow, boundingElement) => {
|
|
10
|
-
if (!utils_1.isBrowser) {
|
|
11
|
-
return zeroPosition;
|
|
12
|
-
}
|
|
13
|
-
if (useWindow) {
|
|
14
|
-
return { x: window.scrollX, y: window.scrollY };
|
|
15
|
-
}
|
|
16
|
-
const targetPosition = getClientRect(element?.current || document.body);
|
|
17
|
-
const containerPosition = getClientRect(boundingElement?.current);
|
|
18
|
-
if (!targetPosition) {
|
|
19
|
-
return zeroPosition;
|
|
20
|
-
}
|
|
21
|
-
return containerPosition
|
|
22
|
-
? {
|
|
23
|
-
x: (containerPosition.x || 0) - (targetPosition.x || 0),
|
|
24
|
-
y: (containerPosition.y || 0) - (targetPosition.y || 0),
|
|
25
|
-
}
|
|
26
|
-
: { x: targetPosition.left, y: targetPosition.top };
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* @borrows [@n8tb1t/use-scroll-position@2.0.3](https://github.com/n8tb1t/use-scroll-position) by `n8tb1t <n8tb1t@gmail.com>`
|
|
30
|
-
*
|
|
31
|
-
* We've just:
|
|
32
|
-
* - reused internal helper functions
|
|
33
|
-
* - compacted object arguments in functions as plain argument list to improve compression
|
|
34
|
-
*/
|
|
35
|
-
const useScrollPosition = (effect, deps = [], element, useWindow, wait, boundingElement) => {
|
|
36
|
-
const position = (0, react_1.useRef)(getScrollPosition(null, useWindow, boundingElement));
|
|
37
|
-
let throttleTimeout = null;
|
|
38
|
-
const callBack = () => {
|
|
39
|
-
const current = getScrollPosition(element, useWindow, boundingElement);
|
|
40
|
-
effect(current, position.current);
|
|
41
|
-
position.current = current;
|
|
42
|
-
throttleTimeout = null;
|
|
43
|
-
};
|
|
44
|
-
(0, useIsomorphicLayoutEffect_1.useIsomorphicLayoutEffect)(() => {
|
|
45
|
-
if (!utils_1.isBrowser) {
|
|
46
|
-
return undefined;
|
|
47
|
-
}
|
|
48
|
-
const handleScroll = () => {
|
|
49
|
-
if (wait) {
|
|
50
|
-
if (throttleTimeout === null) {
|
|
51
|
-
throttleTimeout = window.setTimeout(callBack, wait);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
callBack();
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
if (boundingElement) {
|
|
59
|
-
boundingElement.current?.addEventListener("scroll", handleScroll, {
|
|
60
|
-
passive: true,
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
65
|
-
}
|
|
66
|
-
return () => {
|
|
67
|
-
if (boundingElement) {
|
|
68
|
-
boundingElement.current?.removeEventListener("scroll", handleScroll);
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
window.removeEventListener("scroll", handleScroll);
|
|
72
|
-
}
|
|
73
|
-
if (throttleTimeout) {
|
|
74
|
-
clearTimeout(throttleTimeout);
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
}, deps);
|
|
78
|
-
};
|
|
79
|
-
exports.useScrollPosition = useScrollPosition;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useScrollTo = void 0;
|
|
4
|
-
const utils_1 = require("@koine/utils");
|
|
5
|
-
const useHeader_1 = require("../Header/useHeader");
|
|
6
|
-
function useScrollTo(id = "", offset = 0) {
|
|
7
|
-
const [, , headerHeight] = (0, useHeader_1.useHeader)();
|
|
8
|
-
if (!utils_1.isBrowser) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
const headerOffset = headerHeight || 0;
|
|
12
|
-
let element = document.getElementById(id);
|
|
13
|
-
let top = 0;
|
|
14
|
-
if (element && element.offsetParent) {
|
|
15
|
-
do {
|
|
16
|
-
top += element.offsetTop;
|
|
17
|
-
} while ((element = element.offsetParent));
|
|
18
|
-
}
|
|
19
|
-
top -= offset;
|
|
20
|
-
top -= headerOffset;
|
|
21
|
-
window.scroll(0, top);
|
|
22
|
-
}
|
|
23
|
-
exports.useScrollTo = useScrollTo;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useTraceUpdate = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
/**
|
|
6
|
-
* @see https://stackoverflow.com/a/51082563/9122820
|
|
7
|
-
*/
|
|
8
|
-
function useTraceUpdate(props) {
|
|
9
|
-
const prev = (0, react_1.useRef)(props);
|
|
10
|
-
(0, react_1.useEffect)(() => {
|
|
11
|
-
const changedProps = Object.entries(props).reduce((ps, [k, v]) => {
|
|
12
|
-
if (prev.current[k] !== v) {
|
|
13
|
-
// @ts-expect-error Does not matter here...
|
|
14
|
-
ps[k] = [prev.current[k], v];
|
|
15
|
-
}
|
|
16
|
-
return ps;
|
|
17
|
-
}, {});
|
|
18
|
-
if (Object.keys(changedProps).length > 0) {
|
|
19
|
-
console.log("Changed props:", changedProps);
|
|
20
|
-
}
|
|
21
|
-
prev.current = props;
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
exports.useTraceUpdate = useTraceUpdate;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useUpdateEffect = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const useFirstMountState_1 = require("./useFirstMountState");
|
|
6
|
-
/**
|
|
7
|
-
* @borrows [streamich/react-use](https://github.com/streamich/react-use/blob/master/src/useUpdateEffect.ts)
|
|
8
|
-
*/
|
|
9
|
-
const useUpdateEffect = (effect, deps) => {
|
|
10
|
-
const isFirstMount = (0, useFirstMountState_1.useFirstMountState)();
|
|
11
|
-
(0, react_1.useEffect)(() => {
|
|
12
|
-
if (!isFirstMount) {
|
|
13
|
-
return effect();
|
|
14
|
-
}
|
|
15
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
16
|
-
}, deps);
|
|
17
|
-
};
|
|
18
|
-
exports.useUpdateEffect = useUpdateEffect;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useWindowSize = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
function useWindowSize() {
|
|
6
|
-
const [size, setSize] = (0, react_1.useState)([0, 0]);
|
|
7
|
-
(0, react_1.useEffect)(() => {
|
|
8
|
-
function updateSize() {
|
|
9
|
-
setSize([window.innerWidth, window.innerHeight]);
|
|
10
|
-
}
|
|
11
|
-
window.addEventListener("resize", updateSize);
|
|
12
|
-
updateSize();
|
|
13
|
-
return () => window.removeEventListener("resize", updateSize);
|
|
14
|
-
}, []);
|
|
15
|
-
return size;
|
|
16
|
-
}
|
|
17
|
-
exports.useWindowSize = useWindowSize;
|
package/node/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./shared"), exports);
|
|
5
|
-
// we need to alias the star export otherwise the named exports would collide
|
|
6
|
-
// export * as css from "./css";
|
|
7
|
-
// export * as sc from "./sc";
|
|
8
|
-
// export * as tw from "./tw";
|
package/node/m/MotionProvider.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MotionProvider = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const framer_motion_1 = require("framer-motion");
|
|
6
|
-
/**
|
|
7
|
-
* `<LazyMotion />` provider wrapper from `framer-motion`
|
|
8
|
-
*
|
|
9
|
-
* @see https://www.framer.com/docs/guide-reduce-bundle-size/
|
|
10
|
-
*
|
|
11
|
-
* About the difference between `lite` and `max`
|
|
12
|
-
* @see https://www.framer.com/docs/guide-reduce-bundle-size/#available-features
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
*
|
|
16
|
-
* `lite` version:
|
|
17
|
-
* ```tsx
|
|
18
|
-
* import { MotionProvider } from "@koine/react/m";
|
|
19
|
-
*
|
|
20
|
-
* const features = () => import("@koine/react/m/lite").then((m) => m.default);
|
|
21
|
-
*
|
|
22
|
-
* <MotionProvider features={features}>
|
|
23
|
-
* <App />
|
|
24
|
-
* </MotionProvider>
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* ### `max` version
|
|
28
|
-
* ```tsx
|
|
29
|
-
* import { MotionProvider } from "@koine/react/m";
|
|
30
|
-
*
|
|
31
|
-
* const features = () => import("@koine/react/m/max").then((m) => m.default);
|
|
32
|
-
*
|
|
33
|
-
* <MotionProvider features={features}>
|
|
34
|
-
* <App />
|
|
35
|
-
* </MotionProvider>
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
const MotionProvider = ({ features, children }) => {
|
|
39
|
-
return (0, jsx_runtime_1.jsx)(framer_motion_1.LazyMotion, { features: features, children: children });
|
|
40
|
-
};
|
|
41
|
-
exports.MotionProvider = MotionProvider;
|
package/node/m/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @file
|
|
4
|
-
*
|
|
5
|
-
* In this file we only have exports related to `framer-motion`
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
const tslib_1 = require("tslib");
|
|
9
|
-
tslib_1.__exportStar(require("./MotionProvider"), exports);
|
package/node/m/lite.js
DELETED
package/node/m/max.js
DELETED
package/node/sc/index.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.KoineForm = exports.KoineDialog = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
tslib_1.__exportStar(require("../shared"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("../Alert"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("../Animations"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("../Autocomplete"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("../Bg"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("../Breadcrumbs"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("../Buttons"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("../Carousel"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("../Collapsable"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("../Debug"), exports);
|
|
15
|
-
var bare_1 = require("../Dialog/sc/bare");
|
|
16
|
-
Object.defineProperty(exports, "KoineDialog", { enumerable: true, get: function () { return bare_1.KoineDialog; } });
|
|
17
|
-
var bare_2 = require("../Form/sc/bare");
|
|
18
|
-
Object.defineProperty(exports, "KoineForm", { enumerable: true, get: function () { return bare_2.KoineForm; } });
|
|
19
|
-
tslib_1.__exportStar(require("../Forms"), exports);
|
|
20
|
-
tslib_1.__exportStar(require("../Grid"), exports);
|
|
21
|
-
tslib_1.__exportStar(require("../Hamburger"), exports);
|
|
22
|
-
tslib_1.__exportStar(require("../Header"), exports);
|
|
23
|
-
tslib_1.__exportStar(require("../Hidden"), exports);
|
|
24
|
-
tslib_1.__exportStar(require("../Img"), exports);
|
|
25
|
-
tslib_1.__exportStar(require("../Link"), exports);
|
|
26
|
-
tslib_1.__exportStar(require("../MenuItem"), exports);
|
|
27
|
-
tslib_1.__exportStar(require("../Pagination"), exports);
|
|
28
|
-
tslib_1.__exportStar(require("../Pill"), exports);
|
|
29
|
-
tslib_1.__exportStar(require("../Progress"), exports);
|
|
30
|
-
tslib_1.__exportStar(require("../Rating"), exports);
|
|
31
|
-
// export * from "../Select";
|
|
32
|
-
tslib_1.__exportStar(require("../Sidebar"), exports);
|
|
33
|
-
tslib_1.__exportStar(require("../Spacing"), exports);
|
|
34
|
-
tslib_1.__exportStar(require("../Sticky"), exports);
|
|
35
|
-
tslib_1.__exportStar(require("../styles"), exports);
|
|
36
|
-
tslib_1.__exportStar(require("../Tabs"), exports);
|
|
37
|
-
tslib_1.__exportStar(require("../Typography"), exports);
|
package/node/scm/index.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.KoineDialog = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
tslib_1.__exportStar(require("../shared"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("../Alert"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("../Animations"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("../Autocomplete"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("../Bg"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("../Breadcrumbs"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("../Buttons"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("../Carousel"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("../Collapsable"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("../Debug"), exports);
|
|
15
|
-
var framer_1 = require("../Dialog/sc/framer");
|
|
16
|
-
Object.defineProperty(exports, "KoineDialog", { enumerable: true, get: function () { return framer_1.KoineDialog; } });
|
|
17
|
-
// export { KoineForm, type KoineFormProps} from "../Form/sc/framer";
|
|
18
|
-
tslib_1.__exportStar(require("../Forms"), exports);
|
|
19
|
-
tslib_1.__exportStar(require("../Grid"), exports);
|
|
20
|
-
tslib_1.__exportStar(require("../Hamburger"), exports);
|
|
21
|
-
tslib_1.__exportStar(require("../Header"), exports);
|
|
22
|
-
tslib_1.__exportStar(require("../Hidden"), exports);
|
|
23
|
-
tslib_1.__exportStar(require("../Img"), exports);
|
|
24
|
-
tslib_1.__exportStar(require("../Link"), exports);
|
|
25
|
-
tslib_1.__exportStar(require("../MenuItem"), exports);
|
|
26
|
-
tslib_1.__exportStar(require("../Pagination"), exports);
|
|
27
|
-
tslib_1.__exportStar(require("../Pill"), exports);
|
|
28
|
-
tslib_1.__exportStar(require("../Progress"), exports);
|
|
29
|
-
tslib_1.__exportStar(require("../Rating"), exports);
|
|
30
|
-
// export * from "../Select";
|
|
31
|
-
tslib_1.__exportStar(require("../Sidebar"), exports);
|
|
32
|
-
tslib_1.__exportStar(require("../Spacing"), exports);
|
|
33
|
-
tslib_1.__exportStar(require("../Sticky"), exports);
|
|
34
|
-
tslib_1.__exportStar(require("../styles"), exports);
|
|
35
|
-
tslib_1.__exportStar(require("../Tabs"), exports);
|
|
36
|
-
tslib_1.__exportStar(require("../Typography"), exports);
|
package/node/shared/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("../Calendar"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("../Dialog"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("../Favicon"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("../helpers"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("../hooks"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("../Meta"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("../NoJs"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("../types"), exports);
|
package/node/styles/Body.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BodyMain = exports.BodyRoot = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
6
|
-
exports.BodyRoot = styled_components_1.default.div `
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
min-height: 100vh;
|
|
10
|
-
`;
|
|
11
|
-
/**
|
|
12
|
-
* If you have background graphics to overlap you might need to add:
|
|
13
|
-
*
|
|
14
|
-
* ```css
|
|
15
|
-
* z-index: 1;
|
|
16
|
-
* position: relative;
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
exports.BodyMain = styled_components_1.default.main `
|
|
20
|
-
flex: 1;
|
|
21
|
-
`;
|
package/node/styles/Global.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StylesGlobal = exports.stylesGlobal = void 0;
|
|
4
|
-
const styled_components_1 = require("styled-components");
|
|
5
|
-
/**
|
|
6
|
-
* App global style
|
|
7
|
-
*
|
|
8
|
-
* For examples of what to do here take a look at [Bootstrap's reset](https://github.com/twbs/bootstrap/blob/main/scss/_reboot.scss)
|
|
9
|
-
* and similar.
|
|
10
|
-
*
|
|
11
|
-
* What we do here:
|
|
12
|
-
* - set the base font family on all possible elements including placeholders prevent Chrome showing a standard font when using the autofill feature
|
|
13
|
-
* - @see https://stackoverflow.com/a/60987373/1938970
|
|
14
|
-
* - set the base font size on all possible elements to prevent weird zooming on input fields on iPhone iOS devices.
|
|
15
|
-
* - @see https://www.warrenchandler.com/2019/04/02/stop-iphones-from-zooming-in-on-form-fields/
|
|
16
|
-
* - @see https://css-tricks.com/16px-or-larger-text-prevents-ios-form-zoom/
|
|
17
|
-
*/
|
|
18
|
-
exports.stylesGlobal = `
|
|
19
|
-
body {
|
|
20
|
-
margin: 0;
|
|
21
|
-
padding: 0;
|
|
22
|
-
overflow-x: hidden;
|
|
23
|
-
overflow-y: scroll;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
body,
|
|
27
|
-
button,
|
|
28
|
-
input,
|
|
29
|
-
textarea,
|
|
30
|
-
select,
|
|
31
|
-
select:-webkit-autofill::first-line,
|
|
32
|
-
input:-webkit-autofill::first-line {
|
|
33
|
-
font-family: var(--font), -apple-system, BlinkMacSystemFont, "Segoe UI",
|
|
34
|
-
Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
|
|
35
|
-
sans-serif;
|
|
36
|
-
font-size: var(--fontSize);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
html {
|
|
40
|
-
box-sizing: border-box;
|
|
41
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
42
|
-
scroll-behavior: smooth;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
*,
|
|
47
|
-
*:before,
|
|
48
|
-
*:after {
|
|
49
|
-
box-sizing: inherit;
|
|
50
|
-
-webkit-tap-highlight-color: transparent;
|
|
51
|
-
}
|
|
52
|
-
`;
|
|
53
|
-
exports.StylesGlobal = (0, styled_components_1.createGlobalStyle) `${exports.stylesGlobal}`;
|
package/node/styles/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./Body"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./Global"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./media"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./spacing"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./styled"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./theme"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./theme--vanilla"), exports);
|