@koine/react 2.0.0-beta.5 → 2.0.0-beta.6

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 { m } from "framer-motion";
2
3
  import { MdKeyboardArrowRight as IconDelimiter } from "react-icons/md";
3
4
  import styled, { css } from "styled-components";
@@ -58,21 +59,33 @@ export const KoineBreadcrumbs = ({ items = [], Link, ...props })=>{
58
59
  if (!items.length) {
59
60
  return null;
60
61
  }
61
- return /*#__PURE__*/ React.createElement(Root, props, /*#__PURE__*/ React.createElement(Inner, null, items.map((item, idx)=>/*#__PURE__*/ React.createElement(Item, {
62
- key: idx,
63
- initial: {
64
- opacity: 0,
65
- x: 20
66
- },
67
- animate: {
68
- opacity: 1,
69
- x: 0,
70
- transition: {
71
- delay: idx * 0.2
72
- }
73
- }
74
- }, item.url && /*#__PURE__*/ React.createElement(ItemLink, {
75
- as: Link,
76
- href: item.url
77
- }, titleCase(item.title)), !item.url && /*#__PURE__*/ React.createElement(ItemCurrent, null, titleCase(item.title)), idx < items.length - 1 && /*#__PURE__*/ React.createElement(ItemSeparator, null)))));
62
+ return /*#__PURE__*/ _jsx(Root, {
63
+ ...props,
64
+ children: /*#__PURE__*/ _jsx(Inner, {
65
+ children: items.map((item, idx)=>/*#__PURE__*/ _jsxs(Item, {
66
+ initial: {
67
+ opacity: 0,
68
+ x: 20
69
+ },
70
+ animate: {
71
+ opacity: 1,
72
+ x: 0,
73
+ transition: {
74
+ delay: idx * 0.2
75
+ }
76
+ },
77
+ children: [
78
+ item.url && /*#__PURE__*/ _jsx(ItemLink, {
79
+ as: Link,
80
+ href: item.url,
81
+ children: titleCase(item.title)
82
+ }),
83
+ !item.url && /*#__PURE__*/ _jsx(ItemCurrent, {
84
+ children: titleCase(item.title)
85
+ }),
86
+ idx < items.length - 1 && /*#__PURE__*/ _jsx(ItemSeparator, {})
87
+ ]
88
+ }, idx))
89
+ })
90
+ });
78
91
  };
@@ -8,7 +8,7 @@ export declare const btnStyleReset: import("styled-components").FlattenSimpleInt
8
8
  export declare const btnStyleBase: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<KoineButtonUiProps, import("styled-components").DefaultTheme>>;
9
9
  export declare const btnStyleContained: import("styled-components").FlattenSimpleInterpolation;
10
10
  export declare const btnStyleOutlined: import("styled-components").FlattenSimpleInterpolation;
