@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
@@ -26,6 +26,7 @@ _export(exports, {
26
26
  }
27
27
  });
28
28
  const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
29
+ const _jsxruntime = require("react/jsx-runtime");
29
30
  const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
30
31
  const _Buttons = require("../../Buttons");
31
32
  const _media = require("../../styles/media");
@@ -65,11 +66,20 @@ const InputGroupButtonPost = (0, _styledcomponents.default)(_Buttons.KoineButton
65
66
  }
66
67
  `;
67
68
  const InputGroup = ({ pre, post, Button = _Buttons.KoineButton, btnProps = {}, children, ...props })=>{
68
- return /*#__PURE__*/ React.createElement(InputGroupRoot, props, pre && /*#__PURE__*/ React.createElement(InputGroupButtonPre, {
69
- as: Button,
70
- ...btnProps
71
- }), /*#__PURE__*/ React.createElement(InputGroupMain, null, children), post && /*#__PURE__*/ React.createElement(InputGroupButtonPost, {
72
- as: Button,
73
- ...btnProps
74
- }));
69
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(InputGroupRoot, {
70
+ ...props,
71
+ children: [
72
+ pre && /*#__PURE__*/ (0, _jsxruntime.jsx)(InputGroupButtonPre, {
73
+ as: Button,
74
+ ...btnProps
75
+ }),
76
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(InputGroupMain, {
77
+ children: children
78
+ }),
79
+ post && /*#__PURE__*/ (0, _jsxruntime.jsx)(InputGroupButtonPost, {
80
+ as: Button,
81
+ ...btnProps
82
+ })
83
+ ]
84
+ });
75
85
  };
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import styled from "styled-components";
2
3
  import { KoineButton } from "../../Buttons";
3
4
  import { max, min } from "../../styles/media";
@@ -37,11 +38,20 @@ export const InputGroupButtonPost = styled(KoineButton)`
37
38
  }
