@koine/react 1.0.9 → 1.0.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/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 +14 -27
- package/Collapsable/Collapsable.d.ts +1 -1
- package/Collapsable/Collapsable.js +1 -1
- package/Collapsable/CollapsableReach.d.ts +4 -64
- package/Collapsable/CollapsableReach.js +247 -129
- package/Collapsable/index.d.ts +1 -1
- package/Collapsable/index.js +2 -1
- package/Debug/Debug.js +5 -17
- package/Details/Details.d.ts +114 -0
- package/Details/Details.js +65 -0
- package/Details/index.d.ts +1 -0
- package/Details/index.js +1 -0
- package/{Forms/Form → Details}/package.json +1 -1
- package/Dialog/DialogMui.d.ts +1 -1
- 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.d.ts +111 -0
- package/Form/Form.js +61 -0
- package/{Forms/Form → Form}/index.d.ts +0 -0
- package/{Forms/Form → Form}/index.js +0 -0
- package/Form/package.json +6 -0
- package/Form/sc/bare.d.ts +33 -0
- package/Form/sc/bare.js +20 -0
- 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 +21 -68
- package/Forms/Toggle/useToggle.js +29 -29
- package/Forms/antispam.js +12 -12
- package/Forms/helpers.js +8 -7
- package/Forms/index.d.ts +0 -1
- package/Forms/index.js +0 -1
- 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 +26 -45
- 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.d.ts +244 -0
- package/Tabs/TabsMui.js +46 -0
- package/Tabs/index.d.ts +1 -1
- package/Tabs/index.js +1 -1
- package/Tabs/sc/bare.d.ts +5 -0
- package/Tabs/sc/bare.js +87 -0
- package/Tabs/tw/bare.d.ts +248 -0
- package/Tabs/tw/bare.js +17 -0
- package/Tabs/tw/material.d.ts +472 -0
- package/Tabs/tw/material.js +18 -0
- package/Tabs/useTabs.d.ts +43 -0
- package/Tabs/useTabs.js +44 -0
- package/Typography/CopyPasteVisible.js +3 -5
- package/Typography/Native.js +12 -45
- package/Typography/ReadMore.js +26 -52
- package/Typography/TextLoop.js +19 -22
- package/Typography/TypeStairs.js +20 -16
- package/css/index.js +1 -0
- package/helpers/classed.js +22 -18
- package/helpers/extend-component.js +6 -6
- package/hooks/index.d.ts +8 -0
- package/hooks/index.js +8 -0
- package/hooks/types.d.ts +8 -0
- package/hooks/types.js +1 -0
- package/hooks/useAsyncFn.d.ts +26 -0
- package/hooks/useAsyncFn.js +36 -0
- package/hooks/useDateLocale.js +22 -13
- package/hooks/useEffectOnce.d.ts +5 -0
- package/hooks/useEffectOnce.js +8 -0
- package/hooks/useFirstMountState.d.ts +4 -0
- package/hooks/useFirstMountState.js +12 -0
- package/hooks/useFocus.js +3 -3
- package/hooks/useId.d.ts +4 -0
- package/hooks/useId.js +8 -0
- package/hooks/useIsomorphicLayoutEffect.d.ts +5 -0
- package/hooks/useIsomorphicLayoutEffect.js +8 -0
- package/hooks/useMount.d.ts +4 -0
- package/hooks/useMount.js +9 -0
- package/hooks/useMountedState.d.ts +4 -0
- package/hooks/useMountedState.js +15 -0
- package/hooks/usePrevious.js +2 -2
- package/hooks/useScrollPosition.js +21 -16
- package/hooks/useScrollTo.js +7 -5
- package/hooks/useTraceUpdate.js +4 -3
- package/hooks/useUpdateEffect.d.ts +5 -0
- package/hooks/useUpdateEffect.js +14 -0
- package/hooks/useWindowSize.js +3 -3
- package/m/MotionProvider.js +4 -2
- package/node/Alert/Alert.js +9 -16
- package/node/Alert/index.js +1 -1
- package/node/Animations/Reveal.js +15 -13
- package/node/Animations/Underline.js +5 -16
- package/node/Animations/index.js +1 -1
- package/node/Animations/useReveal.js +19 -18
- package/node/Autocomplete/AutocompleteMui.js +69 -64
- package/node/Autocomplete/components.js +26 -82
- package/node/Autocomplete/helpers.js +2 -2
- package/node/Bg/BgColor.js +18 -29
- package/node/Bg/BgPhoto.js +15 -59
- package/node/Bg/BgSvg.js +8 -12
- package/node/Bg/index.js +1 -1
- package/node/Breadcrumbs/Breadcrumbs.js +20 -61
- package/node/Breadcrumbs/index.js +1 -1
- package/node/Buttons/Button.js +10 -76
- package/node/Buttons/ButtonComposite.js +23 -45
- package/node/Buttons/ButtonFab.js +6 -9
- package/node/Buttons/ButtonLink.js +10 -10
- package/node/Buttons/IconButton.js +7 -20
- package/node/Buttons/index.js +1 -1
- package/node/Calendar/CalendarDaygridCell.js +24 -18
- package/node/Calendar/CalendarDaygridNav.js +14 -13
- package/node/Calendar/CalendarDaygridTable.js +39 -38
- package/node/Calendar/CalendarLegend.js +8 -3
- package/node/Calendar/calendar-api-google.js +105 -73
- package/node/Calendar/index.js +1 -1
- package/node/Calendar/useCalendar.js +117 -116
- package/node/Calendar/utils.js +82 -84
- package/node/Carousel/CarouselCss.js +17 -31
- package/node/Carousel/index.js +1 -1
- package/node/Collapsable/Collapsable.js +2 -2
- package/node/Collapsable/CollapsableReach.js +246 -134
- package/node/Collapsable/index.js +3 -2
- package/node/Debug/Debug.js +7 -20
- package/node/Debug/index.js +1 -1
- package/node/Details/Details.js +67 -0
- package/node/Details/index.js +4 -0
- package/node/Dialog/DialogMui.js +12 -11
- package/node/Dialog/css/bare.js +11 -10
- package/node/Dialog/m/bare.js +18 -14
- package/node/Dialog/m/basic.js +1 -1
- package/node/Dialog/m/index.js +4 -4
- package/node/Dialog/sc/bare.js +22 -41
- package/node/Dialog/sc/framer.js +5 -5
- package/node/Dialog/sc/framerMaterial.js +5 -5
- package/node/Dialog/sc/material.js +12 -33
- package/node/Dialog/tw/bare.js +19 -14
- package/node/Dialog/tw/elegant.js +11 -9
- package/node/Dialog/tw/framer.js +5 -5
- package/node/Dialog/tw/framerMaterial.js +5 -5
- package/node/Dialog/tw/material.js +11 -9
- package/node/Editor/Editor--tiptap.js +19 -17
- package/node/Editor/components.js +9 -28
- package/node/Editor/index.js +1 -1
- package/node/Favicon/FaviconTags.js +3 -2
- package/node/Favicon/index.js +1 -1
- package/node/Form/Form.js +65 -0
- package/node/{Forms/Form → Form}/index.js +1 -1
- package/node/Form/sc/bare.js +23 -0
- package/node/Forms/Checkbox/Checkbox.js +13 -20
- package/node/Forms/Checkbox/index.js +1 -1
- package/node/Forms/Feedback/Feedback.js +8 -10
- package/node/Forms/Feedback/index.js +1 -1
- package/node/Forms/Field/Field.js +18 -30
- package/node/Forms/Field/FieldControl.js +26 -22
- package/node/Forms/Field/FieldHint.js +4 -7
- package/node/Forms/Field/index.js +1 -1
- package/node/Forms/Input/Input.js +15 -22
- package/node/Forms/Input/index.js +1 -1
- package/node/Forms/InputGroup/InputGroup.js +14 -42
- package/node/Forms/InputGroup/index.js +1 -1
- package/node/Forms/Label/Label.js +6 -25
- package/node/Forms/Label/index.js +1 -1
- package/node/Forms/Password/Password.js +16 -30
- package/node/Forms/Password/index.js +1 -1
- package/node/Forms/Radio/Radio.js +21 -25
- package/node/Forms/Radio/index.js +1 -1
- package/node/Forms/Switch/Switch.js +15 -46
- package/node/Forms/Switch/index.js +1 -1
- package/node/Forms/Textarea/Textarea.js +11 -13
- package/node/Forms/Textarea/TextareaRich.js +16 -31
- package/node/Forms/Textarea/index.js +1 -1
- package/node/Forms/Toggle/Toggle.js +24 -72
- package/node/Forms/Toggle/index.js +1 -1
- package/node/Forms/Toggle/useToggle.js +33 -33
- package/node/Forms/antispam.js +14 -14
- package/node/Forms/helpers.js +9 -8
- package/node/Forms/index.js +1 -2
- package/node/Forms/styles.js +16 -48
- package/node/Gauge/Gauge.js +1 -1
- package/node/Grid/Grid.js +24 -51
- package/node/Grid/index.js +1 -1
- package/node/Hamburger/Hamburger.js +37 -50
- package/node/Hamburger/index.js +1 -1
- package/node/Header/index.js +1 -1
- package/node/Header/useHeader.js +16 -16
- package/node/Hidden/Hidden.js +10 -15
- package/node/Hidden/index.js +1 -1
- package/node/Img/index.js +1 -1
- package/node/Img/sc/bare.js +4 -3
- package/node/Link/Link.js +4 -3
- package/node/Link/LinkBlank.js +11 -21
- package/node/Link/index.js +1 -1
- package/node/Menu/Menu.js +4 -12
- package/node/Menu/index.js +1 -1
- package/node/MenuItem/MenuItem.js +4 -21
- package/node/MenuItem/index.js +1 -1
- package/node/Meta/Meta.js +4 -3
- package/node/Meta/index.js +1 -1
- package/node/NoJs/NoJs.js +3 -3
- package/node/NoJs/index.js +1 -1
- package/node/Pagination/PaginationNav.js +30 -53
- package/node/Pagination/PaginationResults.js +10 -10
- package/node/Pagination/index.js +1 -1
- package/node/Pill/Pill.js +7 -38
- package/node/Pill/index.js +1 -1
- package/node/Progress/ProgressCircular.js +11 -33
- package/node/Progress/ProgressLinear.js +11 -20
- package/node/Progress/ProgressOverlay.js +18 -35
- package/node/Progress/index.js +1 -1
- package/node/Rating/Rating.js +28 -48
- package/node/Rating/index.js +20 -16
- package/node/Select/components.js +11 -18
- package/node/Sidebar/Sidebar.js +21 -47
- package/node/Sidebar/index.js +1 -1
- package/node/Spacing/Spacing.js +16 -17
- package/node/Spacing/index.js +1 -1
- package/node/Sticky/StickyCss.js +5 -3
- package/node/Sticky/index.js +1 -1
- package/node/Tabs/TabsMui.js +49 -0
- package/node/Tabs/index.js +2 -2
- package/node/Tabs/sc/bare.js +87 -0
- package/node/Tabs/tw/bare.js +20 -0
- package/node/Tabs/tw/material.js +21 -0
- package/node/Tabs/useTabs.js +48 -0
- package/node/Typography/CopyPasteVisible.js +4 -7
- package/node/Typography/Native.js +14 -48
- package/node/Typography/ReadMore.js +30 -57
- package/node/Typography/TextLoop.js +22 -25
- package/node/Typography/TypeStairs.js +22 -18
- package/node/Typography/index.js +1 -1
- package/node/css/index.js +2 -1
- package/node/helpers/classed.js +23 -19
- package/node/helpers/extend-component.js +7 -7
- package/node/helpers/index.js +1 -1
- package/node/hooks/index.js +9 -1
- package/node/hooks/types.js +2 -0
- package/node/hooks/useAsyncFn.js +40 -0
- package/node/hooks/useDateLocale.js +23 -37
- package/node/hooks/useEffectOnce.js +12 -0
- package/node/hooks/useFirstMountState.js +16 -0
- package/node/hooks/useFocus.js +4 -4
- package/node/hooks/useId.js +12 -0
- package/node/hooks/useIsomorphicLayoutEffect.js +11 -0
- package/node/hooks/useMount.js +13 -0
- package/node/hooks/useMountedState.js +19 -0
- package/node/hooks/usePrevious.js +3 -3
- package/node/hooks/useScrollPosition.js +23 -19
- package/node/hooks/useScrollTo.js +9 -7
- package/node/hooks/useTraceUpdate.js +5 -4
- package/node/hooks/useUpdateEffect.js +18 -0
- package/node/hooks/useWindowSize.js +4 -4
- package/node/index.js +1 -1
- package/node/m/MotionProvider.js +6 -4
- package/node/m/index.js +1 -1
- package/node/m/lite.js +1 -1
- package/node/m/max.js +1 -1
- package/node/sc/index.js +4 -2
- package/node/scm/index.js +2 -1
- package/node/shared/index.js +1 -1
- package/node/styles/Body.js +5 -10
- package/node/styles/Global.js +5 -37
- package/node/styles/index.js +1 -1
- package/node/styles/media.js +42 -38
- package/node/styles/spacing.js +15 -16
- package/node/styles/styled.js +7 -21
- package/node/styles/theme--vanilla.js +21 -19
- package/node/styles/theme.js +9 -9
- package/node/tw/index.js +2 -1
- package/node/twm/index.js +2 -1
- package/package.json +20 -9
- package/sc/index.d.ts +1 -0
- package/sc/index.js +1 -0
- package/scm/index.js +1 -0
- 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 +21 -19
- package/styles/theme.js +11 -11
- package/tw/index.js +1 -0
- package/twm/index.js +1 -0
- package/Forms/Form/Form.d.ts +0 -31
- package/Forms/Form/Form.js +0 -62
- package/Tabs/Tabs.d.ts +0 -27
- package/Tabs/Tabs.js +0 -62
- package/node/Forms/Form/Form.js +0 -67
- package/node/Tabs/Tabs.js +0 -67
package/Gauge/Gauge.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// import styled, { keyframes } from "styled-components";
|
|
2
2
|
// import { m } from "framer-motion";
|
|
3
|
-
export
|
|
3
|
+
export var Gauge = function (_props) { return null; };
|
|
4
4
|
// export type GaugeProps = {
|
|
5
5
|
// /** In percentage */
|
|
6
6
|
// value: number;
|
package/Grid/Grid.js
CHANGED
|
@@ -1,60 +1,33 @@
|
|
|
1
|
+
import { __makeTemplateObject } from "tslib";
|
|
1
2
|
import styled from "styled-components";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
margin: 0 auto;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
padding: 0 ${(p) => p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]}px;
|
|
12
|
-
`;
|
|
13
|
-
export const Row = styled.div `
|
|
14
|
-
margin: 0 -${(p) => p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]}px;
|
|
15
|
-
display: flex;
|
|
16
|
-
${(p) => (p.$noWrap ? "overflow: auto;" : "flex-wrap: wrap;")}
|
|
17
|
-
${(p) => (p.$valign ? `align-items: ${p.$valign}` : "")};
|
|
18
|
-
${(p) => p.$reverse &&
|
|
19
|
-
`@media (${p.$reverse.split(":")[0]}-width: ${p.$reverse.split(":")[1]}px) {
|
|
20
|
-
flex-direction: row-reverse;
|
|
21
|
-
}`}
|
|
22
|
-
`;
|
|
23
|
-
export const Col = styled.div `
|
|
24
|
-
padding: 0 ${(p) => p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]}px;
|
|
25
|
-
display: ${(p) => (p.$flex ? "flex" : "block")};
|
|
26
|
-
${(p) => (p.$valign ? "align-items: " + p.$valign : "")};
|
|
27
|
-
${(p) => getColCss(p)};
|
|
28
|
-
`;
|
|
3
|
+
export var GRID_COLUMNS = 12;
|
|
4
|
+
export var GRID_GUTTER_DEFAULT = "half";
|
|
5
|
+
export var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n max-width: ", "px;\n margin: 0 auto;\n padding: 0 ", "px;\n ", "\n"], ["\n max-width: ", "px;\n margin: 0 auto;\n padding: 0 ", "px;\n ", "\n"])), function (p) { return p.theme.breakpoints[p.size]; }, function (p) { return p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]; }, function (p) { return (p.clamp ? "overflow: hidden;" : ""); });
|
|
6
|
+
export var ContainerFluid = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 0 ", "px;\n"], ["\n padding: 0 ", "px;\n"])), function (p) { return p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]; });
|
|
7
|
+
export var Row = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin: 0 -", "px;\n display: flex;\n ", "\n ", ";\n ", "\n"], ["\n margin: 0 -", "px;\n display: flex;\n ", "\n ", ";\n ", "\n"])), function (p) { return p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]; }, function (p) { return (p.$noWrap ? "overflow: auto;" : "flex-wrap: wrap;"); }, function (p) { return (p.$valign ? "align-items: ".concat(p.$valign) : ""); }, function (p) {
|
|
8
|
+
return p.$reverse &&
|
|
9
|
+
"@media (".concat(p.$reverse.split(":")[0], "-width: ").concat(p.$reverse.split(":")[1], "px) {\n flex-direction: row-reverse;\n }");
|
|
10
|
+
});
|
|
11
|
+
export var Col = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding: 0 ", "px;\n display: ", ";\n ", ";\n ", ";\n"], ["\n padding: 0 ", "px;\n display: ", ";\n ", ";\n ", ";\n"])), function (p) { return p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]; }, function (p) { return (p.$flex ? "flex" : "block"); }, function (p) { return (p.$valign ? "align-items: " + p.$valign : ""); }, function (p) { return getColCss(p); });
|
|
29
12
|
function getColWidth(breakpoints, breakpoint, value) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
min-width: ${width}%;
|
|
34
|
-
flex: 0 0 ${width}%;
|
|
35
|
-
`;
|
|
13
|
+
var breakpointValue = breakpoints[breakpoint] + "px";
|
|
14
|
+
var width = (value * 100) / GRID_COLUMNS;
|
|
15
|
+
var cssValue = "\n min-width: ".concat(width, "%;\n flex: 0 0 ").concat(width, "%;\n");
|
|
36
16
|
if (breakpoint === Object.keys(breakpoints)[0]) {
|
|
37
17
|
return cssValue;
|
|
38
18
|
}
|
|
39
|
-
return
|
|
40
|
-
@media (min-width: ${breakpointValue}){
|
|
41
|
-
${cssValue}
|
|
42
|
-
}`;
|
|
19
|
+
return "\n @media (min-width: ".concat(breakpointValue, "){\n ").concat(cssValue, "\n }");
|
|
43
20
|
}
|
|
44
21
|
function getColCss(props) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
22
|
+
var $auto = props.$auto, $offset = props.$offset, $width = props.$width;
|
|
23
|
+
var breakpoints = props.theme.breakpoints;
|
|
24
|
+
var css = "";
|
|
48
25
|
if ($offset) {
|
|
49
|
-
|
|
50
|
-
for (
|
|
26
|
+
var offsets = $offset.split(",");
|
|
27
|
+
for (var i = 0; i <= offsets.length; i++) {
|
|
51
28
|
if (offsets[i]) {
|
|
52
|
-
|
|
53
|
-
css +=
|
|
54
|
-
@media(min-width: ${breakpoints[offsetBreakpoint]}px){
|
|
55
|
-
margin-left: ${(100 * offsetSize) / GRID_COLUMNS}%;
|
|
56
|
-
}
|
|
57
|
-
`;
|
|
29
|
+
var _a = offsets[i].split(":"), offsetBreakpoint = _a[0], offsetSize = _a[1];
|
|
30
|
+
css += " \n @media(min-width: ".concat(breakpoints[offsetBreakpoint], "px){\n margin-left: ").concat((100 * offsetSize) / GRID_COLUMNS, "%;\n }\n ");
|
|
58
31
|
}
|
|
59
32
|
}
|
|
60
33
|
}
|
|
@@ -62,11 +35,11 @@ function getColCss(props) {
|
|
|
62
35
|
// do nothing, width is set explicitly
|
|
63
36
|
}
|
|
64
37
|
else if ($auto) {
|
|
65
|
-
css +=
|
|
38
|
+
css += "flex: 0 0 auto; width: auto; max-width: none;";
|
|
66
39
|
}
|
|
67
40
|
else {
|
|
68
|
-
for (
|
|
69
|
-
|
|
41
|
+
for (var breakpoint in breakpoints) {
|
|
42
|
+
var value = props[breakpoint];
|
|
70
43
|
if (typeof value !== "undefined") {
|
|
71
44
|
css += getColWidth(breakpoints, breakpoint, value);
|
|
72
45
|
}
|
|
@@ -77,3 +50,4 @@ function getColCss(props) {
|
|
|
77
50
|
}
|
|
78
51
|
return css;
|
|
79
52
|
}
|
|
53
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
package/Hamburger/Hamburger.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __assign, __makeTemplateObject, __rest } from "tslib";
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
/**
|
|
3
4
|
* @file
|
|
@@ -5,60 +6,47 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
6
|
* Simplified from https://github.com/luukdv/hamburger-react
|
|
6
7
|
*/
|
|
7
8
|
import styled from "styled-components";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const time = 0.4;
|
|
31
|
-
const easing = "cubic-bezier(0, 0, 0, 1)";
|
|
32
|
-
const transition = `${time}s ${easing}`;
|
|
33
|
-
const burgerStyles = {
|
|
9
|
+
var HamburgerLabel = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: 30px;\n font-size: ", ";\n text-transform: uppercase;\n left: 7px;\n letter-spacing: 3px;\n"], ["\n position: absolute;\n top: 30px;\n font-size: ", ";\n text-transform: uppercase;\n left: 7px;\n letter-spacing: 3px;\n"])), function (_a) {
|
|
10
|
+
var $toggled = _a.$toggled;
|
|
11
|
+
return ($toggled ? "0" : "9px");
|
|
12
|
+
});
|
|
13
|
+
var area = 48;
|
|
14
|
+
var lines = 3;
|
|
15
|
+
var width = 32;
|
|
16
|
+
var room = Math.round((area - width) / 2);
|
|
17
|
+
var barHeightRaw = width / 12;
|
|
18
|
+
var barHeight = Math.round(barHeightRaw);
|
|
19
|
+
var space = 0.5;
|
|
20
|
+
var marginRaw = width / (lines * (space + (lines === 3 ? 1 : 1.25)));
|
|
21
|
+
var margin = Math.round(marginRaw);
|
|
22
|
+
var height = barHeight * lines + margin * (lines - 1);
|
|
23
|
+
var topOffset = Math.round((area - height) / 2);
|
|
24
|
+
var translate = 4.6325;
|
|
25
|
+
var deviation = (barHeightRaw - barHeight + (marginRaw - margin)) / (lines === 3 ? 1 : 2);
|
|
26
|
+
var move = parseFloat((width / translate - deviation / (4 / 3)).toFixed(2));
|
|
27
|
+
var time = 0.4;
|
|
28
|
+
var easing = "cubic-bezier(0, 0, 0, 1)";
|
|
29
|
+
var transition = "".concat(time, "s ").concat(easing);
|
|
30
|
+
var burgerStyles = {
|
|
34
31
|
marginRight: "-8px",
|
|
35
32
|
position: "relative",
|
|
36
|
-
width:
|
|
37
|
-
height:
|
|
33
|
+
width: "".concat(area, "px"),
|
|
34
|
+
height: "".concat(area, "px"),
|
|
38
35
|
userSelect: "none",
|
|
39
36
|
outline: "0px",
|
|
40
37
|
cursor: "pointer",
|
|
41
|
-
transition,
|
|
38
|
+
transition: transition,
|
|
42
39
|
};
|
|
43
|
-
|
|
40
|
+
var barStyles = {
|
|
44
41
|
position: "absolute",
|
|
45
|
-
width:
|
|
46
|
-
height:
|
|
47
|
-
left:
|
|
42
|
+
width: "".concat(width, "px"),
|
|
43
|
+
height: "".concat(barHeight, "px"),
|
|
44
|
+
left: "".concat(room, "px"),
|
|
48
45
|
background: "currentColor",
|
|
49
|
-
transition,
|
|
46
|
+
transition: transition,
|
|
50
47
|
};
|
|
51
|
-
export
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
transform: `${toggled ? `rotate(90deg)` : "none"}`,
|
|
55
|
-
}, tabIndex: 0, ...props, children: [_jsx("div", { style: {
|
|
56
|
-
...barStyles,
|
|
57
|
-
top: `${topOffset}px`,
|
|
58
|
-
transform: `${toggled ? `rotate(-45deg) translate(0px, ${move}px)` : "none"}`,
|
|
59
|
-
} }), _jsx("div", { style: {
|
|
60
|
-
...barStyles,
|
|
61
|
-
top: `${topOffset + barHeight + margin}px`,
|
|
62
|
-
transform: `${toggled ? `rotate(45deg) translate(0, -${move}px)` : "none"}`,
|
|
63
|
-
} }), _jsx(HamburgerLabel, { "$toggled": toggled, children: "Menu" })] }));
|
|
48
|
+
export var Hamburger = function (_a) {
|
|
49
|
+
var toggled = _a.toggled, props = __rest(_a, ["toggled"]);
|
|
50
|
+
return (_jsxs("div", __assign({ style: __assign(__assign({}, burgerStyles), { transform: "".concat(toggled ? "rotate(90deg)" : "none") }), tabIndex: 0 }, props, { children: [_jsx("div", { style: __assign(__assign({}, barStyles), { top: "".concat(topOffset, "px"), transform: "".concat(toggled ? "rotate(-45deg) translate(0px, ".concat(move, "px)") : "none") }) }), _jsx("div", { style: __assign(__assign({}, barStyles), { top: "".concat(topOffset + barHeight + margin, "px"), transform: "".concat(toggled ? "rotate(45deg) translate(0, -".concat(move, "px)") : "none") }) }), _jsx(HamburgerLabel, __assign({ "$toggled": toggled }, { children: "Menu" }))] })));
|
|
64
51
|
};
|
|
52
|
+
var templateObject_1;
|
package/Header/useHeader.js
CHANGED
|
@@ -2,21 +2,21 @@ import { useEffect, useState } from "react";
|
|
|
2
2
|
import { useScrollPosition } from "../hooks/useScrollPosition";
|
|
3
3
|
import { useTheme } from "../styles/theme";
|
|
4
4
|
import { useMedia } from "../styles/media";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
useScrollPosition((currentPosition)
|
|
14
|
-
|
|
5
|
+
export var useHeader = function () {
|
|
6
|
+
var _a = useState(false), isSticky = _a[0], setIsSticky = _a[1];
|
|
7
|
+
var themed = useTheme().header;
|
|
8
|
+
var isDesktopLayout = useMedia("min:".concat(themed.breakpoint));
|
|
9
|
+
var valueIdx = isDesktopLayout ? 1 : 0;
|
|
10
|
+
var _b = useState(themed.height[valueIdx]), headerHeight = _b[0], setHeaderHeight = _b[1];
|
|
11
|
+
var _c = useState(themed.height[valueIdx]), placeholderHeight = _c[0], setPlaceholderHeight = _c[1];
|
|
12
|
+
var _d = useState(themed.logoWidth[valueIdx]), logoWidth = _d[0], setLogoWidth = _d[1];
|
|
13
|
+
useScrollPosition(function (currentPosition) {
|
|
14
|
+
var isPastThreshold = currentPosition.y * -1 > 40;
|
|
15
15
|
if (isSticky !== isPastThreshold)
|
|
16
16
|
setIsSticky(isPastThreshold);
|
|
17
17
|
}, [isSticky]);
|
|
18
|
-
useEffect(()
|
|
19
|
-
|
|
18
|
+
useEffect(function () {
|
|
19
|
+
var valueIdx = isDesktopLayout ? 1 : 0;
|
|
20
20
|
setPlaceholderHeight(themed.height[valueIdx]);
|
|
21
21
|
setHeaderHeight(isSticky ? themed.heightSticky[valueIdx] : themed.height[valueIdx]);
|
|
22
22
|
setLogoWidth(isSticky ? themed.logoWidthSticky[valueIdx] : themed.logoWidth[valueIdx]);
|
package/Hidden/Hidden.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
+
import { __makeTemplateObject } from "tslib";
|
|
1
2
|
import styled from "styled-components";
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
display: none
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
@media (max-width: ${p.theme.breakpoints[p.$max]}px) {
|
|
11
|
-
display: none;
|
|
12
|
-
}`
|
|
13
|
-
: ""}`}
|
|
14
|
-
`;
|
|
3
|
+
export var Hidden = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (p) {
|
|
4
|
+
return "".concat(p.$min
|
|
5
|
+
? "\n @media (min-width: ".concat(p.theme.breakpoints[p.$min], "px) {\n display: none;\n }")
|
|
6
|
+
: "", " ").concat(p.$max
|
|
7
|
+
? "\n @media (max-width: ".concat(p.theme.breakpoints[p.$max], "px) {\n display: none;\n }")
|
|
8
|
+
: "");
|
|
9
|
+
});
|
|
10
|
+
var templateObject_1;
|
package/Img/sc/bare.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { __makeTemplateObject } from "tslib";
|
|
1
2
|
import styled from "styled-components";
|
|
2
3
|
// export type KoineImgProps = {
|
|
3
4
|
// /** @default "cover" */
|
|
4
5
|
// $fit?: "cover" | "contain";
|
|
5
6
|
// };
|
|
6
|
-
export
|
|
7
|
+
export var KoineImg = styled.img(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
|
|
8
|
+
var templateObject_1;
|
|
7
9
|
// export const KoineImg = styled.img<KoineImgProps>`
|
|
8
10
|
// object-fit: ${(p) => p.$fit || "cover"};
|
|
9
11
|
// `;
|
package/Link/Link.js
CHANGED
package/Link/LinkBlank.js
CHANGED
|
@@ -1,26 +1,17 @@
|
|
|
1
|
+
import { __assign, __makeTemplateObject, __rest } from "tslib";
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import styled from "styled-components";
|
|
3
4
|
import { MdLaunch as IconOutboundLink } from "react-icons/md";
|
|
4
5
|
import { max } from "../styles/media";
|
|
5
|
-
export
|
|
6
|
+
export var LinkBlankA = styled.a.attrs({
|
|
6
7
|
target: "_blank",
|
|
7
8
|
rel: "noopener",
|
|
8
|
-
})
|
|
9
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
|
|
9
10
|
// TODO: use `touch` class on <html> instead of relying on screenwidth,
|
|
10
11
|
// probably implement a lean Modernizr like thing with react-helmet
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
line-height: inherit;
|
|
16
|
-
vertical-align: middle;
|
|
17
|
-
width: 0px;
|
|
18
|
-
transition: width 0.1s ease-in-out;
|
|
19
|
-
${max.sm} {
|
|
20
|
-
width: 20px;
|
|
21
|
-
opacity: 0.8;
|
|
22
|
-
}
|
|
23
|
-
`;
|
|
24
|
-
export const LinkBlank = ({ children, target, rel, ...props }) => {
|
|
25
|
-
return (_jsxs(LinkBlankA, { ...props, children: [children, _jsx(LinkBlankIcon, {})] }));
|
|
12
|
+
export var LinkBlankIcon = styled(IconOutboundLink)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: var(---grey100);\n font-size: inherit;\n margin-left: 3px;\n line-height: inherit;\n vertical-align: middle;\n width: 0px;\n transition: width 0.1s ease-in-out;\n ", " {\n width: 20px;\n opacity: 0.8;\n }\n"], ["\n color: var(---grey100);\n font-size: inherit;\n margin-left: 3px;\n line-height: inherit;\n vertical-align: middle;\n width: 0px;\n transition: width 0.1s ease-in-out;\n ", " {\n width: 20px;\n opacity: 0.8;\n }\n"])), max.sm);
|
|
13
|
+
export var LinkBlank = function (_a) {
|
|
14
|
+
var children = _a.children, target = _a.target, rel = _a.rel, props = __rest(_a, ["children", "target", "rel"]);
|
|
15
|
+
return (_jsxs(LinkBlankA, __assign({}, props, { children: [children, _jsx(LinkBlankIcon, {})] })));
|
|
26
16
|
};
|
|
17
|
+
var templateObject_1, templateObject_2;
|
package/Menu/Menu.js
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
+
import { __makeTemplateObject } from "tslib";
|
|
1
2
|
import styled from "styled-components";
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
position: absolute;
|
|
5
|
-
list-style-type: none;
|
|
6
|
-
margin: 0;
|
|
7
|
-
padding: 0;
|
|
8
|
-
background: #fff;
|
|
9
|
-
width: 100%;
|
|
10
|
-
box-shadow: var(--shadow);
|
|
11
|
-
`;
|
|
3
|
+
export var Menu = styled.ul(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n z-index: 3;\n position: absolute;\n list-style-type: none;\n margin: 0;\n padding: 0;\n background: #fff;\n width: 100%;\n box-shadow: var(--shadow);\n"], ["\n z-index: 3;\n position: absolute;\n list-style-type: none;\n margin: 0;\n padding: 0;\n background: #fff;\n width: 100%;\n box-shadow: var(--shadow);\n"])));
|
|
4
|
+
var templateObject_1;
|
package/MenuItem/MenuItem.js
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
|
+
import { __makeTemplateObject } from "tslib";
|
|
1
2
|
import styled from "styled-components";
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
&[aria-selected="true"] {
|
|
6
|
-
background: var(--accent400);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/** DEP: this is just for MultiselectMui? */
|
|
10
|
-
&.Mui-focused,
|
|
11
|
-
&[data-focus="true"] {
|
|
12
|
-
background: var(--accent300);
|
|
13
|
-
color: white;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&:not([disabled]):hover {
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
background: var(--accent300);
|
|
19
|
-
}
|
|
20
|
-
`;
|
|
3
|
+
export var MenuItem = styled.li(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 8px 16px;\n\n &[aria-selected=\"true\"] {\n background: var(--accent400);\n }\n\n /** DEP: this is just for MultiselectMui? */\n &.Mui-focused,\n &[data-focus=\"true\"] {\n background: var(--accent300);\n color: white;\n }\n\n &:not([disabled]):hover {\n cursor: pointer;\n background: var(--accent300);\n }\n"], ["\n padding: 8px 16px;\n\n &[aria-selected=\"true\"] {\n background: var(--accent400);\n }\n\n /** DEP: this is just for MultiselectMui? */\n &.Mui-focused,\n &[data-focus=\"true\"] {\n background: var(--accent300);\n color: white;\n }\n\n &:not([disabled]):hover {\n cursor: pointer;\n background: var(--accent300);\n }\n"])));
|
|
4
|
+
var templateObject_1;
|
package/Meta/Meta.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
export
|
|
3
|
-
|
|
2
|
+
export var Meta = function (_a) {
|
|
3
|
+
var zoom = _a.zoom;
|
|
4
|
+
return (_jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1, maximum-scale=1".concat(zoom ? "" : ", user-scalable=0") }));
|
|
4
5
|
};
|
package/NoJs/NoJs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
export
|
|
2
|
+
export var NoJs = function (_props) {
|
|
3
3
|
return (_jsx("script", { id: "no-js", dangerouslySetInnerHTML: {
|
|
4
|
-
__html:
|
|
4
|
+
__html: "document.querySelector(\"html\").className=document.querySelector(\"html\").className.replace(/no-js/,\"\") + \"js\";",
|
|
5
5
|
} }));
|
|
6
6
|
};
|
|
@@ -1,42 +1,16 @@
|
|
|
1
|
+
import { __assign, __makeTemplateObject } from "tslib";
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import styled from "styled-components";
|
|
3
4
|
import { CgArrowRightR as IconArrowRight, CgArrowLeftR as IconArrowLeft, } from "react-icons/cg";
|
|
4
5
|
import { ensureInt } from "@koine/utils";
|
|
5
|
-
|
|
6
|
-
display:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
text-decoration: none;
|
|
14
|
-
}
|
|
15
|
-
`;
|
|
16
|
-
const item = `
|
|
17
|
-
display: block;
|
|
18
|
-
padding: 5px 10px;
|
|
19
|
-
`;
|
|
20
|
-
const ItemCurrent = styled.span `
|
|
21
|
-
${item}
|
|
22
|
-
background: var(--accent400);
|
|
23
|
-
border-radius: 2px;
|
|
24
|
-
`;
|
|
25
|
-
const ItemLink = styled.a `
|
|
26
|
-
${item}
|
|
27
|
-
|
|
28
|
-
${(props) => (props.prev ? "color: var(--grey100);" : "")}
|
|
29
|
-
`;
|
|
30
|
-
const DotsSeparator = styled.span `
|
|
31
|
-
color: var(--grey100);
|
|
32
|
-
`;
|
|
33
|
-
const arrow = `display: flex; font-size: 20px;`;
|
|
34
|
-
const ItemPrev = styled.a `
|
|
35
|
-
${arrow}
|
|
36
|
-
`;
|
|
37
|
-
const ItemNext = styled.a `
|
|
38
|
-
${arrow}
|
|
39
|
-
`;
|
|
6
|
+
var Root = styled.nav(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 20px 0 40px;\n font-weight: 600;\n\n & a {\n text-decoration: none;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 20px 0 40px;\n font-weight: 600;\n\n & a {\n text-decoration: none;\n }\n"])));
|
|
7
|
+
var item = "\n display: block;\n padding: 5px 10px;\n";
|
|
8
|
+
var ItemCurrent = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n background: var(--accent400);\n border-radius: 2px;\n"], ["\n ", "\n background: var(--accent400);\n border-radius: 2px;\n"])), item);
|
|
9
|
+
var ItemLink = styled.a(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n\n ", "\n"], ["\n ", "\n\n ", "\n"])), item, function (props) { return (props.prev ? "color: var(--grey100);" : ""); });
|
|
10
|
+
var DotsSeparator = styled.span(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: var(--grey100);\n"], ["\n color: var(--grey100);\n"])));
|
|
11
|
+
var arrow = "display: flex; font-size: 20px;";
|
|
12
|
+
var ItemPrev = styled.a(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), arrow);
|
|
13
|
+
var ItemNext = styled.a(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), arrow);
|
|
40
14
|
/*
|
|
41
15
|
* Possible outcomes:
|
|
42
16
|
* [1] 2 3 ... 78 >
|
|
@@ -45,7 +19,8 @@ const ItemNext = styled.a `
|
|
|
45
19
|
* < 1 ... 75 76 [77] 78 >
|
|
46
20
|
* < 1 ... 76 77 [78]
|
|
47
21
|
*/
|
|
48
|
-
export
|
|
22
|
+
export var KoinePaginationNav = function (_a) {
|
|
23
|
+
var total = _a.total, perPage = _a.perPage, currentPage = _a.currentPage, baseUrl = _a.baseUrl, _b = _a.showOffset, showOffset = _b === void 0 ? 2 : _b, _c = _a.currentUrl, currentUrl = _c === void 0 ? "/" : _c, _d = _a.Link, Link = _d === void 0 ? "a" : _d;
|
|
49
24
|
total = ensureInt(total);
|
|
50
25
|
currentPage = ensureInt(currentPage);
|
|
51
26
|
perPage = ensureInt(perPage);
|
|
@@ -56,15 +31,15 @@ export const KoinePaginationNav = ({ total, perPage, currentPage, baseUrl, showO
|
|
|
56
31
|
if (total < perPage) {
|
|
57
32
|
return null;
|
|
58
33
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
34
|
+
var firstPage = 1;
|
|
35
|
+
var lastPage = Math.ceil(total / perPage);
|
|
36
|
+
var prevPage = currentPage - 1 > firstPage ? currentPage - 1 : "";
|
|
37
|
+
var nextPage = currentPage + 1 < lastPage ? currentPage + 1 : lastPage;
|
|
38
|
+
var prevArrow = currentPage > firstPage;
|
|
39
|
+
var nextArrow = currentPage < lastPage;
|
|
40
|
+
var pages = [];
|
|
66
41
|
// fill the pages before the current
|
|
67
|
-
for (
|
|
42
|
+
for (var i = currentPage - showOffset; i < currentPage; i++) {
|
|
68
43
|
if (i > 1) {
|
|
69
44
|
pages.push(i);
|
|
70
45
|
}
|
|
@@ -72,12 +47,15 @@ export const KoinePaginationNav = ({ total, perPage, currentPage, baseUrl, showO
|
|
|
72
47
|
// add the current
|
|
73
48
|
pages.push(currentPage);
|
|
74
49
|
// fill the pages after the current
|
|
75
|
-
for (
|
|
50
|
+
for (var i = currentPage + 1; i < currentPage + 1 + showOffset; i++) {
|
|
76
51
|
if (i < lastPage) {
|
|
77
52
|
pages.push(i);
|
|
78
53
|
}
|
|
79
54
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return (_jsxs(Root, { children: [prevArrow && (_jsx(ItemPrev, { as: Link, href:
|
|
55
|
+
var prevDots = pages[0] > firstPage + 1;
|
|
56
|
+
var nextDots = pages[pages.length - 1] < lastPage - 1;
|
|
57
|
+
return (_jsxs(Root, { children: [prevArrow && (_jsx(ItemPrev, __assign({ as: Link, href: "".concat(baseUrl, "/").concat(prevPage) }, { children: _jsx(IconArrowLeft, {}) }))), firstPage !== currentPage && (_jsx(ItemLink, __assign({ as: Link, href: "".concat(baseUrl), prev: true }, { children: firstPage }))), prevDots && _jsx(DotsSeparator, { children: "..." }), pages.map(function (page) {
|
|
58
|
+
return page === currentPage ? (_jsx(ItemCurrent, { children: page }, page)) : (_jsx(ItemLink, __assign({ as: Link, href: "".concat(baseUrl, "/").concat(page), prev: page < currentPage, next: page > currentPage }, { children: page }), "pagination-".concat(page)));
|
|
59
|
+
}), nextDots && _jsx(DotsSeparator, { children: "..." }), lastPage !== currentPage && (_jsx(ItemLink, __assign({ as: Link, href: "".concat(baseUrl, "/").concat(lastPage), next: true }, { children: lastPage }))), nextArrow && (_jsx(ItemNext, __assign({ as: Link, href: "".concat(baseUrl, "/").concat(nextPage) }, { children: _jsx(IconArrowRight, {}) })))] }));
|
|
83
60
|
};
|
|
61
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { __assign, __makeTemplateObject } from "tslib";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import styled from "styled-components";
|
|
3
4
|
import { AnimatePresence, m } from "framer-motion";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return (_jsx(AnimatePresence, { exitBeforeEnter: true, initial: true, children: _jsx(Root, { children: _jsx(Inner, { initial: { opacity: 0, x: -100 }, animate: { opacity: 1, x: 0 }, exit: { opacity: 0, x: 100 }, transition: { type: "linear", staggerChildren: 0.3 }, children: children }) }) }));
|
|
5
|
+
var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // overflow: hidden;\n"], ["\n // overflow: hidden;\n"])));
|
|
6
|
+
var Inner = styled(m.div)(templateObject_2 || (templateObject_2 = __makeTemplateObject([""], [""])));
|
|
7
|
+
export var PaginationResults = function (_a) {
|
|
8
|
+
var children = _a.children;
|
|
9
|
+
return (_jsx(AnimatePresence, __assign({ exitBeforeEnter: true, initial: true }, { children: _jsx(Root, { children: _jsx(Inner, __assign({ initial: { opacity: 0, x: -100 }, animate: { opacity: 1, x: 0 }, exit: { opacity: 0, x: 100 }, transition: { type: "linear", staggerChildren: 0.3 } }, { children: children })) }) })));
|
|
10
10
|
};
|
|
11
|
+
var templateObject_1, templateObject_2;
|
package/Pill/Pill.js
CHANGED
|
@@ -1,37 +1,7 @@
|
|
|
1
|
+
import { __makeTemplateObject } from "tslib";
|
|
1
2
|
import styled from "styled-components";
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
text-decoration: none;
|
|
8
|
-
font-size: 13px;
|
|
9
|
-
font-weight: 600;
|
|
10
|
-
`;
|
|
11
|
-
export const PillGreyLight = styled(Pill) `
|
|
12
|
-
background: var(--grey800);
|
|
13
|
-
color: var(--grey100);
|
|
14
|
-
|
|
15
|
-
&:hover {
|
|
16
|
-
color: white;
|
|
17
|
-
background: var(--grey300);
|
|
18
|
-
}
|
|
19
|
-
`;
|
|
20
|
-
export const PillAccentLight = styled(Pill) `
|
|
21
|
-
background: var(--accent400);
|
|
22
|
-
color: var(--grey100);
|
|
23
|
-
|
|
24
|
-
&:hover {
|
|
25
|
-
color: #fff;
|
|
26
|
-
background: var(--accent300);
|
|
27
|
-
}
|
|
28
|
-
`;
|
|
29
|
-
export const PillAccentLightOutlined = styled(Pill) `
|
|
30
|
-
border: 1px solid var(--accent300);
|
|
31
|
-
color: var(--accent200);
|
|
32
|
-
|
|
33
|
-
&:hover {
|
|
34
|
-
color: #fff;
|
|
35
|
-
background: var(--accent300);
|
|
36
|
-
}
|
|
37
|
-
`;
|
|
3
|
+
export var Pill = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-block;\n padding: 5px 10px;\n margin: 0 0.5em 0.5em 0;\n border-radius: 2px;\n text-decoration: none;\n font-size: 13px;\n font-weight: 600;\n"], ["\n display: inline-block;\n padding: 5px 10px;\n margin: 0 0.5em 0.5em 0;\n border-radius: 2px;\n text-decoration: none;\n font-size: 13px;\n font-weight: 600;\n"])));
|
|
4
|
+
export var PillGreyLight = styled(Pill)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: var(--grey800);\n color: var(--grey100);\n\n &:hover {\n color: white;\n background: var(--grey300);\n }\n"], ["\n background: var(--grey800);\n color: var(--grey100);\n\n &:hover {\n color: white;\n background: var(--grey300);\n }\n"])));
|
|
5
|
+
export var PillAccentLight = styled(Pill)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background: var(--accent400);\n color: var(--grey100);\n\n &:hover {\n color: #fff;\n background: var(--accent300);\n }\n"], ["\n background: var(--accent400);\n color: var(--grey100);\n\n &:hover {\n color: #fff;\n background: var(--accent300);\n }\n"])));
|
|
6
|
+
export var PillAccentLightOutlined = styled(Pill)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border: 1px solid var(--accent300);\n color: var(--accent200);\n\n &:hover {\n color: #fff;\n background: var(--accent300);\n }\n"], ["\n border: 1px solid var(--accent300);\n color: var(--accent200);\n\n &:hover {\n color: #fff;\n background: var(--accent300);\n }\n"])));
|
|
7
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -1,36 +1,15 @@
|
|
|
1
|
+
import { __assign, __makeTemplateObject, __rest } from "tslib";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import styled, { keyframes } from "styled-components";
|
|
3
|
-
|
|
4
|
-
0% {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
100% {
|
|
8
|
-
transform: rotate(360deg);
|
|
9
|
-
}
|
|
10
|
-
`;
|
|
11
|
-
const animationCircle = keyframes `
|
|
12
|
-
0% {
|
|
13
|
-
stroke-dasharray: 1px, 200px;
|
|
14
|
-
stroke-dashoffset: 0;
|
|
15
|
-
}
|
|
16
|
-
50% {
|
|
17
|
-
stroke-dasharray: 100px, 200px;
|
|
18
|
-
stroke-dashoffset: -15px;
|
|
19
|
-
}
|
|
20
|
-
100% {
|
|
21
|
-
stroke-dasharray: 100px, 200px;
|
|
22
|
-
stroke-dashoffset: -125px;
|
|
23
|
-
}
|
|
24
|
-
`;
|
|
25
|
-
const ProgressCircularSvg = styled.svg `
|
|
26
|
-
animation: ${animationRotation} 1.5s linear infinite;
|
|
27
|
-
`;
|
|
28
|
-
const ProgressCircularCircle = styled.circle `
|
|
29
|
-
animation: ${animationCircle} 1.5s linear infinite;
|
|
30
|
-
`;
|
|
4
|
+
var animationRotation = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"], ["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"])));
|
|
5
|
+
var animationCircle = keyframes(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"], ["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])));
|
|
6
|
+
var ProgressCircularSvg = styled.svg(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n animation: ", " 1.5s linear infinite;\n"], ["\n animation: ", " 1.5s linear infinite;\n"])), animationRotation);
|
|
7
|
+
var ProgressCircularCircle = styled.circle(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n animation: ", " 1.5s linear infinite;\n"], ["\n animation: ", " 1.5s linear infinite;\n"])), animationCircle);
|
|
31
8
|
/**
|
|
32
9
|
* @see https://mui.com/components/progress/
|
|
33
10
|
*/
|
|
34
|
-
export
|
|
35
|
-
|
|
11
|
+
export var ProgressCircular = function (_a) {
|
|
12
|
+
var _b = _a.size, size = _b === void 0 ? "1em" : _b, _c = _a.thickness, thickness = _c === void 0 ? 1 : _c, _d = _a.color, color = _d === void 0 ? "currentColor" : _d, props = __rest(_a, ["size", "thickness", "color"]);
|
|
13
|
+
return (_jsx(ProgressCircularSvg, __assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 44 44", style: { width: size, height: size } }, props, { children: _jsx(ProgressCircularCircle, { cx: "22", cy: "22", r: "20", fill: "none", strokeWidth: thickness, style: { stroke: color } }) })));
|
|
36
14
|
};
|
|
15
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|