11
- export declare const KoineButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, KoineButtonUiProps, never>;
11
+ export declare const KoineButton: any;
12
12
  export type KoineButtonUiProps = {
13
13
  disabled?: boolean;
14
14
  $variant?: "contained" | "outlined";
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "KoineButtonComposite", {
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 _react = require("react");
13
14
  const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
14
15
  const Root = _styledcomponents.default.span`
@@ -46,19 +47,40 @@ const Sub = _styledcomponents.default.span`
46
47
  }
47
48
  `;
48
49
  const Text = _styledcomponents.default.span``;
49
- const Inner = /*#__PURE__*/ (0, _react.memo)(({ textMain, textSub, text, $reverse, $icon })=>/*#__PURE__*/ React.createElement(React.Fragment, null, $reverse ? /*#__PURE__*/ React.createElement(React.Fragment, null, textSub && /*#__PURE__*/ React.createElement(Sub, {
50
- $icon: $icon,
51
- $reverse: $reverse
52
- }, textSub), textMain && /*#__PURE__*/ React.createElement(Main, {
53
- $icon: $icon,
54
- $reverse: $reverse
55
- }, textMain)) : /*#__PURE__*/ React.createElement(React.Fragment, null, textMain && /*#__PURE__*/ React.createElement(Main, {
56
- $icon: $icon,
57
- $reverse: $reverse
58
- }, textMain), textSub && /*#__PURE__*/ React.createElement(Sub, {
59
- $icon: $icon,
60
- $reverse: $reverse
61
- }, textSub)), text && /*#__PURE__*/ React.createElement(Text, null, text)));
50
+ const Inner = /*#__PURE__*/ (0, _react.memo)(({ textMain, textSub, text, $reverse, $icon })=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
51
+ children: [
52
+ $reverse ? /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
53
+ children: [
54
+ textSub && /*#__PURE__*/ (0, _jsxruntime.jsx)(Sub, {
55
+ $icon: $icon,
56
+ $reverse: $reverse,
57
+ children: textSub
58
+ }),
59
+ textMain && /*#__PURE__*/ (0, _jsxruntime.jsx)(Main, {
60
+ $icon: $icon,
61
+ $reverse: $reverse,
62
+ children: textMain
63
+ })
64
+ ]
65
+ }) : /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
66
+ children: [
67
+ textMain && /*#__PURE__*/ (0, _jsxruntime.jsx)(Main, {
68
+ $icon: $icon,
69
+ $reverse: $reverse,
70
+ children: textMain
71
+ }),
72
+ textSub && /*#__PURE__*/ (0, _jsxruntime.jsx)(Sub, {
73
+ $icon: $icon,
74
+ $reverse: $reverse,
75
+ children: textSub
76
+ })
77
+ ]
78
+ }),
79
+ text && /*#__PURE__*/ (0, _jsxruntime.jsx)(Text, {
80
+ children: text
81
+ })
82
+ ]
83
+ }));
62
84
  const KoineButtonComposite = ({ Icon, iconProps = {}, textMain, textSub, textReverse, text, Button = "button", ButtonLink = "a", ...props })=>{
63
85
  const Btn = props.href ? ButtonLink : Button;
64
86
  const styledProps = {
@@ -72,12 +94,23 @@ const KoineButtonComposite = ({ Icon, iconProps = {}, textMain, textSub, textRev
72
94
  text,
73
95
  ...styledProps
74
96
  };
75
- return /*#__PURE__*/ React.createElement(Root, {
97
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(Root, {
76
98
  as: Btn,
77
99
  ...props,
78
- ...styledProps
79
- }, Icon && /*#__PURE__*/ React.createElement(ButtonCompositeIcon, {
80
- as: Icon,
81
- ...iconProps
82
- }), Icon ? /*#__PURE__*/ React.createElement(BesidesIcon, styledProps, /*#__PURE__*/ React.createElement(Inner, innerProps)) : /*#__PURE__*/ React.createElement(Inner, innerProps));
100
+ ...styledProps,
101
+ children: [
102
+ Icon && /*#__PURE__*/ (0, _jsxruntime.jsx)(ButtonCompositeIcon, {
103
+ as: Icon,
104
+ ...iconProps
105
+ }),
106
+ Icon ? /*#__PURE__*/ (0, _jsxruntime.jsx)(BesidesIcon, {
107
+ ...styledProps,
108
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Inner, {
109
+ ...innerProps
110
+ })
111
+ }) : /*#__PURE__*/ (0, _jsxruntime.jsx)(Inner, {
112
+ ...innerProps
113
+ })
114
+ ]
115
+ });
83
116
  };
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
2
  import { memo } from "react";
2
3
  import styled from "styled-components";
3
4
  const Root = styled.span`
@@ -35,19 +36,40 @@ const Sub = styled.span`
35
36
  }
36
37
  `;
37
38
  const Text = styled.span``;
38
- const Inner = /*#__PURE__*/ memo(({ textMain, textSub, text, $reverse, $icon })=>/*#__PURE__*/ React.createElement(React.Fragment, null, $reverse ? /*#__PURE__*/ React.createElement(React.Fragment, null, textSub && /*#__PURE__*/ React.createElement(Sub, {
39
- $icon: $icon,
40
- $reverse: $reverse
41
- }, textSub), textMain && /*#__PURE__*/ React.createElement(Main, {
42
- $icon: $icon,
43
- $reverse: $reverse
44
- }, textMain)) : /*#__PURE__*/ React.createElement(React.Fragment, null, textMain && /*#__PURE__*/ React.createElement(Main, {
45
- $icon: $icon,
46
- $reverse: $reverse
47
- }, textMain), textSub && /*#__PURE__*/ React.createElement(Sub, {
48
- $icon: $icon,
49
- $reverse: $reverse
50
- }, textSub)), text && /*#__PURE__*/ React.createElement(Text, null, text)));
39
+ const Inner = /*#__PURE__*/ memo(({ textMain, textSub, text, $reverse, $icon })=>/*#__PURE__*/ _jsxs(_Fragment, {
40
+ children: [
41
+ $reverse ? /*#__PURE__*/ _jsxs(_Fragment, {
42
+ children: [
43
+ textSub && /*#__PURE__*/ _jsx(Sub, {
44
+ $icon: $icon,
45
+ $reverse: $reverse,
46
+ children: textSub
47
+ }),
48
+ textMain && /*#__PURE__*/ _jsx(Main, {
49
+ $icon: $icon,
50
+ $reverse: $reverse,
51
+ children: textMain
52
+ })
53
+ ]
54
+ }) : /*#__PURE__*/ _jsxs(_Fragment, {
55
+ children: [
56
+ textMain && /*#__PURE__*/ _jsx(Main, {
57
+ $icon: $icon,
58
+ $reverse: $reverse,
59
+ children: textMain
60
+ }),
61
+ textSub && /*#__PURE__*/ _jsx(Sub, {
62
+ $icon: $icon,
63
+ $reverse: $reverse,
64
+ children: textSub
65
+ })
66
+ ]
67
+ }),
68
+ text && /*#__PURE__*/ _jsx(Text, {
69
+ children: text
70
+ })
71
+ ]
72
+ }));
51
73
  export const KoineButtonComposite = ({ Icon, iconProps = {}, textMain, textSub, textReverse, text, Button = "button", ButtonLink = "a", ...props })=>{
52
74
  const Btn = props.href ? ButtonLink : Button;
53
75
  const styledProps = {
@@ -61,12 +83,23 @@ export const KoineButtonComposite = ({ Icon, iconProps = {}, textMain, textSub,
61
83
  text,
62
84
  ...styledProps
63
85
  };
64
- return /*#__PURE__*/ React.createElement(Root, {
86
+ return /*#__PURE__*/ _jsxs(Root, {
65
87
  as: Btn,
66
88
  ...props,
67
- ...styledProps
68
- }, Icon && /*#__PURE__*/ React.createElement(ButtonCompositeIcon, {
69
- as: Icon,
70
- ...iconProps
71
- }), Icon ? /*#__PURE__*/ React.createElement(BesidesIcon, styledProps, /*#__PURE__*/ React.createElement(Inner, innerProps)) : /*#__PURE__*/ React.createElement(Inner, innerProps));
89
+ ...styledProps,
90
+ children: [
91
+ Icon && /*#__PURE__*/ _jsx(ButtonCompositeIcon, {
92
+ as: Icon,
93
+ ...iconProps
94
+ }),
95
+ Icon ? /*#__PURE__*/ _jsx(BesidesIcon, {
96
+ ...styledProps,
97
+ children: /*#__PURE__*/ _jsx(Inner, {
98
+ ...innerProps
99
+ })
100
+ }) : /*#__PURE__*/ _jsx(Inner, {
101
+ ...innerProps
102
+ })
103
+ ]
104
+ });
72
105
  };
@@ -1,7 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { IconButtonProps } from "./IconButton";
3
3
  export declare const buttonFab: import("styled-components").FlattenSimpleInterpolation;
4
- export declare const IconButtonFab: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, import("./Button").KoineButtonUiProps & {
5
- disabled?: boolean | undefined;
6
- }, never>;
4
+ export declare const IconButtonFab: any;
7
5
  export type IconButtonFabProps = IconButtonProps & React.ComponentPropsWithRef<"button">;
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "KoineButtonLink", {
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 _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
13
14
  const _Button = require("./Button");
14
15
  const Root = (0, _styledcomponents.default)(_Button.KoineButton)`
@@ -16,11 +17,11 @@ const Root = (0, _styledcomponents.default)(_Button.KoineButton)`
16
17
  `;
17
18
  const KoineButtonLink = ({ href, Link = "a", ...props })=>{
18
19
  const isRelative = href && href.startsWith("/");
19
- return isRelative ? /*#__PURE__*/ React.createElement(Root, {
20
+ return isRelative ? /*#__PURE__*/ (0, _jsxruntime.jsx)(Root, {
20
21
  href: href,
21
22
  ...props,
22
23
  as: Link
23
- }) : /*#__PURE__*/ React.createElement(Root, {
24
+ }) : /*#__PURE__*/ (0, _jsxruntime.jsx)(Root, {
24
25
  href: href,
25
26
  ...props,
26
27
  as: "a"
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import styled from "styled-components";
2
3
  import { KoineButton } from "./Button";
3
4
  const Root = styled(KoineButton)`
@@ -5,11 +6,11 @@ const Root = styled(KoineButton)`
5
6
  `;
6
7
  export const KoineButtonLink = ({ href, Link = "a", ...props })=>{
7
8
  const isRelative = href && href.startsWith("/");
8
- return isRelative ? /*#__PURE__*/ React.createElement(Root, {
9
+ return isRelative ? /*#__PURE__*/ _jsx(Root, {
9
10
  href: href,
10
11
  ...props,
11
12
  as: Link
12
- }) : /*#__PURE__*/ React.createElement(Root, {
13
+ }) : /*#__PURE__*/ _jsx(Root, {
13
14
  href: href,
14
15
  ...props,
15
16
  as: "a"
@@ -2,9 +2,7 @@
2
2
  import { KoineButtonUiProps } from "./Button";
3
3
  export declare const iconBtnStyleReset: import("styled-components").FlattenSimpleInterpolation;
4
4
  export declare const iconBtnStyleBase: import("styled-components").FlattenSimpleInterpolation;
5
- export declare const IconButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, KoineButtonUiProps & {
6
- disabled?: boolean | undefined;
7
- }, never>;
5
+ export declare const IconButton: any;
8
6
  export type IconButtonUiProps = KoineButtonUiProps & {
9
7
  disabled?: boolean;
10
8
  };
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "CalendarDaygridCell", {
8
8
  return CalendarDaygridCell;
9
9
  }
10
10
  });
11
+ const _jsxruntime = require("react/jsx-runtime");
11
12
  const _react = require("react");
12
13
  const _md = require("react-icons/md");
13
14
  const _utils = require("./utils");
@@ -27,56 +28,78 @@ const CalendarDaygridCell = ({ eventClicked, setEventClicked, // eventHovered,
27
28
  setEventHovered, view, maxEvents, events, calendarsMap, Cell = "div", CellOverflow = "div", CellEvent = "div", CellEventBtn = "div", CellEventTitle = "span", CellEventStart = "span" })=>{
28
29
  const [isExpanded, expand] = (0, _react.useState)(false);
29
30
  const eventsWithoutPlaceholders = events.filter((event)=>!event.placeholder);
30
- return /*#__PURE__*/ React.createElement(Cell, null, events.map((event, i)=>{
31
- if (i === maxEvents && !isExpanded) {
32
- return /*#__PURE__*/ React.createElement(CellOverflow, {
33
- key: "overflowMessage" + i,
34
- onClick: ()=>expand(true)
35
- }, /*#__PURE__*/ React.createElement(_md.MdAdd, null), eventsWithoutPlaceholders.length - maxEvents);
36
- }
37
- if (i > maxEvents && !isExpanded) return null;
38
- if (event.placeholder) {
39
- return /*#__PURE__*/ React.createElement(_react.Fragment, {
40
- key: event.key
41
- }, /*#__PURE__*/ React.createElement(CellEvent, {
42
- $placeholder: true
43
- }, /*#__PURE__*/ React.createElement(CellEventBtn, {
44
- "aria-hidden": "true",
45
- style: {
46
- visibility: "hidden"
47
- },
48
- $placeholder: true
49
- }, /*#__PURE__*/ React.createElement(CellEventTitle, null, "\xa0"))));
50
- }
51
- const styleEvent = {
52
- zIndex: event.firstOfMulti ? 1 : 0,
53
- position: "relative",
54
- width: event.firstOfMulti ? `${100 * event.width}%` : "100%"
55
- };
56
- if (!calendarsMap[event.calendar.id].on) {
57
- // @ts-expect-error nevermind
58
- styleBtn.display = "none";
59
- }
60
- const styledProps = {
61
- $view: view,
62
- $selected: eventClicked?.uid === event.uid,
63
- $past: event.isPast,
64
- $color: event.color,
65
- $isOutOfRange: event.$isOutOfRange,
66
- $isToday: event.$isToday
67
- };
68
- return /*#__PURE__*/ React.createElement(_react.Fragment, {
69
- key: event.key
70
- }, /*#__PURE__*/ React.createElement(CellEvent, {
71
- style: styleEvent,
72
- ...styledProps
73
- }, /*#__PURE__*/ React.createElement(CellEventBtn, {
74
- role: "button",
75
- style: styleBtn,
76
- ...styledProps,
77
- onClick: ()=>setEventClicked((prev)=>prev?.uid === event.uid ? null : event),
78
- onMouseEnter: ()=>setEventHovered(event),
79
- onMouseLeave: ()=>setEventHovered(null)
80
- }, event.allDay ? /*#__PURE__*/ React.createElement(CellEventTitle, null, event.title) : /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(CellEventStart, null, (0, _utils.getDisplayTime)(event.start)), /*#__PURE__*/ React.createElement(CellEventTitle, null, event.title)))));
81
- }));
31
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(Cell, {
32
+ children: events.map((event, i)=>{
33
+ if (i === maxEvents && !isExpanded) {
34
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(CellOverflow, {
35
+ onClick: ()=>expand(true),
36
+ children: [
37
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_md.MdAdd, {}),
38
+ eventsWithoutPlaceholders.length - maxEvents
39
+ ]
40
+ }, "overflowMessage" + i);
41
+ }
42
+ if (i > maxEvents && !isExpanded) return null;
43
+ if (event.placeholder) {
44
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_react.Fragment, {
45
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(CellEvent, {
46
+ $placeholder: true,
47
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(CellEventBtn, {
48
+ "aria-hidden": "true",
49
+ style: {
50
+ visibility: "hidden"
51
+ },
52
+ $placeholder: true,
53
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(CellEventTitle, {
54
+ children: "\xa0"
55
+ })
56
+ })
57
+ })
58
+ }, event.key);
59
+ }
60
+ const styleEvent = {
61
+ zIndex: event.firstOfMulti ? 1 : 0,
62
+ position: "relative",
63
+ width: event.firstOfMulti ? `${100 * event.width}%` : "100%"
64
+ };
65
+ if (!calendarsMap[event.calendar.id].on) {
66
+ // @ts-expect-error nevermind
67
+ styleBtn.display = "none";
68
+ }
69
+ const styledProps = {
70
+ $view: view,
71
+ $selected: eventClicked?.uid === event.uid,
72
+ $past: event.isPast,
73
+ $color: event.color,
74
+ $isOutOfRange: event.$isOutOfRange,
75
+ $isToday: event.$isToday
76
+ };
77
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_react.Fragment, {
78
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(CellEvent, {
79
+ style: styleEvent,
80
+ ...styledProps,
81
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(CellEventBtn, {
82
+ role: "button",
83
+ style: styleBtn,
84
+ ...styledProps,
85
+ onClick: ()=>setEventClicked((prev)=>prev?.uid === event.uid ? null : event),
86
+ onMouseEnter: ()=>setEventHovered(event),
87
+ onMouseLeave: ()=>setEventHovered(null),
88
+ children: event.allDay ? /*#__PURE__*/ (0, _jsxruntime.jsx)(CellEventTitle, {
89
+ children: event.title
90
+ }) : /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
91
+ children: [
92
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(CellEventStart, {
93
+ children: (0, _utils.getDisplayTime)(event.start)
94
+ }),
95
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(CellEventTitle, {
96
+ children: event.title
97
+ })
98
+ ]
99
+ })
100
+ })
101
+ })
102
+ }, event.key);
103
+ })
104
+ });
82
105
  };
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
2
  import { Fragment, useState } from "react";
2
3
  import { MdAdd as IconExpand } from "react-icons/md";
3
4
  import { getDisplayTime } from "./utils";
@@ -17,56 +18,78 @@ export const CalendarDaygridCell = ({ eventClicked, setEventClicked, // eventHov
17
18
  setEventHovered, view, maxEvents, events, calendarsMap, Cell = "div", CellOverflow = "div", CellEvent = "div", CellEventBtn = "div", CellEventTitle = "span", CellEventStart = "span" })=>{
18
19
  const [isExpanded, expand] = useState(false);
19
20
  const eventsWithoutPlaceholders = events.filter((event)=>!event.placeholder);
20
- return /*#__PURE__*/ React.createElement(Cell, null, events.map((event, i)=>{
21
- if (i === maxEvents && !isExpanded) {
22
- return /*#__PURE__*/ React.createElement(CellOverflow, {
23
- key: "overflowMessage" + i,
24
- onClick: ()=>expand(true)
25
- }, /*#__PURE__*/ React.createElement(IconExpand, null), eventsWithoutPlaceholders.length - maxEvents);
26
- }
27
- if (i > maxEvents && !isExpanded) return null;
28
- if (event.placeholder) {
29
- return /*#__PURE__*/ React.createElement(Fragment, {
30
- key: event.key
31
- }, /*#__PURE__*/ React.createElement(CellEvent, {
32
- $placeholder: true
33
- }, /*#__PURE__*/ React.createElement(CellEventBtn, {
34
- "aria-hidden": "true",
35
- style: {
36
- visibility: "hidden"
37
- },
38
- $placeholder: true
39
- }, /*#__PURE__*/ React.createElement(CellEventTitle, null, "\xa0"))));
40
- }
41
- const styleEvent = {
42
- zIndex: event.firstOfMulti ? 1 : 0,
43
- position: "relative",
44
- width: event.firstOfMulti ? `${100 * event.width}%` : "100%"
45
- };
46
- if (!calendarsMap[event.calendar.id].on) {
47
- // @ts-expect-error nevermind
48
- styleBtn.display = "none";
49
- }
50
- const styledProps = {
51
- $view: view,
52
- $selected: eventClicked?.uid === event.uid,
53
- $past: event.isPast,
54
- $color: event.color,
55
- $isOutOfRange: event.$isOutOfRange,
56
- $isToday: event.$isToday
57
- };
58
- return /*#__PURE__*/ React.createElement(Fragment, {
59
- key: event.key
60
- }, /*#__PURE__*/ React.createElement(CellEvent, {
61
- style: styleEvent,
62
- ...styledProps
63
- }, /*#__PURE__*/ React.createElement(CellEventBtn, {
64
- role: "button",
65
- style: styleBtn,
66
- ...styledProps,
67
- onClick: ()=>setEventClicked((prev)=>prev?.uid === event.uid ? null : event),
68
- onMouseEnter: ()=>setEventHovered(event),
69
- onMouseLeave: ()=>setEventHovered(null)
70
- }, event.allDay ? /*#__PURE__*/ React.createElement(CellEventTitle, null, event.title) : /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(CellEventStart, null, getDisplayTime(event.start)), /*#__PURE__*/ React.createElement(CellEventTitle, null, event.title)))));
71
- }));
21
+ return /*#__PURE__*/ _jsx(Cell, {
22
+ children: events.map((event, i)=>{
23
+ if (i === maxEvents && !isExpanded) {
24
+ return /*#__PURE__*/ _jsxs(CellOverflow, {
25
+ onClick: ()=>expand(true),
26
+ children: [
27
+ /*#__PURE__*/ _jsx(IconExpand, {}),
28
+ eventsWithoutPlaceholders.length - maxEvents
29
+ ]
30
+ }, "overflowMessage" + i);
31
+ }
32
+ if (i > maxEvents && !isExpanded) return null;
33
+ if (event.placeholder) {
34
+ return /*#__PURE__*/ _jsx(Fragment, {
35
+ children: /*#__PURE__*/ _jsx(CellEvent, {
36
+ $placeholder: true,
37
+ children: /*#__PURE__*/ _jsx(CellEventBtn, {
38
+ "aria-hidden": "true",
39
+ style: {
40
+ visibility: "hidden"
41
+ },
42
+ $placeholder: true,
43
+ children: /*#__PURE__*/ _jsx(CellEventTitle, {
44
+ children: "\xa0"
45
+ })
46
+ })
47
+ })
48
+ }, event.key);
49
+ }
50
+ const styleEvent = {
51
+ zIndex: event.firstOfMulti ? 1 : 0,
52
+ position: "relative",
53
+ width: event.firstOfMulti ? `${100 * event.width}%` : "100%"
54
+ };
55
+ if (!calendarsMap[event.calendar.id].on) {
56
+ // @ts-expect-error nevermind
57
+ styleBtn.display = "none";
58
+ }
59
+ const styledProps = {
60
+ $view: view,
61
+ $selected: eventClicked?.uid === event.uid,
62
+ $past: event.isPast,
63
+ $color: event.color,
64
+ $isOutOfRange: event.$isOutOfRange,
65
+ $isToday: event.$isToday
66
+ };
67
+ return /*#__PURE__*/ _jsx(Fragment, {
68
+ children: /*#__PURE__*/ _jsx(CellEvent, {
69
+ style: styleEvent,
70
+ ...styledProps,
71
+ children: /*#__PURE__*/ _jsx(CellEventBtn, {
72
+ role: "button",
73
+ style: styleBtn,
74
+ ...styledProps,
75
+ onClick: ()=>setEventClicked((prev)=>prev?.uid === event.uid ? null : event),
76
+ onMouseEnter: ()=>setEventHovered(event),
77
+ onMouseLeave: ()=>setEventHovered(null),
78
+ children: event.allDay ? /*#__PURE__*/ _jsx(CellEventTitle, {
79
+ children: event.title
80
+ }) : /*#__PURE__*/ _jsxs(_Fragment, {
81
+ children: [
82
+ /*#__PURE__*/ _jsx(CellEventStart, {
83
+ children: getDisplayTime(event.start)
84
+ }),
85
+ /*#__PURE__*/ _jsx(CellEventTitle, {
86
+ children: event.title
87
+ })
88
+ ]
89
+ })
90
+ })
91
+ })
92
+ }, event.key);
93
+ })
94
+ });
72
95
  };