38
39
  `;
39
40
  export const InputGroup = ({ pre, post, Button = KoineButton, btnProps = {}, children, ...props })=>{
40
- return /*#__PURE__*/ React.createElement(InputGroupRoot, props, pre && /*#__PURE__*/ React.createElement(InputGroupButtonPre, {
41
- as: Button,
42
- ...btnProps
43
- }), /*#__PURE__*/ React.createElement(InputGroupMain, null, children), post && /*#__PURE__*/ React.createElement(InputGroupButtonPost, {
44
- as: Button,
45
- ...btnProps
46
- }));
41
+ return /*#__PURE__*/ _jsxs(InputGroupRoot, {
42
+ ...props,
43
+ children: [
44
+ pre && /*#__PURE__*/ _jsx(InputGroupButtonPre, {
45
+ as: Button,
46
+ ...btnProps
47
+ }),
48
+ /*#__PURE__*/ _jsx(InputGroupMain, {
49
+ children: children
50
+ }),
51
+ post && /*#__PURE__*/ _jsx(InputGroupButtonPost, {
52
+ as: Button,
53
+ ...btnProps
54
+ })
55
+ ]
56
+ });
47
57
  };
@@ -1,3 +1,3 @@
1
1
  export declare const label = "\n display: flex;\n font-size: 13px;\n cursor: pointer;\n";
2
2
  export declare const labelMaterial = "\n z-index: 2;\n position: relative;\n display: inline-block;\n padding: 0 5px;\n font-weight: 100;\n font-size: 10px;\n background: var(--bodyBg);\n transform: translateY(-0.3em) translateX(1em);\n cursor: pointer;\n\n + * {\n margin-top: -1em;\n }\n";
3
- export declare const Label: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const Label: any;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import type { FormControl } from "../helpers";
3
- export declare const PasswordInputNative: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const PasswordInputNative: any;
4
4
  export type PasswordProps = FormControl;
5
5
  export declare const Password: import("react").ForwardRefExoticComponent<Omit<PasswordProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
@@ -17,6 +17,7 @@ _export(exports, {
17
17
  }
18
18
  });
19
19
  const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ const _jsxruntime = require("react/jsx-runtime");
20
21
  const _react = require("react");
21
22
  const _im = require("react-icons/im");
22
23
  const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
@@ -44,15 +45,28 @@ const PasswordIcon = _styledcomponents.default.span`
44
45
  `;
45
46
  const Password = /*#__PURE__*/ (0, _react.forwardRef)(function Password({ register, name, label, ...props }, ref) {
46
47
  const [visible, setVisible] = (0, _react.useState)(false);
47
- return /*#__PURE__*/ React.createElement(React.Fragment, null, label && /*#__PURE__*/ React.createElement(_Label.Label, null, label), /*#__PURE__*/ React.createElement(PasswordInputWrap, null, /*#__PURE__*/ React.createElement(PasswordInputNative, {
48
- type: visible ? "text" : "password",
49
- autoComplete: "new-password",
50
- ...register ? register(name) : {
51
- name,
52
- ref
53
- },
54
- ...props
55
- }), /*#__PURE__*/ React.createElement(PasswordIcon, {
56
- onClick: ()=>setVisible((prev)=>!prev)
57
- }, visible ? /*#__PURE__*/ React.createElement(_im.ImEyeBlocked, null) : /*#__PURE__*/ React.createElement(_im.ImEye, null))));
48
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
49
+ children: [
50
+ label && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Label.Label, {
51
+ children: label
52
+ }),
53
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(PasswordInputWrap, {
54
+ children: [
55
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(PasswordInputNative, {
56
+ type: visible ? "text" : "password",
57
+ autoComplete: "new-password",
58
+ ...register ? register(name) : {
59
+ name,
60
+ ref
61
+ },
62
+ ...props
63
+ }),
64
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(PasswordIcon, {
65
+ onClick: ()=>setVisible((prev)=>!prev),
66
+ children: visible ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_im.ImEyeBlocked, {}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_im.ImEye, {})
67
+ })
68
+ ]
69
+ })
70
+ ]
71
+ });
58
72
  });
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
2
  import { forwardRef, useState } from "react";
2
3
  import { ImEyeBlocked as IconInvisible, ImEye as IconVisible } from "react-icons/im";
3
4
  import styled from "styled-components";
@@ -25,15 +26,28 @@ const PasswordIcon = styled.span`
25
26
  `;
26
27
  export const Password = /*#__PURE__*/ forwardRef(function Password({ register, name, label, ...props }, ref) {
27
28
  const [visible, setVisible] = useState(false);
28
- return /*#__PURE__*/ React.createElement(React.Fragment, null, label && /*#__PURE__*/ React.createElement(Label, null, label), /*#__PURE__*/ React.createElement(PasswordInputWrap, null, /*#__PURE__*/ React.createElement(PasswordInputNative, {
29
- type: visible ? "text" : "password",
30
- autoComplete: "new-password",
31
- ...register ? register(name) : {
32
- name,
33
- ref
34
- },
35
- ...props
36
- }), /*#__PURE__*/ React.createElement(PasswordIcon, {
37
- onClick: ()=>setVisible((prev)=>!prev)
38
- }, visible ? /*#__PURE__*/ React.createElement(IconInvisible, null) : /*#__PURE__*/ React.createElement(IconVisible, null))));
29
+ return /*#__PURE__*/ _jsxs(_Fragment, {
30
+ children: [
31
+ label && /*#__PURE__*/ _jsx(Label, {
32
+ children: label
33
+ }),
34
+ /*#__PURE__*/ _jsxs(PasswordInputWrap, {
35
+ children: [
36
+ /*#__PURE__*/ _jsx(PasswordInputNative, {
37
+ type: visible ? "text" : "password",
38
+ autoComplete: "new-password",
39
+ ...register ? register(name) : {
40
+ name,
41
+ ref
42
+ },
43
+ ...props
44
+ }),
45
+ /*#__PURE__*/ _jsx(PasswordIcon, {
46
+ onClick: ()=>setVisible((prev)=>!prev),
47
+ children: visible ? /*#__PURE__*/ _jsx(IconInvisible, {}) : /*#__PURE__*/ _jsx(IconVisible, {})
48
+ })
49
+ ]
50
+ })
51
+ ]
52
+ });
39
53
  });
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "Radio", {
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 _Label = require("../Label/Label");
@@ -32,18 +33,36 @@ const RadioOption = /*#__PURE__*/ (0, _react.forwardRef)(function RadioOption({
32
33
  name,
33
34
  ref: $ref || ref
34
35
  };
35
- return /*#__PURE__*/ React.createElement(RadioOptionRoot, null, /*#__PURE__*/ React.createElement(RadioToggle, null, /*#__PURE__*/ React.createElement(_styles.InputInvisible, {
36
- type: "radio",
37
- ...inputProps,
38
- ...props
39
- }), /*#__PURE__*/ React.createElement(RadioIndicator, null)), /*#__PURE__*/ React.createElement(RadioOptionLabel, null, label));
36
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(RadioOptionRoot, {
37
+ children: [
38
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(RadioToggle, {
39
+ children: [
40
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_styles.InputInvisible, {
41
+ type: "radio",
42
+ ...inputProps,
43
+ ...props
44
+ }),
45
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(RadioIndicator, {})
46
+ ]
47
+ }),
48
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(RadioOptionLabel, {
49
+ children: label
50
+ })
51
+ ]
52
+ });
40
53
  });
41
54
  const Radio = /*#__PURE__*/ (0, _react.forwardRef)(function Radio({ label, options, ...props }, ref) {
42
55
  if (!options) return null;
43
- return /*#__PURE__*/ React.createElement(RadioRoot, null, label && /*#__PURE__*/ React.createElement(RadioLabel, null, label), options.map((option, idx)=>/*#__PURE__*/ React.createElement(RadioOption, {
44
- key: idx,
45
- ...option,
46
- ...props,
47
- $ref: ref
48
- })));
56
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(RadioRoot, {
57
+ children: [
58
+ label && /*#__PURE__*/ (0, _jsxruntime.jsx)(RadioLabel, {
59
+ children: label
60
+ }),
61
+ options.map((option, idx)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(RadioOption, {
62
+ ...option,
63
+ ...props,
64
+ $ref: ref
65
+ }, idx))
66
+ ]
67
+ });
49
68
  });
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { forwardRef } from "react";
2
3
  import styled from "styled-components";
3
4
  import { label } from "../Label/Label";
@@ -21,18 +22,36 @@ const RadioOption = /*#__PURE__*/ forwardRef(function RadioOption({ register, na
21
22
  name,
22
23
  ref: $ref || ref
23
24
  };
24
- return /*#__PURE__*/ React.createElement(RadioOptionRoot, null, /*#__PURE__*/ React.createElement(RadioToggle, null, /*#__PURE__*/ React.createElement(InputInvisible, {
25
- type: "radio",
26
- ...inputProps,
27
- ...props
28
- }), /*#__PURE__*/ React.createElement(RadioIndicator, null)), /*#__PURE__*/ React.createElement(RadioOptionLabel, null, label));
25
+ return /*#__PURE__*/ _jsxs(RadioOptionRoot, {
26
+ children: [
27
+ /*#__PURE__*/ _jsxs(RadioToggle, {
28
+ children: [
29
+ /*#__PURE__*/ _jsx(InputInvisible, {
30
+ type: "radio",
31
+ ...inputProps,
32
+ ...props
33
+ }),
34
+ /*#__PURE__*/ _jsx(RadioIndicator, {})
35
+ ]
36
+ }),
37
+ /*#__PURE__*/ _jsx(RadioOptionLabel, {
38
+ children: label
39
+ })
40
+ ]
41
+ });
29
42
  });
30
43
  export const Radio = /*#__PURE__*/ forwardRef(function Radio({ label, options, ...props }, ref) {
31
44
  if (!options) return null;
32
- return /*#__PURE__*/ React.createElement(RadioRoot, null, label && /*#__PURE__*/ React.createElement(RadioLabel, null, label), options.map((option, idx)=>/*#__PURE__*/ React.createElement(RadioOption, {
33
- key: idx,
34
- ...option,
35
- ...props,
36
- $ref: ref
37
- })));
45
+ return /*#__PURE__*/ _jsxs(RadioRoot, {
46
+ children: [
47
+ label && /*#__PURE__*/ _jsx(RadioLabel, {
48
+ children: label
49
+ }),
50
+ options.map((option, idx)=>/*#__PURE__*/ _jsx(RadioOption, {
51
+ ...option,
52
+ ...props,
53
+ $ref: ref
54
+ }, idx))
55
+ ]
56
+ });
38
57
  });
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { UseToggleProps } from "../Toggle/useToggle";
3
- export declare const SwitchTrack: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
4
- export declare const SwitchHandle: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const SwitchTrack: any;
4
+ export declare const SwitchHandle: any;
5
5
  export type SwitchProps = UseToggleProps;
6
6
  /**
7
7
  * All logic and invisible Inputs come from the `useToggle` hook
@@ -20,6 +20,7 @@ _export(exports, {
20
20
  }
21
21
  });
22
22
  const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
23
+ const _jsxruntime = require("react/jsx-runtime");
23
24
  const _react = require("react");
24
25
  const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
25
26
  const _styled = require("../../styles/styled");
@@ -64,5 +65,16 @@ const SwitchHandle = _styledcomponents.default.span`
64
65
  `;
65
66
  const Switch = /*#__PURE__*/ (0, _react.forwardRef)(function Switch(props, ref) {
66
67
  const { rootProps, Inputs, label } = (0, _useToggle.useToggle)(props, ref);
67
- return /*#__PURE__*/ React.createElement(_Checkbox.CheckboxRoot, rootProps, Inputs, /*#__PURE__*/ React.createElement(SwitchTrack, null, /*#__PURE__*/ React.createElement(SwitchHandle, null)), label && /*#__PURE__*/ React.createElement(_Checkbox.CheckboxLabel, null, label));
68
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Checkbox.CheckboxRoot, {
69
+ ...rootProps,
70
+ children: [
71
+ Inputs,
72
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(SwitchTrack, {
73
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(SwitchHandle, {})
74
+ }),
75
+ label && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Checkbox.CheckboxLabel, {
76
+ children: label
77
+ })
78
+ ]
79
+ });
68
80
  });
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { forwardRef } from "react";
2
3
  import styled from "styled-components";
3
4
  import { stateFocus } from "../../styles/styled";
@@ -44,5 +45,16 @@ export const SwitchHandle = styled.span`
44
45
  * All logic and invisible Inputs come from the `useToggle` hook
