@koine/react 2.0.0-beta.10 → 2.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +11 -11
- package/Alert/Alert.js +0 -33
- package/Alert/Alert.stories.js +0 -39
- package/Alert/index.js +0 -6
- package/Animations/Reveal.js +0 -53
- package/Animations/Underline.js +0 -26
- package/Animations/index.js +0 -8
- package/Animations/useReveal.js +0 -83
- package/Autocomplete/AutocompleteDownshift.js +0 -167
- package/Autocomplete/AutocompleteDownshiftMultiselect.js +0 -362
- package/Autocomplete/AutocompleteMui.js +0 -183
- package/Autocomplete/AutocompleteReach.js +0 -121
- package/Autocomplete/components.js +0 -132
- package/Autocomplete/helpers.js +0 -34
- package/Autocomplete/index.js +0 -15
- package/Bg/BgColor.js +0 -64
- package/Bg/BgPhoto.js +0 -82
- package/Bg/BgSvg.js +0 -31
- package/Bg/index.js +0 -8
- package/Breadcrumbs/Breadcrumbs.js +0 -103
- package/Breadcrumbs/index.js +0 -6
- package/Buttons/Button.js +0 -106
- package/Buttons/ButtonComposite.js +0 -116
- package/Buttons/ButtonFab.js +0 -27
- package/Buttons/ButtonLink.js +0 -29
- package/Buttons/IconButton.js +0 -41
- package/Buttons/index.js +0 -10
- package/Calendar/CalendarDaygridCell.js +0 -105
- package/Calendar/CalendarDaygridNav.js +0 -63
- package/Calendar/CalendarDaygridTable.js +0 -126
- package/Calendar/CalendarLegend.js +0 -39
- package/Calendar/calendar-api-google.js +0 -110
- package/Calendar/index.js +0 -11
- package/Calendar/types.js +0 -4
- package/Calendar/useCalendar.js +0 -235
- package/Calendar/utils.js +0 -252
- package/Carousel/Carousel.js +0 -387
- package/Carousel/CarouselCss.js +0 -64
- package/Carousel/index.js +0 -6
- package/Collapsable/Collapsable.js +0 -11
- package/Collapsable/CollapsableReach.js +0 -251
- package/Collapsable/index.js +0 -7
- package/Debug/Debug.js +0 -34
- package/Debug/index.js +0 -6
- package/Details/Details.js +0 -117
- package/Details/Details.stories.js +0 -39
- package/Details/index.js +0 -6
- package/Dialog/DialogMui.js +0 -143
- package/Dialog/DialogMui.stories.js +0 -38
- package/Dialog/css/bare.js +0 -55
- package/Dialog/css/index.stories.js +0 -93
- package/Dialog/index.js +0 -11
- package/Dialog/m/bare.js +0 -125
- package/Dialog/m/basic.js +0 -50
- package/Dialog/m/index.js +0 -14
- package/Dialog/sc/bare.js +0 -83
- package/Dialog/sc/framer.js +0 -26
- package/Dialog/sc/framerMaterial.js +0 -26
- package/Dialog/sc/index.stories.js +0 -75
- package/Dialog/sc/material.js +0 -78
- package/Dialog/tw/bare.js +0 -55
- package/Dialog/tw/elegant.js +0 -54
- package/Dialog/tw/framer.js +0 -26
- package/Dialog/tw/framerMaterial.js +0 -26
- package/Dialog/tw/index.stories.js +0 -113
- package/Dialog/tw/material.js +0 -54
- package/Editor/Editor--tiptap.js +0 -72
- package/Editor/components.js +0 -59
- package/Editor/index.js +0 -6
- package/FaviconTags.js +0 -73
- package/Form/Form.js +0 -130
- package/Form/index.js +0 -6
- package/Form/sc/bare.js +0 -55
- package/Forms/Checkbox/Checkbox.js +0 -62
- package/Forms/Checkbox/index.js +0 -6
- package/Forms/Feedback/Feedback.js +0 -25
- package/Forms/Feedback/index.js +0 -6
- package/Forms/Field/Field.js +0 -75
- package/Forms/Field/FieldControl.js +0 -69
- package/Forms/Field/FieldHint.js +0 -17
- package/Forms/Field/index.js +0 -7
- package/Forms/Input/Input.js +0 -67
- package/Forms/Input/index.js +0 -6
- package/Forms/InputGroup/InputGroup.js +0 -85
- package/Forms/InputGroup/index.js +0 -6
- package/Forms/Label/Label.js +0 -46
- package/Forms/Label/index.js +0 -6
- package/Forms/Password/Password.js +0 -72
- package/Forms/Password/index.js +0 -6
- package/Forms/Radio/Radio.js +0 -68
- package/Forms/Radio/index.js +0 -6
- package/Forms/Switch/Switch.js +0 -80
- package/Forms/Switch/index.js +0 -6
- package/Forms/Textarea/Textarea.js +0 -45
- package/Forms/Textarea/TextareaRich.js +0 -58
- package/Forms/Textarea/index.js +0 -7
- package/Forms/Toggle/Toggle-tailwind.js +0 -99
- package/Forms/Toggle/Toggle.js +0 -175
- package/Forms/Toggle/index.js +0 -6
- package/Forms/Toggle/useToggle-tailwind.js +0 -202
- package/Forms/Toggle/useToggle.js +0 -145
- package/Forms/antispam.js +0 -59
- package/Forms/helpers.js +0 -72
- package/Forms/index.js +0 -19
- package/Forms/styles.js +0 -94
- package/Gauge/Gauge.js +0 -111
- package/Grid/Grid.js +0 -106
- package/Grid/index.js +0 -6
- package/Hamburger/Hamburger.js +0 -90
- package/Hamburger/index.js +0 -6
- package/Header/index.js +0 -6
- package/Header/useHeader.js +0 -54
- package/Hidden/Hidden.js +0 -21
- package/Hidden/index.js +0 -6
- package/Img/index.js +0 -6
- package/Img/sc/bare.js +0 -43
- package/Img/types.js +0 -6
- package/Link/Link.js +0 -13
- package/Link/LinkBlank.js +0 -52
- package/Link/index.js +0 -7
- package/Menu/Menu.js +0 -22
- package/Menu/MenuMui.js +0 -165
- package/Menu/index.js +0 -6
- package/MenuItem/MenuItem.js +0 -31
- package/MenuItem/MenuItemMui.js +0 -32
- package/MenuItem/index.js +0 -6
- package/MenuItem/useMenuItem.js +0 -96
- package/Meta/Meta.js +0 -26
- package/Meta/index.js +0 -12
- package/NoJs/NoJs.js +0 -28
- package/NoJs/index.js +0 -12
- package/Pagination/PaginationNav.js +0 -126
- package/Pagination/PaginationResults.js +0 -45
- package/Pagination/index.js +0 -7
- package/Pill/Pill.js +0 -62
- package/Pill/index.js +0 -6
- package/Progress/ProgressCircular.js +0 -62
- package/Progress/ProgressLinear.js +0 -53
- package/Progress/ProgressOverlay.js +0 -75
- package/Progress/index.js +0 -8
- package/Rating/Rating.js +0 -188
- package/Rating/index.js +0 -85
- package/Select/SelectDownshift.js +0 -47
- package/Select/components.js +0 -44
- package/Select/index.js +0 -13
- package/Sidebar/Sidebar.js +0 -74
- package/Sidebar/index.js +0 -6
- package/Spacing/Spacing.js +0 -55
- package/Spacing/index.js +0 -6
- package/Sticky/Sticky.js +0 -228
- package/Sticky/StickyCss.js +0 -20
- package/Sticky/index.js +0 -19
- package/Tabs/TabsMui.js +0 -91
- package/Tabs/TabsMui.stories.js +0 -38
- package/Tabs/index.js +0 -6
- package/Tabs/sc/bare.js +0 -86
- package/Tabs/sc/index.stories.js +0 -1
- package/Tabs/tw/bare.js +0 -45
- package/Tabs/tw/index.stories.js +0 -46
- package/Tabs/tw/material.js +0 -44
- package/Tabs/useTabs.js +0 -66
- package/Typography/CopyPasteVisible.js +0 -17
- package/Typography/Native.js +0 -90
- package/Typography/ReadMore.js +0 -125
- package/Typography/TextLoop.js +0 -108
- package/Typography/TypeStairs.js +0 -71
- package/Typography/index.js +0 -10
- package/css/index.js +0 -33
- package/helpers/classed.js +0 -66
- package/helpers/classed.stories.js +0 -140
- package/helpers/createUseMediaQueryWidth.js +0 -193
- package/helpers/extend-component.js +0 -32
- package/helpers/index.js +0 -9
- package/helpers/mergeRefs.js +0 -30
- package/hooks/index.js +0 -92
- package/hooks/types.js +0 -6
- package/hooks/useAsyncFn.js +0 -56
- package/hooks/useDateLocale.js +0 -51
- package/hooks/useFirstMountState.js +0 -28
- package/hooks/useFixedOffset.js +0 -67
- package/hooks/useFocus.js +0 -30
- package/hooks/useInterval.js +0 -44
- package/hooks/useIsomorphicLayoutEffect.js +0 -23
- package/hooks/useKeyUp.js +0 -40
- package/hooks/useMeasure.js +0 -189
- package/hooks/useMountedState.js +0 -31
- package/hooks/useNavigateAway.js +0 -69
- package/hooks/usePrevious.js +0 -33
- package/hooks/usePreviousRef.js +0 -27
- package/hooks/useScrollPosition.js +0 -83
- package/hooks/useScrollThreshold.js +0 -52
- package/hooks/useScrollTo.js +0 -39
- package/hooks/useSmoothScroll.js +0 -49
- package/hooks/useSpinDelay.js +0 -59
- package/hooks/useTraceUpdate.js +0 -39
- package/hooks/useUpdateEffect.js +0 -30
- package/hooks/useWindowSize.js +0 -43
- package/index.js +0 -10
- package/m/MotionProvider.js +0 -27
- package/m/index.js +0 -10
- package/m/lite.js +0 -12
- package/m/max.js +0 -12
- package/sc/index.js +0 -49
- package/scm/index.js +0 -40
- package/shared/index.js +0 -13
- package/styles/Body.js +0 -28
- package/styles/Global.js +0 -55
- package/styles/index.js +0 -142
- package/styles/media.js +0 -139
- package/styles/spacing.js +0 -70
- package/styles/styled.js +0 -58
- package/styles/theme--vanilla.js +0 -82
- package/styles/theme.js +0 -49
- package/tw/index.js +0 -33
- package/twm/index.js +0 -33
- package/types.js +0 -4
package/Dialog/tw/elegant.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
Root: function() {
|
|
13
|
-
return Root;
|
|
14
|
-
},
|
|
15
|
-
Backdrop: function() {
|
|
16
|
-
return Backdrop;
|
|
17
|
-
},
|
|
18
|
-
Container: function() {
|
|
19
|
-
return Container;
|
|
20
|
-
},
|
|
21
|
-
Paper: function() {
|
|
22
|
-
return Paper;
|
|
23
|
-
},
|
|
24
|
-
Close: function() {
|
|
25
|
-
return Close;
|
|
26
|
-
},
|
|
27
|
-
Header: function() {
|
|
28
|
-
return Header;
|
|
29
|
-
},
|
|
30
|
-
Body: function() {
|
|
31
|
-
return Body;
|
|
32
|
-
},
|
|
33
|
-
KoineDialog: function() {
|
|
34
|
-
return KoineDialog;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
const _helpers = require("../../helpers");
|
|
38
|
-
const _bare = require("./bare");
|
|
39
|
-
const Root = (0, _helpers.classed)(_bare.KoineDialog.Root)``;
|
|
40
|
-
const Backdrop = (0, _helpers.classed)(_bare.KoineDialog.Backdrop)`< class="bg-white/[.5] backdrop-blur-sm`;
|
|
41
|
-
const Container = (0, _helpers.classed)(_bare.KoineDialog.Container)``;
|
|
42
|
-
const Paper = (0, _helpers.classed)(_bare.KoineDialog.Paper)`< class="bg-white shadow-xl m-8 max-w-screen-sm border border-gray-400`;
|
|
43
|
-
const Close = (0, _helpers.classed)(_bare.KoineDialog.Close)`< class="absolute top-0 right-0 p-8 text-2xl opacity-20 hover:opacity-100 focus:opacity-100`;
|
|
44
|
-
const Header = (0, _helpers.classed)(_bare.KoineDialog.Header)`< class="p-8 text-2xl bold italic`;
|
|
45
|
-
const Body = (0, _helpers.classed)(_bare.KoineDialog.Body)`< class="p-8 pt-4`;
|
|
46
|
-
const KoineDialog = (0, _helpers.extendComponent)(_bare.KoineDialog, {
|
|
47
|
-
Root,
|
|
48
|
-
Backdrop,
|
|
49
|
-
Container,
|
|
50
|
-
Paper,
|
|
51
|
-
Close,
|
|
52
|
-
Header,
|
|
53
|
-
Body
|
|
54
|
-
});
|
package/Dialog/tw/framer.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "KoineDialog", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return KoineDialog;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _framermotion = require("framer-motion");
|
|
12
|
-
const _helpers = require("../../helpers");
|
|
13
|
-
const _bare = require("../m/bare");
|
|
14
|
-
const _basic = require("../m/basic");
|
|
15
|
-
const _bare1 = require("./bare");
|
|
16
|
-
const KoineDialog = (0, _helpers.extendComponent)(_bare.KoineDialog, {
|
|
17
|
-
Root: _bare1.Root,
|
|
18
|
-
Backdrop: (0, _framermotion.m)(_bare1.Backdrop),
|
|
19
|
-
Container: _bare1.Container,
|
|
20
|
-
Paper: (0, _framermotion.m)(_bare1.Paper),
|
|
21
|
-
Close: _bare1.Close,
|
|
22
|
-
Header: _bare1.Header,
|
|
23
|
-
Body: _bare1.Body,
|
|
24
|
-
mBackdrop: _basic.dialogBackdropMotion,
|
|
25
|
-
mPaper: _basic.dialogPaperMotion
|
|
26
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "KoineDialog", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return KoineDialog;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _framermotion = require("framer-motion");
|
|
12
|
-
const _helpers = require("../../helpers");
|
|
13
|
-
const _bare = require("../m/bare");
|
|
14
|
-
const _basic = require("../m/basic");
|
|
15
|
-
const _material = require("./material");
|
|
16
|
-
const KoineDialog = (0, _helpers.extendComponent)(_bare.KoineDialog, {
|
|
17
|
-
Root: _material.Root,
|
|
18
|
-
Backdrop: (0, _framermotion.m)(_material.Backdrop),
|
|
19
|
-
Container: _material.Container,
|
|
20
|
-
Paper: (0, _framermotion.m)(_material.Paper),
|
|
21
|
-
Close: _material.Close,
|
|
22
|
-
Header: _material.Header,
|
|
23
|
-
Body: _material.Body,
|
|
24
|
-
mBackdrop: _basic.dialogBackdropMotion,
|
|
25
|
-
mPaper: _basic.dialogPaperMotion
|
|
26
|
-
});
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
// import { KoineDialog as elegantComp } from "./elegant";
|
|
13
|
-
default: function() {
|
|
14
|
-
return _default;
|
|
15
|
-
},
|
|
16
|
-
bare: function() {
|
|
17
|
-
return bare;
|
|
18
|
-
},
|
|
19
|
-
material: function() {
|
|
20
|
-
return material;
|
|
21
|
-
},
|
|
22
|
-
framer: function() {
|
|
23
|
-
return framer;
|
|
24
|
-
},
|
|
25
|
-
framerMaterial: function() {
|
|
26
|
-
return framerMaterial;
|
|
27
|
-
},
|
|
28
|
-
customised: function() {
|
|
29
|
-
return customised;
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
33
|
-
const _stories = require("@koine/stories");
|
|
34
|
-
const _helpers = require("../../helpers");
|
|
35
|
-
const _bare = require("./bare");
|
|
36
|
-
const _framer = require("./framer");
|
|
37
|
-
const _framerMaterial = require("./framerMaterial");
|
|
38
|
-
const _material = require("./material");
|
|
39
|
-
const _default = {
|
|
40
|
-
title: "Base/Dialog/Tailwind",
|
|
41
|
-
..._stories.storyDialogMeta
|
|
42
|
-
};
|
|
43
|
-
const bareTemplate = (args)=>{
|
|
44
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_stories.StoryDialog, {
|
|
45
|
-
...args,
|
|
46
|
-
Dialog: _bare.KoineDialog
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
const bare = bareTemplate.bind({});
|
|
50
|
-
bare.args = _stories.storyDialogArgs;
|
|
51
|
-
const materialTemplate = (args)=>{
|
|
52
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_stories.StoryDialog, {
|
|
53
|
-
...args,
|
|
54
|
-
Dialog: _material.KoineDialog
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
const material = materialTemplate.bind({});
|
|
58
|
-
material.args = _stories.storyDialogArgs;
|
|
59
|
-
const framerTemplate = (args)=>{
|
|
60
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_stories.StoryDialog, {
|
|
61
|
-
...args,
|
|
62
|
-
Dialog: _framer.KoineDialog
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
const framer = framerTemplate.bind({});
|
|
66
|
-
framer.decorators = [
|
|
67
|
-
_stories.decoratorFramer
|
|
68
|
-
];
|
|
69
|
-
framer.args = _stories.storyDialogArgs;
|
|
70
|
-
const framerMaterialTemplate = (args)=>{
|
|
71
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_stories.StoryDialog, {
|
|
72
|
-
...args,
|
|
73
|
-
Dialog: _framerMaterial.KoineDialog
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
const framerMaterial = framerMaterialTemplate.bind({});
|
|
77
|
-
framerMaterial.decorators = [
|
|
78
|
-
_stories.decoratorFramer
|
|
79
|
-
];
|
|
80
|
-
framerMaterial.args = _stories.storyDialogArgs;
|
|
81
|
-
const customisedTemplate = (args)=>{
|
|
82
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_stories.StoryDialog, {
|
|
83
|
-
...args,
|
|
84
|
-
Dialog: _framer.KoineDialog
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
const customised = customisedTemplate.bind({});
|
|
88
|
-
customised.decorators = [
|
|
89
|
-
_stories.decoratorFramer
|
|
90
|
-
];
|
|
91
|
-
customised.args = {
|
|
92
|
-
..._stories.storyDialogArgs,
|
|
93
|
-
$scrollPaper: true,
|
|
94
|
-
Backdrop: (0, _helpers.classed)(_framer.KoineDialog.Backdrop)`< class="bg-sky-100/[.5]"`,
|
|
95
|
-
Paper: (0, _helpers.classed)(_framer.KoineDialog.Paper)`< class="shadow-2xl m-8 max-w-screen-sm bg-blue-500 text-white rounded-3xl"`,
|
|
96
|
-
Close: (0, _helpers.classed)(_framer.KoineDialog.Close)`< class="absolute lg:-right-8 lg:-top-8 p-4 text-4xl rounded-full bg-blue-300 hover:bg-blue-700 text-blue-800 hover:text-white"`,
|
|
97
|
-
Header: (0, _helpers.classed)(_framer.KoineDialog.Header)`< class="font-mono font-bold text-3xl p-12 pb-6`,
|
|
98
|
-
Body: (0, _helpers.classed)(_framer.KoineDialog.Body)`< class="px-12 pb-12 border-none"`,
|
|
99
|
-
mPaper: {
|
|
100
|
-
initial: {
|
|
101
|
-
scale: 0.9,
|
|
102
|
-
scaleX: 0
|
|
103
|
-
},
|
|
104
|
-
animate: {
|
|
105
|
-
scale: 1,
|
|
106
|
-
scaleX: 1
|
|
107
|
-
},
|
|
108
|
-
exit: {
|
|
109
|
-
scale: 0.9,
|
|
110
|
-
scaleX: 0
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
};
|
package/Dialog/tw/material.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
Root: function() {
|
|
13
|
-
return Root;
|
|
14
|
-
},
|
|
15
|
-
Backdrop: function() {
|
|
16
|
-
return Backdrop;
|
|
17
|
-
},
|
|
18
|
-
Container: function() {
|
|
19
|
-
return Container;
|
|
20
|
-
},
|
|
21
|
-
Paper: function() {
|
|
22
|
-
return Paper;
|
|
23
|
-
},
|
|
24
|
-
Close: function() {
|
|
25
|
-
return Close;
|
|
26
|
-
},
|
|
27
|
-
Header: function() {
|
|
28
|
-
return Header;
|
|
29
|
-
},
|
|
30
|
-
Body: function() {
|
|
31
|
-
return Body;
|
|
32
|
-
},
|
|
33
|
-
KoineDialog: function() {
|
|
34
|
-
return KoineDialog;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
const _helpers = require("../../helpers");
|
|
38
|
-
const _bare = require("./bare");
|
|
39
|
-
const Root = (0, _helpers.classed)(_bare.KoineDialog.Root)``;
|
|
40
|
-
const Backdrop = (0, _helpers.classed)(_bare.KoineDialog.Backdrop)`< class="bg-black/[.5] backdrop-blur-sm`;
|
|
41
|
-
const Container = (0, _helpers.classed)(_bare.KoineDialog.Container)``;
|
|
42
|
-
const Paper = (0, _helpers.classed)(_bare.KoineDialog.Paper)`< class="rounded bg-white shadow-xl m-8 max-w-screen-sm`;
|
|
43
|
-
const Close = (0, _helpers.classed)(_bare.KoineDialog.Close)`< class="absolute top-0 right-0 p-4 text-2xl opacity-50`;
|
|
44
|
-
const Header = (0, _helpers.classed)(_bare.KoineDialog.Header)`< class="p-4 text-xl`;
|
|
45
|
-
const Body = (0, _helpers.classed)(_bare.KoineDialog.Body)`< class="p-4 border-t border-gray-200`;
|
|
46
|
-
const KoineDialog = (0, _helpers.extendComponent)(_bare.KoineDialog, {
|
|
47
|
-
Root,
|
|
48
|
-
Backdrop,
|
|
49
|
-
Container,
|
|
50
|
-
Paper,
|
|
51
|
-
Close,
|
|
52
|
-
Header,
|
|
53
|
-
Body
|
|
54
|
-
});
|
package/Editor/Editor--tiptap.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
EditorBar: function() {
|
|
13
|
-
return EditorBar;
|
|
14
|
-
},
|
|
15
|
-
Editor: function() {
|
|
16
|
-
return Editor;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
21
|
-
const _react = require("@tiptap/react");
|
|
22
|
-
const _starterkit = /*#__PURE__*/ _interop_require_default._(require("@tiptap/starter-kit"));
|
|
23
|
-
const _react1 = require("react");
|
|
24
|
-
const _components = require("./components");
|
|
25
|
-
const EditorBar = ({ editor })=>{
|
|
26
|
-
const handleClick = (0, _react1.useCallback)((e, type)=>{
|
|
27
|
-
e.preventDefault();
|
|
28
|
-
// @ts-expect-error FIXME: cannot build this
|
|
29
|
-
editor?.chain().focus()[`toggle${type}`]().run();
|
|
30
|
-
}, [
|
|
31
|
-
editor
|
|
32
|
-
]);
|
|
33
|
-
if (!editor) {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_components.EditorBarRoot, {
|
|
37
|
-
children: [
|
|
38
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.EditorBarBtn, {
|
|
39
|
-
onClick: (e)=>handleClick(e, "Bold"),
|
|
40
|
-
className: editor.isActive("bold") ? "is-active" : "",
|
|
41
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.EditorIconBold, {})
|
|
42
|
-
}),
|
|
43
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.EditorBarBtn, {
|
|
44
|
-
onClick: (e)=>handleClick(e, "Italic"),
|
|
45
|
-
className: editor.isActive("bold") ? "is-active" : "",
|
|
46
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.EditorIconItalic, {})
|
|
47
|
-
})
|
|
48
|
-
]
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
const Editor = ({ options, ...props })=>{
|
|
52
|
-
const editor = (0, _react.useEditor)({
|
|
53
|
-
extensions: [
|
|
54
|
-
_starterkit.default
|
|
55
|
-
],
|
|
56
|
-
content: "",
|
|
57
|
-
...options || {}
|
|
58
|
-
});
|
|
59
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_components.EditorRoot, {
|
|
60
|
-
children: [
|
|
61
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.EditorGlobalStyles, {}),
|
|
62
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(EditorBar, {
|
|
63
|
-
editor: editor
|
|
64
|
-
}),
|
|
65
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_react.EditorContent, {
|
|
66
|
-
className: "EditorContent",
|
|
67
|
-
editor: editor,
|
|
68
|
-
...props
|
|
69
|
-
})
|
|
70
|
-
]
|
|
71
|
-
});
|
|
72
|
-
};
|
package/Editor/components.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
EditorIconBold: function() {
|
|
13
|
-
return _md.MdFormatBold;
|
|
14
|
-
},
|
|
15
|
-
EditorIconItalic: function() {
|
|
16
|
-
return _md.MdFormatItalic;
|
|
17
|
-
},
|
|
18
|
-
EditorRoot: function() {
|
|
19
|
-
return EditorRoot;
|
|
20
|
-
},
|
|
21
|
-
EditorBarRoot: function() {
|
|
22
|
-
return EditorBarRoot;
|
|
23
|
-
},
|
|
24
|
-
EditorBarBtn: function() {
|
|
25
|
-
return EditorBarBtn;
|
|
26
|
-
},
|
|
27
|
-
EditorGlobalStyles: function() {
|
|
28
|
-
return EditorGlobalStyles;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
32
|
-
const _styledcomponents = /*#__PURE__*/ _interop_require_wildcard._(require("styled-components"));
|
|
33
|
-
const _IconButton = require("../Buttons/IconButton");
|
|
34
|
-
const _styles = require("../Forms/styles");
|
|
35
|
-
const _md = require("react-icons/md");
|
|
36
|
-
const EditorRoot = _styledcomponents.default.div`
|
|
37
|
-
${_styles.inputBorder}
|
|
38
|
-
${_styles.inputFocus}
|
|
39
|
-
`;
|
|
40
|
-
const EditorBarRoot = _styledcomponents.default.div`
|
|
41
|
-
display: flex;
|
|
42
|
-
justify-content: flex-end;
|
|
43
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
44
|
-
/* background: var(--grey900); */
|
|
45
|
-
`;
|
|
46
|
-
const EditorBarBtn = (0, _styledcomponents.default)(_IconButton.IconButton)``;
|
|
47
|
-
const EditorGlobalStyles = (0, _styledcomponents.createGlobalStyle)`
|
|
48
|
-
.ProseMirror {
|
|
49
|
-
${_styles.inputPadding}
|
|
50
|
-
|
|
51
|
-
&:focus {
|
|
52
|
-
outline:none;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
> *:first-child {
|
|
56
|
-
margin-top: 0;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
`;
|
package/Editor/index.js
DELETED
package/FaviconTags.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
FaviconTags: function() {
|
|
13
|
-
return FaviconTags;
|
|
14
|
-
},
|
|
15
|
-
default: function() {
|
|
16
|
-
return _default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
20
|
-
const FaviconTags = ({ name, color, safariTabColor, tileColor, themeColor })=>{
|
|
21
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
22
|
-
children: [
|
|
23
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("link", {
|
|
24
|
-
rel: "shortcut icon",
|
|
25
|
-
href: "/favicon.ico",
|
|
26
|
-
type: "image/x-icon"
|
|
27
|
-
}),
|
|
28
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("link", {
|
|
29
|
-
rel: "apple-touch-icon",
|
|
30
|
-
sizes: "180x180",
|
|
31
|
-
href: "/apple-touch-icon.png"
|
|
32
|
-
}),
|
|
33
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("link", {
|
|
34
|
-
rel: "icon",
|
|
35
|
-
type: "image/png",
|
|
36
|
-
sizes: "32x32",
|
|
37
|
-
href: "/favicon-32x32.png"
|
|
38
|
-
}),
|
|
39
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("link", {
|
|
40
|
-
rel: "icon",
|
|
41
|
-
type: "image/png",
|
|
42
|
-
sizes: "16x16",
|
|
43
|
-
href: "/favicon-16x16.png"
|
|
44
|
-
}),
|
|
45
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("link", {
|
|
46
|
-
rel: "manifest",
|
|
47
|
-
href: "/site.webmanifest"
|
|
48
|
-
}),
|
|
49
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("link", {
|
|
50
|
-
rel: "mask-icon",
|
|
51
|
-
href: "/safari-pinned-tab.svg",
|
|
52
|
-
color: safariTabColor || color
|
|
53
|
-
}),
|
|
54
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("meta", {
|
|
55
|
-
name: "apple-mobile-web-app-title",
|
|
56
|
-
content: name
|
|
57
|
-
}),
|
|
58
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("meta", {
|
|
59
|
-
name: "application-name",
|
|
60
|
-
content: name
|
|
61
|
-
}),
|
|
62
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("meta", {
|
|
63
|
-
name: "msapplication-TileColor",
|
|
64
|
-
content: tileColor || color
|
|
65
|
-
}),
|
|
66
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("meta", {
|
|
67
|
-
name: "theme-color",
|
|
68
|
-
content: themeColor || color
|
|
69
|
-
})
|
|
70
|
-
]
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
const _default = FaviconTags;
|
package/Form/Form.js
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
Root: function() {
|
|
13
|
-
return Root;
|
|
14
|
-
},
|
|
15
|
-
Overlay: function() {
|
|
16
|
-
return Overlay;
|
|
17
|
-
},
|
|
18
|
-
Progress: function() {
|
|
19
|
-
return Progress;
|
|
20
|
-
},
|
|
21
|
-
Collapsable: function() {
|
|
22
|
-
return Collapsable;
|
|
23
|
-
},
|
|
24
|
-
Ok: function() {
|
|
25
|
-
return Ok;
|
|
26
|
-
},
|
|
27
|
-
Fail: function() {
|
|
28
|
-
return Fail;
|
|
29
|
-
},
|
|
30
|
-
Form: function() {
|
|
31
|
-
return Form;
|
|
32
|
-
},
|
|
33
|
-
KoineForm: function() {
|
|
34
|
-
return KoineForm;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
38
|
-
const _react = require("react");
|
|
39
|
-
const _helpers = require("../helpers");
|
|
40
|
-
const Root = "form";
|
|
41
|
-
const Overlay = "div";
|
|
42
|
-
const Progress = "div";
|
|
43
|
-
const Collapsable = "div";
|
|
44
|
-
const Ok = null;
|
|
45
|
-
const Fail = null;
|
|
46
|
-
const Form = ({ Root: _Root, Overlay: _Overlay, Progress: _Progress, Collapsable: _Collapsable, ok, fail, loading, Ok: _Ok, okProps = {
|
|
47
|
-
children: "Sent!"
|
|
48
|
-
}, Fail: _Fail, failProps = {
|
|
49
|
-
children: "Failed."
|
|
50
|
-
}, collapseOnOk, collapseOnFail, okTimeout = 3000, failTimeout = 3000, children, ...props })=>{
|
|
51
|
-
const [open, setOpen] = (0, _react.useState)("");
|
|
52
|
-
const commonProps = {
|
|
53
|
-
head: null,
|
|
54
|
-
components: {
|
|
55
|
-
HeadIcon: null
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
(0, _react.useEffect)(()=>{
|
|
59
|
-
if (!loading) {
|
|
60
|
-
if (ok) setOpen("ok");
|
|
61
|
-
else if (fail) setOpen("fail");
|
|
62
|
-
}
|
|
63
|
-
}, [
|
|
64
|
-
ok,
|
|
65
|
-
fail,
|
|
66
|
-
loading
|
|
67
|
-
]);
|
|
68
|
-
(0, _react.useEffect)(()=>{
|
|
69
|
-
let timeout;
|
|
70
|
-
if (open === "fail" && failTimeout) {
|
|
71
|
-
timeout = setTimeout(()=>setOpen(""), failTimeout);
|
|
72
|
-
} else if (open === "ok" && okTimeout) {
|
|
73
|
-
timeout = setTimeout(()=>setOpen(""), okTimeout);
|
|
74
|
-
}
|
|
75
|
-
return ()=>{
|
|
76
|
-
if (timeout) {
|
|
77
|
-
clearTimeout(timeout);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
}, [
|
|
81
|
-
open,
|
|
82
|
-
failTimeout,
|
|
83
|
-
okTimeout
|
|
84
|
-
]);
|
|
85
|
-
let formExpanded = true;
|
|
86
|
-
if (collapseOnFail && fail) formExpanded = false;
|
|
87
|
-
if (collapseOnOk && ok) formExpanded = false;
|
|
88
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(Root, {
|
|
89
|
-
method: "post",
|
|
90
|
-
noValidate: true,
|
|
91
|
-
...props,
|
|
92
|
-
children: [
|
|
93
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(Collapsable, {
|
|
94
|
-
...commonProps,
|
|
95
|
-
$open: formExpanded,
|
|
96
|
-
recalc: loading,
|
|
97
|
-
body: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
98
|
-
children: [
|
|
99
|
-
children,
|
|
100
|
-
loading && /*#__PURE__*/ (0, _jsxruntime.jsx)(Overlay, {
|
|
101
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Progress, {})
|
|
102
|
-
})
|
|
103
|
-
]
|
|
104
|
-
})
|
|
105
|
-
}),
|
|
106
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(Collapsable, {
|
|
107
|
-
...commonProps,
|
|
108
|
-
$open: open === "ok" && !loading,
|
|
109
|
-
body: /*#__PURE__*/ (0, _jsxruntime.jsx)(Ok, {
|
|
110
|
-
...okProps
|
|
111
|
-
})
|
|
112
|
-
}),
|
|
113
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(Collapsable, {
|
|
114
|
-
...commonProps,
|
|
115
|
-
$open: open === "fail" && !loading,
|
|
116
|
-
body: /*#__PURE__*/ (0, _jsxruntime.jsx)(Fail, {
|
|
117
|
-
...failProps
|
|
118
|
-
})
|
|
119
|
-
})
|
|
120
|
-
]
|
|
121
|
-
});
|
|
122
|
-
};
|
|
123
|
-
const KoineForm = (0, _helpers.extendComponent)(Form, {
|
|
124
|
-
Root,
|
|
125
|
-
Overlay,
|
|
126
|
-
Progress,
|
|
127
|
-
Collapsable,
|
|
128
|
-
Ok,
|
|
129
|
-
Fail
|
|
130
|
-
}); // export default Form;
|
package/Form/index.js
DELETED
package/Form/sc/bare.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
Root: function() {
|
|
13
|
-
return Root;
|
|
14
|
-
},
|
|
15
|
-
Overlay: function() {
|
|
16
|
-
return Overlay;
|
|
17
|
-
},
|
|
18
|
-
Feedback: function() {
|
|
19
|
-
return Feedback;
|
|
20
|
-
},
|
|
21
|
-
KoineForm: function() {
|
|
22
|
-
return KoineForm;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
26
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
27
|
-
const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
28
|
-
const _Alert = require("../../Alert");
|
|
29
|
-
const _Collapsable = require("../../Collapsable");
|
|
30
|
-
const _Progress = require("../../Progress");
|
|
31
|
-
const _helpers = require("../../helpers");
|
|
32
|
-
const _styled = require("../../styles/styled");
|
|
33
|
-
const _Form = /*#__PURE__*/ _interop_require_wildcard._(require("../Form"));
|
|
34
|
-
const Root = (0, _styledcomponents.default)(_Form.Root)`
|
|
35
|
-
position: relative;
|
|
36
|
-
`;
|
|
37
|
-
const Overlay = (0, _styledcomponents.default)(_Form.Overlay)`
|
|
38
|
-
z-index: 4;
|
|
39
|
-
${_styled.overlay}
|
|
40
|
-
${_styled.centered}
|
|
41
|
-
background: rgba(var(--bodyBg--rgb),.8);
|
|
42
|
-
pointer-events: none;
|
|
43
|
-
backdrop-filter: blur(2px);
|
|
44
|
-
`;
|
|
45
|
-
const Feedback = (0, _styledcomponents.default)(_Alert.Alert)`
|
|
46
|
-
padding: 2em 0;
|
|
47
|
-
`;
|
|
48
|
-
const KoineForm = (0, _helpers.extendComponent)(_Form.KoineForm, {
|
|
49
|
-
Root,
|
|
50
|
-
Overlay,
|
|
51
|
-
Progress: _Progress.ProgressCircular,
|
|
52
|
-
Collapsable: _Collapsable.Collapsable,
|
|
53
|
-
Ok: Feedback,
|
|
54
|
-
Fail: Feedback
|
|
55
|
-
});
|