@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,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AutocompleteMenuItem = exports.AutocompleteMenu = exports.AutocompleteInputArrow = exports.AutocompleteInput = exports.AutocompleteInputWrap = exports.AutocompleteItemRemove = exports.AutocompleteItemLabel = exports.AutocompleteItem = exports.AutocompleteInner = exports.AutocompleteWrap = exports.AutocompleteLabel = exports.AutocompleteRoot = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
6
|
-
const Label_1 = require("../Forms/Label/Label");
|
|
7
|
-
const Input_1 = require("../Forms/Input/Input");
|
|
8
|
-
const components_1 = require("../Select/components");
|
|
9
|
-
const Menu_1 = require("../Menu/Menu");
|
|
10
|
-
const MenuItem_1 = require("../MenuItem/MenuItem");
|
|
11
|
-
const Buttons_1 = require("../Buttons");
|
|
12
|
-
const styles_1 = require("../Forms/styles");
|
|
13
|
-
const styled_1 = require("../styles/styled");
|
|
14
|
-
const AUTOCOMPLETE_ITEM_GUTTER = 3;
|
|
15
|
-
/**
|
|
16
|
-
* Space between one selected item and the other
|
|
17
|
-
*/
|
|
18
|
-
const AUTOCOMPLETE_ITEM_SPACER = 6;
|
|
19
|
-
const AUTOCOMPLETE_ITEM_REMOVE_WIDTH = 20;
|
|
20
|
-
exports.AutocompleteRoot = styled_components_1.default.div `
|
|
21
|
-
position: relative;
|
|
22
|
-
`;
|
|
23
|
-
exports.AutocompleteLabel = (0, styled_components_1.default)(Label_1.Label) ``;
|
|
24
|
-
exports.AutocompleteWrap = (0, styled_components_1.default)(Input_1.InputWrap) `
|
|
25
|
-
${styles_1.inputReset}
|
|
26
|
-
`;
|
|
27
|
-
exports.AutocompleteInner = (0, styled_components_1.default)(Input_1.InputMain) `
|
|
28
|
-
display: inline-flex;
|
|
29
|
-
flex-wrap: wrap;
|
|
30
|
-
margin: -${AUTOCOMPLETE_ITEM_SPACER}px;
|
|
31
|
-
margin-right: 0;
|
|
32
|
-
`;
|
|
33
|
-
exports.AutocompleteItem = styled_components_1.default.span `
|
|
34
|
-
position: relative;
|
|
35
|
-
display: inline-flex;
|
|
36
|
-
margin: ${AUTOCOMPLETE_ITEM_GUTTER}px;
|
|
37
|
-
max-width: calc(100% - 6px);
|
|
38
|
-
user-select: none;
|
|
39
|
-
align-items: center;
|
|
40
|
-
padding: 0 ${AUTOCOMPLETE_ITEM_REMOVE_WIDTH}px 0 ${AUTOCOMPLETE_ITEM_GUTTER}px;
|
|
41
|
-
font-size: 80%;
|
|
42
|
-
background: var(--accent400);
|
|
43
|
-
|
|
44
|
-
&:hover {
|
|
45
|
-
background: var(--accent300);
|
|
46
|
-
color: white;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&:focus {
|
|
50
|
-
outline: 0px;
|
|
51
|
-
background: var(--grey700);
|
|
52
|
-
}
|
|
53
|
-
`;
|
|
54
|
-
exports.AutocompleteItemLabel = styled_components_1.default.span `
|
|
55
|
-
padding: 0 ${AUTOCOMPLETE_ITEM_GUTTER}px;
|
|
56
|
-
${styled_1.ellipsis}
|
|
57
|
-
`;
|
|
58
|
-
exports.AutocompleteItemRemove = styled_components_1.default.span `
|
|
59
|
-
${Buttons_1.btnStyleReset}
|
|
60
|
-
position: absolute;
|
|
61
|
-
top: 0;
|
|
62
|
-
right: 0;
|
|
63
|
-
width: ${AUTOCOMPLETE_ITEM_REMOVE_WIDTH}px;
|
|
64
|
-
border: 0;
|
|
65
|
-
height: 100%;
|
|
66
|
-
color: inherit;
|
|
67
|
-
line-height: 1;
|
|
68
|
-
`;
|
|
69
|
-
exports.AutocompleteInputWrap = styled_components_1.default.div `
|
|
70
|
-
display: flex;
|
|
71
|
-
flex: 1;
|
|
72
|
-
`;
|
|
73
|
-
exports.AutocompleteInput = styled_components_1.default.input `
|
|
74
|
-
flex-grow: 1;
|
|
75
|
-
width: 0;
|
|
76
|
-
min-width: 30px;
|
|
77
|
-
border: 0;
|
|
78
|
-
padding: 0 ${AUTOCOMPLETE_ITEM_SPACER}px;
|
|
79
|
-
text-overflow: ellipsis;
|
|
80
|
-
background: transparent;
|
|
81
|
-
|
|
82
|
-
&:focus {
|
|
83
|
-
outline: none;
|
|
84
|
-
}
|
|
85
|
-
`;
|
|
86
|
-
/**
|
|
87
|
-
* This cannot be a button otherwise on `Enter` the form would submit instead
|
|
88
|
-
* of opening the dropdown or adding the selection. There are too many events
|
|
89
|
-
* to prevent if we were using a standard HTML `<button>`
|
|
90
|
-
*/
|
|
91
|
-
exports.AutocompleteInputArrow = (0, styled_components_1.default)(components_1.SelectArrow) ``;
|
|
92
|
-
exports.AutocompleteMenu = (0, styled_components_1.default)(Menu_1.Menu) ``;
|
|
93
|
-
exports.AutocompleteMenuItem = (0, styled_components_1.default)(MenuItem_1.MenuItem) ``;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normaliseAutocompleteValue = void 0;
|
|
4
|
-
const utils_1 = require("@koine/utils");
|
|
5
|
-
// export function normaliseAutocompleteValue(
|
|
6
|
-
// value?: AutocompleteValue,
|
|
7
|
-
// asArray?: true
|
|
8
|
-
// ): string[];
|
|
9
|
-
// export function normaliseAutocompleteValue(
|
|
10
|
-
// value?: AutocompleteValue,
|
|
11
|
-
// asArray?: false
|
|
12
|
-
// ): string;
|
|
13
|
-
// export function normaliseAutocompleteValue(
|
|
14
|
-
// value?: AutocompleteValue,
|
|
15
|
-
// asArray?: undefined
|
|
16
|
-
// ): string;
|
|
17
|
-
function normaliseAutocompleteValue(value, asArray) {
|
|
18
|
-
if (!value) {
|
|
19
|
-
return asArray ? [""] : "";
|
|
20
|
-
}
|
|
21
|
-
if ((0, utils_1.isString)(value)) {
|
|
22
|
-
return asArray ? [value] : value;
|
|
23
|
-
}
|
|
24
|
-
if ((0, utils_1.isArray)(value)) {
|
|
25
|
-
const values = value.map((valueItem) => {
|
|
26
|
-
return (0, utils_1.isString)(valueItem) ? valueItem : valueItem.value;
|
|
27
|
-
});
|
|
28
|
-
return asArray ? values : values.join(",");
|
|
29
|
-
}
|
|
30
|
-
return asArray ? [value.value] : value.value;
|
|
31
|
-
}
|
|
32
|
-
exports.normaliseAutocompleteValue = normaliseAutocompleteValue;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Autocomplete = void 0;
|
|
4
|
-
var AutocompleteMui_1 = require("./AutocompleteMui");
|
|
5
|
-
Object.defineProperty(exports, "Autocomplete", { enumerable: true, get: function () { return AutocompleteMui_1.Autocomplete; } });
|
|
6
|
-
// export type { AutocompleteProps } from "./AutocompleteReach";
|
|
7
|
-
// export { Autocomplete } from "./AutocompleteReach";
|
package/node/Bg/BgColor.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BgContainer = exports.BgColorSkewed = exports.BgColor = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
7
|
-
const styles_1 = require("../styles");
|
|
8
|
-
const Grid_1 = require("../Grid");
|
|
9
|
-
exports.BgColor = styled_components_1.default.div `
|
|
10
|
-
background: ${(p) => p.$bg};
|
|
11
|
-
`;
|
|
12
|
-
exports.BgColorSkewed = styled_components_1.default.div `
|
|
13
|
-
position: relative;
|
|
14
|
-
/* overflow: hidden; */
|
|
15
|
-
|
|
16
|
-
&:before {
|
|
17
|
-
z-index: -1;
|
|
18
|
-
content: "";
|
|
19
|
-
${(p) => `
|
|
20
|
-
${styles_1.overlay}
|
|
21
|
-
transform: ${p.$transform};
|
|
22
|
-
background: ${p.$bg};
|
|
23
|
-
`}
|
|
24
|
-
}
|
|
25
|
-
`;
|
|
26
|
-
const BgContainer = ({ color, skewY = 0, rotate = 0, scaleY = 1, // 0.85,
|
|
27
|
-
scaleX = 1, // 4,
|
|
28
|
-
perspective = 0, //100,
|
|
29
|
-
...containerProps }) => {
|
|
30
|
-
let $transform = "";
|
|
31
|
-
if (skewY || rotate) {
|
|
32
|
-
$transform = `perspective(${perspective}vw) rotateY(${rotate}deg) skewY(${skewY}deg) scaleY(${scaleY}) scaleX(${scaleX})`;
|
|
33
|
-
}
|
|
34
|
-
return $transform ? ((0, jsx_runtime_1.jsx)(exports.BgColorSkewed, { "$bg": color, "$transform": $transform, children: (0, jsx_runtime_1.jsx)(Grid_1.Container, { style: { position: "relative" }, ...containerProps }) })) : ((0, jsx_runtime_1.jsx)(exports.BgColor, { "$bg": color, children: (0, jsx_runtime_1.jsx)(Grid_1.Container, { ...containerProps }) }));
|
|
35
|
-
};
|
|
36
|
-
exports.BgContainer = BgContainer;
|
package/node/Bg/BgPhoto.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BgPhoto = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
7
|
-
const Grid_1 = require("../Grid");
|
|
8
|
-
const Hidden_1 = require("../Hidden");
|
|
9
|
-
const BgPhotoWrap = (0, styled_components_1.default)(Hidden_1.Hidden) `
|
|
10
|
-
z-index: -10;
|
|
11
|
-
position: fixed;
|
|
12
|
-
top: 0;
|
|
13
|
-
right: 0;
|
|
14
|
-
bottom: 0;
|
|
15
|
-
left: 0;
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
pointer-events: none;
|
|
18
|
-
background-repeat: no-repeat;
|
|
19
|
-
background-position: top left;
|
|
20
|
-
background-size: contain;
|
|
21
|
-
filter: hue-rotate(-36deg);
|
|
22
|
-
opacity: 0.8;
|
|
23
|
-
`;
|
|
24
|
-
const BgPhotoMask = (0, styled_components_1.default)(Grid_1.Container) `
|
|
25
|
-
position: relative;
|
|
26
|
-
min-height: 100%;
|
|
27
|
-
|
|
28
|
-
&:before {
|
|
29
|
-
content: "";
|
|
30
|
-
position: absolute;
|
|
31
|
-
top: 0;
|
|
32
|
-
height: 100%;
|
|
33
|
-
right: calc(100% - ${(p) => p.$overlap + 2}px);
|
|
34
|
-
width: ${(p) => {
|
|
35
|
-
const containerSizePx = p.theme.breakpoints[p.containerSize];
|
|
36
|
-
return `calc(((100vw - ${containerSizePx}px) / 2) + ${p.$overlap + 2}px)`;
|
|
37
|
-
}};
|
|
38
|
-
background: linear-gradient(
|
|
39
|
-
90deg,
|
|
40
|
-
rgba(var(--bodyBg-rgb, 0)) 0%,
|
|
41
|
-
rgba(var(--bodyBg-rgb, 1)) 100%
|
|
42
|
-
),
|
|
43
|
-
linear-gradient(
|
|
44
|
-
60deg,
|
|
45
|
-
rgba(var(--bodyBg-rgb, 0)) 0%,
|
|
46
|
-
rgba(var(--bodyBg-rgb, 1)) 70%
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&:after {
|
|
51
|
-
content: "";
|
|
52
|
-
position: absolute;
|
|
53
|
-
top: 0;
|
|
54
|
-
height: 100%;
|
|
55
|
-
left: ${(p) => p.$overlap + 1}px;
|
|
56
|
-
width: 100vw;
|
|
57
|
-
background: var(--bodyBg);
|
|
58
|
-
}
|
|
59
|
-
`;
|
|
60
|
-
const BgPhoto = ({ src, containerSize = "xl", $overlap = 0, }) => {
|
|
61
|
-
const styledProps = { containerSize, $overlap };
|
|
62
|
-
return ((0, jsx_runtime_1.jsx)(BgPhotoWrap, { style: { backgroundImage: `url(${src})` }, "$max": "xxl", children: (0, jsx_runtime_1.jsx)(BgPhotoMask, { size: containerSize, ...styledProps }) }));
|
|
63
|
-
};
|
|
64
|
-
exports.BgPhoto = BgPhoto;
|
package/node/Bg/BgSvg.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BgSvg = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
7
|
-
const Root = styled_components_1.default.svg `
|
|
8
|
-
position: fixed;
|
|
9
|
-
z-index: -2;
|
|
10
|
-
bottom: 0;
|
|
11
|
-
transform: rotate(180deg);
|
|
12
|
-
opacity: 0.9;
|
|
13
|
-
`;
|
|
14
|
-
/**
|
|
15
|
-
* Centered triangle shape
|
|
16
|
-
*/
|
|
17
|
-
const BgSvg = ({ color }) => {
|
|
18
|
-
return ((0, jsx_runtime_1.jsx)(Root, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1200 120", preserveAspectRatio: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M1200 0L0 0 598.97 114.72 1200 0z", fill: color }) }));
|
|
19
|
-
};
|
|
20
|
-
exports.BgSvg = BgSvg;
|
package/node/Bg/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./BgColor"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./BgPhoto"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./BgSvg"), exports);
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.KoineBreadcrumbs = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const styled_components_1 = tslib_1.__importStar(require("styled-components"));
|
|
7
|
-
const framer_motion_1 = require("framer-motion");
|
|
8
|
-
const md_1 = require("react-icons/md");
|
|
9
|
-
const utils_1 = require("@koine/utils");
|
|
10
|
-
const media_1 = require("../styles/media");
|
|
11
|
-
const LINK_GUTTER_X = 10;
|
|
12
|
-
const Root = styled_components_1.default.nav `
|
|
13
|
-
display: flex;
|
|
14
|
-
position: relative;
|
|
15
|
-
`;
|
|
16
|
-
const Inner = styled_components_1.default.div `
|
|
17
|
-
display: flex;
|
|
18
|
-
font-size: 11px;
|
|
19
|
-
color: var(--grey100);
|
|
20
|
-
${media_1.min.sm} {
|
|
21
|
-
font-size: 12px;
|
|
22
|
-
}
|
|
23
|
-
${media_1.max.lg} {
|
|
24
|
-
max-width: 100%;
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
white-space: nowrap;
|
|
27
|
-
}
|
|
28
|
-
`;
|
|
29
|
-
const Item = (0, styled_components_1.default)(framer_motion_1.m.div) `
|
|
30
|
-
display: flex;
|
|
31
|
-
align-items: center;
|
|
32
|
-
/* margin: 0 10px 0 0; */
|
|
33
|
-
|
|
34
|
-
&:first-child {
|
|
35
|
-
margin-left: -${LINK_GUTTER_X / 2}px;
|
|
36
|
-
}
|
|
37
|
-
${media_1.min.sm} {
|
|
38
|
-
&:first-child {
|
|
39
|
-
margin-left: -${LINK_GUTTER_X}px;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
`;
|
|
43
|
-
const itemChild = (0, styled_components_1.css) `
|
|
44
|
-
display: block;
|
|
45
|
-
padding: 10px ${LINK_GUTTER_X / 2}px;
|
|
46
|
-
|
|
47
|
-
${media_1.min.sm} {
|
|
48
|
-
padding: 10px ${LINK_GUTTER_X}px;
|
|
49
|
-
}
|
|
50
|
-
`;
|
|
51
|
-
const ItemLink = styled_components_1.default.a `
|
|
52
|
-
${itemChild}
|
|
53
|
-
text-decoration: none;
|
|
54
|
-
&:hover {
|
|
55
|
-
text-decoration: underline;
|
|
56
|
-
}
|
|
57
|
-
`;
|
|
58
|
-
const ItemCurrent = styled_components_1.default.span `
|
|
59
|
-
${itemChild}
|
|
60
|
-
`;
|
|
61
|
-
const ItemSeparator = (0, styled_components_1.default)(md_1.MdKeyboardArrowRight) ``;
|
|
62
|
-
const KoineBreadcrumbs = ({ items = [], Link, ...props }) => {
|
|
63
|
-
if (!items.length) {
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
return ((0, jsx_runtime_1.jsx)(Root, { ...props, children: (0, jsx_runtime_1.jsx)(Inner, { children: items.map((item, idx) => ((0, jsx_runtime_1.jsxs)(Item, { initial: { opacity: 0, x: 20 }, animate: {
|
|
67
|
-
opacity: 1,
|
|
68
|
-
x: 0,
|
|
69
|
-
transition: { delay: idx * 0.2 },
|
|
70
|
-
}, children: [item.url && ((0, jsx_runtime_1.jsx)(ItemLink, { as: Link, href: item.url, children: (0, utils_1.titleCase)(item.title) })), !item.url && (0, jsx_runtime_1.jsx)(ItemCurrent, { children: (0, utils_1.titleCase)(item.title) }), idx < items.length - 1 && (0, jsx_runtime_1.jsx)(ItemSeparator, {})] }, idx))) }) }));
|
|
71
|
-
};
|
|
72
|
-
exports.KoineBreadcrumbs = KoineBreadcrumbs;
|
package/node/Buttons/Button.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.KoineButton = exports.btnStyleOutlined = exports.btnStyleContained = exports.btnStyleBase = exports.btnStyleReset = exports.btnStyleUndo = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const styled_components_1 = tslib_1.__importStar(require("styled-components"));
|
|
6
|
-
const styled_1 = require("../styles/styled");
|
|
7
|
-
/**
|
|
8
|
-
* Prevent 300ms delay with `touch-action` performance optimization,
|
|
9
|
-
* @see https://twitter.com/argyleink/status/1405881231695302659
|
|
10
|
-
*/
|
|
11
|
-
exports.btnStyleUndo = (0, styled_components_1.css) `
|
|
12
|
-
appearance: none;
|
|
13
|
-
-webkit-appearance: none;
|
|
14
|
-
-webkit-touch-callout: none;
|
|
15
|
-
user-select: none;
|
|
16
|
-
touch-action: manipulation;
|
|
17
|
-
outline: 0px;
|
|
18
|
-
color: var(--bodyColor);
|
|
19
|
-
`;
|
|
20
|
-
exports.btnStyleReset = (0, styled_components_1.css) `
|
|
21
|
-
display: inline-flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
justify-content: center;
|
|
24
|
-
background: transparent;
|
|
25
|
-
border-width: 1px;
|
|
26
|
-
border-style: solid;
|
|
27
|
-
border-color: transparent;
|
|
28
|
-
cursor: pointer;
|
|
29
|
-
${exports.btnStyleUndo}
|
|
30
|
-
|
|
31
|
-
&[disabled] {
|
|
32
|
-
cursor: default;
|
|
33
|
-
opacity: 0.7;
|
|
34
|
-
}
|
|
35
|
-
`;
|
|
36
|
-
exports.btnStyleBase = (0, styled_components_1.css) `
|
|
37
|
-
${exports.btnStyleReset}
|
|
38
|
-
|
|
39
|
-
min-width: ${(p) => (p.$noGutter ? "0" : "150px")};
|
|
40
|
-
padding: ${(p) => (p.$noGutter ? "0" : "10px 30px")};
|
|
41
|
-
border-radius: 0;
|
|
42
|
-
text-align: center;
|
|
43
|
-
text-transform: uppercase;
|
|
44
|
-
font-weight: 600;
|
|
45
|
-
${(p) => p.$block && `width: 100%; display: flex;`}
|
|
46
|
-
|
|
47
|
-
&:focus,
|
|
48
|
-
&:active,
|
|
49
|
-
&:visited {
|
|
50
|
-
${styled_1.stateFocus}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/* This targets icons within a button */
|
|
54
|
-
& svg {
|
|
55
|
-
margin: 0 1em 0 0;
|
|
56
|
-
font-size: 1.25em;
|
|
57
|
-
}
|
|
58
|
-
`;
|
|
59
|
-
exports.btnStyleContained = (0, styled_components_1.css) `
|
|
60
|
-
color: white;
|
|
61
|
-
background: var(--accent200);
|
|
62
|
-
border-color: var(--accent200);
|
|
63
|
-
|
|
64
|
-
&:hover:not([disabled]) {
|
|
65
|
-
background: var(--accent300);
|
|
66
|
-
border-color: var(--accent300);
|
|
67
|
-
}
|
|
68
|
-
`;
|
|
69
|
-
exports.btnStyleOutlined = (0, styled_components_1.css) `
|
|
70
|
-
color: var(--accent200);
|
|
71
|
-
border-color: var(--accent200);
|
|
72
|
-
|
|
73
|
-
&:hover:not([disabled]) {
|
|
74
|
-
background: var(--accent300);
|
|
75
|
-
border-color: var(--accent300);
|
|
76
|
-
color: white;
|
|
77
|
-
}
|
|
78
|
-
`;
|
|
79
|
-
exports.KoineButton = styled_components_1.default.button `
|
|
80
|
-
${exports.btnStyleBase}
|
|
81
|
-
${(p) => p.$variant === "outlined" && exports.btnStyleOutlined}
|
|
82
|
-
${(p) => p.$variant === "contained" && exports.btnStyleContained}
|
|
83
|
-
`;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.KoineButtonComposite = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
8
|
-
const Root = styled_components_1.default.span `
|
|
9
|
-
${(p) => p.$icon ? `display: flex;` : `display: inline-block; text-align: left;`}
|
|
10
|
-
min-width: 0;
|
|
11
|
-
|
|
12
|
-
& svg {
|
|
13
|
-
font-size: 2em !important;
|
|
14
|
-
margin: 0 0.33em 0 0 !important;
|
|
15
|
-
}
|
|
16
|
-
`;
|
|
17
|
-
const ButtonCompositeIcon = styled_components_1.default.svg `
|
|
18
|
-
float: left;
|
|
19
|
-
`;
|
|
20
|
-
const BesidesIcon = styled_components_1.default.span `
|
|
21
|
-
text-align: left;
|
|
22
|
-
line-height: 1.2;
|
|
23
|
-
`;
|
|
24
|
-
const Main = styled_components_1.default.span `
|
|
25
|
-
display: block;
|
|
26
|
-
font-size: 0.9em;
|
|
27
|
-
|
|
28
|
-
&:last-child {
|
|
29
|
-
margin-top: ${(p) => (p.$reverse && !p.$icon ? "0.5em" : "0")};
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
32
|
-
const Sub = styled_components_1.default.span `
|
|
33
|
-
display: block;
|
|
34
|
-
text-transform: none;
|
|
35
|
-
font-size: 0.7em;
|
|
36
|
-
font-weight: 500;
|
|
37
|
-
|
|
38
|
-
${Main} + & {
|
|
39
|
-
margin-top: ${(p) => (p.$reverse && !p.$icon ? "0.5em" : "0")};
|
|
40
|
-
}
|
|
41
|
-
`;
|
|
42
|
-
const Text = styled_components_1.default.span ``;
|
|
43
|
-
const Inner = (0, react_1.memo)(({ textMain, textSub, text, $reverse, $icon, }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [$reverse ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [textSub && ((0, jsx_runtime_1.jsx)(Sub, { "$icon": $icon, "$reverse": $reverse, children: textSub })), textMain && ((0, jsx_runtime_1.jsx)(Main, { "$icon": $icon, "$reverse": $reverse, children: textMain }))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [textMain && ((0, jsx_runtime_1.jsx)(Main, { "$icon": $icon, "$reverse": $reverse, children: textMain })), textSub && ((0, jsx_runtime_1.jsx)(Sub, { "$icon": $icon, "$reverse": $reverse, children: textSub }))] })), text && (0, jsx_runtime_1.jsx)(Text, { children: text })] })));
|
|
44
|
-
const KoineButtonComposite = ({ Icon, iconProps = {}, textMain, textSub, textReverse, text, Button = "button", ButtonLink = "a", ...props }) => {
|
|
45
|
-
const Btn = props.href ? ButtonLink : Button;
|
|
46
|
-
const styledProps = {
|
|
47
|
-
$icon: !!Icon,
|
|
48
|
-
$reverse: textReverse,
|
|
49
|
-
$twoLines: !!(textMain && textSub && !Icon),
|
|
50
|
-
};
|
|
51
|
-
const innerProps = { textMain, textSub, text, ...styledProps };
|
|
52
|
-
return ((0, jsx_runtime_1.jsxs)(Root, { as: Btn, ...props, ...styledProps, children: [Icon && (0, jsx_runtime_1.jsx)(ButtonCompositeIcon, { as: Icon, ...iconProps }), Icon ? ((0, jsx_runtime_1.jsx)(BesidesIcon, { ...styledProps, children: (0, jsx_runtime_1.jsx)(Inner, { ...innerProps }) })) : ((0, jsx_runtime_1.jsx)(Inner, { ...innerProps }))] }));
|
|
53
|
-
};
|
|
54
|
-
exports.KoineButtonComposite = KoineButtonComposite;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IconButtonFab = exports.buttonFab = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const styled_components_1 = tslib_1.__importStar(require("styled-components"));
|
|
6
|
-
const IconButton_1 = require("./IconButton");
|
|
7
|
-
exports.buttonFab = (0, styled_components_1.css) `
|
|
8
|
-
box-shadow: 3px 3px 6px -4px rgb(0, 0, 0, 0.5);
|
|
9
|
-
`;
|
|
10
|
-
exports.IconButtonFab = (0, styled_components_1.default)(IconButton_1.IconButton) `
|
|
11
|
-
${exports.buttonFab}
|
|
12
|
-
`;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.KoineButtonLink = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
7
|
-
const Button_1 = require("./Button");
|
|
8
|
-
const Root = (0, styled_components_1.default)(Button_1.KoineButton) `
|
|
9
|
-
text-decoration: none;
|
|
10
|
-
`;
|
|
11
|
-
const KoineButtonLink = ({ href, Link = "a", ...props }) => {
|
|
12
|
-
const isRelative = href && href.startsWith("/");
|
|
13
|
-
return isRelative ? ((0, jsx_runtime_1.jsx)(Root, { href: href, ...props, as: Link })) : ((0, jsx_runtime_1.jsx)(Root, { href: href, ...props, as: "a" }));
|
|
14
|
-
};
|
|
15
|
-
exports.KoineButtonLink = KoineButtonLink;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IconButton = exports.iconBtnStyleBase = exports.iconBtnStyleReset = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const styled_components_1 = tslib_1.__importStar(require("styled-components"));
|
|
6
|
-
const Button_1 = require("./Button");
|
|
7
|
-
exports.iconBtnStyleReset = (0, styled_components_1.css) `
|
|
8
|
-
display: inline-flex;
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
width: 44px;
|
|
12
|
-
height: 44px;
|
|
13
|
-
border-radius: 100%;
|
|
14
|
-
${Button_1.btnStyleReset}
|
|
15
|
-
`;
|
|
16
|
-
exports.iconBtnStyleBase = (0, styled_components_1.css) `
|
|
17
|
-
${exports.iconBtnStyleReset}
|
|
18
|
-
`;
|
|
19
|
-
exports.IconButton = styled_components_1.default.button `
|
|
20
|
-
${exports.iconBtnStyleBase}
|
|
21
|
-
${(p) => p.$variant === "outlined" && Button_1.btnStyleOutlined}
|
|
22
|
-
${(p) => p.$variant === "contained" && Button_1.btnStyleContained}
|
|
23
|
-
`;
|
package/node/Buttons/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("./Button"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./ButtonComposite"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./ButtonFab"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./ButtonLink"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./IconButton"), exports);
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CalendarDaygridCell = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const md_1 = require("react-icons/md");
|
|
7
|
-
const utils_1 = require("./utils");
|
|
8
|
-
/**
|
|
9
|
-
* Style for button within a event cell
|
|
10
|
-
*
|
|
11
|
-
* Here we might differentiate week/month view where the first does not get
|
|
12
|
-
* ellipsed btn texts, with `Start` as block element and underneath the `Title`
|
|
13
|
-
* on multiple lines, but that would mean that we loose the ability to interweave
|
|
14
|
-
* single-day events among the spaces left by wider multi-days events.
|
|
15
|
-
*/
|
|
16
|
-
const styleBtn = {
|
|
17
|
-
overflow: "hidden",
|
|
18
|
-
whiteSpace: "nowrap",
|
|
19
|
-
textOverflow: "ellipsis",
|
|
20
|
-
};
|
|
21
|
-
const CalendarDaygridCell = ({ eventClicked, setEventClicked,
|
|
22
|
-
// eventHovered,
|
|
23
|
-
setEventHovered, view, maxEvents, events, calendarsMap, Cell = "div", CellOverflow = "div", CellEvent = "div", CellEventBtn = "div", CellEventTitle = "span", CellEventStart = "span", }) => {
|
|
24
|
-
const [isExpanded, expand] = (0, react_1.useState)(false);
|
|
25
|
-
const eventsWithoutPlaceholders = events.filter((event) => !event.placeholder);
|
|
26
|
-
return ((0, jsx_runtime_1.jsx)(Cell, { children: events.map((event, i) => {
|
|
27
|
-
if (i === maxEvents && !isExpanded) {
|
|
28
|
-
return ((0, jsx_runtime_1.jsxs)(CellOverflow, { onClick: () => expand(true), children: [(0, jsx_runtime_1.jsx)(md_1.MdAdd, {}), eventsWithoutPlaceholders.length - maxEvents] }, "overflowMessage" + i));
|
|
29
|
-
}
|
|
30
|
-
if (i > maxEvents && !isExpanded)
|
|
31
|
-
return null;
|
|
32
|
-
if (event.placeholder) {
|
|
33
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (0, jsx_runtime_1.jsx)(CellEvent, { "$placeholder": true, children: (0, jsx_runtime_1.jsx)(CellEventBtn, { "aria-hidden": "true", style: { visibility: "hidden" }, "$placeholder": true, children: (0, jsx_runtime_1.jsx)(CellEventTitle, { children: "\u00A0" }) }) }) }, event.key));
|
|
34
|
-
}
|
|
35
|
-
const styleEvent = {
|
|
36
|
-
zIndex: event.firstOfMulti ? 1 : 0,
|
|
37
|
-
position: "relative",
|
|
38
|
-
width: event.firstOfMulti ? `${100 * event.width}%` : "100%",
|
|
39
|
-
};
|
|
40
|
-
if (!calendarsMap[event.calendar.id].on) {
|
|
41
|
-
// @ts-expect-error nevermind
|
|
42
|
-
styleBtn.display = "none";
|
|
43
|
-
}
|
|
44
|
-
const styledProps = {
|
|
45
|
-
$view: view,
|
|
46
|
-
$selected: eventClicked?.uid === event.uid,
|
|
47
|
-
$past: event.isPast,
|
|
48
|
-
$color: event.color,
|
|
49
|
-
$isOutOfRange: event.$isOutOfRange,
|
|
50
|
-
$isToday: event.$isToday,
|
|
51
|
-
};
|
|
52
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (0, jsx_runtime_1.jsx)(CellEvent, { style: styleEvent, ...styledProps, children: (0, jsx_runtime_1.jsx)(CellEventBtn, { role: "button", style: styleBtn, ...styledProps, onClick: () => setEventClicked((prev) => prev?.uid === event.uid ? null : event), onMouseEnter: () => setEventHovered(event), onMouseLeave: () => setEventHovered(null), children: event.allDay ? ((0, jsx_runtime_1.jsx)(CellEventTitle, { children: event.title })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(CellEventStart, { children: (0, utils_1.getDisplayTime)(event.start) }), (0, jsx_runtime_1.jsx)(CellEventTitle, { children: event.title })] })) }) }) }, event.key));
|
|
53
|
-
}) }));
|
|
54
|
-
};
|
|
55
|
-
exports.CalendarDaygridCell = CalendarDaygridCell;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.KoineCalendarDaygridNav = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const format_1 = tslib_1.__importDefault(require("date-fns/format"));
|
|
7
|
-
const useDateLocale_1 = require("../hooks/useDateLocale");
|
|
8
|
-
const KoineCalendarDaygridNav = ({ range, view, todayInView, handlePrev, handleNext, handleToday, handleView, locale: localeCode, NavRoot = "nav", NavTitle = "div", NavBtns = "div", NavBtnPrev = "button", NavBtnNext = "button", NavBtnToday = "button", NavBtnViewMonth = "button", NavBtnViewWeek = "button", }) => {
|
|
9
|
-
const [start, end] = range;
|
|
10
|
-
const locale = (0, useDateLocale_1.useDateLocale)(localeCode);
|
|
11
|
-
const opts = { locale };
|
|
12
|
-
let formatted = "";
|
|
13
|
-
if (view === "month") {
|
|
14
|
-
formatted = (0, format_1.default)(start, "MMMM yyyy", opts);
|
|
15
|
-
}
|
|
16
|
-
if (view === "week") {
|
|
17
|
-
const inSameMonth = start.getMonth() === end.getMonth();
|
|
18
|
-
if (inSameMonth) {
|
|
19
|
-
formatted = (0, format_1.default)(start, "# MMMM yyyy", opts).replace("#", `${start.getDate()}-${end.getDate()}`);
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
formatted = `${(0, format_1.default)(start, "d MMMM", opts)} - ${(0, format_1.default)(end, "d MMMM yyyy", opts)}`;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return ((0, jsx_runtime_1.jsxs)(NavRoot, { children: [(0, jsx_runtime_1.jsxs)(NavBtns, { children: [(0, jsx_runtime_1.jsx)(NavBtnPrev, { onClick: handlePrev }), (0, jsx_runtime_1.jsx)(NavBtnNext, { onClick: handleNext }), (0, jsx_runtime_1.jsx)(NavBtnToday, { onClick: handleToday, disabled: todayInView }), (0, jsx_runtime_1.jsx)(NavBtnViewMonth, { onClick: () => handleView("month"), disabled: view === "month" }), (0, jsx_runtime_1.jsx)(NavBtnViewWeek, { onClick: () => handleView("week"), disabled: view === "week" })] }), (0, jsx_runtime_1.jsx)(NavTitle, { range: range, formatted: formatted })] }));
|
|
26
|
-
};
|
|
27
|
-
exports.KoineCalendarDaygridNav = KoineCalendarDaygridNav;
|