45
46
  */ export const Switch = /*#__PURE__*/ forwardRef(function Switch(props, ref) {
46
47
  const { rootProps, Inputs, label } = useToggle(props, ref);
47
- return /*#__PURE__*/ React.createElement(CheckboxRoot, rootProps, Inputs, /*#__PURE__*/ React.createElement(SwitchTrack, null, /*#__PURE__*/ React.createElement(SwitchHandle, null)), label && /*#__PURE__*/ React.createElement(CheckboxLabel, null, label));
48
+ return /*#__PURE__*/ _jsxs(CheckboxRoot, {
49
+ ...rootProps,
50
+ children: [
51
+ Inputs,
52
+ /*#__PURE__*/ _jsx(SwitchTrack, {
53
+ children: /*#__PURE__*/ _jsx(SwitchHandle, {})
54
+ }),
55
+ label && /*#__PURE__*/ _jsx(CheckboxLabel, {
56
+ children: label
57
+ })
58
+ ]
59
+ });
48
60
  });
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { FormControl } from "../helpers";
3
- export declare const TextareaNative: import("styled-components").StyledComponent<"textarea", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const TextareaNative: any;
4
4
  export type TextareaProps = FormControl<"textarea">;
5
5
  export declare const Textarea: import("react").ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -17,6 +17,7 @@ _export(exports, {
17
17
  }
18
18
  });
