@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.
Files changed (177) hide show
  1. package/Alert/Alert.js +7 -3
  2. package/Alert/Alert.mjs +7 -3
  3. package/Alert/Alert.stories.js +4 -1
  4. package/Alert/Alert.stories.mjs +4 -1
  5. package/Animations/Reveal.js +5 -3
  6. package/Animations/Reveal.mjs +5 -3
  7. package/Animations/Underline.d.ts +1 -1
  8. package/Autocomplete/AutocompleteMui.js +57 -28
  9. package/Autocomplete/AutocompleteMui.mjs +57 -28
  10. package/Autocomplete/components.d.ts +12 -16
  11. package/Bg/BgColor.d.ts +2 -7
  12. package/Bg/BgColor.js +15 -10
  13. package/Bg/BgColor.mjs +15 -10
  14. package/Bg/BgPhoto.js +8 -6
  15. package/Bg/BgPhoto.mjs +8 -6
  16. package/Bg/BgSvg.js +8 -6
  17. package/Bg/BgSvg.mjs +8 -6
  18. package/Breadcrumbs/Breadcrumbs.js +30 -17
  19. package/Breadcrumbs/Breadcrumbs.mjs +30 -17
  20. package/Buttons/Button.d.ts +1 -1
  21. package/Buttons/ButtonComposite.js +52 -19
  22. package/Buttons/ButtonComposite.mjs +52 -19
  23. package/Buttons/ButtonFab.d.ts +1 -3
  24. package/Buttons/ButtonLink.js +3 -2
  25. package/Buttons/ButtonLink.mjs +3 -2
  26. package/Buttons/IconButton.d.ts +1 -3
  27. package/Calendar/CalendarDaygridCell.js +75 -52
  28. package/Calendar/CalendarDaygridCell.mjs +75 -52
  29. package/Calendar/CalendarDaygridNav.js +31 -17
  30. package/Calendar/CalendarDaygridNav.mjs +31 -17
  31. package/Calendar/CalendarDaygridTable.js +40 -15
  32. package/Calendar/CalendarDaygridTable.mjs +40 -15
  33. package/Calendar/CalendarLegend.js +20 -7
  34. package/Calendar/CalendarLegend.mjs +20 -7
  35. package/Carousel/CarouselCss.d.ts +2 -19
  36. package/Carousel/CarouselCss.js +10 -8
  37. package/Carousel/CarouselCss.mjs +10 -8
  38. package/Debug/Debug.js +4 -1
  39. package/Debug/Debug.mjs +4 -1
  40. package/Details/Details.js +27 -19
  41. package/Details/Details.mjs +27 -19
  42. package/Details/Details.stories.js +2 -1
  43. package/Details/Details.stories.mjs +2 -1
  44. package/Dialog/DialogMui.d.ts +9 -326
  45. package/Dialog/DialogMui.js +24 -11
  46. package/Dialog/DialogMui.mjs +24 -11
  47. package/Dialog/DialogMui.stories.js +2 -1
  48. package/Dialog/DialogMui.stories.mjs +2 -1
  49. package/Dialog/css/bare.d.ts +9 -327
  50. package/Dialog/css/index.stories.js +11 -3
  51. package/Dialog/css/index.stories.mjs +11 -3
  52. package/Dialog/m/bare.d.ts +2 -398
  53. package/Dialog/m/bare.js +114 -69
  54. package/Dialog/m/bare.mjs +114 -69
  55. package/Dialog/sc/bare.d.ts +27 -405
  56. package/Dialog/sc/framer.d.ts +15 -422
  57. package/Dialog/sc/framerMaterial.d.ts +15 -422
  58. package/Dialog/sc/index.stories.js +5 -4
  59. package/Dialog/sc/index.stories.mjs +5 -4
  60. package/Dialog/sc/material.d.ts +27 -405
  61. package/Dialog/tw/bare.d.ts +9 -327
  62. package/Dialog/tw/elegant.d.ts +9 -327
  63. package/Dialog/tw/framer.d.ts +3 -354
  64. package/Dialog/tw/framerMaterial.d.ts +3 -354
  65. package/Dialog/tw/index.stories.js +6 -5
  66. package/Dialog/tw/index.stories.mjs +6 -5
  67. package/Dialog/tw/material.d.ts +9 -327
  68. package/Editor/Editor--tiptap.js +29 -14
  69. package/Editor/Editor--tiptap.mjs +29 -14
  70. package/Editor/components.d.ts +3 -5
  71. package/FaviconTags.js +52 -38
  72. package/FaviconTags.mjs +52 -38
  73. package/Form/Form.js +33 -16
  74. package/Form/Form.mjs +33 -16
  75. package/Form/sc/bare.d.ts +11 -11
  76. package/Forms/Checkbox/Checkbox.d.ts +4 -4
  77. package/Forms/Checkbox/Checkbox.js +15 -1
  78. package/Forms/Checkbox/Checkbox.mjs +15 -1
  79. package/Forms/Feedback/Feedback.js +5 -3
  80. package/Forms/Feedback/Feedback.mjs +5 -3
  81. package/Forms/Field/Field.d.ts +2 -4
  82. package/Forms/Field/Field.js +11 -5
  83. package/Forms/Field/Field.mjs +11 -5
  84. package/Forms/Field/FieldControl.js +20 -6
  85. package/Forms/Field/FieldControl.mjs +20 -6
  86. package/Forms/Field/FieldHint.d.ts +1 -1
  87. package/Forms/Input/Input.d.ts +5 -5
  88. package/Forms/Input/Input.js +15 -7
  89. package/Forms/Input/Input.mjs +15 -7
  90. package/Forms/InputGroup/InputGroup.d.ts +4 -4
  91. package/Forms/InputGroup/InputGroup.js +17 -7
  92. package/Forms/InputGroup/InputGroup.mjs +17 -7
  93. package/Forms/Label/Label.d.ts +1 -1
  94. package/Forms/Password/Password.d.ts +1 -1
  95. package/Forms/Password/Password.js +25 -11
  96. package/Forms/Password/Password.mjs +25 -11
  97. package/Forms/Radio/Radio.js +30 -11
  98. package/Forms/Radio/Radio.mjs +30 -11
  99. package/Forms/Switch/Switch.d.ts +2 -2
  100. package/Forms/Switch/Switch.js +13 -1
  101. package/Forms/Switch/Switch.mjs +13 -1
  102. package/Forms/Textarea/Textarea.d.ts +1 -1
  103. package/Forms/Textarea/Textarea.js +15 -7
  104. package/Forms/Textarea/Textarea.mjs +15 -7
  105. package/Forms/Textarea/TextareaRich.js +20 -12
  106. package/Forms/Textarea/TextareaRich.mjs +20 -12
  107. package/Forms/Toggle/Toggle.d.ts +7 -7
  108. package/Forms/Toggle/Toggle.js +48 -29
  109. package/Forms/Toggle/Toggle.mjs +49 -30
  110. package/Forms/Toggle/useToggle.js +21 -15
  111. package/Forms/Toggle/useToggle.mjs +21 -15
  112. package/Forms/styles.d.ts +3 -7
  113. package/Forms/styles.js +2 -1
  114. package/Forms/styles.mjs +2 -1
  115. package/Grid/Grid.d.ts +4 -28
  116. package/Hamburger/Hamburger.js +24 -17
  117. package/Hamburger/Hamburger.mjs +25 -18
  118. package/Hidden/Hidden.d.ts +1 -1
  119. package/Img/sc/bare.d.ts +1 -1
  120. package/Link/Link.d.ts +1 -3
  121. package/Link/LinkBlank.d.ts +2 -5
  122. package/Link/LinkBlank.js +8 -1
  123. package/Link/LinkBlank.mjs +8 -1
  124. package/Menu/Menu.d.ts +1 -1
  125. package/MenuItem/MenuItem.d.ts +1 -4
  126. package/Meta/Meta.js +2 -1
  127. package/Meta/Meta.mjs +2 -1
  128. package/NoJs/NoJs.js +2 -1
  129. package/NoJs/NoJs.mjs +2 -1
  130. package/Pagination/PaginationNav.js +42 -23
  131. package/Pagination/PaginationNav.mjs +42 -23
  132. package/Pagination/PaginationResults.js +25 -20
  133. package/Pagination/PaginationResults.mjs +25 -20
  134. package/Pill/Pill.d.ts +4 -4
  135. package/Progress/ProgressCircular.js +14 -12
  136. package/Progress/ProgressCircular.mjs +14 -12
  137. package/Progress/ProgressLinear.js +21 -19
  138. package/Progress/ProgressLinear.mjs +21 -19
  139. package/Progress/ProgressOverlay.js +20 -14
  140. package/Progress/ProgressOverlay.mjs +20 -14
  141. package/Rating/Rating.d.ts +5 -5
  142. package/Rating/Rating.js +61 -35
  143. package/Rating/Rating.mjs +61 -35
  144. package/Select/components.d.ts +1 -1
  145. package/Select/components.js +5 -3
  146. package/Select/components.mjs +5 -3
  147. package/Sidebar/Sidebar.js +17 -8
  148. package/Sidebar/Sidebar.mjs +17 -8
  149. package/Spacing/Spacing.js +5 -2
  150. package/Spacing/Spacing.mjs +5 -2
  151. package/Sticky/StickyCss.js +2 -1
  152. package/Sticky/StickyCss.mjs +2 -1
  153. package/Tabs/TabsMui.d.ts +7 -296
  154. package/Tabs/TabsMui.js +11 -2
  155. package/Tabs/TabsMui.mjs +11 -2
  156. package/Tabs/TabsMui.stories.js +2 -1
  157. package/Tabs/TabsMui.stories.mjs +2 -1
  158. package/Tabs/tw/bare.d.ts +7 -296
  159. package/Tabs/tw/index.stories.js +3 -2
  160. package/Tabs/tw/index.stories.mjs +3 -2
  161. package/Tabs/tw/material.d.ts +7 -332
  162. package/Typography/CopyPasteVisible.d.ts +1 -1
  163. package/Typography/Native.d.ts +5 -5
  164. package/Typography/ReadMore.js +33 -18
  165. package/Typography/ReadMore.mjs +33 -18
  166. package/Typography/TextLoop.js +43 -35
  167. package/Typography/TextLoop.mjs +43 -35
  168. package/Typography/TypeStairs.js +27 -19
  169. package/Typography/TypeStairs.mjs +27 -19
  170. package/helpers/classed.stories.js +40 -22
  171. package/helpers/classed.stories.mjs +40 -22
  172. package/m/MotionProvider.js +5 -3
  173. package/m/MotionProvider.mjs +5 -3
  174. package/package.json +5 -25
  175. package/styles/Body.d.ts +2 -2
  176. package/styles/theme--vanilla.js +5 -3
  177. 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__*/ React.createElement(Root, null, prevArrow && /*#__PURE__*/ React.createElement(ItemPrev, {
81
- as: Link,
82
- href: `${baseUrl}/${prevPage}`
83
- }, /*#__PURE__*/ React.createElement(IconArrowLeft, null)), firstPage !== currentPage && /*#__PURE__*/ React.createElement(ItemLink, {
84
- as: Link,
85
- href: `${baseUrl}`,
86
- prev: true
87
- }, firstPage), prevDots && /*#__PURE__*/ React.createElement(DotsSeparator, null, "..."), pages.map((page)=>page === currentPage ? /*#__PURE__*/ React.createElement(ItemCurrent, {
88
- key: page
89
- }, page) : /*#__PURE__*/ React.createElement(ItemLink, {
90
- key: `pagination-${page}`,
91
- as: Link,
92
- href: `${baseUrl}/${page}`,
93
- prev: page < currentPage,
94
- next: page > currentPage
95
- }, page)), nextDots && /*#__PURE__*/ React.createElement(DotsSeparator, null, "..."), lastPage !== currentPage && /*#__PURE__*/ React.createElement(ItemLink, {
96
- as: Link,
97
- href: `${baseUrl}/${lastPage}`,
98
- next: true
99
- }, lastPage), nextArrow && /*#__PURE__*/ React.createElement(ItemNext, {
100
- as: Link,
101
- href: `${baseUrl}/${nextPage}`
102
- }, /*#__PURE__*/ React.createElement(IconArrowRight, null)));
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__*/ React.createElement(_framermotion.AnimatePresence, {
20
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_framermotion.AnimatePresence, {
20
21
  exitBeforeEnter: true,
21
- initial: true
22
- }, /*#__PURE__*/ React.createElement(Root, null, /*#__PURE__*/ React.createElement(Inner, {
23
- initial: {
24
- opacity: 0,
25
- x: -100
26
- },
27
- animate: {
28
- opacity: 1,
29
- x: 0
30
- },
31
- exit: {
32
- opacity: 0,
33
- x: 100
34
- },
35
- transition: {
36
- type: "linear",
37
- staggerChildren: 0.3
38
- }
39
- }, children)));
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__*/ React.createElement(AnimatePresence, {
9
+ return /*#__PURE__*/ _jsx(AnimatePresence, {
9
10
  exitBeforeEnter: true,
10
- initial: true
11
- }, /*#__PURE__*/ React.createElement(Root, null, /*#__PURE__*/ React.createElement(Inner, {
12
- initial: {
13
- opacity: 0,
14
- x: -100
15
- },
16
- animate: {
17
- opacity: 1,
18
- x: 0
19
- },
20
- exit: {
21
- opacity: 0,
22
- x: 100
23
- },
24
- transition: {
25
- type: "linear",
26
- staggerChildren: 0.3
27
- }
28
- }, children)));
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: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, object, never>;
3
- export declare const PillGreyLight: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, object, never>;
4
- export declare const PillAccentLight: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, object, never>;
5
- export declare const PillAccentLightOutlined: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, object, never>;
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__*/ React.createElement(ProgressCircularSvg, {
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
- }, /*#__PURE__*/ React.createElement(ProgressCircularCircle, {
51
- cx: "22",
52
- cy: "22",
53
- r: "20",
54
- fill: "none",
55
- strokeWidth: thickness,
56
- style: {
57
- stroke: color
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__*/ React.createElement(ProgressCircularSvg, {
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
- }, /*#__PURE__*/ React.createElement(ProgressCircularCircle, {
42
- cx: "22",
43
- cy: "22",
44
- r: "20",
45
- fill: "none",
46
- strokeWidth: thickness,
47
- style: {
48
- stroke: color
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__*/ React.createElement(ProgressLinearBg, {
29
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(ProgressLinearBg, {
29
30
  style: {
30
31
  height,
31
32
  background: bg
32
33
  },
33
- ...props
34
- }, /*#__PURE__*/ React.createElement(ProgressLinearFg, {
35
- style: {
36
- height,
37
- background: fg
38
- },
39
- initial: {
40
- x: "-100%"
41
- },
42
- animate: {
43
- x: done ? "-100%" : "0%"
44
- },
45
- transition: done ? {} : {
46
- repeat: Infinity,
47
- repeatType: "reverse",
48
- duration: 2
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__*/ React.createElement(ProgressLinearBg, {
20
+ return /*#__PURE__*/ _jsx(ProgressLinearBg, {
20
21
  style: {
21
22
  height,
22
23
  background: bg
23
24
  },
24
- ...props
25
- }, /*#__PURE__*/ React.createElement(ProgressLinearFg, {
26
- style: {
27
- height,
28
- background: fg
29
- },
30
- initial: {
31
- x: "-100%"
32
- },
33
- animate: {
34
- x: done ? "-100%" : "0%"
35
- },
36
- transition: done ? {} : {
37
- repeat: Infinity,
38
- repeatType: "reverse",
39
- duration: 2
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__*/ React.createElement(ProgressOverlayWrap, {
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
- }, /*#__PURE__*/ React.createElement(_ProgressLinear.ProgressLinear, {
58
- bg: "var(--accent400)",
59
- fg: "var(--accent300)",
60
- done: !running
61
- }), /*#__PURE__*/ React.createElement(ProgressOverlayCenterer, {
62
- style: {
63
- top: headerHeight + "px"
64
- }
65
- }, /*#__PURE__*/ React.createElement(_ProgressCircular.ProgressCircular, {
66
- size: "50px",
67
- color: "var(--accent300)"
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__*/ React.createElement(ProgressOverlayWrap, {
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
- }, /*#__PURE__*/ React.createElement(ProgressLinear, {
47
- bg: "var(--accent400)",
48
- fg: "var(--accent300)",
49
- done: !running
50
- }), /*#__PURE__*/ React.createElement(ProgressOverlayCenterer, {
51
- style: {
52
- top: headerHeight + "px"
53
- }
54
- }, /*#__PURE__*/ React.createElement(ProgressCircular, {
55
- size: "50px",
56
- color: "var(--accent300)"
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
  };
@@ -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: import("styled-components").StyledComponent<"svg", import("styled-components").DefaultTheme, {}, never>;
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: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
15
- export declare const RatingCount: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
16
- export declare const RatingValue: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
17
- export declare const RatingRoot: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
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__*/ React.createElement(RatingStarRoot, {
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
- }, /*#__PURE__*/ React.createElement("defs", null, /*#__PURE__*/ React.createElement("linearGradient", {
51
- id: id,
52
- x1: "0",
53
- y1: "0",
54
- x2: "1",
55
- y2: "0"
56
- }, /*#__PURE__*/ React.createElement("stop", {
57
- offset: "0",
58
- stopColor: colorBg
59
- }), /*#__PURE__*/ React.createElement("stop", {
60
- offset: value,
61
- stopColor: colorBg
62
- }), /*#__PURE__*/ React.createElement("stop", {
63
- offset: value,
64
- stopColor: "rgba(255, 255, 255, 0)"
65
- }))), /*#__PURE__*/ React.createElement("path", {
66
- stroke: colorStroke,
67
- strokeWidth: "0.5",
68
- fill: `url(#${id})`,
69
- 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"
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__*/ React.createElement(RatingRoot, null, stars.map((star, idx)=>/*#__PURE__*/ React.createElement(RatingStar, {
151
- key: id + idx,
152
- idx: idx,
153
- dataIdx: idx,
154
- size: starSize,
155
- // onMouseOver={handleMouseOver}
156
- // onMouseLeave={handleMouseLeave}
157
- // onClick={handleClick}
158
- value: star.value,
159
- colorBg: colorBg,
160
- colorStroke: colorStroke
161
- })), " ", showDetails && count && /*#__PURE__*/ React.createElement(RatingDetails, null, /*#__PURE__*/ React.createElement(RatingCount, null, count), /*#__PURE__*/ React.createElement(RatingValue, null, ` - ${value}`)));
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
  };