@koine/react 2.0.0-beta.5 → 2.0.0-beta.7
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 -3
- package/Alert/Alert.mjs +7 -3
- package/Alert/Alert.stories.js +4 -1
- package/Alert/Alert.stories.mjs +4 -1
- package/Animations/Reveal.js +5 -3
- package/Animations/Reveal.mjs +5 -3
- package/Animations/Underline.d.ts +1 -1
- package/Autocomplete/AutocompleteMui.js +57 -28
- package/Autocomplete/AutocompleteMui.mjs +57 -28
- package/Autocomplete/components.d.ts +12 -16
- package/Bg/BgColor.d.ts +2 -7
- package/Bg/BgColor.js +15 -10
- package/Bg/BgColor.mjs +15 -10
- package/Bg/BgPhoto.js +8 -6
- package/Bg/BgPhoto.mjs +8 -6
- package/Bg/BgSvg.js +8 -6
- package/Bg/BgSvg.mjs +8 -6
- package/Breadcrumbs/Breadcrumbs.js +30 -17
- package/Breadcrumbs/Breadcrumbs.mjs +30 -17
- package/Buttons/Button.d.ts +1 -1
- package/Buttons/ButtonComposite.js +52 -19
- package/Buttons/ButtonComposite.mjs +52 -19
- package/Buttons/ButtonFab.d.ts +1 -3
- package/Buttons/ButtonLink.js +3 -2
- package/Buttons/ButtonLink.mjs +3 -2
- package/Buttons/IconButton.d.ts +1 -3
- package/Calendar/CalendarDaygridCell.js +75 -52
- package/Calendar/CalendarDaygridCell.mjs +75 -52
- package/Calendar/CalendarDaygridNav.js +31 -17
- package/Calendar/CalendarDaygridNav.mjs +31 -17
- package/Calendar/CalendarDaygridTable.js +40 -15
- package/Calendar/CalendarDaygridTable.mjs +40 -15
- package/Calendar/CalendarLegend.js +20 -7
- package/Calendar/CalendarLegend.mjs +20 -7
- package/Carousel/CarouselCss.d.ts +2 -19
- package/Carousel/CarouselCss.js +10 -8
- package/Carousel/CarouselCss.mjs +10 -8
- package/Debug/Debug.js +4 -1
- package/Debug/Debug.mjs +4 -1
- package/Details/Details.js +27 -19
- package/Details/Details.mjs +27 -19
- package/Details/Details.stories.js +2 -1
- package/Details/Details.stories.mjs +2 -1
- package/Dialog/DialogMui.d.ts +9 -326
- package/Dialog/DialogMui.js +24 -11
- package/Dialog/DialogMui.mjs +24 -11
- package/Dialog/DialogMui.stories.js +2 -1
- package/Dialog/DialogMui.stories.mjs +2 -1
- package/Dialog/css/bare.d.ts +9 -327
- package/Dialog/css/index.stories.js +11 -3
- package/Dialog/css/index.stories.mjs +11 -3
- package/Dialog/m/bare.d.ts +2 -398
- package/Dialog/m/bare.js +114 -69
- package/Dialog/m/bare.mjs +114 -69
- package/Dialog/sc/bare.d.ts +27 -405
- package/Dialog/sc/framer.d.ts +15 -422
- package/Dialog/sc/framerMaterial.d.ts +15 -422
- package/Dialog/sc/index.stories.js +5 -4
- package/Dialog/sc/index.stories.mjs +5 -4
- package/Dialog/sc/material.d.ts +27 -405
- package/Dialog/tw/bare.d.ts +9 -327
- package/Dialog/tw/elegant.d.ts +9 -327
- package/Dialog/tw/framer.d.ts +3 -354
- package/Dialog/tw/framerMaterial.d.ts +3 -354
- package/Dialog/tw/index.stories.js +6 -5
- package/Dialog/tw/index.stories.mjs +6 -5
- package/Dialog/tw/material.d.ts +9 -327
- package/Editor/Editor--tiptap.js +29 -14
- package/Editor/Editor--tiptap.mjs +29 -14
- package/Editor/components.d.ts +3 -5
- package/FaviconTags.js +52 -38
- package/FaviconTags.mjs +52 -38
- package/Form/Form.js +33 -16
- package/Form/Form.mjs +33 -16
- package/Form/sc/bare.d.ts +11 -11
- package/Forms/Checkbox/Checkbox.d.ts +4 -4
- package/Forms/Checkbox/Checkbox.js +15 -1
- package/Forms/Checkbox/Checkbox.mjs +15 -1
- package/Forms/Feedback/Feedback.js +5 -3
- package/Forms/Feedback/Feedback.mjs +5 -3
- package/Forms/Field/Field.d.ts +2 -4
- package/Forms/Field/Field.js +11 -5
- package/Forms/Field/Field.mjs +11 -5
- package/Forms/Field/FieldControl.js +20 -6
- package/Forms/Field/FieldControl.mjs +20 -6
- package/Forms/Field/FieldHint.d.ts +1 -1
- package/Forms/Input/Input.d.ts +5 -5
- package/Forms/Input/Input.js +15 -7
- package/Forms/Input/Input.mjs +15 -7
- package/Forms/InputGroup/InputGroup.d.ts +4 -4
- package/Forms/InputGroup/InputGroup.js +17 -7
- package/Forms/InputGroup/InputGroup.mjs +17 -7
- package/Forms/Label/Label.d.ts +1 -1
- package/Forms/Password/Password.d.ts +1 -1
- package/Forms/Password/Password.js +25 -11
- package/Forms/Password/Password.mjs +25 -11
- package/Forms/Radio/Radio.js +30 -11
- package/Forms/Radio/Radio.mjs +30 -11
- package/Forms/Switch/Switch.d.ts +2 -2
- package/Forms/Switch/Switch.js +13 -1
- package/Forms/Switch/Switch.mjs +13 -1
- package/Forms/Textarea/Textarea.d.ts +1 -1
- package/Forms/Textarea/Textarea.js +15 -7
- package/Forms/Textarea/Textarea.mjs +15 -7
- package/Forms/Textarea/TextareaRich.js +20 -12
- package/Forms/Textarea/TextareaRich.mjs +20 -12
- package/Forms/Toggle/Toggle.d.ts +7 -7
- package/Forms/Toggle/Toggle.js +48 -29
- package/Forms/Toggle/Toggle.mjs +49 -30
- package/Forms/Toggle/useToggle.js +21 -15
- package/Forms/Toggle/useToggle.mjs +21 -15
- package/Forms/styles.d.ts +3 -7
- package/Forms/styles.js +2 -1
- package/Forms/styles.mjs +2 -1
- package/Grid/Grid.d.ts +4 -28
- package/Hamburger/Hamburger.js +24 -17
- package/Hamburger/Hamburger.mjs +25 -18
- package/Hidden/Hidden.d.ts +1 -1
- package/Img/sc/bare.d.ts +1 -1
- package/Link/Link.d.ts +1 -3
- package/Link/LinkBlank.d.ts +2 -5
- package/Link/LinkBlank.js +8 -1
- package/Link/LinkBlank.mjs +8 -1
- package/Menu/Menu.d.ts +1 -1
- package/MenuItem/MenuItem.d.ts +1 -4
- package/Meta/Meta.js +2 -1
- package/Meta/Meta.mjs +2 -1
- package/NoJs/NoJs.js +2 -1
- package/NoJs/NoJs.mjs +2 -1
- package/Pagination/PaginationNav.js +42 -23
- package/Pagination/PaginationNav.mjs +42 -23
- package/Pagination/PaginationResults.js +25 -20
- package/Pagination/PaginationResults.mjs +25 -20
- package/Pill/Pill.d.ts +4 -4
- package/Progress/ProgressCircular.js +14 -12
- package/Progress/ProgressCircular.mjs +14 -12
- package/Progress/ProgressLinear.js +21 -19
- package/Progress/ProgressLinear.mjs +21 -19
- package/Progress/ProgressOverlay.js +20 -14
- package/Progress/ProgressOverlay.mjs +20 -14
- package/Rating/Rating.d.ts +5 -5
- package/Rating/Rating.js +61 -35
- package/Rating/Rating.mjs +61 -35
- package/Select/components.d.ts +1 -1
- package/Select/components.js +5 -3
- package/Select/components.mjs +5 -3
- package/Sidebar/Sidebar.js +17 -8
- package/Sidebar/Sidebar.mjs +17 -8
- package/Spacing/Spacing.js +5 -2
- package/Spacing/Spacing.mjs +5 -2
- package/Sticky/StickyCss.js +2 -1
- package/Sticky/StickyCss.mjs +2 -1
- package/Tabs/TabsMui.d.ts +7 -296
- package/Tabs/TabsMui.js +11 -2
- package/Tabs/TabsMui.mjs +11 -2
- package/Tabs/TabsMui.stories.js +2 -1
- package/Tabs/TabsMui.stories.mjs +2 -1
- package/Tabs/tw/bare.d.ts +7 -296
- package/Tabs/tw/index.stories.js +3 -2
- package/Tabs/tw/index.stories.mjs +3 -2
- package/Tabs/tw/material.d.ts +7 -332
- package/Typography/CopyPasteVisible.d.ts +1 -1
- package/Typography/Native.d.ts +5 -5
- package/Typography/ReadMore.js +33 -18
- package/Typography/ReadMore.mjs +33 -18
- package/Typography/TextLoop.js +43 -35
- package/Typography/TextLoop.mjs +43 -35
- package/Typography/TypeStairs.js +27 -19
- package/Typography/TypeStairs.mjs +27 -19
- package/helpers/classed.stories.js +40 -22
- package/helpers/classed.stories.mjs +40 -22
- package/m/MotionProvider.js +5 -3
- package/m/MotionProvider.mjs +5 -3
- package/package.json +5 -25
- package/styles/Body.d.ts +2 -2
- package/styles/theme--vanilla.js +5 -3
- package/styles/theme--vanilla.mjs +5 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { CgArrowLeftR as IconArrowLeft, CgArrowRightR as IconArrowRight } from "react-icons/cg";
|
|
2
3
|
import styled from "styled-components";
|
|
3
4
|
import ensureInt from "@koine/utils/ensureInt";
|
|
@@ -77,27 +78,45 @@ const ItemNext = styled.a`
|
|
|
77
78
|
}
|
|
78
79
|
const prevDots = pages[0] > firstPage + 1;
|
|
79
80
|
const nextDots = pages[pages.length - 1] < lastPage - 1;
|
|
80
|
-
return /*#__PURE__*/
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
81
|
+
return /*#__PURE__*/ _jsxs(Root, {
|
|
82
|
+
children: [
|
|
83
|
+
prevArrow && /*#__PURE__*/ _jsx(ItemPrev, {
|
|
84
|
+
as: Link,
|
|
85
|
+
href: `${baseUrl}/${prevPage}`,
|
|
86
|
+
children: /*#__PURE__*/ _jsx(IconArrowLeft, {})
|
|
87
|
+
}),
|
|
88
|
+
firstPage !== currentPage && /*#__PURE__*/ _jsx(ItemLink, {
|
|
89
|
+
as: Link,
|
|
90
|
+
href: `${baseUrl}`,
|
|
91
|
+
prev: true,
|
|
92
|
+
children: firstPage
|
|
93
|
+
}),
|
|
94
|
+
prevDots && /*#__PURE__*/ _jsx(DotsSeparator, {
|
|
95
|
+
children: "..."
|
|
96
|
+
}),
|
|
97
|
+
pages.map((page)=>page === currentPage ? /*#__PURE__*/ _jsx(ItemCurrent, {
|
|
98
|
+
children: page
|
|
99
|
+
}, page) : /*#__PURE__*/ _jsx(ItemLink, {
|
|
100
|
+
as: Link,
|
|
101
|
+
href: `${baseUrl}/${page}`,
|
|
102
|
+
prev: page < currentPage,
|
|
103
|
+
next: page > currentPage,
|
|
104
|
+
children: page
|
|
105
|
+
}, `pagination-${page}`)),
|
|
106
|
+
nextDots && /*#__PURE__*/ _jsx(DotsSeparator, {
|
|
107
|
+
children: "..."
|
|
108
|
+
}),
|
|
109
|
+
lastPage !== currentPage && /*#__PURE__*/ _jsx(ItemLink, {
|
|
110
|
+
as: Link,
|
|
111
|
+
href: `${baseUrl}/${lastPage}`,
|
|
112
|
+
next: true,
|
|
113
|
+
children: lastPage
|
|
114
|
+
}),
|
|
115
|
+
nextArrow && /*#__PURE__*/ _jsx(ItemNext, {
|
|
116
|
+
as: Link,
|
|
117
|
+
href: `${baseUrl}/${nextPage}`,
|
|
118
|
+
children: /*#__PURE__*/ _jsx(IconArrowRight, {})
|
|
119
|
+
})
|
|
120
|
+
]
|
|
121
|
+
});
|
|
103
122
|
};
|
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "PaginationResults", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
13
|
const _framermotion = require("framer-motion");
|
|
13
14
|
const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
14
15
|
const Root = _styledcomponents.default.div`
|
|
@@ -16,25 +17,29 @@ const Root = _styledcomponents.default.div`
|
|
|
16
17
|
`;
|
|
17
18
|
const Inner = (0, _styledcomponents.default)(_framermotion.m.div)``;
|
|
18
19
|
const PaginationResults = ({ children })=>{
|
|
19
|
-
return /*#__PURE__*/
|
|
20
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_framermotion.AnimatePresence, {
|
|
20
21
|
exitBeforeEnter: true,
|
|
21
|
-
initial: true
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
22
|
+
initial: true,
|
|
23
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Root, {
|
|
24
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Inner, {
|
|
25
|
+
initial: {
|
|
26
|
+
opacity: 0,
|
|
27
|
+
x: -100
|
|
28
|
+
},
|
|
29
|
+
animate: {
|
|
30
|
+
opacity: 1,
|
|
31
|
+
x: 0
|
|
32
|
+
},
|
|
33
|
+
exit: {
|
|
34
|
+
opacity: 0,
|
|
35
|
+
x: 100
|
|
36
|
+
},
|
|
37
|
+
transition: {
|
|
38
|
+
type: "linear",
|
|
39
|
+
staggerChildren: 0.3
|
|
40
|
+
},
|
|
41
|
+
children: children
|
|
42
|
+
})
|
|
43
|
+
})
|
|
44
|
+
});
|
|
40
45
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { AnimatePresence, m } from "framer-motion";
|
|
2
3
|
import styled from "styled-components";
|
|
3
4
|
const Root = styled.div`
|
|
@@ -5,25 +6,29 @@ const Root = styled.div`
|
|
|
5
6
|
`;
|
|
6
7
|
const Inner = styled(m.div)``;
|
|
7
8
|
export const PaginationResults = ({ children })=>{
|
|
8
|
-
return /*#__PURE__*/
|
|
9
|
+
return /*#__PURE__*/ _jsx(AnimatePresence, {
|
|
9
10
|
exitBeforeEnter: true,
|
|
10
|
-
initial: true
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
11
|
+
initial: true,
|
|
12
|
+
children: /*#__PURE__*/ _jsx(Root, {
|
|
13
|
+
children: /*#__PURE__*/ _jsx(Inner, {
|
|
14
|
+
initial: {
|
|
15
|
+
opacity: 0,
|
|
16
|
+
x: -100
|
|
17
|
+
},
|
|
18
|
+
animate: {
|
|
19
|
+
opacity: 1,
|
|
20
|
+
x: 0
|
|
21
|
+
},
|
|
22
|
+
exit: {
|
|
23
|
+
opacity: 0,
|
|
24
|
+
x: 100
|
|
25
|
+
},
|
|
26
|
+
transition: {
|
|
27
|
+
type: "linear",
|
|
28
|
+
staggerChildren: 0.3
|
|
29
|
+
},
|
|
30
|
+
children: children
|
|
31
|
+
})
|
|
32
|
+
})
|
|
33
|
+
});
|
|
29
34
|
};
|
package/Pill/Pill.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type PillProps = object;
|
|
2
|
-
export declare const Pill:
|
|
3
|
-
export declare const PillGreyLight:
|
|
4
|
-
export declare const PillAccentLight:
|
|
5
|
-
export declare const PillAccentLightOutlined:
|
|
2
|
+
export declare const Pill: any;
|
|
3
|
+
export declare const PillGreyLight: any;
|
|
4
|
+
export declare const PillAccentLight: any;
|
|
5
|
+
export declare const PillAccentLightOutlined: any;
|
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "ProgressCircular", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
13
|
const _styledcomponents = /*#__PURE__*/ _interop_require_wildcard._(require("styled-components"));
|
|
13
14
|
const animationRotation = (0, _styledcomponents.keyframes)`
|
|
14
15
|
0% {
|
|
@@ -39,22 +40,23 @@ const ProgressCircularCircle = _styledcomponents.default.circle`
|
|
|
39
40
|
animation: ${animationCircle} 1.5s linear infinite;
|
|
40
41
|
`;
|
|
41
42
|
const ProgressCircular = ({ size = "1em", thickness = 1, color = "currentColor", ...props })=>{
|
|
42
|
-
return /*#__PURE__*/
|
|
43
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(ProgressCircularSvg, {
|
|
43
44
|
xmlns: "http://www.w3.org/2000/svg",
|
|
44
45
|
viewBox: "0 0 44 44",
|
|
45
46
|
style: {
|
|
46
47
|
width: size,
|
|
47
48
|
height: size
|
|
48
49
|
},
|
|
49
|
-
...props
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
...props,
|
|
51
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(ProgressCircularCircle, {
|
|
52
|
+
cx: "22",
|
|
53
|
+
cy: "22",
|
|
54
|
+
r: "20",
|
|
55
|
+
fill: "none",
|
|
56
|
+
strokeWidth: thickness,
|
|
57
|
+
style: {
|
|
58
|
+
stroke: color
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
});
|
|
60
62
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import styled, { keyframes } from "styled-components";
|
|
2
3
|
const animationRotation = keyframes`
|
|
3
4
|
0% {
|
|
@@ -30,22 +31,23 @@ const ProgressCircularCircle = styled.circle`
|
|
|
30
31
|
/**
|
|
31
32
|
* @see https://mui.com/components/progress/
|
|
32
33
|
*/ export const ProgressCircular = ({ size = "1em", thickness = 1, color = "currentColor", ...props })=>{
|
|
33
|
-
return /*#__PURE__*/
|
|
34
|
+
return /*#__PURE__*/ _jsx(ProgressCircularSvg, {
|
|
34
35
|
xmlns: "http://www.w3.org/2000/svg",
|
|
35
36
|
viewBox: "0 0 44 44",
|
|
36
37
|
style: {
|
|
37
38
|
width: size,
|
|
38
39
|
height: size
|
|
39
40
|
},
|
|
40
|
-
...props
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
...props,
|
|
42
|
+
children: /*#__PURE__*/ _jsx(ProgressCircularCircle, {
|
|
43
|
+
cx: "22",
|
|
44
|
+
cy: "22",
|
|
45
|
+
r: "20",
|
|
46
|
+
fill: "none",
|
|
47
|
+
strokeWidth: thickness,
|
|
48
|
+
style: {
|
|
49
|
+
stroke: color
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
});
|
|
51
53
|
};
|
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "ProgressLinear", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
13
|
const _framermotion = require("framer-motion");
|
|
13
14
|
const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
14
15
|
const ProgressLinearBg = _styledcomponents.default.span`
|
|
@@ -25,27 +26,28 @@ const ProgressLinearFg = (0, _styledcomponents.default)(_framermotion.m.span)`
|
|
|
25
26
|
width: 100%;
|
|
26
27
|
`;
|
|
27
28
|
const ProgressLinear = ({ done = false, height = "2px", bg = "transparent", fg = "currentColor", ...props })=>{
|
|
28
|
-
return /*#__PURE__*/
|
|
29
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(ProgressLinearBg, {
|
|
29
30
|
style: {
|
|
30
31
|
height,
|
|
31
32
|
background: bg
|
|
32
33
|
},
|
|
33
|
-
...props
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
34
|
+
...props,
|
|
35
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(ProgressLinearFg, {
|
|
36
|
+
style: {
|
|
37
|
+
height,
|
|
38
|
+
background: fg
|
|
39
|
+
},
|
|
40
|
+
initial: {
|
|
41
|
+
x: "-100%"
|
|
42
|
+
},
|
|
43
|
+
animate: {
|
|
44
|
+
x: done ? "-100%" : "0%"
|
|
45
|
+
},
|
|
46
|
+
transition: done ? {} : {
|
|
47
|
+
repeat: Infinity,
|
|
48
|
+
repeatType: "reverse",
|
|
49
|
+
duration: 2
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
});
|
|
51
53
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { m } from "framer-motion";
|
|
2
3
|
import styled from "styled-components";
|
|
3
4
|
const ProgressLinearBg = styled.span`
|
|
@@ -16,27 +17,28 @@ const ProgressLinearFg = styled(m.span)`
|
|
|
16
17
|
/**
|
|
17
18
|
* @see https://mui.com/components/progress/#linear
|
|
18
19
|
*/ export const ProgressLinear = ({ done = false, height = "2px", bg = "transparent", fg = "currentColor", ...props })=>{
|
|
19
|
-
return /*#__PURE__*/
|
|
20
|
+
return /*#__PURE__*/ _jsx(ProgressLinearBg, {
|
|
20
21
|
style: {
|
|
21
22
|
height,
|
|
22
23
|
background: bg
|
|
23
24
|
},
|
|
24
|
-
...props
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
25
|
+
...props,
|
|
26
|
+
children: /*#__PURE__*/ _jsx(ProgressLinearFg, {
|
|
27
|
+
style: {
|
|
28
|
+
height,
|
|
29
|
+
background: fg
|
|
30
|
+
},
|
|
31
|
+
initial: {
|
|
32
|
+
x: "-100%"
|
|
33
|
+
},
|
|
34
|
+
animate: {
|
|
35
|
+
x: done ? "-100%" : "0%"
|
|
36
|
+
},
|
|
37
|
+
transition: done ? {} : {
|
|
38
|
+
repeat: Infinity,
|
|
39
|
+
repeatType: "reverse",
|
|
40
|
+
duration: 2
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
});
|
|
42
44
|
};
|
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "ProgressOverlay", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
13
|
const _framermotion = require("framer-motion");
|
|
13
14
|
const _react = require("react");
|
|
14
15
|
const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
@@ -44,7 +45,7 @@ const ProgressOverlay = ({ running })=>{
|
|
|
44
45
|
}, [
|
|
45
46
|
running
|
|
46
47
|
]);
|
|
47
|
-
return /*#__PURE__*/
|
|
48
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(ProgressOverlayWrap, {
|
|
48
49
|
animate: {
|
|
49
50
|
opacity: running ? 1 : 0
|
|
50
51
|
},
|
|
@@ -53,17 +54,22 @@ const ProgressOverlay = ({ running })=>{
|
|
|
53
54
|
},
|
|
54
55
|
transition: {
|
|
55
56
|
type: "easeInOut"
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
57
|
+
},
|
|
58
|
+
children: [
|
|
59
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_ProgressLinear.ProgressLinear, {
|
|
60
|
+
bg: "var(--accent400)",
|
|
61
|
+
fg: "var(--accent300)",
|
|
62
|
+
done: !running
|
|
63
|
+
}),
|
|
64
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(ProgressOverlayCenterer, {
|
|
65
|
+
style: {
|
|
66
|
+
top: headerHeight + "px"
|
|
67
|
+
},
|
|
68
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_ProgressCircular.ProgressCircular, {
|
|
69
|
+
size: "50px",
|
|
70
|
+
color: "var(--accent300)"
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
});
|
|
69
75
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { m } from "framer-motion";
|
|
2
3
|
import { useEffect } from "react";
|
|
3
4
|
import styled from "styled-components";
|
|
@@ -33,7 +34,7 @@ export const ProgressOverlay = ({ running })=>{
|
|
|
33
34
|
}, [
|
|
34
35
|
running
|
|
35
36
|
]);
|
|
36
|
-
return /*#__PURE__*/
|
|
37
|
+
return /*#__PURE__*/ _jsxs(ProgressOverlayWrap, {
|
|
37
38
|
animate: {
|
|
38
39
|
opacity: running ? 1 : 0
|
|
39
40
|
},
|
|
@@ -42,17 +43,22 @@ export const ProgressOverlay = ({ running })=>{
|
|
|
42
43
|
},
|
|
43
44
|
transition: {
|
|
44
45
|
type: "easeInOut"
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
},
|
|
47
|
+
children: [
|
|
48
|
+
/*#__PURE__*/ _jsx(ProgressLinear, {
|
|
49
|
+
bg: "var(--accent400)",
|
|
50
|
+
fg: "var(--accent300)",
|
|
51
|
+
done: !running
|
|
52
|
+
}),
|
|
53
|
+
/*#__PURE__*/ _jsx(ProgressOverlayCenterer, {
|
|
54
|
+
style: {
|
|
55
|
+
top: headerHeight + "px"
|
|
56
|
+
},
|
|
57
|
+
children: /*#__PURE__*/ _jsx(ProgressCircular, {
|
|
58
|
+
size: "50px",
|
|
59
|
+
color: "var(--accent300)"
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
});
|
|
58
64
|
};
|
package/Rating/Rating.d.ts
CHANGED
|
@@ -9,12 +9,12 @@ export type RatingStarProps = React.ComponentPropsWithoutRef<"svg"> & RatingStar
|
|
|
9
9
|
/** @default "#947813" */
|
|
10
10
|
colorStroke?: React.CSSProperties["color"];
|
|
11
11
|
};
|
|
12
|
-
export declare const RatingStarRoot:
|
|
12
|
+
export declare const RatingStarRoot: any;
|
|
13
13
|
export declare const RatingStar: ({ value, colorBg, colorStroke, size, ...props }: RatingStarProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export declare const RatingDetails:
|
|
15
|
-
export declare const RatingCount:
|
|
16
|
-
export declare const RatingValue:
|
|
17
|
-
export declare const RatingRoot:
|
|
14
|
+
export declare const RatingDetails: any;
|
|
15
|
+
export declare const RatingCount: any;
|
|
16
|
+
export declare const RatingValue: any;
|
|
17
|
+
export declare const RatingRoot: any;
|
|
18
18
|
export type RatingStarModel = {
|
|
19
19
|
value: number;
|
|
20
20
|
idx?: number;
|
package/Rating/Rating.js
CHANGED
|
@@ -32,6 +32,7 @@ _export(exports, {
|
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
35
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
35
36
|
const _react = require("react");
|
|
36
37
|
const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
37
38
|
const RatingStarRoot = _styledcomponents.default.svg`
|
|
@@ -41,33 +42,44 @@ const RatingStarRoot = _styledcomponents.default.svg`
|
|
|
41
42
|
`;
|
|
42
43
|
const RatingStar = ({ value, colorBg = "#FFD84C", colorStroke = "#947813", size, ...props })=>{
|
|
43
44
|
const id = (0, _react.useId)();
|
|
44
|
-
return /*#__PURE__*/
|
|
45
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(RatingStarRoot, {
|
|
45
46
|
viewBox: "0 0 16 16",
|
|
46
47
|
"data-value": value,
|
|
47
48
|
width: size + "px",
|
|
48
49
|
height: size + "px",
|
|
49
|
-
...props
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
50
|
+
...props,
|
|
51
|
+
children: [
|
|
52
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("defs", {
|
|
53
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("linearGradient", {
|
|
54
|
+
id: id,
|
|
55
|
+
x1: "0",
|
|
56
|
+
y1: "0",
|
|
57
|
+
x2: "1",
|
|
58
|
+
y2: "0",
|
|
59
|
+
children: [
|
|
60
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
|
|
61
|
+
offset: "0",
|
|
62
|
+
stopColor: colorBg
|
|
63
|
+
}),
|
|
64
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
|
|
65
|
+
offset: value,
|
|
66
|
+
stopColor: colorBg
|
|
67
|
+
}),
|
|
68
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
|
|
69
|
+
offset: value,
|
|
70
|
+
stopColor: "rgba(255, 255, 255, 0)"
|
|
71
|
+
})
|
|
72
|
+
]
|
|
73
|
+
})
|
|
74
|
+
}),
|
|
75
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
|
|
76
|
+
stroke: colorStroke,
|
|
77
|
+
strokeWidth: "0.5",
|
|
78
|
+
fill: `url(#${id})`,
|
|
79
|
+
d: "M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.283.95l-3.523 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
});
|
|
71
83
|
};
|
|
72
84
|
const RatingDetails = _styledcomponents.default.span`
|
|
73
85
|
padding-left: 0.5em;
|
|
@@ -147,16 +159,30 @@ const Rating = ({ value = 0, count, min = 0, max = 5, showDetails = true, colorB
|
|
|
147
159
|
// onChange(value);
|
|
148
160
|
// }
|
|
149
161
|
// }, [onChange];
|
|
150
|
-
return /*#__PURE__*/
|
|
151
|
-
|
|
152
|
-
idx
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(RatingRoot, {
|
|
163
|
+
children: [
|
|
164
|
+
stars.map((star, idx)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(RatingStar, {
|
|
165
|
+
idx: idx,
|
|
166
|
+
dataIdx: idx,
|
|
167
|
+
size: starSize,
|
|
168
|
+
// onMouseOver={handleMouseOver}
|
|
169
|
+
// onMouseLeave={handleMouseLeave}
|
|
170
|
+
// onClick={handleClick}
|
|
171
|
+
value: star.value,
|
|
172
|
+
colorBg: colorBg,
|
|
173
|
+
colorStroke: colorStroke
|
|
174
|
+
}, id + idx)),
|
|
175
|
+
" ",
|
|
176
|
+
showDetails && count && /*#__PURE__*/ (0, _jsxruntime.jsxs)(RatingDetails, {
|
|
177
|
+
children: [
|
|
178
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(RatingCount, {
|
|
179
|
+
children: count
|
|
180
|
+
}),
|
|
181
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(RatingValue, {
|
|
182
|
+
children: ` - ${value}`
|
|
183
|
+
})
|
|
184
|
+
]
|
|
185
|
+
})
|
|
186
|
+
]
|
|
187
|
+
});
|
|
162
188
|
};
|