19
19
  const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ const _jsxruntime = require("react/jsx-runtime");
20
21
  const _react = require("react");
21
22
  const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
22
23
  const _Label = require("../Label/Label");
@@ -27,11 +28,18 @@ const TextareaNative = _styledcomponents.default.textarea`
27
28
  resize: vertical;
28
29
  `;
29
30
  const Textarea = /*#__PURE__*/ (0, _react.forwardRef)(function Textarea({ register, name, label, ...props }, ref) {
30
- return /*#__PURE__*/ React.createElement(React.Fragment, null, label && /*#__PURE__*/ React.createElement(_Label.Label, null, label), /*#__PURE__*/ React.createElement(TextareaNative, {
31
- ...register ? register(name) : {
32
- name,
33
- ref
34
- },
35
- ...props
36
- }));
31
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
32
+ children: [
33
+ label && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Label.Label, {
34
+ children: label
35
+ }),
36
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(TextareaNative, {
37
+ ...register ? register(name) : {
38
+ name,
39
+ ref
40
+ },
41
+ ...props
42
+ })
43
+ ]
44
+ });
37
45
  });
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
2
  import { forwardRef } from "react";
2
3
  import styled from "styled-components";
3
4
  import { Label } from "../Label/Label";
@@ -8,11 +9,18 @@ export const TextareaNative = styled.textarea`
8
9
  resize: vertical;
9
10
  `;
