@koine/react 2.0.0-beta.10 → 2.0.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +11 -11
- package/Alert/Alert.js +0 -33
- package/Alert/Alert.stories.js +0 -39
- package/Alert/index.js +0 -6
- package/Animations/Reveal.js +0 -53
- package/Animations/Underline.js +0 -26
- package/Animations/index.js +0 -8
- package/Animations/useReveal.js +0 -83
- package/Autocomplete/AutocompleteDownshift.js +0 -167
- package/Autocomplete/AutocompleteDownshiftMultiselect.js +0 -362
- package/Autocomplete/AutocompleteMui.js +0 -183
- package/Autocomplete/AutocompleteReach.js +0 -121
- package/Autocomplete/components.js +0 -132
- package/Autocomplete/helpers.js +0 -34
- package/Autocomplete/index.js +0 -15
- package/Bg/BgColor.js +0 -64
- package/Bg/BgPhoto.js +0 -82
- package/Bg/BgSvg.js +0 -31
- package/Bg/index.js +0 -8
- package/Breadcrumbs/Breadcrumbs.js +0 -103
- package/Breadcrumbs/index.js +0 -6
- package/Buttons/Button.js +0 -106
- package/Buttons/ButtonComposite.js +0 -116
- package/Buttons/ButtonFab.js +0 -27
- package/Buttons/ButtonLink.js +0 -29
- package/Buttons/IconButton.js +0 -41
- package/Buttons/index.js +0 -10
- package/Calendar/CalendarDaygridCell.js +0 -105
- package/Calendar/CalendarDaygridNav.js +0 -63
- package/Calendar/CalendarDaygridTable.js +0 -126
- package/Calendar/CalendarLegend.js +0 -39
- package/Calendar/calendar-api-google.js +0 -110
- package/Calendar/index.js +0 -11
- package/Calendar/types.js +0 -4
- package/Calendar/useCalendar.js +0 -235
- package/Calendar/utils.js +0 -252
- package/Carousel/Carousel.js +0 -387
- package/Carousel/CarouselCss.js +0 -64
- package/Carousel/index.js +0 -6
- package/Collapsable/Collapsable.js +0 -11
- package/Collapsable/CollapsableReach.js +0 -251
- package/Collapsable/index.js +0 -7
- package/Debug/Debug.js +0 -34
- package/Debug/index.js +0 -6
- package/Details/Details.js +0 -117
- package/Details/Details.stories.js +0 -39
- package/Details/index.js +0 -6
- package/Dialog/DialogMui.js +0 -143
- package/Dialog/DialogMui.stories.js +0 -38
- package/Dialog/css/bare.js +0 -55
- package/Dialog/css/index.stories.js +0 -93
- package/Dialog/index.js +0 -11
- package/Dialog/m/bare.js +0 -125
- package/Dialog/m/basic.js +0 -50
- package/Dialog/m/index.js +0 -14
- package/Dialog/sc/bare.js +0 -83
- package/Dialog/sc/framer.js +0 -26
- package/Dialog/sc/framerMaterial.js +0 -26
- package/Dialog/sc/index.stories.js +0 -75
- package/Dialog/sc/material.js +0 -78
- package/Dialog/tw/bare.js +0 -55
- package/Dialog/tw/elegant.js +0 -54
- package/Dialog/tw/framer.js +0 -26
- package/Dialog/tw/framerMaterial.js +0 -26
- package/Dialog/tw/index.stories.js +0 -113
- package/Dialog/tw/material.js +0 -54
- package/Editor/Editor--tiptap.js +0 -72
- package/Editor/components.js +0 -59
- package/Editor/index.js +0 -6
- package/FaviconTags.js +0 -73
- package/Form/Form.js +0 -130
- package/Form/index.js +0 -6
- package/Form/sc/bare.js +0 -55
- package/Forms/Checkbox/Checkbox.js +0 -62
- package/Forms/Checkbox/index.js +0 -6
- package/Forms/Feedback/Feedback.js +0 -25
- package/Forms/Feedback/index.js +0 -6
- package/Forms/Field/Field.js +0 -75
- package/Forms/Field/FieldControl.js +0 -69
- package/Forms/Field/FieldHint.js +0 -17
- package/Forms/Field/index.js +0 -7
- package/Forms/Input/Input.js +0 -67
- package/Forms/Input/index.js +0 -6
- package/Forms/InputGroup/InputGroup.js +0 -85
- package/Forms/InputGroup/index.js +0 -6
- package/Forms/Label/Label.js +0 -46
- package/Forms/Label/index.js +0 -6
- package/Forms/Password/Password.js +0 -72
- package/Forms/Password/index.js +0 -6
- package/Forms/Radio/Radio.js +0 -68
- package/Forms/Radio/index.js +0 -6
- package/Forms/Switch/Switch.js +0 -80
- package/Forms/Switch/index.js +0 -6
- package/Forms/Textarea/Textarea.js +0 -45
- package/Forms/Textarea/TextareaRich.js +0 -58
- package/Forms/Textarea/index.js +0 -7
- package/Forms/Toggle/Toggle-tailwind.js +0 -99
- package/Forms/Toggle/Toggle.js +0 -175
- package/Forms/Toggle/index.js +0 -6
- package/Forms/Toggle/useToggle-tailwind.js +0 -202
- package/Forms/Toggle/useToggle.js +0 -145
- package/Forms/antispam.js +0 -59
- package/Forms/helpers.js +0 -72
- package/Forms/index.js +0 -19
- package/Forms/styles.js +0 -94
- package/Gauge/Gauge.js +0 -111
- package/Grid/Grid.js +0 -106
- package/Grid/index.js +0 -6
- package/Hamburger/Hamburger.js +0 -90
- package/Hamburger/index.js +0 -6
- package/Header/index.js +0 -6
- package/Header/useHeader.js +0 -54
- package/Hidden/Hidden.js +0 -21
- package/Hidden/index.js +0 -6
- package/Img/index.js +0 -6
- package/Img/sc/bare.js +0 -43
- package/Img/types.js +0 -6
- package/Link/Link.js +0 -13
- package/Link/LinkBlank.js +0 -52
- package/Link/index.js +0 -7
- package/Menu/Menu.js +0 -22
- package/Menu/MenuMui.js +0 -165
- package/Menu/index.js +0 -6
- package/MenuItem/MenuItem.js +0 -31
- package/MenuItem/MenuItemMui.js +0 -32
- package/MenuItem/index.js +0 -6
- package/MenuItem/useMenuItem.js +0 -96
- package/Meta/Meta.js +0 -26
- package/Meta/index.js +0 -12
- package/NoJs/NoJs.js +0 -28
- package/NoJs/index.js +0 -12
- package/Pagination/PaginationNav.js +0 -126
- package/Pagination/PaginationResults.js +0 -45
- package/Pagination/index.js +0 -7
- package/Pill/Pill.js +0 -62
- package/Pill/index.js +0 -6
- package/Progress/ProgressCircular.js +0 -62
- package/Progress/ProgressLinear.js +0 -53
- package/Progress/ProgressOverlay.js +0 -75
- package/Progress/index.js +0 -8
- package/Rating/Rating.js +0 -188
- package/Rating/index.js +0 -85
- package/Select/SelectDownshift.js +0 -47
- package/Select/components.js +0 -44
- package/Select/index.js +0 -13
- package/Sidebar/Sidebar.js +0 -74
- package/Sidebar/index.js +0 -6
- package/Spacing/Spacing.js +0 -55
- package/Spacing/index.js +0 -6
- package/Sticky/Sticky.js +0 -228
- package/Sticky/StickyCss.js +0 -20
- package/Sticky/index.js +0 -19
- package/Tabs/TabsMui.js +0 -91
- package/Tabs/TabsMui.stories.js +0 -38
- package/Tabs/index.js +0 -6
- package/Tabs/sc/bare.js +0 -86
- package/Tabs/sc/index.stories.js +0 -1
- package/Tabs/tw/bare.js +0 -45
- package/Tabs/tw/index.stories.js +0 -46
- package/Tabs/tw/material.js +0 -44
- package/Tabs/useTabs.js +0 -66
- package/Typography/CopyPasteVisible.js +0 -17
- package/Typography/Native.js +0 -90
- package/Typography/ReadMore.js +0 -125
- package/Typography/TextLoop.js +0 -108
- package/Typography/TypeStairs.js +0 -71
- package/Typography/index.js +0 -10
- package/css/index.js +0 -33
- package/helpers/classed.js +0 -66
- package/helpers/classed.stories.js +0 -140
- package/helpers/createUseMediaQueryWidth.js +0 -193
- package/helpers/extend-component.js +0 -32
- package/helpers/index.js +0 -9
- package/helpers/mergeRefs.js +0 -30
- package/hooks/index.js +0 -92
- package/hooks/types.js +0 -6
- package/hooks/useAsyncFn.js +0 -56
- package/hooks/useDateLocale.js +0 -51
- package/hooks/useFirstMountState.js +0 -28
- package/hooks/useFixedOffset.js +0 -67
- package/hooks/useFocus.js +0 -30
- package/hooks/useInterval.js +0 -44
- package/hooks/useIsomorphicLayoutEffect.js +0 -23
- package/hooks/useKeyUp.js +0 -40
- package/hooks/useMeasure.js +0 -189
- package/hooks/useMountedState.js +0 -31
- package/hooks/useNavigateAway.js +0 -69
- package/hooks/usePrevious.js +0 -33
- package/hooks/usePreviousRef.js +0 -27
- package/hooks/useScrollPosition.js +0 -83
- package/hooks/useScrollThreshold.js +0 -52
- package/hooks/useScrollTo.js +0 -39
- package/hooks/useSmoothScroll.js +0 -49
- package/hooks/useSpinDelay.js +0 -59
- package/hooks/useTraceUpdate.js +0 -39
- package/hooks/useUpdateEffect.js +0 -30
- package/hooks/useWindowSize.js +0 -43
- package/index.js +0 -10
- package/m/MotionProvider.js +0 -27
- package/m/index.js +0 -10
- package/m/lite.js +0 -12
- package/m/max.js +0 -12
- package/sc/index.js +0 -49
- package/scm/index.js +0 -40
- package/shared/index.js +0 -13
- package/styles/Body.js +0 -28
- package/styles/Global.js +0 -55
- package/styles/index.js +0 -142
- package/styles/media.js +0 -139
- package/styles/spacing.js +0 -70
- package/styles/styled.js +0 -58
- package/styles/theme--vanilla.js +0 -82
- package/styles/theme.js +0 -49
- package/tw/index.js +0 -33
- package/twm/index.js +0 -33
- package/types.js +0 -4
package/Tabs/useTabs.js
DELETED
|
@@ -1,66 +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
|
-
useTabs: function() {
|
|
13
|
-
return useTabs;
|
|
14
|
-
},
|
|
15
|
-
default: function() {
|
|
16
|
-
return _default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
21
|
-
const _useControlled = /*#__PURE__*/ _interop_require_default._(require("@mui/utils/useControlled"));
|
|
22
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
23
|
-
const useTabs = (props)=>{
|
|
24
|
-
const { value: valueProp, defaultValue, onChange, orientation, direction, selectionFollowsFocus } = props;
|
|
25
|
-
const [value, setValue] = (0, _useControlled.default)({
|
|
26
|
-
controlled: valueProp,
|
|
27
|
-
default: defaultValue,
|
|
28
|
-
name: "Tabs",
|
|
29
|
-
state: "value"
|
|
30
|
-
});
|
|
31
|
-
const idPrefix = (0, _react.useId)();
|
|
32
|
-
const onSelected = (0, _react.useCallback)((e, newValue)=>{
|
|
33
|
-
setValue(newValue);
|
|
34
|
-
if (onChange) {
|
|
35
|
-
onChange(e, newValue);
|
|
36
|
-
}
|
|
37
|
-
}, [
|
|
38
|
-
onChange,
|
|
39
|
-
setValue
|
|
40
|
-
]);
|
|
41
|
-
const getRootProps = ()=>{
|
|
42
|
-
return {};
|
|
43
|
-
};
|
|
44
|
-
const tabsContextValue = (0, _react.useMemo)(()=>{
|
|
45
|
-
return {
|
|
46
|
-
idPrefix,
|
|
47
|
-
value,
|
|
48
|
-
onSelected,
|
|
49
|
-
orientation,
|
|
50
|
-
direction,
|
|
51
|
-
selectionFollowsFocus
|
|
52
|
-
};
|
|
53
|
-
}, [
|
|
54
|
-
idPrefix,
|
|
55
|
-
value,
|
|
56
|
-
onSelected,
|
|
57
|
-
orientation,
|
|
58
|
-
direction,
|
|
59
|
-
selectionFollowsFocus
|
|
60
|
-
]);
|
|
61
|
-
return {
|
|
62
|
-
getRootProps,
|
|
63
|
-
tabsContextValue
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
const _default = useTabs;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "CopyPasteVisible", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return CopyPasteVisible;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
-
const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
13
|
-
const CopyPasteVisible = _styledcomponents.default.span`
|
|
14
|
-
color: transparent;
|
|
15
|
-
opacity: 0;
|
|
16
|
-
font-size: 0;
|
|
17
|
-
`;
|
package/Typography/Native.js
DELETED
|
@@ -1,90 +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
|
-
p: function() {
|
|
13
|
-
return p;
|
|
14
|
-
},
|
|
15
|
-
h1: function() {
|
|
16
|
-
return h1;
|
|
17
|
-
},
|
|
18
|
-
h2: function() {
|
|
19
|
-
return h2;
|
|
20
|
-
},
|
|
21
|
-
h3: function() {
|
|
22
|
-
return h3;
|
|
23
|
-
},
|
|
24
|
-
h4: function() {
|
|
25
|
-
return h4;
|
|
26
|
-
},
|
|
27
|
-
P: function() {
|
|
28
|
-
return P;
|
|
29
|
-
},
|
|
30
|
-
H1: function() {
|
|
31
|
-
return H1;
|
|
32
|
-
},
|
|
33
|
-
H2: function() {
|
|
34
|
-
return H2;
|
|
35
|
-
},
|
|
36
|
-
H3: function() {
|
|
37
|
-
return H3;
|
|
38
|
-
},
|
|
39
|
-
H4: function() {
|
|
40
|
-
return H4;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
44
|
-
const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
45
|
-
const _media = require("../styles/media");
|
|
46
|
-
const p = `
|
|
47
|
-
margin: 0 0 1em 0;
|
|
48
|
-
`;
|
|
49
|
-
const h1 = `
|
|
50
|
-
margin: 0 0 10px 0;
|
|
51
|
-
font-size: 30px;
|
|
52
|
-
font-weight: 800;
|
|
53
|
-
line-height: var(--headingsLineHeight);
|
|
54
|
-
${_media.min.md} {
|
|
55
|
-
font-size: 50px;
|
|
56
|
-
}
|
|
57
|
-
`;
|
|
58
|
-
const h2 = `
|
|
59
|
-
margin: 0 0 1em 0;
|
|
60
|
-
font-size: 24px;
|
|
61
|
-
font-weight: 800;
|
|
62
|
-
line-height: var(--headingsLineHeight);
|
|
63
|
-
`;
|
|
64
|
-
const h3 = `
|
|
65
|
-
margin: 0 0 1em 0;
|
|
66
|
-
font-size: 20px;
|
|
67
|
-
font-weight: 600;
|
|
68
|
-
line-height: var(--headingsLineHeight);
|
|
69
|
-
`;
|
|
70
|
-
const h4 = `
|
|
71
|
-
margin: 0 0 1em 0;
|
|
72
|
-
font-size: 13px;
|
|
73
|
-
font-weight: 600;
|
|
74
|
-
line-height: var(--headingsLineHeight);
|
|
75
|
-
`;
|
|
76
|
-
const P = _styledcomponents.default.div`
|
|
77
|
-
${p}
|
|
78
|
-
`;
|
|
79
|
-
const H1 = _styledcomponents.default.div`
|
|
80
|
-
${h1}
|
|
81
|
-
`;
|
|
82
|
-
const H2 = _styledcomponents.default.div`
|
|
83
|
-
${h2}
|
|
84
|
-
`;
|
|
85
|
-
const H3 = _styledcomponents.default.div`
|
|
86
|
-
${h3}
|
|
87
|
-
`;
|
|
88
|
-
const H4 = _styledcomponents.default.div`
|
|
89
|
-
${h4}
|
|
90
|
-
`;
|
package/Typography/ReadMore.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "ReadMore", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return ReadMore;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
14
|
-
const _framermotion = require("framer-motion");
|
|
15
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
16
|
-
const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
17
|
-
const _hooks = require("../hooks");
|
|
18
|
-
const Root = _styledcomponents.default.div``;
|
|
19
|
-
const Content = _styledcomponents.default.div`
|
|
20
|
-
& p:first-child {
|
|
21
|
-
margin-top: 0;
|
|
22
|
-
}
|
|
23
|
-
`;
|
|
24
|
-
const BtnWrap = _styledcomponents.default.span`
|
|
25
|
-
display: flex;
|
|
26
|
-
justify-content: flex-end;
|
|
27
|
-
transition: transform 0.18s ease-in-out;
|
|
28
|
-
text-align: right;
|
|
29
|
-
transform: translateY(${(p)=>p.$expanded ? "0" : "-100%"});
|
|
30
|
-
opacity: ${(p)=>p.$expanded ? 0 : 1};
|
|
31
|
-
`;
|
|
32
|
-
const BtnFader = _styledcomponents.default.div`
|
|
33
|
-
width: 30%;
|
|
34
|
-
transition: transform 0.18s ease-in-out;
|
|
35
|
-
background: linear-gradient(45deg, transparent 50%, ${(p)=>p.$bg} 70%);
|
|
36
|
-
`;
|
|
37
|
-
const Btn = _styledcomponents.default.span`
|
|
38
|
-
padding: 0 10px 0 10px;
|
|
39
|
-
line-height: ${(p)=>p.$lineHeight ? p.$lineHeight : "inherit"};
|
|
40
|
-
background: var(--bodyBg);
|
|
41
|
-
color: var(--grey600);
|
|
42
|
-
white-space: nowrap;
|
|
43
|
-
font-size: ${(p)=>p.$fontSize}px;
|
|
44
|
-
cursor: pointer;
|
|
45
|
-
`;
|
|
46
|
-
const BtnIcon = _styledcomponents.default.span`
|
|
47
|
-
display: inline-block;
|
|
48
|
-
margin: 0 0 0 4px;
|
|
49
|
-
transition: transform 0.18s ease-in-out;
|
|
50
|
-
${(p)=>p.$expanded ? "transform: rotate(180deg);" : ""};
|
|
51
|
-
font-size: ${(p)=>p.$fontSize}px;
|
|
52
|
-
`;
|
|
53
|
-
const ReadMore = ({ lines = 3, lineHeight = 1.6, fontSize = 14, bg = "var(--bodyBg)", expand = "Expand", collapse = "Collapse", ...props })=>{
|
|
54
|
-
const defaultMaxHeight = lines * (lineHeight * fontSize);
|
|
55
|
-
const [expanded, setExpanded] = (0, _react.useState)(false);
|
|
56
|
-
const [maxHeight, setMaxHeight] = (0, _react.useState)(defaultMaxHeight);
|
|
57
|
-
const [fullHeight, setFullHeight] = (0, _react.useState)(0);
|
|
58
|
-
const [exceeds, setExceeds] = (0, _react.useState)(false);
|
|
59
|
-
const content = (0, _react.useRef)(null);
|
|
60
|
-
const height = (0, _framermotion.useSpring)(defaultMaxHeight);
|
|
61
|
-
const styles = (0, _react.useMemo)(()=>exceeds ? {
|
|
62
|
-
height,
|
|
63
|
-
overflow: "hidden"
|
|
64
|
-
} : {}, [
|
|
65
|
-
exceeds,
|
|
66
|
-
height
|
|
67
|
-
]);
|
|
68
|
-
const handleExpandClick = ()=>{
|
|
69
|
-
setExpanded((prevExpanded)=>!prevExpanded);
|
|
70
|
-
};
|
|
71
|
-
(0, _hooks.useIsomorphicLayoutEffect)(()=>{
|
|
72
|
-
if (content.current) {
|
|
73
|
-
const elementHeight = content.current.offsetHeight;
|
|
74
|
-
const newExceeds = elementHeight > maxHeight;
|
|
75
|
-
if (!newExceeds) {
|
|
76
|
-
setMaxHeight(elementHeight);
|
|
77
|
-
}
|
|
78
|
-
setExceeds(newExceeds);
|
|
79
|
-
setFullHeight(elementHeight);
|
|
80
|
-
}
|
|
81
|
-
}, [
|
|
82
|
-
content,
|
|
83
|
-
maxHeight
|
|
84
|
-
]);
|
|
85
|
-
(0, _hooks.useIsomorphicLayoutEffect)(()=>{
|
|
86
|
-
height.set(expanded ? fullHeight : maxHeight);
|
|
87
|
-
}, [
|
|
88
|
-
expanded,
|
|
89
|
-
height,
|
|
90
|
-
fullHeight,
|
|
91
|
-
maxHeight
|
|
92
|
-
]);
|
|
93
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(Root, {
|
|
94
|
-
children: [
|
|
95
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_framermotion.m.div, {
|
|
96
|
-
style: styles,
|
|
97
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Content, {
|
|
98
|
-
ref: content,
|
|
99
|
-
...props
|
|
100
|
-
})
|
|
101
|
-
}),
|
|
102
|
-
exceeds && /*#__PURE__*/ (0, _jsxruntime.jsxs)(BtnWrap, {
|
|
103
|
-
$expanded: expanded,
|
|
104
|
-
children: [
|
|
105
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(BtnFader, {
|
|
106
|
-
$bg: bg
|
|
107
|
-
}),
|
|
108
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(Btn, {
|
|
109
|
-
$fontSize: fontSize,
|
|
110
|
-
$lineHeight: lineHeight,
|
|
111
|
-
onClick: handleExpandClick,
|
|
112
|
-
"aria-expanded": expanded,
|
|
113
|
-
"aria-label": expanded ? collapse : expand,
|
|
114
|
-
children: [
|
|
115
|
-
expanded ? collapse : expand,
|
|
116
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(BtnIcon, {
|
|
117
|
-
$expanded: expanded
|
|
118
|
-
})
|
|
119
|
-
]
|
|
120
|
-
})
|
|
121
|
-
]
|
|
122
|
-
})
|
|
123
|
-
]
|
|
124
|
-
});
|
|
125
|
-
};
|
package/Typography/TextLoop.js
DELETED
|
@@ -1,108 +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
|
-
TextLoopPiece: function() {
|
|
13
|
-
return TextLoopPiece;
|
|
14
|
-
},
|
|
15
|
-
TextLoop: function() {
|
|
16
|
-
return TextLoop;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
20
|
-
const _framermotion = require("framer-motion");
|
|
21
|
-
const _react = require("react");
|
|
22
|
-
const TextLoopPiece = ({ text = "", style = {}, className = "", direction = "up", inline = true, noOverflow = true, delay = 400 })=>{
|
|
23
|
-
const placeholderRef = (0, _react.useRef)(null);
|
|
24
|
-
const [content, setContent] = (0, _react.useState)({
|
|
25
|
-
data: "",
|
|
26
|
-
key: ""
|
|
27
|
-
});
|
|
28
|
-
const [width, setWidth] = (0, _react.useState)(inline ? 0 : "auto");
|
|
29
|
-
(0, _react.useEffect)(()=>{
|
|
30
|
-
const timeoutId = setTimeout(()=>{
|
|
31
|
-
if (!placeholderRef.current) return;
|
|
32
|
-
placeholderRef.current.innerHTML = text + "";
|
|
33
|
-
if (inline) setWidth(placeholderRef.current.offsetWidth);
|
|
34
|
-
setContent({
|
|
35
|
-
data: text + "",
|
|
36
|
-
key: new Date() + ""
|
|
37
|
-
});
|
|
38
|
-
}, delay);
|
|
39
|
-
return ()=>clearTimeout(timeoutId);
|
|
40
|
-
}, [
|
|
41
|
-
text,
|
|
42
|
-
delay,
|
|
43
|
-
inline
|
|
44
|
-
]);
|
|
45
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
46
|
-
className: className,
|
|
47
|
-
style: {
|
|
48
|
-
...style,
|
|
49
|
-
position: "relative",
|
|
50
|
-
display: inline ? "inline-block" : "block",
|
|
51
|
-
width,
|
|
52
|
-
whiteSpace: inline ? "nowrap" : "normal"
|
|
53
|
-
},
|
|
54
|
-
children: [
|
|
55
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
56
|
-
ref: placeholderRef,
|
|
57
|
-
style: {
|
|
58
|
-
visibility: "hidden"
|
|
59
|
-
}
|
|
60
|
-
}),
|
|
61
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
62
|
-
style: {
|
|
63
|
-
overflow: noOverflow ? "hidden" : "visible",
|
|
64
|
-
display: "block",
|
|
65
|
-
position: "absolute",
|
|
66
|
-
top: 0,
|
|
67
|
-
left: 0,
|
|
68
|
-
height: "100%",
|
|
69
|
-
width: "100%"
|
|
70
|
-
},
|
|
71
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_framermotion.AnimatePresence, {
|
|
72
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_framermotion.m.div, {
|
|
73
|
-
style: {
|
|
74
|
-
position: "absolute"
|
|
75
|
-
},
|
|
76
|
-
initial: {
|
|
77
|
-
opacity: 0,
|
|
78
|
-
y: direction === "down" ? "-100%" : "100%"
|
|
79
|
-
},
|
|
80
|
-
animate: {
|
|
81
|
-
opacity: 1,
|
|
82
|
-
y: 0
|
|
83
|
-
},
|
|
84
|
-
exit: {
|
|
85
|
-
opacity: 0,
|
|
86
|
-
y: direction === "down" ? "100%" : "-100%"
|
|
87
|
-
},
|
|
88
|
-
children: content.data
|
|
89
|
-
}, content.key)
|
|
90
|
-
})
|
|
91
|
-
})
|
|
92
|
-
]
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
const TextLoop = ({ texts, interval = 3000, ...props })=>{
|
|
96
|
-
const [index, setIndex] = (0, _react.useState)(0);
|
|
97
|
-
(0, _react.useEffect)(()=>{
|
|
98
|
-
const intervalId = setInterval(()=>setIndex((index)=>index + 1), interval // every 3 seconds
|
|
99
|
-
);
|
|
100
|
-
return ()=>clearTimeout(intervalId);
|
|
101
|
-
}, [
|
|
102
|
-
interval
|
|
103
|
-
]);
|
|
104
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(TextLoopPiece, {
|
|
105
|
-
...props,
|
|
106
|
-
text: texts[index % texts.length]
|
|
107
|
-
});
|
|
108
|
-
};
|
package/Typography/TypeStairs.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "TypeStairs", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return TypeStairs;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
-
const _react = require("react");
|
|
13
|
-
const TypeStairs = /*#__PURE__*/ (0, _react.forwardRef)(({ children, limit }, ref)=>{
|
|
14
|
-
// split in rows or just use one row if there is no limit
|
|
15
|
-
const rows = limit ? splitTextIntoRows(children, limit) : [
|
|
16
|
-
children
|
|
17
|
-
];
|
|
18
|
-
return rows.length > 1 ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
19
|
-
children: rows.map((row, rowIndex)=>{
|
|
20
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("span", {
|
|
21
|
-
children: [
|
|
22
|
-
renderRow(row, rowIndex, ref),
|
|
23
|
-
rowIndex !== rows.length - 1 && /*#__PURE__*/ (0, _jsxruntime.jsx)("br", {})
|
|
24
|
-
]
|
|
25
|
-
}, `row-${rowIndex}`);
|
|
26
|
-
})
|
|
27
|
-
}) : renderRow(rows[0], 0, ref);
|
|
28
|
-
});
|
|
29
|
-
/**
|
|
30
|
-
* every number chars find a space and break, then restart the gradient weight
|
|
31
|
-
* @see https://stackoverflow.com/a/25770787
|
|
32
|
-
*/ function splitTextIntoRows(input = "", limit = 18) {
|
|
33
|
-
const rows = [];
|
|
34
|
-
const arr = input.split(" ");
|
|
35
|
-
let currow = arr[0];
|
|
36
|
-
let rowlen = currow.length;
|
|
37
|
-
for(let i = 1; i < arr.length; i++){
|
|
38
|
-
const word = arr[i];
|
|
39
|
-
rowlen += word.length + 1;
|
|
40
|
-
if (rowlen <= limit) {
|
|
41
|
-
currow += " " + word;
|
|
42
|
-
} else {
|
|
43
|
-
rows.push(currow);
|
|
44
|
-
currow = word;
|
|
45
|
-
rowlen = word.length;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
rows.push(currow);
|
|
49
|
-
return rows;
|
|
50
|
-
}
|
|
51
|
-
function renderRow(row, rowIndex, ref) {
|
|
52
|
-
const letters = row.split("");
|
|
53
|
-
let fontWeightIdx = 1;
|
|
54
|
-
// const fontWeight = Math.min(fontWeightIdx * 100, 800);
|
|
55
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
56
|
-
children: letters.map((letter, letterIndex)=>{
|
|
57
|
-
const fontWeight = Math.min(fontWeightIdx * 100, 800);
|
|
58
|
-
// don't waste a fontWeight for a white space
|
|
59
|
-
if (letter !== " ") {
|
|
60
|
-
fontWeightIdx++;
|
|
61
|
-
}
|
|
62
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
63
|
-
style: {
|
|
64
|
-
fontWeight
|
|
65
|
-
},
|
|
66
|
-
ref: ref,
|
|
67
|
-
children: letter
|
|
68
|
-
}, `letter-${rowIndex}-${letterIndex}`);
|
|
69
|
-
})
|
|
70
|
-
});
|
|
71
|
-
}
|
package/Typography/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
-
_export_star._(require("./CopyPasteVisible"), exports);
|
|
7
|
-
_export_star._(require("./Native"), exports);
|
|
8
|
-
_export_star._(require("./ReadMore"), exports);
|
|
9
|
-
_export_star._(require("./TextLoop"), exports);
|
|
10
|
-
_export_star._(require("./TypeStairs"), exports);
|
package/css/index.js
DELETED
|
@@ -1,33 +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 _bare.KoineDialog;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _export_star = require("@swc/helpers/_/_export_star");
|
|
12
|
-
_export_star._(require("../shared"), exports);
|
|
13
|
-
const _bare = require("../Dialog/css/bare");
|
|
14
|
-
// export * from "../Form";
|
|
15
|
-
// export * from "../Forms";
|
|
16
|
-
// export * from "../Grid";
|
|
17
|
-
// export * from "../Hamburger";
|
|
18
|
-
// export * from "../Header";
|
|
19
|
-
// export * from "../Hidden";
|
|
20
|
-
// export * from "../Img";
|
|
21
|
-
// export * from "../Link";
|
|
22
|
-
// export * from "../MenuItem";
|
|
23
|
-
// export * from "../Pagination";
|
|
24
|
-
// export * from "../Pill";
|
|
25
|
-
// export * from "../Progress";
|
|
26
|
-
// export * from "../Rating";
|
|
27
|
-
// // export * from "../Select";
|
|
28
|
-
// export * from "../Sidebar";
|
|
29
|
-
// export * from "../Spacing";
|
|
30
|
-
// export * from "../Sticky";
|
|
31
|
-
// export * from "../styles";
|
|
32
|
-
// export * from "../Tabs";
|
|
33
|
-
// export * from "../Typography";
|
package/helpers/classed.js
DELETED
|
@@ -1,66 +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
|
-
classed: function() {
|
|
13
|
-
return classed;
|
|
14
|
-
},
|
|
15
|
-
default: function() {
|
|
16
|
-
return _default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
20
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
21
|
-
function classed(component) {
|
|
22
|
-
// @ts-expect-error nevermind for now...
|
|
23
|
-
const type = component.type || component;
|
|
24
|
-
return function(strings, ...args) {
|
|
25
|
-
const WrappedComponent = /*#__PURE__*/ (0, _react.forwardRef)(function(props, ref) {
|
|
26
|
-
const argResolved = args.map((arg, index)=>{
|
|
27
|
-
let result = "";
|
|
28
|
-
if (typeof arg === "function") {
|
|
29
|
-
result = arg(props);
|
|
30
|
-
} else if (typeof arg !== "undefined") {
|
|
31
|
-
result = arg.toString();
|
|
32
|
-
}
|
|
33
|
-
return strings[index] + result;
|
|
34
|
-
}).join("");
|
|
35
|
-
const isNativeHtmlElement = typeof type === "string";
|
|
36
|
-
const propsToForward = isNativeHtmlElement ? {} : props;
|
|
37
|
-
if (isNativeHtmlElement) {
|
|
38
|
-
for(const key in props){
|
|
39
|
-
// like styled-components `transient` props
|
|
40
|
-
if (!key.startsWith("$")) {
|
|
41
|
-
// FIXME: for react 18 we need: @ts-expect-error
|
|
42
|
-
propsToForward[key] = props[key];
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
// get the tagged function string outcome
|
|
47
|
-
let className = argResolved || strings[0];
|
|
48
|
-
// check if we need to clean it or not from the optional structure `< class="..."`
|
|
49
|
-
className = className.match(/class="([^"]*)/)?.[1] || className;
|
|
50
|
-
// add the custom classes from props
|
|
51
|
-
className += props?.className ? " " + props?.className : "";
|
|
52
|
-
return /*#__PURE__*/ (0, _react.createElement)(type, {
|
|
53
|
-
// ...props,
|
|
54
|
-
...propsToForward,
|
|
55
|
-
// only add ot props if it is not an empty string
|
|
56
|
-
className: className || undefined,
|
|
57
|
-
// add ref to props
|
|
58
|
-
ref
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
// FIXME: not sure if this is needed
|
|
62
|
-
// WrappedComponent.displayName = type.toString();
|
|
63
|
-
return WrappedComponent; // as unknown as React.ReactElement<typeof props>;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
const _default = classed;
|