10
11
  export const Textarea = /*#__PURE__*/ forwardRef(function Textarea({ register, name, label, ...props }, ref) {
11
- return /*#__PURE__*/ React.createElement(React.Fragment, null, label && /*#__PURE__*/ React.createElement(Label, null, label), /*#__PURE__*/ React.createElement(TextareaNative, {
12
- ...register ? register(name) : {
13
- name,
14
- ref
15
- },
16
- ...props
17
- }));
12
+ return /*#__PURE__*/ _jsxs(_Fragment, {
13
+ children: [
14
+ label && /*#__PURE__*/ _jsx(Label, {
15
+ children: label
16
+ }),
17
+ /*#__PURE__*/ _jsx(TextareaNative, {
18
+ ...register ? register(name) : {
19
+ name,
20
+ ref
21
+ },
22
+ ...props
23
+ })
24
+ ]
25
+ });
18
26
  });
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "TextareaRich", {
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 _Editor = require("../../Editor");
@@ -35,16 +36,23 @@ const Root = _styledcomponents.default.div`
35
36
  `;
36
37
  const TextareaRich = /*#__PURE__*/ (0, _react.forwardRef)(function TextareaRich({ register, setValue, name, label, defaultValue = "", onChange, ...props }, ref) {
37
38
  if (register) register(name);
38
- return /*#__PURE__*/ React.createElement(Root, null, label && /*#__PURE__*/ React.createElement(_Label.Label, null, label), /*#__PURE__*/ React.createElement(_Editor.Editor, {
39
- options: {
40
- // element: <TextareaAutosize />,
41
- content: defaultValue,
42
- onUpdate: (onChange || setValue) && name ? ({ editor })=>{
43
- const value = editor.getHTML();
44
- if (setValue) setValue(name, value);
45
- (0, _helpers.triggerOnChange)(onChange, name, value);
46
- } : undefined
47
- },
48
- ...props
49
- }));
39
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(Root, {
40
+ children: [
41
+ label && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Label.Label, {
42
+ children: label
43
+ }),
44
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_Editor.Editor, {
45
+ options: {
46
+ // element: <TextareaAutosize />,
47
+ content: defaultValue,
48
+ onUpdate: (onChange || setValue) && name ? ({ editor })=>{
49
+ const value = editor.getHTML();
50
+ if (setValue) setValue(name, value);
51
+ (0, _helpers.triggerOnChange)(onChange, name, value);
52
+ } : undefined
53
+ },
54
+ ...props
55
+ })
56
+ ]
57
+ });
50
58
  });
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { forwardRef } from "react";
2
3
  import styled from "styled-components";
3
4
  import { Editor } from "../../Editor";
@@ -25,16 +26,23 @@ const Root = styled.div`
25
26
  `;
26
27
  export const TextareaRich = /*#__PURE__*/ forwardRef(function TextareaRich({ register, setValue, name, label, defaultValue = "", onChange, ...props }, ref) {
27
28
  if (register) register(name);
28
- return /*#__PURE__*/ React.createElement(Root, null, label && /*#__PURE__*/ React.createElement(Label, null, label), /*#__PURE__*/ React.createElement(Editor, {
29
- options: {
30
- // element: <TextareaAutosize />,
31
- content: defaultValue,
32
- onUpdate: (onChange || setValue) && name ? ({ editor })=>{
33
- const value = editor.getHTML();
34
- if (setValue) setValue(name, value);
35
- triggerOnChange(onChange, name, value);
36
- } : undefined
37
- },
38
- ...props
39
- }));
29
+ return /*#__PURE__*/ _jsxs(Root, {
30
+ children: [
31
+ label && /*#__PURE__*/ _jsx(Label, {
32
+ children: label
33
+ }),
34
+ /*#__PURE__*/ _jsx(Editor, {
35
+ options: {
36
+ // element: <TextareaAutosize />,
37
+ content: defaultValue,
38
+ onUpdate: (onChange || setValue) && name ? ({ editor })=>{
39
+ const value = editor.getHTML();
40
+ if (setValue) setValue(name, value);
41
+ triggerOnChange(onChange, name, value);
42
+ } : undefined
43
+ },
44
+ ...props
45
+ })
46
+ ]
47
+ });
40
48
  });
@@ -2,13 +2,13 @@ export declare const toggleBase = "\n border: 1px solid var(--forms-border-colo
2
2
  export declare const toggleIndicatorBg = "\n display: inline-block;\n flex-shrink: 0;\n width: 100%;\n height: 100%;\n";
3
3
  export declare const toggleIndicatorBgShape: string;
4
4
  export declare const toggleIndicatorFg = "\n position: absolute;\n left: 0;\n width: 100%;\n height: 100%;\n fill: currentcolor;\n";
5
- export declare const Toggle: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
6
- export declare const ToggleLabel: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
7
- export declare const ToggleLabelSub: import("styled-components").StyledComponent<"small", import("styled-components").DefaultTheme, {}, never>;
8
- export declare const ToggleIndicatorHolder: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
9
- export declare const ToggleIndicatorBgSquare: import("styled-components").StyledComponent<"svg", import("styled-components").DefaultTheme, {}, never>;
10
- export declare const ToggleIndicatorBgCircle: import("styled-components").StyledComponent<"svg", import("styled-components").DefaultTheme, {}, never>;
11
- export declare const ToggleIndicatorFg: import("styled-components").StyledComponent<"svg", import("styled-components").DefaultTheme, {}, never>;
5
+ export declare const Toggle: any;
6
+ export declare const ToggleLabel: any;
7
+ export declare const ToggleLabelSub: any;
8
+ export declare const ToggleIndicatorHolder: any;
9
+ export declare const ToggleIndicatorBgSquare: any;
10
+ export declare const ToggleIndicatorBgCircle: any;
11
+ export declare const ToggleIndicatorFg: any;
12
12
  export type ToggleIndicatorProps = unknown;
13
13
  export type ToggleIndicatorSquaredProps = ToggleIndicatorProps;
14
14
  export declare const ToggleIndicatorSquared: (props: ToggleIndicatorSquaredProps) => import("react/jsx-runtime").JSX.Element;
@@ -55,6 +55,7 @@ _export(exports, {
55
55
  }
56
56
  });
57
57
  const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
58
+ const _jsxruntime = require("react/jsx-runtime");
58
59
  const _react = require("react");
59
60
  const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
60
61
  const _styled = require("../../styles/styled");
@@ -121,36 +122,54 @@ const ToggleIndicatorFg = _styledcomponents.default.svg`
121
122
  }
122
123
  `;
123
124
  const ToggleIndicatorSquared = (props)=>{
124
- return /*#__PURE__*/ React.createElement(ToggleIndicatorHolder, null, /*#__PURE__*/ React.createElement(ToggleIndicatorBgSquare, {
125
- viewBox: "0 0 24 24"
126
- }, /*#__PURE__*/ React.createElement("rect", {
127
- width: "24",
128
- height: "24"
129
- })), /*#__PURE__*/ React.createElement(ToggleIndicatorFg, {
130
- viewBox: "0 0 24 24"
131
- }, /*#__PURE__*/ React.createElement("path", {
132
- d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
133
- })));
125
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(ToggleIndicatorHolder, {
126
+ children: [
127
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(ToggleIndicatorBgSquare, {
128
+ viewBox: "0 0 24 24",
129
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)("rect", {
130
+ width: "24",
131
+ height: "24"
132
+ })
133
+ }),
134
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(ToggleIndicatorFg, {
135
+ viewBox: "0 0 24 24",
136
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
137
+ d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
138
+ })
139
+ })
140
+ ]
141
+ });
134
142
  };
135
143
  const ToggleIndicatorRounded = ({ r = 6 })=>{
136
144
  const id = (0, _react.useId)();
137
- return /*#__PURE__*/ React.createElement(ToggleIndicatorHolder, null, /*#__PURE__*/ React.createElement(ToggleIndicatorBgCircle, {
138
- viewBox: "0 0 24 24"
139
- }, /*#__PURE__*/ React.createElement("circle", {
140
- cy: "12",
141
- cx: "12",
142
- r: "12",
143
- id: `r_${id}`,
144
- clipPath: `url(#c_${id})`
145
- }), /*#__PURE__*/ React.createElement("clipPath", {
146
- id: `c_${id}`
147
- }, /*#__PURE__*/ React.createElement("use", {
148
- xlinkHref: `#r_${id}`
149
- }))), /*#__PURE__*/ React.createElement(ToggleIndicatorFg, {
150
- viewBox: "0 0 24 24"
151
- }, /*#__PURE__*/ React.createElement("circle", {
152
- r: r,
153
- cx: "12",
154
- cy: "12"
155
- })));
145
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(ToggleIndicatorHolder, {
146
+ children: [
147
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(ToggleIndicatorBgCircle, {
148
+ viewBox: "0 0 24 24",
149
+ children: [
150
+ /*#__PURE__*/ (0, _jsxruntime.jsx)("circle", {
151
+ cy: "12",
152
+ cx: "12",
153
+ r: "12",
154
+ id: `r_${id}`,
155
+ clipPath: `url(#c_${id})`
156
+ }),
157
+ /*#__PURE__*/ (0, _jsxruntime.jsx)("clipPath", {
158
+ id: `c_${id}`,
159
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)("use", {
160
+ xlinkHref: `#r_${id}`
161
+ })
162
+ })
163
+ ]
164
+ }),
165
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(ToggleIndicatorFg, {
166
+ viewBox: "0 0 24 24",
167
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)("circle", {
168
+ r: r,
169
+ cx: "12",
170
+ cy: "12"
171
+ })
172
+ })
173
+ ]
174
+ });
156
175
  };